diff options
| author | David S. Miller <davem@davemloft.net> | 2008-07-27 07:40:08 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2008-07-27 07:40:08 -0400 |
| commit | 15d3b4a26291c170563e2b25ded5de1324f93959 (patch) | |
| tree | 9bea548a7de5215c58a091d58f4eefdb92349f2c /arch | |
| parent | 2c3abab7c95295f319dc8899b74cbd60140fcdfb (diff) | |
| parent | 8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch')
456 files changed, 18195 insertions, 15527 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index ad89a33d8c6e..364c6dadde0a 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
| @@ -27,18 +27,65 @@ config KPROBES | |||
| 27 | for kernel debugging, non-intrusive instrumentation and testing. | 27 | for kernel debugging, non-intrusive instrumentation and testing. |
| 28 | If in doubt, say "N". | 28 | If in doubt, say "N". |
| 29 | 29 | ||
| 30 | config HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
| 31 | def_bool n | ||
| 32 | help | ||
| 33 | Some architectures are unable to perform unaligned accesses | ||
| 34 | without the use of get_unaligned/put_unaligned. Others are | ||
| 35 | unable to perform such accesses efficiently (e.g. trap on | ||
| 36 | unaligned access and require fixing it up in the exception | ||
| 37 | handler.) | ||
| 38 | |||
| 39 | This symbol should be selected by an architecture if it can | ||
| 40 | perform unaligned accesses efficiently to allow different | ||
| 41 | code paths to be selected for these cases. Some network | ||
| 42 | drivers, for example, could opt to not fix up alignment | ||
| 43 | problems with received packets if doing so would not help | ||
| 44 | much. | ||
| 45 | |||
| 46 | See Documentation/unaligned-memory-access.txt for more | ||
| 47 | information on the topic of unaligned memory accesses. | ||
| 48 | |||
| 30 | config KRETPROBES | 49 | config KRETPROBES |
| 31 | def_bool y | 50 | def_bool y |
| 32 | depends on KPROBES && HAVE_KRETPROBES | 51 | depends on KPROBES && HAVE_KRETPROBES |
| 33 | 52 | ||
| 53 | config HAVE_IOREMAP_PROT | ||
| 54 | def_bool n | ||
| 55 | |||
| 34 | config HAVE_KPROBES | 56 | config HAVE_KPROBES |
| 35 | def_bool n | 57 | def_bool n |
| 36 | 58 | ||
| 37 | config HAVE_KRETPROBES | 59 | config HAVE_KRETPROBES |
| 38 | def_bool n | 60 | def_bool n |
| 39 | 61 | ||
| 62 | # | ||
| 63 | # An arch should select this if it provides all these things: | ||
| 64 | # | ||
| 65 | # task_pt_regs() in asm/processor.h or asm/ptrace.h | ||
| 66 | # arch_has_single_step() if there is hardware single-step support | ||
| 67 | # arch_has_block_step() if there is hardware block-step support | ||
| 68 | # arch_ptrace() and not #define __ARCH_SYS_PTRACE | ||
| 69 | # compat_arch_ptrace() and #define __ARCH_WANT_COMPAT_SYS_PTRACE | ||
| 70 | # asm/syscall.h supplying asm-generic/syscall.h interface | ||
| 71 | # linux/regset.h user_regset interfaces | ||
| 72 | # CORE_DUMP_USE_REGSET #define'd in linux/elf.h | ||
| 73 | # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit} | ||
| 74 | # TIF_NOTIFY_RESUME calls tracehook_notify_resume() | ||
| 75 | # signal delivery calls tracehook_signal_handler() | ||
| 76 | # | ||
| 77 | config HAVE_ARCH_TRACEHOOK | ||
| 78 | def_bool n | ||
| 79 | |||
| 40 | config HAVE_DMA_ATTRS | 80 | config HAVE_DMA_ATTRS |
| 41 | def_bool n | 81 | def_bool n |
| 42 | 82 | ||
| 43 | config USE_GENERIC_SMP_HELPERS | 83 | config USE_GENERIC_SMP_HELPERS |
| 44 | def_bool n | 84 | def_bool n |
| 85 | |||
| 86 | config HAVE_CLK | ||
| 87 | def_bool n | ||
| 88 | help | ||
| 89 | The <linux/clk.h> calls support software clock gating and | ||
| 90 | thus are a key power management tool on many systems. | ||
| 91 | |||
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index dbe8c280fea9..1bec55d63ef6 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
| @@ -333,11 +333,6 @@ config PCI_SYSCALL | |||
| 333 | config IOMMU_HELPER | 333 | config IOMMU_HELPER |
| 334 | def_bool PCI | 334 | def_bool PCI |
| 335 | 335 | ||
| 336 | config ALPHA_CORE_AGP | ||
| 337 | bool | ||
| 338 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL | ||
| 339 | default y | ||
| 340 | |||
| 341 | config ALPHA_NONAME | 336 | config ALPHA_NONAME |
| 342 | bool | 337 | bool |
| 343 | depends on ALPHA_BOOK1 || ALPHA_NONAME_CH | 338 | depends on ALPHA_BOOK1 || ALPHA_NONAME_CH |
diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c index c00646b25f6e..3047a1b3a517 100644 --- a/arch/alpha/boot/misc.c +++ b/arch/alpha/boot/misc.c | |||
| @@ -78,8 +78,6 @@ static unsigned outcnt; /* bytes in output buffer */ | |||
| 78 | static int fill_inbuf(void); | 78 | static int fill_inbuf(void); |
| 79 | static void flush_window(void); | 79 | static void flush_window(void); |
| 80 | static void error(char *m); | 80 | static void error(char *m); |
| 81 | static void gzip_mark(void **); | ||
| 82 | static void gzip_release(void **); | ||
| 83 | 81 | ||
| 84 | static char *input_data; | 82 | static char *input_data; |
| 85 | static int input_data_size; | 83 | static int input_data_size; |
| @@ -88,51 +86,18 @@ static uch *output_data; | |||
| 88 | static ulg output_ptr; | 86 | static ulg output_ptr; |
| 89 | static ulg bytes_out; | 87 | static ulg bytes_out; |
| 90 | 88 | ||
| 91 | static void *malloc(int size); | ||
| 92 | static void free(void *where); | ||
| 93 | static void error(char *m); | 89 | static void error(char *m); |
| 94 | static void gzip_mark(void **); | 90 | static void gzip_mark(void **); |
| 95 | static void gzip_release(void **); | 91 | static void gzip_release(void **); |
| 96 | 92 | ||
| 97 | extern int end; | 93 | extern int end; |
| 98 | static ulg free_mem_ptr; | 94 | static ulg free_mem_ptr; |
| 99 | static ulg free_mem_ptr_end; | 95 | static ulg free_mem_end_ptr; |
| 100 | 96 | ||
| 101 | #define HEAP_SIZE 0x3000 | 97 | #define HEAP_SIZE 0x3000 |
| 102 | 98 | ||
| 103 | #include "../../../lib/inflate.c" | 99 | #include "../../../lib/inflate.c" |
| 104 | 100 | ||
| 105 | static void *malloc(int size) | ||
| 106 | { | ||
| 107 | void *p; | ||
| 108 | |||
| 109 | if (size <0) error("Malloc error"); | ||
| 110 | if (free_mem_ptr <= 0) error("Memory error"); | ||
| 111 | |||
| 112 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 113 | |||
| 114 | p = (void *)free_mem_ptr; | ||
| 115 | free_mem_ptr += size; | ||
| 116 | |||
| 117 | if (free_mem_ptr >= free_mem_ptr_end) | ||
| 118 | error("Out of memory"); | ||
| 119 | return p; | ||
| 120 | } | ||
| 121 | |||
| 122 | static void free(void *where) | ||
| 123 | { /* gzip_mark & gzip_release do the free */ | ||
| 124 | } | ||
| 125 | |||
| 126 | static void gzip_mark(void **ptr) | ||
| 127 | { | ||
| 128 | *ptr = (void *) free_mem_ptr; | ||
| 129 | } | ||
| 130 | |||
| 131 | static void gzip_release(void **ptr) | ||
| 132 | { | ||
| 133 | free_mem_ptr = (long) *ptr; | ||
| 134 | } | ||
| 135 | |||
| 136 | /* =========================================================================== | 101 | /* =========================================================================== |
| 137 | * Fill the input buffer. This is called only when the buffer is empty | 102 | * Fill the input buffer. This is called only when the buffer is empty |
| 138 | * and at least one byte is really needed. | 103 | * and at least one byte is really needed. |
| @@ -193,7 +158,7 @@ decompress_kernel(void *output_start, | |||
| 193 | 158 | ||
| 194 | /* FIXME FIXME FIXME */ | 159 | /* FIXME FIXME FIXME */ |
| 195 | free_mem_ptr = (ulg)output_start + ksize; | 160 | free_mem_ptr = (ulg)output_start + ksize; |
| 196 | free_mem_ptr_end = (ulg)output_start + ksize + 0x200000; | 161 | free_mem_end_ptr = (ulg)output_start + ksize + 0x200000; |
| 197 | /* FIXME FIXME FIXME */ | 162 | /* FIXME FIXME FIXME */ |
| 198 | 163 | ||
| 199 | /* put in temp area to reduce initial footprint */ | 164 | /* put in temp area to reduce initial footprint */ |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 32ca1b927307..6e943135f0e0 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
| @@ -253,15 +253,15 @@ do_osf_statfs(struct dentry * dentry, struct osf_statfs __user *buffer, | |||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | asmlinkage int | 255 | asmlinkage int |
| 256 | osf_statfs(char __user *path, struct osf_statfs __user *buffer, unsigned long bufsiz) | 256 | osf_statfs(char __user *pathname, struct osf_statfs __user *buffer, unsigned long bufsiz) |
| 257 | { | 257 | { |
| 258 | struct nameidata nd; | 258 | struct path path; |
| 259 | int retval; | 259 | int retval; |
| 260 | 260 | ||
| 261 | retval = user_path_walk(path, &nd); | 261 | retval = user_path(pathname, &path); |
| 262 | if (!retval) { | 262 | if (!retval) { |
| 263 | retval = do_osf_statfs(nd.path.dentry, buffer, bufsiz); | 263 | retval = do_osf_statfs(path.dentry, buffer, bufsiz); |
| 264 | path_put(&nd.path); | 264 | path_put(&path); |
| 265 | } | 265 | } |
| 266 | return retval; | 266 | return retval; |
| 267 | } | 267 | } |
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 40c15e7301de..234e42b8ee74 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c | |||
| @@ -94,36 +94,6 @@ __bad_page(void) | |||
| 94 | return pte_mkdirty(mk_pte(virt_to_page(EMPTY_PGE), PAGE_SHARED)); | 94 | return pte_mkdirty(mk_pte(virt_to_page(EMPTY_PGE), PAGE_SHARED)); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | #ifndef CONFIG_DISCONTIGMEM | ||
| 98 | void | ||
| 99 | show_mem(void) | ||
| 100 | { | ||
| 101 | long i,free = 0,total = 0,reserved = 0; | ||
| 102 | long shared = 0, cached = 0; | ||
| 103 | |||
| 104 | printk("\nMem-info:\n"); | ||
| 105 | show_free_areas(); | ||
| 106 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 107 | i = max_mapnr; | ||
| 108 | while (i-- > 0) { | ||
| 109 | total++; | ||
| 110 | if (PageReserved(mem_map+i)) | ||
| 111 | reserved++; | ||
| 112 | else if (PageSwapCache(mem_map+i)) | ||
| 113 | cached++; | ||
| 114 | else if (!page_count(mem_map+i)) | ||
| 115 | free++; | ||
| 116 | else | ||
| 117 | shared += page_count(mem_map + i) - 1; | ||
| 118 | } | ||
| 119 | printk("%ld pages of RAM\n",total); | ||
| 120 | printk("%ld free pages\n",free); | ||
| 121 | printk("%ld reserved pages\n",reserved); | ||
| 122 | printk("%ld pages shared\n",shared); | ||
| 123 | printk("%ld pages swap cached\n",cached); | ||
| 124 | } | ||
| 125 | #endif | ||
| 126 | |||
| 127 | static inline unsigned long | 97 | static inline unsigned long |
| 128 | load_PCB(struct pcb_struct *pcb) | 98 | load_PCB(struct pcb_struct *pcb) |
| 129 | { | 99 | { |
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c index 10ab7833e83c..a13de49d1265 100644 --- a/arch/alpha/mm/numa.c +++ b/arch/alpha/mm/numa.c | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | #include <asm/pgalloc.h> | 19 | #include <asm/pgalloc.h> |
| 20 | 20 | ||
| 21 | pg_data_t node_data[MAX_NUMNODES]; | 21 | pg_data_t node_data[MAX_NUMNODES]; |
| 22 | bootmem_data_t node_bdata[MAX_NUMNODES]; | ||
| 23 | EXPORT_SYMBOL(node_data); | 22 | EXPORT_SYMBOL(node_data); |
| 24 | 23 | ||
| 25 | #undef DEBUG_DISCONTIG | 24 | #undef DEBUG_DISCONTIG |
| @@ -141,7 +140,7 @@ setup_memory_node(int nid, void *kernel_end) | |||
| 141 | printk(" not enough mem to reserve NODE_DATA"); | 140 | printk(" not enough mem to reserve NODE_DATA"); |
| 142 | return; | 141 | return; |
| 143 | } | 142 | } |
| 144 | NODE_DATA(nid)->bdata = &node_bdata[nid]; | 143 | NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; |
| 145 | 144 | ||
| 146 | printk(" Detected node memory: start %8lu, end %8lu\n", | 145 | printk(" Detected node memory: start %8lu, end %8lu\n", |
| 147 | node_min_pfn, node_max_pfn); | 146 | node_min_pfn, node_max_pfn); |
| @@ -304,8 +303,9 @@ void __init paging_init(void) | |||
| 304 | dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 303 | dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
| 305 | 304 | ||
| 306 | for_each_online_node(nid) { | 305 | for_each_online_node(nid) { |
| 307 | unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT; | 306 | bootmem_data_t *bdata = &bootmem_node_data[nid]; |
| 308 | unsigned long end_pfn = node_bdata[nid].node_low_pfn; | 307 | unsigned long start_pfn = bdata->node_min_pfn; |
| 308 | unsigned long end_pfn = bdata->node_low_pfn; | ||
| 309 | 309 | ||
| 310 | if (dma_local_pfn >= end_pfn - start_pfn) | 310 | if (dma_local_pfn >= end_pfn - start_pfn) |
| 311 | zones_size[ZONE_DMA] = end_pfn - start_pfn; | 311 | zones_size[ZONE_DMA] = end_pfn - start_pfn; |
| @@ -313,7 +313,7 @@ void __init paging_init(void) | |||
| 313 | zones_size[ZONE_DMA] = dma_local_pfn; | 313 | zones_size[ZONE_DMA] = dma_local_pfn; |
| 314 | zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn; | 314 | zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn; |
| 315 | } | 315 | } |
| 316 | free_area_init_node(nid, NODE_DATA(nid), zones_size, start_pfn, NULL); | 316 | free_area_init_node(nid, zones_size, start_pfn, NULL); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | /* Initialize the kernel's ZERO_PGE. */ | 319 | /* Initialize the kernel's ZERO_PGE. */ |
| @@ -359,38 +359,3 @@ void __init mem_init(void) | |||
| 359 | mem_stress(); | 359 | mem_stress(); |
| 360 | #endif | 360 | #endif |
| 361 | } | 361 | } |
| 362 | |||
| 363 | void | ||
| 364 | show_mem(void) | ||
| 365 | { | ||
| 366 | long i,free = 0,total = 0,reserved = 0; | ||
| 367 | long shared = 0, cached = 0; | ||
| 368 | int nid; | ||
| 369 | |||
| 370 | printk("\nMem-info:\n"); | ||
| 371 | show_free_areas(); | ||
| 372 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 373 | for_each_online_node(nid) { | ||
| 374 | unsigned long flags; | ||
| 375 | pgdat_resize_lock(NODE_DATA(nid), &flags); | ||
| 376 | i = node_spanned_pages(nid); | ||
| 377 | while (i-- > 0) { | ||
| 378 | struct page *page = nid_page_nr(nid, i); | ||
| 379 | total++; | ||
| 380 | if (PageReserved(page)) | ||
| 381 | reserved++; | ||
| 382 | else if (PageSwapCache(page)) | ||
| 383 | cached++; | ||
| 384 | else if (!page_count(page)) | ||
| 385 | free++; | ||
| 386 | else | ||
| 387 | shared += page_count(page) - 1; | ||
| 388 | } | ||
| 389 | pgdat_resize_unlock(NODE_DATA(nid), &flags); | ||
| 390 | } | ||
| 391 | printk("%ld pages of RAM\n",total); | ||
| 392 | printk("%ld free pages\n",free); | ||
| 393 | printk("%ld reserved pages\n",reserved); | ||
| 394 | printk("%ld pages shared\n",shared); | ||
| 395 | printk("%ld pages swap cached\n",cached); | ||
| 396 | } | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c7ad324ddf2c..dabb015aa40b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -12,6 +12,7 @@ config ARM | |||
| 12 | select RTC_LIB | 12 | select RTC_LIB |
| 13 | select SYS_SUPPORTS_APM_EMULATION | 13 | select SYS_SUPPORTS_APM_EMULATION |
| 14 | select HAVE_OPROFILE | 14 | select HAVE_OPROFILE |
| 15 | select HAVE_ARCH_KGDB | ||
| 15 | select HAVE_KPROBES if (!XIP_KERNEL) | 16 | select HAVE_KPROBES if (!XIP_KERNEL) |
| 16 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 17 | select HAVE_KRETPROBES if (HAVE_KPROBES) |
| 17 | select HAVE_FTRACE if (!XIP_KERNEL) | 18 | select HAVE_FTRACE if (!XIP_KERNEL) |
| @@ -197,12 +198,14 @@ choice | |||
| 197 | config ARCH_AAEC2000 | 198 | config ARCH_AAEC2000 |
| 198 | bool "Agilent AAEC-2000 based" | 199 | bool "Agilent AAEC-2000 based" |
| 199 | select ARM_AMBA | 200 | select ARM_AMBA |
| 201 | select HAVE_CLK | ||
| 200 | help | 202 | help |
| 201 | This enables support for systems based on the Agilent AAEC-2000 | 203 | This enables support for systems based on the Agilent AAEC-2000 |
| 202 | 204 | ||
| 203 | config ARCH_INTEGRATOR | 205 | config ARCH_INTEGRATOR |
| 204 | bool "ARM Ltd. Integrator family" | 206 | bool "ARM Ltd. Integrator family" |
| 205 | select ARM_AMBA | 207 | select ARM_AMBA |
| 208 | select HAVE_CLK | ||
| 206 | select ICST525 | 209 | select ICST525 |
| 207 | help | 210 | help |
| 208 | Support for ARM's Integrator platform. | 211 | Support for ARM's Integrator platform. |
| @@ -210,6 +213,7 @@ config ARCH_INTEGRATOR | |||
| 210 | config ARCH_REALVIEW | 213 | config ARCH_REALVIEW |
| 211 | bool "ARM Ltd. RealView family" | 214 | bool "ARM Ltd. RealView family" |
| 212 | select ARM_AMBA | 215 | select ARM_AMBA |
| 216 | select HAVE_CLK | ||
| 213 | select ICST307 | 217 | select ICST307 |
| 214 | select GENERIC_TIME | 218 | select GENERIC_TIME |
| 215 | select GENERIC_CLOCKEVENTS | 219 | select GENERIC_CLOCKEVENTS |
| @@ -220,6 +224,7 @@ config ARCH_VERSATILE | |||
| 220 | bool "ARM Ltd. Versatile family" | 224 | bool "ARM Ltd. Versatile family" |
| 221 | select ARM_AMBA | 225 | select ARM_AMBA |
| 222 | select ARM_VIC | 226 | select ARM_VIC |
| 227 | select HAVE_CLK | ||
| 223 | select ICST307 | 228 | select ICST307 |
| 224 | select GENERIC_TIME | 229 | select GENERIC_TIME |
| 225 | select GENERIC_CLOCKEVENTS | 230 | select GENERIC_CLOCKEVENTS |
| @@ -261,7 +266,9 @@ config ARCH_EP93XX | |||
| 261 | select ARM_AMBA | 266 | select ARM_AMBA |
| 262 | select ARM_VIC | 267 | select ARM_VIC |
| 263 | select GENERIC_GPIO | 268 | select GENERIC_GPIO |
| 264 | select HAVE_GPIO_LIB | 269 | select HAVE_CLK |
| 270 | select HAVE_CLK | ||
| 271 | select ARCH_REQUIRE_GPIOLIB | ||
| 265 | help | 272 | help |
| 266 | This enables support for the Cirrus EP93xx series of CPUs. | 273 | This enables support for the Cirrus EP93xx series of CPUs. |
| 267 | 274 | ||
| @@ -380,6 +387,7 @@ config ARCH_NS9XXX | |||
| 380 | select GENERIC_GPIO | 387 | select GENERIC_GPIO |
| 381 | select GENERIC_TIME | 388 | select GENERIC_TIME |
| 382 | select GENERIC_CLOCKEVENTS | 389 | select GENERIC_CLOCKEVENTS |
| 390 | select HAVE_CLK | ||
| 383 | help | 391 | help |
| 384 | Say Y here if you intend to run this kernel on a NetSilicon NS9xxx | 392 | Say Y here if you intend to run this kernel on a NetSilicon NS9xxx |
| 385 | System. | 393 | System. |
| @@ -429,6 +437,7 @@ config ARCH_ORION5X | |||
| 429 | 437 | ||
| 430 | config ARCH_PNX4008 | 438 | config ARCH_PNX4008 |
| 431 | bool "Philips Nexperia PNX4008 Mobile" | 439 | bool "Philips Nexperia PNX4008 Mobile" |
| 440 | select HAVE_CLK | ||
| 432 | help | 441 | help |
| 433 | This enables support for Philips PNX4008 mobile platform. | 442 | This enables support for Philips PNX4008 mobile platform. |
| 434 | 443 | ||
| @@ -437,7 +446,8 @@ config ARCH_PXA | |||
| 437 | depends on MMU | 446 | depends on MMU |
| 438 | select ARCH_MTD_XIP | 447 | select ARCH_MTD_XIP |
| 439 | select GENERIC_GPIO | 448 | select GENERIC_GPIO |
| 440 | select HAVE_GPIO_LIB | 449 | select HAVE_CLK |
| 450 | select ARCH_REQUIRE_GPIOLIB | ||
| 441 | select GENERIC_TIME | 451 | select GENERIC_TIME |
| 442 | select GENERIC_CLOCKEVENTS | 452 | select GENERIC_CLOCKEVENTS |
| 443 | select TICK_ONESHOT | 453 | select TICK_ONESHOT |
| @@ -467,14 +477,16 @@ config ARCH_SA1100 | |||
| 467 | select GENERIC_GPIO | 477 | select GENERIC_GPIO |
| 468 | select GENERIC_TIME | 478 | select GENERIC_TIME |
| 469 | select GENERIC_CLOCKEVENTS | 479 | select GENERIC_CLOCKEVENTS |
| 480 | select HAVE_CLK | ||
| 470 | select TICK_ONESHOT | 481 | select TICK_ONESHOT |
| 471 | select HAVE_GPIO_LIB | 482 | select ARCH_REQUIRE_GPIOLIB |
| 472 | help | 483 | help |
| 473 | Support for StrongARM 11x0 based boards. | 484 | Support for StrongARM 11x0 based boards. |
| 474 | 485 | ||
| 475 | config ARCH_S3C2410 | 486 | config ARCH_S3C2410 |
| 476 | bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" | 487 | bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" |
| 477 | select GENERIC_GPIO | 488 | select GENERIC_GPIO |
| 489 | select HAVE_CLK | ||
| 478 | help | 490 | help |
| 479 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics | 491 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics |
| 480 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or | 492 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or |
| @@ -502,13 +514,15 @@ config ARCH_DAVINCI | |||
| 502 | select GENERIC_TIME | 514 | select GENERIC_TIME |
| 503 | select GENERIC_CLOCKEVENTS | 515 | select GENERIC_CLOCKEVENTS |
| 504 | select GENERIC_GPIO | 516 | select GENERIC_GPIO |
| 517 | select HAVE_CLK | ||
| 505 | help | 518 | help |
| 506 | Support for TI's DaVinci platform. | 519 | Support for TI's DaVinci platform. |
| 507 | 520 | ||
| 508 | config ARCH_OMAP | 521 | config ARCH_OMAP |
| 509 | bool "TI OMAP" | 522 | bool "TI OMAP" |
| 510 | select GENERIC_GPIO | 523 | select GENERIC_GPIO |
| 511 | select HAVE_GPIO_LIB | 524 | select HAVE_CLK |
| 525 | select ARCH_REQUIRE_GPIOLIB | ||
| 512 | select GENERIC_TIME | 526 | select GENERIC_TIME |
| 513 | select GENERIC_CLOCKEVENTS | 527 | select GENERIC_CLOCKEVENTS |
| 514 | help | 528 | help |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 9b444022cb9b..7145cc7c04f0 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
| @@ -217,8 +217,6 @@ static unsigned outcnt; /* bytes in output buffer */ | |||
| 217 | static int fill_inbuf(void); | 217 | static int fill_inbuf(void); |
| 218 | static void flush_window(void); | 218 | static void flush_window(void); |
| 219 | static void error(char *m); | 219 | static void error(char *m); |
| 220 | static void gzip_mark(void **); | ||
| 221 | static void gzip_release(void **); | ||
| 222 | 220 | ||
| 223 | extern char input_data[]; | 221 | extern char input_data[]; |
| 224 | extern char input_data_end[]; | 222 | extern char input_data_end[]; |
| @@ -227,64 +225,21 @@ static uch *output_data; | |||
| 227 | static ulg output_ptr; | 225 | static ulg output_ptr; |
| 228 | static ulg bytes_out; | 226 | static ulg bytes_out; |
| 229 | 227 | ||
| 230 | static void *malloc(int size); | ||
| 231 | static void free(void *where); | ||
| 232 | static void error(char *m); | 228 | static void error(char *m); |
| 233 | static void gzip_mark(void **); | ||
| 234 | static void gzip_release(void **); | ||
| 235 | 229 | ||
| 236 | static void putstr(const char *); | 230 | static void putstr(const char *); |
| 237 | 231 | ||
| 238 | extern int end; | 232 | extern int end; |
| 239 | static ulg free_mem_ptr; | 233 | static ulg free_mem_ptr; |
| 240 | static ulg free_mem_ptr_end; | 234 | static ulg free_mem_end_ptr; |
| 241 | 235 | ||
| 242 | #define HEAP_SIZE 0x3000 | 236 | #ifdef STANDALONE_DEBUG |
| 243 | 237 | #define NO_INFLATE_MALLOC | |
| 244 | #include "../../../../lib/inflate.c" | 238 | #endif |
| 245 | |||
| 246 | #ifndef STANDALONE_DEBUG | ||
| 247 | static void *malloc(int size) | ||
| 248 | { | ||
| 249 | void *p; | ||
| 250 | |||
| 251 | if (size <0) error("Malloc error"); | ||
| 252 | if (free_mem_ptr <= 0) error("Memory error"); | ||
| 253 | |||
| 254 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 255 | |||
| 256 | p = (void *)free_mem_ptr; | ||
| 257 | free_mem_ptr += size; | ||
| 258 | |||
| 259 | if (free_mem_ptr >= free_mem_ptr_end) | ||
| 260 | error("Out of memory"); | ||
| 261 | return p; | ||
| 262 | } | ||
| 263 | |||
| 264 | static void free(void *where) | ||
| 265 | { /* gzip_mark & gzip_release do the free */ | ||
| 266 | } | ||
| 267 | |||
| 268 | static void gzip_mark(void **ptr) | ||
| 269 | { | ||
| 270 | arch_decomp_wdog(); | ||
| 271 | *ptr = (void *) free_mem_ptr; | ||
| 272 | } | ||
| 273 | 239 | ||
| 274 | static void gzip_release(void **ptr) | 240 | #define ARCH_HAS_DECOMP_WDOG |
| 275 | { | ||
| 276 | arch_decomp_wdog(); | ||
| 277 | free_mem_ptr = (long) *ptr; | ||
| 278 | } | ||
| 279 | #else | ||
| 280 | static void gzip_mark(void **ptr) | ||
| 281 | { | ||
| 282 | } | ||
| 283 | 241 | ||
| 284 | static void gzip_release(void **ptr) | 242 | #include "../../../../lib/inflate.c" |
| 285 | { | ||
| 286 | } | ||
| 287 | #endif | ||
| 288 | 243 | ||
| 289 | /* =========================================================================== | 244 | /* =========================================================================== |
| 290 | * Fill the input buffer. This is called only when the buffer is empty | 245 | * Fill the input buffer. This is called only when the buffer is empty |
| @@ -348,7 +303,7 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, | |||
| 348 | { | 303 | { |
| 349 | output_data = (uch *)output_start; /* Points to kernel start */ | 304 | output_data = (uch *)output_start; /* Points to kernel start */ |
| 350 | free_mem_ptr = free_mem_ptr_p; | 305 | free_mem_ptr = free_mem_ptr_p; |
| 351 | free_mem_ptr_end = free_mem_ptr_end_p; | 306 | free_mem_end_ptr = free_mem_ptr_end_p; |
| 352 | __machine_arch_type = arch_id; | 307 | __machine_arch_type = arch_id; |
| 353 | 308 | ||
| 354 | arch_decomp_setup(); | 309 | arch_decomp_setup(); |
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index dd2947342604..69130f365904 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
| @@ -280,7 +280,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
| 280 | /* | 280 | /* |
| 281 | * Trying to unmap an invalid mapping | 281 | * Trying to unmap an invalid mapping |
| 282 | */ | 282 | */ |
| 283 | if (dma_mapping_error(dma_addr)) { | 283 | if (dma_mapping_error(dev, dma_addr)) { |
| 284 | dev_err(dev, "Trying to unmap invalid mapping\n"); | 284 | dev_err(dev, "Trying to unmap invalid mapping\n"); |
| 285 | return; | 285 | return; |
| 286 | } | 286 | } |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index c8e8f0ea59e1..0a8e1ff2af8a 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
| @@ -627,7 +627,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
| 627 | if (!sachip) | 627 | if (!sachip) |
| 628 | return -ENOMEM; | 628 | return -ENOMEM; |
| 629 | 629 | ||
| 630 | sachip->clk = clk_get(me, "GPIO27_CLK"); | 630 | sachip->clk = clk_get(me, "SA1111_CLK"); |
| 631 | if (!sachip->clk) { | 631 | if (!sachip->clk) { |
| 632 | ret = PTR_ERR(sachip->clk); | 632 | ret = PTR_ERR(sachip->clk); |
| 633 | goto err_free; | 633 | goto err_free; |
diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig new file mode 100644 index 000000000000..2a84d557adc2 --- /dev/null +++ b/arch/arm/configs/ezx_defconfig | |||
| @@ -0,0 +1,1614 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.26-rc3 | ||
| 4 | # Mon Jul 7 17:52:21 2008 | ||
| 5 | # | ||
| 6 | CONFIG_ARM=y | ||
| 7 | CONFIG_HAVE_PWM=y | ||
| 8 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
| 9 | CONFIG_GENERIC_GPIO=y | ||
| 10 | CONFIG_GENERIC_TIME=y | ||
| 11 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 12 | CONFIG_MMU=y | ||
| 13 | # CONFIG_NO_IOPORT is not set | ||
| 14 | CONFIG_GENERIC_HARDIRQS=y | ||
| 15 | CONFIG_STACKTRACE_SUPPORT=y | ||
| 16 | CONFIG_LOCKDEP_SUPPORT=y | ||
| 17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
| 18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
| 19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
| 20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 23 | CONFIG_GENERIC_HWEIGHT=y | ||
| 24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
| 26 | CONFIG_ZONE_DMA=y | ||
| 27 | CONFIG_ARCH_MTD_XIP=y | ||
| 28 | CONFIG_VECTORS_BASE=0xffff0000 | ||
| 29 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 30 | |||
| 31 | # | ||
| 32 | # General setup | ||
| 33 | # | ||
| 34 | CONFIG_EXPERIMENTAL=y | ||
| 35 | CONFIG_BROKEN_ON_SMP=y | ||
| 36 | CONFIG_LOCK_KERNEL=y | ||
| 37 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 38 | CONFIG_LOCALVERSION="-ezxdev" | ||
| 39 | # CONFIG_LOCALVERSION_AUTO is not set | ||
| 40 | CONFIG_SWAP=y | ||
| 41 | CONFIG_SYSVIPC=y | ||
| 42 | CONFIG_SYSVIPC_SYSCTL=y | ||
| 43 | # CONFIG_POSIX_MQUEUE is not set | ||
| 44 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 45 | # CONFIG_TASKSTATS is not set | ||
| 46 | # CONFIG_AUDIT is not set | ||
| 47 | CONFIG_IKCONFIG=y | ||
| 48 | CONFIG_IKCONFIG_PROC=y | ||
| 49 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 50 | # CONFIG_CGROUPS is not set | ||
| 51 | CONFIG_GROUP_SCHED=y | ||
| 52 | CONFIG_FAIR_GROUP_SCHED=y | ||
| 53 | # CONFIG_RT_GROUP_SCHED is not set | ||
| 54 | CONFIG_USER_SCHED=y | ||
| 55 | # CONFIG_CGROUP_SCHED is not set | ||
| 56 | CONFIG_SYSFS_DEPRECATED=y | ||
| 57 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
| 58 | # CONFIG_RELAY is not set | ||
| 59 | # CONFIG_NAMESPACES is not set | ||
| 60 | # CONFIG_BLK_DEV_INITRD is not set | ||
| 61 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 62 | CONFIG_SYSCTL=y | ||
| 63 | CONFIG_EMBEDDED=y | ||
| 64 | CONFIG_UID16=y | ||
| 65 | CONFIG_SYSCTL_SYSCALL=y | ||
| 66 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
| 67 | CONFIG_KALLSYMS=y | ||
| 68 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
| 69 | CONFIG_HOTPLUG=y | ||
| 70 | CONFIG_PRINTK=y | ||
| 71 | CONFIG_BUG=y | ||
| 72 | CONFIG_ELF_CORE=y | ||
| 73 | # CONFIG_COMPAT_BRK is not set | ||
| 74 | CONFIG_BASE_FULL=y | ||
| 75 | CONFIG_FUTEX=y | ||
| 76 | CONFIG_ANON_INODES=y | ||
| 77 | CONFIG_EPOLL=y | ||
| 78 | CONFIG_SIGNALFD=y | ||
| 79 | CONFIG_TIMERFD=y | ||
| 80 | CONFIG_EVENTFD=y | ||
| 81 | CONFIG_SHMEM=y | ||
| 82 | CONFIG_VM_EVENT_COUNTERS=y | ||
| 83 | CONFIG_SLAB=y | ||
| 84 | # CONFIG_SLUB is not set | ||
| 85 | # CONFIG_SLOB is not set | ||
| 86 | # CONFIG_PROFILING is not set | ||
| 87 | # CONFIG_MARKERS is not set | ||
| 88 | CONFIG_HAVE_OPROFILE=y | ||
| 89 | # CONFIG_KPROBES is not set | ||
| 90 | CONFIG_HAVE_KPROBES=y | ||
| 91 | CONFIG_HAVE_KRETPROBES=y | ||
| 92 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
| 93 | CONFIG_PROC_PAGE_MONITOR=y | ||
| 94 | CONFIG_SLABINFO=y | ||
| 95 | CONFIG_RT_MUTEXES=y | ||
| 96 | # CONFIG_TINY_SHMEM is not set | ||
| 97 | CONFIG_BASE_SMALL=0 | ||
| 98 | CONFIG_MODULES=y | ||
| 99 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
| 100 | CONFIG_MODULE_UNLOAD=y | ||
| 101 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
| 102 | CONFIG_MODVERSIONS=y | ||
| 103 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 104 | CONFIG_KMOD=y | ||
| 105 | CONFIG_BLOCK=y | ||
| 106 | # CONFIG_LBD is not set | ||
| 107 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 108 | # CONFIG_LSF is not set | ||
| 109 | # CONFIG_BLK_DEV_BSG is not set | ||
| 110 | |||
| 111 | # | ||
| 112 | # IO Schedulers | ||
| 113 | # | ||
| 114 | CONFIG_IOSCHED_NOOP=y | ||
| 115 | # CONFIG_IOSCHED_AS is not set | ||
| 116 | CONFIG_IOSCHED_DEADLINE=y | ||
| 117 | # CONFIG_IOSCHED_CFQ is not set | ||
| 118 | # CONFIG_DEFAULT_AS is not set | ||
| 119 | CONFIG_DEFAULT_DEADLINE=y | ||
| 120 | # CONFIG_DEFAULT_CFQ is not set | ||
| 121 | # CONFIG_DEFAULT_NOOP is not set | ||
| 122 | CONFIG_DEFAULT_IOSCHED="deadline" | ||
| 123 | CONFIG_CLASSIC_RCU=y | ||
| 124 | |||
| 125 | # | ||
| 126 | # System Type | ||
| 127 | # | ||
| 128 | # CONFIG_ARCH_AAEC2000 is not set | ||
| 129 | # CONFIG_ARCH_INTEGRATOR is not set | ||
| 130 | # CONFIG_ARCH_REALVIEW is not set | ||
| 131 | # CONFIG_ARCH_VERSATILE is not set | ||
| 132 | # CONFIG_ARCH_AT91 is not set | ||
| 133 | # CONFIG_ARCH_CLPS7500 is not set | ||
| 134 | # CONFIG_ARCH_CLPS711X is not set | ||
| 135 | # CONFIG_ARCH_CO285 is not set | ||
| 136 | # CONFIG_ARCH_EBSA110 is not set | ||
| 137 | # CONFIG_ARCH_EP93XX is not set | ||
| 138 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
| 139 | # CONFIG_ARCH_NETX is not set | ||
| 140 | # CONFIG_ARCH_H720X is not set | ||
| 141 | # CONFIG_ARCH_IMX is not set | ||
| 142 | # CONFIG_ARCH_IOP13XX is not set | ||
| 143 | # CONFIG_ARCH_IOP32X is not set | ||
| 144 | # CONFIG_ARCH_IOP33X is not set | ||
| 145 | # CONFIG_ARCH_IXP23XX is not set | ||
| 146 | # CONFIG_ARCH_IXP2000 is not set | ||
| 147 | # CONFIG_ARCH_IXP4XX is not set | ||
| 148 | # CONFIG_ARCH_L7200 is not set | ||
| 149 | # CONFIG_ARCH_KS8695 is not set | ||
| 150 | # CONFIG_ARCH_NS9XXX is not set | ||
| 151 | # CONFIG_ARCH_MXC is not set | ||
| 152 | # CONFIG_ARCH_ORION5X is not set | ||
| 153 | # CONFIG_ARCH_PNX4008 is not set | ||
| 154 | CONFIG_ARCH_PXA=y | ||
| 155 | # CONFIG_ARCH_RPC is not set | ||
| 156 | # CONFIG_ARCH_SA1100 is not set | ||
| 157 | # CONFIG_ARCH_S3C2410 is not set | ||
| 158 | # CONFIG_ARCH_SHARK is not set | ||
| 159 | # CONFIG_ARCH_LH7A40X is not set | ||
| 160 | # CONFIG_ARCH_DAVINCI is not set | ||
| 161 | # CONFIG_ARCH_OMAP is not set | ||
| 162 | # CONFIG_ARCH_MSM7X00A is not set | ||
| 163 | |||
| 164 | # | ||
| 165 | # Intel PXA2xx/PXA3xx Implementations | ||
| 166 | # | ||
| 167 | # CONFIG_ARCH_GUMSTIX is not set | ||
| 168 | # CONFIG_ARCH_LUBBOCK is not set | ||
| 169 | # CONFIG_MACH_LOGICPD_PXA270 is not set | ||
| 170 | # CONFIG_MACH_MAINSTONE is not set | ||
| 171 | # CONFIG_ARCH_PXA_IDP is not set | ||
| 172 | # CONFIG_PXA_SHARPSL is not set | ||
| 173 | # CONFIG_ARCH_PXA_ESERIES is not set | ||
| 174 | # CONFIG_MACH_TRIZEPS4 is not set | ||
| 175 | # CONFIG_MACH_EM_X270 is not set | ||
| 176 | # CONFIG_MACH_COLIBRI is not set | ||
| 177 | # CONFIG_MACH_ZYLONITE is not set | ||
| 178 | # CONFIG_MACH_LITTLETON is not set | ||
| 179 | # CONFIG_MACH_ARMCORE is not set | ||
| 180 | # CONFIG_MACH_MAGICIAN is not set | ||
| 181 | # CONFIG_MACH_PCM027 is not set | ||
| 182 | CONFIG_PXA_EZX=y | ||
| 183 | CONFIG_MACH_EZX_A780=y | ||
| 184 | CONFIG_MACH_EZX_E680=y | ||
| 185 | CONFIG_MACH_EZX_A1200=y | ||
| 186 | CONFIG_MACH_EZX_A910=y | ||
| 187 | CONFIG_MACH_EZX_E6=y | ||
| 188 | CONFIG_MACH_EZX_E2=y | ||
| 189 | CONFIG_PXA27x=y | ||
| 190 | CONFIG_PXA_SSP=y | ||
| 191 | CONFIG_PXA_PWM=y | ||
| 192 | |||
| 193 | # | ||
| 194 | # Boot options | ||
| 195 | # | ||
| 196 | |||
| 197 | # | ||
| 198 | # Power management | ||
| 199 | # | ||
| 200 | |||
| 201 | # | ||
| 202 | # Processor Type | ||
| 203 | # | ||
| 204 | CONFIG_CPU_32=y | ||
| 205 | CONFIG_CPU_XSCALE=y | ||
| 206 | CONFIG_CPU_32v5=y | ||
| 207 | CONFIG_CPU_ABRT_EV5T=y | ||
| 208 | CONFIG_CPU_PABRT_NOIFAR=y | ||
| 209 | CONFIG_CPU_CACHE_VIVT=y | ||
| 210 | CONFIG_CPU_TLB_V4WBI=y | ||
| 211 | CONFIG_CPU_CP15=y | ||
| 212 | CONFIG_CPU_CP15_MMU=y | ||
| 213 | |||
| 214 | # | ||
| 215 | # Processor Features | ||
| 216 | # | ||
| 217 | CONFIG_ARM_THUMB=y | ||
| 218 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
| 219 | # CONFIG_OUTER_CACHE is not set | ||
| 220 | CONFIG_IWMMXT=y | ||
| 221 | CONFIG_XSCALE_PMU=y | ||
| 222 | |||
| 223 | # | ||
| 224 | # Bus support | ||
| 225 | # | ||
| 226 | # CONFIG_PCI_SYSCALL is not set | ||
| 227 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 228 | # CONFIG_PCCARD is not set | ||
| 229 | |||
| 230 | # | ||
| 231 | # Kernel Features | ||
| 232 | # | ||
| 233 | CONFIG_TICK_ONESHOT=y | ||
| 234 | # CONFIG_NO_HZ is not set | ||
| 235 | CONFIG_HIGH_RES_TIMERS=y | ||
| 236 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 237 | CONFIG_PREEMPT=y | ||
| 238 | CONFIG_HZ=100 | ||
| 239 | CONFIG_AEABI=y | ||
| 240 | CONFIG_OABI_COMPAT=y | ||
| 241 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
| 242 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 243 | CONFIG_FLATMEM_MANUAL=y | ||
| 244 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 245 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 246 | CONFIG_FLATMEM=y | ||
| 247 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 248 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 249 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 250 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 251 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
| 252 | # CONFIG_RESOURCES_64BIT is not set | ||
| 253 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 254 | CONFIG_BOUNCE=y | ||
| 255 | CONFIG_VIRT_TO_BUS=y | ||
| 256 | CONFIG_ALIGNMENT_TRAP=y | ||
| 257 | |||
| 258 | # | ||
| 259 | # Boot options | ||
| 260 | # | ||
| 261 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
| 262 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
| 263 | CONFIG_CMDLINE="console=tty1 root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=1 ip=192.168.0.202:192.168.0.200:192.168.0.200:255.255.255.0 debug" | ||
| 264 | # CONFIG_XIP_KERNEL is not set | ||
| 265 | CONFIG_KEXEC=y | ||
| 266 | CONFIG_ATAGS_PROC=y | ||
| 267 | |||
| 268 | # | ||
| 269 | # CPU Frequency scaling | ||
| 270 | # | ||
| 271 | # CONFIG_CPU_FREQ is not set | ||
| 272 | |||
| 273 | # | ||
| 274 | # Floating point emulation | ||
| 275 | # | ||
| 276 | |||
| 277 | # | ||
| 278 | # At least one emulation must be selected | ||
| 279 | # | ||
| 280 | CONFIG_FPE_NWFPE=y | ||
| 281 | # CONFIG_FPE_NWFPE_XP is not set | ||
| 282 | # CONFIG_FPE_FASTFPE is not set | ||
| 283 | |||
| 284 | # | ||
| 285 | # Userspace binary formats | ||
| 286 | # | ||
| 287 | CONFIG_BINFMT_ELF=y | ||
| 288 | CONFIG_BINFMT_AOUT=m | ||
| 289 | CONFIG_BINFMT_MISC=m | ||
| 290 | |||
| 291 | # | ||
| 292 | # Power management options | ||
| 293 | # | ||
| 294 | CONFIG_PM=y | ||
| 295 | # CONFIG_PM_DEBUG is not set | ||
| 296 | CONFIG_PM_SLEEP=y | ||
| 297 | CONFIG_SUSPEND=y | ||
| 298 | CONFIG_SUSPEND_FREEZER=y | ||
| 299 | CONFIG_APM_EMULATION=y | ||
| 300 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
| 301 | |||
| 302 | # | ||
| 303 | # Networking | ||
| 304 | # | ||
| 305 | CONFIG_NET=y | ||
| 306 | |||
| 307 | # | ||
| 308 | # Networking options | ||
| 309 | # | ||
| 310 | CONFIG_PACKET=y | ||
| 311 | CONFIG_PACKET_MMAP=y | ||
| 312 | CONFIG_UNIX=y | ||
| 313 | CONFIG_XFRM=y | ||
| 314 | # CONFIG_XFRM_USER is not set | ||
| 315 | # CONFIG_XFRM_SUB_POLICY is not set | ||
| 316 | # CONFIG_XFRM_MIGRATE is not set | ||
| 317 | # CONFIG_XFRM_STATISTICS is not set | ||
| 318 | # CONFIG_NET_KEY is not set | ||
| 319 | CONFIG_INET=y | ||
| 320 | # CONFIG_IP_MULTICAST is not set | ||
| 321 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 322 | CONFIG_IP_FIB_HASH=y | ||
| 323 | CONFIG_IP_PNP=y | ||
| 324 | CONFIG_IP_PNP_DHCP=y | ||
| 325 | CONFIG_IP_PNP_BOOTP=y | ||
| 326 | CONFIG_IP_PNP_RARP=y | ||
| 327 | # CONFIG_NET_IPIP is not set | ||
| 328 | # CONFIG_NET_IPGRE is not set | ||
| 329 | # CONFIG_ARPD is not set | ||
| 330 | CONFIG_SYN_COOKIES=y | ||
| 331 | # CONFIG_INET_AH is not set | ||
| 332 | # CONFIG_INET_ESP is not set | ||
| 333 | # CONFIG_INET_IPCOMP is not set | ||
| 334 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 335 | CONFIG_INET_TUNNEL=m | ||
| 336 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
| 337 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
| 338 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
| 339 | # CONFIG_INET_LRO is not set | ||
| 340 | # CONFIG_INET_DIAG is not set | ||
| 341 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 342 | CONFIG_TCP_CONG_CUBIC=y | ||
| 343 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 344 | # CONFIG_TCP_MD5SIG is not set | ||
| 345 | # CONFIG_IP_VS is not set | ||
| 346 | CONFIG_IPV6=m | ||
| 347 | # CONFIG_IPV6_PRIVACY is not set | ||
| 348 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
| 349 | # CONFIG_IPV6_OPTIMISTIC_DAD is not set | ||
| 350 | CONFIG_INET6_AH=m | ||
| 351 | CONFIG_INET6_ESP=m | ||
| 352 | CONFIG_INET6_IPCOMP=m | ||
| 353 | CONFIG_IPV6_MIP6=m | ||
| 354 | CONFIG_INET6_XFRM_TUNNEL=m | ||
| 355 | CONFIG_INET6_TUNNEL=m | ||
| 356 | CONFIG_INET6_XFRM_MODE_TRANSPORT=m | ||
| 357 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | ||
| 358 | CONFIG_INET6_XFRM_MODE_BEET=m | ||
| 359 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | ||
| 360 | CONFIG_IPV6_SIT=m | ||
| 361 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
| 362 | CONFIG_IPV6_TUNNEL=m | ||
| 363 | CONFIG_IPV6_MULTIPLE_TABLES=y | ||
| 364 | CONFIG_IPV6_SUBTREES=y | ||
| 365 | # CONFIG_IPV6_MROUTE is not set | ||
| 366 | # CONFIG_NETWORK_SECMARK is not set | ||
| 367 | CONFIG_NETFILTER=y | ||
| 368 | # CONFIG_NETFILTER_DEBUG is not set | ||
| 369 | CONFIG_NETFILTER_ADVANCED=y | ||
| 370 | CONFIG_BRIDGE_NETFILTER=y | ||
| 371 | |||
| 372 | # | ||
| 373 | # Core Netfilter Configuration | ||
| 374 | # | ||
| 375 | CONFIG_NETFILTER_NETLINK=m | ||
| 376 | CONFIG_NETFILTER_NETLINK_QUEUE=m | ||
| 377 | CONFIG_NETFILTER_NETLINK_LOG=m | ||
| 378 | CONFIG_NF_CONNTRACK=m | ||
| 379 | CONFIG_NF_CT_ACCT=y | ||
| 380 | CONFIG_NF_CONNTRACK_MARK=y | ||
| 381 | CONFIG_NF_CONNTRACK_EVENTS=y | ||
| 382 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
| 383 | CONFIG_NF_CT_PROTO_GRE=m | ||
| 384 | CONFIG_NF_CT_PROTO_SCTP=m | ||
| 385 | CONFIG_NF_CT_PROTO_UDPLITE=m | ||
| 386 | CONFIG_NF_CONNTRACK_AMANDA=m | ||
| 387 | CONFIG_NF_CONNTRACK_FTP=m | ||
| 388 | CONFIG_NF_CONNTRACK_H323=m | ||
| 389 | CONFIG_NF_CONNTRACK_IRC=m | ||
| 390 | CONFIG_NF_CONNTRACK_NETBIOS_NS=m | ||
| 391 | CONFIG_NF_CONNTRACK_PPTP=m | ||
| 392 | CONFIG_NF_CONNTRACK_SANE=m | ||
| 393 | CONFIG_NF_CONNTRACK_SIP=m | ||
| 394 | CONFIG_NF_CONNTRACK_TFTP=m | ||
| 395 | CONFIG_NF_CT_NETLINK=m | ||
| 396 | CONFIG_NETFILTER_XTABLES=m | ||
| 397 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
| 398 | # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set | ||
| 399 | # CONFIG_NETFILTER_XT_TARGET_DSCP is not set | ||
| 400 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
| 401 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
| 402 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | ||
| 403 | # CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set | ||
| 404 | # CONFIG_NETFILTER_XT_TARGET_RATEEST is not set | ||
| 405 | # CONFIG_NETFILTER_XT_TARGET_TRACE is not set | ||
| 406 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
| 407 | # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set | ||
| 408 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
| 409 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
| 410 | CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m | ||
| 411 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
| 412 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | ||
| 413 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
| 414 | CONFIG_NETFILTER_XT_MATCH_DSCP=m | ||
| 415 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
| 416 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
| 417 | # CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set | ||
| 418 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
| 419 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
| 420 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
| 421 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
| 422 | # CONFIG_NETFILTER_XT_MATCH_OWNER is not set | ||
| 423 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | ||
| 424 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
| 425 | # CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set | ||
| 426 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
| 427 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
| 428 | # CONFIG_NETFILTER_XT_MATCH_RATEEST is not set | ||
| 429 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
| 430 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
| 431 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
| 432 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
| 433 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
| 434 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
| 435 | CONFIG_NETFILTER_XT_MATCH_TIME=m | ||
| 436 | CONFIG_NETFILTER_XT_MATCH_U32=m | ||
| 437 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
| 438 | |||
| 439 | # | ||
| 440 | # IP: Netfilter Configuration | ||
| 441 | # | ||
| 442 | CONFIG_NF_CONNTRACK_IPV4=m | ||
| 443 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | ||
| 444 | CONFIG_IP_NF_QUEUE=m | ||
| 445 | CONFIG_IP_NF_IPTABLES=m | ||
| 446 | CONFIG_IP_NF_MATCH_RECENT=m | ||
| 447 | CONFIG_IP_NF_MATCH_ECN=m | ||
| 448 | CONFIG_IP_NF_MATCH_AH=m | ||
| 449 | CONFIG_IP_NF_MATCH_TTL=m | ||
| 450 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
| 451 | CONFIG_IP_NF_FILTER=m | ||
| 452 | CONFIG_IP_NF_TARGET_REJECT=m | ||
| 453 | CONFIG_IP_NF_TARGET_LOG=m | ||
| 454 | CONFIG_IP_NF_TARGET_ULOG=m | ||
| 455 | CONFIG_NF_NAT=m | ||
| 456 | CONFIG_NF_NAT_NEEDED=y | ||
| 457 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
| 458 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
| 459 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
| 460 | CONFIG_NF_NAT_SNMP_BASIC=m | ||
| 461 | CONFIG_NF_NAT_PROTO_GRE=m | ||
| 462 | CONFIG_NF_NAT_PROTO_UDPLITE=m | ||
| 463 | CONFIG_NF_NAT_PROTO_SCTP=m | ||
| 464 | CONFIG_NF_NAT_FTP=m | ||
| 465 | CONFIG_NF_NAT_IRC=m | ||
| 466 | CONFIG_NF_NAT_TFTP=m | ||
| 467 | CONFIG_NF_NAT_AMANDA=m | ||
| 468 | CONFIG_NF_NAT_PPTP=m | ||
| 469 | CONFIG_NF_NAT_H323=m | ||
| 470 | CONFIG_NF_NAT_SIP=m | ||
| 471 | CONFIG_IP_NF_MANGLE=m | ||
| 472 | CONFIG_IP_NF_TARGET_ECN=m | ||
| 473 | CONFIG_IP_NF_TARGET_TTL=m | ||
| 474 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
| 475 | CONFIG_IP_NF_RAW=m | ||
| 476 | CONFIG_IP_NF_ARPTABLES=m | ||
| 477 | CONFIG_IP_NF_ARPFILTER=m | ||
| 478 | CONFIG_IP_NF_ARP_MANGLE=m | ||
| 479 | |||
| 480 | # | ||
| 481 | # IPv6: Netfilter Configuration | ||
| 482 | # | ||
| 483 | CONFIG_NF_CONNTRACK_IPV6=m | ||
| 484 | CONFIG_IP6_NF_QUEUE=m | ||
| 485 | CONFIG_IP6_NF_IPTABLES=m | ||
| 486 | CONFIG_IP6_NF_MATCH_RT=m | ||
| 487 | CONFIG_IP6_NF_MATCH_OPTS=m | ||
| 488 | CONFIG_IP6_NF_MATCH_FRAG=m | ||
| 489 | CONFIG_IP6_NF_MATCH_HL=m | ||
| 490 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m | ||
| 491 | CONFIG_IP6_NF_MATCH_AH=m | ||
| 492 | CONFIG_IP6_NF_MATCH_MH=m | ||
| 493 | CONFIG_IP6_NF_MATCH_EUI64=m | ||
| 494 | CONFIG_IP6_NF_FILTER=m | ||
| 495 | CONFIG_IP6_NF_TARGET_LOG=m | ||
| 496 | CONFIG_IP6_NF_TARGET_REJECT=m | ||
| 497 | CONFIG_IP6_NF_MANGLE=m | ||
| 498 | CONFIG_IP6_NF_TARGET_HL=m | ||
| 499 | CONFIG_IP6_NF_RAW=m | ||
| 500 | |||
| 501 | # | ||
| 502 | # Bridge: Netfilter Configuration | ||
| 503 | # | ||
| 504 | # CONFIG_BRIDGE_NF_EBTABLES is not set | ||
| 505 | # CONFIG_IP_DCCP is not set | ||
| 506 | # CONFIG_IP_SCTP is not set | ||
| 507 | # CONFIG_TIPC is not set | ||
| 508 | # CONFIG_ATM is not set | ||
| 509 | CONFIG_BRIDGE=m | ||
| 510 | # CONFIG_VLAN_8021Q is not set | ||
| 511 | # CONFIG_DECNET is not set | ||
| 512 | CONFIG_LLC=m | ||
| 513 | # CONFIG_LLC2 is not set | ||
| 514 | # CONFIG_IPX is not set | ||
| 515 | # CONFIG_ATALK is not set | ||
| 516 | # CONFIG_X25 is not set | ||
| 517 | # CONFIG_LAPB is not set | ||
| 518 | # CONFIG_ECONET is not set | ||
| 519 | # CONFIG_WAN_ROUTER is not set | ||
| 520 | # CONFIG_NET_SCHED is not set | ||
| 521 | CONFIG_NET_CLS_ROUTE=y | ||
| 522 | CONFIG_NET_SCH_FIFO=y | ||
| 523 | |||
| 524 | # | ||
| 525 | # Network testing | ||
| 526 | # | ||
| 527 | # CONFIG_NET_PKTGEN is not set | ||
| 528 | # CONFIG_HAMRADIO is not set | ||
| 529 | # CONFIG_CAN is not set | ||
| 530 | # CONFIG_IRDA is not set | ||
| 531 | CONFIG_BT=y | ||
| 532 | CONFIG_BT_L2CAP=m | ||
| 533 | CONFIG_BT_SCO=y | ||
| 534 | CONFIG_BT_RFCOMM=m | ||
| 535 | CONFIG_BT_RFCOMM_TTY=y | ||
| 536 | CONFIG_BT_BNEP=m | ||
| 537 | CONFIG_BT_BNEP_MC_FILTER=y | ||
| 538 | CONFIG_BT_BNEP_PROTO_FILTER=y | ||
| 539 | CONFIG_BT_HIDP=m | ||
| 540 | |||
| 541 | # | ||
| 542 | # Bluetooth device drivers | ||
| 543 | # | ||
| 544 | # CONFIG_BT_HCIUSB is not set | ||
| 545 | # CONFIG_BT_HCIBTUSB is not set | ||
| 546 | # CONFIG_BT_HCIBTSDIO is not set | ||
| 547 | CONFIG_BT_HCIUART=y | ||
| 548 | CONFIG_BT_HCIUART_H4=y | ||
| 549 | # CONFIG_BT_HCIUART_BCSP is not set | ||
| 550 | # CONFIG_BT_HCIUART_LL is not set | ||
| 551 | # CONFIG_BT_HCIBCM203X is not set | ||
| 552 | # CONFIG_BT_HCIBPA10X is not set | ||
| 553 | # CONFIG_BT_HCIBFUSB is not set | ||
| 554 | # CONFIG_BT_HCIVHCI is not set | ||
| 555 | # CONFIG_AF_RXRPC is not set | ||
| 556 | CONFIG_FIB_RULES=y | ||
| 557 | |||
| 558 | # | ||
| 559 | # Wireless | ||
| 560 | # | ||
| 561 | CONFIG_CFG80211=m | ||
| 562 | CONFIG_NL80211=y | ||
| 563 | CONFIG_WIRELESS_EXT=y | ||
| 564 | CONFIG_MAC80211=m | ||
| 565 | |||
| 566 | # | ||
| 567 | # Rate control algorithm selection | ||
| 568 | # | ||
| 569 | CONFIG_MAC80211_RC_DEFAULT_PID=y | ||
| 570 | # CONFIG_MAC80211_RC_DEFAULT_NONE is not set | ||
| 571 | |||
| 572 | # | ||
| 573 | # Selecting 'y' for an algorithm will | ||
| 574 | # | ||
| 575 | |||
| 576 | # | ||
| 577 | # build the algorithm into mac80211. | ||
| 578 | # | ||
| 579 | CONFIG_MAC80211_RC_DEFAULT="pid" | ||
| 580 | CONFIG_MAC80211_RC_PID=y | ||
| 581 | # CONFIG_MAC80211_MESH is not set | ||
| 582 | CONFIG_MAC80211_LEDS=y | ||
| 583 | # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set | ||
| 584 | # CONFIG_MAC80211_DEBUG is not set | ||
| 585 | CONFIG_IEEE80211=m | ||
| 586 | # CONFIG_IEEE80211_DEBUG is not set | ||
| 587 | CONFIG_IEEE80211_CRYPT_WEP=m | ||
| 588 | CONFIG_IEEE80211_CRYPT_CCMP=m | ||
| 589 | CONFIG_IEEE80211_CRYPT_TKIP=m | ||
| 590 | # CONFIG_RFKILL is not set | ||
| 591 | # CONFIG_NET_9P is not set | ||
| 592 | |||
| 593 | # | ||
| 594 | # Device Drivers | ||
| 595 | # | ||
| 596 | |||
| 597 | # | ||
| 598 | # Generic Driver Options | ||
| 599 | # | ||
| 600 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 601 | CONFIG_STANDALONE=y | ||
| 602 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 603 | CONFIG_FW_LOADER=m | ||
| 604 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 605 | CONFIG_CONNECTOR=m | ||
| 606 | CONFIG_MTD=y | ||
| 607 | # CONFIG_MTD_DEBUG is not set | ||
| 608 | # CONFIG_MTD_CONCAT is not set | ||
| 609 | CONFIG_MTD_PARTITIONS=y | ||
| 610 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 611 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 612 | # CONFIG_MTD_AFS_PARTS is not set | ||
| 613 | # CONFIG_MTD_AR7_PARTS is not set | ||
| 614 | |||
| 615 | # | ||
| 616 | # User Modules And Translation Layers | ||
| 617 | # | ||
| 618 | CONFIG_MTD_CHAR=y | ||
| 619 | # CONFIG_MTD_BLKDEVS is not set | ||
| 620 | # CONFIG_MTD_BLOCK is not set | ||
| 621 | # CONFIG_MTD_BLOCK_RO is not set | ||
| 622 | # CONFIG_FTL is not set | ||
| 623 | # CONFIG_NFTL is not set | ||
| 624 | # CONFIG_INFTL is not set | ||
| 625 | # CONFIG_RFD_FTL is not set | ||
| 626 | # CONFIG_SSFDC is not set | ||
| 627 | # CONFIG_MTD_OOPS is not set | ||
| 628 | |||
| 629 | # | ||
| 630 | # RAM/ROM/Flash chip drivers | ||
| 631 | # | ||
| 632 | CONFIG_MTD_CFI=y | ||
| 633 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 634 | CONFIG_MTD_GEN_PROBE=y | ||
| 635 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
| 636 | CONFIG_MTD_CFI_NOSWAP=y | ||
| 637 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
| 638 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
| 639 | CONFIG_MTD_CFI_GEOMETRY=y | ||
| 640 | # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set | ||
| 641 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 642 | # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set | ||
| 643 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 644 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 645 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 646 | CONFIG_MTD_CFI_I1=y | ||
| 647 | # CONFIG_MTD_CFI_I2 is not set | ||
| 648 | # CONFIG_MTD_CFI_I4 is not set | ||
| 649 | # CONFIG_MTD_CFI_I8 is not set | ||
| 650 | # CONFIG_MTD_OTP is not set | ||
| 651 | CONFIG_MTD_CFI_INTELEXT=y | ||
| 652 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
| 653 | # CONFIG_MTD_CFI_STAA is not set | ||
| 654 | CONFIG_MTD_CFI_UTIL=y | ||
| 655 | # CONFIG_MTD_RAM is not set | ||
| 656 | # CONFIG_MTD_ROM is not set | ||
| 657 | # CONFIG_MTD_ABSENT is not set | ||
| 658 | CONFIG_MTD_XIP=y | ||
| 659 | |||
| 660 | # | ||
| 661 | # Mapping drivers for chip access | ||
| 662 | # | ||
| 663 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 664 | CONFIG_MTD_PHYSMAP=y | ||
| 665 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
| 666 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
| 667 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
| 668 | # CONFIG_MTD_PXA2XX is not set | ||
| 669 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
| 670 | # CONFIG_MTD_SHARP_SL is not set | ||
| 671 | # CONFIG_MTD_PLATRAM is not set | ||
| 672 | |||
| 673 | # | ||
| 674 | # Self-contained MTD device drivers | ||
| 675 | # | ||
| 676 | # CONFIG_MTD_DATAFLASH is not set | ||
| 677 | # CONFIG_MTD_M25P80 is not set | ||
| 678 | # CONFIG_MTD_SLRAM is not set | ||
| 679 | # CONFIG_MTD_PHRAM is not set | ||
| 680 | # CONFIG_MTD_MTDRAM is not set | ||
| 681 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 682 | |||
| 683 | # | ||
| 684 | # Disk-On-Chip Device Drivers | ||
| 685 | # | ||
| 686 | # CONFIG_MTD_DOC2000 is not set | ||
| 687 | # CONFIG_MTD_DOC2001 is not set | ||
| 688 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 689 | # CONFIG_MTD_NAND is not set | ||
| 690 | # CONFIG_MTD_ONENAND is not set | ||
| 691 | |||
| 692 | # | ||
| 693 | # UBI - Unsorted block images | ||
| 694 | # | ||
| 695 | # CONFIG_MTD_UBI is not set | ||
| 696 | # CONFIG_PARPORT is not set | ||
| 697 | CONFIG_BLK_DEV=y | ||
| 698 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 699 | CONFIG_BLK_DEV_LOOP=m | ||
| 700 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
| 701 | CONFIG_BLK_DEV_NBD=m | ||
| 702 | # CONFIG_BLK_DEV_UB is not set | ||
| 703 | CONFIG_BLK_DEV_RAM=m | ||
| 704 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 705 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 706 | # CONFIG_BLK_DEV_XIP is not set | ||
| 707 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 708 | # CONFIG_ATA_OVER_ETH is not set | ||
| 709 | CONFIG_MISC_DEVICES=y | ||
| 710 | # CONFIG_EEPROM_93CX6 is not set | ||
| 711 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
| 712 | CONFIG_HAVE_IDE=y | ||
| 713 | # CONFIG_IDE is not set | ||
| 714 | |||
| 715 | # | ||
| 716 | # SCSI device support | ||
| 717 | # | ||
| 718 | # CONFIG_RAID_ATTRS is not set | ||
| 719 | # CONFIG_SCSI is not set | ||
| 720 | # CONFIG_SCSI_DMA is not set | ||
| 721 | # CONFIG_SCSI_NETLINK is not set | ||
| 722 | # CONFIG_ATA is not set | ||
| 723 | # CONFIG_MD is not set | ||
| 724 | CONFIG_NETDEVICES=y | ||
| 725 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 726 | CONFIG_DUMMY=y | ||
| 727 | # CONFIG_BONDING is not set | ||
| 728 | # CONFIG_MACVLAN is not set | ||
| 729 | # CONFIG_EQUALIZER is not set | ||
| 730 | # CONFIG_TUN is not set | ||
| 731 | # CONFIG_VETH is not set | ||
| 732 | # CONFIG_NET_ETHERNET is not set | ||
| 733 | # CONFIG_NETDEV_1000 is not set | ||
| 734 | # CONFIG_NETDEV_10000 is not set | ||
| 735 | |||
| 736 | # | ||
| 737 | # Wireless LAN | ||
| 738 | # | ||
| 739 | # CONFIG_WLAN_PRE80211 is not set | ||
| 740 | # CONFIG_WLAN_80211 is not set | ||
| 741 | # CONFIG_IWLWIFI_LEDS is not set | ||
| 742 | |||
| 743 | # | ||
| 744 | # USB Network Adapters | ||
| 745 | # | ||
| 746 | # CONFIG_USB_CATC is not set | ||
| 747 | # CONFIG_USB_KAWETH is not set | ||
| 748 | # CONFIG_USB_PEGASUS is not set | ||
| 749 | # CONFIG_USB_RTL8150 is not set | ||
| 750 | # CONFIG_USB_USBNET is not set | ||
| 751 | # CONFIG_WAN is not set | ||
| 752 | CONFIG_PPP=m | ||
| 753 | CONFIG_PPP_MULTILINK=y | ||
| 754 | CONFIG_PPP_FILTER=y | ||
| 755 | CONFIG_PPP_ASYNC=m | ||
| 756 | CONFIG_PPP_SYNC_TTY=m | ||
| 757 | CONFIG_PPP_DEFLATE=m | ||
| 758 | CONFIG_PPP_BSDCOMP=m | ||
| 759 | # CONFIG_PPP_MPPE is not set | ||
| 760 | # CONFIG_PPPOE is not set | ||
| 761 | # CONFIG_PPPOL2TP is not set | ||
| 762 | # CONFIG_SLIP is not set | ||
| 763 | CONFIG_SLHC=m | ||
| 764 | # CONFIG_NETCONSOLE is not set | ||
| 765 | # CONFIG_NETPOLL is not set | ||
| 766 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 767 | # CONFIG_ISDN is not set | ||
| 768 | |||
| 769 | # | ||
| 770 | # Input device support | ||
| 771 | # | ||
| 772 | CONFIG_INPUT=y | ||
| 773 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
| 774 | # CONFIG_INPUT_POLLDEV is not set | ||
| 775 | |||
| 776 | # | ||
| 777 | # Userland interfaces | ||
| 778 | # | ||
| 779 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 780 | # CONFIG_INPUT_JOYDEV is not set | ||
| 781 | CONFIG_INPUT_EVDEV=y | ||
| 782 | # CONFIG_INPUT_EVBUG is not set | ||
| 783 | # CONFIG_INPUT_APMPOWER is not set | ||
| 784 | |||
| 785 | # | ||
| 786 | # Input Device Drivers | ||
| 787 | # | ||
| 788 | CONFIG_INPUT_KEYBOARD=y | ||
| 789 | # CONFIG_KEYBOARD_ATKBD is not set | ||
| 790 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
| 791 | # CONFIG_KEYBOARD_LKKBD is not set | ||
| 792 | # CONFIG_KEYBOARD_XTKBD is not set | ||
| 793 | # CONFIG_KEYBOARD_NEWTON is not set | ||
| 794 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
| 795 | CONFIG_KEYBOARD_PXA27x=y | ||
| 796 | CONFIG_KEYBOARD_GPIO=y | ||
| 797 | # CONFIG_INPUT_MOUSE is not set | ||
| 798 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 799 | # CONFIG_INPUT_TABLET is not set | ||
| 800 | CONFIG_INPUT_TOUCHSCREEN=y | ||
| 801 | # CONFIG_TOUCHSCREEN_ADS7846 is not set | ||
| 802 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
| 803 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
| 804 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
| 805 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
| 806 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
| 807 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | ||
| 808 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | ||
| 809 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
| 810 | # CONFIG_TOUCHSCREEN_UCB1400 is not set | ||
| 811 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
| 812 | CONFIG_TOUCHSCREEN_PCAP=y | ||
| 813 | CONFIG_INPUT_MISC=y | ||
| 814 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
| 815 | # CONFIG_INPUT_ATI_REMOTE2 is not set | ||
| 816 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | ||
| 817 | # CONFIG_INPUT_POWERMATE is not set | ||
| 818 | # CONFIG_INPUT_YEALINK is not set | ||
| 819 | CONFIG_INPUT_UINPUT=y | ||
| 820 | |||
| 821 | # | ||
| 822 | # Hardware I/O ports | ||
| 823 | # | ||
| 824 | # CONFIG_SERIO is not set | ||
| 825 | # CONFIG_GAMEPORT is not set | ||
| 826 | |||
| 827 | # | ||
| 828 | # Character devices | ||
| 829 | # | ||
| 830 | CONFIG_VT=y | ||
| 831 | CONFIG_VT_CONSOLE=y | ||
| 832 | CONFIG_HW_CONSOLE=y | ||
| 833 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
| 834 | CONFIG_DEVKMEM=y | ||
| 835 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 836 | |||
| 837 | # | ||
| 838 | # Serial drivers | ||
| 839 | # | ||
| 840 | # CONFIG_SERIAL_8250 is not set | ||
| 841 | |||
| 842 | # | ||
| 843 | # Non-8250 serial port support | ||
| 844 | # | ||
| 845 | CONFIG_SERIAL_PXA=y | ||
| 846 | CONFIG_SERIAL_PXA_CONSOLE=y | ||
| 847 | CONFIG_SERIAL_CORE=y | ||
| 848 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 849 | CONFIG_UNIX98_PTYS=y | ||
| 850 | CONFIG_LEGACY_PTYS=y | ||
| 851 | CONFIG_LEGACY_PTY_COUNT=8 | ||
| 852 | # CONFIG_IPMI_HANDLER is not set | ||
| 853 | CONFIG_HW_RANDOM=y | ||
| 854 | # CONFIG_NVRAM is not set | ||
| 855 | # CONFIG_R3964 is not set | ||
| 856 | # CONFIG_RAW_DRIVER is not set | ||
| 857 | # CONFIG_TCG_TPM is not set | ||
| 858 | CONFIG_I2C=y | ||
| 859 | CONFIG_I2C_BOARDINFO=y | ||
| 860 | CONFIG_I2C_CHARDEV=y | ||
| 861 | |||
| 862 | # | ||
| 863 | # I2C Hardware Bus support | ||
| 864 | # | ||
| 865 | # CONFIG_I2C_GPIO is not set | ||
| 866 | CONFIG_I2C_PXA=y | ||
| 867 | # CONFIG_I2C_PXA_SLAVE is not set | ||
| 868 | # CONFIG_I2C_OCORES is not set | ||
| 869 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
| 870 | # CONFIG_I2C_SIMTEC is not set | ||
| 871 | # CONFIG_I2C_TAOS_EVM is not set | ||
| 872 | # CONFIG_I2C_STUB is not set | ||
| 873 | # CONFIG_I2C_TINY_USB is not set | ||
| 874 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
| 875 | |||
| 876 | # | ||
| 877 | # Miscellaneous I2C Chip support | ||
| 878 | # | ||
| 879 | # CONFIG_DS1682 is not set | ||
| 880 | # CONFIG_SENSORS_EEPROM is not set | ||
| 881 | # CONFIG_SENSORS_PCF8574 is not set | ||
| 882 | # CONFIG_PCF8575 is not set | ||
| 883 | # CONFIG_SENSORS_PCF8591 is not set | ||
| 884 | # CONFIG_TPS65010 is not set | ||
| 885 | # CONFIG_SENSORS_MAX6875 is not set | ||
| 886 | # CONFIG_SENSORS_TSL2550 is not set | ||
| 887 | # CONFIG_I2C_DEBUG_CORE is not set | ||
| 888 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
| 889 | # CONFIG_I2C_DEBUG_BUS is not set | ||
| 890 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
| 891 | CONFIG_SPI=y | ||
| 892 | CONFIG_SPI_MASTER=y | ||
| 893 | |||
| 894 | # | ||
| 895 | # SPI Master Controller Drivers | ||
| 896 | # | ||
| 897 | # CONFIG_SPI_BITBANG is not set | ||
| 898 | CONFIG_SPI_PXA2XX=m | ||
| 899 | |||
| 900 | # | ||
| 901 | # SPI Protocol Masters | ||
| 902 | # | ||
| 903 | # CONFIG_SPI_AT25 is not set | ||
| 904 | # CONFIG_SPI_SPIDEV is not set | ||
| 905 | # CONFIG_SPI_TLE62X0 is not set | ||
| 906 | CONFIG_HAVE_GPIO_LIB=y | ||
| 907 | |||
| 908 | # | ||
| 909 | # GPIO Support | ||
| 910 | # | ||
| 911 | |||
| 912 | # | ||
| 913 | # I2C GPIO expanders: | ||
| 914 | # | ||
| 915 | # CONFIG_GPIO_PCA953X is not set | ||
| 916 | # CONFIG_GPIO_PCF857X is not set | ||
| 917 | |||
| 918 | # | ||
| 919 | # SPI GPIO expanders: | ||
| 920 | # | ||
| 921 | # CONFIG_GPIO_MCP23S08 is not set | ||
| 922 | # CONFIG_W1 is not set | ||
| 923 | # CONFIG_POWER_SUPPLY is not set | ||
| 924 | # CONFIG_HWMON is not set | ||
| 925 | # CONFIG_WATCHDOG is not set | ||
| 926 | |||
| 927 | # | ||
| 928 | # Sonics Silicon Backplane | ||
| 929 | # | ||
| 930 | CONFIG_SSB_POSSIBLE=y | ||
| 931 | # CONFIG_SSB is not set | ||
| 932 | |||
| 933 | # | ||
| 934 | # Multifunction device drivers | ||
| 935 | # | ||
| 936 | # CONFIG_MFD_CORE is not set | ||
| 937 | # CONFIG_MFD_SM501 is not set | ||
| 938 | # CONFIG_MFD_ASIC3 is not set | ||
| 939 | # CONFIG_HTC_EGPIO is not set | ||
| 940 | # CONFIG_HTC_PASIC3 is not set | ||
| 941 | # CONFIG_MFD_TC6393XB is not set | ||
| 942 | CONFIG_EZX_PCAP=y | ||
| 943 | |||
| 944 | # | ||
| 945 | # Multimedia devices | ||
| 946 | # | ||
| 947 | |||
| 948 | # | ||
| 949 | # Multimedia core support | ||
| 950 | # | ||
| 951 | CONFIG_VIDEO_DEV=m | ||
| 952 | CONFIG_VIDEO_V4L2_COMMON=m | ||
| 953 | CONFIG_VIDEO_ALLOW_V4L1=y | ||
| 954 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
| 955 | # CONFIG_DVB_CORE is not set | ||
| 956 | CONFIG_VIDEO_MEDIA=m | ||
| 957 | |||
| 958 | # | ||
| 959 | # Multimedia drivers | ||
| 960 | # | ||
| 961 | # CONFIG_MEDIA_ATTACH is not set | ||
| 962 | CONFIG_MEDIA_TUNER=m | ||
| 963 | # CONFIG_MEDIA_TUNER_CUSTOMIZE is not set | ||
| 964 | CONFIG_MEDIA_TUNER_SIMPLE=m | ||
| 965 | CONFIG_MEDIA_TUNER_TDA8290=m | ||
| 966 | CONFIG_MEDIA_TUNER_TDA9887=m | ||
| 967 | CONFIG_MEDIA_TUNER_TEA5761=m | ||
| 968 | CONFIG_MEDIA_TUNER_TEA5767=m | ||
| 969 | CONFIG_MEDIA_TUNER_MT20XX=m | ||
| 970 | CONFIG_MEDIA_TUNER_XC2028=m | ||
| 971 | CONFIG_MEDIA_TUNER_XC5000=m | ||
| 972 | CONFIG_VIDEO_V4L2=m | ||
| 973 | CONFIG_VIDEO_V4L1=m | ||
| 974 | CONFIG_VIDEO_CAPTURE_DRIVERS=y | ||
| 975 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
| 976 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
| 977 | # CONFIG_VIDEO_VIVI is not set | ||
| 978 | # CONFIG_VIDEO_CPIA is not set | ||
| 979 | # CONFIG_VIDEO_CPIA2 is not set | ||
| 980 | # CONFIG_VIDEO_SAA5246A is not set | ||
| 981 | # CONFIG_VIDEO_SAA5249 is not set | ||
| 982 | # CONFIG_TUNER_3036 is not set | ||
| 983 | # CONFIG_V4L_USB_DRIVERS is not set | ||
| 984 | # CONFIG_SOC_CAMERA is not set | ||
| 985 | # CONFIG_VIDEO_PXA27x is not set | ||
| 986 | CONFIG_RADIO_ADAPTERS=y | ||
| 987 | # CONFIG_USB_DSBR is not set | ||
| 988 | # CONFIG_USB_SI470X is not set | ||
| 989 | # CONFIG_DAB is not set | ||
| 990 | |||
| 991 | # | ||
| 992 | # Graphics support | ||
| 993 | # | ||
| 994 | # CONFIG_VGASTATE is not set | ||
| 995 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 996 | CONFIG_FB=y | ||
| 997 | # CONFIG_FIRMWARE_EDID is not set | ||
| 998 | # CONFIG_FB_DDC is not set | ||
| 999 | CONFIG_FB_CFB_FILLRECT=y | ||
| 1000 | CONFIG_FB_CFB_COPYAREA=y | ||
| 1001 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
| 1002 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
| 1003 | # CONFIG_FB_SYS_FILLRECT is not set | ||
| 1004 | # CONFIG_FB_SYS_COPYAREA is not set | ||
| 1005 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
| 1006 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
| 1007 | # CONFIG_FB_SYS_FOPS is not set | ||
| 1008 | # CONFIG_FB_SVGALIB is not set | ||
| 1009 | # CONFIG_FB_MACMODES is not set | ||
| 1010 | # CONFIG_FB_BACKLIGHT is not set | ||
| 1011 | # CONFIG_FB_MODE_HELPERS is not set | ||
| 1012 | # CONFIG_FB_TILEBLITTING is not set | ||
| 1013 | |||
| 1014 | # | ||
| 1015 | # Frame buffer hardware drivers | ||
| 1016 | # | ||
| 1017 | # CONFIG_FB_UVESA is not set | ||
| 1018 | # CONFIG_FB_S1D13XXX is not set | ||
| 1019 | CONFIG_FB_PXA=y | ||
| 1020 | # CONFIG_FB_PXA_SMARTPANEL is not set | ||
| 1021 | CONFIG_FB_PXA_PARAMETERS=y | ||
| 1022 | # CONFIG_FB_MBX is not set | ||
| 1023 | # CONFIG_FB_AM200EPD is not set | ||
| 1024 | # CONFIG_FB_VIRTUAL is not set | ||
| 1025 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 1026 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
| 1027 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
| 1028 | # CONFIG_BACKLIGHT_CORGI is not set | ||
| 1029 | CONFIG_BACKLIGHT_PWM=y | ||
| 1030 | |||
| 1031 | # | ||
| 1032 | # Display device support | ||
| 1033 | # | ||
| 1034 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 1035 | |||
| 1036 | # | ||
| 1037 | # Console display driver support | ||
| 1038 | # | ||
| 1039 | # CONFIG_VGA_CONSOLE is not set | ||
| 1040 | CONFIG_DUMMY_CONSOLE=y | ||
| 1041 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
| 1042 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
| 1043 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
| 1044 | CONFIG_FONTS=y | ||
| 1045 | # CONFIG_FONT_8x8 is not set | ||
| 1046 | # CONFIG_FONT_8x16 is not set | ||
| 1047 | # CONFIG_FONT_6x11 is not set | ||
| 1048 | # CONFIG_FONT_7x14 is not set | ||
| 1049 | # CONFIG_FONT_PEARL_8x8 is not set | ||
| 1050 | # CONFIG_FONT_ACORN_8x8 is not set | ||
| 1051 | CONFIG_FONT_MINI_4x6=y | ||
| 1052 | # CONFIG_FONT_SUN8x16 is not set | ||
| 1053 | # CONFIG_FONT_SUN12x22 is not set | ||
| 1054 | # CONFIG_FONT_10x18 is not set | ||
| 1055 | # CONFIG_LOGO is not set | ||
| 1056 | |||
| 1057 | # | ||
| 1058 | # Sound | ||
| 1059 | # | ||
| 1060 | CONFIG_SOUND=y | ||
| 1061 | |||
| 1062 | # | ||
| 1063 | # Advanced Linux Sound Architecture | ||
| 1064 | # | ||
| 1065 | CONFIG_SND=y | ||
| 1066 | CONFIG_SND_TIMER=y | ||
| 1067 | CONFIG_SND_PCM=y | ||
| 1068 | # CONFIG_SND_SEQUENCER is not set | ||
| 1069 | CONFIG_SND_OSSEMUL=y | ||
| 1070 | CONFIG_SND_MIXER_OSS=y | ||
| 1071 | CONFIG_SND_PCM_OSS=y | ||
| 1072 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
| 1073 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
| 1074 | CONFIG_SND_SUPPORT_OLD_API=y | ||
| 1075 | CONFIG_SND_VERBOSE_PROCFS=y | ||
| 1076 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
| 1077 | # CONFIG_SND_DEBUG is not set | ||
| 1078 | |||
| 1079 | # | ||
| 1080 | # Generic devices | ||
| 1081 | # | ||
| 1082 | # CONFIG_SND_DUMMY is not set | ||
| 1083 | # CONFIG_SND_MTPAV is not set | ||
| 1084 | # CONFIG_SND_SERIAL_U16550 is not set | ||
| 1085 | # CONFIG_SND_MPU401 is not set | ||
| 1086 | |||
| 1087 | # | ||
| 1088 | # ALSA ARM devices | ||
| 1089 | # | ||
| 1090 | # CONFIG_SND_PXA2XX_AC97 is not set | ||
| 1091 | |||
| 1092 | # | ||
| 1093 | # SPI devices | ||
| 1094 | # | ||
| 1095 | |||
| 1096 | # | ||
| 1097 | # USB devices | ||
| 1098 | # | ||
| 1099 | # CONFIG_SND_USB_AUDIO is not set | ||
| 1100 | # CONFIG_SND_USB_CAIAQ is not set | ||
| 1101 | |||
| 1102 | # | ||
| 1103 | # System on Chip audio support | ||
| 1104 | # | ||
| 1105 | CONFIG_SND_SOC=y | ||
| 1106 | CONFIG_SND_PXA2XX_SOC=y | ||
| 1107 | |||
| 1108 | # | ||
| 1109 | # ALSA SoC audio for Freescale SOCs | ||
| 1110 | # | ||
| 1111 | |||
| 1112 | # | ||
| 1113 | # SoC Audio for the Texas Instruments OMAP | ||
| 1114 | # | ||
| 1115 | |||
| 1116 | # | ||
| 1117 | # Open Sound System | ||
| 1118 | # | ||
| 1119 | # CONFIG_SOUND_PRIME is not set | ||
| 1120 | CONFIG_HID_SUPPORT=y | ||
| 1121 | CONFIG_HID=y | ||
| 1122 | # CONFIG_HID_DEBUG is not set | ||
| 1123 | # CONFIG_HIDRAW is not set | ||
| 1124 | |||
| 1125 | # | ||
| 1126 | # USB Input Devices | ||
| 1127 | # | ||
| 1128 | # CONFIG_USB_HID is not set | ||
| 1129 | |||
| 1130 | # | ||
| 1131 | # USB HID Boot Protocol drivers | ||
| 1132 | # | ||
| 1133 | # CONFIG_USB_KBD is not set | ||
| 1134 | # CONFIG_USB_MOUSE is not set | ||
| 1135 | CONFIG_USB_SUPPORT=y | ||
| 1136 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 1137 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
| 1138 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
| 1139 | CONFIG_USB=y | ||
| 1140 | # CONFIG_USB_DEBUG is not set | ||
| 1141 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
| 1142 | |||
| 1143 | # | ||
| 1144 | # Miscellaneous USB options | ||
| 1145 | # | ||
| 1146 | # CONFIG_USB_DEVICEFS is not set | ||
| 1147 | # CONFIG_USB_DEVICE_CLASS is not set | ||
| 1148 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
| 1149 | # CONFIG_USB_SUSPEND is not set | ||
| 1150 | # CONFIG_USB_OTG is not set | ||
| 1151 | # CONFIG_USB_OTG_WHITELIST is not set | ||
| 1152 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
| 1153 | |||
| 1154 | # | ||
| 1155 | # USB Host Controller Drivers | ||
| 1156 | # | ||
| 1157 | # CONFIG_USB_C67X00_HCD is not set | ||
| 1158 | # CONFIG_USB_ISP116X_HCD is not set | ||
| 1159 | # CONFIG_USB_ISP1760_HCD is not set | ||
| 1160 | CONFIG_USB_OHCI_HCD=y | ||
| 1161 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
| 1162 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
| 1163 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
| 1164 | # CONFIG_USB_SL811_HCD is not set | ||
| 1165 | # CONFIG_USB_R8A66597_HCD is not set | ||
| 1166 | |||
| 1167 | # | ||
| 1168 | # USB Device Class drivers | ||
| 1169 | # | ||
| 1170 | # CONFIG_USB_ACM is not set | ||
| 1171 | # CONFIG_USB_PRINTER is not set | ||
| 1172 | |||
| 1173 | # | ||
| 1174 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 1175 | # | ||
| 1176 | |||
| 1177 | # | ||
| 1178 | # may also be needed; see USB_STORAGE Help for more information | ||
| 1179 | # | ||
| 1180 | # CONFIG_USB_LIBUSUAL is not set | ||
| 1181 | |||
| 1182 | # | ||
| 1183 | # USB Imaging devices | ||
| 1184 | # | ||
| 1185 | # CONFIG_USB_MDC800 is not set | ||
| 1186 | # CONFIG_USB_MON is not set | ||
| 1187 | |||
| 1188 | # | ||
| 1189 | # USB port drivers | ||
| 1190 | # | ||
| 1191 | # CONFIG_USB_SERIAL is not set | ||
| 1192 | |||
| 1193 | # | ||
| 1194 | # USB Miscellaneous drivers | ||
| 1195 | # | ||
| 1196 | # CONFIG_USB_EMI62 is not set | ||
| 1197 | # CONFIG_USB_EMI26 is not set | ||
| 1198 | # CONFIG_USB_ADUTUX is not set | ||
| 1199 | # CONFIG_USB_AUERSWALD is not set | ||
| 1200 | # CONFIG_USB_RIO500 is not set | ||
| 1201 | # CONFIG_USB_LEGOTOWER is not set | ||
| 1202 | # CONFIG_USB_LCD is not set | ||
| 1203 | # CONFIG_USB_BERRY_CHARGE is not set | ||
| 1204 | # CONFIG_USB_LED is not set | ||
| 1205 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
| 1206 | # CONFIG_USB_CYTHERM is not set | ||
| 1207 | # CONFIG_USB_PHIDGET is not set | ||
| 1208 | # CONFIG_USB_IDMOUSE is not set | ||
| 1209 | # CONFIG_USB_FTDI_ELAN is not set | ||
| 1210 | # CONFIG_USB_APPLEDISPLAY is not set | ||
| 1211 | # CONFIG_USB_LD is not set | ||
| 1212 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
| 1213 | # CONFIG_USB_IOWARRIOR is not set | ||
| 1214 | CONFIG_USB_GADGET=y | ||
| 1215 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
| 1216 | CONFIG_USB_GADGET_SELECTED=y | ||
| 1217 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
| 1218 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
| 1219 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
| 1220 | # CONFIG_USB_GADGET_NET2280 is not set | ||
| 1221 | # CONFIG_USB_GADGET_PXA25X is not set | ||
| 1222 | # CONFIG_USB_GADGET_M66592 is not set | ||
| 1223 | CONFIG_USB_GADGET_PXA27X=y | ||
| 1224 | CONFIG_USB_PXA27X=y | ||
| 1225 | # CONFIG_USB_GADGET_GOKU is not set | ||
| 1226 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
| 1227 | # CONFIG_USB_GADGET_OMAP is not set | ||
| 1228 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
| 1229 | # CONFIG_USB_GADGET_AT91 is not set | ||
| 1230 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
| 1231 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
| 1232 | # CONFIG_USB_ZERO is not set | ||
| 1233 | CONFIG_USB_ETH=y | ||
| 1234 | # CONFIG_USB_ETH_RNDIS is not set | ||
| 1235 | # CONFIG_USB_GADGETFS is not set | ||
| 1236 | # CONFIG_USB_FILE_STORAGE is not set | ||
| 1237 | # CONFIG_USB_G_SERIAL is not set | ||
| 1238 | # CONFIG_USB_MIDI_GADGET is not set | ||
| 1239 | # CONFIG_USB_G_PRINTER is not set | ||
| 1240 | CONFIG_MMC=y | ||
| 1241 | # CONFIG_MMC_DEBUG is not set | ||
| 1242 | CONFIG_MMC_UNSAFE_RESUME=y | ||
| 1243 | |||
| 1244 | # | ||
| 1245 | # MMC/SD Card Drivers | ||
| 1246 | # | ||
| 1247 | CONFIG_MMC_BLOCK=y | ||
| 1248 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
| 1249 | CONFIG_SDIO_UART=y | ||
| 1250 | |||
| 1251 | # | ||
| 1252 | # MMC/SD Host Controller Drivers | ||
| 1253 | # | ||
| 1254 | CONFIG_MMC_PXA=y | ||
| 1255 | # CONFIG_MMC_SPI is not set | ||
| 1256 | CONFIG_NEW_LEDS=y | ||
| 1257 | CONFIG_LEDS_CLASS=y | ||
| 1258 | |||
| 1259 | # | ||
| 1260 | # LED drivers | ||
| 1261 | # | ||
| 1262 | # CONFIG_LEDS_GPIO is not set | ||
| 1263 | |||
| 1264 | # | ||
| 1265 | # LED Triggers | ||
| 1266 | # | ||
| 1267 | CONFIG_LEDS_TRIGGERS=y | ||
| 1268 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
| 1269 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
| 1270 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set | ||
| 1271 | CONFIG_RTC_LIB=y | ||
| 1272 | CONFIG_RTC_CLASS=y | ||
| 1273 | CONFIG_RTC_HCTOSYS=y | ||
| 1274 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 1275 | # CONFIG_RTC_DEBUG is not set | ||
| 1276 | |||
| 1277 | # | ||
| 1278 | # RTC interfaces | ||
| 1279 | # | ||
| 1280 | CONFIG_RTC_INTF_SYSFS=y | ||
| 1281 | CONFIG_RTC_INTF_PROC=y | ||
| 1282 | CONFIG_RTC_INTF_DEV=y | ||
| 1283 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 1284 | # CONFIG_RTC_DRV_TEST is not set | ||
| 1285 | |||
| 1286 | # | ||
| 1287 | # I2C RTC drivers | ||
| 1288 | # | ||
| 1289 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 1290 | # CONFIG_RTC_DRV_DS1374 is not set | ||
| 1291 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 1292 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 1293 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 1294 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 1295 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 1296 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 1297 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 1298 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 1299 | # CONFIG_RTC_DRV_S35390A is not set | ||
| 1300 | |||
| 1301 | # | ||
| 1302 | # SPI RTC drivers | ||
| 1303 | # | ||
| 1304 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
| 1305 | # CONFIG_RTC_DRV_R9701 is not set | ||
| 1306 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
| 1307 | |||
| 1308 | # | ||
| 1309 | # Platform RTC drivers | ||
| 1310 | # | ||
| 1311 | # CONFIG_RTC_DRV_CMOS is not set | ||
| 1312 | # CONFIG_RTC_DRV_DS1511 is not set | ||
| 1313 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 1314 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 1315 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 1316 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 1317 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 1318 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 1319 | |||
| 1320 | # | ||
| 1321 | # on-CPU RTC drivers | ||
| 1322 | # | ||
| 1323 | CONFIG_RTC_DRV_SA1100=m | ||
| 1324 | # CONFIG_UIO is not set | ||
| 1325 | |||
| 1326 | # | ||
| 1327 | # File systems | ||
| 1328 | # | ||
| 1329 | CONFIG_EXT2_FS=y | ||
| 1330 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 1331 | # CONFIG_EXT2_FS_XIP is not set | ||
| 1332 | CONFIG_EXT3_FS=m | ||
| 1333 | CONFIG_EXT3_FS_XATTR=y | ||
| 1334 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
| 1335 | # CONFIG_EXT3_FS_SECURITY is not set | ||
| 1336 | # CONFIG_EXT4DEV_FS is not set | ||
| 1337 | CONFIG_JBD=m | ||
| 1338 | CONFIG_FS_MBCACHE=y | ||
| 1339 | CONFIG_REISERFS_FS=m | ||
| 1340 | # CONFIG_REISERFS_CHECK is not set | ||
| 1341 | # CONFIG_REISERFS_PROC_INFO is not set | ||
| 1342 | CONFIG_REISERFS_FS_XATTR=y | ||
| 1343 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
| 1344 | CONFIG_REISERFS_FS_SECURITY=y | ||
| 1345 | # CONFIG_JFS_FS is not set | ||
| 1346 | CONFIG_FS_POSIX_ACL=y | ||
| 1347 | CONFIG_XFS_FS=m | ||
| 1348 | # CONFIG_XFS_QUOTA is not set | ||
| 1349 | # CONFIG_XFS_POSIX_ACL is not set | ||
| 1350 | # CONFIG_XFS_RT is not set | ||
| 1351 | # CONFIG_XFS_DEBUG is not set | ||
| 1352 | # CONFIG_OCFS2_FS is not set | ||
| 1353 | CONFIG_DNOTIFY=y | ||
| 1354 | CONFIG_INOTIFY=y | ||
| 1355 | CONFIG_INOTIFY_USER=y | ||
| 1356 | # CONFIG_QUOTA is not set | ||
| 1357 | CONFIG_AUTOFS_FS=y | ||
| 1358 | CONFIG_AUTOFS4_FS=y | ||
| 1359 | CONFIG_FUSE_FS=m | ||
| 1360 | |||
| 1361 | # | ||
| 1362 | # CD-ROM/DVD Filesystems | ||
| 1363 | # | ||
| 1364 | CONFIG_ISO9660_FS=m | ||
| 1365 | CONFIG_JOLIET=y | ||
| 1366 | CONFIG_ZISOFS=y | ||
| 1367 | # CONFIG_UDF_FS is not set | ||
| 1368 | |||
| 1369 | # | ||
| 1370 | # DOS/FAT/NT Filesystems | ||
| 1371 | # | ||
| 1372 | CONFIG_FAT_FS=m | ||
| 1373 | CONFIG_MSDOS_FS=m | ||
| 1374 | CONFIG_VFAT_FS=m | ||
| 1375 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
| 1376 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
| 1377 | # CONFIG_NTFS_FS is not set | ||
| 1378 | |||
| 1379 | # | ||
| 1380 | # Pseudo filesystems | ||
| 1381 | # | ||
| 1382 | CONFIG_PROC_FS=y | ||
| 1383 | CONFIG_PROC_SYSCTL=y | ||
| 1384 | CONFIG_SYSFS=y | ||
| 1385 | CONFIG_TMPFS=y | ||
| 1386 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
| 1387 | # CONFIG_HUGETLB_PAGE is not set | ||
| 1388 | # CONFIG_CONFIGFS_FS is not set | ||
| 1389 | |||
| 1390 | # | ||
| 1391 | # Miscellaneous filesystems | ||
| 1392 | # | ||
| 1393 | # CONFIG_ADFS_FS is not set | ||
| 1394 | # CONFIG_AFFS_FS is not set | ||
| 1395 | # CONFIG_HFS_FS is not set | ||
| 1396 | # CONFIG_HFSPLUS_FS is not set | ||
| 1397 | # CONFIG_BEFS_FS is not set | ||
| 1398 | # CONFIG_BFS_FS is not set | ||
| 1399 | # CONFIG_EFS_FS is not set | ||
| 1400 | # CONFIG_JFFS2_FS is not set | ||
| 1401 | CONFIG_CRAMFS=m | ||
| 1402 | # CONFIG_VXFS_FS is not set | ||
| 1403 | # CONFIG_MINIX_FS is not set | ||
| 1404 | # CONFIG_HPFS_FS is not set | ||
| 1405 | # CONFIG_QNX4FS_FS is not set | ||
| 1406 | # CONFIG_ROMFS_FS is not set | ||
| 1407 | # CONFIG_SYSV_FS is not set | ||
| 1408 | # CONFIG_UFS_FS is not set | ||
| 1409 | CONFIG_NETWORK_FILESYSTEMS=y | ||
| 1410 | CONFIG_NFS_FS=y | ||
| 1411 | CONFIG_NFS_V3=y | ||
| 1412 | CONFIG_NFS_V3_ACL=y | ||
| 1413 | # CONFIG_NFS_V4 is not set | ||
| 1414 | CONFIG_NFSD=m | ||
| 1415 | CONFIG_NFSD_V2_ACL=y | ||
| 1416 | CONFIG_NFSD_V3=y | ||
| 1417 | CONFIG_NFSD_V3_ACL=y | ||
| 1418 | # CONFIG_NFSD_V4 is not set | ||
| 1419 | # CONFIG_ROOT_NFS is not set | ||
| 1420 | CONFIG_LOCKD=y | ||
| 1421 | CONFIG_LOCKD_V4=y | ||
| 1422 | CONFIG_EXPORTFS=m | ||
| 1423 | CONFIG_NFS_ACL_SUPPORT=y | ||
| 1424 | CONFIG_NFS_COMMON=y | ||
| 1425 | CONFIG_SUNRPC=y | ||
| 1426 | # CONFIG_SUNRPC_BIND34 is not set | ||
| 1427 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
| 1428 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 1429 | CONFIG_SMB_FS=m | ||
| 1430 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
| 1431 | CONFIG_CIFS=m | ||
| 1432 | CONFIG_CIFS_STATS=y | ||
| 1433 | # CONFIG_CIFS_STATS2 is not set | ||
| 1434 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
| 1435 | CONFIG_CIFS_XATTR=y | ||
| 1436 | CONFIG_CIFS_POSIX=y | ||
| 1437 | # CONFIG_CIFS_DEBUG2 is not set | ||
| 1438 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
| 1439 | # CONFIG_NCP_FS is not set | ||
| 1440 | # CONFIG_CODA_FS is not set | ||
| 1441 | # CONFIG_AFS_FS is not set | ||
| 1442 | |||
| 1443 | # | ||
| 1444 | # Partition Types | ||
| 1445 | # | ||
| 1446 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 1447 | CONFIG_MSDOS_PARTITION=y | ||
| 1448 | CONFIG_NLS=y | ||
| 1449 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
| 1450 | CONFIG_NLS_CODEPAGE_437=m | ||
| 1451 | CONFIG_NLS_CODEPAGE_737=m | ||
| 1452 | CONFIG_NLS_CODEPAGE_775=m | ||
| 1453 | CONFIG_NLS_CODEPAGE_850=m | ||
| 1454 | CONFIG_NLS_CODEPAGE_852=m | ||
| 1455 | CONFIG_NLS_CODEPAGE_855=m | ||
| 1456 | CONFIG_NLS_CODEPAGE_857=m | ||
| 1457 | CONFIG_NLS_CODEPAGE_860=m | ||
| 1458 | CONFIG_NLS_CODEPAGE_861=m | ||
| 1459 | CONFIG_NLS_CODEPAGE_862=m | ||
| 1460 | CONFIG_NLS_CODEPAGE_863=m | ||
| 1461 | CONFIG_NLS_CODEPAGE_864=m | ||
| 1462 | CONFIG_NLS_CODEPAGE_865=m | ||
| 1463 | CONFIG_NLS_CODEPAGE_866=m | ||
| 1464 | CONFIG_NLS_CODEPAGE_869=m | ||
| 1465 | CONFIG_NLS_CODEPAGE_936=m | ||
| 1466 | CONFIG_NLS_CODEPAGE_950=m | ||
| 1467 | CONFIG_NLS_CODEPAGE_932=m | ||
| 1468 | CONFIG_NLS_CODEPAGE_949=m | ||
| 1469 | CONFIG_NLS_CODEPAGE_874=m | ||
| 1470 | CONFIG_NLS_ISO8859_8=m | ||
| 1471 | CONFIG_NLS_CODEPAGE_1250=m | ||
| 1472 | CONFIG_NLS_CODEPAGE_1251=m | ||
| 1473 | CONFIG_NLS_ASCII=m | ||
| 1474 | CONFIG_NLS_ISO8859_1=m | ||
| 1475 | CONFIG_NLS_ISO8859_2=m | ||
| 1476 | CONFIG_NLS_ISO8859_3=m | ||
| 1477 | CONFIG_NLS_ISO8859_4=m | ||
| 1478 | CONFIG_NLS_ISO8859_5=m | ||
| 1479 | CONFIG_NLS_ISO8859_6=m | ||
| 1480 | CONFIG_NLS_ISO8859_7=m | ||
| 1481 | CONFIG_NLS_ISO8859_9=m | ||
| 1482 | CONFIG_NLS_ISO8859_13=m | ||
| 1483 | CONFIG_NLS_ISO8859_14=m | ||
| 1484 | CONFIG_NLS_ISO8859_15=m | ||
| 1485 | CONFIG_NLS_KOI8_R=m | ||
| 1486 | CONFIG_NLS_KOI8_U=m | ||
| 1487 | CONFIG_NLS_UTF8=m | ||
| 1488 | # CONFIG_DLM is not set | ||
| 1489 | |||
| 1490 | # | ||
| 1491 | # Kernel hacking | ||
| 1492 | # | ||
| 1493 | # CONFIG_PRINTK_TIME is not set | ||
| 1494 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1495 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
| 1496 | CONFIG_FRAME_WARN=1024 | ||
| 1497 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 1498 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 1499 | # CONFIG_DEBUG_FS is not set | ||
| 1500 | # CONFIG_HEADERS_CHECK is not set | ||
| 1501 | # CONFIG_DEBUG_KERNEL is not set | ||
| 1502 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 1503 | CONFIG_FRAME_POINTER=y | ||
| 1504 | # CONFIG_SAMPLES is not set | ||
| 1505 | # CONFIG_DEBUG_USER is not set | ||
| 1506 | |||
| 1507 | # | ||
| 1508 | # Security options | ||
| 1509 | # | ||
| 1510 | # CONFIG_KEYS is not set | ||
| 1511 | # CONFIG_SECURITY is not set | ||
| 1512 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 1513 | CONFIG_CRYPTO=y | ||
| 1514 | |||
| 1515 | # | ||
| 1516 | # Crypto core or helper | ||
| 1517 | # | ||
| 1518 | CONFIG_CRYPTO_ALGAPI=m | ||
| 1519 | CONFIG_CRYPTO_AEAD=m | ||
| 1520 | CONFIG_CRYPTO_BLKCIPHER=m | ||
| 1521 | CONFIG_CRYPTO_HASH=m | ||
| 1522 | CONFIG_CRYPTO_MANAGER=m | ||
| 1523 | CONFIG_CRYPTO_GF128MUL=m | ||
| 1524 | CONFIG_CRYPTO_NULL=m | ||
| 1525 | CONFIG_CRYPTO_CRYPTD=m | ||
| 1526 | CONFIG_CRYPTO_AUTHENC=m | ||
| 1527 | CONFIG_CRYPTO_TEST=m | ||
| 1528 | |||
| 1529 | # | ||
| 1530 | # Authenticated Encryption with Associated Data | ||
| 1531 | # | ||
| 1532 | # CONFIG_CRYPTO_CCM is not set | ||
| 1533 | # CONFIG_CRYPTO_GCM is not set | ||
| 1534 | # CONFIG_CRYPTO_SEQIV is not set | ||
| 1535 | |||
| 1536 | # | ||
| 1537 | # Block modes | ||
| 1538 | # | ||
| 1539 | CONFIG_CRYPTO_CBC=m | ||
| 1540 | # CONFIG_CRYPTO_CTR is not set | ||
| 1541 | # CONFIG_CRYPTO_CTS is not set | ||
| 1542 | CONFIG_CRYPTO_ECB=m | ||
| 1543 | CONFIG_CRYPTO_LRW=m | ||
| 1544 | CONFIG_CRYPTO_PCBC=m | ||
| 1545 | CONFIG_CRYPTO_XTS=m | ||
| 1546 | |||
| 1547 | # | ||
| 1548 | # Hash modes | ||
| 1549 | # | ||
| 1550 | CONFIG_CRYPTO_HMAC=m | ||
| 1551 | CONFIG_CRYPTO_XCBC=m | ||
| 1552 | |||
| 1553 | # | ||
| 1554 | # Digest | ||
| 1555 | # | ||
| 1556 | CONFIG_CRYPTO_CRC32C=m | ||
| 1557 | CONFIG_CRYPTO_MD4=m | ||
| 1558 | CONFIG_CRYPTO_MD5=m | ||
| 1559 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
| 1560 | CONFIG_CRYPTO_SHA1=m | ||
| 1561 | CONFIG_CRYPTO_SHA256=m | ||
| 1562 | CONFIG_CRYPTO_SHA512=m | ||
| 1563 | CONFIG_CRYPTO_TGR192=m | ||
| 1564 | # CONFIG_CRYPTO_WP512 is not set | ||
| 1565 | |||
| 1566 | # | ||
| 1567 | # Ciphers | ||
| 1568 | # | ||
| 1569 | CONFIG_CRYPTO_AES=m | ||
| 1570 | # CONFIG_CRYPTO_ANUBIS is not set | ||
| 1571 | CONFIG_CRYPTO_ARC4=m | ||
| 1572 | CONFIG_CRYPTO_BLOWFISH=m | ||
| 1573 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
| 1574 | CONFIG_CRYPTO_CAST5=m | ||
| 1575 | CONFIG_CRYPTO_CAST6=m | ||
| 1576 | CONFIG_CRYPTO_DES=m | ||
| 1577 | CONFIG_CRYPTO_FCRYPT=m | ||
| 1578 | CONFIG_CRYPTO_KHAZAD=m | ||
| 1579 | # CONFIG_CRYPTO_SALSA20 is not set | ||
| 1580 | CONFIG_CRYPTO_SEED=m | ||
| 1581 | CONFIG_CRYPTO_SERPENT=m | ||
| 1582 | CONFIG_CRYPTO_TEA=m | ||
| 1583 | CONFIG_CRYPTO_TWOFISH=m | ||
| 1584 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
| 1585 | |||
| 1586 | # | ||
| 1587 | # Compression | ||
| 1588 | # | ||
| 1589 | CONFIG_CRYPTO_DEFLATE=m | ||
| 1590 | # CONFIG_CRYPTO_LZO is not set | ||
| 1591 | CONFIG_CRYPTO_HW=y | ||
| 1592 | |||
| 1593 | # | ||
| 1594 | # Library routines | ||
| 1595 | # | ||
| 1596 | CONFIG_BITREVERSE=y | ||
| 1597 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
| 1598 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
| 1599 | CONFIG_CRC_CCITT=m | ||
| 1600 | CONFIG_CRC16=m | ||
| 1601 | # CONFIG_CRC_ITU_T is not set | ||
| 1602 | CONFIG_CRC32=y | ||
| 1603 | # CONFIG_CRC7 is not set | ||
| 1604 | CONFIG_LIBCRC32C=m | ||
| 1605 | CONFIG_ZLIB_INFLATE=m | ||
| 1606 | CONFIG_ZLIB_DEFLATE=m | ||
| 1607 | CONFIG_TEXTSEARCH=y | ||
| 1608 | CONFIG_TEXTSEARCH_KMP=m | ||
| 1609 | CONFIG_TEXTSEARCH_BM=m | ||
| 1610 | CONFIG_TEXTSEARCH_FSM=m | ||
| 1611 | CONFIG_PLIST=y | ||
| 1612 | CONFIG_HAS_IOMEM=y | ||
| 1613 | CONFIG_HAS_IOPORT=y | ||
| 1614 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index eb9092ca8008..1d296fc8494e 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
| @@ -28,6 +28,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o | |||
| 28 | obj-$(CONFIG_ATAGS_PROC) += atags.o | 28 | obj-$(CONFIG_ATAGS_PROC) += atags.o |
| 29 | obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o | 29 | obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o |
| 30 | obj-$(CONFIG_ARM_THUMBEE) += thumbee.o | 30 | obj-$(CONFIG_ARM_THUMBEE) += thumbee.o |
| 31 | obj-$(CONFIG_KGDB) += kgdb.o | ||
| 31 | 32 | ||
| 32 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o | 33 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o |
| 33 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 | 34 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 |
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c new file mode 100644 index 000000000000..aaffaecffcd1 --- /dev/null +++ b/arch/arm/kernel/kgdb.c | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/kernel/kgdb.c | ||
| 3 | * | ||
| 4 | * ARM KGDB support | ||
| 5 | * | ||
| 6 | * Copyright (c) 2002-2004 MontaVista Software, Inc | ||
| 7 | * Copyright (c) 2008 Wind River Systems, Inc. | ||
| 8 | * | ||
| 9 | * Authors: George Davis <davis_g@mvista.com> | ||
| 10 | * Deepak Saxena <dsaxena@plexity.net> | ||
| 11 | */ | ||
| 12 | #include <linux/kgdb.h> | ||
| 13 | #include <asm/traps.h> | ||
| 14 | |||
| 15 | /* Make a local copy of the registers passed into the handler (bletch) */ | ||
| 16 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs) | ||
| 17 | { | ||
| 18 | int regno; | ||
| 19 | |||
| 20 | /* Initialize all to zero. */ | ||
| 21 | for (regno = 0; regno < GDB_MAX_REGS; regno++) | ||
| 22 | gdb_regs[regno] = 0; | ||
| 23 | |||
| 24 | gdb_regs[_R0] = kernel_regs->ARM_r0; | ||
| 25 | gdb_regs[_R1] = kernel_regs->ARM_r1; | ||
| 26 | gdb_regs[_R2] = kernel_regs->ARM_r2; | ||
| 27 | gdb_regs[_R3] = kernel_regs->ARM_r3; | ||
| 28 | gdb_regs[_R4] = kernel_regs->ARM_r4; | ||
| 29 | gdb_regs[_R5] = kernel_regs->ARM_r5; | ||
| 30 | gdb_regs[_R6] = kernel_regs->ARM_r6; | ||
| 31 | gdb_regs[_R7] = kernel_regs->ARM_r7; | ||
| 32 | gdb_regs[_R8] = kernel_regs->ARM_r8; | ||
| 33 | gdb_regs[_R9] = kernel_regs->ARM_r9; | ||
| 34 | gdb_regs[_R10] = kernel_regs->ARM_r10; | ||
| 35 | gdb_regs[_FP] = kernel_regs->ARM_fp; | ||
| 36 | gdb_regs[_IP] = kernel_regs->ARM_ip; | ||
| 37 | gdb_regs[_SPT] = kernel_regs->ARM_sp; | ||
| 38 | gdb_regs[_LR] = kernel_regs->ARM_lr; | ||
| 39 | gdb_regs[_PC] = kernel_regs->ARM_pc; | ||
| 40 | gdb_regs[_CPSR] = kernel_regs->ARM_cpsr; | ||
| 41 | } | ||
| 42 | |||
| 43 | /* Copy local gdb registers back to kgdb regs, for later copy to kernel */ | ||
| 44 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs) | ||
| 45 | { | ||
| 46 | kernel_regs->ARM_r0 = gdb_regs[_R0]; | ||
| 47 | kernel_regs->ARM_r1 = gdb_regs[_R1]; | ||
| 48 | kernel_regs->ARM_r2 = gdb_regs[_R2]; | ||
| 49 | kernel_regs->ARM_r3 = gdb_regs[_R3]; | ||
| 50 | kernel_regs->ARM_r4 = gdb_regs[_R4]; | ||
| 51 | kernel_regs->ARM_r5 = gdb_regs[_R5]; | ||
| 52 | kernel_regs->ARM_r6 = gdb_regs[_R6]; | ||
| 53 | kernel_regs->ARM_r7 = gdb_regs[_R7]; | ||
| 54 | kernel_regs->ARM_r8 = gdb_regs[_R8]; | ||
| 55 | kernel_regs->ARM_r9 = gdb_regs[_R9]; | ||
| 56 | kernel_regs->ARM_r10 = gdb_regs[_R10]; | ||
| 57 | kernel_regs->ARM_fp = gdb_regs[_FP]; | ||
| 58 | kernel_regs->ARM_ip = gdb_regs[_IP]; | ||
| 59 | kernel_regs->ARM_sp = gdb_regs[_SPT]; | ||
| 60 | kernel_regs->ARM_lr = gdb_regs[_LR]; | ||
| 61 | kernel_regs->ARM_pc = gdb_regs[_PC]; | ||
| 62 | kernel_regs->ARM_cpsr = gdb_regs[_CPSR]; | ||
| 63 | } | ||
| 64 | |||
| 65 | void | ||
| 66 | sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) | ||
| 67 | { | ||
| 68 | struct pt_regs *thread_regs; | ||
| 69 | int regno; | ||
| 70 | |||
| 71 | /* Just making sure... */ | ||
| 72 | if (task == NULL) | ||
| 73 | return; | ||
| 74 | |||
| 75 | /* Initialize to zero */ | ||
| 76 | for (regno = 0; regno < GDB_MAX_REGS; regno++) | ||
| 77 | gdb_regs[regno] = 0; | ||
| 78 | |||
| 79 | /* Otherwise, we have only some registers from switch_to() */ | ||
| 80 | thread_regs = task_pt_regs(task); | ||
| 81 | gdb_regs[_R0] = thread_regs->ARM_r0; | ||
| 82 | gdb_regs[_R1] = thread_regs->ARM_r1; | ||
| 83 | gdb_regs[_R2] = thread_regs->ARM_r2; | ||
| 84 | gdb_regs[_R3] = thread_regs->ARM_r3; | ||
| 85 | gdb_regs[_R4] = thread_regs->ARM_r4; | ||
| 86 | gdb_regs[_R5] = thread_regs->ARM_r5; | ||
| 87 | gdb_regs[_R6] = thread_regs->ARM_r6; | ||
| 88 | gdb_regs[_R7] = thread_regs->ARM_r7; | ||
| 89 | gdb_regs[_R8] = thread_regs->ARM_r8; | ||
| 90 | gdb_regs[_R9] = thread_regs->ARM_r9; | ||
| 91 | gdb_regs[_R10] = thread_regs->ARM_r10; | ||
| 92 | gdb_regs[_FP] = thread_regs->ARM_fp; | ||
| 93 | gdb_regs[_IP] = thread_regs->ARM_ip; | ||
| 94 | gdb_regs[_SPT] = thread_regs->ARM_sp; | ||
| 95 | gdb_regs[_LR] = thread_regs->ARM_lr; | ||
| 96 | gdb_regs[_PC] = thread_regs->ARM_pc; | ||
| 97 | gdb_regs[_CPSR] = thread_regs->ARM_cpsr; | ||
| 98 | } | ||
| 99 | |||
| 100 | static int compiled_break; | ||
| 101 | |||
| 102 | int kgdb_arch_handle_exception(int exception_vector, int signo, | ||
| 103 | int err_code, char *remcom_in_buffer, | ||
| 104 | char *remcom_out_buffer, | ||
| 105 | struct pt_regs *linux_regs) | ||
| 106 | { | ||
| 107 | unsigned long addr; | ||
| 108 | char *ptr; | ||
| 109 | |||
| 110 | switch (remcom_in_buffer[0]) { | ||
| 111 | case 'D': | ||
| 112 | case 'k': | ||
| 113 | case 'c': | ||
| 114 | kgdb_contthread = NULL; | ||
| 115 | |||
| 116 | /* | ||
| 117 | * Try to read optional parameter, pc unchanged if no parm. | ||
| 118 | * If this was a compiled breakpoint, we need to move | ||
| 119 | * to the next instruction or we will just breakpoint | ||
| 120 | * over and over again. | ||
| 121 | */ | ||
| 122 | ptr = &remcom_in_buffer[1]; | ||
| 123 | if (kgdb_hex2long(&ptr, &addr)) | ||
| 124 | linux_regs->ARM_pc = addr; | ||
| 125 | else if (compiled_break == 1) | ||
| 126 | linux_regs->ARM_pc += 4; | ||
| 127 | |||
| 128 | compiled_break = 0; | ||
| 129 | |||
| 130 | return 0; | ||
| 131 | } | ||
| 132 | |||
| 133 | return -1; | ||
| 134 | } | ||
| 135 | |||
| 136 | static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr) | ||
| 137 | { | ||
| 138 | kgdb_handle_exception(1, SIGTRAP, 0, regs); | ||
| 139 | |||
| 140 | return 0; | ||
| 141 | } | ||
| 142 | |||
| 143 | static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr) | ||
| 144 | { | ||
| 145 | compiled_break = 1; | ||
| 146 | kgdb_handle_exception(1, SIGTRAP, 0, regs); | ||
| 147 | |||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | |||
| 151 | static struct undef_hook kgdb_brkpt_hook = { | ||
| 152 | .instr_mask = 0xffffffff, | ||
| 153 | .instr_val = KGDB_BREAKINST, | ||
| 154 | .fn = kgdb_brk_fn | ||
| 155 | }; | ||
| 156 | |||
| 157 | static struct undef_hook kgdb_compiled_brkpt_hook = { | ||
| 158 | .instr_mask = 0xffffffff, | ||
| 159 | .instr_val = KGDB_COMPILED_BREAK, | ||
| 160 | .fn = kgdb_compiled_brk_fn | ||
| 161 | }; | ||
| 162 | |||
| 163 | /** | ||
| 164 | * kgdb_arch_init - Perform any architecture specific initalization. | ||
| 165 | * | ||
| 166 | * This function will handle the initalization of any architecture | ||
| 167 | * specific callbacks. | ||
| 168 | */ | ||
| 169 | int kgdb_arch_init(void) | ||
| 170 | { | ||
| 171 | register_undef_hook(&kgdb_brkpt_hook); | ||
| 172 | register_undef_hook(&kgdb_compiled_brkpt_hook); | ||
| 173 | |||
| 174 | return 0; | ||
| 175 | } | ||
| 176 | |||
| 177 | /** | ||
| 178 | * kgdb_arch_exit - Perform any architecture specific uninitalization. | ||
| 179 | * | ||
| 180 | * This function will handle the uninitalization of any architecture | ||
| 181 | * specific callbacks, for dynamic registration and unregistration. | ||
| 182 | */ | ||
| 183 | void kgdb_arch_exit(void) | ||
| 184 | { | ||
| 185 | unregister_undef_hook(&kgdb_brkpt_hook); | ||
| 186 | unregister_undef_hook(&kgdb_compiled_brkpt_hook); | ||
| 187 | } | ||
| 188 | |||
| 189 | /* | ||
| 190 | * Register our undef instruction hooks with ARM undef core. | ||
| 191 | * We regsiter a hook specifically looking for the KGB break inst | ||
| 192 | * and we handle the normal undef case within the do_undefinstr | ||
| 193 | * handler. | ||
| 194 | */ | ||
| 195 | struct kgdb_arch arch_kgdb_ops = { | ||
| 196 | #ifndef __ARMEB__ | ||
| 197 | .gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7} | ||
| 198 | #else /* ! __ARMEB__ */ | ||
| 199 | .gdb_bpt_instr = {0xe7, 0xff, 0xde, 0xfe} | ||
| 200 | #endif | ||
| 201 | }; | ||
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 5ee39e10c8d1..d28513f14d05 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c | |||
| @@ -296,8 +296,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
| 296 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; | 296 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; |
| 297 | 297 | ||
| 298 | INIT_HLIST_HEAD(&empty_rp); | 298 | INIT_HLIST_HEAD(&empty_rp); |
| 299 | spin_lock_irqsave(&kretprobe_lock, flags); | 299 | kretprobe_hash_lock(current, &head, &flags); |
| 300 | head = kretprobe_inst_table_head(current); | ||
| 301 | 300 | ||
| 302 | /* | 301 | /* |
| 303 | * It is possible to have multiple instances associated with a given | 302 | * It is possible to have multiple instances associated with a given |
| @@ -337,7 +336,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
| 337 | } | 336 | } |
| 338 | 337 | ||
| 339 | kretprobe_assert(ri, orig_ret_address, trampoline_address); | 338 | kretprobe_assert(ri, orig_ret_address, trampoline_address); |
| 340 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 339 | kretprobe_hash_unlock(current, &flags); |
| 341 | 340 | ||
| 342 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 341 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
| 343 | hlist_del(&ri->hlist); | 342 | hlist_del(&ri->hlist); |
| @@ -347,7 +346,6 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
| 347 | return (void *)orig_ret_address; | 346 | return (void *)orig_ret_address; |
| 348 | } | 347 | } |
| 349 | 348 | ||
| 350 | /* Called with kretprobe_lock held. */ | ||
| 351 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 349 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 352 | struct pt_regs *regs) | 350 | struct pt_regs *regs) |
| 353 | { | 351 | { |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 79b7e5cf5416..a68259a0cccd 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 14 | #include <linux/moduleloader.h> | 14 | #include <linux/moduleloader.h> |
| 15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 16 | #include <linux/mm.h> | ||
| 16 | #include <linux/elf.h> | 17 | #include <linux/elf.h> |
| 17 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
| 18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 199b3680118b..89bfded70a1f 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
| @@ -162,7 +162,7 @@ void cpu_idle(void) | |||
| 162 | if (!idle) | 162 | if (!idle) |
| 163 | idle = default_idle; | 163 | idle = default_idle; |
| 164 | leds_event(led_idle_start); | 164 | leds_event(led_idle_start); |
| 165 | tick_nohz_stop_sched_tick(); | 165 | tick_nohz_stop_sched_tick(1); |
| 166 | while (!need_resched()) | 166 | while (!need_resched()) |
| 167 | idle(); | 167 | idle(); |
| 168 | leds_event(led_idle_end); | 168 | leds_event(led_idle_end); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index b7b0720bc1bb..38f0e7940a13 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
| 37 | #include <asm/mach/irq.h> | 37 | #include <asm/mach/irq.h> |
| 38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
| 39 | #include <asm/traps.h> | ||
| 39 | 40 | ||
| 40 | #include "compat.h" | 41 | #include "compat.h" |
| 41 | #include "atags.h" | 42 | #include "atags.h" |
| @@ -853,6 +854,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 853 | conswitchp = &dummy_con; | 854 | conswitchp = &dummy_con; |
| 854 | #endif | 855 | #endif |
| 855 | #endif | 856 | #endif |
| 857 | early_trap_init(); | ||
| 856 | } | 858 | } |
| 857 | 859 | ||
| 858 | 860 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 5595fdd75e82..7277aef83098 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -708,6 +708,11 @@ EXPORT_SYMBOL(abort); | |||
| 708 | 708 | ||
| 709 | void __init trap_init(void) | 709 | void __init trap_init(void) |
| 710 | { | 710 | { |
| 711 | return; | ||
| 712 | } | ||
| 713 | |||
| 714 | void __init early_trap_init(void) | ||
| 715 | { | ||
| 711 | unsigned long vectors = CONFIG_VECTORS_BASE; | 716 | unsigned long vectors = CONFIG_VECTORS_BASE; |
| 712 | extern char __stubs_start[], __stubs_end[]; | 717 | extern char __stubs_start[], __stubs_end[]; |
| 713 | extern char __vectors_start[], __vectors_end[]; | 718 | extern char __vectors_start[], __vectors_end[]; |
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 747b9dedab88..dc8b40783d94 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
| @@ -377,7 +377,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
| 377 | * -------------------------------------------------------------------- */ | 377 | * -------------------------------------------------------------------- */ |
| 378 | 378 | ||
| 379 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 379 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
| 380 | static struct at91_nand_data nand_data; | 380 | static struct atmel_nand_data nand_data; |
| 381 | 381 | ||
| 382 | #define NAND_BASE AT91_CHIPSELECT_3 | 382 | #define NAND_BASE AT91_CHIPSELECT_3 |
| 383 | 383 | ||
| @@ -395,7 +395,7 @@ static struct resource nand_resources[] = { | |||
| 395 | }; | 395 | }; |
| 396 | 396 | ||
| 397 | static struct platform_device at91cap9_nand_device = { | 397 | static struct platform_device at91cap9_nand_device = { |
| 398 | .name = "at91_nand", | 398 | .name = "atmel_nand", |
| 399 | .id = -1, | 399 | .id = -1, |
| 400 | .dev = { | 400 | .dev = { |
| 401 | .platform_data = &nand_data, | 401 | .platform_data = &nand_data, |
| @@ -404,7 +404,7 @@ static struct platform_device at91cap9_nand_device = { | |||
| 404 | .num_resources = ARRAY_SIZE(nand_resources), | 404 | .num_resources = ARRAY_SIZE(nand_resources), |
| 405 | }; | 405 | }; |
| 406 | 406 | ||
| 407 | void __init at91_add_device_nand(struct at91_nand_data *data) | 407 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
| 408 | { | 408 | { |
| 409 | unsigned long csa, mode; | 409 | unsigned long csa, mode; |
| 410 | 410 | ||
| @@ -445,7 +445,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
| 445 | platform_device_register(&at91cap9_nand_device); | 445 | platform_device_register(&at91cap9_nand_device); |
| 446 | } | 446 | } |
| 447 | #else | 447 | #else |
| 448 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 448 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
| 449 | #endif | 449 | #endif |
| 450 | 450 | ||
| 451 | 451 | ||
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index de19bee83f75..8ced9bc82099 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
| @@ -369,7 +369,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
| 369 | * -------------------------------------------------------------------- */ | 369 | * -------------------------------------------------------------------- */ |
| 370 | 370 | ||
| 371 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 371 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
| 372 | static struct at91_nand_data nand_data; | 372 | static struct atmel_nand_data nand_data; |
| 373 | 373 | ||
| 374 | #define NAND_BASE AT91_CHIPSELECT_3 | 374 | #define NAND_BASE AT91_CHIPSELECT_3 |
| 375 | 375 | ||
| @@ -382,7 +382,7 @@ static struct resource nand_resources[] = { | |||
| 382 | }; | 382 | }; |
| 383 | 383 | ||
| 384 | static struct platform_device at91rm9200_nand_device = { | 384 | static struct platform_device at91rm9200_nand_device = { |
| 385 | .name = "at91_nand", | 385 | .name = "atmel_nand", |
| 386 | .id = -1, | 386 | .id = -1, |
| 387 | .dev = { | 387 | .dev = { |
| 388 | .platform_data = &nand_data, | 388 | .platform_data = &nand_data, |
| @@ -391,7 +391,7 @@ static struct platform_device at91rm9200_nand_device = { | |||
| 391 | .num_resources = ARRAY_SIZE(nand_resources), | 391 | .num_resources = ARRAY_SIZE(nand_resources), |
| 392 | }; | 392 | }; |
| 393 | 393 | ||
| 394 | void __init at91_add_device_nand(struct at91_nand_data *data) | 394 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
| 395 | { | 395 | { |
| 396 | unsigned int csa; | 396 | unsigned int csa; |
| 397 | 397 | ||
| @@ -429,7 +429,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
| 429 | platform_device_register(&at91rm9200_nand_device); | 429 | platform_device_register(&at91rm9200_nand_device); |
| 430 | } | 430 | } |
| 431 | #else | 431 | #else |
| 432 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 432 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
| 433 | #endif | 433 | #endif |
| 434 | 434 | ||
| 435 | 435 | ||
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 86cba4ac29b1..cae5f52f1278 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
| @@ -284,7 +284,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
| 284 | * -------------------------------------------------------------------- */ | 284 | * -------------------------------------------------------------------- */ |
| 285 | 285 | ||
| 286 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 286 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
| 287 | static struct at91_nand_data nand_data; | 287 | static struct atmel_nand_data nand_data; |
| 288 | 288 | ||
| 289 | #define NAND_BASE AT91_CHIPSELECT_3 | 289 | #define NAND_BASE AT91_CHIPSELECT_3 |
| 290 | 290 | ||
| @@ -302,7 +302,7 @@ static struct resource nand_resources[] = { | |||
| 302 | }; | 302 | }; |
| 303 | 303 | ||
| 304 | static struct platform_device at91sam9260_nand_device = { | 304 | static struct platform_device at91sam9260_nand_device = { |
| 305 | .name = "at91_nand", | 305 | .name = "atmel_nand", |
| 306 | .id = -1, | 306 | .id = -1, |
| 307 | .dev = { | 307 | .dev = { |
| 308 | .platform_data = &nand_data, | 308 | .platform_data = &nand_data, |
| @@ -311,7 +311,7 @@ static struct platform_device at91sam9260_nand_device = { | |||
| 311 | .num_resources = ARRAY_SIZE(nand_resources), | 311 | .num_resources = ARRAY_SIZE(nand_resources), |
| 312 | }; | 312 | }; |
| 313 | 313 | ||
| 314 | void __init at91_add_device_nand(struct at91_nand_data *data) | 314 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
| 315 | { | 315 | { |
| 316 | unsigned long csa, mode; | 316 | unsigned long csa, mode; |
| 317 | 317 | ||
| @@ -373,7 +373,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
| 373 | platform_device_register(&at91sam9260_nand_device); | 373 | platform_device_register(&at91sam9260_nand_device); |
| 374 | } | 374 | } |
| 375 | #else | 375 | #else |
| 376 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 376 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
| 377 | #endif | 377 | #endif |
| 378 | 378 | ||
| 379 | 379 | ||
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index ec1891375dfb..483d436af22d 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
| @@ -199,7 +199,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
| 199 | * -------------------------------------------------------------------- */ | 199 | * -------------------------------------------------------------------- */ |
| 200 | 200 | ||
| 201 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 201 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
| 202 | static struct at91_nand_data nand_data; | 202 | static struct atmel_nand_data nand_data; |
| 203 | 203 | ||
| 204 | #define NAND_BASE AT91_CHIPSELECT_3 | 204 | #define NAND_BASE AT91_CHIPSELECT_3 |
| 205 | 205 | ||
| @@ -211,8 +211,8 @@ static struct resource nand_resources[] = { | |||
| 211 | } | 211 | } |
| 212 | }; | 212 | }; |
| 213 | 213 | ||
| 214 | static struct platform_device at91_nand_device = { | 214 | static struct platform_device atmel_nand_device = { |
| 215 | .name = "at91_nand", | 215 | .name = "atmel_nand", |
| 216 | .id = -1, | 216 | .id = -1, |
| 217 | .dev = { | 217 | .dev = { |
| 218 | .platform_data = &nand_data, | 218 | .platform_data = &nand_data, |
| @@ -221,7 +221,7 @@ static struct platform_device at91_nand_device = { | |||
| 221 | .num_resources = ARRAY_SIZE(nand_resources), | 221 | .num_resources = ARRAY_SIZE(nand_resources), |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | void __init at91_add_device_nand(struct at91_nand_data *data) | 224 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
| 225 | { | 225 | { |
| 226 | unsigned long csa, mode; | 226 | unsigned long csa, mode; |
| 227 | 227 | ||
| @@ -262,11 +262,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
| 262 | at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ | 262 | at91_set_A_periph(AT91_PIN_PC1, 0); /* NANDWE */ |
| 263 | 263 | ||
| 264 | nand_data = *data; | 264 | nand_data = *data; |
| 265 | platform_device_register(&at91_nand_device); | 265 | platform_device_register(&atmel_nand_device); |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | #else | 268 | #else |
| 269 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 269 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
| 270 | #endif | 270 | #endif |
| 271 | 271 | ||
| 272 | 272 | ||
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 8a81f76f0200..9762b15f658a 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
| @@ -353,7 +353,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
| 353 | * -------------------------------------------------------------------- */ | 353 | * -------------------------------------------------------------------- */ |
| 354 | 354 | ||
| 355 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 355 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
| 356 | static struct at91_nand_data nand_data; | 356 | static struct atmel_nand_data nand_data; |
| 357 | 357 | ||
| 358 | #define NAND_BASE AT91_CHIPSELECT_3 | 358 | #define NAND_BASE AT91_CHIPSELECT_3 |
| 359 | 359 | ||
| @@ -371,7 +371,7 @@ static struct resource nand_resources[] = { | |||
| 371 | }; | 371 | }; |
| 372 | 372 | ||
| 373 | static struct platform_device at91sam9263_nand_device = { | 373 | static struct platform_device at91sam9263_nand_device = { |
| 374 | .name = "at91_nand", | 374 | .name = "atmel_nand", |
| 375 | .id = -1, | 375 | .id = -1, |
| 376 | .dev = { | 376 | .dev = { |
| 377 | .platform_data = &nand_data, | 377 | .platform_data = &nand_data, |
| @@ -380,7 +380,7 @@ static struct platform_device at91sam9263_nand_device = { | |||
| 380 | .num_resources = ARRAY_SIZE(nand_resources), | 380 | .num_resources = ARRAY_SIZE(nand_resources), |
| 381 | }; | 381 | }; |
| 382 | 382 | ||
| 383 | void __init at91_add_device_nand(struct at91_nand_data *data) | 383 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
| 384 | { | 384 | { |
| 385 | unsigned long csa, mode; | 385 | unsigned long csa, mode; |
| 386 | 386 | ||
| @@ -421,7 +421,7 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
| 421 | platform_device_register(&at91sam9263_nand_device); | 421 | platform_device_register(&at91sam9263_nand_device); |
| 422 | } | 422 | } |
| 423 | #else | 423 | #else |
| 424 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 424 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
| 425 | #endif | 425 | #endif |
| 426 | 426 | ||
| 427 | 427 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index ae28101e7542..5f3094870cad 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
| @@ -195,7 +195,7 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
| 195 | * -------------------------------------------------------------------- */ | 195 | * -------------------------------------------------------------------- */ |
| 196 | 196 | ||
| 197 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) | 197 | #if defined(CONFIG_MTD_NAND_AT91) || defined(CONFIG_MTD_NAND_AT91_MODULE) |
| 198 | static struct at91_nand_data nand_data; | 198 | static struct atmel_nand_data nand_data; |
| 199 | 199 | ||
| 200 | #define NAND_BASE AT91_CHIPSELECT_3 | 200 | #define NAND_BASE AT91_CHIPSELECT_3 |
| 201 | 201 | ||
| @@ -212,8 +212,8 @@ static struct resource nand_resources[] = { | |||
| 212 | } | 212 | } |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | static struct platform_device at91_nand_device = { | 215 | static struct platform_device atmel_nand_device = { |
| 216 | .name = "at91_nand", | 216 | .name = "atmel_nand", |
| 217 | .id = -1, | 217 | .id = -1, |
| 218 | .dev = { | 218 | .dev = { |
| 219 | .platform_data = &nand_data, | 219 | .platform_data = &nand_data, |
| @@ -222,7 +222,7 @@ static struct platform_device at91_nand_device = { | |||
| 222 | .num_resources = ARRAY_SIZE(nand_resources), | 222 | .num_resources = ARRAY_SIZE(nand_resources), |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | void __init at91_add_device_nand(struct at91_nand_data *data) | 225 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
| 226 | { | 226 | { |
| 227 | unsigned long csa; | 227 | unsigned long csa; |
| 228 | 228 | ||
| @@ -259,11 +259,11 @@ void __init at91_add_device_nand(struct at91_nand_data *data) | |||
| 259 | at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */ | 259 | at91_set_A_periph(AT91_PIN_PB5, 0); /* NANDWE */ |
| 260 | 260 | ||
| 261 | nand_data = *data; | 261 | nand_data = *data; |
| 262 | platform_device_register(&at91_nand_device); | 262 | platform_device_register(&atmel_nand_device); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | #else | 265 | #else |
| 266 | void __init at91_add_device_nand(struct at91_nand_data *data) {} | 266 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} |
| 267 | #endif | 267 | #endif |
| 268 | 268 | ||
| 269 | 269 | ||
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index b22a1a004055..af2c33aff1a8 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
| @@ -142,7 +142,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 142 | return cam60_nand_partition; | 142 | return cam60_nand_partition; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | static struct at91_nand_data __initdata cam60_nand_data = { | 145 | static struct atmel_nand_data __initdata cam60_nand_data = { |
| 146 | .ale = 21, | 146 | .ale = 21, |
| 147 | .cle = 22, | 147 | .cle = 22, |
| 148 | // .det_pin = ... not there | 148 | // .det_pin = ... not there |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 8a2a958639db..a1c41d7c0be9 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
| @@ -181,7 +181,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 181 | return cap9adk_nand_partitions; | 181 | return cap9adk_nand_partitions; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | static struct at91_nand_data __initdata cap9adk_nand_data = { | 184 | static struct atmel_nand_data __initdata cap9adk_nand_data = { |
| 185 | .ale = 21, | 185 | .ale = 21, |
| 186 | .cle = 22, | 186 | .cle = 22, |
| 187 | // .det_pin = ... not connected | 187 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c index dab958d25926..02a70b2f355b 100644 --- a/arch/arm/mach-at91/board-dk.c +++ b/arch/arm/mach-at91/board-dk.c | |||
| @@ -147,7 +147,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 147 | return dk_nand_partition; | 147 | return dk_nand_partition; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | static struct at91_nand_data __initdata dk_nand_data = { | 150 | static struct atmel_nand_data __initdata dk_nand_data = { |
| 151 | .ale = 22, | 151 | .ale = 22, |
| 152 | .cle = 21, | 152 | .cle = 21, |
| 153 | .det_pin = AT91_PIN_PB1, | 153 | .det_pin = AT91_PIN_PB1, |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index cb065febd95e..082ed59365a4 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
| @@ -105,7 +105,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 105 | return kb9202_nand_partition; | 105 | return kb9202_nand_partition; |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | static struct at91_nand_data __initdata kb9202_nand_data = { | 108 | static struct atmel_nand_data __initdata kb9202_nand_data = { |
| 109 | .ale = 22, | 109 | .ale = 22, |
| 110 | .cle = 21, | 110 | .cle = 21, |
| 111 | // .det_pin = ... not there | 111 | // .det_pin = ... not there |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 8f76af5e219a..57a6221943ed 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
| @@ -141,7 +141,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 141 | return ek_nand_partition; | 141 | return ek_nand_partition; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | static struct at91_nand_data __initdata ek_nand_data = { | 144 | static struct atmel_nand_data __initdata ek_nand_data = { |
| 145 | .ale = 21, | 145 | .ale = 21, |
| 146 | .cle = 22, | 146 | .cle = 22, |
| 147 | // .det_pin = ... not connected | 147 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 4d1d9c777084..6a680795c3c8 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
| @@ -178,7 +178,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 178 | return ek_nand_partition; | 178 | return ek_nand_partition; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | static struct at91_nand_data __initdata ek_nand_data = { | 181 | static struct atmel_nand_data __initdata ek_nand_data = { |
| 182 | .ale = 21, | 182 | .ale = 21, |
| 183 | .cle = 22, | 183 | .cle = 22, |
| 184 | // .det_pin = ... not connected | 184 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 08382c0df221..43dfbd0d543a 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
| @@ -183,7 +183,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 183 | return ek_nand_partition; | 183 | return ek_nand_partition; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | static struct at91_nand_data __initdata ek_nand_data = { | 186 | static struct atmel_nand_data __initdata ek_nand_data = { |
| 187 | .ale = 22, | 187 | .ale = 22, |
| 188 | .cle = 21, | 188 | .cle = 21, |
| 189 | // .det_pin = ... not connected | 189 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index b4cd5d0ed597..6605a0980117 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
| @@ -187,7 +187,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 187 | return ek_nand_partition; | 187 | return ek_nand_partition; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static struct at91_nand_data __initdata ek_nand_data = { | 190 | static struct atmel_nand_data __initdata ek_nand_data = { |
| 191 | .ale = 21, | 191 | .ale = 21, |
| 192 | .cle = 22, | 192 | .cle = 22, |
| 193 | // .det_pin = ... not connected | 193 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index b6a70fc735c3..66e77bb2e079 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
| @@ -96,7 +96,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 96 | return ek_nand_partition; | 96 | return ek_nand_partition; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | static struct at91_nand_data __initdata ek_nand_data = { | 99 | static struct atmel_nand_data __initdata ek_nand_data = { |
| 100 | .ale = 21, | 100 | .ale = 21, |
| 101 | .cle = 22, | 101 | .cle = 22, |
| 102 | // .det_pin = ... not connected | 102 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 7079050ab88d..bbbfd06f5e0c 100755 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
| @@ -180,7 +180,7 @@ static struct mtd_partition * __init nand_partitions(int size, int *num_partitio | |||
| 180 | return yl9200_nand_partition; | 180 | return yl9200_nand_partition; |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | static struct at91_nand_data __initdata yl9200_nand_data = { | 183 | static struct atmel_nand_data __initdata yl9200_nand_data = { |
| 184 | .ale = 6, | 184 | .ale = 6, |
| 185 | .cle = 7, | 185 | .cle = 7, |
| 186 | // .det_pin = ... not connected | 186 | // .det_pin = ... not connected |
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 2741063bf361..28f164ea4726 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/f75375s.h> | 19 | #include <linux/f75375s.h> |
| 20 | #include <linux/leds-pca9532.h> | ||
| 20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
| 21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 22 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
| @@ -206,6 +207,53 @@ static struct f75375s_platform_data n2100_f75375s = { | |||
| 206 | .pwm_enable = { 0, 0 }, | 207 | .pwm_enable = { 0, 0 }, |
| 207 | }; | 208 | }; |
| 208 | 209 | ||
| 210 | static struct pca9532_platform_data n2100_leds = { | ||
| 211 | .leds = { | ||
| 212 | { .name = "n2100:red:satafail0", | ||
| 213 | .state = PCA9532_OFF, | ||
| 214 | .type = PCA9532_TYPE_LED, | ||
| 215 | }, | ||
| 216 | { .name = "n2100:red:satafail1", | ||
| 217 | .state = PCA9532_OFF, | ||
| 218 | .type = PCA9532_TYPE_LED, | ||
| 219 | }, | ||
| 220 | { .name = "n2100:blue:usb", | ||
| 221 | .state = PCA9532_OFF, | ||
| 222 | .type = PCA9532_TYPE_LED, | ||
| 223 | }, | ||
| 224 | { .type = PCA9532_TYPE_NONE }, | ||
| 225 | |||
| 226 | { .type = PCA9532_TYPE_NONE }, | ||
| 227 | { .type = PCA9532_TYPE_NONE }, | ||
| 228 | { .type = PCA9532_TYPE_NONE }, | ||
| 229 | { .name = "n2100:red:usb", | ||
| 230 | .state = PCA9532_OFF, | ||
| 231 | .type = PCA9532_TYPE_LED, | ||
| 232 | }, | ||
| 233 | |||
| 234 | { .type = PCA9532_TYPE_NONE }, /* power OFF gpio */ | ||
| 235 | { .type = PCA9532_TYPE_NONE }, /* reset gpio */ | ||
| 236 | { .type = PCA9532_TYPE_NONE }, | ||
| 237 | { .type = PCA9532_TYPE_NONE }, | ||
| 238 | |||
| 239 | { .type = PCA9532_TYPE_NONE }, | ||
| 240 | { .name = "n2100:orange:system", | ||
| 241 | .state = PCA9532_OFF, | ||
| 242 | .type = PCA9532_TYPE_LED, | ||
| 243 | }, | ||
| 244 | { .name = "n2100:red:system", | ||
| 245 | .state = PCA9532_OFF, | ||
| 246 | .type = PCA9532_TYPE_LED, | ||
| 247 | }, | ||
| 248 | { .name = "N2100 beeper" , | ||
| 249 | .state = PCA9532_OFF, | ||
| 250 | .type = PCA9532_TYPE_N2100_BEEP, | ||
| 251 | }, | ||
| 252 | }, | ||
| 253 | .psc = { 0, 0 }, | ||
| 254 | .pwm = { 0, 0 }, | ||
| 255 | }; | ||
| 256 | |||
| 209 | static struct i2c_board_info __initdata n2100_i2c_devices[] = { | 257 | static struct i2c_board_info __initdata n2100_i2c_devices[] = { |
| 210 | { | 258 | { |
| 211 | I2C_BOARD_INFO("rs5c372b", 0x32), | 259 | I2C_BOARD_INFO("rs5c372b", 0x32), |
| @@ -214,6 +262,10 @@ static struct i2c_board_info __initdata n2100_i2c_devices[] = { | |||
| 214 | I2C_BOARD_INFO("f75375", 0x2e), | 262 | I2C_BOARD_INFO("f75375", 0x2e), |
| 215 | .platform_data = &n2100_f75375s, | 263 | .platform_data = &n2100_f75375s, |
| 216 | }, | 264 | }, |
| 265 | { | ||
| 266 | I2C_BOARD_INFO("pca9532", 0x60), | ||
| 267 | .platform_data = &n2100_leds, | ||
| 268 | }, | ||
| 217 | }; | 269 | }; |
| 218 | 270 | ||
| 219 | /* | 271 | /* |
diff --git a/arch/arm/mach-ns9xxx/clock.c b/arch/arm/mach-ns9xxx/clock.c index f8639161068f..44ed20d4a388 100644 --- a/arch/arm/mach-ns9xxx/clock.c +++ b/arch/arm/mach-ns9xxx/clock.c | |||
| @@ -14,8 +14,8 @@ | |||
| 14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
| 15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/semaphore.h> | ||
| 17 | 18 | ||
| 18 | #include <asm/semaphore.h> | ||
| 19 | #include "clock.h" | 19 | #include "clock.h" |
| 20 | 20 | ||
| 21 | static LIST_HEAD(clocks); | 21 | static LIST_HEAD(clocks); |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 914bb33dab92..e8ee7ec9ff6d 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
| @@ -16,18 +16,24 @@ config CPU_PXA310 | |||
| 16 | config CPU_PXA320 | 16 | config CPU_PXA320 |
| 17 | bool "PXA320 (codename Monahans-P)" | 17 | bool "PXA320 (codename Monahans-P)" |
| 18 | 18 | ||
| 19 | config CPU_PXA930 | ||
| 20 | bool "PXA930 (codename Tavor-P)" | ||
| 21 | |||
| 19 | endmenu | 22 | endmenu |
| 20 | 23 | ||
| 21 | endif | 24 | endif |
| 22 | 25 | ||
| 23 | menu "Select target boards" | ||
| 24 | |||
| 25 | config ARCH_GUMSTIX | 26 | config ARCH_GUMSTIX |
| 26 | bool "Gumstix XScale boards" | 27 | bool "Gumstix XScale boards" |
| 27 | help | 28 | help |
| 28 | Say Y here if you intend to run this kernel on a | 29 | Say Y here if you intend to run this kernel on a |
| 29 | Gumstix Full Function Minature Computer. | 30 | Gumstix Full Function Minature Computer. |
| 30 | 31 | ||
| 32 | config MACH_GUMSTIX_F | ||
| 33 | bool "Basix, Connex, ws-200ax, ws-400ax systems" | ||
| 34 | depends on ARCH_GUMSTIX | ||
| 35 | select PXA25x | ||
| 36 | |||
| 31 | config ARCH_LUBBOCK | 37 | config ARCH_LUBBOCK |
| 32 | bool "Intel DBPXA250 Development Platform" | 38 | bool "Intel DBPXA250 Development Platform" |
| 33 | select PXA25x | 39 | select PXA25x |
| @@ -58,6 +64,57 @@ config PXA_SHARPSL | |||
| 58 | SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) | 64 | SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) |
| 59 | handheld computer. | 65 | handheld computer. |
| 60 | 66 | ||
| 67 | config MACH_POODLE | ||
| 68 | bool "Enable Sharp SL-5600 (Poodle) Support" | ||
| 69 | depends on PXA_SHARPSL | ||
| 70 | select PXA25x | ||
| 71 | select SHARP_LOCOMO | ||
| 72 | select PXA_SSP | ||
| 73 | |||
| 74 | config MACH_CORGI | ||
| 75 | bool "Enable Sharp SL-C700 (Corgi) Support" | ||
| 76 | depends on PXA_SHARPSL | ||
| 77 | select PXA25x | ||
| 78 | select PXA_SHARP_C7xx | ||
| 79 | |||
| 80 | config MACH_SHEPHERD | ||
| 81 | bool "Enable Sharp SL-C750 (Shepherd) Support" | ||
| 82 | depends on PXA_SHARPSL | ||
| 83 | select PXA25x | ||
| 84 | select PXA_SHARP_C7xx | ||
| 85 | |||
| 86 | config MACH_HUSKY | ||
| 87 | bool "Enable Sharp SL-C760 (Husky) Support" | ||
| 88 | depends on PXA_SHARPSL | ||
| 89 | select PXA25x | ||
| 90 | select PXA_SHARP_C7xx | ||
| 91 | |||
| 92 | config MACH_AKITA | ||
| 93 | bool "Enable Sharp SL-1000 (Akita) Support" | ||
| 94 | depends on PXA_SHARPSL | ||
| 95 | select PXA27x | ||
| 96 | select PXA_SHARP_Cxx00 | ||
| 97 | select MACH_SPITZ | ||
| 98 | select I2C | ||
| 99 | select I2C_PXA | ||
| 100 | |||
| 101 | config MACH_SPITZ | ||
| 102 | bool "Enable Sharp Zaurus SL-3000 (Spitz) Support" | ||
| 103 | depends on PXA_SHARPSL | ||
| 104 | select PXA27x | ||
| 105 | select PXA_SHARP_Cxx00 | ||
| 106 | |||
| 107 | config MACH_BORZOI | ||
| 108 | bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support" | ||
| 109 | depends on PXA_SHARPSL | ||
| 110 | select PXA27x | ||
| 111 | select PXA_SHARP_Cxx00 | ||
| 112 | |||
| 113 | config MACH_TOSA | ||
| 114 | bool "Enable Sharp SL-6000x (Tosa) Support" | ||
| 115 | depends on PXA_SHARPSL | ||
| 116 | select PXA25x | ||
| 117 | |||
| 61 | config ARCH_PXA_ESERIES | 118 | config ARCH_PXA_ESERIES |
| 62 | bool "PXA based Toshiba e-series PDAs" | 119 | bool "PXA based Toshiba e-series PDAs" |
| 63 | select PXA25x | 120 | select PXA25x |
| @@ -70,10 +127,19 @@ config MACH_E330 | |||
| 70 | Say Y here if you intend to run this kernel on a Toshiba | 127 | Say Y here if you intend to run this kernel on a Toshiba |
| 71 | e330 family PDA. | 128 | e330 family PDA. |
| 72 | 129 | ||
| 130 | config MACH_E350 | ||
| 131 | bool "Toshiba e350" | ||
| 132 | default y | ||
| 133 | depends on ARCH_PXA_ESERIES | ||
| 134 | help | ||
| 135 | Say Y here if you intend to run this kernel on a Toshiba | ||
| 136 | e350 family PDA. | ||
| 137 | |||
| 73 | config MACH_E740 | 138 | config MACH_E740 |
| 74 | bool "Toshiba e740" | 139 | bool "Toshiba e740" |
| 75 | default y | 140 | default y |
| 76 | depends on ARCH_PXA_ESERIES | 141 | depends on ARCH_PXA_ESERIES |
| 142 | select FB_W100 | ||
| 77 | help | 143 | help |
| 78 | Say Y here if you intend to run this kernel on a Toshiba | 144 | Say Y here if you intend to run this kernel on a Toshiba |
| 79 | e740 family PDA. | 145 | e740 family PDA. |
| @@ -82,6 +148,7 @@ config MACH_E750 | |||
| 82 | bool "Toshiba e750" | 148 | bool "Toshiba e750" |
| 83 | default y | 149 | default y |
| 84 | depends on ARCH_PXA_ESERIES | 150 | depends on ARCH_PXA_ESERIES |
| 151 | select FB_W100 | ||
| 85 | help | 152 | help |
| 86 | Say Y here if you intend to run this kernel on a Toshiba | 153 | Say Y here if you intend to run this kernel on a Toshiba |
| 87 | e750 family PDA. | 154 | e750 family PDA. |
| @@ -98,6 +165,7 @@ config MACH_E800 | |||
| 98 | bool "Toshiba e800" | 165 | bool "Toshiba e800" |
| 99 | default y | 166 | default y |
| 100 | depends on ARCH_PXA_ESERIES | 167 | depends on ARCH_PXA_ESERIES |
| 168 | select FB_W100 | ||
| 101 | help | 169 | help |
| 102 | Say Y here if you intend to run this kernel on a Toshiba | 170 | Say Y here if you intend to run this kernel on a Toshiba |
| 103 | e800 family PDA. | 171 | e800 family PDA. |
| @@ -106,6 +174,10 @@ config MACH_TRIZEPS4 | |||
| 106 | bool "Keith und Koep Trizeps4 DIMM-Module" | 174 | bool "Keith und Koep Trizeps4 DIMM-Module" |
| 107 | select PXA27x | 175 | select PXA27x |
| 108 | 176 | ||
| 177 | config MACH_TRIZEPS4_CONXS | ||
| 178 | bool "ConXS Eval Board" | ||
| 179 | depends on MACH_TRIZEPS4 | ||
| 180 | |||
| 109 | config MACH_EM_X270 | 181 | config MACH_EM_X270 |
| 110 | bool "CompuLab EM-x270 platform" | 182 | bool "CompuLab EM-x270 platform" |
| 111 | select PXA27x | 183 | select PXA27x |
| @@ -115,7 +187,7 @@ config MACH_COLIBRI | |||
| 115 | select PXA27x | 187 | select PXA27x |
| 116 | 188 | ||
| 117 | config MACH_ZYLONITE | 189 | config MACH_ZYLONITE |
| 118 | bool "PXA3xx Development Platform" | 190 | bool "PXA3xx Development Platform (aka Zylonite)" |
| 119 | select PXA3xx | 191 | select PXA3xx |
| 120 | select HAVE_PWM | 192 | select HAVE_PWM |
| 121 | 193 | ||
| @@ -124,6 +196,16 @@ config MACH_LITTLETON | |||
| 124 | select PXA3xx | 196 | select PXA3xx |
| 125 | select PXA_SSP | 197 | select PXA_SSP |
| 126 | 198 | ||
| 199 | config MACH_TAVOREVB | ||
| 200 | bool "PXA930 Evaluation Board (aka TavorEVB)" | ||
| 201 | select PXA3xx | ||
| 202 | select PXA930 | ||
| 203 | |||
| 204 | config MACH_SAAR | ||
| 205 | bool "PXA930 Handheld Platform (aka SAAR)" | ||
| 206 | select PXA3xx | ||
| 207 | select PXA930 | ||
| 208 | |||
| 127 | config MACH_ARMCORE | 209 | config MACH_ARMCORE |
| 128 | bool "CompuLab CM-X270 modules" | 210 | bool "CompuLab CM-X270 modules" |
| 129 | select PXA27x | 211 | select PXA27x |
| @@ -131,7 +213,6 @@ config MACH_ARMCORE | |||
| 131 | 213 | ||
| 132 | config MACH_MAGICIAN | 214 | config MACH_MAGICIAN |
| 133 | bool "Enable HTC Magician Support" | 215 | bool "Enable HTC Magician Support" |
| 134 | depends on ARCH_PXA | ||
| 135 | select PXA27x | 216 | select PXA27x |
| 136 | select IWMMXT | 217 | select IWMMXT |
| 137 | 218 | ||
| @@ -139,18 +220,26 @@ config MACH_PCM027 | |||
| 139 | bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" | 220 | bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" |
| 140 | select PXA27x | 221 | select PXA27x |
| 141 | select IWMMXT | 222 | select IWMMXT |
| 223 | select PXA_SSP | ||
| 142 | 224 | ||
| 143 | endmenu | 225 | config ARCH_PXA_PALM |
| 226 | bool "PXA based Palm PDAs" | ||
| 227 | select HAVE_PWM | ||
| 144 | 228 | ||
| 145 | choice | 229 | config MACH_PALMTX |
| 146 | prompt "Used baseboard" | 230 | bool "Palm T|X" |
| 147 | depends on MACH_PCM027 | 231 | default y |
| 232 | depends on ARCH_PXA_PALM | ||
| 233 | select PXA27x | ||
| 234 | select IWMMXT | ||
| 235 | help | ||
| 236 | Say Y here if you intend to run this kernel on a Palm T|X | ||
| 237 | handheld computer. | ||
| 148 | 238 | ||
| 149 | config MACH_PCM990_BASEBOARD | 239 | config MACH_PCM990_BASEBOARD |
| 150 | bool "PHYTEC PCM-990 development board" | 240 | bool "PHYTEC PCM-990 development board" |
| 151 | select HAVE_PWM | 241 | select HAVE_PWM |
| 152 | 242 | depends on MACH_PCM027 | |
| 153 | endchoice | ||
| 154 | 243 | ||
| 155 | choice | 244 | choice |
| 156 | prompt "display on pcm990" | 245 | prompt "display on pcm990" |
| @@ -167,88 +256,45 @@ config PCM990_DISPLAY_NONE | |||
| 167 | 256 | ||
| 168 | endchoice | 257 | endchoice |
| 169 | 258 | ||
| 170 | if ARCH_GUMSTIX | ||
| 171 | |||
| 172 | choice | ||
| 173 | prompt "Select target Gumstix board" | ||
| 174 | |||
| 175 | config MACH_GUMSTIX_F | ||
| 176 | bool "Basix, Connex, ws-200ax, ws-400ax systems" | ||
| 177 | select PXA25x | ||
| 178 | |||
| 179 | endchoice | ||
| 180 | |||
| 181 | endif | ||
| 182 | 259 | ||
| 260 | config PXA_EZX | ||
| 261 | bool "Motorola EZX Platform" | ||
| 262 | select PXA27x | ||
| 263 | select IWMMXT | ||
| 264 | select HAVE_PWM | ||
| 183 | 265 | ||
| 184 | if MACH_TRIZEPS4 | 266 | config MACH_EZX_A780 |
| 267 | bool "Motorola EZX A780" | ||
| 268 | default y | ||
| 269 | depends on PXA_EZX | ||
| 185 | 270 | ||
| 186 | choice | 271 | config MACH_EZX_E680 |
| 187 | prompt "Select base board for Trizeps 4 module" | 272 | bool "Motorola EZX E680" |
| 273 | default y | ||
| 274 | depends on PXA_EZX | ||
| 188 | 275 | ||
| 189 | config MACH_TRIZEPS4_CONXS | 276 | config MACH_EZX_A1200 |
| 190 | bool "ConXS Eval Board" | 277 | bool "Motorola EZX A1200" |
| 278 | default y | ||
| 279 | depends on PXA_EZX | ||
| 191 | 280 | ||
| 192 | config MACH_TRIZEPS4_ANY | 281 | config MACH_EZX_A910 |
| 193 | bool "another Board" | 282 | bool "Motorola EZX A910" |
| 283 | default y | ||
| 284 | depends on PXA_EZX | ||
| 194 | 285 | ||
| 195 | endchoice | 286 | config MACH_EZX_E6 |
| 287 | bool "Motorola EZX E6" | ||
| 288 | default y | ||
| 289 | depends on PXA_EZX | ||
| 196 | 290 | ||
| 197 | endif | 291 | config MACH_EZX_E2 |
| 292 | bool "Motorola EZX E2" | ||
| 293 | default y | ||
| 294 | depends on PXA_EZX | ||
| 198 | 295 | ||
| 199 | endmenu | 296 | endmenu |
| 200 | 297 | ||
| 201 | config MACH_POODLE | ||
| 202 | bool "Enable Sharp SL-5600 (Poodle) Support" | ||
| 203 | depends on PXA_SHARPSL | ||
| 204 | select PXA25x | ||
| 205 | select SHARP_LOCOMO | ||
| 206 | select PXA_SSP | ||
| 207 | |||
| 208 | config MACH_CORGI | ||
| 209 | bool "Enable Sharp SL-C700 (Corgi) Support" | ||
| 210 | depends on PXA_SHARPSL | ||
| 211 | select PXA25x | ||
| 212 | select PXA_SHARP_C7xx | ||
| 213 | |||
| 214 | config MACH_SHEPHERD | ||
| 215 | bool "Enable Sharp SL-C750 (Shepherd) Support" | ||
| 216 | depends on PXA_SHARPSL | ||
| 217 | select PXA25x | ||
| 218 | select PXA_SHARP_C7xx | ||
| 219 | |||
| 220 | config MACH_HUSKY | ||
| 221 | bool "Enable Sharp SL-C760 (Husky) Support" | ||
| 222 | depends on PXA_SHARPSL | ||
| 223 | select PXA25x | ||
| 224 | select PXA_SHARP_C7xx | ||
| 225 | |||
| 226 | config MACH_AKITA | ||
| 227 | bool "Enable Sharp SL-1000 (Akita) Support" | ||
| 228 | depends on PXA_SHARPSL | ||
| 229 | select PXA27x | ||
| 230 | select PXA_SHARP_Cxx00 | ||
| 231 | select MACH_SPITZ | ||
| 232 | select I2C | ||
| 233 | select I2C_PXA | ||
| 234 | |||
| 235 | config MACH_SPITZ | ||
| 236 | bool "Enable Sharp Zaurus SL-3000 (Spitz) Support" | ||
| 237 | depends on PXA_SHARPSL | ||
| 238 | select PXA27x | ||
| 239 | select PXA_SHARP_Cxx00 | ||
| 240 | |||
| 241 | config MACH_BORZOI | ||
| 242 | bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support" | ||
| 243 | depends on PXA_SHARPSL | ||
| 244 | select PXA27x | ||
| 245 | select PXA_SHARP_Cxx00 | ||
| 246 | |||
| 247 | config MACH_TOSA | ||
| 248 | bool "Enable Sharp SL-6000x (Tosa) Support" | ||
| 249 | depends on PXA_SHARPSL | ||
| 250 | select PXA25x | ||
| 251 | |||
| 252 | config PXA25x | 298 | config PXA25x |
| 253 | bool | 299 | bool |
| 254 | help | 300 | help |
| @@ -288,4 +334,13 @@ config PXA_PWM | |||
| 288 | default BACKLIGHT_PWM | 334 | default BACKLIGHT_PWM |
| 289 | help | 335 | help |
| 290 | Enable support for PXA2xx/PXA3xx PWM controllers | 336 | Enable support for PXA2xx/PXA3xx PWM controllers |
| 337 | |||
| 338 | config TOSA_BT | ||
| 339 | tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" | ||
| 340 | depends on MACH_TOSA | ||
| 341 | select RFKILL | ||
| 342 | help | ||
| 343 | This is a simple driver that is able to control | ||
| 344 | the state of built in bluetooth chip on tosa. | ||
| 345 | |||
| 291 | endif | 346 | endif |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index c4dfbe87fc4e..99ecbe7f8506 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
| 6 | obj-y += clock.o devices.o generic.o irq.o dma.o \ | 6 | obj-y += clock.o devices.o generic.o irq.o dma.o \ |
| 7 | time.o gpio.o | 7 | time.o gpio.o reset.o |
| 8 | obj-$(CONFIG_PM) += pm.o sleep.o standby.o | 8 | obj-$(CONFIG_PM) += pm.o sleep.o standby.o |
| 9 | obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o | 9 | obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o |
| 10 | 10 | ||
| @@ -18,6 +18,7 @@ obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa2xx.o pxa27x.o | |||
| 18 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o | 18 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o |
| 19 | obj-$(CONFIG_CPU_PXA300) += pxa300.o | 19 | obj-$(CONFIG_CPU_PXA300) += pxa300.o |
| 20 | obj-$(CONFIG_CPU_PXA320) += pxa320.o | 20 | obj-$(CONFIG_CPU_PXA320) += pxa320.o |
| 21 | obj-$(CONFIG_CPU_PXA930) += pxa930.o | ||
| 21 | 22 | ||
| 22 | # Specific board support | 23 | # Specific board support |
| 23 | obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o | 24 | obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o |
| @@ -36,7 +37,12 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o | |||
| 36 | obj-$(CONFIG_MACH_TOSA) += tosa.o | 37 | obj-$(CONFIG_MACH_TOSA) += tosa.o |
| 37 | obj-$(CONFIG_MACH_EM_X270) += em-x270.o | 38 | obj-$(CONFIG_MACH_EM_X270) += em-x270.o |
| 38 | obj-$(CONFIG_MACH_MAGICIAN) += magician.o | 39 | obj-$(CONFIG_MACH_MAGICIAN) += magician.o |
| 39 | obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o | 40 | obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o |
| 41 | obj-$(CONFIG_MACH_E740) += e740_lcd.o | ||
| 42 | obj-$(CONFIG_MACH_E750) += e750_lcd.o | ||
| 43 | obj-$(CONFIG_MACH_E400) += e400_lcd.o | ||
| 44 | obj-$(CONFIG_MACH_E800) += e800_lcd.o | ||
| 45 | obj-$(CONFIG_MACH_PALMTX) += palmtx.o | ||
| 40 | 46 | ||
| 41 | ifeq ($(CONFIG_MACH_ZYLONITE),y) | 47 | ifeq ($(CONFIG_MACH_ZYLONITE),y) |
| 42 | obj-y += zylonite.o | 48 | obj-y += zylonite.o |
| @@ -44,8 +50,11 @@ ifeq ($(CONFIG_MACH_ZYLONITE),y) | |||
| 44 | obj-$(CONFIG_CPU_PXA320) += zylonite_pxa320.o | 50 | obj-$(CONFIG_CPU_PXA320) += zylonite_pxa320.o |
| 45 | endif | 51 | endif |
| 46 | obj-$(CONFIG_MACH_LITTLETON) += littleton.o | 52 | obj-$(CONFIG_MACH_LITTLETON) += littleton.o |
| 53 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o | ||
| 54 | obj-$(CONFIG_MACH_SAAR) += saar.o | ||
| 47 | 55 | ||
| 48 | obj-$(CONFIG_MACH_ARMCORE) += cm-x270.o | 56 | obj-$(CONFIG_MACH_ARMCORE) += cm-x270.o |
| 57 | obj-$(CONFIG_PXA_EZX) += ezx.o | ||
| 49 | 58 | ||
| 50 | # Support for blinky lights | 59 | # Support for blinky lights |
| 51 | led-y := leds.o | 60 | led-y := leds.o |
| @@ -59,3 +68,5 @@ obj-$(CONFIG_LEDS) += $(led-y) | |||
| 59 | ifeq ($(CONFIG_PCI),y) | 68 | ifeq ($(CONFIG_PCI),y) |
| 60 | obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o | 69 | obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o |
| 61 | endif | 70 | endif |
| 71 | |||
| 72 | obj-$(CONFIG_TOSA_BT) += tosa-bt.o | ||
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index b4d04955dcb0..630063ffa6fc 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
| @@ -101,21 +101,6 @@ unsigned long clk_get_rate(struct clk *clk) | |||
| 101 | EXPORT_SYMBOL(clk_get_rate); | 101 | EXPORT_SYMBOL(clk_get_rate); |
| 102 | 102 | ||
| 103 | 103 | ||
| 104 | static void clk_gpio27_enable(struct clk *clk) | ||
| 105 | { | ||
| 106 | pxa_gpio_mode(GPIO11_3_6MHz_MD); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void clk_gpio27_disable(struct clk *clk) | ||
| 110 | { | ||
| 111 | } | ||
| 112 | |||
| 113 | static const struct clkops clk_gpio27_ops = { | ||
| 114 | .enable = clk_gpio27_enable, | ||
| 115 | .disable = clk_gpio27_disable, | ||
| 116 | }; | ||
| 117 | |||
| 118 | |||
| 119 | void clk_cken_enable(struct clk *clk) | 104 | void clk_cken_enable(struct clk *clk) |
| 120 | { | 105 | { |
| 121 | CKEN |= 1 << clk->cken; | 106 | CKEN |= 1 << clk->cken; |
| @@ -131,14 +116,6 @@ const struct clkops clk_cken_ops = { | |||
| 131 | .disable = clk_cken_disable, | 116 | .disable = clk_cken_disable, |
| 132 | }; | 117 | }; |
| 133 | 118 | ||
| 134 | static struct clk common_clks[] = { | ||
| 135 | { | ||
| 136 | .name = "GPIO27_CLK", | ||
| 137 | .ops = &clk_gpio27_ops, | ||
| 138 | .rate = 3686400, | ||
| 139 | }, | ||
| 140 | }; | ||
| 141 | |||
| 142 | void clks_register(struct clk *clks, size_t num) | 119 | void clks_register(struct clk *clks, size_t num) |
| 143 | { | 120 | { |
| 144 | int i; | 121 | int i; |
| @@ -148,10 +125,3 @@ void clks_register(struct clk *clks, size_t num) | |||
| 148 | list_add(&clks[i].node, &clocks); | 125 | list_add(&clks[i].node, &clocks); |
| 149 | mutex_unlock(&clocks_mutex); | 126 | mutex_unlock(&clocks_mutex); |
| 150 | } | 127 | } |
| 151 | |||
| 152 | static int __init clk_init(void) | ||
| 153 | { | ||
| 154 | clks_register(common_clks, ARRAY_SIZE(common_clks)); | ||
| 155 | return 0; | ||
| 156 | } | ||
| 157 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h index 83cbfaba485d..1ec8f9178aaf 100644 --- a/arch/arm/mach-pxa/clock.h +++ b/arch/arm/mach-pxa/clock.h | |||
| @@ -47,9 +47,42 @@ struct clk { | |||
| 47 | .other = _other, \ | 47 | .other = _other, \ |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | #define INIT_CLK(_name, _ops, _rate, _delay, _dev) \ | ||
| 51 | { \ | ||
| 52 | .name = _name, \ | ||
| 53 | .dev = _dev, \ | ||
| 54 | .ops = _ops, \ | ||
| 55 | .rate = _rate, \ | ||
| 56 | .delay = _delay, \ | ||
| 57 | } | ||
| 58 | |||
| 50 | extern const struct clkops clk_cken_ops; | 59 | extern const struct clkops clk_cken_ops; |
| 51 | 60 | ||
| 52 | void clk_cken_enable(struct clk *clk); | 61 | void clk_cken_enable(struct clk *clk); |
| 53 | void clk_cken_disable(struct clk *clk); | 62 | void clk_cken_disable(struct clk *clk); |
| 54 | 63 | ||
| 64 | #ifdef CONFIG_PXA3xx | ||
| 65 | #define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ | ||
| 66 | { \ | ||
| 67 | .name = _name, \ | ||
| 68 | .dev = _dev, \ | ||
| 69 | .ops = &clk_pxa3xx_cken_ops, \ | ||
| 70 | .rate = _rate, \ | ||
| 71 | .cken = CKEN_##_cken, \ | ||
| 72 | .delay = _delay, \ | ||
| 73 | } | ||
| 74 | |||
| 75 | #define PXA3xx_CK(_name, _cken, _ops, _dev) \ | ||
| 76 | { \ | ||
| 77 | .name = _name, \ | ||
| 78 | .dev = _dev, \ | ||
| 79 | .ops = _ops, \ | ||
| 80 | .cken = CKEN_##_cken, \ | ||
| 81 | } | ||
| 82 | |||
| 83 | extern const struct clkops clk_pxa3xx_cken_ops; | ||
| 84 | extern void clk_pxa3xx_cken_enable(struct clk *); | ||
| 85 | extern void clk_pxa3xx_cken_disable(struct clk *); | ||
| 86 | #endif | ||
| 87 | |||
| 55 | void clks_register(struct clk *clks, size_t num); | 88 | void clks_register(struct clk *clks, size_t num); |
diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c index 319c9ff3ab9a..bcf0cde6ccc9 100644 --- a/arch/arm/mach-pxa/cm-x270-pci.c +++ b/arch/arm/mach-pxa/cm-x270-pci.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * Bits taken from various places. | 6 | * Bits taken from various places. |
| 7 | * | 7 | * |
| 8 | * Copyright (C) 2007 Compulab, Ltd. | 8 | * Copyright (C) 2007, 2008 Compulab, Ltd. |
| 9 | * Mike Rapoport <mike@compulab.co.il> | 9 | * Mike Rapoport <mike@compulab.co.il> |
| 10 | * | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| @@ -19,16 +19,16 @@ | |||
| 19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
| 20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
| 22 | #include <linux/gpio.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach/pci.h> | 24 | #include <asm/mach/pci.h> |
| 24 | #include <asm/arch/cm-x270.h> | ||
| 25 | #include <asm/arch/pxa-regs.h> | 25 | #include <asm/arch/pxa-regs.h> |
| 26 | #include <asm/arch/pxa2xx-gpio.h> | ||
| 27 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
| 28 | 27 | ||
| 29 | #include <asm/hardware/it8152.h> | 28 | #include <asm/hardware/it8152.h> |
| 30 | 29 | ||
| 31 | unsigned long it8152_base_address = CMX270_IT8152_VIRT; | 30 | unsigned long it8152_base_address; |
| 31 | static int cmx270_it8152_irq_gpio; | ||
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | * Only first 64MB of memory can be accessed via PCI. | 34 | * Only first 64MB of memory can be accessed via PCI. |
| @@ -42,7 +42,7 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size, | |||
| 42 | unsigned int sz = SZ_64M >> PAGE_SHIFT; | 42 | unsigned int sz = SZ_64M >> PAGE_SHIFT; |
| 43 | 43 | ||
| 44 | if (machine_is_armcore()) { | 44 | if (machine_is_armcore()) { |
| 45 | pr_info("Adjusting zones for CM-x270\n"); | 45 | pr_info("Adjusting zones for CM-X270\n"); |
| 46 | 46 | ||
| 47 | /* | 47 | /* |
| 48 | * Only adjust if > 64M on current system | 48 | * Only adjust if > 64M on current system |
| @@ -60,19 +60,20 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size, | |||
| 60 | static void cmx270_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | 60 | static void cmx270_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) |
| 61 | { | 61 | { |
| 62 | /* clear our parent irq */ | 62 | /* clear our parent irq */ |
| 63 | GEDR(GPIO_IT8152_IRQ) = GPIO_bit(GPIO_IT8152_IRQ); | 63 | GEDR(cmx270_it8152_irq_gpio) = GPIO_bit(cmx270_it8152_irq_gpio); |
| 64 | 64 | ||
| 65 | it8152_irq_demux(irq, desc); | 65 | it8152_irq_demux(irq, desc); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | void __cmx270_pci_init_irq(void) | 68 | void __cmx270_pci_init_irq(int irq_gpio) |
| 69 | { | 69 | { |
| 70 | it8152_init_irq(); | 70 | it8152_init_irq(); |
| 71 | pxa_gpio_mode(IRQ_TO_GPIO(GPIO_IT8152_IRQ)); | ||
| 72 | set_irq_type(IRQ_GPIO(GPIO_IT8152_IRQ), IRQT_RISING); | ||
| 73 | 71 | ||
| 74 | set_irq_chained_handler(IRQ_GPIO(GPIO_IT8152_IRQ), | 72 | cmx270_it8152_irq_gpio = irq_gpio; |
| 75 | cmx270_it8152_irq_demux); | 73 | |
| 74 | set_irq_type(gpio_to_irq(irq_gpio), IRQT_RISING); | ||
| 75 | |||
| 76 | set_irq_chained_handler(gpio_to_irq(irq_gpio), cmx270_it8152_irq_demux); | ||
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | #ifdef CONFIG_PM | 79 | #ifdef CONFIG_PM |
| @@ -115,8 +116,8 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
| 115 | 116 | ||
| 116 | /* | 117 | /* |
| 117 | Here comes the ugly part. The routing is baseboard specific, | 118 | Here comes the ugly part. The routing is baseboard specific, |
| 118 | but defining a platform for each possible base of CM-x270 is | 119 | but defining a platform for each possible base of CM-X270 is |
| 119 | unrealistic. Here we keep mapping for ATXBase and SB-x270. | 120 | unrealistic. Here we keep mapping for ATXBase and SB-X270. |
| 120 | */ | 121 | */ |
| 121 | /* ATXBASE PCI slot */ | 122 | /* ATXBASE PCI slot */ |
| 122 | if (slot == 7) | 123 | if (slot == 7) |
diff --git a/arch/arm/mach-pxa/cm-x270-pci.h b/arch/arm/mach-pxa/cm-x270-pci.h index ffe37b66f9a0..48f532f4cb51 100644 --- a/arch/arm/mach-pxa/cm-x270-pci.h +++ b/arch/arm/mach-pxa/cm-x270-pci.h | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | extern void __cmx270_pci_init_irq(void); | 1 | extern void __cmx270_pci_init_irq(int irq_gpio); |
| 2 | extern void __cmx270_pci_suspend(void); | 2 | extern void __cmx270_pci_suspend(void); |
| 3 | extern void __cmx270_pci_resume(void); | 3 | extern void __cmx270_pci_resume(void); |
| 4 | 4 | ||
| 5 | #ifdef CONFIG_PCI | 5 | #ifdef CONFIG_PCI |
| 6 | #define cmx270_pci_init_irq __cmx270_pci_init_irq | 6 | #define cmx270_pci_init_irq(x) __cmx270_pci_init_irq(x) |
| 7 | #define cmx270_pci_suspend __cmx270_pci_suspend | 7 | #define cmx270_pci_suspend(x) __cmx270_pci_suspend(x) |
| 8 | #define cmx270_pci_resume __cmx270_pci_resume | 8 | #define cmx270_pci_resume(x) __cmx270_pci_resume(x) |
| 9 | #else | 9 | #else |
| 10 | #define cmx270_pci_init_irq() do {} while (0) | 10 | #define cmx270_pci_init_irq(x) do {} while (0) |
| 11 | #define cmx270_pci_suspend() do {} while (0) | 11 | #define cmx270_pci_suspend(x) do {} while (0) |
| 12 | #define cmx270_pci_resume() do {} while (0) | 12 | #define cmx270_pci_resume(x) do {} while (0) |
| 13 | #endif | 13 | #endif |
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index 01b9964acec1..402e807eae54 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/arch/arm/mach-pxa/cm-x270.c | 2 | * linux/arch/arm/mach-pxa/cm-x270.c |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 CompuLab, Ltd. | 4 | * Copyright (C) 2007, 2008 CompuLab, Ltd. |
| 5 | * Mike Rapoport <mike@compulab.co.il> | 5 | * Mike Rapoport <mike@compulab.co.il> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
| @@ -9,44 +9,156 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | ||
| 13 | #include <linux/pm.h> | ||
| 14 | #include <linux/fb.h> | ||
| 15 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
| 16 | #include <linux/irq.h> | ||
| 17 | #include <linux/sysdev.h> | 13 | #include <linux/sysdev.h> |
| 18 | #include <linux/io.h> | 14 | #include <linux/irq.h> |
| 19 | #include <linux/delay.h> | 15 | #include <linux/gpio.h> |
| 20 | 16 | ||
| 21 | #include <linux/dm9000.h> | 17 | #include <linux/dm9000.h> |
| 22 | #include <linux/rtc-v3020.h> | 18 | #include <linux/rtc-v3020.h> |
| 23 | #include <linux/serial_8250.h> | ||
| 24 | |||
| 25 | #include <video/mbxfb.h> | 19 | #include <video/mbxfb.h> |
| 20 | #include <linux/leds.h> | ||
| 26 | 21 | ||
| 27 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
| 28 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
| 29 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
| 30 | 25 | ||
| 31 | #include <asm/arch/pxa-regs.h> | ||
| 32 | #include <asm/arch/pxa2xx-regs.h> | 26 | #include <asm/arch/pxa2xx-regs.h> |
| 33 | #include <asm/arch/pxa2xx-gpio.h> | 27 | #include <asm/arch/mfp-pxa27x.h> |
| 28 | #include <asm/arch/pxa-regs.h> | ||
| 34 | #include <asm/arch/audio.h> | 29 | #include <asm/arch/audio.h> |
| 35 | #include <asm/arch/pxafb.h> | 30 | #include <asm/arch/pxafb.h> |
| 36 | #include <asm/arch/ohci.h> | 31 | #include <asm/arch/ohci.h> |
| 37 | #include <asm/arch/mmc.h> | 32 | #include <asm/arch/mmc.h> |
| 38 | #include <asm/arch/bitfield.h> | 33 | #include <asm/arch/bitfield.h> |
| 39 | #include <asm/arch/cm-x270.h> | ||
| 40 | 34 | ||
| 41 | #include <asm/hardware/it8152.h> | 35 | #include <asm/hardware/it8152.h> |
| 42 | 36 | ||
| 43 | #include "generic.h" | 37 | #include "generic.h" |
| 44 | #include "cm-x270-pci.h" | 38 | #include "cm-x270-pci.h" |
| 45 | 39 | ||
| 40 | /* virtual addresses for statically mapped regions */ | ||
| 41 | #define CMX270_VIRT_BASE (0xe8000000) | ||
| 42 | #define CMX270_IT8152_VIRT (CMX270_VIRT_BASE) | ||
| 43 | |||
| 46 | #define RTC_PHYS_BASE (PXA_CS1_PHYS + (5 << 22)) | 44 | #define RTC_PHYS_BASE (PXA_CS1_PHYS + (5 << 22)) |
| 47 | #define DM9000_PHYS_BASE (PXA_CS1_PHYS + (6 << 22)) | 45 | #define DM9000_PHYS_BASE (PXA_CS1_PHYS + (6 << 22)) |
| 48 | 46 | ||
| 49 | static struct resource cmx270_dm9k_resource[] = { | 47 | /* GPIO IRQ usage */ |
| 48 | #define GPIO10_ETHIRQ (10) | ||
| 49 | #define GPIO22_IT8152_IRQ (22) | ||
| 50 | #define GPIO83_MMC_IRQ (83) | ||
| 51 | #define GPIO95_GFXIRQ (95) | ||
| 52 | |||
| 53 | #define CMX270_ETHIRQ IRQ_GPIO(GPIO10_ETHIRQ) | ||
| 54 | #define CMX270_IT8152_IRQ IRQ_GPIO(GPIO22_IT8152_IRQ) | ||
| 55 | #define CMX270_MMC_IRQ IRQ_GPIO(GPIO83_MMC_IRQ) | ||
| 56 | #define CMX270_GFXIRQ IRQ_GPIO(GPIO95_GFXIRQ) | ||
| 57 | |||
| 58 | /* MMC power enable */ | ||
| 59 | #define GPIO105_MMC_POWER (105) | ||
| 60 | |||
| 61 | static unsigned long cmx270_pin_config[] = { | ||
| 62 | /* AC'97 */ | ||
| 63 | GPIO28_AC97_BITCLK, | ||
| 64 | GPIO29_AC97_SDATA_IN_0, | ||
| 65 | GPIO30_AC97_SDATA_OUT, | ||
| 66 | GPIO31_AC97_SYNC, | ||
| 67 | GPIO98_AC97_SYSCLK, | ||
| 68 | GPIO113_AC97_nRESET, | ||
| 69 | |||
| 70 | /* BTUART */ | ||
| 71 | GPIO42_BTUART_RXD, | ||
| 72 | GPIO43_BTUART_TXD, | ||
| 73 | GPIO44_BTUART_CTS, | ||
| 74 | GPIO45_BTUART_RTS, | ||
| 75 | |||
| 76 | /* STUART */ | ||
| 77 | GPIO46_STUART_RXD, | ||
| 78 | GPIO47_STUART_TXD, | ||
| 79 | |||
| 80 | /* MCI controller */ | ||
| 81 | GPIO32_MMC_CLK, | ||
| 82 | GPIO112_MMC_CMD, | ||
| 83 | GPIO92_MMC_DAT_0, | ||
| 84 | GPIO109_MMC_DAT_1, | ||
| 85 | GPIO110_MMC_DAT_2, | ||
| 86 | GPIO111_MMC_DAT_3, | ||
| 87 | |||
| 88 | /* LCD */ | ||
| 89 | GPIO58_LCD_LDD_0, | ||
| 90 | GPIO59_LCD_LDD_1, | ||
| 91 | GPIO60_LCD_LDD_2, | ||
| 92 | GPIO61_LCD_LDD_3, | ||
| 93 | GPIO62_LCD_LDD_4, | ||
| 94 | GPIO63_LCD_LDD_5, | ||
| 95 | GPIO64_LCD_LDD_6, | ||
| 96 | GPIO65_LCD_LDD_7, | ||
| 97 | GPIO66_LCD_LDD_8, | ||
| 98 | GPIO67_LCD_LDD_9, | ||
| 99 | GPIO68_LCD_LDD_10, | ||
| 100 | GPIO69_LCD_LDD_11, | ||
| 101 | GPIO70_LCD_LDD_12, | ||
| 102 | GPIO71_LCD_LDD_13, | ||
| 103 | GPIO72_LCD_LDD_14, | ||
| 104 | GPIO73_LCD_LDD_15, | ||
| 105 | GPIO74_LCD_FCLK, | ||
| 106 | GPIO75_LCD_LCLK, | ||
| 107 | GPIO76_LCD_PCLK, | ||
| 108 | GPIO77_LCD_BIAS, | ||
| 109 | |||
| 110 | /* I2C */ | ||
| 111 | GPIO117_I2C_SCL, | ||
| 112 | GPIO118_I2C_SDA, | ||
| 113 | |||
| 114 | /* SSP1 */ | ||
| 115 | GPIO23_SSP1_SCLK, | ||
| 116 | GPIO24_SSP1_SFRM, | ||
| 117 | GPIO25_SSP1_TXD, | ||
| 118 | GPIO26_SSP1_RXD, | ||
| 119 | |||
| 120 | /* SSP2 */ | ||
| 121 | GPIO19_SSP2_SCLK, | ||
| 122 | GPIO14_SSP2_SFRM, | ||
| 123 | GPIO87_SSP2_TXD, | ||
| 124 | GPIO88_SSP2_RXD, | ||
| 125 | |||
| 126 | /* PC Card */ | ||
| 127 | GPIO48_nPOE, | ||
| 128 | GPIO49_nPWE, | ||
| 129 | GPIO50_nPIOR, | ||
| 130 | GPIO51_nPIOW, | ||
| 131 | GPIO85_nPCE_1, | ||
| 132 | GPIO54_nPCE_2, | ||
| 133 | GPIO55_nPREG, | ||
| 134 | GPIO56_nPWAIT, | ||
| 135 | GPIO57_nIOIS16, | ||
| 136 | |||
| 137 | /* SDRAM and local bus */ | ||
| 138 | GPIO15_nCS_1, | ||
| 139 | GPIO78_nCS_2, | ||
| 140 | GPIO79_nCS_3, | ||
| 141 | GPIO80_nCS_4, | ||
| 142 | GPIO33_nCS_5, | ||
| 143 | GPIO49_nPWE, | ||
| 144 | GPIO18_RDY, | ||
| 145 | |||
| 146 | /* GPIO */ | ||
| 147 | GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH, | ||
| 148 | GPIO105_GPIO | MFP_LPM_DRIVE_HIGH, /* MMC/SD power */ | ||
| 149 | GPIO53_GPIO, /* PC card reset */ | ||
| 150 | |||
| 151 | /* NAND controls */ | ||
| 152 | GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */ | ||
| 153 | GPIO89_GPIO, /* NAND Ready/Busy */ | ||
| 154 | |||
| 155 | /* interrupts */ | ||
| 156 | GPIO10_GPIO, /* DM9000 interrupt */ | ||
| 157 | GPIO83_GPIO, /* MMC card detect */ | ||
| 158 | }; | ||
| 159 | |||
| 160 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | ||
| 161 | static struct resource cmx270_dm9000_resource[] = { | ||
| 50 | [0] = { | 162 | [0] = { |
| 51 | .start = DM9000_PHYS_BASE, | 163 | .start = DM9000_PHYS_BASE, |
| 52 | .end = DM9000_PHYS_BASE + 4, | 164 | .end = DM9000_PHYS_BASE + 4, |
| @@ -64,31 +176,45 @@ static struct resource cmx270_dm9k_resource[] = { | |||
| 64 | } | 176 | } |
| 65 | }; | 177 | }; |
| 66 | 178 | ||
| 67 | /* for the moment we limit ourselves to 32bit IO until some | 179 | static struct dm9000_plat_data cmx270_dm9000_platdata = { |
| 68 | * better IO routines can be written and tested | ||
| 69 | */ | ||
| 70 | static struct dm9000_plat_data cmx270_dm9k_platdata = { | ||
| 71 | .flags = DM9000_PLATF_32BITONLY, | 180 | .flags = DM9000_PLATF_32BITONLY, |
| 72 | }; | 181 | }; |
| 73 | 182 | ||
| 74 | /* Ethernet device */ | 183 | static struct platform_device cmx270_dm9000_device = { |
| 75 | static struct platform_device cmx270_device_dm9k = { | ||
| 76 | .name = "dm9000", | 184 | .name = "dm9000", |
| 77 | .id = 0, | 185 | .id = 0, |
| 78 | .num_resources = ARRAY_SIZE(cmx270_dm9k_resource), | 186 | .num_resources = ARRAY_SIZE(cmx270_dm9000_resource), |
| 79 | .resource = cmx270_dm9k_resource, | 187 | .resource = cmx270_dm9000_resource, |
| 80 | .dev = { | 188 | .dev = { |
| 81 | .platform_data = &cmx270_dm9k_platdata, | 189 | .platform_data = &cmx270_dm9000_platdata, |
| 82 | } | 190 | } |
| 83 | }; | 191 | }; |
| 84 | 192 | ||
| 85 | /* touchscreen controller */ | 193 | static void __init cmx270_init_dm9000(void) |
| 194 | { | ||
| 195 | platform_device_register(&cmx270_dm9000_device); | ||
| 196 | } | ||
| 197 | #else | ||
| 198 | static inline void cmx270_init_dm9000(void) {} | ||
| 199 | #endif | ||
| 200 | |||
| 201 | /* UCB1400 touchscreen controller */ | ||
| 202 | #if defined(CONFIG_TOUCHSCREEN_UCB1400) || defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE) | ||
| 86 | static struct platform_device cmx270_ts_device = { | 203 | static struct platform_device cmx270_ts_device = { |
| 87 | .name = "ucb1400_ts", | 204 | .name = "ucb1400_ts", |
| 88 | .id = -1, | 205 | .id = -1, |
| 89 | }; | 206 | }; |
| 90 | 207 | ||
| 91 | /* RTC */ | 208 | static void __init cmx270_init_touchscreen(void) |
| 209 | { | ||
| 210 | platform_device_register(&cmx270_ts_device); | ||
| 211 | } | ||
| 212 | #else | ||
| 213 | static inline void cmx270_init_touchscreen(void) {} | ||
| 214 | #endif | ||
| 215 | |||
| 216 | /* V3020 RTC */ | ||
| 217 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) | ||
| 92 | static struct resource cmx270_v3020_resource[] = { | 218 | static struct resource cmx270_v3020_resource[] = { |
| 93 | [0] = { | 219 | [0] = { |
| 94 | .start = RTC_PHYS_BASE, | 220 | .start = RTC_PHYS_BASE, |
| @@ -111,28 +237,67 @@ static struct platform_device cmx270_rtc_device = { | |||
| 111 | } | 237 | } |
| 112 | }; | 238 | }; |
| 113 | 239 | ||
| 114 | /* | 240 | static void __init cmx270_init_rtc(void) |
| 115 | * CM-X270 LEDs | 241 | { |
| 116 | */ | 242 | platform_device_register(&cmx270_rtc_device); |
| 243 | } | ||
| 244 | #else | ||
| 245 | static inline void cmx270_init_rtc(void) {} | ||
| 246 | #endif | ||
| 247 | |||
| 248 | /* CM-X270 LEDs */ | ||
| 249 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
| 250 | static struct gpio_led cmx270_leds[] = { | ||
| 251 | [0] = { | ||
| 252 | .name = "cm-x270:red", | ||
| 253 | .default_trigger = "nand-disk", | ||
| 254 | .gpio = 93, | ||
| 255 | .active_low = 1, | ||
| 256 | }, | ||
| 257 | [1] = { | ||
| 258 | .name = "cm-x270:green", | ||
| 259 | .default_trigger = "heartbeat", | ||
| 260 | .gpio = 94, | ||
| 261 | .active_low = 1, | ||
| 262 | }, | ||
| 263 | }; | ||
| 264 | |||
| 265 | static struct gpio_led_platform_data cmx270_gpio_led_pdata = { | ||
| 266 | .num_leds = ARRAY_SIZE(cmx270_leds), | ||
| 267 | .leds = cmx270_leds, | ||
| 268 | }; | ||
| 269 | |||
| 117 | static struct platform_device cmx270_led_device = { | 270 | static struct platform_device cmx270_led_device = { |
| 118 | .name = "cm-x270-led", | 271 | .name = "leds-gpio", |
| 119 | .id = -1, | 272 | .id = -1, |
| 273 | .dev = { | ||
| 274 | .platform_data = &cmx270_gpio_led_pdata, | ||
| 275 | }, | ||
| 120 | }; | 276 | }; |
| 121 | 277 | ||
| 278 | static void __init cmx270_init_leds(void) | ||
| 279 | { | ||
| 280 | platform_device_register(&cmx270_led_device); | ||
| 281 | } | ||
| 282 | #else | ||
| 283 | static inline void cmx270_init_leds(void) {} | ||
| 284 | #endif | ||
| 285 | |||
| 122 | /* 2700G graphics */ | 286 | /* 2700G graphics */ |
| 287 | #if defined(CONFIG_FB_MBX) || defined(CONFIG_FB_MBX_MODULE) | ||
| 123 | static u64 fb_dma_mask = ~(u64)0; | 288 | static u64 fb_dma_mask = ~(u64)0; |
| 124 | 289 | ||
| 125 | static struct resource cmx270_2700G_resource[] = { | 290 | static struct resource cmx270_2700G_resource[] = { |
| 126 | /* frame buffer memory including ODFB and External SDRAM */ | 291 | /* frame buffer memory including ODFB and External SDRAM */ |
| 127 | [0] = { | 292 | [0] = { |
| 128 | .start = MARATHON_PHYS, | 293 | .start = PXA_CS2_PHYS, |
| 129 | .end = MARATHON_PHYS + 0x02000000, | 294 | .end = PXA_CS2_PHYS + 0x01ffffff, |
| 130 | .flags = IORESOURCE_MEM, | 295 | .flags = IORESOURCE_MEM, |
| 131 | }, | 296 | }, |
| 132 | /* Marathon registers */ | 297 | /* Marathon registers */ |
| 133 | [1] = { | 298 | [1] = { |
| 134 | .start = MARATHON_PHYS + 0x03fe0000, | 299 | .start = PXA_CS2_PHYS + 0x03fe0000, |
| 135 | .end = MARATHON_PHYS + 0x03ffffff, | 300 | .end = PXA_CS2_PHYS + 0x03ffffff, |
| 136 | .flags = IORESOURCE_MEM, | 301 | .flags = IORESOURCE_MEM, |
| 137 | }, | 302 | }, |
| 138 | }; | 303 | }; |
| @@ -200,43 +365,15 @@ static struct platform_device cmx270_2700G = { | |||
| 200 | .id = -1, | 365 | .id = -1, |
| 201 | }; | 366 | }; |
| 202 | 367 | ||
| 203 | static u64 ata_dma_mask = ~(u64)0; | 368 | static void __init cmx270_init_2700G(void) |
| 204 | 369 | { | |
| 205 | static struct platform_device cmx270_ata = { | 370 | platform_device_register(&cmx270_2700G); |
| 206 | .name = "pata_cm_x270", | 371 | } |
| 207 | .id = -1, | 372 | #else |
| 208 | .dev = { | 373 | static inline void cmx270_init_2700G(void) {} |
| 209 | .dma_mask = &ata_dma_mask, | 374 | #endif |
| 210 | .coherent_dma_mask = 0xffffffff, | ||
| 211 | }, | ||
| 212 | }; | ||
| 213 | |||
| 214 | /* platform devices */ | ||
| 215 | static struct platform_device *platform_devices[] __initdata = { | ||
| 216 | &cmx270_device_dm9k, | ||
| 217 | &cmx270_rtc_device, | ||
| 218 | &cmx270_2700G, | ||
| 219 | &cmx270_led_device, | ||
| 220 | &cmx270_ts_device, | ||
| 221 | &cmx270_ata, | ||
| 222 | }; | ||
| 223 | |||
| 224 | /* Map PCI companion and IDE/General Purpose CS statically */ | ||
| 225 | static struct map_desc cmx270_io_desc[] __initdata = { | ||
| 226 | [0] = { /* IDE/general purpose space */ | ||
| 227 | .virtual = CMX270_IDE104_VIRT, | ||
| 228 | .pfn = __phys_to_pfn(CMX270_IDE104_PHYS), | ||
| 229 | .length = SZ_64M - SZ_8M, | ||
| 230 | .type = MT_DEVICE | ||
| 231 | }, | ||
| 232 | [1] = { /* PCI bridge */ | ||
| 233 | .virtual = CMX270_IT8152_VIRT, | ||
| 234 | .pfn = __phys_to_pfn(CMX270_IT8152_PHYS), | ||
| 235 | .length = SZ_64M, | ||
| 236 | .type = MT_DEVICE | ||
| 237 | }, | ||
| 238 | }; | ||
| 239 | 375 | ||
| 376 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | ||
| 240 | /* | 377 | /* |
| 241 | Display definitions | 378 | Display definitions |
| 242 | keep these for backwards compatibility, although symbolic names (as | 379 | keep these for backwards compatibility, although symbolic names (as |
| @@ -446,7 +583,16 @@ static int __init cmx270_set_display(char *str) | |||
| 446 | */ | 583 | */ |
| 447 | __setup("monitor=", cmx270_set_display); | 584 | __setup("monitor=", cmx270_set_display); |
| 448 | 585 | ||
| 586 | static void __init cmx270_init_display(void) | ||
| 587 | { | ||
| 588 | set_pxa_fb_info(cmx270_display); | ||
| 589 | } | ||
| 590 | #else | ||
| 591 | static inline void cmx270_init_display(void) {} | ||
| 592 | #endif | ||
| 593 | |||
| 449 | /* PXA27x OHCI controller setup */ | 594 | /* PXA27x OHCI controller setup */ |
| 595 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
| 450 | static int cmx270_ohci_init(struct device *dev) | 596 | static int cmx270_ohci_init(struct device *dev) |
| 451 | { | 597 | { |
| 452 | /* Set the Power Control Polarity Low */ | 598 | /* Set the Power Control Polarity Low */ |
| @@ -461,35 +607,37 @@ static struct pxaohci_platform_data cmx270_ohci_platform_data = { | |||
| 461 | .init = cmx270_ohci_init, | 607 | .init = cmx270_ohci_init, |
| 462 | }; | 608 | }; |
| 463 | 609 | ||
| 610 | static void __init cmx270_init_ohci(void) | ||
| 611 | { | ||
| 612 | pxa_set_ohci_info(&cmx270_ohci_platform_data); | ||
| 613 | } | ||
| 614 | #else | ||
| 615 | static inline void cmx270_init_ohci(void) {} | ||
| 616 | #endif | ||
| 464 | 617 | ||
| 618 | #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) | ||
| 465 | static int cmx270_mci_init(struct device *dev, | 619 | static int cmx270_mci_init(struct device *dev, |
| 466 | irq_handler_t cmx270_detect_int, | 620 | irq_handler_t cmx270_detect_int, |
| 467 | void *data) | 621 | void *data) |
| 468 | { | 622 | { |
| 469 | int err; | 623 | int err; |
| 470 | 624 | ||
| 471 | /* | 625 | err = gpio_request(GPIO105_MMC_POWER, "MMC/SD power"); |
| 472 | * setup GPIO for PXA27x MMC controller | 626 | if (err) { |
| 473 | */ | 627 | dev_warn(dev, "power gpio unavailable\n"); |
| 474 | pxa_gpio_mode(GPIO32_MMCCLK_MD); | 628 | return err; |
| 475 | pxa_gpio_mode(GPIO112_MMCCMD_MD); | 629 | } |
| 476 | pxa_gpio_mode(GPIO92_MMCDAT0_MD); | ||
| 477 | pxa_gpio_mode(GPIO109_MMCDAT1_MD); | ||
| 478 | pxa_gpio_mode(GPIO110_MMCDAT2_MD); | ||
| 479 | pxa_gpio_mode(GPIO111_MMCDAT3_MD); | ||
| 480 | |||
| 481 | /* SB-X270 uses GPIO105 as SD power enable */ | ||
| 482 | pxa_gpio_mode(105 | GPIO_OUT); | ||
| 483 | 630 | ||
| 484 | /* card detect IRQ on GPIO 83 */ | 631 | gpio_direction_output(GPIO105_MMC_POWER, 0); |
| 485 | pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ)); | ||
| 486 | 632 | ||
| 487 | err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int, | 633 | err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int, |
| 488 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 634 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
| 489 | "MMC card detect", data); | 635 | "MMC card detect", data); |
| 490 | if (err) | 636 | if (err) { |
| 491 | printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't" | 637 | gpio_free(GPIO105_MMC_POWER); |
| 492 | " request MMC card detect IRQ\n"); | 638 | dev_err(dev, "cmx270_mci_init: MMC/SD: can't" |
| 639 | " request MMC card detect IRQ\n"); | ||
| 640 | } | ||
| 493 | 641 | ||
| 494 | return err; | 642 | return err; |
| 495 | } | 643 | } |
| @@ -499,17 +647,18 @@ static void cmx270_mci_setpower(struct device *dev, unsigned int vdd) | |||
| 499 | struct pxamci_platform_data *p_d = dev->platform_data; | 647 | struct pxamci_platform_data *p_d = dev->platform_data; |
| 500 | 648 | ||
| 501 | if ((1 << vdd) & p_d->ocr_mask) { | 649 | if ((1 << vdd) & p_d->ocr_mask) { |
| 502 | printk(KERN_DEBUG "%s: on\n", __func__); | 650 | dev_dbg(dev, "power on\n"); |
| 503 | GPCR(105) = GPIO_bit(105); | 651 | gpio_set_value(GPIO105_MMC_POWER, 0); |
| 504 | } else { | 652 | } else { |
| 505 | GPSR(105) = GPIO_bit(105); | 653 | gpio_set_value(GPIO105_MMC_POWER, 1); |
| 506 | printk(KERN_DEBUG "%s: off\n", __func__); | 654 | dev_dbg(dev, "power off\n"); |
| 507 | } | 655 | } |
| 508 | } | 656 | } |
| 509 | 657 | ||
| 510 | static void cmx270_mci_exit(struct device *dev, void *data) | 658 | static void cmx270_mci_exit(struct device *dev, void *data) |
| 511 | { | 659 | { |
| 512 | free_irq(CMX270_MMC_IRQ, data); | 660 | free_irq(CMX270_MMC_IRQ, data); |
| 661 | gpio_free(GPIO105_MMC_POWER); | ||
| 513 | } | 662 | } |
| 514 | 663 | ||
| 515 | static struct pxamci_platform_data cmx270_mci_platform_data = { | 664 | static struct pxamci_platform_data cmx270_mci_platform_data = { |
| @@ -519,6 +668,14 @@ static struct pxamci_platform_data cmx270_mci_platform_data = { | |||
| 519 | .exit = cmx270_mci_exit, | 668 | .exit = cmx270_mci_exit, |
| 520 | }; | 669 | }; |
| 521 | 670 | ||
| 671 | static void __init cmx270_init_mmc(void) | ||
| 672 | { | ||
| 673 | pxa_set_mci_info(&cmx270_mci_platform_data); | ||
| 674 | } | ||
| 675 | #else | ||
| 676 | static inline void cmx270_init_mmc(void) {} | ||
| 677 | #endif | ||
| 678 | |||
| 522 | #ifdef CONFIG_PM | 679 | #ifdef CONFIG_PM |
| 523 | static unsigned long sleep_save_msc[10]; | 680 | static unsigned long sleep_save_msc[10]; |
| 524 | 681 | ||
| @@ -580,53 +737,63 @@ static int __init cmx270_pm_init(void) | |||
| 580 | static int __init cmx270_pm_init(void) { return 0; } | 737 | static int __init cmx270_pm_init(void) { return 0; } |
| 581 | #endif | 738 | #endif |
| 582 | 739 | ||
| 583 | static void __init cmx270_init(void) | 740 | #if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE) |
| 741 | static void __init cmx270_init_ac97(void) | ||
| 584 | { | 742 | { |
| 585 | cmx270_pm_init(); | ||
| 586 | |||
| 587 | set_pxa_fb_info(cmx270_display); | ||
| 588 | |||
| 589 | /* register CM-X270 platform devices */ | ||
| 590 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
| 591 | pxa_set_ac97_info(NULL); | 743 | pxa_set_ac97_info(NULL); |
| 744 | } | ||
| 745 | #else | ||
| 746 | static inline void cmx270_init_ac97(void) {} | ||
| 747 | #endif | ||
| 592 | 748 | ||
| 593 | /* set MCI and OHCI platform parameters */ | 749 | static void __init cmx270_init(void) |
| 594 | pxa_set_mci_info(&cmx270_mci_platform_data); | 750 | { |
| 595 | pxa_set_ohci_info(&cmx270_ohci_platform_data); | 751 | cmx270_pm_init(); |
| 596 | |||
| 597 | /* This enables the STUART */ | ||
| 598 | pxa_gpio_mode(GPIO46_STRXD_MD); | ||
| 599 | pxa_gpio_mode(GPIO47_STTXD_MD); | ||
| 600 | 752 | ||
| 601 | /* This enables the BTUART */ | 753 | pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_pin_config)); |
| 602 | pxa_gpio_mode(GPIO42_BTRXD_MD); | 754 | |
| 603 | pxa_gpio_mode(GPIO43_BTTXD_MD); | 755 | cmx270_init_dm9000(); |
| 604 | pxa_gpio_mode(GPIO44_BTCTS_MD); | 756 | cmx270_init_rtc(); |
| 605 | pxa_gpio_mode(GPIO45_BTRTS_MD); | 757 | cmx270_init_display(); |
| 758 | cmx270_init_mmc(); | ||
| 759 | cmx270_init_ohci(); | ||
| 760 | cmx270_init_ac97(); | ||
| 761 | cmx270_init_touchscreen(); | ||
| 762 | cmx270_init_leds(); | ||
| 763 | cmx270_init_2700G(); | ||
| 606 | } | 764 | } |
| 607 | 765 | ||
| 608 | static void __init cmx270_init_irq(void) | 766 | static void __init cmx270_init_irq(void) |
| 609 | { | 767 | { |
| 610 | pxa27x_init_irq(); | 768 | pxa27x_init_irq(); |
| 611 | 769 | ||
| 770 | cmx270_pci_init_irq(GPIO22_IT8152_IRQ); | ||
| 771 | } | ||
| 612 | 772 | ||
| 613 | cmx270_pci_init_irq(); | 773 | #ifdef CONFIG_PCI |
| 774 | /* Map PCI companion statically */ | ||
| 775 | static struct map_desc cmx270_io_desc[] __initdata = { | ||
| 776 | [0] = { /* PCI bridge */ | ||
| 777 | .virtual = CMX270_IT8152_VIRT, | ||
| 778 | .pfn = __phys_to_pfn(PXA_CS4_PHYS), | ||
| 779 | .length = SZ_64M, | ||
| 780 | .type = MT_DEVICE | ||
| 781 | }, | ||
| 782 | }; | ||
| 614 | 783 | ||
| 615 | /* Setup interrupt for dm9000 */ | 784 | static void __init cmx270_map_io(void) |
| 616 | pxa_gpio_mode(IRQ_TO_GPIO(CMX270_ETHIRQ)); | 785 | { |
| 617 | set_irq_type(CMX270_ETHIRQ, IRQT_RISING); | 786 | pxa_map_io(); |
| 787 | iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc)); | ||
| 618 | 788 | ||
| 619 | /* Setup interrupt for 2700G */ | 789 | it8152_base_address = CMX270_IT8152_VIRT; |
| 620 | pxa_gpio_mode(IRQ_TO_GPIO(CMX270_GFXIRQ)); | ||
| 621 | set_irq_type(CMX270_GFXIRQ, IRQT_FALLING); | ||
| 622 | } | 790 | } |
| 623 | 791 | #else | |
| 624 | static void __init cmx270_map_io(void) | 792 | static void __init cmx270_map_io(void) |
| 625 | { | 793 | { |
| 626 | pxa_map_io(); | 794 | pxa_map_io(); |
| 627 | iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc)); | ||
| 628 | } | 795 | } |
| 629 | 796 | #endif | |
| 630 | 797 | ||
| 631 | MACHINE_START(ARMCORE, "Compulab CM-x270") | 798 | MACHINE_START(ARMCORE, "Compulab CM-x270") |
| 632 | .boot_params = 0xa0000100, | 799 | .boot_params = 0xa0000100, |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index b37671b71886..e58504edb140 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
| @@ -465,6 +465,7 @@ static void corgi_irda_transceiver_mode(struct device *dev, int mode) | |||
| 465 | GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); | 465 | GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); |
| 466 | else | 466 | else |
| 467 | GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); | 467 | GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); |
| 468 | pxa2xx_transceiver_mode(dev, mode); | ||
| 468 | } | 469 | } |
| 469 | 470 | ||
| 470 | static struct pxaficp_platform_data corgi_ficp_platform_data = { | 471 | static struct pxaficp_platform_data corgi_ficp_platform_data = { |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index a6f2390ce662..84489dc51d81 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
| @@ -13,8 +13,10 @@ | |||
| 13 | #include <asm/arch/mfp-pxa27x.h> | 13 | #include <asm/arch/mfp-pxa27x.h> |
| 14 | #include <asm/arch/ohci.h> | 14 | #include <asm/arch/ohci.h> |
| 15 | #include <asm/arch/pxa27x_keypad.h> | 15 | #include <asm/arch/pxa27x_keypad.h> |
| 16 | #include <asm/arch/pxa2xx_spi.h> | ||
| 16 | #include <asm/arch/camera.h> | 17 | #include <asm/arch/camera.h> |
| 17 | #include <asm/arch/audio.h> | 18 | #include <asm/arch/audio.h> |
| 19 | #include <asm/arch/pxa3xx_nand.h> | ||
| 18 | 20 | ||
| 19 | #include "devices.h" | 21 | #include "devices.h" |
| 20 | #include "generic.h" | 22 | #include "generic.h" |
| @@ -830,4 +832,63 @@ void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info) | |||
| 830 | pxa_register_device(&pxa3xx_device_mci3, info); | 832 | pxa_register_device(&pxa3xx_device_mci3, info); |
| 831 | } | 833 | } |
| 832 | 834 | ||
| 835 | static struct resource pxa3xx_resources_nand[] = { | ||
| 836 | [0] = { | ||
| 837 | .start = 0x43100000, | ||
| 838 | .end = 0x43100053, | ||
| 839 | .flags = IORESOURCE_MEM, | ||
| 840 | }, | ||
| 841 | [1] = { | ||
| 842 | .start = IRQ_NAND, | ||
| 843 | .end = IRQ_NAND, | ||
| 844 | .flags = IORESOURCE_IRQ, | ||
| 845 | }, | ||
| 846 | [2] = { | ||
| 847 | /* DRCMR for Data DMA */ | ||
| 848 | .start = 97, | ||
| 849 | .end = 97, | ||
| 850 | .flags = IORESOURCE_DMA, | ||
| 851 | }, | ||
| 852 | [3] = { | ||
| 853 | /* DRCMR for Command DMA */ | ||
| 854 | .start = 99, | ||
| 855 | .end = 99, | ||
| 856 | .flags = IORESOURCE_DMA, | ||
| 857 | }, | ||
| 858 | }; | ||
| 859 | |||
| 860 | static u64 pxa3xx_nand_dma_mask = DMA_BIT_MASK(32); | ||
| 861 | |||
| 862 | struct platform_device pxa3xx_device_nand = { | ||
| 863 | .name = "pxa3xx-nand", | ||
| 864 | .id = -1, | ||
| 865 | .dev = { | ||
| 866 | .dma_mask = &pxa3xx_nand_dma_mask, | ||
| 867 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 868 | }, | ||
| 869 | .num_resources = ARRAY_SIZE(pxa3xx_resources_nand), | ||
| 870 | .resource = pxa3xx_resources_nand, | ||
| 871 | }; | ||
| 872 | |||
| 873 | void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info) | ||
| 874 | { | ||
| 875 | pxa_register_device(&pxa3xx_device_nand, info); | ||
| 876 | } | ||
| 833 | #endif /* CONFIG_PXA3xx */ | 877 | #endif /* CONFIG_PXA3xx */ |
| 878 | |||
| 879 | /* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1. | ||
| 880 | * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */ | ||
| 881 | void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info) | ||
| 882 | { | ||
| 883 | struct platform_device *pd; | ||
| 884 | |||
| 885 | pd = platform_device_alloc("pxa2xx-spi", id); | ||
| 886 | if (pd == NULL) { | ||
| 887 | printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n", | ||
| 888 | id); | ||
| 889 | return; | ||
| 890 | } | ||
| 891 | |||
| 892 | pd->dev.platform_data = info; | ||
| 893 | platform_device_add(pd); | ||
| 894 | } | ||
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index b852eb18daa5..887c738f5911 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h | |||
| @@ -31,4 +31,6 @@ extern struct platform_device pxa25x_device_pwm1; | |||
| 31 | extern struct platform_device pxa27x_device_pwm0; | 31 | extern struct platform_device pxa27x_device_pwm0; |
| 32 | extern struct platform_device pxa27x_device_pwm1; | 32 | extern struct platform_device pxa27x_device_pwm1; |
| 33 | 33 | ||
| 34 | extern struct platform_device pxa3xx_device_nand; | ||
| 35 | |||
| 34 | void __init pxa_register_device(struct platform_device *dev, void *data); | 36 | void __init pxa_register_device(struct platform_device *dev, void *data); |
diff --git a/arch/arm/mach-pxa/e400_lcd.c b/arch/arm/mach-pxa/e400_lcd.c new file mode 100644 index 000000000000..16c023630626 --- /dev/null +++ b/arch/arm/mach-pxa/e400_lcd.c | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* | ||
| 2 | * e400_lcd.c | ||
| 3 | * | ||
| 4 | * (c) 2005 Ian Molton <spyro@f2s.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 version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/init.h> | ||
| 14 | #include <linux/module.h> | ||
| 15 | |||
| 16 | #include <asm/mach-types.h> | ||
| 17 | #include <asm/arch/pxa-regs.h> | ||
| 18 | #include <asm/arch/pxafb.h> | ||
| 19 | |||
| 20 | static struct pxafb_mode_info e400_pxafb_mode_info = { | ||
| 21 | .pixclock = 140703, | ||
| 22 | .xres = 240, | ||
| 23 | .yres = 320, | ||
| 24 | .bpp = 16, | ||
| 25 | .hsync_len = 4, | ||
| 26 | .left_margin = 28, | ||
| 27 | .right_margin = 8, | ||
| 28 | .vsync_len = 3, | ||
| 29 | .upper_margin = 5, | ||
| 30 | .lower_margin = 6, | ||
| 31 | .sync = 0, | ||
| 32 | }; | ||
| 33 | |||
| 34 | static struct pxafb_mach_info e400_pxafb_mach_info = { | ||
| 35 | .modes = &e400_pxafb_mode_info, | ||
| 36 | .num_modes = 1, | ||
| 37 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
| 38 | .lccr3 = 0, | ||
| 39 | .pxafb_backlight_power = NULL, | ||
| 40 | }; | ||
| 41 | |||
| 42 | static int __init e400_lcd_init(void) | ||
| 43 | { | ||
| 44 | if (!machine_is_e400()) | ||
| 45 | return -ENODEV; | ||
| 46 | |||
| 47 | set_pxa_fb_info(&e400_pxafb_mach_info); | ||
| 48 | return 0; | ||
| 49 | } | ||
| 50 | |||
| 51 | module_init(e400_lcd_init); | ||
| 52 | |||
| 53 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); | ||
| 54 | MODULE_DESCRIPTION("e400 lcd driver"); | ||
| 55 | MODULE_LICENSE("GPLv2"); | ||
| 56 | |||
diff --git a/arch/arm/mach-pxa/e740_lcd.c b/arch/arm/mach-pxa/e740_lcd.c new file mode 100644 index 000000000000..26bd599af178 --- /dev/null +++ b/arch/arm/mach-pxa/e740_lcd.c | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* e740_lcd.c | ||
| 2 | * | ||
| 3 | * This file contains the definitions for the LCD timings and functions | ||
| 4 | * to control the LCD power / frontlighting via the w100fb driver. | ||
| 5 | * | ||
| 6 | * (c) 2005 Ian Molton <spyro@f2s.com> | ||
| 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 | |||
| 14 | #include <linux/module.h> | ||
| 15 | #include <linux/device.h> | ||
| 16 | #include <linux/fb.h> | ||
| 17 | #include <linux/err.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | |||
| 20 | #include <asm/mach-types.h> | ||
| 21 | |||
| 22 | #include <video/w100fb.h> | ||
| 23 | |||
| 24 | /* | ||
| 25 | **potential** shutdown routine - to be investigated | ||
| 26 | devmem2 0x0c010528 w 0xff3fff00 | ||
| 27 | devmem2 0x0c010190 w 0x7FFF8000 | ||
| 28 | devmem2 0x0c0101b0 w 0x00FF0000 | ||
| 29 | devmem2 0x0c01008c w 0x00000000 | ||
| 30 | devmem2 0x0c010080 w 0x000000bf | ||
| 31 | devmem2 0x0c010098 w 0x00000015 | ||
| 32 | devmem2 0x0c010088 w 0x4b000204 | ||
| 33 | devmem2 0x0c010098 w 0x0000001d | ||
| 34 | */ | ||
| 35 | |||
| 36 | static struct w100_gen_regs e740_lcd_regs = { | ||
| 37 | .lcd_format = 0x00008023, | ||
| 38 | .lcdd_cntl1 = 0x0f000000, | ||
| 39 | .lcdd_cntl2 = 0x0003ffff, | ||
| 40 | .genlcd_cntl1 = 0x00ffff03, | ||
| 41 | .genlcd_cntl2 = 0x003c0f03, | ||
| 42 | .genlcd_cntl3 = 0x000143aa, | ||
| 43 | }; | ||
| 44 | |||
| 45 | static struct w100_mode e740_lcd_mode = { | ||
| 46 | .xres = 240, | ||
| 47 | .yres = 320, | ||
| 48 | .left_margin = 20, | ||
| 49 | .right_margin = 28, | ||
| 50 | .upper_margin = 9, | ||
| 51 | .lower_margin = 8, | ||
| 52 | .crtc_ss = 0x80140013, | ||
| 53 | .crtc_ls = 0x81150110, | ||
| 54 | .crtc_gs = 0x80050005, | ||
| 55 | .crtc_vpos_gs = 0x000a0009, | ||
| 56 | .crtc_rev = 0x0040010a, | ||
| 57 | .crtc_dclk = 0xa906000a, | ||
| 58 | .crtc_gclk = 0x80050108, | ||
| 59 | .crtc_goe = 0x80050108, | ||
| 60 | .pll_freq = 57, | ||
| 61 | .pixclk_divider = 4, | ||
| 62 | .pixclk_divider_rotated = 4, | ||
| 63 | .pixclk_src = CLK_SRC_XTAL, | ||
| 64 | .sysclk_divider = 1, | ||
| 65 | .sysclk_src = CLK_SRC_PLL, | ||
| 66 | .crtc_ps1_active = 0x41060010, | ||
| 67 | }; | ||
| 68 | |||
| 69 | |||
| 70 | static struct w100_gpio_regs e740_w100_gpio_info = { | ||
| 71 | .init_data1 = 0x21002103, | ||
| 72 | .gpio_dir1 = 0xffffdeff, | ||
| 73 | .gpio_oe1 = 0x03c00643, | ||
| 74 | .init_data2 = 0x003f003f, | ||
| 75 | .gpio_dir2 = 0xffffffff, | ||
| 76 | .gpio_oe2 = 0x000000ff, | ||
| 77 | }; | ||
| 78 | |||
| 79 | static struct w100fb_mach_info e740_fb_info = { | ||
| 80 | .modelist = &e740_lcd_mode, | ||
| 81 | .num_modes = 1, | ||
| 82 | .regs = &e740_lcd_regs, | ||
| 83 | .gpio = &e740_w100_gpio_info, | ||
| 84 | .xtal_freq = 14318000, | ||
| 85 | .xtal_dbl = 1, | ||
| 86 | }; | ||
| 87 | |||
| 88 | static struct resource e740_fb_resources[] = { | ||
| 89 | [0] = { | ||
| 90 | .start = 0x0c000000, | ||
| 91 | .end = 0x0cffffff, | ||
| 92 | .flags = IORESOURCE_MEM, | ||
| 93 | }, | ||
| 94 | }; | ||
| 95 | |||
| 96 | /* ----------------------- device declarations -------------------------- */ | ||
| 97 | |||
| 98 | |||
| 99 | static struct platform_device e740_fb_device = { | ||
| 100 | .name = "w100fb", | ||
| 101 | .id = -1, | ||
| 102 | .dev = { | ||
| 103 | .platform_data = &e740_fb_info, | ||
| 104 | }, | ||
| 105 | .num_resources = ARRAY_SIZE(e740_fb_resources), | ||
| 106 | .resource = e740_fb_resources, | ||
| 107 | }; | ||
| 108 | |||
| 109 | static int e740_lcd_init(void) | ||
| 110 | { | ||
| 111 | int ret; | ||
| 112 | |||
| 113 | if (!machine_is_e740()) | ||
| 114 | return -ENODEV; | ||
| 115 | |||
| 116 | return platform_device_register(&e740_fb_device); | ||
| 117 | } | ||
| 118 | |||
| 119 | module_init(e740_lcd_init); | ||
| 120 | |||
| 121 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); | ||
| 122 | MODULE_DESCRIPTION("e740 lcd driver"); | ||
| 123 | MODULE_LICENSE("GPLv2"); | ||
diff --git a/arch/arm/mach-pxa/e750_lcd.c b/arch/arm/mach-pxa/e750_lcd.c new file mode 100644 index 000000000000..75edc3b5390f --- /dev/null +++ b/arch/arm/mach-pxa/e750_lcd.c | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* e750_lcd.c | ||
| 2 | * | ||
| 3 | * This file contains the definitions for the LCD timings and functions | ||
| 4 | * to control the LCD power / frontlighting via the w100fb driver. | ||
| 5 | * | ||
| 6 | * (c) 2005 Ian Molton <spyro@f2s.com> | ||
| 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 | |||
| 14 | #include <linux/module.h> | ||
| 15 | #include <linux/device.h> | ||
| 16 | #include <linux/fb.h> | ||
| 17 | #include <linux/err.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | |||
| 20 | #include <asm/mach-types.h> | ||
| 21 | |||
| 22 | #include <video/w100fb.h> | ||
| 23 | |||
| 24 | static struct w100_gen_regs e750_lcd_regs = { | ||
| 25 | .lcd_format = 0x00008003, | ||
| 26 | .lcdd_cntl1 = 0x00000000, | ||
| 27 | .lcdd_cntl2 = 0x0003ffff, | ||
| 28 | .genlcd_cntl1 = 0x00fff003, | ||
| 29 | .genlcd_cntl2 = 0x003c0f03, | ||
| 30 | .genlcd_cntl3 = 0x000143aa, | ||
| 31 | }; | ||
| 32 | |||
| 33 | static struct w100_mode e750_lcd_mode = { | ||
| 34 | .xres = 240, | ||
| 35 | .yres = 320, | ||
| 36 | .left_margin = 21, | ||
| 37 | .right_margin = 22, | ||
| 38 | .upper_margin = 5, | ||
| 39 | .lower_margin = 4, | ||
| 40 | .crtc_ss = 0x80150014, | ||
| 41 | .crtc_ls = 0x8014000d, | ||
| 42 | .crtc_gs = 0xc1000005, | ||
| 43 | .crtc_vpos_gs = 0x00020147, | ||
| 44 | .crtc_rev = 0x0040010a, | ||
| 45 | .crtc_dclk = 0xa1700030, | ||
| 46 | .crtc_gclk = 0x80cc0015, | ||
| 47 | .crtc_goe = 0x80cc0015, | ||
| 48 | .crtc_ps1_active = 0x61060017, | ||
| 49 | .pll_freq = 57, | ||
| 50 | .pixclk_divider = 4, | ||
| 51 | .pixclk_divider_rotated = 4, | ||
| 52 | .pixclk_src = CLK_SRC_XTAL, | ||
| 53 | .sysclk_divider = 1, | ||
| 54 | .sysclk_src = CLK_SRC_PLL, | ||
| 55 | }; | ||
| 56 | |||
| 57 | |||
| 58 | static struct w100_gpio_regs e750_w100_gpio_info = { | ||
| 59 | .init_data1 = 0x01192f1b, | ||
| 60 | .gpio_dir1 = 0xd5ffdeff, | ||
| 61 | .gpio_oe1 = 0x000020bf, | ||
| 62 | .init_data2 = 0x010f010f, | ||
| 63 | .gpio_dir2 = 0xffffffff, | ||
| 64 | .gpio_oe2 = 0x000001cf, | ||
| 65 | }; | ||
| 66 | |||
| 67 | static struct w100fb_mach_info e750_fb_info = { | ||
| 68 | .modelist = &e750_lcd_mode, | ||
| 69 | .num_modes = 1, | ||
| 70 | .regs = &e750_lcd_regs, | ||
| 71 | .gpio = &e750_w100_gpio_info, | ||
| 72 | .xtal_freq = 14318000, | ||
| 73 | .xtal_dbl = 1, | ||
| 74 | }; | ||
| 75 | |||
| 76 | static struct resource e750_fb_resources[] = { | ||
| 77 | [0] = { | ||
| 78 | .start = 0x0c000000, | ||
| 79 | .end = 0x0cffffff, | ||
| 80 | .flags = IORESOURCE_MEM, | ||
| 81 | }, | ||
| 82 | }; | ||
| 83 | |||
| 84 | /* ----------------------- device declarations -------------------------- */ | ||
| 85 | |||
| 86 | |||
| 87 | static struct platform_device e750_fb_device = { | ||
| 88 | .name = "w100fb", | ||
| 89 | .id = -1, | ||
| 90 | .dev = { | ||
| 91 | .platform_data = &e750_fb_info, | ||
| 92 | }, | ||
| 93 | .num_resources = ARRAY_SIZE(e750_fb_resources), | ||
| 94 | .resource = e750_fb_resources, | ||
| 95 | }; | ||
| 96 | |||
| 97 | static int e750_lcd_init(void) | ||
| 98 | { | ||
| 99 | if (!machine_is_e750()) | ||
| 100 | return -ENODEV; | ||
| 101 | |||
| 102 | return platform_device_register(&e750_fb_device); | ||
| 103 | } | ||
| 104 | |||
| 105 | module_init(e750_lcd_init); | ||
| 106 | |||
| 107 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); | ||
| 108 | MODULE_DESCRIPTION("e750 lcd driver"); | ||
| 109 | MODULE_LICENSE("GPLv2"); | ||
diff --git a/arch/arm/mach-pxa/e800_lcd.c b/arch/arm/mach-pxa/e800_lcd.c new file mode 100644 index 000000000000..e6aeab0ebc22 --- /dev/null +++ b/arch/arm/mach-pxa/e800_lcd.c | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | /* e800_lcd.c | ||
| 2 | * | ||
| 3 | * This file contains the definitions for the LCD timings and functions | ||
| 4 | * to control the LCD power / frontlighting via the w100fb driver. | ||
| 5 | * | ||
| 6 | * (c) 2005 Ian Molton <spyro@f2s.com> | ||
| 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 | |||
| 14 | #include <linux/module.h> | ||
| 15 | #include <linux/device.h> | ||
| 16 | #include <linux/fb.h> | ||
| 17 | #include <linux/err.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | |||
| 20 | #include <asm/mach-types.h> | ||
| 21 | |||
| 22 | #include <video/w100fb.h> | ||
| 23 | |||
| 24 | static struct w100_gen_regs e800_lcd_regs = { | ||
| 25 | .lcd_format = 0x00008003, | ||
| 26 | .lcdd_cntl1 = 0x02a00000, | ||
| 27 | .lcdd_cntl2 = 0x0003ffff, | ||
| 28 | .genlcd_cntl1 = 0x000ff2a3, | ||
| 29 | .genlcd_cntl2 = 0x000002a3, | ||
| 30 | .genlcd_cntl3 = 0x000102aa, | ||
| 31 | }; | ||
| 32 | |||
| 33 | static struct w100_mode e800_lcd_mode[2] = { | ||
| 34 | [0] = { | ||
| 35 | .xres = 480, | ||
| 36 | .yres = 640, | ||
| 37 | .left_margin = 52, | ||
| 38 | .right_margin = 148, | ||
| 39 | .upper_margin = 2, | ||
| 40 | .lower_margin = 6, | ||
| 41 | .crtc_ss = 0x80350034, | ||
| 42 | .crtc_ls = 0x802b0026, | ||
| 43 | .crtc_gs = 0x80160016, | ||
| 44 | .crtc_vpos_gs = 0x00020003, | ||
| 45 | .crtc_rev = 0x0040001d, | ||
| 46 | .crtc_dclk = 0xe0000000, | ||
| 47 | .crtc_gclk = 0x82a50049, | ||
| 48 | .crtc_goe = 0x80ee001c, | ||
| 49 | .crtc_ps1_active = 0x00000000, | ||
| 50 | .pll_freq = 128, | ||
| 51 | .pixclk_divider = 4, | ||
| 52 | .pixclk_divider_rotated = 6, | ||
| 53 | .pixclk_src = CLK_SRC_PLL, | ||
| 54 | .sysclk_divider = 0, | ||
| 55 | .sysclk_src = CLK_SRC_PLL, | ||
| 56 | }, | ||
| 57 | [1] = { | ||
| 58 | .xres = 240, | ||
| 59 | .yres = 320, | ||
| 60 | .left_margin = 15, | ||
| 61 | .right_margin = 88, | ||
| 62 | .upper_margin = 0, | ||
| 63 | .lower_margin = 7, | ||
| 64 | .crtc_ss = 0xd010000f, | ||
| 65 | .crtc_ls = 0x80070003, | ||
| 66 | .crtc_gs = 0x80000000, | ||
| 67 | .crtc_vpos_gs = 0x01460147, | ||
| 68 | .crtc_rev = 0x00400003, | ||
| 69 | .crtc_dclk = 0xa1700030, | ||
| 70 | .crtc_gclk = 0x814b0008, | ||
| 71 | .crtc_goe = 0x80cc0015, | ||
| 72 | .crtc_ps1_active = 0x00000000, | ||
| 73 | .pll_freq = 100, | ||
| 74 | .pixclk_divider = 6, /* Wince uses 14 which gives a 7MHz pclk. */ | ||
| 75 | .pixclk_divider_rotated = 6, /* we want a 14MHz one (much nicer to look at) */ | ||
| 76 | .pixclk_src = CLK_SRC_PLL, | ||
| 77 | .sysclk_divider = 0, | ||
| 78 | .sysclk_src = CLK_SRC_PLL, | ||
| 79 | } | ||
| 80 | }; | ||
| 81 | |||
| 82 | |||
| 83 | static struct w100_gpio_regs e800_w100_gpio_info = { | ||
| 84 | .init_data1 = 0xc13fc019, | ||
| 85 | .gpio_dir1 = 0x3e40df7f, | ||
| 86 | .gpio_oe1 = 0x003c3000, | ||
| 87 | .init_data2 = 0x00000000, | ||
| 88 | .gpio_dir2 = 0x00000000, | ||
| 89 | .gpio_oe2 = 0x00000000, | ||
| 90 | }; | ||
| 91 | |||
| 92 | static struct w100_mem_info e800_w100_mem_info = { | ||
| 93 | .ext_cntl = 0x09640011, | ||
| 94 | .sdram_mode_reg = 0x00600021, | ||
| 95 | .ext_timing_cntl = 0x10001545, | ||
| 96 | .io_cntl = 0x7ddd7333, | ||
| 97 | .size = 0x1fffff, | ||
| 98 | }; | ||
| 99 | |||
| 100 | static void e800_tg_change(struct w100fb_par *par) | ||
| 101 | { | ||
| 102 | unsigned long tmp; | ||
| 103 | |||
| 104 | tmp = w100fb_gpio_read(W100_GPIO_PORT_A); | ||
| 105 | if (par->mode->xres == 480) | ||
| 106 | tmp |= 0x100; | ||
| 107 | else | ||
| 108 | tmp &= ~0x100; | ||
| 109 | w100fb_gpio_write(W100_GPIO_PORT_A, tmp); | ||
| 110 | } | ||
| 111 | |||
| 112 | static struct w100_tg_info e800_tg_info = { | ||
| 113 | .change = e800_tg_change, | ||
| 114 | }; | ||
| 115 | |||
| 116 | static struct w100fb_mach_info e800_fb_info = { | ||
| 117 | .modelist = e800_lcd_mode, | ||
| 118 | .num_modes = 2, | ||
| 119 | .regs = &e800_lcd_regs, | ||
| 120 | .gpio = &e800_w100_gpio_info, | ||
| 121 | .mem = &e800_w100_mem_info, | ||
| 122 | .tg = &e800_tg_info, | ||
| 123 | .xtal_freq = 16000000, | ||
| 124 | }; | ||
| 125 | |||
| 126 | static struct resource e800_fb_resources[] = { | ||
| 127 | [0] = { | ||
| 128 | .start = 0x0c000000, | ||
| 129 | .end = 0x0cffffff, | ||
| 130 | .flags = IORESOURCE_MEM, | ||
| 131 | }, | ||
| 132 | }; | ||
| 133 | |||
| 134 | /* ----------------------- device declarations -------------------------- */ | ||
| 135 | |||
| 136 | |||
| 137 | static struct platform_device e800_fb_device = { | ||
| 138 | .name = "w100fb", | ||
| 139 | .id = -1, | ||
| 140 | .dev = { | ||
| 141 | .platform_data = &e800_fb_info, | ||
| 142 | }, | ||
| 143 | .num_resources = ARRAY_SIZE(e800_fb_resources), | ||
| 144 | .resource = e800_fb_resources, | ||
| 145 | }; | ||
| 146 | |||
| 147 | static int e800_lcd_init(void) | ||
| 148 | { | ||
| 149 | if (!machine_is_e800()) | ||
| 150 | return -ENODEV; | ||
| 151 | |||
| 152 | return platform_device_register(&e800_fb_device); | ||
| 153 | } | ||
| 154 | |||
| 155 | module_init(e800_lcd_init); | ||
| 156 | |||
| 157 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); | ||
| 158 | MODULE_DESCRIPTION("e800 lcd driver"); | ||
| 159 | MODULE_LICENSE("GPLv2"); | ||
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 1bf680749928..e5cc6ca63c75 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Support for CompuLab EM-x270 platform | 2 | * Support for CompuLab EM-X270 platform |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 CompuLab, Ltd. | 4 | * Copyright (C) 2007, 2008 CompuLab, Ltd. |
| 5 | * Author: Mike Rapoport <mike@compulab.co.il> | 5 | * Author: Mike Rapoport <mike@compulab.co.il> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
| @@ -14,31 +14,159 @@ | |||
| 14 | 14 | ||
| 15 | #include <linux/dm9000.h> | 15 | #include <linux/dm9000.h> |
| 16 | #include <linux/rtc-v3020.h> | 16 | #include <linux/rtc-v3020.h> |
| 17 | |||
| 18 | #include <linux/mtd/nand.h> | 17 | #include <linux/mtd/nand.h> |
| 19 | #include <linux/mtd/partitions.h> | 18 | #include <linux/mtd/partitions.h> |
| 19 | #include <linux/input.h> | ||
| 20 | #include <linux/gpio_keys.h> | ||
| 21 | #include <linux/gpio.h> | ||
| 20 | 22 | ||
| 21 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
| 22 | |||
| 23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
| 24 | 25 | ||
| 26 | #include <asm/arch/mfp-pxa27x.h> | ||
| 25 | #include <asm/arch/pxa-regs.h> | 27 | #include <asm/arch/pxa-regs.h> |
| 26 | #include <asm/arch/pxa2xx-gpio.h> | ||
| 27 | #include <asm/arch/pxa27x-udc.h> | 28 | #include <asm/arch/pxa27x-udc.h> |
| 28 | #include <asm/arch/audio.h> | 29 | #include <asm/arch/audio.h> |
| 29 | #include <asm/arch/pxafb.h> | 30 | #include <asm/arch/pxafb.h> |
| 30 | #include <asm/arch/ohci.h> | 31 | #include <asm/arch/ohci.h> |
| 31 | #include <asm/arch/mmc.h> | 32 | #include <asm/arch/mmc.h> |
| 32 | #include <asm/arch/bitfield.h> | 33 | #include <asm/arch/pxa27x_keypad.h> |
| 33 | 34 | ||
| 34 | #include "generic.h" | 35 | #include "generic.h" |
| 35 | 36 | ||
| 36 | /* GPIO IRQ usage */ | 37 | /* GPIO IRQ usage */ |
| 37 | #define EM_X270_MMC_PD (105) | 38 | #define GPIO41_ETHIRQ (41) |
| 38 | #define EM_X270_ETHIRQ IRQ_GPIO(41) | 39 | #define GPIO13_MMC_CD (13) |
| 39 | #define EM_X270_MMC_IRQ IRQ_GPIO(13) | 40 | #define EM_X270_ETHIRQ IRQ_GPIO(GPIO41_ETHIRQ) |
| 41 | #define EM_X270_MMC_CD IRQ_GPIO(GPIO13_MMC_CD) | ||
| 42 | |||
| 43 | /* NAND control GPIOs */ | ||
| 44 | #define GPIO11_NAND_CS (11) | ||
| 45 | #define GPIO56_NAND_RB (56) | ||
| 46 | |||
| 47 | static unsigned long em_x270_pin_config[] = { | ||
| 48 | /* AC'97 */ | ||
| 49 | GPIO28_AC97_BITCLK, | ||
| 50 | GPIO29_AC97_SDATA_IN_0, | ||
| 51 | GPIO30_AC97_SDATA_OUT, | ||
| 52 | GPIO31_AC97_SYNC, | ||
| 53 | GPIO98_AC97_SYSCLK, | ||
| 54 | GPIO113_AC97_nRESET, | ||
| 55 | |||
| 56 | /* BTUART */ | ||
| 57 | GPIO42_BTUART_RXD, | ||
| 58 | GPIO43_BTUART_TXD, | ||
| 59 | GPIO44_BTUART_CTS, | ||
| 60 | GPIO45_BTUART_RTS, | ||
| 61 | |||
| 62 | /* STUART */ | ||
| 63 | GPIO46_STUART_RXD, | ||
| 64 | GPIO47_STUART_TXD, | ||
| 65 | |||
| 66 | /* MCI controller */ | ||
| 67 | GPIO32_MMC_CLK, | ||
| 68 | GPIO112_MMC_CMD, | ||
| 69 | GPIO92_MMC_DAT_0, | ||
| 70 | GPIO109_MMC_DAT_1, | ||
| 71 | GPIO110_MMC_DAT_2, | ||
| 72 | GPIO111_MMC_DAT_3, | ||
| 73 | |||
| 74 | /* LCD */ | ||
| 75 | GPIO58_LCD_LDD_0, | ||
| 76 | GPIO59_LCD_LDD_1, | ||
| 77 | GPIO60_LCD_LDD_2, | ||
| 78 | GPIO61_LCD_LDD_3, | ||
| 79 | GPIO62_LCD_LDD_4, | ||
| 80 | GPIO63_LCD_LDD_5, | ||
| 81 | GPIO64_LCD_LDD_6, | ||
| 82 | GPIO65_LCD_LDD_7, | ||
| 83 | GPIO66_LCD_LDD_8, | ||
| 84 | GPIO67_LCD_LDD_9, | ||
| 85 | GPIO68_LCD_LDD_10, | ||
| 86 | GPIO69_LCD_LDD_11, | ||
| 87 | GPIO70_LCD_LDD_12, | ||
| 88 | GPIO71_LCD_LDD_13, | ||
| 89 | GPIO72_LCD_LDD_14, | ||
| 90 | GPIO73_LCD_LDD_15, | ||
| 91 | GPIO74_LCD_FCLK, | ||
| 92 | GPIO75_LCD_LCLK, | ||
| 93 | GPIO76_LCD_PCLK, | ||
| 94 | GPIO77_LCD_BIAS, | ||
| 95 | |||
| 96 | /* QCI */ | ||
| 97 | GPIO84_CIF_FV, | ||
| 98 | GPIO25_CIF_LV, | ||
| 99 | GPIO53_CIF_MCLK, | ||
| 100 | GPIO54_CIF_PCLK, | ||
| 101 | GPIO81_CIF_DD_0, | ||
| 102 | GPIO55_CIF_DD_1, | ||
| 103 | GPIO51_CIF_DD_2, | ||
| 104 | GPIO50_CIF_DD_3, | ||
| 105 | GPIO52_CIF_DD_4, | ||
| 106 | GPIO48_CIF_DD_5, | ||
| 107 | GPIO17_CIF_DD_6, | ||
| 108 | GPIO12_CIF_DD_7, | ||
| 109 | |||
| 110 | /* I2C */ | ||
| 111 | GPIO117_I2C_SCL, | ||
| 112 | GPIO118_I2C_SDA, | ||
| 113 | |||
| 114 | /* Keypad */ | ||
| 115 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
| 116 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
| 117 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
| 118 | GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
| 119 | GPIO39_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
| 120 | GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, | ||
| 121 | GPIO91_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH, | ||
| 122 | GPIO36_KP_MKIN_7 | WAKEUP_ON_LEVEL_HIGH, | ||
| 123 | GPIO103_KP_MKOUT_0, | ||
| 124 | GPIO104_KP_MKOUT_1, | ||
| 125 | GPIO105_KP_MKOUT_2, | ||
| 126 | GPIO106_KP_MKOUT_3, | ||
| 127 | GPIO107_KP_MKOUT_4, | ||
| 128 | GPIO108_KP_MKOUT_5, | ||
| 129 | GPIO96_KP_MKOUT_6, | ||
| 130 | GPIO22_KP_MKOUT_7, | ||
| 131 | |||
| 132 | /* SSP1 */ | ||
| 133 | GPIO26_SSP1_RXD, | ||
| 134 | GPIO23_SSP1_SCLK, | ||
| 135 | GPIO24_SSP1_SFRM, | ||
| 136 | GPIO57_SSP1_TXD, | ||
| 137 | |||
| 138 | /* SSP2 */ | ||
| 139 | GPIO19_SSP2_SCLK, | ||
| 140 | GPIO14_SSP2_SFRM, | ||
| 141 | GPIO89_SSP2_TXD, | ||
| 142 | GPIO88_SSP2_RXD, | ||
| 143 | |||
| 144 | /* SDRAM and local bus */ | ||
| 145 | GPIO15_nCS_1, | ||
| 146 | GPIO78_nCS_2, | ||
| 147 | GPIO79_nCS_3, | ||
| 148 | GPIO80_nCS_4, | ||
| 149 | GPIO49_nPWE, | ||
| 150 | GPIO18_RDY, | ||
| 151 | |||
| 152 | /* GPIO */ | ||
| 153 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | ||
| 154 | |||
| 155 | /* power controls */ | ||
| 156 | GPIO20_GPIO | MFP_LPM_DRIVE_LOW, /* GPRS_PWEN */ | ||
| 157 | GPIO115_GPIO | MFP_LPM_DRIVE_LOW, /* WLAN_PWEN */ | ||
| 158 | |||
| 159 | /* NAND controls */ | ||
| 160 | GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */ | ||
| 161 | GPIO56_GPIO, /* NAND Ready/Busy */ | ||
| 162 | |||
| 163 | /* interrupts */ | ||
| 164 | GPIO13_GPIO, /* MMC card detect */ | ||
| 165 | GPIO41_GPIO, /* DM9000 interrupt */ | ||
| 166 | }; | ||
| 40 | 167 | ||
| 41 | static struct resource em_x270_dm9k_resource[] = { | 168 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) |
| 169 | static struct resource em_x270_dm9000_resource[] = { | ||
| 42 | [0] = { | 170 | [0] = { |
| 43 | .start = PXA_CS2_PHYS, | 171 | .start = PXA_CS2_PHYS, |
| 44 | .end = PXA_CS2_PHYS + 3, | 172 | .end = PXA_CS2_PHYS + 3, |
| @@ -56,32 +184,30 @@ static struct resource em_x270_dm9k_resource[] = { | |||
| 56 | } | 184 | } |
| 57 | }; | 185 | }; |
| 58 | 186 | ||
| 59 | /* for the moment we limit ourselves to 32bit IO until some | 187 | static struct dm9000_plat_data em_x270_dm9000_platdata = { |
| 60 | * better IO routines can be written and tested | ||
| 61 | */ | ||
| 62 | static struct dm9000_plat_data em_x270_dm9k_platdata = { | ||
| 63 | .flags = DM9000_PLATF_32BITONLY, | 188 | .flags = DM9000_PLATF_32BITONLY, |
| 64 | }; | 189 | }; |
| 65 | 190 | ||
| 66 | /* Ethernet device */ | 191 | static struct platform_device em_x270_dm9000 = { |
| 67 | static struct platform_device em_x270_dm9k = { | ||
| 68 | .name = "dm9000", | 192 | .name = "dm9000", |
| 69 | .id = 0, | 193 | .id = 0, |
| 70 | .num_resources = ARRAY_SIZE(em_x270_dm9k_resource), | 194 | .num_resources = ARRAY_SIZE(em_x270_dm9000_resource), |
| 71 | .resource = em_x270_dm9k_resource, | 195 | .resource = em_x270_dm9000_resource, |
| 72 | .dev = { | 196 | .dev = { |
| 73 | .platform_data = &em_x270_dm9k_platdata, | 197 | .platform_data = &em_x270_dm9000_platdata, |
| 74 | } | 198 | } |
| 75 | }; | 199 | }; |
| 76 | 200 | ||
| 77 | /* WM9712 touchscreen controller. Hopefully the driver will make it to | 201 | static void __init em_x270_init_dm9000(void) |
| 78 | * the mainstream sometime */ | 202 | { |
| 79 | static struct platform_device em_x270_ts = { | 203 | platform_device_register(&em_x270_dm9000); |
| 80 | .name = "wm97xx-ts", | 204 | } |
| 81 | .id = -1, | 205 | #else |
| 82 | }; | 206 | static inline void em_x270_init_dm9000(void) {} |
| 207 | #endif | ||
| 83 | 208 | ||
| 84 | /* RTC */ | 209 | /* V3020 RTC */ |
| 210 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) | ||
| 85 | static struct resource em_x270_v3020_resource[] = { | 211 | static struct resource em_x270_v3020_resource[] = { |
| 86 | [0] = { | 212 | [0] = { |
| 87 | .start = PXA_CS4_PHYS, | 213 | .start = PXA_CS4_PHYS, |
| @@ -104,20 +230,26 @@ static struct platform_device em_x270_rtc = { | |||
| 104 | } | 230 | } |
| 105 | }; | 231 | }; |
| 106 | 232 | ||
| 107 | /* NAND flash */ | 233 | static void __init em_x270_init_rtc(void) |
| 108 | #define GPIO_NAND_CS (11) | 234 | { |
| 109 | #define GPIO_NAND_RB (56) | 235 | platform_device_register(&em_x270_rtc); |
| 236 | } | ||
| 237 | #else | ||
| 238 | static inline void em_x270_init_rtc(void) {} | ||
| 239 | #endif | ||
| 110 | 240 | ||
| 241 | /* NAND flash */ | ||
| 242 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) | ||
| 111 | static inline void nand_cs_on(void) | 243 | static inline void nand_cs_on(void) |
| 112 | { | 244 | { |
| 113 | GPCR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS); | 245 | gpio_set_value(GPIO11_NAND_CS, 0); |
| 114 | } | 246 | } |
| 115 | 247 | ||
| 116 | static void nand_cs_off(void) | 248 | static void nand_cs_off(void) |
| 117 | { | 249 | { |
| 118 | dsb(); | 250 | dsb(); |
| 119 | 251 | ||
| 120 | GPSR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS); | 252 | gpio_set_value(GPIO11_NAND_CS, 1); |
| 121 | } | 253 | } |
| 122 | 254 | ||
| 123 | /* hardware specific access to control-lines */ | 255 | /* hardware specific access to control-lines */ |
| @@ -157,7 +289,7 @@ static int em_x270_nand_device_ready(struct mtd_info *mtd) | |||
| 157 | { | 289 | { |
| 158 | dsb(); | 290 | dsb(); |
| 159 | 291 | ||
| 160 | return GPLR(GPIO_NAND_RB) & GPIO_bit(GPIO_NAND_RB); | 292 | return gpio_get_value(GPIO56_NAND_RB); |
| 161 | } | 293 | } |
| 162 | 294 | ||
| 163 | static struct mtd_partition em_x270_partition_info[] = { | 295 | static struct mtd_partition em_x270_partition_info[] = { |
| @@ -210,16 +342,35 @@ static struct platform_device em_x270_nand = { | |||
| 210 | } | 342 | } |
| 211 | }; | 343 | }; |
| 212 | 344 | ||
| 213 | /* platform devices */ | 345 | static void __init em_x270_init_nand(void) |
| 214 | static struct platform_device *platform_devices[] __initdata = { | 346 | { |
| 215 | &em_x270_dm9k, | 347 | int err; |
| 216 | &em_x270_ts, | ||
| 217 | &em_x270_rtc, | ||
| 218 | &em_x270_nand, | ||
| 219 | }; | ||
| 220 | 348 | ||
| 349 | err = gpio_request(GPIO11_NAND_CS, "NAND CS"); | ||
| 350 | if (err) { | ||
| 351 | pr_warning("EM-X270: failed to request NAND CS gpio\n"); | ||
| 352 | return; | ||
| 353 | } | ||
| 354 | |||
| 355 | gpio_direction_output(GPIO11_NAND_CS, 1); | ||
| 356 | |||
| 357 | err = gpio_request(GPIO56_NAND_RB, "NAND R/B"); | ||
| 358 | if (err) { | ||
| 359 | pr_warning("EM-X270: failed to request NAND R/B gpio\n"); | ||
| 360 | gpio_free(GPIO11_NAND_CS); | ||
| 361 | return; | ||
| 362 | } | ||
| 363 | |||
| 364 | gpio_direction_input(GPIO56_NAND_RB); | ||
| 365 | |||
| 366 | platform_device_register(&em_x270_nand); | ||
| 367 | } | ||
| 368 | #else | ||
| 369 | static inline void em_x270_init_nand(void) {} | ||
| 370 | #endif | ||
| 221 | 371 | ||
| 222 | /* PXA27x OHCI controller setup */ | 372 | /* PXA27x OHCI controller setup */ |
| 373 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
| 223 | static int em_x270_ohci_init(struct device *dev) | 374 | static int em_x270_ohci_init(struct device *dev) |
| 224 | { | 375 | { |
| 225 | /* Set the Power Control Polarity Low */ | 376 | /* Set the Power Control Polarity Low */ |
| @@ -237,27 +388,23 @@ static struct pxaohci_platform_data em_x270_ohci_platform_data = { | |||
| 237 | .init = em_x270_ohci_init, | 388 | .init = em_x270_ohci_init, |
| 238 | }; | 389 | }; |
| 239 | 390 | ||
| 391 | static void __init em_x270_init_ohci(void) | ||
| 392 | { | ||
| 393 | pxa_set_ohci_info(&em_x270_ohci_platform_data); | ||
| 394 | } | ||
| 395 | #else | ||
| 396 | static inline void em_x270_init_ohci(void) {} | ||
| 397 | #endif | ||
| 240 | 398 | ||
| 399 | /* MCI controller setup */ | ||
| 400 | #if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE) | ||
| 241 | static int em_x270_mci_init(struct device *dev, | 401 | static int em_x270_mci_init(struct device *dev, |
| 242 | irq_handler_t em_x270_detect_int, | 402 | irq_handler_t em_x270_detect_int, |
| 243 | void *data) | 403 | void *data) |
| 244 | { | 404 | { |
| 245 | int err; | 405 | int err = request_irq(EM_X270_MMC_CD, em_x270_detect_int, |
| 246 | 406 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | |
| 247 | /* setup GPIO for PXA27x MMC controller */ | 407 | "MMC card detect", data); |
| 248 | pxa_gpio_mode(GPIO32_MMCCLK_MD); | ||
| 249 | pxa_gpio_mode(GPIO112_MMCCMD_MD); | ||
| 250 | pxa_gpio_mode(GPIO92_MMCDAT0_MD); | ||
| 251 | pxa_gpio_mode(GPIO109_MMCDAT1_MD); | ||
| 252 | pxa_gpio_mode(GPIO110_MMCDAT2_MD); | ||
| 253 | pxa_gpio_mode(GPIO111_MMCDAT3_MD); | ||
| 254 | |||
| 255 | /* EM-X270 uses GPIO13 as SD power enable */ | ||
| 256 | pxa_gpio_mode(EM_X270_MMC_PD | GPIO_OUT); | ||
| 257 | |||
| 258 | err = request_irq(EM_X270_MMC_IRQ, em_x270_detect_int, | ||
| 259 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | ||
| 260 | "MMC card detect", data); | ||
| 261 | if (err) { | 408 | if (err) { |
| 262 | printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n", | 409 | printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n", |
| 263 | __func__, err); | 410 | __func__, err); |
| @@ -279,7 +426,8 @@ static void em_x270_mci_setpower(struct device *dev, unsigned int vdd) | |||
| 279 | 426 | ||
| 280 | static void em_x270_mci_exit(struct device *dev, void *data) | 427 | static void em_x270_mci_exit(struct device *dev, void *data) |
| 281 | { | 428 | { |
| 282 | free_irq(EM_X270_MMC_IRQ, data); | 429 | int irq = gpio_to_irq(GPIO13_MMC_CD); |
| 430 | free_irq(irq, data); | ||
| 283 | } | 431 | } |
| 284 | 432 | ||
| 285 | static struct pxamci_platform_data em_x270_mci_platform_data = { | 433 | static struct pxamci_platform_data em_x270_mci_platform_data = { |
| @@ -289,7 +437,16 @@ static struct pxamci_platform_data em_x270_mci_platform_data = { | |||
| 289 | .exit = em_x270_mci_exit, | 437 | .exit = em_x270_mci_exit, |
| 290 | }; | 438 | }; |
| 291 | 439 | ||
| 440 | static void __init em_x270_init_mmc(void) | ||
| 441 | { | ||
| 442 | pxa_set_mci_info(&em_x270_mci_platform_data); | ||
| 443 | } | ||
| 444 | #else | ||
| 445 | static inline void em_x270_init_mmc(void) {} | ||
| 446 | #endif | ||
| 447 | |||
| 292 | /* LCD 480x640 */ | 448 | /* LCD 480x640 */ |
| 449 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | ||
| 293 | static struct pxafb_mode_info em_x270_lcd_mode = { | 450 | static struct pxafb_mode_info em_x270_lcd_mode = { |
| 294 | .pixclock = 50000, | 451 | .pixclock = 50000, |
| 295 | .bpp = 16, | 452 | .bpp = 16, |
| @@ -307,40 +464,96 @@ static struct pxafb_mode_info em_x270_lcd_mode = { | |||
| 307 | static struct pxafb_mach_info em_x270_lcd = { | 464 | static struct pxafb_mach_info em_x270_lcd = { |
| 308 | .modes = &em_x270_lcd_mode, | 465 | .modes = &em_x270_lcd_mode, |
| 309 | .num_modes = 1, | 466 | .num_modes = 1, |
| 310 | .cmap_inverse = 0, | 467 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
| 311 | .cmap_static = 0, | ||
| 312 | .lccr0 = LCCR0_PAS, | ||
| 313 | .lccr3 = LCCR3_PixClkDiv(0x01) | LCCR3_Acb(0xff), | ||
| 314 | }; | 468 | }; |
| 315 | 469 | static void __init em_x270_init_lcd(void) | |
| 316 | static void __init em_x270_init(void) | ||
| 317 | { | 470 | { |
| 318 | /* setup LCD */ | ||
| 319 | set_pxa_fb_info(&em_x270_lcd); | 471 | set_pxa_fb_info(&em_x270_lcd); |
| 472 | } | ||
| 473 | #else | ||
| 474 | static inline void em_x270_init_lcd(void) {} | ||
| 475 | #endif | ||
| 320 | 476 | ||
| 321 | /* register EM-X270 platform devices */ | 477 | #if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE) |
| 322 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 478 | static void __init em_x270_init_ac97(void) |
| 479 | { | ||
| 323 | pxa_set_ac97_info(NULL); | 480 | pxa_set_ac97_info(NULL); |
| 481 | } | ||
| 482 | #else | ||
| 483 | static inline void em_x270_init_ac97(void) {} | ||
| 484 | #endif | ||
| 485 | |||
| 486 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) | ||
| 487 | static unsigned int em_x270_matrix_keys[] = { | ||
| 488 | KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B), | ||
| 489 | KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT), | ||
| 490 | KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D), | ||
| 491 | }; | ||
| 324 | 492 | ||
| 325 | /* set MCI and OHCI platform parameters */ | 493 | struct pxa27x_keypad_platform_data em_x270_keypad_info = { |
| 326 | pxa_set_mci_info(&em_x270_mci_platform_data); | 494 | /* code map for the matrix keys */ |
| 327 | pxa_set_ohci_info(&em_x270_ohci_platform_data); | 495 | .matrix_key_rows = 3, |
| 496 | .matrix_key_cols = 3, | ||
| 497 | .matrix_key_map = em_x270_matrix_keys, | ||
| 498 | .matrix_key_map_size = ARRAY_SIZE(em_x270_matrix_keys), | ||
| 499 | }; | ||
| 500 | |||
| 501 | static void __init em_x270_init_keypad(void) | ||
| 502 | { | ||
| 503 | pxa_set_keypad_info(&em_x270_keypad_info); | ||
| 504 | } | ||
| 505 | #else | ||
| 506 | static inline void em_x270_init_keypad(void) {} | ||
| 507 | #endif | ||
| 328 | 508 | ||
| 329 | /* setup STUART GPIOs */ | 509 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
| 330 | pxa_gpio_mode(GPIO46_STRXD_MD); | 510 | static struct gpio_keys_button gpio_keys_button[] = { |
| 331 | pxa_gpio_mode(GPIO47_STTXD_MD); | 511 | [0] = { |
| 512 | .desc = "sleep/wakeup", | ||
| 513 | .code = KEY_SUSPEND, | ||
| 514 | .type = EV_PWR, | ||
| 515 | .gpio = 1, | ||
| 516 | .wakeup = 1, | ||
| 517 | }, | ||
| 518 | }; | ||
| 332 | 519 | ||
| 333 | /* setup BTUART GPIOs */ | 520 | static struct gpio_keys_platform_data em_x270_gpio_keys_data = { |
| 334 | pxa_gpio_mode(GPIO42_BTRXD_MD); | 521 | .buttons = gpio_keys_button, |
| 335 | pxa_gpio_mode(GPIO43_BTTXD_MD); | 522 | .nbuttons = 1, |
| 336 | pxa_gpio_mode(GPIO44_BTCTS_MD); | 523 | }; |
| 337 | pxa_gpio_mode(GPIO45_BTRTS_MD); | ||
| 338 | 524 | ||
| 339 | /* Setup interrupt for dm9000 */ | 525 | static struct platform_device em_x270_gpio_keys = { |
| 340 | set_irq_type(EM_X270_ETHIRQ, IRQT_RISING); | 526 | .name = "gpio-keys", |
| 527 | .id = -1, | ||
| 528 | .dev = { | ||
| 529 | .platform_data = &em_x270_gpio_keys_data, | ||
| 530 | }, | ||
| 531 | }; | ||
| 532 | |||
| 533 | static void __init em_x270_init_gpio_keys(void) | ||
| 534 | { | ||
| 535 | platform_device_register(&em_x270_gpio_keys); | ||
| 536 | } | ||
| 537 | #else | ||
| 538 | static inline void em_x270_init_gpio_keys(void) {} | ||
| 539 | #endif | ||
| 540 | |||
| 541 | static void __init em_x270_init(void) | ||
| 542 | { | ||
| 543 | pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config)); | ||
| 544 | |||
| 545 | em_x270_init_dm9000(); | ||
| 546 | em_x270_init_rtc(); | ||
| 547 | em_x270_init_nand(); | ||
| 548 | em_x270_init_lcd(); | ||
| 549 | em_x270_init_mmc(); | ||
| 550 | em_x270_init_ohci(); | ||
| 551 | em_x270_init_keypad(); | ||
| 552 | em_x270_init_gpio_keys(); | ||
| 553 | em_x270_init_ac97(); | ||
| 341 | } | 554 | } |
| 342 | 555 | ||
| 343 | MACHINE_START(EM_X270, "Compulab EM-x270") | 556 | MACHINE_START(EM_X270, "Compulab EM-X270") |
| 344 | .boot_params = 0xa0000100, | 557 | .boot_params = 0xa0000100, |
| 345 | .phys_io = 0x40000000, | 558 | .phys_io = 0x40000000, |
| 346 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 559 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index ee0ae93c876a..c29b7b21c11b 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <asm/arch/hardware.h> | 17 | #include <asm/arch/hardware.h> |
| 18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
| 19 | 19 | ||
| 20 | #include <generic.h> | 20 | #include "generic.h" |
| 21 | 21 | ||
| 22 | /* Only e800 has 128MB RAM */ | 22 | /* Only e800 has 128MB RAM */ |
| 23 | static void __init eseries_fixup(struct machine_desc *desc, | 23 | static void __init eseries_fixup(struct machine_desc *desc, |
| @@ -47,6 +47,19 @@ MACHINE_START(E330, "Toshiba e330") | |||
| 47 | MACHINE_END | 47 | MACHINE_END |
| 48 | #endif | 48 | #endif |
| 49 | 49 | ||
| 50 | #ifdef CONFIG_MACH_E350 | ||
| 51 | MACHINE_START(E350, "Toshiba e350") | ||
| 52 | /* Maintainer: Ian Molton (spyro@f2s.com) */ | ||
| 53 | .phys_io = 0x40000000, | ||
| 54 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 55 | .boot_params = 0xa0000100, | ||
| 56 | .map_io = pxa_map_io, | ||
| 57 | .init_irq = pxa25x_init_irq, | ||
| 58 | .fixup = eseries_fixup, | ||
| 59 | .timer = &pxa_timer, | ||
| 60 | MACHINE_END | ||
| 61 | #endif | ||
| 62 | |||
| 50 | #ifdef CONFIG_MACH_E740 | 63 | #ifdef CONFIG_MACH_E740 |
| 51 | MACHINE_START(E740, "Toshiba e740") | 64 | MACHINE_START(E740, "Toshiba e740") |
| 52 | /* Maintainer: Ian Molton (spyro@f2s.com) */ | 65 | /* Maintainer: Ian Molton (spyro@f2s.com) */ |
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c new file mode 100644 index 000000000000..362847a10998 --- /dev/null +++ b/arch/arm/mach-pxa/eseries_udc.c | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | * UDC functions for the Toshiba e-series PDAs | ||
| 3 | * | ||
| 4 | * Copyright (c) Ian Molton 2003 | ||
| 5 | * | ||
| 6 | * 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 | */ | ||
| 12 | |||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/init.h> | ||
| 15 | #include <linux/device.h> | ||
| 16 | |||
| 17 | #include <asm/arch/udc.h> | ||
| 18 | #include <asm/arch/eseries-gpio.h> | ||
| 19 | #include <asm/arch/hardware.h> | ||
| 20 | #include <asm/arch/pxa-regs.h> | ||
| 21 | #include <asm/mach/arch.h> | ||
| 22 | #include <asm/mach-types.h> | ||
| 23 | #include <asm/mach/map.h> | ||
| 24 | #include <asm/domain.h> | ||
| 25 | |||
| 26 | /* local PXA generic code */ | ||
| 27 | #include "generic.h" | ||
| 28 | |||
| 29 | static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { | ||
| 30 | .gpio_vbus = GPIO_E7XX_USB_DISC, | ||
| 31 | .gpio_pullup = GPIO_E7XX_USB_PULLUP, | ||
| 32 | .gpio_pullup_inverted = 1 | ||
| 33 | }; | ||
| 34 | |||
| 35 | static struct pxa2xx_udc_mach_info e800_udc_mach_info = { | ||
| 36 | .gpio_vbus = GPIO_E800_USB_DISC, | ||
| 37 | .gpio_pullup = GPIO_E800_USB_PULLUP, | ||
| 38 | .gpio_pullup_inverted = 1 | ||
| 39 | }; | ||
| 40 | |||
| 41 | static int __init eseries_udc_init(void) | ||
| 42 | { | ||
| 43 | if (machine_is_e330() || machine_is_e350() || | ||
| 44 | machine_is_e740() || machine_is_e750() || | ||
| 45 | machine_is_e400()) | ||
| 46 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
| 47 | else if (machine_is_e800()) | ||
| 48 | pxa_set_udc_info(&e800_udc_mach_info); | ||
| 49 | |||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | module_init(eseries_udc_init); | ||
| 54 | |||
| 55 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); | ||
| 56 | MODULE_DESCRIPTION("eseries UDC support"); | ||
| 57 | MODULE_LICENSE("GPLv2"); | ||
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c new file mode 100644 index 000000000000..0143eed65398 --- /dev/null +++ b/arch/arm/mach-pxa/ezx.c | |||
| @@ -0,0 +1,220 @@ | |||
| 1 | /* | ||
| 2 | * ezx.c - Common code for the EZX platform. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005-2006 Harald Welte <laforge@openezx.org>, | ||
| 5 | * 2007-2008 Daniel Ribeiro <drwyrm@gmail.com>, | ||
| 6 | * 2007-2008 Stefan Schmidt <stefan@datenfreihafen.org> | ||
| 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 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/platform_device.h> | ||
| 17 | #include <linux/delay.h> | ||
| 18 | #include <linux/pwm_backlight.h> | ||
| 19 | |||
| 20 | #include <asm/setup.h> | ||
| 21 | #include <asm/arch/pxafb.h> | ||
| 22 | #include <asm/arch/ohci.h> | ||
| 23 | #include <asm/arch/i2c.h> | ||
| 24 | |||
| 25 | #include <asm/arch/mfp-pxa27x.h> | ||
| 26 | #include <asm/arch/pxa-regs.h> | ||
| 27 | #include <asm/arch/pxa2xx-regs.h> | ||
| 28 | #include <asm/mach-types.h> | ||
| 29 | #include <asm/mach/arch.h> | ||
| 30 | |||
| 31 | #include "devices.h" | ||
| 32 | #include "generic.h" | ||
| 33 | |||
| 34 | static struct platform_pwm_backlight_data ezx_backlight_data = { | ||
| 35 | .pwm_id = 0, | ||
| 36 | .max_brightness = 1023, | ||
| 37 | .dft_brightness = 1023, | ||
| 38 | .pwm_period_ns = 78770, | ||
| 39 | }; | ||
| 40 | |||
| 41 | static struct platform_device ezx_backlight_device = { | ||
| 42 | .name = "pwm-backlight", | ||
| 43 | .dev = { | ||
| 44 | .parent = &pxa27x_device_pwm0.dev, | ||
| 45 | .platform_data = &ezx_backlight_data, | ||
| 46 | }, | ||
| 47 | }; | ||
| 48 | |||
| 49 | static struct pxafb_mode_info mode_ezx_old = { | ||
| 50 | .pixclock = 150000, | ||
| 51 | .xres = 240, | ||
| 52 | .yres = 320, | ||
| 53 | .bpp = 16, | ||
| 54 | .hsync_len = 10, | ||
| 55 | .left_margin = 20, | ||
| 56 | .right_margin = 10, | ||
| 57 | .vsync_len = 2, | ||
| 58 | .upper_margin = 3, | ||
| 59 | .lower_margin = 2, | ||
| 60 | .sync = 0, | ||
| 61 | }; | ||
| 62 | |||
| 63 | static struct pxafb_mach_info ezx_fb_info_1 = { | ||
| 64 | .modes = &mode_ezx_old, | ||
| 65 | .num_modes = 1, | ||
| 66 | .lcd_conn = LCD_COLOR_TFT_16BPP, | ||
| 67 | }; | ||
| 68 | |||
| 69 | static struct pxafb_mode_info mode_72r89803y01 = { | ||
| 70 | .pixclock = 192308, | ||
| 71 | .xres = 240, | ||
| 72 | .yres = 320, | ||
| 73 | .bpp = 32, | ||
| 74 | .depth = 18, | ||
| 75 | .hsync_len = 10, | ||
| 76 | .left_margin = 20, | ||
| 77 | .right_margin = 10, | ||
| 78 | .vsync_len = 2, | ||
| 79 | .upper_margin = 3, | ||
| 80 | .lower_margin = 2, | ||
| 81 | .sync = 0, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static struct pxafb_mach_info ezx_fb_info_2 = { | ||
| 85 | .modes = &mode_72r89803y01, | ||
| 86 | .num_modes = 1, | ||
| 87 | .lcd_conn = LCD_COLOR_TFT_18BPP, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static struct platform_device *devices[] __initdata = { | ||
| 91 | &ezx_backlight_device, | ||
| 92 | }; | ||
| 93 | |||
| 94 | static unsigned long ezx_pin_config[] __initdata = { | ||
| 95 | /* PWM backlight */ | ||
| 96 | GPIO16_PWM0_OUT, | ||
| 97 | |||
| 98 | /* BTUART */ | ||
| 99 | GPIO42_BTUART_RXD, | ||
| 100 | GPIO43_BTUART_TXD, | ||
| 101 | GPIO44_BTUART_CTS, | ||
| 102 | GPIO45_BTUART_RTS, | ||
| 103 | |||
| 104 | /* STUART */ | ||
| 105 | GPIO46_STUART_RXD, | ||
| 106 | GPIO47_STUART_TXD, | ||
| 107 | |||
| 108 | /* For A780 support (connected with Neptune GSM chip) */ | ||
| 109 | GPIO30_USB_P3_2, /* ICL_TXENB */ | ||
| 110 | GPIO31_USB_P3_6, /* ICL_VPOUT */ | ||
| 111 | GPIO90_USB_P3_5, /* ICL_VPIN */ | ||
| 112 | GPIO91_USB_P3_1, /* ICL_XRXD */ | ||
| 113 | GPIO56_USB_P3_4, /* ICL_VMOUT */ | ||
| 114 | GPIO113_USB_P3_3, /* /ICL_VMIN */ | ||
| 115 | }; | ||
| 116 | |||
| 117 | static void __init ezx_init(void) | ||
| 118 | { | ||
| 119 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
| 120 | pxa_set_i2c_info(NULL); | ||
| 121 | if (machine_is_ezx_a780() || machine_is_ezx_e680()) | ||
| 122 | set_pxa_fb_info(&ezx_fb_info_1); | ||
| 123 | else | ||
| 124 | set_pxa_fb_info(&ezx_fb_info_2); | ||
| 125 | |||
| 126 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 127 | } | ||
| 128 | |||
| 129 | static void __init ezx_fixup(struct machine_desc *desc, struct tag *tags, | ||
| 130 | char **cmdline, struct meminfo *mi) | ||
| 131 | { | ||
| 132 | /* We have two ram chips. First one with 32MB at 0xA0000000 and a second | ||
| 133 | * 16MB one at 0xAC000000 | ||
| 134 | */ | ||
| 135 | mi->nr_banks = 2; | ||
| 136 | mi->bank[0].start = 0xa0000000; | ||
| 137 | mi->bank[0].node = 0; | ||
| 138 | mi->bank[0].size = (32*1024*1024); | ||
| 139 | mi->bank[1].start = 0xac000000; | ||
| 140 | mi->bank[1].node = 1; | ||
| 141 | mi->bank[1].size = (16*1024*1024); | ||
| 142 | } | ||
| 143 | |||
| 144 | #ifdef CONFIG_MACH_EZX_A780 | ||
| 145 | MACHINE_START(EZX_A780, "Motorola EZX A780") | ||
| 146 | .phys_io = 0x40000000, | ||
| 147 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 148 | .fixup = ezx_fixup, | ||
| 149 | .boot_params = 0xa0000100, | ||
| 150 | .map_io = pxa_map_io, | ||
| 151 | .init_irq = pxa27x_init_irq, | ||
| 152 | .timer = &pxa_timer, | ||
| 153 | .init_machine = &ezx_init, | ||
| 154 | MACHINE_END | ||
| 155 | #endif | ||
| 156 | |||
| 157 | #ifdef CONFIG_MACH_EZX_E680 | ||
| 158 | MACHINE_START(EZX_E680, "Motorola EZX E680") | ||
| 159 | .phys_io = 0x40000000, | ||
| 160 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 161 | .fixup = ezx_fixup, | ||
| 162 | .boot_params = 0xa0000100, | ||
| 163 | .map_io = pxa_map_io, | ||
| 164 | .init_irq = pxa27x_init_irq, | ||
| 165 | .timer = &pxa_timer, | ||
| 166 | .init_machine = &ezx_init, | ||
| 167 | MACHINE_END | ||
| 168 | #endif | ||
| 169 | |||
| 170 | #ifdef CONFIG_MACH_EZX_A1200 | ||
| 171 | MACHINE_START(EZX_A1200, "Motorola EZX A1200") | ||
| 172 | .phys_io = 0x40000000, | ||
| 173 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 174 | .fixup = ezx_fixup, | ||
| 175 | .boot_params = 0xa0000100, | ||
| 176 | .map_io = pxa_map_io, | ||
| 177 | .init_irq = pxa27x_init_irq, | ||
| 178 | .timer = &pxa_timer, | ||
| 179 | .init_machine = &ezx_init, | ||
| 180 | MACHINE_END | ||
| 181 | #endif | ||
| 182 | |||
| 183 | #ifdef CONFIG_MACH_EZX_A910 | ||
| 184 | MACHINE_START(EZX_A910, "Motorola EZX A910") | ||
| 185 | .phys_io = 0x40000000, | ||
| 186 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 187 | .fixup = ezx_fixup, | ||
| 188 | .boot_params = 0xa0000100, | ||
| 189 | .map_io = pxa_map_io, | ||
| 190 | .init_irq = pxa27x_init_irq, | ||
| 191 | .timer = &pxa_timer, | ||
| 192 | .init_machine = &ezx_init, | ||
| 193 | MACHINE_END | ||
| 194 | #endif | ||
| 195 | |||
| 196 | #ifdef CONFIG_MACH_EZX_E6 | ||
| 197 | MACHINE_START(EZX_E6, "Motorola EZX E6") | ||
| 198 | .phys_io = 0x40000000, | ||
| 199 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 200 | .fixup = ezx_fixup, | ||
| 201 | .boot_params = 0xa0000100, | ||
| 202 | .map_io = pxa_map_io, | ||
| 203 | .init_irq = pxa27x_init_irq, | ||
| 204 | .timer = &pxa_timer, | ||
| 205 | .init_machine = &ezx_init, | ||
| 206 | MACHINE_END | ||
| 207 | #endif | ||
| 208 | |||
| 209 | #ifdef CONFIG_MACH_EZX_E2 | ||
| 210 | MACHINE_START(EZX_E2, "Motorola EZX E2") | ||
| 211 | .phys_io = 0x40000000, | ||
| 212 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 213 | .fixup = ezx_fixup, | ||
| 214 | .boot_params = 0xa0000100, | ||
| 215 | .map_io = pxa_map_io, | ||
| 216 | .init_irq = pxa27x_init_irq, | ||
| 217 | .timer = &pxa_timer, | ||
| 218 | .init_machine = &ezx_init, | ||
| 219 | MACHINE_END | ||
| 220 | #endif | ||
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 530654474bb2..dd759d03a9fd 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
| 21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
| 23 | #include <linux/smc91x.h> | ||
| 23 | 24 | ||
| 24 | #include <asm/types.h> | 25 | #include <asm/types.h> |
| 25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
| @@ -38,6 +39,7 @@ | |||
| 38 | #include <asm/arch/pxafb.h> | 39 | #include <asm/arch/pxafb.h> |
| 39 | #include <asm/arch/ssp.h> | 40 | #include <asm/arch/ssp.h> |
| 40 | #include <asm/arch/pxa27x_keypad.h> | 41 | #include <asm/arch/pxa27x_keypad.h> |
| 42 | #include <asm/arch/pxa3xx_nand.h> | ||
| 41 | #include <asm/arch/littleton.h> | 43 | #include <asm/arch/littleton.h> |
| 42 | 44 | ||
| 43 | #include "generic.h" | 45 | #include "generic.h" |
| @@ -101,18 +103,26 @@ static struct resource smc91x_resources[] = { | |||
| 101 | [1] = { | 103 | [1] = { |
| 102 | .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), | 104 | .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), |
| 103 | .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), | 105 | .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), |
| 104 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 106 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
| 105 | } | 107 | } |
| 106 | }; | 108 | }; |
| 107 | 109 | ||
| 110 | static struct smc91x_platdata littleton_smc91x_info = { | ||
| 111 | .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | | ||
| 112 | SMC91X_NOWAIT | SMC91X_USE_DMA, | ||
| 113 | }; | ||
| 114 | |||
| 108 | static struct platform_device smc91x_device = { | 115 | static struct platform_device smc91x_device = { |
| 109 | .name = "smc91x", | 116 | .name = "smc91x", |
| 110 | .id = 0, | 117 | .id = 0, |
| 111 | .num_resources = ARRAY_SIZE(smc91x_resources), | 118 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 112 | .resource = smc91x_resources, | 119 | .resource = smc91x_resources, |
| 120 | .dev = { | ||
| 121 | .platform_data = &littleton_smc91x_info, | ||
| 122 | }, | ||
| 113 | }; | 123 | }; |
| 114 | 124 | ||
| 115 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULES) | 125 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
| 116 | /* use bit 30, 31 as the indicator of command parameter number */ | 126 | /* use bit 30, 31 as the indicator of command parameter number */ |
| 117 | #define CMD0(x) ((0x00000000) | ((x) << 9)) | 127 | #define CMD0(x) ((0x00000000) | ((x) << 9)) |
| 118 | #define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1)) | 128 | #define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1)) |
| @@ -311,9 +321,9 @@ static void littleton_init_lcd(void) | |||
| 311 | } | 321 | } |
| 312 | #else | 322 | #else |
| 313 | static inline void littleton_init_lcd(void) {}; | 323 | static inline void littleton_init_lcd(void) {}; |
| 314 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */ | 324 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ |
| 315 | 325 | ||
| 316 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) | 326 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
| 317 | static unsigned int littleton_matrix_key_map[] = { | 327 | static unsigned int littleton_matrix_key_map[] = { |
| 318 | /* KEY(row, col, key_code) */ | 328 | /* KEY(row, col, key_code) */ |
| 319 | KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), | 329 | KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), |
| @@ -361,6 +371,57 @@ static void __init littleton_init_keypad(void) | |||
| 361 | static inline void littleton_init_keypad(void) {} | 371 | static inline void littleton_init_keypad(void) {} |
| 362 | #endif | 372 | #endif |
| 363 | 373 | ||
| 374 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
| 375 | static struct mtd_partition littleton_nand_partitions[] = { | ||
| 376 | [0] = { | ||
| 377 | .name = "Bootloader", | ||
| 378 | .offset = 0, | ||
| 379 | .size = 0x060000, | ||
| 380 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 381 | }, | ||
| 382 | [1] = { | ||
| 383 | .name = "Kernel", | ||
| 384 | .offset = 0x060000, | ||
| 385 | .size = 0x200000, | ||
| 386 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 387 | }, | ||
| 388 | [2] = { | ||
| 389 | .name = "Filesystem", | ||
| 390 | .offset = 0x0260000, | ||
| 391 | .size = 0x3000000, /* 48M - rootfs */ | ||
| 392 | }, | ||
| 393 | [3] = { | ||
| 394 | .name = "MassStorage", | ||
| 395 | .offset = 0x3260000, | ||
| 396 | .size = 0x3d40000, | ||
| 397 | }, | ||
| 398 | [4] = { | ||
| 399 | .name = "BBT", | ||
| 400 | .offset = 0x6FA0000, | ||
| 401 | .size = 0x80000, | ||
| 402 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 403 | }, | ||
| 404 | /* NOTE: we reserve some blocks at the end of the NAND flash for | ||
| 405 | * bad block management, and the max number of relocation blocks | ||
| 406 | * differs on different platforms. Please take care with it when | ||
| 407 | * defining the partition table. | ||
| 408 | */ | ||
| 409 | }; | ||
| 410 | |||
| 411 | static struct pxa3xx_nand_platform_data littleton_nand_info = { | ||
| 412 | .enable_arbiter = 1, | ||
| 413 | .parts = littleton_nand_partitions, | ||
| 414 | .nr_parts = ARRAY_SIZE(littleton_nand_partitions), | ||
| 415 | }; | ||
| 416 | |||
| 417 | static void __init littleton_init_nand(void) | ||
| 418 | { | ||
| 419 | pxa3xx_set_nand_info(&littleton_nand_info); | ||
| 420 | } | ||
| 421 | #else | ||
| 422 | static inline void littleton_init_nand(void) {} | ||
| 423 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ | ||
| 424 | |||
| 364 | static void __init littleton_init(void) | 425 | static void __init littleton_init(void) |
| 365 | { | 426 | { |
| 366 | /* initialize MFP configurations */ | 427 | /* initialize MFP configurations */ |
| @@ -374,6 +435,7 @@ static void __init littleton_init(void) | |||
| 374 | 435 | ||
| 375 | littleton_init_lcd(); | 436 | littleton_init_lcd(); |
| 376 | littleton_init_keypad(); | 437 | littleton_init_keypad(); |
| 438 | littleton_init_nand(); | ||
| 377 | } | 439 | } |
| 378 | 440 | ||
| 379 | MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") | 441 | MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index a3fae4139203..ac26423cd20c 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
| 22 | #include <linux/mtd/mtd.h> | 22 | #include <linux/mtd/mtd.h> |
| 23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
| 24 | #include <linux/smc91x.h> | ||
| 24 | 25 | ||
| 25 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
| 26 | #include <linux/spi/ads7846.h> | 27 | #include <linux/spi/ads7846.h> |
| @@ -226,14 +227,6 @@ static struct pxa2xx_spi_master pxa_ssp_master_info = { | |||
| 226 | .num_chipselect = 0, | 227 | .num_chipselect = 0, |
| 227 | }; | 228 | }; |
| 228 | 229 | ||
| 229 | static struct platform_device pxa_ssp = { | ||
| 230 | .name = "pxa2xx-spi", | ||
| 231 | .id = 1, | ||
| 232 | .dev = { | ||
| 233 | .platform_data = &pxa_ssp_master_info, | ||
| 234 | }, | ||
| 235 | }; | ||
| 236 | |||
| 237 | static int lubbock_ads7846_pendown_state(void) | 230 | static int lubbock_ads7846_pendown_state(void) |
| 238 | { | 231 | { |
| 239 | /* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */ | 232 | /* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */ |
| @@ -292,11 +285,18 @@ static struct resource smc91x_resources[] = { | |||
| 292 | }, | 285 | }, |
| 293 | }; | 286 | }; |
| 294 | 287 | ||
| 288 | static struct smc91x_platdata lubbock_smc91x_info = { | ||
| 289 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_2, | ||
| 290 | }; | ||
| 291 | |||
| 295 | static struct platform_device smc91x_device = { | 292 | static struct platform_device smc91x_device = { |
| 296 | .name = "smc91x", | 293 | .name = "smc91x", |
| 297 | .id = -1, | 294 | .id = -1, |
| 298 | .num_resources = ARRAY_SIZE(smc91x_resources), | 295 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 299 | .resource = smc91x_resources, | 296 | .resource = smc91x_resources, |
| 297 | .dev = { | ||
| 298 | .platform_data = &lubbock_smc91x_info, | ||
| 299 | }, | ||
| 300 | }; | 300 | }; |
| 301 | 301 | ||
| 302 | static struct resource flash_resources[] = { | 302 | static struct resource flash_resources[] = { |
| @@ -367,7 +367,6 @@ static struct platform_device *devices[] __initdata = { | |||
| 367 | &smc91x_device, | 367 | &smc91x_device, |
| 368 | &lubbock_flash_device[0], | 368 | &lubbock_flash_device[0], |
| 369 | &lubbock_flash_device[1], | 369 | &lubbock_flash_device[1], |
| 370 | &pxa_ssp, | ||
| 371 | }; | 370 | }; |
| 372 | 371 | ||
| 373 | static struct pxafb_mode_info sharp_lm8v31_mode = { | 372 | static struct pxafb_mode_info sharp_lm8v31_mode = { |
| @@ -471,6 +470,7 @@ static void lubbock_irda_transceiver_mode(struct device *dev, int mode) | |||
| 471 | } else if (mode & IR_FIRMODE) { | 470 | } else if (mode & IR_FIRMODE) { |
| 472 | LUB_MISC_WR |= 1 << 4; | 471 | LUB_MISC_WR |= 1 << 4; |
| 473 | } | 472 | } |
| 473 | pxa2xx_transceiver_mode(dev, mode); | ||
| 474 | local_irq_restore(flags); | 474 | local_irq_restore(flags); |
| 475 | } | 475 | } |
| 476 | 476 | ||
| @@ -501,6 +501,7 @@ static void __init lubbock_init(void) | |||
| 501 | lubbock_flash_data[flashboot].name = "boot-rom"; | 501 | lubbock_flash_data[flashboot].name = "boot-rom"; |
| 502 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); | 502 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 503 | 503 | ||
| 504 | pxa2xx_set_spi_info(1, &pxa_ssp_master_info); | ||
| 504 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | 505 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
| 505 | } | 506 | } |
| 506 | 507 | ||
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 01b2fa790217..c9d274f0048f 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
| @@ -17,17 +17,15 @@ | |||
| 17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
| 18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
| 20 | #include <linux/gpio.h> | ||
| 20 | #include <linux/gpio_keys.h> | 21 | #include <linux/gpio_keys.h> |
| 21 | #include <linux/input.h> | 22 | #include <linux/input.h> |
| 22 | #include <linux/mfd/htc-egpio.h> | 23 | #include <linux/mfd/htc-egpio.h> |
| 23 | #include <linux/mfd/htc-pasic3.h> | 24 | #include <linux/mfd/htc-pasic3.h> |
| 24 | #include <linux/mtd/mtd.h> | ||
| 25 | #include <linux/mtd/map.h> | ||
| 26 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
| 27 | #include <linux/pda_power.h> | 26 | #include <linux/pda_power.h> |
| 28 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
| 29 | 28 | ||
| 30 | #include <asm/gpio.h> | ||
| 31 | #include <asm/hardware.h> | 29 | #include <asm/hardware.h> |
| 32 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
| 33 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
| @@ -44,7 +42,7 @@ | |||
| 44 | #include "devices.h" | 42 | #include "devices.h" |
| 45 | #include "generic.h" | 43 | #include "generic.h" |
| 46 | 44 | ||
| 47 | static unsigned long magician_pin_config[] = { | 45 | static unsigned long magician_pin_config[] __initdata = { |
| 48 | 46 | ||
| 49 | /* SDRAM and Static Memory I/O Signals */ | 47 | /* SDRAM and Static Memory I/O Signals */ |
| 50 | GPIO20_nSDCS_2, | 48 | GPIO20_nSDCS_2, |
| @@ -134,6 +132,7 @@ static unsigned long magician_pin_config[] = { | |||
| 134 | static void magician_irda_transceiver_mode(struct device *dev, int mode) | 132 | static void magician_irda_transceiver_mode(struct device *dev, int mode) |
| 135 | { | 133 | { |
| 136 | gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF); | 134 | gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF); |
| 135 | pxa2xx_transceiver_mode(dev, mode); | ||
| 137 | } | 136 | } |
| 138 | 137 | ||
| 139 | static struct pxaficp_platform_data magician_ficp_info = { | 138 | static struct pxaficp_platform_data magician_ficp_info = { |
| @@ -399,6 +398,7 @@ static struct platform_pwm_backlight_data backlight_data = { | |||
| 399 | 398 | ||
| 400 | static struct platform_device backlight = { | 399 | static struct platform_device backlight = { |
| 401 | .name = "pwm-backlight", | 400 | .name = "pwm-backlight", |
| 401 | .id = -1, | ||
| 402 | .dev = { | 402 | .dev = { |
| 403 | .parent = &pxa27x_device_pwm0.dev, | 403 | .parent = &pxa27x_device_pwm0.dev, |
| 404 | .platform_data = &backlight_data, | 404 | .platform_data = &backlight_data, |
| @@ -511,6 +511,37 @@ static struct platform_device pasic3 = { | |||
| 511 | * External power | 511 | * External power |
| 512 | */ | 512 | */ |
| 513 | 513 | ||
| 514 | static int power_supply_init(struct device *dev) | ||
| 515 | { | ||
| 516 | int ret; | ||
| 517 | |||
| 518 | ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_AC, "CABLE_STATE_AC"); | ||
| 519 | if (ret) | ||
| 520 | goto err_cs_ac; | ||
| 521 | ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_USB, "CABLE_STATE_USB"); | ||
| 522 | if (ret) | ||
| 523 | goto err_cs_usb; | ||
| 524 | ret = gpio_request(EGPIO_MAGICIAN_CHARGE_EN, "CHARGE_EN"); | ||
| 525 | if (ret) | ||
| 526 | goto err_chg_en; | ||
| 527 | ret = gpio_request(GPIO30_MAGICIAN_nCHARGE_EN, "nCHARGE_EN"); | ||
| 528 | if (!ret) | ||
| 529 | ret = gpio_direction_output(GPIO30_MAGICIAN_nCHARGE_EN, 0); | ||
| 530 | if (ret) | ||
| 531 | goto err_nchg_en; | ||
| 532 | |||
| 533 | return 0; | ||
| 534 | |||
| 535 | err_nchg_en: | ||
| 536 | gpio_free(EGPIO_MAGICIAN_CHARGE_EN); | ||
| 537 | err_chg_en: | ||
| 538 | gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB); | ||
| 539 | err_cs_usb: | ||
| 540 | gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC); | ||
| 541 | err_cs_ac: | ||
| 542 | return ret; | ||
| 543 | } | ||
| 544 | |||
| 514 | static int magician_is_ac_online(void) | 545 | static int magician_is_ac_online(void) |
| 515 | { | 546 | { |
| 516 | return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC); | 547 | return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC); |
| @@ -527,14 +558,24 @@ static void magician_set_charge(int flags) | |||
| 527 | gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags); | 558 | gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags); |
| 528 | } | 559 | } |
| 529 | 560 | ||
| 561 | static void power_supply_exit(struct device *dev) | ||
| 562 | { | ||
| 563 | gpio_free(GPIO30_MAGICIAN_nCHARGE_EN); | ||
| 564 | gpio_free(EGPIO_MAGICIAN_CHARGE_EN); | ||
| 565 | gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB); | ||
| 566 | gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC); | ||
| 567 | } | ||
| 568 | |||
| 530 | static char *magician_supplicants[] = { | 569 | static char *magician_supplicants[] = { |
| 531 | "ds2760-battery.0", "backup-battery" | 570 | "ds2760-battery.0", "backup-battery" |
| 532 | }; | 571 | }; |
| 533 | 572 | ||
| 534 | static struct pda_power_pdata power_supply_info = { | 573 | static struct pda_power_pdata power_supply_info = { |
| 574 | .init = power_supply_init, | ||
| 535 | .is_ac_online = magician_is_ac_online, | 575 | .is_ac_online = magician_is_ac_online, |
| 536 | .is_usb_online = magician_is_usb_online, | 576 | .is_usb_online = magician_is_usb_online, |
| 537 | .set_charge = magician_set_charge, | 577 | .set_charge = magician_set_charge, |
| 578 | .exit = power_supply_exit, | ||
| 538 | .supplied_to = magician_supplicants, | 579 | .supplied_to = magician_supplicants, |
| 539 | .num_supplicants = ARRAY_SIZE(magician_supplicants), | 580 | .num_supplicants = ARRAY_SIZE(magician_supplicants), |
| 540 | }; | 581 | }; |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index f2e9e7c4da8e..851ec2d9b699 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
| 27 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
| 28 | #include <linux/pwm_backlight.h> | 28 | #include <linux/pwm_backlight.h> |
| 29 | #include <linux/smc91x.h> | ||
| 29 | 30 | ||
| 30 | #include <asm/types.h> | 31 | #include <asm/types.h> |
| 31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
| @@ -110,9 +111,9 @@ static unsigned long mainstone_pin_config[] = { | |||
| 110 | GPIO45_AC97_SYSCLK, | 111 | GPIO45_AC97_SYSCLK, |
| 111 | 112 | ||
| 112 | /* Keypad */ | 113 | /* Keypad */ |
| 113 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 114 | GPIO93_KP_DKIN_0, |
| 114 | GPIO94_KP_DKIN_1 | WAKEUP_ON_LEVEL_HIGH, | 115 | GPIO94_KP_DKIN_1, |
| 115 | GPIO95_KP_DKIN_2 | WAKEUP_ON_LEVEL_HIGH, | 116 | GPIO95_KP_DKIN_2, |
| 116 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 117 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
| 117 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | 118 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, |
| 118 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | 119 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, |
| @@ -240,11 +241,19 @@ static struct resource smc91x_resources[] = { | |||
| 240 | } | 241 | } |
| 241 | }; | 242 | }; |
| 242 | 243 | ||
| 244 | static struct smc91x_platdata mainstone_smc91x_info = { | ||
| 245 | .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT | | ||
| 246 | SMC91X_NOWAIT | SMC91X_USE_DMA, | ||
| 247 | }; | ||
| 248 | |||
| 243 | static struct platform_device smc91x_device = { | 249 | static struct platform_device smc91x_device = { |
| 244 | .name = "smc91x", | 250 | .name = "smc91x", |
| 245 | .id = 0, | 251 | .id = 0, |
| 246 | .num_resources = ARRAY_SIZE(smc91x_resources), | 252 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 247 | .resource = smc91x_resources, | 253 | .resource = smc91x_resources, |
| 254 | .dev = { | ||
| 255 | .platform_data = &mainstone_smc91x_info, | ||
| 256 | }, | ||
| 248 | }; | 257 | }; |
| 249 | 258 | ||
| 250 | static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) | 259 | static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) |
| @@ -455,6 +464,7 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode) | |||
| 455 | } else if (mode & IR_FIRMODE) { | 464 | } else if (mode & IR_FIRMODE) { |
| 456 | MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; | 465 | MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; |
| 457 | } | 466 | } |
| 467 | pxa2xx_transceiver_mode(dev, mode); | ||
| 458 | if (mode & IR_OFF) { | 468 | if (mode & IR_OFF) { |
| 459 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; | 469 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; |
| 460 | } else { | 470 | } else { |
| @@ -513,7 +523,7 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = { | |||
| 513 | .init = mainstone_ohci_init, | 523 | .init = mainstone_ohci_init, |
| 514 | }; | 524 | }; |
| 515 | 525 | ||
| 516 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) | 526 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
| 517 | static unsigned int mainstone_matrix_keys[] = { | 527 | static unsigned int mainstone_matrix_keys[] = { |
| 518 | KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), | 528 | KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), |
| 519 | KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), | 529 | KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), |
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index d1cdb4ecb0b8..fd4545eab803 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c | |||
| @@ -39,6 +39,28 @@ struct gpio_desc { | |||
| 39 | 39 | ||
| 40 | static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1]; | 40 | static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1]; |
| 41 | 41 | ||
| 42 | static int __mfp_config_lpm(unsigned gpio, unsigned long lpm) | ||
| 43 | { | ||
| 44 | unsigned mask = GPIO_bit(gpio); | ||
| 45 | |||
| 46 | /* low power state */ | ||
| 47 | switch (lpm) { | ||
| 48 | case MFP_LPM_DRIVE_HIGH: | ||
| 49 | PGSR(gpio) |= mask; | ||
| 50 | break; | ||
| 51 | case MFP_LPM_DRIVE_LOW: | ||
| 52 | PGSR(gpio) &= ~mask; | ||
| 53 | break; | ||
| 54 | case MFP_LPM_INPUT: | ||
| 55 | break; | ||
| 56 | default: | ||
| 57 | pr_warning("%s: invalid low power state for GPIO%d\n", | ||
| 58 | __func__, gpio); | ||
| 59 | return -EINVAL; | ||
| 60 | } | ||
| 61 | return 0; | ||
| 62 | } | ||
| 63 | |||
| 42 | static int __mfp_config_gpio(unsigned gpio, unsigned long c) | 64 | static int __mfp_config_gpio(unsigned gpio, unsigned long c) |
| 43 | { | 65 | { |
| 44 | unsigned long gafr, mask = GPIO_bit(gpio); | 66 | unsigned long gafr, mask = GPIO_bit(gpio); |
| @@ -57,21 +79,8 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
| 57 | else | 79 | else |
| 58 | GPDR(gpio) &= ~mask; | 80 | GPDR(gpio) &= ~mask; |
| 59 | 81 | ||
| 60 | /* low power state */ | 82 | if (__mfp_config_lpm(gpio, c & MFP_LPM_STATE_MASK)) |
| 61 | switch (c & MFP_LPM_STATE_MASK) { | ||
| 62 | case MFP_LPM_DRIVE_HIGH: | ||
| 63 | PGSR(gpio) |= mask; | ||
| 64 | break; | ||
| 65 | case MFP_LPM_DRIVE_LOW: | ||
| 66 | PGSR(gpio) &= ~mask; | ||
| 67 | break; | ||
| 68 | case MFP_LPM_INPUT: | ||
| 69 | break; | ||
| 70 | default: | ||
| 71 | pr_warning("%s: invalid low power state for GPIO%d\n", | ||
| 72 | __func__, gpio); | ||
| 73 | return -EINVAL; | 83 | return -EINVAL; |
| 74 | } | ||
| 75 | 84 | ||
| 76 | /* give early warning if MFP_LPM_CAN_WAKEUP is set on the | 85 | /* give early warning if MFP_LPM_CAN_WAKEUP is set on the |
| 77 | * configurations of those pins not able to wakeup | 86 | * configurations of those pins not able to wakeup |
| @@ -91,6 +100,18 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
| 91 | return 0; | 100 | return 0; |
| 92 | } | 101 | } |
| 93 | 102 | ||
| 103 | static inline int __mfp_validate(int mfp) | ||
| 104 | { | ||
| 105 | int gpio = mfp_to_gpio(mfp); | ||
| 106 | |||
| 107 | if ((mfp > MFP_PIN_GPIO127) || !gpio_desc[gpio].valid) { | ||
| 108 | pr_warning("%s: GPIO%d is invalid pin\n", __func__, gpio); | ||
| 109 | return -1; | ||
| 110 | } | ||
| 111 | |||
| 112 | return gpio; | ||
| 113 | } | ||
| 114 | |||
| 94 | void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num) | 115 | void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num) |
| 95 | { | 116 | { |
| 96 | unsigned long flags; | 117 | unsigned long flags; |
| @@ -99,13 +120,9 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num) | |||
| 99 | 120 | ||
| 100 | for (i = 0, c = mfp_cfgs; i < num; i++, c++) { | 121 | for (i = 0, c = mfp_cfgs; i < num; i++, c++) { |
| 101 | 122 | ||
| 102 | gpio = mfp_to_gpio(MFP_PIN(*c)); | 123 | gpio = __mfp_validate(MFP_PIN(*c)); |
| 103 | 124 | if (gpio < 0) | |
| 104 | if (!gpio_desc[gpio].valid) { | ||
| 105 | pr_warning("%s: GPIO%d is invalid pin\n", | ||
| 106 | __func__, gpio); | ||
| 107 | continue; | 125 | continue; |
| 108 | } | ||
| 109 | 126 | ||
| 110 | local_irq_save(flags); | 127 | local_irq_save(flags); |
| 111 | 128 | ||
| @@ -116,6 +133,20 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num) | |||
| 116 | } | 133 | } |
| 117 | } | 134 | } |
| 118 | 135 | ||
| 136 | void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm) | ||
| 137 | { | ||
| 138 | unsigned long flags; | ||
| 139 | int gpio; | ||
| 140 | |||
| 141 | gpio = __mfp_validate(mfp); | ||
| 142 | if (gpio < 0) | ||
| 143 | return; | ||
| 144 | |||
| 145 | local_irq_save(flags); | ||
| 146 | __mfp_config_lpm(gpio, lpm); | ||
| 147 | local_irq_restore(flags); | ||
| 148 | } | ||
| 149 | |||
| 119 | int gpio_set_wake(unsigned int gpio, unsigned int on) | 150 | int gpio_set_wake(unsigned int gpio, unsigned int on) |
| 120 | { | 151 | { |
| 121 | struct gpio_desc *d; | 152 | struct gpio_desc *d; |
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c new file mode 100644 index 000000000000..408657a24f8c --- /dev/null +++ b/arch/arm/mach-pxa/palmtx.c | |||
| @@ -0,0 +1,416 @@ | |||
| 1 | /* | ||
| 2 | * Hardware definitions for PalmTX | ||
| 3 | * | ||
| 4 | * Author: Marek Vasut <marek.vasut@gmail.com> | ||
| 5 | * | ||
| 6 | * Based on work of: | ||
| 7 | * Alex Osborne <ato@meshy.org> | ||
| 8 | * Cristiano P. <cristianop@users.sourceforge.net> | ||
| 9 | * Jan Herman <2hp@seznam.cz> | ||
| 10 | * Michal Hrusecky | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or modify | ||
| 13 | * it under the terms of the GNU General Public License version 2 as | ||
| 14 | * published by the Free Software Foundation. | ||
| 15 | * | ||
| 16 | * (find more info at www.hackndev.com) | ||
| 17 | * | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/platform_device.h> | ||
| 21 | #include <linux/delay.h> | ||
| 22 | #include <linux/irq.h> | ||
| 23 | #include <linux/gpio_keys.h> | ||
| 24 | #include <linux/input.h> | ||
| 25 | #include <linux/pda_power.h> | ||
| 26 | #include <linux/pwm_backlight.h> | ||
| 27 | #include <linux/gpio.h> | ||
| 28 | |||
| 29 | #include <asm/mach-types.h> | ||
| 30 | #include <asm/mach/arch.h> | ||
| 31 | #include <asm/mach/map.h> | ||
| 32 | |||
| 33 | #include <asm/arch/audio.h> | ||
| 34 | #include <asm/arch/palmtx.h> | ||
| 35 | #include <asm/arch/mmc.h> | ||
| 36 | #include <asm/arch/pxafb.h> | ||
| 37 | #include <asm/arch/pxa-regs.h> | ||
| 38 | #include <asm/arch/mfp-pxa27x.h> | ||
| 39 | #include <asm/arch/irda.h> | ||
| 40 | #include <asm/arch/pxa27x_keypad.h> | ||
| 41 | #include <asm/arch/udc.h> | ||
| 42 | |||
| 43 | #include "generic.h" | ||
| 44 | #include "devices.h" | ||
| 45 | |||
| 46 | /****************************************************************************** | ||
| 47 | * Pin configuration | ||
| 48 | ******************************************************************************/ | ||
| 49 | static unsigned long palmtx_pin_config[] __initdata = { | ||
| 50 | /* MMC */ | ||
| 51 | GPIO32_MMC_CLK, | ||
| 52 | GPIO92_MMC_DAT_0, | ||
| 53 | GPIO109_MMC_DAT_1, | ||
| 54 | GPIO110_MMC_DAT_2, | ||
| 55 | GPIO111_MMC_DAT_3, | ||
| 56 | GPIO112_MMC_CMD, | ||
| 57 | |||
| 58 | /* AC97 */ | ||
| 59 | GPIO28_AC97_BITCLK, | ||
| 60 | GPIO29_AC97_SDATA_IN_0, | ||
| 61 | GPIO30_AC97_SDATA_OUT, | ||
| 62 | GPIO31_AC97_SYNC, | ||
| 63 | |||
| 64 | /* IrDA */ | ||
| 65 | GPIO46_FICP_RXD, | ||
| 66 | GPIO47_FICP_TXD, | ||
| 67 | |||
| 68 | /* PWM */ | ||
| 69 | GPIO16_PWM0_OUT, | ||
| 70 | |||
| 71 | /* USB */ | ||
| 72 | GPIO13_GPIO, | ||
| 73 | |||
| 74 | /* PCMCIA */ | ||
| 75 | GPIO48_nPOE, | ||
| 76 | GPIO49_nPWE, | ||
| 77 | GPIO50_nPIOR, | ||
| 78 | GPIO51_nPIOW, | ||
| 79 | GPIO85_nPCE_1, | ||
| 80 | GPIO54_nPCE_2, | ||
| 81 | GPIO79_PSKTSEL, | ||
| 82 | GPIO55_nPREG, | ||
| 83 | GPIO56_nPWAIT, | ||
| 84 | GPIO57_nIOIS16, | ||
| 85 | }; | ||
| 86 | |||
| 87 | /****************************************************************************** | ||
| 88 | * SD/MMC card controller | ||
| 89 | ******************************************************************************/ | ||
| 90 | static int palmtx_mci_init(struct device *dev, irq_handler_t palmtx_detect_int, | ||
| 91 | void *data) | ||
| 92 | { | ||
| 93 | int err = 0; | ||
| 94 | |||
| 95 | /* Setup an interrupt for detecting card insert/remove events */ | ||
| 96 | err = request_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, palmtx_detect_int, | ||
| 97 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM | | ||
| 98 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | ||
| 99 | "SD/MMC card detect", data); | ||
| 100 | if (err) { | ||
| 101 | printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n", | ||
| 102 | __func__); | ||
| 103 | return err; | ||
| 104 | } | ||
| 105 | |||
| 106 | err = gpio_request(GPIO_NR_PALMTX_SD_POWER, "SD_POWER"); | ||
| 107 | if (err) | ||
| 108 | goto pwr_err; | ||
| 109 | |||
| 110 | err = gpio_request(GPIO_NR_PALMTX_SD_READONLY, "SD_READONLY"); | ||
| 111 | if (err) | ||
| 112 | goto ro_err; | ||
| 113 | |||
| 114 | printk(KERN_DEBUG "%s: irq registered\n", __func__); | ||
| 115 | |||
| 116 | return 0; | ||
| 117 | |||
| 118 | ro_err: | ||
| 119 | gpio_free(GPIO_NR_PALMTX_SD_POWER); | ||
| 120 | pwr_err: | ||
| 121 | free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data); | ||
| 122 | return err; | ||
| 123 | } | ||
| 124 | |||
| 125 | static void palmtx_mci_exit(struct device *dev, void *data) | ||
| 126 | { | ||
| 127 | gpio_free(GPIO_NR_PALMTX_SD_READONLY); | ||
| 128 | gpio_free(GPIO_NR_PALMTX_SD_POWER); | ||
| 129 | free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data); | ||
| 130 | } | ||
| 131 | |||
| 132 | static void palmtx_mci_power(struct device *dev, unsigned int vdd) | ||
| 133 | { | ||
| 134 | struct pxamci_platform_data *p_d = dev->platform_data; | ||
| 135 | gpio_set_value(GPIO_NR_PALMTX_SD_POWER, p_d->ocr_mask & (1 << vdd)); | ||
| 136 | } | ||
| 137 | |||
| 138 | static int palmtx_mci_get_ro(struct device *dev) | ||
| 139 | { | ||
| 140 | return gpio_get_value(GPIO_NR_PALMTX_SD_READONLY); | ||
| 141 | } | ||
| 142 | |||
| 143 | static struct pxamci_platform_data palmtx_mci_platform_data = { | ||
| 144 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
| 145 | .setpower = palmtx_mci_power, | ||
| 146 | .get_ro = palmtx_mci_get_ro, | ||
| 147 | .init = palmtx_mci_init, | ||
| 148 | .exit = palmtx_mci_exit, | ||
| 149 | }; | ||
| 150 | |||
| 151 | /****************************************************************************** | ||
| 152 | * GPIO keyboard | ||
| 153 | ******************************************************************************/ | ||
| 154 | static unsigned int palmtx_matrix_keys[] = { | ||
| 155 | KEY(0, 0, KEY_POWER), | ||
| 156 | KEY(0, 1, KEY_F1), | ||
| 157 | KEY(0, 2, KEY_ENTER), | ||
| 158 | |||
| 159 | KEY(1, 0, KEY_F2), | ||
| 160 | KEY(1, 1, KEY_F3), | ||
| 161 | KEY(1, 2, KEY_F4), | ||
| 162 | |||
| 163 | KEY(2, 0, KEY_UP), | ||
| 164 | KEY(2, 2, KEY_DOWN), | ||
| 165 | |||
| 166 | KEY(3, 0, KEY_RIGHT), | ||
| 167 | KEY(3, 2, KEY_LEFT), | ||
| 168 | |||
| 169 | }; | ||
| 170 | |||
| 171 | static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = { | ||
| 172 | .matrix_key_rows = 4, | ||
| 173 | .matrix_key_cols = 3, | ||
| 174 | .matrix_key_map = palmtx_matrix_keys, | ||
| 175 | .matrix_key_map_size = ARRAY_SIZE(palmtx_matrix_keys), | ||
| 176 | |||
| 177 | .debounce_interval = 30, | ||
| 178 | }; | ||
| 179 | |||
| 180 | /****************************************************************************** | ||
| 181 | * GPIO keys | ||
| 182 | ******************************************************************************/ | ||
| 183 | static struct gpio_keys_button palmtx_pxa_buttons[] = { | ||
| 184 | {KEY_F8, GPIO_NR_PALMTX_HOTSYNC_BUTTON_N, 1, "HotSync Button" }, | ||
| 185 | }; | ||
| 186 | |||
| 187 | static struct gpio_keys_platform_data palmtx_pxa_keys_data = { | ||
| 188 | .buttons = palmtx_pxa_buttons, | ||
| 189 | .nbuttons = ARRAY_SIZE(palmtx_pxa_buttons), | ||
| 190 | }; | ||
| 191 | |||
| 192 | static struct platform_device palmtx_pxa_keys = { | ||
| 193 | .name = "gpio-keys", | ||
| 194 | .id = -1, | ||
| 195 | .dev = { | ||
| 196 | .platform_data = &palmtx_pxa_keys_data, | ||
| 197 | }, | ||
| 198 | }; | ||
| 199 | |||
| 200 | /****************************************************************************** | ||
| 201 | * Backlight | ||
| 202 | ******************************************************************************/ | ||
| 203 | static int palmtx_backlight_init(struct device *dev) | ||
| 204 | { | ||
| 205 | int ret; | ||
| 206 | |||
| 207 | ret = gpio_request(GPIO_NR_PALMTX_BL_POWER, "BL POWER"); | ||
| 208 | if (ret) | ||
| 209 | goto err; | ||
| 210 | ret = gpio_request(GPIO_NR_PALMTX_LCD_POWER, "LCD POWER"); | ||
| 211 | if (ret) | ||
| 212 | goto err2; | ||
| 213 | |||
| 214 | return 0; | ||
| 215 | err2: | ||
| 216 | gpio_free(GPIO_NR_PALMTX_BL_POWER); | ||
| 217 | err: | ||
| 218 | return ret; | ||
| 219 | } | ||
| 220 | |||
| 221 | static int palmtx_backlight_notify(int brightness) | ||
| 222 | { | ||
| 223 | gpio_set_value(GPIO_NR_PALMTX_BL_POWER, brightness); | ||
| 224 | gpio_set_value(GPIO_NR_PALMTX_LCD_POWER, brightness); | ||
| 225 | return brightness; | ||
| 226 | } | ||
| 227 | |||
| 228 | static void palmtx_backlight_exit(struct device *dev) | ||
| 229 | { | ||
| 230 | gpio_free(GPIO_NR_PALMTX_BL_POWER); | ||
| 231 | gpio_free(GPIO_NR_PALMTX_LCD_POWER); | ||
| 232 | } | ||
| 233 | |||
| 234 | static struct platform_pwm_backlight_data palmtx_backlight_data = { | ||
| 235 | .pwm_id = 0, | ||
| 236 | .max_brightness = PALMTX_MAX_INTENSITY, | ||
| 237 | .dft_brightness = PALMTX_MAX_INTENSITY, | ||
| 238 | .pwm_period_ns = PALMTX_PERIOD_NS, | ||
| 239 | .init = palmtx_backlight_init, | ||
| 240 | .notify = palmtx_backlight_notify, | ||
| 241 | .exit = palmtx_backlight_exit, | ||
| 242 | }; | ||
| 243 | |||
| 244 | static struct platform_device palmtx_backlight = { | ||
| 245 | .name = "pwm-backlight", | ||
| 246 | .dev = { | ||
| 247 | .parent = &pxa27x_device_pwm0.dev, | ||
| 248 | .platform_data = &palmtx_backlight_data, | ||
| 249 | }, | ||
| 250 | }; | ||
| 251 | |||
| 252 | /****************************************************************************** | ||
| 253 | * IrDA | ||
| 254 | ******************************************************************************/ | ||
| 255 | static void palmtx_irda_transceiver_mode(struct device *dev, int mode) | ||
| 256 | { | ||
| 257 | gpio_set_value(GPIO_NR_PALMTX_IR_DISABLE, mode & IR_OFF); | ||
| 258 | pxa2xx_transceiver_mode(dev, mode); | ||
| 259 | } | ||
| 260 | |||
| 261 | static struct pxaficp_platform_data palmtx_ficp_platform_data = { | ||
| 262 | .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, | ||
| 263 | .transceiver_mode = palmtx_irda_transceiver_mode, | ||
| 264 | }; | ||
| 265 | |||
| 266 | /****************************************************************************** | ||
| 267 | * UDC | ||
| 268 | ******************************************************************************/ | ||
| 269 | static void palmtx_udc_command(int cmd) | ||
| 270 | { | ||
| 271 | gpio_set_value(GPIO_NR_PALMTX_USB_POWER, !cmd); | ||
| 272 | udelay(50); | ||
| 273 | gpio_set_value(GPIO_NR_PALMTX_USB_PULLUP, !cmd); | ||
| 274 | } | ||
| 275 | |||
| 276 | static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = { | ||
| 277 | .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N, | ||
| 278 | .gpio_vbus_inverted = 1, | ||
| 279 | .udc_command = palmtx_udc_command, | ||
| 280 | }; | ||
| 281 | |||
| 282 | /****************************************************************************** | ||
| 283 | * Power supply | ||
| 284 | ******************************************************************************/ | ||
| 285 | static int power_supply_init(struct device *dev) | ||
| 286 | { | ||
| 287 | int ret; | ||
| 288 | |||
| 289 | ret = gpio_request(GPIO_NR_PALMTX_POWER_DETECT, "CABLE_STATE_AC"); | ||
| 290 | if (ret) | ||
| 291 | goto err_cs_ac; | ||
| 292 | |||
| 293 | ret = gpio_request(GPIO_NR_PALMTX_USB_DETECT_N, "CABLE_STATE_USB"); | ||
| 294 | if (ret) | ||
| 295 | goto err_cs_usb; | ||
| 296 | |||
| 297 | return 0; | ||
| 298 | |||
| 299 | err_cs_usb: | ||
| 300 | gpio_free(GPIO_NR_PALMTX_POWER_DETECT); | ||
| 301 | err_cs_ac: | ||
| 302 | return ret; | ||
| 303 | } | ||
| 304 | |||
| 305 | static int palmtx_is_ac_online(void) | ||
| 306 | { | ||
| 307 | return gpio_get_value(GPIO_NR_PALMTX_POWER_DETECT); | ||
| 308 | } | ||
| 309 | |||
| 310 | static int palmtx_is_usb_online(void) | ||
| 311 | { | ||
| 312 | return !gpio_get_value(GPIO_NR_PALMTX_USB_DETECT_N); | ||
| 313 | } | ||
| 314 | |||
| 315 | static void power_supply_exit(struct device *dev) | ||
| 316 | { | ||
| 317 | gpio_free(GPIO_NR_PALMTX_USB_DETECT_N); | ||
| 318 | gpio_free(GPIO_NR_PALMTX_POWER_DETECT); | ||
| 319 | } | ||
| 320 | |||
| 321 | static char *palmtx_supplicants[] = { | ||
| 322 | "main-battery", | ||
| 323 | }; | ||
| 324 | |||
| 325 | static struct pda_power_pdata power_supply_info = { | ||
| 326 | .init = power_supply_init, | ||
| 327 | .is_ac_online = palmtx_is_ac_online, | ||
| 328 | .is_usb_online = palmtx_is_usb_online, | ||
| 329 | .exit = power_supply_exit, | ||
| 330 | .supplied_to = palmtx_supplicants, | ||
| 331 | .num_supplicants = ARRAY_SIZE(palmtx_supplicants), | ||
| 332 | }; | ||
| 333 | |||
| 334 | static struct platform_device power_supply = { | ||
| 335 | .name = "pda-power", | ||
| 336 | .id = -1, | ||
| 337 | .dev = { | ||
| 338 | .platform_data = &power_supply_info, | ||
| 339 | }, | ||
| 340 | }; | ||
| 341 | |||
| 342 | /****************************************************************************** | ||
| 343 | * Framebuffer | ||
| 344 | ******************************************************************************/ | ||
| 345 | static struct pxafb_mode_info palmtx_lcd_modes[] = { | ||
| 346 | { | ||
| 347 | .pixclock = 57692, | ||
| 348 | .xres = 320, | ||
| 349 | .yres = 480, | ||
| 350 | .bpp = 16, | ||
| 351 | |||
| 352 | .left_margin = 32, | ||
| 353 | .right_margin = 1, | ||
| 354 | .upper_margin = 7, | ||
| 355 | .lower_margin = 1, | ||
| 356 | |||
| 357 | .hsync_len = 4, | ||
| 358 | .vsync_len = 1, | ||
| 359 | }, | ||
| 360 | }; | ||
| 361 | |||
| 362 | static struct pxafb_mach_info palmtx_lcd_screen = { | ||
| 363 | .modes = palmtx_lcd_modes, | ||
| 364 | .num_modes = ARRAY_SIZE(palmtx_lcd_modes), | ||
| 365 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, | ||
| 366 | }; | ||
| 367 | |||
| 368 | /****************************************************************************** | ||
| 369 | * Machine init | ||
| 370 | ******************************************************************************/ | ||
| 371 | static struct platform_device *devices[] __initdata = { | ||
| 372 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
| 373 | &palmtx_pxa_keys, | ||
| 374 | #endif | ||
| 375 | &palmtx_backlight, | ||
| 376 | &power_supply, | ||
| 377 | }; | ||
| 378 | |||
| 379 | static struct map_desc palmtx_io_desc[] __initdata = { | ||
| 380 | { | ||
| 381 | .virtual = PALMTX_PCMCIA_VIRT, | ||
| 382 | .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS), | ||
| 383 | .length = PALMTX_PCMCIA_SIZE, | ||
| 384 | .type = MT_DEVICE | ||
| 385 | }, | ||
| 386 | }; | ||
| 387 | |||
| 388 | static void __init palmtx_map_io(void) | ||
| 389 | { | ||
| 390 | pxa_map_io(); | ||
| 391 | iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc)); | ||
| 392 | } | ||
| 393 | |||
| 394 | static void __init palmtx_init(void) | ||
| 395 | { | ||
| 396 | pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); | ||
| 397 | |||
| 398 | set_pxa_fb_info(&palmtx_lcd_screen); | ||
| 399 | pxa_set_mci_info(&palmtx_mci_platform_data); | ||
| 400 | pxa_set_udc_info(&palmtx_udc_info); | ||
| 401 | pxa_set_ac97_info(NULL); | ||
| 402 | pxa_set_ficp_info(&palmtx_ficp_platform_data); | ||
| 403 | pxa_set_keypad_info(&palmtx_keypad_platform_data); | ||
| 404 | |||
| 405 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 406 | } | ||
| 407 | |||
| 408 | MACHINE_START(PALMTX, "Palm T|X") | ||
| 409 | .phys_io = PALMTX_PHYS_IO_START, | ||
| 410 | .io_pg_offst = io_p2v(0x40000000), | ||
| 411 | .boot_params = 0xa0000100, | ||
| 412 | .map_io = palmtx_map_io, | ||
| 413 | .init_irq = pxa27x_init_irq, | ||
| 414 | .timer = &pxa_timer, | ||
| 415 | .init_machine = palmtx_init | ||
| 416 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c index 3b945eb0aee3..377f3be8ce57 100644 --- a/arch/arm/mach-pxa/pcm027.c +++ b/arch/arm/mach-pxa/pcm027.c | |||
| @@ -24,7 +24,9 @@ | |||
| 24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
| 26 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
| 27 | #include <linux/spi/max7301.h> | ||
| 27 | #include <linux/leds.h> | 28 | #include <linux/leds.h> |
| 29 | |||
| 28 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
| 29 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
| 30 | #include <asm/arch/hardware.h> | 32 | #include <asm/arch/hardware.h> |
| @@ -108,6 +110,32 @@ static struct platform_device smc91x_device = { | |||
| 108 | .resource = smc91x_resources, | 110 | .resource = smc91x_resources, |
| 109 | }; | 111 | }; |
| 110 | 112 | ||
| 113 | /* | ||
| 114 | * SPI host and devices | ||
| 115 | */ | ||
| 116 | static struct pxa2xx_spi_master pxa_ssp_master_info = { | ||
| 117 | .num_chipselect = 1, | ||
| 118 | }; | ||
| 119 | |||
| 120 | static struct max7301_platform_data max7301_info = { | ||
| 121 | .base = -1, | ||
| 122 | }; | ||
| 123 | |||
| 124 | /* bus_num must match id in pxa2xx_set_spi_info() call */ | ||
| 125 | static struct spi_board_info spi_board_info[] __initdata = { | ||
| 126 | { | ||
| 127 | .modalias = "max7301", | ||
| 128 | .platform_data = &max7301_info, | ||
| 129 | .max_speed_hz = 13000000, | ||
| 130 | .bus_num = 1, | ||
| 131 | .chip_select = 0, | ||
| 132 | .mode = SPI_MODE_0, | ||
| 133 | }, | ||
| 134 | }; | ||
| 135 | |||
| 136 | /* | ||
| 137 | * NOR flash | ||
| 138 | */ | ||
| 111 | static struct physmap_flash_data pcm027_flash_data = { | 139 | static struct physmap_flash_data pcm027_flash_data = { |
| 112 | .width = 4, | 140 | .width = 4, |
| 113 | }; | 141 | }; |
| @@ -190,6 +218,9 @@ static void __init pcm027_init(void) | |||
| 190 | #ifdef CONFIG_MACH_PCM990_BASEBOARD | 218 | #ifdef CONFIG_MACH_PCM990_BASEBOARD |
| 191 | pcm990_baseboard_init(); | 219 | pcm990_baseboard_init(); |
| 192 | #endif | 220 | #endif |
| 221 | |||
| 222 | pxa2xx_set_spi_info(1, &pxa_ssp_master_info); | ||
| 223 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
| 193 | } | 224 | } |
| 194 | 225 | ||
| 195 | static void __init pcm027_map_io(void) | 226 | static void __init pcm027_map_io(void) |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 5d87c7c866e4..30023b00e476 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
| @@ -33,14 +33,30 @@ | |||
| 33 | #include <asm/arch/camera.h> | 33 | #include <asm/arch/camera.h> |
| 34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
| 35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
| 36 | #include <asm/arch/pxa2xx-gpio.h> | ||
| 37 | #include <asm/arch/audio.h> | 36 | #include <asm/arch/audio.h> |
| 38 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
| 39 | #include <asm/arch/ohci.h> | 38 | #include <asm/arch/ohci.h> |
| 40 | #include <asm/arch/pcm990_baseboard.h> | 39 | #include <asm/arch/pcm990_baseboard.h> |
| 41 | #include <asm/arch/pxafb.h> | 40 | #include <asm/arch/pxafb.h> |
| 41 | #include <asm/arch/mfp-pxa27x.h> | ||
| 42 | 42 | ||
| 43 | #include "devices.h" | 43 | #include "devices.h" |
| 44 | #include "generic.h" | ||
| 45 | |||
| 46 | static unsigned long pcm990_pin_config[] __initdata = { | ||
| 47 | /* MMC */ | ||
| 48 | GPIO32_MMC_CLK, | ||
| 49 | GPIO112_MMC_CMD, | ||
| 50 | GPIO92_MMC_DAT_0, | ||
| 51 | GPIO109_MMC_DAT_1, | ||
| 52 | GPIO110_MMC_DAT_2, | ||
| 53 | GPIO111_MMC_DAT_3, | ||
| 54 | /* USB */ | ||
| 55 | GPIO88_USBH1_PWR, | ||
| 56 | GPIO89_USBH1_PEN, | ||
| 57 | /* PWM0 */ | ||
| 58 | GPIO16_PWM0_OUT, | ||
| 59 | }; | ||
| 44 | 60 | ||
| 45 | /* | 61 | /* |
| 46 | * pcm990_lcd_power - control power supply to the LCD | 62 | * pcm990_lcd_power - control power supply to the LCD |
| @@ -277,16 +293,6 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int, | |||
| 277 | { | 293 | { |
| 278 | int err; | 294 | int err; |
| 279 | 295 | ||
| 280 | /* | ||
| 281 | * enable GPIO for PXA27x MMC controller | ||
| 282 | */ | ||
| 283 | pxa_gpio_mode(GPIO32_MMCCLK_MD); | ||
| 284 | pxa_gpio_mode(GPIO112_MMCCMD_MD); | ||
| 285 | pxa_gpio_mode(GPIO92_MMCDAT0_MD); | ||
| 286 | pxa_gpio_mode(GPIO109_MMCDAT1_MD); | ||
| 287 | pxa_gpio_mode(GPIO110_MMCDAT2_MD); | ||
| 288 | pxa_gpio_mode(GPIO111_MMCDAT3_MD); | ||
| 289 | |||
| 290 | err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED, | 296 | err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED, |
| 291 | "MMC card detect", data); | 297 | "MMC card detect", data); |
| 292 | if (err) | 298 | if (err) |
| @@ -333,8 +339,6 @@ static struct pxamci_platform_data pcm990_mci_platform_data = { | |||
| 333 | */ | 339 | */ |
| 334 | static int pcm990_ohci_init(struct device *dev) | 340 | static int pcm990_ohci_init(struct device *dev) |
| 335 | { | 341 | { |
| 336 | pxa_gpio_mode(PCM990_USB_OVERCURRENT); | ||
| 337 | pxa_gpio_mode(PCM990_USB_PWR_EN); | ||
| 338 | /* | 342 | /* |
| 339 | * disable USB port 2 and 3 | 343 | * disable USB port 2 and 3 |
| 340 | * power sense is active low | 344 | * power sense is active low |
| @@ -361,23 +365,27 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = { | |||
| 361 | * PXA27x Camera specific stuff | 365 | * PXA27x Camera specific stuff |
| 362 | */ | 366 | */ |
| 363 | #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) | 367 | #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) |
| 368 | static unsigned long pcm990_camera_pin_config[] = { | ||
| 369 | /* CIF */ | ||
| 370 | GPIO98_CIF_DD_0, | ||
| 371 | GPIO105_CIF_DD_1, | ||
| 372 | GPIO104_CIF_DD_2, | ||
| 373 | GPIO103_CIF_DD_3, | ||
| 374 | GPIO95_CIF_DD_4, | ||
| 375 | GPIO94_CIF_DD_5, | ||
| 376 | GPIO93_CIF_DD_6, | ||
| 377 | GPIO108_CIF_DD_7, | ||
| 378 | GPIO107_CIF_DD_8, | ||
| 379 | GPIO106_CIF_DD_9, | ||
| 380 | GPIO42_CIF_MCLK, | ||
| 381 | GPIO45_CIF_PCLK, | ||
| 382 | GPIO43_CIF_FV, | ||
| 383 | GPIO44_CIF_LV, | ||
| 384 | }; | ||
| 385 | |||
| 364 | static int pcm990_pxacamera_init(struct device *dev) | 386 | static int pcm990_pxacamera_init(struct device *dev) |
| 365 | { | 387 | { |
| 366 | pxa_gpio_mode(GPIO98_CIF_DD_0_MD); | 388 | pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config)); |
| 367 | pxa_gpio_mode(GPIO105_CIF_DD_1_MD); | ||
| 368 | pxa_gpio_mode(GPIO104_CIF_DD_2_MD); | ||
| 369 | pxa_gpio_mode(GPIO103_CIF_DD_3_MD); | ||
| 370 | pxa_gpio_mode(GPIO95_CIF_DD_4_MD); | ||
| 371 | pxa_gpio_mode(GPIO94_CIF_DD_5_MD); | ||
| 372 | pxa_gpio_mode(GPIO93_CIF_DD_6_MD); | ||
| 373 | pxa_gpio_mode(GPIO108_CIF_DD_7_MD); | ||
| 374 | pxa_gpio_mode(GPIO107_CIF_DD_8_MD); | ||
| 375 | pxa_gpio_mode(GPIO106_CIF_DD_9_MD); | ||
| 376 | pxa_gpio_mode(GPIO42_CIF_MCLK_MD); | ||
| 377 | pxa_gpio_mode(GPIO45_CIF_PCLK_MD); | ||
| 378 | pxa_gpio_mode(GPIO43_CIF_FV_MD); | ||
| 379 | pxa_gpio_mode(GPIO44_CIF_LV_MD); | ||
| 380 | |||
| 381 | return 0; | 389 | return 0; |
| 382 | } | 390 | } |
| 383 | 391 | ||
| @@ -449,8 +457,10 @@ static struct map_desc pcm990_io_desc[] __initdata = { | |||
| 449 | */ | 457 | */ |
| 450 | void __init pcm990_baseboard_init(void) | 458 | void __init pcm990_baseboard_init(void) |
| 451 | { | 459 | { |
| 460 | pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_pin_config)); | ||
| 461 | |||
| 452 | /* register CPLD access */ | 462 | /* register CPLD access */ |
| 453 | iotable_init(pcm990_io_desc, ARRAY_SIZE(pcm990_io_desc)); | 463 | iotable_init(ARRAY_AND_SIZE(pcm990_io_desc)); |
| 454 | 464 | ||
| 455 | /* register CPLD's IRQ controller */ | 465 | /* register CPLD's IRQ controller */ |
| 456 | pcm990_init_irq(); | 466 | pcm990_init_irq(); |
| @@ -458,7 +468,6 @@ void __init pcm990_baseboard_init(void) | |||
| 458 | #ifndef CONFIG_PCM990_DISPLAY_NONE | 468 | #ifndef CONFIG_PCM990_DISPLAY_NONE |
| 459 | set_pxa_fb_info(&pcm990_fbinfo); | 469 | set_pxa_fb_info(&pcm990_fbinfo); |
| 460 | #endif | 470 | #endif |
| 461 | pxa_gpio_mode(GPIO16_PWM0_MD); | ||
| 462 | platform_device_register(&pcm990_backlight_device); | 471 | platform_device_register(&pcm990_backlight_device); |
| 463 | 472 | ||
| 464 | /* MMC */ | 473 | /* MMC */ |
| @@ -473,9 +482,8 @@ void __init pcm990_baseboard_init(void) | |||
| 473 | #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) | 482 | #if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) |
| 474 | pxa_set_camera_info(&pcm990_pxacamera_platform_data); | 483 | pxa_set_camera_info(&pcm990_pxacamera_platform_data); |
| 475 | 484 | ||
| 476 | i2c_register_board_info(0, pcm990_i2c_devices, | 485 | i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices)); |
| 477 | ARRAY_SIZE(pcm990_i2c_devices)); | ||
| 478 | #endif | 486 | #endif |
| 479 | 487 | ||
| 480 | printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n"); | 488 | printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n"); |
| 481 | } | 489 | } |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index f81c10cafd48..39612cfa0b4d 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
| @@ -267,6 +267,7 @@ static void poodle_irda_transceiver_mode(struct device *dev, int mode) | |||
| 267 | } else { | 267 | } else { |
| 268 | GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); | 268 | GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); |
| 269 | } | 269 | } |
| 270 | pxa2xx_transceiver_mode(dev, mode); | ||
| 270 | } | 271 | } |
| 271 | 272 | ||
| 272 | static struct pxaficp_platform_data poodle_ficp_platform_data = { | 273 | static struct pxaficp_platform_data poodle_ficp_platform_data = { |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 4cd50e3005e9..c5b845b935bb 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
| @@ -109,6 +109,52 @@ static const struct clkops clk_pxa25x_lcd_ops = { | |||
| 109 | .getrate = clk_pxa25x_lcd_getrate, | 109 | .getrate = clk_pxa25x_lcd_getrate, |
| 110 | }; | 110 | }; |
| 111 | 111 | ||
| 112 | static unsigned long gpio12_config_32k[] = { | ||
| 113 | GPIO12_32KHz, | ||
| 114 | }; | ||
| 115 | |||
| 116 | static unsigned long gpio12_config_gpio[] = { | ||
| 117 | GPIO12_GPIO, | ||
| 118 | }; | ||
| 119 | |||
| 120 | static void clk_gpio12_enable(struct clk *clk) | ||
| 121 | { | ||
| 122 | pxa2xx_mfp_config(gpio12_config_32k, 1); | ||
| 123 | } | ||
| 124 | |||
| 125 | static void clk_gpio12_disable(struct clk *clk) | ||
| 126 | { | ||
| 127 | pxa2xx_mfp_config(gpio12_config_gpio, 1); | ||
| 128 | } | ||
| 129 | |||
| 130 | static const struct clkops clk_pxa25x_gpio12_ops = { | ||
| 131 | .enable = clk_gpio12_enable, | ||
| 132 | .disable = clk_gpio12_disable, | ||
| 133 | }; | ||
| 134 | |||
| 135 | static unsigned long gpio11_config_3m6[] = { | ||
| 136 | GPIO11_3_6MHz, | ||
| 137 | }; | ||
| 138 | |||
| 139 | static unsigned long gpio11_config_gpio[] = { | ||
| 140 | GPIO11_GPIO, | ||
| 141 | }; | ||
| 142 | |||
| 143 | static void clk_gpio11_enable(struct clk *clk) | ||
| 144 | { | ||
| 145 | pxa2xx_mfp_config(gpio11_config_3m6, 1); | ||
| 146 | } | ||
| 147 | |||
| 148 | static void clk_gpio11_disable(struct clk *clk) | ||
| 149 | { | ||
| 150 | pxa2xx_mfp_config(gpio11_config_gpio, 1); | ||
| 151 | } | ||
| 152 | |||
| 153 | static const struct clkops clk_pxa25x_gpio11_ops = { | ||
| 154 | .enable = clk_gpio11_enable, | ||
| 155 | .disable = clk_gpio11_disable, | ||
| 156 | }; | ||
| 157 | |||
| 112 | /* | 158 | /* |
| 113 | * 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz) | 159 | * 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz) |
| 114 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz | 160 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz |
| @@ -128,6 +174,8 @@ static struct clk pxa25x_clks[] = { | |||
| 128 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), | 174 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), |
| 129 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), | 175 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), |
| 130 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev), | 176 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev), |
| 177 | INIT_CLK("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL), | ||
| 178 | INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL), | ||
| 131 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), | 179 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), |
| 132 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), | 180 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), |
| 133 | 181 | ||
| @@ -145,7 +193,10 @@ static struct clk pxa25x_clks[] = { | |||
| 145 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), | 193 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), |
| 146 | }; | 194 | }; |
| 147 | 195 | ||
| 148 | static struct clk gpio7_clk = INIT_CKOTHER("GPIO7_CK", &pxa25x_clks[4], NULL); | 196 | static struct clk pxa2xx_clk_aliases[] = { |
| 197 | INIT_CKOTHER("GPIO7_CLK", &pxa25x_clks[4], NULL), | ||
| 198 | INIT_CKOTHER("SA1111_CLK", &pxa25x_clks[5], NULL), | ||
| 199 | }; | ||
| 149 | 200 | ||
| 150 | #ifdef CONFIG_PM | 201 | #ifdef CONFIG_PM |
| 151 | 202 | ||
| @@ -293,7 +344,7 @@ static int __init pxa25x_init(void) | |||
| 293 | int i, ret = 0; | 344 | int i, ret = 0; |
| 294 | 345 | ||
| 295 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | 346 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ |
| 296 | if (cpu_is_pxa25x()) | 347 | if (cpu_is_pxa255()) |
| 297 | clks_register(&pxa25x_hwuart_clk, 1); | 348 | clks_register(&pxa25x_hwuart_clk, 1); |
| 298 | 349 | ||
| 299 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) { | 350 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) { |
| @@ -317,10 +368,10 @@ static int __init pxa25x_init(void) | |||
| 317 | } | 368 | } |
| 318 | 369 | ||
| 319 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | 370 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ |
| 320 | if (cpu_is_pxa25x()) | 371 | if (cpu_is_pxa255()) |
| 321 | ret = platform_device_register(&pxa_device_hwuart); | 372 | ret = platform_device_register(&pxa_device_hwuart); |
| 322 | 373 | ||
| 323 | clks_register(&gpio7_clk, 1); | 374 | clks_register(pxa2xx_clk_aliases, ARRAY_SIZE(pxa2xx_clk_aliases)); |
| 324 | 375 | ||
| 325 | return ret; | 376 | return ret; |
| 326 | } | 377 | } |
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index 0a0d3877f212..da92e9733886 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c | |||
| @@ -15,10 +15,16 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
| 18 | #include <linux/platform_device.h> | ||
| 18 | 19 | ||
| 19 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
| 21 | #include <asm/arch/pxa3xx-regs.h> | ||
| 20 | #include <asm/arch/mfp-pxa300.h> | 22 | #include <asm/arch/mfp-pxa300.h> |
| 21 | 23 | ||
| 24 | #include "generic.h" | ||
| 25 | #include "devices.h" | ||
| 26 | #include "clock.h" | ||
| 27 | |||
| 22 | static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = { | 28 | static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = { |
| 23 | 29 | ||
| 24 | MFP_ADDR_X(GPIO0, GPIO2, 0x00b4), | 30 | MFP_ADDR_X(GPIO0, GPIO2, 0x00b4), |
| @@ -79,15 +85,26 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = { | |||
| 79 | MFP_ADDR_END, | 85 | MFP_ADDR_END, |
| 80 | }; | 86 | }; |
| 81 | 87 | ||
| 88 | static struct clk common_clks[] = { | ||
| 89 | PXA3xx_CKEN("NANDCLK", NAND, 156000000, 0, &pxa3xx_device_nand.dev), | ||
| 90 | }; | ||
| 91 | |||
| 92 | static struct clk pxa310_clks[] = { | ||
| 93 | PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev), | ||
| 94 | }; | ||
| 95 | |||
| 82 | static int __init pxa300_init(void) | 96 | static int __init pxa300_init(void) |
| 83 | { | 97 | { |
| 84 | if (cpu_is_pxa300() || cpu_is_pxa310()) { | 98 | if (cpu_is_pxa300() || cpu_is_pxa310()) { |
| 85 | pxa3xx_init_mfp(); | 99 | pxa3xx_init_mfp(); |
| 86 | pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); | 100 | pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); |
| 101 | clks_register(ARRAY_AND_SIZE(common_clks)); | ||
| 87 | } | 102 | } |
| 88 | 103 | ||
| 89 | if (cpu_is_pxa310()) | 104 | if (cpu_is_pxa310()) { |
| 90 | pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); | 105 | pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); |
| 106 | clks_register(ARRAY_AND_SIZE(pxa310_clks)); | ||
| 107 | } | ||
| 91 | 108 | ||
| 92 | return 0; | 109 | return 0; |
| 93 | } | 110 | } |
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index 74128eb8f8d0..c557c23a1efe 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c | |||
| @@ -15,11 +15,17 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
| 18 | #include <linux/platform_device.h> | ||
| 18 | 19 | ||
| 19 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
| 20 | #include <asm/arch/mfp.h> | 21 | #include <asm/arch/mfp.h> |
| 22 | #include <asm/arch/pxa3xx-regs.h> | ||
| 21 | #include <asm/arch/mfp-pxa320.h> | 23 | #include <asm/arch/mfp-pxa320.h> |
| 22 | 24 | ||
| 25 | #include "generic.h" | ||
| 26 | #include "devices.h" | ||
| 27 | #include "clock.h" | ||
| 28 | |||
| 23 | static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { | 29 | static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { |
| 24 | 30 | ||
| 25 | MFP_ADDR_X(GPIO0, GPIO4, 0x0124), | 31 | MFP_ADDR_X(GPIO0, GPIO4, 0x0124), |
| @@ -74,16 +80,17 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { | |||
| 74 | MFP_ADDR_END, | 80 | MFP_ADDR_END, |
| 75 | }; | 81 | }; |
| 76 | 82 | ||
| 77 | static void __init pxa320_init_mfp(void) | 83 | static struct clk pxa320_clks[] = { |
| 78 | { | 84 | PXA3xx_CKEN("NANDCLK", NAND, 104000000, 0, &pxa3xx_device_nand.dev), |
| 79 | pxa3xx_init_mfp(); | 85 | }; |
| 80 | pxa3xx_mfp_init_addr(pxa320_mfp_addr_map); | ||
| 81 | } | ||
| 82 | 86 | ||
| 83 | static int __init pxa320_init(void) | 87 | static int __init pxa320_init(void) |
| 84 | { | 88 | { |
| 85 | if (cpu_is_pxa320()) | 89 | if (cpu_is_pxa320()) { |
| 86 | pxa320_init_mfp(); | 90 | pxa3xx_init_mfp(); |
| 91 | pxa3xx_mfp_init_addr(pxa320_mfp_addr_map); | ||
| 92 | clks_register(ARRAY_AND_SIZE(pxa320_clks)); | ||
| 93 | } | ||
| 87 | 94 | ||
| 88 | return 0; | 95 | return 0; |
| 89 | } | 96 | } |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 15685d2b8f8c..f491025a0c82 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -144,7 +144,7 @@ static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk) | |||
| 144 | return hsio_clk; | 144 | return hsio_clk; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | static void clk_pxa3xx_cken_enable(struct clk *clk) | 147 | void clk_pxa3xx_cken_enable(struct clk *clk) |
| 148 | { | 148 | { |
| 149 | unsigned long mask = 1ul << (clk->cken & 0x1f); | 149 | unsigned long mask = 1ul << (clk->cken & 0x1f); |
| 150 | 150 | ||
| @@ -154,7 +154,7 @@ static void clk_pxa3xx_cken_enable(struct clk *clk) | |||
| 154 | CKENB |= mask; | 154 | CKENB |= mask; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | static void clk_pxa3xx_cken_disable(struct clk *clk) | 157 | void clk_pxa3xx_cken_disable(struct clk *clk) |
| 158 | { | 158 | { |
| 159 | unsigned long mask = 1ul << (clk->cken & 0x1f); | 159 | unsigned long mask = 1ul << (clk->cken & 0x1f); |
| 160 | 160 | ||
| @@ -164,7 +164,7 @@ static void clk_pxa3xx_cken_disable(struct clk *clk) | |||
| 164 | CKENB &= ~mask; | 164 | CKENB &= ~mask; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | static const struct clkops clk_pxa3xx_cken_ops = { | 167 | const struct clkops clk_pxa3xx_cken_ops = { |
| 168 | .enable = clk_pxa3xx_cken_enable, | 168 | .enable = clk_pxa3xx_cken_enable, |
| 169 | .disable = clk_pxa3xx_cken_disable, | 169 | .disable = clk_pxa3xx_cken_disable, |
| 170 | }; | 170 | }; |
| @@ -196,24 +196,6 @@ static const struct clkops clk_pout_ops = { | |||
| 196 | .disable = clk_pout_disable, | 196 | .disable = clk_pout_disable, |
| 197 | }; | 197 | }; |
| 198 | 198 | ||
| 199 | #define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ | ||
| 200 | { \ | ||
| 201 | .name = _name, \ | ||
| 202 | .dev = _dev, \ | ||
| 203 | .ops = &clk_pxa3xx_cken_ops, \ | ||
| 204 | .rate = _rate, \ | ||
| 205 | .cken = CKEN_##_cken, \ | ||
| 206 | .delay = _delay, \ | ||
| 207 | } | ||
| 208 | |||
| 209 | #define PXA3xx_CK(_name, _cken, _ops, _dev) \ | ||
| 210 | { \ | ||
| 211 | .name = _name, \ | ||
| 212 | .dev = _dev, \ | ||
| 213 | .ops = _ops, \ | ||
| 214 | .cken = CKEN_##_cken, \ | ||
| 215 | } | ||
| 216 | |||
| 217 | static struct clk pxa3xx_clks[] = { | 199 | static struct clk pxa3xx_clks[] = { |
| 218 | { | 200 | { |
| 219 | .name = "CLK_POUT", | 201 | .name = "CLK_POUT", |
| @@ -244,7 +226,6 @@ static struct clk pxa3xx_clks[] = { | |||
| 244 | 226 | ||
| 245 | PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), | 227 | PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), |
| 246 | PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), | 228 | PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), |
| 247 | PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev), | ||
| 248 | }; | 229 | }; |
| 249 | 230 | ||
| 250 | #ifdef CONFIG_PM | 231 | #ifdef CONFIG_PM |
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c new file mode 100644 index 000000000000..9503897d049c --- /dev/null +++ b/arch/arm/mach-pxa/pxa930.c | |||
| @@ -0,0 +1,190 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-pxa/pxa930.c | ||
| 3 | * | ||
| 4 | * Code specific to PXA930 | ||
| 5 | * | ||
| 6 | * Copyright (C) 2007-2008 Marvell Internation Ltd. | ||
| 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 | #include <linux/module.h> | ||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/platform_device.h> | ||
| 16 | #include <linux/irq.h> | ||
| 17 | #include <linux/dma-mapping.h> | ||
| 18 | |||
| 19 | #include <asm/hardware.h> | ||
| 20 | #include <asm/arch/mfp-pxa930.h> | ||
| 21 | |||
| 22 | static struct pxa3xx_mfp_addr_map pxa930_mfp_addr_map[] __initdata = { | ||
| 23 | |||
| 24 | MFP_ADDR(GPIO0, 0x02e0), | ||
| 25 | MFP_ADDR(GPIO1, 0x02dc), | ||
| 26 | MFP_ADDR(GPIO2, 0x02e8), | ||
| 27 | MFP_ADDR(GPIO3, 0x02d8), | ||
| 28 | MFP_ADDR(GPIO4, 0x02e4), | ||
| 29 | MFP_ADDR(GPIO5, 0x02ec), | ||
| 30 | MFP_ADDR(GPIO6, 0x02f8), | ||
| 31 | MFP_ADDR(GPIO7, 0x02fc), | ||
| 32 | MFP_ADDR(GPIO8, 0x0300), | ||
| 33 | MFP_ADDR(GPIO9, 0x02d4), | ||
| 34 | MFP_ADDR(GPIO10, 0x02f4), | ||
| 35 | MFP_ADDR(GPIO11, 0x02f0), | ||
| 36 | MFP_ADDR(GPIO12, 0x0304), | ||
| 37 | MFP_ADDR(GPIO13, 0x0310), | ||
| 38 | MFP_ADDR(GPIO14, 0x0308), | ||
| 39 | MFP_ADDR(GPIO15, 0x030c), | ||
| 40 | MFP_ADDR(GPIO16, 0x04e8), | ||
| 41 | MFP_ADDR(GPIO17, 0x04f4), | ||
| 42 | MFP_ADDR(GPIO18, 0x04f8), | ||
| 43 | MFP_ADDR(GPIO19, 0x04fc), | ||
| 44 | MFP_ADDR(GPIO20, 0x0518), | ||
| 45 | MFP_ADDR(GPIO21, 0x051c), | ||
| 46 | MFP_ADDR(GPIO22, 0x04ec), | ||
| 47 | MFP_ADDR(GPIO23, 0x0500), | ||
| 48 | MFP_ADDR(GPIO24, 0x04f0), | ||
| 49 | MFP_ADDR(GPIO25, 0x0504), | ||
| 50 | MFP_ADDR(GPIO26, 0x0510), | ||
| 51 | MFP_ADDR(GPIO27, 0x0514), | ||
| 52 | MFP_ADDR(GPIO28, 0x0520), | ||
| 53 | MFP_ADDR(GPIO29, 0x0600), | ||
| 54 | MFP_ADDR(GPIO30, 0x0618), | ||
| 55 | MFP_ADDR(GPIO31, 0x0610), | ||
| 56 | MFP_ADDR(GPIO32, 0x060c), | ||
| 57 | MFP_ADDR(GPIO33, 0x061c), | ||
| 58 | MFP_ADDR(GPIO34, 0x0620), | ||
| 59 | MFP_ADDR(GPIO35, 0x0628), | ||
| 60 | MFP_ADDR(GPIO36, 0x062c), | ||
| 61 | MFP_ADDR(GPIO37, 0x0630), | ||
| 62 | MFP_ADDR(GPIO38, 0x0634), | ||
| 63 | MFP_ADDR(GPIO39, 0x0638), | ||
| 64 | MFP_ADDR(GPIO40, 0x063c), | ||
| 65 | MFP_ADDR(GPIO41, 0x0614), | ||
| 66 | MFP_ADDR(GPIO42, 0x0624), | ||
| 67 | MFP_ADDR(GPIO43, 0x0608), | ||
| 68 | MFP_ADDR(GPIO44, 0x0604), | ||
| 69 | MFP_ADDR(GPIO45, 0x050c), | ||
| 70 | MFP_ADDR(GPIO46, 0x0508), | ||
| 71 | MFP_ADDR(GPIO47, 0x02bc), | ||
| 72 | MFP_ADDR(GPIO48, 0x02b4), | ||
| 73 | MFP_ADDR(GPIO49, 0x02b8), | ||
| 74 | MFP_ADDR(GPIO50, 0x02c8), | ||
| 75 | MFP_ADDR(GPIO51, 0x02c0), | ||
| 76 | MFP_ADDR(GPIO52, 0x02c4), | ||
| 77 | MFP_ADDR(GPIO53, 0x02d0), | ||
| 78 | MFP_ADDR(GPIO54, 0x02cc), | ||
| 79 | MFP_ADDR(GPIO55, 0x029c), | ||
| 80 | MFP_ADDR(GPIO56, 0x02a0), | ||
| 81 | MFP_ADDR(GPIO57, 0x0294), | ||
| 82 | MFP_ADDR(GPIO58, 0x0298), | ||
| 83 | MFP_ADDR(GPIO59, 0x02a4), | ||
| 84 | MFP_ADDR(GPIO60, 0x02a8), | ||
| 85 | MFP_ADDR(GPIO61, 0x02b0), | ||
| 86 | MFP_ADDR(GPIO62, 0x02ac), | ||
| 87 | MFP_ADDR(GPIO63, 0x0640), | ||
| 88 | MFP_ADDR(GPIO64, 0x065c), | ||
| 89 | MFP_ADDR(GPIO65, 0x0648), | ||
| 90 | MFP_ADDR(GPIO66, 0x0644), | ||
| 91 | MFP_ADDR(GPIO67, 0x0674), | ||
| 92 | MFP_ADDR(GPIO68, 0x0658), | ||
| 93 | MFP_ADDR(GPIO69, 0x0654), | ||
| 94 | MFP_ADDR(GPIO70, 0x0660), | ||
| 95 | MFP_ADDR(GPIO71, 0x0668), | ||
| 96 | MFP_ADDR(GPIO72, 0x0664), | ||
| 97 | MFP_ADDR(GPIO73, 0x0650), | ||
| 98 | MFP_ADDR(GPIO74, 0x066c), | ||
| 99 | MFP_ADDR(GPIO75, 0x064c), | ||
| 100 | MFP_ADDR(GPIO76, 0x0670), | ||
| 101 | MFP_ADDR(GPIO77, 0x0678), | ||
| 102 | MFP_ADDR(GPIO78, 0x067c), | ||
| 103 | MFP_ADDR(GPIO79, 0x0694), | ||
| 104 | MFP_ADDR(GPIO80, 0x069c), | ||
| 105 | MFP_ADDR(GPIO81, 0x06a0), | ||
| 106 | MFP_ADDR(GPIO82, 0x06a4), | ||
| 107 | MFP_ADDR(GPIO83, 0x0698), | ||
| 108 | MFP_ADDR(GPIO84, 0x06bc), | ||
| 109 | MFP_ADDR(GPIO85, 0x06b4), | ||
| 110 | MFP_ADDR(GPIO86, 0x06b0), | ||
| 111 | MFP_ADDR(GPIO87, 0x06c0), | ||
| 112 | MFP_ADDR(GPIO88, 0x06c4), | ||
| 113 | MFP_ADDR(GPIO89, 0x06ac), | ||
| 114 | MFP_ADDR(GPIO90, 0x0680), | ||
| 115 | MFP_ADDR(GPIO91, 0x0684), | ||
| 116 | MFP_ADDR(GPIO92, 0x0688), | ||
| 117 | MFP_ADDR(GPIO93, 0x0690), | ||
| 118 | MFP_ADDR(GPIO94, 0x068c), | ||
| 119 | MFP_ADDR(GPIO95, 0x06a8), | ||
| 120 | MFP_ADDR(GPIO96, 0x06b8), | ||
| 121 | MFP_ADDR(GPIO97, 0x0410), | ||
| 122 | MFP_ADDR(GPIO98, 0x0418), | ||
| 123 | MFP_ADDR(GPIO99, 0x041c), | ||
| 124 | MFP_ADDR(GPIO100, 0x0414), | ||
| 125 | MFP_ADDR(GPIO101, 0x0408), | ||
| 126 | MFP_ADDR(GPIO102, 0x0324), | ||
| 127 | MFP_ADDR(GPIO103, 0x040c), | ||
| 128 | MFP_ADDR(GPIO104, 0x0400), | ||
| 129 | MFP_ADDR(GPIO105, 0x0328), | ||
| 130 | MFP_ADDR(GPIO106, 0x0404), | ||
| 131 | |||
| 132 | MFP_ADDR(nXCVREN, 0x0204), | ||
| 133 | MFP_ADDR(DF_CLE_nOE, 0x020c), | ||
| 134 | MFP_ADDR(DF_nADV1_ALE, 0x0218), | ||
| 135 | MFP_ADDR(DF_SCLK_E, 0x0214), | ||
| 136 | MFP_ADDR(DF_SCLK_S, 0x0210), | ||
| 137 | MFP_ADDR(nBE0, 0x021c), | ||
| 138 | MFP_ADDR(nBE1, 0x0220), | ||
| 139 | MFP_ADDR(DF_nADV2_ALE, 0x0224), | ||
| 140 | MFP_ADDR(DF_INT_RnB, 0x0228), | ||
| 141 | MFP_ADDR(DF_nCS0, 0x022c), | ||
| 142 | MFP_ADDR(DF_nCS1, 0x0230), | ||
| 143 | MFP_ADDR(nLUA, 0x0254), | ||
| 144 | MFP_ADDR(nLLA, 0x0258), | ||
| 145 | MFP_ADDR(DF_nWE, 0x0234), | ||
| 146 | MFP_ADDR(DF_nRE_nOE, 0x0238), | ||
| 147 | MFP_ADDR(DF_ADDR0, 0x024c), | ||
| 148 | MFP_ADDR(DF_ADDR1, 0x0250), | ||
| 149 | MFP_ADDR(DF_ADDR2, 0x025c), | ||
| 150 | MFP_ADDR(DF_ADDR3, 0x0260), | ||
| 151 | MFP_ADDR(DF_IO0, 0x023c), | ||
| 152 | MFP_ADDR(DF_IO1, 0x0240), | ||
| 153 | MFP_ADDR(DF_IO2, 0x0244), | ||
| 154 | MFP_ADDR(DF_IO3, 0x0248), | ||
| 155 | MFP_ADDR(DF_IO4, 0x0264), | ||
| 156 | MFP_ADDR(DF_IO5, 0x0268), | ||
| 157 | MFP_ADDR(DF_IO6, 0x026c), | ||
| 158 | MFP_ADDR(DF_IO7, 0x0270), | ||
| 159 | MFP_ADDR(DF_IO8, 0x0274), | ||
| 160 | MFP_ADDR(DF_IO9, 0x0278), | ||
| 161 | MFP_ADDR(DF_IO10, 0x027c), | ||
| 162 | MFP_ADDR(DF_IO11, 0x0280), | ||
| 163 | MFP_ADDR(DF_IO12, 0x0284), | ||
| 164 | MFP_ADDR(DF_IO13, 0x0288), | ||
| 165 | MFP_ADDR(DF_IO14, 0x028c), | ||
| 166 | MFP_ADDR(DF_IO15, 0x0290), | ||
| 167 | |||
| 168 | MFP_ADDR(GSIM_UIO, 0x0314), | ||
| 169 | MFP_ADDR(GSIM_UCLK, 0x0318), | ||
| 170 | MFP_ADDR(GSIM_UDET, 0x031c), | ||
| 171 | MFP_ADDR(GSIM_nURST, 0x0320), | ||
| 172 | |||
| 173 | MFP_ADDR(PMIC_INT, 0x06c8), | ||
| 174 | |||
| 175 | MFP_ADDR(RDY, 0x0200), | ||
| 176 | |||
| 177 | MFP_ADDR_END, | ||
| 178 | }; | ||
| 179 | |||
| 180 | static int __init pxa930_init(void) | ||
| 181 | { | ||
| 182 | if (cpu_is_pxa930()) { | ||
| 183 | pxa3xx_init_mfp(); | ||
| 184 | pxa3xx_mfp_init_addr(pxa930_mfp_addr_map); | ||
| 185 | } | ||
| 186 | |||
| 187 | return 0; | ||
| 188 | } | ||
| 189 | |||
| 190 | core_initcall(pxa930_init); | ||
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c new file mode 100644 index 000000000000..9d39dea57ce2 --- /dev/null +++ b/arch/arm/mach-pxa/reset.c | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License version 2 as | ||
| 4 | * published by the Free Software Foundation. | ||
| 5 | */ | ||
| 6 | #include <linux/kernel.h> | ||
| 7 | #include <linux/module.h> | ||
| 8 | #include <linux/delay.h> | ||
| 9 | #include <linux/gpio.h> | ||
| 10 | #include <asm/io.h> | ||
| 11 | #include <asm/proc-fns.h> | ||
| 12 | |||
| 13 | #include <asm/arch/pxa-regs.h> | ||
| 14 | #include <asm/arch/pxa2xx-regs.h> | ||
| 15 | |||
| 16 | static void do_hw_reset(void); | ||
| 17 | |||
| 18 | static int reset_gpio = -1; | ||
| 19 | |||
| 20 | int init_gpio_reset(int gpio) | ||
| 21 | { | ||
| 22 | int rc; | ||
| 23 | |||
| 24 | rc = gpio_request(gpio, "reset generator"); | ||
| 25 | if (rc) { | ||
| 26 | printk(KERN_ERR "Can't request reset_gpio\n"); | ||
| 27 | goto out; | ||
| 28 | } | ||
| 29 | |||
| 30 | rc = gpio_direction_input(gpio); | ||
| 31 | if (rc) { | ||
| 32 | printk(KERN_ERR "Can't configure reset_gpio for input\n"); | ||
| 33 | gpio_free(gpio); | ||
| 34 | goto out; | ||
| 35 | } | ||
| 36 | |||
| 37 | out: | ||
| 38 | if (!rc) | ||
| 39 | reset_gpio = gpio; | ||
| 40 | |||
| 41 | return rc; | ||
| 42 | } | ||
| 43 | |||
| 44 | /* | ||
| 45 | * Trigger GPIO reset. | ||
| 46 | * This covers various types of logic connecting gpio pin | ||
| 47 | * to RESET pins (nRESET or GPIO_RESET): | ||
| 48 | */ | ||
| 49 | static void do_gpio_reset(void) | ||
| 50 | { | ||
| 51 | BUG_ON(reset_gpio == -1); | ||
| 52 | |||
| 53 | /* drive it low */ | ||
| 54 | gpio_direction_output(reset_gpio, 0); | ||
| 55 | mdelay(2); | ||
| 56 | /* rising edge or drive high */ | ||
| 57 | gpio_set_value(reset_gpio, 1); | ||
| 58 | mdelay(2); | ||
| 59 | /* falling edge */ | ||
| 60 | gpio_set_value(reset_gpio, 0); | ||
| 61 | |||
| 62 | /* give it some time */ | ||
| 63 | mdelay(10); | ||
| 64 | |||
| 65 | WARN_ON(1); | ||
| 66 | /* fallback */ | ||
| 67 | do_hw_reset(); | ||
| 68 | } | ||
| 69 | |||
| 70 | static void do_hw_reset(void) | ||
| 71 | { | ||
| 72 | /* Initialize the watchdog and let it fire */ | ||
| 73 | OWER = OWER_WME; | ||
| 74 | OSSR = OSSR_M3; | ||
| 75 | OSMR3 = OSCR + 368640; /* ... in 100 ms */ | ||
| 76 | } | ||
| 77 | |||
| 78 | void arch_reset(char mode) | ||
| 79 | { | ||
| 80 | if (cpu_is_pxa2xx()) | ||
| 81 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
| 82 | |||
| 83 | switch (mode) { | ||
| 84 | case 's': | ||
| 85 | /* Jump into ROM at address 0 */ | ||
| 86 | cpu_reset(0); | ||
| 87 | break; | ||
| 88 | case 'h': | ||
| 89 | do_hw_reset(); | ||
| 90 | break; | ||
| 91 | case 'g': | ||
| 92 | do_gpio_reset(); | ||
| 93 | break; | ||
| 94 | } | ||
| 95 | } | ||
| 96 | |||
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c new file mode 100644 index 000000000000..d02bc6f8bb93 --- /dev/null +++ b/arch/arm/mach-pxa/saar.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-pxa/saar.c | ||
| 3 | * | ||
| 4 | * Support for the Marvell PXA930 Handheld Platform (aka SAAR) | ||
| 5 | * | ||
| 6 | * Copyright (C) 2007-2008 Marvell International Ltd. | ||
| 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 | * publishhed by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/interrupt.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/platform_device.h> | ||
| 18 | #include <linux/clk.h> | ||
| 19 | #include <linux/gpio.h> | ||
| 20 | #include <linux/smc91x.h> | ||
| 21 | |||
| 22 | #include <asm/mach-types.h> | ||
| 23 | #include <asm/mach/arch.h> | ||
| 24 | #include <asm/hardware.h> | ||
| 25 | #include <asm/arch/pxa3xx-regs.h> | ||
| 26 | #include <asm/arch/mfp-pxa930.h> | ||
| 27 | |||
| 28 | #include "devices.h" | ||
| 29 | #include "generic.h" | ||
| 30 | |||
| 31 | /* SAAR MFP configurations */ | ||
| 32 | static mfp_cfg_t saar_mfp_cfg[] __initdata = { | ||
| 33 | /* Ethernet */ | ||
| 34 | DF_nCS1_nCS3, | ||
| 35 | GPIO97_GPIO, | ||
| 36 | }; | ||
| 37 | |||
| 38 | #define SAAR_ETH_PHYS (0x14000000) | ||
| 39 | |||
| 40 | static struct resource smc91x_resources[] = { | ||
| 41 | [0] = { | ||
| 42 | .start = (SAAR_ETH_PHYS + 0x300), | ||
| 43 | .end = (SAAR_ETH_PHYS + 0xfffff), | ||
| 44 | .flags = IORESOURCE_MEM, | ||
| 45 | }, | ||
| 46 | [1] = { | ||
| 47 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO97)), | ||
| 48 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO97)), | ||
| 49 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
| 50 | } | ||
| 51 | }; | ||
| 52 | |||
| 53 | static struct smc91x_platdata saar_smc91x_info = { | ||
| 54 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_USE_DMA, | ||
| 55 | }; | ||
| 56 | |||
| 57 | static struct platform_device smc91x_device = { | ||
| 58 | .name = "smc91x", | ||
| 59 | .id = 0, | ||
| 60 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 61 | .resource = smc91x_resources, | ||
| 62 | .dev = { | ||
| 63 | .platform_data = &saar_smc91x_info, | ||
| 64 | }, | ||
| 65 | }; | ||
| 66 | |||
| 67 | static void __init saar_init(void) | ||
| 68 | { | ||
| 69 | /* initialize MFP configurations */ | ||
| 70 | pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); | ||
| 71 | |||
| 72 | platform_device_register(&smc91x_device); | ||
| 73 | } | ||
| 74 | |||
| 75 | MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)") | ||
| 76 | /* Maintainer: Eric Miao <eric.miao@marvell.com> */ | ||
| 77 | .phys_io = 0x40000000, | ||
| 78 | .boot_params = 0xa0000100, | ||
| 79 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 80 | .map_io = pxa_map_io, | ||
| 81 | .init_irq = pxa3xx_init_irq, | ||
| 82 | .timer = &pxa_timer, | ||
| 83 | .init_machine = saar_init, | ||
| 84 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index e7d0fcd9b43f..762249c03ded 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <asm/arch/pxa-regs.h> | 38 | #include <asm/arch/pxa-regs.h> |
| 39 | #include <asm/arch/pxa2xx-regs.h> | 39 | #include <asm/arch/pxa2xx-regs.h> |
| 40 | #include <asm/arch/pxa2xx-gpio.h> | 40 | #include <asm/arch/pxa2xx-gpio.h> |
| 41 | #include <asm/arch/pxa27x-udc.h> | ||
| 41 | #include <asm/arch/irda.h> | 42 | #include <asm/arch/irda.h> |
| 42 | #include <asm/arch/mmc.h> | 43 | #include <asm/arch/mmc.h> |
| 43 | #include <asm/arch/ohci.h> | 44 | #include <asm/arch/ohci.h> |
| @@ -450,6 +451,7 @@ static void spitz_irda_transceiver_mode(struct device *dev, int mode) | |||
| 450 | set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); | 451 | set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); |
| 451 | else | 452 | else |
| 452 | reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); | 453 | reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); |
| 454 | pxa2xx_transceiver_mode(dev, mode); | ||
| 453 | } | 455 | } |
| 454 | 456 | ||
| 455 | #ifdef CONFIG_MACH_AKITA | 457 | #ifdef CONFIG_MACH_AKITA |
| @@ -459,6 +461,7 @@ static void akita_irda_transceiver_mode(struct device *dev, int mode) | |||
| 459 | akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON); | 461 | akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON); |
| 460 | else | 462 | else |
| 461 | akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON); | 463 | akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON); |
| 464 | pxa2xx_transceiver_mode(dev, mode); | ||
| 462 | } | 465 | } |
| 463 | #endif | 466 | #endif |
| 464 | 467 | ||
| @@ -529,11 +532,7 @@ static struct platform_device *devices[] __initdata = { | |||
| 529 | 532 | ||
| 530 | static void spitz_poweroff(void) | 533 | static void spitz_poweroff(void) |
| 531 | { | 534 | { |
| 532 | pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT); | 535 | arm_machine_restart('g'); |
| 533 | GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET); | ||
| 534 | |||
| 535 | mdelay(1000); | ||
| 536 | arm_machine_restart('h'); | ||
| 537 | } | 536 | } |
| 538 | 537 | ||
| 539 | static void spitz_restart(char mode) | 538 | static void spitz_restart(char mode) |
| @@ -547,6 +546,7 @@ static void spitz_restart(char mode) | |||
| 547 | 546 | ||
| 548 | static void __init common_init(void) | 547 | static void __init common_init(void) |
| 549 | { | 548 | { |
| 549 | init_gpio_reset(SPITZ_GPIO_ON_RESET); | ||
| 550 | pm_power_off = spitz_poweroff; | 550 | pm_power_off = spitz_poweroff; |
| 551 | arm_pm_restart = spitz_restart; | 551 | arm_pm_restart = spitz_restart; |
| 552 | 552 | ||
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 0bb31982fb6f..89f38683787e 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
| @@ -14,13 +14,6 @@ | |||
| 14 | * IO-based SSP applications and allows easy port setup for DMA access. | 14 | * IO-based SSP applications and allows easy port setup for DMA access. |
| 15 | * | 15 | * |
| 16 | * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com> | 16 | * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com> |
| 17 | * | ||
| 18 | * Revision history: | ||
| 19 | * 22nd Aug 2003 Initial version. | ||
| 20 | * 20th Dec 2004 Added ssp_config for changing port config without | ||
| 21 | * closing the port. | ||
| 22 | * 4th Aug 2005 Added option to disable irq handler registration and | ||
| 23 | * cleaned up irq and clock detection. | ||
| 24 | */ | 17 | */ |
| 25 | 18 | ||
| 26 | #include <linux/module.h> | 19 | #include <linux/module.h> |
| @@ -285,7 +278,7 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags) | |||
| 285 | goto out_region; | 278 | goto out_region; |
| 286 | dev->irq = ssp->irq; | 279 | dev->irq = ssp->irq; |
| 287 | } else | 280 | } else |
| 288 | dev->irq = 0; | 281 | dev->irq = NO_IRQ; |
| 289 | 282 | ||
| 290 | /* turn on SSP port clock */ | 283 | /* turn on SSP port clock */ |
| 291 | clk_enable(ssp->clk); | 284 | clk_enable(ssp->clk); |
| @@ -306,7 +299,8 @@ void ssp_exit(struct ssp_dev *dev) | |||
| 306 | struct ssp_device *ssp = dev->ssp; | 299 | struct ssp_device *ssp = dev->ssp; |
| 307 | 300 | ||
| 308 | ssp_disable(dev); | 301 | ssp_disable(dev); |
| 309 | free_irq(dev->irq, dev); | 302 | if (dev->irq != NO_IRQ) |
| 303 | free_irq(dev->irq, dev); | ||
| 310 | clk_disable(ssp->clk); | 304 | clk_disable(ssp->clk); |
| 311 | ssp_free(ssp); | 305 | ssp_free(ssp); |
| 312 | } | 306 | } |
| @@ -360,6 +354,7 @@ static int __devinit ssp_probe(struct platform_device *pdev, int type) | |||
| 360 | dev_err(&pdev->dev, "failed to allocate memory"); | 354 | dev_err(&pdev->dev, "failed to allocate memory"); |
| 361 | return -ENOMEM; | 355 | return -ENOMEM; |
| 362 | } | 356 | } |
| 357 | ssp->pdev = pdev; | ||
| 363 | 358 | ||
| 364 | ssp->clk = clk_get(&pdev->dev, "SSPCLK"); | 359 | ssp->clk = clk_get(&pdev->dev, "SSPCLK"); |
| 365 | if (IS_ERR(ssp->clk)) { | 360 | if (IS_ERR(ssp->clk)) { |
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c new file mode 100644 index 000000000000..ac283507e423 --- /dev/null +++ b/arch/arm/mach-pxa/tavorevb.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-pxa/tavorevb.c | ||
| 3 | * | ||
| 4 | * Support for the Marvell PXA930 Evaluation Board | ||
| 5 | * | ||
| 6 | * Copyright (C) 2007-2008 Marvell International Ltd. | ||
| 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 | * publishhed by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/interrupt.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/platform_device.h> | ||
| 18 | #include <linux/clk.h> | ||
| 19 | #include <linux/gpio.h> | ||
| 20 | #include <linux/smc91x.h> | ||
| 21 | |||
| 22 | #include <asm/mach-types.h> | ||
| 23 | #include <asm/mach/arch.h> | ||
| 24 | #include <asm/hardware.h> | ||
| 25 | #include <asm/arch/pxa3xx-regs.h> | ||
| 26 | #include <asm/arch/mfp-pxa930.h> | ||
| 27 | |||
| 28 | #include "devices.h" | ||
| 29 | #include "generic.h" | ||
| 30 | |||
| 31 | /* Tavor EVB MFP configurations */ | ||
| 32 | static mfp_cfg_t tavorevb_mfp_cfg[] __initdata = { | ||
| 33 | /* Ethernet */ | ||
| 34 | DF_nCS1_nCS3, | ||
| 35 | GPIO47_GPIO, | ||
| 36 | }; | ||
| 37 | |||
| 38 | #define TAVOREVB_ETH_PHYS (0x14000000) | ||
| 39 | |||
| 40 | static struct resource smc91x_resources[] = { | ||
| 41 | [0] = { | ||
| 42 | .start = (TAVOREVB_ETH_PHYS + 0x300), | ||
| 43 | .end = (TAVOREVB_ETH_PHYS + 0xfffff), | ||
| 44 | .flags = IORESOURCE_MEM, | ||
| 45 | }, | ||
| 46 | [1] = { | ||
| 47 | .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO47)), | ||
| 48 | .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO47)), | ||
| 49 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
| 50 | } | ||
| 51 | }; | ||
| 52 | |||
| 53 | static struct smc91x_platdata tavorevb_smc91x_info = { | ||
| 54 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_USE_DMA, | ||
| 55 | }; | ||
| 56 | |||
| 57 | static struct platform_device smc91x_device = { | ||
| 58 | .name = "smc91x", | ||
| 59 | .id = 0, | ||
| 60 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 61 | .resource = smc91x_resources, | ||
| 62 | .dev = { | ||
| 63 | .platform_data = &tavorevb_smc91x_info, | ||
| 64 | }, | ||
| 65 | }; | ||
| 66 | |||
| 67 | static void __init tavorevb_init(void) | ||
| 68 | { | ||
| 69 | /* initialize MFP configurations */ | ||
| 70 | pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg)); | ||
| 71 | |||
| 72 | platform_device_register(&smc91x_device); | ||
| 73 | } | ||
| 74 | |||
| 75 | MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)") | ||
| 76 | /* Maintainer: Eric Miao <eric.miao@marvell.com> */ | ||
| 77 | .phys_io = 0x40000000, | ||
| 78 | .boot_params = 0xa0000100, | ||
| 79 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
| 80 | .map_io = pxa_map_io, | ||
| 81 | .init_irq = pxa3xx_init_irq, | ||
| 82 | .timer = &pxa_timer, | ||
| 83 | .init_machine = tavorevb_init, | ||
| 84 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c new file mode 100644 index 000000000000..7d8505466e54 --- /dev/null +++ b/arch/arm/mach-pxa/tosa-bt.c | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | /* | ||
| 2 | * Bluetooth built-in chip control | ||
| 3 | * | ||
| 4 | * Copyright (c) 2008 Dmitry Baryshkov | ||
| 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 | #include <linux/kernel.h> | ||
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/platform_device.h> | ||
| 15 | #include <linux/gpio.h> | ||
| 16 | #include <linux/delay.h> | ||
| 17 | #include <linux/rfkill.h> | ||
| 18 | |||
| 19 | #include <asm/arch/tosa_bt.h> | ||
| 20 | |||
| 21 | static void tosa_bt_on(struct tosa_bt_data *data) | ||
| 22 | { | ||
| 23 | gpio_set_value(data->gpio_reset, 0); | ||
| 24 | gpio_set_value(data->gpio_pwr, 1); | ||
| 25 | gpio_set_value(data->gpio_reset, 1); | ||
| 26 | mdelay(20); | ||
| 27 | gpio_set_value(data->gpio_reset, 0); | ||
| 28 | } | ||
| 29 | |||
| 30 | static void tosa_bt_off(struct tosa_bt_data *data) | ||
| 31 | { | ||
| 32 | gpio_set_value(data->gpio_reset, 1); | ||
| 33 | mdelay(10); | ||
| 34 | gpio_set_value(data->gpio_pwr, 0); | ||
| 35 | gpio_set_value(data->gpio_reset, 0); | ||
| 36 | } | ||
| 37 | |||
| 38 | static int tosa_bt_toggle_radio(void *data, enum rfkill_state state) | ||
| 39 | { | ||
| 40 | pr_info("BT_RADIO going: %s\n", | ||
| 41 | state == RFKILL_STATE_ON ? "on" : "off"); | ||
| 42 | |||
| 43 | if (state == RFKILL_STATE_ON) { | ||
| 44 | pr_info("TOSA_BT: going ON\n"); | ||
| 45 | tosa_bt_on(data); | ||
| 46 | } else { | ||
| 47 | pr_info("TOSA_BT: going OFF\n"); | ||
| 48 | tosa_bt_off(data); | ||
| 49 | } | ||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | static int tosa_bt_probe(struct platform_device *dev) | ||
| 54 | { | ||
| 55 | int rc; | ||
| 56 | struct rfkill *rfk; | ||
| 57 | |||
| 58 | struct tosa_bt_data *data = dev->dev.platform_data; | ||
| 59 | |||
| 60 | rc = gpio_request(data->gpio_reset, "Bluetooth reset"); | ||
| 61 | if (rc) | ||
| 62 | goto err_reset; | ||
| 63 | rc = gpio_direction_output(data->gpio_reset, 0); | ||
| 64 | if (rc) | ||
| 65 | goto err_reset_dir; | ||
| 66 | rc = gpio_request(data->gpio_pwr, "Bluetooth power"); | ||
| 67 | if (rc) | ||
| 68 | goto err_pwr; | ||
| 69 | rc = gpio_direction_output(data->gpio_pwr, 0); | ||
| 70 | if (rc) | ||
| 71 | goto err_pwr_dir; | ||
| 72 | |||
| 73 | rfk = rfkill_allocate(&dev->dev, RFKILL_TYPE_BLUETOOTH); | ||
| 74 | if (!rfk) { | ||
| 75 | rc = -ENOMEM; | ||
| 76 | goto err_rfk_alloc; | ||
| 77 | } | ||
| 78 | |||
| 79 | rfk->name = "tosa-bt"; | ||
| 80 | rfk->toggle_radio = tosa_bt_toggle_radio; | ||
| 81 | rfk->data = data; | ||
| 82 | #ifdef CONFIG_RFKILL_LEDS | ||
| 83 | rfk->led_trigger.name = "tosa-bt"; | ||
| 84 | #endif | ||
| 85 | |||
| 86 | rc = rfkill_register(rfk); | ||
| 87 | if (rc) | ||
| 88 | goto err_rfkill; | ||
| 89 | |||
| 90 | platform_set_drvdata(dev, rfk); | ||
| 91 | |||
| 92 | return 0; | ||
| 93 | |||
| 94 | err_rfkill: | ||
| 95 | if (rfk) | ||
| 96 | rfkill_free(rfk); | ||
| 97 | rfk = NULL; | ||
| 98 | err_rfk_alloc: | ||
| 99 | tosa_bt_off(data); | ||
| 100 | err_pwr_dir: | ||
| 101 | gpio_free(data->gpio_pwr); | ||
| 102 | err_pwr: | ||
| 103 | err_reset_dir: | ||
| 104 | gpio_free(data->gpio_reset); | ||
| 105 | err_reset: | ||
| 106 | return rc; | ||
| 107 | } | ||
| 108 | |||
| 109 | static int __devexit tosa_bt_remove(struct platform_device *dev) | ||
| 110 | { | ||
| 111 | struct tosa_bt_data *data = dev->dev.platform_data; | ||
| 112 | struct rfkill *rfk = platform_get_drvdata(dev); | ||
| 113 | |||
| 114 | platform_set_drvdata(dev, NULL); | ||
| 115 | |||
| 116 | if (rfk) | ||
| 117 | rfkill_unregister(rfk); | ||
| 118 | rfk = NULL; | ||
| 119 | |||
| 120 | tosa_bt_off(data); | ||
| 121 | |||
| 122 | gpio_free(data->gpio_pwr); | ||
| 123 | gpio_free(data->gpio_reset); | ||
| 124 | |||
| 125 | return 0; | ||
| 126 | } | ||
| 127 | |||
| 128 | static struct platform_driver tosa_bt_driver = { | ||
| 129 | .probe = tosa_bt_probe, | ||
| 130 | .remove = __devexit_p(tosa_bt_remove), | ||
| 131 | |||
| 132 | .driver = { | ||
| 133 | .name = "tosa-bt", | ||
| 134 | .owner = THIS_MODULE, | ||
| 135 | }, | ||
| 136 | }; | ||
| 137 | |||
| 138 | |||
| 139 | static int __init tosa_bt_init(void) | ||
| 140 | { | ||
| 141 | return platform_driver_register(&tosa_bt_driver); | ||
| 142 | } | ||
| 143 | |||
| 144 | static void __exit tosa_bt_exit(void) | ||
| 145 | { | ||
| 146 | platform_driver_unregister(&tosa_bt_driver); | ||
| 147 | } | ||
| 148 | |||
| 149 | module_init(tosa_bt_init); | ||
| 150 | module_exit(tosa_bt_exit); | ||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index ab4a9f579913..fea17ce6b55f 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
| @@ -18,30 +18,31 @@ | |||
| 18 | #include <linux/major.h> | 18 | #include <linux/major.h> |
| 19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
| 20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
| 21 | #include <linux/delay.h> | ||
| 22 | #include <linux/fb.h> | ||
| 21 | #include <linux/mmc/host.h> | 23 | #include <linux/mmc/host.h> |
| 24 | #include <linux/mfd/tc6393xb.h> | ||
| 25 | #include <linux/mfd/tmio.h> | ||
| 26 | #include <linux/mtd/nand.h> | ||
| 27 | #include <linux/mtd/partitions.h> | ||
| 22 | #include <linux/pm.h> | 28 | #include <linux/pm.h> |
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/gpio_keys.h> | 29 | #include <linux/gpio_keys.h> |
| 25 | #include <linux/input.h> | 30 | #include <linux/input.h> |
| 26 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
| 32 | #include <linux/pda_power.h> | ||
| 33 | #include <linux/rfkill.h> | ||
| 27 | 34 | ||
| 28 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
| 29 | #include <asm/memory.h> | ||
| 30 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
| 31 | #include <asm/hardware.h> | ||
| 32 | #include <asm/irq.h> | ||
| 33 | #include <asm/system.h> | ||
| 34 | #include <asm/arch/pxa-regs.h> | ||
| 35 | #include <asm/arch/pxa2xx-regs.h> | 37 | #include <asm/arch/pxa2xx-regs.h> |
| 36 | #include <asm/arch/mfp-pxa25x.h> | 38 | #include <asm/arch/mfp-pxa25x.h> |
| 37 | #include <asm/arch/irda.h> | 39 | #include <asm/arch/irda.h> |
| 38 | #include <asm/arch/i2c.h> | 40 | #include <asm/arch/i2c.h> |
| 39 | #include <asm/arch/mmc.h> | 41 | #include <asm/arch/mmc.h> |
| 40 | #include <asm/arch/udc.h> | 42 | #include <asm/arch/udc.h> |
| 43 | #include <asm/arch/tosa_bt.h> | ||
| 41 | 44 | ||
| 42 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
| 43 | #include <asm/mach/map.h> | ||
| 44 | #include <asm/mach/irq.h> | ||
| 45 | #include <asm/arch/tosa.h> | 46 | #include <asm/arch/tosa.h> |
| 46 | 47 | ||
| 47 | #include <asm/hardware/scoop.h> | 48 | #include <asm/hardware/scoop.h> |
| @@ -86,7 +87,7 @@ static unsigned long tosa_pin_config[] = { | |||
| 86 | GPIO6_MMC_CLK, | 87 | GPIO6_MMC_CLK, |
| 87 | GPIO8_MMC_CS0, | 88 | GPIO8_MMC_CS0, |
| 88 | GPIO9_GPIO, /* Detect */ | 89 | GPIO9_GPIO, /* Detect */ |
| 89 | // GPIO10 nSD_INT | 90 | GPIO10_GPIO, /* nSD_INT */ |
| 90 | 91 | ||
| 91 | /* CF */ | 92 | /* CF */ |
| 92 | GPIO13_GPIO, /* CD_IRQ */ | 93 | GPIO13_GPIO, /* CD_IRQ */ |
| @@ -124,34 +125,34 @@ static unsigned long tosa_pin_config[] = { | |||
| 124 | GPIO44_BTUART_CTS, | 125 | GPIO44_BTUART_CTS, |
| 125 | GPIO45_BTUART_RTS, | 126 | GPIO45_BTUART_RTS, |
| 126 | 127 | ||
| 127 | /* IrDA */ | ||
| 128 | GPIO46_STUART_RXD, | ||
| 129 | GPIO47_STUART_TXD, | ||
| 130 | |||
| 131 | /* Keybd */ | 128 | /* Keybd */ |
| 132 | GPIO58_GPIO, | 129 | GPIO58_GPIO | MFP_LPM_DRIVE_LOW, |
| 133 | GPIO59_GPIO, | 130 | GPIO59_GPIO | MFP_LPM_DRIVE_LOW, |
| 134 | GPIO60_GPIO, | 131 | GPIO60_GPIO | MFP_LPM_DRIVE_LOW, |
| 135 | GPIO61_GPIO, | 132 | GPIO61_GPIO | MFP_LPM_DRIVE_LOW, |
| 136 | GPIO62_GPIO, | 133 | GPIO62_GPIO | MFP_LPM_DRIVE_LOW, |
| 137 | GPIO63_GPIO, | 134 | GPIO63_GPIO | MFP_LPM_DRIVE_LOW, |
| 138 | GPIO64_GPIO, | 135 | GPIO64_GPIO | MFP_LPM_DRIVE_LOW, |
| 139 | GPIO65_GPIO, | 136 | GPIO65_GPIO | MFP_LPM_DRIVE_LOW, |
| 140 | GPIO66_GPIO, | 137 | GPIO66_GPIO | MFP_LPM_DRIVE_LOW, |
| 141 | GPIO67_GPIO, | 138 | GPIO67_GPIO | MFP_LPM_DRIVE_LOW, |
| 142 | GPIO68_GPIO, | 139 | GPIO68_GPIO | MFP_LPM_DRIVE_LOW, |
| 143 | GPIO69_GPIO, | 140 | GPIO69_GPIO | MFP_LPM_DRIVE_LOW, |
| 144 | GPIO70_GPIO, | 141 | GPIO70_GPIO | MFP_LPM_DRIVE_LOW, |
| 145 | GPIO71_GPIO, | 142 | GPIO71_GPIO | MFP_LPM_DRIVE_LOW, |
| 146 | GPIO72_GPIO, | 143 | GPIO72_GPIO | MFP_LPM_DRIVE_LOW, |
| 147 | GPIO73_GPIO, | 144 | GPIO73_GPIO | MFP_LPM_DRIVE_LOW, |
| 148 | GPIO74_GPIO, | 145 | GPIO74_GPIO | MFP_LPM_DRIVE_LOW, |
| 149 | GPIO75_GPIO, | 146 | GPIO75_GPIO | MFP_LPM_DRIVE_LOW, |
| 150 | 147 | ||
| 151 | /* SPI */ | 148 | /* SPI */ |
| 152 | GPIO81_SSP2_CLK_OUT, | 149 | GPIO81_SSP2_CLK_OUT, |
| 153 | GPIO82_SSP2_FRM_OUT, | 150 | GPIO82_SSP2_FRM_OUT, |
| 154 | GPIO83_SSP2_TXD, | 151 | GPIO83_SSP2_TXD, |
| 152 | |||
| 153 | /* IrDA is managed in other way */ | ||
| 154 | GPIO46_GPIO, | ||
| 155 | GPIO47_GPIO, | ||
| 155 | }; | 156 | }; |
| 156 | 157 | ||
| 157 | /* | 158 | /* |
| @@ -249,6 +250,15 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void | |||
| 249 | 250 | ||
| 250 | tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); | 251 | tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); |
| 251 | 252 | ||
| 253 | err = gpio_request(TOSA_GPIO_nSD_DETECT, "MMC/SD card detect"); | ||
| 254 | if (err) { | ||
| 255 | printk(KERN_ERR "tosa_mci_init: can't request nSD_DETECT gpio\n"); | ||
| 256 | goto err_gpio_detect; | ||
| 257 | } | ||
| 258 | err = gpio_direction_input(TOSA_GPIO_nSD_DETECT); | ||
| 259 | if (err) | ||
| 260 | goto err_gpio_detect_dir; | ||
| 261 | |||
| 252 | err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, | 262 | err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, |
| 253 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | 263 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
| 254 | "MMC/SD card detect", data); | 264 | "MMC/SD card detect", data); |
| @@ -257,7 +267,7 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void | |||
| 257 | goto err_irq; | 267 | goto err_irq; |
| 258 | } | 268 | } |
| 259 | 269 | ||
| 260 | err = gpio_request(TOSA_GPIO_SD_WP, "sd_wp"); | 270 | err = gpio_request(TOSA_GPIO_SD_WP, "SD Write Protect"); |
| 261 | if (err) { | 271 | if (err) { |
| 262 | printk(KERN_ERR "tosa_mci_init: can't request SD_WP gpio\n"); | 272 | printk(KERN_ERR "tosa_mci_init: can't request SD_WP gpio\n"); |
| 263 | goto err_gpio_wp; | 273 | goto err_gpio_wp; |
| @@ -266,7 +276,7 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void | |||
| 266 | if (err) | 276 | if (err) |
| 267 | goto err_gpio_wp_dir; | 277 | goto err_gpio_wp_dir; |
| 268 | 278 | ||
| 269 | err = gpio_request(TOSA_GPIO_PWR_ON, "sd_pwr"); | 279 | err = gpio_request(TOSA_GPIO_PWR_ON, "SD Power"); |
| 270 | if (err) { | 280 | if (err) { |
| 271 | printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n"); | 281 | printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n"); |
| 272 | goto err_gpio_pwr; | 282 | goto err_gpio_pwr; |
| @@ -275,8 +285,20 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void | |||
| 275 | if (err) | 285 | if (err) |
| 276 | goto err_gpio_pwr_dir; | 286 | goto err_gpio_pwr_dir; |
| 277 | 287 | ||
| 288 | err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int"); | ||
| 289 | if (err) { | ||
| 290 | printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n"); | ||
| 291 | goto err_gpio_int; | ||
| 292 | } | ||
| 293 | err = gpio_direction_input(TOSA_GPIO_nSD_INT); | ||
| 294 | if (err) | ||
| 295 | goto err_gpio_int_dir; | ||
| 296 | |||
| 278 | return 0; | 297 | return 0; |
| 279 | 298 | ||
| 299 | err_gpio_int_dir: | ||
| 300 | gpio_free(TOSA_GPIO_nSD_INT); | ||
| 301 | err_gpio_int: | ||
| 280 | err_gpio_pwr_dir: | 302 | err_gpio_pwr_dir: |
| 281 | gpio_free(TOSA_GPIO_PWR_ON); | 303 | gpio_free(TOSA_GPIO_PWR_ON); |
| 282 | err_gpio_pwr: | 304 | err_gpio_pwr: |
| @@ -285,6 +307,9 @@ err_gpio_wp_dir: | |||
| 285 | err_gpio_wp: | 307 | err_gpio_wp: |
| 286 | free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); | 308 | free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); |
| 287 | err_irq: | 309 | err_irq: |
| 310 | err_gpio_detect_dir: | ||
| 311 | gpio_free(TOSA_GPIO_nSD_DETECT); | ||
| 312 | err_gpio_detect: | ||
| 288 | return err; | 313 | return err; |
| 289 | } | 314 | } |
| 290 | 315 | ||
| @@ -306,9 +331,11 @@ static int tosa_mci_get_ro(struct device *dev) | |||
| 306 | 331 | ||
| 307 | static void tosa_mci_exit(struct device *dev, void *data) | 332 | static void tosa_mci_exit(struct device *dev, void *data) |
| 308 | { | 333 | { |
| 334 | gpio_free(TOSA_GPIO_nSD_INT); | ||
| 309 | gpio_free(TOSA_GPIO_PWR_ON); | 335 | gpio_free(TOSA_GPIO_PWR_ON); |
| 310 | gpio_free(TOSA_GPIO_SD_WP); | 336 | gpio_free(TOSA_GPIO_SD_WP); |
| 311 | free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); | 337 | free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); |
| 338 | gpio_free(TOSA_GPIO_nSD_DETECT); | ||
| 312 | } | 339 | } |
| 313 | 340 | ||
| 314 | static struct pxamci_platform_data tosa_mci_platform_data = { | 341 | static struct pxamci_platform_data tosa_mci_platform_data = { |
| @@ -322,29 +349,55 @@ static struct pxamci_platform_data tosa_mci_platform_data = { | |||
| 322 | /* | 349 | /* |
| 323 | * Irda | 350 | * Irda |
| 324 | */ | 351 | */ |
| 352 | static void tosa_irda_transceiver_mode(struct device *dev, int mode) | ||
| 353 | { | ||
| 354 | if (mode & IR_OFF) { | ||
| 355 | gpio_set_value(TOSA_GPIO_IR_POWERDWN, 0); | ||
| 356 | pxa2xx_transceiver_mode(dev, mode); | ||
| 357 | gpio_direction_output(TOSA_GPIO_IRDA_TX, 0); | ||
| 358 | } else { | ||
| 359 | pxa2xx_transceiver_mode(dev, mode); | ||
| 360 | gpio_set_value(TOSA_GPIO_IR_POWERDWN, 1); | ||
| 361 | } | ||
| 362 | } | ||
| 363 | |||
| 325 | static int tosa_irda_startup(struct device *dev) | 364 | static int tosa_irda_startup(struct device *dev) |
| 326 | { | 365 | { |
| 327 | int ret; | 366 | int ret; |
| 328 | 367 | ||
| 368 | ret = gpio_request(TOSA_GPIO_IRDA_TX, "IrDA TX"); | ||
| 369 | if (ret) | ||
| 370 | goto err_tx; | ||
| 371 | ret = gpio_direction_output(TOSA_GPIO_IRDA_TX, 0); | ||
| 372 | if (ret) | ||
| 373 | goto err_tx_dir; | ||
| 374 | |||
| 329 | ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown"); | 375 | ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown"); |
| 330 | if (ret) | 376 | if (ret) |
| 331 | return ret; | 377 | goto err_pwr; |
| 332 | 378 | ||
| 333 | ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0); | 379 | ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0); |
| 334 | if (ret) | 380 | if (ret) |
| 335 | gpio_free(TOSA_GPIO_IR_POWERDWN); | 381 | goto err_pwr_dir; |
| 336 | 382 | ||
| 337 | return ret; | 383 | tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF); |
| 338 | } | ||
| 339 | 384 | ||
| 340 | static void tosa_irda_shutdown(struct device *dev) | 385 | return 0; |
| 341 | { | 386 | |
| 387 | err_pwr_dir: | ||
| 342 | gpio_free(TOSA_GPIO_IR_POWERDWN); | 388 | gpio_free(TOSA_GPIO_IR_POWERDWN); |
| 389 | err_pwr: | ||
| 390 | err_tx_dir: | ||
| 391 | gpio_free(TOSA_GPIO_IRDA_TX); | ||
| 392 | err_tx: | ||
| 393 | return ret; | ||
| 343 | } | 394 | } |
| 344 | 395 | ||
| 345 | static void tosa_irda_transceiver_mode(struct device *dev, int mode) | 396 | static void tosa_irda_shutdown(struct device *dev) |
| 346 | { | 397 | { |
| 347 | gpio_set_value(TOSA_GPIO_IR_POWERDWN, !(mode & IR_OFF)); | 398 | tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF); |
| 399 | gpio_free(TOSA_GPIO_IR_POWERDWN); | ||
| 400 | gpio_free(TOSA_GPIO_IRDA_TX); | ||
| 348 | } | 401 | } |
| 349 | 402 | ||
| 350 | static struct pxaficp_platform_data tosa_ficp_platform_data = { | 403 | static struct pxaficp_platform_data tosa_ficp_platform_data = { |
| @@ -355,6 +408,70 @@ static struct pxaficp_platform_data tosa_ficp_platform_data = { | |||
| 355 | }; | 408 | }; |
| 356 | 409 | ||
| 357 | /* | 410 | /* |
| 411 | * Tosa AC IN | ||
| 412 | */ | ||
| 413 | static int tosa_power_init(struct device *dev) | ||
| 414 | { | ||
| 415 | int ret = gpio_request(TOSA_GPIO_AC_IN, "ac in"); | ||
| 416 | if (ret) | ||
| 417 | goto err_gpio_req; | ||
| 418 | |||
| 419 | ret = gpio_direction_input(TOSA_GPIO_AC_IN); | ||
| 420 | if (ret) | ||
| 421 | goto err_gpio_in; | ||
| 422 | |||
| 423 | return 0; | ||
| 424 | |||
| 425 | err_gpio_in: | ||
| 426 | gpio_free(TOSA_GPIO_AC_IN); | ||
| 427 | err_gpio_req: | ||
| 428 | return ret; | ||
| 429 | } | ||
| 430 | |||
| 431 | static void tosa_power_exit(struct device *dev) | ||
| 432 | { | ||
| 433 | gpio_free(TOSA_GPIO_AC_IN); | ||
| 434 | } | ||
| 435 | |||
| 436 | static int tosa_power_ac_online(void) | ||
| 437 | { | ||
| 438 | return gpio_get_value(TOSA_GPIO_AC_IN) == 0; | ||
| 439 | } | ||
| 440 | |||
| 441 | static char *tosa_ac_supplied_to[] = { | ||
| 442 | "main-battery", | ||
| 443 | "backup-battery", | ||
| 444 | "jacket-battery", | ||
| 445 | }; | ||
| 446 | |||
| 447 | static struct pda_power_pdata tosa_power_data = { | ||
| 448 | .init = tosa_power_init, | ||
| 449 | .is_ac_online = tosa_power_ac_online, | ||
| 450 | .exit = tosa_power_exit, | ||
| 451 | .supplied_to = tosa_ac_supplied_to, | ||
| 452 | .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to), | ||
| 453 | }; | ||
| 454 | |||
| 455 | static struct resource tosa_power_resource[] = { | ||
| 456 | { | ||
| 457 | .name = "ac", | ||
| 458 | .start = gpio_to_irq(TOSA_GPIO_AC_IN), | ||
| 459 | .end = gpio_to_irq(TOSA_GPIO_AC_IN), | ||
| 460 | .flags = IORESOURCE_IRQ | | ||
| 461 | IORESOURCE_IRQ_HIGHEDGE | | ||
| 462 | IORESOURCE_IRQ_LOWEDGE, | ||
| 463 | }, | ||
| 464 | }; | ||
| 465 | |||
| 466 | static struct platform_device tosa_power_device = { | ||
| 467 | .name = "pda-power", | ||
| 468 | .id = -1, | ||
| 469 | .dev.platform_data = &tosa_power_data, | ||
| 470 | .resource = tosa_power_resource, | ||
| 471 | .num_resources = ARRAY_SIZE(tosa_power_resource), | ||
| 472 | }; | ||
| 473 | |||
| 474 | /* | ||
| 358 | * Tosa Keyboard | 475 | * Tosa Keyboard |
| 359 | */ | 476 | */ |
| 360 | static struct platform_device tosakbd_device = { | 477 | static struct platform_device tosakbd_device = { |
| @@ -439,7 +556,7 @@ static struct gpio_led tosa_gpio_leds[] = { | |||
| 439 | }, | 556 | }, |
| 440 | { | 557 | { |
| 441 | .name = "tosa:blue:bluetooth", | 558 | .name = "tosa:blue:bluetooth", |
| 442 | .default_trigger = "none", | 559 | .default_trigger = "tosa-bt", |
| 443 | .gpio = TOSA_GPIO_BT_LED, | 560 | .gpio = TOSA_GPIO_BT_LED, |
| 444 | }, | 561 | }, |
| 445 | }; | 562 | }; |
| @@ -457,21 +574,184 @@ static struct platform_device tosaled_device = { | |||
| 457 | }, | 574 | }, |
| 458 | }; | 575 | }; |
| 459 | 576 | ||
| 577 | /* | ||
| 578 | * Toshiba Mobile IO Controller | ||
| 579 | */ | ||
| 580 | static struct resource tc6393xb_resources[] = { | ||
| 581 | [0] = { | ||
| 582 | .start = TOSA_LCDC_PHYS, | ||
| 583 | .end = TOSA_LCDC_PHYS + 0x3ffffff, | ||
| 584 | .flags = IORESOURCE_MEM, | ||
| 585 | }, | ||
| 586 | |||
| 587 | [1] = { | ||
| 588 | .start = TOSA_IRQ_GPIO_TC6393XB_INT, | ||
| 589 | .end = TOSA_IRQ_GPIO_TC6393XB_INT, | ||
| 590 | .flags = IORESOURCE_IRQ, | ||
| 591 | }, | ||
| 592 | }; | ||
| 593 | |||
| 594 | |||
| 595 | static int tosa_tc6393xb_enable(struct platform_device *dev) | ||
| 596 | { | ||
| 597 | int rc; | ||
| 598 | |||
| 599 | rc = gpio_request(TOSA_GPIO_TC6393XB_REST_IN, "tc6393xb #pclr"); | ||
| 600 | if (rc) | ||
| 601 | goto err_req_pclr; | ||
| 602 | rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend"); | ||
| 603 | if (rc) | ||
| 604 | goto err_req_suspend; | ||
| 605 | rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "l3v"); | ||
| 606 | if (rc) | ||
| 607 | goto err_req_l3v; | ||
| 608 | rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0); | ||
| 609 | if (rc) | ||
| 610 | goto err_dir_l3v; | ||
| 611 | rc = gpio_direction_output(TOSA_GPIO_TC6393XB_SUSPEND, 0); | ||
| 612 | if (rc) | ||
| 613 | goto err_dir_suspend; | ||
| 614 | rc = gpio_direction_output(TOSA_GPIO_TC6393XB_REST_IN, 0); | ||
| 615 | if (rc) | ||
| 616 | goto err_dir_pclr; | ||
| 617 | |||
| 618 | mdelay(1); | ||
| 619 | |||
| 620 | gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1); | ||
| 621 | |||
| 622 | mdelay(10); | ||
| 623 | |||
| 624 | gpio_set_value(TOSA_GPIO_TC6393XB_REST_IN, 1); | ||
| 625 | gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1); | ||
| 626 | |||
| 627 | return 0; | ||
| 628 | err_dir_pclr: | ||
| 629 | err_dir_suspend: | ||
| 630 | err_dir_l3v: | ||
| 631 | gpio_free(TOSA_GPIO_TC6393XB_L3V_ON); | ||
| 632 | err_req_l3v: | ||
| 633 | gpio_free(TOSA_GPIO_TC6393XB_SUSPEND); | ||
| 634 | err_req_suspend: | ||
| 635 | gpio_free(TOSA_GPIO_TC6393XB_REST_IN); | ||
| 636 | err_req_pclr: | ||
| 637 | return rc; | ||
| 638 | } | ||
| 639 | |||
| 640 | static int tosa_tc6393xb_disable(struct platform_device *dev) | ||
| 641 | { | ||
| 642 | gpio_free(TOSA_GPIO_TC6393XB_L3V_ON); | ||
| 643 | gpio_free(TOSA_GPIO_TC6393XB_SUSPEND); | ||
| 644 | gpio_free(TOSA_GPIO_TC6393XB_REST_IN); | ||
| 645 | |||
| 646 | return 0; | ||
| 647 | } | ||
| 648 | |||
| 649 | static int tosa_tc6393xb_resume(struct platform_device *dev) | ||
| 650 | { | ||
| 651 | gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1); | ||
| 652 | mdelay(10); | ||
| 653 | gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1); | ||
| 654 | mdelay(10); | ||
| 655 | |||
| 656 | return 0; | ||
| 657 | } | ||
| 658 | |||
| 659 | static int tosa_tc6393xb_suspend(struct platform_device *dev) | ||
| 660 | { | ||
| 661 | gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 0); | ||
| 662 | gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 0); | ||
| 663 | return 0; | ||
| 664 | } | ||
| 665 | |||
| 666 | static struct mtd_partition tosa_nand_partition[] = { | ||
| 667 | { | ||
| 668 | .name = "smf", | ||
| 669 | .offset = 0, | ||
| 670 | .size = 7 * 1024 * 1024, | ||
| 671 | }, | ||
| 672 | { | ||
| 673 | .name = "root", | ||
| 674 | .offset = MTDPART_OFS_APPEND, | ||
| 675 | .size = 28 * 1024 * 1024, | ||
| 676 | }, | ||
| 677 | { | ||
| 678 | .name = "home", | ||
| 679 | .offset = MTDPART_OFS_APPEND, | ||
| 680 | .size = MTDPART_SIZ_FULL, | ||
| 681 | }, | ||
| 682 | }; | ||
| 683 | |||
| 684 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | ||
| 685 | |||
| 686 | static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = { | ||
| 687 | .options = 0, | ||
| 688 | .offs = 4, | ||
| 689 | .len = 2, | ||
| 690 | .pattern = scan_ff_pattern | ||
| 691 | }; | ||
| 692 | |||
| 693 | static struct tmio_nand_data tosa_tc6393xb_nand_config = { | ||
| 694 | .num_partitions = ARRAY_SIZE(tosa_nand_partition), | ||
| 695 | .partition = tosa_nand_partition, | ||
| 696 | .badblock_pattern = &tosa_tc6393xb_nand_bbt, | ||
| 697 | }; | ||
| 698 | |||
| 699 | static struct tc6393xb_platform_data tosa_tc6393xb_setup = { | ||
| 700 | .scr_pll2cr = 0x0cc1, | ||
| 701 | .scr_gper = 0x3300, | ||
| 702 | .scr_gpo_dsr = | ||
| 703 | TOSA_TC6393XB_GPIO_BIT(TOSA_GPIO_CARD_VCC_ON), | ||
| 704 | .scr_gpo_doecr = | ||
| 705 | TOSA_TC6393XB_GPIO_BIT(TOSA_GPIO_CARD_VCC_ON), | ||
| 706 | |||
| 707 | .irq_base = IRQ_BOARD_START, | ||
| 708 | .gpio_base = TOSA_TC6393XB_GPIO_BASE, | ||
| 709 | |||
| 710 | .enable = tosa_tc6393xb_enable, | ||
| 711 | .disable = tosa_tc6393xb_disable, | ||
| 712 | .suspend = tosa_tc6393xb_suspend, | ||
| 713 | .resume = tosa_tc6393xb_resume, | ||
| 714 | |||
| 715 | .nand_data = &tosa_tc6393xb_nand_config, | ||
| 716 | }; | ||
| 717 | |||
| 718 | |||
| 719 | static struct platform_device tc6393xb_device = { | ||
| 720 | .name = "tc6393xb", | ||
| 721 | .id = -1, | ||
| 722 | .dev = { | ||
| 723 | .platform_data = &tosa_tc6393xb_setup, | ||
| 724 | }, | ||
| 725 | .num_resources = ARRAY_SIZE(tc6393xb_resources), | ||
| 726 | .resource = tc6393xb_resources, | ||
| 727 | }; | ||
| 728 | |||
| 729 | static struct tosa_bt_data tosa_bt_data = { | ||
| 730 | .gpio_pwr = TOSA_GPIO_BT_PWR_EN, | ||
| 731 | .gpio_reset = TOSA_GPIO_BT_RESET, | ||
| 732 | }; | ||
| 733 | |||
| 734 | static struct platform_device tosa_bt_device = { | ||
| 735 | .name = "tosa-bt", | ||
| 736 | .id = -1, | ||
| 737 | .dev.platform_data = &tosa_bt_data, | ||
| 738 | }; | ||
| 739 | |||
| 740 | |||
| 460 | static struct platform_device *devices[] __initdata = { | 741 | static struct platform_device *devices[] __initdata = { |
| 461 | &tosascoop_device, | 742 | &tosascoop_device, |
| 462 | &tosascoop_jc_device, | 743 | &tosascoop_jc_device, |
| 744 | &tc6393xb_device, | ||
| 745 | &tosa_power_device, | ||
| 463 | &tosakbd_device, | 746 | &tosakbd_device, |
| 464 | &tosa_gpio_keys_device, | 747 | &tosa_gpio_keys_device, |
| 465 | &tosaled_device, | 748 | &tosaled_device, |
| 749 | &tosa_bt_device, | ||
| 466 | }; | 750 | }; |
| 467 | 751 | ||
| 468 | static void tosa_poweroff(void) | 752 | static void tosa_poweroff(void) |
| 469 | { | 753 | { |
| 470 | gpio_direction_output(TOSA_GPIO_ON_RESET, 0); | 754 | arm_machine_restart('g'); |
| 471 | gpio_set_value(TOSA_GPIO_ON_RESET, 1); | ||
| 472 | |||
| 473 | mdelay(1000); | ||
| 474 | arm_machine_restart('h'); | ||
| 475 | } | 755 | } |
| 476 | 756 | ||
| 477 | static void tosa_restart(char mode) | 757 | static void tosa_restart(char mode) |
| @@ -485,10 +765,14 @@ static void tosa_restart(char mode) | |||
| 485 | 765 | ||
| 486 | static void __init tosa_init(void) | 766 | static void __init tosa_init(void) |
| 487 | { | 767 | { |
| 768 | int dummy; | ||
| 769 | |||
| 488 | pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); | 770 | pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); |
| 489 | gpio_set_wake(MFP_PIN_GPIO1, 1); | 771 | gpio_set_wake(MFP_PIN_GPIO1, 1); |
| 490 | /* We can't pass to gpio-keys since it will drop the Reset altfunc */ | 772 | /* We can't pass to gpio-keys since it will drop the Reset altfunc */ |
| 491 | 773 | ||
| 774 | init_gpio_reset(TOSA_GPIO_ON_RESET); | ||
| 775 | |||
| 492 | pm_power_off = tosa_poweroff; | 776 | pm_power_off = tosa_poweroff; |
| 493 | arm_pm_restart = tosa_restart; | 777 | arm_pm_restart = tosa_restart; |
| 494 | 778 | ||
| @@ -497,6 +781,10 @@ static void __init tosa_init(void) | |||
| 497 | /* enable batt_fault */ | 781 | /* enable batt_fault */ |
| 498 | PMCR = 0x01; | 782 | PMCR = 0x01; |
| 499 | 783 | ||
| 784 | dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12); | ||
| 785 | dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); | ||
| 786 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); | ||
| 787 | |||
| 500 | pxa_set_mci_info(&tosa_mci_platform_data); | 788 | pxa_set_mci_info(&tosa_mci_platform_data); |
| 501 | pxa_set_udc_info(&udc_info); | 789 | pxa_set_udc_info(&udc_info); |
| 502 | pxa_set_ficp_info(&tosa_ficp_platform_data); | 790 | pxa_set_ficp_info(&tosa_ficp_platform_data); |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 61e244023089..dee7bf36f013 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
| @@ -254,6 +254,7 @@ static void board_irda_mode(struct device *dev, int mode) | |||
| 254 | /* Fast mode */ | 254 | /* Fast mode */ |
| 255 | trizeps_conxs_ircr |= ConXS_IRCR_MODE; | 255 | trizeps_conxs_ircr |= ConXS_IRCR_MODE; |
| 256 | } | 256 | } |
| 257 | pxa2xx_transceiver_mode(dev, mode); | ||
| 257 | if (mode & IR_OFF) { | 258 | if (mode & IR_OFF) { |
| 258 | trizeps_conxs_ircr |= ConXS_IRCR_SD; | 259 | trizeps_conxs_ircr |= ConXS_IRCR_SD; |
| 259 | } else { | 260 | } else { |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 66b446ca273d..8fca6d890b7d 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
| 22 | #include <linux/smc91x.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
| 24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
| @@ -29,6 +30,7 @@ | |||
| 29 | #include <asm/arch/zylonite.h> | 30 | #include <asm/arch/zylonite.h> |
| 30 | #include <asm/arch/mmc.h> | 31 | #include <asm/arch/mmc.h> |
| 31 | #include <asm/arch/pxa27x_keypad.h> | 32 | #include <asm/arch/pxa27x_keypad.h> |
| 33 | #include <asm/arch/pxa3xx_nand.h> | ||
| 32 | 34 | ||
| 33 | #include "devices.h" | 35 | #include "devices.h" |
| 34 | #include "generic.h" | 36 | #include "generic.h" |
| @@ -37,6 +39,8 @@ | |||
| 37 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; | 39 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; |
| 38 | 40 | ||
| 39 | int gpio_eth_irq; | 41 | int gpio_eth_irq; |
| 42 | int gpio_debug_led1; | ||
| 43 | int gpio_debug_led2; | ||
| 40 | 44 | ||
| 41 | int wm9713_irq; | 45 | int wm9713_irq; |
| 42 | 46 | ||
| @@ -56,13 +60,57 @@ static struct resource smc91x_resources[] = { | |||
| 56 | } | 60 | } |
| 57 | }; | 61 | }; |
| 58 | 62 | ||
| 63 | static struct smc91x_platdata zylonite_smc91x_info = { | ||
| 64 | .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | | ||
| 65 | SMC91X_NOWAIT | SMC91X_USE_DMA, | ||
| 66 | }; | ||
| 67 | |||
| 59 | static struct platform_device smc91x_device = { | 68 | static struct platform_device smc91x_device = { |
| 60 | .name = "smc91x", | 69 | .name = "smc91x", |
| 61 | .id = 0, | 70 | .id = 0, |
| 62 | .num_resources = ARRAY_SIZE(smc91x_resources), | 71 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 63 | .resource = smc91x_resources, | 72 | .resource = smc91x_resources, |
| 73 | .dev = { | ||
| 74 | .platform_data = &zylonite_smc91x_info, | ||
| 75 | }, | ||
| 76 | }; | ||
| 77 | |||
| 78 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
| 79 | static struct gpio_led zylonite_debug_leds[] = { | ||
| 80 | [0] = { | ||
| 81 | .name = "zylonite:yellow:1", | ||
| 82 | .default_trigger = "heartbeat", | ||
| 83 | }, | ||
| 84 | [1] = { | ||
| 85 | .name = "zylonite:yellow:2", | ||
| 86 | .default_trigger = "default-on", | ||
| 87 | }, | ||
| 64 | }; | 88 | }; |
| 65 | 89 | ||
| 90 | static struct gpio_led_platform_data zylonite_debug_leds_info = { | ||
| 91 | .leds = zylonite_debug_leds, | ||
| 92 | .num_leds = ARRAY_SIZE(zylonite_debug_leds), | ||
| 93 | }; | ||
| 94 | |||
| 95 | static struct platform_device zylonite_device_leds = { | ||
| 96 | .name = "leds-gpio", | ||
| 97 | .id = -1, | ||
| 98 | .dev = { | ||
| 99 | .platform_data = &zylonite_debug_leds_info, | ||
| 100 | } | ||
| 101 | }; | ||
| 102 | |||
| 103 | static void __init zylonite_init_leds(void) | ||
| 104 | { | ||
| 105 | zylonite_debug_leds[0].gpio = gpio_debug_led1; | ||
| 106 | zylonite_debug_leds[1].gpio = gpio_debug_led2; | ||
| 107 | |||
| 108 | platform_device_register(&zylonite_device_leds); | ||
| 109 | } | ||
| 110 | #else | ||
| 111 | static inline void zylonite_init_leds(void) {} | ||
| 112 | #endif | ||
| 113 | |||
| 66 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 114 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
| 67 | static struct platform_pwm_backlight_data zylonite_backlight_data = { | 115 | static struct platform_pwm_backlight_data zylonite_backlight_data = { |
| 68 | .pwm_id = 3, | 116 | .pwm_id = 3, |
| @@ -259,7 +307,7 @@ static void __init zylonite_init_mmc(void) | |||
| 259 | static inline void zylonite_init_mmc(void) {} | 307 | static inline void zylonite_init_mmc(void) {} |
| 260 | #endif | 308 | #endif |
| 261 | 309 | ||
| 262 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) | 310 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
| 263 | static unsigned int zylonite_matrix_key_map[] = { | 311 | static unsigned int zylonite_matrix_key_map[] = { |
| 264 | /* KEY(row, col, key_code) */ | 312 | /* KEY(row, col, key_code) */ |
| 265 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), | 313 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), |
| @@ -324,6 +372,57 @@ static void __init zylonite_init_keypad(void) | |||
| 324 | static inline void zylonite_init_keypad(void) {} | 372 | static inline void zylonite_init_keypad(void) {} |
| 325 | #endif | 373 | #endif |
| 326 | 374 | ||
| 375 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
| 376 | static struct mtd_partition zylonite_nand_partitions[] = { | ||
| 377 | [0] = { | ||
| 378 | .name = "Bootloader", | ||
| 379 | .offset = 0, | ||
| 380 | .size = 0x060000, | ||
| 381 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 382 | }, | ||
| 383 | [1] = { | ||
| 384 | .name = "Kernel", | ||
| 385 | .offset = 0x060000, | ||
| 386 | .size = 0x200000, | ||
| 387 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 388 | }, | ||
| 389 | [2] = { | ||
| 390 | .name = "Filesystem", | ||
| 391 | .offset = 0x0260000, | ||
| 392 | .size = 0x3000000, /* 48M - rootfs */ | ||
| 393 | }, | ||
| 394 | [3] = { | ||
| 395 | .name = "MassStorage", | ||
| 396 | .offset = 0x3260000, | ||
| 397 | .size = 0x3d40000, | ||
| 398 | }, | ||
| 399 | [4] = { | ||
| 400 | .name = "BBT", | ||
| 401 | .offset = 0x6FA0000, | ||
| 402 | .size = 0x80000, | ||
| 403 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 404 | }, | ||
| 405 | /* NOTE: we reserve some blocks at the end of the NAND flash for | ||
| 406 | * bad block management, and the max number of relocation blocks | ||
| 407 | * differs on different platforms. Please take care with it when | ||
| 408 | * defining the partition table. | ||
| 409 | */ | ||
| 410 | }; | ||
| 411 | |||
| 412 | static struct pxa3xx_nand_platform_data zylonite_nand_info = { | ||
| 413 | .enable_arbiter = 1, | ||
| 414 | .parts = zylonite_nand_partitions, | ||
| 415 | .nr_parts = ARRAY_SIZE(zylonite_nand_partitions), | ||
| 416 | }; | ||
| 417 | |||
| 418 | static void __init zylonite_init_nand(void) | ||
| 419 | { | ||
| 420 | pxa3xx_set_nand_info(&zylonite_nand_info); | ||
| 421 | } | ||
| 422 | #else | ||
| 423 | static inline void zylonite_init_nand(void) {} | ||
| 424 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ | ||
| 425 | |||
| 327 | static void __init zylonite_init(void) | 426 | static void __init zylonite_init(void) |
| 328 | { | 427 | { |
| 329 | /* board-processor specific initialization */ | 428 | /* board-processor specific initialization */ |
| @@ -342,6 +441,8 @@ static void __init zylonite_init(void) | |||
| 342 | zylonite_init_lcd(); | 441 | zylonite_init_lcd(); |
| 343 | zylonite_init_mmc(); | 442 | zylonite_init_mmc(); |
| 344 | zylonite_init_keypad(); | 443 | zylonite_init_keypad(); |
| 444 | zylonite_init_nand(); | ||
| 445 | zylonite_init_leds(); | ||
| 345 | } | 446 | } |
| 346 | 447 | ||
| 347 | MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") | 448 | MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") |
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c index 6f7ae972b8db..b28d46e081d3 100644 --- a/arch/arm/mach-pxa/zylonite_pxa300.c +++ b/arch/arm/mach-pxa/zylonite_pxa300.c | |||
| @@ -16,9 +16,12 @@ | |||
| 16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
| 17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/i2c.h> | ||
| 20 | #include <linux/i2c/pca953x.h> | ||
| 19 | 21 | ||
| 20 | #include <asm/gpio.h> | 22 | #include <asm/gpio.h> |
| 21 | #include <asm/arch/mfp-pxa300.h> | 23 | #include <asm/arch/mfp-pxa300.h> |
| 24 | #include <asm/arch/i2c.h> | ||
| 22 | #include <asm/arch/zylonite.h> | 25 | #include <asm/arch/zylonite.h> |
| 23 | 26 | ||
| 24 | #include "generic.h" | 27 | #include "generic.h" |
| @@ -109,6 +112,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = { | |||
| 109 | GPIO12_MMC2_DAT3, | 112 | GPIO12_MMC2_DAT3, |
| 110 | GPIO13_MMC2_CLK, | 113 | GPIO13_MMC2_CLK, |
| 111 | GPIO14_MMC2_CMD, | 114 | GPIO14_MMC2_CMD, |
| 115 | |||
| 116 | /* Standard I2C */ | ||
| 117 | GPIO21_I2C_SCL, | ||
| 118 | GPIO22_I2C_SDA, | ||
| 112 | }; | 119 | }; |
| 113 | 120 | ||
| 114 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { | 121 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { |
| @@ -192,6 +199,39 @@ static void __init zylonite_detect_lcd_panel(void) | |||
| 192 | pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]); | 199 | pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]); |
| 193 | } | 200 | } |
| 194 | 201 | ||
| 202 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | ||
| 203 | static struct pca953x_platform_data gpio_exp[] = { | ||
| 204 | [0] = { | ||
| 205 | .gpio_base = 128, | ||
| 206 | }, | ||
| 207 | [1] = { | ||
| 208 | .gpio_base = 144, | ||
| 209 | }, | ||
| 210 | }; | ||
| 211 | |||
| 212 | struct i2c_board_info zylonite_i2c_board_info[] = { | ||
| 213 | { | ||
| 214 | .type = "pca9539", | ||
| 215 | .addr = 0x74, | ||
| 216 | .platform_data = &gpio_exp[0], | ||
| 217 | .irq = IRQ_GPIO(18), | ||
| 218 | }, { | ||
| 219 | .type = "pca9539", | ||
| 220 | .addr = 0x75, | ||
| 221 | .platform_data = &gpio_exp[1], | ||
| 222 | .irq = IRQ_GPIO(19), | ||
| 223 | }, | ||
| 224 | }; | ||
| 225 | |||
| 226 | static void __init zylonite_init_i2c(void) | ||
| 227 | { | ||
| 228 | pxa_set_i2c_info(NULL); | ||
| 229 | i2c_register_board_info(0, ARRAY_AND_SIZE(zylonite_i2c_board_info)); | ||
| 230 | } | ||
| 231 | #else | ||
| 232 | static inline void zylonite_init_i2c(void) {} | ||
| 233 | #endif | ||
| 234 | |||
| 195 | void __init zylonite_pxa300_init(void) | 235 | void __init zylonite_pxa300_init(void) |
| 196 | { | 236 | { |
| 197 | if (cpu_is_pxa300() || cpu_is_pxa310()) { | 237 | if (cpu_is_pxa300() || cpu_is_pxa310()) { |
| @@ -207,6 +247,8 @@ void __init zylonite_pxa300_init(void) | |||
| 207 | 247 | ||
| 208 | /* WM9713 IRQ */ | 248 | /* WM9713 IRQ */ |
| 209 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); | 249 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); |
| 250 | |||
| 251 | zylonite_init_i2c(); | ||
| 210 | } | 252 | } |
| 211 | 253 | ||
| 212 | if (cpu_is_pxa300()) { | 254 | if (cpu_is_pxa300()) { |
| @@ -222,4 +264,8 @@ void __init zylonite_pxa300_init(void) | |||
| 222 | zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30); | 264 | zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30); |
| 223 | zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31); | 265 | zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31); |
| 224 | } | 266 | } |
| 267 | |||
| 268 | /* GPIOs for Debug LEDs */ | ||
| 269 | gpio_debug_led1 = EXT_GPIO(25); | ||
| 270 | gpio_debug_led2 = EXT_GPIO(26); | ||
| 225 | } | 271 | } |
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c index 2b4fc34919ac..2b7fba7a2921 100644 --- a/arch/arm/mach-pxa/zylonite_pxa320.c +++ b/arch/arm/mach-pxa/zylonite_pxa320.c | |||
| @@ -116,6 +116,10 @@ static mfp_cfg_t mfp_cfg[] __initdata = { | |||
| 116 | GPIO27_MMC2_DAT3, | 116 | GPIO27_MMC2_DAT3, |
| 117 | GPIO28_MMC2_CLK, | 117 | GPIO28_MMC2_CLK, |
| 118 | GPIO29_MMC2_CMD, | 118 | GPIO29_MMC2_CMD, |
| 119 | |||
| 120 | /* Debug LEDs */ | ||
| 121 | GPIO1_2_GPIO | MFP_LPM_DRIVE_HIGH, | ||
| 122 | GPIO4_2_GPIO | MFP_LPM_DRIVE_HIGH, | ||
| 119 | }; | 123 | }; |
| 120 | 124 | ||
| 121 | #define NUM_LCD_DETECT_PINS 7 | 125 | #define NUM_LCD_DETECT_PINS 7 |
| @@ -189,6 +193,8 @@ void __init zylonite_pxa320_init(void) | |||
| 189 | 193 | ||
| 190 | /* GPIO pin assignment */ | 194 | /* GPIO pin assignment */ |
| 191 | gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9); | 195 | gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9); |
| 196 | gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2); | ||
| 197 | gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2); | ||
| 192 | 198 | ||
| 193 | /* MMC card detect & write protect for controller 0 */ | 199 | /* MMC card detect & write protect for controller 0 */ |
| 194 | zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1); | 200 | zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1); |
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c index fc97fe57ee6f..b5809c51d13f 100644 --- a/arch/arm/mach-sa1100/clock.c +++ b/arch/arm/mach-sa1100/clock.c | |||
| @@ -103,7 +103,7 @@ static void clk_gpio27_disable(void) | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | static struct clk clk_gpio27 = { | 105 | static struct clk clk_gpio27 = { |
| 106 | .name = "GPIO27_CLK", | 106 | .name = "SA1111_CLK", |
| 107 | .rate = 3686400, | 107 | .rate = 3686400, |
| 108 | .enable = clk_gpio27_enable, | 108 | .enable = clk_gpio27_enable, |
| 109 | .disable = clk_gpio27_disable, | 109 | .disable = clk_gpio27_disable, |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index f64b92557b11..2e27a8c8372b 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
| @@ -76,3 +76,5 @@ obj-$(CONFIG_CPU_V7) += proc-v7.o | |||
| 76 | 76 | ||
| 77 | obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o | 77 | obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o |
| 78 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 78 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
| 79 | obj-$(CONFIG_CACHE_XSC3L2) += cache-xsc3l2.o | ||
| 80 | |||
diff --git a/arch/arm/mm/discontig.c b/arch/arm/mm/discontig.c index 1e5602189507..c8c0c4b0f0a3 100644 --- a/arch/arm/mm/discontig.c +++ b/arch/arm/mm/discontig.c | |||
| @@ -21,26 +21,24 @@ | |||
| 21 | * Our node_data structure for discontiguous memory. | 21 | * Our node_data structure for discontiguous memory. |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | static bootmem_data_t node_bootmem_data[MAX_NUMNODES]; | ||
| 25 | |||
| 26 | pg_data_t discontig_node_data[MAX_NUMNODES] = { | 24 | pg_data_t discontig_node_data[MAX_NUMNODES] = { |
| 27 | { .bdata = &node_bootmem_data[0] }, | 25 | { .bdata = &bootmem_node_data[0] }, |
| 28 | { .bdata = &node_bootmem_data[1] }, | 26 | { .bdata = &bootmem_node_data[1] }, |
| 29 | { .bdata = &node_bootmem_data[2] }, | 27 | { .bdata = &bootmem_node_data[2] }, |
| 30 | { .bdata = &node_bootmem_data[3] }, | 28 | { .bdata = &bootmem_node_data[3] }, |
| 31 | #if MAX_NUMNODES == 16 | 29 | #if MAX_NUMNODES == 16 |
| 32 | { .bdata = &node_bootmem_data[4] }, | 30 | { .bdata = &bootmem_node_data[4] }, |
| 33 | { .bdata = &node_bootmem_data[5] }, | 31 | { .bdata = &bootmem_node_data[5] }, |
| 34 | { .bdata = &node_bootmem_data[6] }, | 32 | { .bdata = &bootmem_node_data[6] }, |
| 35 | { .bdata = &node_bootmem_data[7] }, | 33 | { .bdata = &bootmem_node_data[7] }, |
| 36 | { .bdata = &node_bootmem_data[8] }, | 34 | { .bdata = &bootmem_node_data[8] }, |
| 37 | { .bdata = &node_bootmem_data[9] }, | 35 | { .bdata = &bootmem_node_data[9] }, |
| 38 | { .bdata = &node_bootmem_data[10] }, | 36 | { .bdata = &bootmem_node_data[10] }, |
| 39 | { .bdata = &node_bootmem_data[11] }, | 37 | { .bdata = &bootmem_node_data[11] }, |
| 40 | { .bdata = &node_bootmem_data[12] }, | 38 | { .bdata = &bootmem_node_data[12] }, |
| 41 | { .bdata = &node_bootmem_data[13] }, | 39 | { .bdata = &bootmem_node_data[13] }, |
| 42 | { .bdata = &node_bootmem_data[14] }, | 40 | { .bdata = &bootmem_node_data[14] }, |
| 43 | { .bdata = &node_bootmem_data[15] }, | 41 | { .bdata = &bootmem_node_data[15] }, |
| 44 | #endif | 42 | #endif |
| 45 | }; | 43 | }; |
| 46 | 44 | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index b657f1719af0..e6352946dde0 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
| @@ -284,7 +284,7 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi) | |||
| 284 | */ | 284 | */ |
| 285 | arch_adjust_zones(node, zone_size, zhole_size); | 285 | arch_adjust_zones(node, zone_size, zhole_size); |
| 286 | 286 | ||
| 287 | free_area_init_node(node, pgdat, zone_size, start_pfn, zhole_size); | 287 | free_area_init_node(node, zone_size, start_pfn, zhole_size); |
| 288 | 288 | ||
| 289 | return end_pfn; | 289 | return end_pfn; |
| 290 | } | 290 | } |
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 7854f19b77cf..5d107520e6b9 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
| 26 | #include <linux/mm.h> | ||
| 26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
| 27 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
| 28 | #include <linux/bootmem.h> | 29 | #include <linux/bootmem.h> |
| @@ -182,7 +183,7 @@ void __init omapfb_reserve_sdram(void) | |||
| 182 | return; | 183 | return; |
| 183 | 184 | ||
| 184 | bdata = NODE_DATA(0)->bdata; | 185 | bdata = NODE_DATA(0)->bdata; |
| 185 | sdram_start = bdata->node_boot_start; | 186 | sdram_start = bdata->node_min_pfn << PAGE_SHIFT; |
| 186 | sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start; | 187 | sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start; |
| 187 | reserved = 0; | 188 | reserved = 0; |
| 188 | for (i = 0; ; i++) { | 189 | for (i = 0; ; i++) { |
| @@ -340,5 +341,3 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart, | |||
| 340 | 341 | ||
| 341 | 342 | ||
| 342 | #endif | 343 | #endif |
| 343 | |||
| 344 | |||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 1903a3491ee9..d8e9c2c3f0f6 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
| @@ -1488,6 +1488,9 @@ static int __init _omap_gpio_init(void) | |||
| 1488 | bank->chip.set = gpio_set; | 1488 | bank->chip.set = gpio_set; |
| 1489 | if (bank_is_mpuio(bank)) { | 1489 | if (bank_is_mpuio(bank)) { |
| 1490 | bank->chip.label = "mpuio"; | 1490 | bank->chip.label = "mpuio"; |
| 1491 | #ifdef CONFIG_ARCH_OMAP1 | ||
| 1492 | bank->chip.dev = &omap_mpuio_device.dev; | ||
| 1493 | #endif | ||
| 1491 | bank->chip.base = OMAP_MPUIO(0); | 1494 | bank->chip.base = OMAP_MPUIO(0); |
| 1492 | } else { | 1495 | } else { |
| 1493 | bank->chip.label = "gpio"; | 1496 | bank->chip.label = "gpio"; |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 60f162dc4fad..8c5e656d5d8c 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
| @@ -1304,7 +1304,7 @@ struct sysdev_class dma_sysclass = { | |||
| 1304 | 1304 | ||
| 1305 | /* kmem cache implementation */ | 1305 | /* kmem cache implementation */ |
| 1306 | 1306 | ||
| 1307 | static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p) | 1307 | static void s3c2410_dma_cache_ctor(void *p) |
| 1308 | { | 1308 | { |
| 1309 | memset(p, 0, sizeof(struct s3c2410_dma_buf)); | 1309 | memset(p, 0, sizeof(struct s3c2410_dma_buf)); |
| 1310 | } | 1310 | } |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 0be5630ff568..8b8f564c3aa2 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | # | 12 | # |
| 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
| 14 | # | 14 | # |
| 15 | # Last update: Mon Jul 7 16:25:39 2008 | 15 | # Last update: Sun Jul 13 12:04:05 2008 |
| 16 | # | 16 | # |
| 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
| 18 | # | 18 | # |
| @@ -1812,3 +1812,11 @@ jade MACH_JADE JADE 1821 | |||
| 1812 | ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822 | 1812 | ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822 |
| 1813 | gprisc4 MACH_GPRISC4 GPRISC4 1823 | 1813 | gprisc4 MACH_GPRISC4 GPRISC4 1823 |
| 1814 | stamp9260 MACH_STAMP9260 STAMP9260 1824 | 1814 | stamp9260 MACH_STAMP9260 STAMP9260 1824 |
| 1815 | smdk6430 MACH_SMDK6430 SMDK6430 1825 | ||
| 1816 | smdkc100 MACH_SMDKC100 SMDKC100 1826 | ||
| 1817 | tavorevb MACH_TAVOREVB TAVOREVB 1827 | ||
| 1818 | saar MACH_SAAR SAAR 1828 | ||
| 1819 | deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829 | ||
| 1820 | at91sam9m10ek MACH_AT91SAM9M10EK AT91SAM9M10EK 1830 | ||
| 1821 | linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831 | ||
| 1822 | hit_b0 MACH_HIT_B0 HIT_B0 1832 | ||
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 45d63c986015..7c239a916275 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
| @@ -10,6 +10,7 @@ config AVR32 | |||
| 10 | # With EMBEDDED=n, we get lots of stuff automatically selected | 10 | # With EMBEDDED=n, we get lots of stuff automatically selected |
| 11 | # that we usually don't need on AVR32. | 11 | # that we usually don't need on AVR32. |
| 12 | select EMBEDDED | 12 | select EMBEDDED |
| 13 | select HAVE_CLK | ||
| 13 | select HAVE_OPROFILE | 14 | select HAVE_OPROFILE |
| 14 | select HAVE_KPROBES | 15 | select HAVE_KPROBES |
| 15 | help | 16 | help |
| @@ -87,7 +88,7 @@ config PLATFORM_AT32AP | |||
| 87 | select SUBARCH_AVR32B | 88 | select SUBARCH_AVR32B |
| 88 | select MMU | 89 | select MMU |
| 89 | select PERFORMANCE_COUNTERS | 90 | select PERFORMANCE_COUNTERS |
| 90 | select HAVE_GPIO_LIB | 91 | select ARCH_REQUIRE_GPIOLIB |
| 91 | select GENERIC_ALLOCATOR | 92 | select GENERIC_ALLOCATOR |
| 92 | 93 | ||
| 93 | # | 94 | # |
diff --git a/arch/avr32/boards/atstk1000/Kconfig b/arch/avr32/boards/atstk1000/Kconfig index af90b00100fd..8dc48214f0b7 100644 --- a/arch/avr32/boards/atstk1000/Kconfig +++ b/arch/avr32/boards/atstk1000/Kconfig | |||
| @@ -18,6 +18,10 @@ config BOARD_ATSTK1004 | |||
| 18 | bool "ATSTK1004" | 18 | bool "ATSTK1004" |
| 19 | select CPU_AT32AP7002 | 19 | select CPU_AT32AP7002 |
| 20 | 20 | ||
| 21 | config BOARD_ATSTK1006 | ||
| 22 | bool "ATSTK1006" | ||
| 23 | select CPU_AT32AP7000 | ||
| 24 | |||
| 21 | endchoice | 25 | endchoice |
| 22 | 26 | ||
| 23 | 27 | ||
diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile index beead86462e8..edecee03742d 100644 --- a/arch/avr32/boards/atstk1000/Makefile +++ b/arch/avr32/boards/atstk1000/Makefile | |||
| @@ -2,3 +2,4 @@ obj-y += setup.o flash.o | |||
| 2 | obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o | 2 | obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o |
| 3 | obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o | 3 | obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o |
| 4 | obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o | 4 | obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o |
| 5 | obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o | ||
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index e11659b732fa..14dc5a143695 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * ATSTK1002 daughterboard-specific init code | 2 | * ATSTK1002/ATSTK1006 daughterboard-specific init code |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2006 Atmel Corporation | 4 | * Copyright (C) 2005-2007 Atmel Corporation |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 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 | 7 | * it under the terms of the GNU General Public License version 2 as |
| @@ -35,6 +35,74 @@ unsigned long at32_board_osc_rates[3] = { | |||
| 35 | [2] = 12000000, /* 12 MHz on osc1 */ | 35 | [2] = 12000000, /* 12 MHz on osc1 */ |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | /* | ||
| 39 | * The ATSTK1006 daughterboard is very similar to the ATSTK1002. Both | ||
| 40 | * have the AT32AP7000 chip on board; the difference is that the | ||
| 41 | * STK1006 has 128 MB SDRAM (the STK1002 uses the 8 MB SDRAM chip on | ||
| 42 | * the STK1000 motherboard) and 256 MB NAND flash (the STK1002 has | ||
| 43 | * none.) | ||
| 44 | * | ||
| 45 | * The RAM difference is handled by the boot loader, so the only | ||
| 46 | * difference we end up handling here is the NAND flash. | ||
| 47 | */ | ||
| 48 | #ifdef CONFIG_BOARD_ATSTK1006 | ||
| 49 | #include <linux/mtd/partitions.h> | ||
| 50 | #include <asm/arch/smc.h> | ||
| 51 | |||
| 52 | static struct smc_timing nand_timing __initdata = { | ||
| 53 | .ncs_read_setup = 0, | ||
| 54 | .nrd_setup = 10, | ||
| 55 | .ncs_write_setup = 0, | ||
| 56 | .nwe_setup = 10, | ||
| 57 | |||
| 58 | .ncs_read_pulse = 30, | ||
| 59 | .nrd_pulse = 15, | ||
| 60 | .ncs_write_pulse = 30, | ||
| 61 | .nwe_pulse = 15, | ||
| 62 | |||
| 63 | .read_cycle = 30, | ||
| 64 | .write_cycle = 30, | ||
| 65 | |||
| 66 | .ncs_read_recover = 0, | ||
| 67 | .nrd_recover = 15, | ||
| 68 | .ncs_write_recover = 0, | ||
| 69 | /* WE# high -> RE# low min 60 ns */ | ||
| 70 | .nwe_recover = 50, | ||
| 71 | }; | ||
| 72 | |||
| 73 | static struct smc_config nand_config __initdata = { | ||
| 74 | .bus_width = 1, | ||
| 75 | .nrd_controlled = 1, | ||
| 76 | .nwe_controlled = 1, | ||
| 77 | .nwait_mode = 0, | ||
| 78 | .byte_write = 0, | ||
| 79 | .tdf_cycles = 2, | ||
| 80 | .tdf_mode = 0, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static struct mtd_partition nand_partitions[] = { | ||
| 84 | { | ||
| 85 | .name = "main", | ||
| 86 | .offset = 0x00000000, | ||
| 87 | .size = MTDPART_SIZ_FULL, | ||
| 88 | }, | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct mtd_partition *nand_part_info(int size, int *num_partitions) | ||
| 92 | { | ||
| 93 | *num_partitions = ARRAY_SIZE(nand_partitions); | ||
| 94 | return nand_partitions; | ||
| 95 | } | ||
| 96 | |||
| 97 | struct atmel_nand_data atstk1006_nand_data __initdata = { | ||
| 98 | .cle = 21, | ||
| 99 | .ale = 22, | ||
| 100 | .rdy_pin = GPIO_PIN_PB(30), | ||
| 101 | .enable_pin = GPIO_PIN_PB(29), | ||
| 102 | .partition_info = nand_part_info, | ||
| 103 | }; | ||
| 104 | #endif | ||
| 105 | |||
| 38 | struct eth_addr { | 106 | struct eth_addr { |
| 39 | u8 addr[6]; | 107 | u8 addr[6]; |
| 40 | }; | 108 | }; |
| @@ -218,6 +286,12 @@ static int __init atstk1002_init(void) | |||
| 218 | 286 | ||
| 219 | at32_add_system_devices(); | 287 | at32_add_system_devices(); |
| 220 | 288 | ||
| 289 | #ifdef CONFIG_BOARD_ATSTK1006 | ||
| 290 | smc_set_timing(&nand_config, &nand_timing); | ||
| 291 | smc_set_configuration(3, &nand_config); | ||
| 292 | at32_add_device_nand(0, &atstk1006_nand_data); | ||
| 293 | #endif | ||
| 294 | |||
| 221 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM | 295 | #ifdef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM |
| 222 | at32_add_device_usart(1); | 296 | at32_add_device_usart(1); |
| 223 | #else | 297 | #else |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 6cf9df176274..ff820a9e743a 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
| @@ -31,7 +31,7 @@ void cpu_idle(void) | |||
| 31 | { | 31 | { |
| 32 | /* endless idle loop with no priority at all */ | 32 | /* endless idle loop with no priority at all */ |
| 33 | while (1) { | 33 | while (1) { |
| 34 | tick_nohz_stop_sched_tick(); | 34 | tick_nohz_stop_sched_tick(1); |
| 35 | while (!need_resched()) | 35 | while (!need_resched()) |
| 36 | cpu_idle_sleep(); | 36 | cpu_idle_sleep(); |
| 37 | tick_nohz_restart_sched_tick(); | 37 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/avr32/kernel/stacktrace.c b/arch/avr32/kernel/stacktrace.c index f4bdb448049c..c09f0d8dd679 100644 --- a/arch/avr32/kernel/stacktrace.c +++ b/arch/avr32/kernel/stacktrace.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
| 11 | #include <linux/stacktrace.h> | 11 | #include <linux/stacktrace.h> |
| 12 | #include <linux/thread_info.h> | 12 | #include <linux/thread_info.h> |
| 13 | #include <linux/module.h> | ||
| 13 | 14 | ||
| 14 | register unsigned long current_frame_pointer asm("r7"); | 15 | register unsigned long current_frame_pointer asm("r7"); |
| 15 | 16 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 021d51217184..351e1b42f937 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | */ | 7 | */ |
| 8 | #include <linux/clk.h> | 8 | #include <linux/clk.h> |
| 9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
| 10 | #include <linux/dw_dmac.h> | ||
| 10 | #include <linux/fb.h> | 11 | #include <linux/fb.h> |
| 11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
| 12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
| @@ -594,6 +595,17 @@ static void __init genclk_init_parent(struct clk *clk) | |||
| 594 | clk->parent = parent; | 595 | clk->parent = parent; |
| 595 | } | 596 | } |
| 596 | 597 | ||
| 598 | static struct dw_dma_platform_data dw_dmac0_data = { | ||
| 599 | .nr_channels = 3, | ||
| 600 | }; | ||
| 601 | |||
| 602 | static struct resource dw_dmac0_resource[] = { | ||
| 603 | PBMEM(0xff200000), | ||
| 604 | IRQ(2), | ||
| 605 | }; | ||
| 606 | DEFINE_DEV_DATA(dw_dmac, 0); | ||
| 607 | DEV_CLK(hclk, dw_dmac0, hsb, 10); | ||
| 608 | |||
| 597 | /* -------------------------------------------------------------------- | 609 | /* -------------------------------------------------------------------- |
| 598 | * System peripherals | 610 | * System peripherals |
| 599 | * -------------------------------------------------------------------- */ | 611 | * -------------------------------------------------------------------- */ |
| @@ -708,17 +720,6 @@ static struct clk pico_clk = { | |||
| 708 | .users = 1, | 720 | .users = 1, |
| 709 | }; | 721 | }; |
| 710 | 722 | ||
| 711 | static struct resource dmaca0_resource[] = { | ||
| 712 | { | ||
| 713 | .start = 0xff200000, | ||
| 714 | .end = 0xff20ffff, | ||
| 715 | .flags = IORESOURCE_MEM, | ||
| 716 | }, | ||
| 717 | IRQ(2), | ||
| 718 | }; | ||
| 719 | DEFINE_DEV(dmaca, 0); | ||
| 720 | DEV_CLK(hclk, dmaca0, hsb, 10); | ||
| 721 | |||
| 722 | /* -------------------------------------------------------------------- | 723 | /* -------------------------------------------------------------------- |
| 723 | * HMATRIX | 724 | * HMATRIX |
| 724 | * -------------------------------------------------------------------- */ | 725 | * -------------------------------------------------------------------- */ |
| @@ -831,7 +832,7 @@ void __init at32_add_system_devices(void) | |||
| 831 | platform_device_register(&at32_eic0_device); | 832 | platform_device_register(&at32_eic0_device); |
| 832 | platform_device_register(&smc0_device); | 833 | platform_device_register(&smc0_device); |
| 833 | platform_device_register(&pdc_device); | 834 | platform_device_register(&pdc_device); |
| 834 | platform_device_register(&dmaca0_device); | 835 | platform_device_register(&dw_dmac0_device); |
| 835 | 836 | ||
| 836 | platform_device_register(&at32_tcb0_device); | 837 | platform_device_register(&at32_tcb0_device); |
| 837 | platform_device_register(&at32_tcb1_device); | 838 | platform_device_register(&at32_tcb1_device); |
| @@ -1870,6 +1871,58 @@ fail: | |||
| 1870 | #endif | 1871 | #endif |
| 1871 | 1872 | ||
| 1872 | /* -------------------------------------------------------------------- | 1873 | /* -------------------------------------------------------------------- |
| 1874 | * NAND Flash / SmartMedia | ||
| 1875 | * -------------------------------------------------------------------- */ | ||
| 1876 | static struct resource smc_cs3_resource[] __initdata = { | ||
| 1877 | { | ||
| 1878 | .start = 0x0c000000, | ||
| 1879 | .end = 0x0fffffff, | ||
| 1880 | .flags = IORESOURCE_MEM, | ||
| 1881 | }, { | ||
| 1882 | .start = 0xfff03c00, | ||
| 1883 | .end = 0xfff03fff, | ||
| 1884 | .flags = IORESOURCE_MEM, | ||
| 1885 | }, | ||
| 1886 | }; | ||
| 1887 | |||
| 1888 | struct platform_device *__init | ||
| 1889 | at32_add_device_nand(unsigned int id, struct atmel_nand_data *data) | ||
| 1890 | { | ||
| 1891 | struct platform_device *pdev; | ||
| 1892 | |||
| 1893 | if (id != 0 || !data) | ||
| 1894 | return NULL; | ||
| 1895 | |||
| 1896 | pdev = platform_device_alloc("atmel_nand", id); | ||
| 1897 | if (!pdev) | ||
| 1898 | goto fail; | ||
| 1899 | |||
| 1900 | if (platform_device_add_resources(pdev, smc_cs3_resource, | ||
| 1901 | ARRAY_SIZE(smc_cs3_resource))) | ||
| 1902 | goto fail; | ||
| 1903 | |||
| 1904 | if (platform_device_add_data(pdev, data, | ||
| 1905 | sizeof(struct atmel_nand_data))) | ||
| 1906 | goto fail; | ||
| 1907 | |||
| 1908 | set_ebi_sfr_bits(HMATRIX_BIT(CS3A)); | ||
| 1909 | if (data->enable_pin) | ||
| 1910 | at32_select_gpio(data->enable_pin, | ||
| 1911 | AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); | ||
| 1912 | if (data->rdy_pin) | ||
| 1913 | at32_select_gpio(data->rdy_pin, 0); | ||
| 1914 | if (data->det_pin) | ||
| 1915 | at32_select_gpio(data->det_pin, 0); | ||
| 1916 | |||
| 1917 | platform_device_add(pdev); | ||
| 1918 | return pdev; | ||
| 1919 | |||
| 1920 | fail: | ||
| 1921 | platform_device_put(pdev); | ||
| 1922 | return NULL; | ||
| 1923 | } | ||
| 1924 | |||
| 1925 | /* -------------------------------------------------------------------- | ||
| 1873 | * AC97C | 1926 | * AC97C |
| 1874 | * -------------------------------------------------------------------- */ | 1927 | * -------------------------------------------------------------------- */ |
| 1875 | static struct resource atmel_ac97c0_resource[] __initdata = { | 1928 | static struct resource atmel_ac97c0_resource[] __initdata = { |
| @@ -2032,7 +2085,7 @@ struct clk *at32_clock_list[] = { | |||
| 2032 | &smc0_mck, | 2085 | &smc0_mck, |
| 2033 | &pdc_hclk, | 2086 | &pdc_hclk, |
| 2034 | &pdc_pclk, | 2087 | &pdc_pclk, |
| 2035 | &dmaca0_hclk, | 2088 | &dw_dmac0_hclk, |
| 2036 | &pico_clk, | 2089 | &pico_clk, |
| 2037 | &pio0_mck, | 2090 | &pio0_mck, |
| 2038 | &pio1_mck, | 2091 | &pio1_mck, |
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c index fa427ed42787..b2d9bc61a35c 100644 --- a/arch/avr32/mach-at32ap/hsmc.c +++ b/arch/avr32/mach-at32ap/hsmc.c | |||
| @@ -278,4 +278,4 @@ static int __init hsmc_init(void) | |||
| 278 | { | 278 | { |
| 279 | return platform_driver_register(&hsmc_driver); | 279 | return platform_driver_register(&hsmc_driver); |
| 280 | } | 280 | } |
| 281 | arch_initcall(hsmc_init); | 281 | core_initcall(hsmc_init); |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 60da03ba7117..296294f8ed81 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
| @@ -360,6 +360,8 @@ static int __init pio_probe(struct platform_device *pdev) | |||
| 360 | pio->chip.label = pio->name; | 360 | pio->chip.label = pio->name; |
| 361 | pio->chip.base = pdev->id * 32; | 361 | pio->chip.base = pdev->id * 32; |
| 362 | pio->chip.ngpio = 32; | 362 | pio->chip.ngpio = 32; |
| 363 | pio->chip.dev = &pdev->dev; | ||
| 364 | pio->chip.owner = THIS_MODULE; | ||
| 363 | 365 | ||
| 364 | pio->chip.direction_input = direction_input; | 366 | pio->chip.direction_input = direction_input; |
| 365 | pio->chip.get = gpio_get; | 367 | pio->chip.get = gpio_get; |
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c index 3f90a87527bb..fa92ff6d95f7 100644 --- a/arch/avr32/mm/init.c +++ b/arch/avr32/mm/init.c | |||
| @@ -38,45 +38,6 @@ EXPORT_SYMBOL(empty_zero_page); | |||
| 38 | */ | 38 | */ |
| 39 | unsigned long mmu_context_cache = NO_CONTEXT; | 39 | unsigned long mmu_context_cache = NO_CONTEXT; |
| 40 | 40 | ||
| 41 | void show_mem(void) | ||
| 42 | { | ||
| 43 | int total = 0, reserved = 0, cached = 0; | ||
| 44 | int slab = 0, free = 0, shared = 0; | ||
| 45 | pg_data_t *pgdat; | ||
| 46 | |||
| 47 | printk("Mem-info:\n"); | ||
| 48 | show_free_areas(); | ||
| 49 | |||
| 50 | for_each_online_pgdat(pgdat) { | ||
| 51 | struct page *page, *end; | ||
| 52 | |||
| 53 | page = pgdat->node_mem_map; | ||
| 54 | end = page + pgdat->node_spanned_pages; | ||
| 55 | |||
| 56 | do { | ||
| 57 | total++; | ||
| 58 | if (PageReserved(page)) | ||
| 59 | reserved++; | ||
| 60 | else if (PageSwapCache(page)) | ||
| 61 | cached++; | ||
| 62 | else if (PageSlab(page)) | ||
| 63 | slab++; | ||
| 64 | else if (!page_count(page)) | ||
| 65 | free++; | ||
| 66 | else | ||
| 67 | shared += page_count(page) - 1; | ||
| 68 | page++; | ||
| 69 | } while (page < end); | ||
| 70 | } | ||
| 71 | |||
| 72 | printk ("%d pages of RAM\n", total); | ||
| 73 | printk ("%d free pages\n", free); | ||
| 74 | printk ("%d reserved pages\n", reserved); | ||
| 75 | printk ("%d slab pages\n", slab); | ||
| 76 | printk ("%d pages shared\n", shared); | ||
| 77 | printk ("%d pages swap cached\n", cached); | ||
| 78 | } | ||
| 79 | |||
| 80 | /* | 41 | /* |
| 81 | * paging_init() sets up the page tables | 42 | * paging_init() sets up the page tables |
| 82 | * | 43 | * |
| @@ -119,8 +80,7 @@ void __init paging_init(void) | |||
| 119 | unsigned long zones_size[MAX_NR_ZONES]; | 80 | unsigned long zones_size[MAX_NR_ZONES]; |
| 120 | unsigned long low, start_pfn; | 81 | unsigned long low, start_pfn; |
| 121 | 82 | ||
| 122 | start_pfn = pgdat->bdata->node_boot_start; | 83 | start_pfn = pgdat->bdata->node_min_pfn; |
| 123 | start_pfn >>= PAGE_SHIFT; | ||
| 124 | low = pgdat->bdata->node_low_pfn; | 84 | low = pgdat->bdata->node_low_pfn; |
| 125 | 85 | ||
| 126 | memset(zones_size, 0, sizeof(zones_size)); | 86 | memset(zones_size, 0, sizeof(zones_size)); |
| @@ -129,7 +89,7 @@ void __init paging_init(void) | |||
| 129 | printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", | 89 | printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", |
| 130 | nid, start_pfn, low); | 90 | nid, start_pfn, low); |
| 131 | 91 | ||
| 132 | free_area_init_node(nid, pgdat, zones_size, start_pfn, NULL); | 92 | free_area_init_node(nid, zones_size, start_pfn, NULL); |
| 133 | 93 | ||
| 134 | printk("Node %u: mem_map starts at %p\n", | 94 | printk("Node %u: mem_map starts at %p\n", |
| 135 | pgdat->node_id, pgdat->node_mem_map); | 95 | pgdat->node_id, pgdat->node_mem_map); |
diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c index 3437c82434ac..f03b79f0e0ab 100644 --- a/arch/avr32/mm/ioremap.c +++ b/arch/avr32/mm/ioremap.c | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
| 7 | */ | 7 | */ |
| 8 | #include <linux/vmalloc.h> | 8 | #include <linux/vmalloc.h> |
| 9 | #include <linux/mm.h> | ||
| 9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
| 10 | #include <linux/io.h> | 11 | #include <linux/io.h> |
| 11 | 12 | ||
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index b83b8ef84e91..5a097c46bc46 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
| @@ -234,7 +234,7 @@ config MEM_MT48LC16M16A2TG_75 | |||
| 234 | bool | 234 | bool |
| 235 | depends on (BFIN533_EZKIT || BFIN561_EZKIT \ | 235 | depends on (BFIN533_EZKIT || BFIN561_EZKIT \ |
| 236 | || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM \ | 236 | || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM \ |
| 237 | || H8606_HVSISTEMAS) | 237 | || H8606_HVSISTEMAS || BFIN527_BLUETECHNIX_CM) |
| 238 | default y | 238 | default y |
| 239 | 239 | ||
| 240 | config MEM_MT48LC32M8A2_75 | 240 | config MEM_MT48LC32M8A2_75 |
| @@ -310,25 +310,6 @@ config BFIN_KERNEL_CLOCK | |||
| 310 | are also not changed, and the Bootloader does 100% of the hardware | 310 | are also not changed, and the Bootloader does 100% of the hardware |
| 311 | configuration. | 311 | configuration. |
| 312 | 312 | ||
| 313 | config MEM_SIZE | ||
| 314 | int "SDRAM Memory Size in MBytes" | ||
| 315 | depends on BFIN_KERNEL_CLOCK | ||
| 316 | default 64 | ||
| 317 | |||
| 318 | config MEM_ADD_WIDTH | ||
| 319 | int "Memory Address Width" | ||
| 320 | depends on BFIN_KERNEL_CLOCK | ||
| 321 | depends on (!BF54x) | ||
| 322 | range 8 11 | ||
| 323 | default 9 if BFIN533_EZKIT | ||
| 324 | default 9 if BFIN561_EZKIT | ||
| 325 | default 9 if H8606_HVSISTEMAS | ||
| 326 | default 10 if BFIN527_EZKIT | ||
| 327 | default 10 if BFIN537_STAMP | ||
| 328 | default 11 if BFIN533_STAMP | ||
| 329 | default 10 if PNAV10 | ||
| 330 | default 10 if BFIN532_IP0X | ||
| 331 | |||
| 332 | config PLL_BYPASS | 313 | config PLL_BYPASS |
| 333 | bool "Bypass PLL" | 314 | bool "Bypass PLL" |
| 334 | depends on BFIN_KERNEL_CLOCK | 315 | depends on BFIN_KERNEL_CLOCK |
| @@ -349,8 +330,7 @@ config VCO_MULT | |||
| 349 | default "45" if BFIN533_STAMP | 330 | default "45" if BFIN533_STAMP |
| 350 | default "20" if (BFIN537_STAMP || BFIN527_EZKIT || BFIN548_EZKIT || BFIN548_BLUETECHNIX_CM) | 331 | default "20" if (BFIN537_STAMP || BFIN527_EZKIT || BFIN548_EZKIT || BFIN548_BLUETECHNIX_CM) |
| 351 | default "22" if BFIN533_BLUETECHNIX_CM | 332 | default "22" if BFIN533_BLUETECHNIX_CM |
| 352 | default "20" if BFIN537_BLUETECHNIX_CM | 333 | default "20" if (BFIN537_BLUETECHNIX_CM || BFIN527_BLUETECHNIX_CM || BFIN561_BLUETECHNIX_CM) |
| 353 | default "20" if BFIN561_BLUETECHNIX_CM | ||
| 354 | default "20" if BFIN561_EZKIT | 334 | default "20" if BFIN561_EZKIT |
| 355 | default "16" if H8606_HVSISTEMAS | 335 | default "16" if H8606_HVSISTEMAS |
| 356 | help | 336 | help |
| @@ -390,7 +370,7 @@ config SCLK_DIV | |||
| 390 | 370 | ||
| 391 | config MAX_MEM_SIZE | 371 | config MAX_MEM_SIZE |
| 392 | int "Max SDRAM Memory Size in MBytes" | 372 | int "Max SDRAM Memory Size in MBytes" |
| 393 | depends on !BFIN_KERNEL_CLOCK && !MPU | 373 | depends on !MPU |
| 394 | default 512 | 374 | default 512 |
| 395 | help | 375 | help |
| 396 | This is the max memory size that the kernel will create CPLB | 376 | This is the max memory size that the kernel will create CPLB |
| @@ -748,14 +728,6 @@ config BFIN_WT | |||
| 748 | 728 | ||
| 749 | endchoice | 729 | endchoice |
| 750 | 730 | ||
| 751 | config L1_MAX_PIECE | ||
| 752 | int "Set the max L1 SRAM pieces" | ||
| 753 | default 16 | ||
| 754 | help | ||
| 755 | Set the max memory pieces for the L1 SRAM allocation algorithm. | ||
| 756 | Min value is 16. Max value is 1024. | ||
| 757 | |||
| 758 | |||
| 759 | config MPU | 731 | config MPU |
| 760 | bool "Enable the memory protection unit (EXPERIMENTAL)" | 732 | bool "Enable the memory protection unit (EXPERIMENTAL)" |
| 761 | default n | 733 | default n |
| @@ -899,7 +871,7 @@ config ARCH_SUSPEND_POSSIBLE | |||
| 899 | depends on !SMP | 871 | depends on !SMP |
| 900 | 872 | ||
| 901 | choice | 873 | choice |
| 902 | prompt "Default Power Saving Mode" | 874 | prompt "Standby Power Saving Mode" |
| 903 | depends on PM | 875 | depends on PM |
| 904 | default PM_BFIN_SLEEP_DEEPER | 876 | default PM_BFIN_SLEEP_DEEPER |
| 905 | config PM_BFIN_SLEEP_DEEPER | 877 | config PM_BFIN_SLEEP_DEEPER |
| @@ -918,6 +890,8 @@ config PM_BFIN_SLEEP_DEEPER | |||
| 918 | normal during Sleep Deeper, due to the reduced SCLK frequency. | 890 | normal during Sleep Deeper, due to the reduced SCLK frequency. |
| 919 | When in the sleep mode, system DMA access to L1 memory is not supported. | 891 | When in the sleep mode, system DMA access to L1 memory is not supported. |
| 920 | 892 | ||
| 893 | If unsure, select "Sleep Deeper". | ||
| 894 | |||
| 921 | config PM_BFIN_SLEEP | 895 | config PM_BFIN_SLEEP |
| 922 | bool "Sleep" | 896 | bool "Sleep" |
| 923 | help | 897 | help |
| @@ -925,15 +899,17 @@ config PM_BFIN_SLEEP | |||
| 925 | dissipation by disabling the clock to the processor core (CCLK). | 899 | dissipation by disabling the clock to the processor core (CCLK). |
| 926 | The PLL and system clock (SCLK), however, continue to operate in | 900 | The PLL and system clock (SCLK), however, continue to operate in |
| 927 | this mode. Typically an external event or RTC activity will wake | 901 | this mode. Typically an external event or RTC activity will wake |
| 928 | up the processor. When in the sleep mode, | 902 | up the processor. When in the sleep mode, system DMA access to L1 |
| 929 | system DMA access to L1 memory is not supported. | 903 | memory is not supported. |
| 904 | |||
| 905 | If unsure, select "Sleep Deeper". | ||
| 930 | endchoice | 906 | endchoice |
| 931 | 907 | ||
| 932 | config PM_WAKEUP_BY_GPIO | 908 | config PM_WAKEUP_BY_GPIO |
| 933 | bool "Cause Wakeup Event by GPIO" | 909 | bool "Allow Wakeup from Standby by GPIO" |
| 934 | 910 | ||
| 935 | config PM_WAKEUP_GPIO_NUMBER | 911 | config PM_WAKEUP_GPIO_NUMBER |
| 936 | int "Wakeup GPIO number" | 912 | int "GPIO number" |
| 937 | range 0 47 | 913 | range 0 47 |
| 938 | depends on PM_WAKEUP_BY_GPIO | 914 | depends on PM_WAKEUP_BY_GPIO |
| 939 | default 2 if BFIN537_STAMP | 915 | default 2 if BFIN537_STAMP |
| @@ -954,6 +930,58 @@ config PM_WAKEUP_GPIO_POLAR_EDGE_B | |||
| 954 | bool "Both EDGE" | 930 | bool "Both EDGE" |
| 955 | endchoice | 931 | endchoice |
| 956 | 932 | ||
| 933 | comment "Possible Suspend Mem / Hibernate Wake-Up Sources" | ||
| 934 | depends on PM | ||
| 935 | |||
| 936 | config PM_BFIN_WAKE_RTC | ||
| 937 | bool "Allow Wake-Up from RESET and on-chip RTC" | ||
| 938 | depends on PM | ||
| 939 | default n | ||
| 940 | help | ||
| 941 | Enable RTC Wake-Up (Voltage Regulator Power-Up) | ||
| 942 | |||
| 943 | config PM_BFIN_WAKE_PH6 | ||
| 944 | bool "Allow Wake-Up from on-chip PHY or PH6 GP" | ||
| 945 | depends on PM && (BF52x || BF534 || BF536 || BF537) | ||
| 946 | default n | ||
| 947 | help | ||
| 948 | Enable PHY and PH6 GP Wake-Up (Voltage Regulator Power-Up) | ||
| 949 | |||
| 950 | config PM_BFIN_WAKE_CAN | ||
| 951 | bool "Allow Wake-Up from on-chip CAN0/1" | ||
| 952 | depends on PM && (BF54x || BF534 || BF536 || BF537) | ||
| 953 | default n | ||
| 954 | help | ||
| 955 | Enable CAN0/1 Wake-Up (Voltage Regulator Power-Up) | ||
| 956 | |||
| 957 | config PM_BFIN_WAKE_GP | ||
| 958 | bool "Allow Wake-Up from GPIOs" | ||
| 959 | depends on PM && BF54x | ||
| 960 | default n | ||
| 961 | help | ||
| 962 | Enable General-Purpose Wake-Up (Voltage Regulator Power-Up) | ||
| 963 | |||
| 964 | config PM_BFIN_WAKE_USB | ||
| 965 | bool "Allow Wake-Up from on-chip USB" | ||
| 966 | depends on PM && (BF54x || BF52x) | ||
| 967 | default n | ||
| 968 | help | ||
| 969 | Enable USB Wake-Up (Voltage Regulator Power-Up) | ||
| 970 | |||
| 971 | config PM_BFIN_WAKE_KEYPAD | ||
| 972 | bool "Allow Wake-Up from on-chip Keypad" | ||
| 973 | depends on PM && BF54x | ||
| 974 | default n | ||
| 975 | help | ||
| 976 | Enable Keypad Wake-Up (Voltage Regulator Power-Up) | ||
| 977 | |||
| 978 | config PM_BFIN_WAKE_ROTARY | ||
| 979 | bool "Allow Wake-Up from on-chip Rotary" | ||
| 980 | depends on PM && BF54x | ||
| 981 | default n | ||
| 982 | help | ||
| 983 | Enable Rotary Wake-Up (Voltage Regulator Power-Up) | ||
| 984 | |||
| 957 | endmenu | 985 | endmenu |
| 958 | 986 | ||
| 959 | menu "CPU Frequency scaling" | 987 | menu "CPU Frequency scaling" |
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug index c61bdebb9974..c468624d55f0 100644 --- a/arch/blackfin/Kconfig.debug +++ b/arch/blackfin/Kconfig.debug | |||
| @@ -154,13 +154,6 @@ config EARLY_PRINTK | |||
| 154 | all of this lives in the init section and is thrown away after the | 154 | all of this lives in the init section and is thrown away after the |
| 155 | kernel boots completely. | 155 | kernel boots completely. |
| 156 | 156 | ||
| 157 | config DUAL_CORE_TEST_MODULE | ||
| 158 | tristate "Dual Core Test Module" | ||
| 159 | depends on (BF561) | ||
| 160 | default n | ||
| 161 | help | ||
| 162 | Say Y here to build-in dual core test module for dual core test. | ||
| 163 | |||
| 164 | config CPLB_INFO | 157 | config CPLB_INFO |
| 165 | bool "Display the CPLB information" | 158 | bool "Display the CPLB information" |
| 166 | help | 159 | help |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 3cbe16caad4b..9564731ad3a8 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
| @@ -6,8 +6,9 @@ | |||
| 6 | # for more details. | 6 | # for more details. |
| 7 | # | 7 | # |
| 8 | 8 | ||
| 9 | 9 | ifeq ($(CROSS_COMPILE),) | |
| 10 | CROSS_COMPILE ?= bfin-uclinux- | 10 | CROSS_COMPILE := bfin-uclinux- |
| 11 | endif | ||
| 11 | LDFLAGS_vmlinux := -X | 12 | LDFLAGS_vmlinux := -X |
| 12 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 13 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
| 13 | GZFLAGS := -9 | 14 | GZFLAGS := -9 |
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig index 5e6fb9d8e50f..66854a83c0de 100644 --- a/arch/blackfin/configs/BF527-EZKIT_defconfig +++ b/arch/blackfin/configs/BF527-EZKIT_defconfig | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.24.7 | 3 | # Linux kernel version: 2.6.24.7 |
| 4 | # Fri May 16 10:02:29 2008 | ||
| 5 | # | 4 | # |
| 6 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
| 7 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
| @@ -290,7 +289,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
| 290 | # CONFIG_RESOURCES_64BIT is not set | 289 | # CONFIG_RESOURCES_64BIT is not set |
| 291 | CONFIG_ZONE_DMA_FLAG=1 | 290 | CONFIG_ZONE_DMA_FLAG=1 |
| 292 | CONFIG_VIRT_TO_BUS=y | 291 | CONFIG_VIRT_TO_BUS=y |
| 293 | # CONFIG_BFIN_GPTIMERS is not set | 292 | CONFIG_BFIN_GPTIMERS=y |
| 294 | CONFIG_BFIN_DMA_5XX=y | 293 | CONFIG_BFIN_DMA_5XX=y |
| 295 | # CONFIG_DMA_UNCACHED_4M is not set | 294 | # CONFIG_DMA_UNCACHED_4M is not set |
| 296 | # CONFIG_DMA_UNCACHED_2M is not set | 295 | # CONFIG_DMA_UNCACHED_2M is not set |
| @@ -430,7 +429,58 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
| 430 | # | 429 | # |
| 431 | # CONFIG_NET_PKTGEN is not set | 430 | # CONFIG_NET_PKTGEN is not set |
| 432 | # CONFIG_HAMRADIO is not set | 431 | # CONFIG_HAMRADIO is not set |
| 433 | # CONFIG_IRDA is not set | 432 | CONFIG_IRDA=m |
| 433 | |||
| 434 | # | ||
| 435 | # IrDA protocols | ||
| 436 | # | ||
| 437 | CONFIG_IRLAN=m | ||
| 438 | CONFIG_IRCOMM=m | ||
| 439 | # CONFIG_IRDA_ULTRA is not set | ||
| 440 | |||
| 441 | # | ||
| 442 | # IrDA options | ||
| 443 | # | ||
| 444 | # CONFIG_IRDA_CACHE_LAST_LSAP is not set | ||
| 445 | # CONFIG_IRDA_FAST_RR is not set | ||
| 446 | # CONFIG_IRDA_DEBUG is not set | ||
| 447 | |||
| 448 | # | ||
| 449 | # Infrared-port device drivers | ||
| 450 | # | ||
| 451 | |||
| 452 | # | ||
| 453 | # SIR device drivers | ||
| 454 | # | ||
| 455 | CONFIG_IRTTY_SIR=m | ||
| 456 | CONFIG_BFIN_SIR=m | ||
| 457 | CONFIG_BFIN_SIR0=y | ||
| 458 | CONFIG_SIR_BFIN_DMA=y | ||
| 459 | # CONFIG_SIR_BFIN_PIO is not set | ||
| 460 | |||
| 461 | # | ||
| 462 | # Dongle support | ||
| 463 | # | ||
| 464 | # CONFIG_DONGLE is not set | ||
| 465 | # CONFIG_KINGSUN_DONGLE is not set | ||
| 466 | # CONFIG_KSDAZZLE_DONGLE is not set | ||
| 467 | # CONFIG_KS959_DONGLE is not set | ||
| 468 | |||
| 469 | # | ||
| 470 | # Old SIR device drivers | ||
| 471 | # | ||
| 472 | # CONFIG_IRPORT_SIR is not set | ||
| 473 | |||
| 474 | # | ||
| 475 | # Old Serial dongle support | ||
| 476 | # | ||
| 477 | |||
| 478 | # | ||
| 479 | # FIR device drivers | ||
| 480 | # | ||
| 481 | # CONFIG_USB_IRDA is not set | ||
| 482 | # CONFIG_SIGMATEL_FIR is not set | ||
| 483 | # CONFIG_MCS_FIR is not set | ||
| 434 | # CONFIG_BT is not set | 484 | # CONFIG_BT is not set |
| 435 | # CONFIG_AF_RXRPC is not set | 485 | # CONFIG_AF_RXRPC is not set |
| 436 | 486 | ||
| @@ -689,8 +739,11 @@ CONFIG_BFIN_OTP=y | |||
| 689 | # CONFIG_BFIN_SPORT is not set | 739 | # CONFIG_BFIN_SPORT is not set |
| 690 | # CONFIG_BFIN_TIMER_LATENCY is not set | 740 | # CONFIG_BFIN_TIMER_LATENCY is not set |
| 691 | # CONFIG_TWI_LCD is not set | 741 | # CONFIG_TWI_LCD is not set |
| 692 | # CONFIG_SIMPLE_GPIO is not set | 742 | CONFIG_SIMPLE_GPIO=m |
| 693 | # CONFIG_VT is not set | 743 | CONFIG_VT=y |
| 744 | CONFIG_VT_CONSOLE=y | ||
| 745 | CONFIG_HW_CONSOLE=y | ||
| 746 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
| 694 | # CONFIG_SERIAL_NONSTANDARD is not set | 747 | # CONFIG_SERIAL_NONSTANDARD is not set |
| 695 | 748 | ||
| 696 | # | 749 | # |
| @@ -872,8 +925,36 @@ CONFIG_SSB_POSSIBLE=y | |||
| 872 | # | 925 | # |
| 873 | # CONFIG_VGASTATE is not set | 926 | # CONFIG_VGASTATE is not set |
| 874 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | 927 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set |
| 875 | # CONFIG_FB is not set | 928 | CONFIG_FB=y |
| 876 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 929 | # CONFIG_FIRMWARE_EDID is not set |
| 930 | # CONFIG_FB_DDC is not set | ||
| 931 | CONFIG_FB_CFB_FILLRECT=y | ||
| 932 | CONFIG_FB_CFB_COPYAREA=y | ||
| 933 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
| 934 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
| 935 | # CONFIG_FB_SYS_FILLRECT is not set | ||
| 936 | # CONFIG_FB_SYS_COPYAREA is not set | ||
| 937 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
| 938 | # CONFIG_FB_SYS_FOPS is not set | ||
| 939 | CONFIG_FB_DEFERRED_IO=y | ||
| 940 | # CONFIG_FB_SVGALIB is not set | ||
| 941 | # CONFIG_FB_MACMODES is not set | ||
| 942 | # CONFIG_FB_BACKLIGHT is not set | ||
| 943 | # CONFIG_FB_MODE_HELPERS is not set | ||
| 944 | # CONFIG_FB_TILEBLITTING is not set | ||
| 945 | |||
| 946 | # | ||
| 947 | # Frame buffer hardware drivers | ||
| 948 | # | ||
| 949 | CONFIG_FB_BFIN_T350MCQB=y | ||
| 950 | # CONFIG_FB_BFIN_7393 is not set | ||
| 951 | # CONFIG_FB_S1D13XXX is not set | ||
| 952 | # CONFIG_FB_VIRTUAL is not set | ||
| 953 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 954 | CONFIG_LCD_CLASS_DEVICE=m | ||
| 955 | CONFIG_LCD_LTV350QV=m | ||
| 956 | CONFIG_BACKLIGHT_CLASS_DEVICE=m | ||
| 957 | # CONFIG_BACKLIGHT_CORGI is not set | ||
| 877 | 958 | ||
| 878 | # | 959 | # |
| 879 | # Display device support | 960 | # Display device support |
| @@ -881,9 +962,99 @@ CONFIG_SSB_POSSIBLE=y | |||
| 881 | # CONFIG_DISPLAY_SUPPORT is not set | 962 | # CONFIG_DISPLAY_SUPPORT is not set |
| 882 | 963 | ||
| 883 | # | 964 | # |
| 965 | # Console display driver support | ||
| 966 | # | ||
| 967 | CONFIG_DUMMY_CONSOLE=y | ||
| 968 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
| 969 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
| 970 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
| 971 | # CONFIG_FONTS is not set | ||
| 972 | CONFIG_FONT_8x8=y | ||
| 973 | CONFIG_FONT_8x16=y | ||
| 974 | CONFIG_LOGO=y | ||
| 975 | # CONFIG_LOGO_LINUX_MONO is not set | ||
| 976 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
| 977 | # CONFIG_LOGO_LINUX_CLUT224 is not set | ||
| 978 | # CONFIG_LOGO_BLACKFIN_VGA16 is not set | ||
| 979 | CONFIG_LOGO_BLACKFIN_CLUT224=y | ||
| 980 | |||
| 981 | # | ||
| 884 | # Sound | 982 | # Sound |
| 885 | # | 983 | # |
| 886 | # CONFIG_SOUND is not set | 984 | CONFIG_SOUND=m |
| 985 | |||
| 986 | # | ||
| 987 | # Advanced Linux Sound Architecture | ||
| 988 | # | ||
| 989 | CONFIG_SND=m | ||
| 990 | CONFIG_SND_TIMER=m | ||
| 991 | CONFIG_SND_PCM=m | ||
| 992 | # CONFIG_SND_SEQUENCER is not set | ||
| 993 | # CONFIG_SND_MIXER_OSS is not set | ||
| 994 | # CONFIG_SND_PCM_OSS is not set | ||
| 995 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
| 996 | CONFIG_SND_SUPPORT_OLD_API=y | ||
| 997 | CONFIG_SND_VERBOSE_PROCFS=y | ||
| 998 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
| 999 | # CONFIG_SND_DEBUG is not set | ||
| 1000 | |||
| 1001 | # | ||
| 1002 | # Generic devices | ||
| 1003 | # | ||
| 1004 | # CONFIG_SND_DUMMY is not set | ||
| 1005 | # CONFIG_SND_MTPAV is not set | ||
| 1006 | # CONFIG_SND_SERIAL_U16550 is not set | ||
| 1007 | # CONFIG_SND_MPU401 is not set | ||
| 1008 | |||
| 1009 | # | ||
| 1010 | # SPI devices | ||
| 1011 | # | ||
| 1012 | |||
| 1013 | # | ||
| 1014 | # ALSA Blackfin devices | ||
| 1015 | # | ||
| 1016 | # CONFIG_SND_BLACKFIN_AD1836 is not set | ||
| 1017 | # CONFIG_SND_BLACKFIN_AD1836_TDM is not set | ||
| 1018 | # CONFIG_SND_BLACKFIN_AD1836_I2S is not set | ||
| 1019 | # CONFIG_SND_BLACKFIN_AD1836_MULSUB is not set | ||
| 1020 | # CONFIG_SND_BLACKFIN_AD1836_5P1 is not set | ||
| 1021 | # CONFIG_SND_BFIN_AD73311 is not set | ||
| 1022 | # CONFIG_SND_BFIN_AD73322 is not set | ||
| 1023 | |||
| 1024 | # | ||
| 1025 | # USB devices | ||
| 1026 | # | ||
| 1027 | # CONFIG_SND_USB_AUDIO is not set | ||
| 1028 | # CONFIG_SND_USB_CAIAQ is not set | ||
| 1029 | |||
| 1030 | # | ||
| 1031 | # System on Chip audio support | ||
| 1032 | # | ||
| 1033 | CONFIG_SND_SOC_AC97_BUS=y | ||
| 1034 | CONFIG_SND_SOC=m | ||
| 1035 | CONFIG_SND_BF5XX_SOC=m | ||
| 1036 | CONFIG_SND_MMAP_SUPPORT=y | ||
| 1037 | CONFIG_SND_BF5XX_SOC_I2S=m | ||
| 1038 | CONFIG_SND_BF5XX_SOC_AC97=m | ||
| 1039 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set | ||
| 1040 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set | ||
| 1041 | CONFIG_SND_BF5XX_SOC_SSM2602=m | ||
| 1042 | CONFIG_SND_BF5XX_SOC_BF5xx=m | ||
| 1043 | CONFIG_SND_BF5XX_SPORT_NUM=0 | ||
| 1044 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | ||
| 1045 | |||
| 1046 | # | ||
| 1047 | # SoC Audio support for SuperH | ||
| 1048 | # | ||
| 1049 | CONFIG_SND_SOC_SSM2602=m | ||
| 1050 | # CONFIG_SND_SOC_SSM2602_SPI is not set | ||
| 1051 | CONFIG_SND_SOC_AD1980=m | ||
| 1052 | |||
| 1053 | # | ||
| 1054 | # Open Sound System | ||
| 1055 | # | ||
| 1056 | # CONFIG_SOUND_PRIME is not set | ||
| 1057 | CONFIG_AC97_BUS=m | ||
| 887 | CONFIG_HID_SUPPORT=y | 1058 | CONFIG_HID_SUPPORT=y |
| 888 | CONFIG_HID=y | 1059 | CONFIG_HID=y |
| 889 | # CONFIG_HID_DEBUG is not set | 1060 | # CONFIG_HID_DEBUG is not set |
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig index 8d817ba01945..6bc11db12690 100644 --- a/arch/blackfin/configs/BF533-EZKIT_defconfig +++ b/arch/blackfin/configs/BF533-EZKIT_defconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.22.16 | 3 | # Linux kernel version: 2.6.24.7 |
| 4 | # | 4 | # |
| 5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
| 6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
| @@ -13,35 +13,34 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
| 13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
| 14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
| 15 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
| 16 | CONFIG_GENERIC_TIME=y | ||
| 17 | CONFIG_GENERIC_GPIO=y | 16 | CONFIG_GENERIC_GPIO=y |
| 18 | CONFIG_FORCE_MAX_ZONEORDER=14 | 17 | CONFIG_FORCE_MAX_ZONEORDER=14 |
| 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 18 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
| 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 21 | 20 | ||
| 22 | # | 21 | # |
| 23 | # Code maturity level options | 22 | # General setup |
| 24 | # | 23 | # |
| 25 | CONFIG_EXPERIMENTAL=y | 24 | CONFIG_EXPERIMENTAL=y |
| 26 | CONFIG_BROKEN_ON_SMP=y | 25 | CONFIG_BROKEN_ON_SMP=y |
| 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 26 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
| 28 | |||
| 29 | # | ||
| 30 | # General setup | ||
| 31 | # | ||
| 32 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
| 33 | CONFIG_LOCALVERSION_AUTO=y | 28 | CONFIG_LOCALVERSION_AUTO=y |
| 34 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
| 35 | # CONFIG_IPC_NS is not set | ||
| 36 | CONFIG_SYSVIPC_SYSCTL=y | 30 | CONFIG_SYSVIPC_SYSCTL=y |
| 37 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
| 38 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
| 39 | # CONFIG_TASKSTATS is not set | 33 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 34 | # CONFIG_USER_NS is not set |
| 35 | # CONFIG_PID_NS is not set | ||
| 41 | # CONFIG_AUDIT is not set | 36 | # CONFIG_AUDIT is not set |
| 42 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
| 44 | CONFIG_LOG_BUF_SHIFT=14 | 39 | CONFIG_LOG_BUF_SHIFT=14 |
| 40 | # CONFIG_CGROUPS is not set | ||
| 41 | CONFIG_FAIR_GROUP_SCHED=y | ||
| 42 | CONFIG_FAIR_USER_SCHED=y | ||
| 43 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
| 45 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_SYSFS_DEPRECATED=y |
| 46 | # CONFIG_RELAY is not set | 45 | # CONFIG_RELAY is not set |
| 47 | CONFIG_BLK_DEV_INITRD=y | 46 | CONFIG_BLK_DEV_INITRD=y |
| @@ -64,32 +63,24 @@ CONFIG_EPOLL=y | |||
| 64 | CONFIG_SIGNALFD=y | 63 | CONFIG_SIGNALFD=y |
| 65 | CONFIG_EVENTFD=y | 64 | CONFIG_EVENTFD=y |
| 66 | CONFIG_VM_EVENT_COUNTERS=y | 65 | CONFIG_VM_EVENT_COUNTERS=y |
| 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
| 68 | # CONFIG_NP2 is not set | ||
| 69 | CONFIG_SLAB=y | 66 | CONFIG_SLAB=y |
| 70 | # CONFIG_SLUB is not set | 67 | # CONFIG_SLUB is not set |
| 71 | # CONFIG_SLOB is not set | 68 | # CONFIG_SLOB is not set |
| 69 | CONFIG_SLABINFO=y | ||
| 72 | CONFIG_RT_MUTEXES=y | 70 | CONFIG_RT_MUTEXES=y |
| 73 | CONFIG_TINY_SHMEM=y | 71 | CONFIG_TINY_SHMEM=y |
| 74 | CONFIG_BASE_SMALL=0 | 72 | CONFIG_BASE_SMALL=0 |
| 75 | |||
| 76 | # | ||
| 77 | # Loadable module support | ||
| 78 | # | ||
| 79 | CONFIG_MODULES=y | 73 | CONFIG_MODULES=y |
| 80 | CONFIG_MODULE_UNLOAD=y | 74 | CONFIG_MODULE_UNLOAD=y |
| 81 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 75 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
| 82 | # CONFIG_MODVERSIONS is not set | 76 | # CONFIG_MODVERSIONS is not set |
| 83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 77 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
| 84 | CONFIG_KMOD=y | 78 | CONFIG_KMOD=y |
| 85 | |||
| 86 | # | ||
| 87 | # Block layer | ||
| 88 | # | ||
| 89 | CONFIG_BLOCK=y | 79 | CONFIG_BLOCK=y |
| 90 | # CONFIG_LBD is not set | 80 | # CONFIG_LBD is not set |
| 91 | # CONFIG_BLK_DEV_IO_TRACE is not set | 81 | # CONFIG_BLK_DEV_IO_TRACE is not set |
| 92 | # CONFIG_LSF is not set | 82 | # CONFIG_LSF is not set |
| 83 | # CONFIG_BLK_DEV_BSG is not set | ||
| 93 | 84 | ||
| 94 | # | 85 | # |
| 95 | # IO Schedulers | 86 | # IO Schedulers |
| @@ -141,12 +132,12 @@ CONFIG_BF_REV_0_3=y | |||
| 141 | # CONFIG_BF_REV_ANY is not set | 132 | # CONFIG_BF_REV_ANY is not set |
| 142 | # CONFIG_BF_REV_NONE is not set | 133 | # CONFIG_BF_REV_NONE is not set |
| 143 | CONFIG_BF53x=y | 134 | CONFIG_BF53x=y |
| 144 | CONFIG_BFIN_SINGLE_CORE=y | ||
| 145 | CONFIG_MEM_MT48LC16M16A2TG_75=y | 135 | CONFIG_MEM_MT48LC16M16A2TG_75=y |
| 146 | CONFIG_BFIN533_EZKIT=y | 136 | CONFIG_BFIN533_EZKIT=y |
| 147 | # CONFIG_BFIN533_STAMP is not set | 137 | # CONFIG_BFIN533_STAMP is not set |
| 148 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | 138 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set |
| 149 | # CONFIG_H8606_HVSISTEMAS is not set | 139 | # CONFIG_H8606_HVSISTEMAS is not set |
| 140 | # CONFIG_BFIN532_IP0X is not set | ||
| 150 | # CONFIG_GENERIC_BF533_BOARD is not set | 141 | # CONFIG_GENERIC_BF533_BOARD is not set |
| 151 | 142 | ||
| 152 | # | 143 | # |
| @@ -189,12 +180,14 @@ CONFIG_WDTIMER=13 | |||
| 189 | # Board customizations | 180 | # Board customizations |
| 190 | # | 181 | # |
| 191 | # CONFIG_CMDLINE_BOOL is not set | 182 | # CONFIG_CMDLINE_BOOL is not set |
| 183 | CONFIG_BOOT_LOAD=0x1000 | ||
| 192 | 184 | ||
| 193 | # | 185 | # |
| 194 | # Clock/PLL Setup | 186 | # Clock/PLL Setup |
| 195 | # | 187 | # |
| 196 | CONFIG_CLKIN_HZ=27000000 | 188 | CONFIG_CLKIN_HZ=27000000 |
| 197 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 189 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
| 190 | CONFIG_MAX_MEM_SIZE=512 | ||
| 198 | CONFIG_MAX_VCO_HZ=750000000 | 191 | CONFIG_MAX_VCO_HZ=750000000 |
| 199 | CONFIG_MIN_VCO_HZ=50000000 | 192 | CONFIG_MIN_VCO_HZ=50000000 |
| 200 | CONFIG_MAX_SCLK_HZ=133333333 | 193 | CONFIG_MAX_SCLK_HZ=133333333 |
| @@ -208,13 +201,17 @@ CONFIG_HZ_250=y | |||
| 208 | # CONFIG_HZ_300 is not set | 201 | # CONFIG_HZ_300 is not set |
| 209 | # CONFIG_HZ_1000 is not set | 202 | # CONFIG_HZ_1000 is not set |
| 210 | CONFIG_HZ=250 | 203 | CONFIG_HZ=250 |
| 204 | CONFIG_GENERIC_TIME=y | ||
| 205 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 206 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
| 207 | CONFIG_TICK_ONESHOT=y | ||
| 208 | # CONFIG_NO_HZ is not set | ||
| 209 | CONFIG_HIGH_RES_TIMERS=y | ||
| 210 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 211 | 211 | ||
| 212 | # | 212 | # |
| 213 | # Memory Setup | 213 | # Misc |
| 214 | # | 214 | # |
| 215 | CONFIG_MAX_MEM_SIZE=512 | ||
| 216 | CONFIG_MEM_ADD_WIDTH=9 | ||
| 217 | CONFIG_BOOT_LOAD=0x1000 | ||
| 218 | CONFIG_BFIN_SCRATCH_REG_RETN=y | 215 | CONFIG_BFIN_SCRATCH_REG_RETN=y |
| 219 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | 216 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set |
| 220 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | 217 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set |
| @@ -250,12 +247,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
| 250 | CONFIG_FLATMEM=y | 247 | CONFIG_FLATMEM=y |
| 251 | CONFIG_FLAT_NODE_MEM_MAP=y | 248 | CONFIG_FLAT_NODE_MEM_MAP=y |
| 252 | # CONFIG_SPARSEMEM_STATIC is not set | 249 | # CONFIG_SPARSEMEM_STATIC is not set |
| 250 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 253 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 251 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
| 254 | # CONFIG_RESOURCES_64BIT is not set | 252 | # CONFIG_RESOURCES_64BIT is not set |
| 255 | CONFIG_ZONE_DMA_FLAG=1 | 253 | CONFIG_ZONE_DMA_FLAG=1 |
| 256 | CONFIG_LARGE_ALLOCS=y | 254 | CONFIG_VIRT_TO_BUS=y |
| 257 | # CONFIG_BFIN_GPTIMERS is not set | 255 | # CONFIG_BFIN_GPTIMERS is not set |
| 258 | CONFIG_BFIN_DMA_5XX=y | 256 | CONFIG_BFIN_DMA_5XX=y |
| 257 | # CONFIG_DMA_UNCACHED_4M is not set | ||
| 259 | # CONFIG_DMA_UNCACHED_2M is not set | 258 | # CONFIG_DMA_UNCACHED_2M is not set |
| 260 | CONFIG_DMA_UNCACHED_1M=y | 259 | CONFIG_DMA_UNCACHED_1M=y |
| 261 | # CONFIG_DMA_UNCACHED_NONE is not set | 260 | # CONFIG_DMA_UNCACHED_NONE is not set |
| @@ -293,17 +292,13 @@ CONFIG_C_AMBEN_ALL=y | |||
| 293 | CONFIG_BANK_0=0x7BB0 | 292 | CONFIG_BANK_0=0x7BB0 |
| 294 | CONFIG_BANK_1=0x7BB0 | 293 | CONFIG_BANK_1=0x7BB0 |
| 295 | CONFIG_BANK_2=0x7BB0 | 294 | CONFIG_BANK_2=0x7BB0 |
| 296 | CONFIG_BANK_3=0xAAC3 | 295 | CONFIG_BANK_3=0xAAC2 |
| 297 | 296 | ||
| 298 | # | 297 | # |
| 299 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 298 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| 300 | # | 299 | # |
| 301 | # CONFIG_PCI is not set | 300 | # CONFIG_PCI is not set |
| 302 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 301 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
| 303 | |||
| 304 | # | ||
| 305 | # PCCARD (PCMCIA/CardBus) support | ||
| 306 | # | ||
| 307 | # CONFIG_PCCARD is not set | 302 | # CONFIG_PCCARD is not set |
| 308 | 303 | ||
| 309 | # | 304 | # |
| @@ -321,7 +316,9 @@ CONFIG_BINFMT_ZFLAT=y | |||
| 321 | CONFIG_PM=y | 316 | CONFIG_PM=y |
| 322 | # CONFIG_PM_LEGACY is not set | 317 | # CONFIG_PM_LEGACY is not set |
| 323 | # CONFIG_PM_DEBUG is not set | 318 | # CONFIG_PM_DEBUG is not set |
| 324 | # CONFIG_PM_SYSFS_DEPRECATED is not set | 319 | CONFIG_PM_SLEEP=y |
| 320 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
| 321 | CONFIG_SUSPEND=y | ||
| 325 | CONFIG_PM_BFIN_SLEEP_DEEPER=y | 322 | CONFIG_PM_BFIN_SLEEP_DEEPER=y |
| 326 | # CONFIG_PM_BFIN_SLEEP is not set | 323 | # CONFIG_PM_BFIN_SLEEP is not set |
| 327 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 324 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
| @@ -367,6 +364,7 @@ CONFIG_SYN_COOKIES=y | |||
| 367 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 364 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
| 368 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 365 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
| 369 | CONFIG_INET_XFRM_MODE_BEET=y | 366 | CONFIG_INET_XFRM_MODE_BEET=y |
| 367 | # CONFIG_INET_LRO is not set | ||
| 370 | CONFIG_INET_DIAG=y | 368 | CONFIG_INET_DIAG=y |
| 371 | CONFIG_INET_TCP_DIAG=y | 369 | CONFIG_INET_TCP_DIAG=y |
| 372 | # CONFIG_TCP_CONG_ADVANCED is not set | 370 | # CONFIG_TCP_CONG_ADVANCED is not set |
| @@ -393,10 +391,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
| 393 | # CONFIG_LAPB is not set | 391 | # CONFIG_LAPB is not set |
| 394 | # CONFIG_ECONET is not set | 392 | # CONFIG_ECONET is not set |
| 395 | # CONFIG_WAN_ROUTER is not set | 393 | # CONFIG_WAN_ROUTER is not set |
| 396 | |||
| 397 | # | ||
| 398 | # QoS and/or fair queueing | ||
| 399 | # | ||
| 400 | # CONFIG_NET_SCHED is not set | 394 | # CONFIG_NET_SCHED is not set |
| 401 | 395 | ||
| 402 | # | 396 | # |
| @@ -428,6 +422,7 @@ CONFIG_IRDA_CACHE_LAST_LSAP=y | |||
| 428 | # SIR device drivers | 422 | # SIR device drivers |
| 429 | # | 423 | # |
| 430 | CONFIG_IRTTY_SIR=m | 424 | CONFIG_IRTTY_SIR=m |
| 425 | # CONFIG_BFIN_SIR is not set | ||
| 431 | 426 | ||
| 432 | # | 427 | # |
| 433 | # Dongle support | 428 | # Dongle support |
| @@ -457,6 +452,7 @@ CONFIG_IRTTY_SIR=m | |||
| 457 | # CONFIG_MAC80211 is not set | 452 | # CONFIG_MAC80211 is not set |
| 458 | # CONFIG_IEEE80211 is not set | 453 | # CONFIG_IEEE80211 is not set |
| 459 | # CONFIG_RFKILL is not set | 454 | # CONFIG_RFKILL is not set |
| 455 | # CONFIG_NET_9P is not set | ||
| 460 | 456 | ||
| 461 | # | 457 | # |
| 462 | # Device Drivers | 458 | # Device Drivers |
| @@ -465,14 +461,11 @@ CONFIG_IRTTY_SIR=m | |||
| 465 | # | 461 | # |
| 466 | # Generic Driver Options | 462 | # Generic Driver Options |
| 467 | # | 463 | # |
| 464 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 468 | CONFIG_STANDALONE=y | 465 | CONFIG_STANDALONE=y |
| 469 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 466 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
| 470 | # CONFIG_FW_LOADER is not set | 467 | # CONFIG_FW_LOADER is not set |
| 471 | # CONFIG_SYS_HYPERVISOR is not set | 468 | # CONFIG_SYS_HYPERVISOR is not set |
| 472 | |||
| 473 | # | ||
| 474 | # Connector - unified userspace <-> kernelspace linker | ||
| 475 | # | ||
| 476 | # CONFIG_CONNECTOR is not set | 469 | # CONFIG_CONNECTOR is not set |
| 477 | CONFIG_MTD=y | 470 | CONFIG_MTD=y |
| 478 | # CONFIG_MTD_DEBUG is not set | 471 | # CONFIG_MTD_DEBUG is not set |
| @@ -492,6 +485,7 @@ CONFIG_MTD_BLOCK=y | |||
| 492 | # CONFIG_INFTL is not set | 485 | # CONFIG_INFTL is not set |
| 493 | # CONFIG_RFD_FTL is not set | 486 | # CONFIG_RFD_FTL is not set |
| 494 | # CONFIG_SSFDC is not set | 487 | # CONFIG_SSFDC is not set |
| 488 | # CONFIG_MTD_OOPS is not set | ||
| 495 | 489 | ||
| 496 | # | 490 | # |
| 497 | # RAM/ROM/Flash chip drivers | 491 | # RAM/ROM/Flash chip drivers |
| @@ -548,20 +542,8 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
| 548 | # UBI - Unsorted block images | 542 | # UBI - Unsorted block images |
| 549 | # | 543 | # |
| 550 | # CONFIG_MTD_UBI is not set | 544 | # CONFIG_MTD_UBI is not set |
| 551 | |||
| 552 | # | ||
| 553 | # Parallel port support | ||
| 554 | # | ||
| 555 | # CONFIG_PARPORT is not set | 545 | # CONFIG_PARPORT is not set |
| 556 | 546 | CONFIG_BLK_DEV=y | |
| 557 | # | ||
| 558 | # Plug and Play support | ||
| 559 | # | ||
| 560 | # CONFIG_PNPACPI is not set | ||
| 561 | |||
| 562 | # | ||
| 563 | # Block devices | ||
| 564 | # | ||
| 565 | # CONFIG_BLK_DEV_COW_COMMON is not set | 547 | # CONFIG_BLK_DEV_COW_COMMON is not set |
| 566 | # CONFIG_BLK_DEV_LOOP is not set | 548 | # CONFIG_BLK_DEV_LOOP is not set |
| 567 | # CONFIG_BLK_DEV_NBD is not set | 549 | # CONFIG_BLK_DEV_NBD is not set |
| @@ -571,10 +553,8 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 | |||
| 571 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 553 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
| 572 | # CONFIG_CDROM_PKTCDVD is not set | 554 | # CONFIG_CDROM_PKTCDVD is not set |
| 573 | # CONFIG_ATA_OVER_ETH is not set | 555 | # CONFIG_ATA_OVER_ETH is not set |
| 574 | 556 | CONFIG_MISC_DEVICES=y | |
| 575 | # | 557 | # CONFIG_EEPROM_93CX6 is not set |
| 576 | # Misc devices | ||
| 577 | # | ||
| 578 | # CONFIG_IDE is not set | 558 | # CONFIG_IDE is not set |
| 579 | 559 | ||
| 580 | # | 560 | # |
| @@ -582,32 +562,29 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
| 582 | # | 562 | # |
| 583 | # CONFIG_RAID_ATTRS is not set | 563 | # CONFIG_RAID_ATTRS is not set |
| 584 | # CONFIG_SCSI is not set | 564 | # CONFIG_SCSI is not set |
| 565 | # CONFIG_SCSI_DMA is not set | ||
| 585 | # CONFIG_SCSI_NETLINK is not set | 566 | # CONFIG_SCSI_NETLINK is not set |
| 586 | # CONFIG_ATA is not set | 567 | # CONFIG_ATA is not set |
| 587 | |||
| 588 | # | ||
| 589 | # Multi-device support (RAID and LVM) | ||
| 590 | # | ||
| 591 | # CONFIG_MD is not set | 568 | # CONFIG_MD is not set |
| 592 | |||
| 593 | # | ||
| 594 | # Network device support | ||
| 595 | # | ||
| 596 | CONFIG_NETDEVICES=y | 569 | CONFIG_NETDEVICES=y |
| 570 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 597 | # CONFIG_DUMMY is not set | 571 | # CONFIG_DUMMY is not set |
| 598 | # CONFIG_BONDING is not set | 572 | # CONFIG_BONDING is not set |
| 573 | # CONFIG_MACVLAN is not set | ||
| 599 | # CONFIG_EQUALIZER is not set | 574 | # CONFIG_EQUALIZER is not set |
| 600 | # CONFIG_TUN is not set | 575 | # CONFIG_TUN is not set |
| 576 | # CONFIG_VETH is not set | ||
| 601 | # CONFIG_PHYLIB is not set | 577 | # CONFIG_PHYLIB is not set |
| 602 | |||
| 603 | # | ||
| 604 | # Ethernet (10 or 100Mbit) | ||
| 605 | # | ||
| 606 | CONFIG_NET_ETHERNET=y | 578 | CONFIG_NET_ETHERNET=y |
| 607 | CONFIG_MII=y | 579 | CONFIG_MII=y |
| 608 | CONFIG_SMC91X=y | 580 | CONFIG_SMC91X=y |
| 609 | # CONFIG_SMSC911X is not set | 581 | # CONFIG_SMSC911X is not set |
| 610 | # CONFIG_DM9000 is not set | 582 | # CONFIG_DM9000 is not set |
| 583 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 584 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 585 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 586 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 587 | # CONFIG_B44 is not set | ||
| 611 | CONFIG_NETDEV_1000=y | 588 | CONFIG_NETDEV_1000=y |
| 612 | # CONFIG_AX88180 is not set | 589 | # CONFIG_AX88180 is not set |
| 613 | CONFIG_NETDEV_10000=y | 590 | CONFIG_NETDEV_10000=y |
| @@ -624,15 +601,7 @@ CONFIG_NETDEV_10000=y | |||
| 624 | # CONFIG_NETCONSOLE is not set | 601 | # CONFIG_NETCONSOLE is not set |
| 625 | # CONFIG_NETPOLL is not set | 602 | # CONFIG_NETPOLL is not set |
| 626 | # CONFIG_NET_POLL_CONTROLLER is not set | 603 | # CONFIG_NET_POLL_CONTROLLER is not set |
| 627 | |||
| 628 | # | ||
| 629 | # ISDN subsystem | ||
| 630 | # | ||
| 631 | # CONFIG_ISDN is not set | 604 | # CONFIG_ISDN is not set |
| 632 | |||
| 633 | # | ||
| 634 | # Telephony Support | ||
| 635 | # | ||
| 636 | # CONFIG_PHONE is not set | 605 | # CONFIG_PHONE is not set |
| 637 | 606 | ||
| 638 | # | 607 | # |
| @@ -647,7 +616,6 @@ CONFIG_INPUT=m | |||
| 647 | # | 616 | # |
| 648 | # CONFIG_INPUT_MOUSEDEV is not set | 617 | # CONFIG_INPUT_MOUSEDEV is not set |
| 649 | # CONFIG_INPUT_JOYDEV is not set | 618 | # CONFIG_INPUT_JOYDEV is not set |
| 650 | # CONFIG_INPUT_TSDEV is not set | ||
| 651 | CONFIG_INPUT_EVDEV=m | 619 | CONFIG_INPUT_EVDEV=m |
| 652 | # CONFIG_INPUT_EVBUG is not set | 620 | # CONFIG_INPUT_EVBUG is not set |
| 653 | 621 | ||
| @@ -672,13 +640,12 @@ CONFIG_INPUT_EVDEV=m | |||
| 672 | # | 640 | # |
| 673 | # CONFIG_AD9960 is not set | 641 | # CONFIG_AD9960 is not set |
| 674 | # CONFIG_SPI_ADC_BF533 is not set | 642 | # CONFIG_SPI_ADC_BF533 is not set |
| 675 | # CONFIG_BF5xx_PFLAGS is not set | ||
| 676 | # CONFIG_BF5xx_PPIFCD is not set | 643 | # CONFIG_BF5xx_PPIFCD is not set |
| 677 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 644 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
| 678 | # CONFIG_BF5xx_PPI is not set | 645 | # CONFIG_BF5xx_PPI is not set |
| 679 | CONFIG_BFIN_SPORT=y | 646 | CONFIG_BFIN_SPORT=y |
| 680 | # CONFIG_BFIN_TIMER_LATENCY is not set | 647 | # CONFIG_BFIN_TIMER_LATENCY is not set |
| 681 | # CONFIG_AD5304 is not set | 648 | CONFIG_SIMPLE_GPIO=m |
| 682 | # CONFIG_VT is not set | 649 | # CONFIG_VT is not set |
| 683 | # CONFIG_SERIAL_NONSTANDARD is not set | 650 | # CONFIG_SERIAL_NONSTANDARD is not set |
| 684 | 651 | ||
| @@ -706,28 +673,11 @@ CONFIG_UNIX98_PTYS=y | |||
| 706 | # CAN, the car bus and industrial fieldbus | 673 | # CAN, the car bus and industrial fieldbus |
| 707 | # | 674 | # |
| 708 | # CONFIG_CAN4LINUX is not set | 675 | # CONFIG_CAN4LINUX is not set |
| 709 | |||
| 710 | # | ||
| 711 | # IPMI | ||
| 712 | # | ||
| 713 | # CONFIG_IPMI_HANDLER is not set | 676 | # CONFIG_IPMI_HANDLER is not set |
| 714 | CONFIG_WATCHDOG=y | ||
| 715 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 716 | |||
| 717 | # | ||
| 718 | # Watchdog Device Drivers | ||
| 719 | # | ||
| 720 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 721 | CONFIG_BFIN_WDT=y | ||
| 722 | CONFIG_HW_RANDOM=y | 677 | CONFIG_HW_RANDOM=y |
| 723 | # CONFIG_GEN_RTC is not set | 678 | # CONFIG_GEN_RTC is not set |
| 724 | CONFIG_BLACKFIN_DPMC=y | ||
| 725 | # CONFIG_R3964 is not set | 679 | # CONFIG_R3964 is not set |
| 726 | # CONFIG_RAW_DRIVER is not set | 680 | # CONFIG_RAW_DRIVER is not set |
| 727 | |||
| 728 | # | ||
| 729 | # TPM devices | ||
| 730 | # | ||
| 731 | # CONFIG_TCG_TPM is not set | 681 | # CONFIG_TCG_TPM is not set |
| 732 | # CONFIG_I2C is not set | 682 | # CONFIG_I2C is not set |
| 733 | 683 | ||
| @@ -748,22 +698,37 @@ CONFIG_SPI_BFIN=y | |||
| 748 | # | 698 | # |
| 749 | # CONFIG_SPI_AT25 is not set | 699 | # CONFIG_SPI_AT25 is not set |
| 750 | # CONFIG_SPI_SPIDEV is not set | 700 | # CONFIG_SPI_SPIDEV is not set |
| 751 | 701 | # CONFIG_SPI_TLE62X0 is not set | |
| 752 | # | ||
| 753 | # Dallas's 1-wire bus | ||
| 754 | # | ||
| 755 | # CONFIG_W1 is not set | 702 | # CONFIG_W1 is not set |
| 703 | # CONFIG_POWER_SUPPLY is not set | ||
| 756 | CONFIG_HWMON=y | 704 | CONFIG_HWMON=y |
| 757 | # CONFIG_HWMON_VID is not set | 705 | # CONFIG_HWMON_VID is not set |
| 758 | # CONFIG_SENSORS_ABITUGURU is not set | ||
| 759 | # CONFIG_SENSORS_F71805F is not set | 706 | # CONFIG_SENSORS_F71805F is not set |
| 707 | # CONFIG_SENSORS_F71882FG is not set | ||
| 708 | # CONFIG_SENSORS_IT87 is not set | ||
| 760 | # CONFIG_SENSORS_LM70 is not set | 709 | # CONFIG_SENSORS_LM70 is not set |
| 710 | # CONFIG_SENSORS_PC87360 is not set | ||
| 761 | # CONFIG_SENSORS_PC87427 is not set | 711 | # CONFIG_SENSORS_PC87427 is not set |
| 762 | # CONFIG_SENSORS_SMSC47M1 is not set | 712 | # CONFIG_SENSORS_SMSC47M1 is not set |
| 763 | # CONFIG_SENSORS_SMSC47B397 is not set | 713 | # CONFIG_SENSORS_SMSC47B397 is not set |
| 764 | # CONFIG_SENSORS_VT1211 is not set | 714 | # CONFIG_SENSORS_VT1211 is not set |
| 765 | # CONFIG_SENSORS_W83627HF is not set | 715 | # CONFIG_SENSORS_W83627HF is not set |
| 716 | # CONFIG_SENSORS_W83627EHF is not set | ||
| 766 | # CONFIG_HWMON_DEBUG_CHIP is not set | 717 | # CONFIG_HWMON_DEBUG_CHIP is not set |
| 718 | CONFIG_WATCHDOG=y | ||
| 719 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 720 | |||
| 721 | # | ||
| 722 | # Watchdog Device Drivers | ||
| 723 | # | ||
| 724 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 725 | CONFIG_BFIN_WDT=y | ||
| 726 | |||
| 727 | # | ||
| 728 | # Sonics Silicon Backplane | ||
| 729 | # | ||
| 730 | CONFIG_SSB_POSSIBLE=y | ||
| 731 | # CONFIG_SSB is not set | ||
| 767 | 732 | ||
| 768 | # | 733 | # |
| 769 | # Multifunction device drivers | 734 | # Multifunction device drivers |
| @@ -780,72 +745,27 @@ CONFIG_DAB=y | |||
| 780 | # | 745 | # |
| 781 | # Graphics support | 746 | # Graphics support |
| 782 | # | 747 | # |
| 748 | # CONFIG_VGASTATE is not set | ||
| 749 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 750 | # CONFIG_FB is not set | ||
| 783 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 751 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
| 784 | 752 | ||
| 785 | # | 753 | # |
| 786 | # Display device support | 754 | # Display device support |
| 787 | # | 755 | # |
| 788 | # CONFIG_DISPLAY_SUPPORT is not set | 756 | # CONFIG_DISPLAY_SUPPORT is not set |
| 789 | # CONFIG_VGASTATE is not set | ||
| 790 | # CONFIG_FB is not set | ||
| 791 | 757 | ||
| 792 | # | 758 | # |
| 793 | # Sound | 759 | # Sound |
| 794 | # | 760 | # |
| 795 | # CONFIG_SOUND is not set | 761 | # CONFIG_SOUND is not set |
| 796 | 762 | CONFIG_HID_SUPPORT=y | |
| 797 | # | ||
| 798 | # HID Devices | ||
| 799 | # | ||
| 800 | CONFIG_HID=m | 763 | CONFIG_HID=m |
| 801 | # CONFIG_HID_DEBUG is not set | 764 | # CONFIG_HID_DEBUG is not set |
| 802 | 765 | # CONFIG_HIDRAW is not set | |
| 803 | # | 766 | # CONFIG_USB_SUPPORT is not set |
| 804 | # USB support | ||
| 805 | # | ||
| 806 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 807 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 808 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
| 809 | # CONFIG_USB is not set | ||
| 810 | |||
| 811 | # | ||
| 812 | # Enable Host or Gadget support to see Inventra options | ||
| 813 | # | ||
| 814 | |||
| 815 | # | ||
| 816 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 817 | # | ||
| 818 | |||
| 819 | # | ||
| 820 | # USB Gadget Support | ||
| 821 | # | ||
| 822 | # CONFIG_USB_GADGET is not set | ||
| 823 | # CONFIG_MMC is not set | 767 | # CONFIG_MMC is not set |
| 824 | |||
| 825 | # | ||
| 826 | # LED devices | ||
| 827 | # | ||
| 828 | # CONFIG_NEW_LEDS is not set | 768 | # CONFIG_NEW_LEDS is not set |
| 829 | |||
| 830 | # | ||
| 831 | # LED drivers | ||
| 832 | # | ||
| 833 | |||
| 834 | # | ||
| 835 | # LED Triggers | ||
| 836 | # | ||
| 837 | |||
| 838 | # | ||
| 839 | # InfiniBand support | ||
| 840 | # | ||
| 841 | |||
| 842 | # | ||
| 843 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
| 844 | # | ||
| 845 | |||
| 846 | # | ||
| 847 | # Real Time Clock | ||
| 848 | # | ||
| 849 | CONFIG_RTC_LIB=y | 769 | CONFIG_RTC_LIB=y |
| 850 | CONFIG_RTC_CLASS=y | 770 | CONFIG_RTC_CLASS=y |
| 851 | CONFIG_RTC_HCTOSYS=y | 771 | CONFIG_RTC_HCTOSYS=y |
| @@ -862,10 +782,6 @@ CONFIG_RTC_INTF_DEV=y | |||
| 862 | # CONFIG_RTC_DRV_TEST is not set | 782 | # CONFIG_RTC_DRV_TEST is not set |
| 863 | 783 | ||
| 864 | # | 784 | # |
| 865 | # I2C RTC drivers | ||
| 866 | # | ||
| 867 | |||
| 868 | # | ||
| 869 | # SPI RTC drivers | 785 | # SPI RTC drivers |
| 870 | # | 786 | # |
| 871 | # CONFIG_RTC_DRV_RS5C348 is not set | 787 | # CONFIG_RTC_DRV_RS5C348 is not set |
| @@ -875,8 +791,10 @@ CONFIG_RTC_INTF_DEV=y | |||
| 875 | # Platform RTC drivers | 791 | # Platform RTC drivers |
| 876 | # | 792 | # |
| 877 | # CONFIG_RTC_DRV_DS1553 is not set | 793 | # CONFIG_RTC_DRV_DS1553 is not set |
| 794 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 878 | # CONFIG_RTC_DRV_DS1742 is not set | 795 | # CONFIG_RTC_DRV_DS1742 is not set |
| 879 | # CONFIG_RTC_DRV_M48T86 is not set | 796 | # CONFIG_RTC_DRV_M48T86 is not set |
| 797 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 880 | # CONFIG_RTC_DRV_V3020 is not set | 798 | # CONFIG_RTC_DRV_V3020 is not set |
| 881 | 799 | ||
| 882 | # | 800 | # |
| @@ -885,22 +803,9 @@ CONFIG_RTC_INTF_DEV=y | |||
| 885 | CONFIG_RTC_DRV_BFIN=y | 803 | CONFIG_RTC_DRV_BFIN=y |
| 886 | 804 | ||
| 887 | # | 805 | # |
| 888 | # DMA Engine support | 806 | # Userspace I/O |
| 889 | # | ||
| 890 | # CONFIG_DMA_ENGINE is not set | ||
| 891 | |||
| 892 | # | ||
| 893 | # DMA Clients | ||
| 894 | # | ||
| 895 | |||
| 896 | # | ||
| 897 | # DMA Devices | ||
| 898 | # | 807 | # |
| 899 | 808 | # CONFIG_UIO is not set | |
| 900 | # | ||
| 901 | # PBX support | ||
| 902 | # | ||
| 903 | # CONFIG_PBX is not set | ||
| 904 | 809 | ||
| 905 | # | 810 | # |
| 906 | # File systems | 811 | # File systems |
| @@ -945,7 +850,6 @@ CONFIG_PROC_SYSCTL=y | |||
| 945 | CONFIG_SYSFS=y | 850 | CONFIG_SYSFS=y |
| 946 | # CONFIG_TMPFS is not set | 851 | # CONFIG_TMPFS is not set |
| 947 | # CONFIG_HUGETLB_PAGE is not set | 852 | # CONFIG_HUGETLB_PAGE is not set |
| 948 | CONFIG_RAMFS=y | ||
| 949 | # CONFIG_CONFIGFS_FS is not set | 853 | # CONFIG_CONFIGFS_FS is not set |
| 950 | 854 | ||
| 951 | # | 855 | # |
| @@ -971,10 +875,12 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | |||
| 971 | CONFIG_JFFS2_FS=m | 875 | CONFIG_JFFS2_FS=m |
| 972 | CONFIG_JFFS2_FS_DEBUG=0 | 876 | CONFIG_JFFS2_FS_DEBUG=0 |
| 973 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 877 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
| 878 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
| 974 | # CONFIG_JFFS2_SUMMARY is not set | 879 | # CONFIG_JFFS2_SUMMARY is not set |
| 975 | # CONFIG_JFFS2_FS_XATTR is not set | 880 | # CONFIG_JFFS2_FS_XATTR is not set |
| 976 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 881 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
| 977 | CONFIG_JFFS2_ZLIB=y | 882 | CONFIG_JFFS2_ZLIB=y |
| 883 | # CONFIG_JFFS2_LZO is not set | ||
| 978 | CONFIG_JFFS2_RTIME=y | 884 | CONFIG_JFFS2_RTIME=y |
| 979 | # CONFIG_JFFS2_RUBIN is not set | 885 | # CONFIG_JFFS2_RUBIN is not set |
| 980 | # CONFIG_CRAMFS is not set | 886 | # CONFIG_CRAMFS is not set |
| @@ -983,10 +889,7 @@ CONFIG_JFFS2_RTIME=y | |||
| 983 | # CONFIG_QNX4FS_FS is not set | 889 | # CONFIG_QNX4FS_FS is not set |
| 984 | # CONFIG_SYSV_FS is not set | 890 | # CONFIG_SYSV_FS is not set |
| 985 | # CONFIG_UFS_FS is not set | 891 | # CONFIG_UFS_FS is not set |
| 986 | 892 | CONFIG_NETWORK_FILESYSTEMS=y | |
| 987 | # | ||
| 988 | # Network File Systems | ||
| 989 | # | ||
| 990 | CONFIG_NFS_FS=m | 893 | CONFIG_NFS_FS=m |
| 991 | CONFIG_NFS_V3=y | 894 | CONFIG_NFS_V3=y |
| 992 | # CONFIG_NFS_V3_ACL is not set | 895 | # CONFIG_NFS_V3_ACL is not set |
| @@ -1006,17 +909,12 @@ CONFIG_SMB_FS=m | |||
| 1006 | # CONFIG_NCP_FS is not set | 909 | # CONFIG_NCP_FS is not set |
| 1007 | # CONFIG_CODA_FS is not set | 910 | # CONFIG_CODA_FS is not set |
| 1008 | # CONFIG_AFS_FS is not set | 911 | # CONFIG_AFS_FS is not set |
| 1009 | # CONFIG_9P_FS is not set | ||
| 1010 | 912 | ||
| 1011 | # | 913 | # |
| 1012 | # Partition Types | 914 | # Partition Types |
| 1013 | # | 915 | # |
| 1014 | # CONFIG_PARTITION_ADVANCED is not set | 916 | # CONFIG_PARTITION_ADVANCED is not set |
| 1015 | CONFIG_MSDOS_PARTITION=y | 917 | CONFIG_MSDOS_PARTITION=y |
| 1016 | |||
| 1017 | # | ||
| 1018 | # Native Language Support | ||
| 1019 | # | ||
| 1020 | CONFIG_NLS=m | 918 | CONFIG_NLS=m |
| 1021 | CONFIG_NLS_DEFAULT="iso8859-1" | 919 | CONFIG_NLS_DEFAULT="iso8859-1" |
| 1022 | # CONFIG_NLS_CODEPAGE_437 is not set | 920 | # CONFIG_NLS_CODEPAGE_437 is not set |
| @@ -1057,21 +955,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
| 1057 | # CONFIG_NLS_KOI8_R is not set | 955 | # CONFIG_NLS_KOI8_R is not set |
| 1058 | # CONFIG_NLS_KOI8_U is not set | 956 | # CONFIG_NLS_KOI8_U is not set |
| 1059 | # CONFIG_NLS_UTF8 is not set | 957 | # CONFIG_NLS_UTF8 is not set |
| 1060 | |||
| 1061 | # | ||
| 1062 | # Distributed Lock Manager | ||
| 1063 | # | ||
| 1064 | # CONFIG_DLM is not set | 958 | # CONFIG_DLM is not set |
| 1065 | 959 | CONFIG_INSTRUMENTATION=y | |
| 1066 | # | ||
| 1067 | # Profiling support | ||
| 1068 | # | ||
| 1069 | # CONFIG_PROFILING is not set | 960 | # CONFIG_PROFILING is not set |
| 961 | # CONFIG_MARKERS is not set | ||
| 1070 | 962 | ||
| 1071 | # | 963 | # |
| 1072 | # Kernel hacking | 964 | # Kernel hacking |
| 1073 | # | 965 | # |
| 1074 | # CONFIG_PRINTK_TIME is not set | 966 | # CONFIG_PRINTK_TIME is not set |
| 967 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1075 | CONFIG_ENABLE_MUST_CHECK=y | 968 | CONFIG_ENABLE_MUST_CHECK=y |
| 1076 | # CONFIG_MAGIC_SYSRQ is not set | 969 | # CONFIG_MAGIC_SYSRQ is not set |
| 1077 | # CONFIG_UNUSED_SYMBOLS is not set | 970 | # CONFIG_UNUSED_SYMBOLS is not set |
| @@ -1079,6 +972,7 @@ CONFIG_DEBUG_FS=y | |||
| 1079 | # CONFIG_HEADERS_CHECK is not set | 972 | # CONFIG_HEADERS_CHECK is not set |
| 1080 | # CONFIG_DEBUG_KERNEL is not set | 973 | # CONFIG_DEBUG_KERNEL is not set |
| 1081 | # CONFIG_DEBUG_BUGVERBOSE is not set | 974 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 975 | # CONFIG_SAMPLES is not set | ||
| 1082 | CONFIG_DEBUG_MMRS=y | 976 | CONFIG_DEBUG_MMRS=y |
| 1083 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 977 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 1084 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 978 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| @@ -1098,11 +992,7 @@ CONFIG_ACCESS_CHECK=y | |||
| 1098 | # CONFIG_KEYS is not set | 992 | # CONFIG_KEYS is not set |
| 1099 | CONFIG_SECURITY=y | 993 | CONFIG_SECURITY=y |
| 1100 | # CONFIG_SECURITY_NETWORK is not set | 994 | # CONFIG_SECURITY_NETWORK is not set |
| 1101 | CONFIG_SECURITY_CAPABILITIES=m | 995 | # CONFIG_SECURITY_CAPABILITIES is not set |
| 1102 | |||
| 1103 | # | ||
| 1104 | # Cryptographic options | ||
| 1105 | # | ||
| 1106 | # CONFIG_CRYPTO is not set | 996 | # CONFIG_CRYPTO is not set |
| 1107 | 997 | ||
| 1108 | # | 998 | # |
| @@ -1113,6 +1003,7 @@ CONFIG_CRC_CCITT=m | |||
| 1113 | # CONFIG_CRC16 is not set | 1003 | # CONFIG_CRC16 is not set |
| 1114 | # CONFIG_CRC_ITU_T is not set | 1004 | # CONFIG_CRC_ITU_T is not set |
| 1115 | CONFIG_CRC32=y | 1005 | CONFIG_CRC32=y |
| 1006 | # CONFIG_CRC7 is not set | ||
| 1116 | # CONFIG_LIBCRC32C is not set | 1007 | # CONFIG_LIBCRC32C is not set |
| 1117 | CONFIG_ZLIB_INFLATE=y | 1008 | CONFIG_ZLIB_INFLATE=y |
| 1118 | CONFIG_ZLIB_DEFLATE=m | 1009 | CONFIG_ZLIB_DEFLATE=m |
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig index 20d598d17bd1..d77d991a1f61 100644 --- a/arch/blackfin/configs/BF533-STAMP_defconfig +++ b/arch/blackfin/configs/BF533-STAMP_defconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.22.16 | 3 | # Linux kernel version: 2.6.24.7 |
| 4 | # | 4 | # |
| 5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
| 6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
| @@ -13,35 +13,34 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
| 13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
| 14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
| 15 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
| 16 | CONFIG_GENERIC_TIME=y | ||
| 17 | CONFIG_GENERIC_GPIO=y | 16 | CONFIG_GENERIC_GPIO=y |
| 18 | CONFIG_FORCE_MAX_ZONEORDER=14 | 17 | CONFIG_FORCE_MAX_ZONEORDER=14 |
| 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 18 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
| 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 21 | 20 | ||
| 22 | # | 21 | # |
| 23 | # Code maturity level options | 22 | # General setup |
| 24 | # | 23 | # |
| 25 | CONFIG_EXPERIMENTAL=y | 24 | CONFIG_EXPERIMENTAL=y |
| 26 | CONFIG_BROKEN_ON_SMP=y | 25 | CONFIG_BROKEN_ON_SMP=y |
| 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 26 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
| 28 | |||
| 29 | # | ||
| 30 | # General setup | ||
| 31 | # | ||
| 32 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
| 33 | CONFIG_LOCALVERSION_AUTO=y | 28 | CONFIG_LOCALVERSION_AUTO=y |
| 34 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
| 35 | # CONFIG_IPC_NS is not set | ||
| 36 | CONFIG_SYSVIPC_SYSCTL=y | 30 | CONFIG_SYSVIPC_SYSCTL=y |
| 37 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
| 38 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
| 39 | # CONFIG_TASKSTATS is not set | 33 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 34 | # CONFIG_USER_NS is not set |
| 35 | # CONFIG_PID_NS is not set | ||
| 41 | # CONFIG_AUDIT is not set | 36 | # CONFIG_AUDIT is not set |
| 42 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
| 44 | CONFIG_LOG_BUF_SHIFT=14 | 39 | CONFIG_LOG_BUF_SHIFT=14 |
| 40 | # CONFIG_CGROUPS is not set | ||
| 41 | CONFIG_FAIR_GROUP_SCHED=y | ||
| 42 | CONFIG_FAIR_USER_SCHED=y | ||
| 43 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
| 45 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_SYSFS_DEPRECATED=y |
| 46 | # CONFIG_RELAY is not set | 45 | # CONFIG_RELAY is not set |
| 47 | CONFIG_BLK_DEV_INITRD=y | 46 | CONFIG_BLK_DEV_INITRD=y |
| @@ -64,32 +63,24 @@ CONFIG_EPOLL=y | |||
| 64 | CONFIG_SIGNALFD=y | 63 | CONFIG_SIGNALFD=y |
| 65 | CONFIG_EVENTFD=y | 64 | CONFIG_EVENTFD=y |
| 66 | CONFIG_VM_EVENT_COUNTERS=y | 65 | CONFIG_VM_EVENT_COUNTERS=y |
| 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
| 68 | # CONFIG_NP2 is not set | ||
| 69 | CONFIG_SLAB=y | 66 | CONFIG_SLAB=y |
| 70 | # CONFIG_SLUB is not set | 67 | # CONFIG_SLUB is not set |
| 71 | # CONFIG_SLOB is not set | 68 | # CONFIG_SLOB is not set |
| 69 | CONFIG_SLABINFO=y | ||
| 72 | CONFIG_RT_MUTEXES=y | 70 | CONFIG_RT_MUTEXES=y |
| 73 | CONFIG_TINY_SHMEM=y | 71 | CONFIG_TINY_SHMEM=y |
| 74 | CONFIG_BASE_SMALL=0 | 72 | CONFIG_BASE_SMALL=0 |
| 75 | |||
| 76 | # | ||
| 77 | # Loadable module support | ||
| 78 | # | ||
| 79 | CONFIG_MODULES=y | 73 | CONFIG_MODULES=y |
| 80 | CONFIG_MODULE_UNLOAD=y | 74 | CONFIG_MODULE_UNLOAD=y |
| 81 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 75 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
| 82 | # CONFIG_MODVERSIONS is not set | 76 | # CONFIG_MODVERSIONS is not set |
| 83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 77 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
| 84 | CONFIG_KMOD=y | 78 | CONFIG_KMOD=y |
| 85 | |||
| 86 | # | ||
| 87 | # Block layer | ||
| 88 | # | ||
| 89 | CONFIG_BLOCK=y | 79 | CONFIG_BLOCK=y |
| 90 | # CONFIG_LBD is not set | 80 | # CONFIG_LBD is not set |
| 91 | # CONFIG_BLK_DEV_IO_TRACE is not set | 81 | # CONFIG_BLK_DEV_IO_TRACE is not set |
| 92 | # CONFIG_LSF is not set | 82 | # CONFIG_LSF is not set |
| 83 | # CONFIG_BLK_DEV_BSG is not set | ||
| 93 | 84 | ||
| 94 | # | 85 | # |
| 95 | # IO Schedulers | 86 | # IO Schedulers |
| @@ -141,12 +132,12 @@ CONFIG_BF_REV_0_3=y | |||
| 141 | # CONFIG_BF_REV_ANY is not set | 132 | # CONFIG_BF_REV_ANY is not set |
| 142 | # CONFIG_BF_REV_NONE is not set | 133 | # CONFIG_BF_REV_NONE is not set |
| 143 | CONFIG_BF53x=y | 134 | CONFIG_BF53x=y |
| 144 | CONFIG_BFIN_SINGLE_CORE=y | ||
| 145 | CONFIG_MEM_MT48LC64M4A2FB_7E=y | 135 | CONFIG_MEM_MT48LC64M4A2FB_7E=y |
| 146 | # CONFIG_BFIN533_EZKIT is not set | 136 | # CONFIG_BFIN533_EZKIT is not set |
| 147 | CONFIG_BFIN533_STAMP=y | 137 | CONFIG_BFIN533_STAMP=y |
| 148 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | 138 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set |
| 149 | # CONFIG_H8606_HVSISTEMAS is not set | 139 | # CONFIG_H8606_HVSISTEMAS is not set |
| 140 | # CONFIG_BFIN532_IP0X is not set | ||
| 150 | # CONFIG_GENERIC_BF533_BOARD is not set | 141 | # CONFIG_GENERIC_BF533_BOARD is not set |
| 151 | 142 | ||
| 152 | # | 143 | # |
| @@ -189,12 +180,14 @@ CONFIG_WDTIMER=13 | |||
| 189 | # Board customizations | 180 | # Board customizations |
| 190 | # | 181 | # |
| 191 | # CONFIG_CMDLINE_BOOL is not set | 182 | # CONFIG_CMDLINE_BOOL is not set |
| 183 | CONFIG_BOOT_LOAD=0x1000 | ||
| 192 | 184 | ||
| 193 | # | 185 | # |
| 194 | # Clock/PLL Setup | 186 | # Clock/PLL Setup |
| 195 | # | 187 | # |
| 196 | CONFIG_CLKIN_HZ=11059200 | 188 | CONFIG_CLKIN_HZ=11059200 |
| 197 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 189 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
| 190 | CONFIG_MAX_MEM_SIZE=512 | ||
| 198 | CONFIG_MAX_VCO_HZ=750000000 | 191 | CONFIG_MAX_VCO_HZ=750000000 |
| 199 | CONFIG_MIN_VCO_HZ=50000000 | 192 | CONFIG_MIN_VCO_HZ=50000000 |
| 200 | CONFIG_MAX_SCLK_HZ=133333333 | 193 | CONFIG_MAX_SCLK_HZ=133333333 |
| @@ -208,14 +201,17 @@ CONFIG_HZ_250=y | |||
| 208 | # CONFIG_HZ_300 is not set | 201 | # CONFIG_HZ_300 is not set |
| 209 | # CONFIG_HZ_1000 is not set | 202 | # CONFIG_HZ_1000 is not set |
| 210 | CONFIG_HZ=250 | 203 | CONFIG_HZ=250 |
| 204 | CONFIG_GENERIC_TIME=y | ||
| 205 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 206 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
| 207 | CONFIG_TICK_ONESHOT=y | ||
| 208 | # CONFIG_NO_HZ is not set | ||
| 209 | CONFIG_HIGH_RES_TIMERS=y | ||
| 210 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 211 | 211 | ||
| 212 | # | 212 | # |
| 213 | # Memory Setup | 213 | # Misc |
| 214 | # | 214 | # |
| 215 | CONFIG_MAX_MEM_SIZE=512 | ||
| 216 | CONFIG_MEM_ADD_WIDTH=11 | ||
| 217 | CONFIG_ENET_FLASH_PIN=0 | ||
| 218 | CONFIG_BOOT_LOAD=0x1000 | ||
| 219 | CONFIG_BFIN_SCRATCH_REG_RETN=y | 215 | CONFIG_BFIN_SCRATCH_REG_RETN=y |
| 220 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | 216 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set |
| 221 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | 217 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set |
| @@ -251,12 +247,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
| 251 | CONFIG_FLATMEM=y | 247 | CONFIG_FLATMEM=y |
| 252 | CONFIG_FLAT_NODE_MEM_MAP=y | 248 | CONFIG_FLAT_NODE_MEM_MAP=y |
| 253 | # CONFIG_SPARSEMEM_STATIC is not set | 249 | # CONFIG_SPARSEMEM_STATIC is not set |
| 250 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 254 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 251 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
| 255 | # CONFIG_RESOURCES_64BIT is not set | 252 | # CONFIG_RESOURCES_64BIT is not set |
| 256 | CONFIG_ZONE_DMA_FLAG=1 | 253 | CONFIG_ZONE_DMA_FLAG=1 |
| 257 | CONFIG_LARGE_ALLOCS=y | 254 | CONFIG_VIRT_TO_BUS=y |
| 258 | # CONFIG_BFIN_GPTIMERS is not set | 255 | # CONFIG_BFIN_GPTIMERS is not set |
| 259 | CONFIG_BFIN_DMA_5XX=y | 256 | CONFIG_BFIN_DMA_5XX=y |
| 257 | # CONFIG_DMA_UNCACHED_4M is not set | ||
| 260 | # CONFIG_DMA_UNCACHED_2M is not set | 258 | # CONFIG_DMA_UNCACHED_2M is not set |
| 261 | CONFIG_DMA_UNCACHED_1M=y | 259 | CONFIG_DMA_UNCACHED_1M=y |
| 262 | # CONFIG_DMA_UNCACHED_NONE is not set | 260 | # CONFIG_DMA_UNCACHED_NONE is not set |
| @@ -294,17 +292,13 @@ CONFIG_C_AMBEN_ALL=y | |||
| 294 | CONFIG_BANK_0=0x7BB0 | 292 | CONFIG_BANK_0=0x7BB0 |
| 295 | CONFIG_BANK_1=0x7BB0 | 293 | CONFIG_BANK_1=0x7BB0 |
| 296 | CONFIG_BANK_2=0x7BB0 | 294 | CONFIG_BANK_2=0x7BB0 |
| 297 | CONFIG_BANK_3=0xAAC3 | 295 | CONFIG_BANK_3=0xAAC2 |
| 298 | 296 | ||
| 299 | # | 297 | # |
| 300 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 298 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| 301 | # | 299 | # |
| 302 | # CONFIG_PCI is not set | 300 | # CONFIG_PCI is not set |
| 303 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 301 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
| 304 | |||
| 305 | # | ||
| 306 | # PCCARD (PCMCIA/CardBus) support | ||
| 307 | # | ||
| 308 | # CONFIG_PCCARD is not set | 302 | # CONFIG_PCCARD is not set |
| 309 | 303 | ||
| 310 | # | 304 | # |
| @@ -322,7 +316,9 @@ CONFIG_BINFMT_ZFLAT=y | |||
| 322 | CONFIG_PM=y | 316 | CONFIG_PM=y |
| 323 | # CONFIG_PM_LEGACY is not set | 317 | # CONFIG_PM_LEGACY is not set |
| 324 | # CONFIG_PM_DEBUG is not set | 318 | # CONFIG_PM_DEBUG is not set |
| 325 | # CONFIG_PM_SYSFS_DEPRECATED is not set | 319 | CONFIG_PM_SLEEP=y |
| 320 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
| 321 | CONFIG_SUSPEND=y | ||
| 326 | CONFIG_PM_BFIN_SLEEP_DEEPER=y | 322 | CONFIG_PM_BFIN_SLEEP_DEEPER=y |
| 327 | # CONFIG_PM_BFIN_SLEEP is not set | 323 | # CONFIG_PM_BFIN_SLEEP is not set |
| 328 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 324 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
| @@ -368,6 +364,7 @@ CONFIG_SYN_COOKIES=y | |||
| 368 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 364 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
| 369 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 365 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
| 370 | CONFIG_INET_XFRM_MODE_BEET=y | 366 | CONFIG_INET_XFRM_MODE_BEET=y |
| 367 | # CONFIG_INET_LRO is not set | ||
| 371 | CONFIG_INET_DIAG=y | 368 | CONFIG_INET_DIAG=y |
| 372 | CONFIG_INET_TCP_DIAG=y | 369 | CONFIG_INET_TCP_DIAG=y |
| 373 | # CONFIG_TCP_CONG_ADVANCED is not set | 370 | # CONFIG_TCP_CONG_ADVANCED is not set |
| @@ -394,10 +391,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
| 394 | # CONFIG_LAPB is not set | 391 | # CONFIG_LAPB is not set |
| 395 | # CONFIG_ECONET is not set | 392 | # CONFIG_ECONET is not set |
| 396 | # CONFIG_WAN_ROUTER is not set | 393 | # CONFIG_WAN_ROUTER is not set |
| 397 | |||
| 398 | # | ||
| 399 | # QoS and/or fair queueing | ||
| 400 | # | ||
| 401 | # CONFIG_NET_SCHED is not set | 394 | # CONFIG_NET_SCHED is not set |
| 402 | 395 | ||
| 403 | # | 396 | # |
| @@ -429,6 +422,9 @@ CONFIG_IRDA_CACHE_LAST_LSAP=y | |||
| 429 | # SIR device drivers | 422 | # SIR device drivers |
| 430 | # | 423 | # |
| 431 | CONFIG_IRTTY_SIR=m | 424 | CONFIG_IRTTY_SIR=m |
| 425 | CONFIG_BFIN_SIR=m | ||
| 426 | CONFIG_SIR_BFIN_DMA=y | ||
| 427 | # CONFIG_SIR_BFIN_PIO is not set | ||
| 432 | 428 | ||
| 433 | # | 429 | # |
| 434 | # Dongle support | 430 | # Dongle support |
| @@ -458,6 +454,7 @@ CONFIG_IRTTY_SIR=m | |||
| 458 | # CONFIG_MAC80211 is not set | 454 | # CONFIG_MAC80211 is not set |
| 459 | # CONFIG_IEEE80211 is not set | 455 | # CONFIG_IEEE80211 is not set |
| 460 | # CONFIG_RFKILL is not set | 456 | # CONFIG_RFKILL is not set |
| 457 | # CONFIG_NET_9P is not set | ||
| 461 | 458 | ||
| 462 | # | 459 | # |
| 463 | # Device Drivers | 460 | # Device Drivers |
| @@ -466,14 +463,11 @@ CONFIG_IRTTY_SIR=m | |||
| 466 | # | 463 | # |
| 467 | # Generic Driver Options | 464 | # Generic Driver Options |
| 468 | # | 465 | # |
| 466 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 469 | CONFIG_STANDALONE=y | 467 | CONFIG_STANDALONE=y |
| 470 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 468 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
| 471 | # CONFIG_FW_LOADER is not set | 469 | # CONFIG_FW_LOADER is not set |
| 472 | # CONFIG_SYS_HYPERVISOR is not set | 470 | # CONFIG_SYS_HYPERVISOR is not set |
| 473 | |||
| 474 | # | ||
| 475 | # Connector - unified userspace <-> kernelspace linker | ||
| 476 | # | ||
| 477 | # CONFIG_CONNECTOR is not set | 471 | # CONFIG_CONNECTOR is not set |
| 478 | CONFIG_MTD=y | 472 | CONFIG_MTD=y |
| 479 | # CONFIG_MTD_DEBUG is not set | 473 | # CONFIG_MTD_DEBUG is not set |
| @@ -493,6 +487,7 @@ CONFIG_MTD_BLOCK=y | |||
| 493 | # CONFIG_INFTL is not set | 487 | # CONFIG_INFTL is not set |
| 494 | # CONFIG_RFD_FTL is not set | 488 | # CONFIG_RFD_FTL is not set |
| 495 | # CONFIG_SSFDC is not set | 489 | # CONFIG_SSFDC is not set |
| 490 | # CONFIG_MTD_OOPS is not set | ||
| 496 | 491 | ||
| 497 | # | 492 | # |
| 498 | # RAM/ROM/Flash chip drivers | 493 | # RAM/ROM/Flash chip drivers |
| @@ -524,11 +519,7 @@ CONFIG_MTD_ROM=m | |||
| 524 | # | 519 | # |
| 525 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 520 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
| 526 | # CONFIG_MTD_PHYSMAP is not set | 521 | # CONFIG_MTD_PHYSMAP is not set |
| 527 | CONFIG_MTD_BF5xx=m | 522 | CONFIG_MTD_BFIN_ASYNC=m |
| 528 | CONFIG_BFIN_FLASH_BANK_0=0x7BB0 | ||
| 529 | CONFIG_BFIN_FLASH_BANK_1=0x7BB0 | ||
| 530 | CONFIG_BFIN_FLASH_BANK_2=0x7BB0 | ||
| 531 | CONFIG_BFIN_FLASH_BANK_3=0x7BB0 | ||
| 532 | # CONFIG_MTD_UCLINUX is not set | 523 | # CONFIG_MTD_UCLINUX is not set |
| 533 | # CONFIG_MTD_PLATRAM is not set | 524 | # CONFIG_MTD_PLATRAM is not set |
| 534 | 525 | ||
| @@ -555,20 +546,8 @@ CONFIG_BFIN_FLASH_BANK_3=0x7BB0 | |||
| 555 | # UBI - Unsorted block images | 546 | # UBI - Unsorted block images |
| 556 | # | 547 | # |
| 557 | # CONFIG_MTD_UBI is not set | 548 | # CONFIG_MTD_UBI is not set |
| 558 | |||
| 559 | # | ||
| 560 | # Parallel port support | ||
| 561 | # | ||
| 562 | # CONFIG_PARPORT is not set | 549 | # CONFIG_PARPORT is not set |
| 563 | 550 | CONFIG_BLK_DEV=y | |
| 564 | # | ||
| 565 | # Plug and Play support | ||
| 566 | # | ||
| 567 | # CONFIG_PNPACPI is not set | ||
| 568 | |||
| 569 | # | ||
| 570 | # Block devices | ||
| 571 | # | ||
| 572 | # CONFIG_BLK_DEV_COW_COMMON is not set | 551 | # CONFIG_BLK_DEV_COW_COMMON is not set |
| 573 | # CONFIG_BLK_DEV_LOOP is not set | 552 | # CONFIG_BLK_DEV_LOOP is not set |
| 574 | # CONFIG_BLK_DEV_NBD is not set | 553 | # CONFIG_BLK_DEV_NBD is not set |
| @@ -578,10 +557,8 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 | |||
| 578 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 557 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
| 579 | # CONFIG_CDROM_PKTCDVD is not set | 558 | # CONFIG_CDROM_PKTCDVD is not set |
| 580 | # CONFIG_ATA_OVER_ETH is not set | 559 | # CONFIG_ATA_OVER_ETH is not set |
| 581 | 560 | CONFIG_MISC_DEVICES=y | |
| 582 | # | 561 | # CONFIG_EEPROM_93CX6 is not set |
| 583 | # Misc devices | ||
| 584 | # | ||
| 585 | # CONFIG_IDE is not set | 562 | # CONFIG_IDE is not set |
| 586 | 563 | ||
| 587 | # | 564 | # |
| @@ -589,32 +566,29 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
| 589 | # | 566 | # |
| 590 | # CONFIG_RAID_ATTRS is not set | 567 | # CONFIG_RAID_ATTRS is not set |
| 591 | # CONFIG_SCSI is not set | 568 | # CONFIG_SCSI is not set |
| 569 | # CONFIG_SCSI_DMA is not set | ||
| 592 | # CONFIG_SCSI_NETLINK is not set | 570 | # CONFIG_SCSI_NETLINK is not set |
| 593 | # CONFIG_ATA is not set | 571 | # CONFIG_ATA is not set |
| 594 | |||
| 595 | # | ||
| 596 | # Multi-device support (RAID and LVM) | ||
| 597 | # | ||
| 598 | # CONFIG_MD is not set | 572 | # CONFIG_MD is not set |
| 599 | |||
| 600 | # | ||
| 601 | # Network device support | ||
| 602 | # | ||
| 603 | CONFIG_NETDEVICES=y | 573 | CONFIG_NETDEVICES=y |
| 574 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 604 | # CONFIG_DUMMY is not set | 575 | # CONFIG_DUMMY is not set |
| 605 | # CONFIG_BONDING is not set | 576 | # CONFIG_BONDING is not set |
| 577 | # CONFIG_MACVLAN is not set | ||
| 606 | # CONFIG_EQUALIZER is not set | 578 | # CONFIG_EQUALIZER is not set |
| 607 | # CONFIG_TUN is not set | 579 | # CONFIG_TUN is not set |
| 580 | # CONFIG_VETH is not set | ||
| 608 | # CONFIG_PHYLIB is not set | 581 | # CONFIG_PHYLIB is not set |
| 609 | |||
| 610 | # | ||
| 611 | # Ethernet (10 or 100Mbit) | ||
| 612 | # | ||
| 613 | CONFIG_NET_ETHERNET=y | 582 | CONFIG_NET_ETHERNET=y |
| 614 | CONFIG_MII=y | 583 | CONFIG_MII=y |
| 615 | CONFIG_SMC91X=y | 584 | CONFIG_SMC91X=y |
| 616 | # CONFIG_SMSC911X is not set | 585 | # CONFIG_SMSC911X is not set |
| 617 | # CONFIG_DM9000 is not set | 586 | # CONFIG_DM9000 is not set |
| 587 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 588 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 589 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 590 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 591 | # CONFIG_B44 is not set | ||
| 618 | CONFIG_NETDEV_1000=y | 592 | CONFIG_NETDEV_1000=y |
| 619 | # CONFIG_AX88180 is not set | 593 | # CONFIG_AX88180 is not set |
| 620 | CONFIG_NETDEV_10000=y | 594 | CONFIG_NETDEV_10000=y |
| @@ -631,15 +605,7 @@ CONFIG_NETDEV_10000=y | |||
| 631 | # CONFIG_NETCONSOLE is not set | 605 | # CONFIG_NETCONSOLE is not set |
| 632 | # CONFIG_NETPOLL is not set | 606 | # CONFIG_NETPOLL is not set |
| 633 | # CONFIG_NET_POLL_CONTROLLER is not set | 607 | # CONFIG_NET_POLL_CONTROLLER is not set |
| 634 | |||
| 635 | # | ||
| 636 | # ISDN subsystem | ||
| 637 | # | ||
| 638 | # CONFIG_ISDN is not set | 608 | # CONFIG_ISDN is not set |
| 639 | |||
| 640 | # | ||
| 641 | # Telephony Support | ||
| 642 | # | ||
| 643 | # CONFIG_PHONE is not set | 609 | # CONFIG_PHONE is not set |
| 644 | 610 | ||
| 645 | # | 611 | # |
| @@ -654,7 +620,6 @@ CONFIG_INPUT=y | |||
| 654 | # | 620 | # |
| 655 | # CONFIG_INPUT_MOUSEDEV is not set | 621 | # CONFIG_INPUT_MOUSEDEV is not set |
| 656 | # CONFIG_INPUT_JOYDEV is not set | 622 | # CONFIG_INPUT_JOYDEV is not set |
| 657 | # CONFIG_INPUT_TSDEV is not set | ||
| 658 | CONFIG_INPUT_EVDEV=m | 623 | CONFIG_INPUT_EVDEV=m |
| 659 | # CONFIG_INPUT_EVBUG is not set | 624 | # CONFIG_INPUT_EVBUG is not set |
| 660 | 625 | ||
| @@ -667,14 +632,8 @@ CONFIG_INPUT_EVDEV=m | |||
| 667 | # CONFIG_INPUT_TABLET is not set | 632 | # CONFIG_INPUT_TABLET is not set |
| 668 | # CONFIG_INPUT_TOUCHSCREEN is not set | 633 | # CONFIG_INPUT_TOUCHSCREEN is not set |
| 669 | CONFIG_INPUT_MISC=y | 634 | CONFIG_INPUT_MISC=y |
| 670 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
| 671 | # CONFIG_INPUT_ATI_REMOTE2 is not set | ||
| 672 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | ||
| 673 | # CONFIG_INPUT_POWERMATE is not set | ||
| 674 | # CONFIG_INPUT_YEALINK is not set | ||
| 675 | # CONFIG_INPUT_UINPUT is not set | 635 | # CONFIG_INPUT_UINPUT is not set |
| 676 | CONFIG_TWI_KEYPAD=m | 636 | CONFIG_TWI_KEYPAD=m |
| 677 | CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=39 | ||
| 678 | 637 | ||
| 679 | # | 638 | # |
| 680 | # Hardware I/O ports | 639 | # Hardware I/O ports |
| @@ -687,15 +646,13 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=39 | |||
| 687 | # | 646 | # |
| 688 | # CONFIG_AD9960 is not set | 647 | # CONFIG_AD9960 is not set |
| 689 | # CONFIG_SPI_ADC_BF533 is not set | 648 | # CONFIG_SPI_ADC_BF533 is not set |
| 690 | # CONFIG_BF5xx_PFLAGS is not set | ||
| 691 | # CONFIG_BF5xx_PPIFCD is not set | 649 | # CONFIG_BF5xx_PPIFCD is not set |
| 692 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 650 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
| 693 | # CONFIG_BF5xx_PPI is not set | 651 | # CONFIG_BF5xx_PPI is not set |
| 694 | CONFIG_BFIN_SPORT=y | 652 | CONFIG_BFIN_SPORT=y |
| 695 | # CONFIG_BFIN_TIMER_LATENCY is not set | 653 | # CONFIG_BFIN_TIMER_LATENCY is not set |
| 696 | CONFIG_TWI_LCD=m | 654 | CONFIG_TWI_LCD=m |
| 697 | CONFIG_TWI_LCD_SLAVE_ADDR=34 | 655 | CONFIG_SIMPLE_GPIO=m |
| 698 | # CONFIG_AD5304 is not set | ||
| 699 | # CONFIG_VT is not set | 656 | # CONFIG_VT is not set |
| 700 | # CONFIG_SERIAL_NONSTANDARD is not set | 657 | # CONFIG_SERIAL_NONSTANDARD is not set |
| 701 | 658 | ||
| @@ -723,28 +680,11 @@ CONFIG_UNIX98_PTYS=y | |||
| 723 | # CAN, the car bus and industrial fieldbus | 680 | # CAN, the car bus and industrial fieldbus |
| 724 | # | 681 | # |
| 725 | # CONFIG_CAN4LINUX is not set | 682 | # CONFIG_CAN4LINUX is not set |
| 726 | |||
| 727 | # | ||
| 728 | # IPMI | ||
| 729 | # | ||
| 730 | # CONFIG_IPMI_HANDLER is not set | 683 | # CONFIG_IPMI_HANDLER is not set |
| 731 | CONFIG_WATCHDOG=y | ||
| 732 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 733 | |||
| 734 | # | ||
| 735 | # Watchdog Device Drivers | ||
| 736 | # | ||
| 737 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 738 | CONFIG_BFIN_WDT=y | ||
| 739 | CONFIG_HW_RANDOM=y | 684 | CONFIG_HW_RANDOM=y |
| 740 | # CONFIG_GEN_RTC is not set | 685 | # CONFIG_GEN_RTC is not set |
| 741 | CONFIG_BLACKFIN_DPMC=y | ||
| 742 | # CONFIG_R3964 is not set | 686 | # CONFIG_R3964 is not set |
| 743 | # CONFIG_RAW_DRIVER is not set | 687 | # CONFIG_RAW_DRIVER is not set |
| 744 | |||
| 745 | # | ||
| 746 | # TPM devices | ||
| 747 | # | ||
| 748 | # CONFIG_TCG_TPM is not set | 688 | # CONFIG_TCG_TPM is not set |
| 749 | CONFIG_I2C=m | 689 | CONFIG_I2C=m |
| 750 | CONFIG_I2C_BOARDINFO=y | 690 | CONFIG_I2C_BOARDINFO=y |
| @@ -764,6 +704,7 @@ CONFIG_I2C_ALGOBIT=m | |||
| 764 | # CONFIG_I2C_OCORES is not set | 704 | # CONFIG_I2C_OCORES is not set |
| 765 | # CONFIG_I2C_PARPORT_LIGHT is not set | 705 | # CONFIG_I2C_PARPORT_LIGHT is not set |
| 766 | # CONFIG_I2C_SIMTEC is not set | 706 | # CONFIG_I2C_SIMTEC is not set |
| 707 | # CONFIG_I2C_TAOS_EVM is not set | ||
| 767 | # CONFIG_I2C_STUB is not set | 708 | # CONFIG_I2C_STUB is not set |
| 768 | 709 | ||
| 769 | # | 710 | # |
| @@ -771,14 +712,15 @@ CONFIG_I2C_ALGOBIT=m | |||
| 771 | # | 712 | # |
| 772 | # CONFIG_SENSORS_DS1337 is not set | 713 | # CONFIG_SENSORS_DS1337 is not set |
| 773 | # CONFIG_SENSORS_DS1374 is not set | 714 | # CONFIG_SENSORS_DS1374 is not set |
| 715 | # CONFIG_DS1682 is not set | ||
| 774 | # CONFIG_SENSORS_AD5252 is not set | 716 | # CONFIG_SENSORS_AD5252 is not set |
| 775 | # CONFIG_SENSORS_EEPROM is not set | 717 | # CONFIG_SENSORS_EEPROM is not set |
| 776 | # CONFIG_SENSORS_PCF8574 is not set | 718 | # CONFIG_SENSORS_PCF8574 is not set |
| 777 | # CONFIG_SENSORS_PCF8575 is not set | 719 | # CONFIG_SENSORS_PCF8575 is not set |
| 778 | # CONFIG_SENSORS_PCA9543 is not set | ||
| 779 | # CONFIG_SENSORS_PCA9539 is not set | 720 | # CONFIG_SENSORS_PCA9539 is not set |
| 780 | # CONFIG_SENSORS_PCF8591 is not set | 721 | # CONFIG_SENSORS_PCF8591 is not set |
| 781 | # CONFIG_SENSORS_MAX6875 is not set | 722 | # CONFIG_SENSORS_MAX6875 is not set |
| 723 | # CONFIG_SENSORS_TSL2550 is not set | ||
| 782 | # CONFIG_I2C_DEBUG_CORE is not set | 724 | # CONFIG_I2C_DEBUG_CORE is not set |
| 783 | # CONFIG_I2C_DEBUG_ALGO is not set | 725 | # CONFIG_I2C_DEBUG_ALGO is not set |
| 784 | # CONFIG_I2C_DEBUG_BUS is not set | 726 | # CONFIG_I2C_DEBUG_BUS is not set |
| @@ -801,14 +743,11 @@ CONFIG_SPI_BFIN=y | |||
| 801 | # | 743 | # |
| 802 | # CONFIG_SPI_AT25 is not set | 744 | # CONFIG_SPI_AT25 is not set |
| 803 | # CONFIG_SPI_SPIDEV is not set | 745 | # CONFIG_SPI_SPIDEV is not set |
| 804 | 746 | # CONFIG_SPI_TLE62X0 is not set | |
| 805 | # | ||
| 806 | # Dallas's 1-wire bus | ||
| 807 | # | ||
| 808 | # CONFIG_W1 is not set | 747 | # CONFIG_W1 is not set |
| 748 | # CONFIG_POWER_SUPPLY is not set | ||
| 809 | CONFIG_HWMON=y | 749 | CONFIG_HWMON=y |
| 810 | # CONFIG_HWMON_VID is not set | 750 | # CONFIG_HWMON_VID is not set |
| 811 | # CONFIG_SENSORS_ABITUGURU is not set | ||
| 812 | # CONFIG_SENSORS_AD7418 is not set | 751 | # CONFIG_SENSORS_AD7418 is not set |
| 813 | # CONFIG_SENSORS_ADM1021 is not set | 752 | # CONFIG_SENSORS_ADM1021 is not set |
| 814 | # CONFIG_SENSORS_ADM1025 is not set | 753 | # CONFIG_SENSORS_ADM1025 is not set |
| @@ -816,12 +755,12 @@ CONFIG_HWMON=y | |||
| 816 | # CONFIG_SENSORS_ADM1029 is not set | 755 | # CONFIG_SENSORS_ADM1029 is not set |
| 817 | # CONFIG_SENSORS_ADM1031 is not set | 756 | # CONFIG_SENSORS_ADM1031 is not set |
| 818 | # CONFIG_SENSORS_ADM9240 is not set | 757 | # CONFIG_SENSORS_ADM9240 is not set |
| 819 | # CONFIG_SENSORS_ASB100 is not set | 758 | # CONFIG_SENSORS_ADT7470 is not set |
| 820 | # CONFIG_SENSORS_ATXP1 is not set | 759 | # CONFIG_SENSORS_ATXP1 is not set |
| 821 | # CONFIG_SENSORS_DS1621 is not set | 760 | # CONFIG_SENSORS_DS1621 is not set |
| 822 | # CONFIG_SENSORS_F71805F is not set | 761 | # CONFIG_SENSORS_F71805F is not set |
| 823 | # CONFIG_SENSORS_FSCHER is not set | 762 | # CONFIG_SENSORS_F71882FG is not set |
| 824 | # CONFIG_SENSORS_FSCPOS is not set | 763 | # CONFIG_SENSORS_F75375S is not set |
| 825 | # CONFIG_SENSORS_GL518SM is not set | 764 | # CONFIG_SENSORS_GL518SM is not set |
| 826 | # CONFIG_SENSORS_GL520SM is not set | 765 | # CONFIG_SENSORS_GL520SM is not set |
| 827 | # CONFIG_SENSORS_IT87 is not set | 766 | # CONFIG_SENSORS_IT87 is not set |
| @@ -836,13 +775,16 @@ CONFIG_HWMON=y | |||
| 836 | # CONFIG_SENSORS_LM87 is not set | 775 | # CONFIG_SENSORS_LM87 is not set |
| 837 | # CONFIG_SENSORS_LM90 is not set | 776 | # CONFIG_SENSORS_LM90 is not set |
| 838 | # CONFIG_SENSORS_LM92 is not set | 777 | # CONFIG_SENSORS_LM92 is not set |
| 778 | # CONFIG_SENSORS_LM93 is not set | ||
| 839 | # CONFIG_SENSORS_MAX1619 is not set | 779 | # CONFIG_SENSORS_MAX1619 is not set |
| 840 | # CONFIG_SENSORS_MAX6650 is not set | 780 | # CONFIG_SENSORS_MAX6650 is not set |
| 841 | # CONFIG_SENSORS_PC87360 is not set | 781 | # CONFIG_SENSORS_PC87360 is not set |
| 842 | # CONFIG_SENSORS_PC87427 is not set | 782 | # CONFIG_SENSORS_PC87427 is not set |
| 783 | # CONFIG_SENSORS_DME1737 is not set | ||
| 843 | # CONFIG_SENSORS_SMSC47M1 is not set | 784 | # CONFIG_SENSORS_SMSC47M1 is not set |
| 844 | # CONFIG_SENSORS_SMSC47M192 is not set | 785 | # CONFIG_SENSORS_SMSC47M192 is not set |
| 845 | # CONFIG_SENSORS_SMSC47B397 is not set | 786 | # CONFIG_SENSORS_SMSC47B397 is not set |
| 787 | # CONFIG_SENSORS_THMC50 is not set | ||
| 846 | # CONFIG_SENSORS_VT1211 is not set | 788 | # CONFIG_SENSORS_VT1211 is not set |
| 847 | # CONFIG_SENSORS_W83781D is not set | 789 | # CONFIG_SENSORS_W83781D is not set |
| 848 | # CONFIG_SENSORS_W83791D is not set | 790 | # CONFIG_SENSORS_W83791D is not set |
| @@ -852,6 +794,20 @@ CONFIG_HWMON=y | |||
| 852 | # CONFIG_SENSORS_W83627HF is not set | 794 | # CONFIG_SENSORS_W83627HF is not set |
| 853 | # CONFIG_SENSORS_W83627EHF is not set | 795 | # CONFIG_SENSORS_W83627EHF is not set |
| 854 | # CONFIG_HWMON_DEBUG_CHIP is not set | 796 | # CONFIG_HWMON_DEBUG_CHIP is not set |
| 797 | CONFIG_WATCHDOG=y | ||
| 798 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 799 | |||
| 800 | # | ||
| 801 | # Watchdog Device Drivers | ||
| 802 | # | ||
| 803 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 804 | CONFIG_BFIN_WDT=y | ||
| 805 | |||
| 806 | # | ||
| 807 | # Sonics Silicon Backplane | ||
| 808 | # | ||
| 809 | CONFIG_SSB_POSSIBLE=y | ||
| 810 | # CONFIG_SSB is not set | ||
| 855 | 811 | ||
| 856 | # | 812 | # |
| 857 | # Multifunction device drivers | 813 | # Multifunction device drivers |
| @@ -863,24 +819,20 @@ CONFIG_HWMON=y | |||
| 863 | # | 819 | # |
| 864 | # CONFIG_VIDEO_DEV is not set | 820 | # CONFIG_VIDEO_DEV is not set |
| 865 | # CONFIG_DVB_CORE is not set | 821 | # CONFIG_DVB_CORE is not set |
| 866 | CONFIG_DAB=y | 822 | # CONFIG_DAB is not set |
| 867 | 823 | ||
| 868 | # | 824 | # |
| 869 | # Graphics support | 825 | # Graphics support |
| 870 | # | 826 | # |
| 871 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 872 | |||
| 873 | # | ||
| 874 | # Display device support | ||
| 875 | # | ||
| 876 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 877 | # CONFIG_VGASTATE is not set | 827 | # CONFIG_VGASTATE is not set |
| 828 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 878 | CONFIG_FB=m | 829 | CONFIG_FB=m |
| 879 | CONFIG_FIRMWARE_EDID=y | 830 | CONFIG_FIRMWARE_EDID=y |
| 880 | # CONFIG_FB_DDC is not set | 831 | # CONFIG_FB_DDC is not set |
| 881 | CONFIG_FB_CFB_FILLRECT=m | 832 | CONFIG_FB_CFB_FILLRECT=m |
| 882 | CONFIG_FB_CFB_COPYAREA=m | 833 | CONFIG_FB_CFB_COPYAREA=m |
| 883 | CONFIG_FB_CFB_IMAGEBLIT=m | 834 | CONFIG_FB_CFB_IMAGEBLIT=m |
| 835 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
| 884 | # CONFIG_FB_SYS_FILLRECT is not set | 836 | # CONFIG_FB_SYS_FILLRECT is not set |
| 885 | # CONFIG_FB_SYS_COPYAREA is not set | 837 | # CONFIG_FB_SYS_COPYAREA is not set |
| 886 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 838 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
| @@ -895,7 +847,7 @@ CONFIG_FB_DEFERRED_IO=y | |||
| 895 | # | 847 | # |
| 896 | # Frame buffer hardware drivers | 848 | # Frame buffer hardware drivers |
| 897 | # | 849 | # |
| 898 | CONFIG_FB_BFIN_7171=m | 850 | # CONFIG_FB_BFIN_T350MCQB is not set |
| 899 | CONFIG_FB_BFIN_7393=m | 851 | CONFIG_FB_BFIN_7393=m |
| 900 | CONFIG_NTSC=y | 852 | CONFIG_NTSC=y |
| 901 | # CONFIG_PAL is not set | 853 | # CONFIG_PAL is not set |
| @@ -905,9 +857,14 @@ CONFIG_NTSC=y | |||
| 905 | # CONFIG_PAL_YCBCR is not set | 857 | # CONFIG_PAL_YCBCR is not set |
| 906 | CONFIG_ADV7393_1XMEM=y | 858 | CONFIG_ADV7393_1XMEM=y |
| 907 | # CONFIG_ADV7393_2XMEM is not set | 859 | # CONFIG_ADV7393_2XMEM is not set |
| 908 | # CONFIG_FB_BFIN_T350MCQB is not set | ||
| 909 | # CONFIG_FB_S1D13XXX is not set | 860 | # CONFIG_FB_S1D13XXX is not set |
| 910 | # CONFIG_FB_VIRTUAL is not set | 861 | # CONFIG_FB_VIRTUAL is not set |
| 862 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 863 | |||
| 864 | # | ||
| 865 | # Display device support | ||
| 866 | # | ||
| 867 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 911 | # CONFIG_LOGO is not set | 868 | # CONFIG_LOGO is not set |
| 912 | 869 | ||
| 913 | # | 870 | # |
| @@ -941,6 +898,10 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
| 941 | # CONFIG_SND_MPU401 is not set | 898 | # CONFIG_SND_MPU401 is not set |
| 942 | 899 | ||
| 943 | # | 900 | # |
| 901 | # SPI devices | ||
| 902 | # | ||
| 903 | |||
| 904 | # | ||
| 944 | # ALSA Blackfin devices | 905 | # ALSA Blackfin devices |
| 945 | # | 906 | # |
| 946 | CONFIG_SND_BLACKFIN_AD1836=m | 907 | CONFIG_SND_BLACKFIN_AD1836=m |
| @@ -953,69 +914,43 @@ CONFIG_SND_BLACKFIN_SPI_PFBIT=4 | |||
| 953 | CONFIG_SND_BFIN_AD73311=m | 914 | CONFIG_SND_BFIN_AD73311=m |
| 954 | CONFIG_SND_BFIN_SPORT=0 | 915 | CONFIG_SND_BFIN_SPORT=0 |
| 955 | CONFIG_SND_BFIN_AD73311_SE=4 | 916 | CONFIG_SND_BFIN_AD73311_SE=4 |
| 917 | CONFIG_SND_BFIN_AD73322=m | ||
| 918 | CONFIG_SND_BFIN_AD73322_SPORT0_SE=10 | ||
| 919 | CONFIG_SND_BFIN_AD73322_SPORT1_SE=14 | ||
| 920 | CONFIG_SND_BFIN_AD73322_RESET=12 | ||
| 956 | 921 | ||
| 957 | # | 922 | # |
| 958 | # System on Chip audio support | 923 | # System on Chip audio support |
| 959 | # | 924 | # |
| 960 | # CONFIG_SND_SOC is not set | 925 | CONFIG_SND_SOC_AC97_BUS=y |
| 926 | CONFIG_SND_SOC=m | ||
| 927 | CONFIG_SND_BF5XX_SOC=m | ||
| 928 | CONFIG_SND_MMAP_SUPPORT=y | ||
| 929 | CONFIG_SND_BF5XX_SOC_AC97=m | ||
| 930 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set | ||
| 931 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set | ||
| 932 | # CONFIG_SND_BF5XX_SOC_SSM2602 is not set | ||
| 933 | CONFIG_SND_BF5XX_SOC_BF5xx=m | ||
| 934 | CONFIG_SND_BF5XX_SPORT_NUM=0 | ||
| 935 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | ||
| 961 | 936 | ||
| 962 | # | 937 | # |
| 963 | # Open Sound System | 938 | # SoC Audio support for SuperH |
| 964 | # | 939 | # |
| 965 | # CONFIG_SOUND_PRIME is not set | 940 | CONFIG_SND_SOC_AD1980=m |
| 966 | 941 | ||
| 967 | # | 942 | # |
| 968 | # HID Devices | 943 | # Open Sound System |
| 969 | # | 944 | # |
| 945 | # CONFIG_SOUND_PRIME is not set | ||
| 946 | CONFIG_AC97_BUS=m | ||
| 947 | CONFIG_HID_SUPPORT=y | ||
| 970 | CONFIG_HID=y | 948 | CONFIG_HID=y |
| 971 | # CONFIG_HID_DEBUG is not set | 949 | # CONFIG_HID_DEBUG is not set |
| 972 | 950 | # CONFIG_HIDRAW is not set | |
| 973 | # | 951 | # CONFIG_USB_SUPPORT is not set |
| 974 | # USB support | ||
| 975 | # | ||
| 976 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 977 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 978 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
| 979 | # CONFIG_USB is not set | ||
| 980 | |||
| 981 | # | ||
| 982 | # Enable Host or Gadget support to see Inventra options | ||
| 983 | # | ||
| 984 | |||
| 985 | # | ||
| 986 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 987 | # | ||
| 988 | |||
| 989 | # | ||
| 990 | # USB Gadget Support | ||
| 991 | # | ||
| 992 | # CONFIG_USB_GADGET is not set | ||
| 993 | # CONFIG_MMC is not set | 952 | # CONFIG_MMC is not set |
| 994 | |||
| 995 | # | ||
| 996 | # LED devices | ||
| 997 | # | ||
| 998 | # CONFIG_NEW_LEDS is not set | 953 | # CONFIG_NEW_LEDS is not set |
| 999 | |||
| 1000 | # | ||
| 1001 | # LED drivers | ||
| 1002 | # | ||
| 1003 | |||
| 1004 | # | ||
| 1005 | # LED Triggers | ||
| 1006 | # | ||
| 1007 | |||
| 1008 | # | ||
| 1009 | # InfiniBand support | ||
| 1010 | # | ||
| 1011 | |||
| 1012 | # | ||
| 1013 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
| 1014 | # | ||
| 1015 | |||
| 1016 | # | ||
| 1017 | # Real Time Clock | ||
| 1018 | # | ||
| 1019 | CONFIG_RTC_LIB=y | 954 | CONFIG_RTC_LIB=y |
| 1020 | CONFIG_RTC_CLASS=y | 955 | CONFIG_RTC_CLASS=y |
| 1021 | CONFIG_RTC_HCTOSYS=y | 956 | CONFIG_RTC_HCTOSYS=y |
| @@ -1035,6 +970,7 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1035 | # I2C RTC drivers | 970 | # I2C RTC drivers |
| 1036 | # | 971 | # |
| 1037 | # CONFIG_RTC_DRV_DS1307 is not set | 972 | # CONFIG_RTC_DRV_DS1307 is not set |
| 973 | # CONFIG_RTC_DRV_DS1374 is not set | ||
| 1038 | # CONFIG_RTC_DRV_DS1672 is not set | 974 | # CONFIG_RTC_DRV_DS1672 is not set |
| 1039 | # CONFIG_RTC_DRV_MAX6900 is not set | 975 | # CONFIG_RTC_DRV_MAX6900 is not set |
| 1040 | # CONFIG_RTC_DRV_RS5C372 is not set | 976 | # CONFIG_RTC_DRV_RS5C372 is not set |
| @@ -1042,6 +978,7 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1042 | # CONFIG_RTC_DRV_X1205 is not set | 978 | # CONFIG_RTC_DRV_X1205 is not set |
| 1043 | # CONFIG_RTC_DRV_PCF8563 is not set | 979 | # CONFIG_RTC_DRV_PCF8563 is not set |
| 1044 | # CONFIG_RTC_DRV_PCF8583 is not set | 980 | # CONFIG_RTC_DRV_PCF8583 is not set |
| 981 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 1045 | 982 | ||
| 1046 | # | 983 | # |
| 1047 | # SPI RTC drivers | 984 | # SPI RTC drivers |
| @@ -1053,8 +990,10 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1053 | # Platform RTC drivers | 990 | # Platform RTC drivers |
| 1054 | # | 991 | # |
| 1055 | # CONFIG_RTC_DRV_DS1553 is not set | 992 | # CONFIG_RTC_DRV_DS1553 is not set |
| 993 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 1056 | # CONFIG_RTC_DRV_DS1742 is not set | 994 | # CONFIG_RTC_DRV_DS1742 is not set |
| 1057 | # CONFIG_RTC_DRV_M48T86 is not set | 995 | # CONFIG_RTC_DRV_M48T86 is not set |
| 996 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 1058 | # CONFIG_RTC_DRV_V3020 is not set | 997 | # CONFIG_RTC_DRV_V3020 is not set |
| 1059 | 998 | ||
| 1060 | # | 999 | # |
| @@ -1063,22 +1002,9 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1063 | CONFIG_RTC_DRV_BFIN=y | 1002 | CONFIG_RTC_DRV_BFIN=y |
| 1064 | 1003 | ||
| 1065 | # | 1004 | # |
| 1066 | # DMA Engine support | 1005 | # Userspace I/O |
| 1067 | # | 1006 | # |
| 1068 | # CONFIG_DMA_ENGINE is not set | 1007 | # CONFIG_UIO is not set |
| 1069 | |||
| 1070 | # | ||
| 1071 | # DMA Clients | ||
| 1072 | # | ||
| 1073 | |||
| 1074 | # | ||
| 1075 | # DMA Devices | ||
| 1076 | # | ||
| 1077 | |||
| 1078 | # | ||
| 1079 | # PBX support | ||
| 1080 | # | ||
| 1081 | # CONFIG_PBX is not set | ||
| 1082 | 1008 | ||
| 1083 | # | 1009 | # |
| 1084 | # File systems | 1010 | # File systems |
| @@ -1123,7 +1049,6 @@ CONFIG_PROC_SYSCTL=y | |||
| 1123 | CONFIG_SYSFS=y | 1049 | CONFIG_SYSFS=y |
| 1124 | # CONFIG_TMPFS is not set | 1050 | # CONFIG_TMPFS is not set |
| 1125 | # CONFIG_HUGETLB_PAGE is not set | 1051 | # CONFIG_HUGETLB_PAGE is not set |
| 1126 | CONFIG_RAMFS=y | ||
| 1127 | # CONFIG_CONFIGFS_FS is not set | 1052 | # CONFIG_CONFIGFS_FS is not set |
| 1128 | 1053 | ||
| 1129 | # | 1054 | # |
| @@ -1149,10 +1074,12 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | |||
| 1149 | CONFIG_JFFS2_FS=m | 1074 | CONFIG_JFFS2_FS=m |
| 1150 | CONFIG_JFFS2_FS_DEBUG=0 | 1075 | CONFIG_JFFS2_FS_DEBUG=0 |
| 1151 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 1076 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
| 1077 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
| 1152 | # CONFIG_JFFS2_SUMMARY is not set | 1078 | # CONFIG_JFFS2_SUMMARY is not set |
| 1153 | # CONFIG_JFFS2_FS_XATTR is not set | 1079 | # CONFIG_JFFS2_FS_XATTR is not set |
| 1154 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 1080 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
| 1155 | CONFIG_JFFS2_ZLIB=y | 1081 | CONFIG_JFFS2_ZLIB=y |
| 1082 | # CONFIG_JFFS2_LZO is not set | ||
| 1156 | CONFIG_JFFS2_RTIME=y | 1083 | CONFIG_JFFS2_RTIME=y |
| 1157 | # CONFIG_JFFS2_RUBIN is not set | 1084 | # CONFIG_JFFS2_RUBIN is not set |
| 1158 | # CONFIG_CRAMFS is not set | 1085 | # CONFIG_CRAMFS is not set |
| @@ -1161,10 +1088,7 @@ CONFIG_JFFS2_RTIME=y | |||
| 1161 | # CONFIG_QNX4FS_FS is not set | 1088 | # CONFIG_QNX4FS_FS is not set |
| 1162 | # CONFIG_SYSV_FS is not set | 1089 | # CONFIG_SYSV_FS is not set |
| 1163 | # CONFIG_UFS_FS is not set | 1090 | # CONFIG_UFS_FS is not set |
| 1164 | 1091 | CONFIG_NETWORK_FILESYSTEMS=y | |
| 1165 | # | ||
| 1166 | # Network File Systems | ||
| 1167 | # | ||
| 1168 | CONFIG_NFS_FS=m | 1092 | CONFIG_NFS_FS=m |
| 1169 | CONFIG_NFS_V3=y | 1093 | CONFIG_NFS_V3=y |
| 1170 | # CONFIG_NFS_V3_ACL is not set | 1094 | # CONFIG_NFS_V3_ACL is not set |
| @@ -1184,17 +1108,12 @@ CONFIG_SMB_FS=m | |||
| 1184 | # CONFIG_NCP_FS is not set | 1108 | # CONFIG_NCP_FS is not set |
| 1185 | # CONFIG_CODA_FS is not set | 1109 | # CONFIG_CODA_FS is not set |
| 1186 | # CONFIG_AFS_FS is not set | 1110 | # CONFIG_AFS_FS is not set |
| 1187 | # CONFIG_9P_FS is not set | ||
| 1188 | 1111 | ||
| 1189 | # | 1112 | # |
| 1190 | # Partition Types | 1113 | # Partition Types |
| 1191 | # | 1114 | # |
| 1192 | # CONFIG_PARTITION_ADVANCED is not set | 1115 | # CONFIG_PARTITION_ADVANCED is not set |
| 1193 | CONFIG_MSDOS_PARTITION=y | 1116 | CONFIG_MSDOS_PARTITION=y |
| 1194 | |||
| 1195 | # | ||
| 1196 | # Native Language Support | ||
| 1197 | # | ||
| 1198 | CONFIG_NLS=m | 1117 | CONFIG_NLS=m |
| 1199 | CONFIG_NLS_DEFAULT="iso8859-1" | 1118 | CONFIG_NLS_DEFAULT="iso8859-1" |
| 1200 | # CONFIG_NLS_CODEPAGE_437 is not set | 1119 | # CONFIG_NLS_CODEPAGE_437 is not set |
| @@ -1235,21 +1154,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
| 1235 | # CONFIG_NLS_KOI8_R is not set | 1154 | # CONFIG_NLS_KOI8_R is not set |
| 1236 | # CONFIG_NLS_KOI8_U is not set | 1155 | # CONFIG_NLS_KOI8_U is not set |
| 1237 | # CONFIG_NLS_UTF8 is not set | 1156 | # CONFIG_NLS_UTF8 is not set |
| 1238 | |||
| 1239 | # | ||
| 1240 | # Distributed Lock Manager | ||
| 1241 | # | ||
| 1242 | # CONFIG_DLM is not set | 1157 | # CONFIG_DLM is not set |
| 1243 | 1158 | CONFIG_INSTRUMENTATION=y | |
| 1244 | # | ||
| 1245 | # Profiling support | ||
| 1246 | # | ||
| 1247 | # CONFIG_PROFILING is not set | 1159 | # CONFIG_PROFILING is not set |
| 1160 | # CONFIG_MARKERS is not set | ||
| 1248 | 1161 | ||
| 1249 | # | 1162 | # |
| 1250 | # Kernel hacking | 1163 | # Kernel hacking |
| 1251 | # | 1164 | # |
| 1252 | # CONFIG_PRINTK_TIME is not set | 1165 | # CONFIG_PRINTK_TIME is not set |
| 1166 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1253 | CONFIG_ENABLE_MUST_CHECK=y | 1167 | CONFIG_ENABLE_MUST_CHECK=y |
| 1254 | # CONFIG_MAGIC_SYSRQ is not set | 1168 | # CONFIG_MAGIC_SYSRQ is not set |
| 1255 | # CONFIG_UNUSED_SYMBOLS is not set | 1169 | # CONFIG_UNUSED_SYMBOLS is not set |
| @@ -1257,6 +1171,7 @@ CONFIG_DEBUG_FS=y | |||
| 1257 | # CONFIG_HEADERS_CHECK is not set | 1171 | # CONFIG_HEADERS_CHECK is not set |
| 1258 | # CONFIG_DEBUG_KERNEL is not set | 1172 | # CONFIG_DEBUG_KERNEL is not set |
| 1259 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1173 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 1174 | # CONFIG_SAMPLES is not set | ||
| 1260 | CONFIG_DEBUG_MMRS=y | 1175 | CONFIG_DEBUG_MMRS=y |
| 1261 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 1176 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 1262 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 1177 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| @@ -1276,11 +1191,7 @@ CONFIG_ACCESS_CHECK=y | |||
| 1276 | # CONFIG_KEYS is not set | 1191 | # CONFIG_KEYS is not set |
| 1277 | CONFIG_SECURITY=y | 1192 | CONFIG_SECURITY=y |
| 1278 | # CONFIG_SECURITY_NETWORK is not set | 1193 | # CONFIG_SECURITY_NETWORK is not set |
| 1279 | CONFIG_SECURITY_CAPABILITIES=m | 1194 | # CONFIG_SECURITY_CAPABILITIES is not set |
| 1280 | |||
| 1281 | # | ||
| 1282 | # Cryptographic options | ||
| 1283 | # | ||
| 1284 | # CONFIG_CRYPTO is not set | 1195 | # CONFIG_CRYPTO is not set |
| 1285 | 1196 | ||
| 1286 | # | 1197 | # |
| @@ -1291,6 +1202,7 @@ CONFIG_CRC_CCITT=m | |||
| 1291 | # CONFIG_CRC16 is not set | 1202 | # CONFIG_CRC16 is not set |
| 1292 | # CONFIG_CRC_ITU_T is not set | 1203 | # CONFIG_CRC_ITU_T is not set |
| 1293 | CONFIG_CRC32=y | 1204 | CONFIG_CRC32=y |
| 1205 | # CONFIG_CRC7 is not set | ||
| 1294 | # CONFIG_LIBCRC32C is not set | 1206 | # CONFIG_LIBCRC32C is not set |
| 1295 | CONFIG_ZLIB_INFLATE=y | 1207 | CONFIG_ZLIB_INFLATE=y |
| 1296 | CONFIG_ZLIB_DEFLATE=m | 1208 | CONFIG_ZLIB_DEFLATE=m |
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig index b5189c8ba263..5fd7c4b143df 100644 --- a/arch/blackfin/configs/BF537-STAMP_defconfig +++ b/arch/blackfin/configs/BF537-STAMP_defconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.22.16 | 3 | # Linux kernel version: 2.6.24.7 |
| 4 | # | 4 | # |
| 5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
| 6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
| @@ -13,35 +13,34 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
| 13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
| 14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
| 15 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
| 16 | CONFIG_GENERIC_TIME=y | ||
| 17 | CONFIG_GENERIC_GPIO=y | 16 | CONFIG_GENERIC_GPIO=y |
| 18 | CONFIG_FORCE_MAX_ZONEORDER=14 | 17 | CONFIG_FORCE_MAX_ZONEORDER=14 |
| 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 18 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
| 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 21 | 20 | ||
| 22 | # | 21 | # |
| 23 | # Code maturity level options | 22 | # General setup |
| 24 | # | 23 | # |
| 25 | CONFIG_EXPERIMENTAL=y | 24 | CONFIG_EXPERIMENTAL=y |
| 26 | CONFIG_BROKEN_ON_SMP=y | 25 | CONFIG_BROKEN_ON_SMP=y |
| 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 26 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
| 28 | |||
| 29 | # | ||
| 30 | # General setup | ||
| 31 | # | ||
| 32 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
| 33 | CONFIG_LOCALVERSION_AUTO=y | 28 | CONFIG_LOCALVERSION_AUTO=y |
| 34 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
| 35 | # CONFIG_IPC_NS is not set | ||
| 36 | CONFIG_SYSVIPC_SYSCTL=y | 30 | CONFIG_SYSVIPC_SYSCTL=y |
| 37 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
| 38 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
| 39 | # CONFIG_TASKSTATS is not set | 33 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 34 | # CONFIG_USER_NS is not set |
| 35 | # CONFIG_PID_NS is not set | ||
| 41 | # CONFIG_AUDIT is not set | 36 | # CONFIG_AUDIT is not set |
| 42 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
| 44 | CONFIG_LOG_BUF_SHIFT=14 | 39 | CONFIG_LOG_BUF_SHIFT=14 |
| 40 | # CONFIG_CGROUPS is not set | ||
| 41 | CONFIG_FAIR_GROUP_SCHED=y | ||
| 42 | CONFIG_FAIR_USER_SCHED=y | ||
| 43 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
| 45 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_SYSFS_DEPRECATED=y |
| 46 | # CONFIG_RELAY is not set | 45 | # CONFIG_RELAY is not set |
| 47 | CONFIG_BLK_DEV_INITRD=y | 46 | CONFIG_BLK_DEV_INITRD=y |
| @@ -64,32 +63,24 @@ CONFIG_EPOLL=y | |||
| 64 | CONFIG_SIGNALFD=y | 63 | CONFIG_SIGNALFD=y |
| 65 | CONFIG_EVENTFD=y | 64 | CONFIG_EVENTFD=y |
| 66 | CONFIG_VM_EVENT_COUNTERS=y | 65 | CONFIG_VM_EVENT_COUNTERS=y |
| 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
| 68 | # CONFIG_NP2 is not set | ||
| 69 | CONFIG_SLAB=y | 66 | CONFIG_SLAB=y |
| 70 | # CONFIG_SLUB is not set | 67 | # CONFIG_SLUB is not set |
| 71 | # CONFIG_SLOB is not set | 68 | # CONFIG_SLOB is not set |
| 69 | CONFIG_SLABINFO=y | ||
| 72 | CONFIG_RT_MUTEXES=y | 70 | CONFIG_RT_MUTEXES=y |
| 73 | CONFIG_TINY_SHMEM=y | 71 | CONFIG_TINY_SHMEM=y |
| 74 | CONFIG_BASE_SMALL=0 | 72 | CONFIG_BASE_SMALL=0 |
| 75 | |||
| 76 | # | ||
| 77 | # Loadable module support | ||
| 78 | # | ||
| 79 | CONFIG_MODULES=y | 73 | CONFIG_MODULES=y |
| 80 | CONFIG_MODULE_UNLOAD=y | 74 | CONFIG_MODULE_UNLOAD=y |
| 81 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 75 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
| 82 | # CONFIG_MODVERSIONS is not set | 76 | # CONFIG_MODVERSIONS is not set |
| 83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 77 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
| 84 | CONFIG_KMOD=y | 78 | CONFIG_KMOD=y |
| 85 | |||
| 86 | # | ||
| 87 | # Block layer | ||
| 88 | # | ||
| 89 | CONFIG_BLOCK=y | 79 | CONFIG_BLOCK=y |
| 90 | # CONFIG_LBD is not set | 80 | # CONFIG_LBD is not set |
| 91 | # CONFIG_BLK_DEV_IO_TRACE is not set | 81 | # CONFIG_BLK_DEV_IO_TRACE is not set |
| 92 | # CONFIG_LSF is not set | 82 | # CONFIG_LSF is not set |
| 83 | # CONFIG_BLK_DEV_BSG is not set | ||
| 93 | 84 | ||
| 94 | # | 85 | # |
| 95 | # IO Schedulers | 86 | # IO Schedulers |
| @@ -141,7 +132,6 @@ CONFIG_BF_REV_0_2=y | |||
| 141 | # CONFIG_BF_REV_ANY is not set | 132 | # CONFIG_BF_REV_ANY is not set |
| 142 | # CONFIG_BF_REV_NONE is not set | 133 | # CONFIG_BF_REV_NONE is not set |
| 143 | CONFIG_BF53x=y | 134 | CONFIG_BF53x=y |
| 144 | CONFIG_BFIN_SINGLE_CORE=y | ||
| 145 | CONFIG_MEM_MT48LC32M8A2_75=y | 135 | CONFIG_MEM_MT48LC32M8A2_75=y |
| 146 | CONFIG_IRQ_PLL_WAKEUP=7 | 136 | CONFIG_IRQ_PLL_WAKEUP=7 |
| 147 | CONFIG_IRQ_RTC=8 | 137 | CONFIG_IRQ_RTC=8 |
| @@ -197,12 +187,14 @@ CONFIG_IRQ_PROG_INTA=12 | |||
| 197 | # Board customizations | 187 | # Board customizations |
| 198 | # | 188 | # |
| 199 | # CONFIG_CMDLINE_BOOL is not set | 189 | # CONFIG_CMDLINE_BOOL is not set |
| 190 | CONFIG_BOOT_LOAD=0x1000 | ||
| 200 | 191 | ||
| 201 | # | 192 | # |
| 202 | # Clock/PLL Setup | 193 | # Clock/PLL Setup |
| 203 | # | 194 | # |
| 204 | CONFIG_CLKIN_HZ=25000000 | 195 | CONFIG_CLKIN_HZ=25000000 |
| 205 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 196 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
| 197 | CONFIG_MAX_MEM_SIZE=512 | ||
| 206 | CONFIG_MAX_VCO_HZ=600000000 | 198 | CONFIG_MAX_VCO_HZ=600000000 |
| 207 | CONFIG_MIN_VCO_HZ=50000000 | 199 | CONFIG_MIN_VCO_HZ=50000000 |
| 208 | CONFIG_MAX_SCLK_HZ=133333333 | 200 | CONFIG_MAX_SCLK_HZ=133333333 |
| @@ -216,13 +208,17 @@ CONFIG_HZ_250=y | |||
| 216 | # CONFIG_HZ_300 is not set | 208 | # CONFIG_HZ_300 is not set |
| 217 | # CONFIG_HZ_1000 is not set | 209 | # CONFIG_HZ_1000 is not set |
| 218 | CONFIG_HZ=250 | 210 | CONFIG_HZ=250 |
| 211 | CONFIG_GENERIC_TIME=y | ||
| 212 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 213 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
| 214 | CONFIG_TICK_ONESHOT=y | ||
| 215 | # CONFIG_NO_HZ is not set | ||
| 216 | CONFIG_HIGH_RES_TIMERS=y | ||
| 217 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 219 | 218 | ||
| 220 | # | 219 | # |
| 221 | # Memory Setup | 220 | # Misc |
| 222 | # | 221 | # |
| 223 | CONFIG_MAX_MEM_SIZE=512 | ||
| 224 | CONFIG_MEM_ADD_WIDTH=10 | ||
| 225 | CONFIG_BOOT_LOAD=0x1000 | ||
| 226 | CONFIG_BFIN_SCRATCH_REG_RETN=y | 222 | CONFIG_BFIN_SCRATCH_REG_RETN=y |
| 227 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | 223 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set |
| 228 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | 224 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set |
| @@ -258,12 +254,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
| 258 | CONFIG_FLATMEM=y | 254 | CONFIG_FLATMEM=y |
| 259 | CONFIG_FLAT_NODE_MEM_MAP=y | 255 | CONFIG_FLAT_NODE_MEM_MAP=y |
| 260 | # CONFIG_SPARSEMEM_STATIC is not set | 256 | # CONFIG_SPARSEMEM_STATIC is not set |
| 257 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 261 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 258 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
| 262 | # CONFIG_RESOURCES_64BIT is not set | 259 | # CONFIG_RESOURCES_64BIT is not set |
| 263 | CONFIG_ZONE_DMA_FLAG=1 | 260 | CONFIG_ZONE_DMA_FLAG=1 |
| 264 | CONFIG_LARGE_ALLOCS=y | 261 | CONFIG_VIRT_TO_BUS=y |
| 265 | # CONFIG_BFIN_GPTIMERS is not set | 262 | # CONFIG_BFIN_GPTIMERS is not set |
| 266 | CONFIG_BFIN_DMA_5XX=y | 263 | CONFIG_BFIN_DMA_5XX=y |
| 264 | # CONFIG_DMA_UNCACHED_4M is not set | ||
| 267 | # CONFIG_DMA_UNCACHED_2M is not set | 265 | # CONFIG_DMA_UNCACHED_2M is not set |
| 268 | CONFIG_DMA_UNCACHED_1M=y | 266 | CONFIG_DMA_UNCACHED_1M=y |
| 269 | # CONFIG_DMA_UNCACHED_NONE is not set | 267 | # CONFIG_DMA_UNCACHED_NONE is not set |
| @@ -301,17 +299,13 @@ CONFIG_C_AMBEN_ALL=y | |||
| 301 | CONFIG_BANK_0=0x7BB0 | 299 | CONFIG_BANK_0=0x7BB0 |
| 302 | CONFIG_BANK_1=0x7BB0 | 300 | CONFIG_BANK_1=0x7BB0 |
| 303 | CONFIG_BANK_2=0x7BB0 | 301 | CONFIG_BANK_2=0x7BB0 |
| 304 | CONFIG_BANK_3=0x99B3 | 302 | CONFIG_BANK_3=0x99B2 |
| 305 | 303 | ||
| 306 | # | 304 | # |
| 307 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 305 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| 308 | # | 306 | # |
| 309 | # CONFIG_PCI is not set | 307 | # CONFIG_PCI is not set |
| 310 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 308 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
| 311 | |||
| 312 | # | ||
| 313 | # PCCARD (PCMCIA/CardBus) support | ||
| 314 | # | ||
| 315 | # CONFIG_PCCARD is not set | 309 | # CONFIG_PCCARD is not set |
| 316 | 310 | ||
| 317 | # | 311 | # |
| @@ -329,7 +323,9 @@ CONFIG_BINFMT_ZFLAT=y | |||
| 329 | CONFIG_PM=y | 323 | CONFIG_PM=y |
| 330 | # CONFIG_PM_LEGACY is not set | 324 | # CONFIG_PM_LEGACY is not set |
| 331 | # CONFIG_PM_DEBUG is not set | 325 | # CONFIG_PM_DEBUG is not set |
| 332 | # CONFIG_PM_SYSFS_DEPRECATED is not set | 326 | CONFIG_PM_SLEEP=y |
| 327 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
| 328 | CONFIG_SUSPEND=y | ||
| 333 | CONFIG_PM_BFIN_SLEEP_DEEPER=y | 329 | CONFIG_PM_BFIN_SLEEP_DEEPER=y |
| 334 | # CONFIG_PM_BFIN_SLEEP is not set | 330 | # CONFIG_PM_BFIN_SLEEP is not set |
| 335 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 331 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
| @@ -375,6 +371,7 @@ CONFIG_SYN_COOKIES=y | |||
| 375 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 371 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
| 376 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 372 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
| 377 | CONFIG_INET_XFRM_MODE_BEET=y | 373 | CONFIG_INET_XFRM_MODE_BEET=y |
| 374 | # CONFIG_INET_LRO is not set | ||
| 378 | CONFIG_INET_DIAG=y | 375 | CONFIG_INET_DIAG=y |
| 379 | CONFIG_INET_TCP_DIAG=y | 376 | CONFIG_INET_TCP_DIAG=y |
| 380 | # CONFIG_TCP_CONG_ADVANCED is not set | 377 | # CONFIG_TCP_CONG_ADVANCED is not set |
| @@ -401,10 +398,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
| 401 | # CONFIG_LAPB is not set | 398 | # CONFIG_LAPB is not set |
| 402 | # CONFIG_ECONET is not set | 399 | # CONFIG_ECONET is not set |
| 403 | # CONFIG_WAN_ROUTER is not set | 400 | # CONFIG_WAN_ROUTER is not set |
| 404 | |||
| 405 | # | ||
| 406 | # QoS and/or fair queueing | ||
| 407 | # | ||
| 408 | # CONFIG_NET_SCHED is not set | 401 | # CONFIG_NET_SCHED is not set |
| 409 | 402 | ||
| 410 | # | 403 | # |
| @@ -436,6 +429,10 @@ CONFIG_IRDA_CACHE_LAST_LSAP=y | |||
| 436 | # SIR device drivers | 429 | # SIR device drivers |
| 437 | # | 430 | # |
| 438 | CONFIG_IRTTY_SIR=m | 431 | CONFIG_IRTTY_SIR=m |
| 432 | CONFIG_BFIN_SIR=m | ||
| 433 | CONFIG_BFIN_SIR1=y | ||
| 434 | CONFIG_SIR_BFIN_DMA=y | ||
| 435 | # CONFIG_SIR_BFIN_PIO is not set | ||
| 439 | 436 | ||
| 440 | # | 437 | # |
| 441 | # Dongle support | 438 | # Dongle support |
| @@ -465,6 +462,7 @@ CONFIG_IRTTY_SIR=m | |||
| 465 | # CONFIG_MAC80211 is not set | 462 | # CONFIG_MAC80211 is not set |
| 466 | # CONFIG_IEEE80211 is not set | 463 | # CONFIG_IEEE80211 is not set |
| 467 | # CONFIG_RFKILL is not set | 464 | # CONFIG_RFKILL is not set |
| 465 | # CONFIG_NET_9P is not set | ||
| 468 | 466 | ||
| 469 | # | 467 | # |
| 470 | # Device Drivers | 468 | # Device Drivers |
| @@ -473,14 +471,11 @@ CONFIG_IRTTY_SIR=m | |||
| 473 | # | 471 | # |
| 474 | # Generic Driver Options | 472 | # Generic Driver Options |
| 475 | # | 473 | # |
| 474 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 476 | CONFIG_STANDALONE=y | 475 | CONFIG_STANDALONE=y |
| 477 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 476 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
| 478 | # CONFIG_FW_LOADER is not set | 477 | # CONFIG_FW_LOADER is not set |
| 479 | # CONFIG_SYS_HYPERVISOR is not set | 478 | # CONFIG_SYS_HYPERVISOR is not set |
| 480 | |||
| 481 | # | ||
| 482 | # Connector - unified userspace <-> kernelspace linker | ||
| 483 | # | ||
| 484 | # CONFIG_CONNECTOR is not set | 479 | # CONFIG_CONNECTOR is not set |
| 485 | CONFIG_MTD=y | 480 | CONFIG_MTD=y |
| 486 | # CONFIG_MTD_DEBUG is not set | 481 | # CONFIG_MTD_DEBUG is not set |
| @@ -500,6 +495,7 @@ CONFIG_MTD_BLOCK=y | |||
| 500 | # CONFIG_INFTL is not set | 495 | # CONFIG_INFTL is not set |
| 501 | # CONFIG_RFD_FTL is not set | 496 | # CONFIG_RFD_FTL is not set |
| 502 | # CONFIG_SSFDC is not set | 497 | # CONFIG_SSFDC is not set |
| 498 | # CONFIG_MTD_OOPS is not set | ||
| 503 | 499 | ||
| 504 | # | 500 | # |
| 505 | # RAM/ROM/Flash chip drivers | 501 | # RAM/ROM/Flash chip drivers |
| @@ -572,20 +568,8 @@ CONFIG_MTD_NAND_IDS=m | |||
| 572 | # UBI - Unsorted block images | 568 | # UBI - Unsorted block images |
| 573 | # | 569 | # |
| 574 | # CONFIG_MTD_UBI is not set | 570 | # CONFIG_MTD_UBI is not set |
| 575 | |||
| 576 | # | ||
| 577 | # Parallel port support | ||
| 578 | # | ||
| 579 | # CONFIG_PARPORT is not set | 571 | # CONFIG_PARPORT is not set |
| 580 | 572 | CONFIG_BLK_DEV=y | |
| 581 | # | ||
| 582 | # Plug and Play support | ||
| 583 | # | ||
| 584 | # CONFIG_PNPACPI is not set | ||
| 585 | |||
| 586 | # | ||
| 587 | # Block devices | ||
| 588 | # | ||
| 589 | # CONFIG_BLK_DEV_COW_COMMON is not set | 573 | # CONFIG_BLK_DEV_COW_COMMON is not set |
| 590 | # CONFIG_BLK_DEV_LOOP is not set | 574 | # CONFIG_BLK_DEV_LOOP is not set |
| 591 | # CONFIG_BLK_DEV_NBD is not set | 575 | # CONFIG_BLK_DEV_NBD is not set |
| @@ -595,10 +579,8 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 | |||
| 595 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 579 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
| 596 | # CONFIG_CDROM_PKTCDVD is not set | 580 | # CONFIG_CDROM_PKTCDVD is not set |
| 597 | # CONFIG_ATA_OVER_ETH is not set | 581 | # CONFIG_ATA_OVER_ETH is not set |
| 598 | 582 | CONFIG_MISC_DEVICES=y | |
| 599 | # | 583 | # CONFIG_EEPROM_93CX6 is not set |
| 600 | # Misc devices | ||
| 601 | # | ||
| 602 | # CONFIG_IDE is not set | 584 | # CONFIG_IDE is not set |
| 603 | 585 | ||
| 604 | # | 586 | # |
| @@ -606,22 +588,18 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
| 606 | # | 588 | # |
| 607 | # CONFIG_RAID_ATTRS is not set | 589 | # CONFIG_RAID_ATTRS is not set |
| 608 | # CONFIG_SCSI is not set | 590 | # CONFIG_SCSI is not set |
| 591 | # CONFIG_SCSI_DMA is not set | ||
| 609 | # CONFIG_SCSI_NETLINK is not set | 592 | # CONFIG_SCSI_NETLINK is not set |
| 610 | # CONFIG_ATA is not set | 593 | # CONFIG_ATA is not set |
| 611 | |||
| 612 | # | ||
| 613 | # Multi-device support (RAID and LVM) | ||
| 614 | # | ||
| 615 | # CONFIG_MD is not set | 594 | # CONFIG_MD is not set |
| 616 | |||
| 617 | # | ||
| 618 | # Network device support | ||
| 619 | # | ||
| 620 | CONFIG_NETDEVICES=y | 595 | CONFIG_NETDEVICES=y |
| 596 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 621 | # CONFIG_DUMMY is not set | 597 | # CONFIG_DUMMY is not set |
| 622 | # CONFIG_BONDING is not set | 598 | # CONFIG_BONDING is not set |
| 599 | # CONFIG_MACVLAN is not set | ||
| 623 | # CONFIG_EQUALIZER is not set | 600 | # CONFIG_EQUALIZER is not set |
| 624 | # CONFIG_TUN is not set | 601 | # CONFIG_TUN is not set |
| 602 | # CONFIG_VETH is not set | ||
| 625 | CONFIG_PHYLIB=y | 603 | CONFIG_PHYLIB=y |
| 626 | 604 | ||
| 627 | # | 605 | # |
| @@ -635,21 +613,24 @@ CONFIG_PHYLIB=y | |||
| 635 | # CONFIG_VITESSE_PHY is not set | 613 | # CONFIG_VITESSE_PHY is not set |
| 636 | CONFIG_SMSC_PHY=y | 614 | CONFIG_SMSC_PHY=y |
| 637 | # CONFIG_BROADCOM_PHY is not set | 615 | # CONFIG_BROADCOM_PHY is not set |
| 616 | # CONFIG_ICPLUS_PHY is not set | ||
| 638 | # CONFIG_FIXED_PHY is not set | 617 | # CONFIG_FIXED_PHY is not set |
| 639 | 618 | # CONFIG_MDIO_BITBANG is not set | |
| 640 | # | ||
| 641 | # Ethernet (10 or 100Mbit) | ||
| 642 | # | ||
| 643 | CONFIG_NET_ETHERNET=y | 619 | CONFIG_NET_ETHERNET=y |
| 644 | CONFIG_MII=y | 620 | CONFIG_MII=y |
| 645 | # CONFIG_SMC91X is not set | ||
| 646 | CONFIG_BFIN_MAC=y | 621 | CONFIG_BFIN_MAC=y |
| 647 | CONFIG_BFIN_MAC_USE_L1=y | 622 | CONFIG_BFIN_MAC_USE_L1=y |
| 648 | CONFIG_BFIN_TX_DESC_NUM=10 | 623 | CONFIG_BFIN_TX_DESC_NUM=10 |
| 649 | CONFIG_BFIN_RX_DESC_NUM=20 | 624 | CONFIG_BFIN_RX_DESC_NUM=20 |
| 650 | # CONFIG_BFIN_MAC_RMII is not set | 625 | # CONFIG_BFIN_MAC_RMII is not set |
| 626 | # CONFIG_SMC91X is not set | ||
| 651 | # CONFIG_SMSC911X is not set | 627 | # CONFIG_SMSC911X is not set |
| 652 | # CONFIG_DM9000 is not set | 628 | # CONFIG_DM9000 is not set |
| 629 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 630 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 631 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 632 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 633 | # CONFIG_B44 is not set | ||
| 653 | CONFIG_NETDEV_1000=y | 634 | CONFIG_NETDEV_1000=y |
| 654 | # CONFIG_AX88180 is not set | 635 | # CONFIG_AX88180 is not set |
| 655 | CONFIG_NETDEV_10000=y | 636 | CONFIG_NETDEV_10000=y |
| @@ -666,15 +647,7 @@ CONFIG_NETDEV_10000=y | |||
| 666 | # CONFIG_NETCONSOLE is not set | 647 | # CONFIG_NETCONSOLE is not set |
| 667 | # CONFIG_NETPOLL is not set | 648 | # CONFIG_NETPOLL is not set |
| 668 | # CONFIG_NET_POLL_CONTROLLER is not set | 649 | # CONFIG_NET_POLL_CONTROLLER is not set |
| 669 | |||
| 670 | # | ||
| 671 | # ISDN subsystem | ||
| 672 | # | ||
| 673 | # CONFIG_ISDN is not set | 650 | # CONFIG_ISDN is not set |
| 674 | |||
| 675 | # | ||
| 676 | # Telephony Support | ||
| 677 | # | ||
| 678 | # CONFIG_PHONE is not set | 651 | # CONFIG_PHONE is not set |
| 679 | 652 | ||
| 680 | # | 653 | # |
| @@ -689,7 +662,6 @@ CONFIG_INPUT=y | |||
| 689 | # | 662 | # |
| 690 | # CONFIG_INPUT_MOUSEDEV is not set | 663 | # CONFIG_INPUT_MOUSEDEV is not set |
| 691 | # CONFIG_INPUT_JOYDEV is not set | 664 | # CONFIG_INPUT_JOYDEV is not set |
| 692 | # CONFIG_INPUT_TSDEV is not set | ||
| 693 | CONFIG_INPUT_EVDEV=m | 665 | CONFIG_INPUT_EVDEV=m |
| 694 | # CONFIG_INPUT_EVBUG is not set | 666 | # CONFIG_INPUT_EVBUG is not set |
| 695 | 667 | ||
| @@ -702,14 +674,8 @@ CONFIG_INPUT_EVDEV=m | |||
| 702 | # CONFIG_INPUT_TABLET is not set | 674 | # CONFIG_INPUT_TABLET is not set |
| 703 | # CONFIG_INPUT_TOUCHSCREEN is not set | 675 | # CONFIG_INPUT_TOUCHSCREEN is not set |
| 704 | CONFIG_INPUT_MISC=y | 676 | CONFIG_INPUT_MISC=y |
| 705 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
| 706 | # CONFIG_INPUT_ATI_REMOTE2 is not set | ||
| 707 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | ||
| 708 | # CONFIG_INPUT_POWERMATE is not set | ||
| 709 | # CONFIG_INPUT_YEALINK is not set | ||
| 710 | # CONFIG_INPUT_UINPUT is not set | 677 | # CONFIG_INPUT_UINPUT is not set |
| 711 | CONFIG_TWI_KEYPAD=m | 678 | CONFIG_TWI_KEYPAD=m |
| 712 | CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72 | ||
| 713 | 679 | ||
| 714 | # | 680 | # |
| 715 | # Hardware I/O ports | 681 | # Hardware I/O ports |
| @@ -722,15 +688,13 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72 | |||
| 722 | # | 688 | # |
| 723 | # CONFIG_AD9960 is not set | 689 | # CONFIG_AD9960 is not set |
| 724 | # CONFIG_SPI_ADC_BF533 is not set | 690 | # CONFIG_SPI_ADC_BF533 is not set |
| 725 | # CONFIG_BF5xx_PFLAGS is not set | ||
| 726 | # CONFIG_BF5xx_PPIFCD is not set | 691 | # CONFIG_BF5xx_PPIFCD is not set |
| 727 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 692 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
| 728 | # CONFIG_BF5xx_PPI is not set | 693 | # CONFIG_BF5xx_PPI is not set |
| 729 | CONFIG_BFIN_SPORT=y | 694 | CONFIG_BFIN_SPORT=y |
| 730 | # CONFIG_BFIN_TIMER_LATENCY is not set | 695 | # CONFIG_BFIN_TIMER_LATENCY is not set |
| 731 | CONFIG_TWI_LCD=m | 696 | CONFIG_TWI_LCD=m |
| 732 | CONFIG_TWI_LCD_SLAVE_ADDR=34 | 697 | CONFIG_SIMPLE_GPIO=m |
| 733 | # CONFIG_AD5304 is not set | ||
| 734 | # CONFIG_VT is not set | 698 | # CONFIG_VT is not set |
| 735 | # CONFIG_SERIAL_NONSTANDARD is not set | 699 | # CONFIG_SERIAL_NONSTANDARD is not set |
| 736 | 700 | ||
| @@ -766,28 +730,11 @@ CONFIG_CAN4LINUX=y | |||
| 766 | # CONFIG_CAN_MCF5282 is not set | 730 | # CONFIG_CAN_MCF5282 is not set |
| 767 | # CONFIG_CAN_UNCTWINCAN is not set | 731 | # CONFIG_CAN_UNCTWINCAN is not set |
| 768 | CONFIG_CAN_BLACKFIN=m | 732 | CONFIG_CAN_BLACKFIN=m |
| 769 | |||
| 770 | # | ||
| 771 | # IPMI | ||
| 772 | # | ||
| 773 | # CONFIG_IPMI_HANDLER is not set | 733 | # CONFIG_IPMI_HANDLER is not set |
| 774 | CONFIG_WATCHDOG=y | ||
| 775 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 776 | |||
| 777 | # | ||
| 778 | # Watchdog Device Drivers | ||
| 779 | # | ||
| 780 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 781 | CONFIG_BFIN_WDT=y | ||
| 782 | CONFIG_HW_RANDOM=y | 734 | CONFIG_HW_RANDOM=y |
| 783 | # CONFIG_GEN_RTC is not set | 735 | # CONFIG_GEN_RTC is not set |
| 784 | CONFIG_BLACKFIN_DPMC=y | ||
| 785 | # CONFIG_R3964 is not set | 736 | # CONFIG_R3964 is not set |
| 786 | # CONFIG_RAW_DRIVER is not set | 737 | # CONFIG_RAW_DRIVER is not set |
| 787 | |||
| 788 | # | ||
| 789 | # TPM devices | ||
| 790 | # | ||
| 791 | # CONFIG_TCG_TPM is not set | 738 | # CONFIG_TCG_TPM is not set |
| 792 | CONFIG_I2C=m | 739 | CONFIG_I2C=m |
| 793 | CONFIG_I2C_BOARDINFO=y | 740 | CONFIG_I2C_BOARDINFO=y |
| @@ -809,6 +756,7 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 | |||
| 809 | # CONFIG_I2C_OCORES is not set | 756 | # CONFIG_I2C_OCORES is not set |
| 810 | # CONFIG_I2C_PARPORT_LIGHT is not set | 757 | # CONFIG_I2C_PARPORT_LIGHT is not set |
| 811 | # CONFIG_I2C_SIMTEC is not set | 758 | # CONFIG_I2C_SIMTEC is not set |
| 759 | # CONFIG_I2C_TAOS_EVM is not set | ||
| 812 | # CONFIG_I2C_STUB is not set | 760 | # CONFIG_I2C_STUB is not set |
| 813 | 761 | ||
| 814 | # | 762 | # |
| @@ -816,14 +764,15 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 | |||
| 816 | # | 764 | # |
| 817 | # CONFIG_SENSORS_DS1337 is not set | 765 | # CONFIG_SENSORS_DS1337 is not set |
| 818 | # CONFIG_SENSORS_DS1374 is not set | 766 | # CONFIG_SENSORS_DS1374 is not set |
| 767 | # CONFIG_DS1682 is not set | ||
| 819 | CONFIG_SENSORS_AD5252=m | 768 | CONFIG_SENSORS_AD5252=m |
| 820 | # CONFIG_SENSORS_EEPROM is not set | 769 | # CONFIG_SENSORS_EEPROM is not set |
| 821 | # CONFIG_SENSORS_PCF8574 is not set | 770 | # CONFIG_SENSORS_PCF8574 is not set |
| 822 | # CONFIG_SENSORS_PCF8575 is not set | 771 | # CONFIG_SENSORS_PCF8575 is not set |
| 823 | # CONFIG_SENSORS_PCA9543 is not set | ||
| 824 | # CONFIG_SENSORS_PCA9539 is not set | 772 | # CONFIG_SENSORS_PCA9539 is not set |
| 825 | # CONFIG_SENSORS_PCF8591 is not set | 773 | # CONFIG_SENSORS_PCF8591 is not set |
| 826 | # CONFIG_SENSORS_MAX6875 is not set | 774 | # CONFIG_SENSORS_MAX6875 is not set |
| 775 | # CONFIG_SENSORS_TSL2550 is not set | ||
| 827 | # CONFIG_I2C_DEBUG_CORE is not set | 776 | # CONFIG_I2C_DEBUG_CORE is not set |
| 828 | # CONFIG_I2C_DEBUG_ALGO is not set | 777 | # CONFIG_I2C_DEBUG_ALGO is not set |
| 829 | # CONFIG_I2C_DEBUG_BUS is not set | 778 | # CONFIG_I2C_DEBUG_BUS is not set |
| @@ -846,14 +795,11 @@ CONFIG_SPI_BFIN=y | |||
| 846 | # | 795 | # |
| 847 | # CONFIG_SPI_AT25 is not set | 796 | # CONFIG_SPI_AT25 is not set |
| 848 | # CONFIG_SPI_SPIDEV is not set | 797 | # CONFIG_SPI_SPIDEV is not set |
| 849 | 798 | # CONFIG_SPI_TLE62X0 is not set | |
| 850 | # | ||
| 851 | # Dallas's 1-wire bus | ||
| 852 | # | ||
| 853 | # CONFIG_W1 is not set | 799 | # CONFIG_W1 is not set |
| 800 | # CONFIG_POWER_SUPPLY is not set | ||
| 854 | CONFIG_HWMON=y | 801 | CONFIG_HWMON=y |
| 855 | # CONFIG_HWMON_VID is not set | 802 | # CONFIG_HWMON_VID is not set |
| 856 | # CONFIG_SENSORS_ABITUGURU is not set | ||
| 857 | # CONFIG_SENSORS_AD7418 is not set | 803 | # CONFIG_SENSORS_AD7418 is not set |
| 858 | # CONFIG_SENSORS_ADM1021 is not set | 804 | # CONFIG_SENSORS_ADM1021 is not set |
| 859 | # CONFIG_SENSORS_ADM1025 is not set | 805 | # CONFIG_SENSORS_ADM1025 is not set |
| @@ -861,12 +807,12 @@ CONFIG_HWMON=y | |||
| 861 | # CONFIG_SENSORS_ADM1029 is not set | 807 | # CONFIG_SENSORS_ADM1029 is not set |
| 862 | # CONFIG_SENSORS_ADM1031 is not set | 808 | # CONFIG_SENSORS_ADM1031 is not set |
| 863 | # CONFIG_SENSORS_ADM9240 is not set | 809 | # CONFIG_SENSORS_ADM9240 is not set |
| 864 | # CONFIG_SENSORS_ASB100 is not set | 810 | # CONFIG_SENSORS_ADT7470 is not set |
| 865 | # CONFIG_SENSORS_ATXP1 is not set | 811 | # CONFIG_SENSORS_ATXP1 is not set |
| 866 | # CONFIG_SENSORS_DS1621 is not set | 812 | # CONFIG_SENSORS_DS1621 is not set |
| 867 | # CONFIG_SENSORS_F71805F is not set | 813 | # CONFIG_SENSORS_F71805F is not set |
| 868 | # CONFIG_SENSORS_FSCHER is not set | 814 | # CONFIG_SENSORS_F71882FG is not set |
| 869 | # CONFIG_SENSORS_FSCPOS is not set | 815 | # CONFIG_SENSORS_F75375S is not set |
| 870 | # CONFIG_SENSORS_GL518SM is not set | 816 | # CONFIG_SENSORS_GL518SM is not set |
| 871 | # CONFIG_SENSORS_GL520SM is not set | 817 | # CONFIG_SENSORS_GL520SM is not set |
| 872 | # CONFIG_SENSORS_IT87 is not set | 818 | # CONFIG_SENSORS_IT87 is not set |
| @@ -881,13 +827,16 @@ CONFIG_HWMON=y | |||
| 881 | # CONFIG_SENSORS_LM87 is not set | 827 | # CONFIG_SENSORS_LM87 is not set |
| 882 | # CONFIG_SENSORS_LM90 is not set | 828 | # CONFIG_SENSORS_LM90 is not set |
| 883 | # CONFIG_SENSORS_LM92 is not set | 829 | # CONFIG_SENSORS_LM92 is not set |
| 830 | # CONFIG_SENSORS_LM93 is not set | ||
| 884 | # CONFIG_SENSORS_MAX1619 is not set | 831 | # CONFIG_SENSORS_MAX1619 is not set |
| 885 | # CONFIG_SENSORS_MAX6650 is not set | 832 | # CONFIG_SENSORS_MAX6650 is not set |
| 886 | # CONFIG_SENSORS_PC87360 is not set | 833 | # CONFIG_SENSORS_PC87360 is not set |
| 887 | # CONFIG_SENSORS_PC87427 is not set | 834 | # CONFIG_SENSORS_PC87427 is not set |
| 835 | # CONFIG_SENSORS_DME1737 is not set | ||
| 888 | # CONFIG_SENSORS_SMSC47M1 is not set | 836 | # CONFIG_SENSORS_SMSC47M1 is not set |
| 889 | # CONFIG_SENSORS_SMSC47M192 is not set | 837 | # CONFIG_SENSORS_SMSC47M192 is not set |
| 890 | # CONFIG_SENSORS_SMSC47B397 is not set | 838 | # CONFIG_SENSORS_SMSC47B397 is not set |
| 839 | # CONFIG_SENSORS_THMC50 is not set | ||
| 891 | # CONFIG_SENSORS_VT1211 is not set | 840 | # CONFIG_SENSORS_VT1211 is not set |
| 892 | # CONFIG_SENSORS_W83781D is not set | 841 | # CONFIG_SENSORS_W83781D is not set |
| 893 | # CONFIG_SENSORS_W83791D is not set | 842 | # CONFIG_SENSORS_W83791D is not set |
| @@ -897,6 +846,20 @@ CONFIG_HWMON=y | |||
| 897 | # CONFIG_SENSORS_W83627HF is not set | 846 | # CONFIG_SENSORS_W83627HF is not set |
| 898 | # CONFIG_SENSORS_W83627EHF is not set | 847 | # CONFIG_SENSORS_W83627EHF is not set |
| 899 | # CONFIG_HWMON_DEBUG_CHIP is not set | 848 | # CONFIG_HWMON_DEBUG_CHIP is not set |
| 849 | CONFIG_WATCHDOG=y | ||
| 850 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 851 | |||
| 852 | # | ||
| 853 | # Watchdog Device Drivers | ||
| 854 | # | ||
| 855 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 856 | CONFIG_BFIN_WDT=y | ||
| 857 | |||
| 858 | # | ||
| 859 | # Sonics Silicon Backplane | ||
| 860 | # | ||
| 861 | CONFIG_SSB_POSSIBLE=y | ||
| 862 | # CONFIG_SSB is not set | ||
| 900 | 863 | ||
| 901 | # | 864 | # |
| 902 | # Multifunction device drivers | 865 | # Multifunction device drivers |
| @@ -913,21 +876,15 @@ CONFIG_DAB=y | |||
| 913 | # | 876 | # |
| 914 | # Graphics support | 877 | # Graphics support |
| 915 | # | 878 | # |
| 916 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 917 | CONFIG_BACKLIGHT_CLASS_DEVICE=m | ||
| 918 | CONFIG_LCD_CLASS_DEVICE=m | ||
| 919 | |||
| 920 | # | ||
| 921 | # Display device support | ||
| 922 | # | ||
| 923 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 924 | # CONFIG_VGASTATE is not set | 879 | # CONFIG_VGASTATE is not set |
| 880 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 925 | CONFIG_FB=m | 881 | CONFIG_FB=m |
| 926 | CONFIG_FIRMWARE_EDID=y | 882 | CONFIG_FIRMWARE_EDID=y |
| 927 | # CONFIG_FB_DDC is not set | 883 | # CONFIG_FB_DDC is not set |
| 928 | CONFIG_FB_CFB_FILLRECT=m | 884 | CONFIG_FB_CFB_FILLRECT=m |
| 929 | CONFIG_FB_CFB_COPYAREA=m | 885 | CONFIG_FB_CFB_COPYAREA=m |
| 930 | CONFIG_FB_CFB_IMAGEBLIT=m | 886 | CONFIG_FB_CFB_IMAGEBLIT=m |
| 887 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
| 931 | # CONFIG_FB_SYS_FILLRECT is not set | 888 | # CONFIG_FB_SYS_FILLRECT is not set |
| 932 | # CONFIG_FB_SYS_COPYAREA is not set | 889 | # CONFIG_FB_SYS_COPYAREA is not set |
| 933 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 890 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
| @@ -942,7 +899,8 @@ CONFIG_FB_DEFERRED_IO=y | |||
| 942 | # | 899 | # |
| 943 | # Frame buffer hardware drivers | 900 | # Frame buffer hardware drivers |
| 944 | # | 901 | # |
| 945 | CONFIG_FB_BFIN_7171=m | 902 | # CONFIG_FB_HITACHI_TX09 is not set |
| 903 | # CONFIG_FB_BFIN_T350MCQB is not set | ||
| 946 | CONFIG_FB_BFIN_7393=m | 904 | CONFIG_FB_BFIN_7393=m |
| 947 | CONFIG_NTSC=y | 905 | CONFIG_NTSC=y |
| 948 | # CONFIG_PAL is not set | 906 | # CONFIG_PAL is not set |
| @@ -956,10 +914,18 @@ CONFIG_FB_BF537_LQ035=m | |||
| 956 | CONFIG_LQ035_SLAVE_ADDR=0x58 | 914 | CONFIG_LQ035_SLAVE_ADDR=0x58 |
| 957 | # CONFIG_FB_BFIN_LANDSCAPE is not set | 915 | # CONFIG_FB_BFIN_LANDSCAPE is not set |
| 958 | # CONFIG_FB_BFIN_BGR is not set | 916 | # CONFIG_FB_BFIN_BGR is not set |
| 959 | # CONFIG_FB_BFIN_T350MCQB is not set | ||
| 960 | # CONFIG_FB_HITACHI_TX09 is not set | ||
| 961 | # CONFIG_FB_S1D13XXX is not set | 917 | # CONFIG_FB_S1D13XXX is not set |
| 962 | # CONFIG_FB_VIRTUAL is not set | 918 | # CONFIG_FB_VIRTUAL is not set |
| 919 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
| 920 | CONFIG_LCD_CLASS_DEVICE=m | ||
| 921 | # CONFIG_LCD_LTV350QV is not set | ||
| 922 | CONFIG_BACKLIGHT_CLASS_DEVICE=m | ||
| 923 | CONFIG_BACKLIGHT_CORGI=m | ||
| 924 | |||
| 925 | # | ||
| 926 | # Display device support | ||
| 927 | # | ||
| 928 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 963 | # CONFIG_LOGO is not set | 929 | # CONFIG_LOGO is not set |
| 964 | 930 | ||
| 965 | # | 931 | # |
| @@ -993,6 +959,10 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
| 993 | # CONFIG_SND_MPU401 is not set | 959 | # CONFIG_SND_MPU401 is not set |
| 994 | 960 | ||
| 995 | # | 961 | # |
| 962 | # SPI devices | ||
| 963 | # | ||
| 964 | |||
| 965 | # | ||
| 996 | # ALSA Blackfin devices | 966 | # ALSA Blackfin devices |
| 997 | # | 967 | # |
| 998 | CONFIG_SND_BLACKFIN_AD1836=m | 968 | CONFIG_SND_BLACKFIN_AD1836=m |
| @@ -1005,6 +975,10 @@ CONFIG_SND_BLACKFIN_SPI_PFBIT=4 | |||
| 1005 | CONFIG_SND_BFIN_AD73311=m | 975 | CONFIG_SND_BFIN_AD73311=m |
| 1006 | CONFIG_SND_BFIN_SPORT=0 | 976 | CONFIG_SND_BFIN_SPORT=0 |
| 1007 | CONFIG_SND_BFIN_AD73311_SE=4 | 977 | CONFIG_SND_BFIN_AD73311_SE=4 |
| 978 | CONFIG_SND_BFIN_AD73322=m | ||
| 979 | CONFIG_SND_BFIN_AD73322_SPORT0_SE=10 | ||
| 980 | CONFIG_SND_BFIN_AD73322_SPORT1_SE=14 | ||
| 981 | CONFIG_SND_BFIN_AD73322_RESET=12 | ||
| 1008 | 982 | ||
| 1009 | # | 983 | # |
| 1010 | # System on Chip audio support | 984 | # System on Chip audio support |
| @@ -1016,9 +990,14 @@ CONFIG_SND_MMAP_SUPPORT=y | |||
| 1016 | CONFIG_SND_BF5XX_SOC_AC97=m | 990 | CONFIG_SND_BF5XX_SOC_AC97=m |
| 1017 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set | 991 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set |
| 1018 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set | 992 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set |
| 993 | # CONFIG_SND_BF5XX_SOC_SSM2602 is not set | ||
| 1019 | CONFIG_SND_BF5XX_SOC_BF5xx=m | 994 | CONFIG_SND_BF5XX_SOC_BF5xx=m |
| 1020 | CONFIG_SND_BF5XX_SPORT_NUM=0 | 995 | CONFIG_SND_BF5XX_SPORT_NUM=0 |
| 1021 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | 996 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set |
| 997 | |||
| 998 | # | ||
| 999 | # SoC Audio support for SuperH | ||
| 1000 | # | ||
| 1022 | CONFIG_SND_SOC_AD1980=m | 1001 | CONFIG_SND_SOC_AD1980=m |
| 1023 | 1002 | ||
| 1024 | # | 1003 | # |
| @@ -1026,59 +1005,18 @@ CONFIG_SND_SOC_AD1980=m | |||
| 1026 | # | 1005 | # |
| 1027 | # CONFIG_SOUND_PRIME is not set | 1006 | # CONFIG_SOUND_PRIME is not set |
| 1028 | CONFIG_AC97_BUS=m | 1007 | CONFIG_AC97_BUS=m |
| 1029 | 1008 | CONFIG_HID_SUPPORT=y | |
| 1030 | # | ||
| 1031 | # HID Devices | ||
| 1032 | # | ||
| 1033 | CONFIG_HID=y | 1009 | CONFIG_HID=y |
| 1034 | # CONFIG_HID_DEBUG is not set | 1010 | # CONFIG_HID_DEBUG is not set |
| 1035 | 1011 | # CONFIG_HIDRAW is not set | |
| 1036 | # | 1012 | # CONFIG_USB_SUPPORT is not set |
| 1037 | # USB support | 1013 | # CONFIG_NO_DUMMY_DELAY is not set |
| 1038 | # | 1014 | # CONFIG_DUMMY_DELAY_BANK0 is not set |
| 1039 | CONFIG_USB_ARCH_HAS_HCD=y | 1015 | # CONFIG_DUMMY_DELAY_BANK1 is not set |
| 1040 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 1016 | # CONFIG_DUMMY_DELAY_BANK2 is not set |
| 1041 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 1017 | # CONFIG_DUMMY_DELAY_BANK3 is not set |
| 1042 | # CONFIG_USB is not set | ||
| 1043 | |||
| 1044 | # | ||
| 1045 | # Enable Host or Gadget support to see Inventra options | ||
| 1046 | # | ||
| 1047 | |||
| 1048 | # | ||
| 1049 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 1050 | # | ||
| 1051 | |||
| 1052 | # | ||
| 1053 | # USB Gadget Support | ||
| 1054 | # | ||
| 1055 | # CONFIG_USB_GADGET is not set | ||
| 1056 | # CONFIG_MMC is not set | 1018 | # CONFIG_MMC is not set |
| 1057 | |||
| 1058 | # | ||
| 1059 | # LED devices | ||
| 1060 | # | ||
| 1061 | # CONFIG_NEW_LEDS is not set | 1019 | # CONFIG_NEW_LEDS is not set |
| 1062 | |||
| 1063 | # | ||
| 1064 | # LED drivers | ||
| 1065 | # | ||
| 1066 | |||
| 1067 | # | ||
| 1068 | # LED Triggers | ||
| 1069 | # | ||
| 1070 | |||
| 1071 | # | ||
| 1072 | # InfiniBand support | ||
| 1073 | # | ||
| 1074 | |||
| 1075 | # | ||
| 1076 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
| 1077 | # | ||
| 1078 | |||
| 1079 | # | ||
| 1080 | # Real Time Clock | ||
| 1081 | # | ||
| 1082 | CONFIG_RTC_LIB=y | 1020 | CONFIG_RTC_LIB=y |
| 1083 | CONFIG_RTC_CLASS=y | 1021 | CONFIG_RTC_CLASS=y |
| 1084 | CONFIG_RTC_HCTOSYS=y | 1022 | CONFIG_RTC_HCTOSYS=y |
| @@ -1098,6 +1036,7 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1098 | # I2C RTC drivers | 1036 | # I2C RTC drivers |
| 1099 | # | 1037 | # |
| 1100 | # CONFIG_RTC_DRV_DS1307 is not set | 1038 | # CONFIG_RTC_DRV_DS1307 is not set |
| 1039 | # CONFIG_RTC_DRV_DS1374 is not set | ||
| 1101 | # CONFIG_RTC_DRV_DS1672 is not set | 1040 | # CONFIG_RTC_DRV_DS1672 is not set |
| 1102 | # CONFIG_RTC_DRV_MAX6900 is not set | 1041 | # CONFIG_RTC_DRV_MAX6900 is not set |
| 1103 | # CONFIG_RTC_DRV_RS5C372 is not set | 1042 | # CONFIG_RTC_DRV_RS5C372 is not set |
| @@ -1105,6 +1044,7 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1105 | # CONFIG_RTC_DRV_X1205 is not set | 1044 | # CONFIG_RTC_DRV_X1205 is not set |
| 1106 | # CONFIG_RTC_DRV_PCF8563 is not set | 1045 | # CONFIG_RTC_DRV_PCF8563 is not set |
| 1107 | # CONFIG_RTC_DRV_PCF8583 is not set | 1046 | # CONFIG_RTC_DRV_PCF8583 is not set |
| 1047 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 1108 | 1048 | ||
| 1109 | # | 1049 | # |
| 1110 | # SPI RTC drivers | 1050 | # SPI RTC drivers |
| @@ -1116,8 +1056,10 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1116 | # Platform RTC drivers | 1056 | # Platform RTC drivers |
| 1117 | # | 1057 | # |
| 1118 | # CONFIG_RTC_DRV_DS1553 is not set | 1058 | # CONFIG_RTC_DRV_DS1553 is not set |
| 1059 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 1119 | # CONFIG_RTC_DRV_DS1742 is not set | 1060 | # CONFIG_RTC_DRV_DS1742 is not set |
| 1120 | # CONFIG_RTC_DRV_M48T86 is not set | 1061 | # CONFIG_RTC_DRV_M48T86 is not set |
| 1062 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 1121 | # CONFIG_RTC_DRV_V3020 is not set | 1063 | # CONFIG_RTC_DRV_V3020 is not set |
| 1122 | 1064 | ||
| 1123 | # | 1065 | # |
| @@ -1126,22 +1068,9 @@ CONFIG_RTC_INTF_DEV=y | |||
| 1126 | CONFIG_RTC_DRV_BFIN=y | 1068 | CONFIG_RTC_DRV_BFIN=y |
| 1127 | 1069 | ||
| 1128 | # | 1070 | # |
| 1129 | # DMA Engine support | 1071 | # Userspace I/O |
| 1130 | # | 1072 | # |
| 1131 | # CONFIG_DMA_ENGINE is not set | 1073 | # CONFIG_UIO is not set |
| 1132 | |||
| 1133 | # | ||
| 1134 | # DMA Clients | ||
| 1135 | # | ||
| 1136 | |||
| 1137 | # | ||
| 1138 | # DMA Devices | ||
| 1139 | # | ||
| 1140 | |||
| 1141 | # | ||
| 1142 | # PBX support | ||
| 1143 | # | ||
| 1144 | # CONFIG_PBX is not set | ||
| 1145 | 1074 | ||
| 1146 | # | 1075 | # |
| 1147 | # File systems | 1076 | # File systems |
| @@ -1186,7 +1115,6 @@ CONFIG_PROC_SYSCTL=y | |||
| 1186 | CONFIG_SYSFS=y | 1115 | CONFIG_SYSFS=y |
| 1187 | # CONFIG_TMPFS is not set | 1116 | # CONFIG_TMPFS is not set |
| 1188 | # CONFIG_HUGETLB_PAGE is not set | 1117 | # CONFIG_HUGETLB_PAGE is not set |
| 1189 | CONFIG_RAMFS=y | ||
| 1190 | # CONFIG_CONFIGFS_FS is not set | 1118 | # CONFIG_CONFIGFS_FS is not set |
| 1191 | 1119 | ||
| 1192 | # | 1120 | # |
| @@ -1212,10 +1140,12 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | |||
| 1212 | CONFIG_JFFS2_FS=m | 1140 | CONFIG_JFFS2_FS=m |
| 1213 | CONFIG_JFFS2_FS_DEBUG=0 | 1141 | CONFIG_JFFS2_FS_DEBUG=0 |
| 1214 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 1142 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
| 1143 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
| 1215 | # CONFIG_JFFS2_SUMMARY is not set | 1144 | # CONFIG_JFFS2_SUMMARY is not set |
| 1216 | # CONFIG_JFFS2_FS_XATTR is not set | 1145 | # CONFIG_JFFS2_FS_XATTR is not set |
| 1217 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 1146 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
| 1218 | CONFIG_JFFS2_ZLIB=y | 1147 | CONFIG_JFFS2_ZLIB=y |
| 1148 | # CONFIG_JFFS2_LZO is not set | ||
| 1219 | CONFIG_JFFS2_RTIME=y | 1149 | CONFIG_JFFS2_RTIME=y |
| 1220 | # CONFIG_JFFS2_RUBIN is not set | 1150 | # CONFIG_JFFS2_RUBIN is not set |
| 1221 | # CONFIG_CRAMFS is not set | 1151 | # CONFIG_CRAMFS is not set |
| @@ -1224,10 +1154,7 @@ CONFIG_JFFS2_RTIME=y | |||
| 1224 | # CONFIG_QNX4FS_FS is not set | 1154 | # CONFIG_QNX4FS_FS is not set |
| 1225 | # CONFIG_SYSV_FS is not set | 1155 | # CONFIG_SYSV_FS is not set |
| 1226 | # CONFIG_UFS_FS is not set | 1156 | # CONFIG_UFS_FS is not set |
| 1227 | 1157 | CONFIG_NETWORK_FILESYSTEMS=y | |
| 1228 | # | ||
| 1229 | # Network File Systems | ||
| 1230 | # | ||
| 1231 | CONFIG_NFS_FS=m | 1158 | CONFIG_NFS_FS=m |
| 1232 | CONFIG_NFS_V3=y | 1159 | CONFIG_NFS_V3=y |
| 1233 | # CONFIG_NFS_V3_ACL is not set | 1160 | # CONFIG_NFS_V3_ACL is not set |
| @@ -1247,17 +1174,12 @@ CONFIG_SMB_FS=m | |||
| 1247 | # CONFIG_NCP_FS is not set | 1174 | # CONFIG_NCP_FS is not set |
| 1248 | # CONFIG_CODA_FS is not set | 1175 | # CONFIG_CODA_FS is not set |
| 1249 | # CONFIG_AFS_FS is not set | 1176 | # CONFIG_AFS_FS is not set |
| 1250 | # CONFIG_9P_FS is not set | ||
| 1251 | 1177 | ||
| 1252 | # | 1178 | # |
| 1253 | # Partition Types | 1179 | # Partition Types |
| 1254 | # | 1180 | # |
| 1255 | # CONFIG_PARTITION_ADVANCED is not set | 1181 | # CONFIG_PARTITION_ADVANCED is not set |
| 1256 | CONFIG_MSDOS_PARTITION=y | 1182 | CONFIG_MSDOS_PARTITION=y |
| 1257 | |||
| 1258 | # | ||
| 1259 | # Native Language Support | ||
| 1260 | # | ||
| 1261 | CONFIG_NLS=m | 1183 | CONFIG_NLS=m |
| 1262 | CONFIG_NLS_DEFAULT="iso8859-1" | 1184 | CONFIG_NLS_DEFAULT="iso8859-1" |
| 1263 | # CONFIG_NLS_CODEPAGE_437 is not set | 1185 | # CONFIG_NLS_CODEPAGE_437 is not set |
| @@ -1298,21 +1220,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
| 1298 | # CONFIG_NLS_KOI8_R is not set | 1220 | # CONFIG_NLS_KOI8_R is not set |
| 1299 | # CONFIG_NLS_KOI8_U is not set | 1221 | # CONFIG_NLS_KOI8_U is not set |
| 1300 | # CONFIG_NLS_UTF8 is not set | 1222 | # CONFIG_NLS_UTF8 is not set |
| 1301 | |||
| 1302 | # | ||
| 1303 | # Distributed Lock Manager | ||
| 1304 | # | ||
| 1305 | # CONFIG_DLM is not set | 1223 | # CONFIG_DLM is not set |
| 1306 | 1224 | CONFIG_INSTRUMENTATION=y | |
| 1307 | # | ||
| 1308 | # Profiling support | ||
| 1309 | # | ||
| 1310 | # CONFIG_PROFILING is not set | 1225 | # CONFIG_PROFILING is not set |
| 1226 | # CONFIG_MARKERS is not set | ||
| 1311 | 1227 | ||
| 1312 | # | 1228 | # |
| 1313 | # Kernel hacking | 1229 | # Kernel hacking |
| 1314 | # | 1230 | # |
| 1315 | # CONFIG_PRINTK_TIME is not set | 1231 | # CONFIG_PRINTK_TIME is not set |
| 1232 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1316 | CONFIG_ENABLE_MUST_CHECK=y | 1233 | CONFIG_ENABLE_MUST_CHECK=y |
| 1317 | # CONFIG_MAGIC_SYSRQ is not set | 1234 | # CONFIG_MAGIC_SYSRQ is not set |
| 1318 | # CONFIG_UNUSED_SYMBOLS is not set | 1235 | # CONFIG_UNUSED_SYMBOLS is not set |
| @@ -1320,6 +1237,7 @@ CONFIG_DEBUG_FS=y | |||
| 1320 | # CONFIG_HEADERS_CHECK is not set | 1237 | # CONFIG_HEADERS_CHECK is not set |
| 1321 | # CONFIG_DEBUG_KERNEL is not set | 1238 | # CONFIG_DEBUG_KERNEL is not set |
| 1322 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1239 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 1240 | # CONFIG_SAMPLES is not set | ||
| 1323 | CONFIG_DEBUG_MMRS=y | 1241 | CONFIG_DEBUG_MMRS=y |
| 1324 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 1242 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 1325 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 1243 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| @@ -1339,11 +1257,7 @@ CONFIG_ACCESS_CHECK=y | |||
| 1339 | # CONFIG_KEYS is not set | 1257 | # CONFIG_KEYS is not set |
| 1340 | CONFIG_SECURITY=y | 1258 | CONFIG_SECURITY=y |
| 1341 | # CONFIG_SECURITY_NETWORK is not set | 1259 | # CONFIG_SECURITY_NETWORK is not set |
| 1342 | CONFIG_SECURITY_CAPABILITIES=m | 1260 | # CONFIG_SECURITY_CAPABILITIES is not set |
| 1343 | |||
| 1344 | # | ||
| 1345 | # Cryptographic options | ||
| 1346 | # | ||
| 1347 | # CONFIG_CRYPTO is not set | 1261 | # CONFIG_CRYPTO is not set |
| 1348 | 1262 | ||
| 1349 | # | 1263 | # |
| @@ -1354,6 +1268,7 @@ CONFIG_CRC_CCITT=m | |||
| 1354 | # CONFIG_CRC16 is not set | 1268 | # CONFIG_CRC16 is not set |
| 1355 | # CONFIG_CRC_ITU_T is not set | 1269 | # CONFIG_CRC_ITU_T is not set |
| 1356 | CONFIG_CRC32=y | 1270 | CONFIG_CRC32=y |
| 1271 | # CONFIG_CRC7 is not set | ||
| 1357 | # CONFIG_LIBCRC32C is not set | 1272 | # CONFIG_LIBCRC32C is not set |
| 1358 | CONFIG_ZLIB_INFLATE=y | 1273 | CONFIG_ZLIB_INFLATE=y |
| 1359 | CONFIG_ZLIB_DEFLATE=m | 1274 | CONFIG_ZLIB_DEFLATE=m |
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index 1ff2ff4b49aa..390669e8668e 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
| @@ -365,7 +365,7 @@ CONFIG_C_AMBEN_ALL=y | |||
| 365 | CONFIG_BANK_0=0x7BB0 | 365 | CONFIG_BANK_0=0x7BB0 |
| 366 | CONFIG_BANK_1=0x5554 | 366 | CONFIG_BANK_1=0x5554 |
| 367 | CONFIG_BANK_2=0x7BB0 | 367 | CONFIG_BANK_2=0x7BB0 |
| 368 | CONFIG_BANK_3=0x99B3 | 368 | CONFIG_BANK_3=0x99B2 |
| 369 | CONFIG_EBIU_MBSCTLVAL=0x0 | 369 | CONFIG_EBIU_MBSCTLVAL=0x0 |
| 370 | CONFIG_EBIU_MODEVAL=0x1 | 370 | CONFIG_EBIU_MODEVAL=0x1 |
| 371 | CONFIG_EBIU_FCTLVAL=0x6 | 371 | CONFIG_EBIU_FCTLVAL=0x6 |
| @@ -468,7 +468,60 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
| 468 | # | 468 | # |
| 469 | # CONFIG_NET_PKTGEN is not set | 469 | # CONFIG_NET_PKTGEN is not set |
| 470 | # CONFIG_HAMRADIO is not set | 470 | # CONFIG_HAMRADIO is not set |
| 471 | # CONFIG_IRDA is not set | 471 | CONFIG_IRDA=m |
| 472 | |||
| 473 | # | ||
| 474 | # IrDA protocols | ||
| 475 | # | ||
| 476 | CONFIG_IRLAN=m | ||
| 477 | CONFIG_IRCOMM=m | ||
| 478 | # CONFIG_IRDA_ULTRA is not set | ||
| 479 | |||
| 480 | # | ||
| 481 | # IrDA options | ||
| 482 | # | ||
| 483 | # CONFIG_IRDA_CACHE_LAST_LSAP is not set | ||
| 484 | # CONFIG_IRDA_FAST_RR is not set | ||
| 485 | # CONFIG_IRDA_DEBUG is not set | ||
| 486 | |||
| 487 | # | ||
| 488 | # Infrared-port device drivers | ||
| 489 | # | ||
| 490 | |||
| 491 | # | ||
| 492 | # SIR device drivers | ||
| 493 | # | ||
| 494 | CONFIG_IRTTY_SIR=m | ||
| 495 | CONFIG_BFIN_SIR=m | ||
| 496 | # CONFIG_BFIN_SIR0 is not set | ||
| 497 | # CONFIG_BFIN_SIR2 is not set | ||
| 498 | CONFIG_BFIN_SIR3=y | ||
| 499 | CONFIG_SIR_BFIN_DMA=y | ||
| 500 | # CONFIG_SIR_BFIN_PIO is not set | ||
| 501 | |||
| 502 | # | ||
| 503 | # Dongle support | ||
| 504 | # | ||
| 505 | # CONFIG_DONGLE is not set | ||
| 506 | # CONFIG_KINGSUN_DONGLE is not set | ||
| 507 | # CONFIG_KSDAZZLE_DONGLE is not set | ||
| 508 | # CONFIG_KS959_DONGLE is not set | ||
| 509 | |||
| 510 | # | ||
| 511 | # Old SIR device drivers | ||
| 512 | # | ||
| 513 | # CONFIG_IRPORT_SIR is not set | ||
| 514 | |||
| 515 | # | ||
| 516 | # Old Serial dongle support | ||
| 517 | # | ||
| 518 | |||
| 519 | # | ||
| 520 | # FIR device drivers | ||
| 521 | # | ||
| 522 | # CONFIG_USB_IRDA is not set | ||
| 523 | # CONFIG_SIGMATEL_FIR is not set | ||
| 524 | # CONFIG_MCS_FIR is not set | ||
| 472 | # CONFIG_BT is not set | 525 | # CONFIG_BT is not set |
| 473 | # CONFIG_AF_RXRPC is not set | 526 | # CONFIG_AF_RXRPC is not set |
| 474 | 527 | ||
| @@ -575,6 +628,7 @@ CONFIG_MTD_NAND=y | |||
| 575 | CONFIG_MTD_NAND_IDS=y | 628 | CONFIG_MTD_NAND_IDS=y |
| 576 | CONFIG_MTD_NAND_BF5XX=y | 629 | CONFIG_MTD_NAND_BF5XX=y |
| 577 | CONFIG_MTD_NAND_BF5XX_HWECC=y | 630 | CONFIG_MTD_NAND_BF5XX_HWECC=y |
| 631 | # CONFIG_MTD_NAND_BF5XX_BOOTROM_ECC is not set | ||
| 578 | # CONFIG_MTD_NAND_DISKONCHIP is not set | 632 | # CONFIG_MTD_NAND_DISKONCHIP is not set |
| 579 | # CONFIG_MTD_NAND_NANDSIM is not set | 633 | # CONFIG_MTD_NAND_NANDSIM is not set |
| 580 | # CONFIG_MTD_NAND_PLATFORM is not set | 634 | # CONFIG_MTD_NAND_PLATFORM is not set |
| @@ -766,7 +820,7 @@ CONFIG_BFIN_OTP=y | |||
| 766 | # CONFIG_BFIN_SPORT is not set | 820 | # CONFIG_BFIN_SPORT is not set |
| 767 | # CONFIG_BFIN_TIMER_LATENCY is not set | 821 | # CONFIG_BFIN_TIMER_LATENCY is not set |
| 768 | # CONFIG_TWI_LCD is not set | 822 | # CONFIG_TWI_LCD is not set |
| 769 | # CONFIG_SIMPLE_GPIO is not set | 823 | CONFIG_SIMPLE_GPIO=m |
| 770 | CONFIG_VT=y | 824 | CONFIG_VT=y |
| 771 | CONFIG_VT_CONSOLE=y | 825 | CONFIG_VT_CONSOLE=y |
| 772 | CONFIG_HW_CONSOLE=y | 826 | CONFIG_HW_CONSOLE=y |
| @@ -1071,6 +1125,7 @@ CONFIG_SND_BF5XX_SOC_AC97=y | |||
| 1071 | CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y | 1125 | CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y |
| 1072 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set | 1126 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set |
| 1073 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set | 1127 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set |
| 1128 | # CONFIG_SND_BF5XX_SOC_SSM2602 is not set | ||
| 1074 | CONFIG_SND_BF5XX_SPORT_NUM=0 | 1129 | CONFIG_SND_BF5XX_SPORT_NUM=0 |
| 1075 | CONFIG_SND_BF5XX_HAVE_COLD_RESET=y | 1130 | CONFIG_SND_BF5XX_HAVE_COLD_RESET=y |
| 1076 | CONFIG_SND_BF5XX_RESET_GPIO_NUM=19 | 1131 | CONFIG_SND_BF5XX_RESET_GPIO_NUM=19 |
| @@ -1133,7 +1188,7 @@ CONFIG_USB_MUSB_HOST=y | |||
| 1133 | # CONFIG_USB_MUSB_OTG is not set | 1188 | # CONFIG_USB_MUSB_OTG is not set |
| 1134 | CONFIG_USB_MUSB_HDRC_HCD=y | 1189 | CONFIG_USB_MUSB_HDRC_HCD=y |
| 1135 | # CONFIG_MUSB_PIO_ONLY is not set | 1190 | # CONFIG_MUSB_PIO_ONLY is not set |
| 1136 | # CONFIG_USB_INVENTRA_DMA is not set | 1191 | CONFIG_USB_INVENTRA_DMA=y |
| 1137 | # CONFIG_USB_TI_CPPI_DMA is not set | 1192 | # CONFIG_USB_TI_CPPI_DMA is not set |
| 1138 | CONFIG_USB_MUSB_LOGLEVEL=0 | 1193 | CONFIG_USB_MUSB_LOGLEVEL=0 |
| 1139 | 1194 | ||
| @@ -1312,7 +1367,7 @@ CONFIG_FS_MBCACHE=y | |||
| 1312 | CONFIG_INOTIFY=y | 1367 | CONFIG_INOTIFY=y |
| 1313 | CONFIG_INOTIFY_USER=y | 1368 | CONFIG_INOTIFY_USER=y |
| 1314 | # CONFIG_QUOTA is not set | 1369 | # CONFIG_QUOTA is not set |
| 1315 | CONFIG_DNOTIFY=y | 1370 | # CONFIG_DNOTIFY is not set |
| 1316 | # CONFIG_AUTOFS_FS is not set | 1371 | # CONFIG_AUTOFS_FS is not set |
| 1317 | # CONFIG_AUTOFS4_FS is not set | 1372 | # CONFIG_AUTOFS4_FS is not set |
| 1318 | # CONFIG_FUSE_FS is not set | 1373 | # CONFIG_FUSE_FS is not set |
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig index b4a20c890816..976a4d7ba175 100644 --- a/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT_defconfig | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.22.16 | 3 | # Linux kernel version: 2.6.24.7 |
| 4 | # | 4 | # |
| 5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
| 6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
| @@ -13,35 +13,34 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
| 13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
| 14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
| 15 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
| 16 | CONFIG_GENERIC_TIME=y | ||
| 17 | CONFIG_GENERIC_GPIO=y | 16 | CONFIG_GENERIC_GPIO=y |
| 18 | CONFIG_FORCE_MAX_ZONEORDER=14 | 17 | CONFIG_FORCE_MAX_ZONEORDER=14 |
| 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 18 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
| 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
| 21 | 20 | ||
| 22 | # | 21 | # |
| 23 | # Code maturity level options | 22 | # General setup |
| 24 | # | 23 | # |
| 25 | CONFIG_EXPERIMENTAL=y | 24 | CONFIG_EXPERIMENTAL=y |
| 26 | CONFIG_BROKEN_ON_SMP=y | 25 | CONFIG_BROKEN_ON_SMP=y |
| 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 26 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
| 28 | |||
| 29 | # | ||
| 30 | # General setup | ||
| 31 | # | ||
| 32 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
| 33 | CONFIG_LOCALVERSION_AUTO=y | 28 | CONFIG_LOCALVERSION_AUTO=y |
| 34 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
| 35 | # CONFIG_IPC_NS is not set | ||
| 36 | CONFIG_SYSVIPC_SYSCTL=y | 30 | CONFIG_SYSVIPC_SYSCTL=y |
| 37 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
| 38 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
| 39 | # CONFIG_TASKSTATS is not set | 33 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 34 | # CONFIG_USER_NS is not set |
| 35 | # CONFIG_PID_NS is not set | ||
| 41 | # CONFIG_AUDIT is not set | 36 | # CONFIG_AUDIT is not set |
| 42 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
| 44 | CONFIG_LOG_BUF_SHIFT=14 | 39 | CONFIG_LOG_BUF_SHIFT=14 |
| 40 | # CONFIG_CGROUPS is not set | ||
| 41 | CONFIG_FAIR_GROUP_SCHED=y | ||
| 42 | CONFIG_FAIR_USER_SCHED=y | ||
| 43 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
| 45 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_SYSFS_DEPRECATED=y |
| 46 | # CONFIG_RELAY is not set | 45 | # CONFIG_RELAY is not set |
| 47 | CONFIG_BLK_DEV_INITRD=y | 46 | CONFIG_BLK_DEV_INITRD=y |
| @@ -64,32 +63,24 @@ CONFIG_EPOLL=y | |||
| 64 | CONFIG_SIGNALFD=y | 63 | CONFIG_SIGNALFD=y |
| 65 | CONFIG_EVENTFD=y | 64 | CONFIG_EVENTFD=y |
| 66 | CONFIG_VM_EVENT_COUNTERS=y | 65 | CONFIG_VM_EVENT_COUNTERS=y |
| 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
| 68 | # CONFIG_NP2 is not set | ||
| 69 | CONFIG_SLAB=y | 66 | CONFIG_SLAB=y |
| 70 | # CONFIG_SLUB is not set | 67 | # CONFIG_SLUB is not set |
| 71 | # CONFIG_SLOB is not set | 68 | # CONFIG_SLOB is not set |
| 69 | CONFIG_SLABINFO=y | ||
| 72 | CONFIG_RT_MUTEXES=y | 70 | CONFIG_RT_MUTEXES=y |
| 73 | CONFIG_TINY_SHMEM=y | 71 | CONFIG_TINY_SHMEM=y |
| 74 | CONFIG_BASE_SMALL=0 | 72 | CONFIG_BASE_SMALL=0 |
| 75 | |||
| 76 | # | ||
| 77 | # Loadable module support | ||
| 78 | # | ||
| 79 | CONFIG_MODULES=y | 73 | CONFIG_MODULES=y |
| 80 | CONFIG_MODULE_UNLOAD=y | 74 | CONFIG_MODULE_UNLOAD=y |
| 81 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 75 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
| 82 | # CONFIG_MODVERSIONS is not set | 76 | # CONFIG_MODVERSIONS is not set |
| 83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 77 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
| 84 | CONFIG_KMOD=y | 78 | CONFIG_KMOD=y |
| 85 | |||
| 86 | # | ||
| 87 | # Block layer | ||
| 88 | # | ||
| 89 | CONFIG_BLOCK=y | 79 | CONFIG_BLOCK=y |
| 90 | # CONFIG_LBD is not set | 80 | # CONFIG_LBD is not set |
| 91 | # CONFIG_BLK_DEV_IO_TRACE is not set | 81 | # CONFIG_BLK_DEV_IO_TRACE is not set |
| 92 | # CONFIG_LSF is not set | 82 | # CONFIG_LSF is not set |
| 83 | # CONFIG_BLK_DEV_BSG is not set | ||
| 93 | 84 | ||
| 94 | # | 85 | # |
| 95 | # IO Schedulers | 86 | # IO Schedulers |
| @@ -140,7 +131,6 @@ CONFIG_BF_REV_0_3=y | |||
| 140 | # CONFIG_BF_REV_0_5 is not set | 131 | # CONFIG_BF_REV_0_5 is not set |
| 141 | # CONFIG_BF_REV_ANY is not set | 132 | # CONFIG_BF_REV_ANY is not set |
| 142 | # CONFIG_BF_REV_NONE is not set | 133 | # CONFIG_BF_REV_NONE is not set |
| 143 | CONFIG_BFIN_DUAL_CORE=y | ||
| 144 | CONFIG_MEM_MT48LC16M16A2TG_75=y | 134 | CONFIG_MEM_MT48LC16M16A2TG_75=y |
| 145 | CONFIG_IRQ_PLL_WAKEUP=7 | 135 | CONFIG_IRQ_PLL_WAKEUP=7 |
| 146 | CONFIG_IRQ_SPORT0_ERROR=7 | 136 | CONFIG_IRQ_SPORT0_ERROR=7 |
| @@ -233,12 +223,14 @@ CONFIG_IRQ_WDTIMER=13 | |||
| 233 | # Board customizations | 223 | # Board customizations |
| 234 | # | 224 | # |
| 235 | # CONFIG_CMDLINE_BOOL is not set | 225 | # CONFIG_CMDLINE_BOOL is not set |
| 226 | CONFIG_BOOT_LOAD=0x1000 | ||
| 236 | 227 | ||
| 237 | # | 228 | # |
| 238 | # Clock/PLL Setup | 229 | # Clock/PLL Setup |
| 239 | # | 230 | # |
| 240 | CONFIG_CLKIN_HZ=30000000 | 231 | CONFIG_CLKIN_HZ=30000000 |
| 241 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 232 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
| 233 | CONFIG_MAX_MEM_SIZE=512 | ||
| 242 | CONFIG_MAX_VCO_HZ=600000000 | 234 | CONFIG_MAX_VCO_HZ=600000000 |
| 243 | CONFIG_MIN_VCO_HZ=50000000 | 235 | CONFIG_MIN_VCO_HZ=50000000 |
| 244 | CONFIG_MAX_SCLK_HZ=133333333 | 236 | CONFIG_MAX_SCLK_HZ=133333333 |
| @@ -252,13 +244,17 @@ CONFIG_HZ_250=y | |||
| 252 | # CONFIG_HZ_300 is not set | 244 | # CONFIG_HZ_300 is not set |
| 253 | # CONFIG_HZ_1000 is not set | 245 | # CONFIG_HZ_1000 is not set |
| 254 | CONFIG_HZ=250 | 246 | CONFIG_HZ=250 |
| 247 | CONFIG_GENERIC_TIME=y | ||
| 248 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 249 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
| 250 | CONFIG_TICK_ONESHOT=y | ||
| 251 | # CONFIG_NO_HZ is not set | ||
| 252 | CONFIG_HIGH_RES_TIMERS=y | ||
| 253 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 255 | 254 | ||
| 256 | # | 255 | # |
| 257 | # Memory Setup | 256 | # Misc |
| 258 | # | 257 | # |
| 259 | CONFIG_MAX_MEM_SIZE=512 | ||
| 260 | CONFIG_MEM_ADD_WIDTH=9 | ||
| 261 | CONFIG_BOOT_LOAD=0x1000 | ||
| 262 | CONFIG_BFIN_SCRATCH_REG_RETN=y | 258 | CONFIG_BFIN_SCRATCH_REG_RETN=y |
| 263 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | 259 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set |
| 264 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | 260 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set |
| @@ -294,12 +290,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
| 294 | CONFIG_FLATMEM=y | 290 | CONFIG_FLATMEM=y |
| 295 | CONFIG_FLAT_NODE_MEM_MAP=y | 291 | CONFIG_FLAT_NODE_MEM_MAP=y |
| 296 | # CONFIG_SPARSEMEM_STATIC is not set | 292 | # CONFIG_SPARSEMEM_STATIC is not set |
| 293 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 297 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 294 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
| 298 | # CONFIG_RESOURCES_64BIT is not set | 295 | # CONFIG_RESOURCES_64BIT is not set |
| 299 | CONFIG_ZONE_DMA_FLAG=1 | 296 | CONFIG_ZONE_DMA_FLAG=1 |
| 300 | CONFIG_LARGE_ALLOCS=y | 297 | CONFIG_VIRT_TO_BUS=y |
| 301 | # CONFIG_BFIN_GPTIMERS is not set | 298 | # CONFIG_BFIN_GPTIMERS is not set |
| 302 | CONFIG_BFIN_DMA_5XX=y | 299 | CONFIG_BFIN_DMA_5XX=y |
| 300 | # CONFIG_DMA_UNCACHED_4M is not set | ||
| 303 | # CONFIG_DMA_UNCACHED_2M is not set | 301 | # CONFIG_DMA_UNCACHED_2M is not set |
| 304 | CONFIG_DMA_UNCACHED_1M=y | 302 | CONFIG_DMA_UNCACHED_1M=y |
| 305 | # CONFIG_DMA_UNCACHED_NONE is not set | 303 | # CONFIG_DMA_UNCACHED_NONE is not set |
| @@ -341,17 +339,13 @@ CONFIG_C_AMBEN_ALL=y | |||
| 341 | CONFIG_BANK_0=0x7BB0 | 339 | CONFIG_BANK_0=0x7BB0 |
| 342 | CONFIG_BANK_1=0x7BB0 | 340 | CONFIG_BANK_1=0x7BB0 |
| 343 | CONFIG_BANK_2=0x7BB0 | 341 | CONFIG_BANK_2=0x7BB0 |
| 344 | CONFIG_BANK_3=0xAAC3 | 342 | CONFIG_BANK_3=0xAAC2 |
| 345 | 343 | ||
| 346 | # | 344 | # |
| 347 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 345 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| 348 | # | 346 | # |
| 349 | # CONFIG_PCI is not set | 347 | # CONFIG_PCI is not set |
| 350 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 348 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
| 351 | |||
| 352 | # | ||
| 353 | # PCCARD (PCMCIA/CardBus) support | ||
| 354 | # | ||
| 355 | # CONFIG_PCCARD is not set | 349 | # CONFIG_PCCARD is not set |
| 356 | 350 | ||
| 357 | # | 351 | # |
| @@ -367,9 +361,15 @@ CONFIG_BINFMT_ZFLAT=y | |||
| 367 | # Power management options | 361 | # Power management options |
| 368 | # | 362 | # |
| 369 | # CONFIG_PM is not set | 363 | # CONFIG_PM is not set |
| 364 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
| 370 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 365 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
| 371 | 366 | ||
| 372 | # | 367 | # |
| 368 | # CPU Frequency scaling | ||
| 369 | # | ||
| 370 | # CONFIG_CPU_FREQ is not set | ||
| 371 | |||
| 372 | # | ||
| 373 | # Networking | 373 | # Networking |
| 374 | # | 374 | # |
| 375 | CONFIG_NET=y | 375 | CONFIG_NET=y |
| @@ -405,6 +405,7 @@ CONFIG_SYN_COOKIES=y | |||
| 405 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 405 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
| 406 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 406 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
| 407 | CONFIG_INET_XFRM_MODE_BEET=y | 407 | CONFIG_INET_XFRM_MODE_BEET=y |
| 408 | # CONFIG_INET_LRO is not set | ||
| 408 | CONFIG_INET_DIAG=y | 409 | CONFIG_INET_DIAG=y |
| 409 | CONFIG_INET_TCP_DIAG=y | 410 | CONFIG_INET_TCP_DIAG=y |
| 410 | # CONFIG_TCP_CONG_ADVANCED is not set | 411 | # CONFIG_TCP_CONG_ADVANCED is not set |
| @@ -431,10 +432,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
| 431 | # CONFIG_LAPB is not set | 432 | # CONFIG_LAPB is not set |
| 432 | # CONFIG_ECONET is not set | 433 | # CONFIG_ECONET is not set |
| 433 | # CONFIG_WAN_ROUTER is not set | 434 | # CONFIG_WAN_ROUTER is not set |
| 434 | |||
| 435 | # | ||
| 436 | # QoS and/or fair queueing | ||
| 437 | # | ||
| 438 | # CONFIG_NET_SCHED is not set | 435 | # CONFIG_NET_SCHED is not set |
| 439 | 436 | ||
| 440 | # | 437 | # |
| @@ -466,6 +463,7 @@ CONFIG_IRDA_CACHE_LAST_LSAP=y | |||
| 466 | # SIR device drivers | 463 | # SIR device drivers |
| 467 | # | 464 | # |
| 468 | CONFIG_IRTTY_SIR=m | 465 | CONFIG_IRTTY_SIR=m |
| 466 | # CONFIG_BFIN_SIR is not set | ||
| 469 | 467 | ||
| 470 | # | 468 | # |
| 471 | # Dongle support | 469 | # Dongle support |
| @@ -495,6 +493,7 @@ CONFIG_IRTTY_SIR=m | |||
| 495 | # CONFIG_MAC80211 is not set | 493 | # CONFIG_MAC80211 is not set |
| 496 | # CONFIG_IEEE80211 is not set | 494 | # CONFIG_IEEE80211 is not set |
| 497 | # CONFIG_RFKILL is not set | 495 | # CONFIG_RFKILL is not set |
| 496 | # CONFIG_NET_9P is not set | ||
| 498 | 497 | ||
| 499 | # | 498 | # |
| 500 | # Device Drivers | 499 | # Device Drivers |
| @@ -503,14 +502,11 @@ CONFIG_IRTTY_SIR=m | |||
| 503 | # | 502 | # |
| 504 | # Generic Driver Options | 503 | # Generic Driver Options |
| 505 | # | 504 | # |
| 505 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 506 | CONFIG_STANDALONE=y | 506 | CONFIG_STANDALONE=y |
| 507 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 507 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
| 508 | # CONFIG_FW_LOADER is not set | 508 | # CONFIG_FW_LOADER is not set |
| 509 | # CONFIG_SYS_HYPERVISOR is not set | 509 | # CONFIG_SYS_HYPERVISOR is not set |
| 510 | |||
| 511 | # | ||
| 512 | # Connector - unified userspace <-> kernelspace linker | ||
| 513 | # | ||
| 514 | # CONFIG_CONNECTOR is not set | 510 | # CONFIG_CONNECTOR is not set |
| 515 | CONFIG_MTD=y | 511 | CONFIG_MTD=y |
| 516 | # CONFIG_MTD_DEBUG is not set | 512 | # CONFIG_MTD_DEBUG is not set |
| @@ -530,6 +526,7 @@ CONFIG_MTD_BLOCK=y | |||
| 530 | # CONFIG_INFTL is not set | 526 | # CONFIG_INFTL is not set |
| 531 | # CONFIG_RFD_FTL is not set | 527 | # CONFIG_RFD_FTL is not set |
| 532 | # CONFIG_SSFDC is not set | 528 | # CONFIG_SSFDC is not set |
| 529 | # CONFIG_MTD_OOPS is not set | ||
| 533 | 530 | ||
| 534 | # | 531 | # |
| 535 | # RAM/ROM/Flash chip drivers | 532 | # RAM/ROM/Flash chip drivers |
| @@ -590,20 +587,8 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | |||
| 590 | # UBI - Unsorted block images | 587 | # UBI - Unsorted block images |
| 591 | # | 588 | # |
| 592 | # CONFIG_MTD_UBI is not set | 589 | # CONFIG_MTD_UBI is not set |
| 593 | |||
| 594 | # | ||
| 595 | # Parallel port support | ||
| 596 | # | ||
| 597 | # CONFIG_PARPORT is not set | 590 | # CONFIG_PARPORT is not set |
| 598 | 591 | CONFIG_BLK_DEV=y | |
| 599 | # | ||
| 600 | # Plug and Play support | ||
| 601 | # | ||
| 602 | # CONFIG_PNPACPI is not set | ||
| 603 | |||
| 604 | # | ||
| 605 | # Block devices | ||
| 606 | # | ||
| 607 | # CONFIG_BLK_DEV_COW_COMMON is not set | 592 | # CONFIG_BLK_DEV_COW_COMMON is not set |
| 608 | # CONFIG_BLK_DEV_LOOP is not set | 593 | # CONFIG_BLK_DEV_LOOP is not set |
| 609 | # CONFIG_BLK_DEV_NBD is not set | 594 | # CONFIG_BLK_DEV_NBD is not set |
| @@ -613,10 +598,8 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 | |||
| 613 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 598 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
| 614 | # CONFIG_CDROM_PKTCDVD is not set | 599 | # CONFIG_CDROM_PKTCDVD is not set |
| 615 | # CONFIG_ATA_OVER_ETH is not set | 600 | # CONFIG_ATA_OVER_ETH is not set |
| 616 | 601 | CONFIG_MISC_DEVICES=y | |
| 617 | # | 602 | # CONFIG_EEPROM_93CX6 is not set |
| 618 | # Misc devices | ||
| 619 | # | ||
| 620 | # CONFIG_IDE is not set | 603 | # CONFIG_IDE is not set |
| 621 | 604 | ||
| 622 | # | 605 | # |
| @@ -624,32 +607,29 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
| 624 | # | 607 | # |
| 625 | # CONFIG_RAID_ATTRS is not set | 608 | # CONFIG_RAID_ATTRS is not set |
| 626 | # CONFIG_SCSI is not set | 609 | # CONFIG_SCSI is not set |
| 610 | # CONFIG_SCSI_DMA is not set | ||
| 627 | # CONFIG_SCSI_NETLINK is not set | 611 | # CONFIG_SCSI_NETLINK is not set |
| 628 | # CONFIG_ATA is not set | 612 | # CONFIG_ATA is not set |
| 629 | |||
| 630 | # | ||
| 631 | # Multi-device support (RAID and LVM) | ||
| 632 | # | ||
| 633 | # CONFIG_MD is not set | 613 | # CONFIG_MD is not set |
| 634 | |||
| 635 | # | ||
| 636 | # Network device support | ||
| 637 | # | ||
| 638 | CONFIG_NETDEVICES=y | 614 | CONFIG_NETDEVICES=y |
| 615 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 639 | # CONFIG_DUMMY is not set | 616 | # CONFIG_DUMMY is not set |
| 640 | # CONFIG_BONDING is not set | 617 | # CONFIG_BONDING is not set |
| 618 | # CONFIG_MACVLAN is not set | ||
| 641 | # CONFIG_EQUALIZER is not set | 619 | # CONFIG_EQUALIZER is not set |
| 642 | # CONFIG_TUN is not set | 620 | # CONFIG_TUN is not set |
| 621 | # CONFIG_VETH is not set | ||
| 643 | # CONFIG_PHYLIB is not set | 622 | # CONFIG_PHYLIB is not set |
| 644 | |||
| 645 | # | ||
| 646 | # Ethernet (10 or 100Mbit) | ||
| 647 | # | ||
| 648 | CONFIG_NET_ETHERNET=y | 623 | CONFIG_NET_ETHERNET=y |
| 649 | CONFIG_MII=y | 624 | CONFIG_MII=y |
| 650 | CONFIG_SMC91X=y | 625 | CONFIG_SMC91X=y |
| 651 | # CONFIG_SMSC911X is not set | 626 | # CONFIG_SMSC911X is not set |
| 652 | # CONFIG_DM9000 is not set | 627 | # CONFIG_DM9000 is not set |
| 628 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 629 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 630 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 631 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 632 | # CONFIG_B44 is not set | ||
| 653 | CONFIG_NETDEV_1000=y | 633 | CONFIG_NETDEV_1000=y |
| 654 | # CONFIG_AX88180 is not set | 634 | # CONFIG_AX88180 is not set |
| 655 | CONFIG_NETDEV_10000=y | 635 | CONFIG_NETDEV_10000=y |
| @@ -666,15 +646,7 @@ CONFIG_NETDEV_10000=y | |||
| 666 | # CONFIG_NETCONSOLE is not set | 646 | # CONFIG_NETCONSOLE is not set |
| 667 | # CONFIG_NETPOLL is not set | 647 | # CONFIG_NETPOLL is not set |
| 668 | # CONFIG_NET_POLL_CONTROLLER is not set | 648 | # CONFIG_NET_POLL_CONTROLLER is not set |
| 669 | |||
| 670 | # | ||
| 671 | # ISDN subsystem | ||
| 672 | # | ||
| 673 | # CONFIG_ISDN is not set | 649 | # CONFIG_ISDN is not set |
| 674 | |||
| 675 | # | ||
| 676 | # Telephony Support | ||
| 677 | # | ||
| 678 | # CONFIG_PHONE is not set | 650 | # CONFIG_PHONE is not set |
| 679 | 651 | ||
| 680 | # | 652 | # |
| @@ -689,7 +661,6 @@ CONFIG_INPUT=m | |||
| 689 | # | 661 | # |
| 690 | # CONFIG_INPUT_MOUSEDEV is not set | 662 | # CONFIG_INPUT_MOUSEDEV is not set |
| 691 | # CONFIG_INPUT_JOYDEV is not set | 663 | # CONFIG_INPUT_JOYDEV is not set |
| 692 | # CONFIG_INPUT_TSDEV is not set | ||
| 693 | CONFIG_INPUT_EVDEV=m | 664 | CONFIG_INPUT_EVDEV=m |
| 694 | # CONFIG_INPUT_EVBUG is not set | 665 | # CONFIG_INPUT_EVBUG is not set |
| 695 | 666 | ||
| @@ -714,13 +685,12 @@ CONFIG_INPUT_EVDEV=m | |||
| 714 | # | 685 | # |
| 715 | # CONFIG_AD9960 is not set | 686 | # CONFIG_AD9960 is not set |
| 716 | # CONFIG_SPI_ADC_BF533 is not set | 687 | # CONFIG_SPI_ADC_BF533 is not set |
| 717 | # CONFIG_BF5xx_PFLAGS is not set | ||
| 718 | # CONFIG_BF5xx_PPIFCD is not set | 688 | # CONFIG_BF5xx_PPIFCD is not set |
| 719 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 689 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
| 720 | # CONFIG_BF5xx_PPI is not set | 690 | # CONFIG_BF5xx_PPI is not set |
| 721 | # CONFIG_BFIN_SPORT is not set | 691 | # CONFIG_BFIN_SPORT is not set |
| 722 | # CONFIG_BFIN_TIMER_LATENCY is not set | 692 | # CONFIG_BFIN_TIMER_LATENCY is not set |
| 723 | # CONFIG_AD5304 is not set | 693 | CONFIG_SIMPLE_GPIO=m |
| 724 | # CONFIG_VT is not set | 694 | # CONFIG_VT is not set |
| 725 | # CONFIG_SERIAL_NONSTANDARD is not set | 695 | # CONFIG_SERIAL_NONSTANDARD is not set |
| 726 | 696 | ||
| @@ -748,27 +718,11 @@ CONFIG_UNIX98_PTYS=y | |||
| 748 | # CAN, the car bus and industrial fieldbus | 718 | # CAN, the car bus and industrial fieldbus |
| 749 | # | 719 | # |
| 750 | # CONFIG_CAN4LINUX is not set | 720 | # CONFIG_CAN4LINUX is not set |
| 751 | |||
| 752 | # | ||
| 753 | # IPMI | ||
| 754 | # | ||
| 755 | # CONFIG_IPMI_HANDLER is not set | 721 | # CONFIG_IPMI_HANDLER is not set |
| 756 | CONFIG_WATCHDOG=y | ||
| 757 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 758 | |||
| 759 | # | ||
| 760 | # Watchdog Device Drivers | ||
| 761 | # | ||
| 762 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 763 | CONFIG_BFIN_WDT=y | ||
| 764 | CONFIG_HW_RANDOM=y | 722 | CONFIG_HW_RANDOM=y |
| 765 | # CONFIG_GEN_RTC is not set | 723 | # CONFIG_GEN_RTC is not set |
| 766 | # CONFIG_R3964 is not set | 724 | # CONFIG_R3964 is not set |
| 767 | # CONFIG_RAW_DRIVER is not set | 725 | # CONFIG_RAW_DRIVER is not set |
| 768 | |||
| 769 | # | ||
| 770 | # TPM devices | ||
| 771 | # | ||
| 772 | # CONFIG_TCG_TPM is not set | 726 | # CONFIG_TCG_TPM is not set |
| 773 | # CONFIG_I2C is not set | 727 | # CONFIG_I2C is not set |
| 774 | 728 | ||
| @@ -789,22 +743,37 @@ CONFIG_SPI_BFIN=y | |||
| 789 | # | 743 | # |
| 790 | # CONFIG_SPI_AT25 is not set | 744 | # CONFIG_SPI_AT25 is not set |
| 791 | # CONFIG_SPI_SPIDEV is not set | 745 | # CONFIG_SPI_SPIDEV is not set |
| 792 | 746 | # CONFIG_SPI_TLE62X0 is not set | |
| 793 | # | ||
| 794 | # Dallas's 1-wire bus | ||
| 795 | # | ||
| 796 | # CONFIG_W1 is not set | 747 | # CONFIG_W1 is not set |
| 748 | # CONFIG_POWER_SUPPLY is not set | ||
| 797 | CONFIG_HWMON=y | 749 | CONFIG_HWMON=y |
| 798 | # CONFIG_HWMON_VID is not set | 750 | # CONFIG_HWMON_VID is not set |
| 799 | # CONFIG_SENSORS_ABITUGURU is not set | ||
| 800 | # CONFIG_SENSORS_F71805F is not set | 751 | # CONFIG_SENSORS_F71805F is not set |
| 752 | # CONFIG_SENSORS_F71882FG is not set | ||
| 753 | # CONFIG_SENSORS_IT87 is not set | ||
| 801 | # CONFIG_SENSORS_LM70 is not set | 754 | # CONFIG_SENSORS_LM70 is not set |
| 755 | # CONFIG_SENSORS_PC87360 is not set | ||
| 802 | # CONFIG_SENSORS_PC87427 is not set | 756 | # CONFIG_SENSORS_PC87427 is not set |
| 803 | # CONFIG_SENSORS_SMSC47M1 is not set | 757 | # CONFIG_SENSORS_SMSC47M1 is not set |
| 804 | # CONFIG_SENSORS_SMSC47B397 is not set | 758 | # CONFIG_SENSORS_SMSC47B397 is not set |
| 805 | # CONFIG_SENSORS_VT1211 is not set | 759 | # CONFIG_SENSORS_VT1211 is not set |
| 806 | # CONFIG_SENSORS_W83627HF is not set | 760 | # CONFIG_SENSORS_W83627HF is not set |
| 761 | # CONFIG_SENSORS_W83627EHF is not set | ||
| 807 | # CONFIG_HWMON_DEBUG_CHIP is not set | 762 | # CONFIG_HWMON_DEBUG_CHIP is not set |
| 763 | CONFIG_WATCHDOG=y | ||
| 764 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 765 | |||
| 766 | # | ||
| 767 | # Watchdog Device Drivers | ||
| 768 | # | ||
| 769 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 770 | CONFIG_BFIN_WDT=y | ||
| 771 | |||
| 772 | # | ||
| 773 | # Sonics Silicon Backplane | ||
| 774 | # | ||
| 775 | CONFIG_SSB_POSSIBLE=y | ||
| 776 | # CONFIG_SSB is not set | ||
| 808 | 777 | ||
| 809 | # | 778 | # |
| 810 | # Multifunction device drivers | 779 | # Multifunction device drivers |
| @@ -821,91 +790,33 @@ CONFIG_DAB=y | |||
| 821 | # | 790 | # |
| 822 | # Graphics support | 791 | # Graphics support |
| 823 | # | 792 | # |
| 793 | # CONFIG_VGASTATE is not set | ||
| 794 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 795 | # CONFIG_FB is not set | ||
| 824 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 796 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
| 825 | 797 | ||
| 826 | # | 798 | # |
| 827 | # Display device support | 799 | # Display device support |
| 828 | # | 800 | # |
| 829 | # CONFIG_DISPLAY_SUPPORT is not set | 801 | # CONFIG_DISPLAY_SUPPORT is not set |
| 830 | # CONFIG_VGASTATE is not set | ||
| 831 | # CONFIG_FB is not set | ||
| 832 | 802 | ||
| 833 | # | 803 | # |
| 834 | # Sound | 804 | # Sound |
| 835 | # | 805 | # |
| 836 | # CONFIG_SOUND is not set | 806 | # CONFIG_SOUND is not set |
| 837 | 807 | CONFIG_HID_SUPPORT=y | |
| 838 | # | ||
| 839 | # HID Devices | ||
| 840 | # | ||
| 841 | CONFIG_HID=m | 808 | CONFIG_HID=m |
| 842 | # CONFIG_HID_DEBUG is not set | 809 | # CONFIG_HID_DEBUG is not set |
| 843 | 810 | # CONFIG_HIDRAW is not set | |
| 844 | # | 811 | # CONFIG_USB_SUPPORT is not set |
| 845 | # USB support | ||
| 846 | # | ||
| 847 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 848 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 849 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
| 850 | # CONFIG_USB is not set | ||
| 851 | |||
| 852 | # | ||
| 853 | # Enable Host or Gadget support to see Inventra options | ||
| 854 | # | ||
| 855 | |||
| 856 | # | ||
| 857 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 858 | # | ||
| 859 | |||
| 860 | # | ||
| 861 | # USB Gadget Support | ||
| 862 | # | ||
| 863 | # CONFIG_USB_GADGET is not set | ||
| 864 | # CONFIG_MMC is not set | 812 | # CONFIG_MMC is not set |
| 865 | |||
| 866 | # | ||
| 867 | # LED devices | ||
| 868 | # | ||
| 869 | # CONFIG_NEW_LEDS is not set | 813 | # CONFIG_NEW_LEDS is not set |
| 870 | |||
| 871 | # | ||
| 872 | # LED drivers | ||
| 873 | # | ||
| 874 | |||
| 875 | # | ||
| 876 | # LED Triggers | ||
| 877 | # | ||
| 878 | |||
| 879 | # | ||
| 880 | # InfiniBand support | ||
| 881 | # | ||
| 882 | |||
| 883 | # | ||
| 884 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
| 885 | # | ||
| 886 | |||
| 887 | # | ||
| 888 | # Real Time Clock | ||
| 889 | # | ||
| 890 | # CONFIG_RTC_CLASS is not set | 814 | # CONFIG_RTC_CLASS is not set |
| 891 | 815 | ||
| 892 | # | 816 | # |
| 893 | # DMA Engine support | 817 | # Userspace I/O |
| 894 | # | ||
| 895 | # CONFIG_DMA_ENGINE is not set | ||
| 896 | |||
| 897 | # | ||
| 898 | # DMA Clients | ||
| 899 | # | ||
| 900 | |||
| 901 | # | ||
| 902 | # DMA Devices | ||
| 903 | # | 818 | # |
| 904 | 819 | # CONFIG_UIO is not set | |
| 905 | # | ||
| 906 | # PBX support | ||
| 907 | # | ||
| 908 | # CONFIG_PBX is not set | ||
| 909 | 820 | ||
| 910 | # | 821 | # |
| 911 | # File systems | 822 | # File systems |
| @@ -950,7 +861,6 @@ CONFIG_PROC_SYSCTL=y | |||
| 950 | CONFIG_SYSFS=y | 861 | CONFIG_SYSFS=y |
| 951 | # CONFIG_TMPFS is not set | 862 | # CONFIG_TMPFS is not set |
| 952 | # CONFIG_HUGETLB_PAGE is not set | 863 | # CONFIG_HUGETLB_PAGE is not set |
| 953 | CONFIG_RAMFS=y | ||
| 954 | # CONFIG_CONFIGFS_FS is not set | 864 | # CONFIG_CONFIGFS_FS is not set |
| 955 | 865 | ||
| 956 | # | 866 | # |
| @@ -976,10 +886,12 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | |||
| 976 | CONFIG_JFFS2_FS=m | 886 | CONFIG_JFFS2_FS=m |
| 977 | CONFIG_JFFS2_FS_DEBUG=0 | 887 | CONFIG_JFFS2_FS_DEBUG=0 |
| 978 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 888 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
| 889 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
| 979 | # CONFIG_JFFS2_SUMMARY is not set | 890 | # CONFIG_JFFS2_SUMMARY is not set |
| 980 | # CONFIG_JFFS2_FS_XATTR is not set | 891 | # CONFIG_JFFS2_FS_XATTR is not set |
| 981 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 892 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
| 982 | CONFIG_JFFS2_ZLIB=y | 893 | CONFIG_JFFS2_ZLIB=y |
| 894 | # CONFIG_JFFS2_LZO is not set | ||
| 983 | CONFIG_JFFS2_RTIME=y | 895 | CONFIG_JFFS2_RTIME=y |
| 984 | # CONFIG_JFFS2_RUBIN is not set | 896 | # CONFIG_JFFS2_RUBIN is not set |
| 985 | # CONFIG_CRAMFS is not set | 897 | # CONFIG_CRAMFS is not set |
| @@ -988,10 +900,7 @@ CONFIG_JFFS2_RTIME=y | |||
| 988 | # CONFIG_QNX4FS_FS is not set | 900 | # CONFIG_QNX4FS_FS is not set |
| 989 | # CONFIG_SYSV_FS is not set | 901 | # CONFIG_SYSV_FS is not set |
| 990 | # CONFIG_UFS_FS is not set | 902 | # CONFIG_UFS_FS is not set |
| 991 | 903 | CONFIG_NETWORK_FILESYSTEMS=y | |
| 992 | # | ||
| 993 | # Network File Systems | ||
| 994 | # | ||
| 995 | CONFIG_NFS_FS=m | 904 | CONFIG_NFS_FS=m |
| 996 | CONFIG_NFS_V3=y | 905 | CONFIG_NFS_V3=y |
| 997 | # CONFIG_NFS_V3_ACL is not set | 906 | # CONFIG_NFS_V3_ACL is not set |
| @@ -1011,17 +920,12 @@ CONFIG_SMB_FS=m | |||
| 1011 | # CONFIG_NCP_FS is not set | 920 | # CONFIG_NCP_FS is not set |
| 1012 | # CONFIG_CODA_FS is not set | 921 | # CONFIG_CODA_FS is not set |
| 1013 | # CONFIG_AFS_FS is not set | 922 | # CONFIG_AFS_FS is not set |
| 1014 | # CONFIG_9P_FS is not set | ||
| 1015 | 923 | ||
| 1016 | # | 924 | # |
| 1017 | # Partition Types | 925 | # Partition Types |
| 1018 | # | 926 | # |
| 1019 | # CONFIG_PARTITION_ADVANCED is not set | 927 | # CONFIG_PARTITION_ADVANCED is not set |
| 1020 | CONFIG_MSDOS_PARTITION=y | 928 | CONFIG_MSDOS_PARTITION=y |
| 1021 | |||
| 1022 | # | ||
| 1023 | # Native Language Support | ||
| 1024 | # | ||
| 1025 | CONFIG_NLS=m | 929 | CONFIG_NLS=m |
| 1026 | CONFIG_NLS_DEFAULT="iso8859-1" | 930 | CONFIG_NLS_DEFAULT="iso8859-1" |
| 1027 | # CONFIG_NLS_CODEPAGE_437 is not set | 931 | # CONFIG_NLS_CODEPAGE_437 is not set |
| @@ -1062,21 +966,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
| 1062 | # CONFIG_NLS_KOI8_R is not set | 966 | # CONFIG_NLS_KOI8_R is not set |
| 1063 | # CONFIG_NLS_KOI8_U is not set | 967 | # CONFIG_NLS_KOI8_U is not set |
| 1064 | # CONFIG_NLS_UTF8 is not set | 968 | # CONFIG_NLS_UTF8 is not set |
| 1065 | |||
| 1066 | # | ||
| 1067 | # Distributed Lock Manager | ||
| 1068 | # | ||
| 1069 | # CONFIG_DLM is not set | 969 | # CONFIG_DLM is not set |
| 1070 | 970 | CONFIG_INSTRUMENTATION=y | |
| 1071 | # | ||
| 1072 | # Profiling support | ||
| 1073 | # | ||
| 1074 | # CONFIG_PROFILING is not set | 971 | # CONFIG_PROFILING is not set |
| 972 | # CONFIG_MARKERS is not set | ||
| 1075 | 973 | ||
| 1076 | # | 974 | # |
| 1077 | # Kernel hacking | 975 | # Kernel hacking |
| 1078 | # | 976 | # |
| 1079 | # CONFIG_PRINTK_TIME is not set | 977 | # CONFIG_PRINTK_TIME is not set |
| 978 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1080 | CONFIG_ENABLE_MUST_CHECK=y | 979 | CONFIG_ENABLE_MUST_CHECK=y |
| 1081 | # CONFIG_MAGIC_SYSRQ is not set | 980 | # CONFIG_MAGIC_SYSRQ is not set |
| 1082 | # CONFIG_UNUSED_SYMBOLS is not set | 981 | # CONFIG_UNUSED_SYMBOLS is not set |
| @@ -1084,6 +983,7 @@ CONFIG_DEBUG_FS=y | |||
| 1084 | # CONFIG_HEADERS_CHECK is not set | 983 | # CONFIG_HEADERS_CHECK is not set |
| 1085 | # CONFIG_DEBUG_KERNEL is not set | 984 | # CONFIG_DEBUG_KERNEL is not set |
| 1086 | # CONFIG_DEBUG_BUGVERBOSE is not set | 985 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 986 | # CONFIG_SAMPLES is not set | ||
| 1087 | CONFIG_DEBUG_MMRS=y | 987 | CONFIG_DEBUG_MMRS=y |
| 1088 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 988 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 1089 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 989 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| @@ -1104,11 +1004,7 @@ CONFIG_ACCESS_CHECK=y | |||
| 1104 | # CONFIG_KEYS is not set | 1004 | # CONFIG_KEYS is not set |
| 1105 | CONFIG_SECURITY=y | 1005 | CONFIG_SECURITY=y |
| 1106 | # CONFIG_SECURITY_NETWORK is not set | 1006 | # CONFIG_SECURITY_NETWORK is not set |
| 1107 | CONFIG_SECURITY_CAPABILITIES=m | 1007 | # CONFIG_SECURITY_CAPABILITIES is not set |
| 1108 | |||
| 1109 | # | ||
| 1110 | # Cryptographic options | ||
| 1111 | # | ||
| 1112 | # CONFIG_CRYPTO is not set | 1008 | # CONFIG_CRYPTO is not set |
| 1113 | 1009 | ||
| 1114 | # | 1010 | # |
| @@ -1119,6 +1015,7 @@ CONFIG_CRC_CCITT=m | |||
| 1119 | # CONFIG_CRC16 is not set | 1015 | # CONFIG_CRC16 is not set |
| 1120 | # CONFIG_CRC_ITU_T is not set | 1016 | # CONFIG_CRC_ITU_T is not set |
| 1121 | CONFIG_CRC32=y | 1017 | CONFIG_CRC32=y |
| 1018 | # CONFIG_CRC7 is not set | ||
| 1122 | # CONFIG_LIBCRC32C is not set | 1019 | # CONFIG_LIBCRC32C is not set |
| 1123 | CONFIG_ZLIB_INFLATE=y | 1020 | CONFIG_ZLIB_INFLATE=y |
| 1124 | CONFIG_ZLIB_DEFLATE=m | 1021 | CONFIG_ZLIB_DEFLATE=m |
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig new file mode 100644 index 000000000000..0799aa9bba9d --- /dev/null +++ b/arch/blackfin/configs/CM-BF527_defconfig | |||
| @@ -0,0 +1,1185 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.24.7 | ||
| 4 | # Fri Jul 18 18:00:41 2008 | ||
| 5 | # | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_FPU is not set | ||
| 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 9 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 10 | CONFIG_BLACKFIN=y | ||
| 11 | CONFIG_ZONE_DMA=y | ||
| 12 | CONFIG_SEMAPHORE_SLEEPERS=y | ||
| 13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 14 | CONFIG_GENERIC_HWEIGHT=y | ||
| 15 | CONFIG_GENERIC_HARDIRQS=y | ||
| 16 | CONFIG_GENERIC_IRQ_PROBE=y | ||
| 17 | CONFIG_GENERIC_GPIO=y | ||
| 18 | CONFIG_FORCE_MAX_ZONEORDER=14 | ||
| 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 21 | |||
| 22 | # | ||
| 23 | # General setup | ||
| 24 | # | ||
| 25 | CONFIG_EXPERIMENTAL=y | ||
| 26 | CONFIG_BROKEN_ON_SMP=y | ||
| 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 28 | CONFIG_LOCALVERSION="" | ||
| 29 | CONFIG_LOCALVERSION_AUTO=y | ||
| 30 | CONFIG_SYSVIPC=y | ||
| 31 | CONFIG_SYSVIPC_SYSCTL=y | ||
| 32 | # CONFIG_POSIX_MQUEUE is not set | ||
| 33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 34 | # CONFIG_TASKSTATS is not set | ||
| 35 | # CONFIG_USER_NS is not set | ||
| 36 | # CONFIG_PID_NS is not set | ||
| 37 | # CONFIG_AUDIT is not set | ||
| 38 | CONFIG_IKCONFIG=y | ||
| 39 | CONFIG_IKCONFIG_PROC=y | ||
| 40 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 41 | # CONFIG_CGROUPS is not set | ||
| 42 | CONFIG_FAIR_GROUP_SCHED=y | ||
| 43 | CONFIG_FAIR_USER_SCHED=y | ||
| 44 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
| 45 | CONFIG_SYSFS_DEPRECATED=y | ||
| 46 | # CONFIG_RELAY is not set | ||
| 47 | CONFIG_BLK_DEV_INITRD=y | ||
| 48 | CONFIG_INITRAMFS_SOURCE="" | ||
| 49 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 50 | CONFIG_SYSCTL=y | ||
| 51 | CONFIG_EMBEDDED=y | ||
| 52 | CONFIG_UID16=y | ||
| 53 | CONFIG_SYSCTL_SYSCALL=y | ||
| 54 | CONFIG_KALLSYMS=y | ||
| 55 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
| 56 | CONFIG_HOTPLUG=y | ||
| 57 | CONFIG_PRINTK=y | ||
| 58 | CONFIG_BUG=y | ||
| 59 | CONFIG_ELF_CORE=y | ||
| 60 | CONFIG_BASE_FULL=y | ||
| 61 | CONFIG_FUTEX=y | ||
| 62 | CONFIG_ANON_INODES=y | ||
| 63 | CONFIG_EPOLL=y | ||
| 64 | CONFIG_SIGNALFD=y | ||
| 65 | CONFIG_EVENTFD=y | ||
| 66 | CONFIG_VM_EVENT_COUNTERS=y | ||
| 67 | CONFIG_SLAB=y | ||
| 68 | # CONFIG_SLUB is not set | ||
| 69 | # CONFIG_SLOB is not set | ||
| 70 | CONFIG_SLABINFO=y | ||
| 71 | CONFIG_RT_MUTEXES=y | ||
| 72 | CONFIG_TINY_SHMEM=y | ||
| 73 | CONFIG_BASE_SMALL=0 | ||
| 74 | CONFIG_MODULES=y | ||
| 75 | CONFIG_MODULE_UNLOAD=y | ||
| 76 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 77 | # CONFIG_MODVERSIONS is not set | ||
| 78 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 79 | CONFIG_KMOD=y | ||
| 80 | CONFIG_BLOCK=y | ||
| 81 | # CONFIG_LBD is not set | ||
| 82 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 83 | # CONFIG_LSF is not set | ||
| 84 | # CONFIG_BLK_DEV_BSG is not set | ||
| 85 | |||
| 86 | # | ||
| 87 | # IO Schedulers | ||
| 88 | # | ||
| 89 | CONFIG_IOSCHED_NOOP=y | ||
| 90 | # CONFIG_IOSCHED_AS is not set | ||
| 91 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 92 | CONFIG_IOSCHED_CFQ=y | ||
| 93 | # CONFIG_DEFAULT_AS is not set | ||
| 94 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 95 | CONFIG_DEFAULT_CFQ=y | ||
| 96 | # CONFIG_DEFAULT_NOOP is not set | ||
| 97 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
| 98 | # CONFIG_PREEMPT_NONE is not set | ||
| 99 | CONFIG_PREEMPT_VOLUNTARY=y | ||
| 100 | # CONFIG_PREEMPT is not set | ||
| 101 | |||
| 102 | # | ||
| 103 | # Blackfin Processor Options | ||
| 104 | # | ||
| 105 | |||
| 106 | # | ||
| 107 | # Processor and Board Settings | ||
| 108 | # | ||
| 109 | # CONFIG_BF522 is not set | ||
| 110 | # CONFIG_BF523 is not set | ||
| 111 | # CONFIG_BF524 is not set | ||
| 112 | # CONFIG_BF525 is not set | ||
| 113 | # CONFIG_BF526 is not set | ||
| 114 | CONFIG_BF527=y | ||
| 115 | # CONFIG_BF531 is not set | ||
| 116 | # CONFIG_BF532 is not set | ||
| 117 | # CONFIG_BF533 is not set | ||
| 118 | # CONFIG_BF534 is not set | ||
| 119 | # CONFIG_BF536 is not set | ||
| 120 | # CONFIG_BF537 is not set | ||
| 121 | # CONFIG_BF542 is not set | ||
| 122 | # CONFIG_BF544 is not set | ||
| 123 | # CONFIG_BF547 is not set | ||
| 124 | # CONFIG_BF548 is not set | ||
| 125 | # CONFIG_BF549 is not set | ||
| 126 | # CONFIG_BF561 is not set | ||
| 127 | # CONFIG_BF_REV_0_0 is not set | ||
| 128 | CONFIG_BF_REV_0_1=y | ||
| 129 | # CONFIG_BF_REV_0_2 is not set | ||
| 130 | # CONFIG_BF_REV_0_3 is not set | ||
| 131 | # CONFIG_BF_REV_0_4 is not set | ||
| 132 | # CONFIG_BF_REV_0_5 is not set | ||
| 133 | # CONFIG_BF_REV_ANY is not set | ||
| 134 | # CONFIG_BF_REV_NONE is not set | ||
| 135 | CONFIG_BF52x=y | ||
| 136 | CONFIG_MEM_MT48LC16M16A2TG_75=y | ||
| 137 | # CONFIG_BFIN527_EZKIT is not set | ||
| 138 | CONFIG_BFIN527_BLUETECHNIX_CM=y | ||
| 139 | |||
| 140 | # | ||
| 141 | # BF527 Specific Configuration | ||
| 142 | # | ||
| 143 | |||
| 144 | # | ||
| 145 | # Alternative Multiplexing Scheme | ||
| 146 | # | ||
| 147 | # CONFIG_BF527_SPORT0_PORTF is not set | ||
| 148 | CONFIG_BF527_SPORT0_PORTG=y | ||
| 149 | CONFIG_BF527_SPORT0_TSCLK_PG10=y | ||
| 150 | # CONFIG_BF527_SPORT0_TSCLK_PG14 is not set | ||
| 151 | CONFIG_BF527_UART1_PORTF=y | ||
| 152 | # CONFIG_BF527_UART1_PORTG is not set | ||
| 153 | # CONFIG_BF527_NAND_D_PORTF is not set | ||
| 154 | CONFIG_BF527_NAND_D_PORTH=y | ||
| 155 | |||
| 156 | # | ||
| 157 | # Interrupt Priority Assignment | ||
| 158 | # | ||
| 159 | |||
| 160 | # | ||
| 161 | # Priority | ||
| 162 | # | ||
| 163 | CONFIG_IRQ_PLL_WAKEUP=7 | ||
| 164 | CONFIG_IRQ_DMA0_ERROR=7 | ||
| 165 | CONFIG_IRQ_DMAR0_BLK=7 | ||
| 166 | CONFIG_IRQ_DMAR1_BLK=7 | ||
| 167 | CONFIG_IRQ_DMAR0_OVR=7 | ||
| 168 | CONFIG_IRQ_DMAR1_OVR=7 | ||
| 169 | CONFIG_IRQ_PPI_ERROR=7 | ||
| 170 | CONFIG_IRQ_MAC_ERROR=7 | ||
| 171 | CONFIG_IRQ_SPORT0_ERROR=7 | ||
| 172 | CONFIG_IRQ_SPORT1_ERROR=7 | ||
| 173 | CONFIG_IRQ_UART0_ERROR=7 | ||
| 174 | CONFIG_IRQ_UART1_ERROR=7 | ||
| 175 | CONFIG_IRQ_RTC=8 | ||
| 176 | CONFIG_IRQ_PPI=8 | ||
| 177 | CONFIG_IRQ_SPORT0_RX=9 | ||
| 178 | CONFIG_IRQ_SPORT0_TX=9 | ||
| 179 | CONFIG_IRQ_SPORT1_RX=9 | ||
| 180 | CONFIG_IRQ_SPORT1_TX=9 | ||
| 181 | CONFIG_IRQ_TWI=10 | ||
| 182 | CONFIG_IRQ_SPI=10 | ||
| 183 | CONFIG_IRQ_UART0_RX=10 | ||
| 184 | CONFIG_IRQ_UART0_TX=10 | ||
| 185 | CONFIG_IRQ_UART1_RX=10 | ||
| 186 | CONFIG_IRQ_UART1_TX=10 | ||
| 187 | CONFIG_IRQ_OPTSEC=11 | ||
| 188 | CONFIG_IRQ_CNT=11 | ||
| 189 | CONFIG_IRQ_MAC_RX=11 | ||
| 190 | CONFIG_IRQ_PORTH_INTA=11 | ||
| 191 | CONFIG_IRQ_MAC_TX=11 | ||
| 192 | CONFIG_IRQ_PORTH_INTB=11 | ||
| 193 | CONFIG_IRQ_TMR0=12 | ||
| 194 | CONFIG_IRQ_TMR1=12 | ||
| 195 | CONFIG_IRQ_TMR2=12 | ||
| 196 | CONFIG_IRQ_TMR3=12 | ||
| 197 | CONFIG_IRQ_TMR4=12 | ||
| 198 | CONFIG_IRQ_TMR5=12 | ||
| 199 | CONFIG_IRQ_TMR6=12 | ||
| 200 | CONFIG_IRQ_TMR7=12 | ||
| 201 | CONFIG_IRQ_PORTG_INTA=12 | ||
| 202 | CONFIG_IRQ_PORTG_INTB=12 | ||
| 203 | CONFIG_IRQ_MEM_DMA0=13 | ||
| 204 | CONFIG_IRQ_MEM_DMA1=13 | ||
| 205 | CONFIG_IRQ_WATCH=13 | ||
| 206 | CONFIG_IRQ_PORTF_INTA=13 | ||
| 207 | CONFIG_IRQ_PORTF_INTB=13 | ||
| 208 | CONFIG_IRQ_SPI_ERROR=7 | ||
| 209 | CONFIG_IRQ_NFC_ERROR=7 | ||
| 210 | CONFIG_IRQ_HDMA_ERROR=7 | ||
| 211 | CONFIG_IRQ_HDMA=7 | ||
| 212 | CONFIG_IRQ_USB_EINT=10 | ||
| 213 | CONFIG_IRQ_USB_INT0=11 | ||
| 214 | CONFIG_IRQ_USB_INT1=11 | ||
| 215 | CONFIG_IRQ_USB_INT2=11 | ||
| 216 | CONFIG_IRQ_USB_DMA=11 | ||
| 217 | |||
| 218 | # | ||
| 219 | # Board customizations | ||
| 220 | # | ||
| 221 | # CONFIG_CMDLINE_BOOL is not set | ||
| 222 | CONFIG_BOOT_LOAD=0x1000 | ||
| 223 | |||
| 224 | # | ||
| 225 | # Clock/PLL Setup | ||
| 226 | # | ||
| 227 | CONFIG_CLKIN_HZ=25000000 | ||
| 228 | # CONFIG_BFIN_KERNEL_CLOCK is not set | ||
| 229 | CONFIG_MAX_MEM_SIZE=512 | ||
| 230 | CONFIG_MAX_VCO_HZ=600000000 | ||
| 231 | CONFIG_MIN_VCO_HZ=50000000 | ||
| 232 | CONFIG_MAX_SCLK_HZ=133333333 | ||
| 233 | CONFIG_MIN_SCLK_HZ=27000000 | ||
| 234 | |||
| 235 | # | ||
| 236 | # Kernel Timer/Scheduler | ||
| 237 | # | ||
| 238 | # CONFIG_HZ_100 is not set | ||
| 239 | CONFIG_HZ_250=y | ||
| 240 | # CONFIG_HZ_300 is not set | ||
| 241 | # CONFIG_HZ_1000 is not set | ||
| 242 | CONFIG_HZ=250 | ||
| 243 | CONFIG_GENERIC_TIME=y | ||
| 244 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 245 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
| 246 | # CONFIG_TICK_ONESHOT is not set | ||
| 247 | # CONFIG_NO_HZ is not set | ||
| 248 | # CONFIG_HIGH_RES_TIMERS is not set | ||
| 249 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 250 | |||
| 251 | # | ||
| 252 | # Misc | ||
| 253 | # | ||
| 254 | CONFIG_BFIN_SCRATCH_REG_RETN=y | ||
| 255 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | ||
| 256 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | ||
| 257 | |||
| 258 | # | ||
| 259 | # Blackfin Kernel Optimizations | ||
| 260 | # | ||
| 261 | |||
| 262 | # | ||
| 263 | # Memory Optimizations | ||
| 264 | # | ||
| 265 | CONFIG_I_ENTRY_L1=y | ||
| 266 | CONFIG_EXCPT_IRQ_SYSC_L1=y | ||
| 267 | CONFIG_DO_IRQ_L1=y | ||
| 268 | CONFIG_CORE_TIMER_IRQ_L1=y | ||
| 269 | CONFIG_IDLE_L1=y | ||
| 270 | # CONFIG_SCHEDULE_L1 is not set | ||
| 271 | CONFIG_ARITHMETIC_OPS_L1=y | ||
| 272 | CONFIG_ACCESS_OK_L1=y | ||
| 273 | # CONFIG_MEMSET_L1 is not set | ||
| 274 | # CONFIG_MEMCPY_L1 is not set | ||
| 275 | # CONFIG_SYS_BFIN_SPINLOCK_L1 is not set | ||
| 276 | # CONFIG_IP_CHECKSUM_L1 is not set | ||
| 277 | CONFIG_CACHELINE_ALIGNED_L1=y | ||
| 278 | # CONFIG_SYSCALL_TAB_L1 is not set | ||
| 279 | # CONFIG_CPLB_SWITCH_TAB_L1 is not set | ||
| 280 | CONFIG_RAMKERNEL=y | ||
| 281 | # CONFIG_ROMKERNEL is not set | ||
| 282 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 283 | CONFIG_FLATMEM_MANUAL=y | ||
| 284 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 285 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 286 | CONFIG_FLATMEM=y | ||
| 287 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 288 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 289 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 290 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 291 | # CONFIG_RESOURCES_64BIT is not set | ||
| 292 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 293 | CONFIG_VIRT_TO_BUS=y | ||
| 294 | CONFIG_BFIN_GPTIMERS=y | ||
| 295 | CONFIG_BFIN_DMA_5XX=y | ||
| 296 | # CONFIG_DMA_UNCACHED_4M is not set | ||
| 297 | # CONFIG_DMA_UNCACHED_2M is not set | ||
| 298 | CONFIG_DMA_UNCACHED_1M=y | ||
| 299 | # CONFIG_DMA_UNCACHED_NONE is not set | ||
| 300 | |||
| 301 | # | ||
| 302 | # Cache Support | ||
| 303 | # | ||
| 304 | CONFIG_BFIN_ICACHE=y | ||
| 305 | CONFIG_BFIN_DCACHE=y | ||
| 306 | # CONFIG_BFIN_DCACHE_BANKA is not set | ||
| 307 | # CONFIG_BFIN_ICACHE_LOCK is not set | ||
| 308 | # CONFIG_BFIN_WB is not set | ||
| 309 | CONFIG_BFIN_WT=y | ||
| 310 | # CONFIG_MPU is not set | ||
| 311 | |||
| 312 | # | ||
| 313 | # Asynchonous Memory Configuration | ||
| 314 | # | ||
| 315 | |||
| 316 | # | ||
| 317 | # EBIU_AMGCTL Global Control | ||
| 318 | # | ||
| 319 | CONFIG_C_AMCKEN=y | ||
| 320 | CONFIG_C_CDPRIO=y | ||
| 321 | # CONFIG_C_AMBEN is not set | ||
| 322 | # CONFIG_C_AMBEN_B0 is not set | ||
| 323 | # CONFIG_C_AMBEN_B0_B1 is not set | ||
| 324 | # CONFIG_C_AMBEN_B0_B1_B2 is not set | ||
| 325 | CONFIG_C_AMBEN_ALL=y | ||
| 326 | |||
| 327 | # | ||
| 328 | # EBIU_AMBCTL Control | ||
| 329 | # | ||
| 330 | CONFIG_BANK_0=0x7BB0 | ||
| 331 | CONFIG_BANK_1=0x5554 | ||
| 332 | CONFIG_BANK_2=0x7BB0 | ||
| 333 | CONFIG_BANK_3=0xFFC0 | ||
| 334 | |||
| 335 | # | ||
| 336 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 337 | # | ||
| 338 | # CONFIG_PCI is not set | ||
| 339 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 340 | # CONFIG_PCCARD is not set | ||
| 341 | |||
| 342 | # | ||
| 343 | # Executable file formats | ||
| 344 | # | ||
| 345 | CONFIG_BINFMT_ELF_FDPIC=y | ||
| 346 | CONFIG_BINFMT_FLAT=y | ||
| 347 | CONFIG_BINFMT_ZFLAT=y | ||
| 348 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 349 | # CONFIG_BINFMT_MISC is not set | ||
| 350 | |||
| 351 | # | ||
| 352 | # Power management options | ||
| 353 | # | ||
| 354 | # CONFIG_PM is not set | ||
| 355 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
| 356 | # CONFIG_PM_BFIN_SLEEP_DEEPER is not set | ||
| 357 | # CONFIG_PM_BFIN_SLEEP is not set | ||
| 358 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | ||
| 359 | |||
| 360 | # | ||
| 361 | # CPU Frequency scaling | ||
| 362 | # | ||
| 363 | # CONFIG_CPU_FREQ is not set | ||
| 364 | |||
| 365 | # | ||
| 366 | # Networking | ||
| 367 | # | ||
| 368 | CONFIG_NET=y | ||
| 369 | |||
| 370 | # | ||
| 371 | # Networking options | ||
| 372 | # | ||
| 373 | CONFIG_PACKET=y | ||
| 374 | # CONFIG_PACKET_MMAP is not set | ||
| 375 | CONFIG_UNIX=y | ||
| 376 | CONFIG_XFRM=y | ||
| 377 | # CONFIG_XFRM_USER is not set | ||
| 378 | # CONFIG_XFRM_SUB_POLICY is not set | ||
| 379 | # CONFIG_XFRM_MIGRATE is not set | ||
| 380 | # CONFIG_NET_KEY is not set | ||
| 381 | CONFIG_INET=y | ||
| 382 | # CONFIG_IP_MULTICAST is not set | ||
| 383 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 384 | CONFIG_IP_FIB_HASH=y | ||
| 385 | CONFIG_IP_PNP=y | ||
| 386 | # CONFIG_IP_PNP_DHCP is not set | ||
| 387 | # CONFIG_IP_PNP_BOOTP is not set | ||
| 388 | # CONFIG_IP_PNP_RARP is not set | ||
| 389 | # CONFIG_NET_IPIP is not set | ||
| 390 | # CONFIG_NET_IPGRE is not set | ||
| 391 | # CONFIG_ARPD is not set | ||
| 392 | CONFIG_SYN_COOKIES=y | ||
| 393 | # CONFIG_INET_AH is not set | ||
| 394 | # CONFIG_INET_ESP is not set | ||
| 395 | # CONFIG_INET_IPCOMP is not set | ||
| 396 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 397 | # CONFIG_INET_TUNNEL is not set | ||
| 398 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
| 399 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
| 400 | CONFIG_INET_XFRM_MODE_BEET=y | ||
| 401 | # CONFIG_INET_LRO is not set | ||
| 402 | CONFIG_INET_DIAG=y | ||
| 403 | CONFIG_INET_TCP_DIAG=y | ||
| 404 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 405 | CONFIG_TCP_CONG_CUBIC=y | ||
| 406 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 407 | # CONFIG_TCP_MD5SIG is not set | ||
| 408 | # CONFIG_IPV6 is not set | ||
| 409 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
| 410 | # CONFIG_INET6_TUNNEL is not set | ||
| 411 | # CONFIG_NETLABEL is not set | ||
| 412 | # CONFIG_NETWORK_SECMARK is not set | ||
| 413 | # CONFIG_NETFILTER is not set | ||
| 414 | # CONFIG_IP_DCCP is not set | ||
| 415 | # CONFIG_IP_SCTP is not set | ||
| 416 | # CONFIG_TIPC is not set | ||
| 417 | # CONFIG_ATM is not set | ||
| 418 | # CONFIG_BRIDGE is not set | ||
| 419 | # CONFIG_VLAN_8021Q is not set | ||
| 420 | # CONFIG_DECNET is not set | ||
| 421 | # CONFIG_LLC2 is not set | ||
| 422 | # CONFIG_IPX is not set | ||
| 423 | # CONFIG_ATALK is not set | ||
| 424 | # CONFIG_X25 is not set | ||
| 425 | # CONFIG_LAPB is not set | ||
| 426 | # CONFIG_ECONET is not set | ||
| 427 | # CONFIG_WAN_ROUTER is not set | ||
| 428 | # CONFIG_NET_SCHED is not set | ||
| 429 | |||
| 430 | # | ||
| 431 | # Network testing | ||
| 432 | # | ||
| 433 | # CONFIG_NET_PKTGEN is not set | ||
| 434 | # CONFIG_HAMRADIO is not set | ||
| 435 | # CONFIG_IRDA is not set | ||
| 436 | # CONFIG_BT is not set | ||
| 437 | # CONFIG_AF_RXRPC is not set | ||
| 438 | |||
| 439 | # | ||
| 440 | # Wireless | ||
| 441 | # | ||
| 442 | # CONFIG_CFG80211 is not set | ||
| 443 | # CONFIG_WIRELESS_EXT is not set | ||
| 444 | # CONFIG_MAC80211 is not set | ||
| 445 | # CONFIG_IEEE80211 is not set | ||
| 446 | # CONFIG_RFKILL is not set | ||
| 447 | # CONFIG_NET_9P is not set | ||
| 448 | |||
| 449 | # | ||
| 450 | # Device Drivers | ||
| 451 | # | ||
| 452 | |||
| 453 | # | ||
| 454 | # Generic Driver Options | ||
| 455 | # | ||
| 456 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 457 | CONFIG_STANDALONE=y | ||
| 458 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 459 | # CONFIG_FW_LOADER is not set | ||
| 460 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 461 | # CONFIG_CONNECTOR is not set | ||
| 462 | CONFIG_MTD=y | ||
| 463 | # CONFIG_MTD_DEBUG is not set | ||
| 464 | # CONFIG_MTD_CONCAT is not set | ||
| 465 | CONFIG_MTD_PARTITIONS=y | ||
| 466 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 467 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 468 | |||
| 469 | # | ||
| 470 | # User Modules And Translation Layers | ||
| 471 | # | ||
| 472 | CONFIG_MTD_CHAR=m | ||
| 473 | CONFIG_MTD_BLKDEVS=y | ||
| 474 | CONFIG_MTD_BLOCK=y | ||
| 475 | # CONFIG_FTL is not set | ||
| 476 | # CONFIG_NFTL is not set | ||
| 477 | # CONFIG_INFTL is not set | ||
| 478 | # CONFIG_RFD_FTL is not set | ||
| 479 | # CONFIG_SSFDC is not set | ||
| 480 | # CONFIG_MTD_OOPS is not set | ||
| 481 | |||
| 482 | # | ||
| 483 | # RAM/ROM/Flash chip drivers | ||
| 484 | # | ||
| 485 | # CONFIG_MTD_CFI is not set | ||
| 486 | CONFIG_MTD_JEDECPROBE=m | ||
| 487 | CONFIG_MTD_GEN_PROBE=m | ||
| 488 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
| 489 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 490 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 491 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 492 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 493 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 494 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 495 | CONFIG_MTD_CFI_I1=y | ||
| 496 | CONFIG_MTD_CFI_I2=y | ||
| 497 | # CONFIG_MTD_CFI_I4 is not set | ||
| 498 | # CONFIG_MTD_CFI_I8 is not set | ||
| 499 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
| 500 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
| 501 | # CONFIG_MTD_CFI_STAA is not set | ||
| 502 | CONFIG_MTD_RAM=y | ||
| 503 | CONFIG_MTD_ROM=m | ||
| 504 | # CONFIG_MTD_ABSENT is not set | ||
| 505 | |||
| 506 | # | ||
| 507 | # Mapping drivers for chip access | ||
| 508 | # | ||
| 509 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
| 510 | # CONFIG_MTD_PHYSMAP is not set | ||
| 511 | # CONFIG_MTD_UCLINUX is not set | ||
| 512 | # CONFIG_MTD_PLATRAM is not set | ||
| 513 | |||
| 514 | # | ||
| 515 | # Self-contained MTD device drivers | ||
| 516 | # | ||
| 517 | # CONFIG_MTD_DATAFLASH is not set | ||
| 518 | # CONFIG_MTD_M25P80 is not set | ||
| 519 | # CONFIG_MTD_SLRAM is not set | ||
| 520 | # CONFIG_MTD_PHRAM is not set | ||
| 521 | # CONFIG_MTD_MTDRAM is not set | ||
| 522 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 523 | |||
| 524 | # | ||
| 525 | # Disk-On-Chip Device Drivers | ||
| 526 | # | ||
| 527 | # CONFIG_MTD_DOC2000 is not set | ||
| 528 | # CONFIG_MTD_DOC2001 is not set | ||
| 529 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 530 | # CONFIG_MTD_NAND is not set | ||
| 531 | # CONFIG_MTD_ONENAND is not set | ||
| 532 | |||
| 533 | # | ||
| 534 | # UBI - Unsorted block images | ||
| 535 | # | ||
| 536 | # CONFIG_MTD_UBI is not set | ||
| 537 | # CONFIG_PARPORT is not set | ||
| 538 | CONFIG_BLK_DEV=y | ||
| 539 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 540 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 541 | # CONFIG_BLK_DEV_NBD is not set | ||
| 542 | # CONFIG_BLK_DEV_UB is not set | ||
| 543 | CONFIG_BLK_DEV_RAM=y | ||
| 544 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 545 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 546 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
| 547 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 548 | # CONFIG_ATA_OVER_ETH is not set | ||
| 549 | # CONFIG_MISC_DEVICES is not set | ||
| 550 | # CONFIG_IDE is not set | ||
| 551 | |||
| 552 | # | ||
| 553 | # SCSI device support | ||
| 554 | # | ||
| 555 | # CONFIG_RAID_ATTRS is not set | ||
| 556 | # CONFIG_SCSI is not set | ||
| 557 | # CONFIG_SCSI_DMA is not set | ||
| 558 | # CONFIG_SCSI_NETLINK is not set | ||
| 559 | # CONFIG_ATA is not set | ||
| 560 | # CONFIG_MD is not set | ||
| 561 | CONFIG_NETDEVICES=y | ||
| 562 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 563 | # CONFIG_DUMMY is not set | ||
| 564 | # CONFIG_BONDING is not set | ||
| 565 | # CONFIG_MACVLAN is not set | ||
| 566 | # CONFIG_EQUALIZER is not set | ||
| 567 | # CONFIG_TUN is not set | ||
| 568 | # CONFIG_VETH is not set | ||
| 569 | CONFIG_PHYLIB=y | ||
| 570 | |||
| 571 | # | ||
| 572 | # MII PHY device drivers | ||
| 573 | # | ||
| 574 | # CONFIG_MARVELL_PHY is not set | ||
| 575 | # CONFIG_DAVICOM_PHY is not set | ||
| 576 | # CONFIG_QSEMI_PHY is not set | ||
| 577 | # CONFIG_LXT_PHY is not set | ||
| 578 | # CONFIG_CICADA_PHY is not set | ||
| 579 | # CONFIG_VITESSE_PHY is not set | ||
| 580 | # CONFIG_SMSC_PHY is not set | ||
| 581 | # CONFIG_BROADCOM_PHY is not set | ||
| 582 | # CONFIG_ICPLUS_PHY is not set | ||
| 583 | # CONFIG_FIXED_PHY is not set | ||
| 584 | # CONFIG_MDIO_BITBANG is not set | ||
| 585 | CONFIG_NET_ETHERNET=y | ||
| 586 | CONFIG_MII=y | ||
| 587 | CONFIG_BFIN_MAC=y | ||
| 588 | CONFIG_BFIN_MAC_USE_L1=y | ||
| 589 | CONFIG_BFIN_TX_DESC_NUM=10 | ||
| 590 | CONFIG_BFIN_RX_DESC_NUM=20 | ||
| 591 | CONFIG_BFIN_MAC_RMII=y | ||
| 592 | # CONFIG_SMC91X is not set | ||
| 593 | # CONFIG_SMSC911X is not set | ||
| 594 | # CONFIG_DM9000 is not set | ||
| 595 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 596 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 597 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 598 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 599 | # CONFIG_B44 is not set | ||
| 600 | # CONFIG_NETDEV_1000 is not set | ||
| 601 | # CONFIG_NETDEV_10000 is not set | ||
| 602 | |||
| 603 | # | ||
| 604 | # Wireless LAN | ||
| 605 | # | ||
| 606 | # CONFIG_WLAN_PRE80211 is not set | ||
| 607 | # CONFIG_WLAN_80211 is not set | ||
| 608 | |||
| 609 | # | ||
| 610 | # USB Network Adapters | ||
| 611 | # | ||
| 612 | # CONFIG_USB_CATC is not set | ||
| 613 | # CONFIG_USB_KAWETH is not set | ||
| 614 | # CONFIG_USB_PEGASUS is not set | ||
| 615 | # CONFIG_USB_RTL8150 is not set | ||
| 616 | # CONFIG_USB_USBNET is not set | ||
| 617 | # CONFIG_WAN is not set | ||
| 618 | # CONFIG_PPP is not set | ||
| 619 | # CONFIG_SLIP is not set | ||
| 620 | # CONFIG_SHAPER is not set | ||
| 621 | # CONFIG_NETCONSOLE is not set | ||
| 622 | # CONFIG_NETPOLL is not set | ||
| 623 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 624 | # CONFIG_ISDN is not set | ||
| 625 | # CONFIG_PHONE is not set | ||
| 626 | |||
| 627 | # | ||
| 628 | # Input device support | ||
| 629 | # | ||
| 630 | # CONFIG_INPUT is not set | ||
| 631 | |||
| 632 | # | ||
| 633 | # Hardware I/O ports | ||
| 634 | # | ||
| 635 | # CONFIG_SERIO is not set | ||
| 636 | # CONFIG_GAMEPORT is not set | ||
| 637 | |||
| 638 | # | ||
| 639 | # Character devices | ||
| 640 | # | ||
| 641 | # CONFIG_AD9960 is not set | ||
| 642 | # CONFIG_SPI_ADC_BF533 is not set | ||
| 643 | # CONFIG_BF5xx_PPIFCD is not set | ||
| 644 | # CONFIG_BFIN_SIMPLE_TIMER is not set | ||
| 645 | # CONFIG_BF5xx_PPI is not set | ||
| 646 | CONFIG_BFIN_OTP=y | ||
| 647 | # CONFIG_BFIN_OTP_WRITE_ENABLE is not set | ||
| 648 | # CONFIG_BFIN_SPORT is not set | ||
| 649 | # CONFIG_BFIN_TIMER_LATENCY is not set | ||
| 650 | # CONFIG_TWI_LCD is not set | ||
| 651 | CONFIG_SIMPLE_GPIO=m | ||
| 652 | # CONFIG_VT is not set | ||
| 653 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 654 | |||
| 655 | # | ||
| 656 | # Serial drivers | ||
| 657 | # | ||
| 658 | # CONFIG_SERIAL_8250 is not set | ||
| 659 | |||
| 660 | # | ||
| 661 | # Non-8250 serial port support | ||
| 662 | # | ||
| 663 | CONFIG_SERIAL_BFIN=y | ||
| 664 | CONFIG_SERIAL_BFIN_CONSOLE=y | ||
| 665 | CONFIG_SERIAL_BFIN_DMA=y | ||
| 666 | # CONFIG_SERIAL_BFIN_PIO is not set | ||
| 667 | CONFIG_SERIAL_BFIN_UART0=y | ||
| 668 | # CONFIG_BFIN_UART0_CTSRTS is not set | ||
| 669 | CONFIG_SERIAL_BFIN_UART1=y | ||
| 670 | # CONFIG_BFIN_UART1_CTSRTS is not set | ||
| 671 | CONFIG_SERIAL_CORE=y | ||
| 672 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 673 | # CONFIG_SERIAL_BFIN_SPORT is not set | ||
| 674 | CONFIG_UNIX98_PTYS=y | ||
| 675 | # CONFIG_LEGACY_PTYS is not set | ||
| 676 | |||
| 677 | # | ||
| 678 | # CAN, the car bus and industrial fieldbus | ||
| 679 | # | ||
| 680 | # CONFIG_CAN4LINUX is not set | ||
| 681 | # CONFIG_IPMI_HANDLER is not set | ||
| 682 | CONFIG_HW_RANDOM=y | ||
| 683 | # CONFIG_GEN_RTC is not set | ||
| 684 | # CONFIG_R3964 is not set | ||
| 685 | # CONFIG_RAW_DRIVER is not set | ||
| 686 | # CONFIG_TCG_TPM is not set | ||
| 687 | CONFIG_I2C=y | ||
| 688 | CONFIG_I2C_BOARDINFO=y | ||
| 689 | CONFIG_I2C_CHARDEV=m | ||
| 690 | |||
| 691 | # | ||
| 692 | # I2C Algorithms | ||
| 693 | # | ||
| 694 | # CONFIG_I2C_ALGOBIT is not set | ||
| 695 | # CONFIG_I2C_ALGOPCF is not set | ||
| 696 | # CONFIG_I2C_ALGOPCA is not set | ||
| 697 | |||
| 698 | # | ||
| 699 | # I2C Hardware Bus support | ||
| 700 | # | ||
| 701 | CONFIG_I2C_BLACKFIN_TWI=m | ||
| 702 | CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 | ||
| 703 | # CONFIG_I2C_GPIO is not set | ||
| 704 | # CONFIG_I2C_OCORES is not set | ||
| 705 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
| 706 | # CONFIG_I2C_SIMTEC is not set | ||
| 707 | # CONFIG_I2C_TAOS_EVM is not set | ||
| 708 | # CONFIG_I2C_STUB is not set | ||
| 709 | # CONFIG_I2C_TINY_USB is not set | ||
| 710 | |||
| 711 | # | ||
| 712 | # Miscellaneous I2C Chip support | ||
| 713 | # | ||
| 714 | # CONFIG_SENSORS_DS1337 is not set | ||
| 715 | # CONFIG_SENSORS_DS1374 is not set | ||
| 716 | # CONFIG_DS1682 is not set | ||
| 717 | # CONFIG_SENSORS_AD5252 is not set | ||
| 718 | # CONFIG_SENSORS_EEPROM is not set | ||
| 719 | # CONFIG_SENSORS_PCF8574 is not set | ||
| 720 | # CONFIG_SENSORS_PCF8575 is not set | ||
| 721 | # CONFIG_SENSORS_PCA9539 is not set | ||
| 722 | # CONFIG_SENSORS_PCF8591 is not set | ||
| 723 | # CONFIG_SENSORS_MAX6875 is not set | ||
| 724 | # CONFIG_SENSORS_TSL2550 is not set | ||
| 725 | # CONFIG_I2C_DEBUG_CORE is not set | ||
| 726 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
| 727 | # CONFIG_I2C_DEBUG_BUS is not set | ||
| 728 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
| 729 | |||
| 730 | # | ||
| 731 | # SPI support | ||
| 732 | # | ||
| 733 | CONFIG_SPI=y | ||
| 734 | CONFIG_SPI_MASTER=y | ||
| 735 | |||
| 736 | # | ||
| 737 | # SPI Master Controller Drivers | ||
| 738 | # | ||
| 739 | CONFIG_SPI_BFIN=y | ||
| 740 | # CONFIG_SPI_BITBANG is not set | ||
| 741 | |||
| 742 | # | ||
| 743 | # SPI Protocol Masters | ||
| 744 | # | ||
| 745 | # CONFIG_SPI_AT25 is not set | ||
| 746 | # CONFIG_SPI_SPIDEV is not set | ||
| 747 | # CONFIG_SPI_TLE62X0 is not set | ||
| 748 | # CONFIG_W1 is not set | ||
| 749 | # CONFIG_POWER_SUPPLY is not set | ||
| 750 | CONFIG_HWMON=y | ||
| 751 | # CONFIG_HWMON_VID is not set | ||
| 752 | # CONFIG_SENSORS_AD7418 is not set | ||
| 753 | # CONFIG_SENSORS_ADM1021 is not set | ||
| 754 | # CONFIG_SENSORS_ADM1025 is not set | ||
| 755 | # CONFIG_SENSORS_ADM1026 is not set | ||
| 756 | # CONFIG_SENSORS_ADM1029 is not set | ||
| 757 | # CONFIG_SENSORS_ADM1031 is not set | ||
| 758 | # CONFIG_SENSORS_ADM9240 is not set | ||
| 759 | # CONFIG_SENSORS_ADT7470 is not set | ||
| 760 | # CONFIG_SENSORS_ATXP1 is not set | ||
| 761 | # CONFIG_SENSORS_DS1621 is not set | ||
| 762 | # CONFIG_SENSORS_F71805F is not set | ||
| 763 | # CONFIG_SENSORS_F71882FG is not set | ||
| 764 | # CONFIG_SENSORS_F75375S is not set | ||
| 765 | # CONFIG_SENSORS_GL518SM is not set | ||
| 766 | # CONFIG_SENSORS_GL520SM is not set | ||
| 767 | # CONFIG_SENSORS_IT87 is not set | ||
| 768 | # CONFIG_SENSORS_LM63 is not set | ||
| 769 | # CONFIG_SENSORS_LM70 is not set | ||
| 770 | # CONFIG_SENSORS_LM75 is not set | ||
| 771 | # CONFIG_SENSORS_LM77 is not set | ||
| 772 | # CONFIG_SENSORS_LM78 is not set | ||
| 773 | # CONFIG_SENSORS_LM80 is not set | ||
| 774 | # CONFIG_SENSORS_LM83 is not set | ||
| 775 | # CONFIG_SENSORS_LM85 is not set | ||
| 776 | # CONFIG_SENSORS_LM87 is not set | ||
| 777 | # CONFIG_SENSORS_LM90 is not set | ||
| 778 | # CONFIG_SENSORS_LM92 is not set | ||
| 779 | # CONFIG_SENSORS_LM93 is not set | ||
| 780 | # CONFIG_SENSORS_MAX1619 is not set | ||
| 781 | # CONFIG_SENSORS_MAX6650 is not set | ||
| 782 | # CONFIG_SENSORS_PC87360 is not set | ||
| 783 | # CONFIG_SENSORS_PC87427 is not set | ||
| 784 | # CONFIG_SENSORS_DME1737 is not set | ||
| 785 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
| 786 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
| 787 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
| 788 | # CONFIG_SENSORS_THMC50 is not set | ||
| 789 | # CONFIG_SENSORS_VT1211 is not set | ||
| 790 | # CONFIG_SENSORS_W83781D is not set | ||
| 791 | # CONFIG_SENSORS_W83791D is not set | ||
| 792 | # CONFIG_SENSORS_W83792D is not set | ||
| 793 | # CONFIG_SENSORS_W83793 is not set | ||
| 794 | # CONFIG_SENSORS_W83L785TS is not set | ||
| 795 | # CONFIG_SENSORS_W83627HF is not set | ||
| 796 | # CONFIG_SENSORS_W83627EHF is not set | ||
| 797 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
| 798 | CONFIG_WATCHDOG=y | ||
| 799 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 800 | |||
| 801 | # | ||
| 802 | # Watchdog Device Drivers | ||
| 803 | # | ||
| 804 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 805 | CONFIG_BFIN_WDT=y | ||
| 806 | |||
| 807 | # | ||
| 808 | # USB-based Watchdog Cards | ||
| 809 | # | ||
| 810 | # CONFIG_USBPCWATCHDOG is not set | ||
| 811 | |||
| 812 | # | ||
| 813 | # Sonics Silicon Backplane | ||
| 814 | # | ||
| 815 | CONFIG_SSB_POSSIBLE=y | ||
| 816 | # CONFIG_SSB is not set | ||
| 817 | |||
| 818 | # | ||
| 819 | # Multifunction device drivers | ||
| 820 | # | ||
| 821 | # CONFIG_MFD_SM501 is not set | ||
| 822 | |||
| 823 | # | ||
| 824 | # Multimedia devices | ||
| 825 | # | ||
| 826 | # CONFIG_VIDEO_DEV is not set | ||
| 827 | # CONFIG_DVB_CORE is not set | ||
| 828 | # CONFIG_DAB is not set | ||
| 829 | |||
| 830 | # | ||
| 831 | # Graphics support | ||
| 832 | # | ||
| 833 | # CONFIG_VGASTATE is not set | ||
| 834 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 835 | # CONFIG_FB is not set | ||
| 836 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 837 | |||
| 838 | # | ||
| 839 | # Display device support | ||
| 840 | # | ||
| 841 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 842 | |||
| 843 | # | ||
| 844 | # Sound | ||
| 845 | # | ||
| 846 | # CONFIG_SOUND is not set | ||
| 847 | CONFIG_USB_SUPPORT=y | ||
| 848 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 849 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 850 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
| 851 | CONFIG_USB=y | ||
| 852 | # CONFIG_USB_DEBUG is not set | ||
| 853 | |||
| 854 | # | ||
| 855 | # Miscellaneous USB options | ||
| 856 | # | ||
| 857 | # CONFIG_USB_DEVICEFS is not set | ||
| 858 | CONFIG_USB_DEVICE_CLASS=y | ||
| 859 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
| 860 | # CONFIG_USB_OTG is not set | ||
| 861 | # CONFIG_USB_OTG_WHITELIST is not set | ||
| 862 | CONFIG_USB_OTG_BLACKLIST_HUB=y | ||
| 863 | |||
| 864 | # | ||
| 865 | # USB Host Controller Drivers | ||
| 866 | # | ||
| 867 | # CONFIG_USB_ISP116X_HCD is not set | ||
| 868 | # CONFIG_USB_ISP1362_HCD is not set | ||
| 869 | # CONFIG_USB_ISP1760_HCD is not set | ||
| 870 | # CONFIG_USB_SL811_HCD is not set | ||
| 871 | # CONFIG_USB_R8A66597_HCD is not set | ||
| 872 | CONFIG_USB_MUSB_HDRC=y | ||
| 873 | CONFIG_USB_MUSB_SOC=y | ||
| 874 | |||
| 875 | # | ||
| 876 | # Blackfin high speed USB support | ||
| 877 | # | ||
| 878 | CONFIG_USB_MUSB_HOST=y | ||
| 879 | # CONFIG_USB_MUSB_PERIPHERAL is not set | ||
| 880 | # CONFIG_USB_MUSB_OTG is not set | ||
| 881 | CONFIG_USB_MUSB_HDRC_HCD=y | ||
| 882 | CONFIG_MUSB_PIO_ONLY=y | ||
| 883 | CONFIG_USB_MUSB_LOGLEVEL=0 | ||
| 884 | |||
| 885 | # | ||
| 886 | # USB Device Class drivers | ||
| 887 | # | ||
| 888 | # CONFIG_USB_ACM is not set | ||
| 889 | # CONFIG_USB_PRINTER is not set | ||
| 890 | |||
| 891 | # | ||
| 892 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
| 893 | # | ||
| 894 | |||
| 895 | # | ||
| 896 | # may also be needed; see USB_STORAGE Help for more information | ||
| 897 | # | ||
| 898 | # CONFIG_USB_LIBUSUAL is not set | ||
| 899 | |||
| 900 | # | ||
| 901 | # USB Imaging devices | ||
| 902 | # | ||
| 903 | # CONFIG_USB_MDC800 is not set | ||
| 904 | CONFIG_USB_MON=y | ||
| 905 | |||
| 906 | # | ||
| 907 | # USB port drivers | ||
| 908 | # | ||
| 909 | |||
| 910 | # | ||
| 911 | # USB Serial Converter support | ||
| 912 | # | ||
| 913 | # CONFIG_USB_SERIAL is not set | ||
| 914 | |||
| 915 | # | ||
| 916 | # USB Miscellaneous drivers | ||
| 917 | # | ||
| 918 | # CONFIG_USB_EMI62 is not set | ||
| 919 | # CONFIG_USB_EMI26 is not set | ||
| 920 | # CONFIG_USB_ADUTUX is not set | ||
| 921 | # CONFIG_USB_AUERSWALD is not set | ||
| 922 | # CONFIG_USB_RIO500 is not set | ||
| 923 | # CONFIG_USB_LEGOTOWER is not set | ||
| 924 | # CONFIG_USB_LCD is not set | ||
| 925 | # CONFIG_USB_BERRY_CHARGE is not set | ||
| 926 | # CONFIG_USB_LED is not set | ||
| 927 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
| 928 | # CONFIG_USB_CYTHERM is not set | ||
| 929 | # CONFIG_USB_PHIDGET is not set | ||
| 930 | # CONFIG_USB_IDMOUSE is not set | ||
| 931 | # CONFIG_USB_FTDI_ELAN is not set | ||
| 932 | # CONFIG_USB_APPLEDISPLAY is not set | ||
| 933 | # CONFIG_USB_SISUSBVGA is not set | ||
| 934 | # CONFIG_USB_LD is not set | ||
| 935 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
| 936 | # CONFIG_USB_IOWARRIOR is not set | ||
| 937 | |||
| 938 | # | ||
| 939 | # USB DSL modem support | ||
| 940 | # | ||
| 941 | |||
| 942 | # | ||
| 943 | # USB Gadget Support | ||
| 944 | # | ||
| 945 | # CONFIG_USB_GADGET is not set | ||
| 946 | # CONFIG_MMC is not set | ||
| 947 | # CONFIG_NEW_LEDS is not set | ||
| 948 | CONFIG_RTC_LIB=y | ||
| 949 | CONFIG_RTC_CLASS=y | ||
| 950 | CONFIG_RTC_HCTOSYS=y | ||
| 951 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 952 | # CONFIG_RTC_DEBUG is not set | ||
| 953 | |||
| 954 | # | ||
| 955 | # RTC interfaces | ||
| 956 | # | ||
| 957 | CONFIG_RTC_INTF_SYSFS=y | ||
| 958 | CONFIG_RTC_INTF_PROC=y | ||
| 959 | CONFIG_RTC_INTF_DEV=y | ||
| 960 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 961 | # CONFIG_RTC_DRV_TEST is not set | ||
| 962 | |||
| 963 | # | ||
| 964 | # I2C RTC drivers | ||
| 965 | # | ||
| 966 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 967 | # CONFIG_RTC_DRV_DS1374 is not set | ||
| 968 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 969 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 970 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 971 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 972 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 973 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 974 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 975 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 976 | |||
| 977 | # | ||
| 978 | # SPI RTC drivers | ||
| 979 | # | ||
| 980 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
| 981 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
| 982 | |||
| 983 | # | ||
| 984 | # Platform RTC drivers | ||
| 985 | # | ||
| 986 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 987 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 988 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 989 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 990 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 991 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 992 | |||
| 993 | # | ||
| 994 | # on-CPU RTC drivers | ||
| 995 | # | ||
| 996 | CONFIG_RTC_DRV_BFIN=y | ||
| 997 | |||
| 998 | # | ||
| 999 | # Userspace I/O | ||
| 1000 | # | ||
| 1001 | # CONFIG_UIO is not set | ||
| 1002 | |||
| 1003 | # | ||
| 1004 | # File systems | ||
| 1005 | # | ||
| 1006 | # CONFIG_EXT2_FS is not set | ||
| 1007 | # CONFIG_EXT3_FS is not set | ||
| 1008 | # CONFIG_EXT4DEV_FS is not set | ||
| 1009 | # CONFIG_REISERFS_FS is not set | ||
| 1010 | # CONFIG_JFS_FS is not set | ||
| 1011 | # CONFIG_FS_POSIX_ACL is not set | ||
| 1012 | # CONFIG_XFS_FS is not set | ||
| 1013 | # CONFIG_GFS2_FS is not set | ||
| 1014 | # CONFIG_OCFS2_FS is not set | ||
| 1015 | # CONFIG_MINIX_FS is not set | ||
| 1016 | # CONFIG_ROMFS_FS is not set | ||
| 1017 | CONFIG_INOTIFY=y | ||
| 1018 | CONFIG_INOTIFY_USER=y | ||
| 1019 | # CONFIG_QUOTA is not set | ||
| 1020 | # CONFIG_DNOTIFY is not set | ||
| 1021 | # CONFIG_AUTOFS_FS is not set | ||
| 1022 | # CONFIG_AUTOFS4_FS is not set | ||
| 1023 | # CONFIG_FUSE_FS is not set | ||
| 1024 | |||
| 1025 | # | ||
| 1026 | # CD-ROM/DVD Filesystems | ||
| 1027 | # | ||
| 1028 | # CONFIG_ISO9660_FS is not set | ||
| 1029 | # CONFIG_UDF_FS is not set | ||
| 1030 | |||
| 1031 | # | ||
| 1032 | # DOS/FAT/NT Filesystems | ||
| 1033 | # | ||
| 1034 | # CONFIG_MSDOS_FS is not set | ||
| 1035 | # CONFIG_VFAT_FS is not set | ||
| 1036 | # CONFIG_NTFS_FS is not set | ||
| 1037 | |||
| 1038 | # | ||
| 1039 | # Pseudo filesystems | ||
| 1040 | # | ||
| 1041 | CONFIG_PROC_FS=y | ||
| 1042 | CONFIG_PROC_SYSCTL=y | ||
| 1043 | CONFIG_SYSFS=y | ||
| 1044 | # CONFIG_TMPFS is not set | ||
| 1045 | # CONFIG_HUGETLB_PAGE is not set | ||
| 1046 | # CONFIG_CONFIGFS_FS is not set | ||
| 1047 | |||
| 1048 | # | ||
| 1049 | # Miscellaneous filesystems | ||
| 1050 | # | ||
| 1051 | # CONFIG_ADFS_FS is not set | ||
| 1052 | # CONFIG_AFFS_FS is not set | ||
| 1053 | # CONFIG_HFS_FS is not set | ||
| 1054 | # CONFIG_HFSPLUS_FS is not set | ||
| 1055 | # CONFIG_BEFS_FS is not set | ||
| 1056 | # CONFIG_BFS_FS is not set | ||
| 1057 | # CONFIG_EFS_FS is not set | ||
| 1058 | # CONFIG_YAFFS_FS is not set | ||
| 1059 | # CONFIG_JFFS2_FS is not set | ||
| 1060 | # CONFIG_CRAMFS is not set | ||
| 1061 | # CONFIG_VXFS_FS is not set | ||
| 1062 | # CONFIG_HPFS_FS is not set | ||
| 1063 | # CONFIG_QNX4FS_FS is not set | ||
| 1064 | # CONFIG_SYSV_FS is not set | ||
| 1065 | # CONFIG_UFS_FS is not set | ||
| 1066 | CONFIG_NETWORK_FILESYSTEMS=y | ||
| 1067 | CONFIG_NFS_FS=m | ||
| 1068 | CONFIG_NFS_V3=y | ||
| 1069 | # CONFIG_NFS_V3_ACL is not set | ||
| 1070 | # CONFIG_NFS_V4 is not set | ||
| 1071 | # CONFIG_NFS_DIRECTIO is not set | ||
| 1072 | # CONFIG_NFSD is not set | ||
| 1073 | CONFIG_LOCKD=m | ||
| 1074 | CONFIG_LOCKD_V4=y | ||
| 1075 | CONFIG_NFS_COMMON=y | ||
| 1076 | CONFIG_SUNRPC=m | ||
| 1077 | # CONFIG_SUNRPC_BIND34 is not set | ||
| 1078 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
| 1079 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 1080 | CONFIG_SMB_FS=m | ||
| 1081 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
| 1082 | # CONFIG_CIFS is not set | ||
| 1083 | # CONFIG_NCP_FS is not set | ||
| 1084 | # CONFIG_CODA_FS is not set | ||
| 1085 | # CONFIG_AFS_FS is not set | ||
| 1086 | |||
| 1087 | # | ||
| 1088 | # Partition Types | ||
| 1089 | # | ||
| 1090 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 1091 | CONFIG_MSDOS_PARTITION=y | ||
| 1092 | CONFIG_NLS=m | ||
| 1093 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
| 1094 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
| 1095 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
| 1096 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
| 1097 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
| 1098 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
| 1099 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
| 1100 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
| 1101 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
| 1102 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
| 1103 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
| 1104 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
| 1105 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
| 1106 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
| 1107 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
| 1108 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
| 1109 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
| 1110 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
| 1111 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
| 1112 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
| 1113 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
| 1114 | # CONFIG_NLS_ISO8859_8 is not set | ||
| 1115 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
| 1116 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
| 1117 | # CONFIG_NLS_ASCII is not set | ||
| 1118 | # CONFIG_NLS_ISO8859_1 is not set | ||
| 1119 | # CONFIG_NLS_ISO8859_2 is not set | ||
| 1120 | # CONFIG_NLS_ISO8859_3 is not set | ||
| 1121 | # CONFIG_NLS_ISO8859_4 is not set | ||
| 1122 | # CONFIG_NLS_ISO8859_5 is not set | ||
| 1123 | # CONFIG_NLS_ISO8859_6 is not set | ||
| 1124 | # CONFIG_NLS_ISO8859_7 is not set | ||
| 1125 | # CONFIG_NLS_ISO8859_9 is not set | ||
| 1126 | # CONFIG_NLS_ISO8859_13 is not set | ||
| 1127 | # CONFIG_NLS_ISO8859_14 is not set | ||
| 1128 | # CONFIG_NLS_ISO8859_15 is not set | ||
| 1129 | # CONFIG_NLS_KOI8_R is not set | ||
| 1130 | # CONFIG_NLS_KOI8_U is not set | ||
| 1131 | # CONFIG_NLS_UTF8 is not set | ||
| 1132 | # CONFIG_DLM is not set | ||
| 1133 | # CONFIG_INSTRUMENTATION is not set | ||
| 1134 | |||
| 1135 | # | ||
| 1136 | # Kernel hacking | ||
| 1137 | # | ||
| 1138 | # CONFIG_PRINTK_TIME is not set | ||
| 1139 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1140 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 1141 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 1142 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 1143 | CONFIG_DEBUG_FS=y | ||
| 1144 | # CONFIG_HEADERS_CHECK is not set | ||
| 1145 | # CONFIG_DEBUG_KERNEL is not set | ||
| 1146 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 1147 | # CONFIG_SAMPLES is not set | ||
| 1148 | CONFIG_DEBUG_MMRS=y | ||
| 1149 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | ||
| 1150 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | ||
| 1151 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | ||
| 1152 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set | ||
| 1153 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set | ||
| 1154 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 | ||
| 1155 | # CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set | ||
| 1156 | # CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set | ||
| 1157 | CONFIG_EARLY_PRINTK=y | ||
| 1158 | # CONFIG_CPLB_INFO is not set | ||
| 1159 | CONFIG_ACCESS_CHECK=y | ||
| 1160 | |||
| 1161 | # | ||
| 1162 | # Security options | ||
| 1163 | # | ||
| 1164 | # CONFIG_KEYS is not set | ||
| 1165 | CONFIG_SECURITY=y | ||
| 1166 | # CONFIG_SECURITY_NETWORK is not set | ||
| 1167 | # CONFIG_SECURITY_CAPABILITIES is not set | ||
| 1168 | # CONFIG_SECURITY_ROOTPLUG is not set | ||
| 1169 | # CONFIG_CRYPTO is not set | ||
| 1170 | |||
| 1171 | # | ||
| 1172 | # Library routines | ||
| 1173 | # | ||
| 1174 | CONFIG_BITREVERSE=y | ||
| 1175 | CONFIG_CRC_CCITT=m | ||
| 1176 | # CONFIG_CRC16 is not set | ||
| 1177 | # CONFIG_CRC_ITU_T is not set | ||
| 1178 | CONFIG_CRC32=y | ||
| 1179 | # CONFIG_CRC7 is not set | ||
| 1180 | # CONFIG_LIBCRC32C is not set | ||
| 1181 | CONFIG_ZLIB_INFLATE=y | ||
| 1182 | CONFIG_PLIST=y | ||
| 1183 | CONFIG_HAS_IOMEM=y | ||
| 1184 | CONFIG_HAS_IOPORT=y | ||
| 1185 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig index 560890fe0d30..09deea44480b 100644 --- a/arch/blackfin/configs/CM-BF533_defconfig +++ b/arch/blackfin/configs/CM-BF533_defconfig | |||
| @@ -39,7 +39,8 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
| 39 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 40 | # CONFIG_UTS_NS is not set |
| 41 | # CONFIG_AUDIT is not set | 41 | # CONFIG_AUDIT is not set |
| 42 | # CONFIG_IKCONFIG is not set | 42 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | ||
| 43 | CONFIG_LOG_BUF_SHIFT=14 | 44 | CONFIG_LOG_BUF_SHIFT=14 |
| 44 | CONFIG_SYSFS_DEPRECATED=y | 45 | CONFIG_SYSFS_DEPRECATED=y |
| 45 | # CONFIG_RELAY is not set | 46 | # CONFIG_RELAY is not set |
| @@ -291,7 +292,7 @@ CONFIG_C_AMBEN_ALL=y | |||
| 291 | CONFIG_BANK_0=0x7BB0 | 292 | CONFIG_BANK_0=0x7BB0 |
| 292 | CONFIG_BANK_1=0x7BB0 | 293 | CONFIG_BANK_1=0x7BB0 |
| 293 | CONFIG_BANK_2=0x7BB0 | 294 | CONFIG_BANK_2=0x7BB0 |
| 294 | CONFIG_BANK_3=0xFFC3 | 295 | CONFIG_BANK_3=0xFFC2 |
| 295 | 296 | ||
| 296 | # | 297 | # |
| 297 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 298 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| @@ -617,8 +618,7 @@ CONFIG_SERIAL_CORE=y | |||
| 617 | CONFIG_SERIAL_CORE_CONSOLE=y | 618 | CONFIG_SERIAL_CORE_CONSOLE=y |
| 618 | # CONFIG_SERIAL_BFIN_SPORT is not set | 619 | # CONFIG_SERIAL_BFIN_SPORT is not set |
| 619 | CONFIG_UNIX98_PTYS=y | 620 | CONFIG_UNIX98_PTYS=y |
| 620 | CONFIG_LEGACY_PTYS=y | 621 | # CONFIG_LEGACY_PTYS is not set |
| 621 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 622 | 622 | ||
| 623 | # | 623 | # |
| 624 | # CAN, the car bus and industrial fieldbus | 624 | # CAN, the car bus and industrial fieldbus |
| @@ -778,7 +778,7 @@ CONFIG_FS_MBCACHE=y | |||
| 778 | CONFIG_INOTIFY=y | 778 | CONFIG_INOTIFY=y |
| 779 | CONFIG_INOTIFY_USER=y | 779 | CONFIG_INOTIFY_USER=y |
| 780 | # CONFIG_QUOTA is not set | 780 | # CONFIG_QUOTA is not set |
| 781 | CONFIG_DNOTIFY=y | 781 | # CONFIG_DNOTIFY is not set |
| 782 | # CONFIG_AUTOFS_FS is not set | 782 | # CONFIG_AUTOFS_FS is not set |
| 783 | # CONFIG_AUTOFS4_FS is not set | 783 | # CONFIG_AUTOFS4_FS is not set |
| 784 | # CONFIG_FUSE_FS is not set | 784 | # CONFIG_FUSE_FS is not set |
| @@ -866,11 +866,11 @@ CONFIG_MSDOS_PARTITION=y | |||
| 866 | CONFIG_ENABLE_MUST_CHECK=y | 866 | CONFIG_ENABLE_MUST_CHECK=y |
| 867 | # CONFIG_MAGIC_SYSRQ is not set | 867 | # CONFIG_MAGIC_SYSRQ is not set |
| 868 | # CONFIG_UNUSED_SYMBOLS is not set | 868 | # CONFIG_UNUSED_SYMBOLS is not set |
| 869 | # CONFIG_DEBUG_FS is not set | 869 | CONFIG_DEBUG_FS=y |
| 870 | # CONFIG_HEADERS_CHECK is not set | 870 | # CONFIG_HEADERS_CHECK is not set |
| 871 | # CONFIG_DEBUG_KERNEL is not set | 871 | # CONFIG_DEBUG_KERNEL is not set |
| 872 | # CONFIG_DEBUG_BUGVERBOSE is not set | 872 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 873 | # CONFIG_DEBUG_MMRS is not set | 873 | CONFIG_DEBUG_MMRS=y |
| 874 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 874 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 875 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 875 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| 876 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | 876 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y |
diff --git a/arch/blackfin/configs/CM-BF537E_defconfig b/arch/blackfin/configs/CM-BF537E_defconfig index 9f66d2de1007..219fc345a5f5 100644 --- a/arch/blackfin/configs/CM-BF537E_defconfig +++ b/arch/blackfin/configs/CM-BF537E_defconfig | |||
| @@ -39,7 +39,8 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
| 39 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 40 | # CONFIG_UTS_NS is not set |
| 41 | # CONFIG_AUDIT is not set | 41 | # CONFIG_AUDIT is not set |
| 42 | # CONFIG_IKCONFIG is not set | 42 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | ||
| 43 | CONFIG_LOG_BUF_SHIFT=14 | 44 | CONFIG_LOG_BUF_SHIFT=14 |
| 44 | CONFIG_SYSFS_DEPRECATED=y | 45 | CONFIG_SYSFS_DEPRECATED=y |
| 45 | # CONFIG_RELAY is not set | 46 | # CONFIG_RELAY is not set |
| @@ -299,7 +300,7 @@ CONFIG_C_AMBEN_ALL=y | |||
| 299 | CONFIG_BANK_0=0x7BB0 | 300 | CONFIG_BANK_0=0x7BB0 |
| 300 | CONFIG_BANK_1=0x7BB0 | 301 | CONFIG_BANK_1=0x7BB0 |
| 301 | CONFIG_BANK_2=0x7BB0 | 302 | CONFIG_BANK_2=0x7BB0 |
| 302 | CONFIG_BANK_3=0xFFC3 | 303 | CONFIG_BANK_3=0xFFC2 |
| 303 | 304 | ||
| 304 | # | 305 | # |
| 305 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 306 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| @@ -351,7 +352,10 @@ CONFIG_INET=y | |||
| 351 | # CONFIG_IP_MULTICAST is not set | 352 | # CONFIG_IP_MULTICAST is not set |
| 352 | # CONFIG_IP_ADVANCED_ROUTER is not set | 353 | # CONFIG_IP_ADVANCED_ROUTER is not set |
| 353 | CONFIG_IP_FIB_HASH=y | 354 | CONFIG_IP_FIB_HASH=y |
| 354 | # CONFIG_IP_PNP is not set | 355 | CONFIG_IP_PNP=y |
| 356 | # CONFIG_IP_PNP_DHCP is not set | ||
| 357 | # CONFIG_IP_PNP_BOOTP is not set | ||
| 358 | # CONFIG_IP_PNP_RARP is not set | ||
| 355 | # CONFIG_NET_IPIP is not set | 359 | # CONFIG_NET_IPIP is not set |
| 356 | # CONFIG_NET_IPGRE is not set | 360 | # CONFIG_NET_IPGRE is not set |
| 357 | # CONFIG_ARPD is not set | 361 | # CONFIG_ARPD is not set |
| @@ -645,8 +649,7 @@ CONFIG_SERIAL_CORE=y | |||
| 645 | CONFIG_SERIAL_CORE_CONSOLE=y | 649 | CONFIG_SERIAL_CORE_CONSOLE=y |
| 646 | # CONFIG_SERIAL_BFIN_SPORT is not set | 650 | # CONFIG_SERIAL_BFIN_SPORT is not set |
| 647 | CONFIG_UNIX98_PTYS=y | 651 | CONFIG_UNIX98_PTYS=y |
| 648 | CONFIG_LEGACY_PTYS=y | 652 | # CONFIG_LEGACY_PTYS is not set |
| 649 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 650 | 653 | ||
| 651 | # | 654 | # |
| 652 | # CAN, the car bus and industrial fieldbus | 655 | # CAN, the car bus and industrial fieldbus |
| @@ -806,7 +809,7 @@ CONFIG_FS_MBCACHE=y | |||
| 806 | CONFIG_INOTIFY=y | 809 | CONFIG_INOTIFY=y |
| 807 | CONFIG_INOTIFY_USER=y | 810 | CONFIG_INOTIFY_USER=y |
| 808 | # CONFIG_QUOTA is not set | 811 | # CONFIG_QUOTA is not set |
| 809 | CONFIG_DNOTIFY=y | 812 | # CONFIG_DNOTIFY is not set |
| 810 | # CONFIG_AUTOFS_FS is not set | 813 | # CONFIG_AUTOFS_FS is not set |
| 811 | # CONFIG_AUTOFS4_FS is not set | 814 | # CONFIG_AUTOFS4_FS is not set |
| 812 | # CONFIG_FUSE_FS is not set | 815 | # CONFIG_FUSE_FS is not set |
| @@ -894,12 +897,12 @@ CONFIG_MSDOS_PARTITION=y | |||
| 894 | CONFIG_ENABLE_MUST_CHECK=y | 897 | CONFIG_ENABLE_MUST_CHECK=y |
| 895 | # CONFIG_MAGIC_SYSRQ is not set | 898 | # CONFIG_MAGIC_SYSRQ is not set |
| 896 | # CONFIG_UNUSED_SYMBOLS is not set | 899 | # CONFIG_UNUSED_SYMBOLS is not set |
| 897 | # CONFIG_DEBUG_FS is not set | 900 | CONFIG_DEBUG_FS=y |
| 898 | # CONFIG_HEADERS_CHECK is not set | 901 | # CONFIG_HEADERS_CHECK is not set |
| 899 | # CONFIG_DEBUG_KERNEL is not set | 902 | # CONFIG_DEBUG_KERNEL is not set |
| 900 | # CONFIG_DEBUG_BUGVERBOSE is not set | 903 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 901 | # CONFIG_DEBUG_MMRS is not set | 904 | CONFIG_DEBUG_MMRS=y |
| 902 | # CONFIG_DEBUG_HUNT_FOR_ZERO is not set | 905 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 903 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 906 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| 904 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | 907 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y |
| 905 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set | 908 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set |
diff --git a/arch/blackfin/configs/CM-BF537U_defconfig b/arch/blackfin/configs/CM-BF537U_defconfig index 2694d06c5bde..9873d586fc77 100644 --- a/arch/blackfin/configs/CM-BF537U_defconfig +++ b/arch/blackfin/configs/CM-BF537U_defconfig | |||
| @@ -39,7 +39,8 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
| 39 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
| 40 | # CONFIG_UTS_NS is not set | 40 | # CONFIG_UTS_NS is not set |
| 41 | # CONFIG_AUDIT is not set | 41 | # CONFIG_AUDIT is not set |
| 42 | # CONFIG_IKCONFIG is not set | 42 | CONFIG_IKCONFIG=y |
| 43 | CONFIG_IKCONFIG_PROC=y | ||
| 43 | CONFIG_LOG_BUF_SHIFT=14 | 44 | CONFIG_LOG_BUF_SHIFT=14 |
| 44 | CONFIG_SYSFS_DEPRECATED=y | 45 | CONFIG_SYSFS_DEPRECATED=y |
| 45 | # CONFIG_RELAY is not set | 46 | # CONFIG_RELAY is not set |
| @@ -298,8 +299,8 @@ CONFIG_C_AMBEN_ALL=y | |||
| 298 | # | 299 | # |
| 299 | CONFIG_BANK_0=0x7BB0 | 300 | CONFIG_BANK_0=0x7BB0 |
| 300 | CONFIG_BANK_1=0x7BB0 | 301 | CONFIG_BANK_1=0x7BB0 |
| 301 | CONFIG_BANK_2=0xFFC3 | 302 | CONFIG_BANK_2=0xFFC2 |
| 302 | CONFIG_BANK_3=0xFFC3 | 303 | CONFIG_BANK_3=0xFFC2 |
| 303 | 304 | ||
| 304 | # | 305 | # |
| 305 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 306 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| @@ -628,8 +629,7 @@ CONFIG_SERIAL_CORE=y | |||
| 628 | CONFIG_SERIAL_CORE_CONSOLE=y | 629 | CONFIG_SERIAL_CORE_CONSOLE=y |
| 629 | # CONFIG_SERIAL_BFIN_SPORT is not set | 630 | # CONFIG_SERIAL_BFIN_SPORT is not set |
| 630 | CONFIG_UNIX98_PTYS=y | 631 | CONFIG_UNIX98_PTYS=y |
| 631 | CONFIG_LEGACY_PTYS=y | 632 | # CONFIG_LEGACY_PTYS is not set |
| 632 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 633 | 633 | ||
| 634 | # | 634 | # |
| 635 | # CAN, the car bus and industrial fieldbus | 635 | # CAN, the car bus and industrial fieldbus |
| @@ -806,7 +806,7 @@ CONFIG_FS_MBCACHE=y | |||
| 806 | CONFIG_INOTIFY=y | 806 | CONFIG_INOTIFY=y |
| 807 | CONFIG_INOTIFY_USER=y | 807 | CONFIG_INOTIFY_USER=y |
| 808 | # CONFIG_QUOTA is not set | 808 | # CONFIG_QUOTA is not set |
| 809 | CONFIG_DNOTIFY=y | 809 | # CONFIG_DNOTIFY is not set |
| 810 | # CONFIG_AUTOFS_FS is not set | 810 | # CONFIG_AUTOFS_FS is not set |
| 811 | # CONFIG_AUTOFS4_FS is not set | 811 | # CONFIG_AUTOFS4_FS is not set |
| 812 | # CONFIG_FUSE_FS is not set | 812 | # CONFIG_FUSE_FS is not set |
| @@ -894,12 +894,12 @@ CONFIG_MSDOS_PARTITION=y | |||
| 894 | CONFIG_ENABLE_MUST_CHECK=y | 894 | CONFIG_ENABLE_MUST_CHECK=y |
| 895 | # CONFIG_MAGIC_SYSRQ is not set | 895 | # CONFIG_MAGIC_SYSRQ is not set |
| 896 | # CONFIG_UNUSED_SYMBOLS is not set | 896 | # CONFIG_UNUSED_SYMBOLS is not set |
| 897 | # CONFIG_DEBUG_FS is not set | 897 | CONFIG_DEBUG_FS=y |
| 898 | # CONFIG_HEADERS_CHECK is not set | 898 | # CONFIG_HEADERS_CHECK is not set |
| 899 | # CONFIG_DEBUG_KERNEL is not set | 899 | # CONFIG_DEBUG_KERNEL is not set |
| 900 | # CONFIG_DEBUG_BUGVERBOSE is not set | 900 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 901 | # CONFIG_DEBUG_MMRS is not set | 901 | CONFIG_DEBUG_MMRS=y |
| 902 | # CONFIG_DEBUG_HUNT_FOR_ZERO is not set | 902 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 903 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 903 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| 904 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | 904 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y |
| 905 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set | 905 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set |
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig index 90207251c533..0e3605fdb7b0 100644 --- a/arch/blackfin/configs/CM-BF548_defconfig +++ b/arch/blackfin/configs/CM-BF548_defconfig | |||
| @@ -363,7 +363,7 @@ CONFIG_C_AMBEN_ALL=y | |||
| 363 | CONFIG_BANK_0=0x7BB0 | 363 | CONFIG_BANK_0=0x7BB0 |
| 364 | CONFIG_BANK_1=0x5554 | 364 | CONFIG_BANK_1=0x5554 |
| 365 | CONFIG_BANK_2=0x7BB0 | 365 | CONFIG_BANK_2=0x7BB0 |
| 366 | CONFIG_BANK_3=0x99B3 | 366 | CONFIG_BANK_3=0x99B2 |
| 367 | CONFIG_EBIU_MBSCTLVAL=0x0 | 367 | CONFIG_EBIU_MBSCTLVAL=0x0 |
| 368 | CONFIG_EBIU_MODEVAL=0x1 | 368 | CONFIG_EBIU_MODEVAL=0x1 |
| 369 | CONFIG_EBIU_FCTLVAL=0x6 | 369 | CONFIG_EBIU_FCTLVAL=0x6 |
| @@ -744,8 +744,8 @@ CONFIG_BFIN_OTP=y | |||
| 744 | # | 744 | # |
| 745 | CONFIG_SERIAL_BFIN=y | 745 | CONFIG_SERIAL_BFIN=y |
| 746 | CONFIG_SERIAL_BFIN_CONSOLE=y | 746 | CONFIG_SERIAL_BFIN_CONSOLE=y |
| 747 | # CONFIG_SERIAL_BFIN_DMA is not set | 747 | CONFIG_SERIAL_BFIN_DMA=y |
| 748 | CONFIG_SERIAL_BFIN_PIO=y | 748 | # CONFIG_SERIAL_BFIN_PIO is not set |
| 749 | # CONFIG_SERIAL_BFIN_UART0 is not set | 749 | # CONFIG_SERIAL_BFIN_UART0 is not set |
| 750 | CONFIG_SERIAL_BFIN_UART1=y | 750 | CONFIG_SERIAL_BFIN_UART1=y |
| 751 | # CONFIG_BFIN_UART1_CTSRTS is not set | 751 | # CONFIG_BFIN_UART1_CTSRTS is not set |
| @@ -1149,7 +1149,7 @@ CONFIG_RTC_DRV_BFIN=y | |||
| 1149 | CONFIG_INOTIFY=y | 1149 | CONFIG_INOTIFY=y |
| 1150 | CONFIG_INOTIFY_USER=y | 1150 | CONFIG_INOTIFY_USER=y |
| 1151 | # CONFIG_QUOTA is not set | 1151 | # CONFIG_QUOTA is not set |
| 1152 | CONFIG_DNOTIFY=y | 1152 | # CONFIG_DNOTIFY is not set |
| 1153 | # CONFIG_AUTOFS_FS is not set | 1153 | # CONFIG_AUTOFS_FS is not set |
| 1154 | # CONFIG_AUTOFS4_FS is not set | 1154 | # CONFIG_AUTOFS4_FS is not set |
| 1155 | # CONFIG_FUSE_FS is not set | 1155 | # CONFIG_FUSE_FS is not set |
| @@ -1332,7 +1332,7 @@ CONFIG_DEBUG_FS=y | |||
| 1332 | # CONFIG_DEBUG_KERNEL is not set | 1332 | # CONFIG_DEBUG_KERNEL is not set |
| 1333 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1333 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 1334 | # CONFIG_SAMPLES is not set | 1334 | # CONFIG_SAMPLES is not set |
| 1335 | # CONFIG_DEBUG_MMRS is not set | 1335 | CONFIG_DEBUG_MMRS=y |
| 1336 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 1336 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 1337 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 1337 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| 1338 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | 1338 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y |
diff --git a/arch/blackfin/configs/CM-BF561_defconfig b/arch/blackfin/configs/CM-BF561_defconfig index daf00906c1ef..59c7cdbee904 100644 --- a/arch/blackfin/configs/CM-BF561_defconfig +++ b/arch/blackfin/configs/CM-BF561_defconfig | |||
| @@ -35,7 +35,8 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
| 35 | # CONFIG_USER_NS is not set | 35 | # CONFIG_USER_NS is not set |
| 36 | # CONFIG_PID_NS is not set | 36 | # CONFIG_PID_NS is not set |
| 37 | # CONFIG_AUDIT is not set | 37 | # CONFIG_AUDIT is not set |
| 38 | # CONFIG_IKCONFIG is not set | 38 | CONFIG_IKCONFIG=y |
| 39 | CONFIG_IKCONFIG_PROC=y | ||
| 39 | CONFIG_LOG_BUF_SHIFT=14 | 40 | CONFIG_LOG_BUF_SHIFT=14 |
| 40 | # CONFIG_CGROUPS is not set | 41 | # CONFIG_CGROUPS is not set |
| 41 | CONFIG_FAIR_GROUP_SCHED=y | 42 | CONFIG_FAIR_GROUP_SCHED=y |
| @@ -341,7 +342,7 @@ CONFIG_C_AMBEN_ALL=y | |||
| 341 | CONFIG_BANK_0=0x7BB0 | 342 | CONFIG_BANK_0=0x7BB0 |
| 342 | CONFIG_BANK_1=0x7BB0 | 343 | CONFIG_BANK_1=0x7BB0 |
| 343 | CONFIG_BANK_2=0x7BB0 | 344 | CONFIG_BANK_2=0x7BB0 |
| 344 | CONFIG_BANK_3=0xFFC3 | 345 | CONFIG_BANK_3=0xFFC2 |
| 345 | 346 | ||
| 346 | # | 347 | # |
| 347 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 348 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| @@ -631,8 +632,7 @@ CONFIG_SERIAL_CORE=y | |||
| 631 | CONFIG_SERIAL_CORE_CONSOLE=y | 632 | CONFIG_SERIAL_CORE_CONSOLE=y |
| 632 | # CONFIG_SERIAL_BFIN_SPORT is not set | 633 | # CONFIG_SERIAL_BFIN_SPORT is not set |
| 633 | CONFIG_UNIX98_PTYS=y | 634 | CONFIG_UNIX98_PTYS=y |
| 634 | CONFIG_LEGACY_PTYS=y | 635 | # CONFIG_LEGACY_PTYS is not set |
| 635 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 636 | 636 | ||
| 637 | # | 637 | # |
| 638 | # CAN, the car bus and industrial fieldbus | 638 | # CAN, the car bus and industrial fieldbus |
| @@ -756,7 +756,7 @@ CONFIG_FS_MBCACHE=y | |||
| 756 | CONFIG_INOTIFY=y | 756 | CONFIG_INOTIFY=y |
| 757 | CONFIG_INOTIFY_USER=y | 757 | CONFIG_INOTIFY_USER=y |
| 758 | # CONFIG_QUOTA is not set | 758 | # CONFIG_QUOTA is not set |
| 759 | CONFIG_DNOTIFY=y | 759 | # CONFIG_DNOTIFY is not set |
| 760 | # CONFIG_AUTOFS_FS is not set | 760 | # CONFIG_AUTOFS_FS is not set |
| 761 | # CONFIG_AUTOFS4_FS is not set | 761 | # CONFIG_AUTOFS4_FS is not set |
| 762 | # CONFIG_FUSE_FS is not set | 762 | # CONFIG_FUSE_FS is not set |
| @@ -830,12 +830,12 @@ CONFIG_ENABLE_WARN_DEPRECATED=y | |||
| 830 | CONFIG_ENABLE_MUST_CHECK=y | 830 | CONFIG_ENABLE_MUST_CHECK=y |
| 831 | # CONFIG_MAGIC_SYSRQ is not set | 831 | # CONFIG_MAGIC_SYSRQ is not set |
| 832 | # CONFIG_UNUSED_SYMBOLS is not set | 832 | # CONFIG_UNUSED_SYMBOLS is not set |
| 833 | # CONFIG_DEBUG_FS is not set | 833 | CONFIG_DEBUG_FS=y |
| 834 | # CONFIG_HEADERS_CHECK is not set | 834 | # CONFIG_HEADERS_CHECK is not set |
| 835 | # CONFIG_DEBUG_KERNEL is not set | 835 | # CONFIG_DEBUG_KERNEL is not set |
| 836 | # CONFIG_DEBUG_BUGVERBOSE is not set | 836 | # CONFIG_DEBUG_BUGVERBOSE is not set |
| 837 | # CONFIG_SAMPLES is not set | 837 | # CONFIG_SAMPLES is not set |
| 838 | # CONFIG_DEBUG_MMRS is not set | 838 | CONFIG_DEBUG_MMRS=y |
| 839 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 839 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
| 840 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 840 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
| 841 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | 841 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y |
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig index 679c7483ea71..ba0bee90b7e1 100644 --- a/arch/blackfin/configs/H8606_defconfig +++ b/arch/blackfin/configs/H8606_defconfig | |||
| @@ -967,7 +967,7 @@ CONFIG_FS_MBCACHE=y | |||
| 967 | CONFIG_INOTIFY=y | 967 | CONFIG_INOTIFY=y |
| 968 | CONFIG_INOTIFY_USER=y | 968 | CONFIG_INOTIFY_USER=y |
| 969 | # CONFIG_QUOTA is not set | 969 | # CONFIG_QUOTA is not set |
| 970 | CONFIG_DNOTIFY=y | 970 | # CONFIG_DNOTIFY is not set |
| 971 | # CONFIG_AUTOFS_FS is not set | 971 | # CONFIG_AUTOFS_FS is not set |
| 972 | # CONFIG_AUTOFS4_FS is not set | 972 | # CONFIG_AUTOFS4_FS is not set |
| 973 | # CONFIG_FUSE_FS is not set | 973 | # CONFIG_FUSE_FS is not set |
diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig index 4384a670a8b8..285d2241df26 100644 --- a/arch/blackfin/configs/IP0X_defconfig +++ b/arch/blackfin/configs/IP0X_defconfig | |||
| @@ -1066,7 +1066,7 @@ CONFIG_FS_MBCACHE=y | |||
| 1066 | CONFIG_INOTIFY=y | 1066 | CONFIG_INOTIFY=y |
| 1067 | CONFIG_INOTIFY_USER=y | 1067 | CONFIG_INOTIFY_USER=y |
| 1068 | # CONFIG_QUOTA is not set | 1068 | # CONFIG_QUOTA is not set |
| 1069 | CONFIG_DNOTIFY=y | 1069 | # CONFIG_DNOTIFY is not set |
| 1070 | # CONFIG_AUTOFS_FS is not set | 1070 | # CONFIG_AUTOFS_FS is not set |
| 1071 | # CONFIG_AUTOFS4_FS is not set | 1071 | # CONFIG_AUTOFS4_FS is not set |
| 1072 | # CONFIG_FUSE_FS is not set | 1072 | # CONFIG_FUSE_FS is not set |
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig index 87622ad9df47..bffca7de65d4 100644 --- a/arch/blackfin/configs/PNAV-10_defconfig +++ b/arch/blackfin/configs/PNAV-10_defconfig | |||
| @@ -294,7 +294,7 @@ CONFIG_C_AMBEN_ALL=y | |||
| 294 | CONFIG_BANK_0=0x7BB0 | 294 | CONFIG_BANK_0=0x7BB0 |
| 295 | CONFIG_BANK_1=0x33B0 | 295 | CONFIG_BANK_1=0x33B0 |
| 296 | CONFIG_BANK_2=0x33B0 | 296 | CONFIG_BANK_2=0x33B0 |
| 297 | CONFIG_BANK_3=0x99B3 | 297 | CONFIG_BANK_3=0x99B2 |
| 298 | 298 | ||
| 299 | # | 299 | # |
| 300 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 300 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
| @@ -1080,7 +1080,7 @@ CONFIG_FS_MBCACHE=y | |||
| 1080 | CONFIG_INOTIFY=y | 1080 | CONFIG_INOTIFY=y |
| 1081 | CONFIG_INOTIFY_USER=y | 1081 | CONFIG_INOTIFY_USER=y |
| 1082 | # CONFIG_QUOTA is not set | 1082 | # CONFIG_QUOTA is not set |
| 1083 | CONFIG_DNOTIFY=y | 1083 | # CONFIG_DNOTIFY is not set |
| 1084 | # CONFIG_AUTOFS_FS is not set | 1084 | # CONFIG_AUTOFS_FS is not set |
| 1085 | # CONFIG_AUTOFS4_FS is not set | 1085 | # CONFIG_AUTOFS4_FS is not set |
| 1086 | # CONFIG_FUSE_FS is not set | 1086 | # CONFIG_FUSE_FS is not set |
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig index 951ea0412576..b1309f878fcd 100644 --- a/arch/blackfin/configs/SRV1_defconfig +++ b/arch/blackfin/configs/SRV1_defconfig | |||
| @@ -1067,7 +1067,7 @@ CONFIG_FS_MBCACHE=y | |||
| 1067 | CONFIG_INOTIFY=y | 1067 | CONFIG_INOTIFY=y |
| 1068 | CONFIG_INOTIFY_USER=y | 1068 | CONFIG_INOTIFY_USER=y |
| 1069 | # CONFIG_QUOTA is not set | 1069 | # CONFIG_QUOTA is not set |
| 1070 | CONFIG_DNOTIFY=y | 1070 | # CONFIG_DNOTIFY is not set |
| 1071 | # CONFIG_AUTOFS_FS is not set | 1071 | # CONFIG_AUTOFS_FS is not set |
| 1072 | # CONFIG_AUTOFS4_FS is not set | 1072 | # CONFIG_AUTOFS4_FS is not set |
| 1073 | # CONFIG_FUSE_FS is not set | 1073 | # CONFIG_FUSE_FS is not set |
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile index 6140cd69c782..606adc78aa85 100644 --- a/arch/blackfin/kernel/Makefile +++ b/arch/blackfin/kernel/Makefile | |||
| @@ -18,6 +18,5 @@ endif | |||
| 18 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o | 18 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o |
| 19 | obj-$(CONFIG_MODULES) += module.o | 19 | obj-$(CONFIG_MODULES) += module.o |
| 20 | obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o | 20 | obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o |
| 21 | obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o | ||
| 22 | obj-$(CONFIG_KGDB) += kgdb.o | 21 | obj-$(CONFIG_KGDB) += kgdb.o |
| 23 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 22 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index d54f19085f37..93229b3d6e3e 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
| @@ -472,6 +472,40 @@ unsigned long get_dma_curr_addr(unsigned int channel) | |||
| 472 | } | 472 | } |
| 473 | EXPORT_SYMBOL(get_dma_curr_addr); | 473 | EXPORT_SYMBOL(get_dma_curr_addr); |
| 474 | 474 | ||
| 475 | #ifdef CONFIG_PM | ||
| 476 | int blackfin_dma_suspend(void) | ||
| 477 | { | ||
| 478 | int i; | ||
| 479 | |||
| 480 | #ifdef CONFIG_BF561 /* IMDMA channels doesn't have a PERIPHERAL_MAP */ | ||
| 481 | for (i = 0; i <= CH_MEM_STREAM3_SRC; i++) { | ||
| 482 | #else | ||
| 483 | for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) { | ||
| 484 | #endif | ||
| 485 | if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) { | ||
| 486 | printk(KERN_ERR "DMA Channel %d failed to suspend\n", i); | ||
| 487 | return -EBUSY; | ||
| 488 | } | ||
| 489 | |||
| 490 | dma_ch[i].saved_peripheral_map = dma_ch[i].regs->peripheral_map; | ||
| 491 | } | ||
| 492 | |||
| 493 | return 0; | ||
| 494 | } | ||
| 495 | |||
| 496 | void blackfin_dma_resume(void) | ||
| 497 | { | ||
| 498 | int i; | ||
| 499 | |||
| 500 | #ifdef CONFIG_BF561 /* IMDMA channels doesn't have a PERIPHERAL_MAP */ | ||
| 501 | for (i = 0; i <= CH_MEM_STREAM3_SRC; i++) | ||
| 502 | #else | ||
| 503 | for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) | ||
| 504 | #endif | ||
| 505 | dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; | ||
| 506 | } | ||
| 507 | #endif | ||
| 508 | |||
| 475 | static void *__dma_memcpy(void *dest, const void *src, size_t size) | 509 | static void *__dma_memcpy(void *dest, const void *src, size_t size) |
| 476 | { | 510 | { |
| 477 | int direction; /* 1 - address decrease, 0 - address increase */ | 511 | int direction; /* 1 - address decrease, 0 - address increase */ |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index b6d89d1644cc..ecbd141e0ef2 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
| @@ -186,7 +186,10 @@ static struct str_ident { | |||
| 186 | char name[RESOURCE_LABEL_SIZE]; | 186 | char name[RESOURCE_LABEL_SIZE]; |
| 187 | } str_ident[MAX_RESOURCES]; | 187 | } str_ident[MAX_RESOURCES]; |
| 188 | 188 | ||
| 189 | #if defined(CONFIG_PM) && !defined(CONFIG_BF54x) | 189 | #if defined(CONFIG_PM) |
| 190 | #if defined(CONFIG_BF54x) | ||
| 191 | static struct gpio_port_s gpio_bank_saved[gpio_bank(MAX_BLACKFIN_GPIOS)]; | ||
| 192 | #else | ||
| 190 | static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 193 | static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
| 191 | static unsigned char wakeup_flags_map[MAX_BLACKFIN_GPIOS]; | 194 | static unsigned char wakeup_flags_map[MAX_BLACKFIN_GPIOS]; |
| 192 | static struct gpio_port_s gpio_bank_saved[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 195 | static struct gpio_port_s gpio_bank_saved[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
| @@ -206,7 +209,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PORTF_INT | |||
| 206 | #ifdef BF561_FAMILY | 209 | #ifdef BF561_FAMILY |
| 207 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB}; | 210 | static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB}; |
| 208 | #endif | 211 | #endif |
| 209 | 212 | #endif | |
| 210 | #endif /* CONFIG_PM */ | 213 | #endif /* CONFIG_PM */ |
| 211 | 214 | ||
| 212 | #if defined(BF548_FAMILY) | 215 | #if defined(BF548_FAMILY) |
| @@ -667,7 +670,7 @@ static int bfin_gpio_wakeup_type(unsigned gpio, unsigned char type) | |||
| 667 | return 0; | 670 | return 0; |
| 668 | } | 671 | } |
| 669 | 672 | ||
| 670 | u32 bfin_pm_setup(void) | 673 | u32 bfin_pm_standby_setup(void) |
| 671 | { | 674 | { |
| 672 | u16 bank, mask, i, gpio; | 675 | u16 bank, mask, i, gpio; |
| 673 | 676 | ||
| @@ -679,7 +682,7 @@ u32 bfin_pm_setup(void) | |||
| 679 | gpio_bankb[bank]->maskb = 0; | 682 | gpio_bankb[bank]->maskb = 0; |
| 680 | 683 | ||
| 681 | if (mask) { | 684 | if (mask) { |
| 682 | #ifdef BF537_FAMILY | 685 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) |
| 683 | gpio_bank_saved[bank].fer = *port_fer[bank]; | 686 | gpio_bank_saved[bank].fer = *port_fer[bank]; |
| 684 | #endif | 687 | #endif |
| 685 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; | 688 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; |
| @@ -715,7 +718,7 @@ u32 bfin_pm_setup(void) | |||
| 715 | return 0; | 718 | return 0; |
| 716 | } | 719 | } |
| 717 | 720 | ||
| 718 | void bfin_pm_restore(void) | 721 | void bfin_pm_standby_restore(void) |
| 719 | { | 722 | { |
| 720 | u16 bank, mask, i; | 723 | u16 bank, mask, i; |
| 721 | 724 | ||
| @@ -724,7 +727,7 @@ void bfin_pm_restore(void) | |||
| 724 | bank = gpio_bank(i); | 727 | bank = gpio_bank(i); |
| 725 | 728 | ||
| 726 | if (mask) { | 729 | if (mask) { |
| 727 | #ifdef BF537_FAMILY | 730 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) |
| 728 | *port_fer[bank] = gpio_bank_saved[bank].fer; | 731 | *port_fer[bank] = gpio_bank_saved[bank].fer; |
| 729 | #endif | 732 | #endif |
| 730 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; | 733 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; |
| @@ -743,8 +746,111 @@ void bfin_pm_restore(void) | |||
| 743 | AWA_DUMMY_READ(maskb); | 746 | AWA_DUMMY_READ(maskb); |
| 744 | } | 747 | } |
| 745 | 748 | ||
| 749 | void bfin_gpio_pm_hibernate_suspend(void) | ||
| 750 | { | ||
| 751 | int i, bank; | ||
| 752 | |||
| 753 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | ||
| 754 | bank = gpio_bank(i); | ||
| 755 | |||
| 756 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | ||
| 757 | gpio_bank_saved[bank].fer = *port_fer[bank]; | ||
| 758 | #ifdef BF527_FAMILY | ||
| 759 | gpio_bank_saved[bank].mux = *port_mux[bank]; | ||
| 760 | #else | ||
| 761 | if (bank == 0) | ||
| 762 | gpio_bank_saved[bank].mux = bfin_read_PORT_MUX(); | ||
| 763 | #endif | ||
| 764 | #endif | ||
| 765 | gpio_bank_saved[bank].data = gpio_bankb[bank]->data; | ||
| 766 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; | ||
| 767 | gpio_bank_saved[bank].polar = gpio_bankb[bank]->polar; | ||
| 768 | gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; | ||
| 769 | gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; | ||
| 770 | gpio_bank_saved[bank].both = gpio_bankb[bank]->both; | ||
| 771 | gpio_bank_saved[bank].maska = gpio_bankb[bank]->maska; | ||
| 772 | } | ||
| 773 | |||
| 774 | AWA_DUMMY_READ(maska); | ||
| 775 | } | ||
| 776 | |||
| 777 | void bfin_gpio_pm_hibernate_restore(void) | ||
| 778 | { | ||
| 779 | int i, bank; | ||
| 780 | |||
| 781 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | ||
| 782 | bank = gpio_bank(i); | ||
| 783 | |||
| 784 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) | ||
| 785 | #ifdef BF527_FAMILY | ||
| 786 | *port_mux[bank] = gpio_bank_saved[bank].mux; | ||
| 787 | #else | ||
| 788 | if (bank == 0) | ||
| 789 | bfin_write_PORT_MUX(gpio_bank_saved[bank].mux); | ||
| 790 | #endif | ||
| 791 | *port_fer[bank] = gpio_bank_saved[bank].fer; | ||
| 792 | #endif | ||
| 793 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; | ||
| 794 | gpio_bankb[bank]->dir = gpio_bank_saved[bank].dir; | ||
| 795 | gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar; | ||
| 796 | gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; | ||
| 797 | gpio_bankb[bank]->both = gpio_bank_saved[bank].both; | ||
| 798 | |||
| 799 | gpio_bankb[bank]->data_set = gpio_bank_saved[bank].data | ||
| 800 | | gpio_bank_saved[bank].dir; | ||
| 801 | |||
| 802 | gpio_bankb[bank]->maska = gpio_bank_saved[bank].maska; | ||
| 803 | } | ||
| 804 | AWA_DUMMY_READ(maska); | ||
| 805 | } | ||
| 806 | |||
| 807 | |||
| 746 | #endif | 808 | #endif |
| 747 | #else /* BF548_FAMILY */ | 809 | #else /* BF548_FAMILY */ |
| 810 | #ifdef CONFIG_PM | ||
| 811 | |||
| 812 | u32 bfin_pm_standby_setup(void) | ||
| 813 | { | ||
| 814 | return 0; | ||
| 815 | } | ||
| 816 | |||
| 817 | void bfin_pm_standby_restore(void) | ||
| 818 | { | ||
| 819 | |||
| 820 | } | ||
| 821 | |||
| 822 | void bfin_gpio_pm_hibernate_suspend(void) | ||
| 823 | { | ||
| 824 | int i, bank; | ||
| 825 | |||
| 826 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | ||
| 827 | bank = gpio_bank(i); | ||
| 828 | |||
| 829 | gpio_bank_saved[bank].fer = gpio_array[bank]->port_fer; | ||
| 830 | gpio_bank_saved[bank].mux = gpio_array[bank]->port_mux; | ||
| 831 | gpio_bank_saved[bank].data = gpio_array[bank]->port_data; | ||
| 832 | gpio_bank_saved[bank].data = gpio_array[bank]->port_data; | ||
| 833 | gpio_bank_saved[bank].inen = gpio_array[bank]->port_inen; | ||
| 834 | gpio_bank_saved[bank].dir = gpio_array[bank]->port_dir_set; | ||
| 835 | } | ||
| 836 | } | ||
| 837 | |||
| 838 | void bfin_gpio_pm_hibernate_restore(void) | ||
| 839 | { | ||
| 840 | int i, bank; | ||
| 841 | |||
| 842 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | ||
| 843 | bank = gpio_bank(i); | ||
| 844 | |||
| 845 | gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; | ||
| 846 | gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; | ||
| 847 | gpio_array[bank]->port_inen = gpio_bank_saved[bank].inen; | ||
| 848 | gpio_array[bank]->port_dir_set = gpio_bank_saved[bank].dir; | ||
| 849 | gpio_array[bank]->port_set = gpio_bank_saved[bank].data | ||
| 850 | | gpio_bank_saved[bank].dir; | ||
| 851 | } | ||
| 852 | } | ||
| 853 | #endif | ||
| 748 | 854 | ||
| 749 | unsigned short get_gpio_dir(unsigned gpio) | 855 | unsigned short get_gpio_dir(unsigned gpio) |
| 750 | { | 856 | { |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S b/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S index 2788532de72b..ecbabc0a1fed 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S +++ b/arch/blackfin/kernel/cplb-nompu/cplbhdlr.S | |||
| @@ -125,6 +125,6 @@ ENTRY(__cplb_hdr) | |||
| 125 | SP += -12; | 125 | SP += -12; |
| 126 | call _panic_cplb_error; | 126 | call _panic_cplb_error; |
| 127 | SP += 12; | 127 | SP += 12; |
| 128 | JUMP _handle_bad_cplb; | 128 | JUMP.L _handle_bad_cplb; |
| 129 | 129 | ||
| 130 | ENDPROC(__cplb_hdr) | 130 | ENDPROC(__cplb_hdr) |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index 6be0c50122e8..224e7cc30bc5 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c | |||
| @@ -26,11 +26,7 @@ | |||
| 26 | #include <asm/cplb.h> | 26 | #include <asm/cplb.h> |
| 27 | #include <asm/cplbinit.h> | 27 | #include <asm/cplbinit.h> |
| 28 | 28 | ||
| 29 | #ifdef CONFIG_MAX_MEM_SIZE | 29 | #define CPLB_MEM CONFIG_MAX_MEM_SIZE |
| 30 | # define CPLB_MEM CONFIG_MAX_MEM_SIZE | ||
| 31 | #else | ||
| 32 | # define CPLB_MEM CONFIG_MEM_SIZE | ||
| 33 | #endif | ||
| 34 | 30 | ||
| 35 | /* | 31 | /* |
| 36 | * Number of required data CPLB switchtable entries | 32 | * Number of required data CPLB switchtable entries |
diff --git a/arch/blackfin/kernel/dualcore_test.c b/arch/blackfin/kernel/dualcore_test.c deleted file mode 100644 index 0fcba74840b7..000000000000 --- a/arch/blackfin/kernel/dualcore_test.c +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/kernel/dualcore_test.c | ||
| 3 | * Based on: | ||
| 4 | * Author: | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: Small test code for CoreB on a BF561 | ||
| 8 | * | ||
| 9 | * Modified: | ||
| 10 | * Copyright 2004-2006 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 | #include <linux/init.h> | ||
| 31 | #include <linux/module.h> | ||
| 32 | |||
| 33 | static int *testarg = (int *)0xfeb00000; | ||
| 34 | |||
| 35 | static int test_init(void) | ||
| 36 | { | ||
| 37 | *testarg = 1; | ||
| 38 | printk(KERN_INFO "Dual core test module inserted: set testarg = [%d]\n @ [%p]\n", | ||
| 39 | *testarg, testarg); | ||
| 40 | return 0; | ||
| 41 | } | ||
| 42 | |||
| 43 | static void test_exit(void) | ||
| 44 | { | ||
| 45 | printk(KERN_INFO "Dual core test module removed: testarg = [%d]\n", *testarg); | ||
| 46 | } | ||
| 47 | |||
| 48 | module_init(test_init); | ||
| 49 | module_exit(test_exit); | ||
diff --git a/arch/blackfin/kernel/entry.S b/arch/blackfin/kernel/entry.S index 65f4e67a65c4..31bd9bf3efae 100644 --- a/arch/blackfin/kernel/entry.S +++ b/arch/blackfin/kernel/entry.S | |||
| @@ -64,6 +64,11 @@ ENDPROC(_ret_from_fork) | |||
| 64 | 64 | ||
| 65 | ENTRY(_sys_fork) | 65 | ENTRY(_sys_fork) |
| 66 | r0 = -EINVAL; | 66 | r0 = -EINVAL; |
| 67 | #if (ANOMALY_05000371) | ||
| 68 | nop; | ||
| 69 | nop; | ||
| 70 | nop; | ||
| 71 | #endif | ||
| 67 | rts; | 72 | rts; |
| 68 | ENDPROC(_sys_fork) | 73 | ENDPROC(_sys_fork) |
| 69 | 74 | ||
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index a9c15515bfd7..a1f9641a6425 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c | |||
| @@ -203,6 +203,8 @@ struct hw_breakpoint { | |||
| 203 | 203 | ||
| 204 | int kgdb_arch_init(void) | 204 | int kgdb_arch_init(void) |
| 205 | { | 205 | { |
| 206 | debugger_step = 0; | ||
| 207 | |||
| 206 | kgdb_remove_all_hw_break(); | 208 | kgdb_remove_all_hw_break(); |
| 207 | return 0; | 209 | return 0; |
| 208 | } | 210 | } |
| @@ -368,6 +370,7 @@ int kgdb_arch_handle_exception(int exceptionVector, int signo, | |||
| 368 | char *ptr; | 370 | char *ptr; |
| 369 | int newPC; | 371 | int newPC; |
| 370 | int wp_status; | 372 | int wp_status; |
| 373 | int i; | ||
| 371 | 374 | ||
| 372 | switch (remcom_in_buffer[0]) { | 375 | switch (remcom_in_buffer[0]) { |
| 373 | case 'c': | 376 | case 'c': |
| @@ -392,7 +395,18 @@ int kgdb_arch_handle_exception(int exceptionVector, int signo, | |||
| 392 | /* set the trace bit if we're stepping */ | 395 | /* set the trace bit if we're stepping */ |
| 393 | if (remcom_in_buffer[0] == 's') { | 396 | if (remcom_in_buffer[0] == 's') { |
| 394 | linux_regs->syscfg |= 0x1; | 397 | linux_regs->syscfg |= 0x1; |
| 395 | debugger_step = 1; | 398 | debugger_step = linux_regs->ipend; |
| 399 | debugger_step >>= 6; | ||
| 400 | for (i = 10; i > 0; i--, debugger_step >>= 1) | ||
| 401 | if (debugger_step & 1) | ||
| 402 | break; | ||
| 403 | /* i indicate event priority of current stopped instruction | ||
| 404 | * user space instruction is 0, IVG15 is 1, IVTMR is 10. | ||
| 405 | * debugger_step > 0 means in single step mode | ||
| 406 | */ | ||
| 407 | debugger_step = i + 1; | ||
| 408 | } else { | ||
| 409 | debugger_step = 0; | ||
| 396 | } | 410 | } |
| 397 | 411 | ||
| 398 | wp_status = bfin_read_WPSTAT(); | 412 | wp_status = bfin_read_WPSTAT(); |
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index 14a42848f37f..e1bebc80a5bf 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c | |||
| @@ -173,7 +173,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, | |||
| 173 | for (s = sechdrs; s < sechdrs_end; ++s) { | 173 | for (s = sechdrs; s < sechdrs_end; ++s) { |
| 174 | if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || | 174 | if ((strcmp(".l1.text", secstrings + s->sh_name) == 0) || |
| 175 | ((strcmp(".text", secstrings + s->sh_name) == 0) && | 175 | ((strcmp(".text", secstrings + s->sh_name) == 0) && |
| 176 | (hdr->e_flags & FLG_CODE_IN_L1) && (s->sh_size > 0))) { | 176 | (hdr->e_flags & EF_BFIN_CODE_IN_L1) && (s->sh_size > 0))) { |
| 177 | dest = l1_inst_sram_alloc(s->sh_size); | 177 | dest = l1_inst_sram_alloc(s->sh_size); |
| 178 | mod->arch.text_l1 = dest; | 178 | mod->arch.text_l1 = dest; |
| 179 | if (dest == NULL) { | 179 | if (dest == NULL) { |
| @@ -188,7 +188,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, | |||
| 188 | } | 188 | } |
| 189 | if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) || | 189 | if ((strcmp(".l1.data", secstrings + s->sh_name) == 0) || |
| 190 | ((strcmp(".data", secstrings + s->sh_name) == 0) && | 190 | ((strcmp(".data", secstrings + s->sh_name) == 0) && |
| 191 | (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { | 191 | (hdr->e_flags & EF_BFIN_DATA_IN_L1) && (s->sh_size > 0))) { |
| 192 | dest = l1_data_sram_alloc(s->sh_size); | 192 | dest = l1_data_sram_alloc(s->sh_size); |
| 193 | mod->arch.data_a_l1 = dest; | 193 | mod->arch.data_a_l1 = dest; |
| 194 | if (dest == NULL) { | 194 | if (dest == NULL) { |
| @@ -203,7 +203,7 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, | |||
| 203 | } | 203 | } |
| 204 | if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || | 204 | if (strcmp(".l1.bss", secstrings + s->sh_name) == 0 || |
| 205 | ((strcmp(".bss", secstrings + s->sh_name) == 0) && | 205 | ((strcmp(".bss", secstrings + s->sh_name) == 0) && |
| 206 | (hdr->e_flags & FLG_DATA_IN_L1) && (s->sh_size > 0))) { | 206 | (hdr->e_flags & EF_BFIN_DATA_IN_L1) && (s->sh_size > 0))) { |
| 207 | dest = l1_data_sram_alloc(s->sh_size); | 207 | dest = l1_data_sram_alloc(s->sh_size); |
| 208 | mod->arch.bss_a_l1 = dest; | 208 | mod->arch.bss_a_l1 = dest; |
| 209 | if (dest == NULL) { | 209 | if (dest == NULL) { |
| @@ -242,6 +242,51 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs, | |||
| 242 | s->sh_flags &= ~SHF_ALLOC; | 242 | s->sh_flags &= ~SHF_ALLOC; |
| 243 | s->sh_addr = (unsigned long)dest; | 243 | s->sh_addr = (unsigned long)dest; |
| 244 | } | 244 | } |
| 245 | if ((strcmp(".l2.text", secstrings + s->sh_name) == 0) || | ||
| 246 | ((strcmp(".text", secstrings + s->sh_name) == 0) && | ||
| 247 | (hdr->e_flags & EF_BFIN_CODE_IN_L2) && (s->sh_size > 0))) { | ||
| 248 | dest = l2_sram_alloc(s->sh_size); | ||
| 249 | mod->arch.text_l2 = dest; | ||
| 250 | if (dest == NULL) { | ||
| 251 | printk(KERN_ERR | ||
| 252 | "module %s: L2 SRAM allocation failed\n", | ||
| 253 | mod->name); | ||
| 254 | return -1; | ||
| 255 | } | ||
| 256 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | ||
| 257 | s->sh_flags &= ~SHF_ALLOC; | ||
| 258 | s->sh_addr = (unsigned long)dest; | ||
| 259 | } | ||
| 260 | if ((strcmp(".l2.data", secstrings + s->sh_name) == 0) || | ||
| 261 | ((strcmp(".data", secstrings + s->sh_name) == 0) && | ||
| 262 | (hdr->e_flags & EF_BFIN_DATA_IN_L2) && (s->sh_size > 0))) { | ||
| 263 | dest = l2_sram_alloc(s->sh_size); | ||
| 264 | mod->arch.data_l2 = dest; | ||
| 265 | if (dest == NULL) { | ||
| 266 | printk(KERN_ERR | ||
| 267 | "module %s: L2 SRAM allocation failed\n", | ||
| 268 | mod->name); | ||
| 269 | return -1; | ||
| 270 | } | ||
| 271 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | ||
| 272 | s->sh_flags &= ~SHF_ALLOC; | ||
| 273 | s->sh_addr = (unsigned long)dest; | ||
| 274 | } | ||
| 275 | if (strcmp(".l2.bss", secstrings + s->sh_name) == 0 || | ||
| 276 | ((strcmp(".bss", secstrings + s->sh_name) == 0) && | ||
| 277 | (hdr->e_flags & EF_BFIN_DATA_IN_L2) && (s->sh_size > 0))) { | ||
| 278 | dest = l2_sram_alloc(s->sh_size); | ||
| 279 | mod->arch.bss_l2 = dest; | ||
| 280 | if (dest == NULL) { | ||
| 281 | printk(KERN_ERR | ||
| 282 | "module %s: L2 SRAM allocation failed\n", | ||
| 283 | mod->name); | ||
| 284 | return -1; | ||
| 285 | } | ||
| 286 | memset(dest, 0, s->sh_size); | ||
| 287 | s->sh_flags &= ~SHF_ALLOC; | ||
| 288 | s->sh_addr = (unsigned long)dest; | ||
| 289 | } | ||
| 245 | } | 290 | } |
| 246 | return 0; | 291 | return 0; |
| 247 | } | 292 | } |
| @@ -411,9 +456,10 @@ module_finalize(const Elf_Ehdr * hdr, | |||
| 411 | continue; | 456 | continue; |
| 412 | 457 | ||
| 413 | if ((sechdrs[i].sh_type == SHT_RELA) && | 458 | if ((sechdrs[i].sh_type == SHT_RELA) && |
| 414 | ((strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) || | 459 | ((strcmp(".rela.l2.text", secstrings + sechdrs[i].sh_name) == 0) || |
| 460 | (strcmp(".rela.l1.text", secstrings + sechdrs[i].sh_name) == 0) || | ||
| 415 | ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && | 461 | ((strcmp(".rela.text", secstrings + sechdrs[i].sh_name) == 0) && |
| 416 | (hdr->e_flags & FLG_CODE_IN_L1)))) { | 462 | (hdr->e_flags & (EF_BFIN_CODE_IN_L1|EF_BFIN_CODE_IN_L2))))) { |
| 417 | apply_relocate_add((Elf_Shdr *) sechdrs, strtab, | 463 | apply_relocate_add((Elf_Shdr *) sechdrs, strtab, |
| 418 | symindex, i, mod); | 464 | symindex, i, mod); |
| 419 | } | 465 | } |
| @@ -423,14 +469,12 @@ module_finalize(const Elf_Ehdr * hdr, | |||
| 423 | 469 | ||
| 424 | void module_arch_cleanup(struct module *mod) | 470 | void module_arch_cleanup(struct module *mod) |
| 425 | { | 471 | { |
| 426 | if (mod->arch.text_l1) | 472 | l1_inst_sram_free(mod->arch.text_l1); |
| 427 | l1_inst_sram_free((void *)mod->arch.text_l1); | 473 | l1_data_A_sram_free(mod->arch.data_a_l1); |
| 428 | if (mod->arch.data_a_l1) | 474 | l1_data_A_sram_free(mod->arch.bss_a_l1); |
| 429 | l1_data_sram_free((void *)mod->arch.data_a_l1); | 475 | l1_data_B_sram_free(mod->arch.data_b_l1); |
| 430 | if (mod->arch.bss_a_l1) | 476 | l1_data_B_sram_free(mod->arch.bss_b_l1); |
| 431 | l1_data_sram_free((void *)mod->arch.bss_a_l1); | 477 | l2_sram_free(mod->arch.text_l2); |
| 432 | if (mod->arch.data_b_l1) | 478 | l2_sram_free(mod->arch.data_l2); |
| 433 | l1_data_B_sram_free((void *)mod->arch.data_b_l1); | 479 | l2_sram_free(mod->arch.bss_l2); |
| 434 | if (mod->arch.bss_b_l1) | ||
| 435 | l1_data_B_sram_free((void *)mod->arch.bss_b_l1); | ||
| 436 | } | 480 | } |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 53c2cd255441..77800dd83e57 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
| @@ -105,7 +105,7 @@ void cpu_idle(void) | |||
| 105 | #endif | 105 | #endif |
| 106 | if (!idle) | 106 | if (!idle) |
| 107 | idle = default_idle; | 107 | idle = default_idle; |
| 108 | tick_nohz_stop_sched_tick(); | 108 | tick_nohz_stop_sched_tick(1); |
| 109 | while (!need_resched()) | 109 | while (!need_resched()) |
| 110 | idle(); | 110 | idle(); |
| 111 | tick_nohz_restart_sched_tick(); | 111 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index f51ab088098e..bf1a51d8e608 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
| @@ -220,6 +220,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
| 220 | copied = sizeof(tmp); | 220 | copied = sizeof(tmp); |
| 221 | } else | 221 | } else |
| 222 | #endif | 222 | #endif |
| 223 | #if L1_DATA_A_LENGTH != 0 | ||
| 224 | if (addr + add >= L1_DATA_A_START | ||
| 225 | && addr + add + sizeof(tmp) <= L1_DATA_A_START + L1_DATA_A_LENGTH) { | ||
| 226 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); | ||
| 227 | copied = sizeof(tmp); | ||
| 228 | } else | ||
| 229 | #endif | ||
| 230 | #if L1_DATA_B_LENGTH != 0 | ||
| 231 | if (addr + add >= L1_DATA_B_START | ||
| 232 | && addr + add + sizeof(tmp) <= L1_DATA_B_START + L1_DATA_B_LENGTH) { | ||
| 233 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); | ||
| 234 | copied = sizeof(tmp); | ||
| 235 | } else | ||
| 236 | #endif | ||
| 223 | if (addr + add >= FIXED_CODE_START | 237 | if (addr + add >= FIXED_CODE_START |
| 224 | && addr + add + sizeof(tmp) <= FIXED_CODE_END) { | 238 | && addr + add + sizeof(tmp) <= FIXED_CODE_END) { |
| 225 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); | 239 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); |
| @@ -290,6 +304,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
| 290 | copied = sizeof(data); | 304 | copied = sizeof(data); |
| 291 | } else | 305 | } else |
| 292 | #endif | 306 | #endif |
| 307 | #if L1_DATA_A_LENGTH != 0 | ||
| 308 | if (addr + add >= L1_DATA_A_START | ||
| 309 | && addr + add + sizeof(data) <= L1_DATA_A_START + L1_DATA_A_LENGTH) { | ||
| 310 | memcpy((void *)(addr + add), &data, sizeof(data)); | ||
| 311 | copied = sizeof(data); | ||
| 312 | } else | ||
| 313 | #endif | ||
| 314 | #if L1_DATA_B_LENGTH != 0 | ||
| 315 | if (addr + add >= L1_DATA_B_START | ||
| 316 | && addr + add + sizeof(data) <= L1_DATA_B_START + L1_DATA_B_LENGTH) { | ||
| 317 | memcpy((void *)(addr + add), &data, sizeof(data)); | ||
| 318 | copied = sizeof(data); | ||
| 319 | } else | ||
| 320 | #endif | ||
| 293 | if (addr + add >= FIXED_CODE_START | 321 | if (addr + add >= FIXED_CODE_START |
| 294 | && addr + add + sizeof(data) <= FIXED_CODE_END) { | 322 | && addr + add + sizeof(data) <= FIXED_CODE_END) { |
| 295 | memcpy((void *)(addr + add), &data, sizeof(data)); | 323 | memcpy((void *)(addr + add), &data, sizeof(data)); |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 8efea004aecb..23e637eb78da 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
| @@ -104,6 +104,7 @@ void __init bf53x_relocate_l1_mem(void) | |||
| 104 | unsigned long l1_code_length; | 104 | unsigned long l1_code_length; |
| 105 | unsigned long l1_data_a_length; | 105 | unsigned long l1_data_a_length; |
| 106 | unsigned long l1_data_b_length; | 106 | unsigned long l1_data_b_length; |
| 107 | unsigned long l2_length; | ||
| 107 | 108 | ||
| 108 | l1_code_length = _etext_l1 - _stext_l1; | 109 | l1_code_length = _etext_l1 - _stext_l1; |
| 109 | if (l1_code_length > L1_CODE_LENGTH) | 110 | if (l1_code_length > L1_CODE_LENGTH) |
| @@ -129,6 +130,15 @@ void __init bf53x_relocate_l1_mem(void) | |||
| 129 | /* Copy _sdata_b_l1 to _ebss_b_l1 to L1 data bank B SRAM */ | 130 | /* Copy _sdata_b_l1 to _ebss_b_l1 to L1 data bank B SRAM */ |
| 130 | dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + | 131 | dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + |
| 131 | l1_data_a_length, l1_data_b_length); | 132 | l1_data_a_length, l1_data_b_length); |
| 133 | |||
| 134 | #ifdef L2_LENGTH | ||
| 135 | l2_length = _ebss_l2 - _stext_l2; | ||
| 136 | if (l2_length > L2_LENGTH) | ||
| 137 | panic("L2 SRAM Overflow\n"); | ||
| 138 | |||
| 139 | /* Copy _stext_l2 to _edata_l2 to L2 SRAM */ | ||
| 140 | dma_memcpy(_stext_l2, _l2_lma_start, l2_length); | ||
| 141 | #endif | ||
| 132 | } | 142 | } |
| 133 | 143 | ||
| 134 | /* add_memory_region to memmap */ | 144 | /* add_memory_region to memmap */ |
| @@ -664,11 +674,8 @@ static __init void setup_bootmem_allocator(void) | |||
| 664 | }) | 674 | }) |
| 665 | static inline int __init get_mem_size(void) | 675 | static inline int __init get_mem_size(void) |
| 666 | { | 676 | { |
| 667 | #ifdef CONFIG_MEM_SIZE | 677 | #if defined(EBIU_SDBCTL) |
| 668 | return CONFIG_MEM_SIZE; | 678 | # if defined(BF561_FAMILY) |
| 669 | #else | ||
| 670 | # if defined(EBIU_SDBCTL) | ||
| 671 | # if defined(BF561_FAMILY) | ||
| 672 | int ret = 0; | 679 | int ret = 0; |
| 673 | u32 sdbctl = bfin_read_EBIU_SDBCTL(); | 680 | u32 sdbctl = bfin_read_EBIU_SDBCTL(); |
| 674 | ret += EBSZ_TO_MEG(sdbctl >> 0); | 681 | ret += EBSZ_TO_MEG(sdbctl >> 0); |
| @@ -676,10 +683,10 @@ static inline int __init get_mem_size(void) | |||
| 676 | ret += EBSZ_TO_MEG(sdbctl >> 16); | 683 | ret += EBSZ_TO_MEG(sdbctl >> 16); |
| 677 | ret += EBSZ_TO_MEG(sdbctl >> 24); | 684 | ret += EBSZ_TO_MEG(sdbctl >> 24); |
| 678 | return ret; | 685 | return ret; |
| 679 | # else | 686 | # else |
| 680 | return EBSZ_TO_MEG(bfin_read_EBIU_SDBCTL()); | 687 | return EBSZ_TO_MEG(bfin_read_EBIU_SDBCTL()); |
| 681 | # endif | 688 | # endif |
| 682 | # elif defined(EBIU_DDRCTL1) | 689 | #elif defined(EBIU_DDRCTL1) |
| 683 | u32 ddrctl = bfin_read_EBIU_DDRCTL1(); | 690 | u32 ddrctl = bfin_read_EBIU_DDRCTL1(); |
| 684 | int ret = 0; | 691 | int ret = 0; |
| 685 | switch (ddrctl & 0xc0000) { | 692 | switch (ddrctl & 0xc0000) { |
| @@ -693,8 +700,9 @@ static inline int __init get_mem_size(void) | |||
| 693 | case DEVWD_8: ret *= 2; | 700 | case DEVWD_8: ret *= 2; |
| 694 | case DEVWD_16: break; | 701 | case DEVWD_16: break; |
| 695 | } | 702 | } |
| 703 | if ((ddrctl & 0xc000) == 0x4000) | ||
| 704 | ret *= 2; | ||
| 696 | return ret; | 705 | return ret; |
| 697 | # endif | ||
| 698 | #endif | 706 | #endif |
| 699 | BUG(); | 707 | BUG(); |
| 700 | } | 708 | } |
| @@ -763,6 +771,9 @@ void __init setup_arch(char **cmdline_p) | |||
| 763 | 771 | ||
| 764 | _bfin_swrst = bfin_read_SWRST(); | 772 | _bfin_swrst = bfin_read_SWRST(); |
| 765 | 773 | ||
| 774 | /* If we double fault, reset the system - otherwise we hang forever */ | ||
| 775 | bfin_write_SWRST(DOUBLE_FAULT); | ||
| 776 | |||
| 766 | if (_bfin_swrst & RESET_DOUBLE) | 777 | if (_bfin_swrst & RESET_DOUBLE) |
| 767 | printk(KERN_INFO "Recovering from Double Fault event\n"); | 778 | printk(KERN_INFO "Recovering from Double Fault event\n"); |
| 768 | else if (_bfin_swrst & RESET_WDOG) | 779 | else if (_bfin_swrst & RESET_WDOG) |
| @@ -842,38 +853,55 @@ static int __init topology_init(void) | |||
| 842 | 853 | ||
| 843 | subsys_initcall(topology_init); | 854 | subsys_initcall(topology_init); |
| 844 | 855 | ||
| 856 | /* Get the voltage input multiplier */ | ||
| 857 | static u_long cached_vco_pll_ctl, cached_vco; | ||
| 845 | static u_long get_vco(void) | 858 | static u_long get_vco(void) |
| 846 | { | 859 | { |
| 847 | u_long msel; | 860 | u_long msel; |
| 848 | u_long vco; | ||
| 849 | 861 | ||
| 850 | msel = (bfin_read_PLL_CTL() >> 9) & 0x3F; | 862 | u_long pll_ctl = bfin_read_PLL_CTL(); |
| 863 | if (pll_ctl == cached_vco_pll_ctl) | ||
| 864 | return cached_vco; | ||
| 865 | else | ||
| 866 | cached_vco_pll_ctl = pll_ctl; | ||
| 867 | |||
| 868 | msel = (pll_ctl >> 9) & 0x3F; | ||
| 851 | if (0 == msel) | 869 | if (0 == msel) |
| 852 | msel = 64; | 870 | msel = 64; |
| 853 | 871 | ||
| 854 | vco = CONFIG_CLKIN_HZ; | 872 | cached_vco = CONFIG_CLKIN_HZ; |
| 855 | vco >>= (1 & bfin_read_PLL_CTL()); /* DF bit */ | 873 | cached_vco >>= (1 & pll_ctl); /* DF bit */ |
| 856 | vco = msel * vco; | 874 | cached_vco *= msel; |
| 857 | return vco; | 875 | return cached_vco; |
| 858 | } | 876 | } |
| 859 | 877 | ||
| 860 | /* Get the Core clock */ | 878 | /* Get the Core clock */ |
| 879 | static u_long cached_cclk_pll_div, cached_cclk; | ||
| 861 | u_long get_cclk(void) | 880 | u_long get_cclk(void) |
| 862 | { | 881 | { |
| 863 | u_long csel, ssel; | 882 | u_long csel, ssel; |
| 883 | |||
| 864 | if (bfin_read_PLL_STAT() & 0x1) | 884 | if (bfin_read_PLL_STAT() & 0x1) |
| 865 | return CONFIG_CLKIN_HZ; | 885 | return CONFIG_CLKIN_HZ; |
| 866 | 886 | ||
| 867 | ssel = bfin_read_PLL_DIV(); | 887 | ssel = bfin_read_PLL_DIV(); |
| 888 | if (ssel == cached_cclk_pll_div) | ||
| 889 | return cached_cclk; | ||
| 890 | else | ||
| 891 | cached_cclk_pll_div = ssel; | ||
| 892 | |||
| 868 | csel = ((ssel >> 4) & 0x03); | 893 | csel = ((ssel >> 4) & 0x03); |
| 869 | ssel &= 0xf; | 894 | ssel &= 0xf; |
| 870 | if (ssel && ssel < (1 << csel)) /* SCLK > CCLK */ | 895 | if (ssel && ssel < (1 << csel)) /* SCLK > CCLK */ |
| 871 | return get_vco() / ssel; | 896 | cached_cclk = get_vco() / ssel; |
| 872 | return get_vco() >> csel; | 897 | else |
| 898 | cached_cclk = get_vco() >> csel; | ||
| 899 | return cached_cclk; | ||
| 873 | } | 900 | } |
| 874 | EXPORT_SYMBOL(get_cclk); | 901 | EXPORT_SYMBOL(get_cclk); |
| 875 | 902 | ||
| 876 | /* Get the System clock */ | 903 | /* Get the System clock */ |
| 904 | static u_long cached_sclk_pll_div, cached_sclk; | ||
| 877 | u_long get_sclk(void) | 905 | u_long get_sclk(void) |
| 878 | { | 906 | { |
| 879 | u_long ssel; | 907 | u_long ssel; |
| @@ -881,13 +909,20 @@ u_long get_sclk(void) | |||
| 881 | if (bfin_read_PLL_STAT() & 0x1) | 909 | if (bfin_read_PLL_STAT() & 0x1) |
| 882 | return CONFIG_CLKIN_HZ; | 910 | return CONFIG_CLKIN_HZ; |
| 883 | 911 | ||
| 884 | ssel = (bfin_read_PLL_DIV() & 0xf); | 912 | ssel = bfin_read_PLL_DIV(); |
| 913 | if (ssel == cached_sclk_pll_div) | ||
| 914 | return cached_sclk; | ||
| 915 | else | ||
| 916 | cached_sclk_pll_div = ssel; | ||
| 917 | |||
| 918 | ssel &= 0xf; | ||
| 885 | if (0 == ssel) { | 919 | if (0 == ssel) { |
| 886 | printk(KERN_WARNING "Invalid System Clock\n"); | 920 | printk(KERN_WARNING "Invalid System Clock\n"); |
| 887 | ssel = 1; | 921 | ssel = 1; |
| 888 | } | 922 | } |
| 889 | 923 | ||
| 890 | return get_vco() / ssel; | 924 | cached_sclk = get_vco() / ssel; |
| 925 | return cached_sclk; | ||
| 891 | } | 926 | } |
| 892 | EXPORT_SYMBOL(get_sclk); | 927 | EXPORT_SYMBOL(get_sclk); |
| 893 | 928 | ||
| @@ -916,7 +951,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 916 | uint32_t revid; | 951 | uint32_t revid; |
| 917 | 952 | ||
| 918 | u_long cclk = 0, sclk = 0; | 953 | u_long cclk = 0, sclk = 0; |
| 919 | u_int dcache_size = 0, dsup_banks = 0; | 954 | u_int icache_size = BFIN_ICACHESIZE / 1024, dcache_size = 0, dsup_banks = 0; |
| 920 | 955 | ||
| 921 | cpu = CPU; | 956 | cpu = CPU; |
| 922 | mmu = "none"; | 957 | mmu = "none"; |
| @@ -985,12 +1020,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 985 | } | 1020 | } |
| 986 | 1021 | ||
| 987 | /* Is it turned on? */ | 1022 | /* Is it turned on? */ |
| 988 | if (!((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE))) | 1023 | if ((bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE)) != (ENDCPLB | DMC_ENABLE)) |
| 989 | dcache_size = 0; | 1024 | dcache_size = 0; |
| 990 | 1025 | ||
| 1026 | if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) == (IMC | ENICPLB)) | ||
| 1027 | icache_size = 0; | ||
| 1028 | |||
| 991 | seq_printf(m, "cache size\t: %d KB(L1 icache) " | 1029 | seq_printf(m, "cache size\t: %d KB(L1 icache) " |
| 992 | "%d KB(L1 dcache-%s) %d KB(L2 cache)\n", | 1030 | "%d KB(L1 dcache-%s) %d KB(L2 cache)\n", |
| 993 | BFIN_ICACHESIZE / 1024, dcache_size, | 1031 | icache_size, dcache_size, |
| 994 | #if defined CONFIG_BFIN_WB | 1032 | #if defined CONFIG_BFIN_WB |
| 995 | "wb" | 1033 | "wb" |
| 996 | #elif defined CONFIG_BFIN_WT | 1034 | #elif defined CONFIG_BFIN_WT |
| @@ -1000,8 +1038,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 1000 | 1038 | ||
| 1001 | seq_printf(m, "%s\n", cache); | 1039 | seq_printf(m, "%s\n", cache); |
| 1002 | 1040 | ||
| 1003 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", | 1041 | if (icache_size) |
| 1004 | BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES); | 1042 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", |
| 1043 | BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES); | ||
| 1044 | else | ||
| 1045 | seq_printf(m, "icache setup\t: off\n"); | ||
| 1046 | |||
| 1005 | seq_printf(m, | 1047 | seq_printf(m, |
| 1006 | "dcache setup\t: %d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", | 1048 | "dcache setup\t: %d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", |
| 1007 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, | 1049 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index f061f5181623..ad922ab91543 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
| @@ -69,8 +69,6 @@ void __init trap_init(void) | |||
| 69 | 69 | ||
| 70 | unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr; | 70 | unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr; |
| 71 | 71 | ||
| 72 | int kstack_depth_to_print = 48; | ||
| 73 | |||
| 74 | static void decode_address(char *buf, unsigned long address) | 72 | static void decode_address(char *buf, unsigned long address) |
| 75 | { | 73 | { |
| 76 | struct vm_list_struct *vml; | 74 | struct vm_list_struct *vml; |
| @@ -163,6 +161,9 @@ static void decode_address(char *buf, unsigned long address) | |||
| 163 | if (!in_atomic) | 161 | if (!in_atomic) |
| 164 | mmput(mm); | 162 | mmput(mm); |
| 165 | 163 | ||
| 164 | if (!strlen(buf)) | ||
| 165 | sprintf(buf, "<0x%p> [ %s ] dynamic memory", (void *)address, name); | ||
| 166 | |||
| 166 | goto done; | 167 | goto done; |
| 167 | } | 168 | } |
| 168 | 169 | ||
| @@ -173,7 +174,7 @@ static void decode_address(char *buf, unsigned long address) | |||
| 173 | } | 174 | } |
| 174 | 175 | ||
| 175 | /* we were unable to find this address anywhere */ | 176 | /* we were unable to find this address anywhere */ |
| 176 | sprintf(buf, "<0x%p> /* unknown address */", (void *)address); | 177 | sprintf(buf, "<0x%p> /* kernel dynamic memory */", (void *)address); |
| 177 | 178 | ||
| 178 | done: | 179 | done: |
| 179 | write_unlock_irqrestore(&tasklist_lock, flags); | 180 | write_unlock_irqrestore(&tasklist_lock, flags); |
| @@ -494,7 +495,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
| 494 | BUG_ON(sig == 0); | 495 | BUG_ON(sig == 0); |
| 495 | 496 | ||
| 496 | if (sig != SIGTRAP) { | 497 | if (sig != SIGTRAP) { |
| 497 | unsigned long stack; | 498 | unsigned long *stack; |
| 498 | dump_bfin_process(fp); | 499 | dump_bfin_process(fp); |
| 499 | dump_bfin_mem(fp); | 500 | dump_bfin_mem(fp); |
| 500 | show_regs(fp); | 501 | show_regs(fp); |
| @@ -508,14 +509,23 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
| 508 | else | 509 | else |
| 509 | #endif | 510 | #endif |
| 510 | dump_bfin_trace_buffer(); | 511 | dump_bfin_trace_buffer(); |
| 511 | show_stack(current, &stack); | 512 | |
| 512 | if (oops_in_progress) { | 513 | if (oops_in_progress) { |
| 514 | /* Dump the current kernel stack */ | ||
| 515 | printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n"); | ||
| 516 | show_stack(current, NULL); | ||
| 517 | |||
| 513 | print_modules(); | 518 | print_modules(); |
| 514 | #ifndef CONFIG_ACCESS_CHECK | 519 | #ifndef CONFIG_ACCESS_CHECK |
| 515 | printk(KERN_EMERG "Please turn on " | 520 | printk(KERN_EMERG "Please turn on " |
| 516 | "CONFIG_ACCESS_CHECK\n"); | 521 | "CONFIG_ACCESS_CHECK\n"); |
| 517 | #endif | 522 | #endif |
| 518 | panic("Kernel exception"); | 523 | panic("Kernel exception"); |
| 524 | } else { | ||
| 525 | /* Dump the user space stack */ | ||
| 526 | stack = (unsigned long *)rdusp(); | ||
| 527 | printk(KERN_NOTICE "Userspace Stack\n"); | ||
| 528 | show_stack(NULL, stack); | ||
| 519 | } | 529 | } |
| 520 | } | 530 | } |
| 521 | 531 | ||
| @@ -532,11 +542,71 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
| 532 | 542 | ||
| 533 | #define EXPAND_LEN ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 256 - 1) | 543 | #define EXPAND_LEN ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 256 - 1) |
| 534 | 544 | ||
| 545 | /* | ||
| 546 | * Similar to get_user, do some address checking, then dereference | ||
| 547 | * Return true on sucess, false on bad address | ||
| 548 | */ | ||
| 549 | bool get_instruction(unsigned short *val, unsigned short *address) | ||
| 550 | { | ||
| 551 | |||
| 552 | unsigned long addr; | ||
| 553 | |||
| 554 | addr = (unsigned long)address; | ||
| 555 | |||
| 556 | /* Check for odd addresses */ | ||
| 557 | if (addr & 0x1) | ||
| 558 | return false; | ||
| 559 | |||
| 560 | /* Check that things do not wrap around */ | ||
| 561 | if (addr > (addr + 2)) | ||
| 562 | return false; | ||
| 563 | |||
| 564 | /* | ||
| 565 | * Since we are in exception context, we need to do a little address checking | ||
| 566 | * We need to make sure we are only accessing valid memory, and | ||
| 567 | * we don't read something in the async space that can hang forever | ||
| 568 | */ | ||
| 569 | if ((addr >= FIXED_CODE_START && (addr + 2) <= physical_mem_end) || | ||
| 570 | #ifdef L2_START | ||
| 571 | (addr >= L2_START && (addr + 2) <= (L2_START + L2_LENGTH)) || | ||
| 572 | #endif | ||
| 573 | (addr >= BOOT_ROM_START && (addr + 2) <= (BOOT_ROM_START + BOOT_ROM_LENGTH)) || | ||
| 574 | #if L1_DATA_A_LENGTH != 0 | ||
| 575 | (addr >= L1_DATA_A_START && (addr + 2) <= (L1_DATA_A_START + L1_DATA_A_LENGTH)) || | ||
| 576 | #endif | ||
| 577 | #if L1_DATA_B_LENGTH != 0 | ||
| 578 | (addr >= L1_DATA_B_START && (addr + 2) <= (L1_DATA_B_START + L1_DATA_B_LENGTH)) || | ||
| 579 | #endif | ||
| 580 | (addr >= L1_SCRATCH_START && (addr + 2) <= (L1_SCRATCH_START + L1_SCRATCH_LENGTH)) || | ||
| 581 | (!(bfin_read_EBIU_AMBCTL0() & B0RDYEN) && | ||
| 582 | addr >= ASYNC_BANK0_BASE && (addr + 2) <= (ASYNC_BANK0_BASE + ASYNC_BANK0_SIZE)) || | ||
| 583 | (!(bfin_read_EBIU_AMBCTL0() & B1RDYEN) && | ||
| 584 | addr >= ASYNC_BANK1_BASE && (addr + 2) <= (ASYNC_BANK1_BASE + ASYNC_BANK1_SIZE)) || | ||
| 585 | (!(bfin_read_EBIU_AMBCTL1() & B2RDYEN) && | ||
| 586 | addr >= ASYNC_BANK2_BASE && (addr + 2) <= (ASYNC_BANK2_BASE + ASYNC_BANK1_SIZE)) || | ||
| 587 | (!(bfin_read_EBIU_AMBCTL1() & B3RDYEN) && | ||
| 588 | addr >= ASYNC_BANK3_BASE && (addr + 2) <= (ASYNC_BANK3_BASE + ASYNC_BANK1_SIZE))) { | ||
| 589 | *val = *address; | ||
| 590 | return true; | ||
| 591 | } | ||
| 592 | |||
| 593 | #if L1_CODE_LENGTH != 0 | ||
| 594 | if (addr >= L1_CODE_START && (addr + 2) <= (L1_CODE_START + L1_CODE_LENGTH)) { | ||
| 595 | dma_memcpy(val, address, 2); | ||
| 596 | return true; | ||
| 597 | } | ||
| 598 | #endif | ||
| 599 | |||
| 600 | |||
| 601 | return false; | ||
| 602 | } | ||
| 603 | |||
| 535 | void dump_bfin_trace_buffer(void) | 604 | void dump_bfin_trace_buffer(void) |
| 536 | { | 605 | { |
| 537 | #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON | 606 | #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON |
| 538 | int tflags, i = 0; | 607 | int tflags, i = 0; |
| 539 | char buf[150]; | 608 | char buf[150]; |
| 609 | unsigned short val = 0, *addr; | ||
| 540 | #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND | 610 | #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND |
| 541 | int j, index; | 611 | int j, index; |
| 542 | #endif | 612 | #endif |
| @@ -549,8 +619,42 @@ void dump_bfin_trace_buffer(void) | |||
| 549 | for (; bfin_read_TBUFSTAT() & TBUFCNT; i++) { | 619 | for (; bfin_read_TBUFSTAT() & TBUFCNT; i++) { |
| 550 | decode_address(buf, (unsigned long)bfin_read_TBUF()); | 620 | decode_address(buf, (unsigned long)bfin_read_TBUF()); |
| 551 | printk(KERN_NOTICE "%4i Target : %s\n", i, buf); | 621 | printk(KERN_NOTICE "%4i Target : %s\n", i, buf); |
| 552 | decode_address(buf, (unsigned long)bfin_read_TBUF()); | 622 | addr = (unsigned short *)bfin_read_TBUF(); |
| 553 | printk(KERN_NOTICE " Source : %s\n", buf); | 623 | decode_address(buf, (unsigned long)addr); |
| 624 | printk(KERN_NOTICE " Source : %s ", buf); | ||
| 625 | if (get_instruction(&val, addr)) { | ||
| 626 | if (val == 0x0010) | ||
| 627 | printk("RTS"); | ||
| 628 | else if (val == 0x0011) | ||
| 629 | printk("RTI"); | ||
| 630 | else if (val == 0x0012) | ||
| 631 | printk("RTX"); | ||
| 632 | else if (val >= 0x0050 && val <= 0x0057) | ||
| 633 | printk("JUMP (P%i)", val & 7); | ||
| 634 | else if (val >= 0x0060 && val <= 0x0067) | ||
| 635 | printk("CALL (P%i)", val & 7); | ||
| 636 | else if (val >= 0x0070 && val <= 0x0077) | ||
| 637 | printk("CALL (PC+P%i)", val & 7); | ||
| 638 | else if (val >= 0x0080 && val <= 0x0087) | ||
| 639 | printk("JUMP (PC+P%i)", val & 7); | ||
| 640 | else if ((val >= 0x1000 && val <= 0x13FF) || | ||
| 641 | (val >= 0x1800 && val <= 0x1BFF)) | ||
| 642 | printk("IF !CC JUMP"); | ||
| 643 | else if ((val >= 0x1400 && val <= 0x17ff) || | ||
| 644 | (val >= 0x1c00 && val <= 0x1fff)) | ||
| 645 | printk("IF CC JUMP"); | ||
| 646 | else if (val >= 0x2000 && val <= 0x2fff) | ||
| 647 | printk("JUMP.S"); | ||
| 648 | else if (val >= 0xe080 && val <= 0xe0ff) | ||
| 649 | printk("LSETUP"); | ||
| 650 | else if (val >= 0xe200 && val <= 0xe2ff) | ||
| 651 | printk("JUMP.L"); | ||
| 652 | else if (val >= 0xe300 && val <= 0xe3ff) | ||
| 653 | printk("CALL pcrel"); | ||
| 654 | else | ||
| 655 | printk("0x%04x", val); | ||
| 656 | } | ||
| 657 | printk("\n"); | ||
| 554 | } | 658 | } |
| 555 | } | 659 | } |
| 556 | 660 | ||
| @@ -582,59 +686,151 @@ void dump_bfin_trace_buffer(void) | |||
| 582 | } | 686 | } |
| 583 | EXPORT_SYMBOL(dump_bfin_trace_buffer); | 687 | EXPORT_SYMBOL(dump_bfin_trace_buffer); |
| 584 | 688 | ||
| 585 | static void show_trace(struct task_struct *tsk, unsigned long *sp) | 689 | /* |
| 690 | * Checks to see if the address pointed to is either a | ||
| 691 | * 16-bit CALL instruction, or a 32-bit CALL instruction | ||
| 692 | */ | ||
| 693 | bool is_bfin_call(unsigned short *addr) | ||
| 586 | { | 694 | { |
| 587 | unsigned long addr; | 695 | unsigned short opcode = 0, *ins_addr; |
| 696 | ins_addr = (unsigned short *)addr; | ||
| 588 | 697 | ||
| 589 | printk(KERN_NOTICE "\n" KERN_NOTICE "Call Trace:\n"); | 698 | if (!get_instruction(&opcode, ins_addr)) |
| 590 | 699 | return false; | |
| 591 | while (!kstack_end(sp)) { | ||
| 592 | addr = *sp++; | ||
| 593 | /* | ||
| 594 | * If the address is either in the text segment of the | ||
| 595 | * kernel, or in the region which contains vmalloc'ed | ||
| 596 | * memory, it *may* be the address of a calling | ||
| 597 | * routine; if so, print it so that someone tracing | ||
| 598 | * down the cause of the crash will be able to figure | ||
| 599 | * out the call path that was taken. | ||
| 600 | */ | ||
| 601 | if (kernel_text_address(addr)) | ||
| 602 | print_ip_sym(addr); | ||
| 603 | } | ||
| 604 | 700 | ||
| 605 | printk(KERN_NOTICE "\n"); | 701 | if ((opcode >= 0x0060 && opcode <= 0x0067) || |
| 606 | } | 702 | (opcode >= 0x0070 && opcode <= 0x0077)) |
| 703 | return true; | ||
| 704 | |||
| 705 | ins_addr--; | ||
| 706 | if (!get_instruction(&opcode, ins_addr)) | ||
| 707 | return false; | ||
| 607 | 708 | ||
| 709 | if (opcode >= 0xE300 && opcode <= 0xE3FF) | ||
| 710 | return true; | ||
| 711 | |||
| 712 | return false; | ||
| 713 | |||
| 714 | } | ||
| 608 | void show_stack(struct task_struct *task, unsigned long *stack) | 715 | void show_stack(struct task_struct *task, unsigned long *stack) |
| 609 | { | 716 | { |
| 610 | unsigned long *endstack, addr; | 717 | unsigned int *addr, *endstack, *fp = 0, *frame; |
| 611 | int i; | 718 | unsigned short *ins_addr; |
| 719 | char buf[150]; | ||
| 720 | unsigned int i, j, ret_addr, frame_no = 0; | ||
| 612 | 721 | ||
| 613 | /* Cannot call dump_bfin_trace_buffer() here as show_stack() is | 722 | /* |
| 614 | * called externally in some places in the kernel. | 723 | * If we have been passed a specific stack, use that one otherwise |
| 724 | * if we have been passed a task structure, use that, otherwise | ||
| 725 | * use the stack of where the variable "stack" exists | ||
| 615 | */ | 726 | */ |
| 616 | 727 | ||
| 617 | if (!stack) { | 728 | if (stack == NULL) { |
| 618 | if (task) | 729 | if (task) { |
| 730 | /* We know this is a kernel stack, so this is the start/end */ | ||
| 619 | stack = (unsigned long *)task->thread.ksp; | 731 | stack = (unsigned long *)task->thread.ksp; |
| 620 | else | 732 | endstack = (unsigned int *)(((unsigned int)(stack) & ~(THREAD_SIZE - 1)) + THREAD_SIZE); |
| 733 | } else { | ||
| 734 | /* print out the existing stack info */ | ||
| 621 | stack = (unsigned long *)&stack; | 735 | stack = (unsigned long *)&stack; |
| 736 | endstack = (unsigned int *)PAGE_ALIGN((unsigned int)stack); | ||
| 737 | } | ||
| 738 | } else | ||
| 739 | endstack = (unsigned int *)PAGE_ALIGN((unsigned int)stack); | ||
| 740 | |||
| 741 | decode_address(buf, (unsigned int)stack); | ||
| 742 | printk(KERN_NOTICE "Stack info:\n" KERN_NOTICE " SP: [0x%p] %s\n", stack, buf); | ||
| 743 | addr = (unsigned int *)((unsigned int)stack & ~0x3F); | ||
| 744 | |||
| 745 | /* First thing is to look for a frame pointer */ | ||
| 746 | for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0; | ||
| 747 | addr < endstack; addr++, i++) { | ||
| 748 | if (*addr & 0x1) | ||
| 749 | continue; | ||
| 750 | ins_addr = (unsigned short *)*addr; | ||
| 751 | ins_addr--; | ||
| 752 | if (is_bfin_call(ins_addr)) | ||
| 753 | fp = addr - 1; | ||
| 754 | |||
| 755 | if (fp) { | ||
| 756 | /* Let's check to see if it is a frame pointer */ | ||
| 757 | while (fp >= (addr - 1) && fp < endstack && fp) | ||
| 758 | fp = (unsigned int *)*fp; | ||
| 759 | if (fp == 0 || fp == endstack) { | ||
| 760 | fp = addr - 1; | ||
| 761 | break; | ||
| 762 | } | ||
| 763 | fp = 0; | ||
| 764 | } | ||
| 622 | } | 765 | } |
| 766 | if (fp) { | ||
| 767 | frame = fp; | ||
| 768 | printk(" FP: (0x%p)\n", fp); | ||
| 769 | } else | ||
| 770 | frame = 0; | ||
| 623 | 771 | ||
| 624 | addr = (unsigned long)stack; | 772 | /* |
| 625 | endstack = (unsigned long *)PAGE_ALIGN(addr); | 773 | * Now that we think we know where things are, we |
| 774 | * walk the stack again, this time printing things out | ||
| 775 | * incase there is no frame pointer, we still look for | ||
| 776 | * valid return addresses | ||
| 777 | */ | ||
| 626 | 778 | ||
| 627 | printk(KERN_NOTICE "Stack from %08lx:", (unsigned long)stack); | 779 | /* First time print out data, next time, print out symbols */ |
| 628 | for (i = 0; i < kstack_depth_to_print; i++) { | 780 | for (j = 0; j <= 1; j++) { |
| 629 | if (stack + 1 > endstack) | 781 | if (j) |
| 630 | break; | 782 | printk(KERN_NOTICE "Return addresses in stack:\n"); |
| 631 | if (i % 8 == 0) | 783 | else |
| 632 | printk("\n" KERN_NOTICE " "); | 784 | printk(KERN_NOTICE " Memory from 0x%08lx to %p", ((long unsigned int)stack & ~0xF), endstack); |
| 633 | printk(" %08lx", *stack++); | 785 | |
| 786 | fp = frame; | ||
| 787 | frame_no = 0; | ||
| 788 | |||
| 789 | for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0; | ||
| 790 | addr <= endstack; addr++, i++) { | ||
| 791 | |||
| 792 | ret_addr = 0; | ||
| 793 | if (!j && i % 8 == 0) | ||
| 794 | printk("\n" KERN_NOTICE "%p:",addr); | ||
| 795 | |||
| 796 | /* if it is an odd address, or zero, just skip it */ | ||
| 797 | if (*addr & 0x1 || !*addr) | ||
| 798 | goto print; | ||
| 799 | |||
| 800 | ins_addr = (unsigned short *)*addr; | ||
| 801 | |||
| 802 | /* Go back one instruction, and see if it is a CALL */ | ||
| 803 | ins_addr--; | ||
| 804 | ret_addr = is_bfin_call(ins_addr); | ||
| 805 | print: | ||
| 806 | if (!j && stack == (unsigned long *)addr) | ||
| 807 | printk("[%08x]", *addr); | ||
| 808 | else if (ret_addr) | ||
| 809 | if (j) { | ||
| 810 | decode_address(buf, (unsigned int)*addr); | ||
| 811 | if (frame == addr) { | ||
| 812 | printk(KERN_NOTICE " frame %2i : %s\n", frame_no, buf); | ||
| 813 | continue; | ||
| 814 | } | ||
| 815 | printk(KERN_NOTICE " address : %s\n", buf); | ||
| 816 | } else | ||
| 817 | printk("<%08x>", *addr); | ||
| 818 | else if (fp == addr) { | ||
| 819 | if (j) | ||
| 820 | frame = addr+1; | ||
| 821 | else | ||
| 822 | printk("(%08x)", *addr); | ||
| 823 | |||
| 824 | fp = (unsigned int *)*addr; | ||
| 825 | frame_no++; | ||
| 826 | |||
| 827 | } else if (!j) | ||
| 828 | printk(" %08x ", *addr); | ||
| 829 | } | ||
| 830 | if (!j) | ||
| 831 | printk("\n"); | ||
| 634 | } | 832 | } |
| 635 | printk("\n"); | ||
| 636 | 833 | ||
| 637 | show_trace(task, stack); | ||
| 638 | } | 834 | } |
| 639 | 835 | ||
| 640 | void dump_stack(void) | 836 | void dump_stack(void) |
| @@ -715,19 +911,9 @@ void dump_bfin_mem(struct pt_regs *fp) | |||
| 715 | if (!((unsigned long)addr & 0xF)) | 911 | if (!((unsigned long)addr & 0xF)) |
| 716 | printk("\n" KERN_NOTICE "0x%p: ", addr); | 912 | printk("\n" KERN_NOTICE "0x%p: ", addr); |
| 717 | 913 | ||
| 718 | if (get_user(val, addr)) { | 914 | if (get_instruction(&val, addr)) { |
| 719 | if (addr >= (unsigned short *)L1_CODE_START && | ||
| 720 | addr < (unsigned short *)(L1_CODE_START + L1_CODE_LENGTH)) { | ||
| 721 | dma_memcpy(&val, addr, sizeof(val)); | ||
| 722 | sprintf(buf, "%04x", val); | ||
| 723 | } else if (addr >= (unsigned short *)FIXED_CODE_START && | ||
| 724 | addr <= (unsigned short *)memory_start) { | ||
| 725 | val = bfin_read16(addr); | ||
| 726 | sprintf(buf, "%04x", val); | ||
| 727 | } else { | ||
| 728 | val = 0; | 915 | val = 0; |
| 729 | sprintf(buf, "????"); | 916 | sprintf(buf, "????"); |
| 730 | } | ||
| 731 | } else | 917 | } else |
| 732 | sprintf(buf, "%04x", val); | 918 | sprintf(buf, "%04x", val); |
| 733 | 919 | ||
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 3ecc64cab3be..0896e38d6108 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S | |||
| @@ -101,6 +101,11 @@ SECTIONS | |||
| 101 | #if !L1_DATA_B_LENGTH | 101 | #if !L1_DATA_B_LENGTH |
| 102 | *(.l1.data.B) | 102 | *(.l1.data.B) |
| 103 | #endif | 103 | #endif |
| 104 | #ifndef L2_LENGTH | ||
| 105 | . = ALIGN(32); | ||
| 106 | *(.data_l2.cacheline_aligned) | ||
| 107 | *(.l2.data) | ||
| 108 | #endif | ||
| 104 | 109 | ||
| 105 | DATA_DATA | 110 | DATA_DATA |
| 106 | *(.data.*) | 111 | *(.data.*) |
| @@ -182,14 +187,13 @@ SECTIONS | |||
| 182 | *(.l1.data) | 187 | *(.l1.data) |
| 183 | __edata_l1 = .; | 188 | __edata_l1 = .; |
| 184 | 189 | ||
| 185 | . = ALIGN(4); | ||
| 186 | __sbss_l1 = .; | ||
| 187 | *(.l1.bss) | ||
| 188 | |||
| 189 | . = ALIGN(32); | 190 | . = ALIGN(32); |
| 190 | *(.data_l1.cacheline_aligned) | 191 | *(.data_l1.cacheline_aligned) |
| 191 | 192 | ||
| 192 | . = ALIGN(4); | 193 | . = ALIGN(4); |
| 194 | __sbss_l1 = .; | ||
| 195 | *(.l1.bss) | ||
| 196 | . = ALIGN(4); | ||
| 193 | __ebss_l1 = .; | 197 | __ebss_l1 = .; |
| 194 | } | 198 | } |
| 195 | 199 | ||
| @@ -203,11 +207,37 @@ SECTIONS | |||
| 203 | . = ALIGN(4); | 207 | . = ALIGN(4); |
| 204 | __sbss_b_l1 = .; | 208 | __sbss_b_l1 = .; |
| 205 | *(.l1.bss.B) | 209 | *(.l1.bss.B) |
| 206 | |||
| 207 | . = ALIGN(4); | 210 | . = ALIGN(4); |
| 208 | __ebss_b_l1 = .; | 211 | __ebss_b_l1 = .; |
| 209 | } | 212 | } |
| 210 | 213 | ||
| 214 | #ifdef L2_LENGTH | ||
| 215 | __l2_lma_start = .; | ||
| 216 | |||
| 217 | .text_data_l2 L2_START : AT(LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1)) | ||
| 218 | { | ||
| 219 | . = ALIGN(4); | ||
| 220 | __stext_l2 = .; | ||
| 221 | *(.l1.text) | ||
| 222 | . = ALIGN(4); | ||
| 223 | __etext_l2 = .; | ||
| 224 | |||
| 225 | . = ALIGN(4); | ||
| 226 | __sdata_l2 = .; | ||
| 227 | *(.l1.data) | ||
| 228 | __edata_l2 = .; | ||
| 229 | |||
| 230 | . = ALIGN(32); | ||
| 231 | *(.data_l2.cacheline_aligned) | ||
| 232 | |||
| 233 | . = ALIGN(4); | ||
| 234 | __sbss_l2 = .; | ||
| 235 | *(.l1.bss) | ||
| 236 | . = ALIGN(4); | ||
| 237 | __ebss_l2 = .; | ||
| 238 | } | ||
| 239 | #endif | ||
| 240 | |||
| 211 | /* Force trailing alignment of our init section so that when we | 241 | /* Force trailing alignment of our init section so that when we |
| 212 | * free our init memory, we don't leave behind a partial page. | 242 | * free our init memory, we don't leave behind a partial page. |
| 213 | */ | 243 | */ |
diff --git a/arch/blackfin/mach-bf527/boards/Kconfig b/arch/blackfin/mach-bf527/boards/Kconfig index 6a570ad03746..8bf9e58f0148 100644 --- a/arch/blackfin/mach-bf527/boards/Kconfig +++ b/arch/blackfin/mach-bf527/boards/Kconfig | |||
| @@ -9,4 +9,9 @@ config BFIN527_EZKIT | |||
| 9 | help | 9 | help |
| 10 | BF527-EZKIT-LITE board support. | 10 | BF527-EZKIT-LITE board support. |
| 11 | 11 | ||
| 12 | config BFIN527_BLUETECHNIX_CM | ||
| 13 | bool "Bluetechnix CM-BF527" | ||
| 14 | help | ||
| 15 | CM-BF527 support for EVAL- and DEV-Board. | ||
| 16 | |||
| 12 | endchoice | 17 | endchoice |
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile index 7277d35ef111..7ba7d256bbb8 100644 --- a/arch/blackfin/mach-bf527/boards/Makefile +++ b/arch/blackfin/mach-bf527/boards/Makefile | |||
| @@ -3,3 +3,4 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o | 5 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o |
| 6 | obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o | ||
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c new file mode 100644 index 000000000000..0b26ae2de5ee --- /dev/null +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
| @@ -0,0 +1,1011 @@ | |||
| 1 | /* | ||
| 2 | * File: arch/blackfin/mach-bf527/boards/cm-bf527.c | ||
| 3 | * Based on: arch/blackfin/mach-bf537/boards/stamp.c | ||
| 4 | * Author: Aidan Williams <aidan@nicta.com.au> | ||
| 5 | * | ||
| 6 | * Created: | ||
| 7 | * Description: | ||
| 8 | * | ||
| 9 | * Modified: | ||
| 10 | * Copyright 2005 National ICT Australia (NICTA) | ||
| 11 | * Copyright 2004-2008 Analog Devices Inc. | ||
| 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 of the License, or | ||
| 18 | * (at your option) 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; if not, see the file COPYING, or write | ||
| 27 | * to the Free Software Foundation, Inc., | ||
| 28 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 29 | */ | ||
| 30 | |||
| 31 | #include <linux/device.h> | ||
| 32 | #include <linux/platform_device.h> | ||
| 33 | #include <linux/mtd/mtd.h> | ||
| 34 | #include <linux/mtd/partitions.h> | ||
| 35 | #include <linux/mtd/physmap.h> | ||
| 36 | #include <linux/spi/spi.h> | ||
| 37 | #include <linux/spi/flash.h> | ||
| 38 | #include <linux/etherdevice.h> | ||
| 39 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
| 40 | #include <linux/usb/isp1362.h> | ||
| 41 | #endif | ||
| 42 | #include <linux/pata_platform.h> | ||
| 43 | #include <linux/i2c.h> | ||
| 44 | #include <linux/irq.h> | ||
| 45 | #include <linux/interrupt.h> | ||
| 46 | #include <linux/usb/sl811.h> | ||
| 47 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
| 48 | #include <linux/usb/musb.h> | ||
| 49 | #endif | ||
| 50 | #include <asm/cplb.h> | ||
| 51 | #include <asm/dma.h> | ||
| 52 | #include <asm/bfin5xx_spi.h> | ||
| 53 | #include <asm/reboot.h> | ||
| 54 | #include <asm/nand.h> | ||
| 55 | #include <asm/portmux.h> | ||
| 56 | #include <asm/dpmc.h> | ||
| 57 | #include <linux/spi/ad7877.h> | ||
| 58 | |||
| 59 | /* | ||
| 60 | * Name the Board for the /proc/cpuinfo | ||
| 61 | */ | ||
| 62 | const char bfin_board_name[] = "Bluetechnix CM-BF527"; | ||
| 63 | |||
| 64 | /* | ||
| 65 | * Driver needs to know address, irq and flag pin. | ||
| 66 | */ | ||
| 67 | |||
| 68 | #define ISP1761_BASE 0x203C0000 | ||
| 69 | #define ISP1761_IRQ IRQ_PF7 | ||
| 70 | |||
| 71 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
| 72 | static struct resource bfin_isp1761_resources[] = { | ||
| 73 | [0] = { | ||
| 74 | .name = "isp1761-regs", | ||
| 75 | .start = ISP1761_BASE + 0x00000000, | ||
| 76 | .end = ISP1761_BASE + 0x000fffff, | ||
| 77 | .flags = IORESOURCE_MEM, | ||
| 78 | }, | ||
| 79 | [1] = { | ||
| 80 | .start = ISP1761_IRQ, | ||
| 81 | .end = ISP1761_IRQ, | ||
| 82 | .flags = IORESOURCE_IRQ, | ||
| 83 | }, | ||
| 84 | }; | ||
| 85 | |||
| 86 | static struct platform_device bfin_isp1761_device = { | ||
| 87 | .name = "isp1761", | ||
| 88 | .id = 0, | ||
| 89 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | ||
| 90 | .resource = bfin_isp1761_resources, | ||
| 91 | }; | ||
| 92 | |||
| 93 | static struct platform_device *bfin_isp1761_devices[] = { | ||
| 94 | &bfin_isp1761_device, | ||
| 95 | }; | ||
| 96 | |||
| 97 | int __init bfin_isp1761_init(void) | ||
| 98 | { | ||
| 99 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
| 100 | |||
| 101 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
| 102 | set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); | ||
| 103 | |||
| 104 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
| 105 | } | ||
| 106 | |||
| 107 | void __exit bfin_isp1761_exit(void) | ||
| 108 | { | ||
| 109 | platform_device_unregister(&bfin_isp1761_device); | ||
| 110 | } | ||
| 111 | |||
| 112 | arch_initcall(bfin_isp1761_init); | ||
| 113 | #endif | ||
| 114 | |||
| 115 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
| 116 | static struct resource musb_resources[] = { | ||
| 117 | [0] = { | ||
| 118 | .start = 0xffc03800, | ||
| 119 | .end = 0xffc03cff, | ||
| 120 | .flags = IORESOURCE_MEM, | ||
| 121 | }, | ||
| 122 | [1] = { /* general IRQ */ | ||
| 123 | .start = IRQ_USB_INT0, | ||
| 124 | .end = IRQ_USB_INT0, | ||
| 125 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 126 | }, | ||
| 127 | [2] = { /* DMA IRQ */ | ||
| 128 | .start = IRQ_USB_DMA, | ||
| 129 | .end = IRQ_USB_DMA, | ||
| 130 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 131 | }, | ||
| 132 | }; | ||
| 133 | |||
| 134 | static struct musb_hdrc_platform_data musb_plat = { | ||
| 135 | #if defined(CONFIG_USB_MUSB_OTG) | ||
| 136 | .mode = MUSB_OTG, | ||
| 137 | #elif defined(CONFIG_USB_MUSB_HDRC_HCD) | ||
| 138 | .mode = MUSB_HOST, | ||
| 139 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) | ||
| 140 | .mode = MUSB_PERIPHERAL, | ||
| 141 | #endif | ||
| 142 | .multipoint = 0, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static u64 musb_dmamask = ~(u32)0; | ||
| 146 | |||
| 147 | static struct platform_device musb_device = { | ||
| 148 | .name = "musb_hdrc", | ||
| 149 | .id = 0, | ||
| 150 | .dev = { | ||
| 151 | .dma_mask = &musb_dmamask, | ||
| 152 | .coherent_dma_mask = 0xffffffff, | ||
| 153 | .platform_data = &musb_plat, | ||
| 154 | }, | ||
| 155 | .num_resources = ARRAY_SIZE(musb_resources), | ||
| 156 | .resource = musb_resources, | ||
| 157 | }; | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
| 161 | static struct mtd_partition ezkit_partitions[] = { | ||
| 162 | { | ||
| 163 | .name = "Bootloader", | ||
| 164 | .size = 0x40000, | ||
| 165 | .offset = 0, | ||
| 166 | }, { | ||
| 167 | .name = "Kernel", | ||
| 168 | .size = 0x1C0000, | ||
| 169 | .offset = MTDPART_OFS_APPEND, | ||
| 170 | }, { | ||
| 171 | .name = "RootFS", | ||
| 172 | .size = MTDPART_SIZ_FULL, | ||
| 173 | .offset = MTDPART_OFS_APPEND, | ||
| 174 | } | ||
| 175 | }; | ||
| 176 | |||
| 177 | static struct physmap_flash_data ezkit_flash_data = { | ||
| 178 | .width = 2, | ||
| 179 | .parts = ezkit_partitions, | ||
| 180 | .nr_parts = ARRAY_SIZE(ezkit_partitions), | ||
| 181 | }; | ||
| 182 | |||
| 183 | static struct resource ezkit_flash_resource = { | ||
| 184 | .start = 0x20000000, | ||
| 185 | .end = 0x201fffff, | ||
| 186 | .flags = IORESOURCE_MEM, | ||
| 187 | }; | ||
| 188 | |||
| 189 | static struct platform_device ezkit_flash_device = { | ||
| 190 | .name = "physmap-flash", | ||
| 191 | .id = 0, | ||
| 192 | .dev = { | ||
| 193 | .platform_data = &ezkit_flash_data, | ||
| 194 | }, | ||
| 195 | .num_resources = 1, | ||
| 196 | .resource = &ezkit_flash_resource, | ||
| 197 | }; | ||
| 198 | #endif | ||
| 199 | |||
| 200 | #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) | ||
| 201 | static struct mtd_partition partition_info[] = { | ||
| 202 | { | ||
| 203 | .name = "Linux Kernel", | ||
| 204 | .offset = 0, | ||
| 205 | .size = 4 * SIZE_1M, | ||
| 206 | }, | ||
| 207 | { | ||
| 208 | .name = "File System", | ||
| 209 | .offset = MTDPART_OFS_APPEND, | ||
| 210 | .size = MTDPART_SIZ_FULL, | ||
| 211 | }, | ||
| 212 | }; | ||
| 213 | |||
| 214 | static struct bf5xx_nand_platform bf5xx_nand_platform = { | ||
| 215 | .page_size = NFC_PG_SIZE_256, | ||
| 216 | .data_width = NFC_NWIDTH_8, | ||
| 217 | .partitions = partition_info, | ||
| 218 | .nr_partitions = ARRAY_SIZE(partition_info), | ||
| 219 | .rd_dly = 3, | ||
| 220 | .wr_dly = 3, | ||
| 221 | }; | ||
| 222 | |||
| 223 | static struct resource bf5xx_nand_resources[] = { | ||
| 224 | { | ||
| 225 | .start = NFC_CTL, | ||
| 226 | .end = NFC_DATA_RD + 2, | ||
| 227 | .flags = IORESOURCE_MEM, | ||
| 228 | }, | ||
| 229 | { | ||
| 230 | .start = CH_NFC, | ||
| 231 | .end = CH_NFC, | ||
| 232 | .flags = IORESOURCE_IRQ, | ||
| 233 | }, | ||
| 234 | }; | ||
| 235 | |||
| 236 | static struct platform_device bf5xx_nand_device = { | ||
| 237 | .name = "bf5xx-nand", | ||
| 238 | .id = 0, | ||
| 239 | .num_resources = ARRAY_SIZE(bf5xx_nand_resources), | ||
| 240 | .resource = bf5xx_nand_resources, | ||
| 241 | .dev = { | ||
| 242 | .platform_data = &bf5xx_nand_platform, | ||
| 243 | }, | ||
| 244 | }; | ||
| 245 | #endif | ||
| 246 | |||
| 247 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | ||
| 248 | static struct resource bfin_pcmcia_cf_resources[] = { | ||
| 249 | { | ||
| 250 | .start = 0x20310000, /* IO PORT */ | ||
| 251 | .end = 0x20312000, | ||
| 252 | .flags = IORESOURCE_MEM, | ||
| 253 | }, { | ||
| 254 | .start = 0x20311000, /* Attribute Memory */ | ||
| 255 | .end = 0x20311FFF, | ||
| 256 | .flags = IORESOURCE_MEM, | ||
| 257 | }, { | ||
| 258 | .start = IRQ_PF4, | ||
| 259 | .end = IRQ_PF4, | ||
| 260 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
| 261 | }, { | ||
| 262 | .start = 6, /* Card Detect PF6 */ | ||
| 263 | .end = 6, | ||
| 264 | .flags = IORESOURCE_IRQ, | ||
| 265 | }, | ||
| 266 | }; | ||
| 267 | |||
| 268 | static struct platform_device bfin_pcmcia_cf_device = { | ||
| 269 | .name = "bfin_cf_pcmcia", | ||
| 270 | .id = -1, | ||
| 271 | .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources), | ||
| 272 | .resource = bfin_pcmcia_cf_resources, | ||
| 273 | }; | ||
| 274 | #endif | ||
| 275 | |||
| 276 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||
| 277 | static struct platform_device rtc_device = { | ||
| 278 | .name = "rtc-bfin", | ||
| 279 | .id = -1, | ||
| 280 | }; | ||
| 281 | #endif | ||
| 282 | |||
| 283 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
| 284 | static struct resource smc91x_resources[] = { | ||
| 285 | { | ||
| 286 | .name = "smc91x-regs", | ||
| 287 | .start = 0x20300300, | ||
| 288 | .end = 0x20300300 + 16, | ||
| 289 | .flags = IORESOURCE_MEM, | ||
| 290 | }, { | ||
| 291 | |||
| 292 | .start = IRQ_PF7, | ||
| 293 | .end = IRQ_PF7, | ||
| 294 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 295 | }, | ||
| 296 | }; | ||
| 297 | static struct platform_device smc91x_device = { | ||
| 298 | .name = "smc91x", | ||
| 299 | .id = 0, | ||
| 300 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 301 | .resource = smc91x_resources, | ||
| 302 | }; | ||
| 303 | #endif | ||
| 304 | |||
| 305 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | ||
| 306 | static struct resource dm9000_resources[] = { | ||
| 307 | [0] = { | ||
| 308 | .start = 0x203FB800, | ||
| 309 | .end = 0x203FB800 + 8, | ||
| 310 | .flags = IORESOURCE_MEM, | ||
| 311 | }, | ||
| 312 | [1] = { | ||
| 313 | .start = IRQ_PF9, | ||
| 314 | .end = IRQ_PF9, | ||
| 315 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), | ||
| 316 | }, | ||
| 317 | }; | ||
| 318 | |||
| 319 | static struct platform_device dm9000_device = { | ||
| 320 | .name = "dm9000", | ||
| 321 | .id = -1, | ||
| 322 | .num_resources = ARRAY_SIZE(dm9000_resources), | ||
| 323 | .resource = dm9000_resources, | ||
| 324 | }; | ||
| 325 | #endif | ||
| 326 | |||
| 327 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
| 328 | static struct resource sl811_hcd_resources[] = { | ||
| 329 | { | ||
| 330 | .start = 0x20340000, | ||
| 331 | .end = 0x20340000, | ||
| 332 | .flags = IORESOURCE_MEM, | ||
| 333 | }, { | ||
| 334 | .start = 0x20340004, | ||
| 335 | .end = 0x20340004, | ||
| 336 | .flags = IORESOURCE_MEM, | ||
| 337 | }, { | ||
| 338 | .start = CONFIG_USB_SL811_BFIN_IRQ, | ||
| 339 | .end = CONFIG_USB_SL811_BFIN_IRQ, | ||
| 340 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 341 | }, | ||
| 342 | }; | ||
| 343 | |||
| 344 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
| 345 | void sl811_port_power(struct device *dev, int is_on) | ||
| 346 | { | ||
| 347 | gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS"); | ||
| 348 | gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on); | ||
| 349 | } | ||
| 350 | #endif | ||
| 351 | |||
| 352 | static struct sl811_platform_data sl811_priv = { | ||
| 353 | .potpg = 10, | ||
| 354 | .power = 250, /* == 500mA */ | ||
| 355 | #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS) | ||
| 356 | .port_power = &sl811_port_power, | ||
| 357 | #endif | ||
| 358 | }; | ||
| 359 | |||
| 360 | static struct platform_device sl811_hcd_device = { | ||
| 361 | .name = "sl811-hcd", | ||
| 362 | .id = 0, | ||
| 363 | .dev = { | ||
| 364 | .platform_data = &sl811_priv, | ||
| 365 | }, | ||
| 366 | .num_resources = ARRAY_SIZE(sl811_hcd_resources), | ||
| 367 | .resource = sl811_hcd_resources, | ||
| 368 | }; | ||
| 369 | #endif | ||
| 370 | |||
| 371 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
| 372 | static struct resource isp1362_hcd_resources[] = { | ||
| 373 | { | ||
| 374 | .start = 0x20360000, | ||
| 375 | .end = 0x20360000, | ||
| 376 | .flags = IORESOURCE_MEM, | ||
| 377 | }, { | ||
| 378 | .start = 0x20360004, | ||
| 379 | .end = 0x20360004, | ||
| 380 | .flags = IORESOURCE_MEM, | ||
| 381 | }, { | ||
| 382 | .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, | ||
| 383 | .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ, | ||
| 384 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 385 | }, | ||
| 386 | }; | ||
| 387 | |||
| 388 | static struct isp1362_platform_data isp1362_priv = { | ||
| 389 | .sel15Kres = 1, | ||
| 390 | .clknotstop = 0, | ||
| 391 | .oc_enable = 0, | ||
| 392 | .int_act_high = 0, | ||
| 393 | .int_edge_triggered = 0, | ||
| 394 | .remote_wakeup_connected = 0, | ||
| 395 | .no_power_switching = 1, | ||
| 396 | .power_switching_mode = 0, | ||
| 397 | }; | ||
| 398 | |||
| 399 | static struct platform_device isp1362_hcd_device = { | ||
| 400 | .name = "isp1362-hcd", | ||
| 401 | .id = 0, | ||
| 402 | .dev = { | ||
| 403 | .platform_data = &isp1362_priv, | ||
| 404 | }, | ||
| 405 | .num_resources = ARRAY_SIZE(isp1362_hcd_resources), | ||
| 406 | .resource = isp1362_hcd_resources, | ||
| 407 | }; | ||
| 408 | #endif | ||
| 409 | |||
| 410 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
| 411 | static struct platform_device bfin_mac_device = { | ||
| 412 | .name = "bfin_mac", | ||
| 413 | }; | ||
| 414 | #endif | ||
| 415 | |||
| 416 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
| 417 | static struct resource net2272_bfin_resources[] = { | ||
| 418 | { | ||
| 419 | .start = 0x20300000, | ||
| 420 | .end = 0x20300000 + 0x100, | ||
| 421 | .flags = IORESOURCE_MEM, | ||
| 422 | }, { | ||
| 423 | .start = IRQ_PF7, | ||
| 424 | .end = IRQ_PF7, | ||
| 425 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
| 426 | }, | ||
| 427 | }; | ||
| 428 | |||
| 429 | static struct platform_device net2272_bfin_device = { | ||
| 430 | .name = "net2272", | ||
| 431 | .id = -1, | ||
| 432 | .num_resources = ARRAY_SIZE(net2272_bfin_resources), | ||
| 433 | .resource = net2272_bfin_resources, | ||
| 434 | }; | ||
| 435 | #endif | ||
| 436 | |||
| 437 | #if defined(CONFIG_MTD_M25P80) \ | ||
| 438 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
| 439 | static struct mtd_partition bfin_spi_flash_partitions[] = { | ||
| 440 | { | ||
| 441 | .name = "bootloader", | ||
| 442 | .size = 0x00040000, | ||
| 443 | .offset = 0, | ||
| 444 | .mask_flags = MTD_CAP_ROM | ||
| 445 | }, { | ||
| 446 | .name = "linux kernel", | ||
| 447 | .size = MTDPART_SIZ_FULL, | ||
| 448 | .offset = MTDPART_OFS_APPEND, | ||
| 449 | } | ||
| 450 | }; | ||
| 451 | |||
| 452 | static struct flash_platform_data bfin_spi_flash_data = { | ||
| 453 | .name = "m25p80", | ||
| 454 | .parts = bfin_spi_flash_partitions, | ||
| 455 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), | ||
| 456 | .type = "m25p16", | ||
| 457 | }; | ||
| 458 | |||
| 459 | /* SPI flash chip (m25p64) */ | ||
| 460 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | ||
| 461 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
| 462 | .bits_per_word = 8, | ||
| 463 | }; | ||
| 464 | #endif | ||
| 465 | |||
| 466 | #if defined(CONFIG_SPI_ADC_BF533) \ | ||
| 467 | || defined(CONFIG_SPI_ADC_BF533_MODULE) | ||
| 468 | /* SPI ADC chip */ | ||
| 469 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
| 470 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
| 471 | .bits_per_word = 16, | ||
| 472 | }; | ||
| 473 | #endif | ||
| 474 | |||
| 475 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | ||
| 476 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | ||
| 477 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
| 478 | .enable_dma = 0, | ||
| 479 | .bits_per_word = 16, | ||
| 480 | }; | ||
| 481 | #endif | ||
| 482 | |||
| 483 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
| 484 | static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | ||
| 485 | .enable_dma = 0, | ||
| 486 | .bits_per_word = 16, | ||
| 487 | }; | ||
| 488 | #endif | ||
| 489 | |||
| 490 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
| 491 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||
| 492 | .enable_dma = 1, | ||
| 493 | .bits_per_word = 8, | ||
| 494 | }; | ||
| 495 | #endif | ||
| 496 | |||
| 497 | #if defined(CONFIG_PBX) | ||
| 498 | static struct bfin5xx_spi_chip spi_si3xxx_chip_info = { | ||
| 499 | .ctl_reg = 0x4, /* send zero */ | ||
| 500 | .enable_dma = 0, | ||
| 501 | .bits_per_word = 8, | ||
| 502 | .cs_change_per_word = 1, | ||
| 503 | }; | ||
| 504 | #endif | ||
| 505 | |||
| 506 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | ||
| 507 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
| 508 | .enable_dma = 0, | ||
| 509 | .bits_per_word = 16, | ||
| 510 | }; | ||
| 511 | |||
| 512 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | ||
| 513 | .model = 7877, | ||
| 514 | .vref_delay_usecs = 50, /* internal, no capacitor */ | ||
| 515 | .x_plate_ohms = 419, | ||
| 516 | .y_plate_ohms = 486, | ||
| 517 | .pressure_max = 1000, | ||
| 518 | .pressure_min = 0, | ||
| 519 | .stopacq_polarity = 1, | ||
| 520 | .first_conversion_delay = 3, | ||
| 521 | .acquisition_time = 1, | ||
| 522 | .averaging = 1, | ||
| 523 | .pen_down_acc_interval = 1, | ||
| 524 | }; | ||
| 525 | #endif | ||
| 526 | |||
| 527 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
| 528 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
| 529 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
| 530 | .enable_dma = 0, | ||
| 531 | .bits_per_word = 16, | ||
| 532 | }; | ||
| 533 | #endif | ||
| 534 | |||
| 535 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
| 536 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
| 537 | .enable_dma = 0, | ||
| 538 | .bits_per_word = 8, | ||
| 539 | }; | ||
| 540 | #endif | ||
| 541 | |||
| 542 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||
| 543 | #if defined(CONFIG_MTD_M25P80) \ | ||
| 544 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
| 545 | { | ||
| 546 | /* the modalias must be the same as spi device driver name */ | ||
| 547 | .modalias = "m25p80", /* Name of spi_driver for this device */ | ||
| 548 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
| 549 | .bus_num = 0, /* Framework bus number */ | ||
| 550 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ | ||
| 551 | .platform_data = &bfin_spi_flash_data, | ||
| 552 | .controller_data = &spi_flash_chip_info, | ||
| 553 | .mode = SPI_MODE_3, | ||
| 554 | }, | ||
| 555 | #endif | ||
| 556 | |||
| 557 | #if defined(CONFIG_SPI_ADC_BF533) \ | ||
| 558 | || defined(CONFIG_SPI_ADC_BF533_MODULE) | ||
| 559 | { | ||
| 560 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
| 561 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
| 562 | .bus_num = 0, /* Framework bus number */ | ||
| 563 | .chip_select = 1, /* Framework chip select. */ | ||
| 564 | .platform_data = NULL, /* No spi_driver specific config */ | ||
| 565 | .controller_data = &spi_adc_chip_info, | ||
| 566 | }, | ||
| 567 | #endif | ||
| 568 | |||
| 569 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | ||
| 570 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | ||
| 571 | { | ||
| 572 | .modalias = "ad1836-spi", | ||
| 573 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
| 574 | .bus_num = 0, | ||
| 575 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, | ||
| 576 | .controller_data = &ad1836_spi_chip_info, | ||
| 577 | }, | ||
| 578 | #endif | ||
| 579 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
| 580 | { | ||
| 581 | .modalias = "ad9960-spi", | ||
| 582 | .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ | ||
| 583 | .bus_num = 0, | ||
| 584 | .chip_select = 1, | ||
| 585 | .controller_data = &ad9960_spi_chip_info, | ||
| 586 | }, | ||
| 587 | #endif | ||
| 588 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
| 589 | { | ||
| 590 | .modalias = "spi_mmc_dummy", | ||
| 591 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
| 592 | .bus_num = 0, | ||
| 593 | .chip_select = 0, | ||
| 594 | .platform_data = NULL, | ||
| 595 | .controller_data = &spi_mmc_chip_info, | ||
| 596 | .mode = SPI_MODE_3, | ||
| 597 | }, | ||
| 598 | { | ||
| 599 | .modalias = "spi_mmc", | ||
| 600 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
| 601 | .bus_num = 0, | ||
| 602 | .chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||
| 603 | .platform_data = NULL, | ||
| 604 | .controller_data = &spi_mmc_chip_info, | ||
| 605 | .mode = SPI_MODE_3, | ||
| 606 | }, | ||
| 607 | #endif | ||
| 608 | #if defined(CONFIG_PBX) | ||
| 609 | { | ||
| 610 | .modalias = "fxs-spi", | ||
| 611 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
| 612 | .bus_num = 0, | ||
| 613 | .chip_select = 8 - CONFIG_J11_JUMPER, | ||
| 614 | .controller_data = &spi_si3xxx_chip_info, | ||
| 615 | .mode = SPI_MODE_3, | ||
| 616 | }, | ||
| 617 | { | ||
| 618 | .modalias = "fxo-spi", | ||
| 619 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
| 620 | .bus_num = 0, | ||
| 621 | .chip_select = 8 - CONFIG_J19_JUMPER, | ||
| 622 | .controller_data = &spi_si3xxx_chip_info, | ||
| 623 | .mode = SPI_MODE_3, | ||
| 624 | }, | ||
| 625 | #endif | ||
| 626 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | ||
| 627 | { | ||
| 628 | .modalias = "ad7877", | ||
| 629 | .platform_data = &bfin_ad7877_ts_info, | ||
| 630 | .irq = IRQ_PF8, | ||
| 631 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
| 632 | .bus_num = 0, | ||
| 633 | .chip_select = 2, | ||
| 634 | .controller_data = &spi_ad7877_chip_info, | ||
| 635 | }, | ||
| 636 | #endif | ||
| 637 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
| 638 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
| 639 | { | ||
| 640 | .modalias = "wm8731", | ||
| 641 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
| 642 | .bus_num = 0, | ||
| 643 | .chip_select = 5, | ||
| 644 | .controller_data = &spi_wm8731_chip_info, | ||
| 645 | .mode = SPI_MODE_0, | ||
| 646 | }, | ||
| 647 | #endif | ||
| 648 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
| 649 | { | ||
| 650 | .modalias = "spidev", | ||
| 651 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
| 652 | .bus_num = 0, | ||
| 653 | .chip_select = 1, | ||
| 654 | .controller_data = &spidev_chip_info, | ||
| 655 | }, | ||
| 656 | #endif | ||
| 657 | }; | ||
| 658 | |||
| 659 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
| 660 | /* SPI controller data */ | ||
| 661 | static struct bfin5xx_spi_master bfin_spi0_info = { | ||
| 662 | .num_chipselect = 8, | ||
| 663 | .enable_dma = 1, /* master has the ability to do dma transfer */ | ||
| 664 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
| 665 | }; | ||
| 666 | |||
| 667 | /* SPI (0) */ | ||
| 668 | static struct resource bfin_spi0_resource[] = { | ||
| 669 | [0] = { | ||
| 670 | .start = SPI0_REGBASE, | ||
| 671 | .end = SPI0_REGBASE + 0xFF, | ||
| 672 | .flags = IORESOURCE_MEM, | ||
| 673 | }, | ||
| 674 | [1] = { | ||
| 675 | .start = CH_SPI, | ||
| 676 | .end = CH_SPI, | ||
| 677 | .flags = IORESOURCE_IRQ, | ||
| 678 | }, | ||
| 679 | }; | ||
| 680 | |||
| 681 | static struct platform_device bfin_spi0_device = { | ||
| 682 | .name = "bfin-spi", | ||
| 683 | .id = 0, /* Bus number */ | ||
| 684 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), | ||
| 685 | .resource = bfin_spi0_resource, | ||
| 686 | .dev = { | ||
| 687 | .platform_data = &bfin_spi0_info, /* Passed to driver */ | ||
| 688 | }, | ||
| 689 | }; | ||
| 690 | #endif /* spi master and devices */ | ||
| 691 | |||
| 692 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) | ||
| 693 | static struct platform_device bfin_fb_adv7393_device = { | ||
| 694 | .name = "bfin-adv7393", | ||
| 695 | }; | ||
| 696 | #endif | ||
| 697 | |||
| 698 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | ||
| 699 | static struct resource bfin_uart_resources[] = { | ||
| 700 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
| 701 | { | ||
| 702 | .start = 0xFFC00400, | ||
| 703 | .end = 0xFFC004FF, | ||
| 704 | .flags = IORESOURCE_MEM, | ||
| 705 | }, | ||
| 706 | #endif | ||
| 707 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
| 708 | { | ||
| 709 | .start = 0xFFC02000, | ||
| 710 | .end = 0xFFC020FF, | ||
| 711 | .flags = IORESOURCE_MEM, | ||
| 712 | }, | ||
| 713 | #endif | ||
| 714 | }; | ||
| 715 | |||
| 716 | static struct platform_device bfin_uart_device = { | ||
| 717 | .name = "bfin-uart", | ||
| 718 | .id = 1, | ||
| 719 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | ||
| 720 | .resource = bfin_uart_resources, | ||
| 721 | }; | ||
| 722 | #endif | ||
| 723 | |||
| 724 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
| 725 | static struct resource bfin_sir_resources[] = { | ||
| 726 | #ifdef CONFIG_BFIN_SIR0 | ||
| 727 | { | ||
| 728 | .start = 0xFFC00400, | ||
| 729 | .end = 0xFFC004FF, | ||
| 730 | .flags = IORESOURCE_MEM, | ||
| 731 | }, | ||
| 732 | #endif | ||
| 733 | #ifdef CONFIG_BFIN_SIR1 | ||
| 734 | { | ||
| 735 | .start = 0xFFC02000, | ||
| 736 | .end = 0xFFC020FF, | ||
| 737 | .flags = IORESOURCE_MEM, | ||
| 738 | }, | ||
| 739 | #endif | ||
| 740 | }; | ||
| 741 | |||
| 742 | static struct platform_device bfin_sir_device = { | ||
| 743 | .name = "bfin_sir", | ||
| 744 | .id = 0, | ||
| 745 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
| 746 | .resource = bfin_sir_resources, | ||
| 747 | }; | ||
| 748 | #endif | ||
| 749 | |||
| 750 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | ||
| 751 | static struct resource bfin_twi0_resource[] = { | ||
| 752 | [0] = { | ||
| 753 | .start = TWI0_REGBASE, | ||
| 754 | .end = TWI0_REGBASE, | ||
| 755 | .flags = IORESOURCE_MEM, | ||
| 756 | }, | ||
| 757 | [1] = { | ||
| 758 | .start = IRQ_TWI, | ||
| 759 | .end = IRQ_TWI, | ||
| 760 | .flags = IORESOURCE_IRQ, | ||
| 761 | }, | ||
| 762 | }; | ||
| 763 | |||
| 764 | static struct platform_device i2c_bfin_twi_device = { | ||
| 765 | .name = "i2c-bfin-twi", | ||
| 766 | .id = 0, | ||
| 767 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), | ||
| 768 | .resource = bfin_twi0_resource, | ||
| 769 | }; | ||
| 770 | #endif | ||
| 771 | |||
| 772 | #ifdef CONFIG_I2C_BOARDINFO | ||
| 773 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | ||
| 774 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | ||
| 775 | { | ||
| 776 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | ||
| 777 | .type = "pcf8574_lcd", | ||
| 778 | }, | ||
| 779 | #endif | ||
| 780 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | ||
| 781 | { | ||
| 782 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | ||
| 783 | .type = "pcf8574_keypad", | ||
| 784 | .irq = IRQ_PF8, | ||
| 785 | }, | ||
| 786 | #endif | ||
| 787 | }; | ||
| 788 | #endif | ||
| 789 | |||
| 790 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
| 791 | static struct platform_device bfin_sport0_uart_device = { | ||
| 792 | .name = "bfin-sport-uart", | ||
| 793 | .id = 0, | ||
| 794 | }; | ||
| 795 | |||
| 796 | static struct platform_device bfin_sport1_uart_device = { | ||
| 797 | .name = "bfin-sport-uart", | ||
| 798 | .id = 1, | ||
| 799 | }; | ||
| 800 | #endif | ||
| 801 | |||
| 802 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
| 803 | #define PATA_INT 55 | ||
| 804 | |||
| 805 | static struct pata_platform_info bfin_pata_platform_data = { | ||
| 806 | .ioport_shift = 1, | ||
| 807 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | ||
| 808 | }; | ||
| 809 | |||
| 810 | static struct resource bfin_pata_resources[] = { | ||
| 811 | { | ||
| 812 | .start = 0x20314020, | ||
| 813 | .end = 0x2031403F, | ||
| 814 | .flags = IORESOURCE_MEM, | ||
| 815 | }, | ||
| 816 | { | ||
| 817 | .start = 0x2031401C, | ||
| 818 | .end = 0x2031401F, | ||
| 819 | .flags = IORESOURCE_MEM, | ||
| 820 | }, | ||
| 821 | { | ||
| 822 | .start = PATA_INT, | ||
| 823 | .end = PATA_INT, | ||
| 824 | .flags = IORESOURCE_IRQ, | ||
| 825 | }, | ||
| 826 | }; | ||
| 827 | |||
| 828 | static struct platform_device bfin_pata_device = { | ||
| 829 | .name = "pata_platform", | ||
| 830 | .id = -1, | ||
| 831 | .num_resources = ARRAY_SIZE(bfin_pata_resources), | ||
| 832 | .resource = bfin_pata_resources, | ||
| 833 | .dev = { | ||
| 834 | .platform_data = &bfin_pata_platform_data, | ||
| 835 | } | ||
| 836 | }; | ||
| 837 | #endif | ||
| 838 | |||
| 839 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
| 840 | #include <linux/input.h> | ||
| 841 | #include <linux/gpio_keys.h> | ||
| 842 | |||
| 843 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
| 844 | {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"}, | ||
| 845 | }; | ||
| 846 | |||
| 847 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
| 848 | .buttons = bfin_gpio_keys_table, | ||
| 849 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
| 850 | }; | ||
| 851 | |||
| 852 | static struct platform_device bfin_device_gpiokeys = { | ||
| 853 | .name = "gpio-keys", | ||
| 854 | .dev = { | ||
| 855 | .platform_data = &bfin_gpio_keys_data, | ||
| 856 | }, | ||
| 857 | }; | ||
| 858 | #endif | ||
| 859 | |||
| 860 | static struct resource bfin_gpios_resources = { | ||
| 861 | .start = 0, | ||
| 862 | .end = MAX_BLACKFIN_GPIOS - 1, | ||
| 863 | .flags = IORESOURCE_IRQ, | ||
| 864 | }; | ||
| 865 | |||
| 866 | static struct platform_device bfin_gpios_device = { | ||
| 867 | .name = "simple-gpio", | ||
| 868 | .id = -1, | ||
| 869 | .num_resources = 1, | ||
| 870 | .resource = &bfin_gpios_resources, | ||
| 871 | }; | ||
| 872 | |||
| 873 | static const unsigned int cclk_vlev_datasheet[] = | ||
| 874 | { | ||
| 875 | VRPAIR(VLEV_100, 400000000), | ||
| 876 | VRPAIR(VLEV_105, 426000000), | ||
| 877 | VRPAIR(VLEV_110, 500000000), | ||
| 878 | VRPAIR(VLEV_115, 533000000), | ||
| 879 | VRPAIR(VLEV_120, 600000000), | ||
| 880 | }; | ||
| 881 | |||
| 882 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { | ||
| 883 | .tuple_tab = cclk_vlev_datasheet, | ||
| 884 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), | ||
| 885 | .vr_settling_time = 25 /* us */, | ||
| 886 | }; | ||
| 887 | |||
| 888 | static struct platform_device bfin_dpmc = { | ||
| 889 | .name = "bfin dpmc", | ||
| 890 | .dev = { | ||
| 891 | .platform_data = &bfin_dmpc_vreg_data, | ||
| 892 | }, | ||
| 893 | }; | ||
| 894 | |||
| 895 | static struct platform_device *stamp_devices[] __initdata = { | ||
| 896 | |||
| 897 | &bfin_dpmc, | ||
| 898 | |||
| 899 | #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) | ||
| 900 | &bf5xx_nand_device, | ||
| 901 | #endif | ||
| 902 | |||
| 903 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | ||
| 904 | &bfin_pcmcia_cf_device, | ||
| 905 | #endif | ||
| 906 | |||
| 907 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||
| 908 | &rtc_device, | ||
| 909 | #endif | ||
| 910 | |||
| 911 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | ||
| 912 | &sl811_hcd_device, | ||
| 913 | #endif | ||
| 914 | |||
| 915 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
| 916 | &isp1362_hcd_device, | ||
| 917 | #endif | ||
| 918 | |||
| 919 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
| 920 | &musb_device, | ||
| 921 | #endif | ||
| 922 | |||
| 923 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
| 924 | &smc91x_device, | ||
| 925 | #endif | ||
| 926 | |||
| 927 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | ||
| 928 | &dm9000_device, | ||
| 929 | #endif | ||
| 930 | |||
| 931 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
| 932 | &bfin_mac_device, | ||
| 933 | #endif | ||
| 934 | |||
| 935 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
| 936 | &net2272_bfin_device, | ||
| 937 | #endif | ||
| 938 | |||
| 939 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
| 940 | &bfin_spi0_device, | ||
| 941 | #endif | ||
| 942 | |||
| 943 | #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) | ||
| 944 | &bfin_fb_adv7393_device, | ||
| 945 | #endif | ||
| 946 | |||
| 947 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | ||
| 948 | &bfin_uart_device, | ||
| 949 | #endif | ||
| 950 | |||
| 951 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
| 952 | &bfin_sir_device, | ||
| 953 | #endif | ||
| 954 | |||
| 955 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | ||
| 956 | &i2c_bfin_twi_device, | ||
| 957 | #endif | ||
| 958 | |||
| 959 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
| 960 | &bfin_sport0_uart_device, | ||
| 961 | &bfin_sport1_uart_device, | ||
| 962 | #endif | ||
| 963 | |||
| 964 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
| 965 | &bfin_pata_device, | ||
| 966 | #endif | ||
| 967 | |||
| 968 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
| 969 | &bfin_device_gpiokeys, | ||
| 970 | #endif | ||
| 971 | |||
| 972 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
| 973 | &ezkit_flash_device, | ||
| 974 | #endif | ||
| 975 | |||
| 976 | &bfin_gpios_device, | ||
| 977 | }; | ||
| 978 | |||
| 979 | static int __init stamp_init(void) | ||
| 980 | { | ||
| 981 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
| 982 | |||
| 983 | #ifdef CONFIG_I2C_BOARDINFO | ||
| 984 | i2c_register_board_info(0, bfin_i2c_board_info, | ||
| 985 | ARRAY_SIZE(bfin_i2c_board_info)); | ||
| 986 | #endif | ||
| 987 | |||
| 988 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | ||
| 989 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | ||
| 990 | |||
| 991 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
| 992 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | ||
| 993 | #endif | ||
| 994 | return 0; | ||
| 995 | } | ||
| 996 | |||
| 997 | arch_initcall(stamp_init); | ||
| 998 | |||
| 999 | void native_machine_restart(char *cmd) | ||
| 1000 | { | ||
| 1001 | /* workaround reboot hang when booting from SPI */ | ||
| 1002 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | ||
| 1003 | bfin_gpio_reset_spi0_ssel1(); | ||
| 1004 | } | ||
| 1005 | |||
| 1006 | void bfin_get_ether_addr(char *addr) | ||
| 1007 | { | ||
| 1008 | random_ether_addr(addr); | ||
| 1009 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
| 1010 | } | ||
| 1011 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf527/head.S b/arch/blackfin/mach-bf527/head.S index 57bdb3ba2fed..fe05cc1ef174 100644 --- a/arch/blackfin/mach-bf527/head.S +++ b/arch/blackfin/mach-bf527/head.S | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
| 33 | #include <asm/trace.h> | 33 | #include <asm/trace.h> |
| 34 | 34 | ||
| 35 | #if CONFIG_BFIN_KERNEL_CLOCK | 35 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 36 | #include <asm/mach-common/clocks.h> | 36 | #include <asm/mach-common/clocks.h> |
| 37 | #include <asm/mach/mem_init.h> | 37 | #include <asm/mach/mem_init.h> |
| 38 | #endif | 38 | #endif |
| @@ -185,7 +185,7 @@ ENTRY(__start) | |||
| 185 | 185 | ||
| 186 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | 186 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ |
| 187 | call _bf53x_relocate_l1_mem; | 187 | call _bf53x_relocate_l1_mem; |
| 188 | #if CONFIG_BFIN_KERNEL_CLOCK | 188 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 189 | call _start_dma_code; | 189 | call _start_dma_code; |
| 190 | #endif | 190 | #endif |
| 191 | 191 | ||
| @@ -318,7 +318,7 @@ ENDPROC(_real_start) | |||
| 318 | __FINIT | 318 | __FINIT |
| 319 | 319 | ||
| 320 | .section .l1.text | 320 | .section .l1.text |
| 321 | #if CONFIG_BFIN_KERNEL_CLOCK | 321 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 322 | ENTRY(_start_dma_code) | 322 | ENTRY(_start_dma_code) |
| 323 | 323 | ||
| 324 | /* Enable PHY CLK buffer output */ | 324 | /* Enable PHY CLK buffer output */ |
| @@ -398,12 +398,6 @@ ENTRY(_start_dma_code) | |||
| 398 | w[p0] = r0.l; | 398 | w[p0] = r0.l; |
| 399 | ssync; | 399 | ssync; |
| 400 | 400 | ||
| 401 | p0.l = LO(EBIU_SDBCTL); | ||
| 402 | p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */ | ||
| 403 | r0 = mem_SDBCTL; | ||
| 404 | w[p0] = r0.l; | ||
| 405 | ssync; | ||
| 406 | |||
| 407 | P2.H = hi(EBIU_SDGCTL); | 401 | P2.H = hi(EBIU_SDGCTL); |
| 408 | P2.L = lo(EBIU_SDGCTL); | 402 | P2.L = lo(EBIU_SDGCTL); |
| 409 | R0 = [P2]; | 403 | R0 = [P2]; |
diff --git a/arch/blackfin/mach-bf533/head.S b/arch/blackfin/mach-bf533/head.S index 1295deac00a4..c671e8549b17 100644 --- a/arch/blackfin/mach-bf533/head.S +++ b/arch/blackfin/mach-bf533/head.S | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
| 32 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
| 33 | #include <asm/trace.h> | 33 | #include <asm/trace.h> |
| 34 | #if CONFIG_BFIN_KERNEL_CLOCK | 34 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 35 | #include <asm/mach-common/clocks.h> | 35 | #include <asm/mach-common/clocks.h> |
| 36 | #include <asm/mach/mem_init.h> | 36 | #include <asm/mach/mem_init.h> |
| 37 | #endif | 37 | #endif |
| @@ -186,7 +186,7 @@ ENTRY(__start) | |||
| 186 | 186 | ||
| 187 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | 187 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ |
| 188 | call _bf53x_relocate_l1_mem; | 188 | call _bf53x_relocate_l1_mem; |
| 189 | #if CONFIG_BFIN_KERNEL_CLOCK | 189 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 190 | call _start_dma_code; | 190 | call _start_dma_code; |
| 191 | #endif | 191 | #endif |
| 192 | 192 | ||
| @@ -319,7 +319,7 @@ ENDPROC(_real_start) | |||
| 319 | __FINIT | 319 | __FINIT |
| 320 | 320 | ||
| 321 | .section .l1.text | 321 | .section .l1.text |
| 322 | #if CONFIG_BFIN_KERNEL_CLOCK | 322 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 323 | ENTRY(_start_dma_code) | 323 | ENTRY(_start_dma_code) |
| 324 | p0.h = hi(SIC_IWR); | 324 | p0.h = hi(SIC_IWR); |
| 325 | p0.l = lo(SIC_IWR); | 325 | p0.l = lo(SIC_IWR); |
| @@ -390,12 +390,6 @@ ENTRY(_start_dma_code) | |||
| 390 | w[p0] = r0.l; | 390 | w[p0] = r0.l; |
| 391 | ssync; | 391 | ssync; |
| 392 | 392 | ||
| 393 | p0.l = LO(EBIU_SDBCTL); | ||
| 394 | p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */ | ||
| 395 | r0 = mem_SDBCTL; | ||
| 396 | w[p0] = r0.l; | ||
| 397 | ssync; | ||
| 398 | |||
| 399 | P2.H = hi(EBIU_SDGCTL); | 393 | P2.H = hi(EBIU_SDGCTL); |
| 400 | P2.L = lo(EBIU_SDGCTL); | 394 | P2.L = lo(EBIU_SDGCTL); |
| 401 | R0 = [P2]; | 395 | R0 = [P2]; |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 671f9d67f23a..6dbc76fb080b 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
| @@ -29,9 +29,12 @@ | |||
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | #include <linux/device.h> | 31 | #include <linux/device.h> |
| 32 | #include <linux/kernel.h> | ||
| 32 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
| 33 | #include <linux/mtd/mtd.h> | 34 | #include <linux/mtd/mtd.h> |
| 35 | #include <linux/mtd/nand.h> | ||
| 34 | #include <linux/mtd/partitions.h> | 36 | #include <linux/mtd/partitions.h> |
| 37 | #include <linux/mtd/plat-ram.h> | ||
| 35 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
| 36 | #include <linux/spi/spi.h> | 39 | #include <linux/spi/spi.h> |
| 37 | #include <linux/spi/flash.h> | 40 | #include <linux/spi/flash.h> |
| @@ -355,6 +358,84 @@ static struct platform_device net2272_bfin_device = { | |||
| 355 | }; | 358 | }; |
| 356 | #endif | 359 | #endif |
| 357 | 360 | ||
| 361 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) | ||
| 362 | #ifdef CONFIG_MTD_PARTITIONS | ||
| 363 | const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; | ||
| 364 | |||
| 365 | static struct mtd_partition bfin_plat_nand_partitions[] = { | ||
| 366 | { | ||
| 367 | .name = "linux kernel", | ||
| 368 | .size = 0x400000, | ||
| 369 | .offset = 0, | ||
| 370 | }, { | ||
| 371 | .name = "file system", | ||
| 372 | .size = MTDPART_SIZ_FULL, | ||
| 373 | .offset = MTDPART_OFS_APPEND, | ||
| 374 | }, | ||
| 375 | }; | ||
| 376 | #endif | ||
| 377 | |||
| 378 | #define BFIN_NAND_PLAT_CLE 2 | ||
| 379 | #define BFIN_NAND_PLAT_ALE 1 | ||
| 380 | static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | ||
| 381 | { | ||
| 382 | struct nand_chip *this = mtd->priv; | ||
| 383 | |||
| 384 | if (cmd == NAND_CMD_NONE) | ||
| 385 | return; | ||
| 386 | |||
| 387 | if (ctrl & NAND_CLE) | ||
| 388 | writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE)); | ||
| 389 | else | ||
| 390 | writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE)); | ||
| 391 | } | ||
| 392 | |||
| 393 | #define BFIN_NAND_PLAT_READY GPIO_PF3 | ||
| 394 | static int bfin_plat_nand_dev_ready(struct mtd_info *mtd) | ||
| 395 | { | ||
| 396 | return gpio_get_value(BFIN_NAND_PLAT_READY); | ||
| 397 | } | ||
| 398 | |||
| 399 | static struct platform_nand_data bfin_plat_nand_data = { | ||
| 400 | .chip = { | ||
| 401 | .chip_delay = 30, | ||
| 402 | #ifdef CONFIG_MTD_PARTITIONS | ||
| 403 | .part_probe_types = part_probes, | ||
| 404 | .partitions = bfin_plat_nand_partitions, | ||
| 405 | .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions), | ||
| 406 | #endif | ||
| 407 | }, | ||
| 408 | .ctrl = { | ||
| 409 | .cmd_ctrl = bfin_plat_nand_cmd_ctrl, | ||
| 410 | .dev_ready = bfin_plat_nand_dev_ready, | ||
| 411 | }, | ||
| 412 | }; | ||
| 413 | |||
| 414 | #define MAX(x, y) (x > y ? x : y) | ||
| 415 | static struct resource bfin_plat_nand_resources = { | ||
| 416 | .start = 0x20212000, | ||
| 417 | .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)), | ||
| 418 | .flags = IORESOURCE_IO, | ||
| 419 | }; | ||
| 420 | |||
| 421 | static struct platform_device bfin_async_nand_device = { | ||
| 422 | .name = "gen_nand", | ||
| 423 | .id = -1, | ||
| 424 | .num_resources = 1, | ||
| 425 | .resource = &bfin_plat_nand_resources, | ||
| 426 | .dev = { | ||
| 427 | .platform_data = &bfin_plat_nand_data, | ||
| 428 | }, | ||
| 429 | }; | ||
| 430 | |||
| 431 | static void bfin_plat_nand_init(void) | ||
| 432 | { | ||
| 433 | gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat"); | ||
| 434 | } | ||
| 435 | #else | ||
| 436 | static void bfin_plat_nand_init(void) {} | ||
| 437 | #endif | ||
| 438 | |||
| 358 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 439 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
| 359 | static struct mtd_partition stamp_partitions[] = { | 440 | static struct mtd_partition stamp_partitions[] = { |
| 360 | { | 441 | { |
| @@ -780,7 +861,7 @@ static struct platform_device bfin_sport1_uart_device = { | |||
| 780 | #endif | 861 | #endif |
| 781 | 862 | ||
| 782 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 863 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
| 783 | #define PATA_INT 55 | 864 | #define PATA_INT IRQ_PF5 |
| 784 | 865 | ||
| 785 | static struct pata_platform_info bfin_pata_platform_data = { | 866 | static struct pata_platform_info bfin_pata_platform_data = { |
| 786 | .ioport_shift = 1, | 867 | .ioport_shift = 1, |
| @@ -922,6 +1003,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
| 922 | 1003 | ||
| 923 | &bfin_gpios_device, | 1004 | &bfin_gpios_device, |
| 924 | 1005 | ||
| 1006 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) | ||
| 1007 | &bfin_async_nand_device, | ||
| 1008 | #endif | ||
| 1009 | |||
| 925 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 1010 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
| 926 | &stamp_flash_device, | 1011 | &stamp_flash_device, |
| 927 | #endif | 1012 | #endif |
| @@ -936,6 +1021,7 @@ static int __init stamp_init(void) | |||
| 936 | ARRAY_SIZE(bfin_i2c_board_info)); | 1021 | ARRAY_SIZE(bfin_i2c_board_info)); |
| 937 | #endif | 1022 | #endif |
| 938 | 1023 | ||
| 1024 | bfin_plat_nand_init(); | ||
| 939 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 1025 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
| 940 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 1026 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
| 941 | 1027 | ||
diff --git a/arch/blackfin/mach-bf537/head.S b/arch/blackfin/mach-bf537/head.S index 48cd58a410a0..6b019eaee0b6 100644 --- a/arch/blackfin/mach-bf537/head.S +++ b/arch/blackfin/mach-bf537/head.S | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
| 33 | #include <asm/trace.h> | 33 | #include <asm/trace.h> |
| 34 | 34 | ||
| 35 | #if CONFIG_BFIN_KERNEL_CLOCK | 35 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 36 | #include <asm/mach-common/clocks.h> | 36 | #include <asm/mach-common/clocks.h> |
| 37 | #include <asm/mach/mem_init.h> | 37 | #include <asm/mach/mem_init.h> |
| 38 | #endif | 38 | #endif |
| @@ -217,7 +217,7 @@ ENTRY(__start) | |||
| 217 | 217 | ||
| 218 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | 218 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ |
| 219 | call _bf53x_relocate_l1_mem; | 219 | call _bf53x_relocate_l1_mem; |
| 220 | #if CONFIG_BFIN_KERNEL_CLOCK | 220 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 221 | call _start_dma_code; | 221 | call _start_dma_code; |
| 222 | #endif | 222 | #endif |
| 223 | 223 | ||
| @@ -350,7 +350,7 @@ ENDPROC(_real_start) | |||
| 350 | __FINIT | 350 | __FINIT |
| 351 | 351 | ||
| 352 | .section .l1.text | 352 | .section .l1.text |
| 353 | #if CONFIG_BFIN_KERNEL_CLOCK | 353 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 354 | ENTRY(_start_dma_code) | 354 | ENTRY(_start_dma_code) |
| 355 | 355 | ||
| 356 | /* Enable PHY CLK buffer output */ | 356 | /* Enable PHY CLK buffer output */ |
| @@ -430,12 +430,6 @@ ENTRY(_start_dma_code) | |||
| 430 | w[p0] = r0.l; | 430 | w[p0] = r0.l; |
| 431 | ssync; | 431 | ssync; |
| 432 | 432 | ||
| 433 | p0.l = LO(EBIU_SDBCTL); | ||
| 434 | p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */ | ||
| 435 | r0 = mem_SDBCTL; | ||
| 436 | w[p0] = r0.l; | ||
| 437 | ssync; | ||
| 438 | |||
| 439 | P2.H = hi(EBIU_SDGCTL); | 433 | P2.H = hi(EBIU_SDGCTL); |
| 440 | P2.L = lo(EBIU_SDGCTL); | 434 | P2.L = lo(EBIU_SDGCTL); |
| 441 | R0 = [P2]; | 435 | R0 = [P2]; |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index af7c211a580e..166fa2201ee7 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
| @@ -61,6 +61,49 @@ const char bfin_board_name[] = "ADSP-BF548-EZKIT"; | |||
| 61 | * Driver needs to know address, irq and flag pin. | 61 | * Driver needs to know address, irq and flag pin. |
| 62 | */ | 62 | */ |
| 63 | 63 | ||
| 64 | #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) | ||
| 65 | static struct resource bfin_isp1761_resources[] = { | ||
| 66 | [0] = { | ||
| 67 | .name = "isp1761-regs", | ||
| 68 | .start = 0x2C0C0000, | ||
| 69 | .end = 0x2C0C0000 + 0xfffff, | ||
| 70 | .flags = IORESOURCE_MEM, | ||
| 71 | }, | ||
| 72 | [1] = { | ||
| 73 | .start = IRQ_PG7, | ||
| 74 | .end = IRQ_PG7, | ||
| 75 | .flags = IORESOURCE_IRQ, | ||
| 76 | }, | ||
| 77 | }; | ||
| 78 | |||
| 79 | static struct platform_device bfin_isp1761_device = { | ||
| 80 | .name = "isp1761", | ||
| 81 | .id = 0, | ||
| 82 | .num_resources = ARRAY_SIZE(bfin_isp1761_resources), | ||
| 83 | .resource = bfin_isp1761_resources, | ||
| 84 | }; | ||
| 85 | |||
| 86 | static struct platform_device *bfin_isp1761_devices[] = { | ||
| 87 | &bfin_isp1761_device, | ||
| 88 | }; | ||
| 89 | |||
| 90 | int __init bfin_isp1761_init(void) | ||
| 91 | { | ||
| 92 | unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices); | ||
| 93 | |||
| 94 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
| 95 | set_irq_type(bfin_isp1761_resources[1].start, IRQF_TRIGGER_FALLING); | ||
| 96 | |||
| 97 | return platform_add_devices(bfin_isp1761_devices, num_devices); | ||
| 98 | } | ||
| 99 | |||
| 100 | void __exit bfin_isp1761_exit(void) | ||
| 101 | { | ||
| 102 | platform_device_unregister(&bfin_isp1761_device); | ||
| 103 | } | ||
| 104 | arch_initcall(bfin_isp1761_init); | ||
| 105 | #endif | ||
| 106 | |||
| 64 | #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) | 107 | #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) |
| 65 | 108 | ||
| 66 | #include <asm/mach/bf54x-lq043.h> | 109 | #include <asm/mach/bf54x-lq043.h> |
| @@ -177,6 +220,7 @@ static struct resource bfin_uart_resources[] = { | |||
| 177 | { | 220 | { |
| 178 | .start = 0xFFC03100, | 221 | .start = 0xFFC03100, |
| 179 | .end = 0xFFC031FF, | 222 | .end = 0xFFC031FF, |
| 223 | .flags = IORESOURCE_MEM, | ||
| 180 | }, | 224 | }, |
| 181 | #endif | 225 | #endif |
| 182 | }; | 226 | }; |
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S index f7191141a3ce..06b9178cfcfe 100644 --- a/arch/blackfin/mach-bf548/head.S +++ b/arch/blackfin/mach-bf548/head.S | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
| 32 | #include <asm/blackfin.h> | 32 | #include <asm/blackfin.h> |
| 33 | #include <asm/trace.h> | 33 | #include <asm/trace.h> |
| 34 | #if CONFIG_BFIN_KERNEL_CLOCK | 34 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 35 | #include <asm/mach-common/clocks.h> | 35 | #include <asm/mach-common/clocks.h> |
| 36 | #include <asm/mach/mem_init.h> | 36 | #include <asm/mach/mem_init.h> |
| 37 | #endif | 37 | #endif |
| @@ -130,7 +130,7 @@ ENTRY(__start) | |||
| 130 | 130 | ||
| 131 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | 131 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ |
| 132 | call _bf53x_relocate_l1_mem; | 132 | call _bf53x_relocate_l1_mem; |
| 133 | #if CONFIG_BFIN_KERNEL_CLOCK | 133 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 134 | call _start_dma_code; | 134 | call _start_dma_code; |
| 135 | #endif | 135 | #endif |
| 136 | /* Code for initializing Async memory banks */ | 136 | /* Code for initializing Async memory banks */ |
| @@ -288,7 +288,7 @@ ENDPROC(_real_start) | |||
| 288 | __FINIT | 288 | __FINIT |
| 289 | 289 | ||
| 290 | .section .l1.text | 290 | .section .l1.text |
| 291 | #if CONFIG_BFIN_KERNEL_CLOCK | 291 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
| 292 | ENTRY(_start_dma_code) | 292 | ENTRY(_start_dma_code) |
| 293 | 293 | ||
| 294 | /* Enable PHY CLK buffer output */ | 294 | /* Enable PHY CLK buffer output */ |
diff --git a/arch/blackfin/mach-bf561/head.S b/arch/blackfin/mach-bf561/head.S index 5b8bd40851dd..cf1a2dff01e7 100644 --- a/arch/blackfin/mach-bf561/head.S +++ b/arch/blackfin/mach-bf561/head.S | |||
| @@ -377,12 +377,6 @@ ENTRY(_start_dma_code) | |||
| 377 | w[p0] = r0.l; | 377 | w[p0] = r0.l; |
| 378 | ssync; | 378 | ssync; |
| 379 | 379 | ||
| 380 | p0.l = LO(EBIU_SDBCTL); | ||
| 381 | p0.h = HI(EBIU_SDBCTL); /* SDRAM Memory Bank Control Register */ | ||
| 382 | r0 = mem_SDBCTL; | ||
| 383 | w[p0] = r0.l; | ||
| 384 | ssync; | ||
| 385 | |||
| 386 | P2.H = hi(EBIU_SDGCTL); | 380 | P2.H = hi(EBIU_SDGCTL); |
| 387 | P2.L = lo(EBIU_SDGCTL); | 381 | P2.L = lo(EBIU_SDGCTL); |
| 388 | R0 = [P2]; | 382 | R0 = [P2]; |
diff --git a/arch/blackfin/mach-common/arch_checks.c b/arch/blackfin/mach-common/arch_checks.c index caaab49e9cfa..f9160d83b91f 100644 --- a/arch/blackfin/mach-common/arch_checks.c +++ b/arch/blackfin/mach-common/arch_checks.c | |||
| @@ -53,9 +53,3 @@ | |||
| 53 | # endif | 53 | # endif |
| 54 | 54 | ||
| 55 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ | 55 | #endif /* CONFIG_BFIN_KERNEL_CLOCK */ |
| 56 | |||
| 57 | #ifdef CONFIG_MEM_SIZE | ||
| 58 | #if (CONFIG_MEM_SIZE % 4) | ||
| 59 | #error "SDRAM mem size must be multible of 4MB" | ||
| 60 | #endif | ||
| 61 | #endif | ||
diff --git a/arch/blackfin/mach-common/dpmc_modes.S b/arch/blackfin/mach-common/dpmc_modes.S index b7981d31c392..5e3f1d8a4fb8 100644 --- a/arch/blackfin/mach-common/dpmc_modes.S +++ b/arch/blackfin/mach-common/dpmc_modes.S | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
| 8 | #include <asm/blackfin.h> | 8 | #include <asm/blackfin.h> |
| 9 | #include <asm/mach/irq.h> | 9 | #include <asm/mach/irq.h> |
| 10 | 10 | #include <asm/dpmc.h> | |
| 11 | 11 | ||
| 12 | .section .l1.text | 12 | .section .l1.text |
| 13 | 13 | ||
| @@ -51,31 +51,32 @@ ENTRY(_sleep_mode) | |||
| 51 | RETS = [SP++]; | 51 | RETS = [SP++]; |
| 52 | ( R7:0, P5:0 ) = [SP++]; | 52 | ( R7:0, P5:0 ) = [SP++]; |
| 53 | RTS; | 53 | RTS; |
| 54 | ENDPROC(_sleep_mode) | ||
| 54 | 55 | ||
| 55 | ENTRY(_hibernate_mode) | 56 | ENTRY(_hibernate_mode) |
| 56 | [--SP] = ( R7:0, P5:0 ); | 57 | [--SP] = ( R7:0, P5:0 ); |
| 57 | [--SP] = RETS; | 58 | [--SP] = RETS; |
| 58 | 59 | ||
| 60 | R3 = R0; | ||
| 61 | R0 = IWR_DISABLE_ALL; | ||
| 62 | R1 = IWR_DISABLE_ALL; | ||
| 63 | R2 = IWR_DISABLE_ALL; | ||
| 59 | call _set_sic_iwr; | 64 | call _set_sic_iwr; |
| 65 | call _set_dram_srfs; | ||
| 66 | SSYNC; | ||
| 60 | 67 | ||
| 61 | R0 = 0xFFFF (Z); | 68 | R0 = 0xFFFF (Z); |
| 62 | call _set_rtc_istat; | 69 | call _set_rtc_istat; |
| 63 | 70 | ||
| 64 | P0.H = hi(VR_CTL); | 71 | P0.H = hi(VR_CTL); |
| 65 | P0.L = lo(VR_CTL); | 72 | P0.L = lo(VR_CTL); |
| 66 | R1 = W[P0](z); | ||
| 67 | BITSET (R1, 8); | ||
| 68 | BITCLR (R1, 0); | ||
| 69 | BITCLR (R1, 1); | ||
| 70 | W[P0] = R1.L; | ||
| 71 | SSYNC; | ||
| 72 | 73 | ||
| 74 | W[P0] = R3.L; | ||
| 73 | CLI R2; | 75 | CLI R2; |
| 74 | IDLE; | 76 | IDLE; |
| 75 | 77 | .Lforever: | |
| 76 | /* Actually, adding anything may not be necessary...SDRAM contents | 78 | jump .Lforever; |
| 77 | * are lost | 79 | ENDPROC(_hibernate_mode) |
| 78 | */ | ||
| 79 | 80 | ||
| 80 | ENTRY(_deep_sleep) | 81 | ENTRY(_deep_sleep) |
| 81 | [--SP] = ( R7:0, P5:0 ); | 82 | [--SP] = ( R7:0, P5:0 ); |
| @@ -131,6 +132,7 @@ ENTRY(_deep_sleep) | |||
| 131 | RETS = [SP++]; | 132 | RETS = [SP++]; |
| 132 | ( R7:0, P5:0 ) = [SP++]; | 133 | ( R7:0, P5:0 ) = [SP++]; |
| 133 | RTS; | 134 | RTS; |
| 135 | ENDPROC(_deep_sleep) | ||
| 134 | 136 | ||
| 135 | ENTRY(_sleep_deeper) | 137 | ENTRY(_sleep_deeper) |
| 136 | [--SP] = ( R7:0, P5:0 ); | 138 | [--SP] = ( R7:0, P5:0 ); |
| @@ -232,53 +234,73 @@ ENTRY(_sleep_deeper) | |||
| 232 | RETS = [SP++]; | 234 | RETS = [SP++]; |
| 233 | ( R7:0, P5:0 ) = [SP++]; | 235 | ( R7:0, P5:0 ) = [SP++]; |
| 234 | RTS; | 236 | RTS; |
| 237 | ENDPROC(_sleep_deeper) | ||
| 235 | 238 | ||
| 236 | ENTRY(_set_dram_srfs) | 239 | ENTRY(_set_dram_srfs) |
| 237 | /* set the dram to self refresh mode */ | 240 | /* set the dram to self refresh mode */ |
| 238 | #if defined(CONFIG_BF54x) | 241 | SSYNC; |
| 242 | #if defined(EBIU_RSTCTL) /* DDR */ | ||
| 239 | P0.H = hi(EBIU_RSTCTL); | 243 | P0.H = hi(EBIU_RSTCTL); |
| 240 | P0.L = lo(EBIU_RSTCTL); | 244 | P0.L = lo(EBIU_RSTCTL); |
| 241 | R2 = [P0]; | 245 | R2 = [P0]; |
| 242 | R3.H = hi(SRREQ); | 246 | BITSET(R2, 3); /* SRREQ enter self-refresh mode */ |
| 243 | R3.L = lo(SRREQ); | 247 | [P0] = R2; |
| 244 | #else | 248 | SSYNC; |
| 245 | P0.H = hi(EBIU_SDGCTL); | 249 | 1: |
| 250 | R2 = [P0]; | ||
| 251 | CC = BITTST(R2, 4); | ||
| 252 | if !CC JUMP 1b; | ||
| 253 | #else /* SDRAM */ | ||
| 246 | P0.L = lo(EBIU_SDGCTL); | 254 | P0.L = lo(EBIU_SDGCTL); |
| 255 | P0.H = hi(EBIU_SDGCTL); | ||
| 247 | R2 = [P0]; | 256 | R2 = [P0]; |
| 248 | R3.H = hi(SRFS); | 257 | BITSET(R2, 24); /* SRFS enter self-refresh mode */ |
| 249 | R3.L = lo(SRFS); | ||
| 250 | #endif | ||
| 251 | R2 = R2|R3; | ||
| 252 | [P0] = R2; | 258 | [P0] = R2; |
| 253 | ssync; | 259 | SSYNC; |
| 254 | #if defined(CONFIG_BF54x) | 260 | |
| 255 | .LSRR_MODE: | 261 | P0.L = lo(EBIU_SDSTAT); |
| 262 | P0.H = hi(EBIU_SDSTAT); | ||
| 263 | 1: | ||
| 264 | R2 = w[P0]; | ||
| 265 | SSYNC; | ||
| 266 | cc = BITTST(R2, 1); /* SDSRA poll self-refresh status */ | ||
| 267 | if !cc jump 1b; | ||
| 268 | |||
| 269 | P0.L = lo(EBIU_SDGCTL); | ||
| 270 | P0.H = hi(EBIU_SDGCTL); | ||
| 256 | R2 = [P0]; | 271 | R2 = [P0]; |
| 257 | CC = BITTST(R2, 4); | 272 | BITCLR(R2, 0); /* SCTLE disable CLKOUT */ |
| 258 | if !CC JUMP .LSRR_MODE; | 273 | [P0] = R2; |
| 259 | #endif | 274 | #endif |
| 260 | RTS; | 275 | RTS; |
| 276 | ENDPROC(_set_dram_srfs) | ||
| 261 | 277 | ||
| 262 | ENTRY(_unset_dram_srfs) | 278 | ENTRY(_unset_dram_srfs) |
| 263 | /* set the dram out of self refresh mode */ | 279 | /* set the dram out of self refresh mode */ |
| 264 | #if defined(CONFIG_BF54x) | 280 | #if defined(EBIU_RSTCTL) /* DDR */ |
| 265 | P0.H = hi(EBIU_RSTCTL); | 281 | P0.H = hi(EBIU_RSTCTL); |
| 266 | P0.L = lo(EBIU_RSTCTL); | 282 | P0.L = lo(EBIU_RSTCTL); |
| 267 | R2 = [P0]; | 283 | R2 = [P0]; |
| 268 | R3.H = hi(SRREQ); | 284 | BITCLR(R2, 3); /* clear SRREQ bit */ |
| 269 | R3.L = lo(SRREQ); | 285 | [P0] = R2; |
| 270 | #else | 286 | #elif defined(EBIU_SDGCTL) /* SDRAM */ |
| 287 | |||
| 288 | P0.L = lo(EBIU_SDGCTL); /* release CLKOUT from self-refresh */ | ||
| 289 | P0.H = hi(EBIU_SDGCTL); | ||
| 290 | R2 = [P0]; | ||
| 291 | BITSET(R2, 0); /* SCTLE enable CLKOUT */ | ||
| 292 | [P0] = R2 | ||
| 293 | SSYNC; | ||
| 294 | |||
| 295 | P0.L = lo(EBIU_SDGCTL); /* release SDRAM from self-refresh */ | ||
| 271 | P0.H = hi(EBIU_SDGCTL); | 296 | P0.H = hi(EBIU_SDGCTL); |
| 272 | P0.L = lo(EBIU_SDGCTL); | ||
| 273 | R2 = [P0]; | 297 | R2 = [P0]; |
| 274 | R3.H = hi(SRFS); | 298 | BITCLR(R2, 24); /* clear SRFS bit */ |
| 275 | R3.L = lo(SRFS); | 299 | [P0] = R2 |
| 276 | #endif | 300 | #endif |
| 277 | R3 = ~R3; | 301 | SSYNC; |
| 278 | R2 = R2&R3; | ||
| 279 | [P0] = R2; | ||
| 280 | ssync; | ||
| 281 | RTS; | 302 | RTS; |
| 303 | ENDPROC(_unset_dram_srfs) | ||
| 282 | 304 | ||
| 283 | ENTRY(_set_sic_iwr) | 305 | ENTRY(_set_sic_iwr) |
| 284 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | 306 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) |
| @@ -300,6 +322,7 @@ ENTRY(_set_sic_iwr) | |||
| 300 | 322 | ||
| 301 | SSYNC; | 323 | SSYNC; |
| 302 | RTS; | 324 | RTS; |
| 325 | ENDPROC(_set_sic_iwr) | ||
| 303 | 326 | ||
| 304 | ENTRY(_set_rtc_istat) | 327 | ENTRY(_set_rtc_istat) |
| 305 | #ifndef CONFIG_BF561 | 328 | #ifndef CONFIG_BF561 |
| @@ -307,8 +330,14 @@ ENTRY(_set_rtc_istat) | |||
| 307 | P0.L = lo(RTC_ISTAT); | 330 | P0.L = lo(RTC_ISTAT); |
| 308 | w[P0] = R0.L; | 331 | w[P0] = R0.L; |
| 309 | SSYNC; | 332 | SSYNC; |
| 333 | #elif (ANOMALY_05000371) | ||
| 334 | nop; | ||
| 335 | nop; | ||
| 336 | nop; | ||
| 337 | nop; | ||
| 310 | #endif | 338 | #endif |
| 311 | RTS; | 339 | RTS; |
| 340 | ENDPROC(_set_rtc_istat) | ||
| 312 | 341 | ||
| 313 | ENTRY(_test_pll_locked) | 342 | ENTRY(_test_pll_locked) |
| 314 | P0.H = hi(PLL_STAT); | 343 | P0.H = hi(PLL_STAT); |
| @@ -318,3 +347,509 @@ ENTRY(_test_pll_locked) | |||
| 318 | CC = BITTST(R0,5); | 347 | CC = BITTST(R0,5); |
| 319 | IF !CC JUMP 1b; | 348 | IF !CC JUMP 1b; |
| 320 | RTS; | 349 | RTS; |
| 350 | ENDPROC(_test_pll_locked) | ||
| 351 | |||
| 352 | .section .text | ||
| 353 | |||
| 354 | ENTRY(_do_hibernate) | ||
| 355 | [--SP] = ( R7:0, P5:0 ); | ||
| 356 | [--SP] = RETS; | ||
| 357 | /* Save System MMRs */ | ||
| 358 | R2 = R0; | ||
| 359 | P0.H = hi(PLL_CTL); | ||
| 360 | P0.L = lo(PLL_CTL); | ||
| 361 | |||
| 362 | #ifdef SIC_IMASK0 | ||
| 363 | PM_SYS_PUSH(SIC_IMASK0) | ||
| 364 | #endif | ||
| 365 | #ifdef SIC_IMASK1 | ||
| 366 | PM_SYS_PUSH(SIC_IMASK1) | ||
| 367 | #endif | ||
| 368 | #ifdef SIC_IMASK2 | ||
| 369 | PM_SYS_PUSH(SIC_IMASK2) | ||
| 370 | #endif | ||
| 371 | #ifdef SIC_IMASK | ||
| 372 | PM_SYS_PUSH(SIC_IMASK) | ||
| 373 | #endif | ||
| 374 | #ifdef SICA_IMASK0 | ||
| 375 | PM_SYS_PUSH(SICA_IMASK0) | ||
| 376 | #endif | ||
| 377 | #ifdef SICA_IMASK1 | ||
| 378 | PM_SYS_PUSH(SICA_IMASK1) | ||
| 379 | #endif | ||
| 380 | #ifdef SIC_IAR2 | ||
| 381 | PM_SYS_PUSH(SIC_IAR0) | ||
| 382 | PM_SYS_PUSH(SIC_IAR1) | ||
| 383 | PM_SYS_PUSH(SIC_IAR2) | ||
| 384 | #endif | ||
| 385 | #ifdef SIC_IAR3 | ||
| 386 | PM_SYS_PUSH(SIC_IAR3) | ||
| 387 | #endif | ||
| 388 | #ifdef SIC_IAR4 | ||
| 389 | PM_SYS_PUSH(SIC_IAR4) | ||
| 390 | PM_SYS_PUSH(SIC_IAR5) | ||
| 391 | PM_SYS_PUSH(SIC_IAR6) | ||
| 392 | #endif | ||
| 393 | #ifdef SIC_IAR7 | ||
| 394 | PM_SYS_PUSH(SIC_IAR7) | ||
| 395 | #endif | ||
| 396 | #ifdef SIC_IAR8 | ||
| 397 | PM_SYS_PUSH(SIC_IAR8) | ||
| 398 | PM_SYS_PUSH(SIC_IAR9) | ||
| 399 | PM_SYS_PUSH(SIC_IAR10) | ||
| 400 | PM_SYS_PUSH(SIC_IAR11) | ||
| 401 | #endif | ||
| 402 | |||
| 403 | #ifdef SICA_IAR0 | ||
| 404 | PM_SYS_PUSH(SICA_IAR0) | ||
| 405 | PM_SYS_PUSH(SICA_IAR1) | ||
| 406 | PM_SYS_PUSH(SICA_IAR2) | ||
| 407 | PM_SYS_PUSH(SICA_IAR3) | ||
| 408 | PM_SYS_PUSH(SICA_IAR4) | ||
| 409 | PM_SYS_PUSH(SICA_IAR5) | ||
| 410 | PM_SYS_PUSH(SICA_IAR6) | ||
| 411 | PM_SYS_PUSH(SICA_IAR7) | ||
| 412 | #endif | ||
| 413 | |||
| 414 | #ifdef SIC_IWR | ||
| 415 | PM_SYS_PUSH(SIC_IWR) | ||
| 416 | #endif | ||
| 417 | #ifdef SIC_IWR0 | ||
| 418 | PM_SYS_PUSH(SIC_IWR0) | ||
| 419 | #endif | ||
| 420 | #ifdef SIC_IWR1 | ||
| 421 | PM_SYS_PUSH(SIC_IWR1) | ||
| 422 | #endif | ||
| 423 | #ifdef SIC_IWR2 | ||
| 424 | PM_SYS_PUSH(SIC_IWR2) | ||
| 425 | #endif | ||
| 426 | #ifdef SICA_IWR0 | ||
| 427 | PM_SYS_PUSH(SICA_IWR0) | ||
| 428 | #endif | ||
| 429 | #ifdef SICA_IWR1 | ||
| 430 | PM_SYS_PUSH(SICA_IWR1) | ||
| 431 | #endif | ||
| 432 | |||
| 433 | #ifdef PINT0_ASSIGN | ||
| 434 | PM_SYS_PUSH(PINT0_ASSIGN) | ||
| 435 | PM_SYS_PUSH(PINT1_ASSIGN) | ||
| 436 | PM_SYS_PUSH(PINT2_ASSIGN) | ||
| 437 | PM_SYS_PUSH(PINT3_ASSIGN) | ||
| 438 | #endif | ||
| 439 | |||
| 440 | PM_SYS_PUSH(EBIU_AMBCTL0) | ||
| 441 | PM_SYS_PUSH(EBIU_AMBCTL1) | ||
| 442 | PM_SYS_PUSH16(EBIU_AMGCTL) | ||
| 443 | |||
| 444 | #ifdef EBIU_FCTL | ||
| 445 | PM_SYS_PUSH(EBIU_MBSCTL) | ||
| 446 | PM_SYS_PUSH(EBIU_MODE) | ||
| 447 | PM_SYS_PUSH(EBIU_FCTL) | ||
| 448 | #endif | ||
| 449 | |||
| 450 | PM_SYS_PUSH16(SYSCR) | ||
| 451 | |||
| 452 | /* Save Core MMRs */ | ||
| 453 | P0.H = hi(SRAM_BASE_ADDRESS); | ||
| 454 | P0.L = lo(SRAM_BASE_ADDRESS); | ||
| 455 | |||
| 456 | PM_PUSH(DMEM_CONTROL) | ||
| 457 | PM_PUSH(DCPLB_ADDR0) | ||
| 458 | PM_PUSH(DCPLB_ADDR1) | ||
| 459 | PM_PUSH(DCPLB_ADDR2) | ||
| 460 | PM_PUSH(DCPLB_ADDR3) | ||
| 461 | PM_PUSH(DCPLB_ADDR4) | ||
| 462 | PM_PUSH(DCPLB_ADDR5) | ||
| 463 | PM_PUSH(DCPLB_ADDR6) | ||
| 464 | PM_PUSH(DCPLB_ADDR7) | ||
| 465 | PM_PUSH(DCPLB_ADDR8) | ||
| 466 | PM_PUSH(DCPLB_ADDR9) | ||
| 467 | PM_PUSH(DCPLB_ADDR10) | ||
| 468 | PM_PUSH(DCPLB_ADDR11) | ||
| 469 | PM_PUSH(DCPLB_ADDR12) | ||
| 470 | PM_PUSH(DCPLB_ADDR13) | ||
| 471 | PM_PUSH(DCPLB_ADDR14) | ||
| 472 | PM_PUSH(DCPLB_ADDR15) | ||
| 473 | PM_PUSH(DCPLB_DATA0) | ||
| 474 | PM_PUSH(DCPLB_DATA1) | ||
| 475 | PM_PUSH(DCPLB_DATA2) | ||
| 476 | PM_PUSH(DCPLB_DATA3) | ||
| 477 | PM_PUSH(DCPLB_DATA4) | ||
| 478 | PM_PUSH(DCPLB_DATA5) | ||
| 479 | PM_PUSH(DCPLB_DATA6) | ||
| 480 | PM_PUSH(DCPLB_DATA7) | ||
| 481 | PM_PUSH(DCPLB_DATA8) | ||
| 482 | PM_PUSH(DCPLB_DATA9) | ||
| 483 | PM_PUSH(DCPLB_DATA10) | ||
| 484 | PM_PUSH(DCPLB_DATA11) | ||
| 485 | PM_PUSH(DCPLB_DATA12) | ||
| 486 | PM_PUSH(DCPLB_DATA13) | ||
| 487 | PM_PUSH(DCPLB_DATA14) | ||
| 488 | PM_PUSH(DCPLB_DATA15) | ||
| 489 | PM_PUSH(IMEM_CONTROL) | ||
| 490 | PM_PUSH(ICPLB_ADDR0) | ||
| 491 | PM_PUSH(ICPLB_ADDR1) | ||
| 492 | PM_PUSH(ICPLB_ADDR2) | ||
| 493 | PM_PUSH(ICPLB_ADDR3) | ||
| 494 | PM_PUSH(ICPLB_ADDR4) | ||
| 495 | PM_PUSH(ICPLB_ADDR5) | ||
| 496 | PM_PUSH(ICPLB_ADDR6) | ||
| 497 | PM_PUSH(ICPLB_ADDR7) | ||
| 498 | PM_PUSH(ICPLB_ADDR8) | ||
| 499 | PM_PUSH(ICPLB_ADDR9) | ||
| 500 | PM_PUSH(ICPLB_ADDR10) | ||
| 501 | PM_PUSH(ICPLB_ADDR11) | ||
| 502 | PM_PUSH(ICPLB_ADDR12) | ||
| 503 | PM_PUSH(ICPLB_ADDR13) | ||
| 504 | PM_PUSH(ICPLB_ADDR14) | ||
| 505 | PM_PUSH(ICPLB_ADDR15) | ||
| 506 | PM_PUSH(ICPLB_DATA0) | ||
| 507 | PM_PUSH(ICPLB_DATA1) | ||
| 508 | PM_PUSH(ICPLB_DATA2) | ||
| 509 | PM_PUSH(ICPLB_DATA3) | ||
| 510 | PM_PUSH(ICPLB_DATA4) | ||
| 511 | PM_PUSH(ICPLB_DATA5) | ||
| 512 | PM_PUSH(ICPLB_DATA6) | ||
| 513 | PM_PUSH(ICPLB_DATA7) | ||
| 514 | PM_PUSH(ICPLB_DATA8) | ||
| 515 | PM_PUSH(ICPLB_DATA9) | ||
| 516 | PM_PUSH(ICPLB_DATA10) | ||
| 517 | PM_PUSH(ICPLB_DATA11) | ||
| 518 | PM_PUSH(ICPLB_DATA12) | ||
| 519 | PM_PUSH(ICPLB_DATA13) | ||
| 520 | PM_PUSH(ICPLB_DATA14) | ||
| 521 | PM_PUSH(ICPLB_DATA15) | ||
| 522 | PM_PUSH(EVT0) | ||
| 523 | PM_PUSH(EVT1) | ||
| 524 | PM_PUSH(EVT2) | ||
| 525 | PM_PUSH(EVT3) | ||
| 526 | PM_PUSH(EVT4) | ||
| 527 | PM_PUSH(EVT5) | ||
| 528 | PM_PUSH(EVT6) | ||
| 529 | PM_PUSH(EVT7) | ||
| 530 | PM_PUSH(EVT8) | ||
| 531 | PM_PUSH(EVT9) | ||
| 532 | PM_PUSH(EVT10) | ||
| 533 | PM_PUSH(EVT11) | ||
| 534 | PM_PUSH(EVT12) | ||
| 535 | PM_PUSH(EVT13) | ||
| 536 | PM_PUSH(EVT14) | ||
| 537 | PM_PUSH(EVT15) | ||
| 538 | PM_PUSH(IMASK) | ||
| 539 | PM_PUSH(ILAT) | ||
| 540 | PM_PUSH(IPRIO) | ||
| 541 | PM_PUSH(TCNTL) | ||
| 542 | PM_PUSH(TPERIOD) | ||
| 543 | PM_PUSH(TSCALE) | ||
| 544 | PM_PUSH(TCOUNT) | ||
| 545 | PM_PUSH(TBUFCTL) | ||
| 546 | |||
| 547 | /* Save Core Registers */ | ||
| 548 | [--sp] = SYSCFG; | ||
| 549 | [--sp] = ( R7:0, P5:0 ); | ||
| 550 | [--sp] = fp; | ||
| 551 | [--sp] = usp; | ||
| 552 | |||
| 553 | [--sp] = i0; | ||
| 554 | [--sp] = i1; | ||
| 555 | [--sp] = i2; | ||
| 556 | [--sp] = i3; | ||
| 557 | |||
| 558 | [--sp] = m0; | ||
| 559 | [--sp] = m1; | ||
| 560 | [--sp] = m2; | ||
| 561 | [--sp] = m3; | ||
| 562 | |||
| 563 | [--sp] = l0; | ||
| 564 | [--sp] = l1; | ||
| 565 | [--sp] = l2; | ||
| 566 | [--sp] = l3; | ||
| 567 | |||
| 568 | [--sp] = b0; | ||
| 569 | [--sp] = b1; | ||
| 570 | [--sp] = b2; | ||
| 571 | [--sp] = b3; | ||
| 572 | [--sp] = a0.x; | ||
| 573 | [--sp] = a0.w; | ||
| 574 | [--sp] = a1.x; | ||
| 575 | [--sp] = a1.w; | ||
| 576 | |||
| 577 | [--sp] = LC0; | ||
| 578 | [--sp] = LC1; | ||
| 579 | [--sp] = LT0; | ||
| 580 | [--sp] = LT1; | ||
| 581 | [--sp] = LB0; | ||
| 582 | [--sp] = LB1; | ||
| 583 | |||
| 584 | [--sp] = ASTAT; | ||
| 585 | [--sp] = CYCLES; | ||
| 586 | [--sp] = CYCLES2; | ||
| 587 | |||
| 588 | [--sp] = RETS; | ||
| 589 | r0 = RETI; | ||
| 590 | [--sp] = r0; | ||
| 591 | [--sp] = RETX; | ||
| 592 | [--sp] = RETN; | ||
| 593 | [--sp] = RETE; | ||
| 594 | [--sp] = SEQSTAT; | ||
| 595 | |||
| 596 | /* Save Magic, return address and Stack Pointer */ | ||
| 597 | P0.H = 0; | ||
| 598 | P0.L = 0; | ||
| 599 | R0.H = 0xDEAD; /* Hibernate Magic */ | ||
| 600 | R0.L = 0xBEEF; | ||
| 601 | [P0++] = R0; /* Store Hibernate Magic */ | ||
| 602 | R0.H = .Lpm_resume_here; | ||
| 603 | R0.L = .Lpm_resume_here; | ||
| 604 | [P0++] = R0; /* Save Return Address */ | ||
| 605 | [P0++] = SP; /* Save Stack Pointer */ | ||
| 606 | P0.H = _hibernate_mode; | ||
| 607 | P0.L = _hibernate_mode; | ||
| 608 | R0 = R2; | ||
| 609 | call (P0); /* Goodbye */ | ||
| 610 | |||
| 611 | .Lpm_resume_here: | ||
| 612 | |||
| 613 | /* Restore Core Registers */ | ||
| 614 | SEQSTAT = [sp++]; | ||
| 615 | RETE = [sp++]; | ||
| 616 | RETN = [sp++]; | ||
| 617 | RETX = [sp++]; | ||
| 618 | r0 = [sp++]; | ||
| 619 | RETI = r0; | ||
| 620 | RETS = [sp++]; | ||
| 621 | |||
| 622 | CYCLES2 = [sp++]; | ||
| 623 | CYCLES = [sp++]; | ||
| 624 | ASTAT = [sp++]; | ||
| 625 | |||
| 626 | LB1 = [sp++]; | ||
| 627 | LB0 = [sp++]; | ||
| 628 | LT1 = [sp++]; | ||
| 629 | LT0 = [sp++]; | ||
| 630 | LC1 = [sp++]; | ||
| 631 | LC0 = [sp++]; | ||
| 632 | |||
| 633 | a1.w = [sp++]; | ||
| 634 | a1.x = [sp++]; | ||
| 635 | a0.w = [sp++]; | ||
| 636 | a0.x = [sp++]; | ||
| 637 | b3 = [sp++]; | ||
| 638 | b2 = [sp++]; | ||
| 639 | b1 = [sp++]; | ||
| 640 | b0 = [sp++]; | ||
| 641 | |||
| 642 | l3 = [sp++]; | ||
| 643 | l2 = [sp++]; | ||
| 644 | l1 = [sp++]; | ||
| 645 | l0 = [sp++]; | ||
| 646 | |||
| 647 | m3 = [sp++]; | ||
| 648 | m2 = [sp++]; | ||
| 649 | m1 = [sp++]; | ||
| 650 | m0 = [sp++]; | ||
| 651 | |||
| 652 | i3 = [sp++]; | ||
| 653 | i2 = [sp++]; | ||
| 654 | i1 = [sp++]; | ||
| 655 | i0 = [sp++]; | ||
| 656 | |||
| 657 | usp = [sp++]; | ||
| 658 | fp = [sp++]; | ||
| 659 | |||
| 660 | ( R7 : 0, P5 : 0) = [ SP ++ ]; | ||
| 661 | SYSCFG = [sp++]; | ||
| 662 | |||
| 663 | /* Restore Core MMRs */ | ||
| 664 | |||
| 665 | PM_POP(TBUFCTL) | ||
| 666 | PM_POP(TCOUNT) | ||
| 667 | PM_POP(TSCALE) | ||
| 668 | PM_POP(TPERIOD) | ||
| 669 | PM_POP(TCNTL) | ||
| 670 | PM_POP(IPRIO) | ||
| 671 | PM_POP(ILAT) | ||
| 672 | PM_POP(IMASK) | ||
| 673 | PM_POP(EVT15) | ||
| 674 | PM_POP(EVT14) | ||
| 675 | PM_POP(EVT13) | ||
| 676 | PM_POP(EVT12) | ||
| 677 | PM_POP(EVT11) | ||
| 678 | PM_POP(EVT10) | ||
| 679 | PM_POP(EVT9) | ||
| 680 | PM_POP(EVT8) | ||
| 681 | PM_POP(EVT7) | ||
| 682 | PM_POP(EVT6) | ||
| 683 | PM_POP(EVT5) | ||
| 684 | PM_POP(EVT4) | ||
| 685 | PM_POP(EVT3) | ||
| 686 | PM_POP(EVT2) | ||
| 687 | PM_POP(EVT1) | ||
| 688 | PM_POP(EVT0) | ||
| 689 | PM_POP(ICPLB_DATA15) | ||
| 690 | PM_POP(ICPLB_DATA14) | ||
| 691 | PM_POP(ICPLB_DATA13) | ||
| 692 | PM_POP(ICPLB_DATA12) | ||
| 693 | PM_POP(ICPLB_DATA11) | ||
| 694 | PM_POP(ICPLB_DATA10) | ||
| 695 | PM_POP(ICPLB_DATA9) | ||
| 696 | PM_POP(ICPLB_DATA8) | ||
| 697 | PM_POP(ICPLB_DATA7) | ||
| 698 | PM_POP(ICPLB_DATA6) | ||
| 699 | PM_POP(ICPLB_DATA5) | ||
| 700 | PM_POP(ICPLB_DATA4) | ||
| 701 | PM_POP(ICPLB_DATA3) | ||
| 702 | PM_POP(ICPLB_DATA2) | ||
| 703 | PM_POP(ICPLB_DATA1) | ||
| 704 | PM_POP(ICPLB_DATA0) | ||
| 705 | PM_POP(ICPLB_ADDR15) | ||
| 706 | PM_POP(ICPLB_ADDR14) | ||
| 707 | PM_POP(ICPLB_ADDR13) | ||
| 708 | PM_POP(ICPLB_ADDR12) | ||
| 709 | PM_POP(ICPLB_ADDR11) | ||
| 710 | PM_POP(ICPLB_ADDR10) | ||
| 711 | PM_POP(ICPLB_ADDR9) | ||
| 712 | PM_POP(ICPLB_ADDR8) | ||
| 713 | PM_POP(ICPLB_ADDR7) | ||
| 714 | PM_POP(ICPLB_ADDR6) | ||
| 715 | PM_POP(ICPLB_ADDR5) | ||
| 716 | PM_POP(ICPLB_ADDR4) | ||
| 717 | PM_POP(ICPLB_ADDR3) | ||
| 718 | PM_POP(ICPLB_ADDR2) | ||
| 719 | PM_POP(ICPLB_ADDR1) | ||
| 720 | PM_POP(ICPLB_ADDR0) | ||
| 721 | PM_POP(IMEM_CONTROL) | ||
| 722 | PM_POP(DCPLB_DATA15) | ||
| 723 | PM_POP(DCPLB_DATA14) | ||
| 724 | PM_POP(DCPLB_DATA13) | ||
| 725 | PM_POP(DCPLB_DATA12) | ||
| 726 | PM_POP(DCPLB_DATA11) | ||
| 727 | PM_POP(DCPLB_DATA10) | ||
| 728 | PM_POP(DCPLB_DATA9) | ||
| 729 | PM_POP(DCPLB_DATA8) | ||
| 730 | PM_POP(DCPLB_DATA7) | ||
| 731 | PM_POP(DCPLB_DATA6) | ||
| 732 | PM_POP(DCPLB_DATA5) | ||
| 733 | PM_POP(DCPLB_DATA4) | ||
| 734 | PM_POP(DCPLB_DATA3) | ||
| 735 | PM_POP(DCPLB_DATA2) | ||
| 736 | PM_POP(DCPLB_DATA1) | ||
| 737 | PM_POP(DCPLB_DATA0) | ||
| 738 | PM_POP(DCPLB_ADDR15) | ||
| 739 | PM_POP(DCPLB_ADDR14) | ||
| 740 | PM_POP(DCPLB_ADDR13) | ||
| 741 | PM_POP(DCPLB_ADDR12) | ||
| 742 | PM_POP(DCPLB_ADDR11) | ||
| 743 | PM_POP(DCPLB_ADDR10) | ||
| 744 | PM_POP(DCPLB_ADDR9) | ||
| 745 | PM_POP(DCPLB_ADDR8) | ||
| 746 | PM_POP(DCPLB_ADDR7) | ||
| 747 | PM_POP(DCPLB_ADDR6) | ||
| 748 | PM_POP(DCPLB_ADDR5) | ||
| 749 | PM_POP(DCPLB_ADDR4) | ||
| 750 | PM_POP(DCPLB_ADDR3) | ||
| 751 | PM_POP(DCPLB_ADDR2) | ||
| 752 | PM_POP(DCPLB_ADDR1) | ||
| 753 | PM_POP(DCPLB_ADDR0) | ||
| 754 | PM_POP(DMEM_CONTROL) | ||
| 755 | |||
| 756 | /* Restore System MMRs */ | ||
| 757 | |||
| 758 | P0.H = hi(PLL_CTL); | ||
| 759 | P0.L = lo(PLL_CTL); | ||
| 760 | PM_SYS_POP16(SYSCR) | ||
| 761 | |||
| 762 | #ifdef EBIU_FCTL | ||
| 763 | PM_SYS_POP(EBIU_FCTL) | ||
| 764 | PM_SYS_POP(EBIU_MODE) | ||
| 765 | PM_SYS_POP(EBIU_MBSCTL) | ||
| 766 | #endif | ||
| 767 | PM_SYS_POP16(EBIU_AMGCTL) | ||
| 768 | PM_SYS_POP(EBIU_AMBCTL1) | ||
| 769 | PM_SYS_POP(EBIU_AMBCTL0) | ||
| 770 | |||
| 771 | #ifdef PINT0_ASSIGN | ||
| 772 | PM_SYS_POP(PINT3_ASSIGN) | ||
| 773 | PM_SYS_POP(PINT2_ASSIGN) | ||
| 774 | PM_SYS_POP(PINT1_ASSIGN) | ||
| 775 | PM_SYS_POP(PINT0_ASSIGN) | ||
| 776 | #endif | ||
| 777 | |||
| 778 | #ifdef SICA_IWR1 | ||
| 779 | PM_SYS_POP(SICA_IWR1) | ||
| 780 | #endif | ||
| 781 | #ifdef SICA_IWR0 | ||
| 782 | PM_SYS_POP(SICA_IWR0) | ||
| 783 | #endif | ||
| 784 | #ifdef SIC_IWR2 | ||
| 785 | PM_SYS_POP(SIC_IWR2) | ||
| 786 | #endif | ||
| 787 | #ifdef SIC_IWR1 | ||
| 788 | PM_SYS_POP(SIC_IWR1) | ||
| 789 | #endif | ||
| 790 | #ifdef SIC_IWR0 | ||
| 791 | PM_SYS_POP(SIC_IWR0) | ||
| 792 | #endif | ||
| 793 | #ifdef SIC_IWR | ||
| 794 | PM_SYS_POP(SIC_IWR) | ||
| 795 | #endif | ||
| 796 | |||
| 797 | #ifdef SICA_IAR0 | ||
| 798 | PM_SYS_POP(SICA_IAR7) | ||
| 799 | PM_SYS_POP(SICA_IAR6) | ||
| 800 | PM_SYS_POP(SICA_IAR5) | ||
| 801 | PM_SYS_POP(SICA_IAR4) | ||
| 802 | PM_SYS_POP(SICA_IAR3) | ||
| 803 | PM_SYS_POP(SICA_IAR2) | ||
| 804 | PM_SYS_POP(SICA_IAR1) | ||
| 805 | PM_SYS_POP(SICA_IAR0) | ||
| 806 | #endif | ||
| 807 | |||
| 808 | #ifdef SIC_IAR8 | ||
| 809 | PM_SYS_POP(SIC_IAR11) | ||
| 810 | PM_SYS_POP(SIC_IAR10) | ||
| 811 | PM_SYS_POP(SIC_IAR9) | ||
| 812 | PM_SYS_POP(SIC_IAR8) | ||
| 813 | #endif | ||
| 814 | #ifdef SIC_IAR7 | ||
| 815 | PM_SYS_POP(SIC_IAR7) | ||
| 816 | #endif | ||
| 817 | #ifdef SIC_IAR6 | ||
| 818 | PM_SYS_POP(SIC_IAR6) | ||
| 819 | PM_SYS_POP(SIC_IAR5) | ||
| 820 | PM_SYS_POP(SIC_IAR4) | ||
| 821 | #endif | ||
| 822 | #ifdef SIC_IAR3 | ||
| 823 | PM_SYS_POP(SIC_IAR3) | ||
| 824 | #endif | ||
| 825 | #ifdef SIC_IAR2 | ||
| 826 | PM_SYS_POP(SIC_IAR2) | ||
| 827 | PM_SYS_POP(SIC_IAR1) | ||
| 828 | PM_SYS_POP(SIC_IAR0) | ||
| 829 | #endif | ||
| 830 | #ifdef SICA_IMASK1 | ||
| 831 | PM_SYS_POP(SICA_IMASK1) | ||
| 832 | #endif | ||
| 833 | #ifdef SICA_IMASK0 | ||
| 834 | PM_SYS_POP(SICA_IMASK0) | ||
| 835 | #endif | ||
| 836 | #ifdef SIC_IMASK | ||
| 837 | PM_SYS_POP(SIC_IMASK) | ||
| 838 | #endif | ||
| 839 | #ifdef SIC_IMASK2 | ||
| 840 | PM_SYS_POP(SIC_IMASK2) | ||
| 841 | #endif | ||
| 842 | #ifdef SIC_IMASK1 | ||
| 843 | PM_SYS_POP(SIC_IMASK1) | ||
| 844 | #endif | ||
| 845 | #ifdef SIC_IMASK0 | ||
| 846 | PM_SYS_POP(SIC_IMASK0) | ||
| 847 | #endif | ||
| 848 | |||
| 849 | [--sp] = RETI; /* Clear Global Interrupt Disable */ | ||
| 850 | SP += 4; | ||
| 851 | |||
| 852 | RETS = [SP++]; | ||
| 853 | ( R7:0, P5:0 ) = [SP++]; | ||
| 854 | RTS; | ||
| 855 | ENDPROC(_do_hibernate) | ||
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 038f70e0be65..eceb484d90f9 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
| @@ -158,23 +158,45 @@ ENTRY(_ex_single_step) | |||
| 158 | cc = r7 == r6; | 158 | cc = r7 == r6; |
| 159 | if cc jump _bfin_return_from_exception; | 159 | if cc jump _bfin_return_from_exception; |
| 160 | 160 | ||
| 161 | /* Don't do single step in hardware exception handler */ | ||
| 162 | p5.l = lo(IPEND); | ||
| 163 | p5.h = hi(IPEND); | ||
| 164 | r6 = [p5]; | ||
| 165 | cc = bittst(r6, 5); | ||
| 166 | if cc jump _bfin_return_from_exception; | ||
| 167 | |||
| 168 | #ifdef CONFIG_KGDB | ||
| 169 | /* skip single step if current interrupt priority is higher than | ||
| 170 | * that of the first instruction, from which gdb starts single step */ | ||
| 171 | r6 >>= 6; | ||
| 172 | r7 = 10; | ||
| 173 | .Lfind_priority_start: | ||
| 174 | cc = bittst(r6, 0); | ||
| 175 | if cc jump .Lfind_priority_done; | ||
| 176 | r6 >>= 1; | ||
| 177 | r7 += -1; | ||
| 178 | cc = r7 == 0; | ||
| 179 | if cc jump .Lfind_priority_done; | ||
| 180 | jump.s .Lfind_priority_start; | ||
| 181 | .Lfind_priority_done: | ||
| 182 | p4.l = _debugger_step; | ||
| 183 | p4.h = _debugger_step; | ||
| 184 | r6 = [p4]; | ||
| 185 | cc = r6 == 0; | ||
| 186 | if cc jump .Ldo_single_step; | ||
| 187 | r6 += -1; | ||
| 188 | cc = r6 < r7; | ||
| 189 | if cc jump _bfin_return_from_exception; | ||
| 190 | .Ldo_single_step: | ||
| 191 | #endif | ||
| 192 | |||
| 161 | /* If we were in user mode, do the single step normally. */ | 193 | /* If we were in user mode, do the single step normally. */ |
| 162 | p5.l = lo(IPEND); | ||
| 163 | p5.h = hi(IPEND); | ||
| 164 | r6 = [p5]; | 194 | r6 = [p5]; |
| 165 | r7 = 0xffe0 (z); | 195 | r7 = 0xffe0 (z); |
| 166 | r7 = r7 & r6; | 196 | r7 = r7 & r6; |
| 167 | cc = r7 == 0; | 197 | cc = r7 == 0; |
| 168 | if !cc jump 1f; | 198 | if cc jump 1f; |
| 169 | |||
| 170 | /* Single stepping only a single instruction, so clear the trace | ||
| 171 | * bit here. */ | ||
| 172 | r7 = syscfg; | ||
| 173 | bitclr (r7, 0); | ||
| 174 | syscfg = R7; | ||
| 175 | jump _ex_trap_c; | ||
| 176 | 199 | ||
| 177 | 1: | ||
| 178 | /* | 200 | /* |
| 179 | * We were in an interrupt handler. By convention, all of them save | 201 | * We were in an interrupt handler. By convention, all of them save |
| 180 | * SYSCFG with their first instruction, so by checking whether our | 202 | * SYSCFG with their first instruction, so by checking whether our |
| @@ -202,11 +224,15 @@ ENTRY(_ex_single_step) | |||
| 202 | cc = R7 == R6; | 224 | cc = R7 == R6; |
| 203 | if !cc jump _bfin_return_from_exception; | 225 | if !cc jump _bfin_return_from_exception; |
| 204 | 226 | ||
| 227 | 1: | ||
| 228 | /* Single stepping only a single instruction, so clear the trace | ||
| 229 | * bit here. */ | ||
| 205 | r7 = syscfg; | 230 | r7 = syscfg; |
| 206 | bitclr (r7, 0); | 231 | bitclr (r7, 0); |
| 207 | syscfg = R7; | 232 | syscfg = R7; |
| 208 | 233 | ||
| 209 | /* Fall through to _bfin_return_from_exception. */ | 234 | jump _ex_trap_c; |
| 235 | |||
| 210 | ENDPROC(_ex_single_step) | 236 | ENDPROC(_ex_single_step) |
| 211 | 237 | ||
| 212 | ENTRY(_bfin_return_from_exception) | 238 | ENTRY(_bfin_return_from_exception) |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index f5fd768022ea..64d746114e4b 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
| @@ -459,6 +459,8 @@ static struct irq_chip bfin_gpio_irqchip = { | |||
| 459 | .mask = bfin_gpio_mask_irq, | 459 | .mask = bfin_gpio_mask_irq, |
| 460 | .mask_ack = bfin_gpio_mask_ack_irq, | 460 | .mask_ack = bfin_gpio_mask_ack_irq, |
| 461 | .unmask = bfin_gpio_unmask_irq, | 461 | .unmask = bfin_gpio_unmask_irq, |
| 462 | .disable = bfin_gpio_mask_irq, | ||
| 463 | .enable = bfin_gpio_unmask_irq, | ||
| 462 | .set_type = bfin_gpio_irq_type, | 464 | .set_type = bfin_gpio_irq_type, |
| 463 | .startup = bfin_gpio_irq_startup, | 465 | .startup = bfin_gpio_irq_startup, |
| 464 | .shutdown = bfin_gpio_irq_shutdown, | 466 | .shutdown = bfin_gpio_irq_shutdown, |
| @@ -846,6 +848,8 @@ static struct irq_chip bfin_gpio_irqchip = { | |||
| 846 | .mask = bfin_gpio_mask_irq, | 848 | .mask = bfin_gpio_mask_irq, |
| 847 | .mask_ack = bfin_gpio_mask_ack_irq, | 849 | .mask_ack = bfin_gpio_mask_ack_irq, |
| 848 | .unmask = bfin_gpio_unmask_irq, | 850 | .unmask = bfin_gpio_unmask_irq, |
| 851 | .disable = bfin_gpio_mask_irq, | ||
| 852 | .enable = bfin_gpio_unmask_irq, | ||
| 849 | .set_type = bfin_gpio_irq_type, | 853 | .set_type = bfin_gpio_irq_type, |
| 850 | .startup = bfin_gpio_irq_startup, | 854 | .startup = bfin_gpio_irq_startup, |
| 851 | .shutdown = bfin_gpio_irq_shutdown, | 855 | .shutdown = bfin_gpio_irq_shutdown, |
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index 0be805ca423f..4fe6a2366b13 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
| @@ -38,8 +38,9 @@ | |||
| 38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
| 39 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
| 40 | 40 | ||
| 41 | #include <asm/dpmc.h> | ||
| 42 | #include <asm/gpio.h> | 41 | #include <asm/gpio.h> |
| 42 | #include <asm/dma.h> | ||
| 43 | #include <asm/dpmc.h> | ||
| 43 | 44 | ||
| 44 | #ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H | 45 | #ifdef CONFIG_PM_WAKEUP_GPIO_POLAR_H |
| 45 | #define WAKEUP_TYPE PM_WAKE_HIGH | 46 | #define WAKEUP_TYPE PM_WAKE_HIGH |
| @@ -61,16 +62,17 @@ | |||
| 61 | #define WAKEUP_TYPE PM_WAKE_BOTH_EDGES | 62 | #define WAKEUP_TYPE PM_WAKE_BOTH_EDGES |
| 62 | #endif | 63 | #endif |
| 63 | 64 | ||
| 65 | |||
| 64 | void bfin_pm_suspend_standby_enter(void) | 66 | void bfin_pm_suspend_standby_enter(void) |
| 65 | { | 67 | { |
| 68 | unsigned long flags; | ||
| 69 | |||
| 66 | #ifdef CONFIG_PM_WAKEUP_BY_GPIO | 70 | #ifdef CONFIG_PM_WAKEUP_BY_GPIO |
| 67 | gpio_pm_wakeup_request(CONFIG_PM_WAKEUP_GPIO_NUMBER, WAKEUP_TYPE); | 71 | gpio_pm_wakeup_request(CONFIG_PM_WAKEUP_GPIO_NUMBER, WAKEUP_TYPE); |
| 68 | #endif | 72 | #endif |
| 69 | 73 | ||
| 70 | u32 flags; | ||
| 71 | |||
| 72 | local_irq_save(flags); | 74 | local_irq_save(flags); |
| 73 | bfin_pm_setup(); | 75 | bfin_pm_standby_setup(); |
| 74 | 76 | ||
| 75 | #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER | 77 | #ifdef CONFIG_PM_BFIN_SLEEP_DEEPER |
| 76 | sleep_deeper(bfin_sic_iwr[0], bfin_sic_iwr[1], bfin_sic_iwr[2]); | 78 | sleep_deeper(bfin_sic_iwr[0], bfin_sic_iwr[1], bfin_sic_iwr[2]); |
| @@ -78,7 +80,7 @@ void bfin_pm_suspend_standby_enter(void) | |||
| 78 | sleep_mode(bfin_sic_iwr[0], bfin_sic_iwr[1], bfin_sic_iwr[2]); | 80 | sleep_mode(bfin_sic_iwr[0], bfin_sic_iwr[1], bfin_sic_iwr[2]); |
| 79 | #endif | 81 | #endif |
| 80 | 82 | ||
| 81 | bfin_pm_restore(); | 83 | bfin_pm_standby_restore(); |
| 82 | 84 | ||
| 83 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | 85 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) |
| 84 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); | 86 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); |
| @@ -93,6 +95,195 @@ void bfin_pm_suspend_standby_enter(void) | |||
| 93 | local_irq_restore(flags); | 95 | local_irq_restore(flags); |
| 94 | } | 96 | } |
| 95 | 97 | ||
| 98 | int bf53x_suspend_l1_mem(unsigned char *memptr) | ||
| 99 | { | ||
| 100 | dma_memcpy(memptr, (const void *) L1_CODE_START, L1_CODE_LENGTH); | ||
| 101 | dma_memcpy(memptr + L1_CODE_LENGTH, (const void *) L1_DATA_A_START, | ||
| 102 | L1_DATA_A_LENGTH); | ||
| 103 | dma_memcpy(memptr + L1_CODE_LENGTH + L1_DATA_A_LENGTH, | ||
| 104 | (const void *) L1_DATA_B_START, L1_DATA_B_LENGTH); | ||
| 105 | memcpy(memptr + L1_CODE_LENGTH + L1_DATA_A_LENGTH + | ||
| 106 | L1_DATA_B_LENGTH, (const void *) L1_SCRATCH_START, | ||
| 107 | L1_SCRATCH_LENGTH); | ||
| 108 | |||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | |||
| 112 | int bf53x_resume_l1_mem(unsigned char *memptr) | ||
| 113 | { | ||
| 114 | dma_memcpy((void *) L1_CODE_START, memptr, L1_CODE_LENGTH); | ||
| 115 | dma_memcpy((void *) L1_DATA_A_START, memptr + L1_CODE_LENGTH, | ||
| 116 | L1_DATA_A_LENGTH); | ||
| 117 | dma_memcpy((void *) L1_DATA_B_START, memptr + L1_CODE_LENGTH + | ||
| 118 | L1_DATA_A_LENGTH, L1_DATA_B_LENGTH); | ||
| 119 | memcpy((void *) L1_SCRATCH_START, memptr + L1_CODE_LENGTH + | ||
| 120 | L1_DATA_A_LENGTH + L1_DATA_B_LENGTH, L1_SCRATCH_LENGTH); | ||
| 121 | |||
| 122 | return 0; | ||
| 123 | } | ||
| 124 | |||
| 125 | #ifdef CONFIG_BFIN_WB | ||
| 126 | static void flushinv_all_dcache(void) | ||
| 127 | { | ||
| 128 | u32 way, bank, subbank, set; | ||
| 129 | u32 status, addr; | ||
| 130 | u32 dmem_ctl = bfin_read_DMEM_CONTROL(); | ||
| 131 | |||
| 132 | for (bank = 0; bank < 2; ++bank) { | ||
| 133 | if (!(dmem_ctl & (1 << (DMC1_P - bank)))) | ||
| 134 | continue; | ||
| 135 | |||
| 136 | for (way = 0; way < 2; ++way) | ||
| 137 | for (subbank = 0; subbank < 4; ++subbank) | ||
| 138 | for (set = 0; set < 64; ++set) { | ||
| 139 | |||
| 140 | bfin_write_DTEST_COMMAND( | ||
| 141 | way << 26 | | ||
| 142 | bank << 23 | | ||
| 143 | subbank << 16 | | ||
| 144 | set << 5 | ||
| 145 | ); | ||
| 146 | CSYNC(); | ||
| 147 | status = bfin_read_DTEST_DATA0(); | ||
| 148 | |||
| 149 | /* only worry about valid/dirty entries */ | ||
| 150 | if ((status & 0x3) != 0x3) | ||
| 151 | continue; | ||
| 152 | |||
| 153 | /* construct the address using the tag */ | ||
| 154 | addr = (status & 0xFFFFC800) | (subbank << 12) | (set << 5); | ||
| 155 | |||
| 156 | /* flush it */ | ||
| 157 | __asm__ __volatile__("FLUSHINV[%0];" : : "a"(addr)); | ||
| 158 | } | ||
| 159 | } | ||
| 160 | } | ||
| 161 | #endif | ||
| 162 | |||
| 163 | static inline void dcache_disable(void) | ||
| 164 | { | ||
| 165 | #ifdef CONFIG_BFIN_DCACHE | ||
| 166 | unsigned long ctrl; | ||
| 167 | |||
| 168 | #ifdef CONFIG_BFIN_WB | ||
| 169 | flushinv_all_dcache(); | ||
| 170 | #endif | ||
| 171 | SSYNC(); | ||
| 172 | ctrl = bfin_read_DMEM_CONTROL(); | ||
| 173 | ctrl &= ~ENDCPLB; | ||
| 174 | bfin_write_DMEM_CONTROL(ctrl); | ||
| 175 | SSYNC(); | ||
| 176 | #endif | ||
| 177 | } | ||
| 178 | |||
| 179 | static inline void dcache_enable(void) | ||
| 180 | { | ||
| 181 | #ifdef CONFIG_BFIN_DCACHE | ||
| 182 | unsigned long ctrl; | ||
| 183 | SSYNC(); | ||
| 184 | ctrl = bfin_read_DMEM_CONTROL(); | ||
| 185 | ctrl |= ENDCPLB; | ||
| 186 | bfin_write_DMEM_CONTROL(ctrl); | ||
| 187 | SSYNC(); | ||
| 188 | #endif | ||
| 189 | } | ||
| 190 | |||
| 191 | static inline void icache_disable(void) | ||
| 192 | { | ||
| 193 | #ifdef CONFIG_BFIN_ICACHE | ||
| 194 | unsigned long ctrl; | ||
| 195 | SSYNC(); | ||
| 196 | ctrl = bfin_read_IMEM_CONTROL(); | ||
| 197 | ctrl &= ~ENICPLB; | ||
| 198 | bfin_write_IMEM_CONTROL(ctrl); | ||
| 199 | SSYNC(); | ||
| 200 | #endif | ||
| 201 | } | ||
| 202 | |||
| 203 | static inline void icache_enable(void) | ||
| 204 | { | ||
| 205 | #ifdef CONFIG_BFIN_ICACHE | ||
| 206 | unsigned long ctrl; | ||
| 207 | SSYNC(); | ||
| 208 | ctrl = bfin_read_IMEM_CONTROL(); | ||
| 209 | ctrl |= ENICPLB; | ||
| 210 | bfin_write_IMEM_CONTROL(ctrl); | ||
| 211 | SSYNC(); | ||
| 212 | #endif | ||
| 213 | } | ||
| 214 | |||
| 215 | int bfin_pm_suspend_mem_enter(void) | ||
| 216 | { | ||
| 217 | unsigned long flags; | ||
| 218 | int wakeup, ret; | ||
| 219 | |||
| 220 | unsigned char *memptr = kmalloc(L1_CODE_LENGTH + L1_DATA_A_LENGTH | ||
| 221 | + L1_DATA_B_LENGTH + L1_SCRATCH_LENGTH, | ||
| 222 | GFP_KERNEL); | ||
| 223 | |||
| 224 | if (memptr == NULL) { | ||
| 225 | panic("bf53x_suspend_l1_mem malloc failed"); | ||
| 226 | return -ENOMEM; | ||
| 227 | } | ||
| 228 | |||
| 229 | wakeup = bfin_read_VR_CTL() & ~FREQ; | ||
| 230 | wakeup |= SCKELOW; | ||
| 231 | |||
| 232 | /* FIXME: merge this somehow with set_irq_wake */ | ||
| 233 | #ifdef CONFIG_PM_BFIN_WAKE_RTC | ||
| 234 | wakeup |= WAKE; | ||
| 235 | #endif | ||
| 236 | #ifdef CONFIG_PM_BFIN_WAKE_PH6 | ||
| 237 | wakeup |= PHYWE; | ||
| 238 | #endif | ||
| 239 | #ifdef CONFIG_PM_BFIN_WAKE_CAN | ||
| 240 | wakeup |= CANWE; | ||
| 241 | #endif | ||
| 242 | #ifdef CONFIG_PM_BFIN_WAKE_GP | ||
| 243 | wakeup |= GPWE; | ||
| 244 | #endif | ||
| 245 | #ifdef CONFIG_PM_BFIN_WAKE_USB | ||
| 246 | wakeup |= USBWE; | ||
| 247 | #endif | ||
| 248 | #ifdef CONFIG_PM_BFIN_WAKE_KEYPAD | ||
| 249 | wakeup |= KPADWE; | ||
| 250 | #endif | ||
| 251 | #ifdef CONFIG_PM_BFIN_WAKE_ROTARY | ||
| 252 | wakeup |= ROTWE; | ||
| 253 | #endif | ||
| 254 | |||
| 255 | local_irq_save(flags); | ||
| 256 | |||
| 257 | ret = blackfin_dma_suspend(); | ||
| 258 | |||
| 259 | if (ret) { | ||
| 260 | local_irq_restore(flags); | ||
| 261 | kfree(memptr); | ||
| 262 | return ret; | ||
| 263 | } | ||
| 264 | |||
| 265 | bfin_gpio_pm_hibernate_suspend(); | ||
| 266 | |||
| 267 | dcache_disable(); | ||
| 268 | icache_disable(); | ||
| 269 | bf53x_suspend_l1_mem(memptr); | ||
| 270 | |||
| 271 | do_hibernate(wakeup); /* Goodbye */ | ||
| 272 | |||
| 273 | bf53x_resume_l1_mem(memptr); | ||
| 274 | |||
| 275 | icache_enable(); | ||
| 276 | dcache_enable(); | ||
| 277 | |||
| 278 | bfin_gpio_pm_hibernate_restore(); | ||
| 279 | blackfin_dma_resume(); | ||
| 280 | |||
| 281 | local_irq_restore(flags); | ||
| 282 | kfree(memptr); | ||
| 283 | |||
| 284 | return 0; | ||
| 285 | } | ||
| 286 | |||
| 96 | /* | 287 | /* |
| 97 | * bfin_pm_valid - Tell the PM core that we only support the standby sleep | 288 | * bfin_pm_valid - Tell the PM core that we only support the standby sleep |
| 98 | * state | 289 | * state |
| @@ -101,7 +292,24 @@ void bfin_pm_suspend_standby_enter(void) | |||
| 101 | */ | 292 | */ |
| 102 | static int bfin_pm_valid(suspend_state_t state) | 293 | static int bfin_pm_valid(suspend_state_t state) |
| 103 | { | 294 | { |
| 104 | return (state == PM_SUSPEND_STANDBY); | 295 | return (state == PM_SUSPEND_STANDBY |
| 296 | #ifndef BF533_FAMILY | ||
| 297 | /* | ||
| 298 | * On BF533/2/1: | ||
| 299 | * If we enter Hibernate the SCKE Pin is driven Low, | ||
| 300 | * so that the SDRAM enters Self Refresh Mode. | ||
| 301 | * However when the reset sequence that follows hibernate | ||
| 302 | * state is executed, SCKE is driven High, taking the | ||
| 303 | * SDRAM out of Self Refresh. | ||
| 304 | * | ||
| 305 | * If you reconfigure and access the SDRAM "very quickly", | ||
| 306 | * you are likely to avoid errors, otherwise the SDRAM | ||
| 307 | * start losing its contents. | ||
| 308 | * An external HW workaround is possible using logic gates. | ||
| 309 | */ | ||
| 310 | || state == PM_SUSPEND_MEM | ||
| 311 | #endif | ||
| 312 | ); | ||
| 105 | } | 313 | } |
| 106 | 314 | ||
| 107 | /* | 315 | /* |
| @@ -115,10 +323,9 @@ static int bfin_pm_enter(suspend_state_t state) | |||
| 115 | case PM_SUSPEND_STANDBY: | 323 | case PM_SUSPEND_STANDBY: |
| 116 | bfin_pm_suspend_standby_enter(); | 324 | bfin_pm_suspend_standby_enter(); |
| 117 | break; | 325 | break; |
| 118 | |||
| 119 | case PM_SUSPEND_MEM: | 326 | case PM_SUSPEND_MEM: |
| 120 | return -ENOTSUPP; | 327 | bfin_pm_suspend_mem_enter(); |
| 121 | 328 | break; | |
| 122 | default: | 329 | default: |
| 123 | return -EINVAL; | 330 | return -EINVAL; |
| 124 | } | 331 | } |
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c index 3246f91c7baa..5af3c31c9365 100644 --- a/arch/blackfin/mm/blackfin_sram.c +++ b/arch/blackfin/mm/blackfin_sram.c | |||
| @@ -41,215 +41,309 @@ | |||
| 41 | #include <asm/blackfin.h> | 41 | #include <asm/blackfin.h> |
| 42 | #include "blackfin_sram.h" | 42 | #include "blackfin_sram.h" |
| 43 | 43 | ||
| 44 | spinlock_t l1sram_lock, l1_data_sram_lock, l1_inst_sram_lock; | 44 | static spinlock_t l1sram_lock, l1_data_sram_lock, l1_inst_sram_lock; |
| 45 | 45 | static spinlock_t l2_sram_lock; | |
| 46 | #if CONFIG_L1_MAX_PIECE < 16 | ||
| 47 | #undef CONFIG_L1_MAX_PIECE | ||
| 48 | #define CONFIG_L1_MAX_PIECE 16 | ||
| 49 | #endif | ||
| 50 | |||
| 51 | #if CONFIG_L1_MAX_PIECE > 1024 | ||
| 52 | #undef CONFIG_L1_MAX_PIECE | ||
| 53 | #define CONFIG_L1_MAX_PIECE 1024 | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #define SRAM_SLT_NULL 0 | ||
| 57 | #define SRAM_SLT_FREE 1 | ||
| 58 | #define SRAM_SLT_ALLOCATED 2 | ||
| 59 | 46 | ||
| 60 | /* the data structure for L1 scratchpad and DATA SRAM */ | 47 | /* the data structure for L1 scratchpad and DATA SRAM */ |
| 61 | struct l1_sram_piece { | 48 | struct sram_piece { |
| 62 | void *paddr; | 49 | void *paddr; |
| 63 | int size; | 50 | int size; |
| 64 | int flag; | ||
| 65 | pid_t pid; | 51 | pid_t pid; |
| 52 | struct sram_piece *next; | ||
| 66 | }; | 53 | }; |
| 67 | 54 | ||
| 68 | static struct l1_sram_piece l1_ssram[CONFIG_L1_MAX_PIECE]; | 55 | static struct sram_piece free_l1_ssram_head, used_l1_ssram_head; |
| 69 | 56 | ||
| 70 | #if L1_DATA_A_LENGTH != 0 | 57 | #if L1_DATA_A_LENGTH != 0 |
| 71 | static struct l1_sram_piece l1_data_A_sram[CONFIG_L1_MAX_PIECE]; | 58 | static struct sram_piece free_l1_data_A_sram_head, used_l1_data_A_sram_head; |
| 72 | #endif | 59 | #endif |
| 73 | 60 | ||
| 74 | #if L1_DATA_B_LENGTH != 0 | 61 | #if L1_DATA_B_LENGTH != 0 |
| 75 | static struct l1_sram_piece l1_data_B_sram[CONFIG_L1_MAX_PIECE]; | 62 | static struct sram_piece free_l1_data_B_sram_head, used_l1_data_B_sram_head; |
| 76 | #endif | 63 | #endif |
| 77 | 64 | ||
| 78 | #if L1_CODE_LENGTH != 0 | 65 | #if L1_CODE_LENGTH != 0 |
| 79 | static struct l1_sram_piece l1_inst_sram[CONFIG_L1_MAX_PIECE]; | 66 | static struct sram_piece free_l1_inst_sram_head, used_l1_inst_sram_head; |
| 67 | #endif | ||
| 68 | |||
| 69 | #ifdef L2_LENGTH | ||
| 70 | static struct sram_piece free_l2_sram_head, used_l2_sram_head; | ||
| 80 | #endif | 71 | #endif |
| 81 | 72 | ||
| 73 | static struct kmem_cache *sram_piece_cache; | ||
| 74 | |||
| 82 | /* L1 Scratchpad SRAM initialization function */ | 75 | /* L1 Scratchpad SRAM initialization function */ |
| 83 | void __init l1sram_init(void) | 76 | static void __init l1sram_init(void) |
| 84 | { | 77 | { |
| 85 | printk(KERN_INFO "Blackfin Scratchpad data SRAM: %d KB\n", | 78 | free_l1_ssram_head.next = |
| 86 | L1_SCRATCH_LENGTH >> 10); | 79 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
| 80 | if (!free_l1_ssram_head.next) { | ||
| 81 | printk(KERN_INFO"Fail to initialize Scratchpad data SRAM.\n"); | ||
| 82 | return; | ||
| 83 | } | ||
| 84 | |||
| 85 | free_l1_ssram_head.next->paddr = (void *)L1_SCRATCH_START; | ||
| 86 | free_l1_ssram_head.next->size = L1_SCRATCH_LENGTH; | ||
| 87 | free_l1_ssram_head.next->pid = 0; | ||
| 88 | free_l1_ssram_head.next->next = NULL; | ||
| 87 | 89 | ||
| 88 | memset(&l1_ssram, 0x00, sizeof(l1_ssram)); | 90 | used_l1_ssram_head.next = NULL; |
| 89 | l1_ssram[0].paddr = (void *)L1_SCRATCH_START; | ||
| 90 | l1_ssram[0].size = L1_SCRATCH_LENGTH; | ||
| 91 | l1_ssram[0].flag = SRAM_SLT_FREE; | ||
| 92 | 91 | ||
| 93 | /* mutex initialize */ | 92 | /* mutex initialize */ |
| 94 | spin_lock_init(&l1sram_lock); | 93 | spin_lock_init(&l1sram_lock); |
| 94 | |||
| 95 | printk(KERN_INFO "Blackfin Scratchpad data SRAM: %d KB\n", | ||
| 96 | L1_SCRATCH_LENGTH >> 10); | ||
| 95 | } | 97 | } |
| 96 | 98 | ||
| 97 | void __init l1_data_sram_init(void) | 99 | static void __init l1_data_sram_init(void) |
| 98 | { | 100 | { |
| 99 | #if L1_DATA_A_LENGTH != 0 | 101 | #if L1_DATA_A_LENGTH != 0 |
| 100 | memset(&l1_data_A_sram, 0x00, sizeof(l1_data_A_sram)); | 102 | free_l1_data_A_sram_head.next = |
| 101 | l1_data_A_sram[0].paddr = (void *)L1_DATA_A_START + | 103 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
| 102 | (_ebss_l1 - _sdata_l1); | 104 | if (!free_l1_data_A_sram_head.next) { |
| 103 | l1_data_A_sram[0].size = L1_DATA_A_LENGTH - (_ebss_l1 - _sdata_l1); | 105 | printk(KERN_INFO"Fail to initialize L1 Data A SRAM.\n"); |
| 104 | l1_data_A_sram[0].flag = SRAM_SLT_FREE; | 106 | return; |
| 105 | 107 | } | |
| 106 | printk(KERN_INFO "Blackfin Data A SRAM: %d KB (%d KB free)\n", | 108 | |
| 107 | L1_DATA_A_LENGTH >> 10, l1_data_A_sram[0].size >> 10); | 109 | free_l1_data_A_sram_head.next->paddr = |
| 110 | (void *)L1_DATA_A_START + (_ebss_l1 - _sdata_l1); | ||
| 111 | free_l1_data_A_sram_head.next->size = | ||
| 112 | L1_DATA_A_LENGTH - (_ebss_l1 - _sdata_l1); | ||
| 113 | free_l1_data_A_sram_head.next->pid = 0; | ||
| 114 | free_l1_data_A_sram_head.next->next = NULL; | ||
| 115 | |||
| 116 | used_l1_data_A_sram_head.next = NULL; | ||
| 117 | |||
| 118 | printk(KERN_INFO "Blackfin L1 Data A SRAM: %d KB (%d KB free)\n", | ||
| 119 | L1_DATA_A_LENGTH >> 10, | ||
| 120 | free_l1_data_A_sram_head.next->size >> 10); | ||
| 108 | #endif | 121 | #endif |
| 109 | #if L1_DATA_B_LENGTH != 0 | 122 | #if L1_DATA_B_LENGTH != 0 |
| 110 | memset(&l1_data_B_sram, 0x00, sizeof(l1_data_B_sram)); | 123 | free_l1_data_B_sram_head.next = |
| 111 | l1_data_B_sram[0].paddr = (void *)L1_DATA_B_START + | 124 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
| 112 | (_ebss_b_l1 - _sdata_b_l1); | 125 | if (!free_l1_data_B_sram_head.next) { |
| 113 | l1_data_B_sram[0].size = L1_DATA_B_LENGTH - (_ebss_b_l1 - _sdata_b_l1); | 126 | printk(KERN_INFO"Fail to initialize L1 Data B SRAM.\n"); |
| 114 | l1_data_B_sram[0].flag = SRAM_SLT_FREE; | 127 | return; |
| 115 | 128 | } | |
| 116 | printk(KERN_INFO "Blackfin Data B SRAM: %d KB (%d KB free)\n", | 129 | |
| 117 | L1_DATA_B_LENGTH >> 10, l1_data_B_sram[0].size >> 10); | 130 | free_l1_data_B_sram_head.next->paddr = |
| 131 | (void *)L1_DATA_B_START + (_ebss_b_l1 - _sdata_b_l1); | ||
| 132 | free_l1_data_B_sram_head.next->size = | ||
| 133 | L1_DATA_B_LENGTH - (_ebss_b_l1 - _sdata_b_l1); | ||
| 134 | free_l1_data_B_sram_head.next->pid = 0; | ||
| 135 | free_l1_data_B_sram_head.next->next = NULL; | ||
| 136 | |||
| 137 | used_l1_data_B_sram_head.next = NULL; | ||
| 138 | |||
| 139 | printk(KERN_INFO "Blackfin L1 Data B SRAM: %d KB (%d KB free)\n", | ||
| 140 | L1_DATA_B_LENGTH >> 10, | ||
| 141 | free_l1_data_B_sram_head.next->size >> 10); | ||
| 118 | #endif | 142 | #endif |
| 119 | 143 | ||
| 120 | /* mutex initialize */ | 144 | /* mutex initialize */ |
| 121 | spin_lock_init(&l1_data_sram_lock); | 145 | spin_lock_init(&l1_data_sram_lock); |
| 122 | } | 146 | } |
| 123 | 147 | ||
| 124 | void __init l1_inst_sram_init(void) | 148 | static void __init l1_inst_sram_init(void) |
| 125 | { | 149 | { |
| 126 | #if L1_CODE_LENGTH != 0 | 150 | #if L1_CODE_LENGTH != 0 |
| 127 | memset(&l1_inst_sram, 0x00, sizeof(l1_inst_sram)); | 151 | free_l1_inst_sram_head.next = |
| 128 | l1_inst_sram[0].paddr = (void *)L1_CODE_START + (_etext_l1 - _stext_l1); | 152 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
| 129 | l1_inst_sram[0].size = L1_CODE_LENGTH - (_etext_l1 - _stext_l1); | 153 | if (!free_l1_inst_sram_head.next) { |
| 130 | l1_inst_sram[0].flag = SRAM_SLT_FREE; | 154 | printk(KERN_INFO"Fail to initialize L1 Instruction SRAM.\n"); |
| 155 | return; | ||
| 156 | } | ||
| 131 | 157 | ||
| 132 | printk(KERN_INFO "Blackfin Instruction SRAM: %d KB (%d KB free)\n", | 158 | free_l1_inst_sram_head.next->paddr = |
| 133 | L1_CODE_LENGTH >> 10, l1_inst_sram[0].size >> 10); | 159 | (void *)L1_CODE_START + (_etext_l1 - _stext_l1); |
| 160 | free_l1_inst_sram_head.next->size = | ||
| 161 | L1_CODE_LENGTH - (_etext_l1 - _stext_l1); | ||
| 162 | free_l1_inst_sram_head.next->pid = 0; | ||
| 163 | free_l1_inst_sram_head.next->next = NULL; | ||
| 164 | |||
| 165 | used_l1_inst_sram_head.next = NULL; | ||
| 166 | |||
| 167 | printk(KERN_INFO "Blackfin L1 Instruction SRAM: %d KB (%d KB free)\n", | ||
| 168 | L1_CODE_LENGTH >> 10, | ||
| 169 | free_l1_inst_sram_head.next->size >> 10); | ||
| 134 | #endif | 170 | #endif |
| 135 | 171 | ||
| 136 | /* mutex initialize */ | 172 | /* mutex initialize */ |
| 137 | spin_lock_init(&l1_inst_sram_lock); | 173 | spin_lock_init(&l1_inst_sram_lock); |
| 138 | } | 174 | } |
| 139 | 175 | ||
| 140 | /* L1 memory allocate function */ | 176 | static void __init l2_sram_init(void) |
| 141 | static void *_l1_sram_alloc(size_t size, struct l1_sram_piece *pfree, int count) | ||
| 142 | { | 177 | { |
| 143 | int i, index = 0; | 178 | #ifdef L2_LENGTH |
| 144 | void *addr = NULL; | 179 | free_l2_sram_head.next = |
| 180 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); | ||
| 181 | if (!free_l2_sram_head.next) { | ||
| 182 | printk(KERN_INFO"Fail to initialize L2 SRAM.\n"); | ||
| 183 | return; | ||
| 184 | } | ||
| 145 | 185 | ||
| 146 | if (size <= 0) | 186 | free_l2_sram_head.next->paddr = (void *)L2_START + |
| 187 | (_etext_l2 - _stext_l2) + (_edata_l2 - _sdata_l2); | ||
| 188 | free_l2_sram_head.next->size = L2_LENGTH - | ||
| 189 | (_etext_l2 - _stext_l2) + (_edata_l2 - _sdata_l2); | ||
| 190 | free_l2_sram_head.next->pid = 0; | ||
| 191 | free_l2_sram_head.next->next = NULL; | ||
| 192 | |||
| 193 | used_l2_sram_head.next = NULL; | ||
| 194 | |||
| 195 | printk(KERN_INFO "Blackfin L2 SRAM: %d KB (%d KB free)\n", | ||
| 196 | L2_LENGTH >> 10, | ||
| 197 | free_l2_sram_head.next->size >> 10); | ||
| 198 | #endif | ||
| 199 | |||
| 200 | /* mutex initialize */ | ||
| 201 | spin_lock_init(&l2_sram_lock); | ||
| 202 | } | ||
| 203 | void __init bfin_sram_init(void) | ||
| 204 | { | ||
| 205 | sram_piece_cache = kmem_cache_create("sram_piece_cache", | ||
| 206 | sizeof(struct sram_piece), | ||
| 207 | 0, SLAB_PANIC, NULL); | ||
| 208 | |||
| 209 | l1sram_init(); | ||
| 210 | l1_data_sram_init(); | ||
| 211 | l1_inst_sram_init(); | ||
| 212 | l2_sram_init(); | ||
| 213 | } | ||
| 214 | |||
| 215 | /* SRAM allocate function */ | ||
| 216 | static void *_sram_alloc(size_t size, struct sram_piece *pfree_head, | ||
| 217 | struct sram_piece *pused_head) | ||
| 218 | { | ||
| 219 | struct sram_piece *pslot, *plast, *pavail; | ||
| 220 | |||
| 221 | if (size <= 0 || !pfree_head || !pused_head) | ||
| 147 | return NULL; | 222 | return NULL; |
| 148 | 223 | ||
| 149 | /* Align the size */ | 224 | /* Align the size */ |
| 150 | size = (size + 3) & ~3; | 225 | size = (size + 3) & ~3; |
| 151 | 226 | ||
| 152 | /* not use the good method to match the best slot !!! */ | 227 | pslot = pfree_head->next; |
| 153 | /* search an available memory slot */ | 228 | plast = pfree_head; |
| 154 | for (i = 0; i < count; i++) { | 229 | |
| 155 | if ((pfree[i].flag == SRAM_SLT_FREE) | 230 | /* search an available piece slot */ |
| 156 | && (pfree[i].size >= size)) { | 231 | while (pslot != NULL && size > pslot->size) { |
| 157 | addr = pfree[i].paddr; | 232 | plast = pslot; |
| 158 | pfree[i].flag = SRAM_SLT_ALLOCATED; | 233 | pslot = pslot->next; |
| 159 | pfree[i].pid = current->pid; | ||
| 160 | index = i; | ||
| 161 | break; | ||
| 162 | } | ||
| 163 | } | 234 | } |
| 164 | if (i >= count) | 235 | |
| 236 | if (!pslot) | ||
| 165 | return NULL; | 237 | return NULL; |
| 166 | 238 | ||
| 167 | /* updated the NULL memory slot !!! */ | 239 | if (pslot->size == size) { |
| 168 | if (pfree[i].size > size) { | 240 | plast->next = pslot->next; |
| 169 | for (i = 0; i < count; i++) { | 241 | pavail = pslot; |
| 170 | if (pfree[i].flag == SRAM_SLT_NULL) { | 242 | } else { |
| 171 | pfree[i].pid = 0; | 243 | pavail = kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
| 172 | pfree[i].flag = SRAM_SLT_FREE; | 244 | |
| 173 | pfree[i].paddr = addr + size; | 245 | if (!pavail) |
| 174 | pfree[i].size = pfree[index].size - size; | 246 | return NULL; |
| 175 | pfree[index].size = size; | 247 | |
| 176 | break; | 248 | pavail->paddr = pslot->paddr; |
| 177 | } | 249 | pavail->size = size; |
| 178 | } | 250 | pslot->paddr += size; |
| 251 | pslot->size -= size; | ||
| 179 | } | 252 | } |
| 180 | 253 | ||
| 181 | return addr; | 254 | pavail->pid = current->pid; |
| 255 | |||
| 256 | pslot = pused_head->next; | ||
| 257 | plast = pused_head; | ||
| 258 | |||
| 259 | /* insert new piece into used piece list !!! */ | ||
| 260 | while (pslot != NULL && pavail->paddr < pslot->paddr) { | ||
| 261 | plast = pslot; | ||
| 262 | pslot = pslot->next; | ||
| 263 | } | ||
| 264 | |||
| 265 | pavail->next = pslot; | ||
| 266 | plast->next = pavail; | ||
| 267 | |||
| 268 | return pavail->paddr; | ||
| 182 | } | 269 | } |
| 183 | 270 | ||
| 184 | /* Allocate the largest available block. */ | 271 | /* Allocate the largest available block. */ |
| 185 | static void *_l1_sram_alloc_max(struct l1_sram_piece *pfree, int count, | 272 | static void *_sram_alloc_max(struct sram_piece *pfree_head, |
| 273 | struct sram_piece *pused_head, | ||
| 186 | unsigned long *psize) | 274 | unsigned long *psize) |
| 187 | { | 275 | { |
| 188 | unsigned long best = 0; | 276 | struct sram_piece *pslot, *pmax; |
| 189 | int i, index = -1; | ||
| 190 | void *addr = NULL; | ||
| 191 | 277 | ||
| 192 | /* search an available memory slot */ | 278 | if (!pfree_head || !pused_head) |
| 193 | for (i = 0; i < count; i++) { | 279 | return NULL; |
| 194 | if (pfree[i].flag == SRAM_SLT_FREE && pfree[i].size > best) { | 280 | |
| 195 | addr = pfree[i].paddr; | 281 | pmax = pslot = pfree_head->next; |
| 196 | index = i; | 282 | |
| 197 | best = pfree[i].size; | 283 | /* search an available piece slot */ |
| 198 | } | 284 | while (pslot != NULL) { |
| 285 | if (pslot->size > pmax->size) | ||
| 286 | pmax = pslot; | ||
| 287 | pslot = pslot->next; | ||
| 199 | } | 288 | } |
| 200 | if (index < 0) | 289 | |
| 290 | if (!pmax) | ||
| 201 | return NULL; | 291 | return NULL; |
| 202 | *psize = best; | ||
| 203 | 292 | ||
| 204 | pfree[index].pid = current->pid; | 293 | *psize = pmax->size; |
| 205 | pfree[index].flag = SRAM_SLT_ALLOCATED; | 294 | |
| 206 | return addr; | 295 | return _sram_alloc(*psize, pfree_head, pused_head); |
| 207 | } | 296 | } |
| 208 | 297 | ||
| 209 | /* L1 memory free function */ | 298 | /* SRAM free function */ |
| 210 | static int _l1_sram_free(const void *addr, | 299 | static int _sram_free(const void *addr, |
| 211 | struct l1_sram_piece *pfree, | 300 | struct sram_piece *pfree_head, |
| 212 | int count) | 301 | struct sram_piece *pused_head) |
| 213 | { | 302 | { |
| 214 | int i, index = 0; | 303 | struct sram_piece *pslot, *plast, *pavail; |
| 304 | |||
| 305 | if (!pfree_head || !pused_head) | ||
| 306 | return -1; | ||
| 215 | 307 | ||
| 216 | /* search the relevant memory slot */ | 308 | /* search the relevant memory slot */ |
| 217 | for (i = 0; i < count; i++) { | 309 | pslot = pused_head->next; |
| 218 | if (pfree[i].paddr == addr) { | 310 | plast = pused_head; |
| 219 | if (pfree[i].flag != SRAM_SLT_ALLOCATED) { | 311 | |
| 220 | /* error log */ | 312 | /* search an available piece slot */ |
| 221 | return -1; | 313 | while (pslot != NULL && pslot->paddr != addr) { |
| 222 | } | 314 | plast = pslot; |
| 223 | index = i; | 315 | pslot = pslot->next; |
| 224 | break; | ||
| 225 | } | ||
| 226 | } | 316 | } |
| 227 | if (i >= count) | 317 | |
| 318 | if (!pslot) | ||
| 228 | return -1; | 319 | return -1; |
| 229 | 320 | ||
| 230 | pfree[index].pid = 0; | 321 | plast->next = pslot->next; |
| 231 | pfree[index].flag = SRAM_SLT_FREE; | 322 | pavail = pslot; |
| 232 | 323 | pavail->pid = 0; | |
| 233 | /* link the next address slot */ | 324 | |
| 234 | for (i = 0; i < count; i++) { | 325 | /* insert free pieces back to the free list */ |
| 235 | if (((pfree[index].paddr + pfree[index].size) == pfree[i].paddr) | 326 | pslot = pfree_head->next; |
| 236 | && (pfree[i].flag == SRAM_SLT_FREE)) { | 327 | plast = pfree_head; |
| 237 | pfree[i].pid = 0; | 328 | |
| 238 | pfree[i].flag = SRAM_SLT_NULL; | 329 | while (pslot != NULL && addr > pslot->paddr) { |
| 239 | pfree[index].size += pfree[i].size; | 330 | plast = pslot; |
| 240 | pfree[index].flag = SRAM_SLT_FREE; | 331 | pslot = pslot->next; |
| 241 | break; | 332 | } |
| 242 | } | 333 | |
| 334 | if (plast != pfree_head && plast->paddr + plast->size == pavail->paddr) { | ||
| 335 | plast->size += pavail->size; | ||
| 336 | kmem_cache_free(sram_piece_cache, pavail); | ||
| 337 | } else { | ||
| 338 | pavail->next = plast; | ||
| 339 | plast->next = pavail; | ||
| 340 | plast = pavail; | ||
| 243 | } | 341 | } |
| 244 | 342 | ||
| 245 | /* link the last address slot */ | 343 | if (pslot && plast->paddr + plast->size == pslot->paddr) { |
| 246 | for (i = 0; i < count; i++) { | 344 | plast->size += pslot->size; |
| 247 | if (((pfree[i].paddr + pfree[i].size) == pfree[index].paddr) && | 345 | plast->next = pslot->next; |
| 248 | (pfree[i].flag == SRAM_SLT_FREE)) { | 346 | kmem_cache_free(sram_piece_cache, pslot); |
| 249 | pfree[index].flag = SRAM_SLT_NULL; | ||
| 250 | pfree[i].size += pfree[index].size; | ||
| 251 | break; | ||
| 252 | } | ||
| 253 | } | 347 | } |
| 254 | 348 | ||
| 255 | return 0; | 349 | return 0; |
| @@ -273,6 +367,11 @@ int sram_free(const void *addr) | |||
| 273 | && addr < (void *)(L1_DATA_B_START + L1_DATA_B_LENGTH)) | 367 | && addr < (void *)(L1_DATA_B_START + L1_DATA_B_LENGTH)) |
| 274 | return l1_data_B_sram_free(addr); | 368 | return l1_data_B_sram_free(addr); |
| 275 | #endif | 369 | #endif |
| 370 | #ifdef L2_LENGTH | ||
| 371 | else if (addr >= (void *)L2_START | ||
| 372 | && addr < (void *)(L2_START + L2_LENGTH)) | ||
| 373 | return l2_sram_free(addr); | ||
| 374 | #endif | ||
| 276 | else | 375 | else |
| 277 | return -1; | 376 | return -1; |
| 278 | } | 377 | } |
| @@ -287,7 +386,8 @@ void *l1_data_A_sram_alloc(size_t size) | |||
| 287 | spin_lock_irqsave(&l1_data_sram_lock, flags); | 386 | spin_lock_irqsave(&l1_data_sram_lock, flags); |
| 288 | 387 | ||
| 289 | #if L1_DATA_A_LENGTH != 0 | 388 | #if L1_DATA_A_LENGTH != 0 |
| 290 | addr = _l1_sram_alloc(size, l1_data_A_sram, ARRAY_SIZE(l1_data_A_sram)); | 389 | addr = _sram_alloc(size, &free_l1_data_A_sram_head, |
| 390 | &used_l1_data_A_sram_head); | ||
| 291 | #endif | 391 | #endif |
| 292 | 392 | ||
| 293 | /* add mutex operation */ | 393 | /* add mutex operation */ |
| @@ -309,8 +409,8 @@ int l1_data_A_sram_free(const void *addr) | |||
| 309 | spin_lock_irqsave(&l1_data_sram_lock, flags); | 409 | spin_lock_irqsave(&l1_data_sram_lock, flags); |
| 310 | 410 | ||
| 311 | #if L1_DATA_A_LENGTH != 0 | 411 | #if L1_DATA_A_LENGTH != 0 |
| 312 | ret = _l1_sram_free(addr, | 412 | ret = _sram_free(addr, &free_l1_data_A_sram_head, |
| 313 | l1_data_A_sram, ARRAY_SIZE(l1_data_A_sram)); | 413 | &used_l1_data_A_sram_head); |
| 314 | #else | 414 | #else |
| 315 | ret = -1; | 415 | ret = -1; |
| 316 | #endif | 416 | #endif |
| @@ -331,7 +431,8 @@ void *l1_data_B_sram_alloc(size_t size) | |||
| 331 | /* add mutex operation */ | 431 | /* add mutex operation */ |
| 332 | spin_lock_irqsave(&l1_data_sram_lock, flags); | 432 | spin_lock_irqsave(&l1_data_sram_lock, flags); |
| 333 | 433 | ||
| 334 | addr = _l1_sram_alloc(size, l1_data_B_sram, ARRAY_SIZE(l1_data_B_sram)); | 434 | addr = _sram_alloc(size, &free_l1_data_B_sram_head, |
| 435 | &used_l1_data_B_sram_head); | ||
| 335 | 436 | ||
| 336 | /* add mutex operation */ | 437 | /* add mutex operation */ |
| 337 | spin_unlock_irqrestore(&l1_data_sram_lock, flags); | 438 | spin_unlock_irqrestore(&l1_data_sram_lock, flags); |
| @@ -355,7 +456,8 @@ int l1_data_B_sram_free(const void *addr) | |||
| 355 | /* add mutex operation */ | 456 | /* add mutex operation */ |
| 356 | spin_lock_irqsave(&l1_data_sram_lock, flags); | 457 | spin_lock_irqsave(&l1_data_sram_lock, flags); |
| 357 | 458 | ||
| 358 | ret = _l1_sram_free(addr, l1_data_B_sram, ARRAY_SIZE(l1_data_B_sram)); | 459 | ret = _sram_free(addr, &free_l1_data_B_sram_head, |
| 460 | &used_l1_data_B_sram_head); | ||
| 359 | 461 | ||
| 360 | /* add mutex operation */ | 462 | /* add mutex operation */ |
| 361 | spin_unlock_irqrestore(&l1_data_sram_lock, flags); | 463 | spin_unlock_irqrestore(&l1_data_sram_lock, flags); |
| @@ -408,7 +510,8 @@ void *l1_inst_sram_alloc(size_t size) | |||
| 408 | /* add mutex operation */ | 510 | /* add mutex operation */ |
| 409 | spin_lock_irqsave(&l1_inst_sram_lock, flags); | 511 | spin_lock_irqsave(&l1_inst_sram_lock, flags); |
| 410 | 512 | ||
| 411 | addr = _l1_sram_alloc(size, l1_inst_sram, ARRAY_SIZE(l1_inst_sram)); | 513 | addr = _sram_alloc(size, &free_l1_inst_sram_head, |
| 514 | &used_l1_inst_sram_head); | ||
| 412 | 515 | ||
| 413 | /* add mutex operation */ | 516 | /* add mutex operation */ |
| 414 | spin_unlock_irqrestore(&l1_inst_sram_lock, flags); | 517 | spin_unlock_irqrestore(&l1_inst_sram_lock, flags); |
| @@ -432,7 +535,8 @@ int l1_inst_sram_free(const void *addr) | |||
| 432 | /* add mutex operation */ | 535 | /* add mutex operation */ |
| 433 | spin_lock_irqsave(&l1_inst_sram_lock, flags); | 536 | spin_lock_irqsave(&l1_inst_sram_lock, flags); |
| 434 | 537 | ||
| 435 | ret = _l1_sram_free(addr, l1_inst_sram, ARRAY_SIZE(l1_inst_sram)); | 538 | ret = _sram_free(addr, &free_l1_inst_sram_head, |
| 539 | &used_l1_inst_sram_head); | ||
| 436 | 540 | ||
| 437 | /* add mutex operation */ | 541 | /* add mutex operation */ |
| 438 | spin_unlock_irqrestore(&l1_inst_sram_lock, flags); | 542 | spin_unlock_irqrestore(&l1_inst_sram_lock, flags); |
| @@ -453,7 +557,8 @@ void *l1sram_alloc(size_t size) | |||
| 453 | /* add mutex operation */ | 557 | /* add mutex operation */ |
| 454 | spin_lock_irqsave(&l1sram_lock, flags); | 558 | spin_lock_irqsave(&l1sram_lock, flags); |
| 455 | 559 | ||
| 456 | addr = _l1_sram_alloc(size, l1_ssram, ARRAY_SIZE(l1_ssram)); | 560 | addr = _sram_alloc(size, &free_l1_ssram_head, |
| 561 | &used_l1_ssram_head); | ||
| 457 | 562 | ||
| 458 | /* add mutex operation */ | 563 | /* add mutex operation */ |
| 459 | spin_unlock_irqrestore(&l1sram_lock, flags); | 564 | spin_unlock_irqrestore(&l1sram_lock, flags); |
| @@ -470,7 +575,8 @@ void *l1sram_alloc_max(size_t *psize) | |||
| 470 | /* add mutex operation */ | 575 | /* add mutex operation */ |
| 471 | spin_lock_irqsave(&l1sram_lock, flags); | 576 | spin_lock_irqsave(&l1sram_lock, flags); |
| 472 | 577 | ||
| 473 | addr = _l1_sram_alloc_max(l1_ssram, ARRAY_SIZE(l1_ssram), psize); | 578 | addr = _sram_alloc_max(&free_l1_ssram_head, |
| 579 | &used_l1_ssram_head, psize); | ||
| 474 | 580 | ||
| 475 | /* add mutex operation */ | 581 | /* add mutex operation */ |
| 476 | spin_unlock_irqrestore(&l1sram_lock, flags); | 582 | spin_unlock_irqrestore(&l1sram_lock, flags); |
| @@ -487,7 +593,8 @@ int l1sram_free(const void *addr) | |||
| 487 | /* add mutex operation */ | 593 | /* add mutex operation */ |
| 488 | spin_lock_irqsave(&l1sram_lock, flags); | 594 | spin_lock_irqsave(&l1sram_lock, flags); |
| 489 | 595 | ||
| 490 | ret = _l1_sram_free(addr, l1_ssram, ARRAY_SIZE(l1_ssram)); | 596 | ret = _sram_free(addr, &free_l1_ssram_head, |
| 597 | &used_l1_ssram_head); | ||
| 491 | 598 | ||
| 492 | /* add mutex operation */ | 599 | /* add mutex operation */ |
| 493 | spin_unlock_irqrestore(&l1sram_lock, flags); | 600 | spin_unlock_irqrestore(&l1sram_lock, flags); |
| @@ -495,6 +602,64 @@ int l1sram_free(const void *addr) | |||
| 495 | return ret; | 602 | return ret; |
| 496 | } | 603 | } |
| 497 | 604 | ||
| 605 | void *l2_sram_alloc(size_t size) | ||
| 606 | { | ||
| 607 | #ifdef L2_LENGTH | ||
| 608 | unsigned flags; | ||
| 609 | void *addr; | ||
| 610 | |||
| 611 | /* add mutex operation */ | ||
| 612 | spin_lock_irqsave(&l2_sram_lock, flags); | ||
| 613 | |||
| 614 | addr = _sram_alloc(size, &free_l2_sram_head, | ||
| 615 | &used_l2_sram_head); | ||
| 616 | |||
| 617 | /* add mutex operation */ | ||
| 618 | spin_unlock_irqrestore(&l2_sram_lock, flags); | ||
| 619 | |||
| 620 | pr_debug("Allocated address in l2_sram_alloc is 0x%lx+0x%lx\n", | ||
| 621 | (long unsigned int)addr, size); | ||
| 622 | |||
| 623 | return addr; | ||
| 624 | #else | ||
| 625 | return NULL; | ||
| 626 | #endif | ||
| 627 | } | ||
| 628 | EXPORT_SYMBOL(l2_sram_alloc); | ||
| 629 | |||
| 630 | void *l2_sram_zalloc(size_t size) | ||
| 631 | { | ||
| 632 | void *addr = l2_sram_alloc(size); | ||
| 633 | |||
| 634 | if (addr) | ||
| 635 | memset(addr, 0x00, size); | ||
| 636 | |||
| 637 | return addr; | ||
| 638 | } | ||
| 639 | EXPORT_SYMBOL(l2_sram_zalloc); | ||
| 640 | |||
| 641 | int l2_sram_free(const void *addr) | ||
| 642 | { | ||
| 643 | #ifdef L2_LENGTH | ||
| 644 | unsigned flags; | ||
| 645 | int ret; | ||
| 646 | |||
| 647 | /* add mutex operation */ | ||
| 648 | spin_lock_irqsave(&l2_sram_lock, flags); | ||
| 649 | |||
| 650 | ret = _sram_free(addr, &free_l2_sram_head, | ||
| 651 | &used_l2_sram_head); | ||
| 652 | |||
| 653 | /* add mutex operation */ | ||
| 654 | spin_unlock_irqrestore(&l2_sram_lock, flags); | ||
| 655 | |||
| 656 | return ret; | ||
| 657 | #else | ||
| 658 | return -1; | ||
| 659 | #endif | ||
| 660 | } | ||
| 661 | EXPORT_SYMBOL(l2_sram_free); | ||
| 662 | |||
| 498 | int sram_free_with_lsl(const void *addr) | 663 | int sram_free_with_lsl(const void *addr) |
| 499 | { | 664 | { |
| 500 | struct sram_list_struct *lsl, **tmp; | 665 | struct sram_list_struct *lsl, **tmp; |
| @@ -533,6 +698,9 @@ void *sram_alloc_with_lsl(size_t size, unsigned long flags) | |||
| 533 | if (addr == NULL && (flags & L1_DATA_B_SRAM)) | 698 | if (addr == NULL && (flags & L1_DATA_B_SRAM)) |
| 534 | addr = l1_data_B_sram_alloc(size); | 699 | addr = l1_data_B_sram_alloc(size); |
| 535 | 700 | ||
| 701 | if (addr == NULL && (flags & L2_SRAM)) | ||
| 702 | addr = l2_sram_alloc(size); | ||
| 703 | |||
| 536 | if (addr == NULL) { | 704 | if (addr == NULL) { |
| 537 | kfree(lsl); | 705 | kfree(lsl); |
| 538 | return NULL; | 706 | return NULL; |
| @@ -549,49 +717,80 @@ EXPORT_SYMBOL(sram_alloc_with_lsl); | |||
| 549 | /* Once we get a real allocator, we'll throw all of this away. | 717 | /* Once we get a real allocator, we'll throw all of this away. |
| 550 | * Until then, we need some sort of visibility into the L1 alloc. | 718 | * Until then, we need some sort of visibility into the L1 alloc. |
| 551 | */ | 719 | */ |
| 552 | static void _l1sram_proc_read(char *buf, int *len, const char *desc, | 720 | /* Need to keep line of output the same. Currently, that is 44 bytes |
| 553 | struct l1_sram_piece *pfree, const int array_size) | 721 | * (including newline). |
| 722 | */ | ||
| 723 | static int _sram_proc_read(char *buf, int *len, int count, const char *desc, | ||
| 724 | struct sram_piece *pfree_head, | ||
| 725 | struct sram_piece *pused_head) | ||
| 554 | { | 726 | { |
| 555 | int i; | 727 | struct sram_piece *pslot; |
| 556 | 728 | ||
| 557 | *len += sprintf(&buf[*len], "--- L1 %-14s Size PID State\n", desc); | 729 | if (!pfree_head || !pused_head) |
| 558 | for (i = 0; i < array_size; ++i) { | 730 | return -1; |
| 559 | const char *alloc_type; | 731 | |
| 560 | switch (pfree[i].flag) { | 732 | *len += sprintf(&buf[*len], "--- SRAM %-14s Size PID State \n", desc); |
| 561 | case SRAM_SLT_NULL: alloc_type = "NULL"; break; | 733 | |
| 562 | case SRAM_SLT_FREE: alloc_type = "FREE"; break; | 734 | /* search the relevant memory slot */ |
| 563 | case SRAM_SLT_ALLOCATED: alloc_type = "ALLOCATED"; break; | 735 | pslot = pused_head->next; |
| 564 | default: alloc_type = "????"; break; | 736 | |
| 565 | } | 737 | while (pslot != NULL) { |
| 566 | *len += sprintf(&buf[*len], "%p-%p %8i %4i %s\n", | 738 | *len += sprintf(&buf[*len], "%p-%p %10i %5i %-10s\n", |
| 567 | pfree[i].paddr, pfree[i].paddr + pfree[i].size, | 739 | pslot->paddr, pslot->paddr + pslot->size, |
| 568 | pfree[i].size, pfree[i].pid, alloc_type); | 740 | pslot->size, pslot->pid, "ALLOCATED"); |
| 741 | |||
| 742 | pslot = pslot->next; | ||
| 569 | } | 743 | } |
| 744 | |||
| 745 | pslot = pfree_head->next; | ||
| 746 | |||
| 747 | while (pslot != NULL) { | ||
| 748 | *len += sprintf(&buf[*len], "%p-%p %10i %5i %-10s\n", | ||
| 749 | pslot->paddr, pslot->paddr + pslot->size, | ||
| 750 | pslot->size, pslot->pid, "FREE"); | ||
| 751 | |||
| 752 | pslot = pslot->next; | ||
| 753 | } | ||
| 754 | |||
| 755 | return 0; | ||
| 570 | } | 756 | } |
| 571 | static int l1sram_proc_read(char *buf, char **start, off_t offset, int count, | 757 | static int sram_proc_read(char *buf, char **start, off_t offset, int count, |
| 572 | int *eof, void *data) | 758 | int *eof, void *data) |
| 573 | { | 759 | { |
| 574 | int len = 0; | 760 | int len = 0; |
| 575 | 761 | ||
| 576 | _l1sram_proc_read(buf, &len, "Scratchpad", | 762 | if (_sram_proc_read(buf, &len, count, "Scratchpad", |
| 577 | l1_ssram, ARRAY_SIZE(l1_ssram)); | 763 | &free_l1_ssram_head, &used_l1_ssram_head)) |
| 764 | goto not_done; | ||
| 578 | #if L1_DATA_A_LENGTH != 0 | 765 | #if L1_DATA_A_LENGTH != 0 |
| 579 | _l1sram_proc_read(buf, &len, "Data A", | 766 | if (_sram_proc_read(buf, &len, count, "L1 Data A", |
| 580 | l1_data_A_sram, ARRAY_SIZE(l1_data_A_sram)); | 767 | &free_l1_data_A_sram_head, |
| 768 | &used_l1_data_A_sram_head)) | ||
| 769 | goto not_done; | ||
| 581 | #endif | 770 | #endif |
| 582 | #if L1_DATA_B_LENGTH != 0 | 771 | #if L1_DATA_B_LENGTH != 0 |
| 583 | _l1sram_proc_read(buf, &len, "Data B", | 772 | if (_sram_proc_read(buf, &len, count, "L1 Data B", |
| 584 | l1_data_B_sram, ARRAY_SIZE(l1_data_B_sram)); | 773 | &free_l1_data_B_sram_head, |
| 774 | &used_l1_data_B_sram_head)) | ||
| 775 | goto not_done; | ||
| 585 | #endif | 776 | #endif |
| 586 | #if L1_CODE_LENGTH != 0 | 777 | #if L1_CODE_LENGTH != 0 |
| 587 | _l1sram_proc_read(buf, &len, "Instruction", | 778 | if (_sram_proc_read(buf, &len, count, "L1 Instruction", |
| 588 | l1_inst_sram, ARRAY_SIZE(l1_inst_sram)); | 779 | &free_l1_inst_sram_head, &used_l1_inst_sram_head)) |
| 780 | goto not_done; | ||
| 781 | #endif | ||
| 782 | #ifdef L2_LENGTH | ||
| 783 | if (_sram_proc_read(buf, &len, count, "L2", | ||
| 784 | &free_l2_sram_head, &used_l2_sram_head)) | ||
| 785 | goto not_done; | ||
| 589 | #endif | 786 | #endif |
| 590 | 787 | ||
| 788 | *eof = 1; | ||
| 789 | not_done: | ||
| 591 | return len; | 790 | return len; |
| 592 | } | 791 | } |
| 593 | 792 | ||
| 594 | static int __init l1sram_proc_init(void) | 793 | static int __init sram_proc_init(void) |
| 595 | { | 794 | { |
| 596 | struct proc_dir_entry *ptr; | 795 | struct proc_dir_entry *ptr; |
| 597 | ptr = create_proc_entry("sram", S_IFREG | S_IRUGO, NULL); | 796 | ptr = create_proc_entry("sram", S_IFREG | S_IRUGO, NULL); |
| @@ -600,8 +799,8 @@ static int __init l1sram_proc_init(void) | |||
| 600 | return -1; | 799 | return -1; |
| 601 | } | 800 | } |
| 602 | ptr->owner = THIS_MODULE; | 801 | ptr->owner = THIS_MODULE; |
| 603 | ptr->read_proc = l1sram_proc_read; | 802 | ptr->read_proc = sram_proc_read; |
| 604 | return 0; | 803 | return 0; |
| 605 | } | 804 | } |
| 606 | late_initcall(l1sram_proc_init); | 805 | late_initcall(sram_proc_init); |
| 607 | #endif | 806 | #endif |
diff --git a/arch/blackfin/mm/blackfin_sram.h b/arch/blackfin/mm/blackfin_sram.h index 0fb73b78dd60..8cb0945563f9 100644 --- a/arch/blackfin/mm/blackfin_sram.h +++ b/arch/blackfin/mm/blackfin_sram.h | |||
| @@ -30,9 +30,7 @@ | |||
| 30 | #ifndef __BLACKFIN_SRAM_H__ | 30 | #ifndef __BLACKFIN_SRAM_H__ |
| 31 | #define __BLACKFIN_SRAM_H__ | 31 | #define __BLACKFIN_SRAM_H__ |
| 32 | 32 | ||
| 33 | extern void l1sram_init(void); | 33 | extern void bfin_sram_init(void); |
| 34 | extern void l1_inst_sram_init(void); | ||
| 35 | extern void l1_data_sram_init(void); | ||
| 36 | extern void *l1sram_alloc(size_t); | 34 | extern void *l1sram_alloc(size_t); |
| 37 | 35 | ||
| 38 | #endif | 36 | #endif |
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index ec3141fefd20..bc240abb8745 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c | |||
| @@ -53,33 +53,6 @@ static unsigned long empty_bad_page; | |||
| 53 | 53 | ||
| 54 | unsigned long empty_zero_page; | 54 | unsigned long empty_zero_page; |
| 55 | 55 | ||
| 56 | void show_mem(void) | ||
| 57 | { | ||
| 58 | unsigned long i; | ||
| 59 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 60 | |||
| 61 | int cached = 0; | ||
| 62 | printk(KERN_INFO "Mem-info:\n"); | ||
| 63 | show_free_areas(); | ||
| 64 | i = max_mapnr; | ||
| 65 | while (i-- > 0) { | ||
| 66 | total++; | ||
| 67 | if (PageReserved(mem_map + i)) | ||
| 68 | reserved++; | ||
| 69 | else if (PageSwapCache(mem_map + i)) | ||
| 70 | cached++; | ||
| 71 | else if (!page_count(mem_map + i)) | ||
| 72 | free++; | ||
| 73 | else | ||
| 74 | shared += page_count(mem_map + i) - 1; | ||
| 75 | } | ||
| 76 | printk(KERN_INFO "%d pages of RAM\n", total); | ||
| 77 | printk(KERN_INFO "%d free pages\n", free); | ||
| 78 | printk(KERN_INFO "%d reserved pages\n", reserved); | ||
| 79 | printk(KERN_INFO "%d pages shared\n", shared); | ||
| 80 | printk(KERN_INFO "%d pages swap cached\n", cached); | ||
| 81 | } | ||
| 82 | |||
| 83 | /* | 56 | /* |
| 84 | * paging_init() continues the virtual memory environment setup which | 57 | * paging_init() continues the virtual memory environment setup which |
| 85 | * was begun by the code in arch/head.S. | 58 | * was begun by the code in arch/head.S. |
| @@ -164,11 +137,14 @@ void __init mem_init(void) | |||
| 164 | "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n", | 137 | "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n", |
| 165 | (unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10, | 138 | (unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10, |
| 166 | initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10))); | 139 | initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10))); |
| 140 | } | ||
| 141 | |||
| 142 | static int __init sram_init(void) | ||
| 143 | { | ||
| 144 | unsigned long tmp; | ||
| 167 | 145 | ||
| 168 | /* Initialize the blackfin L1 Memory. */ | 146 | /* Initialize the blackfin L1 Memory. */ |
| 169 | l1sram_init(); | 147 | bfin_sram_init(); |
| 170 | l1_data_sram_init(); | ||
| 171 | l1_inst_sram_init(); | ||
| 172 | 148 | ||
| 173 | /* Allocate this once; never free it. We assume this gives us a | 149 | /* Allocate this once; never free it. We assume this gives us a |
| 174 | pointer to the start of L1 scratchpad memory; panic if it | 150 | pointer to the start of L1 scratchpad memory; panic if it |
| @@ -179,7 +155,10 @@ void __init mem_init(void) | |||
| 179 | tmp, (unsigned long)L1_SCRATCH_TASK_INFO); | 155 | tmp, (unsigned long)L1_SCRATCH_TASK_INFO); |
| 180 | panic("No L1, time to give up\n"); | 156 | panic("No L1, time to give up\n"); |
| 181 | } | 157 | } |
| 158 | |||
| 159 | return 0; | ||
| 182 | } | 160 | } |
| 161 | pure_initcall(sram_init); | ||
| 183 | 162 | ||
| 184 | static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end) | 163 | static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end) |
| 185 | { | 164 | { |
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c index 18e13bce1400..d933c89889db 100644 --- a/arch/cris/arch-v10/boot/compressed/misc.c +++ b/arch/cris/arch-v10/boot/compressed/misc.c | |||
| @@ -102,50 +102,16 @@ extern char *input_data; /* lives in head.S */ | |||
| 102 | static long bytes_out = 0; | 102 | static long bytes_out = 0; |
| 103 | static uch *output_data; | 103 | static uch *output_data; |
| 104 | static unsigned long output_ptr = 0; | 104 | static unsigned long output_ptr = 0; |
| 105 | |||
| 106 | static void *malloc(int size); | ||
| 107 | static void free(void *where); | ||
| 108 | static void gzip_mark(void **); | ||
| 109 | static void gzip_release(void **); | ||
| 110 | |||
| 111 | static void puts(const char *); | 105 | static void puts(const char *); |
| 112 | 106 | ||
| 113 | /* the "heap" is put directly after the BSS ends, at end */ | 107 | /* the "heap" is put directly after the BSS ends, at end */ |
| 114 | 108 | ||
| 115 | extern int _end; | 109 | extern int _end; |
| 116 | static long free_mem_ptr = (long)&_end; | 110 | static long free_mem_ptr = (long)&_end; |
| 111 | static long free_mem_end_ptr; | ||
| 117 | 112 | ||
| 118 | #include "../../../../../lib/inflate.c" | 113 | #include "../../../../../lib/inflate.c" |
| 119 | 114 | ||
| 120 | static void *malloc(int size) | ||
| 121 | { | ||
| 122 | void *p; | ||
| 123 | |||
| 124 | if (size < 0) | ||
| 125 | error("Malloc error"); | ||
| 126 | |||
| 127 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 128 | |||
| 129 | p = (void *)free_mem_ptr; | ||
| 130 | free_mem_ptr += size; | ||
| 131 | |||
| 132 | return p; | ||
| 133 | } | ||
| 134 | |||
| 135 | static void free(void *where) | ||
| 136 | { /* Don't care */ | ||
| 137 | } | ||
| 138 | |||
| 139 | static void gzip_mark(void **ptr) | ||
| 140 | { | ||
| 141 | *ptr = (void *) free_mem_ptr; | ||
| 142 | } | ||
| 143 | |||
| 144 | static void gzip_release(void **ptr) | ||
| 145 | { | ||
| 146 | free_mem_ptr = (long) *ptr; | ||
| 147 | } | ||
| 148 | |||
| 149 | /* decompressor info and error messages to serial console */ | 115 | /* decompressor info and error messages to serial console */ |
| 150 | 116 | ||
| 151 | static void | 117 | static void |
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c index a3ca55150745..6fea45f2e40c 100644 --- a/arch/cris/arch-v10/kernel/kgdb.c +++ b/arch/cris/arch-v10/kernel/kgdb.c | |||
| @@ -278,14 +278,6 @@ void putDebugChar (int val); | |||
| 278 | 278 | ||
| 279 | void enableDebugIRQ (void); | 279 | void enableDebugIRQ (void); |
| 280 | 280 | ||
| 281 | /* Returns the character equivalent of a nibble, bit 7, 6, 5, and 4 of a byte, | ||
| 282 | represented by int x. */ | ||
| 283 | static char highhex (int x); | ||
| 284 | |||
| 285 | /* Returns the character equivalent of a nibble, bit 3, 2, 1, and 0 of a byte, | ||
| 286 | represented by int x. */ | ||
| 287 | static char lowhex (int x); | ||
| 288 | |||
| 289 | /* Returns the integer equivalent of a hexadecimal character. */ | 281 | /* Returns the integer equivalent of a hexadecimal character. */ |
| 290 | static int hex (char ch); | 282 | static int hex (char ch); |
| 291 | 283 | ||
| @@ -356,9 +348,6 @@ extern unsigned char executing_task; | |||
| 356 | /* Run-length encoding maximum length. Send 64 at most. */ | 348 | /* Run-length encoding maximum length. Send 64 at most. */ |
| 357 | #define RUNLENMAX 64 | 349 | #define RUNLENMAX 64 |
| 358 | 350 | ||
| 359 | /* Definition of all valid hexadecimal characters */ | ||
| 360 | static const char hexchars[] = "0123456789abcdef"; | ||
| 361 | |||
| 362 | /* The inbound/outbound buffers used in packet I/O */ | 351 | /* The inbound/outbound buffers used in packet I/O */ |
| 363 | static char remcomInBuffer[BUFMAX]; | 352 | static char remcomInBuffer[BUFMAX]; |
| 364 | static char remcomOutBuffer[BUFMAX]; | 353 | static char remcomOutBuffer[BUFMAX]; |
| @@ -499,8 +488,8 @@ gdb_cris_strtol (const char *s, char **endptr, int base) | |||
| 499 | char *sd; | 488 | char *sd; |
| 500 | int x = 0; | 489 | int x = 0; |
| 501 | 490 | ||
| 502 | for (s1 = (char*)s; (sd = gdb_cris_memchr(hexchars, *s1, base)) != NULL; ++s1) | 491 | for (s1 = (char*)s; (sd = gdb_cris_memchr(hex_asc, *s1, base)) != NULL; ++s1) |
| 503 | x = x * base + (sd - hexchars); | 492 | x = x * base + (sd - hex_asc); |
| 504 | 493 | ||
| 505 | if (endptr) | 494 | if (endptr) |
| 506 | { | 495 | { |
| @@ -670,22 +659,6 @@ read_register (char regno, unsigned int *valptr) | |||
| 670 | } | 659 | } |
| 671 | 660 | ||
| 672 | /********************************** Packet I/O ******************************/ | 661 | /********************************** Packet I/O ******************************/ |
| 673 | /* Returns the character equivalent of a nibble, bit 7, 6, 5, and 4 of a byte, | ||
| 674 | represented by int x. */ | ||
| 675 | static inline char | ||
| 676 | highhex(int x) | ||
| 677 | { | ||
| 678 | return hexchars[(x >> 4) & 0xf]; | ||
| 679 | } | ||
| 680 | |||
| 681 | /* Returns the character equivalent of a nibble, bit 3, 2, 1, and 0 of a byte, | ||
| 682 | represented by int x. */ | ||
| 683 | static inline char | ||
| 684 | lowhex(int x) | ||
| 685 | { | ||
| 686 | return hexchars[x & 0xf]; | ||
| 687 | } | ||
| 688 | |||
| 689 | /* Returns the integer equivalent of a hexadecimal character. */ | 662 | /* Returns the integer equivalent of a hexadecimal character. */ |
| 690 | static int | 663 | static int |
| 691 | hex (char ch) | 664 | hex (char ch) |
| @@ -721,8 +694,7 @@ mem2hex(char *buf, unsigned char *mem, int count) | |||
| 721 | /* Valid mem address. */ | 694 | /* Valid mem address. */ |
| 722 | for (i = 0; i < count; i++) { | 695 | for (i = 0; i < count; i++) { |
| 723 | ch = *mem++; | 696 | ch = *mem++; |
| 724 | *buf++ = highhex (ch); | 697 | buf = pack_hex_byte(buf, ch); |
| 725 | *buf++ = lowhex (ch); | ||
| 726 | } | 698 | } |
| 727 | } | 699 | } |
| 728 | 700 | ||
| @@ -857,9 +829,9 @@ putpacket(char *buffer) | |||
| 857 | src++; | 829 | src++; |
| 858 | } | 830 | } |
| 859 | } | 831 | } |
| 860 | putDebugChar ('#'); | 832 | putDebugChar('#'); |
| 861 | putDebugChar (highhex (checksum)); | 833 | putDebugChar(hex_asc_hi(checksum)); |
| 862 | putDebugChar (lowhex (checksum)); | 834 | putDebugChar(hex_asc_lo(checksum)); |
| 863 | } while(kgdb_started && (getDebugChar() != '+')); | 835 | } while(kgdb_started && (getDebugChar() != '+')); |
| 864 | } | 836 | } |
| 865 | 837 | ||
| @@ -895,9 +867,8 @@ stub_is_stopped(int sigval) | |||
| 895 | 867 | ||
| 896 | /* Send trap type (converted to signal) */ | 868 | /* Send trap type (converted to signal) */ |
| 897 | 869 | ||
| 898 | *ptr++ = 'T'; | 870 | *ptr++ = 'T'; |
| 899 | *ptr++ = highhex (sigval); | 871 | ptr = pack_hex_byte(ptr, sigval); |
| 900 | *ptr++ = lowhex (sigval); | ||
| 901 | 872 | ||
| 902 | /* Send register contents. We probably only need to send the | 873 | /* Send register contents. We probably only need to send the |
| 903 | * PC, frame pointer and stack pointer here. Other registers will be | 874 | * PC, frame pointer and stack pointer here. Other registers will be |
| @@ -910,9 +881,7 @@ stub_is_stopped(int sigval) | |||
| 910 | status = read_register (regno, ®_cont); | 881 | status = read_register (regno, ®_cont); |
| 911 | 882 | ||
| 912 | if (status == SUCCESS) { | 883 | if (status == SUCCESS) { |
| 913 | 884 | ptr = pack_hex_byte(ptr, regno); | |
| 914 | *ptr++ = highhex (regno); | ||
| 915 | *ptr++ = lowhex (regno); | ||
| 916 | *ptr++ = ':'; | 885 | *ptr++ = ':'; |
| 917 | 886 | ||
| 918 | ptr = mem2hex(ptr, (unsigned char *)®_cont, | 887 | ptr = mem2hex(ptr, (unsigned char *)®_cont, |
| @@ -937,8 +906,8 @@ stub_is_stopped(int sigval) | |||
| 937 | /* Store thread:r...; with the executing task TID. */ | 906 | /* Store thread:r...; with the executing task TID. */ |
| 938 | gdb_cris_strcpy (&remcomOutBuffer[pos], "thread:"); | 907 | gdb_cris_strcpy (&remcomOutBuffer[pos], "thread:"); |
| 939 | pos += gdb_cris_strlen ("thread:"); | 908 | pos += gdb_cris_strlen ("thread:"); |
| 940 | remcomOutBuffer[pos++] = highhex (executing_task); | 909 | remcomOutBuffer[pos++] = hex_asc_hi(executing_task); |
| 941 | remcomOutBuffer[pos++] = lowhex (executing_task); | 910 | remcomOutBuffer[pos++] = hex_asc_lo(executing_task); |
| 942 | gdb_cris_strcpy (&remcomOutBuffer[pos], ";"); | 911 | gdb_cris_strcpy (&remcomOutBuffer[pos], ";"); |
| 943 | #endif | 912 | #endif |
| 944 | 913 | ||
| @@ -1126,8 +1095,8 @@ handle_exception (int sigval) | |||
| 1126 | Success: SAA, where AA is the signal number. | 1095 | Success: SAA, where AA is the signal number. |
| 1127 | Failure: void. */ | 1096 | Failure: void. */ |
| 1128 | remcomOutBuffer[0] = 'S'; | 1097 | remcomOutBuffer[0] = 'S'; |
| 1129 | remcomOutBuffer[1] = highhex (sigval); | 1098 | remcomOutBuffer[1] = hex_asc_hi(sigval); |
| 1130 | remcomOutBuffer[2] = lowhex (sigval); | 1099 | remcomOutBuffer[2] = hex_asc_lo(sigval); |
| 1131 | remcomOutBuffer[3] = 0; | 1100 | remcomOutBuffer[3] = 0; |
| 1132 | break; | 1101 | break; |
| 1133 | 1102 | ||
| @@ -1224,23 +1193,23 @@ handle_exception (int sigval) | |||
| 1224 | case 'C': | 1193 | case 'C': |
| 1225 | /* Identify the remote current thread. */ | 1194 | /* Identify the remote current thread. */ |
| 1226 | gdb_cris_strcpy (&remcomOutBuffer[0], "QC"); | 1195 | gdb_cris_strcpy (&remcomOutBuffer[0], "QC"); |
| 1227 | remcomOutBuffer[2] = highhex (current_thread_c); | 1196 | remcomOutBuffer[2] = hex_asc_hi(current_thread_c); |
| 1228 | remcomOutBuffer[3] = lowhex (current_thread_c); | 1197 | remcomOutBuffer[3] = hex_asc_lo(current_thread_c); |
| 1229 | remcomOutBuffer[4] = '\0'; | 1198 | remcomOutBuffer[4] = '\0'; |
| 1230 | break; | 1199 | break; |
| 1231 | case 'L': | 1200 | case 'L': |
| 1232 | gdb_cris_strcpy (&remcomOutBuffer[0], "QM"); | 1201 | gdb_cris_strcpy (&remcomOutBuffer[0], "QM"); |
| 1233 | /* Reply with number of threads. */ | 1202 | /* Reply with number of threads. */ |
| 1234 | if (os_is_started()) { | 1203 | if (os_is_started()) { |
| 1235 | remcomOutBuffer[2] = highhex (number_of_tasks); | 1204 | remcomOutBuffer[2] = hex_asc_hi(number_of_tasks); |
| 1236 | remcomOutBuffer[3] = lowhex (number_of_tasks); | 1205 | remcomOutBuffer[3] = hex_asc_lo(number_of_tasks); |
| 1237 | } | 1206 | } |
| 1238 | else { | 1207 | else { |
| 1239 | remcomOutBuffer[2] = highhex (0); | 1208 | remcomOutBuffer[2] = hex_asc_hi(0); |
| 1240 | remcomOutBuffer[3] = lowhex (1); | 1209 | remcomOutBuffer[3] = hex_asc_lo(1); |
| 1241 | } | 1210 | } |
| 1242 | /* Done with the reply. */ | 1211 | /* Done with the reply. */ |
| 1243 | remcomOutBuffer[4] = lowhex (1); | 1212 | remcomOutBuffer[4] = hex_asc_lo(1); |
| 1244 | pos = 5; | 1213 | pos = 5; |
| 1245 | /* Expects the argument thread id. */ | 1214 | /* Expects the argument thread id. */ |
| 1246 | for (; pos < (5 + HEXCHARS_IN_THREAD_ID); pos++) | 1215 | for (; pos < (5 + HEXCHARS_IN_THREAD_ID); pos++) |
| @@ -1251,16 +1220,16 @@ handle_exception (int sigval) | |||
| 1251 | for (thread_id = 0; thread_id < number_of_tasks; thread_id++) { | 1220 | for (thread_id = 0; thread_id < number_of_tasks; thread_id++) { |
| 1252 | nextpos = pos + HEXCHARS_IN_THREAD_ID - 1; | 1221 | nextpos = pos + HEXCHARS_IN_THREAD_ID - 1; |
| 1253 | for (; pos < nextpos; pos ++) | 1222 | for (; pos < nextpos; pos ++) |
| 1254 | remcomOutBuffer[pos] = lowhex (0); | 1223 | remcomOutBuffer[pos] = hex_asc_lo(0); |
| 1255 | remcomOutBuffer[pos++] = lowhex (thread_id); | 1224 | remcomOutBuffer[pos++] = hex_asc_lo(thread_id); |
| 1256 | } | 1225 | } |
| 1257 | } | 1226 | } |
| 1258 | else { | 1227 | else { |
| 1259 | /* Store the thread identifier of the boot task. */ | 1228 | /* Store the thread identifier of the boot task. */ |
| 1260 | nextpos = pos + HEXCHARS_IN_THREAD_ID - 1; | 1229 | nextpos = pos + HEXCHARS_IN_THREAD_ID - 1; |
| 1261 | for (; pos < nextpos; pos ++) | 1230 | for (; pos < nextpos; pos ++) |
| 1262 | remcomOutBuffer[pos] = lowhex (0); | 1231 | remcomOutBuffer[pos] = hex_asc_lo(0); |
| 1263 | remcomOutBuffer[pos++] = lowhex (current_thread_c); | 1232 | remcomOutBuffer[pos++] = hex_asc_lo(current_thread_c); |
| 1264 | } | 1233 | } |
| 1265 | remcomOutBuffer[pos] = '\0'; | 1234 | remcomOutBuffer[pos] = '\0'; |
| 1266 | break; | 1235 | break; |
diff --git a/arch/cris/arch-v10/mm/init.c b/arch/cris/arch-v10/mm/init.c index e0fcd1a9bfd5..742fd1974c2e 100644 --- a/arch/cris/arch-v10/mm/init.c +++ b/arch/cris/arch-v10/mm/init.c | |||
| @@ -182,7 +182,7 @@ paging_init(void) | |||
| 182 | * mem_map page array. | 182 | * mem_map page array. |
| 183 | */ | 183 | */ |
| 184 | 184 | ||
| 185 | free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); | 185 | free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | /* Initialize remaps of some I/O-ports. It is important that this | 188 | /* Initialize remaps of some I/O-ports. It is important that this |
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c index 55b2695c5d70..3595e16e82bc 100644 --- a/arch/cris/arch-v32/boot/compressed/misc.c +++ b/arch/cris/arch-v32/boot/compressed/misc.c | |||
| @@ -89,20 +89,14 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
| 89 | 89 | ||
| 90 | static void flush_window(void); | 90 | static void flush_window(void); |
| 91 | static void error(char *m); | 91 | static void error(char *m); |
| 92 | static void gzip_mark(void **); | ||
| 93 | static void gzip_release(void **); | ||
| 94 | 92 | ||
| 95 | extern char *input_data; /* lives in head.S */ | 93 | extern char *input_data; /* lives in head.S */ |
| 96 | 94 | ||
| 97 | static long bytes_out = 0; | 95 | static long bytes_out; |
| 98 | static uch *output_data; | 96 | static uch *output_data; |
| 99 | static unsigned long output_ptr = 0; | 97 | static unsigned long output_ptr; |
| 100 | 98 | ||
| 101 | static void *malloc(int size); | ||
| 102 | static void free(void *where); | ||
| 103 | static void error(char *m); | 99 | static void error(char *m); |
| 104 | static void gzip_mark(void **); | ||
| 105 | static void gzip_release(void **); | ||
| 106 | 100 | ||
| 107 | static void puts(const char *); | 101 | static void puts(const char *); |
| 108 | 102 | ||
| @@ -110,37 +104,10 @@ static void puts(const char *); | |||
| 110 | 104 | ||
| 111 | extern int _end; | 105 | extern int _end; |
| 112 | static long free_mem_ptr = (long)&_end; | 106 | static long free_mem_ptr = (long)&_end; |
| 107 | static long free_mem_end_ptr; | ||
| 113 | 108 | ||
| 114 | #include "../../../../../lib/inflate.c" | 109 | #include "../../../../../lib/inflate.c" |
| 115 | 110 | ||
| 116 | static void *malloc(int size) | ||
| 117 | { | ||
| 118 | void *p; | ||
| 119 | |||
| 120 | if (size <0) error("Malloc error"); | ||
| 121 | |||
| 122 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 123 | |||
| 124 | p = (void *)free_mem_ptr; | ||
| 125 | free_mem_ptr += size; | ||
| 126 | |||
| 127 | return p; | ||
| 128 | } | ||
| 129 | |||
| 130 | static void free(void *where) | ||
| 131 | { /* Don't care */ | ||
| 132 | } | ||
| 133 | |||
| 134 | static void gzip_mark(void **ptr) | ||
| 135 | { | ||
| 136 | *ptr = (void *) free_mem_ptr; | ||
| 137 | } | ||
| 138 | |||
| 139 | static void gzip_release(void **ptr) | ||
| 140 | { | ||
| 141 | free_mem_ptr = (long) *ptr; | ||
| 142 | } | ||
| 143 | |||
| 144 | /* decompressor info and error messages to serial console */ | 111 | /* decompressor info and error messages to serial console */ |
| 145 | 112 | ||
| 146 | static inline void | 113 | static inline void |
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c index 4e2e2e271efb..8bd5a5bc0dc7 100644 --- a/arch/cris/arch-v32/kernel/kgdb.c +++ b/arch/cris/arch-v32/kernel/kgdb.c | |||
| @@ -398,14 +398,6 @@ void putDebugChar(int val) | |||
| 398 | } | 398 | } |
| 399 | #endif | 399 | #endif |
| 400 | 400 | ||
| 401 | /* Returns the character equivalent of a nibble, bit 7, 6, 5, and 4 of a byte, | ||
| 402 | represented by int x. */ | ||
| 403 | static char highhex(int x); | ||
| 404 | |||
| 405 | /* Returns the character equivalent of a nibble, bit 3, 2, 1, and 0 of a byte, | ||
| 406 | represented by int x. */ | ||
| 407 | static char lowhex(int x); | ||
| 408 | |||
| 409 | /* Returns the integer equivalent of a hexadecimal character. */ | 401 | /* Returns the integer equivalent of a hexadecimal character. */ |
| 410 | static int hex(char ch); | 402 | static int hex(char ch); |
| 411 | 403 | ||
| @@ -464,9 +456,6 @@ void breakpoint(void); | |||
| 464 | /* Run-length encoding maximum length. Send 64 at most. */ | 456 | /* Run-length encoding maximum length. Send 64 at most. */ |
| 465 | #define RUNLENMAX 64 | 457 | #define RUNLENMAX 64 |
| 466 | 458 | ||
| 467 | /* Definition of all valid hexadecimal characters */ | ||
| 468 | static const char hexchars[] = "0123456789abcdef"; | ||
| 469 | |||
| 470 | /* The inbound/outbound buffers used in packet I/O */ | 459 | /* The inbound/outbound buffers used in packet I/O */ |
| 471 | static char input_buffer[BUFMAX]; | 460 | static char input_buffer[BUFMAX]; |
| 472 | static char output_buffer[BUFMAX]; | 461 | static char output_buffer[BUFMAX]; |
| @@ -550,8 +539,8 @@ gdb_cris_strtol(const char *s, char **endptr, int base) | |||
| 550 | char *sd; | 539 | char *sd; |
| 551 | int x = 0; | 540 | int x = 0; |
| 552 | 541 | ||
| 553 | for (s1 = (char*)s; (sd = gdb_cris_memchr(hexchars, *s1, base)) != NULL; ++s1) | 542 | for (s1 = (char*)s; (sd = gdb_cris_memchr(hex_asc, *s1, base)) != NULL; ++s1) |
| 554 | x = x * base + (sd - hexchars); | 543 | x = x * base + (sd - hex_asc); |
| 555 | 544 | ||
| 556 | if (endptr) { | 545 | if (endptr) { |
| 557 | /* Unconverted suffix is stored in endptr unless endptr is NULL. */ | 546 | /* Unconverted suffix is stored in endptr unless endptr is NULL. */ |
| @@ -655,22 +644,6 @@ read_register(char regno, unsigned int *valptr) | |||
| 655 | } | 644 | } |
| 656 | 645 | ||
| 657 | /********************************** Packet I/O ******************************/ | 646 | /********************************** Packet I/O ******************************/ |
| 658 | /* Returns the character equivalent of a nibble, bit 7, 6, 5, and 4 of a byte, | ||
| 659 | represented by int x. */ | ||
| 660 | static inline char | ||
| 661 | highhex(int x) | ||
| 662 | { | ||
| 663 | return hexchars[(x >> 4) & 0xf]; | ||
| 664 | } | ||
| 665 | |||
| 666 | /* Returns the character equivalent of a nibble, bit 3, 2, 1, and 0 of a byte, | ||
| 667 | represented by int x. */ | ||
| 668 | static inline char | ||
| 669 | lowhex(int x) | ||
| 670 | { | ||
| 671 | return hexchars[x & 0xf]; | ||
| 672 | } | ||
| 673 | |||
| 674 | /* Returns the integer equivalent of a hexadecimal character. */ | 647 | /* Returns the integer equivalent of a hexadecimal character. */ |
| 675 | static int | 648 | static int |
| 676 | hex(char ch) | 649 | hex(char ch) |
| @@ -704,8 +677,7 @@ mem2hex(char *buf, unsigned char *mem, int count) | |||
| 704 | /* Valid mem address. */ | 677 | /* Valid mem address. */ |
| 705 | for (i = 0; i < count; i++) { | 678 | for (i = 0; i < count; i++) { |
| 706 | ch = *mem++; | 679 | ch = *mem++; |
| 707 | *buf++ = highhex (ch); | 680 | buf = pack_hex_byte(buf, ch); |
| 708 | *buf++ = lowhex (ch); | ||
| 709 | } | 681 | } |
| 710 | } | 682 | } |
| 711 | /* Terminate properly. */ | 683 | /* Terminate properly. */ |
| @@ -723,8 +695,7 @@ mem2hex_nbo(char *buf, unsigned char *mem, int count) | |||
| 723 | mem += count - 1; | 695 | mem += count - 1; |
| 724 | for (i = 0; i < count; i++) { | 696 | for (i = 0; i < count; i++) { |
| 725 | ch = *mem--; | 697 | ch = *mem--; |
| 726 | *buf++ = highhex (ch); | 698 | buf = pack_hex_byte(buf, ch); |
| 727 | *buf++ = lowhex (ch); | ||
| 728 | } | 699 | } |
| 729 | 700 | ||
| 730 | /* Terminate properly. */ | 701 | /* Terminate properly. */ |
| @@ -862,8 +833,8 @@ putpacket(char *buffer) | |||
| 862 | } | 833 | } |
| 863 | } | 834 | } |
| 864 | putDebugChar('#'); | 835 | putDebugChar('#'); |
| 865 | putDebugChar(highhex (checksum)); | 836 | putDebugChar(hex_asc_hi(checksum)); |
| 866 | putDebugChar(lowhex (checksum)); | 837 | putDebugChar(hex_asc_lo(checksum)); |
| 867 | } while(kgdb_started && (getDebugChar() != '+')); | 838 | } while(kgdb_started && (getDebugChar() != '+')); |
| 868 | } | 839 | } |
| 869 | 840 | ||
| @@ -909,8 +880,7 @@ stub_is_stopped(int sigval) | |||
| 909 | /* Send trap type (converted to signal) */ | 880 | /* Send trap type (converted to signal) */ |
| 910 | 881 | ||
| 911 | *ptr++ = 'T'; | 882 | *ptr++ = 'T'; |
| 912 | *ptr++ = highhex(sigval); | 883 | ptr = pack_hex_byte(ptr, sigval); |
| 913 | *ptr++ = lowhex(sigval); | ||
| 914 | 884 | ||
| 915 | if (((reg.exs & 0xff00) >> 8) == 0xc) { | 885 | if (((reg.exs & 0xff00) >> 8) == 0xc) { |
| 916 | 886 | ||
| @@ -1018,30 +988,26 @@ stub_is_stopped(int sigval) | |||
| 1018 | } | 988 | } |
| 1019 | /* Only send PC, frame and stack pointer. */ | 989 | /* Only send PC, frame and stack pointer. */ |
| 1020 | read_register(PC, ®_cont); | 990 | read_register(PC, ®_cont); |
| 1021 | *ptr++ = highhex(PC); | 991 | ptr = pack_hex_byte(PC); |
| 1022 | *ptr++ = lowhex(PC); | ||
| 1023 | *ptr++ = ':'; | 992 | *ptr++ = ':'; |
| 1024 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[PC]); | 993 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[PC]); |
| 1025 | *ptr++ = ';'; | 994 | *ptr++ = ';'; |
| 1026 | 995 | ||
| 1027 | read_register(R8, ®_cont); | 996 | read_register(R8, ®_cont); |
| 1028 | *ptr++ = highhex(R8); | 997 | ptr = pack_hex_byte(R8); |
| 1029 | *ptr++ = lowhex(R8); | ||
| 1030 | *ptr++ = ':'; | 998 | *ptr++ = ':'; |
| 1031 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[R8]); | 999 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[R8]); |
| 1032 | *ptr++ = ';'; | 1000 | *ptr++ = ';'; |
| 1033 | 1001 | ||
| 1034 | read_register(SP, ®_cont); | 1002 | read_register(SP, ®_cont); |
| 1035 | *ptr++ = highhex(SP); | 1003 | ptr = pack_hex_byte(SP); |
| 1036 | *ptr++ = lowhex(SP); | ||
| 1037 | *ptr++ = ':'; | 1004 | *ptr++ = ':'; |
| 1038 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[SP]); | 1005 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[SP]); |
| 1039 | *ptr++ = ';'; | 1006 | *ptr++ = ';'; |
| 1040 | 1007 | ||
| 1041 | /* Send ERP as well; this will save us an entire register fetch in some cases. */ | 1008 | /* Send ERP as well; this will save us an entire register fetch in some cases. */ |
| 1042 | read_register(ERP, ®_cont); | 1009 | read_register(ERP, ®_cont); |
| 1043 | *ptr++ = highhex(ERP); | 1010 | ptr = pack_hex_byte(ERP); |
| 1044 | *ptr++ = lowhex(ERP); | ||
| 1045 | *ptr++ = ':'; | 1011 | *ptr++ = ':'; |
| 1046 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[ERP]); | 1012 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[ERP]); |
| 1047 | *ptr++ = ';'; | 1013 | *ptr++ = ';'; |
| @@ -1533,8 +1499,8 @@ handle_exception(int sigval) | |||
| 1533 | Success: SAA, where AA is the signal number. | 1499 | Success: SAA, where AA is the signal number. |
| 1534 | Failure: void. */ | 1500 | Failure: void. */ |
| 1535 | output_buffer[0] = 'S'; | 1501 | output_buffer[0] = 'S'; |
| 1536 | output_buffer[1] = highhex(sigval); | 1502 | output_buffer[1] = hex_asc_hi(sigval); |
| 1537 | output_buffer[2] = lowhex(sigval); | 1503 | output_buffer[2] = hex_asc_lo(sigval); |
| 1538 | output_buffer[3] = 0; | 1504 | output_buffer[3] = 0; |
| 1539 | break; | 1505 | break; |
| 1540 | 1506 | ||
diff --git a/arch/cris/arch-v32/mm/init.c b/arch/cris/arch-v32/mm/init.c index 5a9ac5834647..8a34b8b74293 100644 --- a/arch/cris/arch-v32/mm/init.c +++ b/arch/cris/arch-v32/mm/init.c | |||
| @@ -162,7 +162,7 @@ paging_init(void) | |||
| 162 | * substantially higher than 0, like us (we start at PAGE_OFFSET). This | 162 | * substantially higher than 0, like us (we start at PAGE_OFFSET). This |
| 163 | * saves space in the mem_map page array. | 163 | * saves space in the mem_map page array. |
| 164 | */ | 164 | */ |
| 165 | free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); | 165 | free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); |
| 166 | 166 | ||
| 167 | mem_map = contig_page_data.node_mem_map; | 167 | mem_map = contig_page_data.node_mem_map; |
| 168 | } | 168 | } |
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c index 44f7b4f79476..9aa571169bcc 100644 --- a/arch/cris/kernel/profile.c +++ b/arch/cris/kernel/profile.c | |||
| @@ -35,19 +35,16 @@ read_cris_profile(struct file *file, char __user *buf, | |||
| 35 | size_t count, loff_t *ppos) | 35 | size_t count, loff_t *ppos) |
| 36 | { | 36 | { |
| 37 | unsigned long p = *ppos; | 37 | unsigned long p = *ppos; |
| 38 | ssize_t ret; | ||
| 38 | 39 | ||
| 39 | if (p > SAMPLE_BUFFER_SIZE) | 40 | ret = simple_read_from_buffer(buf, count, ppos, sample_buffer, |
| 40 | return 0; | 41 | SAMPLE_BUFFER_SIZE); |
| 42 | if (ret < 0) | ||
| 43 | return ret; | ||
| 41 | 44 | ||
| 42 | if (p + count > SAMPLE_BUFFER_SIZE) | 45 | memset(sample_buffer + p, 0, ret); |
| 43 | count = SAMPLE_BUFFER_SIZE - p; | ||
| 44 | if (copy_to_user(buf, sample_buffer + p,count)) | ||
| 45 | return -EFAULT; | ||
| 46 | 46 | ||
| 47 | memset(sample_buffer + p, 0, count); | 47 | return ret; |
| 48 | *ppos += count; | ||
| 49 | |||
| 50 | return count; | ||
| 51 | } | 48 | } |
| 52 | 49 | ||
| 53 | static ssize_t | 50 | static ssize_t |
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c index 5b06ffa15e34..2fdd212eb250 100644 --- a/arch/cris/mm/init.c +++ b/arch/cris/mm/init.c | |||
| @@ -19,36 +19,6 @@ unsigned long empty_zero_page; | |||
| 19 | extern char _stext, _edata, _etext; /* From linkerscript */ | 19 | extern char _stext, _edata, _etext; /* From linkerscript */ |
| 20 | extern char __init_begin, __init_end; | 20 | extern char __init_begin, __init_end; |
| 21 | 21 | ||
| 22 | void | ||
| 23 | show_mem(void) | ||
| 24 | { | ||
| 25 | int i,free = 0,total = 0,cached = 0, reserved = 0, nonshared = 0; | ||
| 26 | int shared = 0; | ||
| 27 | |||
| 28 | printk("\nMem-info:\n"); | ||
| 29 | show_free_areas(); | ||
| 30 | i = max_mapnr; | ||
| 31 | while (i-- > 0) { | ||
| 32 | total++; | ||
| 33 | if (PageReserved(mem_map+i)) | ||
| 34 | reserved++; | ||
| 35 | else if (PageSwapCache(mem_map+i)) | ||
| 36 | cached++; | ||
| 37 | else if (!page_count(mem_map+i)) | ||
| 38 | free++; | ||
| 39 | else if (page_count(mem_map+i) == 1) | ||
| 40 | nonshared++; | ||
| 41 | else | ||
| 42 | shared += page_count(mem_map+i) - 1; | ||
| 43 | } | ||
| 44 | printk("%d pages of RAM\n",total); | ||
| 45 | printk("%d free pages\n",free); | ||
| 46 | printk("%d reserved pages\n",reserved); | ||
| 47 | printk("%d pages nonshared\n",nonshared); | ||
| 48 | printk("%d pages shared\n",shared); | ||
| 49 | printk("%d pages swap cached\n",cached); | ||
| 50 | } | ||
| 51 | |||
| 52 | void __init | 22 | void __init |
| 53 | mem_init(void) | 23 | mem_init(void) |
| 54 | { | 24 | { |
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c index 48a0393e7cee..7ca8a6b19ac9 100644 --- a/arch/frv/kernel/gdb-stub.c +++ b/arch/frv/kernel/gdb-stub.c | |||
| @@ -182,8 +182,6 @@ extern volatile u32 __attribute__((section(".bss"))) gdbstub_trace_through_excep | |||
| 182 | static char input_buffer[BUFMAX]; | 182 | static char input_buffer[BUFMAX]; |
| 183 | static char output_buffer[BUFMAX]; | 183 | static char output_buffer[BUFMAX]; |
| 184 | 184 | ||
| 185 | static const char hexchars[] = "0123456789abcdef"; | ||
| 186 | |||
| 187 | static const char *regnames[] = { | 185 | static const char *regnames[] = { |
| 188 | "PSR ", "ISR ", "CCR ", "CCCR", | 186 | "PSR ", "ISR ", "CCR ", "CCCR", |
| 189 | "LR ", "LCR ", "PC ", "_stt", | 187 | "LR ", "LCR ", "PC ", "_stt", |
| @@ -383,8 +381,8 @@ static int gdbstub_send_packet(char *buffer) | |||
| 383 | } | 381 | } |
| 384 | 382 | ||
| 385 | gdbstub_tx_char('#'); | 383 | gdbstub_tx_char('#'); |
| 386 | gdbstub_tx_char(hexchars[checksum >> 4]); | 384 | gdbstub_tx_char(hex_asc_hi(checksum)); |
| 387 | gdbstub_tx_char(hexchars[checksum & 0xf]); | 385 | gdbstub_tx_char(hex_asc_lo(checksum)); |
| 388 | 386 | ||
| 389 | } while (gdbstub_rx_char(&ch,0), | 387 | } while (gdbstub_rx_char(&ch,0), |
| 390 | #ifdef GDBSTUB_DEBUG_PROTOCOL | 388 | #ifdef GDBSTUB_DEBUG_PROTOCOL |
| @@ -674,8 +672,7 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
| 674 | if ((uint32_t)mem&1 && count>=1) { | 672 | if ((uint32_t)mem&1 && count>=1) { |
| 675 | if (!gdbstub_read_byte(mem,ch)) | 673 | if (!gdbstub_read_byte(mem,ch)) |
| 676 | return NULL; | 674 | return NULL; |
| 677 | *buf++ = hexchars[ch[0] >> 4]; | 675 | buf = pack_hex_byte(buf, ch[0]); |
| 678 | *buf++ = hexchars[ch[0] & 0xf]; | ||
| 679 | mem++; | 676 | mem++; |
| 680 | count--; | 677 | count--; |
| 681 | } | 678 | } |
| @@ -683,10 +680,8 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
| 683 | if ((uint32_t)mem&3 && count>=2) { | 680 | if ((uint32_t)mem&3 && count>=2) { |
| 684 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) | 681 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) |
| 685 | return NULL; | 682 | return NULL; |
| 686 | *buf++ = hexchars[ch[0] >> 4]; | 683 | buf = pack_hex_byte(buf, ch[0]); |
| 687 | *buf++ = hexchars[ch[0] & 0xf]; | 684 | buf = pack_hex_byte(buf, ch[1]); |
| 688 | *buf++ = hexchars[ch[1] >> 4]; | ||
| 689 | *buf++ = hexchars[ch[1] & 0xf]; | ||
| 690 | mem += 2; | 685 | mem += 2; |
| 691 | count -= 2; | 686 | count -= 2; |
| 692 | } | 687 | } |
| @@ -694,14 +689,10 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
| 694 | while (count>=4) { | 689 | while (count>=4) { |
| 695 | if (!gdbstub_read_dword(mem,(uint32_t *)ch)) | 690 | if (!gdbstub_read_dword(mem,(uint32_t *)ch)) |
| 696 | return NULL; | 691 | return NULL; |
| 697 | *buf++ = hexchars[ch[0] >> 4]; | 692 | buf = pack_hex_byte(buf, ch[0]); |
| 698 | *buf++ = hexchars[ch[0] & 0xf]; | 693 | buf = pack_hex_byte(buf, ch[1]); |
| 699 | *buf++ = hexchars[ch[1] >> 4]; | 694 | buf = pack_hex_byte(buf, ch[2]); |
| 700 | *buf++ = hexchars[ch[1] & 0xf]; | 695 | buf = pack_hex_byte(buf, ch[3]); |
| 701 | *buf++ = hexchars[ch[2] >> 4]; | ||
| 702 | *buf++ = hexchars[ch[2] & 0xf]; | ||
| 703 | *buf++ = hexchars[ch[3] >> 4]; | ||
| 704 | *buf++ = hexchars[ch[3] & 0xf]; | ||
| 705 | mem += 4; | 696 | mem += 4; |
| 706 | count -= 4; | 697 | count -= 4; |
| 707 | } | 698 | } |
| @@ -709,10 +700,8 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
| 709 | if (count>=2) { | 700 | if (count>=2) { |
| 710 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) | 701 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) |
| 711 | return NULL; | 702 | return NULL; |
| 712 | *buf++ = hexchars[ch[0] >> 4]; | 703 | buf = pack_hex_byte(buf, ch[0]); |
| 713 | *buf++ = hexchars[ch[0] & 0xf]; | 704 | buf = pack_hex_byte(buf, ch[1]); |
| 714 | *buf++ = hexchars[ch[1] >> 4]; | ||
| 715 | *buf++ = hexchars[ch[1] & 0xf]; | ||
| 716 | mem += 2; | 705 | mem += 2; |
| 717 | count -= 2; | 706 | count -= 2; |
| 718 | } | 707 | } |
| @@ -720,8 +709,7 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
| 720 | if (count>=1) { | 709 | if (count>=1) { |
| 721 | if (!gdbstub_read_byte(mem,ch)) | 710 | if (!gdbstub_read_byte(mem,ch)) |
| 722 | return NULL; | 711 | return NULL; |
| 723 | *buf++ = hexchars[ch[0] >> 4]; | 712 | buf = pack_hex_byte(buf, ch[0]); |
| 724 | *buf++ = hexchars[ch[0] & 0xf]; | ||
| 725 | } | 713 | } |
| 726 | 714 | ||
| 727 | *buf = 0; | 715 | *buf = 0; |
| @@ -1471,22 +1459,22 @@ void gdbstub(int sigval) | |||
| 1471 | *ptr++ = 'O'; | 1459 | *ptr++ = 'O'; |
| 1472 | ptr = mem2hex(title, ptr, sizeof(title) - 1,0); | 1460 | ptr = mem2hex(title, ptr, sizeof(title) - 1,0); |
| 1473 | 1461 | ||
| 1474 | hx = hexchars[(brr & 0xf0000000) >> 28]; | 1462 | hx = hex_asc_hi(brr >> 24); |
| 1475 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1463 | ptr = pack_hex_byte(ptr, hx); |
| 1476 | hx = hexchars[(brr & 0x0f000000) >> 24]; | 1464 | hx = hex_asc_lo(brr >> 24); |
| 1477 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1465 | ptr = pack_hex_byte(ptr, hx); |
| 1478 | hx = hexchars[(brr & 0x00f00000) >> 20]; | 1466 | hx = hex_asc_hi(brr >> 16); |
| 1479 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1467 | ptr = pack_hex_byte(ptr, hx); |
| 1480 | hx = hexchars[(brr & 0x000f0000) >> 16]; | 1468 | hx = hex_asc_lo(brr >> 16); |
| 1481 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1469 | ptr = pack_hex_byte(ptr, hx); |
| 1482 | hx = hexchars[(brr & 0x0000f000) >> 12]; | 1470 | hx = hex_asc_hi(brr >> 8); |
| 1483 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1471 | ptr = pack_hex_byte(ptr, hx); |
| 1484 | hx = hexchars[(brr & 0x00000f00) >> 8]; | 1472 | hx = hex_asc_lo(brr >> 8); |
| 1485 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1473 | ptr = pack_hex_byte(ptr, hx); |
| 1486 | hx = hexchars[(brr & 0x000000f0) >> 4]; | 1474 | hx = hex_asc_hi(brr); |
| 1487 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1475 | ptr = pack_hex_byte(ptr, hx); |
| 1488 | hx = hexchars[(brr & 0x0000000f)]; | 1476 | hx = hex_asc_lo(brr); |
| 1489 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1477 | ptr = pack_hex_byte(ptr, hx); |
| 1490 | 1478 | ||
| 1491 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); | 1479 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); |
| 1492 | *ptr = 0; | 1480 | *ptr = 0; |
| @@ -1500,12 +1488,10 @@ void gdbstub(int sigval) | |||
| 1500 | 1488 | ||
| 1501 | /* Send trap type (converted to signal) */ | 1489 | /* Send trap type (converted to signal) */ |
| 1502 | *ptr++ = 'T'; | 1490 | *ptr++ = 'T'; |
| 1503 | *ptr++ = hexchars[sigval >> 4]; | 1491 | ptr = pack_hex_byte(ptr, sigval); |
| 1504 | *ptr++ = hexchars[sigval & 0xf]; | ||
| 1505 | 1492 | ||
| 1506 | /* Send Error PC */ | 1493 | /* Send Error PC */ |
| 1507 | *ptr++ = hexchars[GDB_REG_PC >> 4]; | 1494 | ptr = pack_hex_byte(ptr, GDB_REG_PC); |
| 1508 | *ptr++ = hexchars[GDB_REG_PC & 0xf]; | ||
| 1509 | *ptr++ = ':'; | 1495 | *ptr++ = ':'; |
| 1510 | ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0); | 1496 | ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0); |
| 1511 | *ptr++ = ';'; | 1497 | *ptr++ = ';'; |
| @@ -1513,8 +1499,7 @@ void gdbstub(int sigval) | |||
| 1513 | /* | 1499 | /* |
| 1514 | * Send frame pointer | 1500 | * Send frame pointer |
| 1515 | */ | 1501 | */ |
| 1516 | *ptr++ = hexchars[GDB_REG_FP >> 4]; | 1502 | ptr = pack_hex_byte(ptr, GDB_REG_FP); |
| 1517 | *ptr++ = hexchars[GDB_REG_FP & 0xf]; | ||
| 1518 | *ptr++ = ':'; | 1503 | *ptr++ = ':'; |
| 1519 | ptr = mem2hex(&__debug_frame->fp, ptr, 4, 0); | 1504 | ptr = mem2hex(&__debug_frame->fp, ptr, 4, 0); |
| 1520 | *ptr++ = ';'; | 1505 | *ptr++ = ';'; |
| @@ -1522,8 +1507,7 @@ void gdbstub(int sigval) | |||
| 1522 | /* | 1507 | /* |
| 1523 | * Send stack pointer | 1508 | * Send stack pointer |
| 1524 | */ | 1509 | */ |
| 1525 | *ptr++ = hexchars[GDB_REG_SP >> 4]; | 1510 | ptr = pack_hex_byte(ptr, GDB_REG_SP); |
| 1526 | *ptr++ = hexchars[GDB_REG_SP & 0xf]; | ||
| 1527 | *ptr++ = ':'; | 1511 | *ptr++ = ':'; |
| 1528 | ptr = mem2hex(&__debug_frame->sp, ptr, 4, 0); | 1512 | ptr = mem2hex(&__debug_frame->sp, ptr, 4, 0); |
| 1529 | *ptr++ = ';'; | 1513 | *ptr++ = ';'; |
| @@ -1548,8 +1532,8 @@ void gdbstub(int sigval) | |||
| 1548 | /* request repeat of last signal number */ | 1532 | /* request repeat of last signal number */ |
| 1549 | case '?': | 1533 | case '?': |
| 1550 | output_buffer[0] = 'S'; | 1534 | output_buffer[0] = 'S'; |
| 1551 | output_buffer[1] = hexchars[sigval >> 4]; | 1535 | output_buffer[1] = hex_asc_hi(sigval); |
| 1552 | output_buffer[2] = hexchars[sigval & 0xf]; | 1536 | output_buffer[2] = hex_asc_lo(sigval); |
| 1553 | output_buffer[3] = 0; | 1537 | output_buffer[3] = 0; |
| 1554 | break; | 1538 | break; |
| 1555 | 1539 | ||
| @@ -2059,8 +2043,8 @@ void gdbstub_exit(int status) | |||
| 2059 | } | 2043 | } |
| 2060 | 2044 | ||
| 2061 | gdbstub_tx_char('#'); | 2045 | gdbstub_tx_char('#'); |
| 2062 | gdbstub_tx_char(hexchars[checksum >> 4]); | 2046 | gdbstub_tx_char(hex_asc_hi(checksum)); |
| 2063 | gdbstub_tx_char(hexchars[checksum & 0xf]); | 2047 | gdbstub_tx_char(hex_asc_lo(checksum)); |
| 2064 | 2048 | ||
| 2065 | /* make sure the output is flushed, or else RedBoot might clobber it */ | 2049 | /* make sure the output is flushed, or else RedBoot might clobber it */ |
| 2066 | gdbstub_tx_char('-'); | 2050 | gdbstub_tx_char('-'); |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index 73f3aeefd203..d1113c5031f5 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
| 17 | #include <linux/pm_legacy.h> | ||
| 18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
| 19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
| 20 | #include <linux/sysctl.h> | 19 | #include <linux/sysctl.h> |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 9af7740f32fb..1b851db34186 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
| @@ -63,37 +63,6 @@ EXPORT_SYMBOL(empty_zero_page); | |||
| 63 | 63 | ||
| 64 | /*****************************************************************************/ | 64 | /*****************************************************************************/ |
| 65 | /* | 65 | /* |
| 66 | * | ||
| 67 | */ | ||
| 68 | void show_mem(void) | ||
| 69 | { | ||
| 70 | unsigned long i; | ||
| 71 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 72 | |||
| 73 | printk("\nMem-info:\n"); | ||
| 74 | show_free_areas(); | ||
| 75 | i = max_mapnr; | ||
| 76 | while (i-- > 0) { | ||
| 77 | struct page *page = &mem_map[i]; | ||
| 78 | |||
| 79 | total++; | ||
| 80 | if (PageReserved(page)) | ||
| 81 | reserved++; | ||
| 82 | else if (!page_count(page)) | ||
| 83 | free++; | ||
| 84 | else | ||
| 85 | shared += page_count(page) - 1; | ||
| 86 | } | ||
| 87 | |||
| 88 | printk("%d pages of RAM\n",total); | ||
| 89 | printk("%d free pages\n",free); | ||
| 90 | printk("%d reserved pages\n",reserved); | ||
| 91 | printk("%d pages shared\n",shared); | ||
| 92 | |||
| 93 | } /* end show_mem() */ | ||
| 94 | |||
| 95 | /*****************************************************************************/ | ||
| 96 | /* | ||
| 97 | * paging_init() continues the virtual memory environment setup which | 66 | * paging_init() continues the virtual memory environment setup which |
| 98 | * was begun by the code in arch/head.S. | 67 | * was begun by the code in arch/head.S. |
| 99 | * The parameters are pointers to where to stick the starting and ending | 68 | * The parameters are pointers to where to stick the starting and ending |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 085dc6ec152b..396ab059efa3 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
| @@ -203,20 +203,6 @@ config UNIX98_PTYS | |||
| 203 | Read the instructions in <file:Documentation/Changes> pertaining to | 203 | Read the instructions in <file:Documentation/Changes> pertaining to |
| 204 | pseudo terminals. It's safe to say N. | 204 | pseudo terminals. It's safe to say N. |
| 205 | 205 | ||
| 206 | config UNIX98_PTY_COUNT | ||
| 207 | int "Maximum number of Unix98 PTYs in use (0-2048)" | ||
| 208 | depends on UNIX98_PTYS | ||
| 209 | default "256" | ||
| 210 | help | ||
| 211 | The maximum number of Unix98 PTYs that can be used at any one time. | ||
| 212 | The default is 256, and should be enough for desktop systems. Server | ||
| 213 | machines which support incoming telnet/rlogin/ssh connections and/or | ||
| 214 | serve several X terminals may want to increase this: every incoming | ||
| 215 | connection and every xterm uses up one PTY. | ||
| 216 | |||
| 217 | When not in use, each additional set of 256 PTYs occupy | ||
| 218 | approximately 8 KB of kernel memory on 32-bit architectures. | ||
| 219 | |||
| 220 | source "drivers/char/pcmcia/Kconfig" | 206 | source "drivers/char/pcmcia/Kconfig" |
| 221 | 207 | ||
| 222 | source "drivers/serial/Kconfig" | 208 | source "drivers/serial/Kconfig" |
diff --git a/arch/h8300/boot/compressed/misc.c b/arch/h8300/boot/compressed/misc.c index 845074588af0..51ab6cbd030f 100644 --- a/arch/h8300/boot/compressed/misc.c +++ b/arch/h8300/boot/compressed/misc.c | |||
| @@ -67,8 +67,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
| 67 | static int fill_inbuf(void); | 67 | static int fill_inbuf(void); |
| 68 | static void flush_window(void); | 68 | static void flush_window(void); |
| 69 | static void error(char *m); | 69 | static void error(char *m); |
| 70 | static void gzip_mark(void **); | ||
| 71 | static void gzip_release(void **); | ||
| 72 | 70 | ||
| 73 | extern char input_data[]; | 71 | extern char input_data[]; |
| 74 | extern int input_len; | 72 | extern int input_len; |
| @@ -77,11 +75,7 @@ static long bytes_out = 0; | |||
| 77 | static uch *output_data; | 75 | static uch *output_data; |
| 78 | static unsigned long output_ptr = 0; | 76 | static unsigned long output_ptr = 0; |
| 79 | 77 | ||
| 80 | static void *malloc(int size); | ||
| 81 | static void free(void *where); | ||
| 82 | static void error(char *m); | 78 | static void error(char *m); |
| 83 | static void gzip_mark(void **); | ||
| 84 | static void gzip_release(void **); | ||
| 85 | 79 | ||
| 86 | int puts(const char *); | 80 | int puts(const char *); |
| 87 | 81 | ||
| @@ -98,38 +92,6 @@ static unsigned long free_mem_end_ptr; | |||
| 98 | #define TDR *((volatile unsigned char *)0xffff8b) | 92 | #define TDR *((volatile unsigned char *)0xffff8b) |
| 99 | #define SSR *((volatile unsigned char *)0xffff8c) | 93 | #define SSR *((volatile unsigned char *)0xffff8c) |
| 100 | 94 | ||
| 101 | static void *malloc(int size) | ||
| 102 | { | ||
| 103 | void *p; | ||
| 104 | |||
| 105 | if (size <0) error("Malloc error"); | ||
| 106 | if (free_mem_ptr == 0) error("Memory error"); | ||
| 107 | |||
| 108 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 109 | |||
| 110 | p = (void *)free_mem_ptr; | ||
| 111 | free_mem_ptr += size; | ||
| 112 | |||
| 113 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 114 | error("Out of memory"); | ||
| 115 | |||
| 116 | return p; | ||
| 117 | } | ||
| 118 | |||
| 119 | static void free(void *where) | ||
| 120 | { /* Don't care */ | ||
| 121 | } | ||
| 122 | |||
| 123 | static void gzip_mark(void **ptr) | ||
| 124 | { | ||
| 125 | *ptr = (void *) free_mem_ptr; | ||
| 126 | } | ||
| 127 | |||
| 128 | static void gzip_release(void **ptr) | ||
| 129 | { | ||
| 130 | free_mem_ptr = (long) *ptr; | ||
| 131 | } | ||
| 132 | |||
| 133 | int puts(const char *s) | 95 | int puts(const char *s) |
| 134 | { | 96 | { |
| 135 | return 0; | 97 | return 0; |
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c index b1f25c20a5db..7fda657110eb 100644 --- a/arch/h8300/kernel/setup.c +++ b/arch/h8300/kernel/setup.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
| 21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/mm.h> | ||
| 23 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
| 24 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
| 25 | #include <linux/console.h> | 26 | #include <linux/console.h> |
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index e4f4199f97ab..a1d228f5e4e6 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c | |||
| @@ -64,33 +64,6 @@ unsigned long empty_zero_page; | |||
| 64 | 64 | ||
| 65 | extern unsigned long rom_length; | 65 | extern unsigned long rom_length; |
| 66 | 66 | ||
| 67 | void show_mem(void) | ||
| 68 | { | ||
| 69 | unsigned long i; | ||
| 70 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 71 | int cached = 0; | ||
| 72 | |||
| 73 | printk("\nMem-info:\n"); | ||
| 74 | show_free_areas(); | ||
| 75 | i = max_mapnr; | ||
| 76 | while (i-- > 0) { | ||
| 77 | total++; | ||
| 78 | if (PageReserved(mem_map+i)) | ||
| 79 | reserved++; | ||
| 80 | else if (PageSwapCache(mem_map+i)) | ||
| 81 | cached++; | ||
| 82 | else if (!page_count(mem_map+i)) | ||
| 83 | free++; | ||
| 84 | else | ||
| 85 | shared += page_count(mem_map+i) - 1; | ||
| 86 | } | ||
| 87 | printk("%d pages of RAM\n",total); | ||
| 88 | printk("%d free pages\n",free); | ||
| 89 | printk("%d reserved pages\n",reserved); | ||
| 90 | printk("%d pages shared\n",shared); | ||
| 91 | printk("%d pages swap cached\n",cached); | ||
| 92 | } | ||
| 93 | |||
| 94 | extern unsigned long memory_start; | 67 | extern unsigned long memory_start; |
| 95 | extern unsigned long memory_end; | 68 | extern unsigned long memory_end; |
| 96 | 69 | ||
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c index 1c44ec2a1d58..88b6e6f3fd88 100644 --- a/arch/ia64/hp/common/hwsw_iommu.c +++ b/arch/ia64/hp/common/hwsw_iommu.c | |||
| @@ -186,9 +186,10 @@ hwsw_dma_supported (struct device *dev, u64 mask) | |||
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | int | 188 | int |
| 189 | hwsw_dma_mapping_error (dma_addr_t dma_addr) | 189 | hwsw_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
| 190 | { | 190 | { |
| 191 | return hwiommu_dma_mapping_error (dma_addr) || swiotlb_dma_mapping_error(dma_addr); | 191 | return hwiommu_dma_mapping_error(dev, dma_addr) || |
| 192 | swiotlb_dma_mapping_error(dev, dma_addr); | ||
| 192 | } | 193 | } |
| 193 | 194 | ||
| 194 | EXPORT_SYMBOL(hwsw_dma_mapping_error); | 195 | EXPORT_SYMBOL(hwsw_dma_mapping_error); |
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 34421aed1e2a..4956be40d7b5 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c | |||
| @@ -2147,7 +2147,7 @@ sba_dma_supported (struct device *dev, u64 mask) | |||
| 2147 | } | 2147 | } |
| 2148 | 2148 | ||
| 2149 | int | 2149 | int |
| 2150 | sba_dma_mapping_error (dma_addr_t dma_addr) | 2150 | sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
| 2151 | { | 2151 | { |
| 2152 | return 0; | 2152 | return 0; |
| 2153 | } | 2153 | } |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 7e028ceb93ba..465116aecb85 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
| @@ -1139,7 +1139,7 @@ sys32_pipe (int __user *fd) | |||
| 1139 | int retval; | 1139 | int retval; |
| 1140 | int fds[2]; | 1140 | int fds[2]; |
| 1141 | 1141 | ||
| 1142 | retval = do_pipe(fds); | 1142 | retval = do_pipe_flags(fds, 0); |
| 1143 | if (retval) | 1143 | if (retval) |
| 1144 | goto out; | 1144 | goto out; |
| 1145 | if (copy_to_user(fd, fds, sizeof(fds))) | 1145 | if (copy_to_user(fd, fds, sizeof(fds))) |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 56ab156c48ae..0dd6c1419d8d 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
| @@ -1691,6 +1691,12 @@ sys_call_table: | |||
| 1691 | data8 sys_timerfd_create // 1310 | 1691 | data8 sys_timerfd_create // 1310 |
| 1692 | data8 sys_timerfd_settime | 1692 | data8 sys_timerfd_settime |
| 1693 | data8 sys_timerfd_gettime | 1693 | data8 sys_timerfd_gettime |
| 1694 | data8 sys_signalfd4 | ||
| 1695 | data8 sys_eventfd2 | ||
| 1696 | data8 sys_epoll_create1 // 1315 | ||
| 1697 | data8 sys_dup3 | ||
| 1698 | data8 sys_pipe2 | ||
| 1699 | data8 sys_inotify_init1 | ||
| 1694 | 1700 | ||
| 1695 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 1701 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
| 1696 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | 1702 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 233434f4f88f..f07688da947c 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
| @@ -429,8 +429,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 429 | ((struct fnptr *)kretprobe_trampoline)->ip; | 429 | ((struct fnptr *)kretprobe_trampoline)->ip; |
| 430 | 430 | ||
| 431 | INIT_HLIST_HEAD(&empty_rp); | 431 | INIT_HLIST_HEAD(&empty_rp); |
| 432 | spin_lock_irqsave(&kretprobe_lock, flags); | 432 | kretprobe_hash_lock(current, &head, &flags); |
| 433 | head = kretprobe_inst_table_head(current); | ||
| 434 | 433 | ||
| 435 | /* | 434 | /* |
| 436 | * It is possible to have multiple instances associated with a given | 435 | * It is possible to have multiple instances associated with a given |
| @@ -485,7 +484,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 485 | kretprobe_assert(ri, orig_ret_address, trampoline_address); | 484 | kretprobe_assert(ri, orig_ret_address, trampoline_address); |
| 486 | 485 | ||
| 487 | reset_current_kprobe(); | 486 | reset_current_kprobe(); |
| 488 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 487 | kretprobe_hash_unlock(current, &flags); |
| 489 | preempt_enable_no_resched(); | 488 | preempt_enable_no_resched(); |
| 490 | 489 | ||
| 491 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 490 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
| @@ -500,7 +499,6 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 500 | return 1; | 499 | return 1; |
| 501 | } | 500 | } |
| 502 | 501 | ||
| 503 | /* Called with kretprobe_lock held */ | ||
| 504 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 502 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 505 | struct pt_regs *regs) | 503 | struct pt_regs *regs) |
| 506 | { | 504 | { |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 19d4493c6193..fc8f3509df27 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
| @@ -2626,7 +2626,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task) | |||
| 2626 | /* | 2626 | /* |
| 2627 | * make sure the task is off any CPU | 2627 | * make sure the task is off any CPU |
| 2628 | */ | 2628 | */ |
| 2629 | wait_task_inactive(task); | 2629 | wait_task_inactive(task, 0); |
| 2630 | 2630 | ||
| 2631 | /* more to come... */ | 2631 | /* more to come... */ |
| 2632 | 2632 | ||
| @@ -4774,7 +4774,7 @@ recheck: | |||
| 4774 | 4774 | ||
| 4775 | UNPROTECT_CTX(ctx, flags); | 4775 | UNPROTECT_CTX(ctx, flags); |
| 4776 | 4776 | ||
| 4777 | wait_task_inactive(task); | 4777 | wait_task_inactive(task, 0); |
| 4778 | 4778 | ||
| 4779 | PROTECT_CTX(ctx, flags); | 4779 | PROTECT_CTX(ctx, flags); |
| 4780 | 4780 | ||
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 1eda194b9559..bcbb6d8792d3 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
| @@ -160,7 +160,7 @@ sys_pipe (void) | |||
| 160 | int fd[2]; | 160 | int fd[2]; |
| 161 | int retval; | 161 | int retval; |
| 162 | 162 | ||
| 163 | retval = do_pipe(fd); | 163 | retval = do_pipe_flags(fd, 0); |
| 164 | if (retval) | 164 | if (retval) |
| 165 | goto out; | 165 | goto out; |
| 166 | retval = fd[0]; | 166 | retval = fd[0]; |
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 544dc420c65e..d83125e1ed27 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
| @@ -36,7 +36,6 @@ struct early_node_data { | |||
| 36 | struct ia64_node_data *node_data; | 36 | struct ia64_node_data *node_data; |
| 37 | unsigned long pernode_addr; | 37 | unsigned long pernode_addr; |
| 38 | unsigned long pernode_size; | 38 | unsigned long pernode_size; |
| 39 | struct bootmem_data bootmem_data; | ||
| 40 | unsigned long num_physpages; | 39 | unsigned long num_physpages; |
| 41 | #ifdef CONFIG_ZONE_DMA | 40 | #ifdef CONFIG_ZONE_DMA |
| 42 | unsigned long num_dma_physpages; | 41 | unsigned long num_dma_physpages; |
| @@ -75,17 +74,17 @@ pg_data_t *pgdat_list[MAX_NUMNODES]; | |||
| 75 | static int __init build_node_maps(unsigned long start, unsigned long len, | 74 | static int __init build_node_maps(unsigned long start, unsigned long len, |
| 76 | int node) | 75 | int node) |
| 77 | { | 76 | { |
| 78 | unsigned long cstart, epfn, end = start + len; | 77 | unsigned long spfn, epfn, end = start + len; |
| 79 | struct bootmem_data *bdp = &mem_data[node].bootmem_data; | 78 | struct bootmem_data *bdp = &bootmem_node_data[node]; |
| 80 | 79 | ||
| 81 | epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; | 80 | epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; |
| 82 | cstart = GRANULEROUNDDOWN(start); | 81 | spfn = GRANULEROUNDDOWN(start) >> PAGE_SHIFT; |
| 83 | 82 | ||
| 84 | if (!bdp->node_low_pfn) { | 83 | if (!bdp->node_low_pfn) { |
| 85 | bdp->node_boot_start = cstart; | 84 | bdp->node_min_pfn = spfn; |
| 86 | bdp->node_low_pfn = epfn; | 85 | bdp->node_low_pfn = epfn; |
| 87 | } else { | 86 | } else { |
| 88 | bdp->node_boot_start = min(cstart, bdp->node_boot_start); | 87 | bdp->node_min_pfn = min(spfn, bdp->node_min_pfn); |
| 89 | bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); | 88 | bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); |
| 90 | } | 89 | } |
| 91 | 90 | ||
| @@ -167,7 +166,7 @@ static void __init fill_pernode(int node, unsigned long pernode, | |||
| 167 | { | 166 | { |
| 168 | void *cpu_data; | 167 | void *cpu_data; |
| 169 | int cpus = early_nr_cpus_node(node); | 168 | int cpus = early_nr_cpus_node(node); |
| 170 | struct bootmem_data *bdp = &mem_data[node].bootmem_data; | 169 | struct bootmem_data *bdp = &bootmem_node_data[node]; |
| 171 | 170 | ||
| 172 | mem_data[node].pernode_addr = pernode; | 171 | mem_data[node].pernode_addr = pernode; |
| 173 | mem_data[node].pernode_size = pernodesize; | 172 | mem_data[node].pernode_size = pernodesize; |
| @@ -222,20 +221,21 @@ static void __init fill_pernode(int node, unsigned long pernode, | |||
| 222 | static int __init find_pernode_space(unsigned long start, unsigned long len, | 221 | static int __init find_pernode_space(unsigned long start, unsigned long len, |
| 223 | int node) | 222 | int node) |
| 224 | { | 223 | { |
| 225 | unsigned long epfn; | 224 | unsigned long spfn, epfn; |
| 226 | unsigned long pernodesize = 0, pernode, pages, mapsize; | 225 | unsigned long pernodesize = 0, pernode, pages, mapsize; |
| 227 | struct bootmem_data *bdp = &mem_data[node].bootmem_data; | 226 | struct bootmem_data *bdp = &bootmem_node_data[node]; |
| 228 | 227 | ||
| 228 | spfn = start >> PAGE_SHIFT; | ||
| 229 | epfn = (start + len) >> PAGE_SHIFT; | 229 | epfn = (start + len) >> PAGE_SHIFT; |
| 230 | 230 | ||
| 231 | pages = bdp->node_low_pfn - (bdp->node_boot_start >> PAGE_SHIFT); | 231 | pages = bdp->node_low_pfn - bdp->node_min_pfn; |
| 232 | mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT; | 232 | mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT; |
| 233 | 233 | ||
| 234 | /* | 234 | /* |
| 235 | * Make sure this memory falls within this node's usable memory | 235 | * Make sure this memory falls within this node's usable memory |
| 236 | * since we may have thrown some away in build_maps(). | 236 | * since we may have thrown some away in build_maps(). |
| 237 | */ | 237 | */ |
| 238 | if (start < bdp->node_boot_start || epfn > bdp->node_low_pfn) | 238 | if (spfn < bdp->node_min_pfn || epfn > bdp->node_low_pfn) |
| 239 | return 0; | 239 | return 0; |
| 240 | 240 | ||
| 241 | /* Don't setup this node's local space twice... */ | 241 | /* Don't setup this node's local space twice... */ |
| @@ -297,7 +297,7 @@ static void __init reserve_pernode_space(void) | |||
| 297 | bdp = pdp->bdata; | 297 | bdp = pdp->bdata; |
| 298 | 298 | ||
| 299 | /* First the bootmem_map itself */ | 299 | /* First the bootmem_map itself */ |
| 300 | pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT); | 300 | pages = bdp->node_low_pfn - bdp->node_min_pfn; |
| 301 | size = bootmem_bootmap_pages(pages) << PAGE_SHIFT; | 301 | size = bootmem_bootmap_pages(pages) << PAGE_SHIFT; |
| 302 | base = __pa(bdp->node_bootmem_map); | 302 | base = __pa(bdp->node_bootmem_map); |
| 303 | reserve_bootmem_node(pdp, base, size, BOOTMEM_DEFAULT); | 303 | reserve_bootmem_node(pdp, base, size, BOOTMEM_DEFAULT); |
| @@ -440,7 +440,7 @@ void __init find_memory(void) | |||
| 440 | efi_memmap_walk(find_max_min_low_pfn, NULL); | 440 | efi_memmap_walk(find_max_min_low_pfn, NULL); |
| 441 | 441 | ||
| 442 | for_each_online_node(node) | 442 | for_each_online_node(node) |
| 443 | if (mem_data[node].bootmem_data.node_low_pfn) { | 443 | if (bootmem_node_data[node].node_low_pfn) { |
| 444 | node_clear(node, memory_less_mask); | 444 | node_clear(node, memory_less_mask); |
| 445 | mem_data[node].min_pfn = ~0UL; | 445 | mem_data[node].min_pfn = ~0UL; |
| 446 | } | 446 | } |
| @@ -460,14 +460,14 @@ void __init find_memory(void) | |||
| 460 | else if (node_isset(node, memory_less_mask)) | 460 | else if (node_isset(node, memory_less_mask)) |
| 461 | continue; | 461 | continue; |
| 462 | 462 | ||
| 463 | bdp = &mem_data[node].bootmem_data; | 463 | bdp = &bootmem_node_data[node]; |
| 464 | pernode = mem_data[node].pernode_addr; | 464 | pernode = mem_data[node].pernode_addr; |
| 465 | pernodesize = mem_data[node].pernode_size; | 465 | pernodesize = mem_data[node].pernode_size; |
| 466 | map = pernode + pernodesize; | 466 | map = pernode + pernodesize; |
| 467 | 467 | ||
| 468 | init_bootmem_node(pgdat_list[node], | 468 | init_bootmem_node(pgdat_list[node], |
| 469 | map>>PAGE_SHIFT, | 469 | map>>PAGE_SHIFT, |
| 470 | bdp->node_boot_start>>PAGE_SHIFT, | 470 | bdp->node_min_pfn, |
| 471 | bdp->node_low_pfn); | 471 | bdp->node_low_pfn); |
| 472 | } | 472 | } |
| 473 | 473 | ||
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index d3ce8f3bcaa6..c45fc7f5a979 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; | 24 | unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; |
| 25 | 25 | ||
| 26 | pte_t * | 26 | pte_t * |
| 27 | huge_pte_alloc (struct mm_struct *mm, unsigned long addr) | 27 | huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz) |
| 28 | { | 28 | { |
| 29 | unsigned long taddr = htlbpage_to_page(addr); | 29 | unsigned long taddr = htlbpage_to_page(addr); |
| 30 | pgd_t *pgd; | 30 | pgd_t *pgd; |
| @@ -75,7 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
| 75 | * Don't actually need to do any preparation, but need to make sure | 75 | * Don't actually need to do any preparation, but need to make sure |
| 76 | * the address is in the right region. | 76 | * the address is in the right region. |
| 77 | */ | 77 | */ |
| 78 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 78 | int prepare_hugepage_range(struct file *file, |
| 79 | unsigned long addr, unsigned long len) | ||
| 79 | { | 80 | { |
| 80 | if (len & ~HPAGE_MASK) | 81 | if (len & ~HPAGE_MASK) |
| 81 | return -EINVAL; | 82 | return -EINVAL; |
| @@ -106,13 +107,19 @@ int pmd_huge(pmd_t pmd) | |||
| 106 | { | 107 | { |
| 107 | return 0; | 108 | return 0; |
| 108 | } | 109 | } |
| 110 | |||
| 111 | int pud_huge(pud_t pud) | ||
| 112 | { | ||
| 113 | return 0; | ||
| 114 | } | ||
| 115 | |||
| 109 | struct page * | 116 | struct page * |
| 110 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) | 117 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) |
| 111 | { | 118 | { |
| 112 | return NULL; | 119 | return NULL; |
| 113 | } | 120 | } |
| 114 | 121 | ||
| 115 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, | 122 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, |
| 116 | unsigned long addr, unsigned long end, | 123 | unsigned long addr, unsigned long end, |
| 117 | unsigned long floor, unsigned long ceiling) | 124 | unsigned long floor, unsigned long ceiling) |
| 118 | { | 125 | { |
| @@ -149,7 +156,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u | |||
| 149 | 156 | ||
| 150 | /* Handle MAP_FIXED */ | 157 | /* Handle MAP_FIXED */ |
| 151 | if (flags & MAP_FIXED) { | 158 | if (flags & MAP_FIXED) { |
| 152 | if (prepare_hugepage_range(addr, len)) | 159 | if (prepare_hugepage_range(file, addr, len)) |
| 153 | return -EINVAL; | 160 | return -EINVAL; |
| 154 | return addr; | 161 | return addr; |
| 155 | } | 162 | } |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 52175af299a0..53ebb6484495 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
| @@ -350,7 +350,7 @@ void sn_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
| 350 | } | 350 | } |
| 351 | EXPORT_SYMBOL(sn_dma_sync_sg_for_device); | 351 | EXPORT_SYMBOL(sn_dma_sync_sg_for_device); |
| 352 | 352 | ||
| 353 | int sn_dma_mapping_error(dma_addr_t dma_addr) | 353 | int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
| 354 | { | 354 | { |
| 355 | return 0; | 355 | return 0; |
| 356 | } | 356 | } |
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 600d40e33495..d394292498c0 100644 --- a/arch/m32r/boot/compressed/misc.c +++ b/arch/m32r/boot/compressed/misc.c | |||
| @@ -70,8 +70,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
| 70 | static int fill_inbuf(void); | 70 | static int fill_inbuf(void); |
| 71 | static void flush_window(void); | 71 | static void flush_window(void); |
| 72 | static void error(char *m); | 72 | static void error(char *m); |
| 73 | static void gzip_mark(void **); | ||
| 74 | static void gzip_release(void **); | ||
| 75 | 73 | ||
| 76 | static unsigned char *input_data; | 74 | static unsigned char *input_data; |
| 77 | static int input_len; | 75 | static int input_len; |
| @@ -82,9 +80,6 @@ static unsigned long output_ptr = 0; | |||
| 82 | 80 | ||
| 83 | #include "m32r_sio.c" | 81 | #include "m32r_sio.c" |
| 84 | 82 | ||
| 85 | static void *malloc(int size); | ||
| 86 | static void free(void *where); | ||
| 87 | |||
| 88 | static unsigned long free_mem_ptr; | 83 | static unsigned long free_mem_ptr; |
| 89 | static unsigned long free_mem_end_ptr; | 84 | static unsigned long free_mem_end_ptr; |
| 90 | 85 | ||
| @@ -92,38 +87,6 @@ static unsigned long free_mem_end_ptr; | |||
| 92 | 87 | ||
| 93 | #include "../../../../lib/inflate.c" | 88 | #include "../../../../lib/inflate.c" |
| 94 | 89 | ||
| 95 | static void *malloc(int size) | ||
| 96 | { | ||
| 97 | void *p; | ||
| 98 | |||
| 99 | if (size <0) error("Malloc error"); | ||
| 100 | if (free_mem_ptr == 0) error("Memory error"); | ||
| 101 | |||
| 102 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 103 | |||
| 104 | p = (void *)free_mem_ptr; | ||
| 105 | free_mem_ptr += size; | ||
| 106 | |||
| 107 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 108 | error("Out of memory"); | ||
| 109 | |||
| 110 | return p; | ||
| 111 | } | ||
| 112 | |||
| 113 | static void free(void *where) | ||
| 114 | { /* Don't care */ | ||
| 115 | } | ||
| 116 | |||
| 117 | static void gzip_mark(void **ptr) | ||
| 118 | { | ||
| 119 | *ptr = (void *) free_mem_ptr; | ||
| 120 | } | ||
| 121 | |||
| 122 | static void gzip_release(void **ptr) | ||
| 123 | { | ||
| 124 | free_mem_ptr = (long) *ptr; | ||
| 125 | } | ||
| 126 | |||
| 127 | void* memset(void* s, int c, size_t n) | 90 | void* memset(void* s, int c, size_t n) |
| 128 | { | 91 | { |
| 129 | int i; | 92 | int i; |
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index 07c1af7dc0e2..cbc3c4c54566 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c | |||
| @@ -20,7 +20,6 @@ extern char _end[]; | |||
| 20 | 20 | ||
| 21 | struct pglist_data *node_data[MAX_NUMNODES]; | 21 | struct pglist_data *node_data[MAX_NUMNODES]; |
| 22 | EXPORT_SYMBOL(node_data); | 22 | EXPORT_SYMBOL(node_data); |
| 23 | static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata; | ||
| 24 | 23 | ||
| 25 | pg_data_t m32r_node_data[MAX_NUMNODES]; | 24 | pg_data_t m32r_node_data[MAX_NUMNODES]; |
| 26 | 25 | ||
| @@ -81,7 +80,7 @@ unsigned long __init setup_memory(void) | |||
| 81 | for_each_online_node(nid) { | 80 | for_each_online_node(nid) { |
| 82 | mp = &mem_prof[nid]; | 81 | mp = &mem_prof[nid]; |
| 83 | NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; | 82 | NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; |
| 84 | NODE_DATA(nid)->bdata = &node_bdata[nid]; | 83 | NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; |
| 85 | min_pfn = mp->start_pfn; | 84 | min_pfn = mp->start_pfn; |
| 86 | max_pfn = mp->start_pfn + mp->pages; | 85 | max_pfn = mp->start_pfn + mp->pages; |
| 87 | bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, | 86 | bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, |
| @@ -124,8 +123,7 @@ unsigned long __init setup_memory(void) | |||
| 124 | return max_low_pfn; | 123 | return max_low_pfn; |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 127 | #define START_PFN(nid) \ | 126 | #define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn) |
| 128 | (NODE_DATA(nid)->bdata->node_boot_start >> PAGE_SHIFT) | ||
| 129 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) | 127 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) |
| 130 | 128 | ||
| 131 | unsigned long __init zone_sizes_init(void) | 129 | unsigned long __init zone_sizes_init(void) |
| @@ -148,8 +146,7 @@ unsigned long __init zone_sizes_init(void) | |||
| 148 | zholes_size[ZONE_DMA] = mp->holes; | 146 | zholes_size[ZONE_DMA] = mp->holes; |
| 149 | holes += zholes_size[ZONE_DMA]; | 147 | holes += zholes_size[ZONE_DMA]; |
| 150 | 148 | ||
| 151 | free_area_init_node(nid, NODE_DATA(nid), zones_size, | 149 | free_area_init_node(nid, zones_size, start_pfn, zholes_size); |
| 152 | start_pfn, zholes_size); | ||
| 153 | } | 150 | } |
| 154 | 151 | ||
| 155 | /* | 152 | /* |
| @@ -163,4 +160,3 @@ unsigned long __init zone_sizes_init(void) | |||
| 163 | 160 | ||
| 164 | return holes; | 161 | return holes; |
| 165 | } | 162 | } |
| 166 | |||
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c index bbd97c85bc5d..24d429f9358a 100644 --- a/arch/m32r/mm/init.c +++ b/arch/m32r/mm/init.c | |||
| @@ -36,42 +36,6 @@ pgd_t swapper_pg_dir[1024]; | |||
| 36 | 36 | ||
| 37 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 37 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
| 38 | 38 | ||
| 39 | void show_mem(void) | ||
| 40 | { | ||
| 41 | int total = 0, reserved = 0; | ||
| 42 | int shared = 0, cached = 0; | ||
| 43 | int highmem = 0; | ||
| 44 | struct page *page; | ||
| 45 | pg_data_t *pgdat; | ||
| 46 | unsigned long i; | ||
| 47 | |||
| 48 | printk("Mem-info:\n"); | ||
| 49 | show_free_areas(); | ||
| 50 | printk("Free swap: %6ldkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 51 | for_each_online_pgdat(pgdat) { | ||
| 52 | unsigned long flags; | ||
| 53 | pgdat_resize_lock(pgdat, &flags); | ||
| 54 | for (i = 0; i < pgdat->node_spanned_pages; ++i) { | ||
| 55 | page = pgdat_page_nr(pgdat, i); | ||
| 56 | total++; | ||
| 57 | if (PageHighMem(page)) | ||
| 58 | highmem++; | ||
| 59 | if (PageReserved(page)) | ||
| 60 | reserved++; | ||
| 61 | else if (PageSwapCache(page)) | ||
| 62 | cached++; | ||
| 63 | else if (page_count(page)) | ||
| 64 | shared += page_count(page) - 1; | ||
| 65 | } | ||
| 66 | pgdat_resize_unlock(pgdat, &flags); | ||
| 67 | } | ||
| 68 | printk("%d pages of RAM\n", total); | ||
| 69 | printk("%d pages of HIGHMEM\n",highmem); | ||
| 70 | printk("%d reserved pages\n",reserved); | ||
| 71 | printk("%d pages shared\n",shared); | ||
| 72 | printk("%d pages swap cached\n",cached); | ||
| 73 | } | ||
| 74 | |||
| 75 | /* | 39 | /* |
| 76 | * Cache of MMU context last used. | 40 | * Cache of MMU context last used. |
| 77 | */ | 41 | */ |
| @@ -93,8 +57,7 @@ void free_initrd_mem(unsigned long, unsigned long); | |||
| 93 | #endif | 57 | #endif |
| 94 | 58 | ||
| 95 | /* It'd be good if these lines were in the standard header file. */ | 59 | /* It'd be good if these lines were in the standard header file. */ |
| 96 | #define START_PFN(nid) \ | 60 | #define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn) |
| 97 | (NODE_DATA(nid)->bdata->node_boot_start >> PAGE_SHIFT) | ||
| 98 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) | 61 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) |
| 99 | 62 | ||
| 100 | #ifndef CONFIG_DISCONTIGMEM | 63 | #ifndef CONFIG_DISCONTIGMEM |
| @@ -123,7 +86,7 @@ unsigned long __init zone_sizes_init(void) | |||
| 123 | start_pfn = __MEMORY_START >> PAGE_SHIFT; | 86 | start_pfn = __MEMORY_START >> PAGE_SHIFT; |
| 124 | #endif /* CONFIG_MMU */ | 87 | #endif /* CONFIG_MMU */ |
| 125 | 88 | ||
| 126 | free_area_init_node(0, NODE_DATA(0), zones_size, start_pfn, 0); | 89 | free_area_init_node(0, zones_size, start_pfn, 0); |
| 127 | 90 | ||
| 128 | return 0; | 91 | return 0; |
| 129 | } | 92 | } |
| @@ -252,4 +215,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
| 252 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 215 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
| 253 | } | 216 | } |
| 254 | #endif | 217 | #endif |
| 255 | |||
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c index cbe36538af47..61df1d33c050 100644 --- a/arch/m68k/amiga/chipram.c +++ b/arch/m68k/amiga/chipram.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
| 11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
| 12 | #include <linux/mm.h> | ||
| 12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 13 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
| 14 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index d8fb9c5303cc..81bb08ceec18 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
| @@ -32,8 +32,6 @@ | |||
| 32 | 32 | ||
| 33 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 33 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
| 34 | 34 | ||
| 35 | static bootmem_data_t __initdata bootmem_data[MAX_NUMNODES]; | ||
| 36 | |||
| 37 | pg_data_t pg_data_map[MAX_NUMNODES]; | 35 | pg_data_t pg_data_map[MAX_NUMNODES]; |
| 38 | EXPORT_SYMBOL(pg_data_map); | 36 | EXPORT_SYMBOL(pg_data_map); |
| 39 | 37 | ||
| @@ -58,7 +56,7 @@ void __init m68k_setup_node(int node) | |||
| 58 | pg_data_table[i] = pg_data_map + node; | 56 | pg_data_table[i] = pg_data_map + node; |
| 59 | } | 57 | } |
| 60 | #endif | 58 | #endif |
| 61 | pg_data_map[node].bdata = bootmem_data + node; | 59 | pg_data_map[node].bdata = bootmem_node_data + node; |
| 62 | node_set_online(node); | 60 | node_set_online(node); |
| 63 | } | 61 | } |
| 64 | 62 | ||
| @@ -71,36 +69,6 @@ void __init m68k_setup_node(int node) | |||
| 71 | void *empty_zero_page; | 69 | void *empty_zero_page; |
| 72 | EXPORT_SYMBOL(empty_zero_page); | 70 | EXPORT_SYMBOL(empty_zero_page); |
| 73 | 71 | ||
| 74 | void show_mem(void) | ||
| 75 | { | ||
| 76 | pg_data_t *pgdat; | ||
| 77 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 78 | int cached = 0; | ||
| 79 | int i; | ||
| 80 | |||
| 81 | printk("\nMem-info:\n"); | ||
| 82 | show_free_areas(); | ||
| 83 | for_each_online_pgdat(pgdat) { | ||
| 84 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
| 85 | struct page *page = pgdat->node_mem_map + i; | ||
| 86 | total++; | ||
| 87 | if (PageReserved(page)) | ||
| 88 | reserved++; | ||
| 89 | else if (PageSwapCache(page)) | ||
| 90 | cached++; | ||
| 91 | else if (!page_count(page)) | ||
| 92 | free++; | ||
| 93 | else | ||
| 94 | shared += page_count(page) - 1; | ||
| 95 | } | ||
| 96 | } | ||
| 97 | printk("%d pages of RAM\n",total); | ||
| 98 | printk("%d free pages\n",free); | ||
| 99 | printk("%d reserved pages\n",reserved); | ||
| 100 | printk("%d pages shared\n",shared); | ||
| 101 | printk("%d pages swap cached\n",cached); | ||
| 102 | } | ||
| 103 | |||
| 104 | extern void init_pointer_table(unsigned long ptable); | 72 | extern void init_pointer_table(unsigned long ptable); |
| 105 | 73 | ||
| 106 | /* References to section boundaries */ | 74 | /* References to section boundaries */ |
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 226795bdf355..c5dbb9bdb322 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c | |||
| @@ -296,7 +296,7 @@ void __init paging_init(void) | |||
| 296 | #endif | 296 | #endif |
| 297 | for (i = 0; i < m68k_num_memory; i++) { | 297 | for (i = 0; i < m68k_num_memory; i++) { |
| 298 | zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT; | 298 | zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT; |
| 299 | free_area_init_node(i, pg_data_map + i, zones_size, | 299 | free_area_init_node(i, zones_size, |
| 300 | m68k_memory[i].addr >> PAGE_SHIFT, NULL); | 300 | m68k_memory[i].addr >> PAGE_SHIFT, NULL); |
| 301 | } | 301 | } |
| 302 | } | 302 | } |
diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c index edceefc18870..1b902dbd4376 100644 --- a/arch/m68k/mm/sun3mmu.c +++ b/arch/m68k/mm/sun3mmu.c | |||
| @@ -94,7 +94,7 @@ void __init paging_init(void) | |||
| 94 | 94 | ||
| 95 | /* I really wish I knew why the following change made things better... -- Sam */ | 95 | /* I really wish I knew why the following change made things better... -- Sam */ |
| 96 | /* free_area_init(zones_size); */ | 96 | /* free_area_init(zones_size); */ |
| 97 | free_area_init_node(0, NODE_DATA(0), zones_size, | 97 | free_area_init_node(0, zones_size, |
| 98 | (__pa(PAGE_OFFSET) >> PAGE_SHIFT) + 1, NULL); | 98 | (__pa(PAGE_OFFSET) >> PAGE_SHIFT) + 1, NULL); |
| 99 | 99 | ||
| 100 | 100 | ||
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index 8e8441587c22..2e7515e8db98 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
| @@ -58,10 +58,18 @@ config GENERIC_TIME | |||
| 58 | bool | 58 | bool |
| 59 | default y | 59 | default y |
| 60 | 60 | ||
| 61 | config GENERIC_CMOS_UPDATE | ||
| 62 | bool | ||
| 63 | default y | ||
| 64 | |||
| 61 | config TIME_LOW_RES | 65 | config TIME_LOW_RES |
| 62 | bool | 66 | bool |
| 63 | default y | 67 | default y |
| 64 | 68 | ||
| 69 | config GENERIC_CLOCKEVENTS | ||
| 70 | bool | ||
| 71 | default n | ||
| 72 | |||
| 65 | config NO_IOPORT | 73 | config NO_IOPORT |
| 66 | def_bool y | 74 | def_bool y |
| 67 | 75 | ||
| @@ -108,11 +116,13 @@ config M5206e | |||
| 108 | 116 | ||
| 109 | config M520x | 117 | config M520x |
| 110 | bool "MCF520x" | 118 | bool "MCF520x" |
| 119 | select GENERIC_CLOCKEVENTS | ||
| 111 | help | 120 | help |
| 112 | Freescale Coldfire 5207/5208 processor support. | 121 | Freescale Coldfire 5207/5208 processor support. |
| 113 | 122 | ||
| 114 | config M523x | 123 | config M523x |
| 115 | bool "MCF523x" | 124 | bool "MCF523x" |
| 125 | select GENERIC_CLOCKEVENTS | ||
| 116 | help | 126 | help |
| 117 | Freescale Coldfire 5230/1/2/4/5 processor support | 127 | Freescale Coldfire 5230/1/2/4/5 processor support |
| 118 | 128 | ||
| @@ -138,6 +148,7 @@ config M5275 | |||
| 138 | 148 | ||
| 139 | config M528x | 149 | config M528x |
| 140 | bool "MCF528x" | 150 | bool "MCF528x" |
| 151 | select GENERIC_CLOCKEVENTS | ||
| 141 | help | 152 | help |
| 142 | Motorola ColdFire 5280/5282 processor support. | 153 | Motorola ColdFire 5280/5282 processor support. |
| 143 | 154 | ||
| @@ -161,6 +172,7 @@ endchoice | |||
| 161 | config M527x | 172 | config M527x |
| 162 | bool | 173 | bool |
| 163 | depends on (M5271 || M5275) | 174 | depends on (M5271 || M5275) |
| 175 | select GENERIC_CLOCKEVENTS | ||
| 164 | default y | 176 | default y |
| 165 | 177 | ||
| 166 | config COLDFIRE | 178 | config COLDFIRE |
| @@ -674,6 +686,9 @@ endchoice | |||
| 674 | if COLDFIRE | 686 | if COLDFIRE |
| 675 | source "kernel/Kconfig.preempt" | 687 | source "kernel/Kconfig.preempt" |
| 676 | endif | 688 | endif |
| 689 | |||
| 690 | source "kernel/time/Kconfig" | ||
| 691 | |||
| 677 | source "mm/Kconfig" | 692 | source "mm/Kconfig" |
| 678 | 693 | ||
| 679 | endmenu | 694 | endmenu |
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index e0b5f62e395c..b63bbcf874ff 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | # (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com> | 8 | # (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com> |
| 9 | # | 9 | # |
| 10 | 10 | ||
| 11 | KBUILD_DEFCONFIG := m5208evb_defconfig | ||
| 12 | |||
| 11 | platform-$(CONFIG_M68328) := 68328 | 13 | platform-$(CONFIG_M68328) := 68328 |
| 12 | platform-$(CONFIG_M68EZ328) := 68EZ328 | 14 | platform-$(CONFIG_M68EZ328) := 68EZ328 |
| 13 | platform-$(CONFIG_M68VZ328) := 68VZ328 | 15 | platform-$(CONFIG_M68VZ328) := 68VZ328 |
| @@ -90,13 +92,14 @@ export PLATFORM BOARD MODEL CPUCLASS | |||
| 90 | cflags-$(CONFIG_M5206) := -m5200 | 92 | cflags-$(CONFIG_M5206) := -m5200 |
| 91 | cflags-$(CONFIG_M5206e) := -m5200 | 93 | cflags-$(CONFIG_M5206e) := -m5200 |
| 92 | cflags-$(CONFIG_M520x) := -m5307 | 94 | cflags-$(CONFIG_M520x) := -m5307 |
| 93 | cflags-$(CONFIG_M523x) := -m5307 | 95 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) |
| 94 | cflags-$(CONFIG_M5249) := -m5200 | 96 | cflags-$(CONFIG_M5249) := -m5200 |
| 95 | cflags-$(CONFIG_M527x) := -m5307 | 97 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) |
| 96 | cflags-$(CONFIG_M5272) := -m5307 | 98 | cflags-$(CONFIG_M5272) := -m5307 |
| 97 | cflags-$(CONFIG_M528x) := -m5307 | 99 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) |
| 100 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) | ||
| 98 | cflags-$(CONFIG_M5307) := -m5307 | 101 | cflags-$(CONFIG_M5307) := -m5307 |
| 99 | cflags-$(CONFIG_M532x) := -m5307 | 102 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) |
| 100 | cflags-$(CONFIG_M5407) := -m5200 | 103 | cflags-$(CONFIG_M5407) := -m5200 |
| 101 | cflags-$(CONFIG_M68328) := -m68000 | 104 | cflags-$(CONFIG_M68328) := -m68000 |
| 102 | cflags-$(CONFIG_M68EZ328) := -m68000 | 105 | cflags-$(CONFIG_M68EZ328) := -m68000 |
diff --git a/arch/m68knommu/configs/m5208evb_defconfig b/arch/m68knommu/configs/m5208evb_defconfig new file mode 100644 index 000000000000..6fae33a05e2a --- /dev/null +++ b/arch/m68knommu/configs/m5208evb_defconfig | |||
| @@ -0,0 +1,610 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.26-rc1 | ||
| 4 | # | ||
| 5 | CONFIG_M68K=y | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_FPU is not set | ||
| 8 | CONFIG_ZONE_DMA=y | ||
| 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 10 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 11 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 12 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 14 | CONFIG_GENERIC_HWEIGHT=y | ||
| 15 | CONFIG_GENERIC_HARDIRQS=y | ||
| 16 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 17 | CONFIG_GENERIC_TIME=y | ||
| 18 | CONFIG_TIME_LOW_RES=y | ||
| 19 | CONFIG_NO_IOPORT=y | ||
| 20 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
| 21 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 22 | |||
| 23 | # | ||
| 24 | # General setup | ||
| 25 | # | ||
| 26 | CONFIG_EXPERIMENTAL=y | ||
| 27 | CONFIG_BROKEN_ON_SMP=y | ||
| 28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 29 | CONFIG_LOCALVERSION="" | ||
| 30 | CONFIG_LOCALVERSION_AUTO=y | ||
| 31 | # CONFIG_SYSVIPC is not set | ||
| 32 | # CONFIG_POSIX_MQUEUE is not set | ||
| 33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 34 | # CONFIG_TASKSTATS is not set | ||
| 35 | # CONFIG_AUDIT is not set | ||
| 36 | # CONFIG_IKCONFIG is not set | ||
| 37 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 38 | # CONFIG_CGROUPS is not set | ||
| 39 | # CONFIG_GROUP_SCHED is not set | ||
| 40 | # CONFIG_RELAY is not set | ||
| 41 | # CONFIG_NAMESPACES is not set | ||
| 42 | # CONFIG_BLK_DEV_INITRD is not set | ||
| 43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 44 | CONFIG_SYSCTL=y | ||
| 45 | CONFIG_EMBEDDED=y | ||
| 46 | # CONFIG_UID16 is not set | ||
| 47 | # CONFIG_SYSCTL_SYSCALL is not set | ||
| 48 | # CONFIG_KALLSYMS is not set | ||
| 49 | # CONFIG_HOTPLUG is not set | ||
| 50 | CONFIG_PRINTK=y | ||
| 51 | CONFIG_BUG=y | ||
| 52 | CONFIG_ELF_CORE=y | ||
| 53 | # CONFIG_COMPAT_BRK is not set | ||
| 54 | CONFIG_BASE_FULL=y | ||
| 55 | # CONFIG_FUTEX is not set | ||
| 56 | # CONFIG_EPOLL is not set | ||
| 57 | # CONFIG_SIGNALFD is not set | ||
| 58 | # CONFIG_TIMERFD is not set | ||
| 59 | # CONFIG_EVENTFD is not set | ||
| 60 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
| 61 | CONFIG_SLAB=y | ||
| 62 | # CONFIG_SLUB is not set | ||
| 63 | # CONFIG_SLOB is not set | ||
| 64 | # CONFIG_PROFILING is not set | ||
| 65 | # CONFIG_MARKERS is not set | ||
| 66 | # CONFIG_HAVE_OPROFILE is not set | ||
| 67 | # CONFIG_HAVE_KPROBES is not set | ||
| 68 | # CONFIG_HAVE_KRETPROBES is not set | ||
| 69 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
| 70 | CONFIG_SLABINFO=y | ||
| 71 | CONFIG_TINY_SHMEM=y | ||
| 72 | CONFIG_BASE_SMALL=0 | ||
| 73 | CONFIG_MODULES=y | ||
| 74 | CONFIG_MODULE_UNLOAD=y | ||
| 75 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 76 | # CONFIG_MODVERSIONS is not set | ||
| 77 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 78 | # CONFIG_KMOD is not set | ||
| 79 | CONFIG_BLOCK=y | ||
| 80 | # CONFIG_LBD is not set | ||
| 81 | # CONFIG_LSF is not set | ||
| 82 | # CONFIG_BLK_DEV_BSG is not set | ||
| 83 | |||
| 84 | # | ||
| 85 | # IO Schedulers | ||
| 86 | # | ||
| 87 | CONFIG_IOSCHED_NOOP=y | ||
| 88 | # CONFIG_IOSCHED_AS is not set | ||
| 89 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 90 | # CONFIG_IOSCHED_CFQ is not set | ||
| 91 | # CONFIG_DEFAULT_AS is not set | ||
| 92 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 93 | # CONFIG_DEFAULT_CFQ is not set | ||
| 94 | CONFIG_DEFAULT_NOOP=y | ||
| 95 | CONFIG_DEFAULT_IOSCHED="noop" | ||
| 96 | CONFIG_CLASSIC_RCU=y | ||
| 97 | |||
| 98 | # | ||
| 99 | # Processor type and features | ||
| 100 | # | ||
| 101 | # CONFIG_M68328 is not set | ||
| 102 | # CONFIG_M68EZ328 is not set | ||
| 103 | # CONFIG_M68VZ328 is not set | ||
| 104 | # CONFIG_M68360 is not set | ||
| 105 | # CONFIG_M5206 is not set | ||
| 106 | # CONFIG_M5206e is not set | ||
| 107 | CONFIG_M520x=y | ||
| 108 | # CONFIG_M523x is not set | ||
| 109 | # CONFIG_M5249 is not set | ||
| 110 | # CONFIG_M5271 is not set | ||
| 111 | # CONFIG_M5272 is not set | ||
| 112 | # CONFIG_M5275 is not set | ||
| 113 | # CONFIG_M528x is not set | ||
| 114 | # CONFIG_M5307 is not set | ||
| 115 | # CONFIG_M532x is not set | ||
| 116 | # CONFIG_M5407 is not set | ||
| 117 | CONFIG_COLDFIRE=y | ||
| 118 | CONFIG_CLOCK_SET=y | ||
| 119 | CONFIG_CLOCK_FREQ=166666666 | ||
| 120 | CONFIG_CLOCK_DIV=2 | ||
| 121 | |||
| 122 | # | ||
| 123 | # Platform | ||
| 124 | # | ||
| 125 | CONFIG_M5208EVB=y | ||
| 126 | CONFIG_FREESCALE=y | ||
| 127 | # CONFIG_4KSTACKS is not set | ||
| 128 | CONFIG_HZ=100 | ||
| 129 | |||
| 130 | # | ||
| 131 | # RAM configuration | ||
| 132 | # | ||
| 133 | CONFIG_RAMBASE=0x40000000 | ||
| 134 | CONFIG_RAMSIZE=0x2000000 | ||
| 135 | CONFIG_VECTORBASE=0x40000000 | ||
| 136 | CONFIG_KERNELBASE=0x40020000 | ||
| 137 | # CONFIG_RAMAUTOBIT is not set | ||
| 138 | # CONFIG_RAM8BIT is not set | ||
| 139 | CONFIG_RAM16BIT=y | ||
| 140 | # CONFIG_RAM32BIT is not set | ||
| 141 | |||
| 142 | # | ||
| 143 | # ROM configuration | ||
| 144 | # | ||
| 145 | # CONFIG_ROM is not set | ||
| 146 | CONFIG_RAMKERNEL=y | ||
| 147 | # CONFIG_ROMKERNEL is not set | ||
| 148 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 149 | CONFIG_FLATMEM_MANUAL=y | ||
| 150 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 151 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 152 | CONFIG_FLATMEM=y | ||
| 153 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 154 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 155 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 156 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 157 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 158 | # CONFIG_RESOURCES_64BIT is not set | ||
| 159 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 160 | CONFIG_VIRT_TO_BUS=y | ||
| 161 | CONFIG_ISA_DMA_API=y | ||
| 162 | |||
| 163 | # | ||
| 164 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 165 | # | ||
| 166 | # CONFIG_PCI is not set | ||
| 167 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 168 | |||
| 169 | # | ||
| 170 | # Executable file formats | ||
| 171 | # | ||
| 172 | CONFIG_BINFMT_FLAT=y | ||
| 173 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 174 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 175 | # CONFIG_BINFMT_AOUT is not set | ||
| 176 | # CONFIG_BINFMT_MISC is not set | ||
| 177 | |||
| 178 | # | ||
| 179 | # Power management options | ||
| 180 | # | ||
| 181 | # CONFIG_PM is not set | ||
| 182 | |||
| 183 | # | ||
| 184 | # Networking | ||
| 185 | # | ||
| 186 | CONFIG_NET=y | ||
| 187 | |||
| 188 | # | ||
| 189 | # Networking options | ||
| 190 | # | ||
| 191 | CONFIG_PACKET=y | ||
| 192 | # CONFIG_PACKET_MMAP is not set | ||
| 193 | CONFIG_UNIX=y | ||
| 194 | # CONFIG_NET_KEY is not set | ||
| 195 | CONFIG_INET=y | ||
| 196 | # CONFIG_IP_MULTICAST is not set | ||
| 197 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 198 | CONFIG_IP_FIB_HASH=y | ||
| 199 | # CONFIG_IP_PNP is not set | ||
| 200 | # CONFIG_NET_IPIP is not set | ||
| 201 | # CONFIG_NET_IPGRE is not set | ||
| 202 | # CONFIG_ARPD is not set | ||
| 203 | # CONFIG_SYN_COOKIES is not set | ||
| 204 | # CONFIG_INET_AH is not set | ||
| 205 | # CONFIG_INET_ESP is not set | ||
| 206 | # CONFIG_INET_IPCOMP is not set | ||
| 207 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 208 | # CONFIG_INET_TUNNEL is not set | ||
| 209 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
| 210 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
| 211 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
| 212 | # CONFIG_INET_LRO is not set | ||
| 213 | # CONFIG_INET_DIAG is not set | ||
| 214 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 215 | CONFIG_TCP_CONG_CUBIC=y | ||
| 216 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 217 | # CONFIG_TCP_MD5SIG is not set | ||
| 218 | # CONFIG_IPV6 is not set | ||
| 219 | # CONFIG_NETWORK_SECMARK is not set | ||
| 220 | # CONFIG_NETFILTER is not set | ||
| 221 | # CONFIG_IP_DCCP is not set | ||
| 222 | # CONFIG_IP_SCTP is not set | ||
| 223 | # CONFIG_TIPC is not set | ||
| 224 | # CONFIG_ATM is not set | ||
| 225 | # CONFIG_BRIDGE is not set | ||
| 226 | # CONFIG_VLAN_8021Q is not set | ||
| 227 | # CONFIG_DECNET is not set | ||
| 228 | # CONFIG_LLC2 is not set | ||
| 229 | # CONFIG_IPX is not set | ||
| 230 | # CONFIG_ATALK is not set | ||
| 231 | # CONFIG_X25 is not set | ||
| 232 | # CONFIG_LAPB is not set | ||
| 233 | # CONFIG_ECONET is not set | ||
| 234 | # CONFIG_WAN_ROUTER is not set | ||
| 235 | # CONFIG_NET_SCHED is not set | ||
| 236 | |||
| 237 | # | ||
| 238 | # Network testing | ||
| 239 | # | ||
| 240 | # CONFIG_NET_PKTGEN is not set | ||
| 241 | # CONFIG_HAMRADIO is not set | ||
| 242 | # CONFIG_CAN is not set | ||
| 243 | # CONFIG_IRDA is not set | ||
| 244 | # CONFIG_BT is not set | ||
| 245 | # CONFIG_AF_RXRPC is not set | ||
| 246 | |||
| 247 | # | ||
| 248 | # Wireless | ||
| 249 | # | ||
| 250 | # CONFIG_CFG80211 is not set | ||
| 251 | # CONFIG_WIRELESS_EXT is not set | ||
| 252 | # CONFIG_MAC80211 is not set | ||
| 253 | # CONFIG_IEEE80211 is not set | ||
| 254 | # CONFIG_RFKILL is not set | ||
| 255 | # CONFIG_NET_9P is not set | ||
| 256 | |||
| 257 | # | ||
| 258 | # Device Drivers | ||
| 259 | # | ||
| 260 | |||
| 261 | # | ||
| 262 | # Generic Driver Options | ||
| 263 | # | ||
| 264 | CONFIG_STANDALONE=y | ||
| 265 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 266 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 267 | # CONFIG_CONNECTOR is not set | ||
| 268 | CONFIG_MTD=y | ||
| 269 | # CONFIG_MTD_DEBUG is not set | ||
| 270 | # CONFIG_MTD_CONCAT is not set | ||
| 271 | CONFIG_MTD_PARTITIONS=y | ||
| 272 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 273 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 274 | # CONFIG_MTD_AR7_PARTS is not set | ||
| 275 | |||
| 276 | # | ||
| 277 | # User Modules And Translation Layers | ||
| 278 | # | ||
| 279 | CONFIG_MTD_CHAR=y | ||
| 280 | CONFIG_MTD_BLKDEVS=y | ||
| 281 | CONFIG_MTD_BLOCK=y | ||
| 282 | # CONFIG_FTL is not set | ||
| 283 | # CONFIG_NFTL is not set | ||
| 284 | # CONFIG_INFTL is not set | ||
| 285 | # CONFIG_RFD_FTL is not set | ||
| 286 | # CONFIG_SSFDC is not set | ||
| 287 | # CONFIG_MTD_OOPS is not set | ||
| 288 | |||
| 289 | # | ||
| 290 | # RAM/ROM/Flash chip drivers | ||
| 291 | # | ||
| 292 | CONFIG_MTD_CFI=y | ||
| 293 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 294 | CONFIG_MTD_GEN_PROBE=y | ||
| 295 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
| 296 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 297 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 298 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 299 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 300 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 301 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 302 | CONFIG_MTD_CFI_I1=y | ||
| 303 | CONFIG_MTD_CFI_I2=y | ||
| 304 | # CONFIG_MTD_CFI_I4 is not set | ||
| 305 | # CONFIG_MTD_CFI_I8 is not set | ||
| 306 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
| 307 | CONFIG_MTD_CFI_AMDSTD=y | ||
| 308 | # CONFIG_MTD_CFI_STAA is not set | ||
| 309 | CONFIG_MTD_CFI_UTIL=y | ||
| 310 | CONFIG_MTD_RAM=y | ||
| 311 | # CONFIG_MTD_ROM is not set | ||
| 312 | # CONFIG_MTD_ABSENT is not set | ||
| 313 | |||
| 314 | # | ||
| 315 | # Mapping drivers for chip access | ||
| 316 | # | ||
| 317 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 318 | # CONFIG_MTD_PHYSMAP is not set | ||
| 319 | CONFIG_MTD_UCLINUX=y | ||
| 320 | # CONFIG_MTD_PLATRAM is not set | ||
| 321 | |||
| 322 | # | ||
| 323 | # Self-contained MTD device drivers | ||
| 324 | # | ||
| 325 | # CONFIG_MTD_SLRAM is not set | ||
| 326 | # CONFIG_MTD_PHRAM is not set | ||
| 327 | # CONFIG_MTD_MTDRAM is not set | ||
| 328 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 329 | |||
| 330 | # | ||
| 331 | # Disk-On-Chip Device Drivers | ||
| 332 | # | ||
| 333 | # CONFIG_MTD_DOC2000 is not set | ||
| 334 | # CONFIG_MTD_DOC2001 is not set | ||
| 335 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 336 | # CONFIG_MTD_NAND is not set | ||
| 337 | # CONFIG_MTD_ONENAND is not set | ||
| 338 | |||
| 339 | # | ||
| 340 | # UBI - Unsorted block images | ||
| 341 | # | ||
| 342 | # CONFIG_MTD_UBI is not set | ||
| 343 | # CONFIG_PARPORT is not set | ||
| 344 | CONFIG_BLK_DEV=y | ||
| 345 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 346 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 347 | # CONFIG_BLK_DEV_NBD is not set | ||
| 348 | CONFIG_BLK_DEV_RAM=y | ||
| 349 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 350 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 351 | # CONFIG_BLK_DEV_XIP is not set | ||
| 352 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 353 | # CONFIG_ATA_OVER_ETH is not set | ||
| 354 | # CONFIG_MISC_DEVICES is not set | ||
| 355 | CONFIG_HAVE_IDE=y | ||
| 356 | # CONFIG_IDE is not set | ||
| 357 | |||
| 358 | # | ||
| 359 | # SCSI device support | ||
| 360 | # | ||
| 361 | # CONFIG_RAID_ATTRS is not set | ||
| 362 | # CONFIG_SCSI is not set | ||
| 363 | # CONFIG_SCSI_DMA is not set | ||
| 364 | # CONFIG_SCSI_NETLINK is not set | ||
| 365 | # CONFIG_MD is not set | ||
| 366 | CONFIG_NETDEVICES=y | ||
| 367 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 368 | # CONFIG_DUMMY is not set | ||
| 369 | # CONFIG_BONDING is not set | ||
| 370 | # CONFIG_MACVLAN is not set | ||
| 371 | # CONFIG_EQUALIZER is not set | ||
| 372 | # CONFIG_TUN is not set | ||
| 373 | # CONFIG_VETH is not set | ||
| 374 | # CONFIG_PHYLIB is not set | ||
| 375 | CONFIG_NET_ETHERNET=y | ||
| 376 | # CONFIG_MII is not set | ||
| 377 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 378 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 379 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 380 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 381 | # CONFIG_B44 is not set | ||
| 382 | CONFIG_FEC=y | ||
| 383 | # CONFIG_FEC2 is not set | ||
| 384 | # CONFIG_NETDEV_1000 is not set | ||
| 385 | # CONFIG_NETDEV_10000 is not set | ||
| 386 | |||
| 387 | # | ||
| 388 | # Wireless LAN | ||
| 389 | # | ||
| 390 | # CONFIG_WLAN_PRE80211 is not set | ||
| 391 | # CONFIG_WLAN_80211 is not set | ||
| 392 | # CONFIG_IWLWIFI is not set | ||
| 393 | # CONFIG_IWLWIFI_LEDS is not set | ||
| 394 | # CONFIG_WAN is not set | ||
| 395 | # CONFIG_PPP is not set | ||
| 396 | # CONFIG_SLIP is not set | ||
| 397 | # CONFIG_NETCONSOLE is not set | ||
| 398 | # CONFIG_NETPOLL is not set | ||
| 399 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 400 | # CONFIG_ISDN is not set | ||
| 401 | # CONFIG_PHONE is not set | ||
| 402 | |||
| 403 | # | ||
| 404 | # Input device support | ||
| 405 | # | ||
| 406 | # CONFIG_INPUT is not set | ||
| 407 | |||
| 408 | # | ||
| 409 | # Hardware I/O ports | ||
| 410 | # | ||
| 411 | # CONFIG_SERIO is not set | ||
| 412 | # CONFIG_GAMEPORT is not set | ||
| 413 | |||
| 414 | # | ||
| 415 | # Character devices | ||
| 416 | # | ||
| 417 | # CONFIG_VT is not set | ||
| 418 | # CONFIG_DEVKMEM is not set | ||
| 419 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 420 | |||
| 421 | # | ||
| 422 | # Serial drivers | ||
| 423 | # | ||
| 424 | # CONFIG_SERIAL_8250 is not set | ||
| 425 | |||
| 426 | # | ||
| 427 | # Non-8250 serial port support | ||
| 428 | # | ||
| 429 | CONFIG_SERIAL_CORE=y | ||
| 430 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 431 | # CONFIG_SERIAL_COLDFIRE is not set | ||
| 432 | CONFIG_SERIAL_MCF=y | ||
| 433 | CONFIG_SERIAL_MCF_BAUDRATE=115200 | ||
| 434 | CONFIG_SERIAL_MCF_CONSOLE=y | ||
| 435 | # CONFIG_UNIX98_PTYS is not set | ||
| 436 | CONFIG_LEGACY_PTYS=y | ||
| 437 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 438 | # CONFIG_IPMI_HANDLER is not set | ||
| 439 | # CONFIG_HW_RANDOM is not set | ||
| 440 | # CONFIG_GEN_RTC is not set | ||
| 441 | # CONFIG_R3964 is not set | ||
| 442 | # CONFIG_RAW_DRIVER is not set | ||
| 443 | # CONFIG_TCG_TPM is not set | ||
| 444 | # CONFIG_I2C is not set | ||
| 445 | # CONFIG_SPI is not set | ||
| 446 | # CONFIG_W1 is not set | ||
| 447 | # CONFIG_POWER_SUPPLY is not set | ||
| 448 | # CONFIG_HWMON is not set | ||
| 449 | # CONFIG_THERMAL is not set | ||
| 450 | # CONFIG_WATCHDOG is not set | ||
| 451 | |||
| 452 | # | ||
| 453 | # Sonics Silicon Backplane | ||
| 454 | # | ||
| 455 | CONFIG_SSB_POSSIBLE=y | ||
| 456 | # CONFIG_SSB is not set | ||
| 457 | |||
| 458 | # | ||
| 459 | # Multifunction device drivers | ||
| 460 | # | ||
| 461 | # CONFIG_MFD_SM501 is not set | ||
| 462 | # CONFIG_HTC_PASIC3 is not set | ||
| 463 | |||
| 464 | # | ||
| 465 | # Multimedia devices | ||
| 466 | # | ||
| 467 | |||
| 468 | # | ||
| 469 | # Multimedia core support | ||
| 470 | # | ||
| 471 | # CONFIG_VIDEO_DEV is not set | ||
| 472 | # CONFIG_DVB_CORE is not set | ||
| 473 | |||
| 474 | # | ||
| 475 | # Multimedia drivers | ||
| 476 | # | ||
| 477 | # CONFIG_DAB is not set | ||
| 478 | |||
| 479 | # | ||
| 480 | # Graphics support | ||
| 481 | # | ||
| 482 | # CONFIG_VGASTATE is not set | ||
| 483 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 484 | # CONFIG_FB is not set | ||
| 485 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 486 | |||
| 487 | # | ||
| 488 | # Display device support | ||
| 489 | # | ||
| 490 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 491 | |||
| 492 | # | ||
| 493 | # Sound | ||
| 494 | # | ||
| 495 | # CONFIG_SOUND is not set | ||
| 496 | # CONFIG_USB_SUPPORT is not set | ||
| 497 | # CONFIG_MMC is not set | ||
| 498 | # CONFIG_MEMSTICK is not set | ||
| 499 | # CONFIG_NEW_LEDS is not set | ||
| 500 | # CONFIG_ACCESSIBILITY is not set | ||
| 501 | # CONFIG_RTC_CLASS is not set | ||
| 502 | # CONFIG_UIO is not set | ||
| 503 | |||
| 504 | # | ||
| 505 | # File systems | ||
| 506 | # | ||
| 507 | CONFIG_EXT2_FS=y | ||
| 508 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 509 | # CONFIG_EXT3_FS is not set | ||
| 510 | # CONFIG_EXT4DEV_FS is not set | ||
| 511 | # CONFIG_REISERFS_FS is not set | ||
| 512 | # CONFIG_JFS_FS is not set | ||
| 513 | # CONFIG_FS_POSIX_ACL is not set | ||
| 514 | # CONFIG_XFS_FS is not set | ||
| 515 | # CONFIG_DNOTIFY is not set | ||
| 516 | # CONFIG_INOTIFY is not set | ||
| 517 | # CONFIG_QUOTA is not set | ||
| 518 | # CONFIG_AUTOFS_FS is not set | ||
| 519 | # CONFIG_AUTOFS4_FS is not set | ||
| 520 | # CONFIG_FUSE_FS is not set | ||
| 521 | |||
| 522 | # | ||
| 523 | # CD-ROM/DVD Filesystems | ||
| 524 | # | ||
| 525 | # CONFIG_ISO9660_FS is not set | ||
| 526 | # CONFIG_UDF_FS is not set | ||
| 527 | |||
| 528 | # | ||
| 529 | # DOS/FAT/NT Filesystems | ||
| 530 | # | ||
| 531 | # CONFIG_MSDOS_FS is not set | ||
| 532 | # CONFIG_VFAT_FS is not set | ||
| 533 | # CONFIG_NTFS_FS is not set | ||
| 534 | |||
| 535 | # | ||
| 536 | # Pseudo filesystems | ||
| 537 | # | ||
| 538 | CONFIG_PROC_FS=y | ||
| 539 | CONFIG_PROC_SYSCTL=y | ||
| 540 | # CONFIG_SYSFS is not set | ||
| 541 | # CONFIG_TMPFS is not set | ||
| 542 | # CONFIG_HUGETLB_PAGE is not set | ||
| 543 | |||
| 544 | # | ||
| 545 | # Miscellaneous filesystems | ||
| 546 | # | ||
| 547 | # CONFIG_ADFS_FS is not set | ||
| 548 | # CONFIG_AFFS_FS is not set | ||
| 549 | # CONFIG_HFS_FS is not set | ||
| 550 | # CONFIG_HFSPLUS_FS is not set | ||
| 551 | # CONFIG_BEFS_FS is not set | ||
| 552 | # CONFIG_BFS_FS is not set | ||
| 553 | # CONFIG_EFS_FS is not set | ||
| 554 | # CONFIG_JFFS2_FS is not set | ||
| 555 | # CONFIG_CRAMFS is not set | ||
| 556 | # CONFIG_VXFS_FS is not set | ||
| 557 | # CONFIG_MINIX_FS is not set | ||
| 558 | # CONFIG_HPFS_FS is not set | ||
| 559 | # CONFIG_QNX4FS_FS is not set | ||
| 560 | CONFIG_ROMFS_FS=y | ||
| 561 | # CONFIG_SYSV_FS is not set | ||
| 562 | # CONFIG_UFS_FS is not set | ||
| 563 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
| 564 | |||
| 565 | # | ||
| 566 | # Partition Types | ||
| 567 | # | ||
| 568 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 569 | CONFIG_MSDOS_PARTITION=y | ||
| 570 | # CONFIG_NLS is not set | ||
| 571 | |||
| 572 | # | ||
| 573 | # Kernel hacking | ||
| 574 | # | ||
| 575 | # CONFIG_PRINTK_TIME is not set | ||
| 576 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 577 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 578 | CONFIG_FRAME_WARN=1024 | ||
| 579 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 580 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 581 | # CONFIG_HEADERS_CHECK is not set | ||
| 582 | # CONFIG_DEBUG_KERNEL is not set | ||
| 583 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 584 | # CONFIG_SAMPLES is not set | ||
| 585 | CONFIG_FULLDEBUG=y | ||
| 586 | # CONFIG_HIGHPROFILE is not set | ||
| 587 | # CONFIG_BOOTPARAM is not set | ||
| 588 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 589 | # CONFIG_BDM_DISABLE is not set | ||
| 590 | |||
| 591 | # | ||
| 592 | # Security options | ||
| 593 | # | ||
| 594 | # CONFIG_KEYS is not set | ||
| 595 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 596 | # CONFIG_CRYPTO is not set | ||
| 597 | |||
| 598 | # | ||
| 599 | # Library routines | ||
| 600 | # | ||
| 601 | CONFIG_BITREVERSE=y | ||
| 602 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
| 603 | # CONFIG_CRC_CCITT is not set | ||
| 604 | # CONFIG_CRC16 is not set | ||
| 605 | # CONFIG_CRC_ITU_T is not set | ||
| 606 | CONFIG_CRC32=y | ||
| 607 | # CONFIG_CRC7 is not set | ||
| 608 | # CONFIG_LIBCRC32C is not set | ||
| 609 | CONFIG_HAS_IOMEM=y | ||
| 610 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/m68knommu/configs/m5249evb_defconfig b/arch/m68knommu/configs/m5249evb_defconfig new file mode 100644 index 000000000000..cc6458333d67 --- /dev/null +++ b/arch/m68knommu/configs/m5249evb_defconfig | |||
| @@ -0,0 +1,497 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.26-rc1 | ||
| 4 | # | ||
| 5 | CONFIG_M68K=y | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_FPU is not set | ||
| 8 | CONFIG_ZONE_DMA=y | ||
| 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 10 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 11 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 12 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 14 | CONFIG_GENERIC_HWEIGHT=y | ||
| 15 | CONFIG_GENERIC_HARDIRQS=y | ||
| 16 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 17 | CONFIG_GENERIC_TIME=y | ||
| 18 | CONFIG_TIME_LOW_RES=y | ||
| 19 | CONFIG_NO_IOPORT=y | ||
| 20 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
| 21 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 22 | |||
| 23 | # | ||
| 24 | # General setup | ||
| 25 | # | ||
| 26 | CONFIG_EXPERIMENTAL=y | ||
| 27 | CONFIG_BROKEN_ON_SMP=y | ||
| 28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 29 | CONFIG_LOCALVERSION="" | ||
| 30 | CONFIG_LOCALVERSION_AUTO=y | ||
| 31 | # CONFIG_SYSVIPC is not set | ||
| 32 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 33 | # CONFIG_IKCONFIG is not set | ||
| 34 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 35 | # CONFIG_CGROUPS is not set | ||
| 36 | # CONFIG_GROUP_SCHED is not set | ||
| 37 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
| 38 | # CONFIG_RELAY is not set | ||
| 39 | # CONFIG_NAMESPACES is not set | ||
| 40 | # CONFIG_BLK_DEV_INITRD is not set | ||
| 41 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 42 | CONFIG_SYSCTL=y | ||
| 43 | CONFIG_EMBEDDED=y | ||
| 44 | # CONFIG_UID16 is not set | ||
| 45 | # CONFIG_SYSCTL_SYSCALL is not set | ||
| 46 | # CONFIG_KALLSYMS is not set | ||
| 47 | # CONFIG_HOTPLUG is not set | ||
| 48 | CONFIG_PRINTK=y | ||
| 49 | CONFIG_BUG=y | ||
| 50 | CONFIG_ELF_CORE=y | ||
| 51 | # CONFIG_COMPAT_BRK is not set | ||
| 52 | CONFIG_BASE_FULL=y | ||
| 53 | # CONFIG_FUTEX is not set | ||
| 54 | # CONFIG_EPOLL is not set | ||
| 55 | # CONFIG_SIGNALFD is not set | ||
| 56 | # CONFIG_TIMERFD is not set | ||
| 57 | # CONFIG_EVENTFD is not set | ||
| 58 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
| 59 | CONFIG_SLAB=y | ||
| 60 | # CONFIG_SLUB is not set | ||
| 61 | # CONFIG_SLOB is not set | ||
| 62 | # CONFIG_PROFILING is not set | ||
| 63 | # CONFIG_MARKERS is not set | ||
| 64 | # CONFIG_HAVE_OPROFILE is not set | ||
| 65 | # CONFIG_HAVE_KPROBES is not set | ||
| 66 | # CONFIG_HAVE_KRETPROBES is not set | ||
| 67 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
| 68 | CONFIG_SLABINFO=y | ||
| 69 | CONFIG_TINY_SHMEM=y | ||
| 70 | CONFIG_BASE_SMALL=0 | ||
| 71 | CONFIG_MODULES=y | ||
| 72 | CONFIG_MODULE_UNLOAD=y | ||
| 73 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 74 | # CONFIG_MODVERSIONS is not set | ||
| 75 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 76 | # CONFIG_KMOD is not set | ||
| 77 | CONFIG_BLOCK=y | ||
| 78 | # CONFIG_LBD is not set | ||
| 79 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 80 | # CONFIG_LSF is not set | ||
| 81 | # CONFIG_BLK_DEV_BSG is not set | ||
| 82 | |||
| 83 | # | ||
| 84 | # IO Schedulers | ||
| 85 | # | ||
| 86 | CONFIG_IOSCHED_NOOP=y | ||
| 87 | # CONFIG_IOSCHED_AS is not set | ||
| 88 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 89 | # CONFIG_IOSCHED_CFQ is not set | ||
| 90 | # CONFIG_DEFAULT_AS is not set | ||
| 91 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 92 | # CONFIG_DEFAULT_CFQ is not set | ||
| 93 | CONFIG_DEFAULT_NOOP=y | ||
| 94 | CONFIG_DEFAULT_IOSCHED="noop" | ||
| 95 | CONFIG_CLASSIC_RCU=y | ||
| 96 | |||
| 97 | # | ||
| 98 | # Processor type and features | ||
| 99 | # | ||
| 100 | # CONFIG_M68328 is not set | ||
| 101 | # CONFIG_M68EZ328 is not set | ||
| 102 | # CONFIG_M68VZ328 is not set | ||
| 103 | # CONFIG_M68360 is not set | ||
| 104 | # CONFIG_M5206 is not set | ||
| 105 | # CONFIG_M5206e is not set | ||
| 106 | # CONFIG_M520x is not set | ||
| 107 | # CONFIG_M523x is not set | ||
| 108 | CONFIG_M5249=y | ||
| 109 | # CONFIG_M5271 is not set | ||
| 110 | # CONFIG_M5272 is not set | ||
| 111 | # CONFIG_M5275 is not set | ||
| 112 | # CONFIG_M528x is not set | ||
| 113 | # CONFIG_M5307 is not set | ||
| 114 | # CONFIG_M532x is not set | ||
| 115 | # CONFIG_M5407 is not set | ||
| 116 | CONFIG_COLDFIRE=y | ||
| 117 | CONFIG_CLOCK_SET=y | ||
| 118 | CONFIG_CLOCK_FREQ=140000000 | ||
| 119 | CONFIG_CLOCK_DIV=2 | ||
| 120 | |||
| 121 | # | ||
| 122 | # Platform | ||
| 123 | # | ||
| 124 | CONFIG_M5249C3=y | ||
| 125 | CONFIG_FREESCALE=y | ||
| 126 | CONFIG_4KSTACKS=y | ||
| 127 | CONFIG_HZ=100 | ||
| 128 | |||
| 129 | # | ||
| 130 | # RAM configuration | ||
| 131 | # | ||
| 132 | CONFIG_RAMBASE=0x00000000 | ||
| 133 | CONFIG_RAMSIZE=0x00800000 | ||
| 134 | CONFIG_VECTORBASE=0x00000000 | ||
| 135 | CONFIG_KERNELBASE=0x00020000 | ||
| 136 | CONFIG_RAMAUTOBIT=y | ||
| 137 | # CONFIG_RAM8BIT is not set | ||
| 138 | # CONFIG_RAM16BIT is not set | ||
| 139 | # CONFIG_RAM32BIT is not set | ||
| 140 | |||
| 141 | # | ||
| 142 | # ROM configuration | ||
| 143 | # | ||
| 144 | # CONFIG_ROM is not set | ||
| 145 | CONFIG_RAMKERNEL=y | ||
| 146 | # CONFIG_ROMKERNEL is not set | ||
| 147 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 148 | CONFIG_FLATMEM_MANUAL=y | ||
| 149 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 150 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 151 | CONFIG_FLATMEM=y | ||
| 152 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 153 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 154 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 155 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 156 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 157 | # CONFIG_RESOURCES_64BIT is not set | ||
| 158 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 159 | CONFIG_VIRT_TO_BUS=y | ||
| 160 | CONFIG_ISA_DMA_API=y | ||
| 161 | |||
| 162 | # | ||
| 163 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 164 | # | ||
| 165 | # CONFIG_PCI is not set | ||
| 166 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 167 | |||
| 168 | # | ||
| 169 | # Executable file formats | ||
| 170 | # | ||
| 171 | CONFIG_BINFMT_FLAT=y | ||
| 172 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 173 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 174 | # CONFIG_BINFMT_AOUT is not set | ||
| 175 | # CONFIG_BINFMT_MISC is not set | ||
| 176 | |||
| 177 | # | ||
| 178 | # Power management options | ||
| 179 | # | ||
| 180 | # CONFIG_PM is not set | ||
| 181 | |||
| 182 | # | ||
| 183 | # Networking | ||
| 184 | # | ||
| 185 | # CONFIG_NET is not set | ||
| 186 | |||
| 187 | # | ||
| 188 | # Device Drivers | ||
| 189 | # | ||
| 190 | |||
| 191 | # | ||
| 192 | # Generic Driver Options | ||
| 193 | # | ||
| 194 | CONFIG_STANDALONE=y | ||
| 195 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 196 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 197 | CONFIG_MTD=y | ||
| 198 | # CONFIG_MTD_DEBUG is not set | ||
| 199 | # CONFIG_MTD_CONCAT is not set | ||
| 200 | CONFIG_MTD_PARTITIONS=y | ||
| 201 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 202 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 203 | # CONFIG_MTD_AR7_PARTS is not set | ||
| 204 | |||
| 205 | # | ||
| 206 | # User Modules And Translation Layers | ||
| 207 | # | ||
| 208 | CONFIG_MTD_CHAR=y | ||
| 209 | CONFIG_MTD_BLKDEVS=y | ||
| 210 | CONFIG_MTD_BLOCK=y | ||
| 211 | # CONFIG_FTL is not set | ||
| 212 | # CONFIG_NFTL is not set | ||
| 213 | # CONFIG_INFTL is not set | ||
| 214 | # CONFIG_RFD_FTL is not set | ||
| 215 | # CONFIG_SSFDC is not set | ||
| 216 | # CONFIG_MTD_OOPS is not set | ||
| 217 | |||
| 218 | # | ||
| 219 | # RAM/ROM/Flash chip drivers | ||
| 220 | # | ||
| 221 | # CONFIG_MTD_CFI is not set | ||
| 222 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 223 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 224 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 225 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 226 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 227 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 228 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 229 | CONFIG_MTD_CFI_I1=y | ||
| 230 | CONFIG_MTD_CFI_I2=y | ||
| 231 | # CONFIG_MTD_CFI_I4 is not set | ||
| 232 | # CONFIG_MTD_CFI_I8 is not set | ||
| 233 | CONFIG_MTD_RAM=y | ||
| 234 | # CONFIG_MTD_ROM is not set | ||
| 235 | # CONFIG_MTD_ABSENT is not set | ||
| 236 | |||
| 237 | # | ||
| 238 | # Mapping drivers for chip access | ||
| 239 | # | ||
| 240 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 241 | CONFIG_MTD_UCLINUX=y | ||
| 242 | # CONFIG_MTD_PLATRAM is not set | ||
| 243 | |||
| 244 | # | ||
| 245 | # Self-contained MTD device drivers | ||
| 246 | # | ||
| 247 | # CONFIG_MTD_SLRAM is not set | ||
| 248 | # CONFIG_MTD_PHRAM is not set | ||
| 249 | # CONFIG_MTD_MTDRAM is not set | ||
| 250 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 251 | |||
| 252 | # | ||
| 253 | # Disk-On-Chip Device Drivers | ||
| 254 | # | ||
| 255 | # CONFIG_MTD_DOC2000 is not set | ||
| 256 | # CONFIG_MTD_DOC2001 is not set | ||
| 257 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 258 | # CONFIG_MTD_NAND is not set | ||
| 259 | # CONFIG_MTD_ONENAND is not set | ||
| 260 | |||
| 261 | # | ||
| 262 | # UBI - Unsorted block images | ||
| 263 | # | ||
| 264 | # CONFIG_MTD_UBI is not set | ||
| 265 | # CONFIG_PARPORT is not set | ||
| 266 | CONFIG_BLK_DEV=y | ||
| 267 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 268 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 269 | CONFIG_BLK_DEV_RAM=y | ||
| 270 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 271 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 272 | # CONFIG_BLK_DEV_XIP is not set | ||
| 273 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 274 | CONFIG_MISC_DEVICES=y | ||
| 275 | # CONFIG_EEPROM_93CX6 is not set | ||
| 276 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
| 277 | CONFIG_HAVE_IDE=y | ||
| 278 | # CONFIG_IDE is not set | ||
| 279 | |||
| 280 | # | ||
| 281 | # SCSI device support | ||
| 282 | # | ||
| 283 | # CONFIG_RAID_ATTRS is not set | ||
| 284 | # CONFIG_SCSI is not set | ||
| 285 | # CONFIG_SCSI_DMA is not set | ||
| 286 | # CONFIG_SCSI_NETLINK is not set | ||
| 287 | # CONFIG_MD is not set | ||
| 288 | # CONFIG_PHONE is not set | ||
| 289 | |||
| 290 | # | ||
| 291 | # Input device support | ||
| 292 | # | ||
| 293 | # CONFIG_INPUT is not set | ||
| 294 | |||
| 295 | # | ||
| 296 | # Hardware I/O ports | ||
| 297 | # | ||
| 298 | # CONFIG_SERIO is not set | ||
| 299 | # CONFIG_GAMEPORT is not set | ||
| 300 | |||
| 301 | # | ||
| 302 | # Character devices | ||
| 303 | # | ||
| 304 | # CONFIG_VT is not set | ||
| 305 | # CONFIG_DEVKMEM is not set | ||
| 306 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 307 | |||
| 308 | # | ||
| 309 | # Serial drivers | ||
| 310 | # | ||
| 311 | # CONFIG_SERIAL_8250 is not set | ||
| 312 | |||
| 313 | # | ||
| 314 | # Non-8250 serial port support | ||
| 315 | # | ||
| 316 | CONFIG_SERIAL_CORE=y | ||
| 317 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 318 | # CONFIG_SERIAL_COLDFIRE is not set | ||
| 319 | CONFIG_SERIAL_MCF=y | ||
| 320 | CONFIG_SERIAL_MCF_BAUDRATE=19200 | ||
| 321 | CONFIG_SERIAL_MCF_CONSOLE=y | ||
| 322 | # CONFIG_UNIX98_PTYS is not set | ||
| 323 | CONFIG_LEGACY_PTYS=y | ||
| 324 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 325 | # CONFIG_IPMI_HANDLER is not set | ||
| 326 | # CONFIG_HW_RANDOM is not set | ||
| 327 | # CONFIG_GEN_RTC is not set | ||
| 328 | # CONFIG_R3964 is not set | ||
| 329 | # CONFIG_RAW_DRIVER is not set | ||
| 330 | # CONFIG_TCG_TPM is not set | ||
| 331 | # CONFIG_I2C is not set | ||
| 332 | # CONFIG_SPI is not set | ||
| 333 | # CONFIG_W1 is not set | ||
| 334 | # CONFIG_POWER_SUPPLY is not set | ||
| 335 | # CONFIG_HWMON is not set | ||
| 336 | # CONFIG_THERMAL is not set | ||
| 337 | # CONFIG_WATCHDOG is not set | ||
| 338 | |||
| 339 | # | ||
| 340 | # Sonics Silicon Backplane | ||
| 341 | # | ||
| 342 | CONFIG_SSB_POSSIBLE=y | ||
| 343 | # CONFIG_SSB is not set | ||
| 344 | |||
| 345 | # | ||
| 346 | # Multifunction device drivers | ||
| 347 | # | ||
| 348 | # CONFIG_MFD_SM501 is not set | ||
| 349 | # CONFIG_HTC_PASIC3 is not set | ||
| 350 | |||
| 351 | # | ||
| 352 | # Multimedia devices | ||
| 353 | # | ||
| 354 | |||
| 355 | # | ||
| 356 | # Multimedia core support | ||
| 357 | # | ||
| 358 | # CONFIG_VIDEO_DEV is not set | ||
| 359 | |||
| 360 | # | ||
| 361 | # Multimedia drivers | ||
| 362 | # | ||
| 363 | # CONFIG_DAB is not set | ||
| 364 | |||
| 365 | # | ||
| 366 | # Graphics support | ||
| 367 | # | ||
| 368 | # CONFIG_VGASTATE is not set | ||
| 369 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 370 | # CONFIG_FB is not set | ||
| 371 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 372 | |||
| 373 | # | ||
| 374 | # Display device support | ||
| 375 | # | ||
| 376 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 377 | |||
| 378 | # | ||
| 379 | # Sound | ||
| 380 | # | ||
| 381 | # CONFIG_SOUND is not set | ||
| 382 | # CONFIG_USB_SUPPORT is not set | ||
| 383 | # CONFIG_MMC is not set | ||
| 384 | # CONFIG_MEMSTICK is not set | ||
| 385 | # CONFIG_NEW_LEDS is not set | ||
| 386 | # CONFIG_ACCESSIBILITY is not set | ||
| 387 | # CONFIG_RTC_CLASS is not set | ||
| 388 | # CONFIG_UIO is not set | ||
| 389 | |||
| 390 | # | ||
| 391 | # File systems | ||
| 392 | # | ||
| 393 | CONFIG_EXT2_FS=y | ||
| 394 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 395 | # CONFIG_EXT3_FS is not set | ||
| 396 | # CONFIG_EXT4DEV_FS is not set | ||
| 397 | # CONFIG_REISERFS_FS is not set | ||
| 398 | # CONFIG_JFS_FS is not set | ||
| 399 | # CONFIG_FS_POSIX_ACL is not set | ||
| 400 | # CONFIG_XFS_FS is not set | ||
| 401 | # CONFIG_DNOTIFY is not set | ||
| 402 | # CONFIG_INOTIFY is not set | ||
| 403 | # CONFIG_QUOTA is not set | ||
| 404 | # CONFIG_AUTOFS_FS is not set | ||
| 405 | # CONFIG_AUTOFS4_FS is not set | ||
| 406 | # CONFIG_FUSE_FS is not set | ||
| 407 | |||
| 408 | # | ||
| 409 | # CD-ROM/DVD Filesystems | ||
| 410 | # | ||
| 411 | # CONFIG_ISO9660_FS is not set | ||
| 412 | # CONFIG_UDF_FS is not set | ||
| 413 | |||
| 414 | # | ||
| 415 | # DOS/FAT/NT Filesystems | ||
| 416 | # | ||
| 417 | # CONFIG_MSDOS_FS is not set | ||
| 418 | # CONFIG_VFAT_FS is not set | ||
| 419 | # CONFIG_NTFS_FS is not set | ||
| 420 | |||
| 421 | # | ||
| 422 | # Pseudo filesystems | ||
| 423 | # | ||
| 424 | CONFIG_PROC_FS=y | ||
| 425 | CONFIG_PROC_SYSCTL=y | ||
| 426 | CONFIG_SYSFS=y | ||
| 427 | # CONFIG_TMPFS is not set | ||
| 428 | # CONFIG_HUGETLB_PAGE is not set | ||
| 429 | # CONFIG_CONFIGFS_FS is not set | ||
| 430 | |||
| 431 | # | ||
| 432 | # Miscellaneous filesystems | ||
| 433 | # | ||
| 434 | # CONFIG_ADFS_FS is not set | ||
| 435 | # CONFIG_AFFS_FS is not set | ||
| 436 | # CONFIG_HFS_FS is not set | ||
| 437 | # CONFIG_HFSPLUS_FS is not set | ||
| 438 | # CONFIG_BEFS_FS is not set | ||
| 439 | # CONFIG_BFS_FS is not set | ||
| 440 | # CONFIG_EFS_FS is not set | ||
| 441 | # CONFIG_JFFS2_FS is not set | ||
| 442 | # CONFIG_CRAMFS is not set | ||
| 443 | # CONFIG_VXFS_FS is not set | ||
| 444 | # CONFIG_MINIX_FS is not set | ||
| 445 | # CONFIG_HPFS_FS is not set | ||
| 446 | # CONFIG_QNX4FS_FS is not set | ||
| 447 | CONFIG_ROMFS_FS=y | ||
| 448 | # CONFIG_SYSV_FS is not set | ||
| 449 | # CONFIG_UFS_FS is not set | ||
| 450 | |||
| 451 | # | ||
| 452 | # Partition Types | ||
| 453 | # | ||
| 454 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 455 | CONFIG_MSDOS_PARTITION=y | ||
| 456 | # CONFIG_NLS is not set | ||
| 457 | |||
| 458 | # | ||
| 459 | # Kernel hacking | ||
| 460 | # | ||
| 461 | # CONFIG_PRINTK_TIME is not set | ||
| 462 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 463 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 464 | CONFIG_FRAME_WARN=1024 | ||
| 465 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 466 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 467 | # CONFIG_DEBUG_FS is not set | ||
| 468 | # CONFIG_HEADERS_CHECK is not set | ||
| 469 | # CONFIG_DEBUG_KERNEL is not set | ||
| 470 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 471 | # CONFIG_SAMPLES is not set | ||
| 472 | # CONFIG_FULLDEBUG is not set | ||
| 473 | # CONFIG_HIGHPROFILE is not set | ||
| 474 | # CONFIG_BOOTPARAM is not set | ||
| 475 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 476 | # CONFIG_BDM_DISABLE is not set | ||
| 477 | |||
| 478 | # | ||
| 479 | # Security options | ||
| 480 | # | ||
| 481 | # CONFIG_KEYS is not set | ||
| 482 | # CONFIG_SECURITY is not set | ||
| 483 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 484 | # CONFIG_CRYPTO is not set | ||
| 485 | |||
| 486 | # | ||
| 487 | # Library routines | ||
| 488 | # | ||
| 489 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
| 490 | # CONFIG_CRC_CCITT is not set | ||
| 491 | # CONFIG_CRC16 is not set | ||
| 492 | # CONFIG_CRC_ITU_T is not set | ||
| 493 | # CONFIG_CRC32 is not set | ||
| 494 | # CONFIG_CRC7 is not set | ||
| 495 | # CONFIG_LIBCRC32C is not set | ||
| 496 | CONFIG_HAS_IOMEM=y | ||
| 497 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/m68knommu/configs/m5275evb_defconfig b/arch/m68knommu/configs/m5275evb_defconfig new file mode 100644 index 000000000000..0d1256f5addb --- /dev/null +++ b/arch/m68knommu/configs/m5275evb_defconfig | |||
| @@ -0,0 +1,627 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.26-rc1 | ||
| 4 | # | ||
| 5 | CONFIG_M68K=y | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_FPU is not set | ||
| 8 | CONFIG_ZONE_DMA=y | ||
| 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 10 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 11 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 12 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 14 | CONFIG_GENERIC_HWEIGHT=y | ||
| 15 | CONFIG_GENERIC_HARDIRQS=y | ||
| 16 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 17 | CONFIG_GENERIC_TIME=y | ||
| 18 | CONFIG_TIME_LOW_RES=y | ||
| 19 | CONFIG_NO_IOPORT=y | ||
| 20 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
| 21 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 22 | |||
| 23 | # | ||
| 24 | # General setup | ||
| 25 | # | ||
| 26 | CONFIG_EXPERIMENTAL=y | ||
| 27 | CONFIG_BROKEN_ON_SMP=y | ||
| 28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 29 | CONFIG_LOCALVERSION="" | ||
| 30 | CONFIG_LOCALVERSION_AUTO=y | ||
| 31 | # CONFIG_SYSVIPC is not set | ||
| 32 | # CONFIG_POSIX_MQUEUE is not set | ||
| 33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 34 | # CONFIG_TASKSTATS is not set | ||
| 35 | # CONFIG_AUDIT is not set | ||
| 36 | # CONFIG_IKCONFIG is not set | ||
| 37 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 38 | # CONFIG_CGROUPS is not set | ||
| 39 | # CONFIG_GROUP_SCHED is not set | ||
| 40 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
| 41 | # CONFIG_RELAY is not set | ||
| 42 | # CONFIG_NAMESPACES is not set | ||
| 43 | # CONFIG_BLK_DEV_INITRD is not set | ||
| 44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 45 | CONFIG_SYSCTL=y | ||
| 46 | CONFIG_EMBEDDED=y | ||
| 47 | # CONFIG_UID16 is not set | ||
| 48 | # CONFIG_SYSCTL_SYSCALL is not set | ||
| 49 | # CONFIG_KALLSYMS is not set | ||
| 50 | # CONFIG_HOTPLUG is not set | ||
| 51 | CONFIG_PRINTK=y | ||
| 52 | CONFIG_BUG=y | ||
| 53 | CONFIG_ELF_CORE=y | ||
| 54 | # CONFIG_COMPAT_BRK is not set | ||
| 55 | CONFIG_BASE_FULL=y | ||
| 56 | # CONFIG_FUTEX is not set | ||
| 57 | # CONFIG_EPOLL is not set | ||
| 58 | # CONFIG_SIGNALFD is not set | ||
| 59 | # CONFIG_TIMERFD is not set | ||
| 60 | # CONFIG_EVENTFD is not set | ||
| 61 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
| 62 | CONFIG_SLAB=y | ||
| 63 | # CONFIG_SLUB is not set | ||
| 64 | # CONFIG_SLOB is not set | ||
| 65 | # CONFIG_PROFILING is not set | ||
| 66 | # CONFIG_MARKERS is not set | ||
| 67 | # CONFIG_HAVE_OPROFILE is not set | ||
| 68 | # CONFIG_HAVE_KPROBES is not set | ||
| 69 | # CONFIG_HAVE_KRETPROBES is not set | ||
| 70 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
| 71 | CONFIG_SLABINFO=y | ||
| 72 | CONFIG_TINY_SHMEM=y | ||
| 73 | CONFIG_BASE_SMALL=0 | ||
| 74 | CONFIG_MODULES=y | ||
| 75 | CONFIG_MODULE_UNLOAD=y | ||
| 76 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 77 | # CONFIG_MODVERSIONS is not set | ||
| 78 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 79 | # CONFIG_KMOD is not set | ||
| 80 | CONFIG_BLOCK=y | ||
| 81 | # CONFIG_LBD is not set | ||
| 82 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 83 | # CONFIG_LSF is not set | ||
| 84 | # CONFIG_BLK_DEV_BSG is not set | ||
| 85 | |||
| 86 | # | ||
| 87 | # IO Schedulers | ||
| 88 | # | ||
| 89 | CONFIG_IOSCHED_NOOP=y | ||
| 90 | # CONFIG_IOSCHED_AS is not set | ||
| 91 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 92 | # CONFIG_IOSCHED_CFQ is not set | ||
| 93 | # CONFIG_DEFAULT_AS is not set | ||
| 94 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 95 | # CONFIG_DEFAULT_CFQ is not set | ||
| 96 | CONFIG_DEFAULT_NOOP=y | ||
| 97 | CONFIG_DEFAULT_IOSCHED="noop" | ||
| 98 | CONFIG_CLASSIC_RCU=y | ||
| 99 | |||
| 100 | # | ||
| 101 | # Processor type and features | ||
| 102 | # | ||
| 103 | # CONFIG_M68328 is not set | ||
| 104 | # CONFIG_M68EZ328 is not set | ||
| 105 | # CONFIG_M68VZ328 is not set | ||
| 106 | # CONFIG_M68360 is not set | ||
| 107 | # CONFIG_M5206 is not set | ||
| 108 | # CONFIG_M5206e is not set | ||
| 109 | # CONFIG_M520x is not set | ||
| 110 | # CONFIG_M523x is not set | ||
| 111 | # CONFIG_M5249 is not set | ||
| 112 | # CONFIG_M5271 is not set | ||
| 113 | # CONFIG_M5272 is not set | ||
| 114 | CONFIG_M5275=y | ||
| 115 | # CONFIG_M528x is not set | ||
| 116 | # CONFIG_M5307 is not set | ||
| 117 | # CONFIG_M532x is not set | ||
| 118 | # CONFIG_M5407 is not set | ||
| 119 | CONFIG_M527x=y | ||
| 120 | CONFIG_COLDFIRE=y | ||
| 121 | CONFIG_CLOCK_SET=y | ||
| 122 | CONFIG_CLOCK_FREQ=150000000 | ||
| 123 | CONFIG_CLOCK_DIV=2 | ||
| 124 | |||
| 125 | # | ||
| 126 | # Platform | ||
| 127 | # | ||
| 128 | CONFIG_M5275EVB=y | ||
| 129 | CONFIG_FREESCALE=y | ||
| 130 | # CONFIG_4KSTACKS is not set | ||
| 131 | CONFIG_HZ=100 | ||
| 132 | |||
| 133 | # | ||
| 134 | # RAM configuration | ||
| 135 | # | ||
| 136 | CONFIG_RAMBASE=0x00000000 | ||
| 137 | CONFIG_RAMSIZE=0x00000000 | ||
| 138 | CONFIG_VECTORBASE=0x00000000 | ||
| 139 | CONFIG_KERNELBASE=0x00020000 | ||
| 140 | CONFIG_RAMAUTOBIT=y | ||
| 141 | # CONFIG_RAM8BIT is not set | ||
| 142 | # CONFIG_RAM16BIT is not set | ||
| 143 | # CONFIG_RAM32BIT is not set | ||
| 144 | |||
| 145 | # | ||
| 146 | # ROM configuration | ||
| 147 | # | ||
| 148 | # CONFIG_ROM is not set | ||
| 149 | CONFIG_RAMKERNEL=y | ||
| 150 | # CONFIG_ROMKERNEL is not set | ||
| 151 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 152 | CONFIG_FLATMEM_MANUAL=y | ||
| 153 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 154 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 155 | CONFIG_FLATMEM=y | ||
| 156 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 157 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 158 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 159 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 160 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 161 | # CONFIG_RESOURCES_64BIT is not set | ||
| 162 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 163 | CONFIG_VIRT_TO_BUS=y | ||
| 164 | CONFIG_ISA_DMA_API=y | ||
| 165 | |||
| 166 | # | ||
| 167 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 168 | # | ||
| 169 | # CONFIG_PCI is not set | ||
| 170 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 171 | |||
| 172 | # | ||
| 173 | # Executable file formats | ||
| 174 | # | ||
| 175 | CONFIG_BINFMT_FLAT=y | ||
| 176 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 177 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 178 | # CONFIG_BINFMT_AOUT is not set | ||
| 179 | # CONFIG_BINFMT_MISC is not set | ||
| 180 | |||
| 181 | # | ||
| 182 | # Power management options | ||
| 183 | # | ||
| 184 | # CONFIG_PM is not set | ||
| 185 | |||
| 186 | # | ||
| 187 | # Networking | ||
| 188 | # | ||
| 189 | CONFIG_NET=y | ||
| 190 | |||
| 191 | # | ||
| 192 | # Networking options | ||
| 193 | # | ||
| 194 | CONFIG_PACKET=y | ||
| 195 | # CONFIG_PACKET_MMAP is not set | ||
| 196 | CONFIG_UNIX=y | ||
| 197 | # CONFIG_NET_KEY is not set | ||
| 198 | CONFIG_INET=y | ||
| 199 | # CONFIG_IP_MULTICAST is not set | ||
| 200 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 201 | CONFIG_IP_FIB_HASH=y | ||
| 202 | # CONFIG_IP_PNP is not set | ||
| 203 | # CONFIG_NET_IPIP is not set | ||
| 204 | # CONFIG_NET_IPGRE is not set | ||
| 205 | # CONFIG_ARPD is not set | ||
| 206 | # CONFIG_SYN_COOKIES is not set | ||
| 207 | # CONFIG_INET_AH is not set | ||
| 208 | # CONFIG_INET_ESP is not set | ||
| 209 | # CONFIG_INET_IPCOMP is not set | ||
| 210 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 211 | # CONFIG_INET_TUNNEL is not set | ||
| 212 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
| 213 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
| 214 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
| 215 | # CONFIG_INET_LRO is not set | ||
| 216 | # CONFIG_INET_DIAG is not set | ||
| 217 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 218 | CONFIG_TCP_CONG_CUBIC=y | ||
| 219 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 220 | # CONFIG_TCP_MD5SIG is not set | ||
| 221 | # CONFIG_IPV6 is not set | ||
| 222 | # CONFIG_NETWORK_SECMARK is not set | ||
| 223 | # CONFIG_NETFILTER is not set | ||
| 224 | # CONFIG_IP_DCCP is not set | ||
| 225 | # CONFIG_IP_SCTP is not set | ||
| 226 | # CONFIG_TIPC is not set | ||
| 227 | # CONFIG_ATM is not set | ||
| 228 | # CONFIG_BRIDGE is not set | ||
| 229 | # CONFIG_VLAN_8021Q is not set | ||
| 230 | # CONFIG_DECNET is not set | ||
| 231 | # CONFIG_LLC2 is not set | ||
| 232 | # CONFIG_IPX is not set | ||
| 233 | # CONFIG_ATALK is not set | ||
| 234 | # CONFIG_X25 is not set | ||
| 235 | # CONFIG_LAPB is not set | ||
| 236 | # CONFIG_ECONET is not set | ||
| 237 | # CONFIG_WAN_ROUTER is not set | ||
| 238 | # CONFIG_NET_SCHED is not set | ||
| 239 | |||
| 240 | # | ||
| 241 | # Network testing | ||
| 242 | # | ||
| 243 | # CONFIG_NET_PKTGEN is not set | ||
| 244 | # CONFIG_HAMRADIO is not set | ||
| 245 | # CONFIG_CAN is not set | ||
| 246 | # CONFIG_IRDA is not set | ||
| 247 | # CONFIG_BT is not set | ||
| 248 | # CONFIG_AF_RXRPC is not set | ||
| 249 | |||
| 250 | # | ||
| 251 | # Wireless | ||
| 252 | # | ||
| 253 | # CONFIG_CFG80211 is not set | ||
| 254 | # CONFIG_WIRELESS_EXT is not set | ||
| 255 | # CONFIG_MAC80211 is not set | ||
| 256 | # CONFIG_IEEE80211 is not set | ||
| 257 | # CONFIG_RFKILL is not set | ||
| 258 | # CONFIG_NET_9P is not set | ||
| 259 | |||
| 260 | # | ||
| 261 | # Device Drivers | ||
| 262 | # | ||
| 263 | |||
| 264 | # | ||
| 265 | # Generic Driver Options | ||
| 266 | # | ||
| 267 | CONFIG_STANDALONE=y | ||
| 268 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 269 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 270 | # CONFIG_CONNECTOR is not set | ||
| 271 | CONFIG_MTD=y | ||
| 272 | # CONFIG_MTD_DEBUG is not set | ||
| 273 | # CONFIG_MTD_CONCAT is not set | ||
| 274 | CONFIG_MTD_PARTITIONS=y | ||
| 275 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 276 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 277 | # CONFIG_MTD_AR7_PARTS is not set | ||
| 278 | |||
| 279 | # | ||
| 280 | # User Modules And Translation Layers | ||
| 281 | # | ||
| 282 | CONFIG_MTD_CHAR=y | ||
| 283 | CONFIG_MTD_BLKDEVS=y | ||
| 284 | CONFIG_MTD_BLOCK=y | ||
| 285 | # CONFIG_FTL is not set | ||
| 286 | # CONFIG_NFTL is not set | ||
| 287 | # CONFIG_INFTL is not set | ||
| 288 | # CONFIG_RFD_FTL is not set | ||
| 289 | # CONFIG_SSFDC is not set | ||
| 290 | # CONFIG_MTD_OOPS is not set | ||
| 291 | |||
| 292 | # | ||
| 293 | # RAM/ROM/Flash chip drivers | ||
| 294 | # | ||
| 295 | # CONFIG_MTD_CFI is not set | ||
| 296 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 297 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 298 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 299 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 300 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 301 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 302 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 303 | CONFIG_MTD_CFI_I1=y | ||
| 304 | CONFIG_MTD_CFI_I2=y | ||
| 305 | # CONFIG_MTD_CFI_I4 is not set | ||
| 306 | # CONFIG_MTD_CFI_I8 is not set | ||
| 307 | CONFIG_MTD_RAM=y | ||
| 308 | # CONFIG_MTD_ROM is not set | ||
| 309 | # CONFIG_MTD_ABSENT is not set | ||
| 310 | |||
| 311 | # | ||
| 312 | # Mapping drivers for chip access | ||
| 313 | # | ||
| 314 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 315 | CONFIG_MTD_UCLINUX=y | ||
| 316 | # CONFIG_MTD_PLATRAM is not set | ||
| 317 | |||
| 318 | # | ||
| 319 | # Self-contained MTD device drivers | ||
| 320 | # | ||
| 321 | # CONFIG_MTD_SLRAM is not set | ||
| 322 | # CONFIG_MTD_PHRAM is not set | ||
| 323 | # CONFIG_MTD_MTDRAM is not set | ||
| 324 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 325 | |||
| 326 | # | ||
| 327 | # Disk-On-Chip Device Drivers | ||
| 328 | # | ||
| 329 | # CONFIG_MTD_DOC2000 is not set | ||
| 330 | # CONFIG_MTD_DOC2001 is not set | ||
| 331 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 332 | # CONFIG_MTD_NAND is not set | ||
| 333 | # CONFIG_MTD_ONENAND is not set | ||
| 334 | |||
| 335 | # | ||
| 336 | # UBI - Unsorted block images | ||
| 337 | # | ||
| 338 | # CONFIG_MTD_UBI is not set | ||
| 339 | # CONFIG_PARPORT is not set | ||
| 340 | CONFIG_BLK_DEV=y | ||
| 341 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 342 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 343 | # CONFIG_BLK_DEV_NBD is not set | ||
| 344 | CONFIG_BLK_DEV_RAM=y | ||
| 345 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 346 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 347 | # CONFIG_BLK_DEV_XIP is not set | ||
| 348 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 349 | # CONFIG_ATA_OVER_ETH is not set | ||
| 350 | # CONFIG_MISC_DEVICES is not set | ||
| 351 | CONFIG_HAVE_IDE=y | ||
| 352 | # CONFIG_IDE is not set | ||
| 353 | |||
| 354 | # | ||
| 355 | # SCSI device support | ||
| 356 | # | ||
| 357 | # CONFIG_RAID_ATTRS is not set | ||
| 358 | # CONFIG_SCSI is not set | ||
| 359 | # CONFIG_SCSI_DMA is not set | ||
| 360 | # CONFIG_SCSI_NETLINK is not set | ||
| 361 | # CONFIG_MD is not set | ||
| 362 | CONFIG_NETDEVICES=y | ||
| 363 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 364 | # CONFIG_DUMMY is not set | ||
| 365 | # CONFIG_BONDING is not set | ||
| 366 | # CONFIG_MACVLAN is not set | ||
| 367 | # CONFIG_EQUALIZER is not set | ||
| 368 | # CONFIG_TUN is not set | ||
| 369 | # CONFIG_VETH is not set | ||
| 370 | # CONFIG_PHYLIB is not set | ||
| 371 | CONFIG_NET_ETHERNET=y | ||
| 372 | # CONFIG_MII is not set | ||
| 373 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 374 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 375 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 376 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 377 | # CONFIG_B44 is not set | ||
| 378 | CONFIG_FEC=y | ||
| 379 | CONFIG_FEC2=y | ||
| 380 | # CONFIG_NETDEV_1000 is not set | ||
| 381 | # CONFIG_NETDEV_10000 is not set | ||
| 382 | |||
| 383 | # | ||
| 384 | # Wireless LAN | ||
| 385 | # | ||
| 386 | # CONFIG_WLAN_PRE80211 is not set | ||
| 387 | # CONFIG_WLAN_80211 is not set | ||
| 388 | # CONFIG_IWLWIFI is not set | ||
| 389 | # CONFIG_IWLWIFI_LEDS is not set | ||
| 390 | # CONFIG_WAN is not set | ||
| 391 | CONFIG_PPP=y | ||
| 392 | # CONFIG_PPP_MULTILINK is not set | ||
| 393 | # CONFIG_PPP_FILTER is not set | ||
| 394 | # CONFIG_PPP_ASYNC is not set | ||
| 395 | # CONFIG_PPP_SYNC_TTY is not set | ||
| 396 | # CONFIG_PPP_DEFLATE is not set | ||
| 397 | # CONFIG_PPP_BSDCOMP is not set | ||
| 398 | # CONFIG_PPP_MPPE is not set | ||
| 399 | # CONFIG_PPPOE is not set | ||
| 400 | # CONFIG_PPPOL2TP is not set | ||
| 401 | # CONFIG_SLIP is not set | ||
| 402 | CONFIG_SLHC=y | ||
| 403 | # CONFIG_NETCONSOLE is not set | ||
| 404 | # CONFIG_NETPOLL is not set | ||
| 405 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 406 | # CONFIG_ISDN is not set | ||
| 407 | # CONFIG_PHONE is not set | ||
| 408 | |||
| 409 | # | ||
| 410 | # Input device support | ||
| 411 | # | ||
| 412 | # CONFIG_INPUT is not set | ||
| 413 | |||
| 414 | # | ||
| 415 | # Hardware I/O ports | ||
| 416 | # | ||
| 417 | # CONFIG_SERIO is not set | ||
| 418 | # CONFIG_GAMEPORT is not set | ||
| 419 | |||
| 420 | # | ||
| 421 | # Character devices | ||
| 422 | # | ||
| 423 | # CONFIG_VT is not set | ||
| 424 | # CONFIG_DEVKMEM is not set | ||
| 425 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 426 | |||
| 427 | # | ||
| 428 | # Serial drivers | ||
| 429 | # | ||
| 430 | # CONFIG_SERIAL_8250 is not set | ||
| 431 | |||
| 432 | # | ||
| 433 | # Non-8250 serial port support | ||
| 434 | # | ||
| 435 | CONFIG_SERIAL_CORE=y | ||
| 436 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 437 | # CONFIG_SERIAL_COLDFIRE is not set | ||
| 438 | CONFIG_SERIAL_MCF=y | ||
| 439 | CONFIG_SERIAL_MCF_BAUDRATE=19200 | ||
| 440 | CONFIG_SERIAL_MCF_CONSOLE=y | ||
| 441 | # CONFIG_UNIX98_PTYS is not set | ||
| 442 | CONFIG_LEGACY_PTYS=y | ||
| 443 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 444 | # CONFIG_IPMI_HANDLER is not set | ||
| 445 | # CONFIG_HW_RANDOM is not set | ||
| 446 | # CONFIG_GEN_RTC is not set | ||
| 447 | # CONFIG_R3964 is not set | ||
| 448 | # CONFIG_RAW_DRIVER is not set | ||
| 449 | # CONFIG_TCG_TPM is not set | ||
| 450 | # CONFIG_I2C is not set | ||
| 451 | # CONFIG_SPI is not set | ||
| 452 | # CONFIG_W1 is not set | ||
| 453 | # CONFIG_POWER_SUPPLY is not set | ||
| 454 | # CONFIG_HWMON is not set | ||
| 455 | # CONFIG_THERMAL is not set | ||
| 456 | # CONFIG_WATCHDOG is not set | ||
| 457 | |||
| 458 | # | ||
| 459 | # Sonics Silicon Backplane | ||
| 460 | # | ||
| 461 | CONFIG_SSB_POSSIBLE=y | ||
| 462 | # CONFIG_SSB is not set | ||
| 463 | |||
| 464 | # | ||
| 465 | # Multifunction device drivers | ||
| 466 | # | ||
| 467 | # CONFIG_MFD_SM501 is not set | ||
| 468 | # CONFIG_HTC_PASIC3 is not set | ||
| 469 | |||
| 470 | # | ||
| 471 | # Multimedia devices | ||
| 472 | # | ||
| 473 | |||
| 474 | # | ||
| 475 | # Multimedia core support | ||
| 476 | # | ||
| 477 | # CONFIG_VIDEO_DEV is not set | ||
| 478 | # CONFIG_DVB_CORE is not set | ||
| 479 | |||
| 480 | # | ||
| 481 | # Multimedia drivers | ||
| 482 | # | ||
| 483 | CONFIG_DAB=y | ||
| 484 | |||
| 485 | # | ||
| 486 | # Graphics support | ||
| 487 | # | ||
| 488 | # CONFIG_VGASTATE is not set | ||
| 489 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 490 | # CONFIG_FB is not set | ||
| 491 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 492 | |||
| 493 | # | ||
| 494 | # Display device support | ||
| 495 | # | ||
| 496 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 497 | |||
| 498 | # | ||
| 499 | # Sound | ||
| 500 | # | ||
| 501 | # CONFIG_SOUND is not set | ||
| 502 | # CONFIG_USB_SUPPORT is not set | ||
| 503 | # CONFIG_MMC is not set | ||
| 504 | # CONFIG_MEMSTICK is not set | ||
| 505 | # CONFIG_NEW_LEDS is not set | ||
| 506 | # CONFIG_ACCESSIBILITY is not set | ||
| 507 | # CONFIG_RTC_CLASS is not set | ||
| 508 | # CONFIG_UIO is not set | ||
| 509 | |||
| 510 | # | ||
| 511 | # File systems | ||
| 512 | # | ||
| 513 | CONFIG_EXT2_FS=y | ||
| 514 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 515 | # CONFIG_EXT3_FS is not set | ||
| 516 | # CONFIG_EXT4DEV_FS is not set | ||
| 517 | # CONFIG_REISERFS_FS is not set | ||
| 518 | # CONFIG_JFS_FS is not set | ||
| 519 | # CONFIG_FS_POSIX_ACL is not set | ||
| 520 | # CONFIG_XFS_FS is not set | ||
| 521 | # CONFIG_OCFS2_FS is not set | ||
| 522 | # CONFIG_DNOTIFY is not set | ||
| 523 | # CONFIG_INOTIFY is not set | ||
| 524 | # CONFIG_QUOTA is not set | ||
| 525 | # CONFIG_AUTOFS_FS is not set | ||
| 526 | # CONFIG_AUTOFS4_FS is not set | ||
| 527 | # CONFIG_FUSE_FS is not set | ||
| 528 | |||
| 529 | # | ||
| 530 | # CD-ROM/DVD Filesystems | ||
| 531 | # | ||
| 532 | # CONFIG_ISO9660_FS is not set | ||
| 533 | # CONFIG_UDF_FS is not set | ||
| 534 | |||
| 535 | # | ||
| 536 | # DOS/FAT/NT Filesystems | ||
| 537 | # | ||
| 538 | # CONFIG_MSDOS_FS is not set | ||
| 539 | # CONFIG_VFAT_FS is not set | ||
| 540 | # CONFIG_NTFS_FS is not set | ||
| 541 | |||
| 542 | # | ||
| 543 | # Pseudo filesystems | ||
| 544 | # | ||
| 545 | CONFIG_PROC_FS=y | ||
| 546 | CONFIG_PROC_SYSCTL=y | ||
| 547 | CONFIG_SYSFS=y | ||
| 548 | # CONFIG_TMPFS is not set | ||
| 549 | # CONFIG_HUGETLB_PAGE is not set | ||
| 550 | # CONFIG_CONFIGFS_FS is not set | ||
| 551 | |||
| 552 | # | ||
| 553 | # Miscellaneous filesystems | ||
| 554 | # | ||
| 555 | # CONFIG_ADFS_FS is not set | ||
| 556 | # CONFIG_AFFS_FS is not set | ||
| 557 | # CONFIG_HFS_FS is not set | ||
| 558 | # CONFIG_HFSPLUS_FS is not set | ||
| 559 | # CONFIG_BEFS_FS is not set | ||
| 560 | # CONFIG_BFS_FS is not set | ||
| 561 | # CONFIG_EFS_FS is not set | ||
| 562 | # CONFIG_JFFS2_FS is not set | ||
| 563 | # CONFIG_CRAMFS is not set | ||
| 564 | # CONFIG_VXFS_FS is not set | ||
| 565 | # CONFIG_MINIX_FS is not set | ||
| 566 | # CONFIG_HPFS_FS is not set | ||
| 567 | # CONFIG_QNX4FS_FS is not set | ||
| 568 | CONFIG_ROMFS_FS=y | ||
| 569 | # CONFIG_SYSV_FS is not set | ||
| 570 | # CONFIG_UFS_FS is not set | ||
| 571 | CONFIG_NETWORK_FILESYSTEMS=y | ||
| 572 | # CONFIG_NFS_FS is not set | ||
| 573 | # CONFIG_NFSD is not set | ||
| 574 | # CONFIG_SMB_FS is not set | ||
| 575 | # CONFIG_CIFS is not set | ||
| 576 | # CONFIG_NCP_FS is not set | ||
| 577 | # CONFIG_CODA_FS is not set | ||
| 578 | # CONFIG_AFS_FS is not set | ||
| 579 | |||
| 580 | # | ||
| 581 | # Partition Types | ||
| 582 | # | ||
| 583 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 584 | CONFIG_MSDOS_PARTITION=y | ||
| 585 | # CONFIG_NLS is not set | ||
| 586 | # CONFIG_DLM is not set | ||
| 587 | |||
| 588 | # | ||
| 589 | # Kernel hacking | ||
| 590 | # | ||
| 591 | # CONFIG_PRINTK_TIME is not set | ||
| 592 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 593 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 594 | CONFIG_FRAME_WARN=1024 | ||
| 595 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 596 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 597 | # CONFIG_DEBUG_FS is not set | ||
| 598 | # CONFIG_HEADERS_CHECK is not set | ||
| 599 | # CONFIG_DEBUG_KERNEL is not set | ||
| 600 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 601 | # CONFIG_SAMPLES is not set | ||
| 602 | # CONFIG_FULLDEBUG is not set | ||
| 603 | # CONFIG_HIGHPROFILE is not set | ||
| 604 | # CONFIG_BOOTPARAM is not set | ||
| 605 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 606 | # CONFIG_BDM_DISABLE is not set | ||
| 607 | |||
| 608 | # | ||
| 609 | # Security options | ||
| 610 | # | ||
| 611 | # CONFIG_KEYS is not set | ||
| 612 | # CONFIG_SECURITY is not set | ||
| 613 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 614 | # CONFIG_CRYPTO is not set | ||
| 615 | |||
| 616 | # | ||
| 617 | # Library routines | ||
| 618 | # | ||
| 619 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
| 620 | # CONFIG_CRC_CCITT is not set | ||
| 621 | # CONFIG_CRC16 is not set | ||
| 622 | # CONFIG_CRC_ITU_T is not set | ||
| 623 | # CONFIG_CRC32 is not set | ||
| 624 | # CONFIG_CRC7 is not set | ||
| 625 | # CONFIG_LIBCRC32C is not set | ||
| 626 | CONFIG_HAS_IOMEM=y | ||
| 627 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/m68knommu/configs/m5307c3_defconfig b/arch/m68knommu/configs/m5307c3_defconfig new file mode 100644 index 000000000000..fe2acdfa4d76 --- /dev/null +++ b/arch/m68knommu/configs/m5307c3_defconfig | |||
| @@ -0,0 +1,580 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.26-rc1 | ||
| 4 | # | ||
| 5 | CONFIG_M68K=y | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_FPU is not set | ||
| 8 | CONFIG_ZONE_DMA=y | ||
| 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 10 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 11 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 12 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 14 | CONFIG_GENERIC_HWEIGHT=y | ||
| 15 | CONFIG_GENERIC_HARDIRQS=y | ||
| 16 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 17 | CONFIG_GENERIC_TIME=y | ||
| 18 | CONFIG_TIME_LOW_RES=y | ||
| 19 | CONFIG_NO_IOPORT=y | ||
| 20 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
| 21 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 22 | |||
| 23 | # | ||
| 24 | # General setup | ||
| 25 | # | ||
| 26 | CONFIG_EXPERIMENTAL=y | ||
| 27 | CONFIG_BROKEN_ON_SMP=y | ||
| 28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 29 | CONFIG_LOCALVERSION="" | ||
| 30 | CONFIG_LOCALVERSION_AUTO=y | ||
| 31 | # CONFIG_SYSVIPC is not set | ||
| 32 | # CONFIG_POSIX_MQUEUE is not set | ||
| 33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 34 | # CONFIG_TASKSTATS is not set | ||
| 35 | # CONFIG_AUDIT is not set | ||
| 36 | # CONFIG_IKCONFIG is not set | ||
| 37 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 38 | # CONFIG_CGROUPS is not set | ||
| 39 | # CONFIG_GROUP_SCHED is not set | ||
| 40 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
| 41 | # CONFIG_RELAY is not set | ||
| 42 | # CONFIG_NAMESPACES is not set | ||
| 43 | # CONFIG_BLK_DEV_INITRD is not set | ||
| 44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 45 | CONFIG_SYSCTL=y | ||
| 46 | CONFIG_EMBEDDED=y | ||
| 47 | # CONFIG_UID16 is not set | ||
| 48 | # CONFIG_SYSCTL_SYSCALL is not set | ||
| 49 | # CONFIG_KALLSYMS is not set | ||
| 50 | # CONFIG_HOTPLUG is not set | ||
| 51 | CONFIG_PRINTK=y | ||
| 52 | CONFIG_BUG=y | ||
| 53 | CONFIG_ELF_CORE=y | ||
| 54 | # CONFIG_COMPAT_BRK is not set | ||
| 55 | CONFIG_BASE_FULL=y | ||
| 56 | # CONFIG_FUTEX is not set | ||
| 57 | # CONFIG_EPOLL is not set | ||
| 58 | # CONFIG_SIGNALFD is not set | ||
| 59 | # CONFIG_TIMERFD is not set | ||
| 60 | # CONFIG_EVENTFD is not set | ||
| 61 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
| 62 | CONFIG_SLAB=y | ||
| 63 | # CONFIG_SLUB is not set | ||
| 64 | # CONFIG_SLOB is not set | ||
| 65 | # CONFIG_PROFILING is not set | ||
| 66 | # CONFIG_MARKERS is not set | ||
| 67 | # CONFIG_HAVE_OPROFILE is not set | ||
| 68 | # CONFIG_HAVE_KPROBES is not set | ||
| 69 | # CONFIG_HAVE_KRETPROBES is not set | ||
| 70 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
| 71 | CONFIG_SLABINFO=y | ||
| 72 | CONFIG_TINY_SHMEM=y | ||
| 73 | CONFIG_BASE_SMALL=0 | ||
| 74 | CONFIG_MODULES=y | ||
| 75 | CONFIG_MODULE_UNLOAD=y | ||
| 76 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 77 | # CONFIG_MODVERSIONS is not set | ||
| 78 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 79 | # CONFIG_KMOD is not set | ||
| 80 | CONFIG_BLOCK=y | ||
| 81 | # CONFIG_LBD is not set | ||
| 82 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 83 | # CONFIG_LSF is not set | ||
| 84 | # CONFIG_BLK_DEV_BSG is not set | ||
| 85 | |||
| 86 | # | ||
| 87 | # IO Schedulers | ||
| 88 | # | ||
| 89 | CONFIG_IOSCHED_NOOP=y | ||
| 90 | # CONFIG_IOSCHED_AS is not set | ||
| 91 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 92 | # CONFIG_IOSCHED_CFQ is not set | ||
| 93 | # CONFIG_DEFAULT_AS is not set | ||
| 94 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 95 | # CONFIG_DEFAULT_CFQ is not set | ||
| 96 | CONFIG_DEFAULT_NOOP=y | ||
| 97 | CONFIG_DEFAULT_IOSCHED="noop" | ||
| 98 | CONFIG_CLASSIC_RCU=y | ||
| 99 | |||
| 100 | # | ||
| 101 | # Processor type and features | ||
| 102 | # | ||
| 103 | # CONFIG_M68328 is not set | ||
| 104 | # CONFIG_M68EZ328 is not set | ||
| 105 | # CONFIG_M68VZ328 is not set | ||
| 106 | # CONFIG_M68360 is not set | ||
| 107 | # CONFIG_M5206 is not set | ||
| 108 | # CONFIG_M5206e is not set | ||
| 109 | # CONFIG_M520x is not set | ||
| 110 | # CONFIG_M523x is not set | ||
| 111 | # CONFIG_M5249 is not set | ||
| 112 | # CONFIG_M5271 is not set | ||
| 113 | # CONFIG_M5272 is not set | ||
| 114 | # CONFIG_M5275 is not set | ||
| 115 | # CONFIG_M528x is not set | ||
| 116 | CONFIG_M5307=y | ||
| 117 | # CONFIG_M532x is not set | ||
| 118 | # CONFIG_M5407 is not set | ||
| 119 | CONFIG_COLDFIRE=y | ||
| 120 | CONFIG_CLOCK_SET=y | ||
| 121 | CONFIG_CLOCK_FREQ=90000000 | ||
| 122 | CONFIG_CLOCK_DIV=2 | ||
| 123 | # CONFIG_OLDMASK is not set | ||
| 124 | |||
| 125 | # | ||
| 126 | # Platform | ||
| 127 | # | ||
| 128 | # CONFIG_ARN5307 is not set | ||
| 129 | CONFIG_M5307C3=y | ||
| 130 | # CONFIG_eLIA is not set | ||
| 131 | # CONFIG_SECUREEDGEMP3 is not set | ||
| 132 | # CONFIG_CLEOPATRA is not set | ||
| 133 | # CONFIG_NETtel is not set | ||
| 134 | CONFIG_FREESCALE=y | ||
| 135 | # CONFIG_4KSTACKS is not set | ||
| 136 | CONFIG_HZ=100 | ||
| 137 | |||
| 138 | # | ||
| 139 | # RAM configuration | ||
| 140 | # | ||
| 141 | CONFIG_RAMBASE=0x00000000 | ||
| 142 | CONFIG_RAMSIZE=0x00800000 | ||
| 143 | CONFIG_VECTORBASE=0x00000000 | ||
| 144 | CONFIG_KERNELBASE=0x00020000 | ||
| 145 | CONFIG_RAMAUTOBIT=y | ||
| 146 | # CONFIG_RAM8BIT is not set | ||
| 147 | # CONFIG_RAM16BIT is not set | ||
| 148 | # CONFIG_RAM32BIT is not set | ||
| 149 | |||
| 150 | # | ||
| 151 | # ROM configuration | ||
| 152 | # | ||
| 153 | # CONFIG_ROM is not set | ||
| 154 | CONFIG_RAMKERNEL=y | ||
| 155 | # CONFIG_ROMKERNEL is not set | ||
| 156 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 157 | CONFIG_FLATMEM_MANUAL=y | ||
| 158 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 159 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 160 | CONFIG_FLATMEM=y | ||
| 161 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 162 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 163 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 164 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 165 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 166 | # CONFIG_RESOURCES_64BIT is not set | ||
| 167 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 168 | CONFIG_VIRT_TO_BUS=y | ||
| 169 | CONFIG_ISA_DMA_API=y | ||
| 170 | |||
| 171 | # | ||
| 172 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 173 | # | ||
| 174 | # CONFIG_PCI is not set | ||
| 175 | # CONFIG_COMEMPCI is not set | ||
| 176 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 177 | |||
| 178 | # | ||
| 179 | # Executable file formats | ||
| 180 | # | ||
| 181 | CONFIG_BINFMT_FLAT=y | ||
| 182 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 183 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 184 | # CONFIG_BINFMT_AOUT is not set | ||
| 185 | # CONFIG_BINFMT_MISC is not set | ||
| 186 | |||
| 187 | # | ||
| 188 | # Power management options | ||
| 189 | # | ||
| 190 | # CONFIG_PM is not set | ||
| 191 | |||
| 192 | # | ||
| 193 | # Networking | ||
| 194 | # | ||
| 195 | CONFIG_NET=y | ||
| 196 | |||
| 197 | # | ||
| 198 | # Networking options | ||
| 199 | # | ||
| 200 | CONFIG_PACKET=y | ||
| 201 | # CONFIG_PACKET_MMAP is not set | ||
| 202 | CONFIG_UNIX=y | ||
| 203 | # CONFIG_NET_KEY is not set | ||
| 204 | CONFIG_INET=y | ||
| 205 | # CONFIG_IP_MULTICAST is not set | ||
| 206 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 207 | CONFIG_IP_FIB_HASH=y | ||
| 208 | # CONFIG_IP_PNP is not set | ||
| 209 | # CONFIG_NET_IPIP is not set | ||
| 210 | # CONFIG_NET_IPGRE is not set | ||
| 211 | # CONFIG_ARPD is not set | ||
| 212 | # CONFIG_SYN_COOKIES is not set | ||
| 213 | # CONFIG_INET_AH is not set | ||
| 214 | # CONFIG_INET_ESP is not set | ||
| 215 | # CONFIG_INET_IPCOMP is not set | ||
| 216 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 217 | # CONFIG_INET_TUNNEL is not set | ||
| 218 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
| 219 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
| 220 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
| 221 | # CONFIG_INET_LRO is not set | ||
| 222 | # CONFIG_INET_DIAG is not set | ||
| 223 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 224 | CONFIG_TCP_CONG_CUBIC=y | ||
| 225 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 226 | # CONFIG_TCP_MD5SIG is not set | ||
| 227 | # CONFIG_IPV6 is not set | ||
| 228 | # CONFIG_NETWORK_SECMARK is not set | ||
| 229 | # CONFIG_NETFILTER is not set | ||
| 230 | # CONFIG_IP_DCCP is not set | ||
| 231 | # CONFIG_IP_SCTP is not set | ||
| 232 | # CONFIG_TIPC is not set | ||
| 233 | # CONFIG_ATM is not set | ||
| 234 | # CONFIG_BRIDGE is not set | ||
| 235 | # CONFIG_VLAN_8021Q is not set | ||
| 236 | # CONFIG_DECNET is not set | ||
| 237 | # CONFIG_LLC2 is not set | ||
| 238 | # CONFIG_IPX is not set | ||
| 239 | # CONFIG_ATALK is not set | ||
| 240 | # CONFIG_X25 is not set | ||
| 241 | # CONFIG_LAPB is not set | ||
| 242 | # CONFIG_ECONET is not set | ||
| 243 | # CONFIG_WAN_ROUTER is not set | ||
| 244 | # CONFIG_NET_SCHED is not set | ||
| 245 | |||
| 246 | # | ||
| 247 | # Network testing | ||
| 248 | # | ||
| 249 | # CONFIG_NET_PKTGEN is not set | ||
| 250 | # CONFIG_HAMRADIO is not set | ||
| 251 | # CONFIG_CAN is not set | ||
| 252 | # CONFIG_IRDA is not set | ||
| 253 | # CONFIG_BT is not set | ||
| 254 | # CONFIG_AF_RXRPC is not set | ||
| 255 | |||
| 256 | # | ||
| 257 | # Wireless | ||
| 258 | # | ||
| 259 | # CONFIG_CFG80211 is not set | ||
| 260 | # CONFIG_WIRELESS_EXT is not set | ||
| 261 | # CONFIG_MAC80211 is not set | ||
| 262 | # CONFIG_IEEE80211 is not set | ||
| 263 | # CONFIG_RFKILL is not set | ||
| 264 | # CONFIG_NET_9P is not set | ||
| 265 | |||
| 266 | # | ||
| 267 | # Device Drivers | ||
| 268 | # | ||
| 269 | |||
| 270 | # | ||
| 271 | # Generic Driver Options | ||
| 272 | # | ||
| 273 | CONFIG_STANDALONE=y | ||
| 274 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 275 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 276 | # CONFIG_CONNECTOR is not set | ||
| 277 | # CONFIG_MTD is not set | ||
| 278 | # CONFIG_PARPORT is not set | ||
| 279 | CONFIG_BLK_DEV=y | ||
| 280 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 281 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 282 | # CONFIG_BLK_DEV_NBD is not set | ||
| 283 | CONFIG_BLK_DEV_RAM=y | ||
| 284 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 285 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 286 | # CONFIG_BLK_DEV_XIP is not set | ||
| 287 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 288 | # CONFIG_ATA_OVER_ETH is not set | ||
| 289 | # CONFIG_MISC_DEVICES is not set | ||
| 290 | CONFIG_HAVE_IDE=y | ||
| 291 | # CONFIG_IDE is not set | ||
| 292 | |||
| 293 | # | ||
| 294 | # SCSI device support | ||
| 295 | # | ||
| 296 | # CONFIG_RAID_ATTRS is not set | ||
| 297 | # CONFIG_SCSI is not set | ||
| 298 | # CONFIG_SCSI_DMA is not set | ||
| 299 | # CONFIG_SCSI_NETLINK is not set | ||
| 300 | # CONFIG_MD is not set | ||
| 301 | CONFIG_NETDEVICES=y | ||
| 302 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 303 | # CONFIG_DUMMY is not set | ||
| 304 | # CONFIG_BONDING is not set | ||
| 305 | # CONFIG_MACVLAN is not set | ||
| 306 | # CONFIG_EQUALIZER is not set | ||
| 307 | # CONFIG_TUN is not set | ||
| 308 | # CONFIG_VETH is not set | ||
| 309 | # CONFIG_PHYLIB is not set | ||
| 310 | CONFIG_NET_ETHERNET=y | ||
| 311 | # CONFIG_MII is not set | ||
| 312 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 313 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 314 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 315 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 316 | # CONFIG_B44 is not set | ||
| 317 | # CONFIG_NETDEV_1000 is not set | ||
| 318 | # CONFIG_NETDEV_10000 is not set | ||
| 319 | |||
| 320 | # | ||
| 321 | # Wireless LAN | ||
| 322 | # | ||
| 323 | # CONFIG_WLAN_PRE80211 is not set | ||
| 324 | # CONFIG_WLAN_80211 is not set | ||
| 325 | # CONFIG_IWLWIFI is not set | ||
| 326 | # CONFIG_IWLWIFI_LEDS is not set | ||
| 327 | # CONFIG_WAN is not set | ||
| 328 | CONFIG_PPP=y | ||
| 329 | # CONFIG_PPP_MULTILINK is not set | ||
| 330 | # CONFIG_PPP_FILTER is not set | ||
| 331 | # CONFIG_PPP_ASYNC is not set | ||
| 332 | # CONFIG_PPP_SYNC_TTY is not set | ||
| 333 | # CONFIG_PPP_DEFLATE is not set | ||
| 334 | # CONFIG_PPP_BSDCOMP is not set | ||
| 335 | # CONFIG_PPP_MPPE is not set | ||
| 336 | # CONFIG_PPPOE is not set | ||
| 337 | # CONFIG_PPPOL2TP is not set | ||
| 338 | CONFIG_SLIP=y | ||
| 339 | CONFIG_SLIP_COMPRESSED=y | ||
| 340 | CONFIG_SLHC=y | ||
| 341 | # CONFIG_SLIP_SMART is not set | ||
| 342 | # CONFIG_SLIP_MODE_SLIP6 is not set | ||
| 343 | # CONFIG_NETCONSOLE is not set | ||
| 344 | # CONFIG_NETPOLL is not set | ||
| 345 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 346 | # CONFIG_ISDN is not set | ||
| 347 | # CONFIG_PHONE is not set | ||
| 348 | |||
| 349 | # | ||
| 350 | # Input device support | ||
| 351 | # | ||
| 352 | CONFIG_INPUT=y | ||
| 353 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
| 354 | # CONFIG_INPUT_POLLDEV is not set | ||
| 355 | |||
| 356 | # | ||
| 357 | # Userland interfaces | ||
| 358 | # | ||
| 359 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 360 | # CONFIG_INPUT_JOYDEV is not set | ||
| 361 | # CONFIG_INPUT_EVDEV is not set | ||
| 362 | # CONFIG_INPUT_EVBUG is not set | ||
| 363 | |||
| 364 | # | ||
| 365 | # Input Device Drivers | ||
| 366 | # | ||
| 367 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 368 | # CONFIG_INPUT_MOUSE is not set | ||
| 369 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 370 | # CONFIG_INPUT_TABLET is not set | ||
| 371 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 372 | # CONFIG_INPUT_MISC is not set | ||
| 373 | |||
| 374 | # | ||
| 375 | # Hardware I/O ports | ||
| 376 | # | ||
| 377 | # CONFIG_SERIO is not set | ||
| 378 | # CONFIG_GAMEPORT is not set | ||
| 379 | |||
| 380 | # | ||
| 381 | # Character devices | ||
| 382 | # | ||
| 383 | # CONFIG_VT is not set | ||
| 384 | # CONFIG_DEVKMEM is not set | ||
| 385 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 386 | |||
| 387 | # | ||
| 388 | # Serial drivers | ||
| 389 | # | ||
| 390 | # CONFIG_SERIAL_8250 is not set | ||
| 391 | |||
| 392 | # | ||
| 393 | # Non-8250 serial port support | ||
| 394 | # | ||
| 395 | CONFIG_SERIAL_CORE=y | ||
| 396 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 397 | # CONFIG_SERIAL_COLDFIRE is not set | ||
| 398 | CONFIG_SERIAL_MCF=y | ||
| 399 | CONFIG_SERIAL_MCF_BAUDRATE=19200 | ||
| 400 | CONFIG_SERIAL_MCF_CONSOLE=y | ||
| 401 | CONFIG_UNIX98_PTYS=y | ||
| 402 | CONFIG_LEGACY_PTYS=y | ||
| 403 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 404 | # CONFIG_IPMI_HANDLER is not set | ||
| 405 | # CONFIG_HW_RANDOM is not set | ||
| 406 | # CONFIG_GEN_RTC is not set | ||
| 407 | # CONFIG_R3964 is not set | ||
| 408 | # CONFIG_RAW_DRIVER is not set | ||
| 409 | # CONFIG_TCG_TPM is not set | ||
| 410 | # CONFIG_I2C is not set | ||
| 411 | # CONFIG_SPI is not set | ||
| 412 | # CONFIG_W1 is not set | ||
| 413 | # CONFIG_POWER_SUPPLY is not set | ||
| 414 | # CONFIG_HWMON is not set | ||
| 415 | # CONFIG_THERMAL is not set | ||
| 416 | # CONFIG_WATCHDOG is not set | ||
| 417 | |||
| 418 | # | ||
| 419 | # Sonics Silicon Backplane | ||
| 420 | # | ||
| 421 | CONFIG_SSB_POSSIBLE=y | ||
| 422 | # CONFIG_SSB is not set | ||
| 423 | |||
| 424 | # | ||
| 425 | # Multifunction device drivers | ||
| 426 | # | ||
| 427 | # CONFIG_MFD_SM501 is not set | ||
| 428 | # CONFIG_HTC_PASIC3 is not set | ||
| 429 | |||
| 430 | # | ||
| 431 | # Multimedia devices | ||
| 432 | # | ||
| 433 | |||
| 434 | # | ||
| 435 | # Multimedia core support | ||
| 436 | # | ||
| 437 | # CONFIG_VIDEO_DEV is not set | ||
| 438 | # CONFIG_DVB_CORE is not set | ||
| 439 | |||
| 440 | # | ||
| 441 | # Multimedia drivers | ||
| 442 | # | ||
| 443 | CONFIG_DAB=y | ||
| 444 | |||
| 445 | # | ||
| 446 | # Graphics support | ||
| 447 | # | ||
| 448 | # CONFIG_VGASTATE is not set | ||
| 449 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 450 | # CONFIG_FB is not set | ||
| 451 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 452 | |||
| 453 | # | ||
| 454 | # Display device support | ||
| 455 | # | ||
| 456 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 457 | |||
| 458 | # | ||
| 459 | # Sound | ||
| 460 | # | ||
| 461 | # CONFIG_SOUND is not set | ||
| 462 | # CONFIG_HID_SUPPORT is not set | ||
| 463 | # CONFIG_USB_SUPPORT is not set | ||
| 464 | # CONFIG_MMC is not set | ||
| 465 | # CONFIG_MEMSTICK is not set | ||
| 466 | # CONFIG_NEW_LEDS is not set | ||
| 467 | # CONFIG_ACCESSIBILITY is not set | ||
| 468 | # CONFIG_RTC_CLASS is not set | ||
| 469 | # CONFIG_UIO is not set | ||
| 470 | |||
| 471 | # | ||
| 472 | # File systems | ||
| 473 | # | ||
| 474 | CONFIG_EXT2_FS=y | ||
| 475 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 476 | # CONFIG_EXT3_FS is not set | ||
| 477 | # CONFIG_EXT4DEV_FS is not set | ||
| 478 | # CONFIG_REISERFS_FS is not set | ||
| 479 | # CONFIG_JFS_FS is not set | ||
| 480 | # CONFIG_FS_POSIX_ACL is not set | ||
| 481 | # CONFIG_XFS_FS is not set | ||
| 482 | # CONFIG_OCFS2_FS is not set | ||
| 483 | # CONFIG_DNOTIFY is not set | ||
| 484 | # CONFIG_INOTIFY is not set | ||
| 485 | # CONFIG_QUOTA is not set | ||
| 486 | # CONFIG_AUTOFS_FS is not set | ||
| 487 | # CONFIG_AUTOFS4_FS is not set | ||
| 488 | # CONFIG_FUSE_FS is not set | ||
| 489 | |||
| 490 | # | ||
| 491 | # CD-ROM/DVD Filesystems | ||
| 492 | # | ||
| 493 | # CONFIG_ISO9660_FS is not set | ||
| 494 | # CONFIG_UDF_FS is not set | ||
| 495 | |||
| 496 | # | ||
| 497 | # DOS/FAT/NT Filesystems | ||
| 498 | # | ||
| 499 | # CONFIG_MSDOS_FS is not set | ||
| 500 | # CONFIG_VFAT_FS is not set | ||
| 501 | # CONFIG_NTFS_FS is not set | ||
| 502 | |||
| 503 | # | ||
| 504 | # Pseudo filesystems | ||
| 505 | # | ||
| 506 | CONFIG_PROC_FS=y | ||
| 507 | CONFIG_PROC_SYSCTL=y | ||
| 508 | CONFIG_SYSFS=y | ||
| 509 | # CONFIG_TMPFS is not set | ||
| 510 | # CONFIG_HUGETLB_PAGE is not set | ||
| 511 | # CONFIG_CONFIGFS_FS is not set | ||
| 512 | |||
| 513 | # | ||
| 514 | # Miscellaneous filesystems | ||
| 515 | # | ||
| 516 | # CONFIG_ADFS_FS is not set | ||
| 517 | # CONFIG_AFFS_FS is not set | ||
| 518 | # CONFIG_HFS_FS is not set | ||
| 519 | # CONFIG_HFSPLUS_FS is not set | ||
| 520 | # CONFIG_BEFS_FS is not set | ||
| 521 | # CONFIG_BFS_FS is not set | ||
| 522 | # CONFIG_EFS_FS is not set | ||
| 523 | # CONFIG_CRAMFS is not set | ||
| 524 | # CONFIG_VXFS_FS is not set | ||
| 525 | # CONFIG_MINIX_FS is not set | ||
| 526 | # CONFIG_HPFS_FS is not set | ||
| 527 | # CONFIG_QNX4FS_FS is not set | ||
| 528 | CONFIG_ROMFS_FS=y | ||
| 529 | # CONFIG_SYSV_FS is not set | ||
| 530 | # CONFIG_UFS_FS is not set | ||
| 531 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
| 532 | |||
| 533 | # | ||
| 534 | # Partition Types | ||
| 535 | # | ||
| 536 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 537 | CONFIG_MSDOS_PARTITION=y | ||
| 538 | # CONFIG_NLS is not set | ||
| 539 | # CONFIG_DLM is not set | ||
| 540 | |||
| 541 | # | ||
| 542 | # Kernel hacking | ||
| 543 | # | ||
| 544 | # CONFIG_PRINTK_TIME is not set | ||
| 545 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 546 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 547 | CONFIG_FRAME_WARN=1024 | ||
| 548 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 549 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 550 | # CONFIG_DEBUG_FS is not set | ||
| 551 | # CONFIG_HEADERS_CHECK is not set | ||
| 552 | # CONFIG_DEBUG_KERNEL is not set | ||
| 553 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 554 | # CONFIG_SAMPLES is not set | ||
| 555 | CONFIG_FULLDEBUG=y | ||
| 556 | # CONFIG_HIGHPROFILE is not set | ||
| 557 | # CONFIG_BOOTPARAM is not set | ||
| 558 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 559 | # CONFIG_BDM_DISABLE is not set | ||
| 560 | |||
| 561 | # | ||
| 562 | # Security options | ||
| 563 | # | ||
| 564 | # CONFIG_KEYS is not set | ||
| 565 | # CONFIG_SECURITY is not set | ||
| 566 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 567 | # CONFIG_CRYPTO is not set | ||
| 568 | |||
| 569 | # | ||
| 570 | # Library routines | ||
| 571 | # | ||
| 572 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
| 573 | # CONFIG_CRC_CCITT is not set | ||
| 574 | # CONFIG_CRC16 is not set | ||
| 575 | # CONFIG_CRC_ITU_T is not set | ||
| 576 | # CONFIG_CRC32 is not set | ||
| 577 | # CONFIG_CRC7 is not set | ||
| 578 | # CONFIG_LIBCRC32C is not set | ||
| 579 | CONFIG_HAS_IOMEM=y | ||
| 580 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/m68knommu/configs/m5407c3_defconfig b/arch/m68knommu/configs/m5407c3_defconfig new file mode 100644 index 000000000000..1118936d20e3 --- /dev/null +++ b/arch/m68knommu/configs/m5407c3_defconfig | |||
| @@ -0,0 +1,641 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.26-rc1 | ||
| 4 | # Wed May 7 10:25:16 2008 | ||
| 5 | # | ||
| 6 | CONFIG_M68K=y | ||
| 7 | # CONFIG_MMU is not set | ||
| 8 | # CONFIG_FPU is not set | ||
| 9 | CONFIG_ZONE_DMA=y | ||
| 10 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 11 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 12 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 13 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 14 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 15 | CONFIG_GENERIC_HWEIGHT=y | ||
| 16 | CONFIG_GENERIC_HARDIRQS=y | ||
| 17 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 18 | CONFIG_GENERIC_TIME=y | ||
| 19 | CONFIG_TIME_LOW_RES=y | ||
| 20 | CONFIG_NO_IOPORT=y | ||
| 21 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
| 22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 23 | |||
| 24 | # | ||
| 25 | # General setup | ||
| 26 | # | ||
| 27 | CONFIG_EXPERIMENTAL=y | ||
| 28 | CONFIG_BROKEN_ON_SMP=y | ||
| 29 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 30 | CONFIG_LOCALVERSION="" | ||
| 31 | CONFIG_LOCALVERSION_AUTO=y | ||
| 32 | # CONFIG_SYSVIPC is not set | ||
| 33 | # CONFIG_POSIX_MQUEUE is not set | ||
| 34 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 35 | # CONFIG_TASKSTATS is not set | ||
| 36 | # CONFIG_AUDIT is not set | ||
| 37 | # CONFIG_IKCONFIG is not set | ||
| 38 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 39 | # CONFIG_CGROUPS is not set | ||
| 40 | # CONFIG_GROUP_SCHED is not set | ||
| 41 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
| 42 | # CONFIG_RELAY is not set | ||
| 43 | # CONFIG_NAMESPACES is not set | ||
| 44 | # CONFIG_BLK_DEV_INITRD is not set | ||
| 45 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 46 | CONFIG_SYSCTL=y | ||
| 47 | CONFIG_EMBEDDED=y | ||
| 48 | # CONFIG_UID16 is not set | ||
| 49 | # CONFIG_SYSCTL_SYSCALL is not set | ||
| 50 | # CONFIG_KALLSYMS is not set | ||
| 51 | # CONFIG_HOTPLUG is not set | ||
| 52 | CONFIG_PRINTK=y | ||
| 53 | CONFIG_BUG=y | ||
| 54 | CONFIG_ELF_CORE=y | ||
| 55 | # CONFIG_COMPAT_BRK is not set | ||
| 56 | CONFIG_BASE_FULL=y | ||
| 57 | # CONFIG_FUTEX is not set | ||
| 58 | # CONFIG_EPOLL is not set | ||
| 59 | # CONFIG_SIGNALFD is not set | ||
| 60 | # CONFIG_TIMERFD is not set | ||
| 61 | # CONFIG_EVENTFD is not set | ||
| 62 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
| 63 | CONFIG_SLAB=y | ||
| 64 | # CONFIG_SLUB is not set | ||
| 65 | # CONFIG_SLOB is not set | ||
| 66 | # CONFIG_PROFILING is not set | ||
| 67 | # CONFIG_MARKERS is not set | ||
| 68 | # CONFIG_HAVE_OPROFILE is not set | ||
| 69 | # CONFIG_HAVE_KPROBES is not set | ||
| 70 | # CONFIG_HAVE_KRETPROBES is not set | ||
| 71 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
| 72 | CONFIG_SLABINFO=y | ||
| 73 | CONFIG_TINY_SHMEM=y | ||
| 74 | CONFIG_BASE_SMALL=0 | ||
| 75 | CONFIG_MODULES=y | ||
| 76 | CONFIG_MODULE_UNLOAD=y | ||
| 77 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 78 | # CONFIG_MODVERSIONS is not set | ||
| 79 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 80 | # CONFIG_KMOD is not set | ||
| 81 | CONFIG_BLOCK=y | ||
| 82 | # CONFIG_LBD is not set | ||
| 83 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 84 | # CONFIG_LSF is not set | ||
| 85 | # CONFIG_BLK_DEV_BSG is not set | ||
| 86 | |||
| 87 | # | ||
| 88 | # IO Schedulers | ||
| 89 | # | ||
| 90 | CONFIG_IOSCHED_NOOP=y | ||
| 91 | # CONFIG_IOSCHED_AS is not set | ||
| 92 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 93 | # CONFIG_IOSCHED_CFQ is not set | ||
| 94 | # CONFIG_DEFAULT_AS is not set | ||
| 95 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 96 | # CONFIG_DEFAULT_CFQ is not set | ||
| 97 | CONFIG_DEFAULT_NOOP=y | ||
| 98 | CONFIG_DEFAULT_IOSCHED="noop" | ||
| 99 | CONFIG_CLASSIC_RCU=y | ||
| 100 | |||
| 101 | # | ||
| 102 | # Processor type and features | ||
| 103 | # | ||
| 104 | # CONFIG_M68328 is not set | ||
| 105 | # CONFIG_M68EZ328 is not set | ||
| 106 | # CONFIG_M68VZ328 is not set | ||
| 107 | # CONFIG_M68360 is not set | ||
| 108 | # CONFIG_M5206 is not set | ||
| 109 | # CONFIG_M5206e is not set | ||
| 110 | # CONFIG_M520x is not set | ||
| 111 | # CONFIG_M523x is not set | ||
| 112 | # CONFIG_M5249 is not set | ||
| 113 | # CONFIG_M5271 is not set | ||
| 114 | # CONFIG_M5272 is not set | ||
| 115 | # CONFIG_M5275 is not set | ||
| 116 | # CONFIG_M528x is not set | ||
| 117 | # CONFIG_M5307 is not set | ||
| 118 | # CONFIG_M532x is not set | ||
| 119 | CONFIG_M5407=y | ||
| 120 | CONFIG_COLDFIRE=y | ||
| 121 | CONFIG_CLOCK_SET=y | ||
| 122 | CONFIG_CLOCK_FREQ=50000000 | ||
| 123 | CONFIG_CLOCK_DIV=1 | ||
| 124 | |||
| 125 | # | ||
| 126 | # Platform | ||
| 127 | # | ||
| 128 | CONFIG_M5407C3=y | ||
| 129 | # CONFIG_CLEOPATRA is not set | ||
| 130 | CONFIG_FREESCALE=y | ||
| 131 | CONFIG_4KSTACKS=y | ||
| 132 | CONFIG_HZ=100 | ||
| 133 | |||
| 134 | # | ||
| 135 | # RAM configuration | ||
| 136 | # | ||
| 137 | CONFIG_RAMBASE=0x00000000 | ||
| 138 | CONFIG_RAMSIZE=0x00000000 | ||
| 139 | CONFIG_VECTORBASE=0x00000000 | ||
| 140 | CONFIG_KERNELBASE=0x00020000 | ||
| 141 | CONFIG_RAMAUTOBIT=y | ||
| 142 | # CONFIG_RAM8BIT is not set | ||
| 143 | # CONFIG_RAM16BIT is not set | ||
| 144 | # CONFIG_RAM32BIT is not set | ||
| 145 | |||
| 146 | # | ||
| 147 | # ROM configuration | ||
| 148 | # | ||
| 149 | # CONFIG_ROM is not set | ||
| 150 | CONFIG_RAMKERNEL=y | ||
| 151 | # CONFIG_ROMKERNEL is not set | ||
| 152 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 153 | CONFIG_FLATMEM_MANUAL=y | ||
| 154 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 155 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 156 | CONFIG_FLATMEM=y | ||
| 157 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 158 | # CONFIG_SPARSEMEM_STATIC is not set | ||
| 159 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
| 160 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 161 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 162 | # CONFIG_RESOURCES_64BIT is not set | ||
| 163 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 164 | CONFIG_VIRT_TO_BUS=y | ||
| 165 | CONFIG_ISA_DMA_API=y | ||
| 166 | |||
| 167 | # | ||
| 168 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 169 | # | ||
| 170 | # CONFIG_PCI is not set | ||
| 171 | # CONFIG_COMEMPCI is not set | ||
| 172 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 173 | |||
| 174 | # | ||
| 175 | # Executable file formats | ||
| 176 | # | ||
| 177 | CONFIG_BINFMT_FLAT=y | ||
| 178 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 179 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 180 | # CONFIG_BINFMT_AOUT is not set | ||
| 181 | # CONFIG_BINFMT_MISC is not set | ||
| 182 | |||
| 183 | # | ||
| 184 | # Power management options | ||
| 185 | # | ||
| 186 | # CONFIG_PM is not set | ||
| 187 | |||
| 188 | # | ||
| 189 | # Networking | ||
| 190 | # | ||
| 191 | CONFIG_NET=y | ||
| 192 | |||
| 193 | # | ||
| 194 | # Networking options | ||
| 195 | # | ||
| 196 | CONFIG_PACKET=y | ||
| 197 | # CONFIG_PACKET_MMAP is not set | ||
| 198 | CONFIG_UNIX=y | ||
| 199 | # CONFIG_NET_KEY is not set | ||
| 200 | CONFIG_INET=y | ||
| 201 | # CONFIG_IP_MULTICAST is not set | ||
| 202 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 203 | CONFIG_IP_FIB_HASH=y | ||
| 204 | # CONFIG_IP_PNP is not set | ||
| 205 | # CONFIG_NET_IPIP is not set | ||
| 206 | # CONFIG_NET_IPGRE is not set | ||
| 207 | # CONFIG_ARPD is not set | ||
| 208 | # CONFIG_SYN_COOKIES is not set | ||
| 209 | # CONFIG_INET_AH is not set | ||
| 210 | # CONFIG_INET_ESP is not set | ||
| 211 | # CONFIG_INET_IPCOMP is not set | ||
| 212 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 213 | # CONFIG_INET_TUNNEL is not set | ||
| 214 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
| 215 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
| 216 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
| 217 | # CONFIG_INET_LRO is not set | ||
| 218 | # CONFIG_INET_DIAG is not set | ||
| 219 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 220 | CONFIG_TCP_CONG_CUBIC=y | ||
| 221 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 222 | # CONFIG_TCP_MD5SIG is not set | ||
| 223 | # CONFIG_IPV6 is not set | ||
| 224 | # CONFIG_NETWORK_SECMARK is not set | ||
| 225 | # CONFIG_NETFILTER is not set | ||
| 226 | # CONFIG_IP_DCCP is not set | ||
| 227 | # CONFIG_IP_SCTP is not set | ||
| 228 | # CONFIG_TIPC is not set | ||
| 229 | # CONFIG_ATM is not set | ||
| 230 | # CONFIG_BRIDGE is not set | ||
| 231 | # CONFIG_VLAN_8021Q is not set | ||
| 232 | # CONFIG_DECNET is not set | ||
| 233 | # CONFIG_LLC2 is not set | ||
| 234 | # CONFIG_IPX is not set | ||
| 235 | # CONFIG_ATALK is not set | ||
| 236 | # CONFIG_X25 is not set | ||
| 237 | # CONFIG_LAPB is not set | ||
| 238 | # CONFIG_ECONET is not set | ||
| 239 | # CONFIG_WAN_ROUTER is not set | ||
| 240 | # CONFIG_NET_SCHED is not set | ||
| 241 | |||
| 242 | # | ||
| 243 | # Network testing | ||
| 244 | # | ||
| 245 | # CONFIG_NET_PKTGEN is not set | ||
| 246 | # CONFIG_HAMRADIO is not set | ||
| 247 | # CONFIG_CAN is not set | ||
| 248 | # CONFIG_IRDA is not set | ||
| 249 | # CONFIG_BT is not set | ||
| 250 | # CONFIG_AF_RXRPC is not set | ||
| 251 | |||
| 252 | # | ||
| 253 | # Wireless | ||
| 254 | # | ||
| 255 | # CONFIG_CFG80211 is not set | ||
| 256 | # CONFIG_WIRELESS_EXT is not set | ||
| 257 | # CONFIG_MAC80211 is not set | ||
| 258 | # CONFIG_IEEE80211 is not set | ||
| 259 | # CONFIG_RFKILL is not set | ||
| 260 | # CONFIG_NET_9P is not set | ||
| 261 | |||
| 262 | # | ||
| 263 | # Device Drivers | ||
| 264 | # | ||
| 265 | |||
| 266 | # | ||
| 267 | # Generic Driver Options | ||
| 268 | # | ||
| 269 | CONFIG_STANDALONE=y | ||
| 270 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 271 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 272 | # CONFIG_CONNECTOR is not set | ||
| 273 | CONFIG_MTD=y | ||
| 274 | # CONFIG_MTD_DEBUG is not set | ||
| 275 | # CONFIG_MTD_CONCAT is not set | ||
| 276 | CONFIG_MTD_PARTITIONS=y | ||
| 277 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 278 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 279 | # CONFIG_MTD_AR7_PARTS is not set | ||
| 280 | |||
| 281 | # | ||
| 282 | # User Modules And Translation Layers | ||
| 283 | # | ||
| 284 | CONFIG_MTD_CHAR=y | ||
| 285 | CONFIG_MTD_BLKDEVS=y | ||
| 286 | CONFIG_MTD_BLOCK=y | ||
| 287 | # CONFIG_FTL is not set | ||
| 288 | # CONFIG_NFTL is not set | ||
| 289 | # CONFIG_INFTL is not set | ||
| 290 | # CONFIG_RFD_FTL is not set | ||
| 291 | # CONFIG_SSFDC is not set | ||
| 292 | # CONFIG_MTD_OOPS is not set | ||
| 293 | |||
| 294 | # | ||
| 295 | # RAM/ROM/Flash chip drivers | ||
| 296 | # | ||
| 297 | # CONFIG_MTD_CFI is not set | ||
| 298 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 299 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 300 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 301 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 302 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 303 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 304 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 305 | CONFIG_MTD_CFI_I1=y | ||
| 306 | CONFIG_MTD_CFI_I2=y | ||
| 307 | # CONFIG_MTD_CFI_I4 is not set | ||
| 308 | # CONFIG_MTD_CFI_I8 is not set | ||
| 309 | CONFIG_MTD_RAM=y | ||
| 310 | # CONFIG_MTD_ROM is not set | ||
| 311 | # CONFIG_MTD_ABSENT is not set | ||
| 312 | |||
| 313 | # | ||
| 314 | # Mapping drivers for chip access | ||
| 315 | # | ||
| 316 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 317 | CONFIG_MTD_UCLINUX=y | ||
| 318 | # CONFIG_MTD_PLATRAM is not set | ||
| 319 | |||
| 320 | # | ||
| 321 | # Self-contained MTD device drivers | ||
| 322 | # | ||
| 323 | # CONFIG_MTD_SLRAM is not set | ||
| 324 | # CONFIG_MTD_PHRAM is not set | ||
| 325 | # CONFIG_MTD_MTDRAM is not set | ||
| 326 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 327 | |||
| 328 | # | ||
| 329 | # Disk-On-Chip Device Drivers | ||
| 330 | # | ||
| 331 | # CONFIG_MTD_DOC2000 is not set | ||
| 332 | # CONFIG_MTD_DOC2001 is not set | ||
| 333 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 334 | # CONFIG_MTD_NAND is not set | ||
| 335 | # CONFIG_MTD_ONENAND is not set | ||
| 336 | |||
| 337 | # | ||
| 338 | # UBI - Unsorted block images | ||
| 339 | # | ||
| 340 | # CONFIG_MTD_UBI is not set | ||
| 341 | # CONFIG_PARPORT is not set | ||
| 342 | CONFIG_BLK_DEV=y | ||
| 343 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 344 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 345 | # CONFIG_BLK_DEV_NBD is not set | ||
| 346 | CONFIG_BLK_DEV_RAM=y | ||
| 347 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 348 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 349 | # CONFIG_BLK_DEV_XIP is not set | ||
| 350 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 351 | # CONFIG_ATA_OVER_ETH is not set | ||
| 352 | # CONFIG_MISC_DEVICES is not set | ||
| 353 | CONFIG_HAVE_IDE=y | ||
| 354 | # CONFIG_IDE is not set | ||
| 355 | |||
| 356 | # | ||
| 357 | # SCSI device support | ||
| 358 | # | ||
| 359 | # CONFIG_RAID_ATTRS is not set | ||
| 360 | # CONFIG_SCSI is not set | ||
| 361 | # CONFIG_SCSI_DMA is not set | ||
| 362 | # CONFIG_SCSI_NETLINK is not set | ||
| 363 | # CONFIG_MD is not set | ||
| 364 | CONFIG_NETDEVICES=y | ||
| 365 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
| 366 | # CONFIG_DUMMY is not set | ||
| 367 | # CONFIG_BONDING is not set | ||
| 368 | # CONFIG_MACVLAN is not set | ||
| 369 | # CONFIG_EQUALIZER is not set | ||
| 370 | # CONFIG_TUN is not set | ||
| 371 | # CONFIG_VETH is not set | ||
| 372 | # CONFIG_PHYLIB is not set | ||
| 373 | CONFIG_NET_ETHERNET=y | ||
| 374 | # CONFIG_MII is not set | ||
| 375 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 376 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 377 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 378 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 379 | # CONFIG_B44 is not set | ||
| 380 | # CONFIG_NETDEV_1000 is not set | ||
| 381 | # CONFIG_NETDEV_10000 is not set | ||
| 382 | |||
| 383 | # | ||
| 384 | # Wireless LAN | ||
| 385 | # | ||
| 386 | # CONFIG_WLAN_PRE80211 is not set | ||
| 387 | # CONFIG_WLAN_80211 is not set | ||
| 388 | # CONFIG_IWLWIFI is not set | ||
| 389 | # CONFIG_IWLWIFI_LEDS is not set | ||
| 390 | # CONFIG_WAN is not set | ||
| 391 | CONFIG_PPP=y | ||
| 392 | # CONFIG_PPP_MULTILINK is not set | ||
| 393 | # CONFIG_PPP_FILTER is not set | ||
| 394 | # CONFIG_PPP_ASYNC is not set | ||
| 395 | # CONFIG_PPP_SYNC_TTY is not set | ||
| 396 | # CONFIG_PPP_DEFLATE is not set | ||
| 397 | # CONFIG_PPP_BSDCOMP is not set | ||
| 398 | # CONFIG_PPP_MPPE is not set | ||
| 399 | # CONFIG_PPPOE is not set | ||
| 400 | # CONFIG_PPPOL2TP is not set | ||
| 401 | # CONFIG_SLIP is not set | ||
| 402 | CONFIG_SLHC=y | ||
| 403 | # CONFIG_NETCONSOLE is not set | ||
| 404 | # CONFIG_NETPOLL is not set | ||
| 405 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 406 | # CONFIG_ISDN is not set | ||
| 407 | # CONFIG_PHONE is not set | ||
| 408 | |||
| 409 | # | ||
| 410 | # Input device support | ||
| 411 | # | ||
| 412 | CONFIG_INPUT=y | ||
| 413 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
| 414 | # CONFIG_INPUT_POLLDEV is not set | ||
| 415 | |||
| 416 | # | ||
| 417 | # Userland interfaces | ||
| 418 | # | ||
| 419 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 420 | # CONFIG_INPUT_JOYDEV is not set | ||
| 421 | # CONFIG_INPUT_EVDEV is not set | ||
| 422 | # CONFIG_INPUT_EVBUG is not set | ||
| 423 | |||
| 424 | # | ||
| 425 | # Input Device Drivers | ||
| 426 | # | ||
| 427 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 428 | # CONFIG_INPUT_MOUSE is not set | ||
| 429 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 430 | # CONFIG_INPUT_TABLET is not set | ||
| 431 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 432 | # CONFIG_INPUT_MISC is not set | ||
| 433 | |||
| 434 | # | ||
| 435 | # Hardware I/O ports | ||
| 436 | # | ||
| 437 | # CONFIG_SERIO is not set | ||
| 438 | # CONFIG_GAMEPORT is not set | ||
| 439 | |||
| 440 | # | ||
| 441 | # Character devices | ||
| 442 | # | ||
| 443 | # CONFIG_VT is not set | ||
| 444 | # CONFIG_DEVKMEM is not set | ||
| 445 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 446 | |||
| 447 | # | ||
| 448 | # Serial drivers | ||
| 449 | # | ||
| 450 | # CONFIG_SERIAL_8250 is not set | ||
| 451 | |||
| 452 | # | ||
| 453 | # Non-8250 serial port support | ||
| 454 | # | ||
| 455 | CONFIG_SERIAL_CORE=y | ||
| 456 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 457 | # CONFIG_SERIAL_COLDFIRE is not set | ||
| 458 | CONFIG_SERIAL_MCF=y | ||
| 459 | CONFIG_SERIAL_MCF_BAUDRATE=19200 | ||
| 460 | CONFIG_SERIAL_MCF_CONSOLE=y | ||
| 461 | # CONFIG_UNIX98_PTYS is not set | ||
| 462 | CONFIG_LEGACY_PTYS=y | ||
| 463 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 464 | # CONFIG_IPMI_HANDLER is not set | ||
| 465 | # CONFIG_HW_RANDOM is not set | ||
| 466 | # CONFIG_GEN_RTC is not set | ||
| 467 | # CONFIG_R3964 is not set | ||
| 468 | # CONFIG_RAW_DRIVER is not set | ||
| 469 | # CONFIG_TCG_TPM is not set | ||
| 470 | # CONFIG_I2C is not set | ||
| 471 | # CONFIG_SPI is not set | ||
| 472 | # CONFIG_W1 is not set | ||
| 473 | # CONFIG_POWER_SUPPLY is not set | ||
| 474 | # CONFIG_HWMON is not set | ||
| 475 | # CONFIG_THERMAL is not set | ||
| 476 | # CONFIG_WATCHDOG is not set | ||
| 477 | |||
| 478 | # | ||
| 479 | # Sonics Silicon Backplane | ||
| 480 | # | ||
| 481 | CONFIG_SSB_POSSIBLE=y | ||
| 482 | # CONFIG_SSB is not set | ||
| 483 | |||
| 484 | # | ||
| 485 | # Multifunction device drivers | ||
| 486 | # | ||
| 487 | # CONFIG_MFD_SM501 is not set | ||
| 488 | # CONFIG_HTC_PASIC3 is not set | ||
| 489 | |||
| 490 | # | ||
| 491 | # Multimedia devices | ||
| 492 | # | ||
| 493 | |||
| 494 | # | ||
| 495 | # Multimedia core support | ||
| 496 | # | ||
| 497 | # CONFIG_VIDEO_DEV is not set | ||
| 498 | # CONFIG_DVB_CORE is not set | ||
| 499 | |||
| 500 | # | ||
| 501 | # Multimedia drivers | ||
| 502 | # | ||
| 503 | CONFIG_DAB=y | ||
| 504 | |||
| 505 | # | ||
| 506 | # Graphics support | ||
| 507 | # | ||
| 508 | # CONFIG_VGASTATE is not set | ||
| 509 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 510 | # CONFIG_FB is not set | ||
| 511 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 512 | |||
| 513 | # | ||
| 514 | # Display device support | ||
| 515 | # | ||
| 516 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 517 | |||
| 518 | # | ||
| 519 | # Sound | ||
| 520 | # | ||
| 521 | # CONFIG_SOUND is not set | ||
| 522 | # CONFIG_HID_SUPPORT is not set | ||
| 523 | # CONFIG_USB_SUPPORT is not set | ||
| 524 | # CONFIG_MMC is not set | ||
| 525 | # CONFIG_MEMSTICK is not set | ||
| 526 | # CONFIG_NEW_LEDS is not set | ||
| 527 | # CONFIG_ACCESSIBILITY is not set | ||
| 528 | # CONFIG_RTC_CLASS is not set | ||
| 529 | # CONFIG_UIO is not set | ||
| 530 | |||
| 531 | # | ||
| 532 | # File systems | ||
| 533 | # | ||
| 534 | CONFIG_EXT2_FS=y | ||
| 535 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 536 | # CONFIG_EXT3_FS is not set | ||
| 537 | # CONFIG_EXT4DEV_FS is not set | ||
| 538 | # CONFIG_REISERFS_FS is not set | ||
| 539 | # CONFIG_JFS_FS is not set | ||
| 540 | # CONFIG_FS_POSIX_ACL is not set | ||
| 541 | # CONFIG_XFS_FS is not set | ||
| 542 | # CONFIG_OCFS2_FS is not set | ||
| 543 | # CONFIG_DNOTIFY is not set | ||
| 544 | # CONFIG_INOTIFY is not set | ||
| 545 | # CONFIG_QUOTA is not set | ||
| 546 | # CONFIG_AUTOFS_FS is not set | ||
| 547 | # CONFIG_AUTOFS4_FS is not set | ||
| 548 | # CONFIG_FUSE_FS is not set | ||
| 549 | |||
| 550 | # | ||
| 551 | # CD-ROM/DVD Filesystems | ||
| 552 | # | ||
| 553 | # CONFIG_ISO9660_FS is not set | ||
| 554 | # CONFIG_UDF_FS is not set | ||
| 555 | |||
| 556 | # | ||
| 557 | # DOS/FAT/NT Filesystems | ||
| 558 | # | ||
| 559 | # CONFIG_MSDOS_FS is not set | ||
| 560 | # CONFIG_VFAT_FS is not set | ||
| 561 | # CONFIG_NTFS_FS is not set | ||
| 562 | |||
| 563 | # | ||
| 564 | # Pseudo filesystems | ||
| 565 | # | ||
| 566 | CONFIG_PROC_FS=y | ||
| 567 | CONFIG_PROC_SYSCTL=y | ||
| 568 | CONFIG_SYSFS=y | ||
| 569 | # CONFIG_TMPFS is not set | ||
| 570 | # CONFIG_HUGETLB_PAGE is not set | ||
| 571 | # CONFIG_CONFIGFS_FS is not set | ||
| 572 | |||
| 573 | # | ||
| 574 | # Miscellaneous filesystems | ||
| 575 | # | ||
| 576 | # CONFIG_ADFS_FS is not set | ||
| 577 | # CONFIG_AFFS_FS is not set | ||
| 578 | # CONFIG_HFS_FS is not set | ||
| 579 | # CONFIG_HFSPLUS_FS is not set | ||
| 580 | # CONFIG_BEFS_FS is not set | ||
| 581 | # CONFIG_BFS_FS is not set | ||
| 582 | # CONFIG_EFS_FS is not set | ||
| 583 | # CONFIG_JFFS2_FS is not set | ||
| 584 | # CONFIG_CRAMFS is not set | ||
| 585 | # CONFIG_VXFS_FS is not set | ||
| 586 | # CONFIG_MINIX_FS is not set | ||
| 587 | # CONFIG_HPFS_FS is not set | ||
| 588 | # CONFIG_QNX4FS_FS is not set | ||
| 589 | CONFIG_ROMFS_FS=y | ||
| 590 | # CONFIG_SYSV_FS is not set | ||
| 591 | # CONFIG_UFS_FS is not set | ||
| 592 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
| 593 | |||
| 594 | # | ||
| 595 | # Partition Types | ||
| 596 | # | ||
| 597 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 598 | CONFIG_MSDOS_PARTITION=y | ||
| 599 | # CONFIG_NLS is not set | ||
| 600 | # CONFIG_DLM is not set | ||
| 601 | |||
| 602 | # | ||
| 603 | # Kernel hacking | ||
| 604 | # | ||
| 605 | # CONFIG_PRINTK_TIME is not set | ||
| 606 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 607 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 608 | CONFIG_FRAME_WARN=1024 | ||
| 609 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 610 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 611 | # CONFIG_DEBUG_FS is not set | ||
| 612 | # CONFIG_HEADERS_CHECK is not set | ||
| 613 | # CONFIG_DEBUG_KERNEL is not set | ||
| 614 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
| 615 | # CONFIG_SAMPLES is not set | ||
| 616 | # CONFIG_FULLDEBUG is not set | ||
| 617 | # CONFIG_HIGHPROFILE is not set | ||
| 618 | # CONFIG_BOOTPARAM is not set | ||
| 619 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 620 | # CONFIG_BDM_DISABLE is not set | ||
| 621 | |||
| 622 | # | ||
| 623 | # Security options | ||
| 624 | # | ||
| 625 | # CONFIG_KEYS is not set | ||
| 626 | # CONFIG_SECURITY is not set | ||
| 627 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 628 | # CONFIG_CRYPTO is not set | ||
| 629 | |||
| 630 | # | ||
| 631 | # Library routines | ||
| 632 | # | ||
| 633 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
| 634 | # CONFIG_CRC_CCITT is not set | ||
| 635 | # CONFIG_CRC16 is not set | ||
| 636 | # CONFIG_CRC_ITU_T is not set | ||
| 637 | # CONFIG_CRC32 is not set | ||
| 638 | # CONFIG_CRC7 is not set | ||
| 639 | # CONFIG_LIBCRC32C is not set | ||
| 640 | CONFIG_HAS_IOMEM=y | ||
| 641 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c index 03f4fe6a2fc0..5985f1989021 100644 --- a/arch/m68knommu/kernel/setup.c +++ b/arch/m68knommu/kernel/setup.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/fb.h> | 23 | #include <linux/fb.h> |
| 24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 25 | #include <linux/mm.h> | ||
| 25 | #include <linux/console.h> | 26 | #include <linux/console.h> |
| 26 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
| 27 | #include <linux/string.h> | 28 | #include <linux/string.h> |
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index 0ccfb2ad6380..d182b2f72211 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c | |||
| @@ -33,14 +33,13 @@ static inline int set_rtc_mmss(unsigned long nowtime) | |||
| 33 | return -1; | 33 | return -1; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | #ifndef CONFIG_GENERIC_CLOCKEVENTS | ||
| 36 | /* | 37 | /* |
| 37 | * timer_interrupt() needs to keep up the real-time clock, | 38 | * timer_interrupt() needs to keep up the real-time clock, |
| 38 | * as well as call the "do_timer()" routine every clocktick | 39 | * as well as call the "do_timer()" routine every clocktick |
| 39 | */ | 40 | */ |
| 40 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) | 41 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) |
| 41 | { | 42 | { |
| 42 | /* last time the cmos clock got updated */ | ||
| 43 | static long last_rtc_update=0; | ||
| 44 | 43 | ||
| 45 | if (current->pid) | 44 | if (current->pid) |
| 46 | profile_tick(CPU_PROFILING); | 45 | profile_tick(CPU_PROFILING); |
| @@ -49,21 +48,6 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
| 49 | 48 | ||
| 50 | do_timer(1); | 49 | do_timer(1); |
| 51 | 50 | ||
| 52 | /* | ||
| 53 | * If we have an externally synchronized Linux clock, then update | ||
| 54 | * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be | ||
| 55 | * called as close as possible to 500 ms before the new second starts. | ||
| 56 | */ | ||
| 57 | if (ntp_synced() && | ||
| 58 | xtime.tv_sec > last_rtc_update + 660 && | ||
| 59 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | ||
| 60 | (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { | ||
| 61 | if (set_rtc_mmss(xtime.tv_sec) == 0) | ||
| 62 | last_rtc_update = xtime.tv_sec; | ||
| 63 | else | ||
| 64 | last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ | ||
| 65 | } | ||
| 66 | |||
| 67 | write_sequnlock(&xtime_lock); | 51 | write_sequnlock(&xtime_lock); |
| 68 | 52 | ||
| 69 | #ifndef CONFIG_SMP | 53 | #ifndef CONFIG_SMP |
| @@ -71,8 +55,9 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
| 71 | #endif | 55 | #endif |
| 72 | return(IRQ_HANDLED); | 56 | return(IRQ_HANDLED); |
| 73 | } | 57 | } |
| 58 | #endif | ||
| 74 | 59 | ||
| 75 | void time_init(void) | 60 | static unsigned long read_rtc_mmss(void) |
| 76 | { | 61 | { |
| 77 | unsigned int year, mon, day, hour, min, sec; | 62 | unsigned int year, mon, day, hour, min, sec; |
| 78 | 63 | ||
| @@ -83,10 +68,21 @@ void time_init(void) | |||
| 83 | 68 | ||
| 84 | if ((year += 1900) < 1970) | 69 | if ((year += 1900) < 1970) |
| 85 | year += 100; | 70 | year += 100; |
| 86 | xtime.tv_sec = mktime(year, mon, day, hour, min, sec); | ||
| 87 | xtime.tv_nsec = 0; | ||
| 88 | wall_to_monotonic.tv_sec = -xtime.tv_sec; | ||
| 89 | 71 | ||
| 90 | hw_timer_init(); | 72 | return mktime(year, mon, day, hour, min, sec);; |
| 73 | } | ||
| 74 | |||
| 75 | unsigned long read_persistent_clock(void) | ||
| 76 | { | ||
| 77 | return read_rtc_mmss(); | ||
| 91 | } | 78 | } |
| 92 | 79 | ||
| 80 | int update_persistent_clock(struct timespec now) | ||
| 81 | { | ||
| 82 | return set_rtc_mmss(now.tv_sec); | ||
| 83 | } | ||
| 84 | |||
| 85 | void time_init(void) | ||
| 86 | { | ||
| 87 | hw_timer_init(); | ||
| 88 | } | ||
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c index ec9aea652e79..46f8f9d0c408 100644 --- a/arch/m68knommu/kernel/traps.c +++ b/arch/m68knommu/kernel/traps.c | |||
| @@ -103,12 +103,28 @@ asmlinkage void buserr_c(struct frame *fp) | |||
| 103 | force_sig(SIGSEGV, current); | 103 | force_sig(SIGSEGV, current); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | static void print_this_address(unsigned long addr, int i) | ||
| 107 | { | ||
| 108 | #ifdef CONFIG_KALLSYMS | ||
| 109 | printk(KERN_EMERG " [%08lx] ", addr); | ||
| 110 | print_symbol(KERN_CONT "%s\n", addr); | ||
| 111 | #else | ||
| 112 | if (i % 5) | ||
| 113 | printk(KERN_CONT " [%08lx] ", addr); | ||
| 114 | else | ||
| 115 | printk(KERN_CONT "\n" KERN_EMERG " [%08lx] ", addr); | ||
| 116 | i++; | ||
| 117 | #endif | ||
| 118 | } | ||
| 119 | |||
| 106 | int kstack_depth_to_print = 48; | 120 | int kstack_depth_to_print = 48; |
| 107 | 121 | ||
| 108 | static void __show_stack(struct task_struct *task, unsigned long *stack) | 122 | static void __show_stack(struct task_struct *task, unsigned long *stack) |
| 109 | { | 123 | { |
| 110 | unsigned long *endstack, addr; | 124 | unsigned long *endstack, addr; |
| 125 | #ifdef CONFIG_FRAME_POINTER | ||
| 111 | unsigned long *last_stack; | 126 | unsigned long *last_stack; |
| 127 | #endif | ||
| 112 | int i; | 128 | int i; |
| 113 | 129 | ||
| 114 | if (!stack) | 130 | if (!stack) |
| @@ -126,6 +142,7 @@ static void __show_stack(struct task_struct *task, unsigned long *stack) | |||
| 126 | printk(" %08lx", *(stack + i)); | 142 | printk(" %08lx", *(stack + i)); |
| 127 | } | 143 | } |
| 128 | printk("\n"); | 144 | printk("\n"); |
| 145 | i = 0; | ||
| 129 | 146 | ||
| 130 | #ifdef CONFIG_FRAME_POINTER | 147 | #ifdef CONFIG_FRAME_POINTER |
| 131 | printk(KERN_EMERG "Call Trace:\n"); | 148 | printk(KERN_EMERG "Call Trace:\n"); |
| @@ -134,15 +151,30 @@ static void __show_stack(struct task_struct *task, unsigned long *stack) | |||
| 134 | while (stack <= endstack && stack > last_stack) { | 151 | while (stack <= endstack && stack > last_stack) { |
| 135 | 152 | ||
| 136 | addr = *(stack + 1); | 153 | addr = *(stack + 1); |
| 137 | printk(KERN_EMERG " [%08lx] ", addr); | 154 | print_this_address(addr, i); |
| 138 | print_symbol(KERN_CONT "%s\n", addr); | 155 | i++; |
| 139 | 156 | ||
| 140 | last_stack = stack; | 157 | last_stack = stack; |
| 141 | stack = (unsigned long *)*stack; | 158 | stack = (unsigned long *)*stack; |
| 142 | } | 159 | } |
| 143 | printk("\n"); | 160 | printk("\n"); |
| 144 | #else | 161 | #else |
| 145 | printk(KERN_EMERG "CONFIG_FRAME_POINTER disabled, no symbolic call trace\n"); | 162 | printk(KERN_EMERG "Call Trace with CONFIG_FRAME_POINTER disabled:\n"); |
| 163 | while (stack <= endstack) { | ||
| 164 | addr = *stack++; | ||
| 165 | /* | ||
| 166 | * If the address is either in the text segment of the kernel, | ||
| 167 | * or in a region which is occupied by a module then it *may* | ||
| 168 | * be the address of a calling routine; if so, print it so that | ||
| 169 | * someone tracing down the cause of the crash will be able to | ||
| 170 | * figure out the call path that was taken. | ||
| 171 | */ | ||
| 172 | if (__kernel_text_address(addr)) { | ||
| 173 | print_this_address(addr, i); | ||
| 174 | i++; | ||
| 175 | } | ||
| 176 | } | ||
| 177 | printk(KERN_CONT "\n"); | ||
| 146 | #endif | 178 | #endif |
| 147 | } | 179 | } |
| 148 | 180 | ||
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index 93e69236ed6f..69ba9b10767a 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S | |||
| @@ -62,6 +62,7 @@ SECTIONS { | |||
| 62 | .text : { | 62 | .text : { |
| 63 | _text = .; | 63 | _text = .; |
| 64 | _stext = . ; | 64 | _stext = . ; |
| 65 | HEAD_TEXT | ||
| 65 | TEXT_TEXT | 66 | TEXT_TEXT |
| 66 | SCHED_TEXT | 67 | SCHED_TEXT |
| 67 | LOCK_TEXT | 68 | LOCK_TEXT |
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c index 22e2a0d02b81..3bf249c53e41 100644 --- a/arch/m68knommu/mm/init.c +++ b/arch/m68knommu/mm/init.c | |||
| @@ -62,33 +62,6 @@ static unsigned long empty_bad_page; | |||
| 62 | 62 | ||
| 63 | unsigned long empty_zero_page; | 63 | unsigned long empty_zero_page; |
| 64 | 64 | ||
| 65 | void show_mem(void) | ||
| 66 | { | ||
| 67 | unsigned long i; | ||
| 68 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 69 | int cached = 0; | ||
| 70 | |||
| 71 | printk(KERN_INFO "\nMem-info:\n"); | ||
| 72 | show_free_areas(); | ||
| 73 | i = max_mapnr; | ||
| 74 | while (i-- > 0) { | ||
| 75 | total++; | ||
| 76 | if (PageReserved(mem_map+i)) | ||
| 77 | reserved++; | ||
| 78 | else if (PageSwapCache(mem_map+i)) | ||
| 79 | cached++; | ||
| 80 | else if (!page_count(mem_map+i)) | ||
| 81 | free++; | ||
| 82 | else | ||
| 83 | shared += page_count(mem_map+i) - 1; | ||
| 84 | } | ||
| 85 | printk(KERN_INFO "%d pages of RAM\n",total); | ||
| 86 | printk(KERN_INFO "%d free pages\n",free); | ||
| 87 | printk(KERN_INFO "%d reserved pages\n",reserved); | ||
| 88 | printk(KERN_INFO "%d pages shared\n",shared); | ||
| 89 | printk(KERN_INFO "%d pages swap cached\n",cached); | ||
| 90 | } | ||
| 91 | |||
| 92 | extern unsigned long memory_start; | 65 | extern unsigned long memory_start; |
| 93 | extern unsigned long memory_end; | 66 | extern unsigned long memory_end; |
| 94 | 67 | ||
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile index 40cf20be1b90..4f416a91a829 100644 --- a/arch/m68knommu/platform/coldfire/Makefile +++ b/arch/m68knommu/platform/coldfire/Makefile | |||
| @@ -18,7 +18,7 @@ obj-$(CONFIG_COLDFIRE) += dma.o entry.o vectors.o | |||
| 18 | obj-$(CONFIG_M5206) += timers.o | 18 | obj-$(CONFIG_M5206) += timers.o |
| 19 | obj-$(CONFIG_M5206e) += timers.o | 19 | obj-$(CONFIG_M5206e) += timers.o |
| 20 | obj-$(CONFIG_M520x) += pit.o | 20 | obj-$(CONFIG_M520x) += pit.o |
| 21 | obj-$(CONFIG_M523x) += pit.o | 21 | obj-$(CONFIG_M523x) += pit.o dma_timer.o |
| 22 | obj-$(CONFIG_M5249) += timers.o | 22 | obj-$(CONFIG_M5249) += timers.o |
| 23 | obj-$(CONFIG_M527x) += pit.o | 23 | obj-$(CONFIG_M527x) += pit.o |
| 24 | obj-$(CONFIG_M5272) += timers.o | 24 | obj-$(CONFIG_M5272) += timers.o |
diff --git a/arch/m68knommu/platform/coldfire/dma_timer.c b/arch/m68knommu/platform/coldfire/dma_timer.c new file mode 100644 index 000000000000..772578b1084f --- /dev/null +++ b/arch/m68knommu/platform/coldfire/dma_timer.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * dma_timer.c -- Freescale ColdFire DMA Timer. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007, Benedikt Spranger <b.spranger@linutronix.de> | ||
| 5 | * Copyright (C) 2008. Sebastian Siewior, Linutronix | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/clocksource.h> | ||
| 10 | #include <linux/io.h> | ||
| 11 | |||
| 12 | #include <asm/machdep.h> | ||
| 13 | #include <asm/coldfire.h> | ||
| 14 | #include <asm/mcfpit.h> | ||
| 15 | #include <asm/mcfsim.h> | ||
| 16 | |||
| 17 | #define DMA_TIMER_0 (0x00) | ||
| 18 | #define DMA_TIMER_1 (0x40) | ||
| 19 | #define DMA_TIMER_2 (0x80) | ||
| 20 | #define DMA_TIMER_3 (0xc0) | ||
| 21 | |||
| 22 | #define DTMR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x400) | ||
| 23 | #define DTXMR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x402) | ||
| 24 | #define DTER0 (MCF_IPSBAR + DMA_TIMER_0 + 0x403) | ||
| 25 | #define DTRR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x404) | ||
| 26 | #define DTCR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x408) | ||
| 27 | #define DTCN0 (MCF_IPSBAR + DMA_TIMER_0 + 0x40c) | ||
| 28 | |||
| 29 | #define DMA_FREQ ((MCF_CLK / 2) / 16) | ||
| 30 | |||
| 31 | /* DTMR */ | ||
| 32 | #define DMA_DTMR_RESTART (1 << 3) | ||
| 33 | #define DMA_DTMR_CLK_DIV_1 (1 << 1) | ||
| 34 | #define DMA_DTMR_CLK_DIV_16 (2 << 1) | ||
| 35 | #define DMA_DTMR_ENABLE (1 << 0) | ||
| 36 | |||
| 37 | static cycle_t cf_dt_get_cycles(void) | ||
| 38 | { | ||
| 39 | return __raw_readl(DTCN0); | ||
| 40 | } | ||
| 41 | |||
| 42 | static struct clocksource clocksource_cf_dt = { | ||
| 43 | .name = "coldfire_dma_timer", | ||
| 44 | .rating = 200, | ||
| 45 | .read = cf_dt_get_cycles, | ||
| 46 | .mask = CLOCKSOURCE_MASK(32), | ||
| 47 | .shift = 20, | ||
| 48 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
| 49 | }; | ||
| 50 | |||
| 51 | static int __init init_cf_dt_clocksource(void) | ||
| 52 | { | ||
| 53 | /* | ||
| 54 | * We setup DMA timer 0 in free run mode. This incrementing counter is | ||
| 55 | * used as a highly precious clock source. With MCF_CLOCK = 150 MHz we | ||
| 56 | * get a ~213 ns resolution and the 32bit register will overflow almost | ||
| 57 | * every 15 minutes. | ||
| 58 | */ | ||
| 59 | __raw_writeb(0x00, DTXMR0); | ||
| 60 | __raw_writeb(0x00, DTER0); | ||
| 61 | __raw_writel(0x00000000, DTRR0); | ||
| 62 | __raw_writew(DMA_DTMR_CLK_DIV_16 | DMA_DTMR_ENABLE, DTMR0); | ||
| 63 | clocksource_cf_dt.mult = clocksource_hz2mult(DMA_FREQ, | ||
| 64 | clocksource_cf_dt.shift); | ||
| 65 | return clocksource_register(&clocksource_cf_dt); | ||
| 66 | } | ||
| 67 | |||
| 68 | arch_initcall(init_cf_dt_clocksource); | ||
| 69 | |||
| 70 | #define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ | ||
| 71 | #define CYC2NS_SCALE ((1000000 << CYC2NS_SCALE_FACTOR) / (DMA_FREQ / 1000)) | ||
| 72 | |||
| 73 | static unsigned long long cycles2ns(unsigned long cycl) | ||
| 74 | { | ||
| 75 | return (unsigned long long) ((unsigned long long)cycl * | ||
| 76 | CYC2NS_SCALE) >> CYC2NS_SCALE_FACTOR; | ||
| 77 | } | ||
| 78 | |||
| 79 | unsigned long long sched_clock(void) | ||
| 80 | { | ||
| 81 | unsigned long cycl = __raw_readl(DTCN0); | ||
| 82 | |||
| 83 | return cycles2ns(cycl); | ||
| 84 | } | ||
diff --git a/arch/m68knommu/platform/coldfire/head.S b/arch/m68knommu/platform/coldfire/head.S index b9aa0ca29bfb..2b0d73c0cc32 100644 --- a/arch/m68knommu/platform/coldfire/head.S +++ b/arch/m68knommu/platform/coldfire/head.S | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/sys.h> | 11 | #include <linux/sys.h> |
| 12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
| 13 | #include <linux/init.h> | ||
| 13 | #include <asm/asm-offsets.h> | 14 | #include <asm/asm-offsets.h> |
| 14 | #include <asm/coldfire.h> | 15 | #include <asm/coldfire.h> |
| 15 | #include <asm/mcfcache.h> | 16 | #include <asm/mcfcache.h> |
| @@ -126,7 +127,7 @@ _ramend: | |||
| 126 | 127 | ||
| 127 | /*****************************************************************************/ | 128 | /*****************************************************************************/ |
| 128 | 129 | ||
| 129 | .text | 130 | __HEAD |
| 130 | 131 | ||
| 131 | /* | 132 | /* |
| 132 | * This is the codes first entry point. This is where it all | 133 | * This is the codes first entry point. This is where it all |
diff --git a/arch/m68knommu/platform/coldfire/pit.c b/arch/m68knommu/platform/coldfire/pit.c index 4290638012e0..c5b916700b22 100644 --- a/arch/m68knommu/platform/coldfire/pit.c +++ b/arch/m68knommu/platform/coldfire/pit.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
| 21 | #include <linux/clocksource.h> | 21 | #include <linux/clockchips.h> |
| 22 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
| 23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
| 24 | #include <asm/coldfire.h> | 24 | #include <asm/coldfire.h> |
| @@ -33,22 +33,86 @@ | |||
| 33 | #define FREQ ((MCF_CLK / 2) / 64) | 33 | #define FREQ ((MCF_CLK / 2) / 64) |
| 34 | #define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a)) | 34 | #define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a)) |
| 35 | #define INTC0 (MCF_IPSBAR + MCFICM_INTC0) | 35 | #define INTC0 (MCF_IPSBAR + MCFICM_INTC0) |
| 36 | #define PIT_CYCLES_PER_JIFFY (FREQ / HZ) | ||
| 36 | 37 | ||
| 37 | static u32 pit_cycles_per_jiffy; | ||
| 38 | static u32 pit_cnt; | 38 | static u32 pit_cnt; |
| 39 | 39 | ||
| 40 | /* | ||
| 41 | * Initialize the PIT timer. | ||
| 42 | * | ||
| 43 | * This is also called after resume to bring the PIT into operation again. | ||
| 44 | */ | ||
| 45 | |||
| 46 | static void init_cf_pit_timer(enum clock_event_mode mode, | ||
| 47 | struct clock_event_device *evt) | ||
| 48 | { | ||
| 49 | switch (mode) { | ||
| 50 | case CLOCK_EVT_MODE_PERIODIC: | ||
| 51 | |||
| 52 | __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); | ||
| 53 | __raw_writew(PIT_CYCLES_PER_JIFFY, TA(MCFPIT_PMR)); | ||
| 54 | __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | \ | ||
| 55 | MCFPIT_PCSR_OVW | MCFPIT_PCSR_RLD | \ | ||
| 56 | MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR)); | ||
| 57 | break; | ||
| 58 | |||
| 59 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
| 60 | case CLOCK_EVT_MODE_UNUSED: | ||
| 61 | |||
| 62 | __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); | ||
| 63 | break; | ||
| 64 | |||
| 65 | case CLOCK_EVT_MODE_ONESHOT: | ||
| 66 | |||
| 67 | __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); | ||
| 68 | __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | \ | ||
| 69 | MCFPIT_PCSR_OVW | MCFPIT_PCSR_CLK64, \ | ||
| 70 | TA(MCFPIT_PCSR)); | ||
| 71 | break; | ||
| 72 | |||
| 73 | case CLOCK_EVT_MODE_RESUME: | ||
| 74 | /* Nothing to do here */ | ||
| 75 | break; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 | /* | ||
| 80 | * Program the next event in oneshot mode | ||
| 81 | * | ||
| 82 | * Delta is given in PIT ticks | ||
| 83 | */ | ||
| 84 | static int cf_pit_next_event(unsigned long delta, | ||
| 85 | struct clock_event_device *evt) | ||
| 86 | { | ||
| 87 | __raw_writew(delta, TA(MCFPIT_PMR)); | ||
| 88 | return 0; | ||
| 89 | } | ||
| 90 | |||
| 91 | struct clock_event_device cf_pit_clockevent = { | ||
| 92 | .name = "pit", | ||
| 93 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
| 94 | .set_mode = init_cf_pit_timer, | ||
| 95 | .set_next_event = cf_pit_next_event, | ||
| 96 | .shift = 32, | ||
| 97 | .irq = MCFINT_VECBASE + MCFINT_PIT1, | ||
| 98 | }; | ||
| 99 | |||
| 100 | |||
| 101 | |||
| 40 | /***************************************************************************/ | 102 | /***************************************************************************/ |
| 41 | 103 | ||
| 42 | static irqreturn_t pit_tick(int irq, void *dummy) | 104 | static irqreturn_t pit_tick(int irq, void *dummy) |
| 43 | { | 105 | { |
| 106 | struct clock_event_device *evt = &cf_pit_clockevent; | ||
| 44 | u16 pcsr; | 107 | u16 pcsr; |
| 45 | 108 | ||
| 46 | /* Reset the ColdFire timer */ | 109 | /* Reset the ColdFire timer */ |
| 47 | pcsr = __raw_readw(TA(MCFPIT_PCSR)); | 110 | pcsr = __raw_readw(TA(MCFPIT_PCSR)); |
| 48 | __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); | 111 | __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); |
| 49 | 112 | ||
| 50 | pit_cnt += pit_cycles_per_jiffy; | 113 | pit_cnt += PIT_CYCLES_PER_JIFFY; |
| 51 | return arch_timer_interrupt(irq, dummy); | 114 | evt->event_handler(evt); |
| 115 | return IRQ_HANDLED; | ||
| 52 | } | 116 | } |
| 53 | 117 | ||
| 54 | /***************************************************************************/ | 118 | /***************************************************************************/ |
| @@ -72,14 +136,14 @@ static cycle_t pit_read_clk(void) | |||
| 72 | cycles = pit_cnt; | 136 | cycles = pit_cnt; |
| 73 | local_irq_restore(flags); | 137 | local_irq_restore(flags); |
| 74 | 138 | ||
| 75 | return cycles + pit_cycles_per_jiffy - pcntr; | 139 | return cycles + PIT_CYCLES_PER_JIFFY - pcntr; |
| 76 | } | 140 | } |
| 77 | 141 | ||
| 78 | /***************************************************************************/ | 142 | /***************************************************************************/ |
| 79 | 143 | ||
| 80 | static struct clocksource pit_clk = { | 144 | static struct clocksource pit_clk = { |
| 81 | .name = "pit", | 145 | .name = "pit", |
| 82 | .rating = 250, | 146 | .rating = 100, |
| 83 | .read = pit_read_clk, | 147 | .read = pit_read_clk, |
| 84 | .shift = 20, | 148 | .shift = 20, |
| 85 | .mask = CLOCKSOURCE_MASK(32), | 149 | .mask = CLOCKSOURCE_MASK(32), |
| @@ -92,6 +156,14 @@ void hw_timer_init(void) | |||
| 92 | { | 156 | { |
| 93 | u32 imr; | 157 | u32 imr; |
| 94 | 158 | ||
| 159 | cf_pit_clockevent.cpumask = cpumask_of_cpu(smp_processor_id()); | ||
| 160 | cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32); | ||
| 161 | cf_pit_clockevent.max_delta_ns = | ||
| 162 | clockevent_delta2ns(0xFFFF, &cf_pit_clockevent); | ||
| 163 | cf_pit_clockevent.min_delta_ns = | ||
| 164 | clockevent_delta2ns(0x3f, &cf_pit_clockevent); | ||
| 165 | clockevents_register_device(&cf_pit_clockevent); | ||
| 166 | |||
| 95 | setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); | 167 | setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); |
| 96 | 168 | ||
| 97 | __raw_writeb(ICR_INTRCONF, INTC0 + MCFINTC_ICR0 + MCFINT_PIT1); | 169 | __raw_writeb(ICR_INTRCONF, INTC0 + MCFINTC_ICR0 + MCFINT_PIT1); |
| @@ -99,13 +171,6 @@ void hw_timer_init(void) | |||
| 99 | imr &= ~MCFPIT_IMR_IBIT; | 171 | imr &= ~MCFPIT_IMR_IBIT; |
| 100 | __raw_writel(imr, INTC0 + MCFPIT_IMR); | 172 | __raw_writel(imr, INTC0 + MCFPIT_IMR); |
| 101 | 173 | ||
| 102 | /* Set up PIT timer 1 as poll clock */ | ||
| 103 | pit_cycles_per_jiffy = FREQ / HZ; | ||
| 104 | __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); | ||
| 105 | __raw_writew(pit_cycles_per_jiffy, TA(MCFPIT_PMR)); | ||
| 106 | __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | | ||
| 107 | MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR)); | ||
| 108 | |||
| 109 | pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); | 174 | pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); |
| 110 | clocksource_register(&pit_clk); | 175 | clocksource_register(&pit_clk); |
| 111 | } | 176 | } |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b9c754f4070c..b4c4eaa5dd26 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -713,7 +713,7 @@ config CSRC_SB1250 | |||
| 713 | 713 | ||
| 714 | config GPIO_TXX9 | 714 | config GPIO_TXX9 |
| 715 | select GENERIC_GPIO | 715 | select GENERIC_GPIO |
| 716 | select HAVE_GPIO_LIB | 716 | select ARCH_REQUIRE_GPIOLIB |
| 717 | bool | 717 | bool |
| 718 | 718 | ||
| 719 | config CFE | 719 | config CFE |
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index 2166b9e1e80c..bd854a6d1d89 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c | |||
| @@ -31,7 +31,6 @@ | |||
| 31 | 31 | ||
| 32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
| 33 | #include <linux/pm.h> | 33 | #include <linux/pm.h> |
| 34 | #include <linux/pm_legacy.h> | ||
| 35 | #include <linux/sysctl.h> | 34 | #include <linux/sysctl.h> |
| 36 | #include <linux/jiffies.h> | 35 | #include <linux/jiffies.h> |
| 37 | 36 | ||
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index c266211ed653..2fefb14414b7 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | #include <linux/file.h> | 11 | #include <linux/file.h> |
| 12 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
| 13 | #include <linux/highuid.h> | 13 | #include <linux/highuid.h> |
| 14 | #include <linux/dirent.h> | ||
| 15 | #include <linux/resource.h> | 14 | #include <linux/resource.h> |
| 16 | #include <linux/highmem.h> | 15 | #include <linux/highmem.h> |
| 17 | #include <linux/time.h> | 16 | #include <linux/time.h> |
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index e7ed0ac48537..1f60e27523d9 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/moduleloader.h> | 23 | #include <linux/moduleloader.h> |
| 24 | #include <linux/elf.h> | 24 | #include <linux/elf.h> |
| 25 | #include <linux/mm.h> | ||
| 25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
| 26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 27 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index c06f5b5d764c..b16facd9ea8e 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
| @@ -53,7 +53,7 @@ void __noreturn cpu_idle(void) | |||
| 53 | { | 53 | { |
| 54 | /* endless idle loop with no priority at all */ | 54 | /* endless idle loop with no priority at all */ |
| 55 | while (1) { | 55 | while (1) { |
| 56 | tick_nohz_stop_sched_tick(); | 56 | tick_nohz_stop_sched_tick(1); |
| 57 | while (!need_resched()) { | 57 | while (!need_resched()) { |
| 58 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG | 58 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG |
| 59 | extern void smtc_idle_loop_hook(void); | 59 | extern void smtc_idle_loop_hook(void); |
diff --git a/arch/mips/kernel/stacktrace.c b/arch/mips/kernel/stacktrace.c index 5eb4681a73d2..0632e2a849c0 100644 --- a/arch/mips/kernel/stacktrace.c +++ b/arch/mips/kernel/stacktrace.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | */ | 7 | */ |
| 8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
| 9 | #include <linux/stacktrace.h> | 9 | #include <linux/stacktrace.h> |
| 10 | #include <linux/module.h> | ||
| 10 | #include <asm/stacktrace.h> | 11 | #include <asm/stacktrace.h> |
| 11 | 12 | ||
| 12 | /* | 13 | /* |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 3523c8d12eda..343015a2f418 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
| @@ -52,7 +52,7 @@ asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs) | |||
| 52 | int fd[2]; | 52 | int fd[2]; |
| 53 | int error, res; | 53 | int error, res; |
| 54 | 54 | ||
| 55 | error = do_pipe(fd); | 55 | error = do_pipe_flags(fd, 0); |
| 56 | if (error) { | 56 | if (error) { |
| 57 | res = error; | 57 | res = error; |
| 58 | goto out; | 58 | goto out; |
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile index 48731020ca0e..44e8dd8106bf 100644 --- a/arch/mips/mm/Makefile +++ b/arch/mips/mm/Makefile | |||
| @@ -3,8 +3,7 @@ | |||
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y += cache.o dma-default.o extable.o fault.o \ | 5 | obj-y += cache.o dma-default.o extable.o fault.o \ |
| 6 | init.o pgtable.o tlbex.o tlbex-fault.o \ | 6 | init.o tlbex.o tlbex-fault.o uasm.o page.o |
| 7 | uasm.o page.o | ||
| 8 | 7 | ||
| 9 | obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o | 8 | obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o |
| 10 | obj-$(CONFIG_64BIT) += pgtable-64.o | 9 | obj-$(CONFIG_64BIT) += pgtable-64.o |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index ae39dd88b9aa..891312f8e5a6 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
| @@ -348,7 +348,7 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nele | |||
| 348 | 348 | ||
| 349 | EXPORT_SYMBOL(dma_sync_sg_for_device); | 349 | EXPORT_SYMBOL(dma_sync_sg_for_device); |
| 350 | 350 | ||
| 351 | int dma_mapping_error(dma_addr_t dma_addr) | 351 | int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
| 352 | { | 352 | { |
| 353 | return 0; | 353 | return 0; |
| 354 | } | 354 | } |
diff --git a/arch/mips/mm/pgtable.c b/arch/mips/mm/pgtable.c deleted file mode 100644 index 7dfa579ab24c..000000000000 --- a/arch/mips/mm/pgtable.c +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | #include <linux/kernel.h> | ||
| 2 | #include <linux/mm.h> | ||
| 3 | #include <linux/swap.h> | ||
| 4 | |||
| 5 | void show_mem(void) | ||
| 6 | { | ||
| 7 | #ifndef CONFIG_NEED_MULTIPLE_NODES /* XXX(hch): later.. */ | ||
| 8 | int pfn, total = 0, reserved = 0; | ||
| 9 | int shared = 0, cached = 0; | ||
| 10 | int highmem = 0; | ||
| 11 | struct page *page; | ||
| 12 | |||
| 13 | printk("Mem-info:\n"); | ||
| 14 | show_free_areas(); | ||
| 15 | pfn = max_mapnr; | ||
| 16 | while (pfn-- > 0) { | ||
| 17 | if (!pfn_valid(pfn)) | ||
| 18 | continue; | ||
| 19 | page = pfn_to_page(pfn); | ||
| 20 | total++; | ||
| 21 | if (PageHighMem(page)) | ||
| 22 | highmem++; | ||
| 23 | if (PageReserved(page)) | ||
| 24 | reserved++; | ||
| 25 | else if (PageSwapCache(page)) | ||
| 26 | cached++; | ||
| 27 | else if (page_count(page)) | ||
| 28 | shared += page_count(page) - 1; | ||
| 29 | } | ||
| 30 | printk("%d pages of RAM\n", total); | ||
| 31 | printk("%d pages of HIGHMEM\n", highmem); | ||
| 32 | printk("%d reserved pages\n", reserved); | ||
| 33 | printk("%d pages shared\n", shared); | ||
| 34 | printk("%d pages swap cached\n", cached); | ||
| 35 | #endif | ||
| 36 | } | ||
diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c index 48932ce1d730..d9c79d8be81d 100644 --- a/arch/mips/sgi-ip27/ip27-klnuma.c +++ b/arch/mips/sgi-ip27/ip27-klnuma.c | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com) | 4 | * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com) |
| 5 | */ | 5 | */ |
| 6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
| 7 | #include <linux/mm.h> | ||
| 7 | #include <linux/mmzone.h> | 8 | #include <linux/mmzone.h> |
| 8 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 9 | #include <linux/nodemask.h> | 10 | #include <linux/nodemask.h> |
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index 42cd10956306..060d853d7b35 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
| @@ -33,8 +33,6 @@ | |||
| 33 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) | 33 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) |
| 34 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) | 34 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) |
| 35 | 35 | ||
| 36 | static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES]; | ||
| 37 | |||
| 38 | struct node_data *__node_data[MAX_COMPACT_NODES]; | 36 | struct node_data *__node_data[MAX_COMPACT_NODES]; |
| 39 | 37 | ||
| 40 | EXPORT_SYMBOL(__node_data); | 38 | EXPORT_SYMBOL(__node_data); |
| @@ -403,7 +401,7 @@ static void __init node_mem_init(cnodeid_t node) | |||
| 403 | */ | 401 | */ |
| 404 | __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); | 402 | __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); |
| 405 | 403 | ||
| 406 | NODE_DATA(node)->bdata = &plat_node_bdata[node]; | 404 | NODE_DATA(node)->bdata = &bootmem_node_data[node]; |
| 407 | NODE_DATA(node)->node_start_pfn = start_pfn; | 405 | NODE_DATA(node)->node_start_pfn = start_pfn; |
| 408 | NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; | 406 | NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; |
| 409 | 407 | ||
diff --git a/arch/mn10300/boot/compressed/misc.c b/arch/mn10300/boot/compressed/misc.c index ded207efc97a..f673383518e4 100644 --- a/arch/mn10300/boot/compressed/misc.c +++ b/arch/mn10300/boot/compressed/misc.c | |||
| @@ -153,26 +153,9 @@ static uch *output_data; | |||
| 153 | static unsigned long output_ptr; | 153 | static unsigned long output_ptr; |
| 154 | 154 | ||
| 155 | 155 | ||
| 156 | static void *malloc(int size); | ||
| 157 | |||
| 158 | static inline void free(void *where) | ||
| 159 | { /* Don't care */ | ||
| 160 | } | ||
| 161 | |||
| 162 | static unsigned long free_mem_ptr = (unsigned long) &end; | 156 | static unsigned long free_mem_ptr = (unsigned long) &end; |
| 163 | static unsigned long free_mem_end_ptr = (unsigned long) &end + 0x90000; | 157 | static unsigned long free_mem_end_ptr = (unsigned long) &end + 0x90000; |
| 164 | 158 | ||
| 165 | static inline void gzip_mark(void **ptr) | ||
| 166 | { | ||
| 167 | kputs("."); | ||
| 168 | *ptr = (void *) free_mem_ptr; | ||
| 169 | } | ||
| 170 | |||
| 171 | static inline void gzip_release(void **ptr) | ||
| 172 | { | ||
| 173 | free_mem_ptr = (unsigned long) *ptr; | ||
| 174 | } | ||
| 175 | |||
| 176 | #define INPLACE_MOVE_ROUTINE 0x1000 | 159 | #define INPLACE_MOVE_ROUTINE 0x1000 |
| 177 | #define LOW_BUFFER_START 0x2000 | 160 | #define LOW_BUFFER_START 0x2000 |
| 178 | #define LOW_BUFFER_END 0x90000 | 161 | #define LOW_BUFFER_END 0x90000 |
| @@ -186,26 +169,6 @@ static int lines, cols; | |||
| 186 | 169 | ||
| 187 | #include "../../../../lib/inflate.c" | 170 | #include "../../../../lib/inflate.c" |
| 188 | 171 | ||
| 189 | static void *malloc(int size) | ||
| 190 | { | ||
| 191 | void *p; | ||
| 192 | |||
| 193 | if (size < 0) | ||
| 194 | error("Malloc error\n"); | ||
| 195 | if (!free_mem_ptr) | ||
| 196 | error("Memory error\n"); | ||
| 197 | |||
| 198 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 199 | |||
| 200 | p = (void *) free_mem_ptr; | ||
| 201 | free_mem_ptr += size; | ||
| 202 | |||
| 203 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 204 | error("\nOut of memory\n"); | ||
| 205 | |||
| 206 | return p; | ||
| 207 | } | ||
| 208 | |||
| 209 | static inline void scroll(void) | 172 | static inline void scroll(void) |
| 210 | { | 173 | { |
| 211 | int i; | 174 | int i; |
diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c index 21891c71d549..54be6afb5555 100644 --- a/arch/mn10300/kernel/gdb-stub.c +++ b/arch/mn10300/kernel/gdb-stub.c | |||
| @@ -163,8 +163,6 @@ static char input_buffer[BUFMAX]; | |||
| 163 | static char output_buffer[BUFMAX]; | 163 | static char output_buffer[BUFMAX]; |
| 164 | static char trans_buffer[BUFMAX]; | 164 | static char trans_buffer[BUFMAX]; |
| 165 | 165 | ||
| 166 | static const char hexchars[] = "0123456789abcdef"; | ||
| 167 | |||
| 168 | struct gdbstub_bkpt { | 166 | struct gdbstub_bkpt { |
| 169 | u8 *addr; /* address of breakpoint */ | 167 | u8 *addr; /* address of breakpoint */ |
| 170 | u8 len; /* size of breakpoint */ | 168 | u8 len; /* size of breakpoint */ |
| @@ -363,8 +361,8 @@ static int putpacket(char *buffer) | |||
| 363 | } | 361 | } |
| 364 | 362 | ||
| 365 | gdbstub_io_tx_char('#'); | 363 | gdbstub_io_tx_char('#'); |
| 366 | gdbstub_io_tx_char(hexchars[checksum >> 4]); | 364 | gdbstub_io_tx_char(hex_asc_hi(checksum)); |
| 367 | gdbstub_io_tx_char(hexchars[checksum & 0xf]); | 365 | gdbstub_io_tx_char(hex_asc_lo(checksum)); |
| 368 | 366 | ||
| 369 | } while (gdbstub_io_rx_char(&ch, 0), | 367 | } while (gdbstub_io_rx_char(&ch, 0), |
| 370 | ch == '-' && (gdbstub_io("### GDB Rx NAK\n"), 0), | 368 | ch == '-' && (gdbstub_io("### GDB Rx NAK\n"), 0), |
| @@ -822,8 +820,7 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
| 822 | if ((u32) mem & 1 && count >= 1) { | 820 | if ((u32) mem & 1 && count >= 1) { |
| 823 | if (gdbstub_read_byte(mem, ch) != 0) | 821 | if (gdbstub_read_byte(mem, ch) != 0) |
| 824 | return 0; | 822 | return 0; |
| 825 | *buf++ = hexchars[ch[0] >> 4]; | 823 | buf = pack_hex_byte(buf, ch[0]); |
| 826 | *buf++ = hexchars[ch[0] & 0xf]; | ||
| 827 | mem++; | 824 | mem++; |
| 828 | count--; | 825 | count--; |
| 829 | } | 826 | } |
| @@ -831,10 +828,8 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
| 831 | if ((u32) mem & 3 && count >= 2) { | 828 | if ((u32) mem & 3 && count >= 2) { |
| 832 | if (gdbstub_read_word(mem, ch) != 0) | 829 | if (gdbstub_read_word(mem, ch) != 0) |
| 833 | return 0; | 830 | return 0; |
| 834 | *buf++ = hexchars[ch[0] >> 4]; | 831 | buf = pack_hex_byte(buf, ch[0]); |
| 835 | *buf++ = hexchars[ch[0] & 0xf]; | 832 | buf = pack_hex_byte(buf, ch[1]); |
| 836 | *buf++ = hexchars[ch[1] >> 4]; | ||
| 837 | *buf++ = hexchars[ch[1] & 0xf]; | ||
| 838 | mem += 2; | 833 | mem += 2; |
| 839 | count -= 2; | 834 | count -= 2; |
| 840 | } | 835 | } |
| @@ -842,14 +837,10 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
| 842 | while (count >= 4) { | 837 | while (count >= 4) { |
| 843 | if (gdbstub_read_dword(mem, ch) != 0) | 838 | if (gdbstub_read_dword(mem, ch) != 0) |
| 844 | return 0; | 839 | return 0; |
| 845 | *buf++ = hexchars[ch[0] >> 4]; | 840 | buf = pack_hex_byte(buf, ch[0]); |
| 846 | *buf++ = hexchars[ch[0] & 0xf]; | 841 | buf = pack_hex_byte(buf, ch[1]); |
| 847 | *buf++ = hexchars[ch[1] >> 4]; | 842 | buf = pack_hex_byte(buf, ch[2]); |
| 848 | *buf++ = hexchars[ch[1] & 0xf]; | 843 | buf = pack_hex_byte(buf, ch[3]); |
| 849 | *buf++ = hexchars[ch[2] >> 4]; | ||
| 850 | *buf++ = hexchars[ch[2] & 0xf]; | ||
| 851 | *buf++ = hexchars[ch[3] >> 4]; | ||
| 852 | *buf++ = hexchars[ch[3] & 0xf]; | ||
| 853 | mem += 4; | 844 | mem += 4; |
| 854 | count -= 4; | 845 | count -= 4; |
| 855 | } | 846 | } |
| @@ -857,10 +848,8 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
| 857 | if (count >= 2) { | 848 | if (count >= 2) { |
| 858 | if (gdbstub_read_word(mem, ch) != 0) | 849 | if (gdbstub_read_word(mem, ch) != 0) |
| 859 | return 0; | 850 | return 0; |
| 860 | *buf++ = hexchars[ch[0] >> 4]; | 851 | buf = pack_hex_byte(buf, ch[0]); |
| 861 | *buf++ = hexchars[ch[0] & 0xf]; | 852 | buf = pack_hex_byte(buf, ch[1]); |
| 862 | *buf++ = hexchars[ch[1] >> 4]; | ||
| 863 | *buf++ = hexchars[ch[1] & 0xf]; | ||
| 864 | mem += 2; | 853 | mem += 2; |
| 865 | count -= 2; | 854 | count -= 2; |
| 866 | } | 855 | } |
| @@ -868,8 +857,7 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
| 868 | if (count >= 1) { | 857 | if (count >= 1) { |
| 869 | if (gdbstub_read_byte(mem, ch) != 0) | 858 | if (gdbstub_read_byte(mem, ch) != 0) |
| 870 | return 0; | 859 | return 0; |
| 871 | *buf++ = hexchars[ch[0] >> 4]; | 860 | buf = pack_hex_byte(buf, ch[0]); |
| 872 | *buf++ = hexchars[ch[0] & 0xf]; | ||
| 873 | } | 861 | } |
| 874 | 862 | ||
| 875 | *buf = 0; | 863 | *buf = 0; |
| @@ -1304,14 +1292,14 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
| 1304 | *ptr++ = 'O'; | 1292 | *ptr++ = 'O'; |
| 1305 | ptr = mem2hex(title, ptr, sizeof(title) - 1, 0); | 1293 | ptr = mem2hex(title, ptr, sizeof(title) - 1, 0); |
| 1306 | 1294 | ||
| 1307 | hx = hexchars[(excep & 0xf000) >> 12]; | 1295 | hx = hex_asc_hi(excep >> 8); |
| 1308 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1296 | ptr = pack_hex_byte(ptr, hx); |
| 1309 | hx = hexchars[(excep & 0x0f00) >> 8]; | 1297 | hx = hex_asc_lo(excep >> 8); |
| 1310 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1298 | ptr = pack_hex_byte(ptr, hx); |
| 1311 | hx = hexchars[(excep & 0x00f0) >> 4]; | 1299 | hx = hex_asc_hi(excep); |
| 1312 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1300 | ptr = pack_hex_byte(ptr, hx); |
| 1313 | hx = hexchars[(excep & 0x000f)]; | 1301 | hx = hex_asc_lo(excep); |
| 1314 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1302 | ptr = pack_hex_byte(ptr, hx); |
| 1315 | 1303 | ||
| 1316 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); | 1304 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); |
| 1317 | *ptr = 0; | 1305 | *ptr = 0; |
| @@ -1322,22 +1310,22 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
| 1322 | *ptr++ = 'O'; | 1310 | *ptr++ = 'O'; |
| 1323 | ptr = mem2hex(tbcberr, ptr, sizeof(tbcberr) - 1, 0); | 1311 | ptr = mem2hex(tbcberr, ptr, sizeof(tbcberr) - 1, 0); |
| 1324 | 1312 | ||
| 1325 | hx = hexchars[(bcberr & 0xf0000000) >> 28]; | 1313 | hx = hex_asc_hi(bcberr >> 24); |
| 1326 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1314 | ptr = pack_hex_byte(ptr, hx); |
| 1327 | hx = hexchars[(bcberr & 0x0f000000) >> 24]; | 1315 | hx = hex_asc_lo(bcberr >> 24); |
| 1328 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1316 | ptr = pack_hex_byte(ptr, hx); |
| 1329 | hx = hexchars[(bcberr & 0x00f00000) >> 20]; | 1317 | hx = hex_asc_hi(bcberr >> 16); |
| 1330 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1318 | ptr = pack_hex_byte(ptr, hx); |
| 1331 | hx = hexchars[(bcberr & 0x000f0000) >> 16]; | 1319 | hx = hex_asc_lo(bcberr >> 16); |
| 1332 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1320 | ptr = pack_hex_byte(ptr, hx); |
| 1333 | hx = hexchars[(bcberr & 0x0000f000) >> 12]; | 1321 | hx = hex_asc_hi(bcberr >> 8); |
| 1334 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1322 | ptr = pack_hex_byte(ptr, hx); |
| 1335 | hx = hexchars[(bcberr & 0x00000f00) >> 8]; | 1323 | hx = hex_asc_lo(bcberr >> 8); |
| 1336 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1324 | ptr = pack_hex_byte(ptr, hx); |
| 1337 | hx = hexchars[(bcberr & 0x000000f0) >> 4]; | 1325 | hx = hex_asc_hi(bcberr); |
| 1338 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1326 | ptr = pack_hex_byte(ptr, hx); |
| 1339 | hx = hexchars[(bcberr & 0x0000000f)]; | 1327 | hx = hex_asc_lo(bcberr); |
| 1340 | *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf]; | 1328 | ptr = pack_hex_byte(ptr, hx); |
| 1341 | 1329 | ||
| 1342 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); | 1330 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); |
| 1343 | *ptr = 0; | 1331 | *ptr = 0; |
| @@ -1353,14 +1341,12 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
| 1353 | * Send trap type (converted to signal) | 1341 | * Send trap type (converted to signal) |
| 1354 | */ | 1342 | */ |
| 1355 | *ptr++ = 'T'; | 1343 | *ptr++ = 'T'; |
| 1356 | *ptr++ = hexchars[sigval >> 4]; | 1344 | ptr = pack_hex_byte(ptr, sigval); |
| 1357 | *ptr++ = hexchars[sigval & 0xf]; | ||
| 1358 | 1345 | ||
| 1359 | /* | 1346 | /* |
| 1360 | * Send Error PC | 1347 | * Send Error PC |
| 1361 | */ | 1348 | */ |
| 1362 | *ptr++ = hexchars[GDB_REGID_PC >> 4]; | 1349 | ptr = pack_hex_byte(ptr, GDB_REGID_PC); |
| 1363 | *ptr++ = hexchars[GDB_REGID_PC & 0xf]; | ||
| 1364 | *ptr++ = ':'; | 1350 | *ptr++ = ':'; |
| 1365 | ptr = mem2hex(®s->pc, ptr, 4, 0); | 1351 | ptr = mem2hex(®s->pc, ptr, 4, 0); |
| 1366 | *ptr++ = ';'; | 1352 | *ptr++ = ';'; |
| @@ -1368,8 +1354,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
| 1368 | /* | 1354 | /* |
| 1369 | * Send frame pointer | 1355 | * Send frame pointer |
| 1370 | */ | 1356 | */ |
| 1371 | *ptr++ = hexchars[GDB_REGID_FP >> 4]; | 1357 | ptr = pack_hex_byte(ptr, GDB_REGID_FP); |
| 1372 | *ptr++ = hexchars[GDB_REGID_FP & 0xf]; | ||
| 1373 | *ptr++ = ':'; | 1358 | *ptr++ = ':'; |
| 1374 | ptr = mem2hex(®s->a3, ptr, 4, 0); | 1359 | ptr = mem2hex(®s->a3, ptr, 4, 0); |
| 1375 | *ptr++ = ';'; | 1360 | *ptr++ = ';'; |
| @@ -1378,8 +1363,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
| 1378 | * Send stack pointer | 1363 | * Send stack pointer |
| 1379 | */ | 1364 | */ |
| 1380 | ssp = (unsigned long) (regs + 1); | 1365 | ssp = (unsigned long) (regs + 1); |
| 1381 | *ptr++ = hexchars[GDB_REGID_SP >> 4]; | 1366 | ptr = pack_hex_byte(ptr, GDB_REGID_SP); |
| 1382 | *ptr++ = hexchars[GDB_REGID_SP & 0xf]; | ||
| 1383 | *ptr++ = ':'; | 1367 | *ptr++ = ':'; |
| 1384 | ptr = mem2hex(&ssp, ptr, 4, 0); | 1368 | ptr = mem2hex(&ssp, ptr, 4, 0); |
| 1385 | *ptr++ = ';'; | 1369 | *ptr++ = ';'; |
| @@ -1399,8 +1383,8 @@ packet_waiting: | |||
| 1399 | /* request repeat of last signal number */ | 1383 | /* request repeat of last signal number */ |
| 1400 | case '?': | 1384 | case '?': |
| 1401 | output_buffer[0] = 'S'; | 1385 | output_buffer[0] = 'S'; |
| 1402 | output_buffer[1] = hexchars[sigval >> 4]; | 1386 | output_buffer[1] = hex_asc_hi(sigval); |
| 1403 | output_buffer[2] = hexchars[sigval & 0xf]; | 1387 | output_buffer[2] = hex_asc_lo(sigval); |
| 1404 | output_buffer[3] = 0; | 1388 | output_buffer[3] = 0; |
| 1405 | break; | 1389 | break; |
| 1406 | 1390 | ||
| @@ -1838,8 +1822,8 @@ void gdbstub_exit(int status) | |||
| 1838 | 1822 | ||
| 1839 | gdbstub_busy = 1; | 1823 | gdbstub_busy = 1; |
| 1840 | output_buffer[0] = 'W'; | 1824 | output_buffer[0] = 'W'; |
| 1841 | output_buffer[1] = hexchars[(status >> 4) & 0x0F]; | 1825 | output_buffer[1] = hex_asc_hi(status); |
| 1842 | output_buffer[2] = hexchars[status & 0x0F]; | 1826 | output_buffer[2] = hex_asc_lo(status); |
| 1843 | output_buffer[3] = 0; | 1827 | output_buffer[3] = 0; |
| 1844 | 1828 | ||
| 1845 | gdbstub_io_tx_char('$'); | 1829 | gdbstub_io_tx_char('$'); |
| @@ -1853,8 +1837,8 @@ void gdbstub_exit(int status) | |||
| 1853 | } | 1837 | } |
| 1854 | 1838 | ||
| 1855 | gdbstub_io_tx_char('#'); | 1839 | gdbstub_io_tx_char('#'); |
| 1856 | gdbstub_io_tx_char(hexchars[checksum >> 4]); | 1840 | gdbstub_io_tx_char(hex_asc_hi(checksum)); |
| 1857 | gdbstub_io_tx_char(hexchars[checksum & 0xf]); | 1841 | gdbstub_io_tx_char(hex_asc_lo(checksum)); |
| 1858 | 1842 | ||
| 1859 | /* make sure the output is flushed, or else RedBoot might clobber it */ | 1843 | /* make sure the output is flushed, or else RedBoot might clobber it */ |
| 1860 | gdbstub_io_tx_flush(); | 1844 | gdbstub_io_tx_flush(); |
diff --git a/arch/mn10300/mm/init.c b/arch/mn10300/mm/init.c index 8c5d88c7b90a..8cee387a24fd 100644 --- a/arch/mn10300/mm/init.c +++ b/arch/mn10300/mm/init.c | |||
| @@ -67,8 +67,8 @@ void __init paging_init(void) | |||
| 67 | 67 | ||
| 68 | /* declare the sizes of the RAM zones (only use the normal zone) */ | 68 | /* declare the sizes of the RAM zones (only use the normal zone) */ |
| 69 | zones_size[ZONE_NORMAL] = | 69 | zones_size[ZONE_NORMAL] = |
| 70 | (contig_page_data.bdata->node_low_pfn) - | 70 | contig_page_data.bdata->node_low_pfn - |
| 71 | (contig_page_data.bdata->node_boot_start >> PAGE_SHIFT); | 71 | contig_page_data.bdata->node_min_pfn; |
| 72 | 72 | ||
| 73 | /* pass the memory from the bootmem allocator to the main allocator */ | 73 | /* pass the memory from the bootmem allocator to the main allocator */ |
| 74 | free_area_init(zones_size); | 74 | free_area_init(zones_size); |
| @@ -87,7 +87,7 @@ void __init mem_init(void) | |||
| 87 | if (!mem_map) | 87 | if (!mem_map) |
| 88 | BUG(); | 88 | BUG(); |
| 89 | 89 | ||
| 90 | #define START_PFN (contig_page_data.bdata->node_boot_start >> PAGE_SHIFT) | 90 | #define START_PFN (contig_page_data.bdata->node_min_pfn) |
| 91 | #define MAX_LOW_PFN (contig_page_data.bdata->node_low_pfn) | 91 | #define MAX_LOW_PFN (contig_page_data.bdata->node_low_pfn) |
| 92 | 92 | ||
| 93 | max_mapnr = num_physpages = MAX_LOW_PFN - START_PFN; | 93 | max_mapnr = num_physpages = MAX_LOW_PFN - START_PFN; |
diff --git a/arch/mn10300/mm/pgtable.c b/arch/mn10300/mm/pgtable.c index a477038752ba..baffc581e031 100644 --- a/arch/mn10300/mm/pgtable.c +++ b/arch/mn10300/mm/pgtable.c | |||
| @@ -27,33 +27,6 @@ | |||
| 27 | #include <asm/tlb.h> | 27 | #include <asm/tlb.h> |
| 28 | #include <asm/tlbflush.h> | 28 | #include <asm/tlbflush.h> |
| 29 | 29 | ||
| 30 | void show_mem(void) | ||
| 31 | { | ||
| 32 | unsigned long i; | ||
| 33 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 34 | |||
| 35 | int cached = 0; | ||
| 36 | printk(KERN_INFO "Mem-info:\n"); | ||
| 37 | show_free_areas(); | ||
| 38 | i = max_mapnr; | ||
| 39 | while (i-- > 0) { | ||
| 40 | total++; | ||
| 41 | if (PageReserved(mem_map + i)) | ||
| 42 | reserved++; | ||
| 43 | else if (PageSwapCache(mem_map + i)) | ||
| 44 | cached++; | ||
| 45 | else if (!page_count(mem_map + i)) | ||
| 46 | free++; | ||
| 47 | else | ||
| 48 | shared += page_count(mem_map + i) - 1; | ||
| 49 | } | ||
| 50 | printk(KERN_INFO "%d pages of RAM\n", total); | ||
| 51 | printk(KERN_INFO "%d free pages\n", free); | ||
| 52 | printk(KERN_INFO "%d reserved pages\n", reserved); | ||
| 53 | printk(KERN_INFO "%d pages shared\n", shared); | ||
| 54 | printk(KERN_INFO "%d pages swap cached\n", cached); | ||
| 55 | } | ||
| 56 | |||
| 57 | /* | 30 | /* |
| 58 | * Associate a large virtual page frame with a given physical page frame | 31 | * Associate a large virtual page frame with a given physical page frame |
| 59 | * and protection flags for that frame. pfn is for the base of the page, | 32 | * and protection flags for that frame. pfn is for the base of the page, |
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index 0c5b9dabb475..18072e03a019 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c | |||
| @@ -210,19 +210,19 @@ static int vfs_statfs_hpux(struct dentry *dentry, struct hpux_statfs *buf) | |||
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | /* hpux statfs */ | 212 | /* hpux statfs */ |
| 213 | asmlinkage long hpux_statfs(const char __user *path, | 213 | asmlinkage long hpux_statfs(const char __user *pathname, |
| 214 | struct hpux_statfs __user *buf) | 214 | struct hpux_statfs __user *buf) |
| 215 | { | 215 | { |
| 216 | struct nameidata nd; | 216 | struct path path; |
| 217 | int error; | 217 | int error; |
| 218 | 218 | ||
| 219 | error = user_path_walk(path, &nd); | 219 | error = user_path(pathname, &path); |
| 220 | if (!error) { | 220 | if (!error) { |
| 221 | struct hpux_statfs tmp; | 221 | struct hpux_statfs tmp; |
| 222 | error = vfs_statfs_hpux(nd.path.dentry, &tmp); | 222 | error = vfs_statfs_hpux(path.dentry, &tmp); |
| 223 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) | 223 | if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) |
| 224 | error = -EFAULT; | 224 | error = -EFAULT; |
| 225 | path_put(&nd.path); | 225 | path_put(&path); |
| 226 | } | 226 | } |
| 227 | return error; | 227 | return error; |
| 228 | } | 228 | } |
| @@ -448,7 +448,7 @@ int hpux_pipe(int *kstack_fildes) | |||
| 448 | int error; | 448 | int error; |
| 449 | 449 | ||
| 450 | lock_kernel(); | 450 | lock_kernel(); |
| 451 | error = do_pipe(kstack_fildes); | 451 | error = do_pipe_flags(kstack_fildes, 0); |
| 452 | unlock_kernel(); | 452 | unlock_kernel(); |
| 453 | return error; | 453 | return error; |
| 454 | } | 454 | } |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index b4d6c8777ed0..7c155c254e72 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
| @@ -36,7 +36,6 @@ extern int data_start; | |||
| 36 | 36 | ||
| 37 | #ifdef CONFIG_DISCONTIGMEM | 37 | #ifdef CONFIG_DISCONTIGMEM |
| 38 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; | 38 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; |
| 39 | bootmem_data_t bmem_data[MAX_NUMNODES] __read_mostly; | ||
| 40 | unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; | 39 | unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; |
| 41 | #endif | 40 | #endif |
| 42 | 41 | ||
| @@ -262,7 +261,7 @@ static void __init setup_bootmem(void) | |||
| 262 | #ifdef CONFIG_DISCONTIGMEM | 261 | #ifdef CONFIG_DISCONTIGMEM |
| 263 | for (i = 0; i < MAX_PHYSMEM_RANGES; i++) { | 262 | for (i = 0; i < MAX_PHYSMEM_RANGES; i++) { |
| 264 | memset(NODE_DATA(i), 0, sizeof(pg_data_t)); | 263 | memset(NODE_DATA(i), 0, sizeof(pg_data_t)); |
| 265 | NODE_DATA(i)->bdata = &bmem_data[i]; | 264 | NODE_DATA(i)->bdata = &bootmem_node_data[i]; |
| 266 | } | 265 | } |
| 267 | memset(pfnnid_map, 0xff, sizeof(pfnnid_map)); | 266 | memset(pfnnid_map, 0xff, sizeof(pfnnid_map)); |
| 268 | 267 | ||
| @@ -888,7 +887,7 @@ void __init paging_init(void) | |||
| 888 | } | 887 | } |
| 889 | #endif | 888 | #endif |
| 890 | 889 | ||
| 891 | free_area_init_node(i, NODE_DATA(i), zones_size, | 890 | free_area_init_node(i, zones_size, |
| 892 | pmem_ranges[i].start_pfn, NULL); | 891 | pmem_ranges[i].start_pfn, NULL); |
| 893 | } | 892 | } |
| 894 | } | 893 | } |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 4c22242b396f..fe88418167c5 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -110,8 +110,12 @@ config PPC | |||
| 110 | default y | 110 | default y |
| 111 | select HAVE_DYNAMIC_FTRACE | 111 | select HAVE_DYNAMIC_FTRACE |
| 112 | select HAVE_FTRACE | 112 | select HAVE_FTRACE |
| 113 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
| 113 | select HAVE_IDE | 114 | select HAVE_IDE |
| 115 | select HAVE_IOREMAP_PROT | ||
| 116 | select HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
| 114 | select HAVE_KPROBES | 117 | select HAVE_KPROBES |
| 118 | select HAVE_ARCH_KGDB | ||
| 115 | select HAVE_KRETPROBES | 119 | select HAVE_KRETPROBES |
| 116 | select HAVE_LMB | 120 | select HAVE_LMB |
| 117 | select HAVE_DMA_ATTRS if PPC64 | 121 | select HAVE_DMA_ATTRS if PPC64 |
| @@ -842,6 +846,7 @@ source "crypto/Kconfig" | |||
| 842 | config PPC_CLOCK | 846 | config PPC_CLOCK |
| 843 | bool | 847 | bool |
| 844 | default n | 848 | default n |
| 849 | select HAVE_CLK | ||
| 845 | 850 | ||
| 846 | config PPC_LIB_RHEAP | 851 | config PPC_LIB_RHEAP |
| 847 | bool | 852 | bool |
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 2840ab69ef4e..8c8aadbe9563 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
| @@ -41,22 +41,6 @@ config HCALL_STATS | |||
| 41 | This option will add a small amount of overhead to all hypervisor | 41 | This option will add a small amount of overhead to all hypervisor |
| 42 | calls. | 42 | calls. |
| 43 | 43 | ||
| 44 | config DEBUGGER | ||
| 45 | bool "Enable debugger hooks" | ||
| 46 | depends on DEBUG_KERNEL | ||
| 47 | help | ||
| 48 | Include in-kernel hooks for kernel debuggers. Unless you are | ||
| 49 | intending to debug the kernel, say N here. | ||
| 50 | |||
| 51 | config KGDB | ||
| 52 | bool "Include kgdb kernel debugger" | ||
| 53 | depends on DEBUGGER && (BROKEN || PPC_GEN550 || 4xx) | ||
| 54 | select DEBUG_INFO | ||
| 55 | help | ||
| 56 | Include in-kernel hooks for kgdb, the Linux kernel source level | ||
| 57 | debugger. See <http://kgdb.sourceforge.net/> for more information. | ||
| 58 | Unless you are intending to debug the kernel, say N here. | ||
| 59 | |||
| 60 | config CODE_PATCHING_SELFTEST | 44 | config CODE_PATCHING_SELFTEST |
| 61 | bool "Run self-tests of the code-patching code." | 45 | bool "Run self-tests of the code-patching code." |
| 62 | depends on DEBUG_KERNEL | 46 | depends on DEBUG_KERNEL |
| @@ -67,36 +51,9 @@ config FTR_FIXUP_SELFTEST | |||
| 67 | depends on DEBUG_KERNEL | 51 | depends on DEBUG_KERNEL |
| 68 | default n | 52 | default n |
| 69 | 53 | ||
| 70 | choice | ||
| 71 | prompt "Serial Port" | ||
| 72 | depends on KGDB | ||
| 73 | default KGDB_TTYS1 | ||
| 74 | |||
| 75 | config KGDB_TTYS0 | ||
| 76 | bool "ttyS0" | ||
| 77 | |||
| 78 | config KGDB_TTYS1 | ||
| 79 | bool "ttyS1" | ||
| 80 | |||
| 81 | config KGDB_TTYS2 | ||
| 82 | bool "ttyS2" | ||
| 83 | |||
| 84 | config KGDB_TTYS3 | ||
| 85 | bool "ttyS3" | ||
| 86 | |||
| 87 | endchoice | ||
| 88 | |||
| 89 | config KGDB_CONSOLE | ||
| 90 | bool "Enable serial console thru kgdb port" | ||
| 91 | depends on KGDB && 8xx || CPM2 | ||
| 92 | help | ||
| 93 | If you enable this, all serial console messages will be sent | ||
| 94 | over the gdb stub. | ||
| 95 | If unsure, say N. | ||
| 96 | |||
| 97 | config XMON | 54 | config XMON |
| 98 | bool "Include xmon kernel debugger" | 55 | bool "Include xmon kernel debugger" |
| 99 | depends on DEBUGGER | 56 | depends on DEBUG_KERNEL |
| 100 | help | 57 | help |
| 101 | Include in-kernel hooks for the xmon kernel monitor/debugger. | 58 | Include in-kernel hooks for the xmon kernel monitor/debugger. |
| 102 | Unless you are intending to debug the kernel, say N here. | 59 | Unless you are intending to debug the kernel, say N here. |
| @@ -126,6 +83,11 @@ config XMON_DISASSEMBLY | |||
| 126 | to say Y here, unless you're building for a memory-constrained | 83 | to say Y here, unless you're building for a memory-constrained |
| 127 | system. | 84 | system. |
| 128 | 85 | ||
| 86 | config DEBUGGER | ||
| 87 | bool | ||
| 88 | depends on KGDB || XMON | ||
| 89 | default y | ||
| 90 | |||
| 129 | config IRQSTACKS | 91 | config IRQSTACKS |
| 130 | bool "Use separate kernel stacks when processing interrupts" | 92 | bool "Use separate kernel stacks when processing interrupts" |
| 131 | help | 93 | help |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index bf0b1fd0ec34..1a4094704b1f 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
| @@ -74,6 +74,7 @@ obj-y += time.o prom.o traps.o setup-common.o \ | |||
| 74 | misc_$(CONFIG_WORD_SIZE).o | 74 | misc_$(CONFIG_WORD_SIZE).o |
| 75 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o | 75 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o |
| 76 | obj-$(CONFIG_PPC64) += dma_64.o iommu.o | 76 | obj-$(CONFIG_PPC64) += dma_64.o iommu.o |
| 77 | obj-$(CONFIG_KGDB) += kgdb.o | ||
| 77 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o | 78 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o |
| 78 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 79 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
| 79 | obj-$(CONFIG_BOOTX_TEXT) += btext.o | 80 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index b936a1dd0a50..25c273c761d1 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
| @@ -23,6 +23,9 @@ | |||
| 23 | struct cpu_spec* cur_cpu_spec = NULL; | 23 | struct cpu_spec* cur_cpu_spec = NULL; |
| 24 | EXPORT_SYMBOL(cur_cpu_spec); | 24 | EXPORT_SYMBOL(cur_cpu_spec); |
| 25 | 25 | ||
| 26 | /* The platform string corresponding to the real PVR */ | ||
| 27 | const char *powerpc_base_platform; | ||
| 28 | |||
| 26 | /* NOTE: | 29 | /* NOTE: |
| 27 | * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's | 30 | * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's |
| 28 | * the responsibility of the appropriate CPU save/restore functions to | 31 | * the responsibility of the appropriate CPU save/restore functions to |
| @@ -1652,6 +1655,14 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | |||
| 1652 | } else | 1655 | } else |
| 1653 | *t = *s; | 1656 | *t = *s; |
| 1654 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; | 1657 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; |
| 1658 | |||
| 1659 | /* | ||
| 1660 | * Set the base platform string once; assumes | ||
| 1661 | * we're called with real pvr first. | ||
| 1662 | */ | ||
| 1663 | if (*PTRRELOC(&powerpc_base_platform) == NULL) | ||
| 1664 | *PTRRELOC(&powerpc_base_platform) = t->platform; | ||
| 1665 | |||
| 1655 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) | 1666 | #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) |
| 1656 | /* ppc64 and booke expect identify_cpu to also call | 1667 | /* ppc64 and booke expect identify_cpu to also call |
| 1657 | * setup_cpu for that processor. I will consolidate | 1668 | * setup_cpu for that processor. I will consolidate |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index da52269aec1e..81c8324a4a3c 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
| @@ -148,7 +148,7 @@ transfer_to_handler: | |||
| 148 | /* Check to see if the dbcr0 register is set up to debug. Use the | 148 | /* Check to see if the dbcr0 register is set up to debug. Use the |
| 149 | internal debug mode bit to do this. */ | 149 | internal debug mode bit to do this. */ |
| 150 | lwz r12,THREAD_DBCR0(r12) | 150 | lwz r12,THREAD_DBCR0(r12) |
| 151 | andis. r12,r12,DBCR0_IDM@h | 151 | andis. r12,r12,(DBCR0_IDM | DBSR_DAC1R | DBSR_DAC1W)@h |
| 152 | beq+ 3f | 152 | beq+ 3f |
| 153 | /* From user and task is ptraced - load up global dbcr0 */ | 153 | /* From user and task is ptraced - load up global dbcr0 */ |
| 154 | li r12,-1 /* clear all pending debug events */ | 154 | li r12,-1 /* clear all pending debug events */ |
| @@ -292,7 +292,7 @@ syscall_exit_cont: | |||
| 292 | /* If the process has its own DBCR0 value, load it up. The internal | 292 | /* If the process has its own DBCR0 value, load it up. The internal |
| 293 | debug mode bit tells us that dbcr0 should be loaded. */ | 293 | debug mode bit tells us that dbcr0 should be loaded. */ |
| 294 | lwz r0,THREAD+THREAD_DBCR0(r2) | 294 | lwz r0,THREAD+THREAD_DBCR0(r2) |
| 295 | andis. r10,r0,DBCR0_IDM@h | 295 | andis. r10,r0,(DBCR0_IDM | DBSR_DAC1R | DBSR_DAC1W)@h |
| 296 | bnel- load_dbcr0 | 296 | bnel- load_dbcr0 |
| 297 | #endif | 297 | #endif |
| 298 | #ifdef CONFIG_44x | 298 | #ifdef CONFIG_44x |
| @@ -720,7 +720,7 @@ restore_user: | |||
| 720 | /* Check whether this process has its own DBCR0 value. The internal | 720 | /* Check whether this process has its own DBCR0 value. The internal |
| 721 | debug mode bit tells us that dbcr0 should be loaded. */ | 721 | debug mode bit tells us that dbcr0 should be loaded. */ |
| 722 | lwz r0,THREAD+THREAD_DBCR0(r2) | 722 | lwz r0,THREAD+THREAD_DBCR0(r2) |
| 723 | andis. r10,r0,DBCR0_IDM@h | 723 | andis. r10,r0,(DBCR0_IDM | DBSR_DAC1R | DBSR_DAC1W)@h |
| 724 | bnel- load_dbcr0 | 724 | bnel- load_dbcr0 |
| 725 | #endif | 725 | #endif |
| 726 | 726 | ||
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index c3cf0e8f3ac1..d308a9f70f1b 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c | |||
| @@ -60,7 +60,7 @@ void cpu_idle(void) | |||
| 60 | 60 | ||
| 61 | set_thread_flag(TIF_POLLING_NRFLAG); | 61 | set_thread_flag(TIF_POLLING_NRFLAG); |
| 62 | while (1) { | 62 | while (1) { |
| 63 | tick_nohz_stop_sched_tick(); | 63 | tick_nohz_stop_sched_tick(1); |
| 64 | while (!need_resched() && !cpu_should_die()) { | 64 | while (!need_resched() && !cpu_should_die()) { |
| 65 | ppc64_runlatch_off(); | 65 | ppc64_runlatch_off(); |
| 66 | 66 | ||
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 2385f68c1751..550a19399bfa 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
| @@ -49,6 +49,8 @@ static int novmerge = 1; | |||
| 49 | 49 | ||
| 50 | static int protect4gb = 1; | 50 | static int protect4gb = 1; |
| 51 | 51 | ||
| 52 | static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int); | ||
| 53 | |||
| 52 | static inline unsigned long iommu_num_pages(unsigned long vaddr, | 54 | static inline unsigned long iommu_num_pages(unsigned long vaddr, |
| 53 | unsigned long slen) | 55 | unsigned long slen) |
| 54 | { | 56 | { |
| @@ -191,6 +193,7 @@ static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl, | |||
| 191 | { | 193 | { |
| 192 | unsigned long entry, flags; | 194 | unsigned long entry, flags; |
| 193 | dma_addr_t ret = DMA_ERROR_CODE; | 195 | dma_addr_t ret = DMA_ERROR_CODE; |
| 196 | int build_fail; | ||
| 194 | 197 | ||
| 195 | spin_lock_irqsave(&(tbl->it_lock), flags); | 198 | spin_lock_irqsave(&(tbl->it_lock), flags); |
| 196 | 199 | ||
| @@ -205,9 +208,21 @@ static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl, | |||
| 205 | ret = entry << IOMMU_PAGE_SHIFT; /* Set the return dma address */ | 208 | ret = entry << IOMMU_PAGE_SHIFT; /* Set the return dma address */ |
| 206 | 209 | ||
| 207 | /* Put the TCEs in the HW table */ | 210 | /* Put the TCEs in the HW table */ |
| 208 | ppc_md.tce_build(tbl, entry, npages, (unsigned long)page & IOMMU_PAGE_MASK, | 211 | build_fail = ppc_md.tce_build(tbl, entry, npages, |
| 209 | direction, attrs); | 212 | (unsigned long)page & IOMMU_PAGE_MASK, |
| 213 | direction, attrs); | ||
| 214 | |||
| 215 | /* ppc_md.tce_build() only returns non-zero for transient errors. | ||
| 216 | * Clean up the table bitmap in this case and return | ||
| 217 | * DMA_ERROR_CODE. For all other errors the functionality is | ||
| 218 | * not altered. | ||
| 219 | */ | ||
| 220 | if (unlikely(build_fail)) { | ||
| 221 | __iommu_free(tbl, ret, npages); | ||
| 210 | 222 | ||
| 223 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | ||
| 224 | return DMA_ERROR_CODE; | ||
| 225 | } | ||
| 211 | 226 | ||
| 212 | /* Flush/invalidate TLB caches if necessary */ | 227 | /* Flush/invalidate TLB caches if necessary */ |
| 213 | if (ppc_md.tce_flush) | 228 | if (ppc_md.tce_flush) |
| @@ -276,7 +291,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
| 276 | dma_addr_t dma_next = 0, dma_addr; | 291 | dma_addr_t dma_next = 0, dma_addr; |
| 277 | unsigned long flags; | 292 | unsigned long flags; |
| 278 | struct scatterlist *s, *outs, *segstart; | 293 | struct scatterlist *s, *outs, *segstart; |
| 279 | int outcount, incount, i; | 294 | int outcount, incount, i, build_fail = 0; |
| 280 | unsigned int align; | 295 | unsigned int align; |
| 281 | unsigned long handle; | 296 | unsigned long handle; |
| 282 | unsigned int max_seg_size; | 297 | unsigned int max_seg_size; |
| @@ -337,8 +352,11 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
| 337 | npages, entry, dma_addr); | 352 | npages, entry, dma_addr); |
| 338 | 353 | ||
| 339 | /* Insert into HW table */ | 354 | /* Insert into HW table */ |
| 340 | ppc_md.tce_build(tbl, entry, npages, vaddr & IOMMU_PAGE_MASK, | 355 | build_fail = ppc_md.tce_build(tbl, entry, npages, |
| 341 | direction, attrs); | 356 | vaddr & IOMMU_PAGE_MASK, |
| 357 | direction, attrs); | ||
| 358 | if(unlikely(build_fail)) | ||
| 359 | goto failure; | ||
| 342 | 360 | ||
| 343 | /* If we are in an open segment, try merging */ | 361 | /* If we are in an open segment, try merging */ |
| 344 | if (segstart != s) { | 362 | if (segstart != s) { |
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c new file mode 100644 index 000000000000..b4fdf2f2743c --- /dev/null +++ b/arch/powerpc/kernel/kgdb.c | |||
| @@ -0,0 +1,410 @@ | |||
| 1 | /* | ||
| 2 | * PowerPC backend to the KGDB stub. | ||
| 3 | * | ||
| 4 | * 1998 (c) Michael AK Tesch (tesch@cs.wisc.edu) | ||
| 5 | * Copyright (C) 2003 Timesys Corporation. | ||
| 6 | * Copyright (C) 2004-2006 MontaVista Software, Inc. | ||
| 7 | * PPC64 Mods (C) 2005 Frank Rowand (frowand@mvista.com) | ||
| 8 | * PPC32 support restored by Vitaly Wool <vwool@ru.mvista.com> and | ||
| 9 | * Sergei Shtylyov <sshtylyov@ru.mvista.com> | ||
| 10 | * Copyright (C) 2007-2008 Wind River Systems, Inc. | ||
| 11 | * | ||
| 12 | * This file is licensed under the terms of the GNU General Public License | ||
| 13 | * version 2. This program as licensed "as is" without any warranty of any | ||
| 14 | * kind, whether express or implied. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/init.h> | ||
| 19 | #include <linux/kgdb.h> | ||
| 20 | #include <linux/smp.h> | ||
| 21 | #include <linux/signal.h> | ||
| 22 | #include <linux/ptrace.h> | ||
| 23 | #include <asm/current.h> | ||
| 24 | #include <asm/processor.h> | ||
| 25 | #include <asm/machdep.h> | ||
| 26 | |||
| 27 | /* | ||
| 28 | * This table contains the mapping between PowerPC hardware trap types, and | ||
| 29 | * signals, which are primarily what GDB understands. GDB and the kernel | ||
| 30 | * don't always agree on values, so we use constants taken from gdb-6.2. | ||
| 31 | */ | ||
| 32 | static struct hard_trap_info | ||
| 33 | { | ||
| 34 | unsigned int tt; /* Trap type code for powerpc */ | ||
| 35 | unsigned char signo; /* Signal that we map this trap into */ | ||
| 36 | } hard_trap_info[] = { | ||
| 37 | { 0x0100, 0x02 /* SIGINT */ }, /* system reset */ | ||
| 38 | { 0x0200, 0x0b /* SIGSEGV */ }, /* machine check */ | ||
| 39 | { 0x0300, 0x0b /* SIGSEGV */ }, /* data access */ | ||
| 40 | { 0x0400, 0x0b /* SIGSEGV */ }, /* instruction access */ | ||
| 41 | { 0x0500, 0x02 /* SIGINT */ }, /* external interrupt */ | ||
| 42 | { 0x0600, 0x0a /* SIGBUS */ }, /* alignment */ | ||
| 43 | { 0x0700, 0x05 /* SIGTRAP */ }, /* program check */ | ||
| 44 | { 0x0800, 0x08 /* SIGFPE */ }, /* fp unavailable */ | ||
| 45 | { 0x0900, 0x0e /* SIGALRM */ }, /* decrementer */ | ||
| 46 | { 0x0c00, 0x14 /* SIGCHLD */ }, /* system call */ | ||
| 47 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | ||
| 48 | { 0x2002, 0x05 /* SIGTRAP */ }, /* debug */ | ||
| 49 | #if defined(CONFIG_FSL_BOOKE) | ||
| 50 | { 0x2010, 0x08 /* SIGFPE */ }, /* spe unavailable */ | ||
| 51 | { 0x2020, 0x08 /* SIGFPE */ }, /* spe unavailable */ | ||
| 52 | { 0x2030, 0x08 /* SIGFPE */ }, /* spe fp data */ | ||
| 53 | { 0x2040, 0x08 /* SIGFPE */ }, /* spe fp data */ | ||
| 54 | { 0x2050, 0x08 /* SIGFPE */ }, /* spe fp round */ | ||
| 55 | { 0x2060, 0x0e /* SIGILL */ }, /* performace monitor */ | ||
| 56 | { 0x2900, 0x08 /* SIGFPE */ }, /* apu unavailable */ | ||
| 57 | { 0x3100, 0x0e /* SIGALRM */ }, /* fixed interval timer */ | ||
| 58 | { 0x3200, 0x02 /* SIGINT */ }, /* watchdog */ | ||
| 59 | #else /* ! CONFIG_FSL_BOOKE */ | ||
| 60 | { 0x1000, 0x0e /* SIGALRM */ }, /* prog interval timer */ | ||
| 61 | { 0x1010, 0x0e /* SIGALRM */ }, /* fixed interval timer */ | ||
| 62 | { 0x1020, 0x02 /* SIGINT */ }, /* watchdog */ | ||
| 63 | { 0x2010, 0x08 /* SIGFPE */ }, /* fp unavailable */ | ||
| 64 | { 0x2020, 0x08 /* SIGFPE */ }, /* ap unavailable */ | ||
| 65 | #endif | ||
| 66 | #else /* ! (defined(CONFIG_40x) || defined(CONFIG_BOOKE)) */ | ||
| 67 | { 0x0d00, 0x05 /* SIGTRAP */ }, /* single-step */ | ||
| 68 | #if defined(CONFIG_8xx) | ||
| 69 | { 0x1000, 0x04 /* SIGILL */ }, /* software emulation */ | ||
| 70 | #else /* ! CONFIG_8xx */ | ||
| 71 | { 0x0f00, 0x04 /* SIGILL */ }, /* performance monitor */ | ||
| 72 | { 0x0f20, 0x08 /* SIGFPE */ }, /* altivec unavailable */ | ||
| 73 | { 0x1300, 0x05 /* SIGTRAP */ }, /* instruction address break */ | ||
| 74 | #if defined(CONFIG_PPC64) | ||
| 75 | { 0x1200, 0x05 /* SIGILL */ }, /* system error */ | ||
| 76 | { 0x1500, 0x04 /* SIGILL */ }, /* soft patch */ | ||
| 77 | { 0x1600, 0x04 /* SIGILL */ }, /* maintenance */ | ||
| 78 | { 0x1700, 0x08 /* SIGFPE */ }, /* altivec assist */ | ||
| 79 | { 0x1800, 0x04 /* SIGILL */ }, /* thermal */ | ||
| 80 | #else /* ! CONFIG_PPC64 */ | ||
| 81 | { 0x1400, 0x02 /* SIGINT */ }, /* SMI */ | ||
| 82 | { 0x1600, 0x08 /* SIGFPE */ }, /* altivec assist */ | ||
| 83 | { 0x1700, 0x04 /* SIGILL */ }, /* TAU */ | ||
| 84 | { 0x2000, 0x05 /* SIGTRAP */ }, /* run mode */ | ||
| 85 | #endif | ||
| 86 | #endif | ||
| 87 | #endif | ||
| 88 | { 0x0000, 0x00 } /* Must be last */ | ||
| 89 | }; | ||
| 90 | |||
| 91 | static int computeSignal(unsigned int tt) | ||
| 92 | { | ||
| 93 | struct hard_trap_info *ht; | ||
| 94 | |||
| 95 | for (ht = hard_trap_info; ht->tt && ht->signo; ht++) | ||
| 96 | if (ht->tt == tt) | ||
| 97 | return ht->signo; | ||
| 98 | |||
| 99 | return SIGHUP; /* default for things we don't know about */ | ||
| 100 | } | ||
| 101 | |||
| 102 | static int kgdb_call_nmi_hook(struct pt_regs *regs) | ||
| 103 | { | ||
| 104 | kgdb_nmicallback(raw_smp_processor_id(), regs); | ||
| 105 | return 0; | ||
| 106 | } | ||
| 107 | |||
| 108 | #ifdef CONFIG_SMP | ||
| 109 | void kgdb_roundup_cpus(unsigned long flags) | ||
| 110 | { | ||
| 111 | smp_send_debugger_break(MSG_ALL_BUT_SELF); | ||
| 112 | } | ||
| 113 | #endif | ||
| 114 | |||
| 115 | /* KGDB functions to use existing PowerPC64 hooks. */ | ||
| 116 | static int kgdb_debugger(struct pt_regs *regs) | ||
| 117 | { | ||
| 118 | return kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs); | ||
| 119 | } | ||
| 120 | |||
| 121 | static int kgdb_handle_breakpoint(struct pt_regs *regs) | ||
| 122 | { | ||
| 123 | if (user_mode(regs)) | ||
| 124 | return 0; | ||
| 125 | |||
| 126 | if (kgdb_handle_exception(0, SIGTRAP, 0, regs) != 0) | ||
| 127 | return 0; | ||
| 128 | |||
| 129 | if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr)) | ||
| 130 | regs->nip += 4; | ||
| 131 | |||
| 132 | return 1; | ||
| 133 | } | ||
| 134 | |||
| 135 | static int kgdb_singlestep(struct pt_regs *regs) | ||
| 136 | { | ||
| 137 | struct thread_info *thread_info, *exception_thread_info; | ||
| 138 | |||
| 139 | if (user_mode(regs)) | ||
| 140 | return 0; | ||
| 141 | |||
| 142 | /* | ||
| 143 | * On Book E and perhaps other processsors, singlestep is handled on | ||
| 144 | * the critical exception stack. This causes current_thread_info() | ||
| 145 | * to fail, since it it locates the thread_info by masking off | ||
| 146 | * the low bits of the current stack pointer. We work around | ||
| 147 | * this issue by copying the thread_info from the kernel stack | ||
| 148 | * before calling kgdb_handle_exception, and copying it back | ||
| 149 | * afterwards. On most processors the copy is avoided since | ||
| 150 | * exception_thread_info == thread_info. | ||
| 151 | */ | ||
| 152 | thread_info = (struct thread_info *)(regs->gpr[1] & ~(THREAD_SIZE-1)); | ||
| 153 | exception_thread_info = current_thread_info(); | ||
| 154 | |||
| 155 | if (thread_info != exception_thread_info) | ||
| 156 | memcpy(exception_thread_info, thread_info, sizeof *thread_info); | ||
| 157 | |||
| 158 | kgdb_handle_exception(0, SIGTRAP, 0, regs); | ||
| 159 | |||
| 160 | if (thread_info != exception_thread_info) | ||
| 161 | memcpy(thread_info, exception_thread_info, sizeof *thread_info); | ||
| 162 | |||
| 163 | return 1; | ||
| 164 | } | ||
| 165 | |||
| 166 | static int kgdb_iabr_match(struct pt_regs *regs) | ||
| 167 | { | ||
| 168 | if (user_mode(regs)) | ||
| 169 | return 0; | ||
| 170 | |||
| 171 | if (kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs) != 0) | ||
| 172 | return 0; | ||
| 173 | return 1; | ||
| 174 | } | ||
| 175 | |||
| 176 | static int kgdb_dabr_match(struct pt_regs *regs) | ||
| 177 | { | ||
| 178 | if (user_mode(regs)) | ||
| 179 | return 0; | ||
| 180 | |||
| 181 | if (kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs) != 0) | ||
| 182 | return 0; | ||
| 183 | return 1; | ||
| 184 | } | ||
| 185 | |||
| 186 | #define PACK64(ptr, src) do { *(ptr++) = (src); } while (0) | ||
| 187 | |||
| 188 | #define PACK32(ptr, src) do { \ | ||
| 189 | u32 *ptr32; \ | ||
| 190 | ptr32 = (u32 *)ptr; \ | ||
| 191 | *(ptr32++) = (src); \ | ||
| 192 | ptr = (unsigned long *)ptr32; \ | ||
| 193 | } while (0) | ||
| 194 | |||
| 195 | |||
| 196 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | ||
| 197 | { | ||
| 198 | unsigned long *ptr = gdb_regs; | ||
| 199 | int reg; | ||
| 200 | |||
| 201 | memset(gdb_regs, 0, NUMREGBYTES); | ||
| 202 | |||
| 203 | for (reg = 0; reg < 32; reg++) | ||
| 204 | PACK64(ptr, regs->gpr[reg]); | ||
| 205 | |||
| 206 | #ifdef CONFIG_FSL_BOOKE | ||
| 207 | #ifdef CONFIG_SPE | ||
| 208 | for (reg = 0; reg < 32; reg++) | ||
| 209 | PACK64(ptr, current->thread.evr[reg]); | ||
| 210 | #else | ||
| 211 | ptr += 32; | ||
| 212 | #endif | ||
| 213 | #else | ||
| 214 | /* fp registers not used by kernel, leave zero */ | ||
| 215 | ptr += 32 * 8 / sizeof(long); | ||
| 216 | #endif | ||
| 217 | |||
| 218 | PACK64(ptr, regs->nip); | ||
| 219 | PACK64(ptr, regs->msr); | ||
| 220 | PACK32(ptr, regs->ccr); | ||
| 221 | PACK64(ptr, regs->link); | ||
| 222 | PACK64(ptr, regs->ctr); | ||
| 223 | PACK32(ptr, regs->xer); | ||
| 224 | |||
| 225 | BUG_ON((unsigned long)ptr > | ||
| 226 | (unsigned long)(((void *)gdb_regs) + NUMREGBYTES)); | ||
| 227 | } | ||
| 228 | |||
| 229 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | ||
| 230 | { | ||
| 231 | struct pt_regs *regs = (struct pt_regs *)(p->thread.ksp + | ||
| 232 | STACK_FRAME_OVERHEAD); | ||
| 233 | unsigned long *ptr = gdb_regs; | ||
| 234 | int reg; | ||
| 235 | |||
| 236 | memset(gdb_regs, 0, NUMREGBYTES); | ||
| 237 | |||
| 238 | /* Regs GPR0-2 */ | ||
| 239 | for (reg = 0; reg < 3; reg++) | ||
| 240 | PACK64(ptr, regs->gpr[reg]); | ||
| 241 | |||
| 242 | /* Regs GPR3-13 are caller saved, not in regs->gpr[] */ | ||
| 243 | ptr += 11; | ||
| 244 | |||
| 245 | /* Regs GPR14-31 */ | ||
| 246 | for (reg = 14; reg < 32; reg++) | ||
| 247 | PACK64(ptr, regs->gpr[reg]); | ||
| 248 | |||
| 249 | #ifdef CONFIG_FSL_BOOKE | ||
| 250 | #ifdef CONFIG_SPE | ||
| 251 | for (reg = 0; reg < 32; reg++) | ||
| 252 | PACK64(ptr, p->thread.evr[reg]); | ||
| 253 | #else | ||
| 254 | ptr += 32; | ||
| 255 | #endif | ||
| 256 | #else | ||
| 257 | /* fp registers not used by kernel, leave zero */ | ||
| 258 | ptr += 32 * 8 / sizeof(long); | ||
| 259 | #endif | ||
| 260 | |||
| 261 | PACK64(ptr, regs->nip); | ||
| 262 | PACK64(ptr, regs->msr); | ||
| 263 | PACK32(ptr, regs->ccr); | ||
| 264 | PACK64(ptr, regs->link); | ||
| 265 | PACK64(ptr, regs->ctr); | ||
| 266 | PACK32(ptr, regs->xer); | ||
| 267 | |||
| 268 | BUG_ON((unsigned long)ptr > | ||
| 269 | (unsigned long)(((void *)gdb_regs) + NUMREGBYTES)); | ||
| 270 | } | ||
| 271 | |||
| 272 | #define UNPACK64(dest, ptr) do { dest = *(ptr++); } while (0) | ||
| 273 | |||
| 274 | #define UNPACK32(dest, ptr) do { \ | ||
| 275 | u32 *ptr32; \ | ||
| 276 | ptr32 = (u32 *)ptr; \ | ||
| 277 | dest = *(ptr32++); \ | ||
| 278 | ptr = (unsigned long *)ptr32; \ | ||
| 279 | } while (0) | ||
| 280 | |||
| 281 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | ||
| 282 | { | ||
| 283 | unsigned long *ptr = gdb_regs; | ||
| 284 | int reg; | ||
| 285 | #ifdef CONFIG_SPE | ||
| 286 | union { | ||
| 287 | u32 v32[2]; | ||
| 288 | u64 v64; | ||
| 289 | } acc; | ||
| 290 | #endif | ||
| 291 | |||
| 292 | for (reg = 0; reg < 32; reg++) | ||
| 293 | UNPACK64(regs->gpr[reg], ptr); | ||
| 294 | |||
| 295 | #ifdef CONFIG_FSL_BOOKE | ||
| 296 | #ifdef CONFIG_SPE | ||
| 297 | for (reg = 0; reg < 32; reg++) | ||
| 298 | UNPACK64(current->thread.evr[reg], ptr); | ||
| 299 | #else | ||
| 300 | ptr += 32; | ||
| 301 | #endif | ||
| 302 | #else | ||
| 303 | /* fp registers not used by kernel, leave zero */ | ||
| 304 | ptr += 32 * 8 / sizeof(int); | ||
| 305 | #endif | ||
| 306 | |||
| 307 | UNPACK64(regs->nip, ptr); | ||
| 308 | UNPACK64(regs->msr, ptr); | ||
| 309 | UNPACK32(regs->ccr, ptr); | ||
| 310 | UNPACK64(regs->link, ptr); | ||
| 311 | UNPACK64(regs->ctr, ptr); | ||
| 312 | UNPACK32(regs->xer, ptr); | ||
| 313 | |||
| 314 | BUG_ON((unsigned long)ptr > | ||
| 315 | (unsigned long)(((void *)gdb_regs) + NUMREGBYTES)); | ||
| 316 | } | ||
| 317 | |||
| 318 | /* | ||
| 319 | * This function does PowerPC specific procesing for interfacing to gdb. | ||
| 320 | */ | ||
| 321 | int kgdb_arch_handle_exception(int vector, int signo, int err_code, | ||
| 322 | char *remcom_in_buffer, char *remcom_out_buffer, | ||
| 323 | struct pt_regs *linux_regs) | ||
| 324 | { | ||
| 325 | char *ptr = &remcom_in_buffer[1]; | ||
| 326 | unsigned long addr; | ||
| 327 | |||
| 328 | switch (remcom_in_buffer[0]) { | ||
| 329 | /* | ||
| 330 | * sAA..AA Step one instruction from AA..AA | ||
| 331 | * This will return an error to gdb .. | ||
| 332 | */ | ||
| 333 | case 's': | ||
| 334 | case 'c': | ||
| 335 | /* handle the optional parameter */ | ||
| 336 | if (kgdb_hex2long(&ptr, &addr)) | ||
| 337 | linux_regs->nip = addr; | ||
| 338 | |||
| 339 | atomic_set(&kgdb_cpu_doing_single_step, -1); | ||
| 340 | /* set the trace bit if we're stepping */ | ||
| 341 | if (remcom_in_buffer[0] == 's') { | ||
| 342 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | ||
| 343 | mtspr(SPRN_DBCR0, | ||
| 344 | mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM); | ||
| 345 | linux_regs->msr |= MSR_DE; | ||
| 346 | #else | ||
| 347 | linux_regs->msr |= MSR_SE; | ||
| 348 | #endif | ||
| 349 | kgdb_single_step = 1; | ||
| 350 | if (kgdb_contthread) | ||
| 351 | atomic_set(&kgdb_cpu_doing_single_step, | ||
| 352 | raw_smp_processor_id()); | ||
| 353 | } | ||
| 354 | return 0; | ||
| 355 | } | ||
| 356 | |||
| 357 | return -1; | ||
| 358 | } | ||
| 359 | |||
| 360 | /* | ||
| 361 | * Global data | ||
| 362 | */ | ||
| 363 | struct kgdb_arch arch_kgdb_ops = { | ||
| 364 | .gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08}, | ||
| 365 | }; | ||
| 366 | |||
| 367 | static int kgdb_not_implemented(struct pt_regs *regs) | ||
| 368 | { | ||
| 369 | return 0; | ||
| 370 | } | ||
| 371 | |||
| 372 | static void *old__debugger_ipi; | ||
| 373 | static void *old__debugger; | ||
| 374 | static void *old__debugger_bpt; | ||
| 375 | static void *old__debugger_sstep; | ||
| 376 | static void *old__debugger_iabr_match; | ||
| 377 | static void *old__debugger_dabr_match; | ||
| 378 | static void *old__debugger_fault_handler; | ||
| 379 | |||
| 380 | int kgdb_arch_init(void) | ||
| 381 | { | ||
| 382 | old__debugger_ipi = __debugger_ipi; | ||
| 383 | old__debugger = __debugger; | ||
| 384 | old__debugger_bpt = __debugger_bpt; | ||
| 385 | old__debugger_sstep = __debugger_sstep; | ||
| 386 | old__debugger_iabr_match = __debugger_iabr_match; | ||
| 387 | old__debugger_dabr_match = __debugger_dabr_match; | ||
| 388 | old__debugger_fault_handler = __debugger_fault_handler; | ||
| 389 | |||
| 390 | __debugger_ipi = kgdb_call_nmi_hook; | ||
| 391 | __debugger = kgdb_debugger; | ||
| 392 | __debugger_bpt = kgdb_handle_breakpoint; | ||
| 393 | __debugger_sstep = kgdb_singlestep; | ||
| 394 | __debugger_iabr_match = kgdb_iabr_match; | ||
| 395 | __debugger_dabr_match = kgdb_dabr_match; | ||
| 396 | __debugger_fault_handler = kgdb_not_implemented; | ||
| 397 | |||
| 398 | return 0; | ||
| 399 | } | ||
| 400 | |||
| 401 | void kgdb_arch_exit(void) | ||
| 402 | { | ||
| 403 | __debugger_ipi = old__debugger_ipi; | ||
| 404 | __debugger = old__debugger; | ||
| 405 | __debugger_bpt = old__debugger_bpt; | ||
| 406 | __debugger_sstep = old__debugger_sstep; | ||
| 407 | __debugger_iabr_match = old__debugger_iabr_match; | ||
| 408 | __debugger_dabr_match = old__debugger_dabr_match; | ||
| 409 | __debugger_fault_handler = old__debugger_fault_handler; | ||
| 410 | } | ||
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 4ba2af125450..de79915452c8 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
| @@ -144,7 +144,6 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
| 144 | kcb->kprobe_saved_msr = regs->msr; | 144 | kcb->kprobe_saved_msr = regs->msr; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | /* Called with kretprobe_lock held */ | ||
| 148 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 147 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 149 | struct pt_regs *regs) | 148 | struct pt_regs *regs) |
| 150 | { | 149 | { |
| @@ -312,8 +311,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
| 312 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; | 311 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; |
| 313 | 312 | ||
| 314 | INIT_HLIST_HEAD(&empty_rp); | 313 | INIT_HLIST_HEAD(&empty_rp); |
| 315 | spin_lock_irqsave(&kretprobe_lock, flags); | 314 | kretprobe_hash_lock(current, &head, &flags); |
| 316 | head = kretprobe_inst_table_head(current); | ||
| 317 | 315 | ||
| 318 | /* | 316 | /* |
| 319 | * It is possible to have multiple instances associated with a given | 317 | * It is possible to have multiple instances associated with a given |
| @@ -352,7 +350,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
| 352 | regs->nip = orig_ret_address; | 350 | regs->nip = orig_ret_address; |
| 353 | 351 | ||
| 354 | reset_current_kprobe(); | 352 | reset_current_kprobe(); |
| 355 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 353 | kretprobe_hash_unlock(current, &flags); |
| 356 | preempt_enable_no_resched(); | 354 | preempt_enable_no_resched(); |
| 357 | 355 | ||
| 358 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 356 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 827a5726a035..9f856a0c3e38 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
| @@ -34,8 +34,9 @@ | |||
| 34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
| 35 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
| 36 | #include <asm/vdso_datapage.h> | 36 | #include <asm/vdso_datapage.h> |
| 37 | #include <asm/vio.h> | ||
| 37 | 38 | ||
| 38 | #define MODULE_VERS "1.7" | 39 | #define MODULE_VERS "1.8" |
| 39 | #define MODULE_NAME "lparcfg" | 40 | #define MODULE_NAME "lparcfg" |
| 40 | 41 | ||
| 41 | /* #define LPARCFG_DEBUG */ | 42 | /* #define LPARCFG_DEBUG */ |
| @@ -129,32 +130,46 @@ static int iseries_lparcfg_data(struct seq_file *m, void *v) | |||
| 129 | /* | 130 | /* |
| 130 | * Methods used to fetch LPAR data when running on a pSeries platform. | 131 | * Methods used to fetch LPAR data when running on a pSeries platform. |
| 131 | */ | 132 | */ |
| 132 | static void log_plpar_hcall_return(unsigned long rc, char *tag) | 133 | /** |
| 134 | * h_get_mpp | ||
| 135 | * H_GET_MPP hcall returns info in 7 parms | ||
| 136 | */ | ||
| 137 | int h_get_mpp(struct hvcall_mpp_data *mpp_data) | ||
| 133 | { | 138 | { |
| 134 | switch(rc) { | 139 | int rc; |
| 135 | case 0: | 140 | unsigned long retbuf[PLPAR_HCALL9_BUFSIZE]; |
| 136 | return; | 141 | |
| 137 | case H_HARDWARE: | 142 | rc = plpar_hcall9(H_GET_MPP, retbuf); |
| 138 | printk(KERN_INFO "plpar-hcall (%s) " | 143 | |
| 139 | "Hardware fault\n", tag); | 144 | mpp_data->entitled_mem = retbuf[0]; |
| 140 | return; | 145 | mpp_data->mapped_mem = retbuf[1]; |
| 141 | case H_FUNCTION: | 146 | |
| 142 | printk(KERN_INFO "plpar-hcall (%s) " | 147 | mpp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff; |
| 143 | "Function not allowed\n", tag); | 148 | mpp_data->pool_num = retbuf[2] & 0xffff; |
| 144 | return; | 149 | |
| 145 | case H_AUTHORITY: | 150 | mpp_data->mem_weight = (retbuf[3] >> 7 * 8) & 0xff; |
| 146 | printk(KERN_INFO "plpar-hcall (%s) " | 151 | mpp_data->unallocated_mem_weight = (retbuf[3] >> 6 * 8) & 0xff; |
| 147 | "Not authorized to this function\n", tag); | 152 | mpp_data->unallocated_entitlement = retbuf[3] & 0xffffffffffff; |
| 148 | return; | 153 | |
| 149 | case H_PARAMETER: | 154 | mpp_data->pool_size = retbuf[4]; |
| 150 | printk(KERN_INFO "plpar-hcall (%s) " | 155 | mpp_data->loan_request = retbuf[5]; |
| 151 | "Bad parameter(s)\n",tag); | 156 | mpp_data->backing_mem = retbuf[6]; |
| 152 | return; | 157 | |
| 153 | default: | 158 | return rc; |
| 154 | printk(KERN_INFO "plpar-hcall (%s) " | ||
| 155 | "Unexpected rc(0x%lx)\n", tag, rc); | ||
| 156 | } | ||
| 157 | } | 159 | } |
| 160 | EXPORT_SYMBOL(h_get_mpp); | ||
| 161 | |||
| 162 | struct hvcall_ppp_data { | ||
| 163 | u64 entitlement; | ||
| 164 | u64 unallocated_entitlement; | ||
| 165 | u16 group_num; | ||
| 166 | u16 pool_num; | ||
| 167 | u8 capped; | ||
| 168 | u8 weight; | ||
| 169 | u8 unallocated_weight; | ||
| 170 | u16 active_procs_in_pool; | ||
| 171 | u16 active_system_procs; | ||
| 172 | }; | ||
| 158 | 173 | ||
| 159 | /* | 174 | /* |
| 160 | * H_GET_PPP hcall returns info in 4 parms. | 175 | * H_GET_PPP hcall returns info in 4 parms. |
| @@ -176,27 +191,30 @@ static void log_plpar_hcall_return(unsigned long rc, char *tag) | |||
| 176 | * XXXX - Active processors in Physical Processor Pool. | 191 | * XXXX - Active processors in Physical Processor Pool. |
| 177 | * XXXX - Processors active on platform. | 192 | * XXXX - Processors active on platform. |
| 178 | */ | 193 | */ |
| 179 | static unsigned int h_get_ppp(unsigned long *entitled, | 194 | static unsigned int h_get_ppp(struct hvcall_ppp_data *ppp_data) |
| 180 | unsigned long *unallocated, | ||
| 181 | unsigned long *aggregation, | ||
| 182 | unsigned long *resource) | ||
| 183 | { | 195 | { |
| 184 | unsigned long rc; | 196 | unsigned long rc; |
| 185 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; | 197 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
| 186 | 198 | ||
| 187 | rc = plpar_hcall(H_GET_PPP, retbuf); | 199 | rc = plpar_hcall(H_GET_PPP, retbuf); |
| 188 | 200 | ||
| 189 | *entitled = retbuf[0]; | 201 | ppp_data->entitlement = retbuf[0]; |
| 190 | *unallocated = retbuf[1]; | 202 | ppp_data->unallocated_entitlement = retbuf[1]; |
| 191 | *aggregation = retbuf[2]; | 203 | |
| 192 | *resource = retbuf[3]; | 204 | ppp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff; |
| 205 | ppp_data->pool_num = retbuf[2] & 0xffff; | ||
| 193 | 206 | ||
| 194 | log_plpar_hcall_return(rc, "H_GET_PPP"); | 207 | ppp_data->capped = (retbuf[3] >> 6 * 8) & 0x01; |
| 208 | ppp_data->weight = (retbuf[3] >> 5 * 8) & 0xff; | ||
| 209 | ppp_data->unallocated_weight = (retbuf[3] >> 4 * 8) & 0xff; | ||
| 210 | ppp_data->active_procs_in_pool = (retbuf[3] >> 2 * 8) & 0xffff; | ||
| 211 | ppp_data->active_system_procs = retbuf[3] & 0xffff; | ||
| 195 | 212 | ||
| 196 | return rc; | 213 | return rc; |
| 197 | } | 214 | } |
| 198 | 215 | ||
| 199 | static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) | 216 | static unsigned h_pic(unsigned long *pool_idle_time, |
| 217 | unsigned long *num_procs) | ||
| 200 | { | 218 | { |
| 201 | unsigned long rc; | 219 | unsigned long rc; |
| 202 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; | 220 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
| @@ -206,8 +224,87 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) | |||
| 206 | *pool_idle_time = retbuf[0]; | 224 | *pool_idle_time = retbuf[0]; |
| 207 | *num_procs = retbuf[1]; | 225 | *num_procs = retbuf[1]; |
| 208 | 226 | ||
| 209 | if (rc != H_AUTHORITY) | 227 | return rc; |
| 210 | log_plpar_hcall_return(rc, "H_PIC"); | 228 | } |
| 229 | |||
| 230 | /* | ||
| 231 | * parse_ppp_data | ||
| 232 | * Parse out the data returned from h_get_ppp and h_pic | ||
| 233 | */ | ||
| 234 | static void parse_ppp_data(struct seq_file *m) | ||
| 235 | { | ||
| 236 | struct hvcall_ppp_data ppp_data; | ||
| 237 | int rc; | ||
| 238 | |||
| 239 | rc = h_get_ppp(&ppp_data); | ||
| 240 | if (rc) | ||
| 241 | return; | ||
| 242 | |||
| 243 | seq_printf(m, "partition_entitled_capacity=%ld\n", | ||
| 244 | ppp_data.entitlement); | ||
| 245 | seq_printf(m, "group=%d\n", ppp_data.group_num); | ||
| 246 | seq_printf(m, "system_active_processors=%d\n", | ||
| 247 | ppp_data.active_system_procs); | ||
| 248 | |||
| 249 | /* pool related entries are apropriate for shared configs */ | ||
| 250 | if (lppaca[0].shared_proc) { | ||
| 251 | unsigned long pool_idle_time, pool_procs; | ||
| 252 | |||
| 253 | seq_printf(m, "pool=%d\n", ppp_data.pool_num); | ||
| 254 | |||
| 255 | /* report pool_capacity in percentage */ | ||
| 256 | seq_printf(m, "pool_capacity=%d\n", | ||
| 257 | ppp_data.active_procs_in_pool * 100); | ||
| 258 | |||
| 259 | h_pic(&pool_idle_time, &pool_procs); | ||
| 260 | seq_printf(m, "pool_idle_time=%ld\n", pool_idle_time); | ||
| 261 | seq_printf(m, "pool_num_procs=%ld\n", pool_procs); | ||
| 262 | } | ||
| 263 | |||
| 264 | seq_printf(m, "unallocated_capacity_weight=%d\n", | ||
| 265 | ppp_data.unallocated_weight); | ||
| 266 | seq_printf(m, "capacity_weight=%d\n", ppp_data.weight); | ||
| 267 | seq_printf(m, "capped=%d\n", ppp_data.capped); | ||
| 268 | seq_printf(m, "unallocated_capacity=%ld\n", | ||
| 269 | ppp_data.unallocated_entitlement); | ||
| 270 | } | ||
| 271 | |||
| 272 | /** | ||
| 273 | * parse_mpp_data | ||
| 274 | * Parse out data returned from h_get_mpp | ||
| 275 | */ | ||
| 276 | static void parse_mpp_data(struct seq_file *m) | ||
| 277 | { | ||
| 278 | struct hvcall_mpp_data mpp_data; | ||
| 279 | int rc; | ||
| 280 | |||
| 281 | rc = h_get_mpp(&mpp_data); | ||
| 282 | if (rc) | ||
| 283 | return; | ||
| 284 | |||
| 285 | seq_printf(m, "entitled_memory=%ld\n", mpp_data.entitled_mem); | ||
| 286 | |||
| 287 | if (mpp_data.mapped_mem != -1) | ||
| 288 | seq_printf(m, "mapped_entitled_memory=%ld\n", | ||
| 289 | mpp_data.mapped_mem); | ||
| 290 | |||
| 291 | seq_printf(m, "entitled_memory_group_number=%d\n", mpp_data.group_num); | ||
| 292 | seq_printf(m, "entitled_memory_pool_number=%d\n", mpp_data.pool_num); | ||
| 293 | |||
| 294 | seq_printf(m, "entitled_memory_weight=%d\n", mpp_data.mem_weight); | ||
| 295 | seq_printf(m, "unallocated_entitled_memory_weight=%d\n", | ||
| 296 | mpp_data.unallocated_mem_weight); | ||
| 297 | seq_printf(m, "unallocated_io_mapping_entitlement=%ld\n", | ||
| 298 | mpp_data.unallocated_entitlement); | ||
| 299 | |||
| 300 | if (mpp_data.pool_size != -1) | ||
| 301 | seq_printf(m, "entitled_memory_pool_size=%ld bytes\n", | ||
| 302 | mpp_data.pool_size); | ||
| 303 | |||
| 304 | seq_printf(m, "entitled_memory_loan_request=%ld\n", | ||
| 305 | mpp_data.loan_request); | ||
| 306 | |||
| 307 | seq_printf(m, "backing_memory=%ld bytes\n", mpp_data.backing_mem); | ||
| 211 | } | 308 | } |
| 212 | 309 | ||
| 213 | #define SPLPAR_CHARACTERISTICS_TOKEN 20 | 310 | #define SPLPAR_CHARACTERISTICS_TOKEN 20 |
| @@ -313,6 +410,25 @@ static int lparcfg_count_active_processors(void) | |||
| 313 | return count; | 410 | return count; |
| 314 | } | 411 | } |
| 315 | 412 | ||
| 413 | static void pseries_cmo_data(struct seq_file *m) | ||
| 414 | { | ||
| 415 | int cpu; | ||
| 416 | unsigned long cmo_faults = 0; | ||
| 417 | unsigned long cmo_fault_time = 0; | ||
| 418 | |||
| 419 | if (!firmware_has_feature(FW_FEATURE_CMO)) | ||
| 420 | return; | ||
| 421 | |||
| 422 | for_each_possible_cpu(cpu) { | ||
| 423 | cmo_faults += lppaca[cpu].cmo_faults; | ||
| 424 | cmo_fault_time += lppaca[cpu].cmo_fault_time; | ||
| 425 | } | ||
| 426 | |||
| 427 | seq_printf(m, "cmo_faults=%lu\n", cmo_faults); | ||
| 428 | seq_printf(m, "cmo_fault_time_usec=%lu\n", | ||
| 429 | cmo_fault_time / tb_ticks_per_usec); | ||
| 430 | } | ||
| 431 | |||
| 316 | static int pseries_lparcfg_data(struct seq_file *m, void *v) | 432 | static int pseries_lparcfg_data(struct seq_file *m, void *v) |
| 317 | { | 433 | { |
| 318 | int partition_potential_processors; | 434 | int partition_potential_processors; |
| @@ -334,60 +450,13 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
| 334 | partition_active_processors = lparcfg_count_active_processors(); | 450 | partition_active_processors = lparcfg_count_active_processors(); |
| 335 | 451 | ||
| 336 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 452 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
| 337 | unsigned long h_entitled, h_unallocated; | ||
| 338 | unsigned long h_aggregation, h_resource; | ||
| 339 | unsigned long pool_idle_time, pool_procs; | ||
| 340 | unsigned long purr; | ||
| 341 | |||
| 342 | h_get_ppp(&h_entitled, &h_unallocated, &h_aggregation, | ||
| 343 | &h_resource); | ||
| 344 | |||
| 345 | seq_printf(m, "R4=0x%lx\n", h_entitled); | ||
| 346 | seq_printf(m, "R5=0x%lx\n", h_unallocated); | ||
| 347 | seq_printf(m, "R6=0x%lx\n", h_aggregation); | ||
| 348 | seq_printf(m, "R7=0x%lx\n", h_resource); | ||
| 349 | |||
| 350 | purr = get_purr(); | ||
| 351 | |||
| 352 | /* this call handles the ibm,get-system-parameter contents */ | 453 | /* this call handles the ibm,get-system-parameter contents */ |
| 353 | parse_system_parameter_string(m); | 454 | parse_system_parameter_string(m); |
| 455 | parse_ppp_data(m); | ||
| 456 | parse_mpp_data(m); | ||
| 457 | pseries_cmo_data(m); | ||
| 354 | 458 | ||
| 355 | seq_printf(m, "partition_entitled_capacity=%ld\n", h_entitled); | 459 | seq_printf(m, "purr=%ld\n", get_purr()); |
| 356 | |||
| 357 | seq_printf(m, "group=%ld\n", (h_aggregation >> 2 * 8) & 0xffff); | ||
| 358 | |||
| 359 | seq_printf(m, "system_active_processors=%ld\n", | ||
| 360 | (h_resource >> 0 * 8) & 0xffff); | ||
| 361 | |||
| 362 | /* pool related entries are apropriate for shared configs */ | ||
| 363 | if (lppaca[0].shared_proc) { | ||
| 364 | |||
| 365 | h_pic(&pool_idle_time, &pool_procs); | ||
| 366 | |||
| 367 | seq_printf(m, "pool=%ld\n", | ||
| 368 | (h_aggregation >> 0 * 8) & 0xffff); | ||
| 369 | |||
| 370 | /* report pool_capacity in percentage */ | ||
| 371 | seq_printf(m, "pool_capacity=%ld\n", | ||
| 372 | ((h_resource >> 2 * 8) & 0xffff) * 100); | ||
| 373 | |||
| 374 | seq_printf(m, "pool_idle_time=%ld\n", pool_idle_time); | ||
| 375 | |||
| 376 | seq_printf(m, "pool_num_procs=%ld\n", pool_procs); | ||
| 377 | } | ||
| 378 | |||
| 379 | seq_printf(m, "unallocated_capacity_weight=%ld\n", | ||
| 380 | (h_resource >> 4 * 8) & 0xFF); | ||
| 381 | |||
| 382 | seq_printf(m, "capacity_weight=%ld\n", | ||
| 383 | (h_resource >> 5 * 8) & 0xFF); | ||
| 384 | |||
| 385 | seq_printf(m, "capped=%ld\n", (h_resource >> 6 * 8) & 0x01); | ||
| 386 | |||
| 387 | seq_printf(m, "unallocated_capacity=%ld\n", h_unallocated); | ||
| 388 | |||
| 389 | seq_printf(m, "purr=%ld\n", purr); | ||
| 390 | |||
| 391 | } else { /* non SPLPAR case */ | 460 | } else { /* non SPLPAR case */ |
| 392 | 461 | ||
| 393 | seq_printf(m, "system_active_processors=%d\n", | 462 | seq_printf(m, "system_active_processors=%d\n", |
| @@ -414,6 +483,83 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
| 414 | return 0; | 483 | return 0; |
| 415 | } | 484 | } |
| 416 | 485 | ||
| 486 | static ssize_t update_ppp(u64 *entitlement, u8 *weight) | ||
| 487 | { | ||
| 488 | struct hvcall_ppp_data ppp_data; | ||
| 489 | u8 new_weight; | ||
| 490 | u64 new_entitled; | ||
| 491 | ssize_t retval; | ||
| 492 | |||
| 493 | /* Get our current parameters */ | ||
| 494 | retval = h_get_ppp(&ppp_data); | ||
| 495 | if (retval) | ||
| 496 | return retval; | ||
| 497 | |||
| 498 | if (entitlement) { | ||
| 499 | new_weight = ppp_data.weight; | ||
| 500 | new_entitled = *entitlement; | ||
| 501 | } else if (weight) { | ||
| 502 | new_weight = *weight; | ||
| 503 | new_entitled = ppp_data.entitlement; | ||
| 504 | } else | ||
| 505 | return -EINVAL; | ||
| 506 | |||
| 507 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", | ||
| 508 | __FUNCTION__, ppp_data.entitlement, ppp_data.weight); | ||
| 509 | |||
| 510 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", | ||
| 511 | __FUNCTION__, new_entitled, new_weight); | ||
| 512 | |||
| 513 | retval = plpar_hcall_norets(H_SET_PPP, new_entitled, new_weight); | ||
| 514 | return retval; | ||
| 515 | } | ||
| 516 | |||
| 517 | /** | ||
| 518 | * update_mpp | ||
| 519 | * | ||
| 520 | * Update the memory entitlement and weight for the partition. Caller must | ||
| 521 | * specify either a new entitlement or weight, not both, to be updated | ||
| 522 | * since the h_set_mpp call takes both entitlement and weight as parameters. | ||
| 523 | */ | ||
| 524 | static ssize_t update_mpp(u64 *entitlement, u8 *weight) | ||
| 525 | { | ||
| 526 | struct hvcall_mpp_data mpp_data; | ||
| 527 | u64 new_entitled; | ||
| 528 | u8 new_weight; | ||
| 529 | ssize_t rc; | ||
| 530 | |||
| 531 | if (entitlement) { | ||
| 532 | /* Check with vio to ensure the new memory entitlement | ||
| 533 | * can be handled. | ||
| 534 | */ | ||
| 535 | rc = vio_cmo_entitlement_update(*entitlement); | ||
| 536 | if (rc) | ||
| 537 | return rc; | ||
| 538 | } | ||
| 539 | |||
| 540 | rc = h_get_mpp(&mpp_data); | ||
| 541 | if (rc) | ||
| 542 | return rc; | ||
| 543 | |||
| 544 | if (entitlement) { | ||
| 545 | new_weight = mpp_data.mem_weight; | ||
| 546 | new_entitled = *entitlement; | ||
| 547 | } else if (weight) { | ||
| 548 | new_weight = *weight; | ||
| 549 | new_entitled = mpp_data.entitled_mem; | ||
| 550 | } else | ||
| 551 | return -EINVAL; | ||
| 552 | |||
| 553 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", | ||
| 554 | __FUNCTION__, mpp_data.entitled_mem, mpp_data.mem_weight); | ||
| 555 | |||
| 556 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", | ||
| 557 | __FUNCTION__, new_entitled, new_weight); | ||
| 558 | |||
| 559 | rc = plpar_hcall_norets(H_SET_MPP, new_entitled, new_weight); | ||
| 560 | return rc; | ||
| 561 | } | ||
| 562 | |||
| 417 | /* | 563 | /* |
| 418 | * Interface for changing system parameters (variable capacity weight | 564 | * Interface for changing system parameters (variable capacity weight |
| 419 | * and entitled capacity). Format of input is "param_name=value"; | 565 | * and entitled capacity). Format of input is "param_name=value"; |
| @@ -427,35 +573,27 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
| 427 | static ssize_t lparcfg_write(struct file *file, const char __user * buf, | 573 | static ssize_t lparcfg_write(struct file *file, const char __user * buf, |
| 428 | size_t count, loff_t * off) | 574 | size_t count, loff_t * off) |
| 429 | { | 575 | { |
| 430 | char *kbuf; | 576 | int kbuf_sz = 64; |
| 577 | char kbuf[kbuf_sz]; | ||
| 431 | char *tmp; | 578 | char *tmp; |
| 432 | u64 new_entitled, *new_entitled_ptr = &new_entitled; | 579 | u64 new_entitled, *new_entitled_ptr = &new_entitled; |
| 433 | u8 new_weight, *new_weight_ptr = &new_weight; | 580 | u8 new_weight, *new_weight_ptr = &new_weight; |
| 434 | 581 | ssize_t retval; | |
| 435 | unsigned long current_entitled; /* parameters for h_get_ppp */ | ||
| 436 | unsigned long dummy; | ||
| 437 | unsigned long resource; | ||
| 438 | u8 current_weight; | ||
| 439 | |||
| 440 | ssize_t retval = -ENOMEM; | ||
| 441 | 582 | ||
| 442 | if (!firmware_has_feature(FW_FEATURE_SPLPAR) || | 583 | if (!firmware_has_feature(FW_FEATURE_SPLPAR) || |
| 443 | firmware_has_feature(FW_FEATURE_ISERIES)) | 584 | firmware_has_feature(FW_FEATURE_ISERIES)) |
| 444 | return -EINVAL; | 585 | return -EINVAL; |
| 445 | 586 | ||
| 446 | kbuf = kmalloc(count, GFP_KERNEL); | 587 | if (count > kbuf_sz) |
| 447 | if (!kbuf) | 588 | return -EINVAL; |
| 448 | goto out; | ||
| 449 | 589 | ||
| 450 | retval = -EFAULT; | ||
| 451 | if (copy_from_user(kbuf, buf, count)) | 590 | if (copy_from_user(kbuf, buf, count)) |
| 452 | goto out; | 591 | return -EFAULT; |
| 453 | 592 | ||
| 454 | retval = -EINVAL; | ||
| 455 | kbuf[count - 1] = '\0'; | 593 | kbuf[count - 1] = '\0'; |
| 456 | tmp = strchr(kbuf, '='); | 594 | tmp = strchr(kbuf, '='); |
| 457 | if (!tmp) | 595 | if (!tmp) |
| 458 | goto out; | 596 | return -EINVAL; |
| 459 | 597 | ||
| 460 | *tmp++ = '\0'; | 598 | *tmp++ = '\0'; |
| 461 | 599 | ||
| @@ -463,34 +601,32 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
| 463 | char *endp; | 601 | char *endp; |
| 464 | *new_entitled_ptr = (u64) simple_strtoul(tmp, &endp, 10); | 602 | *new_entitled_ptr = (u64) simple_strtoul(tmp, &endp, 10); |
| 465 | if (endp == tmp) | 603 | if (endp == tmp) |
| 466 | goto out; | 604 | return -EINVAL; |
| 467 | new_weight_ptr = ¤t_weight; | 605 | |
| 606 | retval = update_ppp(new_entitled_ptr, NULL); | ||
| 468 | } else if (!strcmp(kbuf, "capacity_weight")) { | 607 | } else if (!strcmp(kbuf, "capacity_weight")) { |
| 469 | char *endp; | 608 | char *endp; |
| 470 | *new_weight_ptr = (u8) simple_strtoul(tmp, &endp, 10); | 609 | *new_weight_ptr = (u8) simple_strtoul(tmp, &endp, 10); |
| 471 | if (endp == tmp) | 610 | if (endp == tmp) |
| 472 | goto out; | 611 | return -EINVAL; |
| 473 | new_entitled_ptr = ¤t_entitled; | ||
| 474 | } else | ||
| 475 | goto out; | ||
| 476 | |||
| 477 | /* Get our current parameters */ | ||
| 478 | retval = h_get_ppp(¤t_entitled, &dummy, &dummy, &resource); | ||
| 479 | if (retval) { | ||
| 480 | retval = -EIO; | ||
| 481 | goto out; | ||
| 482 | } | ||
| 483 | |||
| 484 | current_weight = (resource >> 5 * 8) & 0xFF; | ||
| 485 | 612 | ||
| 486 | pr_debug("%s: current_entitled = %lu, current_weight = %u\n", | 613 | retval = update_ppp(NULL, new_weight_ptr); |
| 487 | __func__, current_entitled, current_weight); | 614 | } else if (!strcmp(kbuf, "entitled_memory")) { |
| 615 | char *endp; | ||
| 616 | *new_entitled_ptr = (u64) simple_strtoul(tmp, &endp, 10); | ||
| 617 | if (endp == tmp) | ||
| 618 | return -EINVAL; | ||
| 488 | 619 | ||
| 489 | pr_debug("%s: new_entitled = %lu, new_weight = %u\n", | 620 | retval = update_mpp(new_entitled_ptr, NULL); |
| 490 | __func__, *new_entitled_ptr, *new_weight_ptr); | 621 | } else if (!strcmp(kbuf, "entitled_memory_weight")) { |
| 622 | char *endp; | ||
| 623 | *new_weight_ptr = (u8) simple_strtoul(tmp, &endp, 10); | ||
| 624 | if (endp == tmp) | ||
| 625 | return -EINVAL; | ||
| 491 | 626 | ||
| 492 | retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, | 627 | retval = update_mpp(NULL, new_weight_ptr); |
| 493 | *new_weight_ptr); | 628 | } else |
| 629 | return -EINVAL; | ||
| 494 | 630 | ||
| 495 | if (retval == H_SUCCESS || retval == H_CONSTRAINED) { | 631 | if (retval == H_SUCCESS || retval == H_CONSTRAINED) { |
| 496 | retval = count; | 632 | retval = count; |
| @@ -506,8 +642,6 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, | |||
| 506 | retval = -EIO; | 642 | retval = -EIO; |
| 507 | } | 643 | } |
| 508 | 644 | ||
| 509 | out: | ||
| 510 | kfree(kbuf); | ||
| 511 | return retval; | 645 | return retval; |
| 512 | } | 646 | } |
| 513 | 647 | ||
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 29a0e039d436..aab76887a842 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
| @@ -48,7 +48,7 @@ void machine_kexec_cleanup(struct kimage *image) | |||
| 48 | * Do not allocate memory (or fail in any way) in machine_kexec(). | 48 | * Do not allocate memory (or fail in any way) in machine_kexec(). |
| 49 | * We are past the point of no return, committed to rebooting now. | 49 | * We are past the point of no return, committed to rebooting now. |
| 50 | */ | 50 | */ |
| 51 | NORET_TYPE void machine_kexec(struct kimage *image) | 51 | void machine_kexec(struct kimage *image) |
| 52 | { | 52 | { |
| 53 | if (ppc_md.machine_kexec) | 53 | if (ppc_md.machine_kexec) |
| 54 | ppc_md.machine_kexec(image); | 54 | ppc_md.machine_kexec(image); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 219f3634115e..db2497ccc111 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
| @@ -47,6 +47,8 @@ | |||
| 47 | #ifdef CONFIG_PPC64 | 47 | #ifdef CONFIG_PPC64 |
| 48 | #include <asm/firmware.h> | 48 | #include <asm/firmware.h> |
| 49 | #endif | 49 | #endif |
| 50 | #include <linux/kprobes.h> | ||
| 51 | #include <linux/kdebug.h> | ||
| 50 | 52 | ||
| 51 | extern unsigned long _get_SP(void); | 53 | extern unsigned long _get_SP(void); |
| 52 | 54 | ||
| @@ -239,6 +241,35 @@ void discard_lazy_cpu_state(void) | |||
| 239 | } | 241 | } |
| 240 | #endif /* CONFIG_SMP */ | 242 | #endif /* CONFIG_SMP */ |
| 241 | 243 | ||
| 244 | void do_dabr(struct pt_regs *regs, unsigned long address, | ||
| 245 | unsigned long error_code) | ||
| 246 | { | ||
| 247 | siginfo_t info; | ||
| 248 | |||
| 249 | if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code, | ||
| 250 | 11, SIGSEGV) == NOTIFY_STOP) | ||
| 251 | return; | ||
| 252 | |||
| 253 | if (debugger_dabr_match(regs)) | ||
| 254 | return; | ||
| 255 | |||
| 256 | /* Clear the DAC and struct entries. One shot trigger */ | ||
| 257 | #if (defined(CONFIG_44x) || defined(CONFIG_BOOKE)) | ||
| 258 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | DBSR_DAC1W | ||
| 259 | | DBCR0_IDM)); | ||
| 260 | #endif | ||
| 261 | |||
| 262 | /* Clear the DABR */ | ||
| 263 | set_dabr(0); | ||
| 264 | |||
| 265 | /* Deliver the signal to userspace */ | ||
| 266 | info.si_signo = SIGTRAP; | ||
| 267 | info.si_errno = 0; | ||
| 268 | info.si_code = TRAP_HWBKPT; | ||
| 269 | info.si_addr = (void __user *)address; | ||
| 270 | force_sig_info(SIGTRAP, &info, current); | ||
| 271 | } | ||
| 272 | |||
| 242 | static DEFINE_PER_CPU(unsigned long, current_dabr); | 273 | static DEFINE_PER_CPU(unsigned long, current_dabr); |
| 243 | 274 | ||
| 244 | int set_dabr(unsigned long dabr) | 275 | int set_dabr(unsigned long dabr) |
| @@ -254,6 +285,11 @@ int set_dabr(unsigned long dabr) | |||
| 254 | #if defined(CONFIG_PPC64) || defined(CONFIG_6xx) | 285 | #if defined(CONFIG_PPC64) || defined(CONFIG_6xx) |
| 255 | mtspr(SPRN_DABR, dabr); | 286 | mtspr(SPRN_DABR, dabr); |
| 256 | #endif | 287 | #endif |
| 288 | |||
| 289 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | ||
| 290 | mtspr(SPRN_DAC1, dabr); | ||
| 291 | #endif | ||
| 292 | |||
| 257 | return 0; | 293 | return 0; |
| 258 | } | 294 | } |
| 259 | 295 | ||
| @@ -337,6 +373,12 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
| 337 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) | 373 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) |
| 338 | set_dabr(new->thread.dabr); | 374 | set_dabr(new->thread.dabr); |
| 339 | 375 | ||
| 376 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | ||
| 377 | /* If new thread DAC (HW breakpoint) is the same then leave it */ | ||
| 378 | if (new->thread.dabr) | ||
| 379 | set_dabr(new->thread.dabr); | ||
| 380 | #endif | ||
| 381 | |||
| 340 | new_thread = &new->thread; | 382 | new_thread = &new->thread; |
| 341 | old_thread = ¤t->thread; | 383 | old_thread = ¤t->thread; |
| 342 | 384 | ||
| @@ -525,6 +567,10 @@ void flush_thread(void) | |||
| 525 | if (current->thread.dabr) { | 567 | if (current->thread.dabr) { |
| 526 | current->thread.dabr = 0; | 568 | current->thread.dabr = 0; |
| 527 | set_dabr(0); | 569 | set_dabr(0); |
| 570 | |||
| 571 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | ||
| 572 | current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W); | ||
| 573 | #endif | ||
| 528 | } | 574 | } |
| 529 | } | 575 | } |
| 530 | 576 | ||
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 1ea8c8d3ce89..c4ab2195b9cb 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
| @@ -643,6 +643,11 @@ static void __init early_cmdline_parse(void) | |||
| 643 | #else | 643 | #else |
| 644 | #define OV5_MSI 0x00 | 644 | #define OV5_MSI 0x00 |
| 645 | #endif /* CONFIG_PCI_MSI */ | 645 | #endif /* CONFIG_PCI_MSI */ |
| 646 | #ifdef CONFIG_PPC_SMLPAR | ||
| 647 | #define OV5_CMO 0x80 /* Cooperative Memory Overcommitment */ | ||
| 648 | #else | ||
| 649 | #define OV5_CMO 0x00 | ||
| 650 | #endif | ||
| 646 | 651 | ||
| 647 | /* | 652 | /* |
| 648 | * The architecture vector has an array of PVR mask/value pairs, | 653 | * The architecture vector has an array of PVR mask/value pairs, |
| @@ -687,10 +692,12 @@ static unsigned char ibm_architecture_vec[] = { | |||
| 687 | 0, /* don't halt */ | 692 | 0, /* don't halt */ |
| 688 | 693 | ||
| 689 | /* option vector 5: PAPR/OF options */ | 694 | /* option vector 5: PAPR/OF options */ |
| 690 | 3 - 2, /* length */ | 695 | 5 - 2, /* length */ |
| 691 | 0, /* don't ignore, don't halt */ | 696 | 0, /* don't ignore, don't halt */ |
| 692 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY | | 697 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY | |
| 693 | OV5_DONATE_DEDICATE_CPU | OV5_MSI, | 698 | OV5_DONATE_DEDICATE_CPU | OV5_MSI, |
| 699 | 0, | ||
| 700 | OV5_CMO, | ||
| 694 | }; | 701 | }; |
| 695 | 702 | ||
| 696 | /* Old method - ELF header with PT_NOTE sections */ | 703 | /* Old method - ELF header with PT_NOTE sections */ |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 8feb93e7890c..a5d0e78779c8 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
| @@ -703,7 +703,7 @@ void user_enable_single_step(struct task_struct *task) | |||
| 703 | 703 | ||
| 704 | if (regs != NULL) { | 704 | if (regs != NULL) { |
| 705 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 705 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) |
| 706 | task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC; | 706 | task->thread.dbcr0 |= DBCR0_IDM | DBCR0_IC; |
| 707 | regs->msr |= MSR_DE; | 707 | regs->msr |= MSR_DE; |
| 708 | #else | 708 | #else |
| 709 | regs->msr |= MSR_SE; | 709 | regs->msr |= MSR_SE; |
| @@ -716,9 +716,16 @@ void user_disable_single_step(struct task_struct *task) | |||
| 716 | { | 716 | { |
| 717 | struct pt_regs *regs = task->thread.regs; | 717 | struct pt_regs *regs = task->thread.regs; |
| 718 | 718 | ||
| 719 | |||
| 720 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | ||
| 721 | /* If DAC then do not single step, skip */ | ||
| 722 | if (task->thread.dabr) | ||
| 723 | return; | ||
| 724 | #endif | ||
| 725 | |||
| 719 | if (regs != NULL) { | 726 | if (regs != NULL) { |
| 720 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 727 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) |
| 721 | task->thread.dbcr0 = 0; | 728 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_IDM); |
| 722 | regs->msr &= ~MSR_DE; | 729 | regs->msr &= ~MSR_DE; |
| 723 | #else | 730 | #else |
| 724 | regs->msr &= ~MSR_SE; | 731 | regs->msr &= ~MSR_SE; |
| @@ -727,22 +734,75 @@ void user_disable_single_step(struct task_struct *task) | |||
| 727 | clear_tsk_thread_flag(task, TIF_SINGLESTEP); | 734 | clear_tsk_thread_flag(task, TIF_SINGLESTEP); |
| 728 | } | 735 | } |
| 729 | 736 | ||
| 730 | static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr, | 737 | int ptrace_set_debugreg(struct task_struct *task, unsigned long addr, |
| 731 | unsigned long data) | 738 | unsigned long data) |
| 732 | { | 739 | { |
| 733 | /* We only support one DABR and no IABRS at the moment */ | 740 | /* For ppc64 we support one DABR and no IABR's at the moment (ppc64). |
| 741 | * For embedded processors we support one DAC and no IAC's at the | ||
| 742 | * moment. | ||
| 743 | */ | ||
| 734 | if (addr > 0) | 744 | if (addr > 0) |
| 735 | return -EINVAL; | 745 | return -EINVAL; |
| 736 | 746 | ||
| 737 | /* The bottom 3 bits are flags */ | ||
| 738 | if ((data & ~0x7UL) >= TASK_SIZE) | 747 | if ((data & ~0x7UL) >= TASK_SIZE) |
| 739 | return -EIO; | 748 | return -EIO; |
| 740 | 749 | ||
| 741 | /* Ensure translation is on */ | 750 | #ifdef CONFIG_PPC64 |
| 751 | |||
| 752 | /* For processors using DABR (i.e. 970), the bottom 3 bits are flags. | ||
| 753 | * It was assumed, on previous implementations, that 3 bits were | ||
| 754 | * passed together with the data address, fitting the design of the | ||
| 755 | * DABR register, as follows: | ||
| 756 | * | ||
| 757 | * bit 0: Read flag | ||
| 758 | * bit 1: Write flag | ||
| 759 | * bit 2: Breakpoint translation | ||
| 760 | * | ||
| 761 | * Thus, we use them here as so. | ||
| 762 | */ | ||
| 763 | |||
| 764 | /* Ensure breakpoint translation bit is set */ | ||
| 742 | if (data && !(data & DABR_TRANSLATION)) | 765 | if (data && !(data & DABR_TRANSLATION)) |
| 743 | return -EIO; | 766 | return -EIO; |
| 744 | 767 | ||
| 768 | /* Move contents to the DABR register */ | ||
| 745 | task->thread.dabr = data; | 769 | task->thread.dabr = data; |
| 770 | |||
| 771 | #endif | ||
| 772 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | ||
| 773 | |||
| 774 | /* As described above, it was assumed 3 bits were passed with the data | ||
| 775 | * address, but we will assume only the mode bits will be passed | ||
| 776 | * as to not cause alignment restrictions for DAC-based processors. | ||
| 777 | */ | ||
| 778 | |||
| 779 | /* DAC's hold the whole address without any mode flags */ | ||
| 780 | task->thread.dabr = data & ~0x3UL; | ||
| 781 | |||
| 782 | if (task->thread.dabr == 0) { | ||
| 783 | task->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W | DBCR0_IDM); | ||
| 784 | task->thread.regs->msr &= ~MSR_DE; | ||
| 785 | return 0; | ||
| 786 | } | ||
| 787 | |||
| 788 | /* Read or Write bits must be set */ | ||
| 789 | |||
| 790 | if (!(data & 0x3UL)) | ||
| 791 | return -EINVAL; | ||
| 792 | |||
| 793 | /* Set the Internal Debugging flag (IDM bit 1) for the DBCR0 | ||
| 794 | register */ | ||
| 795 | task->thread.dbcr0 = DBCR0_IDM; | ||
| 796 | |||
| 797 | /* Check for write and read flags and set DBCR0 | ||
| 798 | accordingly */ | ||
| 799 | if (data & 0x1UL) | ||
| 800 | task->thread.dbcr0 |= DBSR_DAC1R; | ||
| 801 | if (data & 0x2UL) | ||
| 802 | task->thread.dbcr0 |= DBSR_DAC1W; | ||
| 803 | |||
| 804 | task->thread.regs->msr |= MSR_DE; | ||
| 805 | #endif | ||
| 746 | return 0; | 806 | return 0; |
| 747 | } | 807 | } |
| 748 | 808 | ||
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 09ded5c424a9..149cb112cd1a 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
| @@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf, | |||
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | /* constructor for flash_block_cache */ | 288 | /* constructor for flash_block_cache */ |
| 289 | void rtas_block_ctor(struct kmem_cache *cache, void *ptr) | 289 | void rtas_block_ctor(void *ptr) |
| 290 | { | 290 | { |
| 291 | memset(ptr, 0, RTAS_BLK_SIZE); | 291 | memset(ptr, 0, RTAS_BLK_SIZE); |
| 292 | } | 292 | } |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 4efebe88e64a..066e65c59b58 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
| @@ -43,10 +43,6 @@ | |||
| 43 | 43 | ||
| 44 | #define DBG(fmt...) | 44 | #define DBG(fmt...) |
| 45 | 45 | ||
| 46 | #if defined CONFIG_KGDB | ||
| 47 | #include <asm/kgdb.h> | ||
| 48 | #endif | ||
| 49 | |||
| 50 | extern void bootx_init(unsigned long r4, unsigned long phys); | 46 | extern void bootx_init(unsigned long r4, unsigned long phys); |
| 51 | 47 | ||
| 52 | int boot_cpuid; | 48 | int boot_cpuid; |
| @@ -302,18 +298,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 302 | 298 | ||
| 303 | xmon_setup(); | 299 | xmon_setup(); |
| 304 | 300 | ||
| 305 | #if defined(CONFIG_KGDB) | ||
| 306 | if (ppc_md.kgdb_map_scc) | ||
| 307 | ppc_md.kgdb_map_scc(); | ||
| 308 | set_debug_traps(); | ||
| 309 | if (strstr(cmd_line, "gdb")) { | ||
| 310 | if (ppc_md.progress) | ||
| 311 | ppc_md.progress("setup_arch: kgdb breakpoint", 0x4000); | ||
| 312 | printk("kgdb breakpoint activated\n"); | ||
| 313 | breakpoint(); | ||
| 314 | } | ||
| 315 | #endif | ||
| 316 | |||
| 317 | /* | 301 | /* |
| 318 | * Set cache line size based on type of cpu as a default. | 302 | * Set cache line size based on type of cpu as a default. |
| 319 | * Systems with OF can look in the properties on the cpu node(s) | 303 | * Systems with OF can look in the properties on the cpu node(s) |
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c index ad55488939c3..7aada783ec6a 100644 --- a/arch/powerpc/kernel/signal.c +++ b/arch/powerpc/kernel/signal.c | |||
| @@ -145,8 +145,12 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) | |||
| 145 | * user space. The DABR will have been cleared if it | 145 | * user space. The DABR will have been cleared if it |
| 146 | * triggered inside the kernel. | 146 | * triggered inside the kernel. |
| 147 | */ | 147 | */ |
| 148 | if (current->thread.dabr) | 148 | if (current->thread.dabr) { |
| 149 | set_dabr(current->thread.dabr); | 149 | set_dabr(current->thread.dabr); |
| 150 | #if defined(CONFIG_44x) || defined(CONFIG_BOOKE) | ||
| 151 | mtspr(SPRN_DBCR0, current->thread.dbcr0); | ||
| 152 | #endif | ||
| 153 | } | ||
| 150 | 154 | ||
| 151 | if (is32) { | 155 | if (is32) { |
| 152 | if (ka.sa.sa_flags & SA_SIGINFO) | 156 | if (ka.sa.sa_flags & SA_SIGINFO) |
diff --git a/arch/powerpc/kernel/suspend.c b/arch/powerpc/kernel/suspend.c index 8cee57107541..6fc6328dc626 100644 --- a/arch/powerpc/kernel/suspend.c +++ b/arch/powerpc/kernel/suspend.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> | 7 | * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #include <linux/mm.h> | ||
| 10 | #include <asm/page.h> | 11 | #include <asm/page.h> |
| 11 | 12 | ||
| 12 | /* References to section boundaries */ | 13 | /* References to section boundaries */ |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index aba0ba95f062..800e5e9a087b 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
| @@ -529,7 +529,8 @@ static void register_nodes(void) | |||
| 529 | #endif | 529 | #endif |
| 530 | 530 | ||
| 531 | /* Only valid if CPU is present. */ | 531 | /* Only valid if CPU is present. */ |
| 532 | static ssize_t show_physical_id(struct sys_device *dev, char *buf) | 532 | static ssize_t show_physical_id(struct sys_device *dev, |
| 533 | struct sysdev_attribute *attr, char *buf) | ||
| 533 | { | 534 | { |
| 534 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 535 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
| 535 | 536 | ||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 878fbddb6ae1..81ccb8dd1a54 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
| @@ -1067,6 +1067,22 @@ void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) | |||
| 1067 | } | 1067 | } |
| 1068 | 1068 | ||
| 1069 | _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); | 1069 | _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); |
| 1070 | } else if (debug_status & (DBSR_DAC1R | DBSR_DAC1W)) { | ||
| 1071 | regs->msr &= ~MSR_DE; | ||
| 1072 | |||
| 1073 | if (user_mode(regs)) { | ||
| 1074 | current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W | | ||
| 1075 | DBCR0_IDM); | ||
| 1076 | } else { | ||
| 1077 | /* Disable DAC interupts */ | ||
| 1078 | mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | | ||
| 1079 | DBSR_DAC1W | DBCR0_IDM)); | ||
| 1080 | |||
| 1081 | /* Clear the DAC event */ | ||
| 1082 | mtspr(SPRN_DBSR, (DBSR_DAC1R | DBSR_DAC1W)); | ||
| 1083 | } | ||
| 1084 | /* Setup and send the trap to the handler */ | ||
| 1085 | do_dabr(regs, mfspr(SPRN_DAC1), debug_status); | ||
| 1070 | } | 1086 | } |
| 1071 | } | 1087 | } |
| 1072 | #endif /* CONFIG_4xx || CONFIG_BOOKE */ | 1088 | #endif /* CONFIG_4xx || CONFIG_BOOKE */ |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index b77f8af7ddde..ade8aeaa2e70 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * IBM PowerPC Virtual I/O Infrastructure Support. | 2 | * IBM PowerPC Virtual I/O Infrastructure Support. |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2003-2005 IBM Corp. | 4 | * Copyright (c) 2003,2008 IBM Corp. |
| 5 | * Dave Engebretsen engebret@us.ibm.com | 5 | * Dave Engebretsen engebret@us.ibm.com |
| 6 | * Santiago Leon santil@us.ibm.com | 6 | * Santiago Leon santil@us.ibm.com |
| 7 | * Hollis Blanchard <hollisb@us.ibm.com> | 7 | * Hollis Blanchard <hollisb@us.ibm.com> |
| 8 | * Stephen Rothwell | 8 | * Stephen Rothwell |
| 9 | * Robert Jennings <rcjenn@us.ibm.com> | ||
| 9 | * | 10 | * |
| 10 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
| @@ -46,6 +47,996 @@ static struct vio_dev vio_bus_device = { /* fake "parent" device */ | |||
| 46 | .dev.bus = &vio_bus_type, | 47 | .dev.bus = &vio_bus_type, |
| 47 | }; | 48 | }; |
| 48 | 49 | ||
| 50 | #ifdef CONFIG_PPC_SMLPAR | ||
| 51 | /** | ||
| 52 | * vio_cmo_pool - A pool of IO memory for CMO use | ||
| 53 | * | ||
| 54 | * @size: The size of the pool in bytes | ||
| 55 | * @free: The amount of free memory in the pool | ||
| 56 | */ | ||
| 57 | struct vio_cmo_pool { | ||
| 58 | size_t size; | ||
| 59 | size_t free; | ||
| 60 | }; | ||
| 61 | |||
| 62 | /* How many ms to delay queued balance work */ | ||
| 63 | #define VIO_CMO_BALANCE_DELAY 100 | ||
| 64 | |||
| 65 | /* Portion out IO memory to CMO devices by this chunk size */ | ||
| 66 | #define VIO_CMO_BALANCE_CHUNK 131072 | ||
| 67 | |||
| 68 | /** | ||
| 69 | * vio_cmo_dev_entry - A device that is CMO-enabled and requires entitlement | ||
| 70 | * | ||
| 71 | * @vio_dev: struct vio_dev pointer | ||
| 72 | * @list: pointer to other devices on bus that are being tracked | ||
| 73 | */ | ||
| 74 | struct vio_cmo_dev_entry { | ||
| 75 | struct vio_dev *viodev; | ||
| 76 | struct list_head list; | ||
| 77 | }; | ||
| 78 | |||
| 79 | /** | ||
| 80 | * vio_cmo - VIO bus accounting structure for CMO entitlement | ||
| 81 | * | ||
| 82 | * @lock: spinlock for entire structure | ||
| 83 | * @balance_q: work queue for balancing system entitlement | ||
| 84 | * @device_list: list of CMO-enabled devices requiring entitlement | ||
| 85 | * @entitled: total system entitlement in bytes | ||
| 86 | * @reserve: pool of memory from which devices reserve entitlement, incl. spare | ||
| 87 | * @excess: pool of excess entitlement not needed for device reserves or spare | ||
| 88 | * @spare: IO memory for device hotplug functionality | ||
| 89 | * @min: minimum necessary for system operation | ||
| 90 | * @desired: desired memory for system operation | ||
| 91 | * @curr: bytes currently allocated | ||
| 92 | * @high: high water mark for IO data usage | ||
| 93 | */ | ||
| 94 | struct vio_cmo { | ||
| 95 | spinlock_t lock; | ||
| 96 | struct delayed_work balance_q; | ||
| 97 | struct list_head device_list; | ||
| 98 | size_t entitled; | ||
| 99 | struct vio_cmo_pool reserve; | ||
| 100 | struct vio_cmo_pool excess; | ||
| 101 | size_t spare; | ||
| 102 | size_t min; | ||
| 103 | size_t desired; | ||
| 104 | size_t curr; | ||
| 105 | size_t high; | ||
| 106 | } vio_cmo; | ||
| 107 | |||
| 108 | /** | ||
| 109 | * vio_cmo_OF_devices - Count the number of OF devices that have DMA windows | ||
| 110 | */ | ||
| 111 | static int vio_cmo_num_OF_devs(void) | ||
| 112 | { | ||
| 113 | struct device_node *node_vroot; | ||
| 114 | int count = 0; | ||
| 115 | |||
| 116 | /* | ||
| 117 | * Count the number of vdevice entries with an | ||
| 118 | * ibm,my-dma-window OF property | ||
| 119 | */ | ||
| 120 | node_vroot = of_find_node_by_name(NULL, "vdevice"); | ||
| 121 | if (node_vroot) { | ||
| 122 | struct device_node *of_node; | ||
| 123 | struct property *prop; | ||
| 124 | |||
| 125 | for_each_child_of_node(node_vroot, of_node) { | ||
| 126 | prop = of_find_property(of_node, "ibm,my-dma-window", | ||
| 127 | NULL); | ||
| 128 | if (prop) | ||
| 129 | count++; | ||
| 130 | } | ||
| 131 | } | ||
| 132 | of_node_put(node_vroot); | ||
| 133 | return count; | ||
| 134 | } | ||
| 135 | |||
| 136 | /** | ||
| 137 | * vio_cmo_alloc - allocate IO memory for CMO-enable devices | ||
| 138 | * | ||
| 139 | * @viodev: VIO device requesting IO memory | ||
| 140 | * @size: size of allocation requested | ||
| 141 | * | ||
| 142 | * Allocations come from memory reserved for the devices and any excess | ||
| 143 | * IO memory available to all devices. The spare pool used to service | ||
| 144 | * hotplug must be equal to %VIO_CMO_MIN_ENT for the excess pool to be | ||
| 145 | * made available. | ||
| 146 | * | ||
| 147 | * Return codes: | ||
| 148 | * 0 for successful allocation and -ENOMEM for a failure | ||
| 149 | */ | ||
| 150 | static inline int vio_cmo_alloc(struct vio_dev *viodev, size_t size) | ||
| 151 | { | ||
| 152 | unsigned long flags; | ||
| 153 | size_t reserve_free = 0; | ||
| 154 | size_t excess_free = 0; | ||
| 155 | int ret = -ENOMEM; | ||
| 156 | |||
| 157 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 158 | |||
| 159 | /* Determine the amount of free entitlement available in reserve */ | ||
| 160 | if (viodev->cmo.entitled > viodev->cmo.allocated) | ||
| 161 | reserve_free = viodev->cmo.entitled - viodev->cmo.allocated; | ||
| 162 | |||
| 163 | /* If spare is not fulfilled, the excess pool can not be used. */ | ||
| 164 | if (vio_cmo.spare >= VIO_CMO_MIN_ENT) | ||
| 165 | excess_free = vio_cmo.excess.free; | ||
| 166 | |||
| 167 | /* The request can be satisfied */ | ||
| 168 | if ((reserve_free + excess_free) >= size) { | ||
| 169 | vio_cmo.curr += size; | ||
| 170 | if (vio_cmo.curr > vio_cmo.high) | ||
| 171 | vio_cmo.high = vio_cmo.curr; | ||
| 172 | viodev->cmo.allocated += size; | ||
| 173 | size -= min(reserve_free, size); | ||
| 174 | vio_cmo.excess.free -= size; | ||
| 175 | ret = 0; | ||
| 176 | } | ||
| 177 | |||
| 178 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 179 | return ret; | ||
| 180 | } | ||
| 181 | |||
| 182 | /** | ||
| 183 | * vio_cmo_dealloc - deallocate IO memory from CMO-enable devices | ||
| 184 | * @viodev: VIO device freeing IO memory | ||
| 185 | * @size: size of deallocation | ||
| 186 | * | ||
| 187 | * IO memory is freed by the device back to the correct memory pools. | ||
| 188 | * The spare pool is replenished first from either memory pool, then | ||
| 189 | * the reserve pool is used to reduce device entitlement, the excess | ||
| 190 | * pool is used to increase the reserve pool toward the desired entitlement | ||
| 191 | * target, and then the remaining memory is returned to the pools. | ||
| 192 | * | ||
| 193 | */ | ||
| 194 | static inline void vio_cmo_dealloc(struct vio_dev *viodev, size_t size) | ||
| 195 | { | ||
| 196 | unsigned long flags; | ||
| 197 | size_t spare_needed = 0; | ||
| 198 | size_t excess_freed = 0; | ||
| 199 | size_t reserve_freed = size; | ||
| 200 | size_t tmp; | ||
| 201 | int balance = 0; | ||
| 202 | |||
| 203 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 204 | vio_cmo.curr -= size; | ||
| 205 | |||
| 206 | /* Amount of memory freed from the excess pool */ | ||
| 207 | if (viodev->cmo.allocated > viodev->cmo.entitled) { | ||
| 208 | excess_freed = min(reserve_freed, (viodev->cmo.allocated - | ||
| 209 | viodev->cmo.entitled)); | ||
| 210 | reserve_freed -= excess_freed; | ||
| 211 | } | ||
| 212 | |||
| 213 | /* Remove allocation from device */ | ||
| 214 | viodev->cmo.allocated -= (reserve_freed + excess_freed); | ||
| 215 | |||
| 216 | /* Spare is a subset of the reserve pool, replenish it first. */ | ||
| 217 | spare_needed = VIO_CMO_MIN_ENT - vio_cmo.spare; | ||
| 218 | |||
| 219 | /* | ||
| 220 | * Replenish the spare in the reserve pool from the excess pool. | ||
| 221 | * This moves entitlement into the reserve pool. | ||
| 222 | */ | ||
| 223 | if (spare_needed && excess_freed) { | ||
| 224 | tmp = min(excess_freed, spare_needed); | ||
| 225 | vio_cmo.excess.size -= tmp; | ||
| 226 | vio_cmo.reserve.size += tmp; | ||
| 227 | vio_cmo.spare += tmp; | ||
| 228 | excess_freed -= tmp; | ||
| 229 | spare_needed -= tmp; | ||
| 230 | balance = 1; | ||
| 231 | } | ||
| 232 | |||
| 233 | /* | ||
| 234 | * Replenish the spare in the reserve pool from the reserve pool. | ||
| 235 | * This removes entitlement from the device down to VIO_CMO_MIN_ENT, | ||
| 236 | * if needed, and gives it to the spare pool. The amount of used | ||
| 237 | * memory in this pool does not change. | ||
| 238 | */ | ||
| 239 | if (spare_needed && reserve_freed) { | ||
| 240 | tmp = min(spare_needed, min(reserve_freed, | ||
| 241 | (viodev->cmo.entitled - | ||
| 242 | VIO_CMO_MIN_ENT))); | ||
| 243 | |||
| 244 | vio_cmo.spare += tmp; | ||
| 245 | viodev->cmo.entitled -= tmp; | ||
| 246 | reserve_freed -= tmp; | ||
| 247 | spare_needed -= tmp; | ||
| 248 | balance = 1; | ||
| 249 | } | ||
| 250 | |||
| 251 | /* | ||
| 252 | * Increase the reserve pool until the desired allocation is met. | ||
| 253 | * Move an allocation freed from the excess pool into the reserve | ||
| 254 | * pool and schedule a balance operation. | ||
| 255 | */ | ||
| 256 | if (excess_freed && (vio_cmo.desired > vio_cmo.reserve.size)) { | ||
| 257 | tmp = min(excess_freed, (vio_cmo.desired - vio_cmo.reserve.size)); | ||
| 258 | |||
| 259 | vio_cmo.excess.size -= tmp; | ||
| 260 | vio_cmo.reserve.size += tmp; | ||
| 261 | excess_freed -= tmp; | ||
| 262 | balance = 1; | ||
| 263 | } | ||
| 264 | |||
| 265 | /* Return memory from the excess pool to that pool */ | ||
| 266 | if (excess_freed) | ||
| 267 | vio_cmo.excess.free += excess_freed; | ||
| 268 | |||
| 269 | if (balance) | ||
| 270 | schedule_delayed_work(&vio_cmo.balance_q, VIO_CMO_BALANCE_DELAY); | ||
| 271 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 272 | } | ||
| 273 | |||
| 274 | /** | ||
| 275 | * vio_cmo_entitlement_update - Manage system entitlement changes | ||
| 276 | * | ||
| 277 | * @new_entitlement: new system entitlement to attempt to accommodate | ||
| 278 | * | ||
| 279 | * Increases in entitlement will be used to fulfill the spare entitlement | ||
| 280 | * and the rest is given to the excess pool. Decreases, if they are | ||
| 281 | * possible, come from the excess pool and from unused device entitlement | ||
| 282 | * | ||
| 283 | * Returns: 0 on success, -ENOMEM when change can not be made | ||
| 284 | */ | ||
| 285 | int vio_cmo_entitlement_update(size_t new_entitlement) | ||
| 286 | { | ||
| 287 | struct vio_dev *viodev; | ||
| 288 | struct vio_cmo_dev_entry *dev_ent; | ||
| 289 | unsigned long flags; | ||
| 290 | size_t avail, delta, tmp; | ||
| 291 | |||
| 292 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 293 | |||
| 294 | /* Entitlement increases */ | ||
| 295 | if (new_entitlement > vio_cmo.entitled) { | ||
| 296 | delta = new_entitlement - vio_cmo.entitled; | ||
| 297 | |||
| 298 | /* Fulfill spare allocation */ | ||
| 299 | if (vio_cmo.spare < VIO_CMO_MIN_ENT) { | ||
| 300 | tmp = min(delta, (VIO_CMO_MIN_ENT - vio_cmo.spare)); | ||
| 301 | vio_cmo.spare += tmp; | ||
| 302 | vio_cmo.reserve.size += tmp; | ||
| 303 | delta -= tmp; | ||
| 304 | } | ||
| 305 | |||
| 306 | /* Remaining new allocation goes to the excess pool */ | ||
| 307 | vio_cmo.entitled += delta; | ||
| 308 | vio_cmo.excess.size += delta; | ||
| 309 | vio_cmo.excess.free += delta; | ||
| 310 | |||
| 311 | goto out; | ||
| 312 | } | ||
| 313 | |||
| 314 | /* Entitlement decreases */ | ||
| 315 | delta = vio_cmo.entitled - new_entitlement; | ||
| 316 | avail = vio_cmo.excess.free; | ||
| 317 | |||
| 318 | /* | ||
| 319 | * Need to check how much unused entitlement each device can | ||
| 320 | * sacrifice to fulfill entitlement change. | ||
| 321 | */ | ||
| 322 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) { | ||
| 323 | if (avail >= delta) | ||
| 324 | break; | ||
| 325 | |||
| 326 | viodev = dev_ent->viodev; | ||
| 327 | if ((viodev->cmo.entitled > viodev->cmo.allocated) && | ||
| 328 | (viodev->cmo.entitled > VIO_CMO_MIN_ENT)) | ||
| 329 | avail += viodev->cmo.entitled - | ||
| 330 | max_t(size_t, viodev->cmo.allocated, | ||
| 331 | VIO_CMO_MIN_ENT); | ||
| 332 | } | ||
| 333 | |||
| 334 | if (delta <= avail) { | ||
| 335 | vio_cmo.entitled -= delta; | ||
| 336 | |||
| 337 | /* Take entitlement from the excess pool first */ | ||
| 338 | tmp = min(vio_cmo.excess.free, delta); | ||
| 339 | vio_cmo.excess.size -= tmp; | ||
| 340 | vio_cmo.excess.free -= tmp; | ||
| 341 | delta -= tmp; | ||
| 342 | |||
| 343 | /* | ||
| 344 | * Remove all but VIO_CMO_MIN_ENT bytes from devices | ||
| 345 | * until entitlement change is served | ||
| 346 | */ | ||
| 347 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) { | ||
| 348 | if (!delta) | ||
| 349 | break; | ||
| 350 | |||
| 351 | viodev = dev_ent->viodev; | ||
| 352 | tmp = 0; | ||
| 353 | if ((viodev->cmo.entitled > viodev->cmo.allocated) && | ||
| 354 | (viodev->cmo.entitled > VIO_CMO_MIN_ENT)) | ||
| 355 | tmp = viodev->cmo.entitled - | ||
| 356 | max_t(size_t, viodev->cmo.allocated, | ||
| 357 | VIO_CMO_MIN_ENT); | ||
| 358 | viodev->cmo.entitled -= min(tmp, delta); | ||
| 359 | delta -= min(tmp, delta); | ||
| 360 | } | ||
| 361 | } else { | ||
| 362 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 363 | return -ENOMEM; | ||
| 364 | } | ||
| 365 | |||
| 366 | out: | ||
| 367 | schedule_delayed_work(&vio_cmo.balance_q, 0); | ||
| 368 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 369 | return 0; | ||
| 370 | } | ||
| 371 | |||
| 372 | /** | ||
| 373 | * vio_cmo_balance - Balance entitlement among devices | ||
| 374 | * | ||
| 375 | * @work: work queue structure for this operation | ||
| 376 | * | ||
| 377 | * Any system entitlement above the minimum needed for devices, or | ||
| 378 | * already allocated to devices, can be distributed to the devices. | ||
| 379 | * The list of devices is iterated through to recalculate the desired | ||
| 380 | * entitlement level and to determine how much entitlement above the | ||
| 381 | * minimum entitlement is allocated to devices. | ||
| 382 | * | ||
| 383 | * Small chunks of the available entitlement are given to devices until | ||
| 384 | * their requirements are fulfilled or there is no entitlement left to give. | ||
| 385 | * Upon completion sizes of the reserve and excess pools are calculated. | ||
| 386 | * | ||
| 387 | * The system minimum entitlement level is also recalculated here. | ||
| 388 | * Entitlement will be reserved for devices even after vio_bus_remove to | ||
| 389 | * accommodate reloading the driver. The OF tree is walked to count the | ||
| 390 | * number of devices present and this will remove entitlement for devices | ||
| 391 | * that have actually left the system after having vio_bus_remove called. | ||
| 392 | */ | ||
| 393 | static void vio_cmo_balance(struct work_struct *work) | ||
| 394 | { | ||
| 395 | struct vio_cmo *cmo; | ||
| 396 | struct vio_dev *viodev; | ||
| 397 | struct vio_cmo_dev_entry *dev_ent; | ||
| 398 | unsigned long flags; | ||
| 399 | size_t avail = 0, level, chunk, need; | ||
| 400 | int devcount = 0, fulfilled; | ||
| 401 | |||
| 402 | cmo = container_of(work, struct vio_cmo, balance_q.work); | ||
| 403 | |||
| 404 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 405 | |||
| 406 | /* Calculate minimum entitlement and fulfill spare */ | ||
| 407 | cmo->min = vio_cmo_num_OF_devs() * VIO_CMO_MIN_ENT; | ||
| 408 | BUG_ON(cmo->min > cmo->entitled); | ||
| 409 | cmo->spare = min_t(size_t, VIO_CMO_MIN_ENT, (cmo->entitled - cmo->min)); | ||
| 410 | cmo->min += cmo->spare; | ||
| 411 | cmo->desired = cmo->min; | ||
| 412 | |||
| 413 | /* | ||
| 414 | * Determine how much entitlement is available and reset device | ||
| 415 | * entitlements | ||
| 416 | */ | ||
| 417 | avail = cmo->entitled - cmo->spare; | ||
| 418 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) { | ||
| 419 | viodev = dev_ent->viodev; | ||
| 420 | devcount++; | ||
| 421 | viodev->cmo.entitled = VIO_CMO_MIN_ENT; | ||
| 422 | cmo->desired += (viodev->cmo.desired - VIO_CMO_MIN_ENT); | ||
| 423 | avail -= max_t(size_t, viodev->cmo.allocated, VIO_CMO_MIN_ENT); | ||
| 424 | } | ||
| 425 | |||
| 426 | /* | ||
| 427 | * Having provided each device with the minimum entitlement, loop | ||
| 428 | * over the devices portioning out the remaining entitlement | ||
| 429 | * until there is nothing left. | ||
| 430 | */ | ||
| 431 | level = VIO_CMO_MIN_ENT; | ||
| 432 | while (avail) { | ||
| 433 | fulfilled = 0; | ||
| 434 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) { | ||
| 435 | viodev = dev_ent->viodev; | ||
| 436 | |||
| 437 | if (viodev->cmo.desired <= level) { | ||
| 438 | fulfilled++; | ||
| 439 | continue; | ||
| 440 | } | ||
| 441 | |||
| 442 | /* | ||
| 443 | * Give the device up to VIO_CMO_BALANCE_CHUNK | ||
| 444 | * bytes of entitlement, but do not exceed the | ||
| 445 | * desired level of entitlement for the device. | ||
| 446 | */ | ||
| 447 | chunk = min_t(size_t, avail, VIO_CMO_BALANCE_CHUNK); | ||
| 448 | chunk = min(chunk, (viodev->cmo.desired - | ||
| 449 | viodev->cmo.entitled)); | ||
| 450 | viodev->cmo.entitled += chunk; | ||
| 451 | |||
| 452 | /* | ||
| 453 | * If the memory for this entitlement increase was | ||
| 454 | * already allocated to the device it does not come | ||
| 455 | * from the available pool being portioned out. | ||
| 456 | */ | ||
| 457 | need = max(viodev->cmo.allocated, viodev->cmo.entitled)- | ||
| 458 | max(viodev->cmo.allocated, level); | ||
| 459 | avail -= need; | ||
| 460 | |||
| 461 | } | ||
| 462 | if (fulfilled == devcount) | ||
| 463 | break; | ||
| 464 | level += VIO_CMO_BALANCE_CHUNK; | ||
| 465 | } | ||
| 466 | |||
| 467 | /* Calculate new reserve and excess pool sizes */ | ||
| 468 | cmo->reserve.size = cmo->min; | ||
| 469 | cmo->excess.free = 0; | ||
| 470 | cmo->excess.size = 0; | ||
| 471 | need = 0; | ||
| 472 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) { | ||
| 473 | viodev = dev_ent->viodev; | ||
| 474 | /* Calculated reserve size above the minimum entitlement */ | ||
| 475 | if (viodev->cmo.entitled) | ||
| 476 | cmo->reserve.size += (viodev->cmo.entitled - | ||
| 477 | VIO_CMO_MIN_ENT); | ||
| 478 | /* Calculated used excess entitlement */ | ||
| 479 | if (viodev->cmo.allocated > viodev->cmo.entitled) | ||
| 480 | need += viodev->cmo.allocated - viodev->cmo.entitled; | ||
| 481 | } | ||
| 482 | cmo->excess.size = cmo->entitled - cmo->reserve.size; | ||
| 483 | cmo->excess.free = cmo->excess.size - need; | ||
| 484 | |||
| 485 | cancel_delayed_work(container_of(work, struct delayed_work, work)); | ||
| 486 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 487 | } | ||
| 488 | |||
| 489 | static void *vio_dma_iommu_alloc_coherent(struct device *dev, size_t size, | ||
| 490 | dma_addr_t *dma_handle, gfp_t flag) | ||
| 491 | { | ||
| 492 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 493 | void *ret; | ||
| 494 | |||
| 495 | if (vio_cmo_alloc(viodev, roundup(size, IOMMU_PAGE_SIZE))) { | ||
| 496 | atomic_inc(&viodev->cmo.allocs_failed); | ||
| 497 | return NULL; | ||
| 498 | } | ||
| 499 | |||
| 500 | ret = dma_iommu_ops.alloc_coherent(dev, size, dma_handle, flag); | ||
| 501 | if (unlikely(ret == NULL)) { | ||
| 502 | vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE)); | ||
| 503 | atomic_inc(&viodev->cmo.allocs_failed); | ||
| 504 | } | ||
| 505 | |||
| 506 | return ret; | ||
| 507 | } | ||
| 508 | |||
| 509 | static void vio_dma_iommu_free_coherent(struct device *dev, size_t size, | ||
| 510 | void *vaddr, dma_addr_t dma_handle) | ||
| 511 | { | ||
| 512 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 513 | |||
| 514 | dma_iommu_ops.free_coherent(dev, size, vaddr, dma_handle); | ||
| 515 | |||
| 516 | vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE)); | ||
| 517 | } | ||
| 518 | |||
| 519 | static dma_addr_t vio_dma_iommu_map_single(struct device *dev, void *vaddr, | ||
| 520 | size_t size, | ||
| 521 | enum dma_data_direction direction, | ||
| 522 | struct dma_attrs *attrs) | ||
| 523 | { | ||
| 524 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 525 | dma_addr_t ret = DMA_ERROR_CODE; | ||
| 526 | |||
| 527 | if (vio_cmo_alloc(viodev, roundup(size, IOMMU_PAGE_SIZE))) { | ||
| 528 | atomic_inc(&viodev->cmo.allocs_failed); | ||
| 529 | return ret; | ||
| 530 | } | ||
| 531 | |||
| 532 | ret = dma_iommu_ops.map_single(dev, vaddr, size, direction, attrs); | ||
| 533 | if (unlikely(dma_mapping_error(ret))) { | ||
| 534 | vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE)); | ||
| 535 | atomic_inc(&viodev->cmo.allocs_failed); | ||
| 536 | } | ||
| 537 | |||
| 538 | return ret; | ||
| 539 | } | ||
| 540 | |||
| 541 | static void vio_dma_iommu_unmap_single(struct device *dev, | ||
| 542 | dma_addr_t dma_handle, size_t size, | ||
| 543 | enum dma_data_direction direction, | ||
| 544 | struct dma_attrs *attrs) | ||
| 545 | { | ||
| 546 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 547 | |||
| 548 | dma_iommu_ops.unmap_single(dev, dma_handle, size, direction, attrs); | ||
| 549 | |||
| 550 | vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE)); | ||
| 551 | } | ||
| 552 | |||
| 553 | static int vio_dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist, | ||
| 554 | int nelems, enum dma_data_direction direction, | ||
| 555 | struct dma_attrs *attrs) | ||
| 556 | { | ||
| 557 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 558 | struct scatterlist *sgl; | ||
| 559 | int ret, count = 0; | ||
| 560 | size_t alloc_size = 0; | ||
| 561 | |||
| 562 | for (sgl = sglist; count < nelems; count++, sgl++) | ||
| 563 | alloc_size += roundup(sgl->length, IOMMU_PAGE_SIZE); | ||
| 564 | |||
| 565 | if (vio_cmo_alloc(viodev, alloc_size)) { | ||
| 566 | atomic_inc(&viodev->cmo.allocs_failed); | ||
| 567 | return 0; | ||
| 568 | } | ||
| 569 | |||
| 570 | ret = dma_iommu_ops.map_sg(dev, sglist, nelems, direction, attrs); | ||
| 571 | |||
| 572 | if (unlikely(!ret)) { | ||
| 573 | vio_cmo_dealloc(viodev, alloc_size); | ||
| 574 | atomic_inc(&viodev->cmo.allocs_failed); | ||
| 575 | } | ||
| 576 | |||
| 577 | for (sgl = sglist, count = 0; count < ret; count++, sgl++) | ||
| 578 | alloc_size -= roundup(sgl->dma_length, IOMMU_PAGE_SIZE); | ||
| 579 | if (alloc_size) | ||
| 580 | vio_cmo_dealloc(viodev, alloc_size); | ||
| 581 | |||
| 582 | return ret; | ||
| 583 | } | ||
| 584 | |||
| 585 | static void vio_dma_iommu_unmap_sg(struct device *dev, | ||
| 586 | struct scatterlist *sglist, int nelems, | ||
| 587 | enum dma_data_direction direction, | ||
| 588 | struct dma_attrs *attrs) | ||
| 589 | { | ||
| 590 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 591 | struct scatterlist *sgl; | ||
| 592 | size_t alloc_size = 0; | ||
| 593 | int count = 0; | ||
| 594 | |||
| 595 | for (sgl = sglist; count < nelems; count++, sgl++) | ||
| 596 | alloc_size += roundup(sgl->dma_length, IOMMU_PAGE_SIZE); | ||
| 597 | |||
| 598 | dma_iommu_ops.unmap_sg(dev, sglist, nelems, direction, attrs); | ||
| 599 | |||
| 600 | vio_cmo_dealloc(viodev, alloc_size); | ||
| 601 | } | ||
| 602 | |||
| 603 | struct dma_mapping_ops vio_dma_mapping_ops = { | ||
| 604 | .alloc_coherent = vio_dma_iommu_alloc_coherent, | ||
| 605 | .free_coherent = vio_dma_iommu_free_coherent, | ||
| 606 | .map_single = vio_dma_iommu_map_single, | ||
| 607 | .unmap_single = vio_dma_iommu_unmap_single, | ||
| 608 | .map_sg = vio_dma_iommu_map_sg, | ||
| 609 | .unmap_sg = vio_dma_iommu_unmap_sg, | ||
| 610 | }; | ||
| 611 | |||
| 612 | /** | ||
| 613 | * vio_cmo_set_dev_desired - Set desired entitlement for a device | ||
| 614 | * | ||
| 615 | * @viodev: struct vio_dev for device to alter | ||
| 616 | * @new_desired: new desired entitlement level in bytes | ||
| 617 | * | ||
| 618 | * For use by devices to request a change to their entitlement at runtime or | ||
| 619 | * through sysfs. The desired entitlement level is changed and a balancing | ||
| 620 | * of system resources is scheduled to run in the future. | ||
| 621 | */ | ||
| 622 | void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired) | ||
| 623 | { | ||
| 624 | unsigned long flags; | ||
| 625 | struct vio_cmo_dev_entry *dev_ent; | ||
| 626 | int found = 0; | ||
| 627 | |||
| 628 | if (!firmware_has_feature(FW_FEATURE_CMO)) | ||
| 629 | return; | ||
| 630 | |||
| 631 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 632 | if (desired < VIO_CMO_MIN_ENT) | ||
| 633 | desired = VIO_CMO_MIN_ENT; | ||
| 634 | |||
| 635 | /* | ||
| 636 | * Changes will not be made for devices not in the device list. | ||
| 637 | * If it is not in the device list, then no driver is loaded | ||
| 638 | * for the device and it can not receive entitlement. | ||
| 639 | */ | ||
| 640 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) | ||
| 641 | if (viodev == dev_ent->viodev) { | ||
| 642 | found = 1; | ||
| 643 | break; | ||
| 644 | } | ||
| 645 | if (!found) | ||
| 646 | return; | ||
| 647 | |||
| 648 | /* Increase/decrease in desired device entitlement */ | ||
| 649 | if (desired >= viodev->cmo.desired) { | ||
| 650 | /* Just bump the bus and device values prior to a balance*/ | ||
| 651 | vio_cmo.desired += desired - viodev->cmo.desired; | ||
| 652 | viodev->cmo.desired = desired; | ||
| 653 | } else { | ||
| 654 | /* Decrease bus and device values for desired entitlement */ | ||
| 655 | vio_cmo.desired -= viodev->cmo.desired - desired; | ||
| 656 | viodev->cmo.desired = desired; | ||
| 657 | /* | ||
| 658 | * If less entitlement is desired than current entitlement, move | ||
| 659 | * any reserve memory in the change region to the excess pool. | ||
| 660 | */ | ||
| 661 | if (viodev->cmo.entitled > desired) { | ||
| 662 | vio_cmo.reserve.size -= viodev->cmo.entitled - desired; | ||
| 663 | vio_cmo.excess.size += viodev->cmo.entitled - desired; | ||
| 664 | /* | ||
| 665 | * If entitlement moving from the reserve pool to the | ||
| 666 | * excess pool is currently unused, add to the excess | ||
| 667 | * free counter. | ||
| 668 | */ | ||
| 669 | if (viodev->cmo.allocated < viodev->cmo.entitled) | ||
| 670 | vio_cmo.excess.free += viodev->cmo.entitled - | ||
| 671 | max(viodev->cmo.allocated, desired); | ||
| 672 | viodev->cmo.entitled = desired; | ||
| 673 | } | ||
| 674 | } | ||
| 675 | schedule_delayed_work(&vio_cmo.balance_q, 0); | ||
| 676 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 677 | } | ||
| 678 | |||
| 679 | /** | ||
| 680 | * vio_cmo_bus_probe - Handle CMO specific bus probe activities | ||
| 681 | * | ||
| 682 | * @viodev - Pointer to struct vio_dev for device | ||
| 683 | * | ||
| 684 | * Determine the devices IO memory entitlement needs, attempting | ||
| 685 | * to satisfy the system minimum entitlement at first and scheduling | ||
| 686 | * a balance operation to take care of the rest at a later time. | ||
| 687 | * | ||
| 688 | * Returns: 0 on success, -EINVAL when device doesn't support CMO, and | ||
| 689 | * -ENOMEM when entitlement is not available for device or | ||
| 690 | * device entry. | ||
| 691 | * | ||
| 692 | */ | ||
| 693 | static int vio_cmo_bus_probe(struct vio_dev *viodev) | ||
| 694 | { | ||
| 695 | struct vio_cmo_dev_entry *dev_ent; | ||
| 696 | struct device *dev = &viodev->dev; | ||
| 697 | struct vio_driver *viodrv = to_vio_driver(dev->driver); | ||
| 698 | unsigned long flags; | ||
| 699 | size_t size; | ||
| 700 | |||
| 701 | /* | ||
| 702 | * Check to see that device has a DMA window and configure | ||
| 703 | * entitlement for the device. | ||
| 704 | */ | ||
| 705 | if (of_get_property(viodev->dev.archdata.of_node, | ||
| 706 | "ibm,my-dma-window", NULL)) { | ||
| 707 | /* Check that the driver is CMO enabled and get desired DMA */ | ||
| 708 | if (!viodrv->get_desired_dma) { | ||
| 709 | dev_err(dev, "%s: device driver does not support CMO\n", | ||
| 710 | __func__); | ||
| 711 | return -EINVAL; | ||
| 712 | } | ||
| 713 | |||
| 714 | viodev->cmo.desired = IOMMU_PAGE_ALIGN(viodrv->get_desired_dma(viodev)); | ||
| 715 | if (viodev->cmo.desired < VIO_CMO_MIN_ENT) | ||
| 716 | viodev->cmo.desired = VIO_CMO_MIN_ENT; | ||
| 717 | size = VIO_CMO_MIN_ENT; | ||
| 718 | |||
| 719 | dev_ent = kmalloc(sizeof(struct vio_cmo_dev_entry), | ||
| 720 | GFP_KERNEL); | ||
| 721 | if (!dev_ent) | ||
| 722 | return -ENOMEM; | ||
| 723 | |||
| 724 | dev_ent->viodev = viodev; | ||
| 725 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 726 | list_add(&dev_ent->list, &vio_cmo.device_list); | ||
| 727 | } else { | ||
| 728 | viodev->cmo.desired = 0; | ||
| 729 | size = 0; | ||
| 730 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 731 | } | ||
| 732 | |||
| 733 | /* | ||
| 734 | * If the needs for vio_cmo.min have not changed since they | ||
| 735 | * were last set, the number of devices in the OF tree has | ||
| 736 | * been constant and the IO memory for this is already in | ||
| 737 | * the reserve pool. | ||
| 738 | */ | ||
| 739 | if (vio_cmo.min == ((vio_cmo_num_OF_devs() + 1) * | ||
| 740 | VIO_CMO_MIN_ENT)) { | ||
| 741 | /* Updated desired entitlement if device requires it */ | ||
| 742 | if (size) | ||
| 743 | vio_cmo.desired += (viodev->cmo.desired - | ||
| 744 | VIO_CMO_MIN_ENT); | ||
| 745 | } else { | ||
| 746 | size_t tmp; | ||
| 747 | |||
| 748 | tmp = vio_cmo.spare + vio_cmo.excess.free; | ||
| 749 | if (tmp < size) { | ||
| 750 | dev_err(dev, "%s: insufficient free " | ||
| 751 | "entitlement to add device. " | ||
| 752 | "Need %lu, have %lu\n", __func__, | ||
| 753 | size, (vio_cmo.spare + tmp)); | ||
| 754 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 755 | return -ENOMEM; | ||
| 756 | } | ||
| 757 | |||
| 758 | /* Use excess pool first to fulfill request */ | ||
| 759 | tmp = min(size, vio_cmo.excess.free); | ||
| 760 | vio_cmo.excess.free -= tmp; | ||
| 761 | vio_cmo.excess.size -= tmp; | ||
| 762 | vio_cmo.reserve.size += tmp; | ||
| 763 | |||
| 764 | /* Use spare if excess pool was insufficient */ | ||
| 765 | vio_cmo.spare -= size - tmp; | ||
| 766 | |||
| 767 | /* Update bus accounting */ | ||
| 768 | vio_cmo.min += size; | ||
| 769 | vio_cmo.desired += viodev->cmo.desired; | ||
| 770 | } | ||
| 771 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 772 | return 0; | ||
| 773 | } | ||
| 774 | |||
| 775 | /** | ||
| 776 | * vio_cmo_bus_remove - Handle CMO specific bus removal activities | ||
| 777 | * | ||
| 778 | * @viodev - Pointer to struct vio_dev for device | ||
| 779 | * | ||
| 780 | * Remove the device from the cmo device list. The minimum entitlement | ||
| 781 | * will be reserved for the device as long as it is in the system. The | ||
| 782 | * rest of the entitlement the device had been allocated will be returned | ||
| 783 | * to the system. | ||
| 784 | */ | ||
| 785 | static void vio_cmo_bus_remove(struct vio_dev *viodev) | ||
| 786 | { | ||
| 787 | struct vio_cmo_dev_entry *dev_ent; | ||
| 788 | unsigned long flags; | ||
| 789 | size_t tmp; | ||
| 790 | |||
| 791 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 792 | if (viodev->cmo.allocated) { | ||
| 793 | dev_err(&viodev->dev, "%s: device had %lu bytes of IO " | ||
| 794 | "allocated after remove operation.\n", | ||
| 795 | __func__, viodev->cmo.allocated); | ||
| 796 | BUG(); | ||
| 797 | } | ||
| 798 | |||
| 799 | /* | ||
| 800 | * Remove the device from the device list being maintained for | ||
| 801 | * CMO enabled devices. | ||
| 802 | */ | ||
| 803 | list_for_each_entry(dev_ent, &vio_cmo.device_list, list) | ||
| 804 | if (viodev == dev_ent->viodev) { | ||
| 805 | list_del(&dev_ent->list); | ||
| 806 | kfree(dev_ent); | ||
| 807 | break; | ||
| 808 | } | ||
| 809 | |||
| 810 | /* | ||
| 811 | * Devices may not require any entitlement and they do not need | ||
| 812 | * to be processed. Otherwise, return the device's entitlement | ||
| 813 | * back to the pools. | ||
| 814 | */ | ||
| 815 | if (viodev->cmo.entitled) { | ||
| 816 | /* | ||
| 817 | * This device has not yet left the OF tree, it's | ||
| 818 | * minimum entitlement remains in vio_cmo.min and | ||
| 819 | * vio_cmo.desired | ||
| 820 | */ | ||
| 821 | vio_cmo.desired -= (viodev->cmo.desired - VIO_CMO_MIN_ENT); | ||
| 822 | |||
| 823 | /* | ||
| 824 | * Save min allocation for device in reserve as long | ||
| 825 | * as it exists in OF tree as determined by later | ||
| 826 | * balance operation | ||
| 827 | */ | ||
| 828 | viodev->cmo.entitled -= VIO_CMO_MIN_ENT; | ||
| 829 | |||
| 830 | /* Replenish spare from freed reserve pool */ | ||
| 831 | if (viodev->cmo.entitled && (vio_cmo.spare < VIO_CMO_MIN_ENT)) { | ||
| 832 | tmp = min(viodev->cmo.entitled, (VIO_CMO_MIN_ENT - | ||
| 833 | vio_cmo.spare)); | ||
| 834 | vio_cmo.spare += tmp; | ||
| 835 | viodev->cmo.entitled -= tmp; | ||
| 836 | } | ||
| 837 | |||
| 838 | /* Remaining reserve goes to excess pool */ | ||
| 839 | vio_cmo.excess.size += viodev->cmo.entitled; | ||
| 840 | vio_cmo.excess.free += viodev->cmo.entitled; | ||
| 841 | vio_cmo.reserve.size -= viodev->cmo.entitled; | ||
| 842 | |||
| 843 | /* | ||
| 844 | * Until the device is removed it will keep a | ||
| 845 | * minimum entitlement; this will guarantee that | ||
| 846 | * a module unload/load will result in a success. | ||
| 847 | */ | ||
| 848 | viodev->cmo.entitled = VIO_CMO_MIN_ENT; | ||
| 849 | viodev->cmo.desired = VIO_CMO_MIN_ENT; | ||
| 850 | atomic_set(&viodev->cmo.allocs_failed, 0); | ||
| 851 | } | ||
| 852 | |||
| 853 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 854 | } | ||
| 855 | |||
| 856 | static void vio_cmo_set_dma_ops(struct vio_dev *viodev) | ||
| 857 | { | ||
| 858 | vio_dma_mapping_ops.dma_supported = dma_iommu_ops.dma_supported; | ||
| 859 | viodev->dev.archdata.dma_ops = &vio_dma_mapping_ops; | ||
| 860 | } | ||
| 861 | |||
| 862 | /** | ||
| 863 | * vio_cmo_bus_init - CMO entitlement initialization at bus init time | ||
| 864 | * | ||
| 865 | * Set up the reserve and excess entitlement pools based on available | ||
| 866 | * system entitlement and the number of devices in the OF tree that | ||
| 867 | * require entitlement in the reserve pool. | ||
| 868 | */ | ||
| 869 | static void vio_cmo_bus_init(void) | ||
| 870 | { | ||
| 871 | struct hvcall_mpp_data mpp_data; | ||
| 872 | int err; | ||
| 873 | |||
| 874 | memset(&vio_cmo, 0, sizeof(struct vio_cmo)); | ||
| 875 | spin_lock_init(&vio_cmo.lock); | ||
| 876 | INIT_LIST_HEAD(&vio_cmo.device_list); | ||
| 877 | INIT_DELAYED_WORK(&vio_cmo.balance_q, vio_cmo_balance); | ||
| 878 | |||
| 879 | /* Get current system entitlement */ | ||
| 880 | err = h_get_mpp(&mpp_data); | ||
| 881 | |||
| 882 | /* | ||
| 883 | * On failure, continue with entitlement set to 0, will panic() | ||
| 884 | * later when spare is reserved. | ||
| 885 | */ | ||
| 886 | if (err != H_SUCCESS) { | ||
| 887 | printk(KERN_ERR "%s: unable to determine system IO "\ | ||
| 888 | "entitlement. (%d)\n", __func__, err); | ||
| 889 | vio_cmo.entitled = 0; | ||
| 890 | } else { | ||
| 891 | vio_cmo.entitled = mpp_data.entitled_mem; | ||
| 892 | } | ||
| 893 | |||
| 894 | /* Set reservation and check against entitlement */ | ||
| 895 | vio_cmo.spare = VIO_CMO_MIN_ENT; | ||
| 896 | vio_cmo.reserve.size = vio_cmo.spare; | ||
| 897 | vio_cmo.reserve.size += (vio_cmo_num_OF_devs() * | ||
| 898 | VIO_CMO_MIN_ENT); | ||
| 899 | if (vio_cmo.reserve.size > vio_cmo.entitled) { | ||
| 900 | printk(KERN_ERR "%s: insufficient system entitlement\n", | ||
| 901 | __func__); | ||
| 902 | panic("%s: Insufficient system entitlement", __func__); | ||
| 903 | } | ||
| 904 | |||
| 905 | /* Set the remaining accounting variables */ | ||
| 906 | vio_cmo.excess.size = vio_cmo.entitled - vio_cmo.reserve.size; | ||
| 907 | vio_cmo.excess.free = vio_cmo.excess.size; | ||
| 908 | vio_cmo.min = vio_cmo.reserve.size; | ||
| 909 | vio_cmo.desired = vio_cmo.reserve.size; | ||
| 910 | } | ||
| 911 | |||
| 912 | /* sysfs device functions and data structures for CMO */ | ||
| 913 | |||
| 914 | #define viodev_cmo_rd_attr(name) \ | ||
| 915 | static ssize_t viodev_cmo_##name##_show(struct device *dev, \ | ||
| 916 | struct device_attribute *attr, \ | ||
| 917 | char *buf) \ | ||
| 918 | { \ | ||
| 919 | return sprintf(buf, "%lu\n", to_vio_dev(dev)->cmo.name); \ | ||
| 920 | } | ||
| 921 | |||
| 922 | static ssize_t viodev_cmo_allocs_failed_show(struct device *dev, | ||
| 923 | struct device_attribute *attr, char *buf) | ||
| 924 | { | ||
| 925 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 926 | return sprintf(buf, "%d\n", atomic_read(&viodev->cmo.allocs_failed)); | ||
| 927 | } | ||
| 928 | |||
| 929 | static ssize_t viodev_cmo_allocs_failed_reset(struct device *dev, | ||
| 930 | struct device_attribute *attr, const char *buf, size_t count) | ||
| 931 | { | ||
| 932 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 933 | atomic_set(&viodev->cmo.allocs_failed, 0); | ||
| 934 | return count; | ||
| 935 | } | ||
| 936 | |||
| 937 | static ssize_t viodev_cmo_desired_set(struct device *dev, | ||
| 938 | struct device_attribute *attr, const char *buf, size_t count) | ||
| 939 | { | ||
| 940 | struct vio_dev *viodev = to_vio_dev(dev); | ||
| 941 | size_t new_desired; | ||
| 942 | int ret; | ||
| 943 | |||
| 944 | ret = strict_strtoul(buf, 10, &new_desired); | ||
| 945 | if (ret) | ||
| 946 | return ret; | ||
| 947 | |||
| 948 | vio_cmo_set_dev_desired(viodev, new_desired); | ||
| 949 | return count; | ||
| 950 | } | ||
| 951 | |||
| 952 | viodev_cmo_rd_attr(desired); | ||
| 953 | viodev_cmo_rd_attr(entitled); | ||
| 954 | viodev_cmo_rd_attr(allocated); | ||
| 955 | |||
| 956 | static ssize_t name_show(struct device *, struct device_attribute *, char *); | ||
| 957 | static ssize_t devspec_show(struct device *, struct device_attribute *, char *); | ||
| 958 | static struct device_attribute vio_cmo_dev_attrs[] = { | ||
| 959 | __ATTR_RO(name), | ||
| 960 | __ATTR_RO(devspec), | ||
| 961 | __ATTR(cmo_desired, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH, | ||
| 962 | viodev_cmo_desired_show, viodev_cmo_desired_set), | ||
| 963 | __ATTR(cmo_entitled, S_IRUGO, viodev_cmo_entitled_show, NULL), | ||
| 964 | __ATTR(cmo_allocated, S_IRUGO, viodev_cmo_allocated_show, NULL), | ||
| 965 | __ATTR(cmo_allocs_failed, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH, | ||
| 966 | viodev_cmo_allocs_failed_show, viodev_cmo_allocs_failed_reset), | ||
| 967 | __ATTR_NULL | ||
| 968 | }; | ||
| 969 | |||
| 970 | /* sysfs bus functions and data structures for CMO */ | ||
| 971 | |||
| 972 | #define viobus_cmo_rd_attr(name) \ | ||
| 973 | static ssize_t \ | ||
| 974 | viobus_cmo_##name##_show(struct bus_type *bt, char *buf) \ | ||
| 975 | { \ | ||
| 976 | return sprintf(buf, "%lu\n", vio_cmo.name); \ | ||
| 977 | } | ||
| 978 | |||
| 979 | #define viobus_cmo_pool_rd_attr(name, var) \ | ||
| 980 | static ssize_t \ | ||
| 981 | viobus_cmo_##name##_pool_show_##var(struct bus_type *bt, char *buf) \ | ||
| 982 | { \ | ||
| 983 | return sprintf(buf, "%lu\n", vio_cmo.name.var); \ | ||
| 984 | } | ||
| 985 | |||
| 986 | static ssize_t viobus_cmo_high_reset(struct bus_type *bt, const char *buf, | ||
| 987 | size_t count) | ||
| 988 | { | ||
| 989 | unsigned long flags; | ||
| 990 | |||
| 991 | spin_lock_irqsave(&vio_cmo.lock, flags); | ||
| 992 | vio_cmo.high = vio_cmo.curr; | ||
| 993 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
| 994 | |||
| 995 | return count; | ||
| 996 | } | ||
| 997 | |||
| 998 | viobus_cmo_rd_attr(entitled); | ||
| 999 | viobus_cmo_pool_rd_attr(reserve, size); | ||
| 1000 | viobus_cmo_pool_rd_attr(excess, size); | ||
| 1001 | viobus_cmo_pool_rd_attr(excess, free); | ||
| 1002 | viobus_cmo_rd_attr(spare); | ||
| 1003 | viobus_cmo_rd_attr(min); | ||
| 1004 | viobus_cmo_rd_attr(desired); | ||
| 1005 | viobus_cmo_rd_attr(curr); | ||
| 1006 | viobus_cmo_rd_attr(high); | ||
| 1007 | |||
| 1008 | static struct bus_attribute vio_cmo_bus_attrs[] = { | ||
| 1009 | __ATTR(cmo_entitled, S_IRUGO, viobus_cmo_entitled_show, NULL), | ||
| 1010 | __ATTR(cmo_reserve_size, S_IRUGO, viobus_cmo_reserve_pool_show_size, NULL), | ||
| 1011 | __ATTR(cmo_excess_size, S_IRUGO, viobus_cmo_excess_pool_show_size, NULL), | ||
| 1012 | __ATTR(cmo_excess_free, S_IRUGO, viobus_cmo_excess_pool_show_free, NULL), | ||
| 1013 | __ATTR(cmo_spare, S_IRUGO, viobus_cmo_spare_show, NULL), | ||
| 1014 | __ATTR(cmo_min, S_IRUGO, viobus_cmo_min_show, NULL), | ||
| 1015 | __ATTR(cmo_desired, S_IRUGO, viobus_cmo_desired_show, NULL), | ||
| 1016 | __ATTR(cmo_curr, S_IRUGO, viobus_cmo_curr_show, NULL), | ||
| 1017 | __ATTR(cmo_high, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH, | ||
| 1018 | viobus_cmo_high_show, viobus_cmo_high_reset), | ||
| 1019 | __ATTR_NULL | ||
| 1020 | }; | ||
| 1021 | |||
| 1022 | static void vio_cmo_sysfs_init(void) | ||
| 1023 | { | ||
| 1024 | vio_bus_type.dev_attrs = vio_cmo_dev_attrs; | ||
| 1025 | vio_bus_type.bus_attrs = vio_cmo_bus_attrs; | ||
| 1026 | } | ||
| 1027 | #else /* CONFIG_PPC_SMLPAR */ | ||
| 1028 | /* Dummy functions for iSeries platform */ | ||
| 1029 | int vio_cmo_entitlement_update(size_t new_entitlement) { return 0; } | ||
| 1030 | void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired) {} | ||
| 1031 | static int vio_cmo_bus_probe(struct vio_dev *viodev) { return 0; } | ||
| 1032 | static void vio_cmo_bus_remove(struct vio_dev *viodev) {} | ||
| 1033 | static void vio_cmo_set_dma_ops(struct vio_dev *viodev) {} | ||
| 1034 | static void vio_cmo_bus_init() {} | ||
| 1035 | static void vio_cmo_sysfs_init() { } | ||
| 1036 | #endif /* CONFIG_PPC_SMLPAR */ | ||
| 1037 | EXPORT_SYMBOL(vio_cmo_entitlement_update); | ||
| 1038 | EXPORT_SYMBOL(vio_cmo_set_dev_desired); | ||
| 1039 | |||
| 49 | static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) | 1040 | static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) |
| 50 | { | 1041 | { |
| 51 | const unsigned char *dma_window; | 1042 | const unsigned char *dma_window; |
| @@ -114,8 +1105,17 @@ static int vio_bus_probe(struct device *dev) | |||
| 114 | return error; | 1105 | return error; |
| 115 | 1106 | ||
| 116 | id = vio_match_device(viodrv->id_table, viodev); | 1107 | id = vio_match_device(viodrv->id_table, viodev); |
| 117 | if (id) | 1108 | if (id) { |
| 1109 | memset(&viodev->cmo, 0, sizeof(viodev->cmo)); | ||
| 1110 | if (firmware_has_feature(FW_FEATURE_CMO)) { | ||
| 1111 | error = vio_cmo_bus_probe(viodev); | ||
| 1112 | if (error) | ||
| 1113 | return error; | ||
| 1114 | } | ||
| 118 | error = viodrv->probe(viodev, id); | 1115 | error = viodrv->probe(viodev, id); |
| 1116 | if (error) | ||
| 1117 | vio_cmo_bus_remove(viodev); | ||
| 1118 | } | ||
| 119 | 1119 | ||
| 120 | return error; | 1120 | return error; |
| 121 | } | 1121 | } |
| @@ -125,12 +1125,23 @@ static int vio_bus_remove(struct device *dev) | |||
| 125 | { | 1125 | { |
| 126 | struct vio_dev *viodev = to_vio_dev(dev); | 1126 | struct vio_dev *viodev = to_vio_dev(dev); |
| 127 | struct vio_driver *viodrv = to_vio_driver(dev->driver); | 1127 | struct vio_driver *viodrv = to_vio_driver(dev->driver); |
| 1128 | struct device *devptr; | ||
| 1129 | int ret = 1; | ||
| 1130 | |||
| 1131 | /* | ||
| 1132 | * Hold a reference to the device after the remove function is called | ||
| 1133 | * to allow for CMO accounting cleanup for the device. | ||
| 1134 | */ | ||
| 1135 | devptr = get_device(dev); | ||
| 128 | 1136 | ||
| 129 | if (viodrv->remove) | 1137 | if (viodrv->remove) |
| 130 | return viodrv->remove(viodev); | 1138 | ret = viodrv->remove(viodev); |
| 1139 | |||
| 1140 | if (!ret && firmware_has_feature(FW_FEATURE_CMO)) | ||
| 1141 | vio_cmo_bus_remove(viodev); | ||
| 131 | 1142 | ||
| 132 | /* driver can't remove */ | 1143 | put_device(devptr); |
| 133 | return 1; | 1144 | return ret; |
| 134 | } | 1145 | } |
| 135 | 1146 | ||
| 136 | /** | 1147 | /** |
| @@ -215,7 +1226,11 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) | |||
| 215 | viodev->unit_address = *unit_address; | 1226 | viodev->unit_address = *unit_address; |
| 216 | } | 1227 | } |
| 217 | viodev->dev.archdata.of_node = of_node_get(of_node); | 1228 | viodev->dev.archdata.of_node = of_node_get(of_node); |
| 218 | viodev->dev.archdata.dma_ops = &dma_iommu_ops; | 1229 | |
| 1230 | if (firmware_has_feature(FW_FEATURE_CMO)) | ||
| 1231 | vio_cmo_set_dma_ops(viodev); | ||
| 1232 | else | ||
| 1233 | viodev->dev.archdata.dma_ops = &dma_iommu_ops; | ||
| 219 | viodev->dev.archdata.dma_data = vio_build_iommu_table(viodev); | 1234 | viodev->dev.archdata.dma_data = vio_build_iommu_table(viodev); |
| 220 | viodev->dev.archdata.numa_node = of_node_to_nid(of_node); | 1235 | viodev->dev.archdata.numa_node = of_node_to_nid(of_node); |
| 221 | 1236 | ||
| @@ -245,6 +1260,9 @@ static int __init vio_bus_init(void) | |||
| 245 | int err; | 1260 | int err; |
| 246 | struct device_node *node_vroot; | 1261 | struct device_node *node_vroot; |
| 247 | 1262 | ||
| 1263 | if (firmware_has_feature(FW_FEATURE_CMO)) | ||
| 1264 | vio_cmo_sysfs_init(); | ||
| 1265 | |||
| 248 | err = bus_register(&vio_bus_type); | 1266 | err = bus_register(&vio_bus_type); |
| 249 | if (err) { | 1267 | if (err) { |
| 250 | printk(KERN_ERR "failed to register VIO bus\n"); | 1268 | printk(KERN_ERR "failed to register VIO bus\n"); |
| @@ -262,6 +1280,9 @@ static int __init vio_bus_init(void) | |||
| 262 | return err; | 1280 | return err; |
| 263 | } | 1281 | } |
| 264 | 1282 | ||
| 1283 | if (firmware_has_feature(FW_FEATURE_CMO)) | ||
| 1284 | vio_cmo_bus_init(); | ||
| 1285 | |||
| 265 | node_vroot = of_find_node_by_name(NULL, "vdevice"); | 1286 | node_vroot = of_find_node_by_name(NULL, "vdevice"); |
| 266 | if (node_vroot) { | 1287 | if (node_vroot) { |
| 267 | struct device_node *of_node; | 1288 | struct device_node *of_node; |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index a914411bced5..4a8ce62fe112 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
| @@ -85,7 +85,7 @@ SECTIONS | |||
| 85 | 85 | ||
| 86 | /* The dummy segment contents for the bug workaround mentioned above | 86 | /* The dummy segment contents for the bug workaround mentioned above |
| 87 | near PHDRS. */ | 87 | near PHDRS. */ |
| 88 | .dummy : { | 88 | .dummy : AT(ADDR(.dummy) - LOAD_OFFSET) { |
| 89 | LONG(0xf177) | 89 | LONG(0xf177) |
| 90 | } :kernel :dummy | 90 | } :kernel :dummy |
| 91 | 91 | ||
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 0559fe086eb4..7c975d43e3f3 100644 --- a/arch/powerpc/lib/code-patching.c +++ b/arch/powerpc/lib/code-patching.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 11 | #include <linux/vmalloc.h> | 11 | #include <linux/vmalloc.h> |
| 12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
| 13 | #include <linux/mm.h> | ||
| 13 | #include <asm/page.h> | 14 | #include <asm/page.h> |
| 14 | #include <asm/code-patching.h> | 15 | #include <asm/code-patching.h> |
| 15 | 16 | ||
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 1707d00331fc..565b7a237c84 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
| @@ -100,31 +100,6 @@ static int store_updates_sp(struct pt_regs *regs) | |||
| 100 | return 0; | 100 | return 0; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) | ||
| 104 | static void do_dabr(struct pt_regs *regs, unsigned long address, | ||
| 105 | unsigned long error_code) | ||
| 106 | { | ||
| 107 | siginfo_t info; | ||
| 108 | |||
| 109 | if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code, | ||
| 110 | 11, SIGSEGV) == NOTIFY_STOP) | ||
| 111 | return; | ||
| 112 | |||
| 113 | if (debugger_dabr_match(regs)) | ||
| 114 | return; | ||
| 115 | |||
| 116 | /* Clear the DABR */ | ||
| 117 | set_dabr(0); | ||
| 118 | |||
| 119 | /* Deliver the signal to userspace */ | ||
| 120 | info.si_signo = SIGTRAP; | ||
| 121 | info.si_errno = 0; | ||
| 122 | info.si_code = TRAP_HWBKPT; | ||
| 123 | info.si_addr = (void __user *)address; | ||
| 124 | force_sig_info(SIGTRAP, &info, current); | ||
| 125 | } | ||
| 126 | #endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/ | ||
| 127 | |||
| 128 | /* | 103 | /* |
| 129 | * For 600- and 800-family processors, the error_code parameter is DSISR | 104 | * For 600- and 800-family processors, the error_code parameter is DSISR |
| 130 | * for a data fault, SRR1 for an instruction fault. For 400-family processors | 105 | * for a data fault, SRR1 for an instruction fault. For 400-family processors |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 8d3b58ebd38e..5ce5a4dcd008 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | 68 | ||
| 69 | #define KB (1024) | 69 | #define KB (1024) |
| 70 | #define MB (1024*KB) | 70 | #define MB (1024*KB) |
| 71 | #define GB (1024L*MB) | ||
| 71 | 72 | ||
| 72 | /* | 73 | /* |
| 73 | * Note: pte --> Linux PTE | 74 | * Note: pte --> Linux PTE |
| @@ -102,7 +103,6 @@ int mmu_kernel_ssize = MMU_SEGSIZE_256M; | |||
| 102 | int mmu_highuser_ssize = MMU_SEGSIZE_256M; | 103 | int mmu_highuser_ssize = MMU_SEGSIZE_256M; |
| 103 | u16 mmu_slb_size = 64; | 104 | u16 mmu_slb_size = 64; |
| 104 | #ifdef CONFIG_HUGETLB_PAGE | 105 | #ifdef CONFIG_HUGETLB_PAGE |
| 105 | int mmu_huge_psize = MMU_PAGE_16M; | ||
| 106 | unsigned int HPAGE_SHIFT; | 106 | unsigned int HPAGE_SHIFT; |
| 107 | #endif | 107 | #endif |
| 108 | #ifdef CONFIG_PPC_64K_PAGES | 108 | #ifdef CONFIG_PPC_64K_PAGES |
| @@ -329,6 +329,44 @@ static int __init htab_dt_scan_page_sizes(unsigned long node, | |||
| 329 | return 0; | 329 | return 0; |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | /* Scan for 16G memory blocks that have been set aside for huge pages | ||
| 333 | * and reserve those blocks for 16G huge pages. | ||
| 334 | */ | ||
| 335 | static int __init htab_dt_scan_hugepage_blocks(unsigned long node, | ||
| 336 | const char *uname, int depth, | ||
| 337 | void *data) { | ||
| 338 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | ||
| 339 | unsigned long *addr_prop; | ||
| 340 | u32 *page_count_prop; | ||
| 341 | unsigned int expected_pages; | ||
| 342 | long unsigned int phys_addr; | ||
| 343 | long unsigned int block_size; | ||
| 344 | |||
| 345 | /* We are scanning "memory" nodes only */ | ||
| 346 | if (type == NULL || strcmp(type, "memory") != 0) | ||
| 347 | return 0; | ||
| 348 | |||
| 349 | /* This property is the log base 2 of the number of virtual pages that | ||
| 350 | * will represent this memory block. */ | ||
| 351 | page_count_prop = of_get_flat_dt_prop(node, "ibm,expected#pages", NULL); | ||
| 352 | if (page_count_prop == NULL) | ||
| 353 | return 0; | ||
| 354 | expected_pages = (1 << page_count_prop[0]); | ||
| 355 | addr_prop = of_get_flat_dt_prop(node, "reg", NULL); | ||
| 356 | if (addr_prop == NULL) | ||
| 357 | return 0; | ||
| 358 | phys_addr = addr_prop[0]; | ||
| 359 | block_size = addr_prop[1]; | ||
| 360 | if (block_size != (16 * GB)) | ||
| 361 | return 0; | ||
| 362 | printk(KERN_INFO "Huge page(16GB) memory: " | ||
| 363 | "addr = 0x%lX size = 0x%lX pages = %d\n", | ||
| 364 | phys_addr, block_size, expected_pages); | ||
| 365 | lmb_reserve(phys_addr, block_size * expected_pages); | ||
| 366 | add_gpage(phys_addr, block_size, expected_pages); | ||
| 367 | return 0; | ||
| 368 | } | ||
| 369 | |||
| 332 | static void __init htab_init_page_sizes(void) | 370 | static void __init htab_init_page_sizes(void) |
| 333 | { | 371 | { |
| 334 | int rc; | 372 | int rc; |
| @@ -418,15 +456,18 @@ static void __init htab_init_page_sizes(void) | |||
| 418 | ); | 456 | ); |
| 419 | 457 | ||
| 420 | #ifdef CONFIG_HUGETLB_PAGE | 458 | #ifdef CONFIG_HUGETLB_PAGE |
| 421 | /* Init large page size. Currently, we pick 16M or 1M depending | 459 | /* Reserve 16G huge page memory sections for huge pages */ |
| 460 | of_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL); | ||
| 461 | |||
| 462 | /* Set default large page size. Currently, we pick 16M or 1M depending | ||
| 422 | * on what is available | 463 | * on what is available |
| 423 | */ | 464 | */ |
| 424 | if (mmu_psize_defs[MMU_PAGE_16M].shift) | 465 | if (mmu_psize_defs[MMU_PAGE_16M].shift) |
| 425 | set_huge_psize(MMU_PAGE_16M); | 466 | HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_16M].shift; |
| 426 | /* With 4k/4level pagetables, we can't (for now) cope with a | 467 | /* With 4k/4level pagetables, we can't (for now) cope with a |
| 427 | * huge page size < PMD_SIZE */ | 468 | * huge page size < PMD_SIZE */ |
| 428 | else if (mmu_psize_defs[MMU_PAGE_1M].shift) | 469 | else if (mmu_psize_defs[MMU_PAGE_1M].shift) |
| 429 | set_huge_psize(MMU_PAGE_1M); | 470 | HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_1M].shift; |
| 430 | #endif /* CONFIG_HUGETLB_PAGE */ | 471 | #endif /* CONFIG_HUGETLB_PAGE */ |
| 431 | } | 472 | } |
| 432 | 473 | ||
| @@ -847,7 +888,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
| 847 | 888 | ||
| 848 | #ifdef CONFIG_HUGETLB_PAGE | 889 | #ifdef CONFIG_HUGETLB_PAGE |
| 849 | /* Handle hugepage regions */ | 890 | /* Handle hugepage regions */ |
| 850 | if (HPAGE_SHIFT && psize == mmu_huge_psize) { | 891 | if (HPAGE_SHIFT && mmu_huge_psizes[psize]) { |
| 851 | DBG_LOW(" -> huge page !\n"); | 892 | DBG_LOW(" -> huge page !\n"); |
| 852 | return hash_huge_page(mm, access, ea, vsid, local, trap); | 893 | return hash_huge_page(mm, access, ea, vsid, local, trap); |
| 853 | } | 894 | } |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 0d12fba31bc5..ed0aab0208a6 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
| @@ -24,21 +24,43 @@ | |||
| 24 | #include <asm/cputable.h> | 24 | #include <asm/cputable.h> |
| 25 | #include <asm/spu.h> | 25 | #include <asm/spu.h> |
| 26 | 26 | ||
| 27 | #define HPAGE_SHIFT_64K 16 | 27 | #define PAGE_SHIFT_64K 16 |
| 28 | #define HPAGE_SHIFT_16M 24 | 28 | #define PAGE_SHIFT_16M 24 |
| 29 | #define PAGE_SHIFT_16G 34 | ||
| 29 | 30 | ||
| 30 | #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) | 31 | #define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) |
| 31 | #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) | 32 | #define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) |
| 33 | #define MAX_NUMBER_GPAGES 1024 | ||
| 32 | 34 | ||
| 33 | unsigned int hugepte_shift; | 35 | /* Tracks the 16G pages after the device tree is scanned and before the |
| 34 | #define PTRS_PER_HUGEPTE (1 << hugepte_shift) | 36 | * huge_boot_pages list is ready. */ |
| 35 | #define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << hugepte_shift) | 37 | static unsigned long gpage_freearray[MAX_NUMBER_GPAGES]; |
| 38 | static unsigned nr_gpages; | ||
| 36 | 39 | ||
| 37 | #define HUGEPD_SHIFT (HPAGE_SHIFT + hugepte_shift) | 40 | /* Array of valid huge page sizes - non-zero value(hugepte_shift) is |
| 38 | #define HUGEPD_SIZE (1UL << HUGEPD_SHIFT) | 41 | * stored for the huge page sizes that are valid. |
| 39 | #define HUGEPD_MASK (~(HUGEPD_SIZE-1)) | 42 | */ |
| 43 | unsigned int mmu_huge_psizes[MMU_PAGE_COUNT] = { }; /* initialize all to 0 */ | ||
| 44 | |||
| 45 | #define hugepte_shift mmu_huge_psizes | ||
| 46 | #define PTRS_PER_HUGEPTE(psize) (1 << hugepte_shift[psize]) | ||
| 47 | #define HUGEPTE_TABLE_SIZE(psize) (sizeof(pte_t) << hugepte_shift[psize]) | ||
| 48 | |||
| 49 | #define HUGEPD_SHIFT(psize) (mmu_psize_to_shift(psize) \ | ||
| 50 | + hugepte_shift[psize]) | ||
| 51 | #define HUGEPD_SIZE(psize) (1UL << HUGEPD_SHIFT(psize)) | ||
| 52 | #define HUGEPD_MASK(psize) (~(HUGEPD_SIZE(psize)-1)) | ||
| 53 | |||
| 54 | /* Subtract one from array size because we don't need a cache for 4K since | ||
| 55 | * is not a huge page size */ | ||
| 56 | #define huge_pgtable_cache(psize) (pgtable_cache[HUGEPTE_CACHE_NUM \ | ||
| 57 | + psize-1]) | ||
| 58 | #define HUGEPTE_CACHE_NAME(psize) (huge_pgtable_cache_name[psize]) | ||
| 40 | 59 | ||
| 41 | #define huge_pgtable_cache (pgtable_cache[HUGEPTE_CACHE_NUM]) | 60 | static const char *huge_pgtable_cache_name[MMU_PAGE_COUNT] = { |
| 61 | "unused_4K", "hugepte_cache_64K", "unused_64K_AP", | ||
| 62 | "hugepte_cache_1M", "hugepte_cache_16M", "hugepte_cache_16G" | ||
| 63 | }; | ||
| 42 | 64 | ||
| 43 | /* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad() | 65 | /* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad() |
| 44 | * will choke on pointers to hugepte tables, which is handy for | 66 | * will choke on pointers to hugepte tables, which is handy for |
| @@ -49,24 +71,49 @@ typedef struct { unsigned long pd; } hugepd_t; | |||
| 49 | 71 | ||
| 50 | #define hugepd_none(hpd) ((hpd).pd == 0) | 72 | #define hugepd_none(hpd) ((hpd).pd == 0) |
| 51 | 73 | ||
| 74 | static inline int shift_to_mmu_psize(unsigned int shift) | ||
| 75 | { | ||
| 76 | switch (shift) { | ||
| 77 | #ifndef CONFIG_PPC_64K_PAGES | ||
| 78 | case PAGE_SHIFT_64K: | ||
| 79 | return MMU_PAGE_64K; | ||
| 80 | #endif | ||
| 81 | case PAGE_SHIFT_16M: | ||
| 82 | return MMU_PAGE_16M; | ||
| 83 | case PAGE_SHIFT_16G: | ||
| 84 | return MMU_PAGE_16G; | ||
| 85 | } | ||
| 86 | return -1; | ||
| 87 | } | ||
| 88 | |||
| 89 | static inline unsigned int mmu_psize_to_shift(unsigned int mmu_psize) | ||
| 90 | { | ||
| 91 | if (mmu_psize_defs[mmu_psize].shift) | ||
| 92 | return mmu_psize_defs[mmu_psize].shift; | ||
| 93 | BUG(); | ||
| 94 | } | ||
| 95 | |||
| 52 | static inline pte_t *hugepd_page(hugepd_t hpd) | 96 | static inline pte_t *hugepd_page(hugepd_t hpd) |
| 53 | { | 97 | { |
| 54 | BUG_ON(!(hpd.pd & HUGEPD_OK)); | 98 | BUG_ON(!(hpd.pd & HUGEPD_OK)); |
| 55 | return (pte_t *)(hpd.pd & ~HUGEPD_OK); | 99 | return (pte_t *)(hpd.pd & ~HUGEPD_OK); |
| 56 | } | 100 | } |
| 57 | 101 | ||
| 58 | static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr) | 102 | static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr, |
| 103 | struct hstate *hstate) | ||
| 59 | { | 104 | { |
| 60 | unsigned long idx = ((addr >> HPAGE_SHIFT) & (PTRS_PER_HUGEPTE-1)); | 105 | unsigned int shift = huge_page_shift(hstate); |
| 106 | int psize = shift_to_mmu_psize(shift); | ||
| 107 | unsigned long idx = ((addr >> shift) & (PTRS_PER_HUGEPTE(psize)-1)); | ||
| 61 | pte_t *dir = hugepd_page(*hpdp); | 108 | pte_t *dir = hugepd_page(*hpdp); |
| 62 | 109 | ||
| 63 | return dir + idx; | 110 | return dir + idx; |
| 64 | } | 111 | } |
| 65 | 112 | ||
| 66 | static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, | 113 | static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, |
| 67 | unsigned long address) | 114 | unsigned long address, unsigned int psize) |
| 68 | { | 115 | { |
| 69 | pte_t *new = kmem_cache_alloc(huge_pgtable_cache, | 116 | pte_t *new = kmem_cache_zalloc(huge_pgtable_cache(psize), |
| 70 | GFP_KERNEL|__GFP_REPEAT); | 117 | GFP_KERNEL|__GFP_REPEAT); |
| 71 | 118 | ||
| 72 | if (! new) | 119 | if (! new) |
| @@ -74,7 +121,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, | |||
| 74 | 121 | ||
| 75 | spin_lock(&mm->page_table_lock); | 122 | spin_lock(&mm->page_table_lock); |
| 76 | if (!hugepd_none(*hpdp)) | 123 | if (!hugepd_none(*hpdp)) |
| 77 | kmem_cache_free(huge_pgtable_cache, new); | 124 | kmem_cache_free(huge_pgtable_cache(psize), new); |
| 78 | else | 125 | else |
| 79 | hpdp->pd = (unsigned long)new | HUGEPD_OK; | 126 | hpdp->pd = (unsigned long)new | HUGEPD_OK; |
| 80 | spin_unlock(&mm->page_table_lock); | 127 | spin_unlock(&mm->page_table_lock); |
| @@ -83,27 +130,60 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, | |||
| 83 | 130 | ||
| 84 | /* Base page size affects how we walk hugetlb page tables */ | 131 | /* Base page size affects how we walk hugetlb page tables */ |
| 85 | #ifdef CONFIG_PPC_64K_PAGES | 132 | #ifdef CONFIG_PPC_64K_PAGES |
| 86 | #define hpmd_offset(pud, addr) pmd_offset(pud, addr) | 133 | #define hpmd_offset(pud, addr, h) pmd_offset(pud, addr) |
| 87 | #define hpmd_alloc(mm, pud, addr) pmd_alloc(mm, pud, addr) | 134 | #define hpmd_alloc(mm, pud, addr, h) pmd_alloc(mm, pud, addr) |
| 88 | #else | 135 | #else |
| 89 | static inline | 136 | static inline |
| 90 | pmd_t *hpmd_offset(pud_t *pud, unsigned long addr) | 137 | pmd_t *hpmd_offset(pud_t *pud, unsigned long addr, struct hstate *hstate) |
| 91 | { | 138 | { |
| 92 | if (HPAGE_SHIFT == HPAGE_SHIFT_64K) | 139 | if (huge_page_shift(hstate) == PAGE_SHIFT_64K) |
| 93 | return pmd_offset(pud, addr); | 140 | return pmd_offset(pud, addr); |
| 94 | else | 141 | else |
| 95 | return (pmd_t *) pud; | 142 | return (pmd_t *) pud; |
| 96 | } | 143 | } |
| 97 | static inline | 144 | static inline |
| 98 | pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr) | 145 | pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr, |
| 146 | struct hstate *hstate) | ||
| 99 | { | 147 | { |
| 100 | if (HPAGE_SHIFT == HPAGE_SHIFT_64K) | 148 | if (huge_page_shift(hstate) == PAGE_SHIFT_64K) |
| 101 | return pmd_alloc(mm, pud, addr); | 149 | return pmd_alloc(mm, pud, addr); |
| 102 | else | 150 | else |
| 103 | return (pmd_t *) pud; | 151 | return (pmd_t *) pud; |
| 104 | } | 152 | } |
| 105 | #endif | 153 | #endif |
| 106 | 154 | ||
| 155 | /* Build list of addresses of gigantic pages. This function is used in early | ||
| 156 | * boot before the buddy or bootmem allocator is setup. | ||
| 157 | */ | ||
| 158 | void add_gpage(unsigned long addr, unsigned long page_size, | ||
| 159 | unsigned long number_of_pages) | ||
| 160 | { | ||
| 161 | if (!addr) | ||
| 162 | return; | ||
| 163 | while (number_of_pages > 0) { | ||
| 164 | gpage_freearray[nr_gpages] = addr; | ||
| 165 | nr_gpages++; | ||
| 166 | number_of_pages--; | ||
| 167 | addr += page_size; | ||
| 168 | } | ||
| 169 | } | ||
| 170 | |||
| 171 | /* Moves the gigantic page addresses from the temporary list to the | ||
| 172 | * huge_boot_pages list. | ||
| 173 | */ | ||
| 174 | int alloc_bootmem_huge_page(struct hstate *hstate) | ||
| 175 | { | ||
| 176 | struct huge_bootmem_page *m; | ||
| 177 | if (nr_gpages == 0) | ||
| 178 | return 0; | ||
| 179 | m = phys_to_virt(gpage_freearray[--nr_gpages]); | ||
| 180 | gpage_freearray[nr_gpages] = 0; | ||
| 181 | list_add(&m->list, &huge_boot_pages); | ||
| 182 | m->hstate = hstate; | ||
| 183 | return 1; | ||
| 184 | } | ||
| 185 | |||
| 186 | |||
| 107 | /* Modelled after find_linux_pte() */ | 187 | /* Modelled after find_linux_pte() */ |
| 108 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 188 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
| 109 | { | 189 | { |
| @@ -111,39 +191,52 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
| 111 | pud_t *pu; | 191 | pud_t *pu; |
| 112 | pmd_t *pm; | 192 | pmd_t *pm; |
| 113 | 193 | ||
| 114 | BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize); | 194 | unsigned int psize; |
| 195 | unsigned int shift; | ||
| 196 | unsigned long sz; | ||
| 197 | struct hstate *hstate; | ||
| 198 | psize = get_slice_psize(mm, addr); | ||
| 199 | shift = mmu_psize_to_shift(psize); | ||
| 200 | sz = ((1UL) << shift); | ||
| 201 | hstate = size_to_hstate(sz); | ||
| 115 | 202 | ||
| 116 | addr &= HPAGE_MASK; | 203 | addr &= hstate->mask; |
| 117 | 204 | ||
| 118 | pg = pgd_offset(mm, addr); | 205 | pg = pgd_offset(mm, addr); |
| 119 | if (!pgd_none(*pg)) { | 206 | if (!pgd_none(*pg)) { |
| 120 | pu = pud_offset(pg, addr); | 207 | pu = pud_offset(pg, addr); |
| 121 | if (!pud_none(*pu)) { | 208 | if (!pud_none(*pu)) { |
| 122 | pm = hpmd_offset(pu, addr); | 209 | pm = hpmd_offset(pu, addr, hstate); |
| 123 | if (!pmd_none(*pm)) | 210 | if (!pmd_none(*pm)) |
| 124 | return hugepte_offset((hugepd_t *)pm, addr); | 211 | return hugepte_offset((hugepd_t *)pm, addr, |
| 212 | hstate); | ||
| 125 | } | 213 | } |
| 126 | } | 214 | } |
| 127 | 215 | ||
| 128 | return NULL; | 216 | return NULL; |
| 129 | } | 217 | } |
| 130 | 218 | ||
| 131 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 219 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
| 220 | unsigned long addr, unsigned long sz) | ||
| 132 | { | 221 | { |
| 133 | pgd_t *pg; | 222 | pgd_t *pg; |
| 134 | pud_t *pu; | 223 | pud_t *pu; |
| 135 | pmd_t *pm; | 224 | pmd_t *pm; |
| 136 | hugepd_t *hpdp = NULL; | 225 | hugepd_t *hpdp = NULL; |
| 226 | struct hstate *hstate; | ||
| 227 | unsigned int psize; | ||
| 228 | hstate = size_to_hstate(sz); | ||
| 137 | 229 | ||
| 138 | BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize); | 230 | psize = get_slice_psize(mm, addr); |
| 231 | BUG_ON(!mmu_huge_psizes[psize]); | ||
| 139 | 232 | ||
| 140 | addr &= HPAGE_MASK; | 233 | addr &= hstate->mask; |
| 141 | 234 | ||
| 142 | pg = pgd_offset(mm, addr); | 235 | pg = pgd_offset(mm, addr); |
| 143 | pu = pud_alloc(mm, pg, addr); | 236 | pu = pud_alloc(mm, pg, addr); |
| 144 | 237 | ||
| 145 | if (pu) { | 238 | if (pu) { |
| 146 | pm = hpmd_alloc(mm, pu, addr); | 239 | pm = hpmd_alloc(mm, pu, addr, hstate); |
| 147 | if (pm) | 240 | if (pm) |
| 148 | hpdp = (hugepd_t *)pm; | 241 | hpdp = (hugepd_t *)pm; |
| 149 | } | 242 | } |
| @@ -151,10 +244,10 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
| 151 | if (! hpdp) | 244 | if (! hpdp) |
| 152 | return NULL; | 245 | return NULL; |
| 153 | 246 | ||
| 154 | if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr)) | 247 | if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr, psize)) |
| 155 | return NULL; | 248 | return NULL; |
| 156 | 249 | ||
| 157 | return hugepte_offset(hpdp, addr); | 250 | return hugepte_offset(hpdp, addr, hstate); |
| 158 | } | 251 | } |
| 159 | 252 | ||
| 160 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | 253 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) |
| @@ -162,19 +255,22 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
| 162 | return 0; | 255 | return 0; |
| 163 | } | 256 | } |
| 164 | 257 | ||
| 165 | static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp) | 258 | static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp, |
| 259 | unsigned int psize) | ||
| 166 | { | 260 | { |
| 167 | pte_t *hugepte = hugepd_page(*hpdp); | 261 | pte_t *hugepte = hugepd_page(*hpdp); |
| 168 | 262 | ||
| 169 | hpdp->pd = 0; | 263 | hpdp->pd = 0; |
| 170 | tlb->need_flush = 1; | 264 | tlb->need_flush = 1; |
| 171 | pgtable_free_tlb(tlb, pgtable_free_cache(hugepte, HUGEPTE_CACHE_NUM, | 265 | pgtable_free_tlb(tlb, pgtable_free_cache(hugepte, |
| 266 | HUGEPTE_CACHE_NUM+psize-1, | ||
| 172 | PGF_CACHENUM_MASK)); | 267 | PGF_CACHENUM_MASK)); |
| 173 | } | 268 | } |
| 174 | 269 | ||
| 175 | static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud, | 270 | static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud, |
| 176 | unsigned long addr, unsigned long end, | 271 | unsigned long addr, unsigned long end, |
| 177 | unsigned long floor, unsigned long ceiling) | 272 | unsigned long floor, unsigned long ceiling, |
| 273 | unsigned int psize) | ||
| 178 | { | 274 | { |
| 179 | pmd_t *pmd; | 275 | pmd_t *pmd; |
| 180 | unsigned long next; | 276 | unsigned long next; |
| @@ -186,7 +282,7 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud, | |||
| 186 | next = pmd_addr_end(addr, end); | 282 | next = pmd_addr_end(addr, end); |
| 187 | if (pmd_none(*pmd)) | 283 | if (pmd_none(*pmd)) |
| 188 | continue; | 284 | continue; |
| 189 | free_hugepte_range(tlb, (hugepd_t *)pmd); | 285 | free_hugepte_range(tlb, (hugepd_t *)pmd, psize); |
| 190 | } while (pmd++, addr = next, addr != end); | 286 | } while (pmd++, addr = next, addr != end); |
| 191 | 287 | ||
| 192 | start &= PUD_MASK; | 288 | start &= PUD_MASK; |
| @@ -212,6 +308,9 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, | |||
| 212 | pud_t *pud; | 308 | pud_t *pud; |
| 213 | unsigned long next; | 309 | unsigned long next; |
| 214 | unsigned long start; | 310 | unsigned long start; |
| 311 | unsigned int shift; | ||
| 312 | unsigned int psize = get_slice_psize(tlb->mm, addr); | ||
| 313 | shift = mmu_psize_to_shift(psize); | ||
| 215 | 314 | ||
| 216 | start = addr; | 315 | start = addr; |
| 217 | pud = pud_offset(pgd, addr); | 316 | pud = pud_offset(pgd, addr); |
| @@ -220,16 +319,18 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, | |||
| 220 | #ifdef CONFIG_PPC_64K_PAGES | 319 | #ifdef CONFIG_PPC_64K_PAGES |
| 221 | if (pud_none_or_clear_bad(pud)) | 320 | if (pud_none_or_clear_bad(pud)) |
| 222 | continue; | 321 | continue; |
| 223 | hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling); | 322 | hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling, |
| 323 | psize); | ||
| 224 | #else | 324 | #else |
| 225 | if (HPAGE_SHIFT == HPAGE_SHIFT_64K) { | 325 | if (shift == PAGE_SHIFT_64K) { |
| 226 | if (pud_none_or_clear_bad(pud)) | 326 | if (pud_none_or_clear_bad(pud)) |
| 227 | continue; | 327 | continue; |
| 228 | hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling); | 328 | hugetlb_free_pmd_range(tlb, pud, addr, next, floor, |
| 329 | ceiling, psize); | ||
| 229 | } else { | 330 | } else { |
| 230 | if (pud_none(*pud)) | 331 | if (pud_none(*pud)) |
| 231 | continue; | 332 | continue; |
| 232 | free_hugepte_range(tlb, (hugepd_t *)pud); | 333 | free_hugepte_range(tlb, (hugepd_t *)pud, psize); |
| 233 | } | 334 | } |
| 234 | #endif | 335 | #endif |
| 235 | } while (pud++, addr = next, addr != end); | 336 | } while (pud++, addr = next, addr != end); |
| @@ -255,7 +356,7 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, | |||
| 255 | * | 356 | * |
| 256 | * Must be called with pagetable lock held. | 357 | * Must be called with pagetable lock held. |
| 257 | */ | 358 | */ |
| 258 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, | 359 | void hugetlb_free_pgd_range(struct mmu_gather *tlb, |
| 259 | unsigned long addr, unsigned long end, | 360 | unsigned long addr, unsigned long end, |
| 260 | unsigned long floor, unsigned long ceiling) | 361 | unsigned long floor, unsigned long ceiling) |
| 261 | { | 362 | { |
| @@ -297,31 +398,33 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, | |||
| 297 | * now has no other vmas using it, so can be freed, we don't | 398 | * now has no other vmas using it, so can be freed, we don't |
| 298 | * bother to round floor or end up - the tests don't need that. | 399 | * bother to round floor or end up - the tests don't need that. |
| 299 | */ | 400 | */ |
| 401 | unsigned int psize = get_slice_psize(tlb->mm, addr); | ||
| 300 | 402 | ||
| 301 | addr &= HUGEPD_MASK; | 403 | addr &= HUGEPD_MASK(psize); |
| 302 | if (addr < floor) { | 404 | if (addr < floor) { |
| 303 | addr += HUGEPD_SIZE; | 405 | addr += HUGEPD_SIZE(psize); |
| 304 | if (!addr) | 406 | if (!addr) |
| 305 | return; | 407 | return; |
| 306 | } | 408 | } |
| 307 | if (ceiling) { | 409 | if (ceiling) { |
| 308 | ceiling &= HUGEPD_MASK; | 410 | ceiling &= HUGEPD_MASK(psize); |
| 309 | if (!ceiling) | 411 | if (!ceiling) |
| 310 | return; | 412 | return; |
| 311 | } | 413 | } |
| 312 | if (end - 1 > ceiling - 1) | 414 | if (end - 1 > ceiling - 1) |
| 313 | end -= HUGEPD_SIZE; | 415 | end -= HUGEPD_SIZE(psize); |
| 314 | if (addr > end - 1) | 416 | if (addr > end - 1) |
| 315 | return; | 417 | return; |
| 316 | 418 | ||
| 317 | start = addr; | 419 | start = addr; |
| 318 | pgd = pgd_offset((*tlb)->mm, addr); | 420 | pgd = pgd_offset(tlb->mm, addr); |
| 319 | do { | 421 | do { |
| 320 | BUG_ON(get_slice_psize((*tlb)->mm, addr) != mmu_huge_psize); | 422 | psize = get_slice_psize(tlb->mm, addr); |
| 423 | BUG_ON(!mmu_huge_psizes[psize]); | ||
| 321 | next = pgd_addr_end(addr, end); | 424 | next = pgd_addr_end(addr, end); |
| 322 | if (pgd_none_or_clear_bad(pgd)) | 425 | if (pgd_none_or_clear_bad(pgd)) |
| 323 | continue; | 426 | continue; |
| 324 | hugetlb_free_pud_range(*tlb, pgd, addr, next, floor, ceiling); | 427 | hugetlb_free_pud_range(tlb, pgd, addr, next, floor, ceiling); |
| 325 | } while (pgd++, addr = next, addr != end); | 428 | } while (pgd++, addr = next, addr != end); |
| 326 | } | 429 | } |
| 327 | 430 | ||
| @@ -334,7 +437,11 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | |||
| 334 | * necessary anymore if we make hpte_need_flush() get the | 437 | * necessary anymore if we make hpte_need_flush() get the |
| 335 | * page size from the slices | 438 | * page size from the slices |
| 336 | */ | 439 | */ |
| 337 | pte_update(mm, addr & HPAGE_MASK, ptep, ~0UL, 1); | 440 | unsigned int psize = get_slice_psize(mm, addr); |
| 441 | unsigned int shift = mmu_psize_to_shift(psize); | ||
| 442 | unsigned long sz = ((1UL) << shift); | ||
| 443 | struct hstate *hstate = size_to_hstate(sz); | ||
| 444 | pte_update(mm, addr & hstate->mask, ptep, ~0UL, 1); | ||
| 338 | } | 445 | } |
| 339 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); | 446 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); |
| 340 | } | 447 | } |
| @@ -351,14 +458,19 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) | |||
| 351 | { | 458 | { |
| 352 | pte_t *ptep; | 459 | pte_t *ptep; |
| 353 | struct page *page; | 460 | struct page *page; |
| 461 | unsigned int mmu_psize = get_slice_psize(mm, address); | ||
| 354 | 462 | ||
| 355 | if (get_slice_psize(mm, address) != mmu_huge_psize) | 463 | /* Verify it is a huge page else bail. */ |
| 464 | if (!mmu_huge_psizes[mmu_psize]) | ||
| 356 | return ERR_PTR(-EINVAL); | 465 | return ERR_PTR(-EINVAL); |
| 357 | 466 | ||
| 358 | ptep = huge_pte_offset(mm, address); | 467 | ptep = huge_pte_offset(mm, address); |
| 359 | page = pte_page(*ptep); | 468 | page = pte_page(*ptep); |
| 360 | if (page) | 469 | if (page) { |
| 361 | page += (address % HPAGE_SIZE) / PAGE_SIZE; | 470 | unsigned int shift = mmu_psize_to_shift(mmu_psize); |
| 471 | unsigned long sz = ((1UL) << shift); | ||
| 472 | page += (address % sz) / PAGE_SIZE; | ||
| 473 | } | ||
| 362 | 474 | ||
| 363 | return page; | 475 | return page; |
| 364 | } | 476 | } |
| @@ -368,6 +480,11 @@ int pmd_huge(pmd_t pmd) | |||
| 368 | return 0; | 480 | return 0; |
| 369 | } | 481 | } |
| 370 | 482 | ||
| 483 | int pud_huge(pud_t pud) | ||
| 484 | { | ||
| 485 | return 0; | ||
| 486 | } | ||
| 487 | |||
| 371 | struct page * | 488 | struct page * |
| 372 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 489 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
| 373 | pmd_t *pmd, int write) | 490 | pmd_t *pmd, int write) |
| @@ -381,15 +498,16 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
| 381 | unsigned long len, unsigned long pgoff, | 498 | unsigned long len, unsigned long pgoff, |
| 382 | unsigned long flags) | 499 | unsigned long flags) |
| 383 | { | 500 | { |
| 384 | return slice_get_unmapped_area(addr, len, flags, | 501 | struct hstate *hstate = hstate_file(file); |
| 385 | mmu_huge_psize, 1, 0); | 502 | int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate)); |
| 503 | return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0); | ||
| 386 | } | 504 | } |
| 387 | 505 | ||
| 388 | /* | 506 | /* |
| 389 | * Called by asm hashtable.S for doing lazy icache flush | 507 | * Called by asm hashtable.S for doing lazy icache flush |
| 390 | */ | 508 | */ |
| 391 | static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags, | 509 | static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags, |
| 392 | pte_t pte, int trap) | 510 | pte_t pte, int trap, unsigned long sz) |
| 393 | { | 511 | { |
| 394 | struct page *page; | 512 | struct page *page; |
| 395 | int i; | 513 | int i; |
| @@ -402,7 +520,7 @@ static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags, | |||
| 402 | /* page is dirty */ | 520 | /* page is dirty */ |
| 403 | if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) { | 521 | if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) { |
| 404 | if (trap == 0x400) { | 522 | if (trap == 0x400) { |
| 405 | for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) | 523 | for (i = 0; i < (sz / PAGE_SIZE); i++) |
| 406 | __flush_dcache_icache(page_address(page+i)); | 524 | __flush_dcache_icache(page_address(page+i)); |
| 407 | set_bit(PG_arch_1, &page->flags); | 525 | set_bit(PG_arch_1, &page->flags); |
| 408 | } else { | 526 | } else { |
| @@ -418,11 +536,16 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
| 418 | { | 536 | { |
| 419 | pte_t *ptep; | 537 | pte_t *ptep; |
| 420 | unsigned long old_pte, new_pte; | 538 | unsigned long old_pte, new_pte; |
| 421 | unsigned long va, rflags, pa; | 539 | unsigned long va, rflags, pa, sz; |
| 422 | long slot; | 540 | long slot; |
| 423 | int err = 1; | 541 | int err = 1; |
| 424 | int ssize = user_segment_size(ea); | 542 | int ssize = user_segment_size(ea); |
| 543 | unsigned int mmu_psize; | ||
| 544 | int shift; | ||
| 545 | mmu_psize = get_slice_psize(mm, ea); | ||
| 425 | 546 | ||
| 547 | if (!mmu_huge_psizes[mmu_psize]) | ||
| 548 | goto out; | ||
| 426 | ptep = huge_pte_offset(mm, ea); | 549 | ptep = huge_pte_offset(mm, ea); |
| 427 | 550 | ||
| 428 | /* Search the Linux page table for a match with va */ | 551 | /* Search the Linux page table for a match with va */ |
| @@ -465,30 +588,32 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
| 465 | rflags = 0x2 | (!(new_pte & _PAGE_RW)); | 588 | rflags = 0x2 | (!(new_pte & _PAGE_RW)); |
| 466 | /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ | 589 | /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ |
| 467 | rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N); | 590 | rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N); |
| 591 | shift = mmu_psize_to_shift(mmu_psize); | ||
| 592 | sz = ((1UL) << shift); | ||
| 468 | if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | 593 | if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) |
| 469 | /* No CPU has hugepages but lacks no execute, so we | 594 | /* No CPU has hugepages but lacks no execute, so we |
| 470 | * don't need to worry about that case */ | 595 | * don't need to worry about that case */ |
| 471 | rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte), | 596 | rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte), |
| 472 | trap); | 597 | trap, sz); |
| 473 | 598 | ||
| 474 | /* Check if pte already has an hpte (case 2) */ | 599 | /* Check if pte already has an hpte (case 2) */ |
| 475 | if (unlikely(old_pte & _PAGE_HASHPTE)) { | 600 | if (unlikely(old_pte & _PAGE_HASHPTE)) { |
| 476 | /* There MIGHT be an HPTE for this pte */ | 601 | /* There MIGHT be an HPTE for this pte */ |
| 477 | unsigned long hash, slot; | 602 | unsigned long hash, slot; |
| 478 | 603 | ||
| 479 | hash = hpt_hash(va, HPAGE_SHIFT, ssize); | 604 | hash = hpt_hash(va, shift, ssize); |
| 480 | if (old_pte & _PAGE_F_SECOND) | 605 | if (old_pte & _PAGE_F_SECOND) |
| 481 | hash = ~hash; | 606 | hash = ~hash; |
| 482 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 607 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; |
| 483 | slot += (old_pte & _PAGE_F_GIX) >> 12; | 608 | slot += (old_pte & _PAGE_F_GIX) >> 12; |
| 484 | 609 | ||
| 485 | if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize, | 610 | if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_psize, |
| 486 | ssize, local) == -1) | 611 | ssize, local) == -1) |
| 487 | old_pte &= ~_PAGE_HPTEFLAGS; | 612 | old_pte &= ~_PAGE_HPTEFLAGS; |
| 488 | } | 613 | } |
| 489 | 614 | ||
| 490 | if (likely(!(old_pte & _PAGE_HASHPTE))) { | 615 | if (likely(!(old_pte & _PAGE_HASHPTE))) { |
| 491 | unsigned long hash = hpt_hash(va, HPAGE_SHIFT, ssize); | 616 | unsigned long hash = hpt_hash(va, shift, ssize); |
| 492 | unsigned long hpte_group; | 617 | unsigned long hpte_group; |
| 493 | 618 | ||
| 494 | pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT; | 619 | pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT; |
| @@ -509,7 +634,7 @@ repeat: | |||
| 509 | 634 | ||
| 510 | /* Insert into the hash table, primary slot */ | 635 | /* Insert into the hash table, primary slot */ |
| 511 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0, | 636 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0, |
| 512 | mmu_huge_psize, ssize); | 637 | mmu_psize, ssize); |
| 513 | 638 | ||
| 514 | /* Primary is full, try the secondary */ | 639 | /* Primary is full, try the secondary */ |
| 515 | if (unlikely(slot == -1)) { | 640 | if (unlikely(slot == -1)) { |
| @@ -517,7 +642,7 @@ repeat: | |||
| 517 | HPTES_PER_GROUP) & ~0x7UL; | 642 | HPTES_PER_GROUP) & ~0x7UL; |
| 518 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, | 643 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, |
| 519 | HPTE_V_SECONDARY, | 644 | HPTE_V_SECONDARY, |
| 520 | mmu_huge_psize, ssize); | 645 | mmu_psize, ssize); |
| 521 | if (slot == -1) { | 646 | if (slot == -1) { |
| 522 | if (mftb() & 0x1) | 647 | if (mftb() & 0x1) |
| 523 | hpte_group = ((hash & htab_hash_mask) * | 648 | hpte_group = ((hash & htab_hash_mask) * |
| @@ -549,45 +674,54 @@ void set_huge_psize(int psize) | |||
| 549 | { | 674 | { |
| 550 | /* Check that it is a page size supported by the hardware and | 675 | /* Check that it is a page size supported by the hardware and |
| 551 | * that it fits within pagetable limits. */ | 676 | * that it fits within pagetable limits. */ |
| 552 | if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT && | 677 | if (mmu_psize_defs[psize].shift && |
| 678 | mmu_psize_defs[psize].shift < SID_SHIFT_1T && | ||
| 553 | (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT || | 679 | (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT || |
| 554 | mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) { | 680 | mmu_psize_defs[psize].shift == PAGE_SHIFT_64K || |
| 555 | HPAGE_SHIFT = mmu_psize_defs[psize].shift; | 681 | mmu_psize_defs[psize].shift == PAGE_SHIFT_16G)) { |
| 556 | mmu_huge_psize = psize; | 682 | /* Return if huge page size has already been setup or is the |
| 557 | #ifdef CONFIG_PPC_64K_PAGES | 683 | * same as the base page size. */ |
| 558 | hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT); | 684 | if (mmu_huge_psizes[psize] || |
| 559 | #else | 685 | mmu_psize_defs[psize].shift == PAGE_SHIFT) |
| 560 | if (HPAGE_SHIFT == HPAGE_SHIFT_64K) | 686 | return; |
| 561 | hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT); | 687 | hugetlb_add_hstate(mmu_psize_defs[psize].shift - PAGE_SHIFT); |
| 562 | else | 688 | |
| 563 | hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT); | 689 | switch (mmu_psize_defs[psize].shift) { |
| 564 | #endif | 690 | case PAGE_SHIFT_64K: |
| 565 | 691 | /* We only allow 64k hpages with 4k base page, | |
| 692 | * which was checked above, and always put them | ||
| 693 | * at the PMD */ | ||
| 694 | hugepte_shift[psize] = PMD_SHIFT; | ||
| 695 | break; | ||
| 696 | case PAGE_SHIFT_16M: | ||
| 697 | /* 16M pages can be at two different levels | ||
| 698 | * of pagestables based on base page size */ | ||
| 699 | if (PAGE_SHIFT == PAGE_SHIFT_64K) | ||
| 700 | hugepte_shift[psize] = PMD_SHIFT; | ||
| 701 | else /* 4k base page */ | ||
| 702 | hugepte_shift[psize] = PUD_SHIFT; | ||
| 703 | break; | ||
| 704 | case PAGE_SHIFT_16G: | ||
| 705 | /* 16G pages are always at PGD level */ | ||
| 706 | hugepte_shift[psize] = PGDIR_SHIFT; | ||
| 707 | break; | ||
| 708 | } | ||
| 709 | hugepte_shift[psize] -= mmu_psize_defs[psize].shift; | ||
| 566 | } else | 710 | } else |
| 567 | HPAGE_SHIFT = 0; | 711 | hugepte_shift[psize] = 0; |
| 568 | } | 712 | } |
| 569 | 713 | ||
| 570 | static int __init hugepage_setup_sz(char *str) | 714 | static int __init hugepage_setup_sz(char *str) |
| 571 | { | 715 | { |
| 572 | unsigned long long size; | 716 | unsigned long long size; |
| 573 | int mmu_psize = -1; | 717 | int mmu_psize; |
| 574 | int shift; | 718 | int shift; |
| 575 | 719 | ||
| 576 | size = memparse(str, &str); | 720 | size = memparse(str, &str); |
| 577 | 721 | ||
| 578 | shift = __ffs(size); | 722 | shift = __ffs(size); |
| 579 | switch (shift) { | 723 | mmu_psize = shift_to_mmu_psize(shift); |
| 580 | #ifndef CONFIG_PPC_64K_PAGES | 724 | if (mmu_psize >= 0 && mmu_psize_defs[mmu_psize].shift) |
| 581 | case HPAGE_SHIFT_64K: | ||
| 582 | mmu_psize = MMU_PAGE_64K; | ||
| 583 | break; | ||
| 584 | #endif | ||
| 585 | case HPAGE_SHIFT_16M: | ||
| 586 | mmu_psize = MMU_PAGE_16M; | ||
| 587 | break; | ||
| 588 | } | ||
| 589 | |||
| 590 | if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift) | ||
| 591 | set_huge_psize(mmu_psize); | 725 | set_huge_psize(mmu_psize); |
| 592 | else | 726 | else |
| 593 | printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size); | 727 | printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size); |
| @@ -596,23 +730,33 @@ static int __init hugepage_setup_sz(char *str) | |||
| 596 | } | 730 | } |
| 597 | __setup("hugepagesz=", hugepage_setup_sz); | 731 | __setup("hugepagesz=", hugepage_setup_sz); |
| 598 | 732 | ||
| 599 | static void zero_ctor(struct kmem_cache *cache, void *addr) | ||
| 600 | { | ||
| 601 | memset(addr, 0, kmem_cache_size(cache)); | ||
| 602 | } | ||
| 603 | |||
| 604 | static int __init hugetlbpage_init(void) | 733 | static int __init hugetlbpage_init(void) |
| 605 | { | 734 | { |
| 735 | unsigned int psize; | ||
| 736 | |||
| 606 | if (!cpu_has_feature(CPU_FTR_16M_PAGE)) | 737 | if (!cpu_has_feature(CPU_FTR_16M_PAGE)) |
| 607 | return -ENODEV; | 738 | return -ENODEV; |
| 608 | 739 | /* Add supported huge page sizes. Need to change HUGE_MAX_HSTATE | |
| 609 | huge_pgtable_cache = kmem_cache_create("hugepte_cache", | 740 | * and adjust PTE_NONCACHE_NUM if the number of supported huge page |
| 610 | HUGEPTE_TABLE_SIZE, | 741 | * sizes changes. |
| 611 | HUGEPTE_TABLE_SIZE, | 742 | */ |
| 612 | 0, | 743 | set_huge_psize(MMU_PAGE_16M); |
| 613 | zero_ctor); | 744 | set_huge_psize(MMU_PAGE_64K); |
| 614 | if (! huge_pgtable_cache) | 745 | set_huge_psize(MMU_PAGE_16G); |
| 615 | panic("hugetlbpage_init(): could not create hugepte cache\n"); | 746 | |
| 747 | for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) { | ||
| 748 | if (mmu_huge_psizes[psize]) { | ||
| 749 | huge_pgtable_cache(psize) = kmem_cache_create( | ||
| 750 | HUGEPTE_CACHE_NAME(psize), | ||
| 751 | HUGEPTE_TABLE_SIZE(psize), | ||
| 752 | HUGEPTE_TABLE_SIZE(psize), | ||
| 753 | 0, | ||
| 754 | NULL); | ||
| 755 | if (!huge_pgtable_cache(psize)) | ||
| 756 | panic("hugetlbpage_init(): could not create %s"\ | ||
| 757 | "\n", HUGEPTE_CACHE_NAME(psize)); | ||
| 758 | } | ||
| 759 | } | ||
| 616 | 760 | ||
| 617 | return 0; | 761 | return 0; |
| 618 | } | 762 | } |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 6ef63caca682..4f7df85129d8 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
| @@ -136,9 +136,14 @@ static int __init setup_kcore(void) | |||
| 136 | module_init(setup_kcore); | 136 | module_init(setup_kcore); |
| 137 | #endif | 137 | #endif |
| 138 | 138 | ||
| 139 | static void zero_ctor(struct kmem_cache *cache, void *addr) | 139 | static void pgd_ctor(void *addr) |
| 140 | { | 140 | { |
| 141 | memset(addr, 0, kmem_cache_size(cache)); | 141 | memset(addr, 0, PGD_TABLE_SIZE); |
| 142 | } | ||
| 143 | |||
| 144 | static void pmd_ctor(void *addr) | ||
| 145 | { | ||
| 146 | memset(addr, 0, PMD_TABLE_SIZE); | ||
| 142 | } | 147 | } |
| 143 | 148 | ||
| 144 | static const unsigned int pgtable_cache_size[2] = { | 149 | static const unsigned int pgtable_cache_size[2] = { |
| @@ -153,29 +158,18 @@ static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = { | |||
| 153 | }; | 158 | }; |
| 154 | 159 | ||
| 155 | #ifdef CONFIG_HUGETLB_PAGE | 160 | #ifdef CONFIG_HUGETLB_PAGE |
| 156 | /* Hugepages need one extra cache, initialized in hugetlbpage.c. We | 161 | /* Hugepages need an extra cache per hugepagesize, initialized in |
| 157 | * can't put into the tables above, because HPAGE_SHIFT is not compile | 162 | * hugetlbpage.c. We can't put into the tables above, because HPAGE_SHIFT |
| 158 | * time constant. */ | 163 | * is not compile time constant. */ |
| 159 | struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+1]; | 164 | struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+MMU_PAGE_COUNT]; |
| 160 | #else | 165 | #else |
| 161 | struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; | 166 | struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; |
| 162 | #endif | 167 | #endif |
| 163 | 168 | ||
| 164 | void pgtable_cache_init(void) | 169 | void pgtable_cache_init(void) |
| 165 | { | 170 | { |
| 166 | int i; | 171 | pgtable_cache[0] = kmem_cache_create(pgtable_cache_name[0], PGD_TABLE_SIZE, PGD_TABLE_SIZE, SLAB_PANIC, pgd_ctor); |
| 167 | 172 | pgtable_cache[1] = kmem_cache_create(pgtable_cache_name[1], PMD_TABLE_SIZE, PMD_TABLE_SIZE, SLAB_PANIC, pmd_ctor); | |
| 168 | for (i = 0; i < ARRAY_SIZE(pgtable_cache_size); i++) { | ||
| 169 | int size = pgtable_cache_size[i]; | ||
| 170 | const char *name = pgtable_cache_name[i]; | ||
| 171 | |||
| 172 | pr_debug("Allocating page table cache %s (#%d) " | ||
| 173 | "for size: %08x...\n", name, i, size); | ||
| 174 | pgtable_cache[i] = kmem_cache_create(name, | ||
| 175 | size, size, | ||
| 176 | SLAB_PANIC, | ||
| 177 | zero_ctor); | ||
| 178 | } | ||
| 179 | } | 173 | } |
| 180 | 174 | ||
| 181 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | 175 | #ifdef CONFIG_SPARSEMEM_VMEMMAP |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 1ca2235f0965..702691cb9e82 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
| @@ -186,45 +186,6 @@ walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg, | |||
| 186 | } | 186 | } |
| 187 | EXPORT_SYMBOL_GPL(walk_memory_resource); | 187 | EXPORT_SYMBOL_GPL(walk_memory_resource); |
| 188 | 188 | ||
| 189 | void show_mem(void) | ||
| 190 | { | ||
| 191 | unsigned long total = 0, reserved = 0; | ||
| 192 | unsigned long shared = 0, cached = 0; | ||
| 193 | unsigned long highmem = 0; | ||
| 194 | struct page *page; | ||
| 195 | pg_data_t *pgdat; | ||
| 196 | unsigned long i; | ||
| 197 | |||
| 198 | printk("Mem-info:\n"); | ||
| 199 | show_free_areas(); | ||
| 200 | for_each_online_pgdat(pgdat) { | ||
| 201 | unsigned long flags; | ||
| 202 | pgdat_resize_lock(pgdat, &flags); | ||
| 203 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
| 204 | if (!pfn_valid(pgdat->node_start_pfn + i)) | ||
| 205 | continue; | ||
| 206 | page = pgdat_page_nr(pgdat, i); | ||
| 207 | total++; | ||
| 208 | if (PageHighMem(page)) | ||
| 209 | highmem++; | ||
| 210 | if (PageReserved(page)) | ||
| 211 | reserved++; | ||
| 212 | else if (PageSwapCache(page)) | ||
| 213 | cached++; | ||
| 214 | else if (page_count(page)) | ||
| 215 | shared += page_count(page) - 1; | ||
| 216 | } | ||
| 217 | pgdat_resize_unlock(pgdat, &flags); | ||
| 218 | } | ||
| 219 | printk("%ld pages of RAM\n", total); | ||
| 220 | #ifdef CONFIG_HIGHMEM | ||
| 221 | printk("%ld pages of HIGHMEM\n", highmem); | ||
| 222 | #endif | ||
| 223 | printk("%ld reserved pages\n", reserved); | ||
| 224 | printk("%ld pages shared\n", shared); | ||
| 225 | printk("%ld pages swap cached\n", cached); | ||
| 226 | } | ||
| 227 | |||
| 228 | /* | 189 | /* |
| 229 | * Initialize the bootmem system and give it all the memory we | 190 | * Initialize the bootmem system and give it all the memory we |
| 230 | * have available. If we are using highmem, we only put the | 191 | * have available. If we are using highmem, we only put the |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index cf4bffba6f7c..d9a181351332 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
| @@ -39,7 +39,6 @@ EXPORT_SYMBOL(numa_cpu_lookup_table); | |||
| 39 | EXPORT_SYMBOL(numa_cpumask_lookup_table); | 39 | EXPORT_SYMBOL(numa_cpumask_lookup_table); |
| 40 | EXPORT_SYMBOL(node_data); | 40 | EXPORT_SYMBOL(node_data); |
| 41 | 41 | ||
| 42 | static bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; | ||
| 43 | static int min_common_depth; | 42 | static int min_common_depth; |
| 44 | static int n_mem_addr_cells, n_mem_size_cells; | 43 | static int n_mem_addr_cells, n_mem_size_cells; |
| 45 | 44 | ||
| @@ -816,7 +815,7 @@ void __init do_init_bootmem(void) | |||
| 816 | dbg("node %d\n", nid); | 815 | dbg("node %d\n", nid); |
| 817 | dbg("NODE_DATA() = %p\n", NODE_DATA(nid)); | 816 | dbg("NODE_DATA() = %p\n", NODE_DATA(nid)); |
| 818 | 817 | ||
| 819 | NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; | 818 | NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; |
| 820 | NODE_DATA(nid)->node_start_pfn = start_pfn; | 819 | NODE_DATA(nid)->node_start_pfn = start_pfn; |
| 821 | NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; | 820 | NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; |
| 822 | 821 | ||
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index c7584072dfcc..2001abdb1912 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
| @@ -145,13 +145,20 @@ void pte_free(struct mm_struct *mm, pgtable_t ptepage) | |||
| 145 | void __iomem * | 145 | void __iomem * |
| 146 | ioremap(phys_addr_t addr, unsigned long size) | 146 | ioremap(phys_addr_t addr, unsigned long size) |
| 147 | { | 147 | { |
| 148 | return __ioremap(addr, size, _PAGE_NO_CACHE); | 148 | return __ioremap(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED); |
| 149 | } | 149 | } |
| 150 | EXPORT_SYMBOL(ioremap); | 150 | EXPORT_SYMBOL(ioremap); |
| 151 | 151 | ||
| 152 | void __iomem * | 152 | void __iomem * |
| 153 | ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) | 153 | ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) |
| 154 | { | 154 | { |
| 155 | /* writeable implies dirty for kernel addresses */ | ||
| 156 | if (flags & _PAGE_RW) | ||
| 157 | flags |= _PAGE_DIRTY | _PAGE_HWWRITE; | ||
| 158 | |||
| 159 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ | ||
| 160 | flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC); | ||
| 161 | |||
| 155 | return __ioremap(addr, size, flags); | 162 | return __ioremap(addr, size, flags); |
| 156 | } | 163 | } |
| 157 | EXPORT_SYMBOL(ioremap_flags); | 164 | EXPORT_SYMBOL(ioremap_flags); |
| @@ -163,6 +170,14 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) | |||
| 163 | phys_addr_t p; | 170 | phys_addr_t p; |
| 164 | int err; | 171 | int err; |
| 165 | 172 | ||
| 173 | /* Make sure we have the base flags */ | ||
| 174 | if ((flags & _PAGE_PRESENT) == 0) | ||
| 175 | flags |= _PAGE_KERNEL; | ||
| 176 | |||
| 177 | /* Non-cacheable page cannot be coherent */ | ||
| 178 | if (flags & _PAGE_NO_CACHE) | ||
| 179 | flags &= ~_PAGE_COHERENT; | ||
| 180 | |||
| 166 | /* | 181 | /* |
| 167 | * Choose an address to map it to. | 182 | * Choose an address to map it to. |
| 168 | * Once the vmalloc system is running, we use it. | 183 | * Once the vmalloc system is running, we use it. |
| @@ -219,11 +234,6 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) | |||
| 219 | v = (ioremap_bot -= size); | 234 | v = (ioremap_bot -= size); |
| 220 | } | 235 | } |
| 221 | 236 | ||
| 222 | if ((flags & _PAGE_PRESENT) == 0) | ||
| 223 | flags |= _PAGE_KERNEL; | ||
| 224 | if (flags & _PAGE_NO_CACHE) | ||
| 225 | flags |= _PAGE_GUARDED; | ||
| 226 | |||
| 227 | /* | 237 | /* |
| 228 | * Should check if it is a candidate for a BAT mapping | 238 | * Should check if it is a candidate for a BAT mapping |
| 229 | */ | 239 | */ |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 3ef0ad2f9ca0..365e61ae5dbc 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
| @@ -107,9 +107,18 @@ void __iomem * __ioremap_at(phys_addr_t pa, void *ea, unsigned long size, | |||
| 107 | { | 107 | { |
| 108 | unsigned long i; | 108 | unsigned long i; |
| 109 | 109 | ||
| 110 | /* Make sure we have the base flags */ | ||
| 110 | if ((flags & _PAGE_PRESENT) == 0) | 111 | if ((flags & _PAGE_PRESENT) == 0) |
| 111 | flags |= pgprot_val(PAGE_KERNEL); | 112 | flags |= pgprot_val(PAGE_KERNEL); |
| 112 | 113 | ||
| 114 | /* Non-cacheable page cannot be coherent */ | ||
| 115 | if (flags & _PAGE_NO_CACHE) | ||
| 116 | flags &= ~_PAGE_COHERENT; | ||
| 117 | |||
| 118 | /* We don't support the 4K PFN hack with ioremap */ | ||
| 119 | if (flags & _PAGE_4K_PFN) | ||
| 120 | return NULL; | ||
| 121 | |||
| 113 | WARN_ON(pa & ~PAGE_MASK); | 122 | WARN_ON(pa & ~PAGE_MASK); |
| 114 | WARN_ON(((unsigned long)ea) & ~PAGE_MASK); | 123 | WARN_ON(((unsigned long)ea) & ~PAGE_MASK); |
| 115 | WARN_ON(size & ~PAGE_MASK); | 124 | WARN_ON(size & ~PAGE_MASK); |
| @@ -190,6 +199,13 @@ void __iomem * ioremap(phys_addr_t addr, unsigned long size) | |||
| 190 | void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size, | 199 | void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size, |
| 191 | unsigned long flags) | 200 | unsigned long flags) |
| 192 | { | 201 | { |
| 202 | /* writeable implies dirty for kernel addresses */ | ||
| 203 | if (flags & _PAGE_RW) | ||
| 204 | flags |= _PAGE_DIRTY; | ||
| 205 | |||
| 206 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ | ||
| 207 | flags &= ~(_PAGE_USER | _PAGE_EXEC); | ||
| 208 | |||
| 193 | if (ppc_md.ioremap) | 209 | if (ppc_md.ioremap) |
| 194 | return ppc_md.ioremap(addr, size, flags); | 210 | return ppc_md.ioremap(addr, size, flags); |
| 195 | return __ioremap(addr, size, flags); | 211 | return __ioremap(addr, size, flags); |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index a01b5c608ff9..409fcc7b63ce 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
| @@ -147,7 +147,7 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr, | |||
| 147 | */ | 147 | */ |
| 148 | if (huge) { | 148 | if (huge) { |
| 149 | #ifdef CONFIG_HUGETLB_PAGE | 149 | #ifdef CONFIG_HUGETLB_PAGE |
| 150 | psize = mmu_huge_psize; | 150 | psize = get_slice_psize(mm, addr);; |
| 151 | #else | 151 | #else |
| 152 | BUG(); | 152 | BUG(); |
| 153 | psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */ | 153 | psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */ |
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index d664b1bce381..696a5ee4962d 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | config PPC_MPC52xx | 1 | config PPC_MPC52xx |
| 2 | bool "52xx-based boards" | 2 | bool "52xx-based boards" |
| 3 | depends on PPC_MULTIPLATFORM && PPC32 | 3 | depends on PPC_MULTIPLATFORM && PPC32 |
| 4 | select FSL_SOC | ||
| 5 | select PPC_CLOCK | 4 | select PPC_CLOCK |
| 6 | select PPC_PCI_CHOICE | 5 | select PPC_PCI_CHOICE |
| 7 | 6 | ||
| @@ -48,6 +47,7 @@ config PPC_MPC5200_BUGFIX | |||
| 48 | config PPC_MPC5200_GPIO | 47 | config PPC_MPC5200_GPIO |
| 49 | bool "MPC5200 GPIO support" | 48 | bool "MPC5200 GPIO support" |
| 50 | depends on PPC_MPC52xx | 49 | depends on PPC_MPC52xx |
| 51 | select HAVE_GPIO_LIB | 50 | select ARCH_REQUIRE_GPIOLIB |
| 51 | select GENERIC_GPIO | ||
| 52 | help | 52 | help |
| 53 | Enable gpiolib support for mpc5200 based boards | 53 | Enable gpiolib support for mpc5200 based boards |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index 0e04f8fb152a..3e7e0f1568ef 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
| @@ -281,7 +281,7 @@ static int __init scc_pciex_iowa_init(struct iowa_bus *bus, void *data) | |||
| 281 | 281 | ||
| 282 | dummy_page_da = dma_map_single(bus->phb->parent, dummy_page_va, | 282 | dummy_page_da = dma_map_single(bus->phb->parent, dummy_page_va, |
| 283 | PAGE_SIZE, DMA_FROM_DEVICE); | 283 | PAGE_SIZE, DMA_FROM_DEVICE); |
| 284 | if (dma_mapping_error(dummy_page_da)) { | 284 | if (dma_mapping_error(bus->phb->parent, dummy_page_da)) { |
| 285 | pr_err("PCIEX:Map dummy page failed.\n"); | 285 | pr_err("PCIEX:Map dummy page failed.\n"); |
| 286 | kfree(dummy_page_va); | 286 | kfree(dummy_page_va); |
| 287 | return -1; | 287 | return -1; |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 208005ca262c..e06420af5fe9 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
| @@ -172,7 +172,7 @@ static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte, | |||
| 172 | } | 172 | } |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | static void tce_build_cell(struct iommu_table *tbl, long index, long npages, | 175 | static int tce_build_cell(struct iommu_table *tbl, long index, long npages, |
| 176 | unsigned long uaddr, enum dma_data_direction direction, | 176 | unsigned long uaddr, enum dma_data_direction direction, |
| 177 | struct dma_attrs *attrs) | 177 | struct dma_attrs *attrs) |
| 178 | { | 178 | { |
| @@ -213,6 +213,7 @@ static void tce_build_cell(struct iommu_table *tbl, long index, long npages, | |||
| 213 | 213 | ||
| 214 | pr_debug("tce_build_cell(index=%lx,n=%lx,dir=%d,base_pte=%lx)\n", | 214 | pr_debug("tce_build_cell(index=%lx,n=%lx,dir=%d,base_pte=%lx)\n", |
| 215 | index, npages, direction, base_pte); | 215 | index, npages, direction, base_pte); |
| 216 | return 0; | ||
| 216 | } | 217 | } |
| 217 | 218 | ||
| 218 | static void tce_free_cell(struct iommu_table *tbl, long index, long npages) | 219 | static void tce_free_cell(struct iommu_table *tbl, long index, long npages) |
| @@ -1150,12 +1151,23 @@ static int iommu_fixed_disabled; | |||
| 1150 | 1151 | ||
| 1151 | static int __init setup_iommu_fixed(char *str) | 1152 | static int __init setup_iommu_fixed(char *str) |
| 1152 | { | 1153 | { |
| 1154 | struct device_node *pciep; | ||
| 1155 | |||
| 1153 | if (strcmp(str, "off") == 0) | 1156 | if (strcmp(str, "off") == 0) |
| 1154 | iommu_fixed_disabled = 1; | 1157 | iommu_fixed_disabled = 1; |
| 1155 | 1158 | ||
| 1156 | else if (strcmp(str, "weak") == 0) | 1159 | /* If we can find a pcie-endpoint in the device tree assume that |
| 1160 | * we're on a triblade or a CAB so by default the fixed mapping | ||
| 1161 | * should be set to be weakly ordered; but only if the boot | ||
| 1162 | * option WASN'T set for strong ordering | ||
| 1163 | */ | ||
| 1164 | pciep = of_find_node_by_type(NULL, "pcie-endpoint"); | ||
| 1165 | |||
| 1166 | if (strcmp(str, "weak") == 0 || (pciep && strcmp(str, "strong") != 0)) | ||
| 1157 | iommu_fixed_is_weak = 1; | 1167 | iommu_fixed_is_weak = 1; |
| 1158 | 1168 | ||
| 1169 | of_node_put(pciep); | ||
| 1170 | |||
| 1159 | return 1; | 1171 | return 1; |
| 1160 | } | 1172 | } |
| 1161 | __setup("iommu_fixed=", setup_iommu_fixed); | 1173 | __setup("iommu_fixed=", setup_iommu_fixed); |
diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c index 418b605ac35a..5122ec145271 100644 --- a/arch/powerpc/platforms/cell/spider-pci.c +++ b/arch/powerpc/platforms/cell/spider-pci.c | |||
| @@ -111,7 +111,7 @@ static int __init spiderpci_pci_setup_chip(struct pci_controller *phb, | |||
| 111 | 111 | ||
| 112 | dummy_page_da = dma_map_single(phb->parent, dummy_page_va, | 112 | dummy_page_da = dma_map_single(phb->parent, dummy_page_va, |
| 113 | PAGE_SIZE, DMA_FROM_DEVICE); | 113 | PAGE_SIZE, DMA_FROM_DEVICE); |
| 114 | if (dma_mapping_error(dummy_page_da)) { | 114 | if (dma_mapping_error(phb->parent, dummy_page_da)) { |
| 115 | pr_err("SPIDER-IOWA:Map dummy page filed.\n"); | 115 | pr_err("SPIDER-IOWA:Map dummy page filed.\n"); |
| 116 | kfree(dummy_page_va); | 116 | kfree(dummy_page_va); |
| 117 | return -1; | 117 | return -1; |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 99c73066b82f..010a51f59796 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
| @@ -288,9 +288,32 @@ spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 288 | return VM_FAULT_NOPAGE; | 288 | return VM_FAULT_NOPAGE; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | static int spufs_mem_mmap_access(struct vm_area_struct *vma, | ||
| 292 | unsigned long address, | ||
| 293 | void *buf, int len, int write) | ||
| 294 | { | ||
| 295 | struct spu_context *ctx = vma->vm_file->private_data; | ||
| 296 | unsigned long offset = address - vma->vm_start; | ||
| 297 | char *local_store; | ||
| 298 | |||
| 299 | if (write && !(vma->vm_flags & VM_WRITE)) | ||
| 300 | return -EACCES; | ||
| 301 | if (spu_acquire(ctx)) | ||
| 302 | return -EINTR; | ||
| 303 | if ((offset + len) > vma->vm_end) | ||
| 304 | len = vma->vm_end - offset; | ||
| 305 | local_store = ctx->ops->get_ls(ctx); | ||
| 306 | if (write) | ||
| 307 | memcpy_toio(local_store + offset, buf, len); | ||
| 308 | else | ||
| 309 | memcpy_fromio(buf, local_store + offset, len); | ||
| 310 | spu_release(ctx); | ||
| 311 | return len; | ||
| 312 | } | ||
| 291 | 313 | ||
| 292 | static struct vm_operations_struct spufs_mem_mmap_vmops = { | 314 | static struct vm_operations_struct spufs_mem_mmap_vmops = { |
| 293 | .fault = spufs_mem_mmap_fault, | 315 | .fault = spufs_mem_mmap_fault, |
| 316 | .access = spufs_mem_mmap_access, | ||
| 294 | }; | 317 | }; |
| 295 | 318 | ||
| 296 | static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) | 319 | static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 7123472801d9..690ca7b0dcf6 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
| @@ -78,7 +78,7 @@ spufs_destroy_inode(struct inode *inode) | |||
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | static void | 80 | static void |
| 81 | spufs_init_once(struct kmem_cache *cachep, void *p) | 81 | spufs_init_once(void *p) |
| 82 | { | 82 | { |
| 83 | struct spufs_inode_info *ei = p; | 83 | struct spufs_inode_info *ei = p; |
| 84 | 84 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 34654743363d..2deeeba7eccf 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
| @@ -312,11 +312,28 @@ static struct spu *aff_ref_location(struct spu_context *ctx, int mem_aff, | |||
| 312 | */ | 312 | */ |
| 313 | node = cpu_to_node(raw_smp_processor_id()); | 313 | node = cpu_to_node(raw_smp_processor_id()); |
| 314 | for (n = 0; n < MAX_NUMNODES; n++, node++) { | 314 | for (n = 0; n < MAX_NUMNODES; n++, node++) { |
| 315 | int available_spus; | ||
| 316 | |||
| 315 | node = (node < MAX_NUMNODES) ? node : 0; | 317 | node = (node < MAX_NUMNODES) ? node : 0; |
| 316 | if (!node_allowed(ctx, node)) | 318 | if (!node_allowed(ctx, node)) |
| 317 | continue; | 319 | continue; |
| 320 | |||
| 321 | available_spus = 0; | ||
| 318 | mutex_lock(&cbe_spu_info[node].list_mutex); | 322 | mutex_lock(&cbe_spu_info[node].list_mutex); |
| 319 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { | 323 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { |
| 324 | if (spu->ctx && spu->ctx->gang | ||
| 325 | && spu->ctx->aff_offset == 0) | ||
| 326 | available_spus -= | ||
| 327 | (spu->ctx->gang->contexts - 1); | ||
| 328 | else | ||
| 329 | available_spus++; | ||
| 330 | } | ||
| 331 | if (available_spus < ctx->gang->contexts) { | ||
| 332 | mutex_unlock(&cbe_spu_info[node].list_mutex); | ||
| 333 | continue; | ||
| 334 | } | ||
| 335 | |||
| 336 | list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) { | ||
| 320 | if ((!mem_aff || spu->has_mem_affinity) && | 337 | if ((!mem_aff || spu->has_mem_affinity) && |
| 321 | sched_spu(spu)) { | 338 | sched_spu(spu)) { |
| 322 | mutex_unlock(&cbe_spu_info[node].list_mutex); | 339 | mutex_unlock(&cbe_spu_info[node].list_mutex); |
| @@ -389,6 +406,9 @@ static int has_affinity(struct spu_context *ctx) | |||
| 389 | if (list_empty(&ctx->aff_list)) | 406 | if (list_empty(&ctx->aff_list)) |
| 390 | return 0; | 407 | return 0; |
| 391 | 408 | ||
| 409 | if (atomic_read(&ctx->gang->aff_sched_count) == 0) | ||
| 410 | ctx->gang->aff_ref_spu = NULL; | ||
| 411 | |||
| 392 | if (!gang->aff_ref_spu) { | 412 | if (!gang->aff_ref_spu) { |
| 393 | if (!(gang->aff_flags & AFF_MERGED)) | 413 | if (!(gang->aff_flags & AFF_MERGED)) |
| 394 | aff_merge_remaining_ctxs(gang); | 414 | aff_merge_remaining_ctxs(gang); |
| @@ -416,14 +436,8 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx) | |||
| 416 | if (spu->ctx->flags & SPU_CREATE_NOSCHED) | 436 | if (spu->ctx->flags & SPU_CREATE_NOSCHED) |
| 417 | atomic_dec(&cbe_spu_info[spu->node].reserved_spus); | 437 | atomic_dec(&cbe_spu_info[spu->node].reserved_spus); |
| 418 | 438 | ||
| 419 | if (ctx->gang){ | 439 | if (ctx->gang) |
| 420 | mutex_lock(&ctx->gang->aff_mutex); | 440 | atomic_dec_if_positive(&ctx->gang->aff_sched_count); |
| 421 | if (has_affinity(ctx)) { | ||
| 422 | if (atomic_dec_and_test(&ctx->gang->aff_sched_count)) | ||
| 423 | ctx->gang->aff_ref_spu = NULL; | ||
| 424 | } | ||
| 425 | mutex_unlock(&ctx->gang->aff_mutex); | ||
| 426 | } | ||
| 427 | 441 | ||
| 428 | spu_switch_notify(spu, NULL); | 442 | spu_switch_notify(spu, NULL); |
| 429 | spu_unmap_mappings(ctx); | 443 | spu_unmap_mappings(ctx); |
| @@ -562,10 +576,7 @@ static struct spu *spu_get_idle(struct spu_context *ctx) | |||
| 562 | goto found; | 576 | goto found; |
| 563 | mutex_unlock(&cbe_spu_info[node].list_mutex); | 577 | mutex_unlock(&cbe_spu_info[node].list_mutex); |
| 564 | 578 | ||
| 565 | mutex_lock(&ctx->gang->aff_mutex); | 579 | atomic_dec(&ctx->gang->aff_sched_count); |
| 566 | if (atomic_dec_and_test(&ctx->gang->aff_sched_count)) | ||
| 567 | ctx->gang->aff_ref_spu = NULL; | ||
| 568 | mutex_unlock(&ctx->gang->aff_mutex); | ||
| 569 | goto not_found; | 580 | goto not_found; |
| 570 | } | 581 | } |
| 571 | mutex_unlock(&ctx->gang->aff_mutex); | 582 | mutex_unlock(&ctx->gang->aff_mutex); |
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c index 8c0e95766a62..92d20e993ede 100644 --- a/arch/powerpc/platforms/cell/spufs/sputrace.c +++ b/arch/powerpc/platforms/cell/spufs/sputrace.c | |||
| @@ -196,8 +196,7 @@ static int __init sputrace_init(void) | |||
| 196 | struct proc_dir_entry *entry; | 196 | struct proc_dir_entry *entry; |
| 197 | int i, error = -ENOMEM; | 197 | int i, error = -ENOMEM; |
| 198 | 198 | ||
| 199 | sputrace_log = kcalloc(sizeof(struct sputrace), | 199 | sputrace_log = kcalloc(bufsize, sizeof(struct sputrace), GFP_KERNEL); |
| 200 | bufsize, GFP_KERNEL); | ||
| 201 | if (!sputrace_log) | 200 | if (!sputrace_log) |
| 202 | goto out; | 201 | goto out; |
| 203 | 202 | ||
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index bc818e4e2033..bb464d1211b2 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include <asm/iseries/hv_call_event.h> | 41 | #include <asm/iseries/hv_call_event.h> |
| 42 | #include <asm/iseries/iommu.h> | 42 | #include <asm/iseries/iommu.h> |
| 43 | 43 | ||
| 44 | static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | 44 | static int tce_build_iSeries(struct iommu_table *tbl, long index, long npages, |
| 45 | unsigned long uaddr, enum dma_data_direction direction, | 45 | unsigned long uaddr, enum dma_data_direction direction, |
| 46 | struct dma_attrs *attrs) | 46 | struct dma_attrs *attrs) |
| 47 | { | 47 | { |
| @@ -71,6 +71,7 @@ static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | |||
| 71 | index++; | 71 | index++; |
| 72 | uaddr += TCE_PAGE_SIZE; | 72 | uaddr += TCE_PAGE_SIZE; |
| 73 | } | 73 | } |
| 74 | return 0; | ||
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | 77 | static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index 1dc7295746da..731d7b157749 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
| @@ -871,7 +871,7 @@ static int proc_mf_dump_cmdline(char *page, char **start, off_t off, | |||
| 871 | count = 256 - off; | 871 | count = 256 - off; |
| 872 | 872 | ||
| 873 | dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); | 873 | dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); |
| 874 | if (dma_mapping_error(dma_addr)) | 874 | if (dma_mapping_error(NULL, dma_addr)) |
| 875 | return -ENOMEM; | 875 | return -ENOMEM; |
| 876 | memset(page, 0, off + count); | 876 | memset(page, 0, off + count); |
| 877 | memset(&vsp_cmd, 0, sizeof(vsp_cmd)); | 877 | memset(&vsp_cmd, 0, sizeof(vsp_cmd)); |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index b72120751bbe..70b688c1aefb 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
| @@ -561,7 +561,7 @@ static void yield_shared_processor(void) | |||
| 561 | static void iseries_shared_idle(void) | 561 | static void iseries_shared_idle(void) |
| 562 | { | 562 | { |
| 563 | while (1) { | 563 | while (1) { |
| 564 | tick_nohz_stop_sched_tick(); | 564 | tick_nohz_stop_sched_tick(1); |
| 565 | while (!need_resched() && !hvlpevent_is_pending()) { | 565 | while (!need_resched() && !hvlpevent_is_pending()) { |
| 566 | local_irq_disable(); | 566 | local_irq_disable(); |
| 567 | ppc64_runlatch_off(); | 567 | ppc64_runlatch_off(); |
| @@ -591,7 +591,7 @@ static void iseries_dedicated_idle(void) | |||
| 591 | set_thread_flag(TIF_POLLING_NRFLAG); | 591 | set_thread_flag(TIF_POLLING_NRFLAG); |
| 592 | 592 | ||
| 593 | while (1) { | 593 | while (1) { |
| 594 | tick_nohz_stop_sched_tick(); | 594 | tick_nohz_stop_sched_tick(1); |
| 595 | if (!need_resched()) { | 595 | if (!need_resched()) { |
| 596 | while (!need_resched()) { | 596 | while (!need_resched()) { |
| 597 | ppc64_runlatch_off(); | 597 | ppc64_runlatch_off(); |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 70541b7a5013..a0ff03a3d8da 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
| @@ -83,7 +83,7 @@ static u32 *iob_l2_base; | |||
| 83 | static struct iommu_table iommu_table_iobmap; | 83 | static struct iommu_table iommu_table_iobmap; |
| 84 | static int iommu_table_iobmap_inited; | 84 | static int iommu_table_iobmap_inited; |
| 85 | 85 | ||
| 86 | static void iobmap_build(struct iommu_table *tbl, long index, | 86 | static int iobmap_build(struct iommu_table *tbl, long index, |
| 87 | long npages, unsigned long uaddr, | 87 | long npages, unsigned long uaddr, |
| 88 | enum dma_data_direction direction, | 88 | enum dma_data_direction direction, |
| 89 | struct dma_attrs *attrs) | 89 | struct dma_attrs *attrs) |
| @@ -108,6 +108,7 @@ static void iobmap_build(struct iommu_table *tbl, long index, | |||
| 108 | uaddr += IOBMAP_PAGE_SIZE; | 108 | uaddr += IOBMAP_PAGE_SIZE; |
| 109 | bus_addr += IOBMAP_PAGE_SIZE; | 109 | bus_addr += IOBMAP_PAGE_SIZE; |
| 110 | } | 110 | } |
| 111 | return 0; | ||
| 111 | } | 112 | } |
| 112 | 113 | ||
| 113 | 114 | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 00bd0166d07f..31635446901a 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
| @@ -97,8 +97,6 @@ extern struct machdep_calls pmac_md; | |||
| 97 | int sccdbg; | 97 | int sccdbg; |
| 98 | #endif | 98 | #endif |
| 99 | 99 | ||
| 100 | extern void zs_kgdb_hook(int tty_num); | ||
| 101 | |||
| 102 | sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN; | 100 | sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN; |
| 103 | EXPORT_SYMBOL(sys_ctrler); | 101 | EXPORT_SYMBOL(sys_ctrler); |
| 104 | 102 | ||
| @@ -329,10 +327,6 @@ static void __init pmac_setup_arch(void) | |||
| 329 | l2cr_init(); | 327 | l2cr_init(); |
| 330 | #endif /* CONFIG_PPC32 */ | 328 | #endif /* CONFIG_PPC32 */ |
| 331 | 329 | ||
| 332 | #ifdef CONFIG_KGDB | ||
| 333 | zs_kgdb_hook(0); | ||
| 334 | #endif | ||
| 335 | |||
| 336 | find_via_cuda(); | 330 | find_via_cuda(); |
| 337 | find_via_pmu(); | 331 | find_via_pmu(); |
| 338 | smu_init(); | 332 | smu_init(); |
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 757c0296e0b8..97619fd51e39 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
| @@ -40,3 +40,26 @@ config PPC_PSERIES_DEBUG | |||
| 40 | depends on PPC_PSERIES && PPC_EARLY_DEBUG | 40 | depends on PPC_PSERIES && PPC_EARLY_DEBUG |
| 41 | bool "Enable extra debug logging in platforms/pseries" | 41 | bool "Enable extra debug logging in platforms/pseries" |
| 42 | default y | 42 | default y |
| 43 | |||
| 44 | config PPC_SMLPAR | ||
| 45 | bool "Support for shared-memory logical partitions" | ||
| 46 | depends on PPC_PSERIES | ||
| 47 | select LPARCFG | ||
| 48 | default n | ||
| 49 | help | ||
| 50 | Select this option to enable shared memory partition support. | ||
| 51 | With this option a system running in an LPAR can be given more | ||
| 52 | memory than physically available and will allow firmware to | ||
| 53 | balance memory across many LPARs. | ||
| 54 | |||
| 55 | config CMM | ||
| 56 | tristate "Collaborative memory management" | ||
| 57 | depends on PPC_SMLPAR | ||
| 58 | default y | ||
| 59 | help | ||
| 60 | Select this option, if you want to enable the kernel interface | ||
| 61 | to reduce the memory size of the system. This is accomplished | ||
| 62 | by allocating pages of memory and put them "on hold". This only | ||
| 63 | makes sense for a system running in an LPAR where the unused pages | ||
| 64 | will be reused for other LPARs. The interface allows firmware to | ||
| 65 | balance memory across many LPARs. | ||
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 554c6e42ef2a..dfe574af2dc0 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
| @@ -24,3 +24,4 @@ obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o | |||
| 24 | obj-$(CONFIG_HVCS) += hvcserver.o | 24 | obj-$(CONFIG_HVCS) += hvcserver.o |
| 25 | obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o | 25 | obj-$(CONFIG_HCALL_STATS) += hvCall_inst.o |
| 26 | obj-$(CONFIG_PHYP_DUMP) += phyp_dump.o | 26 | obj-$(CONFIG_PHYP_DUMP) += phyp_dump.o |
| 27 | obj-$(CONFIG_CMM) += cmm.o | ||
diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c new file mode 100644 index 000000000000..c6b3be03168b --- /dev/null +++ b/arch/powerpc/platforms/pseries/cmm.c | |||
| @@ -0,0 +1,468 @@ | |||
| 1 | /* | ||
| 2 | * Collaborative memory management interface. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008 IBM Corporation | ||
| 5 | * Author(s): Brian King (brking@linux.vnet.ibm.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 | * 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 the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | * | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include <linux/ctype.h> | ||
| 24 | #include <linux/delay.h> | ||
| 25 | #include <linux/errno.h> | ||
| 26 | #include <linux/fs.h> | ||
| 27 | #include <linux/init.h> | ||
| 28 | #include <linux/kthread.h> | ||
| 29 | #include <linux/module.h> | ||
| 30 | #include <linux/oom.h> | ||
| 31 | #include <linux/sched.h> | ||
| 32 | #include <linux/stringify.h> | ||
| 33 | #include <linux/swap.h> | ||
| 34 | #include <linux/sysdev.h> | ||
| 35 | #include <asm/firmware.h> | ||
| 36 | #include <asm/hvcall.h> | ||
| 37 | #include <asm/mmu.h> | ||
| 38 | #include <asm/pgalloc.h> | ||
| 39 | #include <asm/uaccess.h> | ||
| 40 | |||
| 41 | #include "plpar_wrappers.h" | ||
| 42 | |||
| 43 | #define CMM_DRIVER_VERSION "1.0.0" | ||
| 44 | #define CMM_DEFAULT_DELAY 1 | ||
| 45 | #define CMM_DEBUG 0 | ||
| 46 | #define CMM_DISABLE 0 | ||
| 47 | #define CMM_OOM_KB 1024 | ||
| 48 | #define CMM_MIN_MEM_MB 256 | ||
| 49 | #define KB2PAGES(_p) ((_p)>>(PAGE_SHIFT-10)) | ||
| 50 | #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10)) | ||
| 51 | |||
| 52 | static unsigned int delay = CMM_DEFAULT_DELAY; | ||
| 53 | static unsigned int oom_kb = CMM_OOM_KB; | ||
| 54 | static unsigned int cmm_debug = CMM_DEBUG; | ||
| 55 | static unsigned int cmm_disabled = CMM_DISABLE; | ||
| 56 | static unsigned long min_mem_mb = CMM_MIN_MEM_MB; | ||
| 57 | static struct sys_device cmm_sysdev; | ||
| 58 | |||
| 59 | MODULE_AUTHOR("Brian King <brking@linux.vnet.ibm.com>"); | ||
| 60 | MODULE_DESCRIPTION("IBM System p Collaborative Memory Manager"); | ||
| 61 | MODULE_LICENSE("GPL"); | ||
| 62 | MODULE_VERSION(CMM_DRIVER_VERSION); | ||
| 63 | |||
| 64 | module_param_named(delay, delay, uint, S_IRUGO | S_IWUSR); | ||
| 65 | MODULE_PARM_DESC(delay, "Delay (in seconds) between polls to query hypervisor paging requests. " | ||
| 66 | "[Default=" __stringify(CMM_DEFAULT_DELAY) "]"); | ||
| 67 | module_param_named(oom_kb, oom_kb, uint, S_IRUGO | S_IWUSR); | ||
| 68 | MODULE_PARM_DESC(oom_kb, "Amount of memory in kb to free on OOM. " | ||
| 69 | "[Default=" __stringify(CMM_OOM_KB) "]"); | ||
| 70 | module_param_named(min_mem_mb, min_mem_mb, ulong, S_IRUGO | S_IWUSR); | ||
| 71 | MODULE_PARM_DESC(min_mem_mb, "Minimum amount of memory (in MB) to not balloon. " | ||
| 72 | "[Default=" __stringify(CMM_MIN_MEM_MB) "]"); | ||
| 73 | module_param_named(debug, cmm_debug, uint, S_IRUGO | S_IWUSR); | ||
| 74 | MODULE_PARM_DESC(debug, "Enable module debugging logging. Set to 1 to enable. " | ||
| 75 | "[Default=" __stringify(CMM_DEBUG) "]"); | ||
| 76 | |||
| 77 | #define CMM_NR_PAGES ((PAGE_SIZE - sizeof(void *) - sizeof(unsigned long)) / sizeof(unsigned long)) | ||
| 78 | |||
| 79 | #define cmm_dbg(...) if (cmm_debug) { printk(KERN_INFO "cmm: "__VA_ARGS__); } | ||
| 80 | |||
| 81 | struct cmm_page_array { | ||
| 82 | struct cmm_page_array *next; | ||
| 83 | unsigned long index; | ||
| 84 | unsigned long page[CMM_NR_PAGES]; | ||
| 85 | }; | ||
| 86 | |||
| 87 | static unsigned long loaned_pages; | ||
| 88 | static unsigned long loaned_pages_target; | ||
| 89 | static unsigned long oom_freed_pages; | ||
| 90 | |||
| 91 | static struct cmm_page_array *cmm_page_list; | ||
| 92 | static DEFINE_SPINLOCK(cmm_lock); | ||
| 93 | |||
| 94 | static struct task_struct *cmm_thread_ptr; | ||
| 95 | |||
| 96 | /** | ||
| 97 | * cmm_alloc_pages - Allocate pages and mark them as loaned | ||
| 98 | * @nr: number of pages to allocate | ||
| 99 | * | ||
| 100 | * Return value: | ||
| 101 | * number of pages requested to be allocated which were not | ||
| 102 | **/ | ||
| 103 | static long cmm_alloc_pages(long nr) | ||
| 104 | { | ||
| 105 | struct cmm_page_array *pa, *npa; | ||
| 106 | unsigned long addr; | ||
| 107 | long rc; | ||
| 108 | |||
| 109 | cmm_dbg("Begin request for %ld pages\n", nr); | ||
| 110 | |||
| 111 | while (nr) { | ||
| 112 | addr = __get_free_page(GFP_NOIO | __GFP_NOWARN | | ||
| 113 | __GFP_NORETRY | __GFP_NOMEMALLOC); | ||
| 114 | if (!addr) | ||
| 115 | break; | ||
| 116 | spin_lock(&cmm_lock); | ||
| 117 | pa = cmm_page_list; | ||
| 118 | if (!pa || pa->index >= CMM_NR_PAGES) { | ||
| 119 | /* Need a new page for the page list. */ | ||
| 120 | spin_unlock(&cmm_lock); | ||
| 121 | npa = (struct cmm_page_array *)__get_free_page(GFP_NOIO | __GFP_NOWARN | | ||
| 122 | __GFP_NORETRY | __GFP_NOMEMALLOC); | ||
| 123 | if (!npa) { | ||
| 124 | pr_info("%s: Can not allocate new page list\n", __FUNCTION__); | ||
| 125 | free_page(addr); | ||
| 126 | break; | ||
| 127 | } | ||
| 128 | spin_lock(&cmm_lock); | ||
| 129 | pa = cmm_page_list; | ||
| 130 | |||
| 131 | if (!pa || pa->index >= CMM_NR_PAGES) { | ||
| 132 | npa->next = pa; | ||
| 133 | npa->index = 0; | ||
| 134 | pa = npa; | ||
| 135 | cmm_page_list = pa; | ||
| 136 | } else | ||
| 137 | free_page((unsigned long) npa); | ||
| 138 | } | ||
| 139 | |||
| 140 | if ((rc = plpar_page_set_loaned(__pa(addr)))) { | ||
| 141 | pr_err("%s: Can not set page to loaned. rc=%ld\n", __FUNCTION__, rc); | ||
| 142 | spin_unlock(&cmm_lock); | ||
| 143 | free_page(addr); | ||
| 144 | break; | ||
| 145 | } | ||
| 146 | |||
| 147 | pa->page[pa->index++] = addr; | ||
| 148 | loaned_pages++; | ||
| 149 | totalram_pages--; | ||
| 150 | spin_unlock(&cmm_lock); | ||
| 151 | nr--; | ||
| 152 | } | ||
| 153 | |||
| 154 | cmm_dbg("End request with %ld pages unfulfilled\n", nr); | ||
| 155 | return nr; | ||
| 156 | } | ||
| 157 | |||
| 158 | /** | ||
| 159 | * cmm_free_pages - Free pages and mark them as active | ||
| 160 | * @nr: number of pages to free | ||
| 161 | * | ||
| 162 | * Return value: | ||
| 163 | * number of pages requested to be freed which were not | ||
| 164 | **/ | ||
| 165 | static long cmm_free_pages(long nr) | ||
| 166 | { | ||
| 167 | struct cmm_page_array *pa; | ||
| 168 | unsigned long addr; | ||
| 169 | |||
| 170 | cmm_dbg("Begin free of %ld pages.\n", nr); | ||
| 171 | spin_lock(&cmm_lock); | ||
| 172 | pa = cmm_page_list; | ||
| 173 | while (nr) { | ||
| 174 | if (!pa || pa->index <= 0) | ||
| 175 | break; | ||
| 176 | addr = pa->page[--pa->index]; | ||
| 177 | |||
| 178 | if (pa->index == 0) { | ||
| 179 | pa = pa->next; | ||
| 180 | free_page((unsigned long) cmm_page_list); | ||
| 181 | cmm_page_list = pa; | ||
| 182 | } | ||
| 183 | |||
| 184 | plpar_page_set_active(__pa(addr)); | ||
| 185 | free_page(addr); | ||
| 186 | loaned_pages--; | ||
| 187 | nr--; | ||
| 188 | totalram_pages++; | ||
| 189 | } | ||
| 190 | spin_unlock(&cmm_lock); | ||
| 191 | cmm_dbg("End request with %ld pages unfulfilled\n", nr); | ||
| 192 | return nr; | ||
| 193 | } | ||
| 194 | |||
| 195 | /** | ||
| 196 | * cmm_oom_notify - OOM notifier | ||
| 197 | * @self: notifier block struct | ||
| 198 | * @dummy: not used | ||
| 199 | * @parm: returned - number of pages freed | ||
| 200 | * | ||
| 201 | * Return value: | ||
| 202 | * NOTIFY_OK | ||
| 203 | **/ | ||
| 204 | static int cmm_oom_notify(struct notifier_block *self, | ||
| 205 | unsigned long dummy, void *parm) | ||
| 206 | { | ||
| 207 | unsigned long *freed = parm; | ||
| 208 | long nr = KB2PAGES(oom_kb); | ||
| 209 | |||
| 210 | cmm_dbg("OOM processing started\n"); | ||
| 211 | nr = cmm_free_pages(nr); | ||
| 212 | loaned_pages_target = loaned_pages; | ||
| 213 | *freed += KB2PAGES(oom_kb) - nr; | ||
| 214 | oom_freed_pages += KB2PAGES(oom_kb) - nr; | ||
| 215 | cmm_dbg("OOM processing complete\n"); | ||
| 216 | return NOTIFY_OK; | ||
| 217 | } | ||
| 218 | |||
| 219 | /** | ||
| 220 | * cmm_get_mpp - Read memory performance parameters | ||
| 221 | * | ||
| 222 | * Makes hcall to query the current page loan request from the hypervisor. | ||
| 223 | * | ||
| 224 | * Return value: | ||
| 225 | * nothing | ||
| 226 | **/ | ||
| 227 | static void cmm_get_mpp(void) | ||
| 228 | { | ||
| 229 | int rc; | ||
| 230 | struct hvcall_mpp_data mpp_data; | ||
| 231 | unsigned long active_pages_target; | ||
| 232 | signed long page_loan_request; | ||
| 233 | |||
| 234 | rc = h_get_mpp(&mpp_data); | ||
| 235 | |||
| 236 | if (rc != H_SUCCESS) | ||
| 237 | return; | ||
| 238 | |||
| 239 | page_loan_request = div_s64((s64)mpp_data.loan_request, PAGE_SIZE); | ||
| 240 | loaned_pages_target = page_loan_request + loaned_pages; | ||
| 241 | if (loaned_pages_target > oom_freed_pages) | ||
| 242 | loaned_pages_target -= oom_freed_pages; | ||
| 243 | else | ||
| 244 | loaned_pages_target = 0; | ||
| 245 | |||
| 246 | active_pages_target = totalram_pages + loaned_pages - loaned_pages_target; | ||
| 247 | |||
| 248 | if ((min_mem_mb * 1024 * 1024) > (active_pages_target * PAGE_SIZE)) | ||
| 249 | loaned_pages_target = totalram_pages + loaned_pages - | ||
| 250 | ((min_mem_mb * 1024 * 1024) / PAGE_SIZE); | ||
| 251 | |||
| 252 | cmm_dbg("delta = %ld, loaned = %lu, target = %lu, oom = %lu, totalram = %lu\n", | ||
| 253 | page_loan_request, loaned_pages, loaned_pages_target, | ||
| 254 | oom_freed_pages, totalram_pages); | ||
| 255 | } | ||
| 256 | |||
| 257 | static struct notifier_block cmm_oom_nb = { | ||
| 258 | .notifier_call = cmm_oom_notify | ||
| 259 | }; | ||
| 260 | |||
| 261 | /** | ||
| 262 | * cmm_thread - CMM task thread | ||
| 263 | * @dummy: not used | ||
| 264 | * | ||
| 265 | * Return value: | ||
| 266 | * 0 | ||
| 267 | **/ | ||
| 268 | static int cmm_thread(void *dummy) | ||
| 269 | { | ||
| 270 | unsigned long timeleft; | ||
| 271 | |||
| 272 | while (1) { | ||
| 273 | timeleft = msleep_interruptible(delay * 1000); | ||
| 274 | |||
| 275 | if (kthread_should_stop() || timeleft) { | ||
| 276 | loaned_pages_target = loaned_pages; | ||
| 277 | break; | ||
| 278 | } | ||
| 279 | |||
| 280 | cmm_get_mpp(); | ||
| 281 | |||
| 282 | if (loaned_pages_target > loaned_pages) { | ||
| 283 | if (cmm_alloc_pages(loaned_pages_target - loaned_pages)) | ||
| 284 | loaned_pages_target = loaned_pages; | ||
| 285 | } else if (loaned_pages_target < loaned_pages) | ||
| 286 | cmm_free_pages(loaned_pages - loaned_pages_target); | ||
| 287 | } | ||
| 288 | return 0; | ||
| 289 | } | ||
| 290 | |||
| 291 | #define CMM_SHOW(name, format, args...) \ | ||
| 292 | static ssize_t show_##name(struct sys_device *dev, char *buf) \ | ||
| 293 | { \ | ||
| 294 | return sprintf(buf, format, ##args); \ | ||
| 295 | } \ | ||
| 296 | static SYSDEV_ATTR(name, S_IRUGO, show_##name, NULL) | ||
| 297 | |||
| 298 | CMM_SHOW(loaned_kb, "%lu\n", PAGES2KB(loaned_pages)); | ||
| 299 | CMM_SHOW(loaned_target_kb, "%lu\n", PAGES2KB(loaned_pages_target)); | ||
| 300 | |||
| 301 | static ssize_t show_oom_pages(struct sys_device *dev, char *buf) | ||
| 302 | { | ||
| 303 | return sprintf(buf, "%lu\n", PAGES2KB(oom_freed_pages)); | ||
| 304 | } | ||
| 305 | |||
| 306 | static ssize_t store_oom_pages(struct sys_device *dev, | ||
| 307 | const char *buf, size_t count) | ||
| 308 | { | ||
| 309 | unsigned long val = simple_strtoul (buf, NULL, 10); | ||
| 310 | |||
| 311 | if (!capable(CAP_SYS_ADMIN)) | ||
| 312 | return -EPERM; | ||
| 313 | if (val != 0) | ||
| 314 | return -EBADMSG; | ||
| 315 | |||
| 316 | oom_freed_pages = 0; | ||
| 317 | return count; | ||
| 318 | } | ||
| 319 | |||
| 320 | static SYSDEV_ATTR(oom_freed_kb, S_IWUSR| S_IRUGO, | ||
| 321 | show_oom_pages, store_oom_pages); | ||
| 322 | |||
| 323 | static struct sysdev_attribute *cmm_attrs[] = { | ||
| 324 | &attr_loaned_kb, | ||
| 325 | &attr_loaned_target_kb, | ||
| 326 | &attr_oom_freed_kb, | ||
| 327 | }; | ||
| 328 | |||
| 329 | static struct sysdev_class cmm_sysdev_class = { | ||
| 330 | .name = "cmm", | ||
| 331 | }; | ||
| 332 | |||
| 333 | /** | ||
| 334 | * cmm_sysfs_register - Register with sysfs | ||
| 335 | * | ||
| 336 | * Return value: | ||
| 337 | * 0 on success / other on failure | ||
| 338 | **/ | ||
| 339 | static int cmm_sysfs_register(struct sys_device *sysdev) | ||
| 340 | { | ||
| 341 | int i, rc; | ||
| 342 | |||
| 343 | if ((rc = sysdev_class_register(&cmm_sysdev_class))) | ||
| 344 | return rc; | ||
| 345 | |||
| 346 | sysdev->id = 0; | ||
| 347 | sysdev->cls = &cmm_sysdev_class; | ||
| 348 | |||
| 349 | if ((rc = sysdev_register(sysdev))) | ||
| 350 | goto class_unregister; | ||
| 351 | |||
| 352 | for (i = 0; i < ARRAY_SIZE(cmm_attrs); i++) { | ||
| 353 | if ((rc = sysdev_create_file(sysdev, cmm_attrs[i]))) | ||
| 354 | goto fail; | ||
| 355 | } | ||
| 356 | |||
| 357 | return 0; | ||
| 358 | |||
| 359 | fail: | ||
| 360 | while (--i >= 0) | ||
| 361 | sysdev_remove_file(sysdev, cmm_attrs[i]); | ||
| 362 | sysdev_unregister(sysdev); | ||
| 363 | class_unregister: | ||
| 364 | sysdev_class_unregister(&cmm_sysdev_class); | ||
| 365 | return rc; | ||
| 366 | } | ||
| 367 | |||
| 368 | /** | ||
| 369 | * cmm_unregister_sysfs - Unregister from sysfs | ||
| 370 | * | ||
| 371 | **/ | ||
| 372 | static void cmm_unregister_sysfs(struct sys_device *sysdev) | ||
| 373 | { | ||
| 374 | int i; | ||
| 375 | |||
| 376 | for (i = 0; i < ARRAY_SIZE(cmm_attrs); i++) | ||
| 377 | sysdev_remove_file(sysdev, cmm_attrs[i]); | ||
| 378 | sysdev_unregister(sysdev); | ||
| 379 | sysdev_class_unregister(&cmm_sysdev_class); | ||
| 380 | } | ||
| 381 | |||
| 382 | /** | ||
| 383 | * cmm_init - Module initialization | ||
| 384 | * | ||
| 385 | * Return value: | ||
| 386 | * 0 on success / other on failure | ||
| 387 | **/ | ||
| 388 | static int cmm_init(void) | ||
| 389 | { | ||
| 390 | int rc = -ENOMEM; | ||
| 391 | |||
| 392 | if (!firmware_has_feature(FW_FEATURE_CMO)) | ||
| 393 | return -EOPNOTSUPP; | ||
| 394 | |||
| 395 | if ((rc = register_oom_notifier(&cmm_oom_nb)) < 0) | ||
| 396 | return rc; | ||
| 397 | |||
| 398 | if ((rc = cmm_sysfs_register(&cmm_sysdev))) | ||
| 399 | goto out_oom_notifier; | ||
| 400 | |||
| 401 | if (cmm_disabled) | ||
| 402 | return rc; | ||
| 403 | |||
| 404 | cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread"); | ||
| 405 | if (IS_ERR(cmm_thread_ptr)) { | ||
| 406 | rc = PTR_ERR(cmm_thread_ptr); | ||
| 407 | goto out_unregister_sysfs; | ||
| 408 | } | ||
| 409 | |||
| 410 | return rc; | ||
| 411 | |||
| 412 | out_unregister_sysfs: | ||
| 413 | cmm_unregister_sysfs(&cmm_sysdev); | ||
| 414 | out_oom_notifier: | ||
| 415 | unregister_oom_notifier(&cmm_oom_nb); | ||
| 416 | return rc; | ||
| 417 | } | ||
| 418 | |||
| 419 | /** | ||
| 420 | * cmm_exit - Module exit | ||
| 421 | * | ||
| 422 | * Return value: | ||
| 423 | * nothing | ||
| 424 | **/ | ||
| 425 | static void cmm_exit(void) | ||
| 426 | { | ||
| 427 | if (cmm_thread_ptr) | ||
| 428 | kthread_stop(cmm_thread_ptr); | ||
| 429 | unregister_oom_notifier(&cmm_oom_nb); | ||
| 430 | cmm_free_pages(loaned_pages); | ||
| 431 | cmm_unregister_sysfs(&cmm_sysdev); | ||
| 432 | } | ||
| 433 | |||
| 434 | /** | ||
| 435 | * cmm_set_disable - Disable/Enable CMM | ||
| 436 | * | ||
| 437 | * Return value: | ||
| 438 | * 0 on success / other on failure | ||
| 439 | **/ | ||
| 440 | static int cmm_set_disable(const char *val, struct kernel_param *kp) | ||
| 441 | { | ||
| 442 | int disable = simple_strtoul(val, NULL, 10); | ||
| 443 | |||
| 444 | if (disable != 0 && disable != 1) | ||
| 445 | return -EINVAL; | ||
| 446 | |||
| 447 | if (disable && !cmm_disabled) { | ||
| 448 | if (cmm_thread_ptr) | ||
| 449 | kthread_stop(cmm_thread_ptr); | ||
| 450 | cmm_thread_ptr = NULL; | ||
| 451 | cmm_free_pages(loaned_pages); | ||
| 452 | } else if (!disable && cmm_disabled) { | ||
| 453 | cmm_thread_ptr = kthread_run(cmm_thread, NULL, "cmmthread"); | ||
| 454 | if (IS_ERR(cmm_thread_ptr)) | ||
| 455 | return PTR_ERR(cmm_thread_ptr); | ||
| 456 | } | ||
| 457 | |||
| 458 | cmm_disabled = disable; | ||
| 459 | return 0; | ||
| 460 | } | ||
| 461 | |||
| 462 | module_param_call(disable, cmm_set_disable, param_get_uint, | ||
| 463 | &cmm_disabled, S_IRUGO | S_IWUSR); | ||
| 464 | MODULE_PARM_DESC(disable, "Disable CMM. Set to 1 to disable. " | ||
| 465 | "[Default=" __stringify(CMM_DISABLE) "]"); | ||
| 466 | |||
| 467 | module_init(cmm_init); | ||
| 468 | module_exit(cmm_exit); | ||
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 5377dd4b849a..a8c446697f9e 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #include "plpar_wrappers.h" | 48 | #include "plpar_wrappers.h" |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | static void tce_build_pSeries(struct iommu_table *tbl, long index, | 51 | static int tce_build_pSeries(struct iommu_table *tbl, long index, |
| 52 | long npages, unsigned long uaddr, | 52 | long npages, unsigned long uaddr, |
| 53 | enum dma_data_direction direction, | 53 | enum dma_data_direction direction, |
| 54 | struct dma_attrs *attrs) | 54 | struct dma_attrs *attrs) |
| @@ -72,6 +72,7 @@ static void tce_build_pSeries(struct iommu_table *tbl, long index, | |||
| 72 | uaddr += TCE_PAGE_SIZE; | 72 | uaddr += TCE_PAGE_SIZE; |
| 73 | tcep++; | 73 | tcep++; |
| 74 | } | 74 | } |
| 75 | return 0; | ||
| 75 | } | 76 | } |
| 76 | 77 | ||
| 77 | 78 | ||
| @@ -94,14 +95,19 @@ static unsigned long tce_get_pseries(struct iommu_table *tbl, long index) | |||
| 94 | return *tcep; | 95 | return *tcep; |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | 98 | static void tce_free_pSeriesLP(struct iommu_table*, long, long); |
| 99 | static void tce_freemulti_pSeriesLP(struct iommu_table*, long, long); | ||
| 100 | |||
| 101 | static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | ||
| 98 | long npages, unsigned long uaddr, | 102 | long npages, unsigned long uaddr, |
| 99 | enum dma_data_direction direction, | 103 | enum dma_data_direction direction, |
| 100 | struct dma_attrs *attrs) | 104 | struct dma_attrs *attrs) |
| 101 | { | 105 | { |
| 102 | u64 rc; | 106 | u64 rc = 0; |
| 103 | u64 proto_tce, tce; | 107 | u64 proto_tce, tce; |
| 104 | u64 rpn; | 108 | u64 rpn; |
| 109 | int ret = 0; | ||
| 110 | long tcenum_start = tcenum, npages_start = npages; | ||
| 105 | 111 | ||
| 106 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; | 112 | rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; |
| 107 | proto_tce = TCE_PCI_READ; | 113 | proto_tce = TCE_PCI_READ; |
| @@ -112,6 +118,13 @@ static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
| 112 | tce = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; | 118 | tce = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; |
| 113 | rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, tce); | 119 | rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, tce); |
| 114 | 120 | ||
| 121 | if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) { | ||
| 122 | ret = (int)rc; | ||
| 123 | tce_free_pSeriesLP(tbl, tcenum_start, | ||
| 124 | (npages_start - (npages + 1))); | ||
| 125 | break; | ||
| 126 | } | ||
| 127 | |||
| 115 | if (rc && printk_ratelimit()) { | 128 | if (rc && printk_ratelimit()) { |
| 116 | printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); | 129 | printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); |
| 117 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 130 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); |
| @@ -123,25 +136,27 @@ static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
| 123 | tcenum++; | 136 | tcenum++; |
| 124 | rpn++; | 137 | rpn++; |
| 125 | } | 138 | } |
| 139 | return ret; | ||
| 126 | } | 140 | } |
| 127 | 141 | ||
| 128 | static DEFINE_PER_CPU(u64 *, tce_page) = NULL; | 142 | static DEFINE_PER_CPU(u64 *, tce_page) = NULL; |
| 129 | 143 | ||
| 130 | static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | 144 | static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, |
| 131 | long npages, unsigned long uaddr, | 145 | long npages, unsigned long uaddr, |
| 132 | enum dma_data_direction direction, | 146 | enum dma_data_direction direction, |
| 133 | struct dma_attrs *attrs) | 147 | struct dma_attrs *attrs) |
| 134 | { | 148 | { |
| 135 | u64 rc; | 149 | u64 rc = 0; |
| 136 | u64 proto_tce; | 150 | u64 proto_tce; |
| 137 | u64 *tcep; | 151 | u64 *tcep; |
| 138 | u64 rpn; | 152 | u64 rpn; |
| 139 | long l, limit; | 153 | long l, limit; |
| 154 | long tcenum_start = tcenum, npages_start = npages; | ||
| 155 | int ret = 0; | ||
| 140 | 156 | ||
| 141 | if (npages == 1) { | 157 | if (npages == 1) { |
| 142 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, | 158 | return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, |
| 143 | direction, attrs); | 159 | direction, attrs); |
| 144 | return; | ||
| 145 | } | 160 | } |
| 146 | 161 | ||
| 147 | tcep = __get_cpu_var(tce_page); | 162 | tcep = __get_cpu_var(tce_page); |
| @@ -153,9 +168,8 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
| 153 | tcep = (u64 *)__get_free_page(GFP_ATOMIC); | 168 | tcep = (u64 *)__get_free_page(GFP_ATOMIC); |
| 154 | /* If allocation fails, fall back to the loop implementation */ | 169 | /* If allocation fails, fall back to the loop implementation */ |
| 155 | if (!tcep) { | 170 | if (!tcep) { |
| 156 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, | 171 | return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, |
| 157 | direction, attrs); | 172 | direction, attrs); |
| 158 | return; | ||
| 159 | } | 173 | } |
| 160 | __get_cpu_var(tce_page) = tcep; | 174 | __get_cpu_var(tce_page) = tcep; |
| 161 | } | 175 | } |
| @@ -187,6 +201,13 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
| 187 | tcenum += limit; | 201 | tcenum += limit; |
| 188 | } while (npages > 0 && !rc); | 202 | } while (npages > 0 && !rc); |
| 189 | 203 | ||
| 204 | if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) { | ||
| 205 | ret = (int)rc; | ||
| 206 | tce_freemulti_pSeriesLP(tbl, tcenum_start, | ||
| 207 | (npages_start - (npages + limit))); | ||
| 208 | return ret; | ||
| 209 | } | ||
| 210 | |||
| 190 | if (rc && printk_ratelimit()) { | 211 | if (rc && printk_ratelimit()) { |
| 191 | printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); | 212 | printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); |
| 192 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); | 213 | printk("\tindex = 0x%lx\n", (u64)tbl->it_index); |
| @@ -194,6 +215,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
| 194 | printk("\ttce[0] val = 0x%lx\n", tcep[0]); | 215 | printk("\ttce[0] val = 0x%lx\n", tcep[0]); |
| 195 | show_stack(current, (unsigned long *)__get_SP()); | 216 | show_stack(current, (unsigned long *)__get_SP()); |
| 196 | } | 217 | } |
| 218 | return ret; | ||
| 197 | } | 219 | } |
| 198 | 220 | ||
| 199 | static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) | 221 | static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index d8680b589dc9..a437267c6bf8 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
| @@ -42,6 +42,16 @@ static inline long register_slb_shadow(unsigned long cpu, unsigned long vpa) | |||
| 42 | return vpa_call(0x3, cpu, vpa); | 42 | return vpa_call(0x3, cpu, vpa); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | static inline long plpar_page_set_loaned(unsigned long vpa) | ||
| 46 | { | ||
| 47 | return plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_LOANED, vpa, 0); | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline long plpar_page_set_active(unsigned long vpa) | ||
| 51 | { | ||
| 52 | return plpar_hcall_norets(H_PAGE_INIT, H_PAGE_SET_ACTIVE, vpa, 0); | ||
| 53 | } | ||
| 54 | |||
| 45 | extern void vpa_init(int cpu); | 55 | extern void vpa_init(int cpu); |
| 46 | 56 | ||
| 47 | static inline long plpar_pte_enter(unsigned long flags, | 57 | static inline long plpar_pte_enter(unsigned long flags, |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 90beb444e1dd..063a0d2fba30 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -314,6 +314,76 @@ static int pseries_set_xdabr(unsigned long dabr) | |||
| 314 | H_DABRX_KERNEL | H_DABRX_USER); | 314 | H_DABRX_KERNEL | H_DABRX_USER); |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | #define CMO_CHARACTERISTICS_TOKEN 44 | ||
| 318 | #define CMO_MAXLENGTH 1026 | ||
| 319 | |||
| 320 | /** | ||
| 321 | * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions, | ||
| 322 | * handle that here. (Stolen from parse_system_parameter_string) | ||
| 323 | */ | ||
| 324 | void pSeries_cmo_feature_init(void) | ||
| 325 | { | ||
| 326 | char *ptr, *key, *value, *end; | ||
| 327 | int call_status; | ||
| 328 | int PrPSP = -1; | ||
| 329 | int SecPSP = -1; | ||
| 330 | |||
| 331 | pr_debug(" -> fw_cmo_feature_init()\n"); | ||
| 332 | spin_lock(&rtas_data_buf_lock); | ||
| 333 | memset(rtas_data_buf, 0, RTAS_DATA_BUF_SIZE); | ||
| 334 | call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, | ||
| 335 | NULL, | ||
| 336 | CMO_CHARACTERISTICS_TOKEN, | ||
| 337 | __pa(rtas_data_buf), | ||
| 338 | RTAS_DATA_BUF_SIZE); | ||
| 339 | |||
| 340 | if (call_status != 0) { | ||
| 341 | spin_unlock(&rtas_data_buf_lock); | ||
| 342 | pr_debug("CMO not available\n"); | ||
| 343 | pr_debug(" <- fw_cmo_feature_init()\n"); | ||
| 344 | return; | ||
| 345 | } | ||
| 346 | |||
| 347 | end = rtas_data_buf + CMO_MAXLENGTH - 2; | ||
| 348 | ptr = rtas_data_buf + 2; /* step over strlen value */ | ||
| 349 | key = value = ptr; | ||
| 350 | |||
| 351 | while (*ptr && (ptr <= end)) { | ||
| 352 | /* Separate the key and value by replacing '=' with '\0' and | ||
| 353 | * point the value at the string after the '=' | ||
| 354 | */ | ||
| 355 | if (ptr[0] == '=') { | ||
| 356 | ptr[0] = '\0'; | ||
| 357 | value = ptr + 1; | ||
| 358 | } else if (ptr[0] == '\0' || ptr[0] == ',') { | ||
| 359 | /* Terminate the string containing the key/value pair */ | ||
| 360 | ptr[0] = '\0'; | ||
| 361 | |||
| 362 | if (key == value) { | ||
| 363 | pr_debug("Malformed key/value pair\n"); | ||
| 364 | /* Never found a '=', end processing */ | ||
| 365 | break; | ||
| 366 | } | ||
| 367 | |||
| 368 | if (0 == strcmp(key, "PrPSP")) | ||
| 369 | PrPSP = simple_strtol(value, NULL, 10); | ||
| 370 | else if (0 == strcmp(key, "SecPSP")) | ||
| 371 | SecPSP = simple_strtol(value, NULL, 10); | ||
| 372 | value = key = ptr + 1; | ||
| 373 | } | ||
| 374 | ptr++; | ||
| 375 | } | ||
| 376 | |||
| 377 | if (PrPSP != -1 || SecPSP != -1) { | ||
| 378 | pr_info("CMO enabled\n"); | ||
| 379 | pr_debug("CMO enabled, PrPSP=%d, SecPSP=%d\n", PrPSP, SecPSP); | ||
| 380 | powerpc_firmware_features |= FW_FEATURE_CMO; | ||
| 381 | } else | ||
| 382 | pr_debug("CMO not enabled, PrPSP=%d, SecPSP=%d\n", PrPSP, SecPSP); | ||
| 383 | spin_unlock(&rtas_data_buf_lock); | ||
| 384 | pr_debug(" <- fw_cmo_feature_init()\n"); | ||
| 385 | } | ||
| 386 | |||
| 317 | /* | 387 | /* |
| 318 | * Early initialization. Relocation is on but do not reference unbolted pages | 388 | * Early initialization. Relocation is on but do not reference unbolted pages |
| 319 | */ | 389 | */ |
| @@ -329,6 +399,7 @@ static void __init pSeries_init_early(void) | |||
| 329 | else if (firmware_has_feature(FW_FEATURE_XDABR)) | 399 | else if (firmware_has_feature(FW_FEATURE_XDABR)) |
| 330 | ppc_md.set_dabr = pseries_set_xdabr; | 400 | ppc_md.set_dabr = pseries_set_xdabr; |
| 331 | 401 | ||
| 402 | pSeries_cmo_feature_init(); | ||
| 332 | iommu_init_early_pSeries(); | 403 | iommu_init_early_pSeries(); |
| 333 | 404 | ||
| 334 | pr_debug(" <- pSeries_init_early()\n"); | 405 | pr_debug(" <- pSeries_init_early()\n"); |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index de8c8b542cfa..89639ecbf381 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
| @@ -147,7 +147,7 @@ static void dart_flush(struct iommu_table *tbl) | |||
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | static void dart_build(struct iommu_table *tbl, long index, | 150 | static int dart_build(struct iommu_table *tbl, long index, |
| 151 | long npages, unsigned long uaddr, | 151 | long npages, unsigned long uaddr, |
| 152 | enum dma_data_direction direction, | 152 | enum dma_data_direction direction, |
| 153 | struct dma_attrs *attrs) | 153 | struct dma_attrs *attrs) |
| @@ -184,6 +184,7 @@ static void dart_build(struct iommu_table *tbl, long index, | |||
| 184 | } else { | 184 | } else { |
| 185 | dart_dirty = 1; | 185 | dart_dirty = 1; |
| 186 | } | 186 | } |
| 187 | return 0; | ||
| 187 | } | 188 | } |
| 188 | 189 | ||
| 189 | 190 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig index 4bb18f57901e..1ce546462be5 100644 --- a/arch/powerpc/sysdev/qe_lib/Kconfig +++ b/arch/powerpc/sysdev/qe_lib/Kconfig | |||
| @@ -29,7 +29,7 @@ config QE_GPIO | |||
| 29 | bool "QE GPIO support" | 29 | bool "QE GPIO support" |
| 30 | depends on QUICC_ENGINE | 30 | depends on QUICC_ENGINE |
| 31 | select GENERIC_GPIO | 31 | select GENERIC_GPIO |
| 32 | select HAVE_GPIO_LIB | 32 | select ARCH_REQUIRE_GPIOLIB |
| 33 | help | 33 | help |
| 34 | Say Y here if you're going to use hardware that connects to the | 34 | Say Y here if you're going to use hardware that connects to the |
| 35 | QE GPIOs. | 35 | QE GPIOs. |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index eb530b4128ba..2ed88122be93 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
| @@ -565,6 +565,7 @@ bool "s390 guest support (EXPERIMENTAL)" | |||
| 565 | depends on 64BIT && EXPERIMENTAL | 565 | depends on 64BIT && EXPERIMENTAL |
| 566 | select VIRTIO | 566 | select VIRTIO |
| 567 | select VIRTIO_RING | 567 | select VIRTIO_RING |
| 568 | select VIRTIO_CONSOLE | ||
| 568 | help | 569 | help |
| 569 | Select this option if you want to run the kernel under s390 linux | 570 | Select this option if you want to run the kernel under s390 linux |
| 570 | endmenu | 571 | endmenu |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 288ad490a6dd..4f82e5b5f879 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
| @@ -270,7 +270,6 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
| 270 | __ctl_store(kcb->kprobe_saved_ctl, 9, 11); | 270 | __ctl_store(kcb->kprobe_saved_ctl, 9, 11); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | /* Called with kretprobe_lock held */ | ||
| 274 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 273 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 275 | struct pt_regs *regs) | 274 | struct pt_regs *regs) |
| 276 | { | 275 | { |
| @@ -377,8 +376,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
| 377 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; | 376 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; |
| 378 | 377 | ||
| 379 | INIT_HLIST_HEAD(&empty_rp); | 378 | INIT_HLIST_HEAD(&empty_rp); |
| 380 | spin_lock_irqsave(&kretprobe_lock, flags); | 379 | kretprobe_hash_lock(current, &head, &flags); |
| 381 | head = kretprobe_inst_table_head(current); | ||
| 382 | 380 | ||
| 383 | /* | 381 | /* |
| 384 | * It is possible to have multiple instances associated with a given | 382 | * It is possible to have multiple instances associated with a given |
| @@ -417,7 +415,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
| 417 | regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE; | 415 | regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE; |
| 418 | 416 | ||
| 419 | reset_current_kprobe(); | 417 | reset_current_kprobe(); |
| 420 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 418 | kretprobe_hash_unlock(current, &flags); |
| 421 | preempt_enable_no_resched(); | 419 | preempt_enable_no_resched(); |
| 422 | 420 | ||
| 423 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 421 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 85defd01d293..9839767d0842 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
| @@ -142,7 +142,7 @@ static void default_idle(void) | |||
| 142 | void cpu_idle(void) | 142 | void cpu_idle(void) |
| 143 | { | 143 | { |
| 144 | for (;;) { | 144 | for (;;) { |
| 145 | tick_nohz_stop_sched_tick(); | 145 | tick_nohz_stop_sched_tick(1); |
| 146 | while (!need_resched()) | 146 | while (!need_resched()) |
| 147 | default_idle(); | 147 | default_idle(); |
| 148 | tick_nohz_restart_sched_tick(); | 148 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index b358e18273b0..62122bad1e33 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | #include <asm/sections.h> | 54 | #include <asm/sections.h> |
| 55 | #include <asm/ebcdic.h> | 55 | #include <asm/ebcdic.h> |
| 56 | #include <asm/compat.h> | 56 | #include <asm/compat.h> |
| 57 | #include <asm/kvm_virtio.h> | ||
| 57 | 58 | ||
| 58 | long psw_kernel_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | | 59 | long psw_kernel_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | |
| 59 | PSW_MASK_MCHECK | PSW_DEFAULT_KEY); | 60 | PSW_MASK_MCHECK | PSW_DEFAULT_KEY); |
| @@ -766,7 +767,8 @@ setup_arch(char **cmdline_p) | |||
| 766 | printk("We are running under VM (64 bit mode)\n"); | 767 | printk("We are running under VM (64 bit mode)\n"); |
| 767 | else if (MACHINE_IS_KVM) { | 768 | else if (MACHINE_IS_KVM) { |
| 768 | printk("We are running under KVM (64 bit mode)\n"); | 769 | printk("We are running under KVM (64 bit mode)\n"); |
| 769 | add_preferred_console("ttyS", 1, NULL); | 770 | add_preferred_console("hvc", 0, NULL); |
| 771 | s390_virtio_console_init(); | ||
| 770 | } else | 772 | } else |
| 771 | printk("We are running native (64 bit mode)\n"); | 773 | printk("We are running native (64 bit mode)\n"); |
| 772 | #endif /* CONFIG_64BIT */ | 774 | #endif /* CONFIG_64BIT */ |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 212d618b0095..632b13e10053 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
| 10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
| 11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
| 12 | #include <linux/kthread.h> | ||
| 13 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
| 14 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
| 15 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
| @@ -230,20 +229,9 @@ void arch_update_cpu_topology(void) | |||
| 230 | } | 229 | } |
| 231 | } | 230 | } |
| 232 | 231 | ||
| 233 | static int topology_kthread(void *data) | ||
| 234 | { | ||
| 235 | arch_reinit_sched_domains(); | ||
| 236 | return 0; | ||
| 237 | } | ||
| 238 | |||
| 239 | static void topology_work_fn(struct work_struct *work) | 232 | static void topology_work_fn(struct work_struct *work) |
| 240 | { | 233 | { |
| 241 | /* We can't call arch_reinit_sched_domains() from a multi-threaded | 234 | arch_reinit_sched_domains(); |
| 242 | * workqueue context since it may deadlock in case of cpu hotplug. | ||
| 243 | * So we have to create a kernel thread in order to call | ||
| 244 | * arch_reinit_sched_domains(). | ||
| 245 | */ | ||
| 246 | kthread_run(topology_kthread, NULL, "topology_update"); | ||
| 247 | } | 235 | } |
| 248 | 236 | ||
| 249 | void topology_schedule_update(void) | 237 | void topology_schedule_update(void) |
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c index f4b6124fdb75..f28c43d2f61d 100644 --- a/arch/s390/mm/hugetlbpage.c +++ b/arch/s390/mm/hugetlbpage.c | |||
| @@ -72,7 +72,8 @@ void arch_release_hugepage(struct page *page) | |||
| 72 | page[1].index = 0; | 72 | page[1].index = 0; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 75 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
| 76 | unsigned long addr, unsigned long sz) | ||
| 76 | { | 77 | { |
| 77 | pgd_t *pgdp; | 78 | pgd_t *pgdp; |
| 78 | pud_t *pudp; | 79 | pud_t *pudp; |
| @@ -119,6 +120,11 @@ int pmd_huge(pmd_t pmd) | |||
| 119 | return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); | 120 | return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); |
| 120 | } | 121 | } |
| 121 | 122 | ||
| 123 | int pud_huge(pud_t pud) | ||
| 124 | { | ||
| 125 | return 0; | ||
| 126 | } | ||
| 127 | |||
| 122 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 128 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
| 123 | pmd_t *pmdp, int write) | 129 | pmd_t *pmdp, int write) |
| 124 | { | 130 | { |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 388cc7420055..4993b0f594eb 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
| @@ -42,38 +42,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
| 42 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); | 42 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); |
| 43 | char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); | 43 | char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); |
| 44 | 44 | ||
| 45 | void show_mem(void) | ||
| 46 | { | ||
| 47 | unsigned long i, total = 0, reserved = 0; | ||
| 48 | unsigned long shared = 0, cached = 0; | ||
| 49 | unsigned long flags; | ||
| 50 | struct page *page; | ||
| 51 | pg_data_t *pgdat; | ||
| 52 | |||
| 53 | printk("Mem-info:\n"); | ||
| 54 | show_free_areas(); | ||
| 55 | for_each_online_pgdat(pgdat) { | ||
| 56 | pgdat_resize_lock(pgdat, &flags); | ||
| 57 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
| 58 | if (!pfn_valid(pgdat->node_start_pfn + i)) | ||
| 59 | continue; | ||
| 60 | page = pfn_to_page(pgdat->node_start_pfn + i); | ||
| 61 | total++; | ||
| 62 | if (PageReserved(page)) | ||
| 63 | reserved++; | ||
| 64 | else if (PageSwapCache(page)) | ||
| 65 | cached++; | ||
| 66 | else if (page_count(page)) | ||
| 67 | shared += page_count(page) - 1; | ||
| 68 | } | ||
| 69 | pgdat_resize_unlock(pgdat, &flags); | ||
| 70 | } | ||
| 71 | printk("%ld pages of RAM\n", total); | ||
| 72 | printk("%ld reserved pages\n", reserved); | ||
| 73 | printk("%ld pages shared\n", shared); | ||
| 74 | printk("%ld pages swap cached\n", cached); | ||
| 75 | } | ||
| 76 | |||
| 77 | /* | 45 | /* |
| 78 | * paging_init() sets up the page tables | 46 | * paging_init() sets up the page tables |
| 79 | */ | 47 | */ |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 3e7384f4619c..8879938f3356 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
| @@ -8,6 +8,7 @@ mainmenu "Linux/SuperH Kernel Configuration" | |||
| 8 | config SUPERH | 8 | config SUPERH |
| 9 | def_bool y | 9 | def_bool y |
| 10 | select EMBEDDED | 10 | select EMBEDDED |
| 11 | select HAVE_CLK | ||
| 11 | select HAVE_IDE | 12 | select HAVE_IDE |
| 12 | select HAVE_OPROFILE | 13 | select HAVE_OPROFILE |
| 13 | help | 14 | help |
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c index 01af44245b57..963c99322095 100644 --- a/arch/sh/boards/renesas/migor/setup.c +++ b/arch/sh/boards/renesas/migor/setup.c | |||
| @@ -30,7 +30,6 @@ | |||
| 30 | 30 | ||
| 31 | static struct smc91x_platdata smc91x_info = { | 31 | static struct smc91x_platdata smc91x_info = { |
| 32 | .flags = SMC91X_USE_16BIT, | 32 | .flags = SMC91X_USE_16BIT, |
| 33 | .irq_flags = IRQF_TRIGGER_HIGH, | ||
| 34 | }; | 33 | }; |
| 35 | 34 | ||
| 36 | static struct resource smc91x_eth_resources[] = { | 35 | static struct resource smc91x_eth_resources[] = { |
| @@ -42,7 +41,7 @@ static struct resource smc91x_eth_resources[] = { | |||
| 42 | }, | 41 | }, |
| 43 | [1] = { | 42 | [1] = { |
| 44 | .start = 32, /* IRQ0 */ | 43 | .start = 32, /* IRQ0 */ |
| 45 | .flags = IORESOURCE_IRQ, | 44 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
| 46 | }, | 45 | }, |
| 47 | }; | 46 | }; |
| 48 | 47 | ||
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc_32.c index adcea31e663e..f386997e4d9c 100644 --- a/arch/sh/boot/compressed/misc_32.c +++ b/arch/sh/boot/compressed/misc_32.c | |||
| @@ -74,8 +74,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
| 74 | static int fill_inbuf(void); | 74 | static int fill_inbuf(void); |
| 75 | static void flush_window(void); | 75 | static void flush_window(void); |
| 76 | static void error(char *m); | 76 | static void error(char *m); |
| 77 | static void gzip_mark(void **); | ||
| 78 | static void gzip_release(void **); | ||
| 79 | 77 | ||
| 80 | extern char input_data[]; | 78 | extern char input_data[]; |
| 81 | extern int input_len; | 79 | extern int input_len; |
| @@ -84,11 +82,7 @@ static long bytes_out = 0; | |||
| 84 | static uch *output_data; | 82 | static uch *output_data; |
| 85 | static unsigned long output_ptr = 0; | 83 | static unsigned long output_ptr = 0; |
| 86 | 84 | ||
| 87 | static void *malloc(int size); | ||
| 88 | static void free(void *where); | ||
| 89 | static void error(char *m); | 85 | static void error(char *m); |
| 90 | static void gzip_mark(void **); | ||
| 91 | static void gzip_release(void **); | ||
| 92 | 86 | ||
| 93 | int puts(const char *); | 87 | int puts(const char *); |
| 94 | 88 | ||
| @@ -101,38 +95,6 @@ static unsigned long free_mem_end_ptr; | |||
| 101 | 95 | ||
| 102 | #include "../../../../lib/inflate.c" | 96 | #include "../../../../lib/inflate.c" |
| 103 | 97 | ||
| 104 | static void *malloc(int size) | ||
| 105 | { | ||
| 106 | void *p; | ||
| 107 | |||
| 108 | if (size <0) error("Malloc error"); | ||
| 109 | if (free_mem_ptr == 0) error("Memory error"); | ||
| 110 | |||
| 111 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 112 | |||
| 113 | p = (void *)free_mem_ptr; | ||
| 114 | free_mem_ptr += size; | ||
| 115 | |||
| 116 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 117 | error("Out of memory"); | ||
| 118 | |||
| 119 | return p; | ||
| 120 | } | ||
| 121 | |||
| 122 | static void free(void *where) | ||
| 123 | { /* Don't care */ | ||
| 124 | } | ||
| 125 | |||
| 126 | static void gzip_mark(void **ptr) | ||
| 127 | { | ||
| 128 | *ptr = (void *) free_mem_ptr; | ||
| 129 | } | ||
| 130 | |||
| 131 | static void gzip_release(void **ptr) | ||
| 132 | { | ||
| 133 | free_mem_ptr = (long) *ptr; | ||
| 134 | } | ||
| 135 | |||
| 136 | #ifdef CONFIG_SH_STANDARD_BIOS | 98 | #ifdef CONFIG_SH_STANDARD_BIOS |
| 137 | size_t strlen(const char *s) | 99 | size_t strlen(const char *s) |
| 138 | { | 100 | { |
diff --git a/arch/sh/boot/compressed/misc_64.c b/arch/sh/boot/compressed/misc_64.c index a006ef89b9dd..2941657e18aa 100644 --- a/arch/sh/boot/compressed/misc_64.c +++ b/arch/sh/boot/compressed/misc_64.c | |||
| @@ -72,8 +72,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
| 72 | static int fill_inbuf(void); | 72 | static int fill_inbuf(void); |
| 73 | static void flush_window(void); | 73 | static void flush_window(void); |
| 74 | static void error(char *m); | 74 | static void error(char *m); |
| 75 | static void gzip_mark(void **); | ||
| 76 | static void gzip_release(void **); | ||
| 77 | 75 | ||
| 78 | extern char input_data[]; | 76 | extern char input_data[]; |
| 79 | extern int input_len; | 77 | extern int input_len; |
| @@ -82,11 +80,7 @@ static long bytes_out = 0; | |||
| 82 | static uch *output_data; | 80 | static uch *output_data; |
| 83 | static unsigned long output_ptr = 0; | 81 | static unsigned long output_ptr = 0; |
| 84 | 82 | ||
| 85 | static void *malloc(int size); | ||
| 86 | static void free(void *where); | ||
| 87 | static void error(char *m); | 83 | static void error(char *m); |
| 88 | static void gzip_mark(void **); | ||
| 89 | static void gzip_release(void **); | ||
| 90 | 84 | ||
| 91 | static void puts(const char *); | 85 | static void puts(const char *); |
| 92 | 86 | ||
| @@ -99,40 +93,6 @@ static unsigned long free_mem_end_ptr; | |||
| 99 | 93 | ||
| 100 | #include "../../../../lib/inflate.c" | 94 | #include "../../../../lib/inflate.c" |
| 101 | 95 | ||
| 102 | static void *malloc(int size) | ||
| 103 | { | ||
| 104 | void *p; | ||
| 105 | |||
| 106 | if (size < 0) | ||
| 107 | error("Malloc error\n"); | ||
| 108 | if (free_mem_ptr == 0) | ||
| 109 | error("Memory error\n"); | ||
| 110 | |||
| 111 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 112 | |||
| 113 | p = (void *) free_mem_ptr; | ||
| 114 | free_mem_ptr += size; | ||
| 115 | |||
| 116 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 117 | error("\nOut of memory\n"); | ||
| 118 | |||
| 119 | return p; | ||
| 120 | } | ||
| 121 | |||
| 122 | static void free(void *where) | ||
| 123 | { /* Don't care */ | ||
| 124 | } | ||
| 125 | |||
| 126 | static void gzip_mark(void **ptr) | ||
| 127 | { | ||
| 128 | *ptr = (void *) free_mem_ptr; | ||
| 129 | } | ||
| 130 | |||
| 131 | static void gzip_release(void **ptr) | ||
| 132 | { | ||
| 133 | free_mem_ptr = (long) *ptr; | ||
| 134 | } | ||
| 135 | |||
| 136 | void puts(const char *s) | 96 | void puts(const char *s) |
| 137 | { | 97 | { |
| 138 | } | 98 | } |
diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index 5c17de51987e..ec1eadce4aaa 100644 --- a/arch/sh/kernel/machine_kexec.c +++ b/arch/sh/kernel/machine_kexec.c | |||
| @@ -70,7 +70,7 @@ static void kexec_info(struct kimage *image) | |||
| 70 | * Do not allocate memory (or fail in any way) in machine_kexec(). | 70 | * Do not allocate memory (or fail in any way) in machine_kexec(). |
| 71 | * We are past the point of no return, committed to rebooting now. | 71 | * We are past the point of no return, committed to rebooting now. |
| 72 | */ | 72 | */ |
| 73 | NORET_TYPE void machine_kexec(struct kimage *image) | 73 | void machine_kexec(struct kimage *image) |
| 74 | { | 74 | { |
| 75 | 75 | ||
| 76 | unsigned long page_list; | 76 | unsigned long page_list; |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index b98e37a1f54c..921892c351da 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
| @@ -86,7 +86,7 @@ void cpu_idle(void) | |||
| 86 | if (!idle) | 86 | if (!idle) |
| 87 | idle = default_idle; | 87 | idle = default_idle; |
| 88 | 88 | ||
| 89 | tick_nohz_stop_sched_tick(); | 89 | tick_nohz_stop_sched_tick(1); |
| 90 | while (!need_resched()) | 90 | while (!need_resched()) |
| 91 | idle(); | 91 | idle(); |
| 92 | tick_nohz_restart_sched_tick(); | 92 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c index 1b2ae35c4a76..54d1f61aa007 100644 --- a/arch/sh/kernel/stacktrace.c +++ b/arch/sh/kernel/stacktrace.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
| 13 | #include <linux/stacktrace.h> | 13 | #include <linux/stacktrace.h> |
| 14 | #include <linux/thread_info.h> | 14 | #include <linux/thread_info.h> |
| 15 | #include <linux/module.h> | ||
| 15 | #include <asm/ptrace.h> | 16 | #include <asm/ptrace.h> |
| 16 | 17 | ||
| 17 | /* | 18 | /* |
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c index 125e493ead82..f0aa5c398656 100644 --- a/arch/sh/kernel/sys_sh32.c +++ b/arch/sh/kernel/sys_sh32.c | |||
| @@ -29,7 +29,7 @@ asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | |||
| 29 | int fd[2]; | 29 | int fd[2]; |
| 30 | int error; | 30 | int error; |
| 31 | 31 | ||
| 32 | error = do_pipe(fd); | 32 | error = do_pipe_flags(fd, 0); |
| 33 | if (!error) { | 33 | if (!error) { |
| 34 | regs->regs[1] = fd[1]; | 34 | regs->regs[1] = fd[1]; |
| 35 | return fd[0]; | 35 | return fd[0]; |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index ae8c321d6e2a..9304117039c4 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
| @@ -22,7 +22,8 @@ | |||
| 22 | #include <asm/tlbflush.h> | 22 | #include <asm/tlbflush.h> |
| 23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
| 24 | 24 | ||
| 25 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 25 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
| 26 | unsigned long addr, unsigned long sz) | ||
| 26 | { | 27 | { |
| 27 | pgd_t *pgd; | 28 | pgd_t *pgd; |
| 28 | pud_t *pud; | 29 | pud_t *pud; |
| @@ -78,6 +79,11 @@ int pmd_huge(pmd_t pmd) | |||
| 78 | return 0; | 79 | return 0; |
| 79 | } | 80 | } |
| 80 | 81 | ||
| 82 | int pud_huge(pud_t pud) | ||
| 83 | { | ||
| 84 | return 0; | ||
| 85 | } | ||
| 86 | |||
| 81 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 87 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
| 82 | pmd_t *pmd, int write) | 88 | pmd_t *pmd, int write) |
| 83 | { | 89 | { |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index d7df26bd1e54..b75a7acd62fb 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
| @@ -25,47 +25,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
| 25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 25 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
| 26 | unsigned long cached_to_uncached = 0; | 26 | unsigned long cached_to_uncached = 0; |
| 27 | 27 | ||
| 28 | void show_mem(void) | ||
| 29 | { | ||
| 30 | int total = 0, reserved = 0, free = 0; | ||
| 31 | int shared = 0, cached = 0, slab = 0; | ||
| 32 | pg_data_t *pgdat; | ||
| 33 | |||
| 34 | printk("Mem-info:\n"); | ||
| 35 | show_free_areas(); | ||
| 36 | |||
| 37 | for_each_online_pgdat(pgdat) { | ||
| 38 | unsigned long flags, i; | ||
| 39 | |||
| 40 | pgdat_resize_lock(pgdat, &flags); | ||
| 41 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
| 42 | struct page *page = pgdat_page_nr(pgdat, i); | ||
| 43 | total++; | ||
| 44 | if (PageReserved(page)) | ||
| 45 | reserved++; | ||
| 46 | else if (PageSwapCache(page)) | ||
| 47 | cached++; | ||
| 48 | else if (PageSlab(page)) | ||
| 49 | slab++; | ||
| 50 | else if (!page_count(page)) | ||
| 51 | free++; | ||
| 52 | else | ||
| 53 | shared += page_count(page) - 1; | ||
| 54 | } | ||
| 55 | pgdat_resize_unlock(pgdat, &flags); | ||
| 56 | } | ||
| 57 | |||
| 58 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 59 | printk("%d pages of RAM\n", total); | ||
| 60 | printk("%d free pages\n", free); | ||
| 61 | printk("%d reserved pages\n", reserved); | ||
| 62 | printk("%d slab pages\n", slab); | ||
| 63 | printk("%d pages shared\n", shared); | ||
| 64 | printk("%d pages swap cached\n", cached); | ||
| 65 | printk(KERN_INFO "Total of %ld pages in page table cache\n", | ||
| 66 | quicklist_total_size()); | ||
| 67 | } | ||
| 68 | |||
| 69 | #ifdef CONFIG_MMU | 28 | #ifdef CONFIG_MMU |
| 70 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) | 29 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) |
| 71 | { | 30 | { |
| @@ -191,7 +150,7 @@ void __init paging_init(void) | |||
| 191 | pg_data_t *pgdat = NODE_DATA(nid); | 150 | pg_data_t *pgdat = NODE_DATA(nid); |
| 192 | unsigned long low, start_pfn; | 151 | unsigned long low, start_pfn; |
| 193 | 152 | ||
| 194 | start_pfn = pgdat->bdata->node_boot_start >> PAGE_SHIFT; | 153 | start_pfn = pgdat->bdata->node_min_pfn; |
| 195 | low = pgdat->bdata->node_low_pfn; | 154 | low = pgdat->bdata->node_low_pfn; |
| 196 | 155 | ||
| 197 | if (max_zone_pfns[ZONE_NORMAL] < low) | 156 | if (max_zone_pfns[ZONE_NORMAL] < low) |
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c index 1663199ce888..095d93bec7cd 100644 --- a/arch/sh/mm/numa.c +++ b/arch/sh/mm/numa.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/pfn.h> | 14 | #include <linux/pfn.h> |
| 15 | #include <asm/sections.h> | 15 | #include <asm/sections.h> |
| 16 | 16 | ||
| 17 | static bootmem_data_t plat_node_bdata[MAX_NUMNODES]; | ||
| 18 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; | 17 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; |
| 19 | EXPORT_SYMBOL_GPL(node_data); | 18 | EXPORT_SYMBOL_GPL(node_data); |
| 20 | 19 | ||
| @@ -35,7 +34,7 @@ void __init setup_memory(void) | |||
| 35 | NODE_DATA(0) = pfn_to_kaddr(free_pfn); | 34 | NODE_DATA(0) = pfn_to_kaddr(free_pfn); |
| 36 | memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); | 35 | memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); |
| 37 | free_pfn += PFN_UP(sizeof(struct pglist_data)); | 36 | free_pfn += PFN_UP(sizeof(struct pglist_data)); |
| 38 | NODE_DATA(0)->bdata = &plat_node_bdata[0]; | 37 | NODE_DATA(0)->bdata = &bootmem_node_data[0]; |
| 39 | 38 | ||
| 40 | /* Set up node 0 */ | 39 | /* Set up node 0 */ |
| 41 | setup_bootmem_allocator(free_pfn); | 40 | setup_bootmem_allocator(free_pfn); |
| @@ -66,7 +65,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end) | |||
| 66 | free_pfn += PFN_UP(sizeof(struct pglist_data)); | 65 | free_pfn += PFN_UP(sizeof(struct pglist_data)); |
| 67 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | 66 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); |
| 68 | 67 | ||
| 69 | NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; | 68 | NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; |
| 70 | NODE_DATA(nid)->node_start_pfn = start_pfn; | 69 | NODE_DATA(nid)->node_start_pfn = start_pfn; |
| 71 | NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; | 70 | NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; |
| 72 | 71 | ||
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 0b0ec6e04753..46911bcbf17b 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
| @@ -293,7 +293,7 @@ void pmb_unmap(unsigned long addr) | |||
| 293 | } while (pmbe); | 293 | } while (pmbe); |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb) | 296 | static void pmb_cache_ctor(void *pmb) |
| 297 | { | 297 | { |
| 298 | struct pmb_entry *pmbe = pmb; | 298 | struct pmb_entry *pmbe = pmb; |
| 299 | 299 | ||
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 789724e61e83..375de7c6d082 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
| @@ -298,20 +298,6 @@ config UNIX98_PTYS | |||
| 298 | Read the instructions in <file:Documentation/Changes> pertaining to | 298 | Read the instructions in <file:Documentation/Changes> pertaining to |
| 299 | pseudo terminals. It's safe to say N. | 299 | pseudo terminals. It's safe to say N. |
| 300 | 300 | ||
| 301 | config UNIX98_PTY_COUNT | ||
| 302 | int "Maximum number of Unix98 PTYs in use (0-2048)" | ||
| 303 | depends on UNIX98_PTYS | ||
| 304 | default "256" | ||
| 305 | help | ||
| 306 | The maximum number of Unix98 PTYs that can be used at any one time. | ||
| 307 | The default is 256, and should be enough for desktop systems. Server | ||
| 308 | machines which support incoming telnet/rlogin/ssh connections and/or | ||
| 309 | serve several X terminals may want to increase this: every incoming | ||
| 310 | connection and every xterm uses up one PTY. | ||
| 311 | |||
| 312 | When not in use, each additional set of 256 PTYs occupy | ||
| 313 | approximately 8 KB of kernel memory on 32-bit architectures. | ||
| 314 | |||
| 315 | endmenu | 301 | endmenu |
| 316 | 302 | ||
| 317 | source "fs/Kconfig" | 303 | source "fs/Kconfig" |
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index 3c6b49a53ae8..4d73421559c3 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c | |||
| @@ -97,7 +97,7 @@ asmlinkage int sparc_pipe(struct pt_regs *regs) | |||
| 97 | int fd[2]; | 97 | int fd[2]; |
| 98 | int error; | 98 | int error; |
| 99 | 99 | ||
| 100 | error = do_pipe(fd); | 100 | error = do_pipe_flags(fd, 0); |
| 101 | if (error) | 101 | if (error) |
| 102 | goto out; | 102 | goto out; |
| 103 | regs->u_regs[UREG_I1] = fd[1]; | 103 | regs->u_regs[UREG_I1] = fd[1]; |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 5a7c4c8345c3..e1b9233b90ab 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
| @@ -80,4 +80,5 @@ sys_call_table: | |||
| 80 | /*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy | 80 | /*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy |
| 81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait | 81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait |
| 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
| 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime | 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
| 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1 | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index c624e04ff03e..ee30462598fc 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
| @@ -1352,8 +1352,7 @@ void __init srmmu_paging_init(void) | |||
| 1352 | zones_size[ZONE_HIGHMEM] = npages; | 1352 | zones_size[ZONE_HIGHMEM] = npages; |
| 1353 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); | 1353 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); |
| 1354 | 1354 | ||
| 1355 | free_area_init_node(0, &contig_page_data, zones_size, | 1355 | free_area_init_node(0, zones_size, pfn_base, zholes_size); |
| 1356 | pfn_base, zholes_size); | ||
| 1357 | } | 1356 | } |
| 1358 | } | 1357 | } |
| 1359 | 1358 | ||
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 2375fe9dc312..d1782f6368be 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
| @@ -2123,8 +2123,7 @@ void __init sun4c_paging_init(void) | |||
| 2123 | zones_size[ZONE_HIGHMEM] = npages; | 2123 | zones_size[ZONE_HIGHMEM] = npages; |
| 2124 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); | 2124 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); |
| 2125 | 2125 | ||
| 2126 | free_area_init_node(0, &contig_page_data, zones_size, | 2126 | free_area_init_node(0, zones_size, pfn_base, zholes_size); |
| 2127 | pfn_base, zholes_size); | ||
| 2128 | } | 2127 | } |
| 2129 | 2128 | ||
| 2130 | cnt = 0; | 2129 | cnt = 0; |
diff --git a/arch/sparc64/kernel/iommu_common.h b/arch/sparc64/kernel/iommu_common.h index f3575a614fa2..53b19c8231a9 100644 --- a/arch/sparc64/kernel/iommu_common.h +++ b/arch/sparc64/kernel/iommu_common.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #define IO_PAGE_SHIFT 13 | 23 | #define IO_PAGE_SHIFT 13 |
| 24 | #define IO_PAGE_SIZE (1UL << IO_PAGE_SHIFT) | 24 | #define IO_PAGE_SIZE (1UL << IO_PAGE_SHIFT) |
| 25 | #define IO_PAGE_MASK (~(IO_PAGE_SIZE-1)) | 25 | #define IO_PAGE_MASK (~(IO_PAGE_SIZE-1)) |
| 26 | #define IO_PAGE_ALIGN(addr) (((addr)+IO_PAGE_SIZE-1)&IO_PAGE_MASK) | 26 | #define IO_PAGE_ALIGN(addr) ALIGN(addr, IO_PAGE_SIZE) |
| 27 | 27 | ||
| 28 | #define IO_TSB_ENTRIES (128*1024) | 28 | #define IO_TSB_ENTRIES (128*1024) |
| 29 | #define IO_TSB_SIZE (IO_TSB_ENTRIES * 8) | 29 | #define IO_TSB_SIZE (IO_TSB_ENTRIES * 8) |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index b441a26b73b0..c481673d249c 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
| @@ -621,8 +621,9 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) | |||
| 621 | unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | 621 | unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) |
| 622 | { | 622 | { |
| 623 | struct irq_handler_data *data; | 623 | struct irq_handler_data *data; |
| 624 | struct ino_bucket *bucket; | ||
| 625 | unsigned long hv_err, cookie; | 624 | unsigned long hv_err, cookie; |
| 625 | struct ino_bucket *bucket; | ||
| 626 | struct irq_desc *desc; | ||
| 626 | unsigned int virt_irq; | 627 | unsigned int virt_irq; |
| 627 | 628 | ||
| 628 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); | 629 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); |
| @@ -643,6 +644,13 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | |||
| 643 | if (unlikely(!data)) | 644 | if (unlikely(!data)) |
| 644 | return 0; | 645 | return 0; |
| 645 | 646 | ||
| 647 | /* In order to make the LDC channel startup sequence easier, | ||
| 648 | * especially wrt. locking, we do not let request_irq() enable | ||
| 649 | * the interrupt. | ||
| 650 | */ | ||
| 651 | desc = irq_desc + virt_irq; | ||
| 652 | desc->status |= IRQ_NOAUTOEN; | ||
| 653 | |||
| 646 | set_irq_chip_data(virt_irq, data); | 654 | set_irq_chip_data(virt_irq, data); |
| 647 | 655 | ||
| 648 | /* Catch accidental accesses to these things. IMAP/ICLR handling | 656 | /* Catch accidental accesses to these things. IMAP/ICLR handling |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index f43b5d755354..201a6e547e4a 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
| @@ -478,9 +478,9 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 478 | return 0; | 478 | return 0; |
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | /* Called with kretprobe_lock held. The value stored in the return | 481 | /* The value stored in the return address register is actually 2 |
| 482 | * address register is actually 2 instructions before where the | 482 | * instructions before where the callee will return to. |
| 483 | * callee will return to. Sequences usually look something like this | 483 | * Sequences usually look something like this |
| 484 | * | 484 | * |
| 485 | * call some_function <--- return register points here | 485 | * call some_function <--- return register points here |
| 486 | * nop <--- call delay slot | 486 | * nop <--- call delay slot |
| @@ -512,8 +512,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 512 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; | 512 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; |
| 513 | 513 | ||
| 514 | INIT_HLIST_HEAD(&empty_rp); | 514 | INIT_HLIST_HEAD(&empty_rp); |
| 515 | spin_lock_irqsave(&kretprobe_lock, flags); | 515 | kretprobe_hash_lock(current, &head, &flags); |
| 516 | head = kretprobe_inst_table_head(current); | ||
| 517 | 516 | ||
| 518 | /* | 517 | /* |
| 519 | * It is possible to have multiple instances associated with a given | 518 | * It is possible to have multiple instances associated with a given |
| @@ -553,7 +552,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 553 | regs->tnpc = orig_ret_address + 4; | 552 | regs->tnpc = orig_ret_address + 4; |
| 554 | 553 | ||
| 555 | reset_current_kprobe(); | 554 | reset_current_kprobe(); |
| 556 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 555 | kretprobe_hash_unlock(current, &flags); |
| 557 | preempt_enable_no_resched(); | 556 | preempt_enable_no_resched(); |
| 558 | 557 | ||
| 559 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 558 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c index 63969f610284..d68982330f66 100644 --- a/arch/sparc64/kernel/ldc.c +++ b/arch/sparc64/kernel/ldc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* ldc.c: Logical Domain Channel link-layer protocol driver. | 1 | /* ldc.c: Logical Domain Channel link-layer protocol driver. |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2007 David S. Miller <davem@davemloft.net> | 3 | * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
| @@ -23,8 +23,8 @@ | |||
| 23 | 23 | ||
| 24 | #define DRV_MODULE_NAME "ldc" | 24 | #define DRV_MODULE_NAME "ldc" |
| 25 | #define PFX DRV_MODULE_NAME ": " | 25 | #define PFX DRV_MODULE_NAME ": " |
| 26 | #define DRV_MODULE_VERSION "1.0" | 26 | #define DRV_MODULE_VERSION "1.1" |
| 27 | #define DRV_MODULE_RELDATE "June 25, 2007" | 27 | #define DRV_MODULE_RELDATE "July 22, 2008" |
| 28 | 28 | ||
| 29 | static char version[] __devinitdata = | 29 | static char version[] __devinitdata = |
| 30 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 30 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
| @@ -1235,13 +1235,9 @@ int ldc_bind(struct ldc_channel *lp, const char *name) | |||
| 1235 | unsigned long hv_err, flags; | 1235 | unsigned long hv_err, flags; |
| 1236 | int err = -EINVAL; | 1236 | int err = -EINVAL; |
| 1237 | 1237 | ||
| 1238 | spin_lock_irqsave(&lp->lock, flags); | 1238 | if (!name || |
| 1239 | 1239 | (lp->state != LDC_STATE_INIT)) | |
| 1240 | if (!name) | 1240 | return -EINVAL; |
| 1241 | goto out_err; | ||
| 1242 | |||
| 1243 | if (lp->state != LDC_STATE_INIT) | ||
| 1244 | goto out_err; | ||
| 1245 | 1241 | ||
| 1246 | snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); | 1242 | snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); |
| 1247 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); | 1243 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); |
| @@ -1250,25 +1246,32 @@ int ldc_bind(struct ldc_channel *lp, const char *name) | |||
| 1250 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 1246 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, |
| 1251 | lp->rx_irq_name, lp); | 1247 | lp->rx_irq_name, lp); |
| 1252 | if (err) | 1248 | if (err) |
| 1253 | goto out_err; | 1249 | return err; |
| 1254 | 1250 | ||
| 1255 | err = request_irq(lp->cfg.tx_irq, ldc_tx, | 1251 | err = request_irq(lp->cfg.tx_irq, ldc_tx, |
| 1256 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 1252 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, |
| 1257 | lp->tx_irq_name, lp); | 1253 | lp->tx_irq_name, lp); |
| 1258 | if (err) | 1254 | if (err) { |
| 1259 | goto out_free_rx_irq; | 1255 | free_irq(lp->cfg.rx_irq, lp); |
| 1256 | return err; | ||
| 1257 | } | ||
| 1258 | |||
| 1260 | 1259 | ||
| 1260 | spin_lock_irqsave(&lp->lock, flags); | ||
| 1261 | |||
| 1262 | enable_irq(lp->cfg.rx_irq); | ||
| 1263 | enable_irq(lp->cfg.tx_irq); | ||
| 1261 | 1264 | ||
| 1262 | lp->flags |= LDC_FLAG_REGISTERED_IRQS; | 1265 | lp->flags |= LDC_FLAG_REGISTERED_IRQS; |
| 1263 | 1266 | ||
| 1264 | err = -ENODEV; | 1267 | err = -ENODEV; |
| 1265 | hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0); | 1268 | hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0); |
| 1266 | if (hv_err) | 1269 | if (hv_err) |
| 1267 | goto out_free_tx_irq; | 1270 | goto out_free_irqs; |
| 1268 | 1271 | ||
| 1269 | hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries); | 1272 | hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries); |
| 1270 | if (hv_err) | 1273 | if (hv_err) |
| 1271 | goto out_free_tx_irq; | 1274 | goto out_free_irqs; |
| 1272 | 1275 | ||
| 1273 | hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0); | 1276 | hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0); |
| 1274 | if (hv_err) | 1277 | if (hv_err) |
| @@ -1304,14 +1307,11 @@ out_unmap_rx: | |||
| 1304 | out_unmap_tx: | 1307 | out_unmap_tx: |
| 1305 | sun4v_ldc_tx_qconf(lp->id, 0, 0); | 1308 | sun4v_ldc_tx_qconf(lp->id, 0, 0); |
| 1306 | 1309 | ||
| 1307 | out_free_tx_irq: | 1310 | out_free_irqs: |
| 1308 | lp->flags &= ~LDC_FLAG_REGISTERED_IRQS; | 1311 | lp->flags &= ~LDC_FLAG_REGISTERED_IRQS; |
| 1309 | free_irq(lp->cfg.tx_irq, lp); | 1312 | free_irq(lp->cfg.tx_irq, lp); |
| 1310 | |||
| 1311 | out_free_rx_irq: | ||
| 1312 | free_irq(lp->cfg.rx_irq, lp); | 1313 | free_irq(lp->cfg.rx_irq, lp); |
| 1313 | 1314 | ||
| 1314 | out_err: | ||
| 1315 | spin_unlock_irqrestore(&lp->lock, flags); | 1315 | spin_unlock_irqrestore(&lp->lock, flags); |
| 1316 | 1316 | ||
| 1317 | return err; | 1317 | return err; |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 31ea752d307b..8a9cd3e165b9 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
| @@ -96,7 +96,7 @@ void cpu_idle(void) | |||
| 96 | set_thread_flag(TIF_POLLING_NRFLAG); | 96 | set_thread_flag(TIF_POLLING_NRFLAG); |
| 97 | 97 | ||
| 98 | while(1) { | 98 | while(1) { |
| 99 | tick_nohz_stop_sched_tick(); | 99 | tick_nohz_stop_sched_tick(1); |
| 100 | 100 | ||
| 101 | while (!need_resched() && !cpu_is_offline(cpu)) | 101 | while (!need_resched() && !cpu_is_offline(cpu)) |
| 102 | sparc64_yield(cpu); | 102 | sparc64_yield(cpu); |
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index e1f4eba2e576..39749e32dc7e 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c | |||
| @@ -418,7 +418,7 @@ asmlinkage long sparc_pipe(struct pt_regs *regs) | |||
| 418 | int fd[2]; | 418 | int fd[2]; |
| 419 | int error; | 419 | int error; |
| 420 | 420 | ||
| 421 | error = do_pipe(fd); | 421 | error = do_pipe_flags(fd, 0); |
| 422 | if (error) | 422 | if (error) |
| 423 | goto out; | 423 | goto out; |
| 424 | regs->u_regs[UREG_I1] = fd[1]; | 424 | regs->u_regs[UREG_I1] = fd[1]; |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 8b5282d433c4..1095bf4c5100 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
| @@ -81,7 +81,8 @@ sys_call_table32: | |||
| 81 | /*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy | 81 | /*300*/ .word compat_sys_set_robust_list, compat_sys_get_robust_list, compat_sys_migrate_pages, compat_sys_mbind, compat_sys_get_mempolicy |
| 82 | .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait | 82 | .word compat_sys_set_mempolicy, compat_sys_kexec_load, compat_sys_move_pages, sys_getcpu, compat_sys_epoll_pwait |
| 83 | /*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate | 83 | /*310*/ .word compat_sys_utimensat, compat_sys_signalfd, sys_timerfd_create, sys_eventfd, compat_sys_fallocate |
| 84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime | 84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
| 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1 | ||
| 85 | 86 | ||
| 86 | #endif /* CONFIG_COMPAT */ | 87 | #endif /* CONFIG_COMPAT */ |
| 87 | 88 | ||
| @@ -154,4 +155,5 @@ sys_call_table: | |||
| 154 | /*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy | 155 | /*300*/ .word sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy |
| 155 | .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait | 156 | .word sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait |
| 156 | /*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 157 | /*310*/ .word sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
| 157 | .word sys_timerfd_settime, sys_timerfd_gettime | 158 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
| 159 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1 | ||
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index bedc4c159b1c..a0c6a97eec6e 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
| @@ -884,6 +884,16 @@ static struct notifier_block sparc64_cpufreq_notifier_block = { | |||
| 884 | .notifier_call = sparc64_cpufreq_notifier | 884 | .notifier_call = sparc64_cpufreq_notifier |
| 885 | }; | 885 | }; |
| 886 | 886 | ||
| 887 | static int __init register_sparc64_cpufreq_notifier(void) | ||
| 888 | { | ||
| 889 | |||
| 890 | cpufreq_register_notifier(&sparc64_cpufreq_notifier_block, | ||
| 891 | CPUFREQ_TRANSITION_NOTIFIER); | ||
| 892 | return 0; | ||
| 893 | } | ||
| 894 | |||
| 895 | core_initcall(register_sparc64_cpufreq_notifier); | ||
| 896 | |||
| 887 | #endif /* CONFIG_CPU_FREQ */ | 897 | #endif /* CONFIG_CPU_FREQ */ |
| 888 | 898 | ||
| 889 | static int sparc64_next_event(unsigned long delta, | 899 | static int sparc64_next_event(unsigned long delta, |
| @@ -1050,11 +1060,6 @@ void __init time_init(void) | |||
| 1050 | sparc64_clockevent.mult, sparc64_clockevent.shift); | 1060 | sparc64_clockevent.mult, sparc64_clockevent.shift); |
| 1051 | 1061 | ||
| 1052 | setup_sparc64_timer(); | 1062 | setup_sparc64_timer(); |
| 1053 | |||
| 1054 | #ifdef CONFIG_CPU_FREQ | ||
| 1055 | cpufreq_register_notifier(&sparc64_cpufreq_notifier_block, | ||
| 1056 | CPUFREQ_TRANSITION_NOTIFIER); | ||
| 1057 | #endif | ||
| 1058 | } | 1063 | } |
| 1059 | 1064 | ||
| 1060 | unsigned long long sched_clock(void) | 1065 | unsigned long long sched_clock(void) |
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index ebefd2a14375..f27d10369e0c 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c | |||
| @@ -175,7 +175,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
| 175 | return -ENOMEM; | 175 | return -ENOMEM; |
| 176 | 176 | ||
| 177 | if (flags & MAP_FIXED) { | 177 | if (flags & MAP_FIXED) { |
| 178 | if (prepare_hugepage_range(addr, len)) | 178 | if (prepare_hugepage_range(file, addr, len)) |
| 179 | return -EINVAL; | 179 | return -EINVAL; |
| 180 | return addr; | 180 | return addr; |
| 181 | } | 181 | } |
| @@ -195,7 +195,8 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
| 195 | pgoff, flags); | 195 | pgoff, flags); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 198 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
| 199 | unsigned long addr, unsigned long sz) | ||
| 199 | { | 200 | { |
| 200 | pgd_t *pgd; | 201 | pgd_t *pgd; |
| 201 | pud_t *pud; | 202 | pud_t *pud; |
| @@ -294,6 +295,11 @@ int pmd_huge(pmd_t pmd) | |||
| 294 | return 0; | 295 | return 0; |
| 295 | } | 296 | } |
| 296 | 297 | ||
| 298 | int pud_huge(pud_t pud) | ||
| 299 | { | ||
| 300 | return 0; | ||
| 301 | } | ||
| 302 | |||
| 297 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 303 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
| 298 | pmd_t *pmd, int write) | 304 | pmd_t *pmd, int write) |
| 299 | { | 305 | { |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 84898c44dd4d..4e821b3ecb03 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
| @@ -392,51 +392,6 @@ void __kprobes flush_icache_range(unsigned long start, unsigned long end) | |||
| 392 | } | 392 | } |
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | void show_mem(void) | ||
| 396 | { | ||
| 397 | unsigned long total = 0, reserved = 0; | ||
| 398 | unsigned long shared = 0, cached = 0; | ||
| 399 | pg_data_t *pgdat; | ||
| 400 | |||
| 401 | printk(KERN_INFO "Mem-info:\n"); | ||
| 402 | show_free_areas(); | ||
| 403 | printk(KERN_INFO "Free swap: %6ldkB\n", | ||
| 404 | nr_swap_pages << (PAGE_SHIFT-10)); | ||
| 405 | for_each_online_pgdat(pgdat) { | ||
| 406 | unsigned long i, flags; | ||
| 407 | |||
| 408 | pgdat_resize_lock(pgdat, &flags); | ||
| 409 | for (i = 0; i < pgdat->node_spanned_pages; i++) { | ||
| 410 | struct page *page = pgdat_page_nr(pgdat, i); | ||
| 411 | total++; | ||
| 412 | if (PageReserved(page)) | ||
| 413 | reserved++; | ||
| 414 | else if (PageSwapCache(page)) | ||
| 415 | cached++; | ||
| 416 | else if (page_count(page)) | ||
| 417 | shared += page_count(page) - 1; | ||
| 418 | } | ||
| 419 | pgdat_resize_unlock(pgdat, &flags); | ||
| 420 | } | ||
| 421 | |||
| 422 | printk(KERN_INFO "%lu pages of RAM\n", total); | ||
| 423 | printk(KERN_INFO "%lu reserved pages\n", reserved); | ||
| 424 | printk(KERN_INFO "%lu pages shared\n", shared); | ||
| 425 | printk(KERN_INFO "%lu pages swap cached\n", cached); | ||
| 426 | |||
| 427 | printk(KERN_INFO "%lu pages dirty\n", | ||
| 428 | global_page_state(NR_FILE_DIRTY)); | ||
| 429 | printk(KERN_INFO "%lu pages writeback\n", | ||
| 430 | global_page_state(NR_WRITEBACK)); | ||
| 431 | printk(KERN_INFO "%lu pages mapped\n", | ||
| 432 | global_page_state(NR_FILE_MAPPED)); | ||
| 433 | printk(KERN_INFO "%lu pages slab\n", | ||
| 434 | global_page_state(NR_SLAB_RECLAIMABLE) + | ||
| 435 | global_page_state(NR_SLAB_UNRECLAIMABLE)); | ||
| 436 | printk(KERN_INFO "%lu pages pagetables\n", | ||
| 437 | global_page_state(NR_PAGETABLE)); | ||
| 438 | } | ||
| 439 | |||
| 440 | void mmu_info(struct seq_file *m) | 395 | void mmu_info(struct seq_file *m) |
| 441 | { | 396 | { |
| 442 | if (tlb_type == cheetah) | 397 | if (tlb_type == cheetah) |
| @@ -788,7 +743,6 @@ int numa_cpu_lookup_table[NR_CPUS]; | |||
| 788 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; | 743 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; |
| 789 | 744 | ||
| 790 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 745 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
| 791 | static bootmem_data_t plat_node_bdata[MAX_NUMNODES]; | ||
| 792 | 746 | ||
| 793 | struct mdesc_mblock { | 747 | struct mdesc_mblock { |
| 794 | u64 base; | 748 | u64 base; |
| @@ -871,7 +825,7 @@ static void __init allocate_node_data(int nid) | |||
| 871 | NODE_DATA(nid) = __va(paddr); | 825 | NODE_DATA(nid) = __va(paddr); |
| 872 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | 826 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); |
| 873 | 827 | ||
| 874 | NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; | 828 | NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; |
| 875 | #endif | 829 | #endif |
| 876 | 830 | ||
| 877 | p = NODE_DATA(nid); | 831 | p = NODE_DATA(nid); |
diff --git a/arch/um/include/init.h b/arch/um/include/init.h index b00a95741d41..37dd097c16c0 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h | |||
| @@ -45,6 +45,8 @@ typedef void (*exitcall_t)(void); | |||
| 45 | # define __section(S) __attribute__ ((__section__(#S))) | 45 | # define __section(S) __attribute__ ((__section__(#S))) |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | #if __GNUC__ == 3 | ||
| 49 | |||
| 48 | #if __GNUC_MINOR__ >= 3 | 50 | #if __GNUC_MINOR__ >= 3 |
| 49 | # define __used __attribute__((__used__)) | 51 | # define __used __attribute__((__used__)) |
| 50 | #else | 52 | #else |
| @@ -52,6 +54,12 @@ typedef void (*exitcall_t)(void); | |||
| 52 | #endif | 54 | #endif |
| 53 | 55 | ||
| 54 | #else | 56 | #else |
| 57 | #if __GNUC__ == 4 | ||
| 58 | # define __used __attribute__((__used__)) | ||
| 59 | #endif | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #else | ||
| 55 | #include <linux/compiler.h> | 63 | #include <linux/compiler.h> |
| 56 | #endif | 64 | #endif |
| 57 | /* These are for everybody (although not all archs will actually | 65 | /* These are for everybody (although not all archs will actually |
diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h index 4f775597fd5f..fba3895274f9 100644 --- a/arch/um/include/irq_kern.h +++ b/arch/um/include/irq_kern.h | |||
| @@ -13,8 +13,6 @@ extern int um_request_irq(unsigned int irq, int fd, int type, | |||
| 13 | irq_handler_t handler, | 13 | irq_handler_t handler, |
| 14 | unsigned long irqflags, const char * devname, | 14 | unsigned long irqflags, const char * devname, |
| 15 | void *dev_id); | 15 | void *dev_id); |
| 16 | extern int init_aio_irq(int irq, char *name, | ||
| 17 | irq_handler_t handler); | ||
| 18 | 16 | ||
| 19 | #endif | 17 | #endif |
| 20 | 18 | ||
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h index e60b31873de1..c6c784df2673 100644 --- a/arch/um/include/irq_user.h +++ b/arch/um/include/irq_user.h | |||
| @@ -21,8 +21,6 @@ struct irq_fd { | |||
| 21 | enum { IRQ_READ, IRQ_WRITE }; | 21 | enum { IRQ_READ, IRQ_WRITE }; |
| 22 | 22 | ||
| 23 | extern void sigio_handler(int sig, struct uml_pt_regs *regs); | 23 | extern void sigio_handler(int sig, struct uml_pt_regs *regs); |
| 24 | extern int activate_fd(int irq, int fd, int type, void *dev_id); | ||
| 25 | extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id); | ||
| 26 | extern void free_irq_by_fd(int fd); | 24 | extern void free_irq_by_fd(int fd); |
| 27 | extern void reactivate_fd(int fd, int irqnum); | 25 | extern void reactivate_fd(int fd, int irqnum); |
| 28 | extern void deactivate_fd(int fd, int irqnum); | 26 | extern void deactivate_fd(int fd, int irqnum); |
diff --git a/arch/um/include/skas/skas.h b/arch/um/include/skas/skas.h index b073f8a86bd3..64d2c7443306 100644 --- a/arch/um/include/skas/skas.h +++ b/arch/um/include/skas/skas.h | |||
| @@ -16,7 +16,6 @@ extern int user_thread(unsigned long stack, int flags); | |||
| 16 | extern void new_thread_handler(void); | 16 | extern void new_thread_handler(void); |
| 17 | extern void handle_syscall(struct uml_pt_regs *regs); | 17 | extern void handle_syscall(struct uml_pt_regs *regs); |
| 18 | extern int new_mm(unsigned long stack); | 18 | extern int new_mm(unsigned long stack); |
| 19 | extern void get_skas_faultinfo(int pid, struct faultinfo * fi); | ||
| 20 | extern long execute_syscall_skas(void *r); | 19 | extern long execute_syscall_skas(void *r); |
| 21 | extern unsigned long current_stub_stack(void); | 20 | extern unsigned long current_stub_stack(void); |
| 22 | 21 | ||
diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h index 2b6fc8e0f071..45c04999d670 100644 --- a/arch/um/include/um_uaccess.h +++ b/arch/um/include/um_uaccess.h | |||
| @@ -34,7 +34,6 @@ extern int copy_to_user(void __user *to, const void *from, int n); | |||
| 34 | 34 | ||
| 35 | extern int __do_copy_to_user(void *to, const void *from, int n, | 35 | extern int __do_copy_to_user(void *to, const void *from, int n, |
| 36 | void **fault_addr, jmp_buf **fault_catcher); | 36 | void **fault_addr, jmp_buf **fault_catcher); |
| 37 | extern void __do_copy(void *to, const void *from, int n); | ||
| 38 | 37 | ||
| 39 | /* | 38 | /* |
| 40 | * strncpy_from_user: - Copy a NUL terminated string from userspace. | 39 | * strncpy_from_user: - Copy a NUL terminated string from userspace. |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 91587f8db340..3d7aad09b171 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
| @@ -102,7 +102,7 @@ void sigio_handler(int sig, struct uml_pt_regs *regs) | |||
| 102 | 102 | ||
| 103 | static DEFINE_SPINLOCK(irq_lock); | 103 | static DEFINE_SPINLOCK(irq_lock); |
| 104 | 104 | ||
| 105 | int activate_fd(int irq, int fd, int type, void *dev_id) | 105 | static int activate_fd(int irq, int fd, int type, void *dev_id) |
| 106 | { | 106 | { |
| 107 | struct pollfd *tmp_pfd; | 107 | struct pollfd *tmp_pfd; |
| 108 | struct irq_fd *new_fd, *irq_fd; | 108 | struct irq_fd *new_fd, *irq_fd; |
| @@ -216,7 +216,7 @@ static int same_irq_and_dev(struct irq_fd *irq, void *d) | |||
| 216 | return ((irq->irq == data->irq) && (irq->id == data->dev)); | 216 | return ((irq->irq == data->irq) && (irq->id == data->dev)); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | void free_irq_by_irq_and_dev(unsigned int irq, void *dev) | 219 | static void free_irq_by_irq_and_dev(unsigned int irq, void *dev) |
| 220 | { | 220 | { |
| 221 | struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq, | 221 | struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq, |
| 222 | .dev = dev }); | 222 | .dev = dev }); |
| @@ -403,37 +403,6 @@ void __init init_IRQ(void) | |||
| 403 | } | 403 | } |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | int init_aio_irq(int irq, char *name, irq_handler_t handler) | ||
| 407 | { | ||
| 408 | int fds[2], err; | ||
| 409 | |||
| 410 | err = os_pipe(fds, 1, 1); | ||
| 411 | if (err) { | ||
| 412 | printk(KERN_ERR "init_aio_irq - os_pipe failed, err = %d\n", | ||
| 413 | -err); | ||
| 414 | goto out; | ||
| 415 | } | ||
| 416 | |||
| 417 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, | ||
| 418 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name, | ||
| 419 | (void *) (long) fds[0]); | ||
| 420 | if (err) { | ||
| 421 | printk(KERN_ERR "init_aio_irq - : um_request_irq failed, " | ||
| 422 | "err = %d\n", | ||
| 423 | err); | ||
| 424 | goto out_close; | ||
| 425 | } | ||
| 426 | |||
| 427 | err = fds[1]; | ||
| 428 | goto out; | ||
| 429 | |||
| 430 | out_close: | ||
| 431 | os_close_file(fds[0]); | ||
| 432 | os_close_file(fds[1]); | ||
| 433 | out: | ||
| 434 | return err; | ||
| 435 | } | ||
| 436 | |||
| 437 | /* | 406 | /* |
| 438 | * IRQ stack entry and exit: | 407 | * IRQ stack entry and exit: |
| 439 | * | 408 | * |
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index ccc02a616c22..836fc9b94707 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
| @@ -18,7 +18,6 @@ EXPORT_SYMBOL(get_signals); | |||
| 18 | EXPORT_SYMBOL(kernel_thread); | 18 | EXPORT_SYMBOL(kernel_thread); |
| 19 | EXPORT_SYMBOL(sys_waitpid); | 19 | EXPORT_SYMBOL(sys_waitpid); |
| 20 | EXPORT_SYMBOL(flush_tlb_range); | 20 | EXPORT_SYMBOL(flush_tlb_range); |
| 21 | EXPORT_SYMBOL(arch_validate); | ||
| 22 | 21 | ||
| 23 | EXPORT_SYMBOL(high_physmem); | 22 | EXPORT_SYMBOL(high_physmem); |
| 24 | EXPORT_SYMBOL(empty_zero_page); | 23 | EXPORT_SYMBOL(empty_zero_page); |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index b0ee64622ff7..61d7e6138ff5 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ | 21 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ |
| 22 | unsigned long *empty_zero_page = NULL; | 22 | unsigned long *empty_zero_page = NULL; |
| 23 | /* allocated in paging_init and unchanged thereafter */ | 23 | /* allocated in paging_init and unchanged thereafter */ |
| 24 | unsigned long *empty_bad_page = NULL; | 24 | static unsigned long *empty_bad_page = NULL; |
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * Initialized during boot, and readonly for initializing page tables | 27 | * Initialized during boot, and readonly for initializing page tables |
| @@ -240,37 +240,6 @@ void __init paging_init(void) | |||
| 240 | #endif | 240 | #endif |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | struct page *arch_validate(struct page *page, gfp_t mask, int order) | ||
| 244 | { | ||
| 245 | unsigned long addr, zero = 0; | ||
| 246 | int i; | ||
| 247 | |||
| 248 | again: | ||
| 249 | if (page == NULL) | ||
| 250 | return page; | ||
| 251 | if (PageHighMem(page)) | ||
| 252 | return page; | ||
| 253 | |||
| 254 | addr = (unsigned long) page_address(page); | ||
| 255 | for (i = 0; i < (1 << order); i++) { | ||
| 256 | current->thread.fault_addr = (void *) addr; | ||
| 257 | if (__do_copy_to_user((void __user *) addr, &zero, | ||
| 258 | sizeof(zero), | ||
| 259 | ¤t->thread.fault_addr, | ||
| 260 | ¤t->thread.fault_catcher)) { | ||
| 261 | if (!(mask & __GFP_WAIT)) | ||
| 262 | return NULL; | ||
| 263 | else break; | ||
| 264 | } | ||
| 265 | addr += PAGE_SIZE; | ||
| 266 | } | ||
| 267 | |||
| 268 | if (i == (1 << order)) | ||
| 269 | return page; | ||
| 270 | page = alloc_pages(mask, order); | ||
| 271 | goto again; | ||
| 272 | } | ||
| 273 | |||
| 274 | /* | 243 | /* |
| 275 | * This can't do anything because nothing in the kernel image can be freed | 244 | * This can't do anything because nothing in the kernel image can be freed |
| 276 | * since it's not in kernel physical memory. | 245 | * since it's not in kernel physical memory. |
| @@ -295,37 +264,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
| 295 | } | 264 | } |
| 296 | #endif | 265 | #endif |
| 297 | 266 | ||
| 298 | void show_mem(void) | ||
| 299 | { | ||
| 300 | int pfn, total = 0, reserved = 0; | ||
| 301 | int shared = 0, cached = 0; | ||
| 302 | int high_mem = 0; | ||
| 303 | struct page *page; | ||
| 304 | |||
| 305 | printk(KERN_INFO "Mem-info:\n"); | ||
| 306 | show_free_areas(); | ||
| 307 | printk(KERN_INFO "Free swap: %6ldkB\n", | ||
| 308 | nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 309 | pfn = max_mapnr; | ||
| 310 | while (pfn-- > 0) { | ||
| 311 | page = pfn_to_page(pfn); | ||
| 312 | total++; | ||
| 313 | if (PageHighMem(page)) | ||
| 314 | high_mem++; | ||
| 315 | if (PageReserved(page)) | ||
| 316 | reserved++; | ||
| 317 | else if (PageSwapCache(page)) | ||
| 318 | cached++; | ||
| 319 | else if (page_count(page)) | ||
| 320 | shared += page_count(page) - 1; | ||
| 321 | } | ||
| 322 | printk(KERN_INFO "%d pages of RAM\n", total); | ||
| 323 | printk(KERN_INFO "%d pages of HIGHMEM\n", high_mem); | ||
| 324 | printk(KERN_INFO "%d reserved pages\n", reserved); | ||
| 325 | printk(KERN_INFO "%d pages shared\n", shared); | ||
| 326 | printk(KERN_INFO "%d pages swap cached\n", cached); | ||
| 327 | } | ||
| 328 | |||
| 329 | /* Allocate and free page tables. */ | 267 | /* Allocate and free page tables. */ |
| 330 | 268 | ||
| 331 | pgd_t *pgd_alloc(struct mm_struct *mm) | 269 | pgd_t *pgd_alloc(struct mm_struct *mm) |
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 9757085a0220..a1a9090254c2 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
| @@ -185,7 +185,7 @@ unsigned long find_iomem(char *driver, unsigned long *len_out) | |||
| 185 | return 0; | 185 | return 0; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | int setup_iomem(void) | 188 | static int setup_iomem(void) |
| 189 | { | 189 | { |
| 190 | struct iomem_region *region = iomem_regions; | 190 | struct iomem_region *region = iomem_regions; |
| 191 | unsigned long iomem_start = high_physmem + PAGE_SIZE; | 191 | unsigned long iomem_start = high_physmem + PAGE_SIZE; |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 83603cfbde81..a1c6d07cac3e 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
| @@ -243,7 +243,7 @@ void default_idle(void) | |||
| 243 | if (need_resched()) | 243 | if (need_resched()) |
| 244 | schedule(); | 244 | schedule(); |
| 245 | 245 | ||
| 246 | tick_nohz_stop_sched_tick(); | 246 | tick_nohz_stop_sched_tick(1); |
| 247 | nsecs = disable_timer(); | 247 | nsecs = disable_timer(); |
| 248 | idle_sleep(nsecs); | 248 | idle_sleep(nsecs); |
| 249 | tick_nohz_restart_sched_tick(); | 249 | tick_nohz_restart_sched_tick(); |
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 47b57b497d55..15e8b7c4de13 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
| @@ -225,7 +225,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
| 225 | return ret; | 225 | return ret; |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, | 228 | static void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, |
| 229 | int error_code) | 229 | int error_code) |
| 230 | { | 230 | { |
| 231 | struct siginfo info; | 231 | struct siginfo info; |
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index c3e2f369c33c..47f04f4a3464 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
| @@ -13,14 +13,6 @@ | |||
| 13 | #include "kern_util.h" | 13 | #include "kern_util.h" |
| 14 | #include "os.h" | 14 | #include "os.h" |
| 15 | 15 | ||
| 16 | /* | ||
| 17 | * Scheduler clock - returns current time in nanosec units. | ||
| 18 | */ | ||
| 19 | unsigned long long sched_clock(void) | ||
| 20 | { | ||
| 21 | return (unsigned long long)jiffies_64 * (NSEC_PER_SEC / HZ); | ||
| 22 | } | ||
| 23 | |||
| 24 | void timer_handler(int sig, struct uml_pt_regs *regs) | 16 | void timer_handler(int sig, struct uml_pt_regs *regs) |
| 25 | { | 17 | { |
| 26 | unsigned long flags; | 18 | unsigned long flags; |
diff --git a/arch/um/kernel/uaccess.c b/arch/um/kernel/uaccess.c index f0f4b040d7c5..dd33f040c526 100644 --- a/arch/um/kernel/uaccess.c +++ b/arch/um/kernel/uaccess.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
| 13 | #include "os.h" | 13 | #include "os.h" |
| 14 | 14 | ||
| 15 | void __do_copy(void *to, const void *from, int n) | 15 | static void __do_copy(void *to, const void *from, int n) |
| 16 | { | 16 | { |
| 17 | memcpy(to, from, n); | 17 | memcpy(to, from, n); |
| 18 | } | 18 | } |
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c index eb8f2e4be192..63d299df152b 100644 --- a/arch/um/os-Linux/sigio.c +++ b/arch/um/os-Linux/sigio.c | |||
| @@ -530,7 +530,7 @@ static void tty_close(int master, int slave) | |||
| 530 | printk(UM_KERN_CONT "No, enabling workaround\n"); | 530 | printk(UM_KERN_CONT "No, enabling workaround\n"); |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | void __init check_sigio(void) | 533 | static void __init check_sigio(void) |
| 534 | { | 534 | { |
| 535 | if ((access("/dev/ptmx", R_OK) < 0) && | 535 | if ((access("/dev/ptmx", R_OK) < 0) && |
| 536 | (access("/dev/ptyp0", R_OK) < 0)) { | 536 | (access("/dev/ptyp0", R_OK) < 0)) { |
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 5aade6027e40..6ae180703a63 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c | |||
| @@ -126,7 +126,7 @@ void set_sigstack(void *sig_stack, int size) | |||
| 126 | panic("enabling signal stack failed, errno = %d\n", errno); | 126 | panic("enabling signal stack failed, errno = %d\n", errno); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | void (*handlers[_NSIG])(int sig, struct sigcontext *sc); | 129 | static void (*handlers[_NSIG])(int sig, struct sigcontext *sc); |
| 130 | 130 | ||
| 131 | void handle_signal(int sig, struct sigcontext *sc) | 131 | void handle_signal(int sig, struct sigcontext *sc) |
| 132 | { | 132 | { |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 172ad8f72e12..d6e0a2234b86 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
| @@ -96,7 +96,7 @@ bad_wait: | |||
| 96 | 96 | ||
| 97 | extern unsigned long current_stub_stack(void); | 97 | extern unsigned long current_stub_stack(void); |
| 98 | 98 | ||
| 99 | void get_skas_faultinfo(int pid, struct faultinfo * fi) | 99 | static void get_skas_faultinfo(int pid, struct faultinfo *fi) |
| 100 | { | 100 | { |
| 101 | int err; | 101 | int err; |
| 102 | 102 | ||
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 106fa8641553..a27defb81884 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c | |||
| @@ -245,7 +245,7 @@ int __init set_umid(char *name) | |||
| 245 | /* Changed in make_umid, which is called during early boot */ | 245 | /* Changed in make_umid, which is called during early boot */ |
| 246 | static int umid_setup = 0; | 246 | static int umid_setup = 0; |
| 247 | 247 | ||
| 248 | int __init make_umid(void) | 248 | static int __init make_umid(void) |
| 249 | { | 249 | { |
| 250 | int fd, err; | 250 | int fd, err; |
| 251 | char tmp[256]; | 251 | char tmp[256]; |
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c index a74442d13762..2c6d0d731c12 100644 --- a/arch/um/sys-i386/bugs.c +++ b/arch/um/sys-i386/bugs.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include "sysdep/ptrace.h" | 12 | #include "sysdep/ptrace.h" |
| 13 | 13 | ||
| 14 | /* Set during early boot */ | 14 | /* Set during early boot */ |
| 15 | int host_has_cmov = 1; | 15 | static int host_has_cmov = 1; |
| 16 | static jmp_buf cmov_test_return; | 16 | static jmp_buf cmov_test_return; |
| 17 | 17 | ||
| 18 | static void cmov_sigill_test_handler(int sig) | 18 | static void cmov_sigill_test_handler(int sig) |
diff --git a/arch/um/sys-i386/checksum.S b/arch/um/sys-i386/checksum.S index 62c7e564f22e..f058d2f82e18 100644 --- a/arch/um/sys-i386/checksum.S +++ b/arch/um/sys-i386/checksum.S | |||
| @@ -243,13 +243,12 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, | |||
| 243 | .previous | 243 | .previous |
| 244 | 244 | ||
| 245 | .align 4 | 245 | .align 4 |
| 246 | .globl csum_partial_copy_generic_i386 | 246 | |
| 247 | |||
| 248 | #ifndef CONFIG_X86_USE_PPRO_CHECKSUM | 247 | #ifndef CONFIG_X86_USE_PPRO_CHECKSUM |
| 249 | 248 | ||
| 250 | #define ARGBASE 16 | 249 | #define ARGBASE 16 |
| 251 | #define FP 12 | 250 | #define FP 12 |
| 252 | 251 | ||
| 253 | csum_partial_copy_generic_i386: | 252 | csum_partial_copy_generic_i386: |
| 254 | subl $4,%esp | 253 | subl $4,%esp |
| 255 | pushl %edi | 254 | pushl %edi |
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index a34263e6b08d..a4846a84a7be 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c | |||
| @@ -14,8 +14,8 @@ | |||
| 14 | 14 | ||
| 15 | extern int modify_ldt(int func, void *ptr, unsigned long bytecount); | 15 | extern int modify_ldt(int func, void *ptr, unsigned long bytecount); |
| 16 | 16 | ||
| 17 | long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc, | 17 | static long write_ldt_entry(struct mm_id *mm_idp, int func, |
| 18 | void **addr, int done) | 18 | struct user_desc *desc, void **addr, int done) |
| 19 | { | 19 | { |
| 20 | long res; | 20 | long res; |
| 21 | 21 | ||
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig deleted file mode 100644 index 4379f43505ef..000000000000 --- a/arch/v850/Kconfig +++ /dev/null | |||
| @@ -1,353 +0,0 @@ | |||
| 1 | ############################################################################# | ||
| 2 | # | ||
| 3 | # For a description of the syntax of this configuration file, | ||
| 4 | # see Documentation/kbuild/kconfig-language.txt. | ||
| 5 | # | ||
| 6 | ############################################################################# | ||
| 7 | |||
| 8 | mainmenu "uClinux/v850 (w/o MMU) Kernel Configuration" | ||
| 9 | |||
| 10 | config MMU | ||
| 11 | bool | ||
| 12 | default n | ||
| 13 | config ZONE_DMA | ||
| 14 | bool | ||
| 15 | default y | ||
| 16 | config RWSEM_GENERIC_SPINLOCK | ||
| 17 | bool | ||
| 18 | default y | ||
| 19 | config RWSEM_XCHGADD_ALGORITHM | ||
| 20 | bool | ||
| 21 | default n | ||
| 22 | config GENERIC_FIND_NEXT_BIT | ||
| 23 | bool | ||
| 24 | default y | ||
| 25 | config GENERIC_HWEIGHT | ||
| 26 | bool | ||
| 27 | default y | ||
| 28 | config GENERIC_CALIBRATE_DELAY | ||
| 29 | bool | ||
| 30 | default y | ||
| 31 | |||
| 32 | config GENERIC_HARDIRQS | ||
| 33 | bool | ||
| 34 | default y | ||
| 35 | |||
| 36 | config GENERIC_IRQ_PROBE | ||
| 37 | bool | ||
| 38 | default y | ||
| 39 | |||
| 40 | config GENERIC_TIME | ||
| 41 | bool | ||
| 42 | default y | ||
| 43 | |||
| 44 | config TIME_LOW_RES | ||
| 45 | bool | ||
| 46 | default y | ||
| 47 | |||
| 48 | config ARCH_HAS_ILOG2_U32 | ||
| 49 | bool | ||
| 50 | default n | ||
| 51 | |||
| 52 | config ARCH_HAS_ILOG2_U64 | ||
| 53 | bool | ||
| 54 | default n | ||
| 55 | |||
| 56 | config ARCH_SUPPORTS_AOUT | ||
| 57 | def_bool y | ||
| 58 | |||
| 59 | # Turn off some random 386 crap that can affect device config | ||
| 60 | config ISA | ||
| 61 | bool | ||
| 62 | default n | ||
| 63 | config ISAPNP | ||
| 64 | bool | ||
| 65 | default n | ||
| 66 | config EISA | ||
| 67 | bool | ||
| 68 | default n | ||
| 69 | config MCA | ||
| 70 | bool | ||
| 71 | default n | ||
| 72 | |||
| 73 | |||
| 74 | ############################################################################# | ||
| 75 | #### v850-specific config | ||
| 76 | |||
| 77 | # Define the architecture | ||
| 78 | config V850 | ||
| 79 | bool | ||
| 80 | default y | ||
| 81 | select HAVE_IDE | ||
| 82 | |||
| 83 | menu "Processor type and features" | ||
| 84 | |||
| 85 | choice | ||
| 86 | prompt "Platform" | ||
| 87 | default GDB | ||
| 88 | config V850E_SIM | ||
| 89 | bool "GDB" | ||
| 90 | config RTE_CB_MA1 | ||
| 91 | bool "RTE-V850E/MA1-CB" | ||
| 92 | config RTE_CB_NB85E | ||
| 93 | bool "RTE-V850E/NB85E-CB" | ||
| 94 | config RTE_CB_ME2 | ||
| 95 | bool "RTE-V850E/ME2-CB" | ||
| 96 | config V850E_AS85EP1 | ||
| 97 | bool "AS85EP1" | ||
| 98 | config V850E2_SIM85E2C | ||
| 99 | bool "sim85e2c" | ||
| 100 | config V850E2_SIM85E2S | ||
| 101 | bool "sim85e2s" | ||
| 102 | config V850E2_FPGA85E2C | ||
| 103 | bool "NA85E2C-FPGA" | ||
| 104 | config V850E2_ANNA | ||
| 105 | bool "Anna" | ||
| 106 | endchoice | ||
| 107 | |||
| 108 | #### V850E processor-specific config | ||
| 109 | |||
| 110 | # All CPUs currently supported use the v850e architecture | ||
| 111 | config V850E | ||
| 112 | bool | ||
| 113 | default y | ||
| 114 | |||
| 115 | # The RTE-V850E/MA1-CB is the only type of V850E/MA1 platform we | ||
| 116 | # currently support | ||
| 117 | config V850E_MA1 | ||
| 118 | bool | ||
| 119 | depends on RTE_CB_MA1 | ||
| 120 | default y | ||
| 121 | # Similarly for the RTE-V850E/NB85E-CB - V850E/TEG | ||
| 122 | config V850E_TEG | ||
| 123 | bool | ||
| 124 | depends on RTE_CB_NB85E | ||
| 125 | default y | ||
| 126 | # ... and the RTE-V850E/ME2-CB - V850E/ME2 | ||
| 127 | config V850E_ME2 | ||
| 128 | bool | ||
| 129 | depends on RTE_CB_ME2 | ||
| 130 | default y | ||
| 131 | |||
| 132 | |||
| 133 | #### sim85e2-specific config | ||
| 134 | |||
| 135 | config V850E2_SIM85E2 | ||
| 136 | bool | ||
| 137 | depends on V850E2_SIM85E2C || V850E2_SIM85E2S | ||
| 138 | default y | ||
| 139 | |||
| 140 | |||
| 141 | #### V850E2 processor-specific config | ||
| 142 | |||
| 143 | # V850E2 processors | ||
| 144 | config V850E2 | ||
| 145 | bool | ||
| 146 | depends on V850E2_SIM85E2 || V850E2_FPGA85E2C || V850E2_ANNA | ||
| 147 | default y | ||
| 148 | |||
| 149 | |||
| 150 | #### RTE-CB platform-specific config | ||
| 151 | |||
| 152 | # Boards in the RTE-x-CB series | ||
| 153 | config RTE_CB | ||
| 154 | bool | ||
| 155 | depends on RTE_CB_MA1 || RTE_CB_NB85E || RTE_CB_ME2 | ||
| 156 | default y | ||
| 157 | |||
| 158 | config RTE_CB_MULTI | ||
| 159 | bool | ||
| 160 | # RTE_CB_NB85E can either have multi ROM support or not, but | ||
| 161 | # other platforms (currently only RTE_CB_MA1) require it. | ||
| 162 | prompt "Multi monitor ROM support" if RTE_CB_NB85E | ||
| 163 | depends on RTE_CB_MA1 || RTE_CB_NB85E | ||
| 164 | default y | ||
| 165 | |||
| 166 | config RTE_CB_MULTI_DBTRAP | ||
| 167 | bool "Pass illegal insn trap / dbtrap to kernel" | ||
| 168 | depends on RTE_CB_MULTI | ||
| 169 | default n | ||
| 170 | |||
| 171 | config RTE_CB_MA1_KSRAM | ||
| 172 | bool "Kernel in SRAM (limits size of kernel)" | ||
| 173 | depends on RTE_CB_MA1 && RTE_CB_MULTI | ||
| 174 | default n | ||
| 175 | |||
| 176 | config RTE_MB_A_PCI | ||
| 177 | bool "Mother-A PCI support" | ||
| 178 | depends on RTE_CB | ||
| 179 | default y | ||
| 180 | |||
| 181 | # The GBUS is used to talk to the RTE-MOTHER-A board | ||
| 182 | config RTE_GBUS_INT | ||
| 183 | bool | ||
| 184 | depends on RTE_MB_A_PCI | ||
| 185 | default y | ||
| 186 | |||
| 187 | # The only PCI bus we support is on the RTE-MOTHER-A board | ||
| 188 | config PCI | ||
| 189 | bool | ||
| 190 | default RTE_MB_A_PCI | ||
| 191 | |||
| 192 | #### Some feature-specific configs | ||
| 193 | |||
| 194 | # Everything except for the GDB simulator uses the same interrupt controller | ||
| 195 | config V850E_INTC | ||
| 196 | bool | ||
| 197 | default !V850E_SIM | ||
| 198 | |||
| 199 | # Everything except for the various simulators uses the "Timer D" unit | ||
| 200 | config V850E_TIMER_D | ||
| 201 | bool | ||
| 202 | default !V850E_SIM && !V850E2_SIM85E2 | ||
| 203 | |||
| 204 | # Cache control used on some v850e1 processors | ||
| 205 | config V850E_CACHE | ||
| 206 | bool | ||
| 207 | default V850E_TEG || V850E_ME2 | ||
| 208 | |||
| 209 | # Cache control used on v850e2 processors; I think this should | ||
| 210 | # actually apply to more, but currently only the SIM85E2S uses it | ||
| 211 | config V850E2_CACHE | ||
| 212 | bool | ||
| 213 | default V850E2_SIM85E2S | ||
| 214 | |||
| 215 | config NO_CACHE | ||
| 216 | bool | ||
| 217 | default !V850E_CACHE && !V850E2_CACHE | ||
| 218 | |||
| 219 | # HZ depends on the platform | ||
| 220 | config HZ | ||
| 221 | int | ||
| 222 | default 24 if V850E_SIM || V850E2_SIM85E2 | ||
| 223 | default 122 if V850E2_FPGA85E2C | ||
| 224 | default 100 | ||
| 225 | |||
| 226 | #### Misc config | ||
| 227 | |||
| 228 | config ROM_KERNEL | ||
| 229 | bool "Kernel in ROM" | ||
| 230 | depends on V850E2_ANNA || V850E_AS85EP1 || RTE_CB_ME2 | ||
| 231 | |||
| 232 | # Some platforms pre-zero memory, in which case the kernel doesn't need to | ||
| 233 | config ZERO_BSS | ||
| 234 | bool | ||
| 235 | depends on !V850E2_SIM85E2C | ||
| 236 | default y | ||
| 237 | |||
| 238 | # The crappy-ass zone allocator requires that the start of allocatable | ||
| 239 | # memory be aligned to the largest possible allocation. | ||
| 240 | config FORCE_MAX_ZONEORDER | ||
| 241 | int | ||
| 242 | default 8 if V850E2_SIM85E2C || V850E2_FPGA85E2C | ||
| 243 | |||
| 244 | config V850E_HIGHRES_TIMER | ||
| 245 | bool "High resolution timer support" | ||
| 246 | depends on V850E_TIMER_D | ||
| 247 | config TIME_BOOTUP | ||
| 248 | bool "Time bootup" | ||
| 249 | depends on V850E_HIGHRES_TIMER | ||
| 250 | |||
| 251 | config RESET_GUARD | ||
| 252 | bool "Reset Guard" | ||
| 253 | |||
| 254 | source "mm/Kconfig" | ||
| 255 | |||
| 256 | endmenu | ||
| 257 | |||
| 258 | |||
| 259 | ############################################################################# | ||
| 260 | |||
| 261 | source init/Kconfig | ||
| 262 | |||
| 263 | ############################################################################# | ||
| 264 | |||
| 265 | menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)" | ||
| 266 | |||
| 267 | # config PCI | ||
| 268 | # bool "PCI support" | ||
| 269 | # help | ||
| 270 | # Support for PCI bus. | ||
| 271 | |||
| 272 | source "drivers/pci/Kconfig" | ||
| 273 | |||
| 274 | source "drivers/pcmcia/Kconfig" | ||
| 275 | |||
| 276 | source "drivers/pci/hotplug/Kconfig" | ||
| 277 | |||
| 278 | endmenu | ||
| 279 | |||
| 280 | menu "Executable file formats" | ||
| 281 | |||
| 282 | source "fs/Kconfig.binfmt" | ||
| 283 | |||
| 284 | endmenu | ||
| 285 | |||
| 286 | source "net/Kconfig" | ||
| 287 | |||
| 288 | ############################################################################# | ||
| 289 | |||
| 290 | source "drivers/base/Kconfig" | ||
| 291 | |||
| 292 | source drivers/mtd/Kconfig | ||
| 293 | |||
| 294 | source drivers/parport/Kconfig | ||
| 295 | |||
| 296 | #source drivers/pnp/Kconfig | ||
| 297 | |||
| 298 | source drivers/block/Kconfig | ||
| 299 | |||
| 300 | ############################################################################# | ||
| 301 | |||
| 302 | menu "Disk device support" | ||
| 303 | |||
| 304 | source "drivers/ide/Kconfig" | ||
| 305 | |||
| 306 | source "drivers/scsi/Kconfig" | ||
| 307 | |||
| 308 | endmenu | ||
| 309 | |||
| 310 | ############################################################################# | ||
| 311 | |||
| 312 | |||
| 313 | source "drivers/md/Kconfig" | ||
| 314 | |||
| 315 | source "drivers/message/fusion/Kconfig" | ||
| 316 | |||
| 317 | source "drivers/ieee1394/Kconfig" | ||
| 318 | |||
| 319 | source "drivers/message/i2o/Kconfig" | ||
| 320 | |||
| 321 | source "drivers/net/Kconfig" | ||
| 322 | |||
| 323 | source "drivers/isdn/Kconfig" | ||
| 324 | |||
| 325 | #source "drivers/telephony/Kconfig" | ||
| 326 | |||
| 327 | # | ||
| 328 | # input before char - char/joystick depends on it. As does USB. | ||
| 329 | # | ||
| 330 | source "drivers/input/Kconfig" | ||
| 331 | |||
| 332 | source "drivers/char/Kconfig" | ||
| 333 | |||
| 334 | #source drivers/misc/Config.in | ||
| 335 | source "drivers/media/Kconfig" | ||
| 336 | |||
| 337 | source "fs/Kconfig" | ||
| 338 | |||
| 339 | source "drivers/video/Kconfig" | ||
| 340 | |||
| 341 | source "sound/Kconfig" | ||
| 342 | |||
| 343 | source "drivers/usb/Kconfig" | ||
| 344 | |||
| 345 | source "arch/v850/Kconfig.debug" | ||
| 346 | |||
| 347 | source "security/Kconfig" | ||
| 348 | |||
| 349 | source "crypto/Kconfig" | ||
| 350 | |||
| 351 | source "lib/Kconfig" | ||
| 352 | |||
| 353 | ############################################################################# | ||
diff --git a/arch/v850/Kconfig.debug b/arch/v850/Kconfig.debug deleted file mode 100644 index 4acfb9cca1ca..000000000000 --- a/arch/v850/Kconfig.debug +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | menu "Kernel hacking" | ||
| 2 | |||
| 3 | source "lib/Kconfig.debug" | ||
| 4 | |||
| 5 | config NO_KERNEL_MSG | ||
| 6 | bool "Suppress Kernel BUG Messages" | ||
| 7 | help | ||
| 8 | Do not output any debug BUG messages within the kernel. | ||
| 9 | |||
| 10 | endmenu | ||
diff --git a/arch/v850/Makefile b/arch/v850/Makefile deleted file mode 100644 index 8b629df0029a..000000000000 --- a/arch/v850/Makefile +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | # | ||
| 2 | # arch/v850/Makefile | ||
| 3 | # | ||
| 4 | # Copyright (C) 2001,02,03,05 NEC Corporation | ||
| 5 | # Copyright (C) 2001,02,03,05 Miles Bader <miles@gnu.org> | ||
| 6 | # | ||
| 7 | # This file is included by the global makefile so that you can add your own | ||
| 8 | # architecture-specific flags and dependencies. Remember to do have actions | ||
| 9 | # for "archclean" and "archdep" for cleaning up and making dependencies for | ||
| 10 | # this architecture | ||
| 11 | # | ||
| 12 | # This file is subject to the terms and conditions of the GNU General Public | ||
| 13 | # License. See the file "COPYING" in the main directory of this archive | ||
| 14 | # for more details. | ||
| 15 | # | ||
| 16 | |||
| 17 | arch_dir = arch/v850 | ||
| 18 | |||
| 19 | KBUILD_CFLAGS += -mv850e | ||
| 20 | # r16 is a fixed pointer to the current task | ||
| 21 | KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function | ||
| 22 | KBUILD_CFLAGS += -fno-builtin | ||
| 23 | KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" | ||
| 24 | |||
| 25 | # By default, build a kernel that runs on the gdb v850 simulator. | ||
| 26 | KBUILD_DEFCONFIG := sim_defconfig | ||
| 27 | |||
| 28 | # This prevents the linker from consolidating the .gnu.linkonce.this_module | ||
| 29 | # section into .text (which the v850 default linker script for -r does for | ||
| 30 | # some reason) | ||
| 31 | LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module | ||
| 32 | |||
| 33 | OBJCOPY_FLAGS_BLOB := -I binary -O elf32-little -B v850e | ||
| 34 | |||
| 35 | |||
| 36 | head-y := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o | ||
| 37 | core-y += $(arch_dir)/kernel/ | ||
| 38 | libs-y += $(arch_dir)/lib/ | ||
| 39 | |||
| 40 | |||
| 41 | # Deal with the initial contents of the root device | ||
| 42 | ifdef ROOT_FS_IMAGE | ||
| 43 | core-y += root_fs_image.o | ||
| 44 | |||
| 45 | # Because the kernel build-system erases all explicit .o build rules, we | ||
| 46 | # have to use an intermediate target to fool it into building for us. | ||
| 47 | # This results in it being built anew each time, but that's alright. | ||
| 48 | root_fs_image.o: root_fs_image_force | ||
| 49 | |||
| 50 | root_fs_image_force: $(ROOT_FS_IMAGE) | ||
| 51 | $(OBJCOPY) $(OBJCOPY_FLAGS_BLOB) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o | ||
| 52 | endif | ||
| 53 | |||
| 54 | CLEAN_FILES += root_fs_image.o | ||
diff --git a/arch/v850/README b/arch/v850/README deleted file mode 100644 index 12f7f7a665e0..000000000000 --- a/arch/v850/README +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | This port to the NEC V850E processor supports the following platforms: | ||
| 2 | |||
| 3 | "sim" | ||
| 4 | The gdb v850e simulator (CONFIG_V850E_SIM). | ||
| 5 | |||
| 6 | "rte-ma1-cb" | ||
| 7 | The Midas labs RTE-V850E/MA1-CB and RTE-V850E/NB85E-CB evaluation | ||
| 8 | boards (CONFIG_RTE_CB_MA1 and CONFIG_RTE_CB_NB85E). This support | ||
| 9 | has only been tested when running with the Multi-debugger monitor | ||
| 10 | ROM (for the Green Hills Multi debugger). The optional NEC | ||
| 11 | Solution Gear RTE-MOTHER-A motherboard is also supported, which | ||
| 12 | allows PCI boards to be used (CONFIG_RTE_MB_A_PCI). | ||
| 13 | |||
| 14 | "rte-me2-cb" | ||
| 15 | The Midas labs RTE-V850E/ME2-CB evaluation board (CONFIG_RTE_CB_ME2). | ||
| 16 | This has only been tested using a kernel downloaded via an ICE | ||
| 17 | connection using the Multi debugger. Support for the RTE-MOTHER-A is | ||
| 18 | present, but hasn't been tested (unlike the other Midas labs cpu | ||
| 19 | boards, the RTE-V850E/ME2-CB includes an ethernet adaptor). | ||
| 20 | |||
| 21 | "as85ep1" | ||
| 22 | The NEC AS85EP1 V850E evaluation chip/board (CONFIG_V850E_AS85EP1). | ||
| 23 | |||
| 24 | "anna" | ||
| 25 | The NEC `Anna' (board/chip) implementation of the V850E2 processor | ||
| 26 | (CONFIG_V850E2_ANNA). | ||
| 27 | |||
| 28 | "sim85e2c", "sim85e2s" | ||
| 29 | The sim85e2c and sim85e2s simulators, which are verilog simulations | ||
| 30 | of the V850E2 NA85E2C/NA85E2S cpu cores (CONFIG_V850E2_SIM85E2C and | ||
| 31 | CONFIG_V850E2_SIM85E2S). | ||
| 32 | |||
| 33 | "fpga85e2c" | ||
| 34 | A FPGA implementation of the V850E2 NA85E2C cpu core | ||
| 35 | (CONFIG_V850E2_FPGA85E2C). | ||
| 36 | |||
| 37 | To get a default kernel configuration for a particular platform, you can | ||
| 38 | use a <platform>_defconfig make target (e.g., "make rte-me2-cb_defconfig"); | ||
| 39 | to see which default configurations are possible, look in the directory | ||
| 40 | "arch/v850/configs". | ||
| 41 | |||
| 42 | Porting to anything with a V850E/MA1 or MA2 processor should be simple. | ||
| 43 | See the file <asm-v850/machdep.h> and the files it includes for an example of | ||
| 44 | how to add platform/chip-specific support. | ||
diff --git a/arch/v850/configs/rte-ma1-cb_defconfig b/arch/v850/configs/rte-ma1-cb_defconfig deleted file mode 100644 index 1a5beda36e29..000000000000 --- a/arch/v850/configs/rte-ma1-cb_defconfig +++ /dev/null | |||
| @@ -1,617 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.13-uc0 | ||
| 4 | # Fri Sep 2 13:54:27 2005 | ||
| 5 | # | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_UID16 is not set | ||
| 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 9 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 11 | # CONFIG_ISA is not set | ||
| 12 | # CONFIG_ISAPNP is not set | ||
| 13 | # CONFIG_EISA is not set | ||
| 14 | # CONFIG_MCA is not set | ||
| 15 | CONFIG_V850=y | ||
| 16 | |||
| 17 | # | ||
| 18 | # Processor type and features | ||
| 19 | # | ||
| 20 | # CONFIG_V850E_SIM is not set | ||
| 21 | CONFIG_RTE_CB_MA1=y | ||
| 22 | # CONFIG_RTE_CB_NB85E is not set | ||
| 23 | # CONFIG_RTE_CB_ME2 is not set | ||
| 24 | # CONFIG_V850E_AS85EP1 is not set | ||
| 25 | # CONFIG_V850E2_SIM85E2C is not set | ||
| 26 | # CONFIG_V850E2_SIM85E2S is not set | ||
| 27 | # CONFIG_V850E2_FPGA85E2C is not set | ||
| 28 | # CONFIG_V850E2_ANNA is not set | ||
| 29 | CONFIG_V850E=y | ||
| 30 | CONFIG_V850E_MA1=y | ||
| 31 | CONFIG_RTE_CB=y | ||
| 32 | CONFIG_RTE_CB_MULTI=y | ||
| 33 | CONFIG_RTE_CB_MULTI_DBTRAP=y | ||
| 34 | # CONFIG_RTE_CB_MA1_KSRAM is not set | ||
| 35 | CONFIG_RTE_MB_A_PCI=y | ||
| 36 | CONFIG_RTE_GBUS_INT=y | ||
| 37 | CONFIG_PCI=y | ||
| 38 | CONFIG_V850E_INTC=y | ||
| 39 | CONFIG_V850E_TIMER_D=y | ||
| 40 | # CONFIG_V850E_CACHE is not set | ||
| 41 | # CONFIG_V850E2_CACHE is not set | ||
| 42 | CONFIG_NO_CACHE=y | ||
| 43 | CONFIG_ZERO_BSS=y | ||
| 44 | # CONFIG_V850E_HIGHRES_TIMER is not set | ||
| 45 | # CONFIG_RESET_GUARD is not set | ||
| 46 | CONFIG_LARGE_ALLOCS=y | ||
| 47 | CONFIG_FLATMEM=y | ||
| 48 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 49 | |||
| 50 | # | ||
| 51 | # Code maturity level options | ||
| 52 | # | ||
| 53 | # CONFIG_EXPERIMENTAL is not set | ||
| 54 | CONFIG_CLEAN_COMPILE=y | ||
| 55 | CONFIG_BROKEN_ON_SMP=y | ||
| 56 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 57 | |||
| 58 | # | ||
| 59 | # General setup | ||
| 60 | # | ||
| 61 | CONFIG_LOCALVERSION="" | ||
| 62 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 63 | # CONFIG_SYSCTL is not set | ||
| 64 | # CONFIG_AUDIT is not set | ||
| 65 | # CONFIG_HOTPLUG is not set | ||
| 66 | CONFIG_KOBJECT_UEVENT=y | ||
| 67 | # CONFIG_IKCONFIG is not set | ||
| 68 | CONFIG_EMBEDDED=y | ||
| 69 | # CONFIG_KALLSYMS is not set | ||
| 70 | CONFIG_PRINTK=y | ||
| 71 | CONFIG_BUG=y | ||
| 72 | # CONFIG_BASE_FULL is not set | ||
| 73 | # CONFIG_FUTEX is not set | ||
| 74 | # CONFIG_EPOLL is not set | ||
| 75 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 76 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
| 77 | CONFIG_CC_ALIGN_LABELS=0 | ||
| 78 | CONFIG_CC_ALIGN_LOOPS=0 | ||
| 79 | CONFIG_CC_ALIGN_JUMPS=0 | ||
| 80 | CONFIG_BASE_SMALL=1 | ||
| 81 | |||
| 82 | # | ||
| 83 | # Loadable module support | ||
| 84 | # | ||
| 85 | CONFIG_MODULES=y | ||
| 86 | CONFIG_MODULE_UNLOAD=y | ||
| 87 | CONFIG_OBSOLETE_MODPARM=y | ||
| 88 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 89 | CONFIG_KMOD=y | ||
| 90 | |||
| 91 | # | ||
| 92 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 93 | # | ||
| 94 | # CONFIG_PCI_LEGACY_PROC is not set | ||
| 95 | # CONFIG_PCI_NAMES is not set | ||
| 96 | # CONFIG_PCI_DEBUG is not set | ||
| 97 | |||
| 98 | # | ||
| 99 | # PCCARD (PCMCIA/CardBus) support | ||
| 100 | # | ||
| 101 | # CONFIG_PCCARD is not set | ||
| 102 | |||
| 103 | # | ||
| 104 | # PCI Hotplug Support | ||
| 105 | # | ||
| 106 | |||
| 107 | # | ||
| 108 | # Executable file formats | ||
| 109 | # | ||
| 110 | CONFIG_BINFMT_FLAT=y | ||
| 111 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 112 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 113 | # CONFIG_BINFMT_MISC is not set | ||
| 114 | |||
| 115 | # | ||
| 116 | # Networking | ||
| 117 | # | ||
| 118 | CONFIG_NET=y | ||
| 119 | |||
| 120 | # | ||
| 121 | # Networking options | ||
| 122 | # | ||
| 123 | # CONFIG_PACKET is not set | ||
| 124 | # CONFIG_UNIX is not set | ||
| 125 | # CONFIG_NET_KEY is not set | ||
| 126 | CONFIG_INET=y | ||
| 127 | # CONFIG_IP_MULTICAST is not set | ||
| 128 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 129 | CONFIG_IP_FIB_HASH=y | ||
| 130 | # CONFIG_IP_PNP is not set | ||
| 131 | # CONFIG_NET_IPIP is not set | ||
| 132 | # CONFIG_NET_IPGRE is not set | ||
| 133 | # CONFIG_SYN_COOKIES is not set | ||
| 134 | # CONFIG_INET_AH is not set | ||
| 135 | # CONFIG_INET_ESP is not set | ||
| 136 | # CONFIG_INET_IPCOMP is not set | ||
| 137 | # CONFIG_INET_TUNNEL is not set | ||
| 138 | # CONFIG_IP_TCPDIAG is not set | ||
| 139 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
| 140 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 141 | CONFIG_TCP_CONG_BIC=y | ||
| 142 | # CONFIG_IPV6 is not set | ||
| 143 | # CONFIG_NETFILTER is not set | ||
| 144 | # CONFIG_BRIDGE is not set | ||
| 145 | # CONFIG_VLAN_8021Q is not set | ||
| 146 | # CONFIG_DECNET is not set | ||
| 147 | # CONFIG_LLC2 is not set | ||
| 148 | # CONFIG_IPX is not set | ||
| 149 | # CONFIG_ATALK is not set | ||
| 150 | # CONFIG_NET_SCHED is not set | ||
| 151 | # CONFIG_NET_CLS_ROUTE is not set | ||
| 152 | |||
| 153 | # | ||
| 154 | # Network testing | ||
| 155 | # | ||
| 156 | # CONFIG_NET_PKTGEN is not set | ||
| 157 | # CONFIG_HAMRADIO is not set | ||
| 158 | # CONFIG_IRDA is not set | ||
| 159 | # CONFIG_BT is not set | ||
| 160 | |||
| 161 | # | ||
| 162 | # Generic Driver Options | ||
| 163 | # | ||
| 164 | CONFIG_STANDALONE=y | ||
| 165 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 166 | # CONFIG_FW_LOADER is not set | ||
| 167 | # CONFIG_DEBUG_DRIVER is not set | ||
| 168 | |||
| 169 | # | ||
| 170 | # Memory Technology Devices (MTD) | ||
| 171 | # | ||
| 172 | CONFIG_MTD=y | ||
| 173 | # CONFIG_MTD_DEBUG is not set | ||
| 174 | # CONFIG_MTD_CONCAT is not set | ||
| 175 | # CONFIG_MTD_PARTITIONS is not set | ||
| 176 | |||
| 177 | # | ||
| 178 | # User Modules And Translation Layers | ||
| 179 | # | ||
| 180 | # CONFIG_MTD_CHAR is not set | ||
| 181 | CONFIG_MTD_BLOCK=y | ||
| 182 | # CONFIG_FTL is not set | ||
| 183 | # CONFIG_NFTL is not set | ||
| 184 | # CONFIG_INFTL is not set | ||
| 185 | |||
| 186 | # | ||
| 187 | # RAM/ROM/Flash chip drivers | ||
| 188 | # | ||
| 189 | # CONFIG_MTD_CFI is not set | ||
| 190 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 191 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 192 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 193 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 194 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 195 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 196 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 197 | CONFIG_MTD_CFI_I1=y | ||
| 198 | CONFIG_MTD_CFI_I2=y | ||
| 199 | # CONFIG_MTD_CFI_I4 is not set | ||
| 200 | # CONFIG_MTD_CFI_I8 is not set | ||
| 201 | # CONFIG_MTD_RAM is not set | ||
| 202 | # CONFIG_MTD_ROM is not set | ||
| 203 | # CONFIG_MTD_ABSENT is not set | ||
| 204 | |||
| 205 | # | ||
| 206 | # Mapping drivers for chip access | ||
| 207 | # | ||
| 208 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 209 | # CONFIG_MTD_PLATRAM is not set | ||
| 210 | |||
| 211 | # | ||
| 212 | # Self-contained MTD device drivers | ||
| 213 | # | ||
| 214 | # CONFIG_MTD_PMC551 is not set | ||
| 215 | CONFIG_MTD_SLRAM=y | ||
| 216 | # CONFIG_MTD_PHRAM is not set | ||
| 217 | # CONFIG_MTD_MTDRAM is not set | ||
| 218 | # CONFIG_MTD_BLKMTD is not set | ||
| 219 | |||
| 220 | # | ||
| 221 | # Disk-On-Chip Device Drivers | ||
| 222 | # | ||
| 223 | # CONFIG_MTD_DOC2000 is not set | ||
| 224 | # CONFIG_MTD_DOC2001 is not set | ||
| 225 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 226 | |||
| 227 | # | ||
| 228 | # NAND Flash Device Drivers | ||
| 229 | # | ||
| 230 | # CONFIG_MTD_NAND is not set | ||
| 231 | |||
| 232 | # | ||
| 233 | # Parallel port support | ||
| 234 | # | ||
| 235 | # CONFIG_PARPORT is not set | ||
| 236 | |||
| 237 | # | ||
| 238 | # Block devices | ||
| 239 | # | ||
| 240 | # CONFIG_BLK_DEV_FD is not set | ||
| 241 | # CONFIG_BLK_CPQ_DA is not set | ||
| 242 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
| 243 | # CONFIG_BLK_DEV_DAC960 is not set | ||
| 244 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 245 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 246 | # CONFIG_BLK_DEV_NBD is not set | ||
| 247 | # CONFIG_BLK_DEV_SX8 is not set | ||
| 248 | # CONFIG_BLK_DEV_RAM is not set | ||
| 249 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 250 | CONFIG_INITRAMFS_SOURCE="" | ||
| 251 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 252 | |||
| 253 | # | ||
| 254 | # IO Schedulers | ||
| 255 | # | ||
| 256 | CONFIG_IOSCHED_NOOP=y | ||
| 257 | # CONFIG_IOSCHED_AS is not set | ||
| 258 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 259 | # CONFIG_IOSCHED_CFQ is not set | ||
| 260 | # CONFIG_ATA_OVER_ETH is not set | ||
| 261 | |||
| 262 | # | ||
| 263 | # Disk device support | ||
| 264 | # | ||
| 265 | |||
| 266 | # | ||
| 267 | # ATA/ATAPI/MFM/RLL support | ||
| 268 | # | ||
| 269 | # CONFIG_IDE is not set | ||
| 270 | |||
| 271 | # | ||
| 272 | # SCSI device support | ||
| 273 | # | ||
| 274 | # CONFIG_SCSI is not set | ||
| 275 | |||
| 276 | # | ||
| 277 | # Multi-device support (RAID and LVM) | ||
| 278 | # | ||
| 279 | # CONFIG_MD is not set | ||
| 280 | |||
| 281 | # | ||
| 282 | # Fusion MPT device support | ||
| 283 | # | ||
| 284 | # CONFIG_FUSION is not set | ||
| 285 | |||
| 286 | # | ||
| 287 | # IEEE 1394 (FireWire) support | ||
| 288 | # | ||
| 289 | # CONFIG_IEEE1394 is not set | ||
| 290 | |||
| 291 | # | ||
| 292 | # I2O device support | ||
| 293 | # | ||
| 294 | # CONFIG_I2O is not set | ||
| 295 | |||
| 296 | # | ||
| 297 | # Network device support | ||
| 298 | # | ||
| 299 | CONFIG_NETDEVICES=y | ||
| 300 | # CONFIG_DUMMY is not set | ||
| 301 | # CONFIG_BONDING is not set | ||
| 302 | # CONFIG_EQUALIZER is not set | ||
| 303 | # CONFIG_TUN is not set | ||
| 304 | |||
| 305 | # | ||
| 306 | # ARCnet devices | ||
| 307 | # | ||
| 308 | # CONFIG_ARCNET is not set | ||
| 309 | |||
| 310 | # | ||
| 311 | # Ethernet (10 or 100Mbit) | ||
| 312 | # | ||
| 313 | CONFIG_NET_ETHERNET=y | ||
| 314 | CONFIG_MII=y | ||
| 315 | # CONFIG_HAPPYMEAL is not set | ||
| 316 | # CONFIG_SUNGEM is not set | ||
| 317 | # CONFIG_NET_VENDOR_3COM is not set | ||
| 318 | # CONFIG_NET_VENDOR_SMC is not set | ||
| 319 | |||
| 320 | # | ||
| 321 | # Tulip family network device support | ||
| 322 | # | ||
| 323 | # CONFIG_NET_TULIP is not set | ||
| 324 | # CONFIG_HP100 is not set | ||
| 325 | # CONFIG_NE2000 is not set | ||
| 326 | CONFIG_NET_PCI=y | ||
| 327 | # CONFIG_PCNET32 is not set | ||
| 328 | # CONFIG_AMD8111_ETH is not set | ||
| 329 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
| 330 | # CONFIG_DGRS is not set | ||
| 331 | CONFIG_EEPRO100=y | ||
| 332 | # CONFIG_E100 is not set | ||
| 333 | # CONFIG_FEALNX is not set | ||
| 334 | # CONFIG_NATSEMI is not set | ||
| 335 | # CONFIG_NE2K_PCI is not set | ||
| 336 | # CONFIG_8139TOO is not set | ||
| 337 | # CONFIG_SIS900 is not set | ||
| 338 | # CONFIG_EPIC100 is not set | ||
| 339 | # CONFIG_SUNDANCE is not set | ||
| 340 | # CONFIG_TLAN is not set | ||
| 341 | # CONFIG_VIA_RHINE is not set | ||
| 342 | |||
| 343 | # | ||
| 344 | # Ethernet (1000 Mbit) | ||
| 345 | # | ||
| 346 | # CONFIG_ACENIC is not set | ||
| 347 | # CONFIG_DL2K is not set | ||
| 348 | # CONFIG_E1000 is not set | ||
| 349 | # CONFIG_NS83820 is not set | ||
| 350 | # CONFIG_HAMACHI is not set | ||
| 351 | # CONFIG_R8169 is not set | ||
| 352 | # CONFIG_SK98LIN is not set | ||
| 353 | # CONFIG_VIA_VELOCITY is not set | ||
| 354 | # CONFIG_TIGON3 is not set | ||
| 355 | # CONFIG_BNX2 is not set | ||
| 356 | |||
| 357 | # | ||
| 358 | # Ethernet (10000 Mbit) | ||
| 359 | # | ||
| 360 | # CONFIG_IXGB is not set | ||
| 361 | # CONFIG_S2IO is not set | ||
| 362 | |||
| 363 | # | ||
| 364 | # Token Ring devices | ||
| 365 | # | ||
| 366 | # CONFIG_TR is not set | ||
| 367 | |||
| 368 | # | ||
| 369 | # Wireless LAN (non-hamradio) | ||
| 370 | # | ||
| 371 | # CONFIG_NET_RADIO is not set | ||
| 372 | |||
| 373 | # | ||
| 374 | # Wan interfaces | ||
| 375 | # | ||
| 376 | # CONFIG_WAN is not set | ||
| 377 | # CONFIG_FDDI is not set | ||
| 378 | # CONFIG_PPP is not set | ||
| 379 | # CONFIG_SLIP is not set | ||
| 380 | # CONFIG_NETPOLL is not set | ||
| 381 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 382 | |||
| 383 | # | ||
| 384 | # ISDN subsystem | ||
| 385 | # | ||
| 386 | # CONFIG_ISDN is not set | ||
| 387 | |||
| 388 | # | ||
| 389 | # Input device support | ||
| 390 | # | ||
| 391 | CONFIG_INPUT=y | ||
| 392 | |||
| 393 | # | ||
| 394 | # Userland interfaces | ||
| 395 | # | ||
| 396 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 397 | # CONFIG_INPUT_JOYDEV is not set | ||
| 398 | # CONFIG_INPUT_TSDEV is not set | ||
| 399 | # CONFIG_INPUT_EVDEV is not set | ||
| 400 | # CONFIG_INPUT_EVBUG is not set | ||
| 401 | |||
| 402 | # | ||
| 403 | # Input Device Drivers | ||
| 404 | # | ||
| 405 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 406 | # CONFIG_INPUT_MOUSE is not set | ||
| 407 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 408 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 409 | # CONFIG_INPUT_MISC is not set | ||
| 410 | |||
| 411 | # | ||
| 412 | # Hardware I/O ports | ||
| 413 | # | ||
| 414 | # CONFIG_SERIO is not set | ||
| 415 | # CONFIG_GAMEPORT is not set | ||
| 416 | |||
| 417 | # | ||
| 418 | # Character devices | ||
| 419 | # | ||
| 420 | # CONFIG_VT is not set | ||
| 421 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 422 | |||
| 423 | # | ||
| 424 | # Serial drivers | ||
| 425 | # | ||
| 426 | # CONFIG_SERIAL_8250 is not set | ||
| 427 | |||
| 428 | # | ||
| 429 | # Non-8250 serial port support | ||
| 430 | # | ||
| 431 | CONFIG_V850E_UART=y | ||
| 432 | CONFIG_V850E_UART_CONSOLE=y | ||
| 433 | CONFIG_SERIAL_CORE=y | ||
| 434 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 435 | # CONFIG_SERIAL_JSM is not set | ||
| 436 | # CONFIG_UNIX98_PTYS is not set | ||
| 437 | # CONFIG_LEGACY_PTYS is not set | ||
| 438 | |||
| 439 | # | ||
| 440 | # IPMI | ||
| 441 | # | ||
| 442 | # CONFIG_IPMI_HANDLER is not set | ||
| 443 | |||
| 444 | # | ||
| 445 | # Watchdog Cards | ||
| 446 | # | ||
| 447 | # CONFIG_WATCHDOG is not set | ||
| 448 | # CONFIG_RTC is not set | ||
| 449 | # CONFIG_GEN_RTC is not set | ||
| 450 | # CONFIG_DTLK is not set | ||
| 451 | # CONFIG_R3964 is not set | ||
| 452 | # CONFIG_APPLICOM is not set | ||
| 453 | |||
| 454 | # | ||
| 455 | # Ftape, the floppy tape device driver | ||
| 456 | # | ||
| 457 | # CONFIG_DRM is not set | ||
| 458 | # CONFIG_RAW_DRIVER is not set | ||
| 459 | |||
| 460 | # | ||
| 461 | # TPM devices | ||
| 462 | # | ||
| 463 | |||
| 464 | # | ||
| 465 | # Multimedia devices | ||
| 466 | # | ||
| 467 | # CONFIG_VIDEO_DEV is not set | ||
| 468 | |||
| 469 | # | ||
| 470 | # Digital Video Broadcasting Devices | ||
| 471 | # | ||
| 472 | # CONFIG_DVB is not set | ||
| 473 | |||
| 474 | # | ||
| 475 | # File systems | ||
| 476 | # | ||
| 477 | # CONFIG_EXT2_FS is not set | ||
| 478 | # CONFIG_EXT3_FS is not set | ||
| 479 | # CONFIG_JBD is not set | ||
| 480 | # CONFIG_REISERFS_FS is not set | ||
| 481 | # CONFIG_JFS_FS is not set | ||
| 482 | # CONFIG_FS_POSIX_ACL is not set | ||
| 483 | |||
| 484 | # | ||
| 485 | # XFS support | ||
| 486 | # | ||
| 487 | # CONFIG_XFS_FS is not set | ||
| 488 | # CONFIG_MINIX_FS is not set | ||
| 489 | CONFIG_ROMFS_FS=y | ||
| 490 | # CONFIG_MAGIC_ROM_PTR is not set | ||
| 491 | CONFIG_INOTIFY=y | ||
| 492 | # CONFIG_QUOTA is not set | ||
| 493 | CONFIG_DNOTIFY=y | ||
| 494 | # CONFIG_AUTOFS_FS is not set | ||
| 495 | # CONFIG_AUTOFS4_FS is not set | ||
| 496 | |||
| 497 | # | ||
| 498 | # CD-ROM/DVD Filesystems | ||
| 499 | # | ||
| 500 | # CONFIG_ISO9660_FS is not set | ||
| 501 | # CONFIG_UDF_FS is not set | ||
| 502 | |||
| 503 | # | ||
| 504 | # DOS/FAT/NT Filesystems | ||
| 505 | # | ||
| 506 | # CONFIG_MSDOS_FS is not set | ||
| 507 | # CONFIG_VFAT_FS is not set | ||
| 508 | # CONFIG_NTFS_FS is not set | ||
| 509 | |||
| 510 | # | ||
| 511 | # Pseudo filesystems | ||
| 512 | # | ||
| 513 | CONFIG_PROC_FS=y | ||
| 514 | CONFIG_SYSFS=y | ||
| 515 | # CONFIG_TMPFS is not set | ||
| 516 | # CONFIG_HUGETLB_PAGE is not set | ||
| 517 | CONFIG_RAMFS=y | ||
| 518 | |||
| 519 | # | ||
| 520 | # Miscellaneous filesystems | ||
| 521 | # | ||
| 522 | # CONFIG_HFSPLUS_FS is not set | ||
| 523 | # CONFIG_JFFS_FS is not set | ||
| 524 | # CONFIG_JFFS2_FS is not set | ||
| 525 | # CONFIG_CRAMFS is not set | ||
| 526 | # CONFIG_VXFS_FS is not set | ||
| 527 | # CONFIG_HPFS_FS is not set | ||
| 528 | # CONFIG_QNX4FS_FS is not set | ||
| 529 | # CONFIG_SYSV_FS is not set | ||
| 530 | # CONFIG_UFS_FS is not set | ||
| 531 | |||
| 532 | # | ||
| 533 | # Network File Systems | ||
| 534 | # | ||
| 535 | CONFIG_NFS_FS=y | ||
| 536 | CONFIG_NFS_V3=y | ||
| 537 | # CONFIG_NFS_V3_ACL is not set | ||
| 538 | # CONFIG_NFSD is not set | ||
| 539 | CONFIG_LOCKD=y | ||
| 540 | CONFIG_LOCKD_V4=y | ||
| 541 | CONFIG_NFS_COMMON=y | ||
| 542 | CONFIG_SUNRPC=y | ||
| 543 | # CONFIG_SMB_FS is not set | ||
| 544 | # CONFIG_CIFS is not set | ||
| 545 | # CONFIG_NCP_FS is not set | ||
| 546 | # CONFIG_CODA_FS is not set | ||
| 547 | |||
| 548 | # | ||
| 549 | # Partition Types | ||
| 550 | # | ||
| 551 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 552 | CONFIG_MSDOS_PARTITION=y | ||
| 553 | |||
| 554 | # | ||
| 555 | # Native Language Support | ||
| 556 | # | ||
| 557 | # CONFIG_NLS is not set | ||
| 558 | |||
| 559 | # | ||
| 560 | # Graphics support | ||
| 561 | # | ||
| 562 | # CONFIG_FB is not set | ||
| 563 | |||
| 564 | # | ||
| 565 | # Sound | ||
| 566 | # | ||
| 567 | # CONFIG_SOUND is not set | ||
| 568 | |||
| 569 | # | ||
| 570 | # USB support | ||
| 571 | # | ||
| 572 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 573 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
| 574 | # CONFIG_USB is not set | ||
| 575 | |||
| 576 | # | ||
| 577 | # USB Gadget Support | ||
| 578 | # | ||
| 579 | # CONFIG_USB_GADGET is not set | ||
| 580 | |||
| 581 | # | ||
| 582 | # Kernel hacking | ||
| 583 | # | ||
| 584 | # CONFIG_PRINTK_TIME is not set | ||
| 585 | CONFIG_DEBUG_KERNEL=y | ||
| 586 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 587 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 588 | # CONFIG_SCHEDSTATS is not set | ||
| 589 | # CONFIG_DEBUG_SLAB is not set | ||
| 590 | # CONFIG_DEBUG_SPINLOCK is not set | ||
| 591 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
| 592 | # CONFIG_DEBUG_KOBJECT is not set | ||
| 593 | CONFIG_DEBUG_INFO=y | ||
| 594 | # CONFIG_DEBUG_FS is not set | ||
| 595 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 596 | |||
| 597 | # | ||
| 598 | # Security options | ||
| 599 | # | ||
| 600 | # CONFIG_KEYS is not set | ||
| 601 | # CONFIG_SECURITY is not set | ||
| 602 | |||
| 603 | # | ||
| 604 | # Cryptographic options | ||
| 605 | # | ||
| 606 | # CONFIG_CRYPTO is not set | ||
| 607 | |||
| 608 | # | ||
| 609 | # Hardware crypto devices | ||
| 610 | # | ||
| 611 | |||
| 612 | # | ||
| 613 | # Library routines | ||
| 614 | # | ||
| 615 | # CONFIG_CRC_CCITT is not set | ||
| 616 | # CONFIG_CRC32 is not set | ||
| 617 | # CONFIG_LIBCRC32C is not set | ||
diff --git a/arch/v850/configs/rte-me2-cb_defconfig b/arch/v850/configs/rte-me2-cb_defconfig deleted file mode 100644 index 15e666478061..000000000000 --- a/arch/v850/configs/rte-me2-cb_defconfig +++ /dev/null | |||
| @@ -1,462 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.13-uc0 | ||
| 4 | # Fri Sep 2 13:47:50 2005 | ||
| 5 | # | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_UID16 is not set | ||
| 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 9 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 11 | # CONFIG_ISA is not set | ||
| 12 | # CONFIG_ISAPNP is not set | ||
| 13 | # CONFIG_EISA is not set | ||
| 14 | # CONFIG_MCA is not set | ||
| 15 | CONFIG_V850=y | ||
| 16 | |||
| 17 | # | ||
| 18 | # Processor type and features | ||
| 19 | # | ||
| 20 | # CONFIG_V850E_SIM is not set | ||
| 21 | # CONFIG_RTE_CB_MA1 is not set | ||
| 22 | # CONFIG_RTE_CB_NB85E is not set | ||
| 23 | CONFIG_RTE_CB_ME2=y | ||
| 24 | # CONFIG_V850E_AS85EP1 is not set | ||
| 25 | # CONFIG_V850E2_SIM85E2C is not set | ||
| 26 | # CONFIG_V850E2_SIM85E2S is not set | ||
| 27 | # CONFIG_V850E2_FPGA85E2C is not set | ||
| 28 | # CONFIG_V850E2_ANNA is not set | ||
| 29 | CONFIG_V850E=y | ||
| 30 | CONFIG_V850E_ME2=y | ||
| 31 | CONFIG_RTE_CB=y | ||
| 32 | # CONFIG_RTE_MB_A_PCI is not set | ||
| 33 | # CONFIG_PCI is not set | ||
| 34 | CONFIG_V850E_INTC=y | ||
| 35 | CONFIG_V850E_TIMER_D=y | ||
| 36 | CONFIG_V850E_CACHE=y | ||
| 37 | # CONFIG_V850E2_CACHE is not set | ||
| 38 | # CONFIG_NO_CACHE is not set | ||
| 39 | # CONFIG_ROM_KERNEL is not set | ||
| 40 | CONFIG_ZERO_BSS=y | ||
| 41 | # CONFIG_V850E_HIGHRES_TIMER is not set | ||
| 42 | # CONFIG_RESET_GUARD is not set | ||
| 43 | CONFIG_LARGE_ALLOCS=y | ||
| 44 | CONFIG_FLATMEM=y | ||
| 45 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 46 | |||
| 47 | # | ||
| 48 | # Code maturity level options | ||
| 49 | # | ||
| 50 | # CONFIG_EXPERIMENTAL is not set | ||
| 51 | CONFIG_CLEAN_COMPILE=y | ||
| 52 | CONFIG_BROKEN_ON_SMP=y | ||
| 53 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 54 | |||
| 55 | # | ||
| 56 | # General setup | ||
| 57 | # | ||
| 58 | CONFIG_LOCALVERSION="" | ||
| 59 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 60 | # CONFIG_SYSCTL is not set | ||
| 61 | # CONFIG_HOTPLUG is not set | ||
| 62 | # CONFIG_IKCONFIG is not set | ||
| 63 | CONFIG_EMBEDDED=y | ||
| 64 | # CONFIG_KALLSYMS is not set | ||
| 65 | CONFIG_PRINTK=y | ||
| 66 | CONFIG_BUG=y | ||
| 67 | # CONFIG_BASE_FULL is not set | ||
| 68 | # CONFIG_FUTEX is not set | ||
| 69 | # CONFIG_EPOLL is not set | ||
| 70 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 71 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
| 72 | CONFIG_CC_ALIGN_LABELS=0 | ||
| 73 | CONFIG_CC_ALIGN_LOOPS=0 | ||
| 74 | CONFIG_CC_ALIGN_JUMPS=0 | ||
| 75 | CONFIG_BASE_SMALL=1 | ||
| 76 | |||
| 77 | # | ||
| 78 | # Loadable module support | ||
| 79 | # | ||
| 80 | CONFIG_MODULES=y | ||
| 81 | CONFIG_MODULE_UNLOAD=y | ||
| 82 | CONFIG_OBSOLETE_MODPARM=y | ||
| 83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 84 | CONFIG_KMOD=y | ||
| 85 | |||
| 86 | # | ||
| 87 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 88 | # | ||
| 89 | |||
| 90 | # | ||
| 91 | # PCCARD (PCMCIA/CardBus) support | ||
| 92 | # | ||
| 93 | # CONFIG_PCCARD is not set | ||
| 94 | |||
| 95 | # | ||
| 96 | # PCI Hotplug Support | ||
| 97 | # | ||
| 98 | |||
| 99 | # | ||
| 100 | # Executable file formats | ||
| 101 | # | ||
| 102 | CONFIG_BINFMT_FLAT=y | ||
| 103 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 104 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 105 | # CONFIG_BINFMT_MISC is not set | ||
| 106 | |||
| 107 | # | ||
| 108 | # Networking | ||
| 109 | # | ||
| 110 | # CONFIG_NET is not set | ||
| 111 | |||
| 112 | # | ||
| 113 | # Generic Driver Options | ||
| 114 | # | ||
| 115 | CONFIG_STANDALONE=y | ||
| 116 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 117 | # CONFIG_FW_LOADER is not set | ||
| 118 | # CONFIG_DEBUG_DRIVER is not set | ||
| 119 | |||
| 120 | # | ||
| 121 | # Memory Technology Devices (MTD) | ||
| 122 | # | ||
| 123 | CONFIG_MTD=y | ||
| 124 | # CONFIG_MTD_DEBUG is not set | ||
| 125 | # CONFIG_MTD_CONCAT is not set | ||
| 126 | # CONFIG_MTD_PARTITIONS is not set | ||
| 127 | |||
| 128 | # | ||
| 129 | # User Modules And Translation Layers | ||
| 130 | # | ||
| 131 | # CONFIG_MTD_CHAR is not set | ||
| 132 | CONFIG_MTD_BLOCK=y | ||
| 133 | # CONFIG_FTL is not set | ||
| 134 | # CONFIG_NFTL is not set | ||
| 135 | # CONFIG_INFTL is not set | ||
| 136 | |||
| 137 | # | ||
| 138 | # RAM/ROM/Flash chip drivers | ||
| 139 | # | ||
| 140 | # CONFIG_MTD_CFI is not set | ||
| 141 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 142 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 143 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 144 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 145 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 146 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 147 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 148 | CONFIG_MTD_CFI_I1=y | ||
| 149 | CONFIG_MTD_CFI_I2=y | ||
| 150 | # CONFIG_MTD_CFI_I4 is not set | ||
| 151 | # CONFIG_MTD_CFI_I8 is not set | ||
| 152 | # CONFIG_MTD_RAM is not set | ||
| 153 | # CONFIG_MTD_ROM is not set | ||
| 154 | # CONFIG_MTD_ABSENT is not set | ||
| 155 | |||
| 156 | # | ||
| 157 | # Mapping drivers for chip access | ||
| 158 | # | ||
| 159 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 160 | # CONFIG_MTD_PLATRAM is not set | ||
| 161 | |||
| 162 | # | ||
| 163 | # Self-contained MTD device drivers | ||
| 164 | # | ||
| 165 | CONFIG_MTD_SLRAM=y | ||
| 166 | # CONFIG_MTD_PHRAM is not set | ||
| 167 | # CONFIG_MTD_MTDRAM is not set | ||
| 168 | # CONFIG_MTD_BLKMTD is not set | ||
| 169 | |||
| 170 | # | ||
| 171 | # Disk-On-Chip Device Drivers | ||
| 172 | # | ||
| 173 | # CONFIG_MTD_DOC2000 is not set | ||
| 174 | # CONFIG_MTD_DOC2001 is not set | ||
| 175 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 176 | |||
| 177 | # | ||
| 178 | # NAND Flash Device Drivers | ||
| 179 | # | ||
| 180 | # CONFIG_MTD_NAND is not set | ||
| 181 | |||
| 182 | # | ||
| 183 | # Parallel port support | ||
| 184 | # | ||
| 185 | # CONFIG_PARPORT is not set | ||
| 186 | |||
| 187 | # | ||
| 188 | # Block devices | ||
| 189 | # | ||
| 190 | # CONFIG_BLK_DEV_FD is not set | ||
| 191 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 192 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 193 | # CONFIG_BLK_DEV_RAM is not set | ||
| 194 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 195 | CONFIG_INITRAMFS_SOURCE="" | ||
| 196 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 197 | |||
| 198 | # | ||
| 199 | # IO Schedulers | ||
| 200 | # | ||
| 201 | CONFIG_IOSCHED_NOOP=y | ||
| 202 | # CONFIG_IOSCHED_AS is not set | ||
| 203 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 204 | # CONFIG_IOSCHED_CFQ is not set | ||
| 205 | |||
| 206 | # | ||
| 207 | # Disk device support | ||
| 208 | # | ||
| 209 | |||
| 210 | # | ||
| 211 | # ATA/ATAPI/MFM/RLL support | ||
| 212 | # | ||
| 213 | # CONFIG_IDE is not set | ||
| 214 | |||
| 215 | # | ||
| 216 | # SCSI device support | ||
| 217 | # | ||
| 218 | # CONFIG_SCSI is not set | ||
| 219 | |||
| 220 | # | ||
| 221 | # Multi-device support (RAID and LVM) | ||
| 222 | # | ||
| 223 | # CONFIG_MD is not set | ||
| 224 | |||
| 225 | # | ||
| 226 | # Fusion MPT device support | ||
| 227 | # | ||
| 228 | # CONFIG_FUSION is not set | ||
| 229 | |||
| 230 | # | ||
| 231 | # IEEE 1394 (FireWire) support | ||
| 232 | # | ||
| 233 | |||
| 234 | # | ||
| 235 | # I2O device support | ||
| 236 | # | ||
| 237 | |||
| 238 | # | ||
| 239 | # Network device support | ||
| 240 | # | ||
| 241 | # CONFIG_NETPOLL is not set | ||
| 242 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 243 | |||
| 244 | # | ||
| 245 | # ISDN subsystem | ||
| 246 | # | ||
| 247 | |||
| 248 | # | ||
| 249 | # Input device support | ||
| 250 | # | ||
| 251 | CONFIG_INPUT=y | ||
| 252 | |||
| 253 | # | ||
| 254 | # Userland interfaces | ||
| 255 | # | ||
| 256 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 257 | # CONFIG_INPUT_JOYDEV is not set | ||
| 258 | # CONFIG_INPUT_TSDEV is not set | ||
| 259 | # CONFIG_INPUT_EVDEV is not set | ||
| 260 | # CONFIG_INPUT_EVBUG is not set | ||
| 261 | |||
| 262 | # | ||
| 263 | # Input Device Drivers | ||
| 264 | # | ||
| 265 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 266 | # CONFIG_INPUT_MOUSE is not set | ||
| 267 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 268 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 269 | # CONFIG_INPUT_MISC is not set | ||
| 270 | |||
| 271 | # | ||
| 272 | # Hardware I/O ports | ||
| 273 | # | ||
| 274 | CONFIG_SERIO=y | ||
| 275 | # CONFIG_SERIO_I8042 is not set | ||
| 276 | # CONFIG_SERIO_SERPORT is not set | ||
| 277 | # CONFIG_SERIO_LIBPS2 is not set | ||
| 278 | # CONFIG_SERIO_RAW is not set | ||
| 279 | # CONFIG_GAMEPORT is not set | ||
| 280 | |||
| 281 | # | ||
| 282 | # Character devices | ||
| 283 | # | ||
| 284 | # CONFIG_VT is not set | ||
| 285 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 286 | |||
| 287 | # | ||
| 288 | # Serial drivers | ||
| 289 | # | ||
| 290 | CONFIG_SERIAL_8250=y | ||
| 291 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 292 | CONFIG_SERIAL_8250_NR_UARTS=1 | ||
| 293 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
| 294 | |||
| 295 | # | ||
| 296 | # Non-8250 serial port support | ||
| 297 | # | ||
| 298 | # CONFIG_V850E_UART is not set | ||
| 299 | CONFIG_SERIAL_CORE=y | ||
| 300 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 301 | # CONFIG_UNIX98_PTYS is not set | ||
| 302 | # CONFIG_LEGACY_PTYS is not set | ||
| 303 | |||
| 304 | # | ||
| 305 | # IPMI | ||
| 306 | # | ||
| 307 | # CONFIG_IPMI_HANDLER is not set | ||
| 308 | |||
| 309 | # | ||
| 310 | # Watchdog Cards | ||
| 311 | # | ||
| 312 | # CONFIG_WATCHDOG is not set | ||
| 313 | # CONFIG_RTC is not set | ||
| 314 | # CONFIG_GEN_RTC is not set | ||
| 315 | # CONFIG_DTLK is not set | ||
| 316 | # CONFIG_R3964 is not set | ||
| 317 | |||
| 318 | # | ||
| 319 | # Ftape, the floppy tape device driver | ||
| 320 | # | ||
| 321 | # CONFIG_RAW_DRIVER is not set | ||
| 322 | |||
| 323 | # | ||
| 324 | # TPM devices | ||
| 325 | # | ||
| 326 | |||
| 327 | # | ||
| 328 | # Multimedia devices | ||
| 329 | # | ||
| 330 | # CONFIG_VIDEO_DEV is not set | ||
| 331 | |||
| 332 | # | ||
| 333 | # Digital Video Broadcasting Devices | ||
| 334 | # | ||
| 335 | |||
| 336 | # | ||
| 337 | # File systems | ||
| 338 | # | ||
| 339 | # CONFIG_EXT2_FS is not set | ||
| 340 | # CONFIG_EXT3_FS is not set | ||
| 341 | # CONFIG_JBD is not set | ||
| 342 | # CONFIG_REISERFS_FS is not set | ||
| 343 | # CONFIG_JFS_FS is not set | ||
| 344 | # CONFIG_FS_POSIX_ACL is not set | ||
| 345 | |||
| 346 | # | ||
| 347 | # XFS support | ||
| 348 | # | ||
| 349 | # CONFIG_XFS_FS is not set | ||
| 350 | # CONFIG_MINIX_FS is not set | ||
| 351 | CONFIG_ROMFS_FS=y | ||
| 352 | # CONFIG_MAGIC_ROM_PTR is not set | ||
| 353 | CONFIG_INOTIFY=y | ||
| 354 | # CONFIG_QUOTA is not set | ||
| 355 | CONFIG_DNOTIFY=y | ||
| 356 | # CONFIG_AUTOFS_FS is not set | ||
| 357 | # CONFIG_AUTOFS4_FS is not set | ||
| 358 | |||
| 359 | # | ||
| 360 | # CD-ROM/DVD Filesystems | ||
| 361 | # | ||
| 362 | # CONFIG_ISO9660_FS is not set | ||
| 363 | # CONFIG_UDF_FS is not set | ||
| 364 | |||
| 365 | # | ||
| 366 | # DOS/FAT/NT Filesystems | ||
| 367 | # | ||
| 368 | # CONFIG_MSDOS_FS is not set | ||
| 369 | # CONFIG_VFAT_FS is not set | ||
| 370 | # CONFIG_NTFS_FS is not set | ||
| 371 | |||
| 372 | # | ||
| 373 | # Pseudo filesystems | ||
| 374 | # | ||
| 375 | CONFIG_PROC_FS=y | ||
| 376 | CONFIG_SYSFS=y | ||
| 377 | # CONFIG_TMPFS is not set | ||
| 378 | # CONFIG_HUGETLB_PAGE is not set | ||
| 379 | CONFIG_RAMFS=y | ||
| 380 | |||
| 381 | # | ||
| 382 | # Miscellaneous filesystems | ||
| 383 | # | ||
| 384 | # CONFIG_HFSPLUS_FS is not set | ||
| 385 | # CONFIG_JFFS_FS is not set | ||
| 386 | # CONFIG_JFFS2_FS is not set | ||
| 387 | # CONFIG_CRAMFS is not set | ||
| 388 | # CONFIG_VXFS_FS is not set | ||
| 389 | # CONFIG_HPFS_FS is not set | ||
| 390 | # CONFIG_QNX4FS_FS is not set | ||
| 391 | # CONFIG_SYSV_FS is not set | ||
| 392 | # CONFIG_UFS_FS is not set | ||
| 393 | |||
| 394 | # | ||
| 395 | # Partition Types | ||
| 396 | # | ||
| 397 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 398 | CONFIG_MSDOS_PARTITION=y | ||
| 399 | |||
| 400 | # | ||
| 401 | # Native Language Support | ||
| 402 | # | ||
| 403 | # CONFIG_NLS is not set | ||
| 404 | |||
| 405 | # | ||
| 406 | # Graphics support | ||
| 407 | # | ||
| 408 | # CONFIG_FB is not set | ||
| 409 | |||
| 410 | # | ||
| 411 | # Sound | ||
| 412 | # | ||
| 413 | # CONFIG_SOUND is not set | ||
| 414 | |||
| 415 | # | ||
| 416 | # USB support | ||
| 417 | # | ||
| 418 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
| 419 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 420 | |||
| 421 | # | ||
| 422 | # USB Gadget Support | ||
| 423 | # | ||
| 424 | # CONFIG_USB_GADGET is not set | ||
| 425 | |||
| 426 | # | ||
| 427 | # Kernel hacking | ||
| 428 | # | ||
| 429 | # CONFIG_PRINTK_TIME is not set | ||
| 430 | CONFIG_DEBUG_KERNEL=y | ||
| 431 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 432 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 433 | # CONFIG_SCHEDSTATS is not set | ||
| 434 | # CONFIG_DEBUG_SLAB is not set | ||
| 435 | # CONFIG_DEBUG_SPINLOCK is not set | ||
| 436 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
| 437 | # CONFIG_DEBUG_KOBJECT is not set | ||
| 438 | CONFIG_DEBUG_INFO=y | ||
| 439 | # CONFIG_DEBUG_FS is not set | ||
| 440 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 441 | |||
| 442 | # | ||
| 443 | # Security options | ||
| 444 | # | ||
| 445 | # CONFIG_KEYS is not set | ||
| 446 | # CONFIG_SECURITY is not set | ||
| 447 | |||
| 448 | # | ||
| 449 | # Cryptographic options | ||
| 450 | # | ||
| 451 | # CONFIG_CRYPTO is not set | ||
| 452 | |||
| 453 | # | ||
| 454 | # Hardware crypto devices | ||
| 455 | # | ||
| 456 | |||
| 457 | # | ||
| 458 | # Library routines | ||
| 459 | # | ||
| 460 | # CONFIG_CRC_CCITT is not set | ||
| 461 | # CONFIG_CRC32 is not set | ||
| 462 | # CONFIG_LIBCRC32C is not set | ||
diff --git a/arch/v850/configs/sim_defconfig b/arch/v850/configs/sim_defconfig deleted file mode 100644 index f31ba7398ad0..000000000000 --- a/arch/v850/configs/sim_defconfig +++ /dev/null | |||
| @@ -1,451 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.13-uc0 | ||
| 4 | # Fri Sep 2 13:36:43 2005 | ||
| 5 | # | ||
| 6 | # CONFIG_MMU is not set | ||
| 7 | # CONFIG_UID16 is not set | ||
| 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 9 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
| 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 11 | # CONFIG_ISA is not set | ||
| 12 | # CONFIG_ISAPNP is not set | ||
| 13 | # CONFIG_EISA is not set | ||
| 14 | # CONFIG_MCA is not set | ||
| 15 | CONFIG_V850=y | ||
| 16 | |||
| 17 | # | ||
| 18 | # Processor type and features | ||
| 19 | # | ||
| 20 | CONFIG_V850E_SIM=y | ||
| 21 | # CONFIG_RTE_CB_MA1 is not set | ||
| 22 | # CONFIG_RTE_CB_NB85E is not set | ||
| 23 | # CONFIG_RTE_CB_ME2 is not set | ||
| 24 | # CONFIG_V850E_AS85EP1 is not set | ||
| 25 | # CONFIG_V850E2_SIM85E2C is not set | ||
| 26 | # CONFIG_V850E2_SIM85E2S is not set | ||
| 27 | # CONFIG_V850E2_FPGA85E2C is not set | ||
| 28 | # CONFIG_V850E2_ANNA is not set | ||
| 29 | CONFIG_V850E=y | ||
| 30 | # CONFIG_PCI is not set | ||
| 31 | # CONFIG_V850E_INTC is not set | ||
| 32 | # CONFIG_V850E_TIMER_D is not set | ||
| 33 | # CONFIG_V850E_CACHE is not set | ||
| 34 | # CONFIG_V850E2_CACHE is not set | ||
| 35 | CONFIG_NO_CACHE=y | ||
| 36 | CONFIG_ZERO_BSS=y | ||
| 37 | # CONFIG_RESET_GUARD is not set | ||
| 38 | CONFIG_LARGE_ALLOCS=y | ||
| 39 | CONFIG_FLATMEM=y | ||
| 40 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 41 | |||
| 42 | # | ||
| 43 | # Code maturity level options | ||
| 44 | # | ||
| 45 | # CONFIG_EXPERIMENTAL is not set | ||
| 46 | CONFIG_CLEAN_COMPILE=y | ||
| 47 | CONFIG_BROKEN_ON_SMP=y | ||
| 48 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 49 | |||
| 50 | # | ||
| 51 | # General setup | ||
| 52 | # | ||
| 53 | CONFIG_LOCALVERSION="" | ||
| 54 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 55 | # CONFIG_SYSCTL is not set | ||
| 56 | # CONFIG_HOTPLUG is not set | ||
| 57 | # CONFIG_IKCONFIG is not set | ||
| 58 | CONFIG_EMBEDDED=y | ||
| 59 | # CONFIG_KALLSYMS is not set | ||
| 60 | CONFIG_PRINTK=y | ||
| 61 | CONFIG_BUG=y | ||
| 62 | # CONFIG_BASE_FULL is not set | ||
| 63 | # CONFIG_FUTEX is not set | ||
| 64 | # CONFIG_EPOLL is not set | ||
| 65 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 66 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
| 67 | CONFIG_CC_ALIGN_LABELS=0 | ||
| 68 | CONFIG_CC_ALIGN_LOOPS=0 | ||
| 69 | CONFIG_CC_ALIGN_JUMPS=0 | ||
| 70 | CONFIG_BASE_SMALL=1 | ||
| 71 | |||
| 72 | # | ||
| 73 | # Loadable module support | ||
| 74 | # | ||
| 75 | CONFIG_MODULES=y | ||
| 76 | CONFIG_MODULE_UNLOAD=y | ||
| 77 | CONFIG_OBSOLETE_MODPARM=y | ||
| 78 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 79 | CONFIG_KMOD=y | ||
| 80 | |||
| 81 | # | ||
| 82 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
| 83 | # | ||
| 84 | |||
| 85 | # | ||
| 86 | # PCCARD (PCMCIA/CardBus) support | ||
| 87 | # | ||
| 88 | # CONFIG_PCCARD is not set | ||
| 89 | |||
| 90 | # | ||
| 91 | # PCI Hotplug Support | ||
| 92 | # | ||
| 93 | |||
| 94 | # | ||
| 95 | # Executable file formats | ||
| 96 | # | ||
| 97 | CONFIG_BINFMT_FLAT=y | ||
| 98 | # CONFIG_BINFMT_ZFLAT is not set | ||
| 99 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
| 100 | # CONFIG_BINFMT_MISC is not set | ||
| 101 | |||
| 102 | # | ||
| 103 | # Networking | ||
| 104 | # | ||
| 105 | # CONFIG_NET is not set | ||
| 106 | |||
| 107 | # | ||
| 108 | # Generic Driver Options | ||
| 109 | # | ||
| 110 | CONFIG_STANDALONE=y | ||
| 111 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 112 | # CONFIG_FW_LOADER is not set | ||
| 113 | # CONFIG_DEBUG_DRIVER is not set | ||
| 114 | |||
| 115 | # | ||
| 116 | # Memory Technology Devices (MTD) | ||
| 117 | # | ||
| 118 | CONFIG_MTD=y | ||
| 119 | # CONFIG_MTD_DEBUG is not set | ||
| 120 | # CONFIG_MTD_CONCAT is not set | ||
| 121 | # CONFIG_MTD_PARTITIONS is not set | ||
| 122 | |||
| 123 | # | ||
| 124 | # User Modules And Translation Layers | ||
| 125 | # | ||
| 126 | # CONFIG_MTD_CHAR is not set | ||
| 127 | CONFIG_MTD_BLOCK=y | ||
| 128 | # CONFIG_FTL is not set | ||
| 129 | # CONFIG_NFTL is not set | ||
| 130 | # CONFIG_INFTL is not set | ||
| 131 | |||
| 132 | # | ||
| 133 | # RAM/ROM/Flash chip drivers | ||
| 134 | # | ||
| 135 | # CONFIG_MTD_CFI is not set | ||
| 136 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 137 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 138 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 139 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 140 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 141 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 142 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 143 | CONFIG_MTD_CFI_I1=y | ||
| 144 | CONFIG_MTD_CFI_I2=y | ||
| 145 | # CONFIG_MTD_CFI_I4 is not set | ||
| 146 | # CONFIG_MTD_CFI_I8 is not set | ||
| 147 | # CONFIG_MTD_RAM is not set | ||
| 148 | # CONFIG_MTD_ROM is not set | ||
| 149 | # CONFIG_MTD_ABSENT is not set | ||
| 150 | |||
| 151 | # | ||
| 152 | # Mapping drivers for chip access | ||
| 153 | # | ||
| 154 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
| 155 | # CONFIG_MTD_PLATRAM is not set | ||
| 156 | |||
| 157 | # | ||
| 158 | # Self-contained MTD device drivers | ||
| 159 | # | ||
| 160 | CONFIG_MTD_SLRAM=y | ||
| 161 | # CONFIG_MTD_PHRAM is not set | ||
| 162 | # CONFIG_MTD_MTDRAM is not set | ||
| 163 | # CONFIG_MTD_BLKMTD is not set | ||
| 164 | |||
| 165 | # | ||
| 166 | # Disk-On-Chip Device Drivers | ||
| 167 | # | ||
| 168 | # CONFIG_MTD_DOC2000 is not set | ||
| 169 | # CONFIG_MTD_DOC2001 is not set | ||
| 170 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 171 | |||
| 172 | # | ||
| 173 | # NAND Flash Device Drivers | ||
| 174 | # | ||
| 175 | # CONFIG_MTD_NAND is not set | ||
| 176 | |||
| 177 | # | ||
| 178 | # Parallel port support | ||
| 179 | # | ||
| 180 | # CONFIG_PARPORT is not set | ||
| 181 | |||
| 182 | # | ||
| 183 | # Block devices | ||
| 184 | # | ||
| 185 | # CONFIG_BLK_DEV_FD is not set | ||
| 186 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 187 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 188 | # CONFIG_BLK_DEV_RAM is not set | ||
| 189 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 190 | CONFIG_INITRAMFS_SOURCE="" | ||
| 191 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 192 | |||
| 193 | # | ||
| 194 | # IO Schedulers | ||
| 195 | # | ||
| 196 | CONFIG_IOSCHED_NOOP=y | ||
| 197 | # CONFIG_IOSCHED_AS is not set | ||
| 198 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 199 | # CONFIG_IOSCHED_CFQ is not set | ||
| 200 | |||
| 201 | # | ||
| 202 | # Disk device support | ||
| 203 | # | ||
| 204 | |||
| 205 | # | ||
| 206 | # ATA/ATAPI/MFM/RLL support | ||
| 207 | # | ||
| 208 | # CONFIG_IDE is not set | ||
| 209 | |||
| 210 | # | ||
| 211 | # SCSI device support | ||
| 212 | # | ||
| 213 | # CONFIG_SCSI is not set | ||
| 214 | |||
| 215 | # | ||
| 216 | # Multi-device support (RAID and LVM) | ||
| 217 | # | ||
| 218 | # CONFIG_MD is not set | ||
| 219 | |||
| 220 | # | ||
| 221 | # Fusion MPT device support | ||
| 222 | # | ||
| 223 | # CONFIG_FUSION is not set | ||
| 224 | |||
| 225 | # | ||
| 226 | # IEEE 1394 (FireWire) support | ||
| 227 | # | ||
| 228 | |||
| 229 | # | ||
| 230 | # I2O device support | ||
| 231 | # | ||
| 232 | |||
| 233 | # | ||
| 234 | # Network device support | ||
| 235 | # | ||
| 236 | # CONFIG_NETPOLL is not set | ||
| 237 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 238 | |||
| 239 | # | ||
| 240 | # ISDN subsystem | ||
| 241 | # | ||
| 242 | |||
| 243 | # | ||
| 244 | # Input device support | ||
| 245 | # | ||
| 246 | CONFIG_INPUT=y | ||
| 247 | |||
| 248 | # | ||
| 249 | # Userland interfaces | ||
| 250 | # | ||
| 251 | # CONFIG_INPUT_MOUSEDEV is not set | ||
| 252 | # CONFIG_INPUT_JOYDEV is not set | ||
| 253 | # CONFIG_INPUT_TSDEV is not set | ||
| 254 | # CONFIG_INPUT_EVDEV is not set | ||
| 255 | # CONFIG_INPUT_EVBUG is not set | ||
| 256 | |||
| 257 | # | ||
| 258 | # Input Device Drivers | ||
| 259 | # | ||
| 260 | # CONFIG_INPUT_KEYBOARD is not set | ||
| 261 | # CONFIG_INPUT_MOUSE is not set | ||
| 262 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 263 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 264 | # CONFIG_INPUT_MISC is not set | ||
| 265 | |||
| 266 | # | ||
| 267 | # Hardware I/O ports | ||
| 268 | # | ||
| 269 | CONFIG_SERIO=y | ||
| 270 | # CONFIG_SERIO_I8042 is not set | ||
| 271 | # CONFIG_SERIO_SERPORT is not set | ||
| 272 | # CONFIG_SERIO_LIBPS2 is not set | ||
| 273 | # CONFIG_SERIO_RAW is not set | ||
| 274 | # CONFIG_GAMEPORT is not set | ||
| 275 | |||
| 276 | # | ||
| 277 | # Character devices | ||
| 278 | # | ||
| 279 | # CONFIG_VT is not set | ||
| 280 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 281 | |||
| 282 | # | ||
| 283 | # Serial drivers | ||
| 284 | # | ||
| 285 | # CONFIG_SERIAL_8250 is not set | ||
| 286 | |||
| 287 | # | ||
| 288 | # Non-8250 serial port support | ||
| 289 | # | ||
| 290 | # CONFIG_UNIX98_PTYS is not set | ||
| 291 | # CONFIG_LEGACY_PTYS is not set | ||
| 292 | |||
| 293 | # | ||
| 294 | # IPMI | ||
| 295 | # | ||
| 296 | # CONFIG_IPMI_HANDLER is not set | ||
| 297 | |||
| 298 | # | ||
| 299 | # Watchdog Cards | ||
| 300 | # | ||
| 301 | # CONFIG_WATCHDOG is not set | ||
| 302 | # CONFIG_RTC is not set | ||
| 303 | # CONFIG_GEN_RTC is not set | ||
| 304 | # CONFIG_DTLK is not set | ||
| 305 | # CONFIG_R3964 is not set | ||
| 306 | |||
| 307 | # | ||
| 308 | # Ftape, the floppy tape device driver | ||
| 309 | # | ||
| 310 | # CONFIG_RAW_DRIVER is not set | ||
| 311 | |||
| 312 | # | ||
| 313 | # TPM devices | ||
| 314 | # | ||
| 315 | |||
| 316 | # | ||
| 317 | # Multimedia devices | ||
| 318 | # | ||
| 319 | # CONFIG_VIDEO_DEV is not set | ||
| 320 | |||
| 321 | # | ||
| 322 | # Digital Video Broadcasting Devices | ||
| 323 | # | ||
| 324 | |||
| 325 | # | ||
| 326 | # File systems | ||
| 327 | # | ||
| 328 | # CONFIG_EXT2_FS is not set | ||
| 329 | # CONFIG_EXT3_FS is not set | ||
| 330 | # CONFIG_JBD is not set | ||
| 331 | # CONFIG_REISERFS_FS is not set | ||
| 332 | # CONFIG_JFS_FS is not set | ||
| 333 | # CONFIG_FS_POSIX_ACL is not set | ||
| 334 | |||
| 335 | # | ||
| 336 | # XFS support | ||
| 337 | # | ||
| 338 | # CONFIG_XFS_FS is not set | ||
| 339 | # CONFIG_MINIX_FS is not set | ||
| 340 | CONFIG_ROMFS_FS=y | ||
| 341 | # CONFIG_MAGIC_ROM_PTR is not set | ||
| 342 | CONFIG_INOTIFY=y | ||
| 343 | # CONFIG_QUOTA is not set | ||
| 344 | CONFIG_DNOTIFY=y | ||
| 345 | # CONFIG_AUTOFS_FS is not set | ||
| 346 | # CONFIG_AUTOFS4_FS is not set | ||
| 347 | |||
| 348 | # | ||
| 349 | # CD-ROM/DVD Filesystems | ||
| 350 | # | ||
| 351 | # CONFIG_ISO9660_FS is not set | ||
| 352 | # CONFIG_UDF_FS is not set | ||
| 353 | |||
| 354 | # | ||
| 355 | # DOS/FAT/NT Filesystems | ||
| 356 | # | ||
| 357 | # CONFIG_MSDOS_FS is not set | ||
| 358 | # CONFIG_VFAT_FS is not set | ||
| 359 | # CONFIG_NTFS_FS is not set | ||
| 360 | |||
| 361 | # | ||
| 362 | # Pseudo filesystems | ||
| 363 | # | ||
| 364 | CONFIG_PROC_FS=y | ||
| 365 | CONFIG_SYSFS=y | ||
| 366 | # CONFIG_TMPFS is not set | ||
| 367 | # CONFIG_HUGETLB_PAGE is not set | ||
| 368 | CONFIG_RAMFS=y | ||
| 369 | |||
| 370 | # | ||
| 371 | # Miscellaneous filesystems | ||
| 372 | # | ||
| 373 | # CONFIG_HFSPLUS_FS is not set | ||
| 374 | # CONFIG_JFFS_FS is not set | ||
| 375 | # CONFIG_JFFS2_FS is not set | ||
| 376 | # CONFIG_CRAMFS is not set | ||
| 377 | # CONFIG_VXFS_FS is not set | ||
| 378 | # CONFIG_HPFS_FS is not set | ||
| 379 | # CONFIG_QNX4FS_FS is not set | ||
| 380 | # CONFIG_SYSV_FS is not set | ||
| 381 | # CONFIG_UFS_FS is not set | ||
| 382 | |||
| 383 | # | ||
| 384 | # Partition Types | ||
| 385 | # | ||
| 386 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 387 | CONFIG_MSDOS_PARTITION=y | ||
| 388 | |||
| 389 | # | ||
| 390 | # Native Language Support | ||
| 391 | # | ||
| 392 | # CONFIG_NLS is not set | ||
| 393 | |||
| 394 | # | ||
| 395 | # Graphics support | ||
| 396 | # | ||
| 397 | # CONFIG_FB is not set | ||
| 398 | |||
| 399 | # | ||
| 400 | # Sound | ||
| 401 | # | ||
| 402 | # CONFIG_SOUND is not set | ||
| 403 | |||
| 404 | # | ||
| 405 | # USB support | ||
| 406 | # | ||
| 407 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
| 408 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 409 | |||
| 410 | # | ||
| 411 | # USB Gadget Support | ||
| 412 | # | ||
| 413 | # CONFIG_USB_GADGET is not set | ||
| 414 | |||
| 415 | # | ||
| 416 | # Kernel hacking | ||
| 417 | # | ||
| 418 | # CONFIG_PRINTK_TIME is not set | ||
| 419 | CONFIG_DEBUG_KERNEL=y | ||
| 420 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 421 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 422 | # CONFIG_SCHEDSTATS is not set | ||
| 423 | # CONFIG_DEBUG_SLAB is not set | ||
| 424 | # CONFIG_DEBUG_SPINLOCK is not set | ||
| 425 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
| 426 | # CONFIG_DEBUG_KOBJECT is not set | ||
| 427 | CONFIG_DEBUG_INFO=y | ||
| 428 | # CONFIG_DEBUG_FS is not set | ||
| 429 | # CONFIG_NO_KERNEL_MSG is not set | ||
| 430 | |||
| 431 | # | ||
| 432 | # Security options | ||
| 433 | # | ||
| 434 | # CONFIG_KEYS is not set | ||
| 435 | # CONFIG_SECURITY is not set | ||
| 436 | |||
| 437 | # | ||
| 438 | # Cryptographic options | ||
| 439 | # | ||
| 440 | # CONFIG_CRYPTO is not set | ||
| 441 | |||
| 442 | # | ||
| 443 | # Hardware crypto devices | ||
| 444 | # | ||
| 445 | |||
| 446 | # | ||
| 447 | # Library routines | ||
| 448 | # | ||
| 449 | # CONFIG_CRC_CCITT is not set | ||
| 450 | # CONFIG_CRC32 is not set | ||
| 451 | # CONFIG_LIBCRC32C is not set | ||
diff --git a/arch/v850/kernel/Makefile b/arch/v850/kernel/Makefile deleted file mode 100644 index da5889c53576..000000000000 --- a/arch/v850/kernel/Makefile +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | # | ||
| 2 | # arch/v850/kernel/Makefile | ||
| 3 | # | ||
| 4 | # Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | # Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | # | ||
| 7 | # This file is subject to the terms and conditions of the GNU General Public | ||
| 8 | # License. See the file "COPYING" in the main directory of this archive | ||
| 9 | # for more details. | ||
| 10 | # | ||
| 11 | |||
| 12 | extra-y := head.o init_task.o vmlinux.lds | ||
| 13 | |||
| 14 | obj-y += intv.o entry.o process.o syscalls.o time.o setup.o \ | ||
| 15 | signal.o irq.o mach.o ptrace.o bug.o | ||
| 16 | obj-$(CONFIG_MODULES) += module.o v850_ksyms.o | ||
| 17 | # chip-specific code | ||
| 18 | obj-$(CONFIG_V850E_MA1) += ma.o | ||
| 19 | obj-$(CONFIG_V850E_ME2) += me2.o | ||
| 20 | obj-$(CONFIG_V850E_TEG) += teg.o | ||
| 21 | obj-$(CONFIG_V850E_AS85EP1) += as85ep1.o | ||
| 22 | obj-$(CONFIG_V850E2_ANNA) += anna.o | ||
| 23 | # platform-specific code | ||
| 24 | obj-$(CONFIG_V850E_SIM) += sim.o simcons.o | ||
| 25 | obj-$(CONFIG_V850E2_SIM85E2) += sim85e2.o memcons.o | ||
| 26 | obj-$(CONFIG_V850E2_FPGA85E2C) += fpga85e2c.o memcons.o | ||
| 27 | obj-$(CONFIG_RTE_CB) += rte_cb.o rte_cb_leds.o | ||
| 28 | obj-$(CONFIG_RTE_CB_MA1) += rte_ma1_cb.o | ||
| 29 | obj-$(CONFIG_RTE_CB_ME2) += rte_me2_cb.o | ||
| 30 | obj-$(CONFIG_RTE_CB_NB85E) += rte_nb85e_cb.o | ||
| 31 | obj-$(CONFIG_RTE_CB_MULTI) += rte_cb_multi.o | ||
| 32 | obj-$(CONFIG_RTE_MB_A_PCI) += rte_mb_a_pci.o | ||
| 33 | obj-$(CONFIG_RTE_GBUS_INT) += gbus_int.o | ||
| 34 | # feature-specific code | ||
| 35 | obj-$(CONFIG_V850E_INTC) += v850e_intc.o | ||
| 36 | obj-$(CONFIG_V850E_TIMER_D) += v850e_timer_d.o v850e_utils.o | ||
| 37 | obj-$(CONFIG_V850E_CACHE) += v850e_cache.o | ||
| 38 | obj-$(CONFIG_V850E2_CACHE) += v850e2_cache.o | ||
| 39 | obj-$(CONFIG_V850E_HIGHRES_TIMER) += highres_timer.o | ||
| 40 | obj-$(CONFIG_PROC_FS) += procfs.o | ||
diff --git a/arch/v850/kernel/anna-rom.ld b/arch/v850/kernel/anna-rom.ld deleted file mode 100644 index 7c54e7e3f1b1..000000000000 --- a/arch/v850/kernel/anna-rom.ld +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs Anna V850E2 evaluation board | ||
| 2 | (CONFIG_V850E2_ANNA), with kernel in ROM (CONFIG_ROM_KERNEL). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 8MB of flash ROM. */ | ||
| 6 | ROM : ORIGIN = 0, LENGTH = 0x00800000 | ||
| 7 | |||
| 8 | /* 1MB of static RAM. This memory is mirrored 64 times. */ | ||
| 9 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE | ||
| 10 | /* 64MB of DRAM. */ | ||
| 11 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 12 | } | ||
| 13 | |||
| 14 | SECTIONS { | ||
| 15 | ROMK_SECTIONS(ROM, SRAM) | ||
| 16 | } | ||
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c deleted file mode 100644 index 5978a25170fb..000000000000 --- a/arch/v850/kernel/anna.c +++ /dev/null | |||
| @@ -1,202 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/anna.c -- Anna V850E2 evaluation chip/board | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/bootmem.h> | ||
| 18 | #include <linux/major.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | |||
| 21 | #include <asm/machdep.h> | ||
| 22 | #include <asm/atomic.h> | ||
| 23 | #include <asm/page.h> | ||
| 24 | #include <asm/v850e_timer_d.h> | ||
| 25 | #include <asm/v850e_uart.h> | ||
| 26 | |||
| 27 | #include "mach.h" | ||
| 28 | |||
| 29 | |||
| 30 | /* SRAM and SDRAM are vaguely contiguous (with a big hole in between; see | ||
| 31 | mach_reserve_bootmem for details); use both as one big area. */ | ||
| 32 | #define RAM_START SRAM_ADDR | ||
| 33 | #define RAM_END (SDRAM_ADDR + SDRAM_SIZE) | ||
| 34 | |||
| 35 | /* The bits of this port are connected to an 8-LED bar-graph. */ | ||
| 36 | #define LEDS_PORT 0 | ||
| 37 | |||
| 38 | |||
| 39 | static void anna_led_tick (void); | ||
| 40 | |||
| 41 | |||
| 42 | void __init mach_early_init (void) | ||
| 43 | { | ||
| 44 | ANNA_ILBEN = 0; | ||
| 45 | |||
| 46 | V850E2_CSC(0) = 0x402F; | ||
| 47 | V850E2_CSC(1) = 0x4000; | ||
| 48 | V850E2_BPC = 0; | ||
| 49 | V850E2_BSC = 0xAAAA; | ||
| 50 | V850E2_BEC = 0; | ||
| 51 | |||
| 52 | #if 0 | ||
| 53 | V850E2_BHC = 0xFFFF; /* icache all memory, dcache all */ | ||
| 54 | #else | ||
| 55 | V850E2_BHC = 0; /* cache no memory */ | ||
| 56 | #endif | ||
| 57 | V850E2_BCT(0) = 0xB088; | ||
| 58 | V850E2_BCT(1) = 0x0008; | ||
| 59 | V850E2_DWC(0) = 0x0027; | ||
| 60 | V850E2_DWC(1) = 0; | ||
| 61 | V850E2_BCC = 0x0006; | ||
| 62 | V850E2_ASC = 0; | ||
| 63 | V850E2_LBS = 0x0089; | ||
| 64 | V850E2_SCR(3) = 0x21A9; | ||
| 65 | V850E2_RFS(3) = 0x8121; | ||
| 66 | |||
| 67 | v850e_intc_disable_irqs (); | ||
| 68 | } | ||
| 69 | |||
| 70 | void __init mach_setup (char **cmdline) | ||
| 71 | { | ||
| 72 | ANNA_PORT_PM (LEDS_PORT) = 0; /* Make all LED pins output pins. */ | ||
| 73 | mach_tick = anna_led_tick; | ||
| 74 | } | ||
| 75 | |||
| 76 | void __init mach_get_physical_ram (unsigned long *ram_start, | ||
| 77 | unsigned long *ram_len) | ||
| 78 | { | ||
| 79 | *ram_start = RAM_START; | ||
| 80 | *ram_len = RAM_END - RAM_START; | ||
| 81 | } | ||
| 82 | |||
| 83 | void __init mach_reserve_bootmem () | ||
| 84 | { | ||
| 85 | /* The space between SRAM and SDRAM is filled with duplicate | ||
| 86 | images of SRAM. Prevent the kernel from using them. */ | ||
| 87 | reserve_bootmem (SRAM_ADDR + SRAM_SIZE, | ||
| 88 | SDRAM_ADDR - (SRAM_ADDR + SRAM_SIZE), | ||
| 89 | BOOTMEM_DEFAULT); | ||
| 90 | } | ||
| 91 | |||
| 92 | void mach_gettimeofday (struct timespec *tv) | ||
| 93 | { | ||
| 94 | tv->tv_sec = 0; | ||
| 95 | tv->tv_nsec = 0; | ||
| 96 | } | ||
| 97 | |||
| 98 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 99 | { | ||
| 100 | /* Start hardware timer. */ | ||
| 101 | v850e_timer_d_configure (0, HZ); | ||
| 102 | /* Install timer interrupt handler. */ | ||
| 103 | setup_irq (IRQ_INTCMD(0), timer_action); | ||
| 104 | } | ||
| 105 | |||
| 106 | static struct v850e_intc_irq_init irq_inits[] = { | ||
| 107 | { "IRQ", 0, NUM_MACH_IRQS, 1, 7 }, | ||
| 108 | { "PIN", IRQ_INTP(0), IRQ_INTP_NUM, 1, 4 }, | ||
| 109 | { "CCC", IRQ_INTCCC(0), IRQ_INTCCC_NUM, 1, 5 }, | ||
| 110 | { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 }, | ||
| 111 | { "DMA", IRQ_INTDMA(0), IRQ_INTDMA_NUM, 1, 2 }, | ||
| 112 | { "DMXER", IRQ_INTDMXER,1, 1, 2 }, | ||
| 113 | { "SRE", IRQ_INTSRE(0), IRQ_INTSRE_NUM, 3, 3 }, | ||
| 114 | { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 3, 4 }, | ||
| 115 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, | ||
| 116 | { 0 } | ||
| 117 | }; | ||
| 118 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) | ||
| 119 | |||
| 120 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
| 121 | |||
| 122 | void __init mach_init_irqs (void) | ||
| 123 | { | ||
| 124 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 125 | } | ||
| 126 | |||
| 127 | void machine_restart (char *__unused) | ||
| 128 | { | ||
| 129 | #ifdef CONFIG_RESET_GUARD | ||
| 130 | disable_reset_guard (); | ||
| 131 | #endif | ||
| 132 | asm ("jmp r0"); /* Jump to the reset vector. */ | ||
| 133 | } | ||
| 134 | |||
| 135 | void machine_halt (void) | ||
| 136 | { | ||
| 137 | #ifdef CONFIG_RESET_GUARD | ||
| 138 | disable_reset_guard (); | ||
| 139 | #endif | ||
| 140 | local_irq_disable (); /* Ignore all interrupts. */ | ||
| 141 | ANNA_PORT_IO(LEDS_PORT) = 0xAA; /* Note that we halted. */ | ||
| 142 | for (;;) | ||
| 143 | asm ("halt; nop; nop; nop; nop; nop"); | ||
| 144 | } | ||
| 145 | |||
| 146 | void machine_power_off (void) | ||
| 147 | { | ||
| 148 | machine_halt (); | ||
| 149 | } | ||
| 150 | |||
| 151 | /* Called before configuring an on-chip UART. */ | ||
| 152 | void anna_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | ||
| 153 | { | ||
| 154 | /* The Anna connects some general-purpose I/O pins on the CPU to | ||
| 155 | the RTS/CTS lines of UART 1's serial connection. I/O pins P07 | ||
| 156 | and P37 are RTS and CTS respectively. */ | ||
| 157 | if (chan == 1) { | ||
| 158 | ANNA_PORT_PM(0) &= ~0x80; /* P07 in output mode */ | ||
| 159 | ANNA_PORT_PM(3) |= 0x80; /* P37 in input mode */ | ||
| 160 | } | ||
| 161 | } | ||
| 162 | |||
| 163 | /* Minimum and maximum bounds for the moving upper LED boundary in the | ||
| 164 | clock tick display. We can't use the last bit because it's used for | ||
| 165 | UART0's CTS output. */ | ||
| 166 | #define MIN_MAX_POS 0 | ||
| 167 | #define MAX_MAX_POS 6 | ||
| 168 | |||
| 169 | /* There are MAX_MAX_POS^2 - MIN_MAX_POS^2 cycles in the animation, so if | ||
| 170 | we pick 6 and 0 as above, we get 49 cycles, which is when divided into | ||
| 171 | the standard 100 value for HZ, gives us an almost 1s total time. */ | ||
| 172 | #define TICKS_PER_FRAME \ | ||
| 173 | (HZ / (MAX_MAX_POS * MAX_MAX_POS - MIN_MAX_POS * MIN_MAX_POS)) | ||
| 174 | |||
| 175 | static void anna_led_tick () | ||
| 176 | { | ||
| 177 | static unsigned counter = 0; | ||
| 178 | |||
| 179 | if (++counter == TICKS_PER_FRAME) { | ||
| 180 | static int pos = 0, max_pos = MAX_MAX_POS, dir = 1; | ||
| 181 | |||
| 182 | if (dir > 0 && pos == max_pos) { | ||
| 183 | dir = -1; | ||
| 184 | if (max_pos == MIN_MAX_POS) | ||
| 185 | max_pos = MAX_MAX_POS; | ||
| 186 | else | ||
| 187 | max_pos--; | ||
| 188 | } else { | ||
| 189 | if (dir < 0 && pos == 0) | ||
| 190 | dir = 1; | ||
| 191 | |||
| 192 | if (pos + dir <= max_pos) { | ||
| 193 | /* Each bit of port 0 has a LED. */ | ||
| 194 | clear_bit (pos, &ANNA_PORT_IO(LEDS_PORT)); | ||
| 195 | pos += dir; | ||
| 196 | set_bit (pos, &ANNA_PORT_IO(LEDS_PORT)); | ||
| 197 | } | ||
| 198 | } | ||
| 199 | |||
| 200 | counter = 0; | ||
| 201 | } | ||
| 202 | } | ||
diff --git a/arch/v850/kernel/anna.ld b/arch/v850/kernel/anna.ld deleted file mode 100644 index df7f80f2833d..000000000000 --- a/arch/v850/kernel/anna.ld +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs Anna V850E2 evaluation board | ||
| 2 | (CONFIG_V850E2_ANNA). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 256KB of internal memory (followed by one mirror). */ | ||
| 6 | iMEM0 : ORIGIN = 0, LENGTH = 0x00040000 | ||
| 7 | /* 256KB of internal memory (followed by one mirror). */ | ||
| 8 | iMEM1 : ORIGIN = 0x00040000, LENGTH = 0x00040000 | ||
| 9 | |||
| 10 | /* 1MB of static RAM. This memory is mirrored 64 times. */ | ||
| 11 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE | ||
| 12 | /* 64MB of DRAM. */ | ||
| 13 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 14 | } | ||
| 15 | |||
| 16 | SECTIONS { | ||
| 17 | .intv : { INTV_CONTENTS } > iMEM0 | ||
| 18 | .sram : { RAMK_KRAM_CONTENTS } > SRAM | ||
| 19 | .root : { ROOT_FS_CONTENTS } > SDRAM | ||
| 20 | } | ||
diff --git a/arch/v850/kernel/as85ep1-rom.ld b/arch/v850/kernel/as85ep1-rom.ld deleted file mode 100644 index fe2a9a3ab525..000000000000 --- a/arch/v850/kernel/as85ep1-rom.ld +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | /* Linker script for the NEC AS85EP1 V850E evaluation board | ||
| 2 | (CONFIG_V850E_AS85EP1), with kernel in ROM (CONFIG_ROM_KERNEL). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 4MB of flash ROM. */ | ||
| 6 | ROM : ORIGIN = 0, LENGTH = 0x00400000 | ||
| 7 | |||
| 8 | /* 1MB of static RAM. */ | ||
| 9 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE | ||
| 10 | |||
| 11 | /* About 58MB of DRAM. This can actually be at one of two | ||
| 12 | positions, determined by jumper JP3; we have to use the first | ||
| 13 | position because the second is partially out of processor | ||
| 14 | instruction addressing range (though in the second position | ||
| 15 | there's actually 64MB available). */ | ||
| 16 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 17 | } | ||
| 18 | |||
| 19 | SECTIONS { | ||
| 20 | ROMK_SECTIONS(ROM, SRAM) | ||
| 21 | } | ||
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c deleted file mode 100644 index b525ecf3aea4..000000000000 --- a/arch/v850/kernel/as85ep1.c +++ /dev/null | |||
| @@ -1,234 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/as85ep1.c -- AS85EP1 V850E evaluation chip/board | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/bootmem.h> | ||
| 18 | #include <linux/major.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | |||
| 21 | #include <asm/machdep.h> | ||
| 22 | #include <asm/atomic.h> | ||
| 23 | #include <asm/page.h> | ||
| 24 | #include <asm/v850e_timer_d.h> | ||
| 25 | #include <asm/v850e_uart.h> | ||
| 26 | |||
| 27 | #include "mach.h" | ||
| 28 | |||
| 29 | |||
| 30 | /* SRAM and SDRAM are vaguely contiguous (with a big hole in between; see | ||
| 31 | mach_reserve_bootmem for details); use both as one big area. */ | ||
| 32 | #define RAM_START SRAM_ADDR | ||
| 33 | #define RAM_END (SDRAM_ADDR + SDRAM_SIZE) | ||
| 34 | |||
| 35 | /* The bits of this port are connected to an 8-LED bar-graph. */ | ||
| 36 | #define LEDS_PORT 4 | ||
| 37 | |||
| 38 | |||
| 39 | static void as85ep1_led_tick (void); | ||
| 40 | |||
| 41 | extern char _intv_copy_src_start, _intv_copy_src_end; | ||
| 42 | extern char _intv_copy_dst_start; | ||
| 43 | |||
| 44 | |||
| 45 | void __init mach_early_init (void) | ||
| 46 | { | ||
| 47 | #ifndef CONFIG_ROM_KERNEL | ||
| 48 | const u32 *src; | ||
| 49 | register u32 *dst asm ("ep"); | ||
| 50 | #endif | ||
| 51 | |||
| 52 | AS85EP1_CSC(0) = 0x0403; | ||
| 53 | AS85EP1_BCT(0) = 0xB8B8; | ||
| 54 | AS85EP1_DWC(0) = 0x0104; | ||
| 55 | AS85EP1_BCC = 0x0012; | ||
| 56 | AS85EP1_ASC = 0; | ||
| 57 | AS85EP1_LBS = 0x00A9; | ||
| 58 | |||
| 59 | AS85EP1_PORT_PMC(6) = 0xFF; /* valid A0,A1,A20-A25 */ | ||
| 60 | AS85EP1_PORT_PMC(7) = 0x0E; /* valid CS1-CS3 */ | ||
| 61 | AS85EP1_PORT_PMC(9) = 0xFF; /* valid D16-D23 */ | ||
| 62 | AS85EP1_PORT_PMC(10) = 0xFF; /* valid D24-D31 */ | ||
| 63 | |||
| 64 | AS85EP1_RFS(1) = 0x800c; | ||
| 65 | AS85EP1_RFS(3) = 0x800c; | ||
| 66 | AS85EP1_SCR(1) = 0x20A9; | ||
| 67 | AS85EP1_SCR(3) = 0x20A9; | ||
| 68 | |||
| 69 | #ifndef CONFIG_ROM_KERNEL | ||
| 70 | /* The early chip we have is buggy, and writing the interrupt | ||
| 71 | vectors into low RAM may screw up, so for non-ROM kernels, we | ||
| 72 | only rely on the reset vector being downloaded, and copy the | ||
| 73 | rest of the interrupt vectors into place here. The specific bug | ||
| 74 | is that writing address N, where (N & 0x10) == 0x10, will _also_ | ||
| 75 | write to address (N - 0x10). We avoid this (effectively) by | ||
| 76 | writing in 16-byte chunks backwards from the end. */ | ||
| 77 | |||
| 78 | AS85EP1_IRAMM = 0x3; /* "write-mode" for the internal instruction memory */ | ||
| 79 | |||
| 80 | src = (u32 *)(((u32)&_intv_copy_src_end - 1) & ~0xF); | ||
| 81 | dst = (u32 *)&_intv_copy_dst_start | ||
| 82 | + (src - (u32 *)&_intv_copy_src_start); | ||
| 83 | do { | ||
| 84 | u32 t0 = src[0], t1 = src[1], t2 = src[2], t3 = src[3]; | ||
| 85 | dst[0] = t0; dst[1] = t1; dst[2] = t2; dst[3] = t3; | ||
| 86 | dst -= 4; | ||
| 87 | src -= 4; | ||
| 88 | } while (src > (u32 *)&_intv_copy_src_start); | ||
| 89 | |||
| 90 | AS85EP1_IRAMM = 0x0; /* "read-mode" for the internal instruction memory */ | ||
| 91 | #endif /* !CONFIG_ROM_KERNEL */ | ||
| 92 | |||
| 93 | v850e_intc_disable_irqs (); | ||
| 94 | } | ||
| 95 | |||
| 96 | void __init mach_setup (char **cmdline) | ||
| 97 | { | ||
| 98 | AS85EP1_PORT_PMC (LEDS_PORT) = 0; /* Make the LEDs port an I/O port. */ | ||
| 99 | AS85EP1_PORT_PM (LEDS_PORT) = 0; /* Make all the bits output pins. */ | ||
| 100 | mach_tick = as85ep1_led_tick; | ||
| 101 | } | ||
| 102 | |||
| 103 | void __init mach_get_physical_ram (unsigned long *ram_start, | ||
| 104 | unsigned long *ram_len) | ||
| 105 | { | ||
| 106 | *ram_start = RAM_START; | ||
| 107 | *ram_len = RAM_END - RAM_START; | ||
| 108 | } | ||
| 109 | |||
| 110 | /* Convenience macros. */ | ||
| 111 | #define SRAM_END (SRAM_ADDR + SRAM_SIZE) | ||
| 112 | #define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE) | ||
| 113 | |||
| 114 | void __init mach_reserve_bootmem () | ||
| 115 | { | ||
| 116 | if (SDRAM_ADDR < RAM_END && SDRAM_ADDR > RAM_START) | ||
| 117 | /* We can't use the space between SRAM and SDRAM, so | ||
| 118 | prevent the kernel from trying. */ | ||
| 119 | reserve_bootmem(SRAM_END, SDRAM_ADDR - SRAM_END, | ||
| 120 | BOOTMEM_DEFAULT); | ||
| 121 | } | ||
| 122 | |||
| 123 | void mach_gettimeofday (struct timespec *tv) | ||
| 124 | { | ||
| 125 | tv->tv_sec = 0; | ||
| 126 | tv->tv_nsec = 0; | ||
| 127 | } | ||
| 128 | |||
| 129 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 130 | { | ||
| 131 | /* Start hardware timer. */ | ||
| 132 | v850e_timer_d_configure (0, HZ); | ||
| 133 | /* Install timer interrupt handler. */ | ||
| 134 | setup_irq (IRQ_INTCMD(0), timer_action); | ||
| 135 | } | ||
| 136 | |||
| 137 | static struct v850e_intc_irq_init irq_inits[] = { | ||
| 138 | { "IRQ", 0, NUM_MACH_IRQS, 1, 7 }, | ||
| 139 | { "CCC", IRQ_INTCCC(0), IRQ_INTCCC_NUM, 1, 5 }, | ||
| 140 | { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 }, | ||
| 141 | { "SRE", IRQ_INTSRE(0), IRQ_INTSRE_NUM, 3, 3 }, | ||
| 142 | { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 3, 4 }, | ||
| 143 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, | ||
| 144 | { 0 } | ||
| 145 | }; | ||
| 146 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) | ||
| 147 | |||
| 148 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
| 149 | |||
| 150 | void __init mach_init_irqs (void) | ||
| 151 | { | ||
| 152 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 153 | } | ||
| 154 | |||
| 155 | void machine_restart (char *__unused) | ||
| 156 | { | ||
| 157 | #ifdef CONFIG_RESET_GUARD | ||
| 158 | disable_reset_guard (); | ||
| 159 | #endif | ||
| 160 | asm ("jmp r0"); /* Jump to the reset vector. */ | ||
| 161 | } | ||
| 162 | |||
| 163 | void machine_halt (void) | ||
| 164 | { | ||
| 165 | #ifdef CONFIG_RESET_GUARD | ||
| 166 | disable_reset_guard (); | ||
| 167 | #endif | ||
| 168 | local_irq_disable (); /* Ignore all interrupts. */ | ||
| 169 | AS85EP1_PORT_IO (LEDS_PORT) = 0xAA; /* Note that we halted. */ | ||
| 170 | for (;;) | ||
| 171 | asm ("halt; nop; nop; nop; nop; nop"); | ||
| 172 | } | ||
| 173 | |||
| 174 | void machine_power_off (void) | ||
| 175 | { | ||
| 176 | machine_halt (); | ||
| 177 | } | ||
| 178 | |||
| 179 | /* Called before configuring an on-chip UART. */ | ||
| 180 | void as85ep1_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | ||
| 181 | { | ||
| 182 | /* Make the shared uart/port pins be uart pins. */ | ||
| 183 | AS85EP1_PORT_PMC(3) |= (0x5 << chan); | ||
| 184 | |||
| 185 | /* The AS85EP1 connects some general-purpose I/O pins on the CPU to | ||
| 186 | the RTS/CTS lines of UART 1's serial connection. I/O pins P53 | ||
| 187 | and P54 are RTS and CTS respectively. */ | ||
| 188 | if (chan == 1) { | ||
| 189 | /* Put P53 & P54 in I/O port mode. */ | ||
| 190 | AS85EP1_PORT_PMC(5) &= ~0x18; | ||
| 191 | /* Make P53 an output, and P54 an input. */ | ||
| 192 | AS85EP1_PORT_PM(5) |= 0x10; | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | /* Minimum and maximum bounds for the moving upper LED boundary in the | ||
| 197 | clock tick display. */ | ||
| 198 | #define MIN_MAX_POS 0 | ||
| 199 | #define MAX_MAX_POS 7 | ||
| 200 | |||
| 201 | /* There are MAX_MAX_POS^2 - MIN_MAX_POS^2 cycles in the animation, so if | ||
| 202 | we pick 6 and 0 as above, we get 49 cycles, which is when divided into | ||
| 203 | the standard 100 value for HZ, gives us an almost 1s total time. */ | ||
| 204 | #define TICKS_PER_FRAME \ | ||
| 205 | (HZ / (MAX_MAX_POS * MAX_MAX_POS - MIN_MAX_POS * MIN_MAX_POS)) | ||
| 206 | |||
| 207 | static void as85ep1_led_tick () | ||
| 208 | { | ||
| 209 | static unsigned counter = 0; | ||
| 210 | |||
| 211 | if (++counter == TICKS_PER_FRAME) { | ||
| 212 | static int pos = 0, max_pos = MAX_MAX_POS, dir = 1; | ||
| 213 | |||
| 214 | if (dir > 0 && pos == max_pos) { | ||
| 215 | dir = -1; | ||
| 216 | if (max_pos == MIN_MAX_POS) | ||
| 217 | max_pos = MAX_MAX_POS; | ||
| 218 | else | ||
| 219 | max_pos--; | ||
| 220 | } else { | ||
| 221 | if (dir < 0 && pos == 0) | ||
| 222 | dir = 1; | ||
| 223 | |||
| 224 | if (pos + dir <= max_pos) { | ||
| 225 | /* Each bit of port 0 has a LED. */ | ||
| 226 | set_bit (pos, &AS85EP1_PORT_IO(LEDS_PORT)); | ||
| 227 | pos += dir; | ||
| 228 | clear_bit (pos, &AS85EP1_PORT_IO(LEDS_PORT)); | ||
| 229 | } | ||
| 230 | } | ||
| 231 | |||
| 232 | counter = 0; | ||
| 233 | } | ||
| 234 | } | ||
diff --git a/arch/v850/kernel/as85ep1.ld b/arch/v850/kernel/as85ep1.ld deleted file mode 100644 index ef2c4399063e..000000000000 --- a/arch/v850/kernel/as85ep1.ld +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* Linker script for the NEC AS85EP1 V850E evaluation board | ||
| 2 | (CONFIG_V850E_AS85EP1). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 1MB of internal instruction memory. */ | ||
| 6 | iMEM0 : ORIGIN = 0, LENGTH = 0x00100000 | ||
| 7 | |||
| 8 | /* 1MB of static RAM. */ | ||
| 9 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE | ||
| 10 | |||
| 11 | /* About 58MB of DRAM. This can actually be at one of two | ||
| 12 | positions, determined by jump JP3; we have to use the first | ||
| 13 | position because the second is partially out of processor | ||
| 14 | instruction addressing range (though in the second position | ||
| 15 | there's actually 64MB available). */ | ||
| 16 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 17 | } | ||
| 18 | |||
| 19 | SECTIONS { | ||
| 20 | .resetv : { | ||
| 21 | __intv_start = . ; | ||
| 22 | *(.intv.reset) /* Reset vector */ | ||
| 23 | } > iMEM0 | ||
| 24 | |||
| 25 | .sram : { | ||
| 26 | RAMK_KRAM_CONTENTS | ||
| 27 | |||
| 28 | /* We stick most of the interrupt vectors here; they'll be | ||
| 29 | copied into the proper location by the early init code (we | ||
| 30 | can't put them directly in the right place because of | ||
| 31 | hardware bugs). The vectors shouldn't need to be | ||
| 32 | relocated, so we don't have to use `> ... AT> ...' to | ||
| 33 | split the load/vm addresses (and we can't because of | ||
| 34 | problems with the loader). */ | ||
| 35 | . = ALIGN (0x10) ; | ||
| 36 | __intv_copy_src_start = . ; | ||
| 37 | *(.intv.common) /* Vectors common to all v850e proc. */ | ||
| 38 | *(.intv.mach) /* Machine-specific int. vectors. */ | ||
| 39 | . = ALIGN (0x10) ; | ||
| 40 | __intv_copy_src_end = . ; | ||
| 41 | } > SRAM | ||
| 42 | |||
| 43 | /* Where we end up putting the vectors. */ | ||
| 44 | __intv_copy_dst_start = 0x10 ; | ||
| 45 | __intv_copy_dst_end = __intv_copy_dst_start + (__intv_copy_src_end - __intv_copy_src_start) ; | ||
| 46 | __intv_end = __intv_copy_dst_end ; | ||
| 47 | |||
| 48 | .root : { ROOT_FS_CONTENTS } > SDRAM | ||
| 49 | } | ||
diff --git a/arch/v850/kernel/asm-offsets.c b/arch/v850/kernel/asm-offsets.c deleted file mode 100644 index 581e6986a776..000000000000 --- a/arch/v850/kernel/asm-offsets.c +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * This program is used to generate definitions needed by | ||
| 3 | * assembly language modules. | ||
| 4 | * | ||
| 5 | * We use the technique used in the OSF Mach kernel code: | ||
| 6 | * generate asm statements containing #defines, | ||
| 7 | * compile this file to assembler, and then extract the | ||
| 8 | * #defines from the assembly-language output. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <linux/stddef.h> | ||
| 12 | #include <linux/sched.h> | ||
| 13 | #include <linux/kernel_stat.h> | ||
| 14 | #include <linux/ptrace.h> | ||
| 15 | #include <linux/hardirq.h> | ||
| 16 | #include <linux/kbuild.h> | ||
| 17 | |||
| 18 | #include <asm/irq.h> | ||
| 19 | #include <asm/errno.h> | ||
| 20 | |||
| 21 | int main (void) | ||
| 22 | { | ||
| 23 | /* offsets into the task struct */ | ||
| 24 | DEFINE (TASK_STATE, offsetof (struct task_struct, state)); | ||
| 25 | DEFINE (TASK_FLAGS, offsetof (struct task_struct, flags)); | ||
| 26 | DEFINE (TASK_PTRACE, offsetof (struct task_struct, ptrace)); | ||
| 27 | DEFINE (TASK_BLOCKED, offsetof (struct task_struct, blocked)); | ||
| 28 | DEFINE (TASK_THREAD, offsetof (struct task_struct, thread)); | ||
| 29 | DEFINE (TASK_THREAD_INFO, offsetof (struct task_struct, stack)); | ||
| 30 | DEFINE (TASK_MM, offsetof (struct task_struct, mm)); | ||
| 31 | DEFINE (TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); | ||
| 32 | DEFINE (TASK_PID, offsetof (struct task_struct, pid)); | ||
| 33 | |||
| 34 | /* offsets into the kernel_stat struct */ | ||
| 35 | DEFINE (STAT_IRQ, offsetof (struct kernel_stat, irqs)); | ||
| 36 | |||
| 37 | |||
| 38 | /* signal defines */ | ||
| 39 | DEFINE (SIGSEGV, SIGSEGV); | ||
| 40 | DEFINE (SEGV_MAPERR, SEGV_MAPERR); | ||
| 41 | DEFINE (SIGTRAP, SIGTRAP); | ||
| 42 | DEFINE (SIGCHLD, SIGCHLD); | ||
| 43 | DEFINE (SIGILL, SIGILL); | ||
| 44 | DEFINE (TRAP_TRACE, TRAP_TRACE); | ||
| 45 | |||
| 46 | /* ptrace flag bits */ | ||
| 47 | DEFINE (PT_PTRACED, PT_PTRACED); | ||
| 48 | DEFINE (PT_DTRACE, PT_DTRACE); | ||
| 49 | |||
| 50 | /* error values */ | ||
| 51 | DEFINE (ENOSYS, ENOSYS); | ||
| 52 | |||
| 53 | /* clone flag bits */ | ||
| 54 | DEFINE (CLONE_VFORK, CLONE_VFORK); | ||
| 55 | DEFINE (CLONE_VM, CLONE_VM); | ||
| 56 | |||
| 57 | return 0; | ||
| 58 | } | ||
diff --git a/arch/v850/kernel/bug.c b/arch/v850/kernel/bug.c deleted file mode 100644 index c78cf750915a..000000000000 --- a/arch/v850/kernel/bug.c +++ /dev/null | |||
| @@ -1,142 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/bug.c -- Bug reporting functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/reboot.h> | ||
| 16 | #include <linux/sched.h> | ||
| 17 | #include <linux/module.h> | ||
| 18 | |||
| 19 | #include <asm/errno.h> | ||
| 20 | #include <asm/ptrace.h> | ||
| 21 | #include <asm/processor.h> | ||
| 22 | #include <asm/current.h> | ||
| 23 | |||
| 24 | /* We should use __builtin_return_address, but it doesn't work in gcc-2.90 | ||
| 25 | (which is currently our standard compiler on the v850). */ | ||
| 26 | #define ret_addr() ({ register u32 lp asm ("lp"); lp; }) | ||
| 27 | #define stack_addr() ({ register u32 sp asm ("sp"); sp; }) | ||
| 28 | |||
| 29 | void __bug () | ||
| 30 | { | ||
| 31 | printk (KERN_CRIT "kernel BUG at PC 0x%x (SP ~0x%x)!\n", | ||
| 32 | ret_addr() - 4, /* - 4 for `jarl' */ | ||
| 33 | stack_addr()); | ||
| 34 | machine_halt (); | ||
| 35 | } | ||
| 36 | |||
| 37 | int bad_trap (int trap_num, struct pt_regs *regs) | ||
| 38 | { | ||
| 39 | printk (KERN_CRIT | ||
| 40 | "unimplemented trap %d called at 0x%08lx, pid %d!\n", | ||
| 41 | trap_num, regs->pc, current->pid); | ||
| 42 | return -ENOSYS; | ||
| 43 | } | ||
| 44 | |||
| 45 | #ifdef CONFIG_RESET_GUARD | ||
| 46 | void unexpected_reset (unsigned long ret_addr, unsigned long kmode, | ||
| 47 | struct task_struct *task, unsigned long sp) | ||
| 48 | { | ||
| 49 | printk (KERN_CRIT | ||
| 50 | "unexpected reset in %s mode, pid %d" | ||
| 51 | " (ret_addr = 0x%lx, sp = 0x%lx)\n", | ||
| 52 | kmode ? "kernel" : "user", | ||
| 53 | task ? task->pid : -1, | ||
| 54 | ret_addr, sp); | ||
| 55 | |||
| 56 | machine_halt (); | ||
| 57 | } | ||
| 58 | #endif /* CONFIG_RESET_GUARD */ | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | struct spec_reg_name { | ||
| 63 | const char *name; | ||
| 64 | int gpr; | ||
| 65 | }; | ||
| 66 | |||
| 67 | struct spec_reg_name spec_reg_names[] = { | ||
| 68 | { "sp", GPR_SP }, | ||
| 69 | { "gp", GPR_GP }, | ||
| 70 | { "tp", GPR_TP }, | ||
| 71 | { "ep", GPR_EP }, | ||
| 72 | { "lp", GPR_LP }, | ||
| 73 | { 0, 0 } | ||
| 74 | }; | ||
| 75 | |||
| 76 | void show_regs (struct pt_regs *regs) | ||
| 77 | { | ||
| 78 | int gpr_base, gpr_offs; | ||
| 79 | |||
| 80 | printk (" pc 0x%08lx psw 0x%08lx kernel_mode %d\n", | ||
| 81 | regs->pc, regs->psw, regs->kernel_mode); | ||
| 82 | printk (" ctpc 0x%08lx ctpsw 0x%08lx ctbp 0x%08lx\n", | ||
| 83 | regs->ctpc, regs->ctpsw, regs->ctbp); | ||
| 84 | |||
| 85 | for (gpr_base = 0; gpr_base < NUM_GPRS; gpr_base += 4) { | ||
| 86 | for (gpr_offs = 0; gpr_offs < 4; gpr_offs++) { | ||
| 87 | int gpr = gpr_base + gpr_offs; | ||
| 88 | long val = regs->gpr[gpr]; | ||
| 89 | struct spec_reg_name *srn; | ||
| 90 | |||
| 91 | for (srn = spec_reg_names; srn->name; srn++) | ||
| 92 | if (srn->gpr == gpr) | ||
| 93 | break; | ||
| 94 | |||
| 95 | if (srn->name) | ||
| 96 | printk ("%7s 0x%08lx", srn->name, val); | ||
| 97 | else | ||
| 98 | printk (" r%02d 0x%08lx", gpr, val); | ||
| 99 | } | ||
| 100 | |||
| 101 | printk ("\n"); | ||
| 102 | } | ||
| 103 | } | ||
| 104 | |||
| 105 | /* | ||
| 106 | * TASK is a pointer to the task whose backtrace we want to see (or NULL | ||
| 107 | * for current task), SP is the stack pointer of the first frame that | ||
| 108 | * should be shown in the back trace (or NULL if the entire call-chain of | ||
| 109 | * the task should be shown). | ||
| 110 | */ | ||
| 111 | void show_stack (struct task_struct *task, unsigned long *sp) | ||
| 112 | { | ||
| 113 | unsigned long addr, end; | ||
| 114 | |||
| 115 | if (sp) | ||
| 116 | addr = (unsigned long)sp; | ||
| 117 | else if (task) | ||
| 118 | addr = task_sp (task); | ||
| 119 | else | ||
| 120 | addr = stack_addr (); | ||
| 121 | |||
| 122 | addr = addr & ~3; | ||
| 123 | end = (addr + THREAD_SIZE - 1) & THREAD_MASK; | ||
| 124 | |||
| 125 | while (addr < end) { | ||
| 126 | printk ("%8lX: ", addr); | ||
| 127 | while (addr < end) { | ||
| 128 | printk (" %8lX", *(unsigned long *)addr); | ||
| 129 | addr += sizeof (unsigned long); | ||
| 130 | if (! (addr & 0xF)) | ||
| 131 | break; | ||
| 132 | } | ||
| 133 | printk ("\n"); | ||
| 134 | } | ||
| 135 | } | ||
| 136 | |||
| 137 | void dump_stack () | ||
| 138 | { | ||
| 139 | show_stack (0, 0); | ||
| 140 | } | ||
| 141 | |||
| 142 | EXPORT_SYMBOL(dump_stack); | ||
diff --git a/arch/v850/kernel/entry.S b/arch/v850/kernel/entry.S deleted file mode 100644 index e4327a8d6bcd..000000000000 --- a/arch/v850/kernel/entry.S +++ /dev/null | |||
| @@ -1,1121 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/entry.S -- Low-level system-call handling, trap handlers, | ||
| 3 | * and context-switching | ||
| 4 | * | ||
| 5 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/sys.h> | ||
| 16 | |||
| 17 | #include <asm/entry.h> | ||
| 18 | #include <asm/current.h> | ||
| 19 | #include <asm/thread_info.h> | ||
| 20 | #include <asm/clinkage.h> | ||
| 21 | #include <asm/processor.h> | ||
| 22 | #include <asm/irq.h> | ||
| 23 | #include <asm/errno.h> | ||
| 24 | |||
| 25 | #include <asm/asm-offsets.h> | ||
| 26 | |||
| 27 | |||
| 28 | /* Make a slightly more convenient alias for C_SYMBOL_NAME. */ | ||
| 29 | #define CSYM C_SYMBOL_NAME | ||
| 30 | |||
| 31 | |||
| 32 | /* The offset of the struct pt_regs in a state-save-frame on the stack. */ | ||
| 33 | #define PTO STATE_SAVE_PT_OFFSET | ||
| 34 | |||
| 35 | |||
| 36 | /* Save argument registers to the state-save-frame pointed to by EP. */ | ||
| 37 | #define SAVE_ARG_REGS \ | ||
| 38 | sst.w r6, PTO+PT_GPR(6)[ep]; \ | ||
| 39 | sst.w r7, PTO+PT_GPR(7)[ep]; \ | ||
| 40 | sst.w r8, PTO+PT_GPR(8)[ep]; \ | ||
| 41 | sst.w r9, PTO+PT_GPR(9)[ep] | ||
| 42 | /* Restore argument registers from the state-save-frame pointed to by EP. */ | ||
| 43 | #define RESTORE_ARG_REGS \ | ||
| 44 | sld.w PTO+PT_GPR(6)[ep], r6; \ | ||
| 45 | sld.w PTO+PT_GPR(7)[ep], r7; \ | ||
| 46 | sld.w PTO+PT_GPR(8)[ep], r8; \ | ||
| 47 | sld.w PTO+PT_GPR(9)[ep], r9 | ||
| 48 | |||
| 49 | /* Save value return registers to the state-save-frame pointed to by EP. */ | ||
| 50 | #define SAVE_RVAL_REGS \ | ||
| 51 | sst.w r10, PTO+PT_GPR(10)[ep]; \ | ||
| 52 | sst.w r11, PTO+PT_GPR(11)[ep] | ||
| 53 | /* Restore value return registers from the state-save-frame pointed to by EP. */ | ||
| 54 | #define RESTORE_RVAL_REGS \ | ||
| 55 | sld.w PTO+PT_GPR(10)[ep], r10; \ | ||
| 56 | sld.w PTO+PT_GPR(11)[ep], r11 | ||
| 57 | |||
| 58 | |||
| 59 | #define SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS \ | ||
| 60 | sst.w r1, PTO+PT_GPR(1)[ep]; \ | ||
| 61 | sst.w r5, PTO+PT_GPR(5)[ep] | ||
| 62 | #define SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL \ | ||
| 63 | sst.w r12, PTO+PT_GPR(12)[ep]; \ | ||
| 64 | sst.w r13, PTO+PT_GPR(13)[ep]; \ | ||
| 65 | sst.w r14, PTO+PT_GPR(14)[ep]; \ | ||
| 66 | sst.w r15, PTO+PT_GPR(15)[ep]; \ | ||
| 67 | sst.w r16, PTO+PT_GPR(16)[ep]; \ | ||
| 68 | sst.w r17, PTO+PT_GPR(17)[ep]; \ | ||
| 69 | sst.w r18, PTO+PT_GPR(18)[ep]; \ | ||
| 70 | sst.w r19, PTO+PT_GPR(19)[ep] | ||
| 71 | #define RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS \ | ||
| 72 | sld.w PTO+PT_GPR(1)[ep], r1; \ | ||
| 73 | sld.w PTO+PT_GPR(5)[ep], r5 | ||
| 74 | #define RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL \ | ||
| 75 | sld.w PTO+PT_GPR(12)[ep], r12; \ | ||
| 76 | sld.w PTO+PT_GPR(13)[ep], r13; \ | ||
| 77 | sld.w PTO+PT_GPR(14)[ep], r14; \ | ||
| 78 | sld.w PTO+PT_GPR(15)[ep], r15; \ | ||
| 79 | sld.w PTO+PT_GPR(16)[ep], r16; \ | ||
| 80 | sld.w PTO+PT_GPR(17)[ep], r17; \ | ||
| 81 | sld.w PTO+PT_GPR(18)[ep], r18; \ | ||
| 82 | sld.w PTO+PT_GPR(19)[ep], r19 | ||
| 83 | |||
| 84 | /* Save `call clobbered' registers to the state-save-frame pointed to by EP. */ | ||
| 85 | #define SAVE_CALL_CLOBBERED_REGS \ | ||
| 86 | SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ | ||
| 87 | SAVE_ARG_REGS; \ | ||
| 88 | SAVE_RVAL_REGS; \ | ||
| 89 | SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL | ||
| 90 | /* Restore `call clobbered' registers from the state-save-frame pointed to | ||
| 91 | by EP. */ | ||
| 92 | #define RESTORE_CALL_CLOBBERED_REGS \ | ||
| 93 | RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ | ||
| 94 | RESTORE_ARG_REGS; \ | ||
| 95 | RESTORE_RVAL_REGS; \ | ||
| 96 | RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL | ||
| 97 | |||
| 98 | /* Save `call clobbered' registers except for the return-value registers | ||
| 99 | to the state-save-frame pointed to by EP. */ | ||
| 100 | #define SAVE_CALL_CLOBBERED_REGS_NO_RVAL \ | ||
| 101 | SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ | ||
| 102 | SAVE_ARG_REGS; \ | ||
| 103 | SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL | ||
| 104 | /* Restore `call clobbered' registers except for the return-value registers | ||
| 105 | from the state-save-frame pointed to by EP. */ | ||
| 106 | #define RESTORE_CALL_CLOBBERED_REGS_NO_RVAL \ | ||
| 107 | RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \ | ||
| 108 | RESTORE_ARG_REGS; \ | ||
| 109 | RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL | ||
| 110 | |||
| 111 | /* Save `call saved' registers to the state-save-frame pointed to by EP. */ | ||
| 112 | #define SAVE_CALL_SAVED_REGS \ | ||
| 113 | sst.w r2, PTO+PT_GPR(2)[ep]; \ | ||
| 114 | sst.w r20, PTO+PT_GPR(20)[ep]; \ | ||
| 115 | sst.w r21, PTO+PT_GPR(21)[ep]; \ | ||
| 116 | sst.w r22, PTO+PT_GPR(22)[ep]; \ | ||
| 117 | sst.w r23, PTO+PT_GPR(23)[ep]; \ | ||
| 118 | sst.w r24, PTO+PT_GPR(24)[ep]; \ | ||
| 119 | sst.w r25, PTO+PT_GPR(25)[ep]; \ | ||
| 120 | sst.w r26, PTO+PT_GPR(26)[ep]; \ | ||
| 121 | sst.w r27, PTO+PT_GPR(27)[ep]; \ | ||
| 122 | sst.w r28, PTO+PT_GPR(28)[ep]; \ | ||
| 123 | sst.w r29, PTO+PT_GPR(29)[ep] | ||
| 124 | /* Restore `call saved' registers from the state-save-frame pointed to by EP. */ | ||
| 125 | #define RESTORE_CALL_SAVED_REGS \ | ||
| 126 | sld.w PTO+PT_GPR(2)[ep], r2; \ | ||
| 127 | sld.w PTO+PT_GPR(20)[ep], r20; \ | ||
| 128 | sld.w PTO+PT_GPR(21)[ep], r21; \ | ||
| 129 | sld.w PTO+PT_GPR(22)[ep], r22; \ | ||
| 130 | sld.w PTO+PT_GPR(23)[ep], r23; \ | ||
| 131 | sld.w PTO+PT_GPR(24)[ep], r24; \ | ||
| 132 | sld.w PTO+PT_GPR(25)[ep], r25; \ | ||
| 133 | sld.w PTO+PT_GPR(26)[ep], r26; \ | ||
| 134 | sld.w PTO+PT_GPR(27)[ep], r27; \ | ||
| 135 | sld.w PTO+PT_GPR(28)[ep], r28; \ | ||
| 136 | sld.w PTO+PT_GPR(29)[ep], r29 | ||
| 137 | |||
| 138 | |||
| 139 | /* Save the PC stored in the special register SAVEREG to the state-save-frame | ||
| 140 | pointed to by EP. r19 is clobbered. */ | ||
| 141 | #define SAVE_PC(savereg) \ | ||
| 142 | stsr SR_ ## savereg, r19; \ | ||
| 143 | sst.w r19, PTO+PT_PC[ep] | ||
| 144 | /* Restore the PC from the state-save-frame pointed to by EP, to the special | ||
| 145 | register SAVEREG. LP is clobbered (it is used as a scratch register | ||
| 146 | because the POP_STATE macro restores it, and this macro is usually used | ||
| 147 | inside POP_STATE). */ | ||
| 148 | #define RESTORE_PC(savereg) \ | ||
| 149 | sld.w PTO+PT_PC[ep], lp; \ | ||
| 150 | ldsr lp, SR_ ## savereg | ||
| 151 | /* Save the PSW register stored in the special register SAVREG to the | ||
| 152 | state-save-frame pointed to by EP. r19 is clobbered. */ | ||
| 153 | #define SAVE_PSW(savereg) \ | ||
| 154 | stsr SR_ ## savereg, r19; \ | ||
| 155 | sst.w r19, PTO+PT_PSW[ep] | ||
| 156 | /* Restore the PSW register from the state-save-frame pointed to by EP, to | ||
| 157 | the special register SAVEREG. LP is clobbered (it is used as a scratch | ||
| 158 | register because the POP_STATE macro restores it, and this macro is | ||
| 159 | usually used inside POP_STATE). */ | ||
| 160 | #define RESTORE_PSW(savereg) \ | ||
| 161 | sld.w PTO+PT_PSW[ep], lp; \ | ||
| 162 | ldsr lp, SR_ ## savereg | ||
| 163 | |||
| 164 | /* Save CTPC/CTPSW/CTBP registers to the state-save-frame pointed to by REG. | ||
| 165 | r19 is clobbered. */ | ||
| 166 | #define SAVE_CT_REGS \ | ||
| 167 | stsr SR_CTPC, r19; \ | ||
| 168 | sst.w r19, PTO+PT_CTPC[ep]; \ | ||
| 169 | stsr SR_CTPSW, r19; \ | ||
| 170 | sst.w r19, PTO+PT_CTPSW[ep]; \ | ||
| 171 | stsr SR_CTBP, r19; \ | ||
| 172 | sst.w r19, PTO+PT_CTBP[ep] | ||
| 173 | /* Restore CTPC/CTPSW/CTBP registers from the state-save-frame pointed to by EP. | ||
| 174 | LP is clobbered (it is used as a scratch register because the POP_STATE | ||
| 175 | macro restores it, and this macro is usually used inside POP_STATE). */ | ||
| 176 | #define RESTORE_CT_REGS \ | ||
| 177 | sld.w PTO+PT_CTPC[ep], lp; \ | ||
| 178 | ldsr lp, SR_CTPC; \ | ||
| 179 | sld.w PTO+PT_CTPSW[ep], lp; \ | ||
| 180 | ldsr lp, SR_CTPSW; \ | ||
| 181 | sld.w PTO+PT_CTBP[ep], lp; \ | ||
| 182 | ldsr lp, SR_CTBP | ||
| 183 | |||
| 184 | |||
| 185 | /* Push register state, except for the stack pointer, on the stack in the | ||
| 186 | form of a state-save-frame (plus some extra padding), in preparation for | ||
| 187 | a system call. This macro makes sure that the EP, GP, and LP | ||
| 188 | registers are saved, and TYPE identifies the set of extra registers to | ||
| 189 | be saved as well. Also copies (the new value of) SP to EP. */ | ||
| 190 | #define PUSH_STATE(type) \ | ||
| 191 | addi -STATE_SAVE_SIZE, sp, sp; /* Make room on the stack. */ \ | ||
| 192 | st.w ep, PTO+PT_GPR(GPR_EP)[sp]; \ | ||
| 193 | mov sp, ep; \ | ||
| 194 | sst.w gp, PTO+PT_GPR(GPR_GP)[ep]; \ | ||
| 195 | sst.w lp, PTO+PT_GPR(GPR_LP)[ep]; \ | ||
| 196 | type ## _STATE_SAVER | ||
| 197 | /* Pop a register state pushed by PUSH_STATE, except for the stack pointer, | ||
| 198 | from the stack. */ | ||
| 199 | #define POP_STATE(type) \ | ||
| 200 | mov sp, ep; \ | ||
| 201 | type ## _STATE_RESTORER; \ | ||
| 202 | sld.w PTO+PT_GPR(GPR_GP)[ep], gp; \ | ||
| 203 | sld.w PTO+PT_GPR(GPR_LP)[ep], lp; \ | ||
| 204 | sld.w PTO+PT_GPR(GPR_EP)[ep], ep; \ | ||
| 205 | addi STATE_SAVE_SIZE, sp, sp /* Clean up our stack space. */ | ||
| 206 | |||
| 207 | |||
| 208 | /* Switch to the kernel stack if necessary, and push register state on the | ||
| 209 | stack in the form of a state-save-frame. Also load the current task | ||
| 210 | pointer if switching from user mode. The stack-pointer (r3) should have | ||
| 211 | already been saved to the memory location SP_SAVE_LOC (the reason for | ||
| 212 | this is that the interrupt vectors may be beyond a 22-bit signed offset | ||
| 213 | jump from the actual interrupt handler, and this allows them to save the | ||
| 214 | stack-pointer and use that register to do an indirect jump). This macro | ||
| 215 | makes sure that `special' registers, system registers, and the stack | ||
| 216 | pointer are saved; TYPE identifies the set of extra registers to be | ||
| 217 | saved as well. SYSCALL_NUM is the register in which the system-call | ||
| 218 | number this state is for is stored (r0 if this isn't a system call). | ||
| 219 | Interrupts should already be disabled when calling this. */ | ||
| 220 | #define SAVE_STATE(type, syscall_num, sp_save_loc) \ | ||
| 221 | tst1 0, KM; /* See if already in kernel mode. */ \ | ||
| 222 | bz 1f; \ | ||
| 223 | ld.w sp_save_loc, sp; /* ... yes, use saved SP. */ \ | ||
| 224 | br 2f; \ | ||
| 225 | 1: ld.w KSP, sp; /* ... no, switch to kernel stack. */ \ | ||
| 226 | 2: PUSH_STATE(type); \ | ||
| 227 | ld.b KM, r19; /* Remember old kernel-mode. */ \ | ||
| 228 | sst.w r19, PTO+PT_KERNEL_MODE[ep]; \ | ||
| 229 | ld.w sp_save_loc, r19; /* Remember old SP. */ \ | ||
| 230 | sst.w r19, PTO+PT_GPR(GPR_SP)[ep]; \ | ||
| 231 | mov 1, r19; /* Now definitely in kernel-mode. */ \ | ||
| 232 | st.b r19, KM; \ | ||
| 233 | GET_CURRENT_TASK(CURRENT_TASK); /* Fetch the current task pointer. */ \ | ||
| 234 | /* Save away the syscall number. */ \ | ||
| 235 | sst.w syscall_num, PTO+PT_CUR_SYSCALL[ep] | ||
| 236 | |||
| 237 | |||
| 238 | /* Save register state not normally saved by PUSH_STATE for TYPE, to the | ||
| 239 | state-save-frame on the stack; also copies SP to EP. r19 may be trashed. */ | ||
| 240 | #define SAVE_EXTRA_STATE(type) \ | ||
| 241 | mov sp, ep; \ | ||
| 242 | type ## _EXTRA_STATE_SAVER | ||
| 243 | /* Restore register state not normally restored by POP_STATE for TYPE, | ||
| 244 | from the state-save-frame on the stack; also copies SP to EP. | ||
| 245 | r19 may be trashed. */ | ||
| 246 | #define RESTORE_EXTRA_STATE(type) \ | ||
| 247 | mov sp, ep; \ | ||
| 248 | type ## _EXTRA_STATE_RESTORER | ||
| 249 | |||
| 250 | /* Save any call-clobbered registers not normally saved by PUSH_STATE for | ||
| 251 | TYPE, to the state-save-frame on the stack. | ||
| 252 | EP may be trashed, but is not guaranteed to contain a copy of SP | ||
| 253 | (unlike after most SAVE_... macros). r19 may be trashed. */ | ||
| 254 | #define SAVE_EXTRA_STATE_FOR_SCHEDULE(type) \ | ||
| 255 | type ## _SCHEDULE_EXTRA_STATE_SAVER | ||
| 256 | /* Restore any call-clobbered registers not normally restored by | ||
| 257 | POP_STATE for TYPE, to the state-save-frame on the stack. | ||
| 258 | EP may be trashed, but is not guaranteed to contain a copy of SP | ||
| 259 | (unlike after most RESTORE_... macros). r19 may be trashed. */ | ||
| 260 | #define RESTORE_EXTRA_STATE_FOR_SCHEDULE(type) \ | ||
| 261 | type ## _SCHEDULE_EXTRA_STATE_RESTORER | ||
| 262 | |||
| 263 | |||
| 264 | /* These are extra_state_saver/restorer values for a user trap. Note | ||
| 265 | that we save the argument registers so that restarted syscalls will | ||
| 266 | function properly (otherwise it wouldn't be necessary), and we must | ||
| 267 | _not_ restore the return-value registers (so that traps can return a | ||
| 268 | value!), but call-clobbered registers are not saved at all, as the | ||
| 269 | caller of the syscall function should have saved them. */ | ||
| 270 | |||
| 271 | #define TRAP_RET reti | ||
| 272 | /* Traps don't save call-clobbered registers (but do still save arg regs). | ||
| 273 | We preserve PSw to keep long-term state, namely interrupt status (for traps | ||
| 274 | from kernel-mode), and the single-step flag (for user traps). */ | ||
| 275 | #define TRAP_STATE_SAVER \ | ||
| 276 | SAVE_ARG_REGS; \ | ||
| 277 | SAVE_PC(EIPC); \ | ||
| 278 | SAVE_PSW(EIPSW) | ||
| 279 | /* When traps return, they just leave call-clobbered registers (except for arg | ||
| 280 | regs) with whatever value they have from the kernel. Traps don't preserve | ||
| 281 | the PSW, but we zero EIPSW to ensure it doesn't contain anything dangerous | ||
| 282 | (in particular, the single-step flag). */ | ||
| 283 | #define TRAP_STATE_RESTORER \ | ||
| 284 | RESTORE_ARG_REGS; \ | ||
| 285 | RESTORE_PC(EIPC); \ | ||
| 286 | RESTORE_PSW(EIPSW) | ||
| 287 | /* Save registers not normally saved by traps. We need to save r12, even | ||
| 288 | though it's nominally call-clobbered, because it's used when restarting | ||
| 289 | a system call (the signal-handling path uses SAVE_EXTRA_STATE, and | ||
| 290 | expects r12 to be restored when the trap returns). */ | ||
| 291 | #define TRAP_EXTRA_STATE_SAVER \ | ||
| 292 | SAVE_RVAL_REGS; \ | ||
| 293 | sst.w r12, PTO+PT_GPR(12)[ep]; \ | ||
| 294 | SAVE_CALL_SAVED_REGS; \ | ||
| 295 | SAVE_CT_REGS | ||
| 296 | #define TRAP_EXTRA_STATE_RESTORER \ | ||
| 297 | RESTORE_RVAL_REGS; \ | ||
| 298 | sld.w PTO+PT_GPR(12)[ep], r12; \ | ||
| 299 | RESTORE_CALL_SAVED_REGS; \ | ||
| 300 | RESTORE_CT_REGS | ||
| 301 | /* Save registers prior to calling scheduler (just before trap returns). | ||
| 302 | We have to save the return-value registers to preserve the trap's return | ||
| 303 | value. Note that ..._SCHEDULE_EXTRA_STATE_SAVER, unlike most ..._SAVER | ||
| 304 | macros, is required to setup EP itself if EP is needed (this is because | ||
| 305 | in many cases, the macro is empty). */ | ||
| 306 | #define TRAP_SCHEDULE_EXTRA_STATE_SAVER \ | ||
| 307 | mov sp, ep; \ | ||
| 308 | SAVE_RVAL_REGS | ||
| 309 | /* Note that ..._SCHEDULE_EXTRA_STATE_RESTORER, unlike most ..._RESTORER | ||
| 310 | macros, is required to setup EP itself if EP is needed (this is because | ||
| 311 | in many cases, the macro is empty). */ | ||
| 312 | #define TRAP_SCHEDULE_EXTRA_STATE_RESTORER \ | ||
| 313 | mov sp, ep; \ | ||
| 314 | RESTORE_RVAL_REGS | ||
| 315 | |||
| 316 | /* Register saving/restoring for maskable interrupts. */ | ||
| 317 | #define IRQ_RET reti | ||
| 318 | #define IRQ_STATE_SAVER \ | ||
| 319 | SAVE_CALL_CLOBBERED_REGS; \ | ||
| 320 | SAVE_PC(EIPC); \ | ||
| 321 | SAVE_PSW(EIPSW) | ||
| 322 | #define IRQ_STATE_RESTORER \ | ||
| 323 | RESTORE_CALL_CLOBBERED_REGS; \ | ||
| 324 | RESTORE_PC(EIPC); \ | ||
| 325 | RESTORE_PSW(EIPSW) | ||
| 326 | #define IRQ_EXTRA_STATE_SAVER \ | ||
| 327 | SAVE_CALL_SAVED_REGS; \ | ||
| 328 | SAVE_CT_REGS | ||
| 329 | #define IRQ_EXTRA_STATE_RESTORER \ | ||
| 330 | RESTORE_CALL_SAVED_REGS; \ | ||
| 331 | RESTORE_CT_REGS | ||
| 332 | #define IRQ_SCHEDULE_EXTRA_STATE_SAVER /* nothing */ | ||
| 333 | #define IRQ_SCHEDULE_EXTRA_STATE_RESTORER /* nothing */ | ||
| 334 | |||
| 335 | /* Register saving/restoring for non-maskable interrupts. */ | ||
| 336 | #define NMI_RET reti | ||
| 337 | #define NMI_STATE_SAVER \ | ||
| 338 | SAVE_CALL_CLOBBERED_REGS; \ | ||
| 339 | SAVE_PC(FEPC); \ | ||
| 340 | SAVE_PSW(FEPSW); | ||
| 341 | #define NMI_STATE_RESTORER \ | ||
| 342 | RESTORE_CALL_CLOBBERED_REGS; \ | ||
| 343 | RESTORE_PC(FEPC); \ | ||
| 344 | RESTORE_PSW(FEPSW); | ||
| 345 | #define NMI_EXTRA_STATE_SAVER \ | ||
| 346 | SAVE_CALL_SAVED_REGS; \ | ||
| 347 | SAVE_CT_REGS | ||
| 348 | #define NMI_EXTRA_STATE_RESTORER \ | ||
| 349 | RESTORE_CALL_SAVED_REGS; \ | ||
| 350 | RESTORE_CT_REGS | ||
| 351 | #define NMI_SCHEDULE_EXTRA_STATE_SAVER /* nothing */ | ||
| 352 | #define NMI_SCHEDULE_EXTRA_STATE_RESTORER /* nothing */ | ||
| 353 | |||
| 354 | /* Register saving/restoring for debug traps. */ | ||
| 355 | #define DBTRAP_RET .long 0x014607E0 /* `dbret', but gas doesn't support it. */ | ||
| 356 | #define DBTRAP_STATE_SAVER \ | ||
| 357 | SAVE_CALL_CLOBBERED_REGS; \ | ||
| 358 | SAVE_PC(DBPC); \ | ||
| 359 | SAVE_PSW(DBPSW) | ||
| 360 | #define DBTRAP_STATE_RESTORER \ | ||
| 361 | RESTORE_CALL_CLOBBERED_REGS; \ | ||
| 362 | RESTORE_PC(DBPC); \ | ||
| 363 | RESTORE_PSW(DBPSW) | ||
| 364 | #define DBTRAP_EXTRA_STATE_SAVER \ | ||
| 365 | SAVE_CALL_SAVED_REGS; \ | ||
| 366 | SAVE_CT_REGS | ||
| 367 | #define DBTRAP_EXTRA_STATE_RESTORER \ | ||
| 368 | RESTORE_CALL_SAVED_REGS; \ | ||
| 369 | RESTORE_CT_REGS | ||
| 370 | #define DBTRAP_SCHEDULE_EXTRA_STATE_SAVER /* nothing */ | ||
| 371 | #define DBTRAP_SCHEDULE_EXTRA_STATE_RESTORER /* nothing */ | ||
| 372 | |||
| 373 | /* Register saving/restoring for a context switch. We don't need to save | ||
| 374 | too many registers, because context-switching looks like a function call | ||
| 375 | (via the function `switch_thread'), so callers will save any | ||
| 376 | call-clobbered registers themselves. We do need to save the CT regs, as | ||
| 377 | they're normally not saved during kernel entry (the kernel doesn't use | ||
| 378 | them). We save PSW so that interrupt-status state will correctly follow | ||
| 379 | each thread (mostly NMI vs. normal-IRQ/trap), though for the most part | ||
| 380 | it doesn't matter since threads are always in almost exactly the same | ||
| 381 | processor state during a context switch. The stack pointer and return | ||
| 382 | value are handled by switch_thread itself. */ | ||
| 383 | #define SWITCH_STATE_SAVER \ | ||
| 384 | SAVE_CALL_SAVED_REGS; \ | ||
| 385 | SAVE_PSW(PSW); \ | ||
| 386 | SAVE_CT_REGS | ||
| 387 | #define SWITCH_STATE_RESTORER \ | ||
| 388 | RESTORE_CALL_SAVED_REGS; \ | ||
| 389 | RESTORE_PSW(PSW); \ | ||
| 390 | RESTORE_CT_REGS | ||
| 391 | |||
| 392 | |||
| 393 | /* Restore register state from the state-save-frame on the stack, switch back | ||
| 394 | to the user stack if necessary, and return from the trap/interrupt. | ||
| 395 | EXTRA_STATE_RESTORER is a sequence of assembly language statements to | ||
| 396 | restore anything not restored by this macro. Only registers not saved by | ||
| 397 | the C compiler are restored (that is, R3(sp), R4(gp), R31(lp), and | ||
| 398 | anything restored by EXTRA_STATE_RESTORER). */ | ||
| 399 | #define RETURN(type) \ | ||
| 400 | ld.b PTO+PT_KERNEL_MODE[sp], r19; \ | ||
| 401 | di; /* Disable interrupts */ \ | ||
| 402 | cmp r19, r0; /* See if returning to kernel mode, */\ | ||
| 403 | bne 2f; /* ... if so, skip resched &c. */ \ | ||
| 404 | \ | ||
| 405 | /* We're returning to user mode, so check for various conditions that \ | ||
| 406 | trigger rescheduling. */ \ | ||
| 407 | GET_CURRENT_THREAD(r18); \ | ||
| 408 | ld.w TI_FLAGS[r18], r19; \ | ||
| 409 | andi _TIF_NEED_RESCHED, r19, r0; \ | ||
| 410 | bnz 3f; /* Call the scheduler. */ \ | ||
| 411 | 5: andi _TIF_SIGPENDING, r19, r18; \ | ||
| 412 | ld.w TASK_PTRACE[CURRENT_TASK], r19; /* ptrace flags */ \ | ||
| 413 | or r18, r19; /* see if either is non-zero */ \ | ||
| 414 | bnz 4f; /* if so, handle them */ \ | ||
| 415 | \ | ||
| 416 | /* Return to user state. */ \ | ||
| 417 | 1: st.b r0, KM; /* Now officially in user state. */ \ | ||
| 418 | \ | ||
| 419 | /* Final return. The stack-pointer fiddling is not needed when returning \ | ||
| 420 | to kernel-mode, but they don't hurt, and this way we can share the \ | ||
| 421 | (sometimes rather lengthy) POP_STATE macro. */ \ | ||
| 422 | 2: POP_STATE(type); \ | ||
| 423 | st.w sp, KSP; /* Save the kernel stack pointer. */ \ | ||
| 424 | ld.w PT_GPR(GPR_SP)-PT_SIZE[sp], sp; /* Restore stack pointer. */ \ | ||
| 425 | type ## _RET; /* Return from the trap/interrupt. */ \ | ||
| 426 | \ | ||
| 427 | /* Call the scheduler before returning from a syscall/trap. */ \ | ||
| 428 | 3: SAVE_EXTRA_STATE_FOR_SCHEDULE(type); /* Prepare to call scheduler. */ \ | ||
| 429 | jarl call_scheduler, lp; /* Call scheduler */ \ | ||
| 430 | di; /* The scheduler enables interrupts */\ | ||
| 431 | RESTORE_EXTRA_STATE_FOR_SCHEDULE(type); \ | ||
| 432 | GET_CURRENT_THREAD(r18); \ | ||
| 433 | ld.w TI_FLAGS[r18], r19; \ | ||
| 434 | br 5b; /* Continue with return path. */ \ | ||
| 435 | \ | ||
| 436 | /* Handle a signal or ptraced process return. \ | ||
| 437 | r18 should be non-zero if there are pending signals. */ \ | ||
| 438 | 4: /* Not all registers are saved by the normal trap/interrupt entry \ | ||
| 439 | points (for instance, call-saved registers (because the normal \ | ||
| 440 | C-compiler calling sequence in the kernel makes sure they're \ | ||
| 441 | preserved), and call-clobbered registers in the case of \ | ||
| 442 | traps), but signal handlers may want to examine or change the \ | ||
| 443 | complete register state. Here we save anything not saved by \ | ||
| 444 | the normal entry sequence, so that it may be safely restored \ | ||
| 445 | (in a possibly modified form) after do_signal returns. */ \ | ||
| 446 | SAVE_EXTRA_STATE(type); /* Save state not saved by entry. */ \ | ||
| 447 | jarl handle_signal_or_ptrace_return, lp; \ | ||
| 448 | RESTORE_EXTRA_STATE(type); /* Restore extra regs. */ \ | ||
| 449 | br 1b | ||
| 450 | |||
| 451 | |||
| 452 | /* Jump to the appropriate function for the system call number in r12 | ||
| 453 | (r12 is not preserved), or return an error if r12 is not valid. The | ||
| 454 | LP register should point to the location where the called function | ||
| 455 | should return. [note that MAKE_SYS_CALL uses label 1] */ | ||
| 456 | #define MAKE_SYS_CALL \ | ||
| 457 | /* Figure out which function to use for this system call. */ \ | ||
| 458 | shl 2, r12; \ | ||
| 459 | /* See if the system call number is valid. */ \ | ||
| 460 | addi lo(CSYM(sys_call_table) - sys_call_table_end), r12, r0; \ | ||
| 461 | bnh 1f; \ | ||
| 462 | mov hilo(CSYM(sys_call_table)), r19; \ | ||
| 463 | add r19, r12; \ | ||
| 464 | ld.w 0[r12], r12; \ | ||
| 465 | /* Make the system call. */ \ | ||
| 466 | jmp [r12]; \ | ||
| 467 | /* The syscall number is invalid, return an error. */ \ | ||
| 468 | 1: addi -ENOSYS, r0, r10; \ | ||
| 469 | jmp [lp] | ||
| 470 | |||
| 471 | |||
| 472 | .text | ||
| 473 | |||
| 474 | /* | ||
| 475 | * User trap. | ||
| 476 | * | ||
| 477 | * Trap 0 system calls are also handled here. | ||
| 478 | * | ||
| 479 | * The stack-pointer (r3) should have already been saved to the memory | ||
| 480 | * location ENTRY_SP (the reason for this is that the interrupt vectors may be | ||
| 481 | * beyond a 22-bit signed offset jump from the actual interrupt handler, and | ||
| 482 | * this allows them to save the stack-pointer and use that register to do an | ||
| 483 | * indirect jump). | ||
| 484 | * | ||
| 485 | * Syscall protocol: | ||
| 486 | * Syscall number in r12, args in r6-r9 | ||
| 487 | * Return value in r10 | ||
| 488 | */ | ||
| 489 | G_ENTRY(trap): | ||
| 490 | SAVE_STATE (TRAP, r12, ENTRY_SP) // Save registers. | ||
| 491 | stsr SR_ECR, r19 // Find out which trap it was. | ||
| 492 | ei // Enable interrupts. | ||
| 493 | mov hilo(ret_from_trap), lp // where the trap should return | ||
| 494 | |||
| 495 | // The following two shifts (1) clear out extraneous NMI data in the | ||
| 496 | // upper 16-bits, (2) convert the 0x40 - 0x5f range of trap ECR | ||
| 497 | // numbers into the (0-31) << 2 range we want, (3) set the flags. | ||
| 498 | shl 27, r19 // chop off all high bits | ||
| 499 | shr 25, r19 // scale back down and then << 2 | ||
| 500 | bnz 2f // See if not trap 0. | ||
| 501 | |||
| 502 | // Trap 0 is a `short' system call, skip general trap table. | ||
| 503 | MAKE_SYS_CALL // Jump to the syscall function. | ||
| 504 | |||
| 505 | 2: // For other traps, use a table lookup. | ||
| 506 | mov hilo(CSYM(trap_table)), r18 | ||
| 507 | add r19, r18 | ||
| 508 | ld.w 0[r18], r18 | ||
| 509 | jmp [r18] // Jump to the trap handler. | ||
| 510 | END(trap) | ||
| 511 | |||
| 512 | /* This is just like ret_from_trap, but first restores extra registers | ||
| 513 | saved by some wrappers. */ | ||
| 514 | L_ENTRY(restore_extra_regs_and_ret_from_trap): | ||
| 515 | RESTORE_EXTRA_STATE(TRAP) | ||
| 516 | // fall through | ||
| 517 | END(restore_extra_regs_and_ret_from_trap) | ||
| 518 | |||
| 519 | /* Entry point used to return from a syscall/trap. */ | ||
| 520 | L_ENTRY(ret_from_trap): | ||
| 521 | RETURN(TRAP) | ||
| 522 | END(ret_from_trap) | ||
| 523 | |||
| 524 | |||
| 525 | /* This the initial entry point for a new child thread, with an appropriate | ||
| 526 | stack in place that makes it look that the child is in the middle of an | ||
| 527 | syscall. This function is actually `returned to' from switch_thread | ||
| 528 | (copy_thread makes ret_from_fork the return address in each new thread's | ||
| 529 | saved context). */ | ||
| 530 | C_ENTRY(ret_from_fork): | ||
| 531 | mov r10, r6 // switch_thread returns the prev task. | ||
| 532 | jarl CSYM(schedule_tail), lp // ...which is schedule_tail's arg | ||
| 533 | mov r0, r10 // Child's fork call should return 0. | ||
| 534 | br ret_from_trap // Do normal trap return. | ||
| 535 | C_END(ret_from_fork) | ||
| 536 | |||
| 537 | |||
| 538 | /* | ||
| 539 | * Trap 1: `long' system calls | ||
| 540 | * `Long' syscall protocol: | ||
| 541 | * Syscall number in r12, args in r6-r9, r13-r14 | ||
| 542 | * Return value in r10 | ||
| 543 | */ | ||
| 544 | L_ENTRY(syscall_long): | ||
| 545 | // Push extra arguments on the stack. Note that by default, the trap | ||
| 546 | // handler reserves enough stack space for 6 arguments, so we don't | ||
| 547 | // have to make any additional room. | ||
| 548 | st.w r13, 16[sp] // arg 5 | ||
| 549 | st.w r14, 20[sp] // arg 6 | ||
| 550 | |||
| 551 | // Make sure r13 and r14 are preserved, in case we have to restart a | ||
| 552 | // system call because of a signal (ep has already been set by caller). | ||
| 553 | st.w r13, PTO+PT_GPR(13)[sp] | ||
| 554 | st.w r14, PTO+PT_GPR(13)[sp] | ||
| 555 | mov hilo(ret_from_long_syscall), lp | ||
| 556 | |||
| 557 | MAKE_SYS_CALL // Jump to the syscall function. | ||
| 558 | END(syscall_long) | ||
| 559 | |||
| 560 | /* Entry point used to return from a long syscall. Only needed to restore | ||
| 561 | r13/r14 if the general trap mechanism doesnt' do so. */ | ||
| 562 | L_ENTRY(ret_from_long_syscall): | ||
| 563 | ld.w PTO+PT_GPR(13)[sp], r13 // Restore the extra registers | ||
| 564 | ld.w PTO+PT_GPR(13)[sp], r14 | ||
| 565 | br ret_from_trap // The rest is the same as other traps | ||
| 566 | END(ret_from_long_syscall) | ||
| 567 | |||
| 568 | |||
| 569 | /* These syscalls need access to the struct pt_regs on the stack, so we | ||
| 570 | implement them in assembly (they're basically all wrappers anyway). */ | ||
| 571 | |||
| 572 | L_ENTRY(sys_fork_wrapper): | ||
| 573 | #ifdef CONFIG_MMU | ||
| 574 | addi SIGCHLD, r0, r6 // Arg 0: flags | ||
| 575 | ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's) | ||
| 576 | movea PTO, sp, r8 // Arg 2: parent context | ||
| 577 | mov r0, r9 // Arg 3/4/5: 0 | ||
| 578 | st.w r0, 16[sp] | ||
| 579 | st.w r0, 20[sp] | ||
| 580 | mov hilo(CSYM(do_fork)), r18 // Where the real work gets done | ||
| 581 | br save_extra_state_tramp // Save state and go there | ||
| 582 | #else | ||
| 583 | // fork almost works, enough to trick you into looking elsewhere :-( | ||
| 584 | addi -EINVAL, r0, r10 | ||
| 585 | jmp [lp] | ||
| 586 | #endif | ||
| 587 | END(sys_fork_wrapper) | ||
| 588 | |||
| 589 | L_ENTRY(sys_vfork_wrapper): | ||
| 590 | addi CLONE_VFORK | CLONE_VM | SIGCHLD, r0, r6 // Arg 0: flags | ||
| 591 | ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's) | ||
| 592 | movea PTO, sp, r8 // Arg 2: parent context | ||
| 593 | mov r0, r9 // Arg 3/4/5: 0 | ||
| 594 | st.w r0, 16[sp] | ||
| 595 | st.w r0, 20[sp] | ||
| 596 | mov hilo(CSYM(do_fork)), r18 // Where the real work gets done | ||
| 597 | br save_extra_state_tramp // Save state and go there | ||
| 598 | END(sys_vfork_wrapper) | ||
| 599 | |||
| 600 | L_ENTRY(sys_clone_wrapper): | ||
| 601 | ld.w PTO+PT_GPR(GPR_SP)[sp], r19// parent's stack pointer | ||
| 602 | cmp r7, r0 // See if child SP arg (arg 1) is 0. | ||
| 603 | cmov z, r19, r7, r7 // ... and use the parent's if so. | ||
| 604 | movea PTO, sp, r8 // Arg 2: parent context | ||
| 605 | mov r0, r9 // Arg 3/4/5: 0 | ||
| 606 | st.w r0, 16[sp] | ||
| 607 | st.w r0, 20[sp] | ||
| 608 | mov hilo(CSYM(do_fork)), r18 // Where the real work gets done | ||
| 609 | br save_extra_state_tramp // Save state and go there | ||
| 610 | END(sys_clone_wrapper) | ||
| 611 | |||
| 612 | |||
| 613 | L_ENTRY(sys_execve_wrapper): | ||
| 614 | movea PTO, sp, r9 // add user context as 4th arg | ||
| 615 | jr CSYM(sys_execve) // Do real work (tail-call). | ||
| 616 | END(sys_execve_wrapper) | ||
| 617 | |||
| 618 | |||
| 619 | L_ENTRY(sys_sigsuspend_wrapper): | ||
| 620 | movea PTO, sp, r7 // add user context as 2nd arg | ||
| 621 | mov hilo(CSYM(sys_sigsuspend)), r18 // syscall function | ||
| 622 | jarl save_extra_state_tramp, lp // Save state and do it | ||
| 623 | br restore_extra_regs_and_ret_from_trap | ||
| 624 | END(sys_sigsuspend_wrapper) | ||
| 625 | L_ENTRY(sys_rt_sigsuspend_wrapper): | ||
| 626 | movea PTO, sp, r8 // add user context as 3rd arg | ||
| 627 | mov hilo(CSYM(sys_rt_sigsuspend)), r18 // syscall function | ||
| 628 | jarl save_extra_state_tramp, lp // Save state and do it | ||
| 629 | br restore_extra_regs_and_ret_from_trap | ||
| 630 | END(sys_rt_sigsuspend_wrapper) | ||
| 631 | |||
| 632 | L_ENTRY(sys_sigreturn_wrapper): | ||
| 633 | movea PTO, sp, r6 // add user context as 1st arg | ||
| 634 | mov hilo(CSYM(sys_sigreturn)), r18 // syscall function | ||
| 635 | jarl save_extra_state_tramp, lp // Save state and do it | ||
| 636 | br restore_extra_regs_and_ret_from_trap | ||
| 637 | END(sys_sigreturn_wrapper) | ||
| 638 | L_ENTRY(sys_rt_sigreturn_wrapper): | ||
| 639 | movea PTO, sp, r6 // add user context as 1st arg | ||
| 640 | mov hilo(CSYM(sys_rt_sigreturn)), r18// syscall function | ||
| 641 | jarl save_extra_state_tramp, lp // Save state and do it | ||
| 642 | br restore_extra_regs_and_ret_from_trap | ||
| 643 | END(sys_rt_sigreturn_wrapper) | ||
| 644 | |||
| 645 | |||
| 646 | /* Save any state not saved by SAVE_STATE(TRAP), and jump to r18. | ||
| 647 | It's main purpose is to share the rather lengthy code sequence that | ||
| 648 | SAVE_STATE expands into among the above wrapper functions. */ | ||
| 649 | L_ENTRY(save_extra_state_tramp): | ||
| 650 | SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry. | ||
| 651 | jmp [r18] // Do the work the caller wants | ||
| 652 | END(save_extra_state_tramp) | ||
| 653 | |||
| 654 | |||
| 655 | /* | ||
| 656 | * Hardware maskable interrupts. | ||
| 657 | * | ||
| 658 | * The stack-pointer (r3) should have already been saved to the memory | ||
| 659 | * location ENTRY_SP (the reason for this is that the interrupt vectors may be | ||
| 660 | * beyond a 22-bit signed offset jump from the actual interrupt handler, and | ||
| 661 | * this allows them to save the stack-pointer and use that register to do an | ||
| 662 | * indirect jump). | ||
| 663 | */ | ||
| 664 | G_ENTRY(irq): | ||
| 665 | SAVE_STATE (IRQ, r0, ENTRY_SP) // Save registers. | ||
| 666 | |||
| 667 | stsr SR_ECR, r6 // Find out which interrupt it was. | ||
| 668 | movea PTO, sp, r7 // User regs are arg2 | ||
| 669 | |||
| 670 | // All v850 implementations I know about encode their interrupts as | ||
| 671 | // multiples of 0x10, starting at 0x80 (after NMIs and software | ||
| 672 | // interrupts). Convert this number into a simple IRQ index for the | ||
| 673 | // rest of the kernel. We also clear the upper 16 bits, which hold | ||
| 674 | // NMI info, and don't appear to be cleared when a NMI returns. | ||
| 675 | shl 16, r6 // clear upper 16 bits | ||
| 676 | shr 20, r6 // shift back, and remove lower nibble | ||
| 677 | add -8, r6 // remove bias for irqs | ||
| 678 | |||
| 679 | // Call the high-level interrupt handling code. | ||
| 680 | jarl CSYM(handle_irq), lp | ||
| 681 | |||
| 682 | RETURN(IRQ) | ||
| 683 | END(irq) | ||
| 684 | |||
| 685 | |||
| 686 | /* | ||
| 687 | * Debug trap / illegal-instruction exception | ||
| 688 | * | ||
| 689 | * The stack-pointer (r3) should have already been saved to the memory | ||
| 690 | * location ENTRY_SP (the reason for this is that the interrupt vectors may be | ||
| 691 | * beyond a 22-bit signed offset jump from the actual interrupt handler, and | ||
| 692 | * this allows them to save the stack-pointer and use that register to do an | ||
| 693 | * indirect jump). | ||
| 694 | */ | ||
| 695 | G_ENTRY(dbtrap): | ||
| 696 | SAVE_STATE (DBTRAP, r0, ENTRY_SP)// Save registers. | ||
| 697 | |||
| 698 | /* First see if we came from kernel mode; if so, the dbtrap | ||
| 699 | instruction has a special meaning, to set the DIR (`debug | ||
| 700 | information register') register. This is because the DIR register | ||
| 701 | can _only_ be manipulated/read while in `debug mode,' and debug | ||
| 702 | mode is only active while we're inside the dbtrap handler. The | ||
| 703 | exact functionality is: { DIR = (DIR | r6) & ~r7; return DIR; }. */ | ||
| 704 | ld.b PTO+PT_KERNEL_MODE[sp], r19 | ||
| 705 | cmp r19, r0 | ||
| 706 | bz 1f | ||
| 707 | |||
| 708 | stsr SR_DIR, r10 | ||
| 709 | or r6, r10 | ||
| 710 | not r7, r7 | ||
| 711 | and r7, r10 | ||
| 712 | ldsr r10, SR_DIR | ||
| 713 | stsr SR_DIR, r10 // Confirm the value we set | ||
| 714 | st.w r10, PTO+PT_GPR(10)[sp] // return it | ||
| 715 | br 3f | ||
| 716 | |||
| 717 | 1: ei // Enable interrupts. | ||
| 718 | |||
| 719 | /* The default signal type we raise. */ | ||
| 720 | mov SIGTRAP, r6 | ||
| 721 | |||
| 722 | /* See if it's a single-step trap. */ | ||
| 723 | stsr SR_DBPSW, r19 | ||
| 724 | andi 0x0800, r19, r19 | ||
| 725 | bnz 2f | ||
| 726 | |||
| 727 | /* Look to see if the preceding instruction was is a dbtrap or not, | ||
| 728 | to decide which signal we should use. */ | ||
| 729 | stsr SR_DBPC, r19 // PC following trapping insn | ||
| 730 | ld.hu -2[r19], r19 | ||
| 731 | ori 0xf840, r0, r20 // DBTRAP insn | ||
| 732 | cmp r19, r20 // Was this trap caused by DBTRAP? | ||
| 733 | cmov ne, SIGILL, r6, r6 // Choose signal appropriately | ||
| 734 | |||
| 735 | /* Raise the desired signal. */ | ||
| 736 | 2: mov CURRENT_TASK, r7 // Arg 1: task | ||
| 737 | jarl CSYM(send_sig), lp // tail call | ||
| 738 | |||
| 739 | 3: RETURN(DBTRAP) | ||
| 740 | END(dbtrap) | ||
| 741 | |||
| 742 | |||
| 743 | /* | ||
| 744 | * Hardware non-maskable interrupts. | ||
| 745 | * | ||
| 746 | * The stack-pointer (r3) should have already been saved to the memory | ||
| 747 | * location ENTRY_SP (the reason for this is that the interrupt vectors may be | ||
| 748 | * beyond a 22-bit signed offset jump from the actual interrupt handler, and | ||
| 749 | * this allows them to save the stack-pointer and use that register to do an | ||
| 750 | * indirect jump). | ||
| 751 | */ | ||
| 752 | G_ENTRY(nmi): | ||
| 753 | SAVE_STATE (NMI, r0, NMI_ENTRY_SP); /* Save registers. */ | ||
| 754 | |||
| 755 | stsr SR_ECR, r6; /* Find out which nmi it was. */ | ||
| 756 | shr 20, r6; /* Extract NMI code in bits 20-24. */ | ||
| 757 | movea PTO, sp, r7; /* User regs are arg2. */ | ||
| 758 | |||
| 759 | /* Non-maskable interrupts always lie right after maskable interrupts. | ||
| 760 | Call the generic IRQ handler, with two arguments, the IRQ number, | ||
| 761 | and a pointer to the user registers, to handle the specifics. | ||
| 762 | (we subtract one because the first NMI has code 1). */ | ||
| 763 | addi FIRST_NMI - 1, r6, r6 | ||
| 764 | jarl CSYM(handle_irq), lp | ||
| 765 | |||
| 766 | RETURN(NMI) | ||
| 767 | END(nmi) | ||
| 768 | |||
| 769 | |||
| 770 | /* | ||
| 771 | * Trap with no handler | ||
| 772 | */ | ||
| 773 | L_ENTRY(bad_trap_wrapper): | ||
| 774 | mov r19, r6 // Arg 0: trap number | ||
| 775 | movea PTO, sp, r7 // Arg 1: user regs | ||
| 776 | jr CSYM(bad_trap) // tail call handler | ||
| 777 | END(bad_trap_wrapper) | ||
| 778 | |||
| 779 | |||
| 780 | /* | ||
| 781 | * Invoke the scheduler, called from the trap/irq kernel exit path. | ||
| 782 | * | ||
| 783 | * This basically just calls `schedule', but also arranges for extra | ||
| 784 | * registers to be saved for ptrace'd processes, so ptrace can modify them. | ||
| 785 | */ | ||
| 786 | L_ENTRY(call_scheduler): | ||
| 787 | ld.w TASK_PTRACE[CURRENT_TASK], r19 // See if task is ptrace'd | ||
| 788 | cmp r19, r0 | ||
| 789 | bnz 1f // ... yes, do special stuff | ||
| 790 | jr CSYM(schedule) // ... no, just tail-call scheduler | ||
| 791 | |||
| 792 | // Save extra regs for ptrace'd task. We want to save anything | ||
| 793 | // that would otherwise only be `implicitly' saved by the normal | ||
| 794 | // compiler calling-convention. | ||
| 795 | 1: mov sp, ep // Setup EP for SAVE_CALL_SAVED_REGS | ||
| 796 | SAVE_CALL_SAVED_REGS // Save call-saved registers to stack | ||
| 797 | mov lp, r20 // Save LP in a callee-saved register | ||
| 798 | |||
| 799 | jarl CSYM(schedule), lp // Call scheduler | ||
| 800 | |||
| 801 | mov r20, lp | ||
| 802 | mov sp, ep // We can't rely on EP after return | ||
| 803 | RESTORE_CALL_SAVED_REGS // Restore (possibly modified) regs | ||
| 804 | jmp [lp] // Return to the return path | ||
| 805 | END(call_scheduler) | ||
| 806 | |||
| 807 | |||
| 808 | /* | ||
| 809 | * This is an out-of-line handler for two special cases during the kernel | ||
| 810 | * trap/irq exit sequence: | ||
| 811 | * | ||
| 812 | * (1) If r18 is non-zero then a signal needs to be handled, which is | ||
| 813 | * done, and then the caller returned to. | ||
| 814 | * | ||
| 815 | * (2) If r18 is non-zero then we're returning to a ptraced process, which | ||
| 816 | * has several special cases -- single-stepping and trap tracing, both | ||
| 817 | * of which require using the `dbret' instruction to exit the kernel | ||
| 818 | * instead of the normal `reti' (this is because the CPU not correctly | ||
| 819 | * single-step after a reti). In this case, of course, this handler | ||
| 820 | * never returns to the caller. | ||
| 821 | * | ||
| 822 | * In either case, all registers should have been saved to the current | ||
| 823 | * state-save-frame on the stack, except for callee-saved registers. | ||
| 824 | * | ||
| 825 | * [These two different cases are combined merely to avoid bloating the | ||
| 826 | * macro-inlined code, not because they really make much sense together!] | ||
| 827 | */ | ||
| 828 | L_ENTRY(handle_signal_or_ptrace_return): | ||
| 829 | cmp r18, r0 // See if handling a signal | ||
| 830 | bz 1f // ... nope, go do ptrace return | ||
| 831 | |||
| 832 | // Handle a signal | ||
| 833 | mov lp, r20 // Save link-pointer | ||
| 834 | mov r10, r21 // Save return-values (for trap) | ||
| 835 | mov r11, r22 | ||
| 836 | |||
| 837 | movea PTO, sp, r6 // Arg 1: struct pt_regs *regs | ||
| 838 | mov r0, r7 // Arg 2: sigset_t *oldset | ||
| 839 | jarl CSYM(do_signal), lp // Handle the signal | ||
| 840 | di // sig handling enables interrupts | ||
| 841 | |||
| 842 | mov r20, lp // Restore link-pointer | ||
| 843 | mov r21, r10 // Restore return-values (for trap) | ||
| 844 | mov r22, r11 | ||
| 845 | ld.w TASK_PTRACE[CURRENT_TASK], r19 // check ptrace flags too | ||
| 846 | cmp r19, r0 | ||
| 847 | bnz 1f // ... some set, so look more | ||
| 848 | 2: jmp [lp] // ... none set, so return normally | ||
| 849 | |||
| 850 | // ptrace return | ||
| 851 | 1: ld.w PTO+PT_PSW[sp], r19 // Look at user-processes's flags | ||
| 852 | andi 0x0800, r19, r19 // See if single-step flag is set | ||
| 853 | bz 2b // ... nope, return normally | ||
| 854 | |||
| 855 | // Return as if from a dbtrap insn | ||
| 856 | st.b r0, KM // Now officially in user state. | ||
| 857 | POP_STATE(DBTRAP) // Restore regs | ||
| 858 | st.w sp, KSP // Save the kernel stack pointer. | ||
| 859 | ld.w PT_GPR(GPR_SP)-PT_SIZE[sp], sp // Restore user stack pointer. | ||
| 860 | DBTRAP_RET // Return from the trap/interrupt. | ||
| 861 | END(handle_signal_or_ptrace_return) | ||
| 862 | |||
| 863 | |||
| 864 | /* | ||
| 865 | * This is where we switch between two threads. The arguments are: | ||
| 866 | * r6 -- pointer to the struct thread for the `current' process | ||
| 867 | * r7 -- pointer to the struct thread for the `new' process. | ||
| 868 | * when this function returns, it will return to the new thread. | ||
| 869 | */ | ||
| 870 | C_ENTRY(switch_thread): | ||
| 871 | // Return the previous task (r10 is not clobbered by restore below) | ||
| 872 | mov CURRENT_TASK, r10 | ||
| 873 | // First, push the current processor state on the stack | ||
| 874 | PUSH_STATE(SWITCH) | ||
| 875 | // Now save the location of the kernel stack pointer for this thread; | ||
| 876 | // since we've pushed all other state on the stack, this is enough to | ||
| 877 | // restore it all later. | ||
| 878 | st.w sp, THREAD_KSP[r6] | ||
| 879 | // Now restore the stack pointer from the new process | ||
| 880 | ld.w THREAD_KSP[r7], sp | ||
| 881 | // ... and restore all state from that | ||
| 882 | POP_STATE(SWITCH) | ||
| 883 | // Update the current task pointer | ||
| 884 | GET_CURRENT_TASK(CURRENT_TASK) | ||
| 885 | // Now return into the new thread | ||
| 886 | jmp [lp] | ||
| 887 | C_END(switch_thread) | ||
| 888 | |||
| 889 | |||
| 890 | .data | ||
| 891 | |||
| 892 | .align 4 | ||
| 893 | C_DATA(trap_table): | ||
| 894 | .long bad_trap_wrapper // trap 0, doesn't use trap table. | ||
| 895 | .long syscall_long // trap 1, `long' syscall. | ||
| 896 | .long bad_trap_wrapper | ||
| 897 | .long bad_trap_wrapper | ||
| 898 | .long bad_trap_wrapper | ||
| 899 | .long bad_trap_wrapper | ||
| 900 | .long bad_trap_wrapper | ||
| 901 | .long bad_trap_wrapper | ||
| 902 | .long bad_trap_wrapper | ||
| 903 | .long bad_trap_wrapper | ||
| 904 | .long bad_trap_wrapper | ||
| 905 | .long bad_trap_wrapper | ||
| 906 | .long bad_trap_wrapper | ||
| 907 | .long bad_trap_wrapper | ||
| 908 | .long bad_trap_wrapper | ||
| 909 | .long bad_trap_wrapper | ||
| 910 | C_END(trap_table) | ||
| 911 | |||
| 912 | |||
| 913 | .section .rodata | ||
| 914 | |||
| 915 | .align 4 | ||
| 916 | C_DATA(sys_call_table): | ||
| 917 | .long CSYM(sys_restart_syscall) // 0 | ||
| 918 | .long CSYM(sys_exit) | ||
| 919 | .long sys_fork_wrapper | ||
| 920 | .long CSYM(sys_read) | ||
| 921 | .long CSYM(sys_write) | ||
| 922 | .long CSYM(sys_open) // 5 | ||
| 923 | .long CSYM(sys_close) | ||
| 924 | .long CSYM(sys_waitpid) | ||
| 925 | .long CSYM(sys_creat) | ||
| 926 | .long CSYM(sys_link) | ||
| 927 | .long CSYM(sys_unlink) // 10 | ||
| 928 | .long sys_execve_wrapper | ||
| 929 | .long CSYM(sys_chdir) | ||
| 930 | .long CSYM(sys_time) | ||
| 931 | .long CSYM(sys_mknod) | ||
| 932 | .long CSYM(sys_chmod) // 15 | ||
| 933 | .long CSYM(sys_chown) | ||
| 934 | .long CSYM(sys_ni_syscall) // was: break | ||
| 935 | .long CSYM(sys_ni_syscall) // was: oldstat (aka stat) | ||
| 936 | .long CSYM(sys_lseek) | ||
| 937 | .long CSYM(sys_getpid) // 20 | ||
| 938 | .long CSYM(sys_mount) | ||
| 939 | .long CSYM(sys_oldumount) | ||
| 940 | .long CSYM(sys_setuid) | ||
| 941 | .long CSYM(sys_getuid) | ||
| 942 | .long CSYM(sys_stime) // 25 | ||
| 943 | .long CSYM(sys_ptrace) | ||
| 944 | .long CSYM(sys_alarm) | ||
| 945 | .long CSYM(sys_ni_syscall) // was: oldfstat (aka fstat) | ||
| 946 | .long CSYM(sys_pause) | ||
| 947 | .long CSYM(sys_utime) // 30 | ||
| 948 | .long CSYM(sys_ni_syscall) // was: stty | ||
| 949 | .long CSYM(sys_ni_syscall) // was: gtty | ||
| 950 | .long CSYM(sys_access) | ||
| 951 | .long CSYM(sys_nice) | ||
| 952 | .long CSYM(sys_ni_syscall) // 35, was: ftime | ||
| 953 | .long CSYM(sys_sync) | ||
| 954 | .long CSYM(sys_kill) | ||
| 955 | .long CSYM(sys_rename) | ||
| 956 | .long CSYM(sys_mkdir) | ||
| 957 | .long CSYM(sys_rmdir) // 40 | ||
| 958 | .long CSYM(sys_dup) | ||
| 959 | .long CSYM(sys_pipe) | ||
| 960 | .long CSYM(sys_times) | ||
| 961 | .long CSYM(sys_ni_syscall) // was: prof | ||
| 962 | .long CSYM(sys_brk) // 45 | ||
| 963 | .long CSYM(sys_setgid) | ||
| 964 | .long CSYM(sys_getgid) | ||
| 965 | .long CSYM(sys_signal) | ||
| 966 | .long CSYM(sys_geteuid) | ||
| 967 | .long CSYM(sys_getegid) // 50 | ||
| 968 | .long CSYM(sys_acct) | ||
| 969 | .long CSYM(sys_umount) // recycled never used phys() | ||
| 970 | .long CSYM(sys_ni_syscall) // was: lock | ||
| 971 | .long CSYM(sys_ioctl) | ||
| 972 | .long CSYM(sys_fcntl) // 55 | ||
| 973 | .long CSYM(sys_ni_syscall) // was: mpx | ||
| 974 | .long CSYM(sys_setpgid) | ||
| 975 | .long CSYM(sys_ni_syscall) // was: ulimit | ||
| 976 | .long CSYM(sys_ni_syscall) | ||
| 977 | .long CSYM(sys_umask) // 60 | ||
| 978 | .long CSYM(sys_chroot) | ||
| 979 | .long CSYM(sys_ustat) | ||
| 980 | .long CSYM(sys_dup2) | ||
| 981 | .long CSYM(sys_getppid) | ||
| 982 | .long CSYM(sys_getpgrp) // 65 | ||
| 983 | .long CSYM(sys_setsid) | ||
| 984 | .long CSYM(sys_sigaction) | ||
| 985 | .long CSYM(sys_sgetmask) | ||
| 986 | .long CSYM(sys_ssetmask) | ||
| 987 | .long CSYM(sys_setreuid) // 70 | ||
| 988 | .long CSYM(sys_setregid) | ||
| 989 | .long sys_sigsuspend_wrapper | ||
| 990 | .long CSYM(sys_sigpending) | ||
| 991 | .long CSYM(sys_sethostname) | ||
| 992 | .long CSYM(sys_setrlimit) // 75 | ||
| 993 | .long CSYM(sys_getrlimit) | ||
| 994 | .long CSYM(sys_getrusage) | ||
| 995 | .long CSYM(sys_gettimeofday) | ||
| 996 | .long CSYM(sys_settimeofday) | ||
| 997 | .long CSYM(sys_getgroups) // 80 | ||
| 998 | .long CSYM(sys_setgroups) | ||
| 999 | .long CSYM(sys_select) | ||
| 1000 | .long CSYM(sys_symlink) | ||
| 1001 | .long CSYM(sys_ni_syscall) // was: oldlstat (aka lstat) | ||
| 1002 | .long CSYM(sys_readlink) // 85 | ||
| 1003 | .long CSYM(sys_uselib) | ||
| 1004 | .long CSYM(sys_swapon) | ||
| 1005 | .long CSYM(sys_reboot) | ||
| 1006 | .long CSYM(old_readdir) | ||
| 1007 | .long CSYM(sys_mmap) // 90 | ||
| 1008 | .long CSYM(sys_munmap) | ||
| 1009 | .long CSYM(sys_truncate) | ||
| 1010 | .long CSYM(sys_ftruncate) | ||
| 1011 | .long CSYM(sys_fchmod) | ||
| 1012 | .long CSYM(sys_fchown) // 95 | ||
| 1013 | .long CSYM(sys_getpriority) | ||
| 1014 | .long CSYM(sys_setpriority) | ||
| 1015 | .long CSYM(sys_ni_syscall) // was: profil | ||
| 1016 | .long CSYM(sys_statfs) | ||
| 1017 | .long CSYM(sys_fstatfs) // 100 | ||
| 1018 | .long CSYM(sys_ni_syscall) // i386: ioperm | ||
| 1019 | .long CSYM(sys_socketcall) | ||
| 1020 | .long CSYM(sys_syslog) | ||
| 1021 | .long CSYM(sys_setitimer) | ||
| 1022 | .long CSYM(sys_getitimer) // 105 | ||
| 1023 | .long CSYM(sys_newstat) | ||
| 1024 | .long CSYM(sys_newlstat) | ||
| 1025 | .long CSYM(sys_newfstat) | ||
| 1026 | .long CSYM(sys_ni_syscall) // was: olduname (aka uname) | ||
| 1027 | .long CSYM(sys_ni_syscall) // 110, i386: iopl | ||
| 1028 | .long CSYM(sys_vhangup) | ||
| 1029 | .long CSYM(sys_ni_syscall) // was: idle | ||
| 1030 | .long CSYM(sys_ni_syscall) // i386: vm86old | ||
| 1031 | .long CSYM(sys_wait4) | ||
| 1032 | .long CSYM(sys_swapoff) // 115 | ||
| 1033 | .long CSYM(sys_sysinfo) | ||
| 1034 | .long CSYM(sys_ipc) | ||
| 1035 | .long CSYM(sys_fsync) | ||
| 1036 | .long sys_sigreturn_wrapper | ||
| 1037 | .long sys_clone_wrapper // 120 | ||
| 1038 | .long CSYM(sys_setdomainname) | ||
| 1039 | .long CSYM(sys_newuname) | ||
| 1040 | .long CSYM(sys_ni_syscall) // i386: modify_ldt, m68k: cacheflush | ||
| 1041 | .long CSYM(sys_adjtimex) | ||
| 1042 | .long CSYM(sys_ni_syscall) // 125 - sys_mprotect | ||
| 1043 | .long CSYM(sys_sigprocmask) | ||
| 1044 | .long CSYM(sys_ni_syscall) // sys_create_module | ||
| 1045 | .long CSYM(sys_init_module) | ||
| 1046 | .long CSYM(sys_delete_module) | ||
| 1047 | .long CSYM(sys_ni_syscall) // 130 - sys_get_kernel_syms | ||
| 1048 | .long CSYM(sys_quotactl) | ||
| 1049 | .long CSYM(sys_getpgid) | ||
| 1050 | .long CSYM(sys_fchdir) | ||
| 1051 | .long CSYM(sys_bdflush) | ||
| 1052 | .long CSYM(sys_sysfs) // 135 | ||
| 1053 | .long CSYM(sys_personality) | ||
| 1054 | .long CSYM(sys_ni_syscall) // for afs_syscall | ||
| 1055 | .long CSYM(sys_setfsuid) | ||
| 1056 | .long CSYM(sys_setfsgid) | ||
| 1057 | .long CSYM(sys_llseek) // 140 | ||
| 1058 | .long CSYM(sys_getdents) | ||
| 1059 | .long CSYM(sys_select) // for backward compat; remove someday | ||
| 1060 | .long CSYM(sys_flock) | ||
| 1061 | .long CSYM(sys_ni_syscall) // sys_msync | ||
| 1062 | .long CSYM(sys_readv) // 145 | ||
| 1063 | .long CSYM(sys_writev) | ||
| 1064 | .long CSYM(sys_getsid) | ||
| 1065 | .long CSYM(sys_fdatasync) | ||
| 1066 | .long CSYM(sys_sysctl) | ||
| 1067 | .long CSYM(sys_ni_syscall) // 150 - sys_mlock | ||
| 1068 | .long CSYM(sys_ni_syscall) // sys_munlock | ||
| 1069 | .long CSYM(sys_ni_syscall) // sys_mlockall | ||
| 1070 | .long CSYM(sys_ni_syscall) // sys_munlockall | ||
| 1071 | .long CSYM(sys_sched_setparam) | ||
| 1072 | .long CSYM(sys_sched_getparam) // 155 | ||
| 1073 | .long CSYM(sys_sched_setscheduler) | ||
| 1074 | .long CSYM(sys_sched_getscheduler) | ||
| 1075 | .long CSYM(sys_sched_yield) | ||
| 1076 | .long CSYM(sys_sched_get_priority_max) | ||
| 1077 | .long CSYM(sys_sched_get_priority_min) // 160 | ||
| 1078 | .long CSYM(sys_sched_rr_get_interval) | ||
| 1079 | .long CSYM(sys_nanosleep) | ||
| 1080 | .long CSYM(sys_ni_syscall) // sys_mremap | ||
| 1081 | .long CSYM(sys_setresuid) | ||
| 1082 | .long CSYM(sys_getresuid) // 165 | ||
| 1083 | .long CSYM(sys_ni_syscall) // for vm86 | ||
| 1084 | .long CSYM(sys_ni_syscall) // sys_query_module | ||
| 1085 | .long CSYM(sys_poll) | ||
| 1086 | .long CSYM(sys_nfsservctl) | ||
| 1087 | .long CSYM(sys_setresgid) // 170 | ||
| 1088 | .long CSYM(sys_getresgid) | ||
| 1089 | .long CSYM(sys_prctl) | ||
| 1090 | .long sys_rt_sigreturn_wrapper | ||
| 1091 | .long CSYM(sys_rt_sigaction) | ||
| 1092 | .long CSYM(sys_rt_sigprocmask) // 175 | ||
| 1093 | .long CSYM(sys_rt_sigpending) | ||
| 1094 | .long CSYM(sys_rt_sigtimedwait) | ||
| 1095 | .long CSYM(sys_rt_sigqueueinfo) | ||
| 1096 | .long sys_rt_sigsuspend_wrapper | ||
| 1097 | .long CSYM(sys_pread64) // 180 | ||
| 1098 | .long CSYM(sys_pwrite64) | ||
| 1099 | .long CSYM(sys_lchown) | ||
| 1100 | .long CSYM(sys_getcwd) | ||
| 1101 | .long CSYM(sys_capget) | ||
| 1102 | .long CSYM(sys_capset) // 185 | ||
| 1103 | .long CSYM(sys_sigaltstack) | ||
| 1104 | .long CSYM(sys_sendfile) | ||
| 1105 | .long CSYM(sys_ni_syscall) // streams1 | ||
| 1106 | .long CSYM(sys_ni_syscall) // streams2 | ||
| 1107 | .long sys_vfork_wrapper // 190 | ||
| 1108 | .long CSYM(sys_ni_syscall) | ||
| 1109 | .long CSYM(sys_mmap2) | ||
| 1110 | .long CSYM(sys_truncate64) | ||
| 1111 | .long CSYM(sys_ftruncate64) | ||
| 1112 | .long CSYM(sys_stat64) // 195 | ||
| 1113 | .long CSYM(sys_lstat64) | ||
| 1114 | .long CSYM(sys_fstat64) | ||
| 1115 | .long CSYM(sys_fcntl64) | ||
| 1116 | .long CSYM(sys_getdents64) | ||
| 1117 | .long CSYM(sys_pivot_root) // 200 | ||
| 1118 | .long CSYM(sys_gettid) | ||
| 1119 | .long CSYM(sys_tkill) | ||
| 1120 | sys_call_table_end: | ||
| 1121 | C_END(sys_call_table) | ||
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c deleted file mode 100644 index ab9cf16a85c8..000000000000 --- a/arch/v850/kernel/fpga85e2c.c +++ /dev/null | |||
| @@ -1,167 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/fpga85e2c.h -- Machine-dependent defs for | ||
| 3 | * FPGA implementation of V850E2/NA85E2C | ||
| 4 | * | ||
| 5 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/kernel.h> | ||
| 16 | #include <linux/module.h> | ||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/mm.h> | ||
| 19 | #include <linux/swap.h> | ||
| 20 | #include <linux/bootmem.h> | ||
| 21 | #include <linux/irq.h> | ||
| 22 | #include <linux/bitops.h> | ||
| 23 | |||
| 24 | #include <asm/atomic.h> | ||
| 25 | #include <asm/page.h> | ||
| 26 | #include <asm/machdep.h> | ||
| 27 | |||
| 28 | #include "mach.h" | ||
| 29 | |||
| 30 | extern void memcons_setup (void); | ||
| 31 | |||
| 32 | |||
| 33 | #define REG_DUMP_ADDR 0x220000 | ||
| 34 | |||
| 35 | |||
| 36 | extern struct irqaction reg_snap_action; /* fwd decl */ | ||
| 37 | |||
| 38 | |||
| 39 | void __init mach_early_init (void) | ||
| 40 | { | ||
| 41 | int i; | ||
| 42 | const u32 *src; | ||
| 43 | register u32 *dst asm ("ep"); | ||
| 44 | extern u32 _intv_end, _intv_load_start; | ||
| 45 | |||
| 46 | /* Set bus sizes: CS0 32-bit, CS1 16-bit, CS7 8-bit, | ||
| 47 | everything else 32-bit. */ | ||
| 48 | V850E2_BSC = 0x2AA6; | ||
| 49 | for (i = 2; i <= 6; i++) | ||
| 50 | CSDEV(i) = 0; /* 32 bit */ | ||
| 51 | |||
| 52 | /* Ensure that the simulator halts on a panic, instead of going | ||
| 53 | into an infinite loop inside the panic function. */ | ||
| 54 | panic_timeout = -1; | ||
| 55 | |||
| 56 | /* Move the interrupt vectors into their real location. Note that | ||
| 57 | any relocations there are relative to the real location, so we | ||
| 58 | don't have to fix anything up. We use a loop instead of calling | ||
| 59 | memcpy to keep this a leaf function (to avoid a function | ||
| 60 | prologue being generated). */ | ||
| 61 | dst = 0x10; /* &_intv_start + 0x10. */ | ||
| 62 | src = &_intv_load_start; | ||
| 63 | do { | ||
| 64 | u32 t0 = src[0], t1 = src[1], t2 = src[2], t3 = src[3]; | ||
| 65 | u32 t4 = src[4], t5 = src[5], t6 = src[6], t7 = src[7]; | ||
| 66 | dst[0] = t0; dst[1] = t1; dst[2] = t2; dst[3] = t3; | ||
| 67 | dst[4] = t4; dst[5] = t5; dst[6] = t6; dst[7] = t7; | ||
| 68 | dst += 8; | ||
| 69 | src += 8; | ||
| 70 | } while (dst < &_intv_end); | ||
| 71 | } | ||
| 72 | |||
| 73 | void __init mach_setup (char **cmdline) | ||
| 74 | { | ||
| 75 | memcons_setup (); | ||
| 76 | |||
| 77 | /* Setup up NMI0 to copy the registers to a known memory location. | ||
| 78 | The FGPA board has a button that produces NMI0 when pressed, so | ||
| 79 | this allows us to push the button, and then look at memory to see | ||
| 80 | what's in the registers (there's no other way to easily do so). | ||
| 81 | We have to use `setup_irq' instead of `request_irq' because it's | ||
| 82 | still too early to do memory allocation. */ | ||
| 83 | setup_irq (IRQ_NMI (0), ®_snap_action); | ||
| 84 | } | ||
| 85 | |||
| 86 | void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len) | ||
| 87 | { | ||
| 88 | *ram_start = ERAM_ADDR; | ||
| 89 | *ram_len = ERAM_SIZE; | ||
| 90 | } | ||
| 91 | |||
| 92 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 93 | { | ||
| 94 | /* Setup up the timer interrupt. The FPGA peripheral control | ||
| 95 | registers _only_ work with single-bit writes (set1/clr1)! */ | ||
| 96 | __clear_bit (RPU_GTMC_CE_BIT, &RPU_GTMC); | ||
| 97 | __clear_bit (RPU_GTMC_CLK_BIT, &RPU_GTMC); | ||
| 98 | __set_bit (RPU_GTMC_CE_BIT, &RPU_GTMC); | ||
| 99 | |||
| 100 | /* We use the first RPU interrupt, which occurs every 8.192ms. */ | ||
| 101 | setup_irq (IRQ_RPU (0), timer_action); | ||
| 102 | } | ||
| 103 | |||
| 104 | |||
| 105 | void mach_gettimeofday (struct timespec *tv) | ||
| 106 | { | ||
| 107 | tv->tv_sec = 0; | ||
| 108 | tv->tv_nsec = 0; | ||
| 109 | } | ||
| 110 | |||
| 111 | void machine_halt (void) __attribute__ ((noreturn)); | ||
| 112 | void machine_halt (void) | ||
| 113 | { | ||
| 114 | for (;;) { | ||
| 115 | DWC(0) = 0x7777; | ||
| 116 | DWC(1) = 0x7777; | ||
| 117 | ASC = 0xffff; | ||
| 118 | FLGREG(0) = 1; /* Halt immediately. */ | ||
| 119 | asm ("di; halt; nop; nop; nop; nop; nop"); | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | void machine_restart (char *__unused) | ||
| 124 | { | ||
| 125 | machine_halt (); | ||
| 126 | } | ||
| 127 | |||
| 128 | void machine_power_off (void) | ||
| 129 | { | ||
| 130 | machine_halt (); | ||
| 131 | } | ||
| 132 | |||
| 133 | |||
| 134 | /* Interrupts */ | ||
| 135 | |||
| 136 | struct v850e_intc_irq_init irq_inits[] = { | ||
| 137 | { "IRQ", 0, NUM_MACH_IRQS, 1, 7 }, | ||
| 138 | { "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 }, | ||
| 139 | { 0 } | ||
| 140 | }; | ||
| 141 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) | ||
| 142 | |||
| 143 | struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
| 144 | |||
| 145 | /* Initialize interrupts. */ | ||
| 146 | void __init mach_init_irqs (void) | ||
| 147 | { | ||
| 148 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 149 | } | ||
| 150 | |||
| 151 | |||
| 152 | /* An interrupt handler that copies the registers to a known memory location, | ||
| 153 | for debugging purposes. */ | ||
| 154 | |||
| 155 | static void make_reg_snap (int irq, void *dummy, struct pt_regs *regs) | ||
| 156 | { | ||
| 157 | (*(unsigned *)REG_DUMP_ADDR)++; | ||
| 158 | (*(struct pt_regs *)(REG_DUMP_ADDR + sizeof (unsigned))) = *regs; | ||
| 159 | } | ||
| 160 | |||
| 161 | static int reg_snap_dev_id; | ||
| 162 | static struct irqaction reg_snap_action = { | ||
| 163 | .handler = make_reg_snap, | ||
| 164 | .mask = CPU_MASK_NONE, | ||
| 165 | .name = "reg_snap", | ||
| 166 | .dev_id = ®_snap_dev_id, | ||
| 167 | }; | ||
diff --git a/arch/v850/kernel/fpga85e2c.ld b/arch/v850/kernel/fpga85e2c.ld deleted file mode 100644 index b5d4578ae411..000000000000 --- a/arch/v850/kernel/fpga85e2c.ld +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | /* Linker script for the FPGA implementation of the V850E2 NA85E2C cpu core | ||
| 2 | (CONFIG_V850E2_FPGA85E2C). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* Reset vector. */ | ||
| 6 | RESET : ORIGIN = 0, LENGTH = 0x10 | ||
| 7 | /* Interrupt vectors. */ | ||
| 8 | INTV : ORIGIN = 0x10, LENGTH = 0x470 | ||
| 9 | /* The `window' in RAM were we're allowed to load stuff. */ | ||
| 10 | RAM_LOW : ORIGIN = 0x480, LENGTH = 0x0005FB80 | ||
| 11 | /* Some more ram above the window were we can put bss &c. */ | ||
| 12 | RAM_HIGH : ORIGIN = 0x00060000, LENGTH = 0x000A0000 | ||
| 13 | /* This is the area visible from the outside world (we can use | ||
| 14 | this only for uninitialized data). */ | ||
| 15 | VISIBLE : ORIGIN = 0x00200000, LENGTH = 0x00060000 | ||
| 16 | } | ||
| 17 | |||
| 18 | SECTIONS { | ||
| 19 | .reset : { | ||
| 20 | __kram_start = . ; | ||
| 21 | __intv_start = . ; | ||
| 22 | *(.intv.reset) /* Reset vector */ | ||
| 23 | } > RESET | ||
| 24 | |||
| 25 | .ram_low : { | ||
| 26 | __r0_ram = . ; /* Must be near address 0. */ | ||
| 27 | . = . + 32 ; | ||
| 28 | |||
| 29 | TEXT_CONTENTS | ||
| 30 | DATA_CONTENTS | ||
| 31 | ROOT_FS_CONTENTS | ||
| 32 | RAMK_INIT_CONTENTS_NO_END | ||
| 33 | INITRAMFS_CONTENTS | ||
| 34 | } > RAM_LOW | ||
| 35 | |||
| 36 | /* Where the interrupt vectors are initially loaded. */ | ||
| 37 | __intv_load_start = . ; | ||
| 38 | |||
| 39 | .intv : { | ||
| 40 | *(.intv.common) /* Vectors common to all v850e proc. */ | ||
| 41 | *(.intv.mach) /* Machine-specific int. vectors. */ | ||
| 42 | __intv_end = . ; | ||
| 43 | } > INTV AT> RAM_LOW | ||
| 44 | |||
| 45 | .ram_high : { | ||
| 46 | /* This is here so that when we free init memory the | ||
| 47 | load-time copy of the interrupt vectors and any empty | ||
| 48 | space at the end of the `RAM_LOW' area is freed too. */ | ||
| 49 | . = ALIGN (4096); | ||
| 50 | __init_end = . ; | ||
| 51 | |||
| 52 | BSS_CONTENTS | ||
| 53 | __kram_end = . ; | ||
| 54 | BOOTMAP_CONTENTS | ||
| 55 | } > RAM_HIGH | ||
| 56 | |||
| 57 | .visible : { | ||
| 58 | _memcons_output = . ; | ||
| 59 | . = . + 0x8000 ; | ||
| 60 | _memcons_output_end = . ; | ||
| 61 | } > VISIBLE | ||
| 62 | } | ||
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c deleted file mode 100644 index b2bcc251f65b..000000000000 --- a/arch/v850/kernel/gbus_int.c +++ /dev/null | |||
| @@ -1,271 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/gbus_int.c -- Midas labs GBUS interrupt support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/types.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/irq.h> | ||
| 17 | #include <linux/interrupt.h> | ||
| 18 | #include <linux/signal.h> | ||
| 19 | #include <linux/kernel.h> | ||
| 20 | |||
| 21 | #include <asm/machdep.h> | ||
| 22 | |||
| 23 | |||
| 24 | /* The number of shared GINT interrupts. */ | ||
| 25 | #define NUM_GINTS 4 | ||
| 26 | |||
| 27 | /* For each GINT interrupt, how many GBUS interrupts are using it. */ | ||
| 28 | static unsigned gint_num_active_irqs[NUM_GINTS] = { 0 }; | ||
| 29 | |||
| 30 | /* A table of GINTn interrupts we actually use. | ||
| 31 | Note that we don't use GINT0 because all the boards we support treat it | ||
| 32 | specially. */ | ||
| 33 | struct used_gint { | ||
| 34 | unsigned gint; | ||
| 35 | unsigned priority; | ||
| 36 | } used_gint[] = { | ||
| 37 | { 1, GBUS_INT_PRIORITY_HIGH }, | ||
| 38 | { 3, GBUS_INT_PRIORITY_LOW } | ||
| 39 | }; | ||
| 40 | #define NUM_USED_GINTS ARRAY_SIZE(used_gint) | ||
| 41 | |||
| 42 | /* A table of which GINT is used by each GBUS interrupts (they are | ||
| 43 | assigned based on priority). */ | ||
| 44 | static unsigned char gbus_int_gint[IRQ_GBUS_INT_NUM]; | ||
| 45 | |||
| 46 | |||
| 47 | /* Interrupt enabling/disabling. */ | ||
| 48 | |||
| 49 | /* Enable interrupt handling for interrupt IRQ. */ | ||
| 50 | void gbus_int_enable_irq (unsigned irq) | ||
| 51 | { | ||
| 52 | unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ]; | ||
| 53 | GBUS_INT_ENABLE (GBUS_INT_IRQ_WORD(irq), gint) | ||
| 54 | |= GBUS_INT_IRQ_MASK (irq); | ||
| 55 | } | ||
| 56 | |||
| 57 | /* Disable interrupt handling for interrupt IRQ. Note that any | ||
| 58 | interrupts received while disabled will be delivered once the | ||
| 59 | interrupt is enabled again, unless they are explicitly cleared using | ||
| 60 | `gbus_int_clear_pending_irq'. */ | ||
| 61 | void gbus_int_disable_irq (unsigned irq) | ||
| 62 | { | ||
| 63 | unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ]; | ||
| 64 | GBUS_INT_ENABLE (GBUS_INT_IRQ_WORD(irq), gint) | ||
| 65 | &= ~GBUS_INT_IRQ_MASK (irq); | ||
| 66 | } | ||
| 67 | |||
| 68 | /* Return true if interrupt handling for interrupt IRQ is enabled. */ | ||
| 69 | int gbus_int_irq_enabled (unsigned irq) | ||
| 70 | { | ||
| 71 | unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ]; | ||
| 72 | return (GBUS_INT_ENABLE (GBUS_INT_IRQ_WORD(irq), gint) | ||
| 73 | & GBUS_INT_IRQ_MASK(irq)); | ||
| 74 | } | ||
| 75 | |||
| 76 | /* Disable all GBUS irqs. */ | ||
| 77 | void gbus_int_disable_irqs () | ||
| 78 | { | ||
| 79 | unsigned w, n; | ||
| 80 | for (w = 0; w < GBUS_INT_NUM_WORDS; w++) | ||
| 81 | for (n = 0; n < IRQ_GINT_NUM; n++) | ||
| 82 | GBUS_INT_ENABLE (w, n) = 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | /* Clear any pending interrupts for IRQ. */ | ||
| 86 | void gbus_int_clear_pending_irq (unsigned irq) | ||
| 87 | { | ||
| 88 | GBUS_INT_CLEAR (GBUS_INT_IRQ_WORD(irq)) = GBUS_INT_IRQ_MASK (irq); | ||
| 89 | } | ||
| 90 | |||
| 91 | /* Return true if interrupt IRQ is pending (but disabled). */ | ||
| 92 | int gbus_int_irq_pending (unsigned irq) | ||
| 93 | { | ||
| 94 | return (GBUS_INT_STATUS (GBUS_INT_IRQ_WORD(irq)) | ||
| 95 | & GBUS_INT_IRQ_MASK(irq)); | ||
| 96 | } | ||
| 97 | |||
| 98 | |||
| 99 | /* Delegating interrupts. */ | ||
| 100 | |||
| 101 | /* Handle a shared GINT interrupt by passing to the appropriate GBUS | ||
| 102 | interrupt handler. */ | ||
| 103 | static irqreturn_t gbus_int_handle_irq (int irq, void *dev_id, | ||
| 104 | struct pt_regs *regs) | ||
| 105 | { | ||
| 106 | unsigned w; | ||
| 107 | irqreturn_t rval = IRQ_NONE; | ||
| 108 | unsigned gint = irq - IRQ_GINT (0); | ||
| 109 | |||
| 110 | for (w = 0; w < GBUS_INT_NUM_WORDS; w++) { | ||
| 111 | unsigned status = GBUS_INT_STATUS (w); | ||
| 112 | unsigned enable = GBUS_INT_ENABLE (w, gint); | ||
| 113 | |||
| 114 | /* Only pay attention to enabled interrupts. */ | ||
| 115 | status &= enable; | ||
| 116 | if (status) { | ||
| 117 | irq = IRQ_GBUS_INT (w * GBUS_INT_BITS_PER_WORD); | ||
| 118 | do { | ||
| 119 | /* There's an active interrupt in word | ||
| 120 | W, find out which one, and call its | ||
| 121 | handler. */ | ||
| 122 | |||
| 123 | while (! (status & 0x1)) { | ||
| 124 | irq++; | ||
| 125 | status >>= 1; | ||
| 126 | } | ||
| 127 | status &= ~0x1; | ||
| 128 | |||
| 129 | /* Recursively call handle_irq to handle it. */ | ||
| 130 | handle_irq (irq, regs); | ||
| 131 | rval = IRQ_HANDLED; | ||
| 132 | } while (status); | ||
| 133 | } | ||
| 134 | } | ||
| 135 | |||
| 136 | /* Toggle the `all enable' bit back and forth, which should cause | ||
| 137 | another edge transition if there are any other interrupts | ||
| 138 | still pending, and so result in another CPU interrupt. */ | ||
| 139 | GBUS_INT_ENABLE (0, gint) &= ~0x1; | ||
| 140 | GBUS_INT_ENABLE (0, gint) |= 0x1; | ||
| 141 | |||
| 142 | return rval; | ||
| 143 | } | ||
| 144 | |||
| 145 | |||
| 146 | /* Initialize GBUS interrupt sources. */ | ||
| 147 | |||
| 148 | static void irq_nop (unsigned irq) { } | ||
| 149 | |||
| 150 | static unsigned gbus_int_startup_irq (unsigned irq) | ||
| 151 | { | ||
| 152 | unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ]; | ||
| 153 | |||
| 154 | if (gint_num_active_irqs[gint] == 0) { | ||
| 155 | /* First enable the CPU interrupt. */ | ||
| 156 | int rval = | ||
| 157 | request_irq (IRQ_GINT(gint), gbus_int_handle_irq, | ||
| 158 | IRQF_DISABLED, | ||
| 159 | "gbus_int_handler", | ||
| 160 | &gint_num_active_irqs[gint]); | ||
| 161 | if (rval != 0) | ||
| 162 | return rval; | ||
| 163 | } | ||
| 164 | |||
| 165 | gint_num_active_irqs[gint]++; | ||
| 166 | |||
| 167 | gbus_int_clear_pending_irq (irq); | ||
| 168 | gbus_int_enable_irq (irq); | ||
| 169 | |||
| 170 | return 0; | ||
| 171 | } | ||
| 172 | |||
| 173 | static void gbus_int_shutdown_irq (unsigned irq) | ||
| 174 | { | ||
| 175 | unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ]; | ||
| 176 | |||
| 177 | gbus_int_disable_irq (irq); | ||
| 178 | |||
| 179 | if (--gint_num_active_irqs[gint] == 0) | ||
| 180 | /* Disable the CPU interrupt. */ | ||
| 181 | free_irq (IRQ_GINT(gint), &gint_num_active_irqs[gint]); | ||
| 182 | } | ||
| 183 | |||
| 184 | /* Initialize HW_IRQ_TYPES for INTC-controlled irqs described in array | ||
| 185 | INITS (which is terminated by an entry with the name field == 0). */ | ||
| 186 | void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits, | ||
| 187 | struct hw_interrupt_type *hw_irq_types) | ||
| 188 | { | ||
| 189 | struct gbus_int_irq_init *init; | ||
| 190 | for (init = inits; init->name; init++) { | ||
| 191 | unsigned i; | ||
| 192 | struct hw_interrupt_type *hwit = hw_irq_types++; | ||
| 193 | |||
| 194 | hwit->typename = init->name; | ||
| 195 | |||
| 196 | hwit->startup = gbus_int_startup_irq; | ||
| 197 | hwit->shutdown = gbus_int_shutdown_irq; | ||
| 198 | hwit->enable = gbus_int_enable_irq; | ||
| 199 | hwit->disable = gbus_int_disable_irq; | ||
| 200 | hwit->ack = irq_nop; | ||
| 201 | hwit->end = irq_nop; | ||
| 202 | |||
| 203 | /* Initialize kernel IRQ infrastructure for this interrupt. */ | ||
| 204 | init_irq_handlers(init->base, init->num, init->interval, hwit); | ||
| 205 | |||
| 206 | /* Set the interrupt priorities. */ | ||
| 207 | for (i = 0; i < init->num; i++) { | ||
| 208 | unsigned j; | ||
| 209 | for (j = 0; j < NUM_USED_GINTS; j++) | ||
| 210 | if (used_gint[j].priority > init->priority) | ||
| 211 | break; | ||
| 212 | /* Wherever we stopped looking is one past the | ||
| 213 | GINT we want. */ | ||
| 214 | gbus_int_gint[init->base + i * init->interval | ||
| 215 | - GBUS_INT_BASE_IRQ] | ||
| 216 | = used_gint[j > 0 ? j - 1 : 0].gint; | ||
| 217 | } | ||
| 218 | } | ||
| 219 | } | ||
| 220 | |||
| 221 | |||
| 222 | /* Initialize IRQS. */ | ||
| 223 | |||
| 224 | /* Chip interrupts (GINTn) shared among GBUS interrupts. */ | ||
| 225 | static struct hw_interrupt_type gint_hw_itypes[NUM_USED_GINTS]; | ||
| 226 | |||
| 227 | |||
| 228 | /* GBUS interrupts themselves. */ | ||
| 229 | |||
| 230 | struct gbus_int_irq_init gbus_irq_inits[] __initdata = { | ||
| 231 | /* First set defaults. */ | ||
| 232 | { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6}, | ||
| 233 | { 0 } | ||
| 234 | }; | ||
| 235 | #define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1) | ||
| 236 | |||
| 237 | static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; | ||
| 238 | |||
| 239 | |||
| 240 | /* Initialize GBUS interrupts. */ | ||
| 241 | void __init gbus_int_init_irqs (void) | ||
| 242 | { | ||
| 243 | unsigned i; | ||
| 244 | |||
| 245 | /* First initialize the shared gint interrupts. */ | ||
| 246 | for (i = 0; i < NUM_USED_GINTS; i++) { | ||
| 247 | unsigned gint = used_gint[i].gint; | ||
| 248 | struct v850e_intc_irq_init gint_irq_init[2]; | ||
| 249 | |||
| 250 | /* We initialize one GINT interrupt at a time. */ | ||
| 251 | gint_irq_init[0].name = "GINT"; | ||
| 252 | gint_irq_init[0].base = IRQ_GINT (gint); | ||
| 253 | gint_irq_init[0].num = 1; | ||
| 254 | gint_irq_init[0].interval = 1; | ||
| 255 | gint_irq_init[0].priority = used_gint[i].priority; | ||
| 256 | |||
| 257 | gint_irq_init[1].name = 0; /* Terminate the vector. */ | ||
| 258 | |||
| 259 | v850e_intc_init_irq_types (gint_irq_init, gint_hw_itypes); | ||
| 260 | } | ||
| 261 | |||
| 262 | /* Then the GBUS interrupts. */ | ||
| 263 | gbus_int_disable_irqs (); | ||
| 264 | gbus_int_init_irq_types (gbus_irq_inits, gbus_hw_itypes); | ||
| 265 | /* Turn on the `all enable' bits, which are ANDed with | ||
| 266 | individual interrupt enable bits; we only want to bother with | ||
| 267 | the latter. They are the first bit in the first word of each | ||
| 268 | interrupt-enable area. */ | ||
| 269 | for (i = 0; i < NUM_USED_GINTS; i++) | ||
| 270 | GBUS_INT_ENABLE (0, used_gint[i].gint) = 0x1; | ||
| 271 | } | ||
diff --git a/arch/v850/kernel/head.S b/arch/v850/kernel/head.S deleted file mode 100644 index c490b937ef14..000000000000 --- a/arch/v850/kernel/head.S +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/head.S -- Lowest-level startup code | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <asm/clinkage.h> | ||
| 15 | #include <asm/current.h> | ||
| 16 | #include <asm/entry.h> | ||
| 17 | #include <asm/thread_info.h> | ||
| 18 | #include <asm/irq.h> | ||
| 19 | |||
| 20 | |||
| 21 | /* Make a slightly more convenient alias for C_SYMBOL_NAME. */ | ||
| 22 | #define CSYM C_SYMBOL_NAME | ||
| 23 | |||
| 24 | |||
| 25 | .text | ||
| 26 | |||
| 27 | // Define `mach_early_init' as a weak symbol | ||
| 28 | .global CSYM(mach_early_init) | ||
| 29 | .weak CSYM(mach_early_init) | ||
| 30 | |||
| 31 | C_ENTRY(start): | ||
| 32 | // Make sure interrupts are turned off, just in case | ||
| 33 | di | ||
| 34 | |||
| 35 | #ifdef CONFIG_RESET_GUARD | ||
| 36 | // See if we got here via an unexpected reset | ||
| 37 | ld.w RESET_GUARD, r19 // Check current value of reset guard | ||
| 38 | mov RESET_GUARD_ACTIVE, r20 | ||
| 39 | cmp r19, r20 | ||
| 40 | bne 1f // Guard was not active | ||
| 41 | |||
| 42 | // If we get here, the reset guard was active. Load up some | ||
| 43 | // interesting values as arguments, and jump to the handler. | ||
| 44 | st.w r0, RESET_GUARD // Allow further resets to succeed | ||
| 45 | mov lp, r6 // Arg 0: return address | ||
| 46 | ld.b KM, r7 // Arg 1: kernel mode | ||
| 47 | mov sp, r9 // Arg 3: stack pointer | ||
| 48 | ld.w KSP, r19 // maybe switch to kernel stack | ||
| 49 | cmp r7, r0 // see if already in kernel mode | ||
| 50 | cmov z, r19, sp, sp // and switch to kernel stack if not | ||
| 51 | GET_CURRENT_TASK(r8) // Arg 2: task pointer | ||
| 52 | jr CSYM(unexpected_reset) | ||
| 53 | |||
| 54 | 1: st.w r20, RESET_GUARD // Turn on reset guard | ||
| 55 | #endif /* CONFIG_RESET_GUARD */ | ||
| 56 | |||
| 57 | // Setup a temporary stack for doing pre-initialization function calls. | ||
| 58 | // | ||
| 59 | // We can't use the initial kernel stack, because (1) it may be | ||
| 60 | // located in memory we're not allowed to touch, and (2) since | ||
| 61 | // it's in the data segment, calling memcpy to initialize that | ||
| 62 | // area from ROM will overwrite memcpy's return address. | ||
| 63 | mov hilo(CSYM(_init_stack_end) - 4), sp | ||
| 64 | |||
| 65 | // See if there's a platform-specific early-initialization routine | ||
| 66 | // defined; it's a weak symbol, so it will have an address of zero if | ||
| 67 | // there's not. | ||
| 68 | mov hilo(CSYM(mach_early_init)), r6 | ||
| 69 | cmp r6, r0 | ||
| 70 | bz 3f | ||
| 71 | |||
| 72 | // There is one, so call it. If this function is written in C, it | ||
| 73 | // should be very careful -- the stack pointer is valid, but very | ||
| 74 | // little else is (e.g., bss is not zeroed yet, and initialized data | ||
| 75 | // hasn't been). | ||
| 76 | jarl 2f, lp // first figure out return address | ||
| 77 | 2: add 3f - ., lp | ||
| 78 | jmp [r6] // do call | ||
| 79 | 3: | ||
| 80 | |||
| 81 | #ifdef CONFIG_ROM_KERNEL | ||
| 82 | // Copy the data area from ROM to RAM | ||
| 83 | mov hilo(CSYM(_rom_copy_dst_start)), r6 | ||
| 84 | mov hilo(CSYM(_rom_copy_src_start)), r7 | ||
| 85 | mov hilo(CSYM(_rom_copy_dst_end)), r8 | ||
| 86 | sub r6, r8 | ||
| 87 | jarl CSYM(memcpy), lp | ||
| 88 | #endif | ||
| 89 | |||
| 90 | // Load the initial thread's stack, and current task pointer (in r16) | ||
| 91 | mov hilo(CSYM(init_thread_union)), r19 | ||
| 92 | movea THREAD_SIZE, r19, sp | ||
| 93 | ld.w TI_TASK[r19], CURRENT_TASK | ||
| 94 | |||
| 95 | #ifdef CONFIG_TIME_BOOTUP | ||
| 96 | /* This stuff must come after mach_early_init, because interrupts may | ||
| 97 | not work until after its been called. */ | ||
| 98 | jarl CSYM(highres_timer_reset), lp | ||
| 99 | jarl CSYM(highres_timer_start), lp | ||
| 100 | #endif | ||
| 101 | |||
| 102 | // Kernel stack pointer save location | ||
| 103 | st.w sp, KSP | ||
| 104 | |||
| 105 | // Assert that we're in `kernel mode' | ||
| 106 | mov 1, r19 | ||
| 107 | st.w r19, KM | ||
| 108 | |||
| 109 | #ifdef CONFIG_ZERO_BSS | ||
| 110 | // Zero bss area, since we can't rely upon any loader to do so | ||
| 111 | mov hilo(CSYM(_sbss)), r6 | ||
| 112 | mov r0, r7 | ||
| 113 | mov hilo(CSYM(_ebss)), r8 | ||
| 114 | sub r6, r8 | ||
| 115 | jarl CSYM(memset), lp | ||
| 116 | #endif | ||
| 117 | |||
| 118 | // What happens if the main kernel function returns (it shouldn't) | ||
| 119 | mov hilo(CSYM(machine_halt)), lp | ||
| 120 | |||
| 121 | // Start the linux kernel. We use an indirect jump to get extra | ||
| 122 | // range, because on some platforms this initial startup code | ||
| 123 | // (and the associated platform-specific code in mach_early_init) | ||
| 124 | // are located far away from the main kernel, e.g. so that they | ||
| 125 | // can initialize RAM first and copy the kernel or something. | ||
| 126 | mov hilo(CSYM(start_kernel)), r12 | ||
| 127 | jmp [r12] | ||
| 128 | C_END(start) | ||
diff --git a/arch/v850/kernel/highres_timer.c b/arch/v850/kernel/highres_timer.c deleted file mode 100644 index b16ad1eaf966..000000000000 --- a/arch/v850/kernel/highres_timer.c +++ /dev/null | |||
| @@ -1,132 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/highres_timer.c -- High resolution timing routines | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <asm/system.h> | ||
| 15 | #include <asm/v850e_timer_d.h> | ||
| 16 | #include <asm/highres_timer.h> | ||
| 17 | |||
| 18 | #define HIGHRES_TIMER_USEC_SHIFT 12 | ||
| 19 | |||
| 20 | /* Pre-calculated constant used for converting ticks to real time | ||
| 21 | units. We initialize it to prevent it being put into BSS. */ | ||
| 22 | static u32 highres_timer_usec_prescale = 1; | ||
| 23 | |||
| 24 | void highres_timer_slow_tick_irq (void) __attribute__ ((noreturn)); | ||
| 25 | void highres_timer_slow_tick_irq (void) | ||
| 26 | { | ||
| 27 | /* This is an interrupt handler, so it must be very careful to | ||
| 28 | not to trash any registers. At this point, the stack-pointer | ||
| 29 | (r3) has been saved in the chip ram location ENTRY_SP by the | ||
| 30 | interrupt vector, so we can use it as a scratch register; we | ||
| 31 | must also restore it before returning. */ | ||
| 32 | asm ("ld.w %0[r0], sp;" | ||
| 33 | "add 1, sp;" | ||
| 34 | "st.w sp, %0[r0];" | ||
| 35 | "ld.w %1[r0], sp;" /* restore pre-irq stack-pointer */ | ||
| 36 | "reti" | ||
| 37 | :: | ||
| 38 | "i" (HIGHRES_TIMER_SLOW_TICKS_ADDR), | ||
| 39 | "i" (ENTRY_SP_ADDR) | ||
| 40 | : "memory"); | ||
| 41 | } | ||
| 42 | |||
| 43 | void highres_timer_reset (void) | ||
| 44 | { | ||
| 45 | V850E_TIMER_D_TMD (HIGHRES_TIMER_TIMER_D_UNIT) = 0; | ||
| 46 | HIGHRES_TIMER_SLOW_TICKS = 0; | ||
| 47 | } | ||
| 48 | |||
| 49 | void highres_timer_start (void) | ||
| 50 | { | ||
| 51 | u32 fast_tick_rate; | ||
| 52 | |||
| 53 | /* Start hardware timer. */ | ||
| 54 | v850e_timer_d_configure (HIGHRES_TIMER_TIMER_D_UNIT, | ||
| 55 | HIGHRES_TIMER_SLOW_TICK_RATE); | ||
| 56 | |||
| 57 | fast_tick_rate = | ||
| 58 | (V850E_TIMER_D_BASE_FREQ | ||
| 59 | >> V850E_TIMER_D_DIVLOG2 (HIGHRES_TIMER_TIMER_D_UNIT)); | ||
| 60 | |||
| 61 | /* The obvious way of calculating microseconds from fast ticks | ||
| 62 | is to do: | ||
| 63 | |||
| 64 | usec = fast_ticks * 10^6 / fast_tick_rate | ||
| 65 | |||
| 66 | However, divisions are much slower than multiplications, and | ||
| 67 | the above calculation can overflow, so we do this instead: | ||
| 68 | |||
| 69 | usec = fast_ticks * (10^6 * 2^12 / fast_tick_rate) / 2^12 | ||
| 70 | |||
| 71 | since we can pre-calculate (10^6 * (2^12 / fast_tick_rate)) | ||
| 72 | and use a shift for dividing by 2^12, this avoids division, | ||
| 73 | and is almost as accurate (it differs by about 2 microseconds | ||
| 74 | at the extreme value of the fast-tick counter's ranger). */ | ||
| 75 | highres_timer_usec_prescale = ((1000000 << HIGHRES_TIMER_USEC_SHIFT) | ||
| 76 | / fast_tick_rate); | ||
| 77 | |||
| 78 | /* Enable the interrupt (which is hardwired to this use), and | ||
| 79 | give it the highest priority. */ | ||
| 80 | V850E_INTC_IC (IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT)) = 0; | ||
| 81 | } | ||
| 82 | |||
| 83 | void highres_timer_stop (void) | ||
| 84 | { | ||
| 85 | /* Stop the timer. */ | ||
| 86 | V850E_TIMER_D_TMCD (HIGHRES_TIMER_TIMER_D_UNIT) = | ||
| 87 | V850E_TIMER_D_TMCD_CAE; | ||
| 88 | /* Disable its interrupt, just in case. */ | ||
| 89 | v850e_intc_disable_irq (IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT)); | ||
| 90 | } | ||
| 91 | |||
| 92 | inline void highres_timer_read_ticks (u32 *slow_ticks, u32 *fast_ticks) | ||
| 93 | { | ||
| 94 | int flags; | ||
| 95 | u32 fast_ticks_1, fast_ticks_2, _slow_ticks; | ||
| 96 | |||
| 97 | local_irq_save (flags); | ||
| 98 | fast_ticks_1 = V850E_TIMER_D_TMD (HIGHRES_TIMER_TIMER_D_UNIT); | ||
| 99 | _slow_ticks = HIGHRES_TIMER_SLOW_TICKS; | ||
| 100 | fast_ticks_2 = V850E_TIMER_D_TMD (HIGHRES_TIMER_TIMER_D_UNIT); | ||
| 101 | local_irq_restore (flags); | ||
| 102 | |||
| 103 | if (fast_ticks_2 < fast_ticks_1) | ||
| 104 | _slow_ticks++; | ||
| 105 | |||
| 106 | *slow_ticks = _slow_ticks; | ||
| 107 | *fast_ticks = fast_ticks_2; | ||
| 108 | } | ||
| 109 | |||
| 110 | inline void highres_timer_ticks_to_timeval (u32 slow_ticks, u32 fast_ticks, | ||
| 111 | struct timeval *tv) | ||
| 112 | { | ||
| 113 | unsigned long sec, sec_rem, usec; | ||
| 114 | |||
| 115 | usec = ((fast_ticks * highres_timer_usec_prescale) | ||
| 116 | >> HIGHRES_TIMER_USEC_SHIFT); | ||
| 117 | |||
| 118 | sec = slow_ticks / HIGHRES_TIMER_SLOW_TICK_RATE; | ||
| 119 | sec_rem = slow_ticks % HIGHRES_TIMER_SLOW_TICK_RATE; | ||
| 120 | |||
| 121 | usec += sec_rem * (1000000 / HIGHRES_TIMER_SLOW_TICK_RATE); | ||
| 122 | |||
| 123 | tv->tv_sec = sec; | ||
| 124 | tv->tv_usec = usec; | ||
| 125 | } | ||
| 126 | |||
| 127 | void highres_timer_read (struct timeval *tv) | ||
| 128 | { | ||
| 129 | u32 fast_ticks, slow_ticks; | ||
| 130 | highres_timer_read_ticks (&slow_ticks, &fast_ticks); | ||
| 131 | highres_timer_ticks_to_timeval (slow_ticks, fast_ticks, tv); | ||
| 132 | } | ||
diff --git a/arch/v850/kernel/init_task.c b/arch/v850/kernel/init_task.c deleted file mode 100644 index 44b274dff33f..000000000000 --- a/arch/v850/kernel/init_task.c +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/init_task.c -- Initial task/thread structures | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/mm.h> | ||
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/sched.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/init_task.h> | ||
| 17 | #include <linux/fs.h> | ||
| 18 | #include <linux/mqueue.h> | ||
| 19 | |||
| 20 | #include <asm/uaccess.h> | ||
| 21 | #include <asm/pgtable.h> | ||
| 22 | |||
| 23 | static struct fs_struct init_fs = INIT_FS; | ||
| 24 | static struct signal_struct init_signals = INIT_SIGNALS (init_signals); | ||
| 25 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
| 26 | struct mm_struct init_mm = INIT_MM (init_mm); | ||
| 27 | |||
| 28 | EXPORT_SYMBOL(init_mm); | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Initial task structure. | ||
| 32 | * | ||
| 33 | * All other task structs will be allocated on slabs in fork.c | ||
| 34 | */ | ||
| 35 | struct task_struct init_task = INIT_TASK (init_task); | ||
| 36 | |||
| 37 | EXPORT_SYMBOL(init_task); | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Initial thread structure. | ||
| 41 | * | ||
| 42 | * We need to make sure that this is 8192-byte aligned due to the | ||
| 43 | * way process stacks are handled. This is done by having a special | ||
| 44 | * "init_task" linker map entry. | ||
| 45 | */ | ||
| 46 | union thread_union init_thread_union | ||
| 47 | __attribute__((__section__(".data.init_task"))) = | ||
| 48 | { INIT_THREAD_INFO(init_task) }; | ||
diff --git a/arch/v850/kernel/intv.S b/arch/v850/kernel/intv.S deleted file mode 100644 index 671e4c6150dd..000000000000 --- a/arch/v850/kernel/intv.S +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/intv.S -- Interrupt vectors | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <asm/clinkage.h> | ||
| 15 | #include <asm/irq.h> | ||
| 16 | #include <asm/machdep.h> | ||
| 17 | #include <asm/entry.h> | ||
| 18 | |||
| 19 | #ifdef CONFIG_V850E_HIGHRES_TIMER | ||
| 20 | #include <asm/highres_timer.h> | ||
| 21 | #endif | ||
| 22 | |||
| 23 | /* Jump to an interrupt/trap handler. These handlers (defined in entry.S) | ||
| 24 | expect the stack-pointer to be saved in ENTRY_SP, so we use sp to do an | ||
| 25 | indirect jump (which avoids problems when the handler is more than a signed | ||
| 26 | 22-bit offset away). */ | ||
| 27 | #define JUMP_TO_HANDLER(name, sp_save_loc) \ | ||
| 28 | st.w sp, sp_save_loc; \ | ||
| 29 | mov hilo(name), sp; \ | ||
| 30 | jmp [sp] | ||
| 31 | |||
| 32 | |||
| 33 | /* Reset vector. */ | ||
| 34 | .section .intv.reset, "ax" | ||
| 35 | .org 0x0 | ||
| 36 | mov hilo(C_SYMBOL_NAME(start)), r1; | ||
| 37 | jmp [r1] | ||
| 38 | |||
| 39 | |||
| 40 | /* Generic interrupt vectors. */ | ||
| 41 | .section .intv.common, "ax" | ||
| 42 | .balign 0x10 | ||
| 43 | JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x10 - NMI0 | ||
| 44 | .balign 0x10 | ||
| 45 | JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x20 - NMI1 | ||
| 46 | .balign 0x10 | ||
| 47 | JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x30 - NMI2 | ||
| 48 | |||
| 49 | .balign 0x10 | ||
| 50 | JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x40 - TRAP0n | ||
| 51 | .balign 0x10 | ||
| 52 | JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x50 - TRAP1n | ||
| 53 | |||
| 54 | .balign 0x10 | ||
| 55 | JUMP_TO_HANDLER (dbtrap, ENTRY_SP) // 0x60 - Illegal op / DBTRAP insn | ||
| 56 | |||
| 57 | |||
| 58 | /* Hardware interrupt vectors. */ | ||
| 59 | .section .intv.mach, "ax" | ||
| 60 | .org 0x0 | ||
| 61 | |||
| 62 | #if defined (CONFIG_V850E_HIGHRES_TIMER) && defined (IRQ_INTCMD) | ||
| 63 | |||
| 64 | /* Interrupts before the highres timer interrupt. */ | ||
| 65 | .rept IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT) | ||
| 66 | .balign 0x10 | ||
| 67 | JUMP_TO_HANDLER (irq, ENTRY_SP) | ||
| 68 | .endr | ||
| 69 | |||
| 70 | /* The highres timer interrupt. */ | ||
| 71 | .balign 0x10 | ||
| 72 | JUMP_TO_HANDLER (C_SYMBOL_NAME (highres_timer_slow_tick_irq), ENTRY_SP) | ||
| 73 | |||
| 74 | /* Interrupts after the highres timer interrupt. */ | ||
| 75 | .rept NUM_CPU_IRQS - IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT) - 1 | ||
| 76 | .balign 0x10 | ||
| 77 | JUMP_TO_HANDLER (irq, ENTRY_SP) | ||
| 78 | .endr | ||
| 79 | |||
| 80 | #else /* No highres timer */ | ||
| 81 | |||
| 82 | .rept NUM_CPU_IRQS | ||
| 83 | .balign 0x10 | ||
| 84 | JUMP_TO_HANDLER (irq, ENTRY_SP) | ||
| 85 | .endr | ||
| 86 | |||
| 87 | #endif /* Highres timer */ | ||
diff --git a/arch/v850/kernel/irq.c b/arch/v850/kernel/irq.c deleted file mode 100644 index 858c45819aab..000000000000 --- a/arch/v850/kernel/irq.c +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/irq.c -- High-level interrupt handling | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03,04,05 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03,04,05 Miles Bader <miles@gnu.org> | ||
| 6 | * Copyright (C) 1994-2000 Ralf Baechle | ||
| 7 | * Copyright (C) 1992 Linus Torvalds | ||
| 8 | * | ||
| 9 | * This file is subject to the terms and conditions of the GNU General | ||
| 10 | * Public License. See the file COPYING in the main directory of this | ||
| 11 | * archive for more details. | ||
| 12 | * | ||
| 13 | * This file was was derived from the mips version, arch/mips/kernel/irq.c | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/kernel.h> | ||
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/irq.h> | ||
| 19 | #include <linux/init.h> | ||
| 20 | #include <linux/interrupt.h> | ||
| 21 | #include <linux/kernel_stat.h> | ||
| 22 | #include <linux/slab.h> | ||
| 23 | #include <linux/mm.h> | ||
| 24 | #include <linux/random.h> | ||
| 25 | #include <linux/seq_file.h> | ||
| 26 | |||
| 27 | #include <asm/system.h> | ||
| 28 | |||
| 29 | /* | ||
| 30 | * 'what should we do if we get a hw irq event on an illegal vector'. | ||
| 31 | * each architecture has to answer this themselves, it doesn't deserve | ||
| 32 | * a generic callback i think. | ||
| 33 | */ | ||
| 34 | void ack_bad_irq(unsigned int irq) | ||
| 35 | { | ||
| 36 | printk("received IRQ %d with unknown interrupt type\n", irq); | ||
| 37 | } | ||
| 38 | |||
| 39 | volatile unsigned long irq_err_count, spurious_count; | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Generic, controller-independent functions: | ||
| 43 | */ | ||
| 44 | |||
| 45 | int show_interrupts(struct seq_file *p, void *v) | ||
| 46 | { | ||
| 47 | int irq = *(loff_t *) v; | ||
| 48 | |||
| 49 | if (irq == 0) { | ||
| 50 | int cpu; | ||
| 51 | seq_puts(p, " "); | ||
| 52 | for (cpu=0; cpu < 1 /*smp_num_cpus*/; cpu++) | ||
| 53 | seq_printf(p, "CPU%d ", cpu); | ||
| 54 | seq_putc(p, '\n'); | ||
| 55 | } | ||
| 56 | |||
| 57 | if (irq < NR_IRQS) { | ||
| 58 | unsigned long flags; | ||
| 59 | struct irqaction *action; | ||
| 60 | |||
| 61 | spin_lock_irqsave(&irq_desc[irq].lock, flags); | ||
| 62 | |||
| 63 | action = irq_desc[irq].action; | ||
| 64 | if (action) { | ||
| 65 | int j; | ||
| 66 | int count = 0; | ||
| 67 | int num = -1; | ||
| 68 | const char *type_name = irq_desc[irq].chip->typename; | ||
| 69 | |||
| 70 | for (j = 0; j < NR_IRQS; j++) | ||
| 71 | if (irq_desc[j].chip->typename == type_name){ | ||
| 72 | if (irq == j) | ||
| 73 | num = count; | ||
| 74 | count++; | ||
| 75 | } | ||
| 76 | |||
| 77 | seq_printf(p, "%3d: ",irq); | ||
| 78 | seq_printf(p, "%10u ", kstat_irqs(irq)); | ||
| 79 | if (count > 1) { | ||
| 80 | int prec = (num >= 100 ? 3 : num >= 10 ? 2 : 1); | ||
| 81 | seq_printf(p, " %*s%d", 14 - prec, | ||
| 82 | type_name, num); | ||
| 83 | } else | ||
| 84 | seq_printf(p, " %14s", type_name); | ||
| 85 | |||
| 86 | seq_printf(p, " %s", action->name); | ||
| 87 | for (action=action->next; action; action = action->next) | ||
| 88 | seq_printf(p, ", %s", action->name); | ||
| 89 | seq_putc(p, '\n'); | ||
| 90 | } | ||
| 91 | |||
| 92 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | ||
| 93 | } else if (irq == NR_IRQS) | ||
| 94 | seq_printf(p, "ERR: %10lu\n", irq_err_count); | ||
| 95 | |||
| 96 | return 0; | ||
| 97 | } | ||
| 98 | |||
| 99 | /* Handle interrupt IRQ. REGS are the registers at the time of ther | ||
| 100 | interrupt. */ | ||
| 101 | unsigned int handle_irq (int irq, struct pt_regs *regs) | ||
| 102 | { | ||
| 103 | irq_enter(); | ||
| 104 | __do_IRQ(irq, regs); | ||
| 105 | irq_exit(); | ||
| 106 | return 1; | ||
| 107 | } | ||
| 108 | |||
| 109 | /* Initialize irq handling for IRQs. | ||
| 110 | BASE_IRQ, BASE_IRQ+INTERVAL, ..., BASE_IRQ+NUM*INTERVAL | ||
| 111 | to IRQ_TYPE. An IRQ_TYPE of 0 means to use a generic interrupt type. */ | ||
| 112 | void __init | ||
| 113 | init_irq_handlers (int base_irq, int num, int interval, | ||
| 114 | struct hw_interrupt_type *irq_type) | ||
| 115 | { | ||
| 116 | while (num-- > 0) { | ||
| 117 | irq_desc[base_irq].status = IRQ_DISABLED; | ||
| 118 | irq_desc[base_irq].action = NULL; | ||
| 119 | irq_desc[base_irq].depth = 1; | ||
| 120 | irq_desc[base_irq].chip = irq_type; | ||
| 121 | base_irq += interval; | ||
| 122 | } | ||
| 123 | } | ||
diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c deleted file mode 100644 index 143774de75e1..000000000000 --- a/arch/v850/kernel/ma.c +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/ma.c -- V850E/MA series of cpu chips | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/mm.h> | ||
| 17 | #include <linux/swap.h> | ||
| 18 | #include <linux/bootmem.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | |||
| 21 | #include <asm/atomic.h> | ||
| 22 | #include <asm/page.h> | ||
| 23 | #include <asm/machdep.h> | ||
| 24 | #include <asm/v850e_timer_d.h> | ||
| 25 | |||
| 26 | #include "mach.h" | ||
| 27 | |||
| 28 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 29 | { | ||
| 30 | /* Start hardware timer. */ | ||
| 31 | v850e_timer_d_configure (0, HZ); | ||
| 32 | /* Install timer interrupt handler. */ | ||
| 33 | setup_irq (IRQ_INTCMD(0), timer_action); | ||
| 34 | } | ||
| 35 | |||
| 36 | static struct v850e_intc_irq_init irq_inits[] = { | ||
| 37 | { "IRQ", 0, NUM_MACH_IRQS, 1, 7 }, | ||
| 38 | { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 }, | ||
| 39 | { "DMA", IRQ_INTDMA(0), IRQ_INTDMA_NUM, 1, 2 }, | ||
| 40 | { "CSI", IRQ_INTCSI(0), IRQ_INTCSI_NUM, 4, 4 }, | ||
| 41 | { "SER", IRQ_INTSER(0), IRQ_INTSER_NUM, 4, 3 }, | ||
| 42 | { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 4, 4 }, | ||
| 43 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 }, | ||
| 44 | { 0 } | ||
| 45 | }; | ||
| 46 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) | ||
| 47 | |||
| 48 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
| 49 | |||
| 50 | /* Initialize MA chip interrupts. */ | ||
| 51 | void __init ma_init_irqs (void) | ||
| 52 | { | ||
| 53 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 54 | } | ||
| 55 | |||
| 56 | /* Called before configuring an on-chip UART. */ | ||
| 57 | void ma_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | ||
| 58 | { | ||
| 59 | /* We only know about the first two UART channels (though | ||
| 60 | specific chips may have more). */ | ||
| 61 | if (chan < 2) { | ||
| 62 | unsigned bits = 0x3 << (chan * 3); | ||
| 63 | /* Specify that the relevant pins on the chip should do | ||
| 64 | serial I/O, not direct I/O. */ | ||
| 65 | MA_PORT4_PMC |= bits; | ||
| 66 | /* Specify that we're using the UART, not the CSI device. */ | ||
| 67 | MA_PORT4_PFC |= bits; | ||
| 68 | } | ||
| 69 | } | ||
diff --git a/arch/v850/kernel/mach.c b/arch/v850/kernel/mach.c deleted file mode 100644 index b9db278d2b71..000000000000 --- a/arch/v850/kernel/mach.c +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/mach.c -- Defaults for some things defined by "mach.h" | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001 NEC Corporation | ||
| 5 | * Copyright (C) 2001 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include "mach.h" | ||
| 15 | |||
| 16 | /* Called with each timer tick, if non-zero. */ | ||
| 17 | void (*mach_tick)(void) = 0; | ||
diff --git a/arch/v850/kernel/mach.h b/arch/v850/kernel/mach.h deleted file mode 100644 index 9e0e4816ec56..000000000000 --- a/arch/v850/kernel/mach.h +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/mach.h -- Machine-dependent functions used by v850 port | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __V850_MACH_H__ | ||
| 15 | #define __V850_MACH_H__ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/time.h> | ||
| 19 | #include <linux/spinlock.h> | ||
| 20 | #include <linux/interrupt.h> | ||
| 21 | #include <linux/fs.h> | ||
| 22 | #include <linux/seq_file.h> | ||
| 23 | |||
| 24 | #include <asm/ptrace.h> | ||
| 25 | #include <asm/entry.h> | ||
| 26 | #include <asm/clinkage.h> | ||
| 27 | |||
| 28 | void mach_setup (char **cmdline); | ||
| 29 | void mach_gettimeofday (struct timespec *tv); | ||
| 30 | void mach_sched_init (struct irqaction *timer_action); | ||
| 31 | void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len); | ||
| 32 | void mach_init_irqs (void); | ||
| 33 | |||
| 34 | /* If defined, is called very early in the kernel initialization. The | ||
| 35 | stack pointer is valid, but very little has been initialized (e.g., | ||
| 36 | bss is not zeroed yet) when this is called, so care must taken. */ | ||
| 37 | void mach_early_init (void); | ||
| 38 | |||
| 39 | /* If defined, called after the bootmem allocator has been initialized, | ||
| 40 | to allow the platform-dependent code to reserve any areas of RAM that | ||
| 41 | the kernel shouldn't touch. */ | ||
| 42 | void mach_reserve_bootmem (void) __attribute__ ((__weak__)); | ||
| 43 | |||
| 44 | /* Called with each timer tick, if non-zero. */ | ||
| 45 | extern void (*mach_tick) (void); | ||
| 46 | |||
| 47 | /* The following establishes aliases for various mach_ functions to the | ||
| 48 | name by which the rest of the kernel calls them. These statements | ||
| 49 | should only have an effect in the file that defines the actual functions. */ | ||
| 50 | #define MACH_ALIAS(to, from) \ | ||
| 51 | asm (".global " macrology_stringify (C_SYMBOL_NAME (to)) ";" \ | ||
| 52 | macrology_stringify (C_SYMBOL_NAME (to)) \ | ||
| 53 | " = " macrology_stringify (C_SYMBOL_NAME (from))) | ||
| 54 | /* e.g.: MACH_ALIAS (kernel_name, arch_spec_name); */ | ||
| 55 | |||
| 56 | #endif /* __V850_MACH_H__ */ | ||
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c deleted file mode 100644 index 007115dc9ce0..000000000000 --- a/arch/v850/kernel/me2.c +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/me2.c -- V850E/ME2 chip-specific support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 NEC Corporation | ||
| 5 | * Copyright (C) 2003 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/mm.h> | ||
| 17 | #include <linux/swap.h> | ||
| 18 | #include <linux/bootmem.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | |||
| 21 | #include <asm/atomic.h> | ||
| 22 | #include <asm/page.h> | ||
| 23 | #include <asm/machdep.h> | ||
| 24 | #include <asm/v850e_timer_d.h> | ||
| 25 | |||
| 26 | #include "mach.h" | ||
| 27 | |||
| 28 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 29 | { | ||
| 30 | /* Start hardware timer. */ | ||
| 31 | v850e_timer_d_configure (0, HZ); | ||
| 32 | /* Install timer interrupt handler. */ | ||
| 33 | setup_irq (IRQ_INTCMD(0), timer_action); | ||
| 34 | } | ||
| 35 | |||
| 36 | static struct v850e_intc_irq_init irq_inits[] = { | ||
| 37 | { "IRQ", 0, NUM_CPU_IRQS, 1, 7 }, | ||
| 38 | { "INTP", IRQ_INTP(0), IRQ_INTP_NUM, 1, 5 }, | ||
| 39 | { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 3 }, | ||
| 40 | { "UBTIRE", IRQ_INTUBTIRE(0), IRQ_INTUBTIRE_NUM, 5, 4 }, | ||
| 41 | { "UBTIR", IRQ_INTUBTIR(0), IRQ_INTUBTIR_NUM, 5, 4 }, | ||
| 42 | { "UBTIT", IRQ_INTUBTIT(0), IRQ_INTUBTIT_NUM, 5, 4 }, | ||
| 43 | { "UBTIF", IRQ_INTUBTIF(0), IRQ_INTUBTIF_NUM, 5, 4 }, | ||
| 44 | { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 }, | ||
| 45 | { 0 } | ||
| 46 | }; | ||
| 47 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) | ||
| 48 | |||
| 49 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
| 50 | |||
| 51 | /* Initialize V850E/ME2 chip interrupts. */ | ||
| 52 | void __init me2_init_irqs (void) | ||
| 53 | { | ||
| 54 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 55 | } | ||
| 56 | |||
| 57 | /* Called before configuring an on-chip UART. */ | ||
| 58 | void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | ||
| 59 | { | ||
| 60 | if (chan == 0) { | ||
| 61 | /* Specify that the relevant pins on the chip should do | ||
| 62 | serial I/O, not direct I/O. */ | ||
| 63 | ME2_PORT1_PMC |= 0xC; | ||
| 64 | /* Specify that we're using the UART, not the CSI device. */ | ||
| 65 | ME2_PORT1_PFC |= 0xC; | ||
| 66 | } else if (chan == 1) { | ||
| 67 | /* Specify that the relevant pins on the chip should do | ||
| 68 | serial I/O, not direct I/O. */ | ||
| 69 | ME2_PORT2_PMC |= 0x6; | ||
| 70 | /* Specify that we're using the UART, not the CSI device. */ | ||
| 71 | ME2_PORT2_PFC |= 0x6; | ||
| 72 | } | ||
| 73 | } | ||
diff --git a/arch/v850/kernel/memcons.c b/arch/v850/kernel/memcons.c deleted file mode 100644 index 92f514fdcc79..000000000000 --- a/arch/v850/kernel/memcons.c +++ /dev/null | |||
| @@ -1,135 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/memcons.c -- Console I/O to a memory buffer | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02 NEC Corporation | ||
| 5 | * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/console.h> | ||
| 16 | #include <linux/tty.h> | ||
| 17 | #include <linux/tty_driver.h> | ||
| 18 | #include <linux/init.h> | ||
| 19 | |||
| 20 | /* If this device is enabled, the linker map should define start and | ||
| 21 | end points for its buffer. */ | ||
| 22 | extern char memcons_output[], memcons_output_end; | ||
| 23 | |||
| 24 | /* Current offset into the buffer. */ | ||
| 25 | static unsigned long memcons_offs = 0; | ||
| 26 | |||
| 27 | /* Spinlock protecting memcons_offs. */ | ||
| 28 | static DEFINE_SPINLOCK(memcons_lock); | ||
| 29 | |||
| 30 | |||
| 31 | static size_t write (const char *buf, size_t len) | ||
| 32 | { | ||
| 33 | unsigned long flags; | ||
| 34 | char *point; | ||
| 35 | |||
| 36 | spin_lock_irqsave (memcons_lock, flags); | ||
| 37 | |||
| 38 | point = memcons_output + memcons_offs; | ||
| 39 | if (point + len >= &memcons_output_end) { | ||
| 40 | len = &memcons_output_end - point; | ||
| 41 | memcons_offs = 0; | ||
| 42 | } else | ||
| 43 | memcons_offs += len; | ||
| 44 | |||
| 45 | spin_unlock_irqrestore (memcons_lock, flags); | ||
| 46 | |||
| 47 | memcpy (point, buf, len); | ||
| 48 | |||
| 49 | return len; | ||
| 50 | } | ||
| 51 | |||
| 52 | |||
| 53 | /* Low-level console. */ | ||
| 54 | |||
| 55 | static void memcons_write (struct console *co, const char *buf, unsigned len) | ||
| 56 | { | ||
| 57 | while (len > 0) | ||
| 58 | len -= write (buf, len); | ||
| 59 | } | ||
| 60 | |||
| 61 | static struct tty_driver *tty_driver; | ||
| 62 | |||
| 63 | static struct tty_driver *memcons_device (struct console *co, int *index) | ||
| 64 | { | ||
| 65 | *index = co->index; | ||
| 66 | return tty_driver; | ||
| 67 | } | ||
| 68 | |||
| 69 | static struct console memcons = | ||
| 70 | { | ||
| 71 | .name = "memcons", | ||
| 72 | .write = memcons_write, | ||
| 73 | .device = memcons_device, | ||
| 74 | .flags = CON_PRINTBUFFER, | ||
| 75 | .index = -1, | ||
| 76 | }; | ||
| 77 | |||
| 78 | void memcons_setup (void) | ||
| 79 | { | ||
| 80 | register_console (&memcons); | ||
| 81 | printk (KERN_INFO "Console: static memory buffer (memcons)\n"); | ||
| 82 | } | ||
| 83 | |||
| 84 | /* Higher level TTY interface. */ | ||
| 85 | |||
| 86 | int memcons_tty_open (struct tty_struct *tty, struct file *filp) | ||
| 87 | { | ||
| 88 | return 0; | ||
| 89 | } | ||
| 90 | |||
| 91 | int memcons_tty_write (struct tty_struct *tty, const unsigned char *buf, int len) | ||
| 92 | { | ||
| 93 | return write (buf, len); | ||
| 94 | } | ||
| 95 | |||
| 96 | int memcons_tty_write_room (struct tty_struct *tty) | ||
| 97 | { | ||
| 98 | return &memcons_output_end - (memcons_output + memcons_offs); | ||
| 99 | } | ||
| 100 | |||
| 101 | int memcons_tty_chars_in_buffer (struct tty_struct *tty) | ||
| 102 | { | ||
| 103 | /* We have no buffer. */ | ||
| 104 | return 0; | ||
| 105 | } | ||
| 106 | |||
| 107 | static const struct tty_operations ops = { | ||
| 108 | .open = memcons_tty_open, | ||
| 109 | .write = memcons_tty_write, | ||
| 110 | .write_room = memcons_tty_write_room, | ||
| 111 | .chars_in_buffer = memcons_tty_chars_in_buffer, | ||
| 112 | }; | ||
| 113 | |||
| 114 | int __init memcons_tty_init (void) | ||
| 115 | { | ||
| 116 | int err; | ||
| 117 | struct tty_driver *driver = alloc_tty_driver(1); | ||
| 118 | if (!driver) | ||
| 119 | return -ENOMEM; | ||
| 120 | |||
| 121 | driver->name = "memcons"; | ||
| 122 | driver->major = TTY_MAJOR; | ||
| 123 | driver->minor_start = 64; | ||
| 124 | driver->type = TTY_DRIVER_TYPE_SYSCONS; | ||
| 125 | driver->init_termios = tty_std_termios; | ||
| 126 | tty_set_operations(driver, &ops); | ||
| 127 | err = tty_register_driver(driver); | ||
| 128 | if (err) { | ||
| 129 | put_tty_driver(driver); | ||
| 130 | return err; | ||
| 131 | } | ||
| 132 | tty_driver = driver; | ||
| 133 | return 0; | ||
| 134 | } | ||
| 135 | __initcall (memcons_tty_init); | ||
diff --git a/arch/v850/kernel/module.c b/arch/v850/kernel/module.c deleted file mode 100644 index 64aeb3e37c52..000000000000 --- a/arch/v850/kernel/module.c +++ /dev/null | |||
| @@ -1,237 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/module.c -- Architecture-specific module functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 6 | * Copyright (C) 2001,03 Rusty Russell | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | * | ||
| 14 | * Derived in part from arch/ppc/kernel/module.c | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/vmalloc.h> | ||
| 19 | #include <linux/moduleloader.h> | ||
| 20 | #include <linux/elf.h> | ||
| 21 | |||
| 22 | #if 0 | ||
| 23 | #define DEBUGP printk | ||
| 24 | #else | ||
| 25 | #define DEBUGP(fmt , ...) | ||
| 26 | #endif | ||
| 27 | |||
| 28 | void *module_alloc (unsigned long size) | ||
| 29 | { | ||
| 30 | return size == 0 ? 0 : vmalloc (size); | ||
| 31 | } | ||
| 32 | |||
| 33 | void module_free (struct module *mod, void *module_region) | ||
| 34 | { | ||
| 35 | vfree (module_region); | ||
| 36 | /* FIXME: If module_region == mod->init_region, trim exception | ||
| 37 | table entries. */ | ||
| 38 | } | ||
| 39 | |||
| 40 | int module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, | ||
| 41 | struct module *mod) | ||
| 42 | { | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | |||
| 46 | /* Count how many different relocations (different symbol, different | ||
| 47 | addend) */ | ||
| 48 | static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num) | ||
| 49 | { | ||
| 50 | unsigned int i, j, ret = 0; | ||
| 51 | |||
| 52 | /* Sure, this is order(n^2), but it's usually short, and not | ||
| 53 | time critical */ | ||
| 54 | for (i = 0; i < num; i++) { | ||
| 55 | for (j = 0; j < i; j++) { | ||
| 56 | /* If this addend appeared before, it's | ||
| 57 | already been counted */ | ||
| 58 | if (ELF32_R_SYM(rela[i].r_info) | ||
| 59 | == ELF32_R_SYM(rela[j].r_info) | ||
| 60 | && rela[i].r_addend == rela[j].r_addend) | ||
| 61 | break; | ||
| 62 | } | ||
| 63 | if (j == i) ret++; | ||
| 64 | } | ||
| 65 | return ret; | ||
| 66 | } | ||
| 67 | |||
| 68 | /* Get the potential trampolines size required of the init and | ||
| 69 | non-init sections */ | ||
| 70 | static unsigned long get_plt_size(const Elf32_Ehdr *hdr, | ||
| 71 | const Elf32_Shdr *sechdrs, | ||
| 72 | const char *secstrings, | ||
| 73 | int is_init) | ||
| 74 | { | ||
| 75 | unsigned long ret = 0; | ||
| 76 | unsigned i; | ||
| 77 | |||
| 78 | /* Everything marked ALLOC (this includes the exported | ||
| 79 | symbols) */ | ||
| 80 | for (i = 1; i < hdr->e_shnum; i++) { | ||
| 81 | /* If it's called *.init*, and we're not init, we're | ||
| 82 | not interested */ | ||
| 83 | if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != 0) | ||
| 84 | != is_init) | ||
| 85 | continue; | ||
| 86 | |||
| 87 | if (sechdrs[i].sh_type == SHT_RELA) { | ||
| 88 | DEBUGP("Found relocations in section %u\n", i); | ||
| 89 | DEBUGP("Ptr: %p. Number: %u\n", | ||
| 90 | (void *)hdr + sechdrs[i].sh_offset, | ||
| 91 | sechdrs[i].sh_size / sizeof(Elf32_Rela)); | ||
| 92 | ret += count_relocs((void *)hdr | ||
| 93 | + sechdrs[i].sh_offset, | ||
| 94 | sechdrs[i].sh_size | ||
| 95 | / sizeof(Elf32_Rela)) | ||
| 96 | * sizeof(struct v850_plt_entry); | ||
| 97 | } | ||
| 98 | } | ||
| 99 | |||
| 100 | return ret; | ||
| 101 | } | ||
| 102 | |||
| 103 | int module_frob_arch_sections(Elf32_Ehdr *hdr, | ||
| 104 | Elf32_Shdr *sechdrs, | ||
| 105 | char *secstrings, | ||
| 106 | struct module *me) | ||
| 107 | { | ||
| 108 | unsigned int i; | ||
| 109 | |||
| 110 | /* Find .plt and .pltinit sections */ | ||
| 111 | for (i = 0; i < hdr->e_shnum; i++) { | ||
| 112 | if (strcmp(secstrings + sechdrs[i].sh_name, ".init.plt") == 0) | ||
| 113 | me->arch.init_plt_section = i; | ||
| 114 | else if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0) | ||
| 115 | me->arch.core_plt_section = i; | ||
| 116 | } | ||
| 117 | if (!me->arch.core_plt_section || !me->arch.init_plt_section) { | ||
| 118 | printk("Module doesn't contain .plt or .plt.init sections.\n"); | ||
| 119 | return -ENOEXEC; | ||
| 120 | } | ||
| 121 | |||
| 122 | /* Override their sizes */ | ||
| 123 | sechdrs[me->arch.core_plt_section].sh_size | ||
| 124 | = get_plt_size(hdr, sechdrs, secstrings, 0); | ||
| 125 | sechdrs[me->arch.init_plt_section].sh_size | ||
| 126 | = get_plt_size(hdr, sechdrs, secstrings, 1); | ||
| 127 | return 0; | ||
| 128 | } | ||
| 129 | |||
| 130 | int apply_relocate (Elf32_Shdr *sechdrs, const char *strtab, | ||
| 131 | unsigned int symindex, unsigned int relsec, | ||
| 132 | struct module *mod) | ||
| 133 | { | ||
| 134 | printk ("Barf\n"); | ||
| 135 | return -ENOEXEC; | ||
| 136 | } | ||
| 137 | |||
| 138 | /* Set up a trampoline in the PLT to bounce us to the distant function */ | ||
| 139 | static uint32_t do_plt_call (void *location, Elf32_Addr val, | ||
| 140 | Elf32_Shdr *sechdrs, struct module *mod) | ||
| 141 | { | ||
| 142 | struct v850_plt_entry *entry; | ||
| 143 | /* Instructions used to do the indirect jump. */ | ||
| 144 | uint32_t tramp[2]; | ||
| 145 | |||
| 146 | /* We have to trash a register, so we assume that any control | ||
| 147 | transfer more than 21-bits away must be a function call | ||
| 148 | (so we can use a call-clobbered register). */ | ||
| 149 | tramp[0] = 0x0621 + ((val & 0xffff) << 16); /* mov sym, r1 ... */ | ||
| 150 | tramp[1] = ((val >> 16) & 0xffff) + 0x610000; /* ...; jmp r1 */ | ||
| 151 | |||
| 152 | /* Init, or core PLT? */ | ||
| 153 | if (location >= mod->module_core | ||
| 154 | && location < mod->module_core + mod->core_size) | ||
| 155 | entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr; | ||
| 156 | else | ||
| 157 | entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr; | ||
| 158 | |||
| 159 | /* Find this entry, or if that fails, the next avail. entry */ | ||
| 160 | while (entry->tramp[0]) | ||
| 161 | if (entry->tramp[0] == tramp[0] && entry->tramp[1] == tramp[1]) | ||
| 162 | return (uint32_t)entry; | ||
| 163 | else | ||
| 164 | entry++; | ||
| 165 | |||
| 166 | entry->tramp[0] = tramp[0]; | ||
| 167 | entry->tramp[1] = tramp[1]; | ||
| 168 | |||
| 169 | return (uint32_t)entry; | ||
| 170 | } | ||
| 171 | |||
| 172 | int apply_relocate_add (Elf32_Shdr *sechdrs, const char *strtab, | ||
| 173 | unsigned int symindex, unsigned int relsec, | ||
| 174 | struct module *mod) | ||
| 175 | { | ||
| 176 | unsigned int i; | ||
| 177 | Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; | ||
| 178 | |||
| 179 | DEBUGP ("Applying relocate section %u to %u\n", relsec, | ||
| 180 | sechdrs[relsec].sh_info); | ||
| 181 | |||
| 182 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof (*rela); i++) { | ||
| 183 | /* This is where to make the change */ | ||
| 184 | uint32_t *loc | ||
| 185 | = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr | ||
| 186 | + rela[i].r_offset); | ||
| 187 | /* This is the symbol it is referring to. Note that all | ||
| 188 | undefined symbols have been resolved. */ | ||
| 189 | Elf32_Sym *sym | ||
| 190 | = ((Elf32_Sym *)sechdrs[symindex].sh_addr | ||
| 191 | + ELF32_R_SYM (rela[i].r_info)); | ||
| 192 | uint32_t val = sym->st_value + rela[i].r_addend; | ||
| 193 | |||
| 194 | switch (ELF32_R_TYPE (rela[i].r_info)) { | ||
| 195 | case R_V850_32: | ||
| 196 | /* We write two shorts instead of a long because even | ||
| 197 | 32-bit insns only need half-word alignment, but | ||
| 198 | 32-bit data writes need to be long-word aligned. */ | ||
| 199 | val += ((uint16_t *)loc)[0]; | ||
| 200 | val += ((uint16_t *)loc)[1] << 16; | ||
| 201 | ((uint16_t *)loc)[0] = val & 0xffff; | ||
| 202 | ((uint16_t *)loc)[1] = (val >> 16) & 0xffff; | ||
| 203 | break; | ||
| 204 | |||
| 205 | case R_V850_22_PCREL: | ||
| 206 | /* Maybe jump indirectly via a PLT table entry. */ | ||
| 207 | if ((int32_t)(val - (uint32_t)loc) > 0x1fffff | ||
| 208 | || (int32_t)(val - (uint32_t)loc) < -0x200000) | ||
| 209 | val = do_plt_call (loc, val, sechdrs, mod); | ||
| 210 | |||
| 211 | val -= (uint32_t)loc; | ||
| 212 | |||
| 213 | /* We write two shorts instead of a long because | ||
| 214 | even 32-bit insns only need half-word alignment, | ||
| 215 | but 32-bit data writes need to be long-word | ||
| 216 | aligned. */ | ||
| 217 | ((uint16_t *)loc)[0] = | ||
| 218 | (*(uint16_t *)loc & 0xffc0) /* opcode + reg */ | ||
| 219 | | ((val >> 16) & 0xffc03f); /* offs high */ | ||
| 220 | ((uint16_t *)loc)[1] = | ||
| 221 | (val & 0xffff); /* offs low */ | ||
| 222 | break; | ||
| 223 | |||
| 224 | default: | ||
| 225 | printk (KERN_ERR "module %s: Unknown reloc: %u\n", | ||
| 226 | mod->name, ELF32_R_TYPE (rela[i].r_info)); | ||
| 227 | return -ENOEXEC; | ||
| 228 | } | ||
| 229 | } | ||
| 230 | |||
| 231 | return 0; | ||
| 232 | } | ||
| 233 | |||
| 234 | void | ||
| 235 | module_arch_cleanup(struct module *mod) | ||
| 236 | { | ||
| 237 | } | ||
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c deleted file mode 100644 index e4a4b8e7d5a3..000000000000 --- a/arch/v850/kernel/process.c +++ /dev/null | |||
| @@ -1,217 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/process.c -- Arch-dependent process handling | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/errno.h> | ||
| 15 | #include <linux/sched.h> | ||
| 16 | #include <linux/kernel.h> | ||
| 17 | #include <linux/mm.h> | ||
| 18 | #include <linux/smp.h> | ||
| 19 | #include <linux/stddef.h> | ||
| 20 | #include <linux/unistd.h> | ||
| 21 | #include <linux/ptrace.h> | ||
| 22 | #include <linux/slab.h> | ||
| 23 | #include <linux/user.h> | ||
| 24 | #include <linux/a.out.h> | ||
| 25 | #include <linux/reboot.h> | ||
| 26 | |||
| 27 | #include <asm/uaccess.h> | ||
| 28 | #include <asm/system.h> | ||
| 29 | #include <asm/pgtable.h> | ||
| 30 | |||
| 31 | void (*pm_power_off)(void) = NULL; | ||
| 32 | EXPORT_SYMBOL(pm_power_off); | ||
| 33 | |||
| 34 | extern void ret_from_fork (void); | ||
| 35 | |||
| 36 | |||
| 37 | /* The idle loop. */ | ||
| 38 | static void default_idle (void) | ||
| 39 | { | ||
| 40 | while (! need_resched ()) | ||
| 41 | asm ("halt; nop; nop; nop; nop; nop" ::: "cc"); | ||
| 42 | } | ||
| 43 | |||
| 44 | void (*idle)(void) = default_idle; | ||
| 45 | |||
| 46 | /* | ||
| 47 | * The idle thread. There's no useful work to be | ||
| 48 | * done, so just try to conserve power and have a | ||
| 49 | * low exit latency (ie sit in a loop waiting for | ||
| 50 | * somebody to say that they'd like to reschedule) | ||
| 51 | */ | ||
| 52 | void cpu_idle (void) | ||
| 53 | { | ||
| 54 | /* endless idle loop with no priority at all */ | ||
| 55 | while (1) { | ||
| 56 | while (!need_resched()) | ||
| 57 | (*idle) (); | ||
| 58 | |||
| 59 | preempt_enable_no_resched(); | ||
| 60 | schedule(); | ||
| 61 | preempt_disable(); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | /* | ||
| 66 | * This is the mechanism for creating a new kernel thread. | ||
| 67 | * | ||
| 68 | * NOTE! Only a kernel-only process (ie the swapper or direct descendants who | ||
| 69 | * haven't done an "execve()") should use this: it will work within a system | ||
| 70 | * call from a "real" process, but the process memory space will not be free'd | ||
| 71 | * until both the parent and the child have exited. | ||
| 72 | */ | ||
| 73 | int kernel_thread (int (*fn)(void *), void *arg, unsigned long flags) | ||
| 74 | { | ||
| 75 | register mm_segment_t fs = get_fs (); | ||
| 76 | register unsigned long syscall asm (SYSCALL_NUM); | ||
| 77 | register unsigned long arg0 asm (SYSCALL_ARG0); | ||
| 78 | register unsigned long ret asm (SYSCALL_RET); | ||
| 79 | |||
| 80 | set_fs (KERNEL_DS); | ||
| 81 | |||
| 82 | /* Clone this thread. Note that we don't pass the clone syscall's | ||
| 83 | second argument -- it's ignored for calls from kernel mode (the | ||
| 84 | child's SP is always set to the top of the kernel stack). */ | ||
| 85 | arg0 = flags | CLONE_VM; | ||
| 86 | syscall = __NR_clone; | ||
| 87 | asm volatile ("trap " SYSCALL_SHORT_TRAP | ||
| 88 | : "=r" (ret), "=r" (syscall) | ||
| 89 | : "1" (syscall), "r" (arg0) | ||
| 90 | : SYSCALL_SHORT_CLOBBERS); | ||
| 91 | |||
| 92 | if (ret == 0) { | ||
| 93 | /* In child thread, call FN and exit. */ | ||
| 94 | arg0 = (*fn) (arg); | ||
| 95 | syscall = __NR_exit; | ||
| 96 | asm volatile ("trap " SYSCALL_SHORT_TRAP | ||
| 97 | : "=r" (ret), "=r" (syscall) | ||
| 98 | : "1" (syscall), "r" (arg0) | ||
| 99 | : SYSCALL_SHORT_CLOBBERS); | ||
| 100 | } | ||
| 101 | |||
| 102 | /* In parent. */ | ||
| 103 | set_fs (fs); | ||
| 104 | |||
| 105 | return ret; | ||
| 106 | } | ||
| 107 | |||
| 108 | void flush_thread (void) | ||
| 109 | { | ||
| 110 | set_fs (USER_DS); | ||
| 111 | } | ||
| 112 | |||
| 113 | int copy_thread (int nr, unsigned long clone_flags, | ||
| 114 | unsigned long stack_start, unsigned long stack_size, | ||
| 115 | struct task_struct *p, struct pt_regs *regs) | ||
| 116 | { | ||
| 117 | /* Start pushing stuff from the top of the child's kernel stack. */ | ||
| 118 | unsigned long orig_ksp = task_tos(p); | ||
| 119 | unsigned long ksp = orig_ksp; | ||
| 120 | /* We push two `state save' stack fames (see entry.S) on the new | ||
| 121 | kernel stack: | ||
| 122 | 1) The innermost one is what switch_thread would have | ||
| 123 | pushed, and is used when we context switch to the child | ||
| 124 | thread for the first time. It's set up to return to | ||
| 125 | ret_from_fork in entry.S. | ||
| 126 | 2) The outermost one (nearest the top) is what a syscall | ||
| 127 | trap would have pushed, and is set up to return to the | ||
| 128 | same location as the parent thread, but with a return | ||
| 129 | value of 0. */ | ||
| 130 | struct pt_regs *child_switch_regs, *child_trap_regs; | ||
| 131 | |||
| 132 | /* Trap frame. */ | ||
| 133 | ksp -= STATE_SAVE_SIZE; | ||
| 134 | child_trap_regs = (struct pt_regs *)(ksp + STATE_SAVE_PT_OFFSET); | ||
| 135 | /* Switch frame. */ | ||
| 136 | ksp -= STATE_SAVE_SIZE; | ||
| 137 | child_switch_regs = (struct pt_regs *)(ksp + STATE_SAVE_PT_OFFSET); | ||
| 138 | |||
| 139 | /* First copy parent's register state to child. */ | ||
| 140 | *child_switch_regs = *regs; | ||
| 141 | *child_trap_regs = *regs; | ||
| 142 | |||
| 143 | /* switch_thread returns to the restored value of the lp | ||
| 144 | register (r31), so we make that the place where we want to | ||
| 145 | jump when the child thread begins running. */ | ||
| 146 | child_switch_regs->gpr[GPR_LP] = (v850_reg_t)ret_from_fork; | ||
| 147 | |||
| 148 | if (regs->kernel_mode) | ||
| 149 | /* Since we're returning to kernel-mode, make sure the child's | ||
| 150 | stored kernel stack pointer agrees with what the actual | ||
| 151 | stack pointer will be at that point (the trap return code | ||
| 152 | always restores the SP, even when returning to | ||
| 153 | kernel-mode). */ | ||
| 154 | child_trap_regs->gpr[GPR_SP] = orig_ksp; | ||
| 155 | else | ||
| 156 | /* Set the child's user-mode stack-pointer (the name | ||
| 157 | `stack_start' is a misnomer, it's just the initial SP | ||
| 158 | value). */ | ||
| 159 | child_trap_regs->gpr[GPR_SP] = stack_start; | ||
| 160 | |||
| 161 | /* Thread state for the child (everything else is on the stack). */ | ||
| 162 | p->thread.ksp = ksp; | ||
| 163 | |||
| 164 | return 0; | ||
| 165 | } | ||
| 166 | |||
| 167 | /* | ||
| 168 | * sys_execve() executes a new program. | ||
| 169 | */ | ||
| 170 | int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs) | ||
| 171 | { | ||
| 172 | char *filename = getname (name); | ||
| 173 | int error = PTR_ERR (filename); | ||
| 174 | |||
| 175 | if (! IS_ERR (filename)) { | ||
| 176 | error = do_execve (filename, argv, envp, regs); | ||
| 177 | putname (filename); | ||
| 178 | } | ||
| 179 | |||
| 180 | return error; | ||
| 181 | } | ||
| 182 | |||
| 183 | |||
| 184 | /* | ||
| 185 | * These bracket the sleeping functions.. | ||
| 186 | */ | ||
| 187 | #define first_sched ((unsigned long)__sched_text_start) | ||
| 188 | #define last_sched ((unsigned long)__sched_text_end) | ||
| 189 | |||
| 190 | unsigned long get_wchan (struct task_struct *p) | ||
| 191 | { | ||
| 192 | #if 0 /* Barf. Figure out the stack-layout later. XXX */ | ||
| 193 | unsigned long fp, pc; | ||
| 194 | int count = 0; | ||
| 195 | |||
| 196 | if (!p || p == current || p->state == TASK_RUNNING) | ||
| 197 | return 0; | ||
| 198 | |||
| 199 | pc = thread_saved_pc (p); | ||
| 200 | |||
| 201 | /* This quite disgusting function walks up the stack, following | ||
| 202 | saved return address, until it something that's out of bounds | ||
| 203 | (as defined by `first_sched' and `last_sched'). It then | ||
| 204 | returns the last PC that was in-bounds. */ | ||
| 205 | do { | ||
| 206 | if (fp < stack_page + sizeof (struct task_struct) || | ||
| 207 | fp >= 8184+stack_page) | ||
| 208 | return 0; | ||
| 209 | pc = ((unsigned long *)fp)[1]; | ||
| 210 | if (pc < first_sched || pc >= last_sched) | ||
| 211 | return pc; | ||
| 212 | fp = *(unsigned long *) fp; | ||
| 213 | } while (count++ < 16); | ||
| 214 | #endif | ||
| 215 | |||
| 216 | return 0; | ||
| 217 | } | ||
diff --git a/arch/v850/kernel/procfs.c b/arch/v850/kernel/procfs.c deleted file mode 100644 index e433cde789b4..000000000000 --- a/arch/v850/kernel/procfs.c +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/procfs.c -- Introspection functions for /proc filesystem | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02 NEC Corporation | ||
| 5 | * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include "mach.h" | ||
| 15 | |||
| 16 | static int cpuinfo_print (struct seq_file *m, void *v) | ||
| 17 | { | ||
| 18 | extern unsigned long loops_per_jiffy; | ||
| 19 | |||
| 20 | seq_printf (m, "CPU-Family: v850\nCPU-Arch: %s\n", CPU_ARCH); | ||
| 21 | |||
| 22 | #ifdef CPU_MODEL_LONG | ||
| 23 | seq_printf (m, "CPU-Model: %s (%s)\n", CPU_MODEL, CPU_MODEL_LONG); | ||
| 24 | #else | ||
| 25 | seq_printf (m, "CPU-Model: %s\n", CPU_MODEL); | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifdef CPU_CLOCK_FREQ | ||
| 29 | seq_printf (m, "CPU-Clock: %ld (%ld MHz)\n", | ||
| 30 | (long)CPU_CLOCK_FREQ, | ||
| 31 | (long)CPU_CLOCK_FREQ / 1000000); | ||
| 32 | #endif | ||
| 33 | |||
| 34 | seq_printf (m, "BogoMips: %lu.%02lu\n", | ||
| 35 | loops_per_jiffy/(500000/HZ), | ||
| 36 | (loops_per_jiffy/(5000/HZ)) % 100); | ||
| 37 | |||
| 38 | #ifdef PLATFORM_LONG | ||
| 39 | seq_printf (m, "Platform: %s (%s)\n", PLATFORM, PLATFORM_LONG); | ||
| 40 | #elif defined (PLATFORM) | ||
| 41 | seq_printf (m, "Platform: %s\n", PLATFORM); | ||
| 42 | #endif | ||
| 43 | |||
| 44 | return 0; | ||
| 45 | } | ||
| 46 | |||
| 47 | static void *cpuinfo_start (struct seq_file *m, loff_t *pos) | ||
| 48 | { | ||
| 49 | return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL; | ||
| 50 | } | ||
| 51 | |||
| 52 | static void *cpuinfo_next (struct seq_file *m, void *v, loff_t *pos) | ||
| 53 | { | ||
| 54 | ++*pos; | ||
| 55 | return cpuinfo_start (m, pos); | ||
| 56 | } | ||
| 57 | |||
| 58 | static void cpuinfo_stop (struct seq_file *m, void *v) | ||
| 59 | { | ||
| 60 | } | ||
| 61 | |||
| 62 | const struct seq_operations cpuinfo_op = { | ||
| 63 | .start = cpuinfo_start, | ||
| 64 | .next = cpuinfo_next, | ||
| 65 | .stop = cpuinfo_stop, | ||
| 66 | .show = cpuinfo_print | ||
| 67 | }; | ||
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c deleted file mode 100644 index a458ac941b25..000000000000 --- a/arch/v850/kernel/ptrace.c +++ /dev/null | |||
| @@ -1,235 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/ptrace.c -- `ptrace' system call | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03,04 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03,04 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * Derived from arch/mips/kernel/ptrace.c: | ||
| 8 | * | ||
| 9 | * Copyright (C) 1992 Ross Biro | ||
| 10 | * Copyright (C) Linus Torvalds | ||
| 11 | * Copyright (C) 1994, 95, 96, 97, 98, 2000 Ralf Baechle | ||
| 12 | * Copyright (C) 1996 David S. Miller | ||
| 13 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | ||
| 14 | * Copyright (C) 1999 MIPS Technologies, Inc. | ||
| 15 | * | ||
| 16 | * This file is subject to the terms and conditions of the GNU General | ||
| 17 | * Public License. See the file COPYING in the main directory of this | ||
| 18 | * archive for more details. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/kernel.h> | ||
| 22 | #include <linux/mm.h> | ||
| 23 | #include <linux/sched.h> | ||
| 24 | #include <linux/ptrace.h> | ||
| 25 | #include <linux/signal.h> | ||
| 26 | |||
| 27 | #include <asm/errno.h> | ||
| 28 | #include <asm/ptrace.h> | ||
| 29 | #include <asm/processor.h> | ||
| 30 | #include <asm/uaccess.h> | ||
| 31 | |||
| 32 | /* Returns the address where the register at REG_OFFS in P is stashed away. */ | ||
| 33 | static v850_reg_t *reg_save_addr (unsigned reg_offs, struct task_struct *t) | ||
| 34 | { | ||
| 35 | struct pt_regs *regs; | ||
| 36 | |||
| 37 | /* Three basic cases: | ||
| 38 | |||
| 39 | (1) A register normally saved before calling the scheduler, is | ||
| 40 | available in the kernel entry pt_regs structure at the top | ||
| 41 | of the kernel stack. The kernel trap/irq exit path takes | ||
| 42 | care to save/restore almost all registers for ptrace'd | ||
| 43 | processes. | ||
| 44 | |||
| 45 | (2) A call-clobbered register, where the process P entered the | ||
| 46 | kernel via [syscall] trap, is not stored anywhere; that's | ||
| 47 | OK, because such registers are not expected to be preserved | ||
| 48 | when the trap returns anyway (so we don't actually bother to | ||
| 49 | test for this case). | ||
| 50 | |||
| 51 | (3) A few registers not used at all by the kernel, and so | ||
| 52 | normally never saved except by context-switches, are in the | ||
| 53 | context switch state. */ | ||
| 54 | |||
| 55 | if (reg_offs == PT_CTPC || reg_offs == PT_CTPSW || reg_offs == PT_CTBP) | ||
| 56 | /* Register saved during context switch. */ | ||
| 57 | regs = thread_saved_regs (t); | ||
| 58 | else | ||
| 59 | /* Register saved during kernel entry (or not available). */ | ||
| 60 | regs = task_pt_regs (t); | ||
| 61 | |||
| 62 | return (v850_reg_t *)((char *)regs + reg_offs); | ||
| 63 | } | ||
| 64 | |||
| 65 | /* Set the bits SET and clear the bits CLEAR in the v850e DIR | ||
| 66 | (`debug information register'). Returns the new value of DIR. */ | ||
| 67 | static inline v850_reg_t set_dir (v850_reg_t set, v850_reg_t clear) | ||
| 68 | { | ||
| 69 | register v850_reg_t rval asm ("r10"); | ||
| 70 | register v850_reg_t arg0 asm ("r6") = set; | ||
| 71 | register v850_reg_t arg1 asm ("r7") = clear; | ||
| 72 | |||
| 73 | /* The dbtrap handler has exactly this functionality when called | ||
| 74 | from kernel mode. 0xf840 is a `dbtrap' insn. */ | ||
| 75 | asm (".short 0xf840" : "=r" (rval) : "r" (arg0), "r" (arg1)); | ||
| 76 | |||
| 77 | return rval; | ||
| 78 | } | ||
| 79 | |||
| 80 | /* Makes sure hardware single-stepping is (globally) enabled. | ||
| 81 | Returns true if successful. */ | ||
| 82 | static inline int enable_single_stepping (void) | ||
| 83 | { | ||
| 84 | static int enabled = 0; /* Remember whether we already did it. */ | ||
| 85 | if (! enabled) { | ||
| 86 | /* Turn on the SE (`single-step enable') bit, 0x100, in the | ||
| 87 | DIR (`debug information register'). This may fail if a | ||
| 88 | processor doesn't support it or something. We also try | ||
| 89 | to clear bit 0x40 (`INI'), which is necessary to use the | ||
| 90 | debug stuff on the v850e2; on the v850e, clearing 0x40 | ||
| 91 | shouldn't cause any problem. */ | ||
| 92 | v850_reg_t dir = set_dir (0x100, 0x40); | ||
| 93 | /* Make sure it really got set. */ | ||
| 94 | if (dir & 0x100) | ||
| 95 | enabled = 1; | ||
| 96 | } | ||
| 97 | return enabled; | ||
| 98 | } | ||
| 99 | |||
| 100 | /* Try to set CHILD's single-step flag to VAL. Returns true if successful. */ | ||
| 101 | static int set_single_step (struct task_struct *t, int val) | ||
| 102 | { | ||
| 103 | v850_reg_t *psw_addr = reg_save_addr(PT_PSW, t); | ||
| 104 | if (val) { | ||
| 105 | /* Make sure single-stepping is enabled. */ | ||
| 106 | if (! enable_single_stepping ()) | ||
| 107 | return 0; | ||
| 108 | /* Set T's single-step flag. */ | ||
| 109 | *psw_addr |= 0x800; | ||
| 110 | } else | ||
| 111 | *psw_addr &= ~0x800; | ||
| 112 | return 1; | ||
| 113 | } | ||
| 114 | |||
| 115 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | ||
| 116 | { | ||
| 117 | int rval; | ||
| 118 | |||
| 119 | switch (request) { | ||
| 120 | unsigned long val; | ||
| 121 | |||
| 122 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | ||
| 123 | case PTRACE_PEEKDATA: | ||
| 124 | rval = generic_ptrace_peekdata(child, addr, data); | ||
| 125 | goto out; | ||
| 126 | |||
| 127 | case PTRACE_POKETEXT: /* write the word at location addr. */ | ||
| 128 | case PTRACE_POKEDATA: | ||
| 129 | rval = generic_ptrace_pokedata(child, addr, data); | ||
| 130 | goto out; | ||
| 131 | |||
| 132 | /* Read/write the word at location ADDR in the registers. */ | ||
| 133 | case PTRACE_PEEKUSR: | ||
| 134 | case PTRACE_POKEUSR: | ||
| 135 | rval = 0; | ||
| 136 | if (addr >= PT_SIZE && request == PTRACE_PEEKUSR) { | ||
| 137 | /* Special requests that don't actually correspond | ||
| 138 | to offsets in struct pt_regs. */ | ||
| 139 | if (addr == PT_TEXT_ADDR) | ||
| 140 | val = child->mm->start_code; | ||
| 141 | else if (addr == PT_DATA_ADDR) | ||
| 142 | val = child->mm->start_data; | ||
| 143 | else if (addr == PT_TEXT_LEN) | ||
| 144 | val = child->mm->end_code | ||
| 145 | - child->mm->start_code; | ||
| 146 | else | ||
| 147 | rval = -EIO; | ||
| 148 | } else if (addr >= 0 && addr < PT_SIZE && (addr & 0x3) == 0) { | ||
| 149 | v850_reg_t *reg_addr = reg_save_addr(addr, child); | ||
| 150 | if (request == PTRACE_PEEKUSR) | ||
| 151 | val = *reg_addr; | ||
| 152 | else | ||
| 153 | *reg_addr = data; | ||
| 154 | } else | ||
| 155 | rval = -EIO; | ||
| 156 | |||
| 157 | if (rval == 0 && request == PTRACE_PEEKUSR) | ||
| 158 | rval = put_user (val, (unsigned long *)data); | ||
| 159 | goto out; | ||
| 160 | |||
| 161 | /* Continue and stop at next (return from) syscall */ | ||
| 162 | case PTRACE_SYSCALL: | ||
| 163 | /* Restart after a signal. */ | ||
| 164 | case PTRACE_CONT: | ||
| 165 | /* Execute a single instruction. */ | ||
| 166 | case PTRACE_SINGLESTEP: | ||
| 167 | rval = -EIO; | ||
| 168 | if (!valid_signal(data)) | ||
| 169 | break; | ||
| 170 | |||
| 171 | /* Turn CHILD's single-step flag on or off. */ | ||
| 172 | if (! set_single_step (child, request == PTRACE_SINGLESTEP)) | ||
| 173 | break; | ||
| 174 | |||
| 175 | if (request == PTRACE_SYSCALL) | ||
| 176 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
| 177 | else | ||
| 178 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
| 179 | |||
| 180 | child->exit_code = data; | ||
| 181 | wake_up_process(child); | ||
| 182 | rval = 0; | ||
| 183 | break; | ||
| 184 | |||
| 185 | /* | ||
| 186 | * make the child exit. Best I can do is send it a sigkill. | ||
| 187 | * perhaps it should be put in the status that it wants to | ||
| 188 | * exit. | ||
| 189 | */ | ||
| 190 | case PTRACE_KILL: | ||
| 191 | rval = 0; | ||
| 192 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
| 193 | break; | ||
| 194 | child->exit_code = SIGKILL; | ||
| 195 | wake_up_process(child); | ||
| 196 | break; | ||
| 197 | |||
| 198 | case PTRACE_DETACH: /* detach a process that was attached. */ | ||
| 199 | set_single_step (child, 0); /* Clear single-step flag */ | ||
| 200 | rval = ptrace_detach(child, data); | ||
| 201 | break; | ||
| 202 | |||
| 203 | default: | ||
| 204 | rval = -EIO; | ||
| 205 | goto out; | ||
| 206 | } | ||
| 207 | out: | ||
| 208 | return rval; | ||
| 209 | } | ||
| 210 | |||
| 211 | asmlinkage void syscall_trace(void) | ||
| 212 | { | ||
| 213 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||
| 214 | return; | ||
| 215 | if (!(current->ptrace & PT_PTRACED)) | ||
| 216 | return; | ||
| 217 | /* The 0x80 provides a way for the tracing parent to distinguish | ||
| 218 | between a syscall stop and SIGTRAP delivery */ | ||
| 219 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | ||
| 220 | ? 0x80 : 0)); | ||
| 221 | /* | ||
| 222 | * this isn't the same as continuing with a signal, but it will do | ||
| 223 | * for normal use. strace only continues with a signal if the | ||
| 224 | * stopping signal is not SIGTRAP. -brl | ||
| 225 | */ | ||
| 226 | if (current->exit_code) { | ||
| 227 | send_sig(current->exit_code, current, 1); | ||
| 228 | current->exit_code = 0; | ||
| 229 | } | ||
| 230 | } | ||
| 231 | |||
| 232 | void ptrace_disable (struct task_struct *child) | ||
| 233 | { | ||
| 234 | /* nothing to do */ | ||
| 235 | } | ||
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c deleted file mode 100644 index 43018e1edebd..000000000000 --- a/arch/v850/kernel/rte_cb.c +++ /dev/null | |||
| @@ -1,193 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-v850/rte_cb.c -- Midas lab RTE-CB series of evaluation boards | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/init.h> | ||
| 15 | #include <linux/irq.h> | ||
| 16 | #include <linux/fs.h> | ||
| 17 | #include <linux/module.h> | ||
| 18 | #include <linux/kernel.h> | ||
| 19 | |||
| 20 | #include <asm/machdep.h> | ||
| 21 | #include <asm/v850e_uart.h> | ||
| 22 | |||
| 23 | #include "mach.h" | ||
| 24 | |||
| 25 | static void led_tick (void); | ||
| 26 | |||
| 27 | /* LED access routines. */ | ||
| 28 | extern unsigned read_leds (int pos, char *buf, int len); | ||
| 29 | extern unsigned write_leds (int pos, const char *buf, int len); | ||
| 30 | |||
| 31 | #ifdef CONFIG_RTE_CB_MULTI | ||
| 32 | extern void multi_init (void); | ||
| 33 | #endif | ||
| 34 | |||
| 35 | |||
| 36 | void __init rte_cb_early_init (void) | ||
| 37 | { | ||
| 38 | v850e_intc_disable_irqs (); | ||
| 39 | |||
| 40 | #ifdef CONFIG_RTE_CB_MULTI | ||
| 41 | multi_init (); | ||
| 42 | #endif | ||
| 43 | } | ||
| 44 | |||
| 45 | void __init mach_setup (char **cmdline) | ||
| 46 | { | ||
| 47 | #ifdef CONFIG_RTE_MB_A_PCI | ||
| 48 | /* Probe for Mother-A, and print a message if we find it. */ | ||
| 49 | *(volatile unsigned long *)MB_A_SRAM_ADDR = 0xDEADBEEF; | ||
| 50 | if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0xDEADBEEF) { | ||
| 51 | *(volatile unsigned long *)MB_A_SRAM_ADDR = 0x12345678; | ||
| 52 | if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0x12345678) | ||
| 53 | printk (KERN_INFO | ||
| 54 | " NEC SolutionGear/Midas lab" | ||
| 55 | " RTE-MOTHER-A motherboard\n"); | ||
| 56 | } | ||
| 57 | #endif /* CONFIG_RTE_MB_A_PCI */ | ||
| 58 | |||
| 59 | mach_tick = led_tick; | ||
| 60 | } | ||
| 61 | |||
| 62 | void machine_restart (char *__unused) | ||
| 63 | { | ||
| 64 | #ifdef CONFIG_RESET_GUARD | ||
| 65 | disable_reset_guard (); | ||
| 66 | #endif | ||
| 67 | asm ("jmp r0"); /* Jump to the reset vector. */ | ||
| 68 | } | ||
| 69 | |||
| 70 | /* This says `HALt.' in LEDese. */ | ||
| 71 | static unsigned char halt_leds_msg[] = { 0x76, 0x77, 0x38, 0xF8 }; | ||
| 72 | |||
| 73 | void machine_halt (void) | ||
| 74 | { | ||
| 75 | #ifdef CONFIG_RESET_GUARD | ||
| 76 | disable_reset_guard (); | ||
| 77 | #endif | ||
| 78 | |||
| 79 | /* Ignore all interrupts. */ | ||
| 80 | local_irq_disable (); | ||
| 81 | |||
| 82 | /* Write a little message. */ | ||
| 83 | write_leds (0, halt_leds_msg, sizeof halt_leds_msg); | ||
| 84 | |||
| 85 | /* Really halt. */ | ||
| 86 | for (;;) | ||
| 87 | asm ("halt; nop; nop; nop; nop; nop"); | ||
| 88 | } | ||
| 89 | |||
| 90 | void machine_power_off (void) | ||
| 91 | { | ||
| 92 | machine_halt (); | ||
| 93 | } | ||
| 94 | |||
| 95 | |||
| 96 | /* Animated LED display for timer tick. */ | ||
| 97 | |||
| 98 | #define TICK_UPD_FREQ 6 | ||
| 99 | static int tick_frames[][10] = { | ||
| 100 | { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, -1 }, | ||
| 101 | { 0x63, 0x5c, -1 }, | ||
| 102 | { 0x5c, 0x00, -1 }, | ||
| 103 | { 0x63, 0x00, -1 }, | ||
| 104 | { -1 } | ||
| 105 | }; | ||
| 106 | |||
| 107 | static void led_tick () | ||
| 108 | { | ||
| 109 | static unsigned counter = 0; | ||
| 110 | |||
| 111 | if (++counter == (HZ / TICK_UPD_FREQ)) { | ||
| 112 | /* Which frame we're currently displaying for each digit. */ | ||
| 113 | static unsigned frame_nums[LED_NUM_DIGITS] = { 0 }; | ||
| 114 | /* Display image. */ | ||
| 115 | static unsigned char image[LED_NUM_DIGITS] = { 0 }; | ||
| 116 | unsigned char prev_image[LED_NUM_DIGITS]; | ||
| 117 | int write_to_leds = 1; /* true if we should actually display */ | ||
| 118 | int digit; | ||
| 119 | |||
| 120 | /* We check to see if the physical LEDs contains what we last | ||
| 121 | wrote to them; if not, we suppress display (this is so that | ||
| 122 | users can write to the LEDs, and not have their output | ||
| 123 | overwritten). As a special case, we start writing again if | ||
| 124 | all the LEDs are blank, or our display image is all zeros | ||
| 125 | (indicating that this is the initial update, when the actual | ||
| 126 | LEDs might contain random data). */ | ||
| 127 | read_leds (0, prev_image, LED_NUM_DIGITS); | ||
| 128 | for (digit = 0; digit < LED_NUM_DIGITS; digit++) | ||
| 129 | if (image[digit] != prev_image[digit] | ||
| 130 | && image[digit] && prev_image[digit]) | ||
| 131 | { | ||
| 132 | write_to_leds = 0; | ||
| 133 | break; | ||
| 134 | } | ||
| 135 | |||
| 136 | /* Update display image. */ | ||
| 137 | for (digit = 0; | ||
| 138 | digit < LED_NUM_DIGITS && tick_frames[digit][0] >= 0; | ||
| 139 | digit++) | ||
| 140 | { | ||
| 141 | int frame = tick_frames[digit][frame_nums[digit]]; | ||
| 142 | if (frame < 0) { | ||
| 143 | image[digit] = tick_frames[digit][0]; | ||
| 144 | frame_nums[digit] = 1; | ||
| 145 | } else { | ||
| 146 | image[digit] = frame; | ||
| 147 | frame_nums[digit]++; | ||
| 148 | break; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | |||
| 152 | if (write_to_leds) | ||
| 153 | /* Write the display image to the physical LEDs. */ | ||
| 154 | write_leds (0, image, LED_NUM_DIGITS); | ||
| 155 | |||
| 156 | counter = 0; | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | |||
| 161 | /* Mother-A interrupts. */ | ||
| 162 | |||
| 163 | #ifdef CONFIG_RTE_GBUS_INT | ||
| 164 | |||
| 165 | #define L GBUS_INT_PRIORITY_LOW | ||
| 166 | #define M GBUS_INT_PRIORITY_MEDIUM | ||
| 167 | #define H GBUS_INT_PRIORITY_HIGH | ||
| 168 | |||
| 169 | static struct gbus_int_irq_init gbus_irq_inits[] = { | ||
| 170 | #ifdef CONFIG_RTE_MB_A_PCI | ||
| 171 | { "MB_A_LAN", IRQ_MB_A_LAN, 1, 1, L }, | ||
| 172 | { "MB_A_PCI1", IRQ_MB_A_PCI1(0), IRQ_MB_A_PCI1_NUM, 1, L }, | ||
| 173 | { "MB_A_PCI2", IRQ_MB_A_PCI2(0), IRQ_MB_A_PCI2_NUM, 1, L }, | ||
| 174 | { "MB_A_EXT", IRQ_MB_A_EXT(0), IRQ_MB_A_EXT_NUM, 1, L }, | ||
| 175 | { "MB_A_USB_OC",IRQ_MB_A_USB_OC(0), IRQ_MB_A_USB_OC_NUM, 1, L }, | ||
| 176 | { "MB_A_PCMCIA_OC",IRQ_MB_A_PCMCIA_OC, 1, 1, L }, | ||
| 177 | #endif | ||
| 178 | { 0 } | ||
| 179 | }; | ||
| 180 | #define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1) | ||
| 181 | |||
| 182 | static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; | ||
| 183 | |||
| 184 | #endif /* CONFIG_RTE_GBUS_INT */ | ||
| 185 | |||
| 186 | |||
| 187 | void __init rte_cb_init_irqs (void) | ||
| 188 | { | ||
| 189 | #ifdef CONFIG_RTE_GBUS_INT | ||
| 190 | gbus_int_init_irqs (); | ||
| 191 | gbus_int_init_irq_types (gbus_irq_inits, gbus_hw_itypes); | ||
| 192 | #endif /* CONFIG_RTE_GBUS_INT */ | ||
| 193 | } | ||
diff --git a/arch/v850/kernel/rte_cb_leds.c b/arch/v850/kernel/rte_cb_leds.c deleted file mode 100644 index aa47ab1dcd87..000000000000 --- a/arch/v850/kernel/rte_cb_leds.c +++ /dev/null | |||
| @@ -1,137 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-v850/rte_cb_leds.c -- Midas lab RTE-CB board LED device support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/init.h> | ||
| 15 | #include <linux/spinlock.h> | ||
| 16 | #include <linux/fs.h> | ||
| 17 | #include <linux/miscdevice.h> | ||
| 18 | |||
| 19 | #include <asm/uaccess.h> | ||
| 20 | |||
| 21 | #define LEDS_MINOR 169 /* Minor device number, using misc major. */ | ||
| 22 | |||
| 23 | /* The actual LED hardware is write-only, so we hold the contents here too. */ | ||
| 24 | static unsigned char leds_image[LED_NUM_DIGITS] = { 0 }; | ||
| 25 | |||
| 26 | /* Spinlock protecting the above leds. */ | ||
| 27 | static DEFINE_SPINLOCK(leds_lock); | ||
| 28 | |||
| 29 | /* Common body of LED read/write functions, checks POS and LEN for | ||
| 30 | correctness, declares a variable using IMG_DECL, initialized pointing at | ||
| 31 | the POS position in the LED image buffer, and and iterates COPY_EXPR | ||
| 32 | until BUF is equal to the last buffer position; finally, sets LEN to be | ||
| 33 | the amount actually copied. IMG should be a variable declaration | ||
| 34 | (without an initializer or a terminating semicolon); POS, BUF, and LEN | ||
| 35 | should all be simple variables. */ | ||
| 36 | #define DO_LED_COPY(img_decl, pos, buf, len, copy_expr) \ | ||
| 37 | do { \ | ||
| 38 | if (pos > LED_NUM_DIGITS) \ | ||
| 39 | len = 0; \ | ||
| 40 | else { \ | ||
| 41 | if (pos + len > LED_NUM_DIGITS) \ | ||
| 42 | len = LED_NUM_DIGITS - pos; \ | ||
| 43 | \ | ||
| 44 | if (len > 0) { \ | ||
| 45 | unsigned long _flags; \ | ||
| 46 | const char *_end = buf + len; \ | ||
| 47 | img_decl = &leds_image[pos]; \ | ||
| 48 | \ | ||
| 49 | spin_lock_irqsave (leds_lock, _flags); \ | ||
| 50 | do \ | ||
| 51 | (copy_expr); \ | ||
| 52 | while (buf != _end); \ | ||
| 53 | spin_unlock_irqrestore (leds_lock, _flags); \ | ||
| 54 | } \ | ||
| 55 | } \ | ||
| 56 | } while (0) | ||
| 57 | |||
| 58 | /* Read LEN bytes from LEDs at position POS, into BUF. | ||
| 59 | Returns actual amount read. */ | ||
| 60 | unsigned read_leds (unsigned pos, char *buf, unsigned len) | ||
| 61 | { | ||
| 62 | DO_LED_COPY (const char *img, pos, buf, len, *buf++ = *img++); | ||
| 63 | return len; | ||
| 64 | } | ||
| 65 | |||
| 66 | /* Write LEN bytes to LEDs at position POS, from BUF. | ||
| 67 | Returns actual amount written. */ | ||
| 68 | unsigned write_leds (unsigned pos, const char *buf, unsigned len) | ||
| 69 | { | ||
| 70 | /* We write the actual LED values backwards, because | ||
| 71 | increasing memory addresses reflect LEDs right-to-left. */ | ||
| 72 | volatile char *led = &LED (LED_NUM_DIGITS - pos - 1); | ||
| 73 | /* We invert the value written to the hardware, because 1 = off, | ||
| 74 | and 0 = on. */ | ||
| 75 | DO_LED_COPY (char *img, pos, buf, len, | ||
| 76 | *led-- = 0xFF ^ (*img++ = *buf++)); | ||
| 77 | return len; | ||
| 78 | } | ||
| 79 | |||
| 80 | |||
| 81 | /* Device functions. */ | ||
| 82 | |||
| 83 | static ssize_t leds_dev_read (struct file *file, char *buf, size_t len, | ||
| 84 | loff_t *pos) | ||
| 85 | { | ||
| 86 | char temp_buf[LED_NUM_DIGITS]; | ||
| 87 | len = read_leds (*pos, temp_buf, len); | ||
| 88 | if (copy_to_user (buf, temp_buf, len)) | ||
| 89 | return -EFAULT; | ||
| 90 | *pos += len; | ||
| 91 | return len; | ||
| 92 | } | ||
| 93 | |||
| 94 | static ssize_t leds_dev_write (struct file *file, const char *buf, size_t len, | ||
| 95 | loff_t *pos) | ||
| 96 | { | ||
| 97 | char temp_buf[LED_NUM_DIGITS]; | ||
| 98 | if (copy_from_user (temp_buf, buf, min_t(size_t, len, LED_NUM_DIGITS))) | ||
| 99 | return -EFAULT; | ||
| 100 | len = write_leds (*pos, temp_buf, len); | ||
| 101 | *pos += len; | ||
| 102 | return len; | ||
| 103 | } | ||
| 104 | |||
| 105 | static loff_t leds_dev_lseek (struct file *file, loff_t offs, int whence) | ||
| 106 | { | ||
| 107 | if (whence == 1) | ||
| 108 | offs += file->f_pos; /* relative */ | ||
| 109 | else if (whence == 2) | ||
| 110 | offs += LED_NUM_DIGITS; /* end-relative */ | ||
| 111 | |||
| 112 | if (offs < 0 || offs > LED_NUM_DIGITS) | ||
| 113 | return -EINVAL; | ||
| 114 | |||
| 115 | file->f_pos = offs; | ||
| 116 | |||
| 117 | return 0; | ||
| 118 | } | ||
| 119 | |||
| 120 | static const struct file_operations leds_fops = { | ||
| 121 | .read = leds_dev_read, | ||
| 122 | .write = leds_dev_write, | ||
| 123 | .llseek = leds_dev_lseek | ||
| 124 | }; | ||
| 125 | |||
| 126 | static struct miscdevice leds_miscdev = { | ||
| 127 | .name = "leds", | ||
| 128 | .minor = LEDS_MINOR, | ||
| 129 | .fops = &leds_fops | ||
| 130 | }; | ||
| 131 | |||
| 132 | int __init leds_dev_init (void) | ||
| 133 | { | ||
| 134 | return misc_register (&leds_miscdev); | ||
| 135 | } | ||
| 136 | |||
| 137 | __initcall (leds_dev_init); | ||
diff --git a/arch/v850/kernel/rte_cb_multi.c b/arch/v850/kernel/rte_cb_multi.c deleted file mode 100644 index 963d55ab34cc..000000000000 --- a/arch/v850/kernel/rte_cb_multi.c +++ /dev/null | |||
| @@ -1,121 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-v850/rte_multi.c -- Support for Multi debugger monitor ROM | ||
| 3 | * on Midas lab RTE-CB series of evaluation boards | ||
| 4 | * | ||
| 5 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/init.h> | ||
| 16 | |||
| 17 | #include <asm/machdep.h> | ||
| 18 | |||
| 19 | #define IRQ_ADDR(irq) (0x80 + (irq) * 0x10) | ||
| 20 | |||
| 21 | /* A table of which interrupt vectors to install, since blindly | ||
| 22 | installing all of them makes the debugger stop working. This is a | ||
| 23 | list of offsets in the interrupt vector area; each entry means to | ||
| 24 | copy that particular 16-byte vector. An entry less than zero ends | ||
| 25 | the table. */ | ||
| 26 | static long multi_intv_install_table[] = { | ||
| 27 | /* Trap vectors */ | ||
| 28 | 0x40, 0x50, | ||
| 29 | |||
| 30 | #ifdef CONFIG_RTE_CB_MULTI_DBTRAP | ||
| 31 | /* Illegal insn / dbtrap. These are used by multi, so only handle | ||
| 32 | them if configured to do so. */ | ||
| 33 | 0x60, | ||
| 34 | #endif | ||
| 35 | |||
| 36 | /* GINT1 - GINT3 (note, not GINT0!) */ | ||
| 37 | IRQ_ADDR (IRQ_GINT(1)), | ||
| 38 | IRQ_ADDR (IRQ_GINT(2)), | ||
| 39 | IRQ_ADDR (IRQ_GINT(3)), | ||
| 40 | |||
| 41 | /* Timer D interrupts (up to 4 timers) */ | ||
| 42 | IRQ_ADDR (IRQ_INTCMD(0)), | ||
| 43 | #if IRQ_INTCMD_NUM > 1 | ||
| 44 | IRQ_ADDR (IRQ_INTCMD(1)), | ||
| 45 | #if IRQ_INTCMD_NUM > 2 | ||
| 46 | IRQ_ADDR (IRQ_INTCMD(2)), | ||
| 47 | #if IRQ_INTCMD_NUM > 3 | ||
| 48 | IRQ_ADDR (IRQ_INTCMD(3)), | ||
| 49 | #endif | ||
| 50 | #endif | ||
| 51 | #endif | ||
| 52 | |||
| 53 | /* UART interrupts (up to 3 channels) */ | ||
| 54 | IRQ_ADDR (IRQ_INTSER (0)), /* err */ | ||
| 55 | IRQ_ADDR (IRQ_INTSR (0)), /* rx */ | ||
| 56 | IRQ_ADDR (IRQ_INTST (0)), /* tx */ | ||
| 57 | #if IRQ_INTSR_NUM > 1 | ||
| 58 | IRQ_ADDR (IRQ_INTSER (1)), /* err */ | ||
| 59 | IRQ_ADDR (IRQ_INTSR (1)), /* rx */ | ||
| 60 | IRQ_ADDR (IRQ_INTST (1)), /* tx */ | ||
| 61 | #if IRQ_INTSR_NUM > 2 | ||
| 62 | IRQ_ADDR (IRQ_INTSER (2)), /* err */ | ||
| 63 | IRQ_ADDR (IRQ_INTSR (2)), /* rx */ | ||
| 64 | IRQ_ADDR (IRQ_INTST (2)), /* tx */ | ||
| 65 | #endif | ||
| 66 | #endif | ||
| 67 | |||
| 68 | -1 | ||
| 69 | }; | ||
| 70 | |||
| 71 | /* Early initialization for kernel using Multi debugger ROM monitor. */ | ||
| 72 | void __init multi_init (void) | ||
| 73 | { | ||
| 74 | /* We're using the Multi debugger monitor, so we have to install | ||
| 75 | the interrupt vectors. The monitor doesn't allow them to be | ||
| 76 | initially downloaded into their final destination because | ||
| 77 | it's in the monitor's scratch-RAM area. Unfortunately, Multi | ||
| 78 | also doesn't deal correctly with ELF sections where the LMA | ||
| 79 | and VMA differ -- it just ignores the LMA -- so we can't use | ||
| 80 | that feature to work around the problem. What we do instead | ||
| 81 | is just put the interrupt vectors into a normal section, and | ||
| 82 | do the necessary copying and relocation here. Since the | ||
| 83 | interrupt vector basically only contains `jr' instructions | ||
| 84 | and no-ops, it's not that hard. */ | ||
| 85 | extern unsigned long _intv_load_start, _intv_start; | ||
| 86 | register unsigned long *src = &_intv_load_start; | ||
| 87 | register unsigned long *dst = (unsigned long *)INTV_BASE; | ||
| 88 | register unsigned long jr_fixup = (char *)&_intv_start - (char *)dst; | ||
| 89 | register long *ii; | ||
| 90 | |||
| 91 | /* Copy interrupt vectors as instructed by multi_intv_install_table. */ | ||
| 92 | for (ii = multi_intv_install_table; *ii >= 0; ii++) { | ||
| 93 | /* Copy 16-byte interrupt vector at offset *ii. */ | ||
| 94 | int boffs; | ||
| 95 | for (boffs = 0; boffs < 0x10; boffs += sizeof *src) { | ||
| 96 | /* Copy a single word, fixing up the jump offs | ||
| 97 | if it's a `jr' instruction. */ | ||
| 98 | int woffs = (*ii + boffs) / sizeof *src; | ||
| 99 | unsigned long word = src[woffs]; | ||
| 100 | |||
| 101 | if ((word & 0xFC0) == 0x780) { | ||
| 102 | /* A `jr' insn, fix up its offset (and yes, the | ||
| 103 | weird half-word swapping is intentional). */ | ||
| 104 | unsigned short hi = word & 0xFFFF; | ||
| 105 | unsigned short lo = word >> 16; | ||
| 106 | unsigned long udisp22 | ||
| 107 | = lo + ((hi & 0x3F) << 16); | ||
| 108 | long disp22 = (long)(udisp22 << 10) >> 10; | ||
| 109 | |||
| 110 | disp22 += jr_fixup; | ||
| 111 | |||
| 112 | hi = ((disp22 >> 16) & 0x3F) | 0x780; | ||
| 113 | lo = disp22 & 0xFFFF; | ||
| 114 | |||
| 115 | word = hi + (lo << 16); | ||
| 116 | } | ||
| 117 | |||
| 118 | dst[woffs] = word; | ||
| 119 | } | ||
| 120 | } | ||
| 121 | } | ||
diff --git a/arch/v850/kernel/rte_ma1_cb-rom.ld b/arch/v850/kernel/rte_ma1_cb-rom.ld deleted file mode 100644 index 87b618f8253b..000000000000 --- a/arch/v850/kernel/rte_ma1_cb-rom.ld +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs RTE-V850E/MA1-CB evaluation board | ||
| 2 | (CONFIG_RTE_CB_MA1), with kernel in ROM. */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | ROM : ORIGIN = 0x00000000, LENGTH = 0x00100000 | ||
| 6 | /* 1MB of SRAM. This memory is mirrored 4 times. */ | ||
| 7 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE | ||
| 8 | /* 32MB of SDRAM. */ | ||
| 9 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 10 | } | ||
| 11 | |||
| 12 | SECTIONS { | ||
| 13 | ROMK_SECTIONS(ROM, SRAM) | ||
| 14 | } | ||
diff --git a/arch/v850/kernel/rte_ma1_cb.c b/arch/v850/kernel/rte_ma1_cb.c deleted file mode 100644 index 08abf3d5f8df..000000000000 --- a/arch/v850/kernel/rte_ma1_cb.c +++ /dev/null | |||
| @@ -1,107 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/rte_ma1_cb.c -- Midas labs RTE-V850E/MA1-CB board | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/bootmem.h> | ||
| 17 | |||
| 18 | #include <asm/atomic.h> | ||
| 19 | #include <asm/page.h> | ||
| 20 | #include <asm/ma1.h> | ||
| 21 | #include <asm/rte_ma1_cb.h> | ||
| 22 | #include <asm/v850e_timer_c.h> | ||
| 23 | |||
| 24 | #include "mach.h" | ||
| 25 | |||
| 26 | |||
| 27 | /* SRAM and SDRAM are almost contiguous (with a small hole in between; | ||
| 28 | see mach_reserve_bootmem for details), so just use both as one big area. */ | ||
| 29 | #define RAM_START SRAM_ADDR | ||
| 30 | #define RAM_END (SDRAM_ADDR + SDRAM_SIZE) | ||
| 31 | |||
| 32 | |||
| 33 | void __init mach_early_init (void) | ||
| 34 | { | ||
| 35 | rte_cb_early_init (); | ||
| 36 | } | ||
| 37 | |||
| 38 | void __init mach_get_physical_ram (unsigned long *ram_start, | ||
| 39 | unsigned long *ram_len) | ||
| 40 | { | ||
| 41 | *ram_start = RAM_START; | ||
| 42 | *ram_len = RAM_END - RAM_START; | ||
| 43 | } | ||
| 44 | |||
| 45 | void __init mach_reserve_bootmem () | ||
| 46 | { | ||
| 47 | #ifdef CONFIG_RTE_CB_MULTI | ||
| 48 | /* Prevent the kernel from touching the monitor's scratch RAM. */ | ||
| 49 | reserve_bootmem(MON_SCRATCH_ADDR, MON_SCRATCH_SIZE, | ||
| 50 | BOOTMEM_DEFAULT); | ||
| 51 | #endif | ||
| 52 | |||
| 53 | /* The space between SRAM and SDRAM is filled with duplicate | ||
| 54 | images of SRAM. Prevent the kernel from using them. */ | ||
| 55 | reserve_bootmem (SRAM_ADDR + SRAM_SIZE, | ||
| 56 | SDRAM_ADDR - (SRAM_ADDR + SRAM_SIZE), | ||
| 57 | BOOTMEM_DEFAULT); | ||
| 58 | } | ||
| 59 | |||
| 60 | void mach_gettimeofday (struct timespec *tv) | ||
| 61 | { | ||
| 62 | tv->tv_sec = 0; | ||
| 63 | tv->tv_nsec = 0; | ||
| 64 | } | ||
| 65 | |||
| 66 | /* Called before configuring an on-chip UART. */ | ||
| 67 | void rte_ma1_cb_uart_pre_configure (unsigned chan, | ||
| 68 | unsigned cflags, unsigned baud) | ||
| 69 | { | ||
| 70 | /* The RTE-MA1-CB connects some general-purpose I/O pins on the | ||
| 71 | CPU to the RTS/CTS lines of UART 0's serial connection. | ||
| 72 | I/O pins P42 and P43 are RTS and CTS respectively. */ | ||
| 73 | if (chan == 0) { | ||
| 74 | /* Put P42 & P43 in I/O port mode. */ | ||
| 75 | MA_PORT4_PMC &= ~0xC; | ||
| 76 | /* Make P42 an output, and P43 an input. */ | ||
| 77 | MA_PORT4_PM = (MA_PORT4_PM & ~0xC) | 0x8; | ||
| 78 | } | ||
| 79 | |||
| 80 | /* Do pre-configuration for the actual UART. */ | ||
| 81 | ma_uart_pre_configure (chan, cflags, baud); | ||
| 82 | } | ||
| 83 | |||
| 84 | void __init mach_init_irqs (void) | ||
| 85 | { | ||
| 86 | unsigned tc; | ||
| 87 | |||
| 88 | /* Initialize interrupts. */ | ||
| 89 | ma_init_irqs (); | ||
| 90 | rte_cb_init_irqs (); | ||
| 91 | |||
| 92 | /* Use falling-edge-sensitivity for interrupts . */ | ||
| 93 | V850E_TIMER_C_SESC (0) &= ~0xC; | ||
| 94 | V850E_TIMER_C_SESC (1) &= ~0xF; | ||
| 95 | |||
| 96 | /* INTP000-INTP011 are shared with `Timer C', so we have to set | ||
| 97 | up Timer C to pass them through as raw interrupts. */ | ||
| 98 | for (tc = 0; tc < 2; tc++) | ||
| 99 | /* Turn on the timer. */ | ||
| 100 | V850E_TIMER_C_TMCC0 (tc) |= V850E_TIMER_C_TMCC0_CAE; | ||
| 101 | |||
| 102 | /* Make sure the relevant port0/port1 pins are assigned | ||
| 103 | interrupt duty. We used INTP001-INTP011 (don't screw with | ||
| 104 | INTP000 because the monitor uses it). */ | ||
| 105 | MA_PORT0_PMC |= 0x4; /* P02 (INTP001) in IRQ mode. */ | ||
| 106 | MA_PORT1_PMC |= 0x6; /* P11 (INTP010) & P12 (INTP011) in IRQ mode.*/ | ||
| 107 | } | ||
diff --git a/arch/v850/kernel/rte_ma1_cb.ld b/arch/v850/kernel/rte_ma1_cb.ld deleted file mode 100644 index c8e16d16be41..000000000000 --- a/arch/v850/kernel/rte_ma1_cb.ld +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs RTE-V850E/MA1-CB evaluation board | ||
| 2 | (CONFIG_RTE_CB_MA1), with kernel in SDRAM, under Multi debugger. */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 1MB of SRAM; we can't use the last 32KB, because it's used by | ||
| 6 | the monitor scratch-RAM. This memory is mirrored 4 times. */ | ||
| 7 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = (SRAM_SIZE - MON_SCRATCH_SIZE) | ||
| 8 | /* Monitor scratch RAM; only the interrupt vectors should go here. */ | ||
| 9 | MRAM : ORIGIN = MON_SCRATCH_ADDR, LENGTH = MON_SCRATCH_SIZE | ||
| 10 | /* 32MB of SDRAM. */ | ||
| 11 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 12 | } | ||
| 13 | |||
| 14 | #ifdef CONFIG_RTE_CB_MA1_KSRAM | ||
| 15 | # define KRAM SRAM | ||
| 16 | #else | ||
| 17 | # define KRAM SDRAM | ||
| 18 | #endif | ||
| 19 | |||
| 20 | SECTIONS { | ||
| 21 | /* We can't use RAMK_KRAM_CONTENTS because that puts the whole | ||
| 22 | kernel in a single ELF segment, and the Multi debugger (which | ||
| 23 | we use to load the kernel) appears to have bizarre problems | ||
| 24 | dealing with it. */ | ||
| 25 | |||
| 26 | .text : { | ||
| 27 | __kram_start = . ; | ||
| 28 | TEXT_CONTENTS | ||
| 29 | } > KRAM | ||
| 30 | |||
| 31 | .data : { | ||
| 32 | DATA_CONTENTS | ||
| 33 | BSS_CONTENTS | ||
| 34 | RAMK_INIT_CONTENTS | ||
| 35 | __kram_end = . ; | ||
| 36 | BOOTMAP_CONTENTS | ||
| 37 | |||
| 38 | /* The address at which the interrupt vectors are initially | ||
| 39 | loaded by the loader. We can't load the interrupt vectors | ||
| 40 | directly into their target location, because the monitor | ||
| 41 | ROM for the GHS Multi debugger barfs if we try. | ||
| 42 | Unfortunately, Multi also doesn't deal correctly with ELF | ||
| 43 | sections where the LMA and VMA differ (it just ignores the | ||
| 44 | LMA), so we can't use that feature to work around the | ||
| 45 | problem! What we do instead is just put the interrupt | ||
| 46 | vectors into a normal section, and have the | ||
| 47 | `mach_early_init' function for Midas boards do the | ||
| 48 | necessary copying and relocation at runtime (this section | ||
| 49 | basically only contains `jr' instructions, so it's not | ||
| 50 | that hard). */ | ||
| 51 | . = ALIGN (0x10) ; | ||
| 52 | __intv_load_start = . ; | ||
| 53 | INTV_CONTENTS | ||
| 54 | } > KRAM | ||
| 55 | |||
| 56 | .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM | ||
| 57 | } | ||
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c deleted file mode 100644 index 687e367d8b64..000000000000 --- a/arch/v850/kernel/rte_mb_a_pci.c +++ /dev/null | |||
| @@ -1,819 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/mb_a_pci.c -- PCI support for Midas lab RTE-MOTHER-A board | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03,05 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03,05 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/slab.h> | ||
| 18 | #include <linux/spinlock.h> | ||
| 19 | #include <linux/pci.h> | ||
| 20 | |||
| 21 | #include <asm/machdep.h> | ||
| 22 | |||
| 23 | /* __nomods_init is like __devinit, but is a no-op when modules are enabled. | ||
| 24 | This is used by some routines that can be called either during boot | ||
| 25 | or by a module. */ | ||
| 26 | #ifdef CONFIG_MODULES | ||
| 27 | #define __nomods_init /*nothing*/ | ||
| 28 | #else | ||
| 29 | #define __nomods_init __devinit | ||
| 30 | #endif | ||
| 31 | |||
| 32 | /* PCI devices on the Mother-A board can only do DMA to/from the MB SRAM | ||
| 33 | (the RTE-V850E/MA1-CB cpu board doesn't support PCI access to | ||
| 34 | CPU-board memory), and since linux DMA buffers are allocated in | ||
| 35 | normal kernel memory, we basically have to copy DMA blocks around | ||
| 36 | (this is like a `bounce buffer'). When a DMA block is `mapped', we | ||
| 37 | allocate an identically sized block in MB SRAM, and if we're doing | ||
| 38 | output to the device, copy the CPU-memory block to the MB-SRAM block. | ||
| 39 | When an active block is `unmapped', we will copy the block back to | ||
| 40 | CPU memory if necessary, and then deallocate the MB SRAM block. | ||
| 41 | Ack. */ | ||
| 42 | |||
| 43 | /* Where the motherboard SRAM is in the PCI-bus address space (the | ||
| 44 | first 512K of it is also mapped at PCI address 0). */ | ||
| 45 | #define PCI_MB_SRAM_ADDR 0x800000 | ||
| 46 | |||
| 47 | /* Convert CPU-view MB SRAM address to/from PCI-view addresses of the | ||
| 48 | same memory. */ | ||
| 49 | #define MB_SRAM_TO_PCI(mb_sram_addr) \ | ||
| 50 | ((dma_addr_t)mb_sram_addr - MB_A_SRAM_ADDR + PCI_MB_SRAM_ADDR) | ||
| 51 | #define PCI_TO_MB_SRAM(pci_addr) \ | ||
| 52 | (void *)(pci_addr - PCI_MB_SRAM_ADDR + MB_A_SRAM_ADDR) | ||
| 53 | |||
| 54 | static void pcibios_assign_resources (void); | ||
| 55 | |||
| 56 | struct mb_pci_dev_irq { | ||
| 57 | unsigned dev; /* PCI device number */ | ||
| 58 | unsigned irq_base; /* First IRQ */ | ||
| 59 | unsigned query_pin; /* True if we should read the device's | ||
| 60 | Interrupt Pin info, and allocate | ||
| 61 | interrupt IRQ_BASE + PIN. */ | ||
| 62 | }; | ||
| 63 | |||
| 64 | /* PCI interrupts are mapped statically to GBUS interrupts. */ | ||
| 65 | static struct mb_pci_dev_irq mb_pci_dev_irqs[] = { | ||
| 66 | /* Motherboard SB82558 ethernet controller */ | ||
| 67 | { 10, IRQ_MB_A_LAN, 0 }, | ||
| 68 | /* PCI slot 1 */ | ||
| 69 | { 8, IRQ_MB_A_PCI1(0), 1 }, | ||
| 70 | /* PCI slot 2 */ | ||
| 71 | { 9, IRQ_MB_A_PCI2(0), 1 } | ||
| 72 | }; | ||
| 73 | #define NUM_MB_PCI_DEV_IRQS ARRAY_SIZE(mb_pci_dev_irqs) | ||
| 74 | |||
| 75 | |||
| 76 | /* PCI configuration primitives. */ | ||
| 77 | |||
| 78 | #define CONFIG_DMCFGA(bus, devfn, offs) \ | ||
| 79 | (0x80000000 \ | ||
| 80 | | ((offs) & ~0x3) \ | ||
| 81 | | ((devfn) << 8) \ | ||
| 82 | | ((bus)->number << 16)) | ||
| 83 | |||
| 84 | static int | ||
| 85 | mb_pci_read (struct pci_bus *bus, unsigned devfn, int offs, int size, u32 *rval) | ||
| 86 | { | ||
| 87 | u32 addr; | ||
| 88 | int flags; | ||
| 89 | |||
| 90 | local_irq_save (flags); | ||
| 91 | |||
| 92 | MB_A_PCI_PCICR = 0x7; | ||
| 93 | MB_A_PCI_DMCFGA = CONFIG_DMCFGA (bus, devfn, offs); | ||
| 94 | |||
| 95 | addr = MB_A_PCI_IO_ADDR + (offs & 0x3); | ||
| 96 | |||
| 97 | switch (size) { | ||
| 98 | case 1: *rval = *(volatile u8 *)addr; break; | ||
| 99 | case 2: *rval = *(volatile u16 *)addr; break; | ||
| 100 | case 4: *rval = *(volatile u32 *)addr; break; | ||
| 101 | } | ||
| 102 | |||
| 103 | if (MB_A_PCI_PCISR & 0x2000) { | ||
| 104 | MB_A_PCI_PCISR = 0x2000; | ||
| 105 | *rval = ~0; | ||
| 106 | } | ||
| 107 | |||
| 108 | MB_A_PCI_DMCFGA = 0; | ||
| 109 | |||
| 110 | local_irq_restore (flags); | ||
| 111 | |||
| 112 | return PCIBIOS_SUCCESSFUL; | ||
| 113 | } | ||
| 114 | |||
| 115 | static int | ||
| 116 | mb_pci_write (struct pci_bus *bus, unsigned devfn, int offs, int size, u32 val) | ||
| 117 | { | ||
| 118 | u32 addr; | ||
| 119 | int flags; | ||
| 120 | |||
| 121 | local_irq_save (flags); | ||
| 122 | |||
| 123 | MB_A_PCI_PCICR = 0x7; | ||
| 124 | MB_A_PCI_DMCFGA = CONFIG_DMCFGA (bus, devfn, offs); | ||
| 125 | |||
| 126 | addr = MB_A_PCI_IO_ADDR + (offs & 0x3); | ||
| 127 | |||
| 128 | switch (size) { | ||
| 129 | case 1: *(volatile u8 *)addr = val; break; | ||
| 130 | case 2: *(volatile u16 *)addr = val; break; | ||
| 131 | case 4: *(volatile u32 *)addr = val; break; | ||
| 132 | } | ||
| 133 | |||
| 134 | if (MB_A_PCI_PCISR & 0x2000) | ||
| 135 | MB_A_PCI_PCISR = 0x2000; | ||
| 136 | |||
| 137 | MB_A_PCI_DMCFGA = 0; | ||
| 138 | |||
| 139 | local_irq_restore (flags); | ||
| 140 | |||
| 141 | return PCIBIOS_SUCCESSFUL; | ||
| 142 | } | ||
| 143 | |||
| 144 | static struct pci_ops mb_pci_config_ops = { | ||
| 145 | .read = mb_pci_read, | ||
| 146 | .write = mb_pci_write, | ||
| 147 | }; | ||
| 148 | |||
| 149 | |||
| 150 | /* PCI Initialization. */ | ||
| 151 | |||
| 152 | static struct pci_bus *mb_pci_bus = 0; | ||
| 153 | |||
| 154 | /* Do initial PCI setup. */ | ||
| 155 | static int __devinit pcibios_init (void) | ||
| 156 | { | ||
| 157 | u32 id = MB_A_PCI_PCIHIDR; | ||
| 158 | u16 vendor = id & 0xFFFF; | ||
| 159 | u16 device = (id >> 16) & 0xFFFF; | ||
| 160 | |||
| 161 | if (vendor == PCI_VENDOR_ID_PLX && device == PCI_DEVICE_ID_PLX_9080) { | ||
| 162 | printk (KERN_INFO | ||
| 163 | "PCI: PLX Technology PCI9080 HOST/PCI bridge\n"); | ||
| 164 | |||
| 165 | MB_A_PCI_PCICR = 0x147; | ||
| 166 | |||
| 167 | MB_A_PCI_PCIBAR0 = 0x007FFF00; | ||
| 168 | MB_A_PCI_PCIBAR1 = 0x0000FF00; | ||
| 169 | MB_A_PCI_PCIBAR2 = 0x00800000; | ||
| 170 | |||
| 171 | MB_A_PCI_PCILTR = 0x20; | ||
| 172 | |||
| 173 | MB_A_PCI_PCIPBAM |= 0x3; | ||
| 174 | |||
| 175 | MB_A_PCI_PCISR = ~0; /* Clear errors. */ | ||
| 176 | |||
| 177 | /* Reprogram the motherboard's IO/config address space, | ||
| 178 | as we don't support the GCS7 address space that the | ||
| 179 | default uses. */ | ||
| 180 | |||
| 181 | /* Significant address bits used for decoding PCI GCS5 space | ||
| 182 | accesses. */ | ||
| 183 | MB_A_PCI_DMRR = ~(MB_A_PCI_MEM_SIZE - 1); | ||
| 184 | |||
| 185 | /* I don't understand this, but the SolutionGear example code | ||
| 186 | uses such an offset, and it doesn't work without it. XXX */ | ||
| 187 | #if GCS5_SIZE == 0x00800000 | ||
| 188 | #define GCS5_CFG_OFFS 0x00800000 | ||
| 189 | #else | ||
| 190 | #define GCS5_CFG_OFFS 0 | ||
| 191 | #endif | ||
| 192 | |||
| 193 | /* Address bit values for matching. Note that we have to give | ||
| 194 | the address from the motherboard's point of view, which is | ||
| 195 | different than the CPU's. */ | ||
| 196 | /* PCI memory space. */ | ||
| 197 | MB_A_PCI_DMLBAM = GCS5_CFG_OFFS + 0x0; | ||
| 198 | /* PCI I/O space. */ | ||
| 199 | MB_A_PCI_DMLBAI = | ||
| 200 | GCS5_CFG_OFFS + (MB_A_PCI_IO_ADDR - GCS5_ADDR); | ||
| 201 | |||
| 202 | mb_pci_bus = pci_scan_bus (0, &mb_pci_config_ops, 0); | ||
| 203 | |||
| 204 | pcibios_assign_resources (); | ||
| 205 | } else | ||
| 206 | printk (KERN_ERR "PCI: HOST/PCI bridge not found\n"); | ||
| 207 | |||
| 208 | return 0; | ||
| 209 | } | ||
| 210 | |||
| 211 | subsys_initcall (pcibios_init); | ||
| 212 | |||
| 213 | char __devinit *pcibios_setup (char *option) | ||
| 214 | { | ||
| 215 | /* Don't handle any options. */ | ||
| 216 | return option; | ||
| 217 | } | ||
| 218 | |||
| 219 | |||
| 220 | int __nomods_init pcibios_enable_device (struct pci_dev *dev, int mask) | ||
| 221 | { | ||
| 222 | u16 cmd, old_cmd; | ||
| 223 | int idx; | ||
| 224 | struct resource *r; | ||
| 225 | |||
| 226 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | ||
| 227 | old_cmd = cmd; | ||
| 228 | for (idx = 0; idx < 6; idx++) { | ||
| 229 | r = &dev->resource[idx]; | ||
| 230 | if (!r->start && r->end) { | ||
| 231 | printk(KERN_ERR "PCI: Device %s not available because " | ||
| 232 | "of resource collisions\n", pci_name(dev)); | ||
| 233 | return -EINVAL; | ||
| 234 | } | ||
| 235 | if (r->flags & IORESOURCE_IO) | ||
| 236 | cmd |= PCI_COMMAND_IO; | ||
| 237 | if (r->flags & IORESOURCE_MEM) | ||
| 238 | cmd |= PCI_COMMAND_MEMORY; | ||
| 239 | } | ||
| 240 | if (cmd != old_cmd) { | ||
| 241 | printk("PCI: Enabling device %s (%04x -> %04x)\n", | ||
| 242 | pci_name(dev), old_cmd, cmd); | ||
| 243 | pci_write_config_word(dev, PCI_COMMAND, cmd); | ||
| 244 | } | ||
| 245 | return 0; | ||
| 246 | } | ||
| 247 | |||
| 248 | |||
| 249 | /* Resource allocation. */ | ||
| 250 | static void __devinit pcibios_assign_resources (void) | ||
| 251 | { | ||
| 252 | struct pci_dev *dev = NULL; | ||
| 253 | struct resource *r; | ||
| 254 | |||
| 255 | for_each_pci_dev(dev) { | ||
| 256 | unsigned di_num; | ||
| 257 | unsigned class = dev->class >> 8; | ||
| 258 | |||
| 259 | if (class && class != PCI_CLASS_BRIDGE_HOST) { | ||
| 260 | unsigned r_num; | ||
| 261 | for(r_num = 0; r_num < 6; r_num++) { | ||
| 262 | r = &dev->resource[r_num]; | ||
| 263 | if (!r->start && r->end) | ||
| 264 | pci_assign_resource (dev, r_num); | ||
| 265 | } | ||
| 266 | } | ||
| 267 | |||
| 268 | /* Assign interrupts. */ | ||
| 269 | for (di_num = 0; di_num < NUM_MB_PCI_DEV_IRQS; di_num++) { | ||
| 270 | struct mb_pci_dev_irq *di = &mb_pci_dev_irqs[di_num]; | ||
| 271 | |||
| 272 | if (di->dev == PCI_SLOT (dev->devfn)) { | ||
| 273 | unsigned irq = di->irq_base; | ||
| 274 | |||
| 275 | if (di->query_pin) { | ||
| 276 | /* Find out which interrupt pin | ||
| 277 | this device uses (each PCI | ||
| 278 | slot has 4). */ | ||
| 279 | u8 irq_pin; | ||
| 280 | |||
| 281 | pci_read_config_byte (dev, | ||
| 282 | PCI_INTERRUPT_PIN, | ||
| 283 | &irq_pin); | ||
| 284 | |||
| 285 | if (irq_pin == 0) | ||
| 286 | /* Doesn't use interrupts. */ | ||
| 287 | continue; | ||
| 288 | else | ||
| 289 | irq += irq_pin - 1; | ||
| 290 | } | ||
| 291 | |||
| 292 | pcibios_update_irq (dev, irq); | ||
| 293 | } | ||
| 294 | } | ||
| 295 | } | ||
| 296 | } | ||
| 297 | |||
| 298 | void __devinit pcibios_update_irq (struct pci_dev *dev, int irq) | ||
| 299 | { | ||
| 300 | dev->irq = irq; | ||
| 301 | pci_write_config_byte (dev, PCI_INTERRUPT_LINE, irq); | ||
| 302 | } | ||
| 303 | |||
| 304 | void __devinit | ||
| 305 | pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | ||
| 306 | struct resource *res) | ||
| 307 | { | ||
| 308 | unsigned long offset = 0; | ||
| 309 | |||
| 310 | if (res->flags & IORESOURCE_IO) { | ||
| 311 | offset = MB_A_PCI_IO_ADDR; | ||
| 312 | } else if (res->flags & IORESOURCE_MEM) { | ||
| 313 | offset = MB_A_PCI_MEM_ADDR; | ||
| 314 | } | ||
| 315 | |||
| 316 | region->start = res->start - offset; | ||
| 317 | region->end = res->end - offset; | ||
| 318 | } | ||
| 319 | |||
| 320 | |||
| 321 | /* Stubs for things we don't use. */ | ||
| 322 | |||
| 323 | /* Called after each bus is probed, but before its children are examined. */ | ||
| 324 | void pcibios_fixup_bus(struct pci_bus *b) | ||
| 325 | { | ||
| 326 | } | ||
| 327 | |||
| 328 | void | ||
| 329 | pcibios_align_resource (void *data, struct resource *res, | ||
| 330 | resource_size_t size, resource_size_t align) | ||
| 331 | { | ||
| 332 | } | ||
| 333 | |||
| 334 | void pcibios_set_master (struct pci_dev *dev) | ||
| 335 | { | ||
| 336 | } | ||
| 337 | |||
| 338 | |||
| 339 | /* Mother-A SRAM memory allocation. This is a simple first-fit allocator. */ | ||
| 340 | |||
| 341 | /* A memory free-list node. */ | ||
| 342 | struct mb_sram_free_area { | ||
| 343 | void *mem; | ||
| 344 | unsigned long size; | ||
| 345 | struct mb_sram_free_area *next; | ||
| 346 | }; | ||
| 347 | |||
| 348 | /* The tail of the free-list, which starts out containing all the SRAM. */ | ||
| 349 | static struct mb_sram_free_area mb_sram_free_tail = { | ||
| 350 | (void *)MB_A_SRAM_ADDR, MB_A_SRAM_SIZE, 0 | ||
| 351 | }; | ||
| 352 | |||
| 353 | /* The free-list. */ | ||
| 354 | static struct mb_sram_free_area *mb_sram_free_areas = &mb_sram_free_tail; | ||
| 355 | |||
| 356 | /* The free-list of free free-list nodes. (:-) */ | ||
| 357 | static struct mb_sram_free_area *mb_sram_free_free_areas = 0; | ||
| 358 | |||
| 359 | /* Spinlock protecting the above globals. */ | ||
| 360 | static DEFINE_SPINLOCK(mb_sram_lock); | ||
| 361 | |||
| 362 | /* Allocate a memory block at least SIZE bytes long in the Mother-A SRAM | ||
| 363 | space. */ | ||
| 364 | static void *alloc_mb_sram (size_t size) | ||
| 365 | { | ||
| 366 | struct mb_sram_free_area *prev, *fa; | ||
| 367 | unsigned long flags; | ||
| 368 | void *mem = 0; | ||
| 369 | |||
| 370 | spin_lock_irqsave (mb_sram_lock, flags); | ||
| 371 | |||
| 372 | /* Look for a free area that can contain SIZE bytes. */ | ||
| 373 | for (prev = 0, fa = mb_sram_free_areas; fa; prev = fa, fa = fa->next) | ||
| 374 | if (fa->size >= size) { | ||
| 375 | /* Found one! */ | ||
| 376 | mem = fa->mem; | ||
| 377 | |||
| 378 | if (fa->size == size) { | ||
| 379 | /* In fact, it fits exactly, so remove | ||
| 380 | this node from the free-list. */ | ||
| 381 | if (prev) | ||
| 382 | prev->next = fa->next; | ||
| 383 | else | ||
| 384 | mb_sram_free_areas = fa->next; | ||
| 385 | /* Put it on the free-list-entry-free-list. */ | ||
| 386 | fa->next = mb_sram_free_free_areas; | ||
| 387 | mb_sram_free_free_areas = fa; | ||
| 388 | } else { | ||
| 389 | /* FA is bigger than SIZE, so just | ||
| 390 | reduce its size to account for this | ||
| 391 | allocation. */ | ||
| 392 | fa->mem += size; | ||
| 393 | fa->size -= size; | ||
| 394 | } | ||
| 395 | |||
| 396 | break; | ||
| 397 | } | ||
| 398 | |||
| 399 | spin_unlock_irqrestore (mb_sram_lock, flags); | ||
| 400 | |||
| 401 | return mem; | ||
| 402 | } | ||
| 403 | |||
| 404 | /* Return the memory area MEM of size SIZE to the MB SRAM free pool. */ | ||
| 405 | static void free_mb_sram (void *mem, size_t size) | ||
| 406 | { | ||
| 407 | struct mb_sram_free_area *prev, *fa, *new_fa; | ||
| 408 | unsigned long flags; | ||
| 409 | void *end = mem + size; | ||
| 410 | |||
| 411 | spin_lock_irqsave (mb_sram_lock, flags); | ||
| 412 | |||
| 413 | retry: | ||
| 414 | /* Find an adjacent free-list entry. */ | ||
| 415 | for (prev = 0, fa = mb_sram_free_areas; fa; prev = fa, fa = fa->next) | ||
| 416 | if (fa->mem == end) { | ||
| 417 | /* FA is just after MEM, grow down to encompass it. */ | ||
| 418 | fa->mem = mem; | ||
| 419 | fa->size += size; | ||
| 420 | goto done; | ||
| 421 | } else if (fa->mem + fa->size == mem) { | ||
| 422 | struct mb_sram_free_area *next_fa = fa->next; | ||
| 423 | |||
| 424 | /* FA is just before MEM, expand to encompass it. */ | ||
| 425 | fa->size += size; | ||
| 426 | |||
| 427 | /* See if FA can now be merged with its successor. */ | ||
| 428 | if (next_fa && fa->mem + fa->size == next_fa->mem) { | ||
| 429 | /* Yup; merge NEXT_FA's info into FA. */ | ||
| 430 | fa->size += next_fa->size; | ||
| 431 | fa->next = next_fa->next; | ||
| 432 | /* Free NEXT_FA. */ | ||
| 433 | next_fa->next = mb_sram_free_free_areas; | ||
| 434 | mb_sram_free_free_areas = next_fa; | ||
| 435 | } | ||
| 436 | goto done; | ||
| 437 | } else if (fa->mem > mem) | ||
| 438 | /* We've reached the right spot in the free-list | ||
| 439 | without finding an adjacent free-area, so add | ||
| 440 | a new free area to hold mem. */ | ||
| 441 | break; | ||
| 442 | |||
| 443 | /* Make a new free-list entry. */ | ||
| 444 | |||
| 445 | /* First, get a free-list entry. */ | ||
| 446 | if (! mb_sram_free_free_areas) { | ||
| 447 | /* There are none, so make some. */ | ||
| 448 | void *block; | ||
| 449 | size_t block_size = sizeof (struct mb_sram_free_area) * 8; | ||
| 450 | |||
| 451 | /* Don't hold the lock while calling kmalloc (I'm not | ||
| 452 | sure whether it would be a problem, since we use | ||
| 453 | GFP_ATOMIC, but it makes me nervous). */ | ||
| 454 | spin_unlock_irqrestore (mb_sram_lock, flags); | ||
| 455 | |||
| 456 | block = kmalloc (block_size, GFP_ATOMIC); | ||
| 457 | if (! block) | ||
| 458 | panic ("free_mb_sram: can't allocate free-list entry"); | ||
| 459 | |||
| 460 | /* Now get the lock back. */ | ||
| 461 | spin_lock_irqsave (mb_sram_lock, flags); | ||
| 462 | |||
| 463 | /* Add the new free free-list entries. */ | ||
| 464 | while (block_size > 0) { | ||
| 465 | struct mb_sram_free_area *nfa = block; | ||
| 466 | nfa->next = mb_sram_free_free_areas; | ||
| 467 | mb_sram_free_free_areas = nfa; | ||
| 468 | block += sizeof *nfa; | ||
| 469 | block_size -= sizeof *nfa; | ||
| 470 | } | ||
| 471 | |||
| 472 | /* Since we dropped the lock to call kmalloc, the | ||
| 473 | free-list could have changed, so retry from the | ||
| 474 | beginning. */ | ||
| 475 | goto retry; | ||
| 476 | } | ||
| 477 | |||
| 478 | /* Remove NEW_FA from the free-list of free-list entries. */ | ||
| 479 | new_fa = mb_sram_free_free_areas; | ||
| 480 | mb_sram_free_free_areas = new_fa->next; | ||
| 481 | |||
| 482 | /* NEW_FA initially holds only MEM. */ | ||
| 483 | new_fa->mem = mem; | ||
| 484 | new_fa->size = size; | ||
| 485 | |||
| 486 | /* Insert NEW_FA in the free-list between PREV and FA. */ | ||
| 487 | new_fa->next = fa; | ||
| 488 | if (prev) | ||
| 489 | prev->next = new_fa; | ||
| 490 | else | ||
| 491 | mb_sram_free_areas = new_fa; | ||
| 492 | |||
| 493 | done: | ||
| 494 | spin_unlock_irqrestore (mb_sram_lock, flags); | ||
| 495 | } | ||
| 496 | |||
| 497 | |||
| 498 | /* Maintainence of CPU -> Mother-A DMA mappings. */ | ||
| 499 | |||
| 500 | struct dma_mapping { | ||
| 501 | void *cpu_addr; | ||
| 502 | void *mb_sram_addr; | ||
| 503 | size_t size; | ||
| 504 | struct dma_mapping *next; | ||
| 505 | }; | ||
| 506 | |||
| 507 | /* A list of mappings from CPU addresses to MB SRAM addresses for active | ||
| 508 | DMA blocks (that have been `granted' to the PCI device). */ | ||
| 509 | static struct dma_mapping *active_dma_mappings = 0; | ||
| 510 | |||
| 511 | /* A list of free mapping objects. */ | ||
| 512 | static struct dma_mapping *free_dma_mappings = 0; | ||
| 513 | |||
| 514 | /* Spinlock protecting the above globals. */ | ||
| 515 | static DEFINE_SPINLOCK(dma_mappings_lock); | ||
| 516 | |||
| 517 | static struct dma_mapping *new_dma_mapping (size_t size) | ||
| 518 | { | ||
| 519 | unsigned long flags; | ||
| 520 | struct dma_mapping *mapping; | ||
| 521 | void *mb_sram_block = alloc_mb_sram (size); | ||
| 522 | |||
| 523 | if (! mb_sram_block) | ||
| 524 | return 0; | ||
| 525 | |||
| 526 | spin_lock_irqsave (dma_mappings_lock, flags); | ||
| 527 | |||
| 528 | if (! free_dma_mappings) { | ||
| 529 | /* We're out of mapping structures, make more. */ | ||
| 530 | void *mblock; | ||
| 531 | size_t mblock_size = sizeof (struct dma_mapping) * 8; | ||
| 532 | |||
| 533 | /* Don't hold the lock while calling kmalloc (I'm not | ||
| 534 | sure whether it would be a problem, since we use | ||
| 535 | GFP_ATOMIC, but it makes me nervous). */ | ||
| 536 | spin_unlock_irqrestore (dma_mappings_lock, flags); | ||
| 537 | |||
| 538 | mblock = kmalloc (mblock_size, GFP_ATOMIC); | ||
| 539 | if (! mblock) { | ||
| 540 | free_mb_sram (mb_sram_block, size); | ||
| 541 | return 0; | ||
| 542 | } | ||
| 543 | |||
| 544 | /* Get the lock back. */ | ||
| 545 | spin_lock_irqsave (dma_mappings_lock, flags); | ||
| 546 | |||
| 547 | /* Add the new mapping structures to the free-list. */ | ||
| 548 | while (mblock_size > 0) { | ||
| 549 | struct dma_mapping *fm = mblock; | ||
| 550 | fm->next = free_dma_mappings; | ||
| 551 | free_dma_mappings = fm; | ||
| 552 | mblock += sizeof *fm; | ||
| 553 | mblock_size -= sizeof *fm; | ||
| 554 | } | ||
| 555 | } | ||
| 556 | |||
| 557 | /* Get a mapping struct from the freelist. */ | ||
| 558 | mapping = free_dma_mappings; | ||
| 559 | free_dma_mappings = mapping->next; | ||
| 560 | |||
| 561 | /* Initialize the mapping. Other fields should be filled in by | ||
| 562 | caller. */ | ||
| 563 | mapping->mb_sram_addr = mb_sram_block; | ||
| 564 | mapping->size = size; | ||
| 565 | |||
| 566 | /* Add it to the list of active mappings. */ | ||
| 567 | mapping->next = active_dma_mappings; | ||
| 568 | active_dma_mappings = mapping; | ||
| 569 | |||
| 570 | spin_unlock_irqrestore (dma_mappings_lock, flags); | ||
| 571 | |||
| 572 | return mapping; | ||
| 573 | } | ||
| 574 | |||
| 575 | static struct dma_mapping *find_dma_mapping (void *mb_sram_addr) | ||
| 576 | { | ||
| 577 | unsigned long flags; | ||
| 578 | struct dma_mapping *mapping; | ||
| 579 | |||
| 580 | spin_lock_irqsave (dma_mappings_lock, flags); | ||
| 581 | |||
| 582 | for (mapping = active_dma_mappings; mapping; mapping = mapping->next) | ||
| 583 | if (mapping->mb_sram_addr == mb_sram_addr) { | ||
| 584 | spin_unlock_irqrestore (dma_mappings_lock, flags); | ||
| 585 | return mapping; | ||
| 586 | } | ||
| 587 | |||
| 588 | panic ("find_dma_mapping: unmapped PCI DMA addr 0x%x", | ||
| 589 | MB_SRAM_TO_PCI (mb_sram_addr)); | ||
| 590 | } | ||
| 591 | |||
| 592 | static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr) | ||
| 593 | { | ||
| 594 | unsigned long flags; | ||
| 595 | struct dma_mapping *mapping, *prev; | ||
| 596 | |||
| 597 | spin_lock_irqsave (dma_mappings_lock, flags); | ||
| 598 | |||
| 599 | for (prev = 0, mapping = active_dma_mappings; | ||
| 600 | mapping; | ||
| 601 | prev = mapping, mapping = mapping->next) | ||
| 602 | { | ||
| 603 | if (mapping->mb_sram_addr == mb_sram_addr) { | ||
| 604 | /* This is the MAPPING; deactivate it. */ | ||
| 605 | if (prev) | ||
| 606 | prev->next = mapping->next; | ||
| 607 | else | ||
| 608 | active_dma_mappings = mapping->next; | ||
| 609 | |||
| 610 | spin_unlock_irqrestore (dma_mappings_lock, flags); | ||
| 611 | |||
| 612 | return mapping; | ||
| 613 | } | ||
| 614 | } | ||
| 615 | |||
| 616 | panic ("deactivate_dma_mapping: unmapped PCI DMA addr 0x%x", | ||
| 617 | MB_SRAM_TO_PCI (mb_sram_addr)); | ||
| 618 | } | ||
| 619 | |||
| 620 | /* Return MAPPING to the freelist. */ | ||
| 621 | static inline void | ||
| 622 | free_dma_mapping (struct dma_mapping *mapping) | ||
| 623 | { | ||
| 624 | unsigned long flags; | ||
| 625 | |||
| 626 | free_mb_sram (mapping->mb_sram_addr, mapping->size); | ||
| 627 | |||
| 628 | spin_lock_irqsave (dma_mappings_lock, flags); | ||
| 629 | |||
| 630 | mapping->next = free_dma_mappings; | ||
| 631 | free_dma_mappings = mapping; | ||
| 632 | |||
| 633 | spin_unlock_irqrestore (dma_mappings_lock, flags); | ||
| 634 | } | ||
| 635 | |||
| 636 | |||
| 637 | /* Single PCI DMA mappings. */ | ||
| 638 | |||
| 639 | /* `Grant' to PDEV the memory block at CPU_ADDR, for doing DMA. The | ||
| 640 | 32-bit PCI bus mastering address to use is returned. the device owns | ||
| 641 | this memory until either pci_unmap_single or pci_dma_sync_single is | ||
| 642 | performed. */ | ||
| 643 | dma_addr_t | ||
| 644 | pci_map_single (struct pci_dev *pdev, void *cpu_addr, size_t size, int dir) | ||
| 645 | { | ||
| 646 | struct dma_mapping *mapping = new_dma_mapping (size); | ||
| 647 | |||
| 648 | if (! mapping) | ||
| 649 | return 0; | ||
| 650 | |||
| 651 | mapping->cpu_addr = cpu_addr; | ||
| 652 | |||
| 653 | if (dir == PCI_DMA_BIDIRECTIONAL || dir == PCI_DMA_TODEVICE) | ||
| 654 | memcpy (mapping->mb_sram_addr, cpu_addr, size); | ||
| 655 | |||
| 656 | return MB_SRAM_TO_PCI (mapping->mb_sram_addr); | ||
| 657 | } | ||
| 658 | |||
| 659 | /* Return to the CPU the PCI DMA memory block previously `granted' to | ||
| 660 | PDEV, at DMA_ADDR. */ | ||
| 661 | void pci_unmap_single (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size, | ||
| 662 | int dir) | ||
| 663 | { | ||
| 664 | void *mb_sram_addr = PCI_TO_MB_SRAM (dma_addr); | ||
| 665 | struct dma_mapping *mapping = deactivate_dma_mapping (mb_sram_addr); | ||
| 666 | |||
| 667 | if (size != mapping->size) | ||
| 668 | panic ("pci_unmap_single: size (%d) doesn't match" | ||
| 669 | " size of mapping at PCI DMA addr 0x%x (%d)\n", | ||
| 670 | size, dma_addr, mapping->size); | ||
| 671 | |||
| 672 | /* Copy back the DMA'd contents if necessary. */ | ||
| 673 | if (dir == PCI_DMA_BIDIRECTIONAL || dir == PCI_DMA_FROMDEVICE) | ||
| 674 | memcpy (mapping->cpu_addr, mb_sram_addr, size); | ||
| 675 | |||
| 676 | /* Return mapping to the freelist. */ | ||
| 677 | free_dma_mapping (mapping); | ||
| 678 | } | ||
| 679 | |||
| 680 | /* Make physical memory consistent for a single streaming mode DMA | ||
| 681 | translation after a transfer. | ||
| 682 | |||
| 683 | If you perform a pci_map_single() but wish to interrogate the | ||
| 684 | buffer using the cpu, yet do not wish to teardown the PCI dma | ||
| 685 | mapping, you must call this function before doing so. At the next | ||
| 686 | point you give the PCI dma address back to the card, you must first | ||
| 687 | perform a pci_dma_sync_for_device, and then the device again owns | ||
| 688 | the buffer. */ | ||
| 689 | void | ||
| 690 | pci_dma_sync_single_for_cpu (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size, | ||
| 691 | int dir) | ||
| 692 | { | ||
| 693 | void *mb_sram_addr = PCI_TO_MB_SRAM (dma_addr); | ||
| 694 | struct dma_mapping *mapping = find_dma_mapping (mb_sram_addr); | ||
| 695 | |||
| 696 | /* Synchronize the DMA buffer with the CPU buffer if necessary. */ | ||
| 697 | if (dir == PCI_DMA_FROMDEVICE) | ||
| 698 | memcpy (mapping->cpu_addr, mb_sram_addr, size); | ||
| 699 | else if (dir == PCI_DMA_TODEVICE) | ||
| 700 | ; /* nothing to do */ | ||
| 701 | else | ||
| 702 | panic("pci_dma_sync_single: unsupported sync dir: %d", dir); | ||
| 703 | } | ||
| 704 | |||
| 705 | void | ||
| 706 | pci_dma_sync_single_for_device (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size, | ||
| 707 | int dir) | ||
| 708 | { | ||
| 709 | void *mb_sram_addr = PCI_TO_MB_SRAM (dma_addr); | ||
| 710 | struct dma_mapping *mapping = find_dma_mapping (mb_sram_addr); | ||
| 711 | |||
| 712 | /* Synchronize the DMA buffer with the CPU buffer if necessary. */ | ||
| 713 | if (dir == PCI_DMA_FROMDEVICE) | ||
| 714 | ; /* nothing to do */ | ||
| 715 | else if (dir == PCI_DMA_TODEVICE) | ||
| 716 | memcpy (mb_sram_addr, mapping->cpu_addr, size); | ||
| 717 | else | ||
| 718 | panic("pci_dma_sync_single: unsupported sync dir: %d", dir); | ||
| 719 | } | ||
| 720 | |||
| 721 | |||
| 722 | /* Scatter-gather PCI DMA mappings. */ | ||
| 723 | |||
| 724 | /* Do multiple DMA mappings at once. */ | ||
| 725 | int | ||
| 726 | pci_map_sg (struct pci_dev *pdev, struct scatterlist *sg, int sg_len, int dir) | ||
| 727 | { | ||
| 728 | BUG (); | ||
| 729 | return 0; | ||
| 730 | } | ||
| 731 | |||
| 732 | /* Unmap multiple DMA mappings at once. */ | ||
| 733 | void | ||
| 734 | pci_unmap_sg (struct pci_dev *pdev, struct scatterlist *sg, int sg_len,int dir) | ||
| 735 | { | ||
| 736 | BUG (); | ||
| 737 | } | ||
| 738 | |||
| 739 | /* Make physical memory consistent for a set of streaming mode DMA | ||
| 740 | translations after a transfer. The same as pci_dma_sync_single_* but | ||
| 741 | for a scatter-gather list, same rules and usage. */ | ||
| 742 | |||
| 743 | void | ||
| 744 | pci_dma_sync_sg_for_cpu (struct pci_dev *dev, | ||
| 745 | struct scatterlist *sg, int sg_len, | ||
| 746 | int dir) | ||
| 747 | { | ||
| 748 | BUG (); | ||
| 749 | } | ||
| 750 | |||
| 751 | void | ||
| 752 | pci_dma_sync_sg_for_device (struct pci_dev *dev, | ||
| 753 | struct scatterlist *sg, int sg_len, | ||
| 754 | int dir) | ||
| 755 | { | ||
| 756 | BUG (); | ||
| 757 | } | ||
| 758 | |||
| 759 | |||
| 760 | /* PCI mem mapping. */ | ||
| 761 | |||
| 762 | /* Allocate and map kernel buffer using consistent mode DMA for PCI | ||
| 763 | device. Returns non-NULL cpu-view pointer to the buffer if | ||
| 764 | successful and sets *DMA_ADDR to the pci side dma address as well, | ||
| 765 | else DMA_ADDR is undefined. */ | ||
| 766 | void * | ||
| 767 | pci_alloc_consistent (struct pci_dev *pdev, size_t size, dma_addr_t *dma_addr) | ||
| 768 | { | ||
| 769 | void *mb_sram_mem = alloc_mb_sram (size); | ||
| 770 | if (mb_sram_mem) | ||
| 771 | *dma_addr = MB_SRAM_TO_PCI (mb_sram_mem); | ||
| 772 | return mb_sram_mem; | ||
| 773 | } | ||
| 774 | |||
| 775 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must | ||
| 776 | be values that were returned from pci_alloc_consistent. SIZE must be | ||
| 777 | the same as what as passed into pci_alloc_consistent. References to | ||
| 778 | the memory and mappings associated with CPU_ADDR or DMA_ADDR past | ||
| 779 | this call are illegal. */ | ||
| 780 | void | ||
| 781 | pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, | ||
| 782 | dma_addr_t dma_addr) | ||
| 783 | { | ||
| 784 | void *mb_sram_mem = PCI_TO_MB_SRAM (dma_addr); | ||
| 785 | free_mb_sram (mb_sram_mem, size); | ||
| 786 | } | ||
| 787 | |||
| 788 | |||
| 789 | /* iomap/iomap */ | ||
| 790 | |||
| 791 | void __iomem *pci_iomap (struct pci_dev *dev, int bar, unsigned long max) | ||
| 792 | { | ||
| 793 | resource_size_t start = pci_resource_start (dev, bar); | ||
| 794 | resource_size_t len = pci_resource_len (dev, bar); | ||
| 795 | |||
| 796 | if (!start || len == 0) | ||
| 797 | return 0; | ||
| 798 | |||
| 799 | /* None of the ioremap functions actually do anything, other than | ||
| 800 | re-casting their argument, so don't bother differentiating them. */ | ||
| 801 | return ioremap (start, len); | ||
| 802 | } | ||
| 803 | |||
| 804 | void pci_iounmap (struct pci_dev *dev, void __iomem *addr) | ||
| 805 | { | ||
| 806 | /* nothing */ | ||
| 807 | } | ||
| 808 | |||
| 809 | |||
| 810 | /* symbol exports (for modules) */ | ||
| 811 | |||
| 812 | EXPORT_SYMBOL (pci_map_single); | ||
| 813 | EXPORT_SYMBOL (pci_unmap_single); | ||
| 814 | EXPORT_SYMBOL (pci_alloc_consistent); | ||
| 815 | EXPORT_SYMBOL (pci_free_consistent); | ||
| 816 | EXPORT_SYMBOL (pci_dma_sync_single_for_cpu); | ||
| 817 | EXPORT_SYMBOL (pci_dma_sync_single_for_device); | ||
| 818 | EXPORT_SYMBOL (pci_iomap); | ||
| 819 | EXPORT_SYMBOL (pci_iounmap); | ||
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c deleted file mode 100644 index 46803d48dffe..000000000000 --- a/arch/v850/kernel/rte_me2_cb.c +++ /dev/null | |||
| @@ -1,298 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/rte_me2_cb.c -- Midas labs RTE-V850E/ME2-CB board | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/bootmem.h> | ||
| 17 | #include <linux/irq.h> | ||
| 18 | #include <linux/fs.h> | ||
| 19 | #include <linux/major.h> | ||
| 20 | #include <linux/sched.h> | ||
| 21 | #include <linux/delay.h> | ||
| 22 | |||
| 23 | #include <asm/atomic.h> | ||
| 24 | #include <asm/page.h> | ||
| 25 | #include <asm/me2.h> | ||
| 26 | #include <asm/rte_me2_cb.h> | ||
| 27 | #include <asm/machdep.h> | ||
| 28 | #include <asm/v850e_intc.h> | ||
| 29 | #include <asm/v850e_cache.h> | ||
| 30 | #include <asm/irq.h> | ||
| 31 | |||
| 32 | #include "mach.h" | ||
| 33 | |||
| 34 | extern unsigned long *_intv_start; | ||
| 35 | extern unsigned long *_intv_end; | ||
| 36 | |||
| 37 | /* LED access routines. */ | ||
| 38 | extern unsigned read_leds (int pos, char *buf, int len); | ||
| 39 | extern unsigned write_leds (int pos, const char *buf, int len); | ||
| 40 | |||
| 41 | |||
| 42 | /* SDRAM are almost contiguous (with a small hole in between; | ||
| 43 | see mach_reserve_bootmem for details), so just use both as one big area. */ | ||
| 44 | #define RAM_START SDRAM_ADDR | ||
| 45 | #define RAM_END (SDRAM_ADDR + SDRAM_SIZE) | ||
| 46 | |||
| 47 | |||
| 48 | void __init mach_get_physical_ram (unsigned long *ram_start, | ||
| 49 | unsigned long *ram_len) | ||
| 50 | { | ||
| 51 | *ram_start = RAM_START; | ||
| 52 | *ram_len = RAM_END - RAM_START; | ||
| 53 | } | ||
| 54 | |||
| 55 | void mach_gettimeofday (struct timespec *tv) | ||
| 56 | { | ||
| 57 | tv->tv_sec = 0; | ||
| 58 | tv->tv_nsec = 0; | ||
| 59 | } | ||
| 60 | |||
| 61 | /* Called before configuring an on-chip UART. */ | ||
| 62 | void rte_me2_cb_uart_pre_configure (unsigned chan, | ||
| 63 | unsigned cflags, unsigned baud) | ||
| 64 | { | ||
| 65 | /* The RTE-V850E/ME2-CB connects some general-purpose I/O | ||
| 66 | pins on the CPU to the RTS/CTS lines of UARTB channel 0's | ||
| 67 | serial connection. | ||
| 68 | I/O pins P21 and P22 are RTS and CTS respectively. */ | ||
| 69 | if (chan == 0) { | ||
| 70 | /* Put P21 & P22 in I/O port mode. */ | ||
| 71 | ME2_PORT2_PMC &= ~0x6; | ||
| 72 | /* Make P21 and output, and P22 an input. */ | ||
| 73 | ME2_PORT2_PM = (ME2_PORT2_PM & ~0xC) | 0x4; | ||
| 74 | } | ||
| 75 | |||
| 76 | me2_uart_pre_configure (chan, cflags, baud); | ||
| 77 | } | ||
| 78 | |||
| 79 | void __init mach_init_irqs (void) | ||
| 80 | { | ||
| 81 | /* Initialize interrupts. */ | ||
| 82 | me2_init_irqs (); | ||
| 83 | rte_me2_cb_init_irqs (); | ||
| 84 | } | ||
| 85 | |||
| 86 | #ifdef CONFIG_ROM_KERNEL | ||
| 87 | /* Initialization for kernel in ROM. */ | ||
| 88 | static inline rom_kernel_init (void) | ||
| 89 | { | ||
| 90 | /* If the kernel is in ROM, we have to copy any initialized data | ||
| 91 | from ROM into RAM. */ | ||
| 92 | extern unsigned long _data_load_start, _sdata, _edata; | ||
| 93 | register unsigned long *src = &_data_load_start; | ||
| 94 | register unsigned long *dst = &_sdata, *end = &_edata; | ||
| 95 | |||
| 96 | while (dst != end) | ||
| 97 | *dst++ = *src++; | ||
| 98 | } | ||
| 99 | #endif /* CONFIG_ROM_KERNEL */ | ||
| 100 | |||
| 101 | static void install_interrupt_vectors (void) | ||
| 102 | { | ||
| 103 | unsigned long *p1, *p2; | ||
| 104 | |||
| 105 | ME2_IRAMM = 0x03; /* V850E/ME2 iRAM write mode */ | ||
| 106 | |||
| 107 | /* vector copy to iRAM */ | ||
| 108 | p1 = (unsigned long *)0; /* v85x vector start */ | ||
| 109 | p2 = (unsigned long *)&_intv_start; | ||
| 110 | while (p2 < (unsigned long *)&_intv_end) | ||
| 111 | *p1++ = *p2++; | ||
| 112 | |||
| 113 | ME2_IRAMM = 0x00; /* V850E/ME2 iRAM read mode */ | ||
| 114 | } | ||
| 115 | |||
| 116 | /* CompactFlash */ | ||
| 117 | |||
| 118 | static void cf_power_on (void) | ||
| 119 | { | ||
| 120 | /* CF card detected? */ | ||
| 121 | if (CB_CF_STS0 & 0x0030) | ||
| 122 | return; | ||
| 123 | |||
| 124 | CB_CF_REG0 = 0x0002; /* reest on */ | ||
| 125 | mdelay (10); | ||
| 126 | CB_CF_REG0 = 0x0003; /* power on */ | ||
| 127 | mdelay (10); | ||
| 128 | CB_CF_REG0 = 0x0001; /* reset off */ | ||
| 129 | mdelay (10); | ||
| 130 | } | ||
| 131 | |||
| 132 | static void cf_power_off (void) | ||
| 133 | { | ||
| 134 | CB_CF_REG0 = 0x0003; /* power on */ | ||
| 135 | mdelay (10); | ||
| 136 | CB_CF_REG0 = 0x0002; /* reest on */ | ||
| 137 | mdelay (10); | ||
| 138 | } | ||
| 139 | |||
| 140 | void __init mach_early_init (void) | ||
| 141 | { | ||
| 142 | install_interrupt_vectors (); | ||
| 143 | |||
| 144 | /* CS1 SDRAM instruction cache enable */ | ||
| 145 | v850e_cache_enable (0x04, 0x03, 0); | ||
| 146 | |||
| 147 | rte_cb_early_init (); | ||
| 148 | |||
| 149 | /* CompactFlash power on */ | ||
| 150 | cf_power_on (); | ||
| 151 | |||
| 152 | #if defined (CONFIG_ROM_KERNEL) | ||
| 153 | rom_kernel_init (); | ||
| 154 | #endif | ||
| 155 | } | ||
| 156 | |||
| 157 | |||
| 158 | /* RTE-V850E/ME2-CB Programmable Interrupt Controller. */ | ||
| 159 | |||
| 160 | static struct cb_pic_irq_init cb_pic_irq_inits[] = { | ||
| 161 | { "CB_EXTTM0", IRQ_CB_EXTTM0, 1, 1, 6 }, | ||
| 162 | { "CB_EXTSIO", IRQ_CB_EXTSIO, 1, 1, 6 }, | ||
| 163 | { "CB_TOVER", IRQ_CB_TOVER, 1, 1, 6 }, | ||
| 164 | { "CB_GINT0", IRQ_CB_GINT0, 1, 1, 6 }, | ||
| 165 | { "CB_USB", IRQ_CB_USB, 1, 1, 6 }, | ||
| 166 | { "CB_LANC", IRQ_CB_LANC, 1, 1, 6 }, | ||
| 167 | { "CB_USB_VBUS_ON", IRQ_CB_USB_VBUS_ON, 1, 1, 6 }, | ||
| 168 | { "CB_USB_VBUS_OFF", IRQ_CB_USB_VBUS_OFF, 1, 1, 6 }, | ||
| 169 | { "CB_EXTTM1", IRQ_CB_EXTTM1, 1, 1, 6 }, | ||
| 170 | { "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 }, | ||
| 171 | { 0 } | ||
| 172 | }; | ||
| 173 | #define NUM_CB_PIC_IRQ_INITS (ARRAY_SIZE(cb_pic_irq_inits) - 1) | ||
| 174 | |||
| 175 | static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS]; | ||
| 176 | static unsigned char cb_pic_active_irqs = 0; | ||
| 177 | |||
| 178 | void __init rte_me2_cb_init_irqs (void) | ||
| 179 | { | ||
| 180 | cb_pic_init_irq_types (cb_pic_irq_inits, cb_pic_hw_itypes); | ||
| 181 | |||
| 182 | /* Initalize on board PIC1 (not PIC0) enable */ | ||
| 183 | CB_PIC_INT0M = 0x0000; | ||
| 184 | CB_PIC_INT1M = 0x0000; | ||
| 185 | CB_PIC_INTR = 0x0000; | ||
| 186 | CB_PIC_INTEN |= CB_PIC_INT1EN; | ||
| 187 | |||
| 188 | ME2_PORT2_PMC |= 0x08; /* INTP23/SCK1 mode */ | ||
| 189 | ME2_PORT2_PFC &= ~0x08; /* INTP23 mode */ | ||
| 190 | ME2_INTR(2) &= ~0x08; /* INTP23 falling-edge detect */ | ||
| 191 | ME2_INTF(2) &= ~0x08; /* " */ | ||
| 192 | |||
| 193 | rte_cb_init_irqs (); /* gbus &c */ | ||
| 194 | } | ||
| 195 | |||
| 196 | |||
| 197 | /* Enable interrupt handling for interrupt IRQ. */ | ||
| 198 | void cb_pic_enable_irq (unsigned irq) | ||
| 199 | { | ||
| 200 | CB_PIC_INT1M |= 1 << (irq - CB_PIC_BASE_IRQ); | ||
| 201 | } | ||
| 202 | |||
| 203 | void cb_pic_disable_irq (unsigned irq) | ||
| 204 | { | ||
| 205 | CB_PIC_INT1M &= ~(1 << (irq - CB_PIC_BASE_IRQ)); | ||
| 206 | } | ||
| 207 | |||
| 208 | void cb_pic_shutdown_irq (unsigned irq) | ||
| 209 | { | ||
| 210 | cb_pic_disable_irq (irq); | ||
| 211 | |||
| 212 | if (--cb_pic_active_irqs == 0) | ||
| 213 | free_irq (IRQ_CB_PIC, 0); | ||
| 214 | |||
| 215 | CB_PIC_INT1M &= ~(1 << (irq - CB_PIC_BASE_IRQ)); | ||
| 216 | } | ||
| 217 | |||
| 218 | static irqreturn_t cb_pic_handle_irq (int irq, void *dev_id, | ||
| 219 | struct pt_regs *regs) | ||
| 220 | { | ||
| 221 | irqreturn_t rval = IRQ_NONE; | ||
| 222 | unsigned status = CB_PIC_INTR; | ||
| 223 | unsigned enable = CB_PIC_INT1M; | ||
| 224 | |||
| 225 | /* Only pay attention to enabled interrupts. */ | ||
| 226 | status &= enable; | ||
| 227 | |||
| 228 | CB_PIC_INTEN &= ~CB_PIC_INT1EN; | ||
| 229 | |||
| 230 | if (status) { | ||
| 231 | unsigned mask = 1; | ||
| 232 | |||
| 233 | irq = CB_PIC_BASE_IRQ; | ||
| 234 | do { | ||
| 235 | /* There's an active interrupt, find out which one, | ||
| 236 | and call its handler. */ | ||
| 237 | while (! (status & mask)) { | ||
| 238 | irq++; | ||
| 239 | mask <<= 1; | ||
| 240 | } | ||
| 241 | status &= ~mask; | ||
| 242 | |||
| 243 | CB_PIC_INTR = mask; | ||
| 244 | |||
| 245 | /* Recursively call handle_irq to handle it. */ | ||
| 246 | handle_irq (irq, regs); | ||
| 247 | rval = IRQ_HANDLED; | ||
| 248 | } while (status); | ||
| 249 | } | ||
| 250 | |||
| 251 | CB_PIC_INTEN |= CB_PIC_INT1EN; | ||
| 252 | |||
| 253 | return rval; | ||
| 254 | } | ||
| 255 | |||
| 256 | |||
| 257 | static void irq_nop (unsigned irq) { } | ||
| 258 | |||
| 259 | static unsigned cb_pic_startup_irq (unsigned irq) | ||
| 260 | { | ||
| 261 | int rval; | ||
| 262 | |||
| 263 | if (cb_pic_active_irqs == 0) { | ||
| 264 | rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq, | ||
| 265 | IRQF_DISABLED, "cb_pic_handler", 0); | ||
| 266 | if (rval != 0) | ||
| 267 | return rval; | ||
| 268 | } | ||
| 269 | |||
| 270 | cb_pic_active_irqs++; | ||
| 271 | |||
| 272 | cb_pic_enable_irq (irq); | ||
| 273 | |||
| 274 | return 0; | ||
| 275 | } | ||
| 276 | |||
| 277 | /* Initialize HW_IRQ_TYPES for INTC-controlled irqs described in array | ||
| 278 | INITS (which is terminated by an entry with the name field == 0). */ | ||
| 279 | void __init cb_pic_init_irq_types (struct cb_pic_irq_init *inits, | ||
| 280 | struct hw_interrupt_type *hw_irq_types) | ||
| 281 | { | ||
| 282 | struct cb_pic_irq_init *init; | ||
| 283 | for (init = inits; init->name; init++) { | ||
| 284 | struct hw_interrupt_type *hwit = hw_irq_types++; | ||
| 285 | |||
| 286 | hwit->typename = init->name; | ||
| 287 | |||
| 288 | hwit->startup = cb_pic_startup_irq; | ||
| 289 | hwit->shutdown = cb_pic_shutdown_irq; | ||
| 290 | hwit->enable = cb_pic_enable_irq; | ||
| 291 | hwit->disable = cb_pic_disable_irq; | ||
| 292 | hwit->ack = irq_nop; | ||
| 293 | hwit->end = irq_nop; | ||
| 294 | |||
| 295 | /* Initialize kernel IRQ infrastructure for this interrupt. */ | ||
| 296 | init_irq_handlers(init->base, init->num, init->interval, hwit); | ||
| 297 | } | ||
| 298 | } | ||
diff --git a/arch/v850/kernel/rte_me2_cb.ld b/arch/v850/kernel/rte_me2_cb.ld deleted file mode 100644 index cf0766065ec6..000000000000 --- a/arch/v850/kernel/rte_me2_cb.ld +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs RTE-V850E/ME2-CB evaluation board | ||
| 2 | (CONFIG_RTE_CB_ME2), with kernel in SDRAM. */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 128Kbyte of IRAM */ | ||
| 6 | IRAM : ORIGIN = 0x00000000, LENGTH = 0x00020000 | ||
| 7 | |||
| 8 | /* 32MB of SDRAM. */ | ||
| 9 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 10 | } | ||
| 11 | |||
| 12 | #define KRAM SDRAM | ||
| 13 | |||
| 14 | SECTIONS { | ||
| 15 | .text : { | ||
| 16 | __kram_start = . ; | ||
| 17 | TEXT_CONTENTS | ||
| 18 | INTV_CONTENTS /* copy to iRAM (0x0-0x620) */ | ||
| 19 | } > KRAM | ||
| 20 | |||
| 21 | .data : { | ||
| 22 | DATA_CONTENTS | ||
| 23 | BSS_CONTENTS | ||
| 24 | RAMK_INIT_CONTENTS | ||
| 25 | __kram_end = . ; | ||
| 26 | BOOTMAP_CONTENTS | ||
| 27 | } > KRAM | ||
| 28 | |||
| 29 | .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM | ||
| 30 | } | ||
diff --git a/arch/v850/kernel/rte_nb85e_cb-multi.ld b/arch/v850/kernel/rte_nb85e_cb-multi.ld deleted file mode 100644 index de347b4fffac..000000000000 --- a/arch/v850/kernel/rte_nb85e_cb-multi.ld +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs RTE-NB85E-CB evaluation board | ||
| 2 | (CONFIG_RTE_CB_NB85E), with the Multi debugger ROM monitor . */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 1MB of SRAM; we can't use the last 96KB, because it's used by | ||
| 6 | the monitor scratch-RAM. This memory is mirrored 4 times. */ | ||
| 7 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = (SRAM_SIZE - MON_SCRATCH_SIZE) | ||
| 8 | /* Monitor scratch RAM; only the interrupt vectors should go here. */ | ||
| 9 | MRAM : ORIGIN = MON_SCRATCH_ADDR, LENGTH = MON_SCRATCH_SIZE | ||
| 10 | /* 16MB of SDRAM. */ | ||
| 11 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 12 | } | ||
| 13 | |||
| 14 | #ifdef CONFIG_RTE_CB_NB85E_KSRAM | ||
| 15 | # define KRAM SRAM | ||
| 16 | #else | ||
| 17 | # define KRAM SDRAM | ||
| 18 | #endif | ||
| 19 | |||
| 20 | SECTIONS { | ||
| 21 | /* We can't use RAMK_KRAM_CONTENTS because that puts the whole | ||
| 22 | kernel in a single ELF segment, and the Multi debugger (which | ||
| 23 | we use to load the kernel) appears to have bizarre problems | ||
| 24 | dealing with it. */ | ||
| 25 | |||
| 26 | .text : { | ||
| 27 | __kram_start = . ; | ||
| 28 | TEXT_CONTENTS | ||
| 29 | } > KRAM | ||
| 30 | |||
| 31 | .data : { | ||
| 32 | DATA_CONTENTS | ||
| 33 | BSS_CONTENTS | ||
| 34 | RAMK_INIT_CONTENTS | ||
| 35 | __kram_end = . ; | ||
| 36 | BOOTMAP_CONTENTS | ||
| 37 | |||
| 38 | /* The address at which the interrupt vectors are initially | ||
| 39 | loaded by the loader. We can't load the interrupt vectors | ||
| 40 | directly into their target location, because the monitor | ||
| 41 | ROM for the GHS Multi debugger barfs if we try. | ||
| 42 | Unfortunately, Multi also doesn't deal correctly with ELF | ||
| 43 | sections where the LMA and VMA differ (it just ignores the | ||
| 44 | LMA), so we can't use that feature to work around the | ||
| 45 | problem! What we do instead is just put the interrupt | ||
| 46 | vectors into a normal section, and have the | ||
| 47 | `mach_early_init' function for Midas boards do the | ||
| 48 | necessary copying and relocation at runtime (this section | ||
| 49 | basically only contains `jr' instructions, so it's not | ||
| 50 | that hard). */ | ||
| 51 | . = ALIGN (0x10) ; | ||
| 52 | __intv_load_start = . ; | ||
| 53 | INTV_CONTENTS | ||
| 54 | } > KRAM | ||
| 55 | |||
| 56 | .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM | ||
| 57 | } | ||
diff --git a/arch/v850/kernel/rte_nb85e_cb.c b/arch/v850/kernel/rte_nb85e_cb.c deleted file mode 100644 index b4a045da5d70..000000000000 --- a/arch/v850/kernel/rte_nb85e_cb.c +++ /dev/null | |||
| @@ -1,81 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/rte_nb85e_cb.c -- Midas labs RTE-V850E/NB85E-CB board | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/mm.h> | ||
| 17 | #include <linux/swap.h> | ||
| 18 | #include <linux/bootmem.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | |||
| 21 | #include <asm/atomic.h> | ||
| 22 | #include <asm/page.h> | ||
| 23 | #include <asm/v850e.h> | ||
| 24 | #include <asm/rte_nb85e_cb.h> | ||
| 25 | |||
| 26 | #include "mach.h" | ||
| 27 | |||
| 28 | void __init mach_early_init (void) | ||
| 29 | { | ||
| 30 | /* Configure caching; some possible settings: | ||
| 31 | |||
| 32 | BHC = 0x0000, DCC = 0x0000 -- all caching disabled | ||
| 33 | BHC = 0x0040, DCC = 0x0000 -- SDRAM: icache only | ||
| 34 | BHC = 0x0080, DCC = 0x0C00 -- SDRAM: write-back dcache only | ||
| 35 | BHC = 0x00C0, DCC = 0x0C00 -- SDRAM: icache + write-back dcache | ||
| 36 | BHC = 0x00C0, DCC = 0x0800 -- SDRAM: icache + write-thru dcache | ||
| 37 | |||
| 38 | We can only cache SDRAM (we can't use cache SRAM because it's in | ||
| 39 | the same memory region as the on-chip RAM and I/O space). | ||
| 40 | |||
| 41 | Unfortunately, the dcache seems to be buggy, so we only use the | ||
| 42 | icache for now. */ | ||
| 43 | v850e_cache_enable (0x0040 /*BHC*/, 0x0003 /*ICC*/, 0x0000 /*DCC*/); | ||
| 44 | |||
| 45 | rte_cb_early_init (); | ||
| 46 | } | ||
| 47 | |||
| 48 | void __init mach_get_physical_ram (unsigned long *ram_start, | ||
| 49 | unsigned long *ram_len) | ||
| 50 | { | ||
| 51 | /* We just use SDRAM here. */ | ||
| 52 | *ram_start = SDRAM_ADDR; | ||
| 53 | *ram_len = SDRAM_SIZE; | ||
| 54 | } | ||
| 55 | |||
| 56 | void mach_gettimeofday (struct timespec *tv) | ||
| 57 | { | ||
| 58 | tv->tv_sec = 0; | ||
| 59 | tv->tv_nsec = 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | /* Called before configuring an on-chip UART. */ | ||
| 63 | void rte_nb85e_cb_uart_pre_configure (unsigned chan, | ||
| 64 | unsigned cflags, unsigned baud) | ||
| 65 | { | ||
| 66 | /* The RTE-NB85E-CB connects some general-purpose I/O pins on the | ||
| 67 | CPU to the RTS/CTS lines the UART's serial connection, as follows: | ||
| 68 | P00 = CTS (in), P01 = DSR (in), P02 = RTS (out), P03 = DTR (out). */ | ||
| 69 | |||
| 70 | TEG_PORT0_PM = 0x03; /* P00 and P01 inputs, P02 and P03 outputs */ | ||
| 71 | TEG_PORT0_IO = 0x03; /* Accept input */ | ||
| 72 | |||
| 73 | /* Do pre-configuration for the actual UART. */ | ||
| 74 | teg_uart_pre_configure (chan, cflags, baud); | ||
| 75 | } | ||
| 76 | |||
| 77 | void __init mach_init_irqs (void) | ||
| 78 | { | ||
| 79 | teg_init_irqs (); | ||
| 80 | rte_cb_init_irqs (); | ||
| 81 | } | ||
diff --git a/arch/v850/kernel/rte_nb85e_cb.ld b/arch/v850/kernel/rte_nb85e_cb.ld deleted file mode 100644 index b672f484f085..000000000000 --- a/arch/v850/kernel/rte_nb85e_cb.ld +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | /* Linker script for the Midas labs RTE-NB85E-CB evaluation board | ||
| 2 | (CONFIG_RTE_CB_NB85E). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | LOW : ORIGIN = 0x0, LENGTH = 0x00100000 | ||
| 6 | /* 1MB of SRAM This memory is mirrored 4 times. */ | ||
| 7 | SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE | ||
| 8 | /* 16MB of SDRAM. */ | ||
| 9 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 10 | } | ||
| 11 | |||
| 12 | #ifdef CONFIG_RTE_CB_NB85E_KSRAM | ||
| 13 | # define KRAM SRAM | ||
| 14 | #else | ||
| 15 | # define KRAM SDRAM | ||
| 16 | #endif | ||
| 17 | |||
| 18 | SECTIONS { | ||
| 19 | .intv : { INTV_CONTENTS } > LOW | ||
| 20 | .sram : { RAMK_KRAM_CONTENTS } > KRAM | ||
| 21 | .root : { ROOT_FS_CONTENTS } > SDRAM | ||
| 22 | } | ||
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c deleted file mode 100644 index a0a8456a8430..000000000000 --- a/arch/v850/kernel/setup.c +++ /dev/null | |||
| @@ -1,330 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/setup.c -- Arch-dependent initialization functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03,05,06 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03,05,06 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/mm.h> | ||
| 15 | #include <linux/bootmem.h> | ||
| 16 | #include <linux/swap.h> /* we don't have swap, but for nr_free_pages */ | ||
| 17 | #include <linux/irq.h> | ||
| 18 | #include <linux/reboot.h> | ||
| 19 | #include <linux/personality.h> | ||
| 20 | #include <linux/major.h> | ||
| 21 | #include <linux/root_dev.h> | ||
| 22 | #include <linux/mtd/mtd.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | |||
| 25 | #include <asm/irq.h> | ||
| 26 | #include <asm/setup.h> | ||
| 27 | |||
| 28 | #include "mach.h" | ||
| 29 | |||
| 30 | /* These symbols are all defined in the linker map to delineate various | ||
| 31 | statically allocated regions of memory. */ | ||
| 32 | |||
| 33 | extern char _intv_start, _intv_end; | ||
| 34 | /* `kram' is only used if the kernel uses part of normal user RAM. */ | ||
| 35 | extern char _kram_start __attribute__ ((__weak__)); | ||
| 36 | extern char _kram_end __attribute__ ((__weak__)); | ||
| 37 | extern char _init_start, _init_end; | ||
| 38 | extern char _bootmap; | ||
| 39 | extern char _stext, _etext, _sdata, _edata, _sbss, _ebss; | ||
| 40 | /* Many platforms use an embedded root image. */ | ||
| 41 | extern char _root_fs_image_start __attribute__ ((__weak__)); | ||
| 42 | extern char _root_fs_image_end __attribute__ ((__weak__)); | ||
| 43 | |||
| 44 | |||
| 45 | char __initdata command_line[COMMAND_LINE_SIZE]; | ||
| 46 | |||
| 47 | /* Memory not used by the kernel. */ | ||
| 48 | static unsigned long total_ram_pages; | ||
| 49 | |||
| 50 | /* System RAM. */ | ||
| 51 | static unsigned long ram_start = 0, ram_len = 0; | ||
| 52 | |||
| 53 | |||
| 54 | #define ADDR_TO_PAGE_UP(x) ((((unsigned long)x) + PAGE_SIZE-1) >> PAGE_SHIFT) | ||
| 55 | #define ADDR_TO_PAGE(x) (((unsigned long)x) >> PAGE_SHIFT) | ||
| 56 | #define PAGE_TO_ADDR(x) (((unsigned long)x) << PAGE_SHIFT) | ||
| 57 | |||
| 58 | static void init_mem_alloc (unsigned long ram_start, unsigned long ram_len); | ||
| 59 | |||
| 60 | void set_mem_root (void *addr, size_t len, char *cmd_line); | ||
| 61 | |||
| 62 | |||
| 63 | void __init setup_arch (char **cmdline) | ||
| 64 | { | ||
| 65 | /* Keep a copy of command line */ | ||
| 66 | *cmdline = command_line; | ||
| 67 | memcpy (boot_command_line, command_line, COMMAND_LINE_SIZE); | ||
| 68 | boot_command_line[COMMAND_LINE_SIZE - 1] = '\0'; | ||
| 69 | |||
| 70 | console_verbose (); | ||
| 71 | |||
| 72 | init_mm.start_code = (unsigned long) &_stext; | ||
| 73 | init_mm.end_code = (unsigned long) &_etext; | ||
| 74 | init_mm.end_data = (unsigned long) &_edata; | ||
| 75 | init_mm.brk = (unsigned long) &_kram_end; | ||
| 76 | |||
| 77 | /* Find out what mem this machine has. */ | ||
| 78 | mach_get_physical_ram (&ram_start, &ram_len); | ||
| 79 | /* ... and tell the kernel about it. */ | ||
| 80 | init_mem_alloc (ram_start, ram_len); | ||
| 81 | |||
| 82 | printk (KERN_INFO "CPU: %s\nPlatform: %s\n", | ||
| 83 | CPU_MODEL_LONG, PLATFORM_LONG); | ||
| 84 | |||
| 85 | /* do machine-specific setups. */ | ||
| 86 | mach_setup (cmdline); | ||
| 87 | |||
| 88 | #ifdef CONFIG_MTD | ||
| 89 | if (!ROOT_DEV && &_root_fs_image_end > &_root_fs_image_start) | ||
| 90 | set_mem_root (&_root_fs_image_start, | ||
| 91 | &_root_fs_image_end - &_root_fs_image_start, | ||
| 92 | *cmdline); | ||
| 93 | #endif | ||
| 94 | } | ||
| 95 | |||
| 96 | void __init trap_init (void) | ||
| 97 | { | ||
| 98 | } | ||
| 99 | |||
| 100 | #ifdef CONFIG_MTD | ||
| 101 | |||
| 102 | /* From drivers/mtd/devices/slram.c */ | ||
| 103 | #define SLRAM_BLK_SZ 0x4000 | ||
| 104 | |||
| 105 | /* Set the root filesystem to be the given memory region. | ||
| 106 | Some parameter may be appended to CMD_LINE. */ | ||
| 107 | void set_mem_root (void *addr, size_t len, char *cmd_line) | ||
| 108 | { | ||
| 109 | /* Some sort of idiocy in MTD means we must supply a length that's | ||
| 110 | a multiple of SLRAM_BLK_SZ. We just round up the real length, | ||
| 111 | as the file system shouldn't attempt to access anything beyond | ||
| 112 | the end of the image anyway. */ | ||
| 113 | len = (((len - 1) + SLRAM_BLK_SZ) / SLRAM_BLK_SZ) * SLRAM_BLK_SZ; | ||
| 114 | |||
| 115 | /* The only way to pass info to the MTD slram driver is via | ||
| 116 | the command line. */ | ||
| 117 | if (*cmd_line) { | ||
| 118 | cmd_line += strlen (cmd_line); | ||
| 119 | *cmd_line++ = ' '; | ||
| 120 | } | ||
| 121 | sprintf (cmd_line, "slram=root,0x%x,+0x%x", (u32)addr, (u32)len); | ||
| 122 | |||
| 123 | ROOT_DEV = MKDEV (MTD_BLOCK_MAJOR, 0); | ||
| 124 | } | ||
| 125 | #endif | ||
| 126 | |||
| 127 | |||
| 128 | static void irq_nop (unsigned irq) { } | ||
| 129 | static unsigned irq_zero (unsigned irq) { return 0; } | ||
| 130 | |||
| 131 | static void nmi_end (unsigned irq) | ||
| 132 | { | ||
| 133 | if (irq != IRQ_NMI (0)) { | ||
| 134 | printk (KERN_CRIT "NMI %d is unrecoverable; restarting...", | ||
| 135 | irq - IRQ_NMI (0)); | ||
| 136 | machine_restart (0); | ||
| 137 | } | ||
| 138 | } | ||
| 139 | |||
| 140 | static struct hw_interrupt_type nmi_irq_type = { | ||
| 141 | .typename = "NMI", | ||
| 142 | .startup = irq_zero, /* startup */ | ||
| 143 | .shutdown = irq_nop, /* shutdown */ | ||
| 144 | .enable = irq_nop, /* enable */ | ||
| 145 | .disable = irq_nop, /* disable */ | ||
| 146 | .ack = irq_nop, /* ack */ | ||
| 147 | .end = nmi_end, /* end */ | ||
| 148 | }; | ||
| 149 | |||
| 150 | void __init init_IRQ (void) | ||
| 151 | { | ||
| 152 | init_irq_handlers (0, NUM_MACH_IRQS, 1, 0); | ||
| 153 | init_irq_handlers (IRQ_NMI (0), NUM_NMIS, 1, &nmi_irq_type); | ||
| 154 | mach_init_irqs (); | ||
| 155 | } | ||
| 156 | |||
| 157 | |||
| 158 | void __init mem_init (void) | ||
| 159 | { | ||
| 160 | max_mapnr = MAP_NR (ram_start + ram_len); | ||
| 161 | |||
| 162 | num_physpages = ADDR_TO_PAGE (ram_len); | ||
| 163 | |||
| 164 | total_ram_pages = free_all_bootmem (); | ||
| 165 | |||
| 166 | printk (KERN_INFO | ||
| 167 | "Memory: %luK/%luK available" | ||
| 168 | " (%luK kernel code, %luK data)\n", | ||
| 169 | PAGE_TO_ADDR (nr_free_pages()) / 1024, | ||
| 170 | ram_len / 1024, | ||
| 171 | ((unsigned long)&_etext - (unsigned long)&_stext) / 1024, | ||
| 172 | ((unsigned long)&_ebss - (unsigned long)&_sdata) / 1024); | ||
| 173 | } | ||
| 174 | |||
| 175 | void free_initmem (void) | ||
| 176 | { | ||
| 177 | unsigned long ram_end = ram_start + ram_len; | ||
| 178 | unsigned long start = PAGE_ALIGN ((unsigned long)(&_init_start)); | ||
| 179 | |||
| 180 | if (start >= ram_start && start < ram_end) { | ||
| 181 | unsigned long addr; | ||
| 182 | unsigned long end = PAGE_ALIGN ((unsigned long)(&_init_end)); | ||
| 183 | |||
| 184 | if (end > ram_end) | ||
| 185 | end = ram_end; | ||
| 186 | |||
| 187 | printk("Freeing unused kernel memory: %ldK freed\n", | ||
| 188 | (end - start) / 1024); | ||
| 189 | |||
| 190 | for (addr = start; addr < end; addr += PAGE_SIZE) { | ||
| 191 | struct page *page = virt_to_page (addr); | ||
| 192 | ClearPageReserved (page); | ||
| 193 | init_page_count (page); | ||
| 194 | __free_page (page); | ||
| 195 | total_ram_pages++; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | } | ||
| 199 | |||
| 200 | |||
| 201 | /* Initialize the `bootmem allocator'. RAM_START and RAM_LEN identify | ||
| 202 | what RAM may be used. */ | ||
| 203 | static void __init | ||
| 204 | init_bootmem_alloc (unsigned long ram_start, unsigned long ram_len) | ||
| 205 | { | ||
| 206 | /* The part of the kernel that's in the same managed RAM space | ||
| 207 | used for general allocation. */ | ||
| 208 | unsigned long kram_start = (unsigned long)&_kram_start; | ||
| 209 | unsigned long kram_end = (unsigned long)&_kram_end; | ||
| 210 | /* End of the managed RAM space. */ | ||
| 211 | unsigned long ram_end = ram_start + ram_len; | ||
| 212 | /* Address range of the interrupt vector table. */ | ||
| 213 | unsigned long intv_start = (unsigned long)&_intv_start; | ||
| 214 | unsigned long intv_end = (unsigned long)&_intv_end; | ||
| 215 | /* True if the interrupt vectors are in the managed RAM area. */ | ||
| 216 | int intv_in_ram = (intv_end > ram_start && intv_start < ram_end); | ||
| 217 | /* True if the interrupt vectors are inside the kernel's RAM. */ | ||
| 218 | int intv_in_kram = (intv_end > kram_start && intv_start < kram_end); | ||
| 219 | /* A pointer to an optional function that reserves platform-specific | ||
| 220 | memory regions. We declare the pointer `volatile' to avoid gcc | ||
| 221 | turning the call into a static call (the problem is that since | ||
| 222 | it's a weak symbol, a static call may end up trying to reference | ||
| 223 | the location 0x0, which is not always reachable). */ | ||
| 224 | void (*volatile mrb) (void) = mach_reserve_bootmem; | ||
| 225 | /* The bootmem allocator's allocation bitmap. */ | ||
| 226 | unsigned long bootmap = (unsigned long)&_bootmap; | ||
| 227 | unsigned long bootmap_len; | ||
| 228 | |||
| 229 | /* Round bootmap location up to next page. */ | ||
| 230 | bootmap = PAGE_TO_ADDR (ADDR_TO_PAGE_UP (bootmap)); | ||
| 231 | |||
| 232 | /* Initialize bootmem allocator. */ | ||
| 233 | bootmap_len = init_bootmem_node (NODE_DATA (0), | ||
| 234 | ADDR_TO_PAGE (bootmap), | ||
| 235 | ADDR_TO_PAGE (PAGE_OFFSET), | ||
| 236 | ADDR_TO_PAGE (ram_end)); | ||
| 237 | |||
| 238 | /* Now make the RAM actually allocatable (it starts out `reserved'). */ | ||
| 239 | free_bootmem (ram_start, ram_len); | ||
| 240 | |||
| 241 | if (kram_end > kram_start) | ||
| 242 | /* Reserve the RAM part of the kernel's address space, so it | ||
| 243 | doesn't get allocated. */ | ||
| 244 | reserve_bootmem(kram_start, kram_end - kram_start, | ||
| 245 | BOOTMEM_DEFAULT); | ||
| 246 | |||
| 247 | if (intv_in_ram && !intv_in_kram) | ||
| 248 | /* Reserve the interrupt vector space. */ | ||
| 249 | reserve_bootmem(intv_start, intv_end - intv_start, | ||
| 250 | BOOTMEM_DEFAULT); | ||
| 251 | |||
| 252 | if (bootmap >= ram_start && bootmap < ram_end) | ||
| 253 | /* Reserve the bootmap space. */ | ||
| 254 | reserve_bootmem(bootmap, bootmap_len, | ||
| 255 | BOOTMEM_DEFAULT); | ||
| 256 | |||
| 257 | /* Reserve the memory used by the root filesystem image if it's | ||
| 258 | in RAM. */ | ||
| 259 | if (&_root_fs_image_end > &_root_fs_image_start | ||
| 260 | && (unsigned long)&_root_fs_image_start >= ram_start | ||
| 261 | && (unsigned long)&_root_fs_image_start < ram_end) | ||
| 262 | reserve_bootmem ((unsigned long)&_root_fs_image_start, | ||
| 263 | &_root_fs_image_end - &_root_fs_image_start, | ||
| 264 | BOOTMEM_DEFAULT); | ||
| 265 | |||
| 266 | /* Let the platform-dependent code reserve some too. */ | ||
| 267 | if (mrb) | ||
| 268 | (*mrb) (); | ||
| 269 | } | ||
| 270 | |||
| 271 | /* Tell the kernel about what RAM it may use for memory allocation. */ | ||
| 272 | static void __init | ||
| 273 | init_mem_alloc (unsigned long ram_start, unsigned long ram_len) | ||
| 274 | { | ||
| 275 | unsigned i; | ||
| 276 | unsigned long zones_size[MAX_NR_ZONES]; | ||
| 277 | |||
| 278 | init_bootmem_alloc (ram_start, ram_len); | ||
| 279 | |||
| 280 | for (i = 0; i < MAX_NR_ZONES; i++) | ||
| 281 | zones_size[i] = 0; | ||
| 282 | |||
| 283 | /* We stuff all the memory into one area, which includes the | ||
| 284 | initial gap from PAGE_OFFSET to ram_start. */ | ||
| 285 | zones_size[ZONE_DMA] | ||
| 286 | = ADDR_TO_PAGE (ram_len + (ram_start - PAGE_OFFSET)); | ||
| 287 | |||
| 288 | /* The allocator is very picky about the address of the first | ||
| 289 | allocatable page -- it must be at least as aligned as the | ||
| 290 | maximum allocation -- so try to detect cases where it will get | ||
| 291 | confused and signal them at compile time (this is a common | ||
| 292 | problem when porting to a new platform with ). There is a | ||
| 293 | similar runtime check in free_area_init_core. */ | ||
| 294 | #if ((PAGE_OFFSET >> PAGE_SHIFT) & ((1UL << (MAX_ORDER - 1)) - 1)) | ||
| 295 | #error MAX_ORDER is too large for given PAGE_OFFSET (use CONFIG_FORCE_MAX_ZONEORDER to change it) | ||
| 296 | #endif | ||
| 297 | NODE_DATA(0)->node_mem_map = NULL; | ||
| 298 | free_area_init_node (0, NODE_DATA(0), zones_size, | ||
| 299 | ADDR_TO_PAGE (PAGE_OFFSET), 0); | ||
| 300 | } | ||
| 301 | |||
| 302 | |||
| 303 | |||
| 304 | /* Taken from m68knommu */ | ||
| 305 | void show_mem(void) | ||
| 306 | { | ||
| 307 | unsigned long i; | ||
| 308 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
| 309 | int cached = 0; | ||
| 310 | |||
| 311 | printk(KERN_INFO "\nMem-info:\n"); | ||
| 312 | show_free_areas(); | ||
| 313 | i = max_mapnr; | ||
| 314 | while (i-- > 0) { | ||
| 315 | total++; | ||
| 316 | if (PageReserved(mem_map+i)) | ||
| 317 | reserved++; | ||
| 318 | else if (PageSwapCache(mem_map+i)) | ||
| 319 | cached++; | ||
| 320 | else if (!page_count(mem_map+i)) | ||
| 321 | free++; | ||
| 322 | else | ||
| 323 | shared += page_count(mem_map+i) - 1; | ||
| 324 | } | ||
| 325 | printk(KERN_INFO "%d pages of RAM\n",total); | ||
| 326 | printk(KERN_INFO "%d free pages\n",free); | ||
| 327 | printk(KERN_INFO "%d reserved pages\n",reserved); | ||
| 328 | printk(KERN_INFO "%d pages shared\n",shared); | ||
| 329 | printk(KERN_INFO "%d pages swap cached\n",cached); | ||
| 330 | } | ||
diff --git a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c deleted file mode 100644 index bf166e7e762c..000000000000 --- a/arch/v850/kernel/signal.c +++ /dev/null | |||
| @@ -1,523 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/signal.c -- Signal handling | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * Copyright (C) 1999,2000,2002 Niibe Yutaka & Kaz Kojima | ||
| 7 | * Copyright (C) 1991,1992 Linus Torvalds | ||
| 8 | * | ||
| 9 | * This file is subject to the terms and conditions of the GNU General | ||
| 10 | * Public License. See the file COPYING in the main directory of this | ||
| 11 | * archive for more details. | ||
| 12 | * | ||
| 13 | * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson | ||
| 14 | * | ||
| 15 | * This file was derived from the sh version, arch/sh/kernel/signal.c | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/mm.h> | ||
| 19 | #include <linux/smp.h> | ||
| 20 | #include <linux/kernel.h> | ||
| 21 | #include <linux/signal.h> | ||
| 22 | #include <linux/errno.h> | ||
| 23 | #include <linux/wait.h> | ||
| 24 | #include <linux/ptrace.h> | ||
| 25 | #include <linux/unistd.h> | ||
| 26 | #include <linux/stddef.h> | ||
| 27 | #include <linux/personality.h> | ||
| 28 | #include <linux/tty.h> | ||
| 29 | |||
| 30 | #include <asm/ucontext.h> | ||
| 31 | #include <asm/uaccess.h> | ||
| 32 | #include <asm/pgtable.h> | ||
| 33 | #include <asm/pgalloc.h> | ||
| 34 | #include <asm/thread_info.h> | ||
| 35 | #include <asm/cacheflush.h> | ||
| 36 | |||
| 37 | #define DEBUG_SIG 0 | ||
| 38 | |||
| 39 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | ||
| 40 | |||
| 41 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Atomically swap in the new signal mask, and wait for a signal. | ||
| 45 | */ | ||
| 46 | asmlinkage int | ||
| 47 | sys_sigsuspend(old_sigset_t mask, struct pt_regs *regs) | ||
| 48 | { | ||
| 49 | sigset_t saveset; | ||
| 50 | |||
| 51 | mask &= _BLOCKABLE; | ||
| 52 | spin_lock_irq(¤t->sighand->siglock); | ||
| 53 | saveset = current->blocked; | ||
| 54 | siginitset(¤t->blocked, mask); | ||
| 55 | recalc_sigpending(); | ||
| 56 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 57 | |||
| 58 | regs->gpr[GPR_RVAL] = -EINTR; | ||
| 59 | while (1) { | ||
| 60 | current->state = TASK_INTERRUPTIBLE; | ||
| 61 | schedule(); | ||
| 62 | if (do_signal(regs, &saveset)) | ||
| 63 | return -EINTR; | ||
| 64 | } | ||
| 65 | } | ||
| 66 | |||
| 67 | asmlinkage int | ||
| 68 | sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, | ||
| 69 | struct pt_regs *regs) | ||
| 70 | { | ||
| 71 | sigset_t saveset, newset; | ||
| 72 | |||
| 73 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
| 74 | if (sigsetsize != sizeof(sigset_t)) | ||
| 75 | return -EINVAL; | ||
| 76 | |||
| 77 | if (copy_from_user(&newset, unewset, sizeof(newset))) | ||
| 78 | return -EFAULT; | ||
| 79 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
| 80 | spin_lock_irq(¤t->sighand->siglock); | ||
| 81 | saveset = current->blocked; | ||
| 82 | current->blocked = newset; | ||
| 83 | recalc_sigpending(); | ||
| 84 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 85 | |||
| 86 | regs->gpr[GPR_RVAL] = -EINTR; | ||
| 87 | while (1) { | ||
| 88 | current->state = TASK_INTERRUPTIBLE; | ||
| 89 | schedule(); | ||
| 90 | if (do_signal(regs, &saveset)) | ||
| 91 | return -EINTR; | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | asmlinkage int | ||
| 96 | sys_sigaction(int sig, const struct old_sigaction *act, | ||
| 97 | struct old_sigaction *oact) | ||
| 98 | { | ||
| 99 | struct k_sigaction new_ka, old_ka; | ||
| 100 | int ret; | ||
| 101 | |||
| 102 | if (act) { | ||
| 103 | old_sigset_t mask; | ||
| 104 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | ||
| 105 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | ||
| 106 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) | ||
| 107 | return -EFAULT; | ||
| 108 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
| 109 | __get_user(mask, &act->sa_mask); | ||
| 110 | siginitset(&new_ka.sa.sa_mask, mask); | ||
| 111 | } | ||
| 112 | |||
| 113 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | ||
| 114 | |||
| 115 | if (!ret && oact) { | ||
| 116 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | ||
| 117 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | ||
| 118 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) | ||
| 119 | return -EFAULT; | ||
| 120 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
| 121 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
| 122 | } | ||
| 123 | |||
| 124 | return ret; | ||
| 125 | } | ||
| 126 | |||
| 127 | asmlinkage int | ||
| 128 | sys_sigaltstack(const stack_t *uss, stack_t *uoss, | ||
| 129 | struct pt_regs *regs) | ||
| 130 | { | ||
| 131 | return do_sigaltstack(uss, uoss, regs->gpr[GPR_SP]); | ||
| 132 | } | ||
| 133 | |||
| 134 | |||
| 135 | /* | ||
| 136 | * Do a signal return; undo the signal stack. | ||
| 137 | */ | ||
| 138 | |||
| 139 | struct sigframe | ||
| 140 | { | ||
| 141 | struct sigcontext sc; | ||
| 142 | unsigned long extramask[_NSIG_WORDS-1]; | ||
| 143 | unsigned long tramp[2]; /* signal trampoline */ | ||
| 144 | }; | ||
| 145 | |||
| 146 | struct rt_sigframe | ||
| 147 | { | ||
| 148 | struct siginfo info; | ||
| 149 | struct ucontext uc; | ||
| 150 | unsigned long tramp[2]; /* signal trampoline */ | ||
| 151 | }; | ||
| 152 | |||
| 153 | static int | ||
| 154 | restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p) | ||
| 155 | { | ||
| 156 | unsigned int err = 0; | ||
| 157 | |||
| 158 | #define COPY(x) err |= __get_user(regs->x, &sc->regs.x) | ||
| 159 | COPY(gpr[0]); COPY(gpr[1]); COPY(gpr[2]); COPY(gpr[3]); | ||
| 160 | COPY(gpr[4]); COPY(gpr[5]); COPY(gpr[6]); COPY(gpr[7]); | ||
| 161 | COPY(gpr[8]); COPY(gpr[9]); COPY(gpr[10]); COPY(gpr[11]); | ||
| 162 | COPY(gpr[12]); COPY(gpr[13]); COPY(gpr[14]); COPY(gpr[15]); | ||
| 163 | COPY(gpr[16]); COPY(gpr[17]); COPY(gpr[18]); COPY(gpr[19]); | ||
| 164 | COPY(gpr[20]); COPY(gpr[21]); COPY(gpr[22]); COPY(gpr[23]); | ||
| 165 | COPY(gpr[24]); COPY(gpr[25]); COPY(gpr[26]); COPY(gpr[27]); | ||
| 166 | COPY(gpr[28]); COPY(gpr[29]); COPY(gpr[30]); COPY(gpr[31]); | ||
| 167 | COPY(pc); COPY(psw); | ||
| 168 | COPY(ctpc); COPY(ctpsw); COPY(ctbp); | ||
| 169 | #undef COPY | ||
| 170 | |||
| 171 | return err; | ||
| 172 | } | ||
| 173 | |||
| 174 | asmlinkage int sys_sigreturn(struct pt_regs *regs) | ||
| 175 | { | ||
| 176 | struct sigframe *frame = (struct sigframe *)regs->gpr[GPR_SP]; | ||
| 177 | sigset_t set; | ||
| 178 | int rval; | ||
| 179 | |||
| 180 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | ||
| 181 | goto badframe; | ||
| 182 | |||
| 183 | if (__get_user(set.sig[0], &frame->sc.oldmask) | ||
| 184 | || (_NSIG_WORDS > 1 | ||
| 185 | && __copy_from_user(&set.sig[1], &frame->extramask, | ||
| 186 | sizeof(frame->extramask)))) | ||
| 187 | goto badframe; | ||
| 188 | |||
| 189 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
| 190 | spin_lock_irq(¤t->sighand->siglock); | ||
| 191 | current->blocked = set; | ||
| 192 | recalc_sigpending(); | ||
| 193 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 194 | |||
| 195 | if (restore_sigcontext(regs, &frame->sc, &rval)) | ||
| 196 | goto badframe; | ||
| 197 | return rval; | ||
| 198 | |||
| 199 | badframe: | ||
| 200 | force_sig(SIGSEGV, current); | ||
| 201 | return 0; | ||
| 202 | } | ||
| 203 | |||
| 204 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | ||
| 205 | { | ||
| 206 | struct rt_sigframe *frame = (struct rt_sigframe *)regs->gpr[GPR_SP]; | ||
| 207 | sigset_t set; | ||
| 208 | stack_t st; | ||
| 209 | int rval; | ||
| 210 | |||
| 211 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | ||
| 212 | goto badframe; | ||
| 213 | |||
| 214 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | ||
| 215 | goto badframe; | ||
| 216 | |||
| 217 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
| 218 | spin_lock_irq(¤t->sighand->siglock); | ||
| 219 | current->blocked = set; | ||
| 220 | recalc_sigpending(); | ||
| 221 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 222 | |||
| 223 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &rval)) | ||
| 224 | goto badframe; | ||
| 225 | |||
| 226 | if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) | ||
| 227 | goto badframe; | ||
| 228 | /* It is more difficult to avoid calling this function than to | ||
| 229 | call it and ignore errors. */ | ||
| 230 | do_sigaltstack(&st, NULL, regs->gpr[GPR_SP]); | ||
| 231 | |||
| 232 | return rval; | ||
| 233 | |||
| 234 | badframe: | ||
| 235 | force_sig(SIGSEGV, current); | ||
| 236 | return 0; | ||
| 237 | } | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Set up a signal frame. | ||
| 241 | */ | ||
| 242 | |||
| 243 | static int | ||
| 244 | setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, | ||
| 245 | unsigned long mask) | ||
| 246 | { | ||
| 247 | int err = 0; | ||
| 248 | |||
| 249 | #define COPY(x) err |= __put_user(regs->x, &sc->regs.x) | ||
| 250 | COPY(gpr[0]); COPY(gpr[1]); COPY(gpr[2]); COPY(gpr[3]); | ||
| 251 | COPY(gpr[4]); COPY(gpr[5]); COPY(gpr[6]); COPY(gpr[7]); | ||
| 252 | COPY(gpr[8]); COPY(gpr[9]); COPY(gpr[10]); COPY(gpr[11]); | ||
| 253 | COPY(gpr[12]); COPY(gpr[13]); COPY(gpr[14]); COPY(gpr[15]); | ||
| 254 | COPY(gpr[16]); COPY(gpr[17]); COPY(gpr[18]); COPY(gpr[19]); | ||
| 255 | COPY(gpr[20]); COPY(gpr[21]); COPY(gpr[22]); COPY(gpr[23]); | ||
| 256 | COPY(gpr[24]); COPY(gpr[25]); COPY(gpr[26]); COPY(gpr[27]); | ||
| 257 | COPY(gpr[28]); COPY(gpr[29]); COPY(gpr[30]); COPY(gpr[31]); | ||
| 258 | COPY(pc); COPY(psw); | ||
| 259 | COPY(ctpc); COPY(ctpsw); COPY(ctbp); | ||
| 260 | #undef COPY | ||
| 261 | |||
| 262 | err |= __put_user(mask, &sc->oldmask); | ||
| 263 | |||
| 264 | return err; | ||
| 265 | } | ||
| 266 | |||
| 267 | /* | ||
| 268 | * Determine which stack to use.. | ||
| 269 | */ | ||
| 270 | static inline void * | ||
| 271 | get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) | ||
| 272 | { | ||
| 273 | /* Default to using normal stack */ | ||
| 274 | unsigned long sp = regs->gpr[GPR_SP]; | ||
| 275 | |||
| 276 | if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) | ||
| 277 | sp = current->sas_ss_sp + current->sas_ss_size; | ||
| 278 | |||
| 279 | return (void *)((sp - frame_size) & -8UL); | ||
| 280 | } | ||
| 281 | |||
| 282 | static void setup_frame(int sig, struct k_sigaction *ka, | ||
| 283 | sigset_t *set, struct pt_regs *regs) | ||
| 284 | { | ||
| 285 | struct sigframe *frame; | ||
| 286 | int err = 0; | ||
| 287 | int signal; | ||
| 288 | |||
| 289 | frame = get_sigframe(ka, regs, sizeof(*frame)); | ||
| 290 | |||
| 291 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | ||
| 292 | goto give_sigsegv; | ||
| 293 | |||
| 294 | signal = current_thread_info()->exec_domain | ||
| 295 | && current_thread_info()->exec_domain->signal_invmap | ||
| 296 | && sig < 32 | ||
| 297 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
| 298 | : sig; | ||
| 299 | |||
| 300 | err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); | ||
| 301 | |||
| 302 | if (_NSIG_WORDS > 1) { | ||
| 303 | err |= __copy_to_user(frame->extramask, &set->sig[1], | ||
| 304 | sizeof(frame->extramask)); | ||
| 305 | } | ||
| 306 | |||
| 307 | /* Set up to return from userspace. If provided, use a stub | ||
| 308 | already in userspace. */ | ||
| 309 | if (ka->sa.sa_flags & SA_RESTORER) { | ||
| 310 | regs->gpr[GPR_LP] = (unsigned long) ka->sa.sa_restorer; | ||
| 311 | } else { | ||
| 312 | /* Note, these encodings are _little endian_! */ | ||
| 313 | |||
| 314 | /* addi __NR_sigreturn, r0, r12 */ | ||
| 315 | err |= __put_user(0x6600 | (__NR_sigreturn << 16), | ||
| 316 | frame->tramp + 0); | ||
| 317 | /* trap 0 */ | ||
| 318 | err |= __put_user(0x010007e0, | ||
| 319 | frame->tramp + 1); | ||
| 320 | |||
| 321 | regs->gpr[GPR_LP] = (unsigned long)frame->tramp; | ||
| 322 | |||
| 323 | flush_cache_sigtramp (regs->gpr[GPR_LP]); | ||
| 324 | } | ||
| 325 | |||
| 326 | if (err) | ||
| 327 | goto give_sigsegv; | ||
| 328 | |||
| 329 | /* Set up registers for signal handler. */ | ||
| 330 | regs->pc = (v850_reg_t) ka->sa.sa_handler; | ||
| 331 | regs->gpr[GPR_SP] = (v850_reg_t)frame; | ||
| 332 | /* Signal handler args: */ | ||
| 333 | regs->gpr[GPR_ARG0] = signal; /* arg 0: signum */ | ||
| 334 | regs->gpr[GPR_ARG1] = (v850_reg_t)&frame->sc;/* arg 1: sigcontext */ | ||
| 335 | |||
| 336 | set_fs(USER_DS); | ||
| 337 | |||
| 338 | #if DEBUG_SIG | ||
| 339 | printk("SIG deliver (%s:%d): sp=%p pc=%08lx ra=%08lx\n", | ||
| 340 | current->comm, current->pid, frame, regs->pc, ); | ||
| 341 | #endif | ||
| 342 | |||
| 343 | return; | ||
| 344 | |||
| 345 | give_sigsegv: | ||
| 346 | force_sigsegv(sig, current); | ||
| 347 | } | ||
| 348 | |||
| 349 | static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | ||
| 350 | sigset_t *set, struct pt_regs *regs) | ||
| 351 | { | ||
| 352 | struct rt_sigframe *frame; | ||
| 353 | int err = 0; | ||
| 354 | int signal; | ||
| 355 | |||
| 356 | frame = get_sigframe(ka, regs, sizeof(*frame)); | ||
| 357 | |||
| 358 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | ||
| 359 | goto give_sigsegv; | ||
| 360 | |||
| 361 | signal = current_thread_info()->exec_domain | ||
| 362 | && current_thread_info()->exec_domain->signal_invmap | ||
| 363 | && sig < 32 | ||
| 364 | ? current_thread_info()->exec_domain->signal_invmap[sig] | ||
| 365 | : sig; | ||
| 366 | |||
| 367 | err |= copy_siginfo_to_user(&frame->info, info); | ||
| 368 | |||
| 369 | /* Create the ucontext. */ | ||
| 370 | err |= __put_user(0, &frame->uc.uc_flags); | ||
| 371 | err |= __put_user(0, &frame->uc.uc_link); | ||
| 372 | err |= __put_user((void *)current->sas_ss_sp, | ||
| 373 | &frame->uc.uc_stack.ss_sp); | ||
| 374 | err |= __put_user(sas_ss_flags(regs->gpr[GPR_SP]), | ||
| 375 | &frame->uc.uc_stack.ss_flags); | ||
| 376 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
| 377 | err |= setup_sigcontext(&frame->uc.uc_mcontext, | ||
| 378 | regs, set->sig[0]); | ||
| 379 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | ||
| 380 | |||
| 381 | /* Set up to return from userspace. If provided, use a stub | ||
| 382 | already in userspace. */ | ||
| 383 | if (ka->sa.sa_flags & SA_RESTORER) { | ||
| 384 | regs->gpr[GPR_LP] = (unsigned long) ka->sa.sa_restorer; | ||
| 385 | } else { | ||
| 386 | /* Note, these encodings are _little endian_! */ | ||
| 387 | |||
| 388 | /* addi __NR_sigreturn, r0, r12 */ | ||
| 389 | err |= __put_user(0x6600 | (__NR_sigreturn << 16), | ||
| 390 | frame->tramp + 0); | ||
| 391 | /* trap 0 */ | ||
| 392 | err |= __put_user(0x010007e0, | ||
| 393 | frame->tramp + 1); | ||
| 394 | |||
| 395 | regs->gpr[GPR_LP] = (unsigned long)frame->tramp; | ||
| 396 | |||
| 397 | flush_cache_sigtramp (regs->gpr[GPR_LP]); | ||
| 398 | } | ||
| 399 | |||
| 400 | if (err) | ||
| 401 | goto give_sigsegv; | ||
| 402 | |||
| 403 | /* Set up registers for signal handler. */ | ||
| 404 | regs->pc = (v850_reg_t) ka->sa.sa_handler; | ||
| 405 | regs->gpr[GPR_SP] = (v850_reg_t)frame; | ||
| 406 | /* Signal handler args: */ | ||
| 407 | regs->gpr[GPR_ARG0] = signal; /* arg 0: signum */ | ||
| 408 | regs->gpr[GPR_ARG1] = (v850_reg_t)&frame->info; /* arg 1: siginfo */ | ||
| 409 | regs->gpr[GPR_ARG2] = (v850_reg_t)&frame->uc; /* arg 2: ucontext */ | ||
| 410 | |||
| 411 | set_fs(USER_DS); | ||
| 412 | |||
| 413 | #if DEBUG_SIG | ||
| 414 | printk("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", | ||
| 415 | current->comm, current->pid, frame, regs->pc, regs->pr); | ||
| 416 | #endif | ||
| 417 | |||
| 418 | return; | ||
| 419 | |||
| 420 | give_sigsegv: | ||
| 421 | force_sigsegv(sig, current); | ||
| 422 | } | ||
| 423 | |||
| 424 | /* | ||
| 425 | * OK, we're invoking a handler | ||
| 426 | */ | ||
| 427 | |||
| 428 | static void | ||
| 429 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | ||
| 430 | sigset_t *oldset, struct pt_regs * regs) | ||
| 431 | { | ||
| 432 | /* Are we from a system call? */ | ||
| 433 | if (PT_REGS_SYSCALL (regs)) { | ||
| 434 | /* If so, check system call restarting.. */ | ||
| 435 | switch (regs->gpr[GPR_RVAL]) { | ||
| 436 | case -ERESTART_RESTARTBLOCK: | ||
| 437 | current_thread_info()->restart_block.fn = | ||
| 438 | do_no_restart_syscall; | ||
| 439 | /* fall through */ | ||
| 440 | case -ERESTARTNOHAND: | ||
| 441 | regs->gpr[GPR_RVAL] = -EINTR; | ||
| 442 | break; | ||
| 443 | |||
| 444 | case -ERESTARTSYS: | ||
| 445 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
| 446 | regs->gpr[GPR_RVAL] = -EINTR; | ||
| 447 | break; | ||
| 448 | } | ||
| 449 | /* fallthrough */ | ||
| 450 | case -ERESTARTNOINTR: | ||
| 451 | regs->gpr[12] = PT_REGS_SYSCALL (regs); | ||
| 452 | regs->pc -= 4; /* Size of `trap 0' insn. */ | ||
| 453 | } | ||
| 454 | |||
| 455 | PT_REGS_SET_SYSCALL (regs, 0); | ||
| 456 | } | ||
| 457 | |||
| 458 | /* Set up the stack frame */ | ||
| 459 | if (ka->sa.sa_flags & SA_SIGINFO) | ||
| 460 | setup_rt_frame(sig, ka, info, oldset, regs); | ||
| 461 | else | ||
| 462 | setup_frame(sig, ka, oldset, regs); | ||
| 463 | |||
| 464 | spin_lock_irq(¤t->sighand->siglock); | ||
| 465 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | ||
| 466 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
| 467 | sigaddset(¤t->blocked,sig); | ||
| 468 | recalc_sigpending(); | ||
| 469 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 470 | } | ||
| 471 | |||
| 472 | /* | ||
| 473 | * Note that 'init' is a special process: it doesn't get signals it doesn't | ||
| 474 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | ||
| 475 | * mistake. | ||
| 476 | * | ||
| 477 | * Note that we go through the signals twice: once to check the signals that | ||
| 478 | * the kernel can handle, and then we build all the user-level signal handling | ||
| 479 | * stack-frames in one go after that. | ||
| 480 | */ | ||
| 481 | int do_signal(struct pt_regs *regs, sigset_t *oldset) | ||
| 482 | { | ||
| 483 | siginfo_t info; | ||
| 484 | int signr; | ||
| 485 | struct k_sigaction ka; | ||
| 486 | |||
| 487 | /* | ||
| 488 | * We want the common case to go fast, which | ||
| 489 | * is why we may in certain cases get here from | ||
| 490 | * kernel mode. Just return without doing anything | ||
| 491 | * if so. | ||
| 492 | */ | ||
| 493 | if (!user_mode(regs)) | ||
| 494 | return 1; | ||
| 495 | |||
| 496 | if (!oldset) | ||
| 497 | oldset = ¤t->blocked; | ||
| 498 | |||
| 499 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | ||
| 500 | if (signr > 0) { | ||
| 501 | /* Whee! Actually deliver the signal. */ | ||
| 502 | handle_signal(signr, &info, &ka, oldset, regs); | ||
| 503 | return 1; | ||
| 504 | } | ||
| 505 | |||
| 506 | /* Did we come from a system call? */ | ||
| 507 | if (PT_REGS_SYSCALL (regs)) { | ||
| 508 | int rval = (int)regs->gpr[GPR_RVAL]; | ||
| 509 | /* Restart the system call - no handlers present */ | ||
| 510 | if (rval == -ERESTARTNOHAND | ||
| 511 | || rval == -ERESTARTSYS | ||
| 512 | || rval == -ERESTARTNOINTR) | ||
| 513 | { | ||
| 514 | regs->gpr[12] = PT_REGS_SYSCALL (regs); | ||
| 515 | regs->pc -= 4; /* Size of `trap 0' insn. */ | ||
| 516 | } | ||
| 517 | else if (rval == -ERESTART_RESTARTBLOCK) { | ||
| 518 | regs->gpr[12] = __NR_restart_syscall; | ||
| 519 | regs->pc -= 4; /* Size of `trap 0' insn. */ | ||
| 520 | } | ||
| 521 | } | ||
| 522 | return 0; | ||
| 523 | } | ||
diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c deleted file mode 100644 index 467b4aa0acdd..000000000000 --- a/arch/v850/kernel/sim.c +++ /dev/null | |||
| @@ -1,172 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/sim.c -- Machine-specific stuff for GDB v850e simulator | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02 NEC Corporation | ||
| 5 | * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | #include <linux/mm.h> | ||
| 18 | #include <linux/swap.h> | ||
| 19 | #include <linux/bootmem.h> | ||
| 20 | #include <linux/irq.h> | ||
| 21 | |||
| 22 | #include <asm/atomic.h> | ||
| 23 | #include <asm/page.h> | ||
| 24 | #include <asm/machdep.h> | ||
| 25 | #include <asm/simsyscall.h> | ||
| 26 | |||
| 27 | #include "mach.h" | ||
| 28 | |||
| 29 | /* The name of a file containing the root filesystem. */ | ||
| 30 | #define ROOT_FS "rootfs.image" | ||
| 31 | |||
| 32 | extern void simcons_setup (void); | ||
| 33 | extern void simcons_poll_ttys (void); | ||
| 34 | extern void set_mem_root (void *addr, size_t len, char *cmd_line); | ||
| 35 | |||
| 36 | static int read_file (const char *name, | ||
| 37 | unsigned long *addr, unsigned long *len, | ||
| 38 | const char **err); | ||
| 39 | |||
| 40 | void __init mach_setup (char **cmdline) | ||
| 41 | { | ||
| 42 | const char *err; | ||
| 43 | unsigned long root_dev_addr, root_dev_len; | ||
| 44 | |||
| 45 | simcons_setup (); | ||
| 46 | |||
| 47 | printk (KERN_INFO "Reading root filesystem: %s", ROOT_FS); | ||
| 48 | |||
| 49 | if (read_file (ROOT_FS, &root_dev_addr, &root_dev_len, &err)) { | ||
| 50 | printk (" (size %luK)\n", root_dev_len / 1024); | ||
| 51 | set_mem_root ((void *)root_dev_addr, (size_t)root_dev_len, | ||
| 52 | *cmdline); | ||
| 53 | } else | ||
| 54 | printk ("...%s failed!\n", err); | ||
| 55 | } | ||
| 56 | |||
| 57 | void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len) | ||
| 58 | { | ||
| 59 | *ram_start = RAM_ADDR; | ||
| 60 | *ram_len = RAM_SIZE; | ||
| 61 | } | ||
| 62 | |||
| 63 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 64 | { | ||
| 65 | /* ...do magic timer initialization?... */ | ||
| 66 | mach_tick = simcons_poll_ttys; | ||
| 67 | setup_irq (0, timer_action); | ||
| 68 | } | ||
| 69 | |||
| 70 | |||
| 71 | static void irq_nop (unsigned irq) { } | ||
| 72 | static unsigned irq_zero (unsigned irq) { return 0; } | ||
| 73 | |||
| 74 | static struct hw_interrupt_type sim_irq_type = { | ||
| 75 | .typename = "IRQ", | ||
| 76 | .startup = irq_zero, /* startup */ | ||
| 77 | .shutdown = irq_nop, /* shutdown */ | ||
| 78 | .enable = irq_nop, /* enable */ | ||
| 79 | .disable = irq_nop, /* disable */ | ||
| 80 | .ack = irq_nop, /* ack */ | ||
| 81 | .end = irq_nop, /* end */ | ||
| 82 | }; | ||
| 83 | |||
| 84 | void __init mach_init_irqs (void) | ||
| 85 | { | ||
| 86 | init_irq_handlers (0, NUM_MACH_IRQS, 1, &sim_irq_type); | ||
| 87 | } | ||
| 88 | |||
| 89 | |||
| 90 | void mach_gettimeofday (struct timespec *tv) | ||
| 91 | { | ||
| 92 | long timeval[2], timezone[2]; | ||
| 93 | int rval = V850_SIM_SYSCALL (gettimeofday, timeval, timezone); | ||
| 94 | if (rval == 0) { | ||
| 95 | tv->tv_sec = timeval[0]; | ||
| 96 | tv->tv_nsec = timeval[1] * 1000; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | |||
| 100 | void machine_restart (char *__unused) | ||
| 101 | { | ||
| 102 | V850_SIM_SYSCALL (write, 1, "RESTART\n", 8); | ||
| 103 | V850_SIM_SYSCALL (exit, 0); | ||
| 104 | } | ||
| 105 | |||
| 106 | void machine_halt (void) | ||
| 107 | { | ||
| 108 | V850_SIM_SYSCALL (write, 1, "HALT\n", 5); | ||
| 109 | V850_SIM_SYSCALL (exit, 0); | ||
| 110 | } | ||
| 111 | |||
| 112 | void machine_power_off (void) | ||
| 113 | { | ||
| 114 | V850_SIM_SYSCALL (write, 1, "POWER OFF\n", 10); | ||
| 115 | V850_SIM_SYSCALL (exit, 0); | ||
| 116 | } | ||
| 117 | |||
| 118 | |||
| 119 | /* Load data from a file called NAME into ram. The address and length | ||
| 120 | of the data image are returned in ADDR and LEN. */ | ||
| 121 | static int __init | ||
| 122 | read_file (const char *name, | ||
| 123 | unsigned long *addr, unsigned long *len, | ||
| 124 | const char **err) | ||
| 125 | { | ||
| 126 | int rval, fd; | ||
| 127 | unsigned long cur, left; | ||
| 128 | /* Note this is not a normal stat buffer, it's an ad-hoc | ||
| 129 | structure defined by the simulator. */ | ||
| 130 | unsigned long stat_buf[10]; | ||
| 131 | |||
| 132 | /* Stat the file to find out the length. */ | ||
| 133 | rval = V850_SIM_SYSCALL (stat, name, stat_buf); | ||
| 134 | if (rval < 0) { | ||
| 135 | if (err) *err = "stat"; | ||
| 136 | return 0; | ||
| 137 | } | ||
| 138 | *len = stat_buf[4]; | ||
| 139 | |||
| 140 | /* Open the file; `0' is O_RDONLY. */ | ||
| 141 | fd = V850_SIM_SYSCALL (open, name, 0); | ||
| 142 | if (fd < 0) { | ||
| 143 | if (err) *err = "open"; | ||
| 144 | return 0; | ||
| 145 | } | ||
| 146 | |||
| 147 | *addr = (unsigned long)alloc_bootmem(*len); | ||
| 148 | if (! *addr) { | ||
| 149 | V850_SIM_SYSCALL (close, fd); | ||
| 150 | if (err) *err = "alloc_bootmem"; | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | |||
| 154 | cur = *addr; | ||
| 155 | left = *len; | ||
| 156 | while (left > 0) { | ||
| 157 | int chunk = V850_SIM_SYSCALL (read, fd, cur, left); | ||
| 158 | if (chunk <= 0) | ||
| 159 | break; | ||
| 160 | cur += chunk; | ||
| 161 | left -= chunk; | ||
| 162 | } | ||
| 163 | V850_SIM_SYSCALL (close, fd); | ||
| 164 | if (left > 0) { | ||
| 165 | /* Some read failed. */ | ||
| 166 | free_bootmem (*addr, *len); | ||
| 167 | if (err) *err = "read"; | ||
| 168 | return 0; | ||
| 169 | } | ||
| 170 | |||
| 171 | return 1; | ||
| 172 | } | ||
diff --git a/arch/v850/kernel/sim.ld b/arch/v850/kernel/sim.ld deleted file mode 100644 index 101885f3c9f0..000000000000 --- a/arch/v850/kernel/sim.ld +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | /* Linker script for the gdb v850e simulator (CONFIG_V850E_SIM). */ | ||
| 2 | |||
| 3 | MEMORY { | ||
| 4 | /* Interrupt vectors. */ | ||
| 5 | INTV : ORIGIN = 0x0, LENGTH = 0xe0 | ||
| 6 | /* Main RAM. */ | ||
| 7 | RAM : ORIGIN = RAM_ADDR, LENGTH = RAM_SIZE | ||
| 8 | } | ||
| 9 | |||
| 10 | SECTIONS { | ||
| 11 | .intv : { INTV_CONTENTS } > INTV | ||
| 12 | .ram : { RAMK_KRAM_CONTENTS } > RAM | ||
| 13 | } | ||
diff --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c deleted file mode 100644 index 566dde5e6070..000000000000 --- a/arch/v850/kernel/sim85e2.c +++ /dev/null | |||
| @@ -1,195 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/sim85e2.c -- Machine-specific stuff for | ||
| 3 | * V850E2 RTL simulator | ||
| 4 | * | ||
| 5 | * Copyright (C) 2002,03 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2002,03 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/kernel.h> | ||
| 16 | #include <linux/module.h> | ||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/mm.h> | ||
| 19 | #include <linux/swap.h> | ||
| 20 | #include <linux/bootmem.h> | ||
| 21 | #include <linux/irq.h> | ||
| 22 | |||
| 23 | #include <asm/atomic.h> | ||
| 24 | #include <asm/page.h> | ||
| 25 | #include <asm/machdep.h> | ||
| 26 | |||
| 27 | #include "mach.h" | ||
| 28 | |||
| 29 | |||
| 30 | /* There are 4 possible areas we can use: | ||
| 31 | |||
| 32 | IRAM (1MB) is fast for instruction fetches, but slow for data | ||
| 33 | DRAM (1020KB) is fast for data, but slow for instructions | ||
| 34 | ERAM is cached, so should be fast for both insns and data | ||
| 35 | SDRAM is external DRAM, similar to ERAM | ||
| 36 | */ | ||
| 37 | |||
| 38 | #define INIT_MEMC_FOR_SDRAM | ||
| 39 | #define USE_SDRAM_AREA | ||
| 40 | #define KERNEL_IN_SDRAM_AREA | ||
| 41 | |||
| 42 | #define DCACHE_MODE V850E2_CACHE_BTSC_DCM_WT | ||
| 43 | /*#define DCACHE_MODE V850E2_CACHE_BTSC_DCM_WB_ALLOC*/ | ||
| 44 | |||
| 45 | #ifdef USE_SDRAM_AREA | ||
| 46 | #define RAM_START SDRAM_ADDR | ||
| 47 | #define RAM_END (SDRAM_ADDR + SDRAM_SIZE) | ||
| 48 | #else | ||
| 49 | /* When we use DRAM, we need to account for the fact that the end of it is | ||
| 50 | used for R0_RAM. */ | ||
| 51 | #define RAM_START DRAM_ADDR | ||
| 52 | #define RAM_END R0_RAM_ADDR | ||
| 53 | #endif | ||
| 54 | |||
| 55 | |||
| 56 | extern void memcons_setup (void); | ||
| 57 | |||
| 58 | |||
| 59 | #ifdef KERNEL_IN_SDRAM_AREA | ||
| 60 | #define EARLY_INIT_SECTION_ATTR __attribute__ ((section (".early.text"))) | ||
| 61 | #else | ||
| 62 | #define EARLY_INIT_SECTION_ATTR __init | ||
| 63 | #endif | ||
| 64 | |||
| 65 | void EARLY_INIT_SECTION_ATTR mach_early_init (void) | ||
| 66 | { | ||
| 67 | /* The sim85e2 simulator tracks `undefined' values, so to make | ||
| 68 | debugging easier, we begin by zeroing out all otherwise | ||
| 69 | undefined registers. This is not strictly necessary. | ||
| 70 | |||
| 71 | The registers we zero are: | ||
| 72 | Every GPR except: | ||
| 73 | stack-pointer (r3) | ||
| 74 | task-pointer (r16) | ||
| 75 | our return addr (r31) | ||
| 76 | Every system register (SPR) that we know about except for | ||
| 77 | the PSW (SPR 5), which we zero except for the | ||
| 78 | disable-interrupts bit. | ||
| 79 | */ | ||
| 80 | |||
| 81 | /* GPRs */ | ||
| 82 | asm volatile (" mov r0, r1 ; mov r0, r2 "); | ||
| 83 | asm volatile ("mov r0, r4 ; mov r0, r5 ; mov r0, r6 ; mov r0, r7 "); | ||
| 84 | asm volatile ("mov r0, r8 ; mov r0, r9 ; mov r0, r10; mov r0, r11"); | ||
| 85 | asm volatile ("mov r0, r12; mov r0, r13; mov r0, r14; mov r0, r15"); | ||
| 86 | asm volatile (" mov r0, r17; mov r0, r18; mov r0, r19"); | ||
| 87 | asm volatile ("mov r0, r20; mov r0, r21; mov r0, r22; mov r0, r23"); | ||
| 88 | asm volatile ("mov r0, r24; mov r0, r25; mov r0, r26; mov r0, r27"); | ||
| 89 | asm volatile ("mov r0, r28; mov r0, r29; mov r0, r30"); | ||
| 90 | |||
| 91 | /* SPRs */ | ||
| 92 | asm volatile ("ldsr r0, 0; ldsr r0, 1; ldsr r0, 2; ldsr r0, 3"); | ||
| 93 | asm volatile ("ldsr r0, 4"); | ||
| 94 | asm volatile ("addi 0x20, r0, r1; ldsr r1, 5"); /* PSW */ | ||
| 95 | asm volatile ("ldsr r0, 16; ldsr r0, 17; ldsr r0, 18; ldsr r0, 19"); | ||
| 96 | asm volatile ("ldsr r0, 20"); | ||
| 97 | |||
| 98 | |||
| 99 | #ifdef INIT_MEMC_FOR_SDRAM | ||
| 100 | /* Settings for SDRAM controller. */ | ||
| 101 | V850E2_VSWC = 0x0042; | ||
| 102 | V850E2_BSC = 0x9286; | ||
| 103 | V850E2_BCT(0) = 0xb000; /* was: 0 */ | ||
| 104 | V850E2_BCT(1) = 0x000b; | ||
| 105 | V850E2_ASC = 0; | ||
| 106 | V850E2_LBS = 0xa9aa; /* was: 0xaaaa */ | ||
| 107 | V850E2_LBC(0) = 0; | ||
| 108 | V850E2_LBC(1) = 0; /* was: 0x3 */ | ||
| 109 | V850E2_BCC = 0; | ||
| 110 | V850E2_RFS(4) = 0x800a; /* was: 0xf109 */ | ||
| 111 | V850E2_SCR(4) = 0x2091; /* was: 0x20a1 */ | ||
| 112 | V850E2_RFS(3) = 0x800c; | ||
| 113 | V850E2_SCR(3) = 0x20a1; | ||
| 114 | V850E2_DWC(0) = 0; | ||
| 115 | V850E2_DWC(1) = 0; | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #if 0 | ||
| 119 | #ifdef CONFIG_V850E2_SIM85E2S | ||
| 120 | /* Turn on the caches. */ | ||
| 121 | V850E2_CACHE_BTSC = V850E2_CACHE_BTSC_ICM | DCACHE_MODE; | ||
| 122 | V850E2_BHC = 0x1010; | ||
| 123 | #elif CONFIG_V850E2_SIM85E2C | ||
| 124 | V850E2_CACHE_BTSC |= (V850E2_CACHE_BTSC_ICM | V850E2_CACHE_BTSC_DCM0); | ||
| 125 | V850E2_BUSM_BHC = 0xFFFF; | ||
| 126 | #endif | ||
| 127 | #else | ||
| 128 | V850E2_BHC = 0; | ||
| 129 | #endif | ||
| 130 | |||
| 131 | /* Don't stop the simulator at `halt' instructions. */ | ||
| 132 | SIM85E2_NOTHAL = 1; | ||
| 133 | |||
| 134 | /* Ensure that the simulator halts on a panic, instead of going | ||
| 135 | into an infinite loop inside the panic function. */ | ||
| 136 | panic_timeout = -1; | ||
| 137 | } | ||
| 138 | |||
| 139 | void __init mach_setup (char **cmdline) | ||
| 140 | { | ||
| 141 | memcons_setup (); | ||
| 142 | } | ||
| 143 | |||
| 144 | void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len) | ||
| 145 | { | ||
| 146 | *ram_start = RAM_START; | ||
| 147 | *ram_len = RAM_END - RAM_START; | ||
| 148 | } | ||
| 149 | |||
| 150 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 151 | { | ||
| 152 | /* The simulator actually cycles through all interrupts | ||
| 153 | periodically. We just pay attention to IRQ0, which gives us | ||
| 154 | 1/64 the rate of the periodic interrupts. */ | ||
| 155 | setup_irq (0, timer_action); | ||
| 156 | } | ||
| 157 | |||
| 158 | void mach_gettimeofday (struct timespec *tv) | ||
| 159 | { | ||
| 160 | tv->tv_sec = 0; | ||
| 161 | tv->tv_nsec = 0; | ||
| 162 | } | ||
| 163 | |||
| 164 | /* Interrupts */ | ||
| 165 | |||
| 166 | struct v850e_intc_irq_init irq_inits[] = { | ||
| 167 | { "IRQ", 0, NUM_MACH_IRQS, 1, 7 }, | ||
| 168 | { 0 } | ||
| 169 | }; | ||
| 170 | struct hw_interrupt_type hw_itypes[1]; | ||
| 171 | |||
| 172 | /* Initialize interrupts. */ | ||
| 173 | void __init mach_init_irqs (void) | ||
| 174 | { | ||
| 175 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 176 | } | ||
| 177 | |||
| 178 | |||
| 179 | void machine_halt (void) __attribute__ ((noreturn)); | ||
| 180 | void machine_halt (void) | ||
| 181 | { | ||
| 182 | SIM85E2_SIMFIN = 0; /* Halt immediately. */ | ||
| 183 | for (;;) {} | ||
| 184 | } | ||
| 185 | |||
| 186 | void machine_restart (char *__unused) | ||
| 187 | { | ||
| 188 | machine_halt (); | ||
| 189 | } | ||
| 190 | |||
| 191 | void machine_power_off (void) | ||
| 192 | { | ||
| 193 | machine_halt (); | ||
| 194 | } | ||
| 195 | |||
diff --git a/arch/v850/kernel/sim85e2.ld b/arch/v850/kernel/sim85e2.ld deleted file mode 100644 index 7470fd2ffb5b..000000000000 --- a/arch/v850/kernel/sim85e2.ld +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | /* Linker script for the sim85e2c simulator, which is a verilog simulation of | ||
| 2 | the V850E2 NA85E2C cpu core (CONFIG_V850E2_SIM85E2C). */ | ||
| 3 | |||
| 4 | MEMORY { | ||
| 5 | /* 1MB of `instruction RAM', starting at 0. | ||
| 6 | Instruction fetches are much faster from IRAM than from DRAM. */ | ||
| 7 | IRAM : ORIGIN = IRAM_ADDR, LENGTH = IRAM_SIZE | ||
| 8 | |||
| 9 | /* 1MB of `data RAM', below and contiguous with the I/O space. | ||
| 10 | Data fetches are much faster from DRAM than from IRAM. */ | ||
| 11 | DRAM : ORIGIN = DRAM_ADDR, LENGTH = DRAM_SIZE | ||
| 12 | |||
| 13 | /* `external ram' (CS1 area), comes after IRAM. */ | ||
| 14 | ERAM : ORIGIN = ERAM_ADDR, LENGTH = ERAM_SIZE | ||
| 15 | |||
| 16 | /* Dynamic RAM; uses memory controller. */ | ||
| 17 | SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE | ||
| 18 | } | ||
| 19 | |||
| 20 | SECTIONS { | ||
| 21 | .iram : { | ||
| 22 | INTV_CONTENTS | ||
| 23 | *arch/v850/kernel/head.o | ||
| 24 | *(.early.text) | ||
| 25 | } > IRAM | ||
| 26 | .dram : { | ||
| 27 | _memcons_output = . ; | ||
| 28 | . = . + 0x8000 ; | ||
| 29 | _memcons_output_end = . ; | ||
| 30 | } > DRAM | ||
| 31 | .sdram : { | ||
| 32 | /* We stick console output into a buffer here. */ | ||
| 33 | RAMK_KRAM_CONTENTS | ||
| 34 | ROOT_FS_CONTENTS | ||
| 35 | } > SDRAM | ||
| 36 | } | ||
diff --git a/arch/v850/kernel/simcons.c b/arch/v850/kernel/simcons.c deleted file mode 100644 index 9973596ae304..000000000000 --- a/arch/v850/kernel/simcons.c +++ /dev/null | |||
| @@ -1,161 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/simcons.c -- Console I/O for GDB v850e simulator | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/console.h> | ||
| 16 | #include <linux/tty.h> | ||
| 17 | #include <linux/tty_flip.h> | ||
| 18 | #include <linux/tty_driver.h> | ||
| 19 | #include <linux/init.h> | ||
| 20 | |||
| 21 | #include <asm/poll.h> | ||
| 22 | #include <asm/string.h> | ||
| 23 | #include <asm/simsyscall.h> | ||
| 24 | |||
| 25 | |||
| 26 | /* Low-level console. */ | ||
| 27 | |||
| 28 | static void simcons_write (struct console *co, const char *buf, unsigned len) | ||
| 29 | { | ||
| 30 | V850_SIM_SYSCALL (write, 1, buf, len); | ||
| 31 | } | ||
| 32 | |||
| 33 | static int simcons_read (struct console *co, char *buf, unsigned len) | ||
| 34 | { | ||
| 35 | return V850_SIM_SYSCALL (read, 0, buf, len); | ||
| 36 | } | ||
| 37 | |||
| 38 | static struct tty_driver *tty_driver; | ||
| 39 | static struct tty_driver *simcons_device (struct console *c, int *index) | ||
| 40 | { | ||
| 41 | *index = c->index; | ||
| 42 | return tty_driver; | ||
| 43 | } | ||
| 44 | |||
| 45 | static struct console simcons = | ||
| 46 | { | ||
| 47 | .name = "simcons", | ||
| 48 | .write = simcons_write, | ||
| 49 | .read = simcons_read, | ||
| 50 | .device = simcons_device, | ||
| 51 | .flags = CON_PRINTBUFFER, | ||
| 52 | .index = -1, | ||
| 53 | }; | ||
| 54 | |||
| 55 | /* Higher level TTY interface. */ | ||
| 56 | |||
| 57 | int simcons_tty_open (struct tty_struct *tty, struct file *filp) | ||
| 58 | { | ||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | int simcons_tty_write (struct tty_struct *tty, | ||
| 63 | const unsigned char *buf, int count) | ||
| 64 | { | ||
| 65 | return V850_SIM_SYSCALL (write, 1, buf, count); | ||
| 66 | } | ||
| 67 | |||
| 68 | int simcons_tty_write_room (struct tty_struct *tty) | ||
| 69 | { | ||
| 70 | /* Completely arbitrary. */ | ||
| 71 | return 0x100000; | ||
| 72 | } | ||
| 73 | |||
| 74 | int simcons_tty_chars_in_buffer (struct tty_struct *tty) | ||
| 75 | { | ||
| 76 | /* We have no buffer. */ | ||
| 77 | return 0; | ||
| 78 | } | ||
| 79 | |||
| 80 | static const struct tty_operations ops = { | ||
| 81 | .open = simcons_tty_open, | ||
| 82 | .write = simcons_tty_write, | ||
| 83 | .write_room = simcons_tty_write_room, | ||
| 84 | .chars_in_buffer = simcons_tty_chars_in_buffer, | ||
| 85 | }; | ||
| 86 | |||
| 87 | int __init simcons_tty_init (void) | ||
| 88 | { | ||
| 89 | struct tty_driver *driver = alloc_tty_driver(1); | ||
| 90 | int err; | ||
| 91 | if (!driver) | ||
| 92 | return -ENOMEM; | ||
| 93 | driver->name = "simcons"; | ||
| 94 | driver->major = TTY_MAJOR; | ||
| 95 | driver->minor_start = 64; | ||
| 96 | driver->type = TTY_DRIVER_TYPE_SYSCONS; | ||
| 97 | driver->init_termios = tty_std_termios; | ||
| 98 | tty_set_operations(driver, &ops); | ||
| 99 | err = tty_register_driver(driver); | ||
| 100 | if (err) { | ||
| 101 | put_tty_driver(driver); | ||
| 102 | return err; | ||
| 103 | } | ||
| 104 | tty_driver = driver; | ||
| 105 | return 0; | ||
| 106 | } | ||
| 107 | /* We use `late_initcall' instead of just `__initcall' as a workaround for | ||
| 108 | the fact that (1) simcons_tty_init can't be called before tty_init, | ||
| 109 | (2) tty_init is called via `module_init', (3) if statically linked, | ||
| 110 | module_init == device_init, and (4) there's no ordering of init lists. | ||
| 111 | We can do this easily because simcons is always statically linked, but | ||
| 112 | other tty drivers that depend on tty_init and which must use | ||
| 113 | `module_init' to declare their init routines are likely to be broken. */ | ||
| 114 | late_initcall(simcons_tty_init); | ||
| 115 | |||
| 116 | /* Poll for input on the console, and if there's any, deliver it to the | ||
| 117 | tty driver. */ | ||
| 118 | void simcons_poll_tty (struct tty_struct *tty) | ||
| 119 | { | ||
| 120 | char buf[32]; /* Not the nicest way to do it but I need it correct first */ | ||
| 121 | int flip = 0, send_break = 0; | ||
| 122 | struct pollfd pfd; | ||
| 123 | pfd.fd = 0; | ||
| 124 | pfd.events = POLLIN; | ||
| 125 | |||
| 126 | if (V850_SIM_SYSCALL (poll, &pfd, 1, 0) > 0) { | ||
| 127 | if (pfd.revents & POLLIN) { | ||
| 128 | /* Real block hardware knows the transfer size before | ||
| 129 | transfer so the new tty buffering doesn't try to handle | ||
| 130 | this rather weird simulator specific case well */ | ||
| 131 | int rd = V850_SIM_SYSCALL (read, 0, buf, 32); | ||
| 132 | if (rd > 0) { | ||
| 133 | tty_insert_flip_string(tty, buf, rd); | ||
| 134 | flip = 1; | ||
| 135 | } else | ||
| 136 | send_break = 1; | ||
| 137 | } else if (pfd.revents & POLLERR) | ||
| 138 | send_break = 1; | ||
| 139 | } | ||
| 140 | |||
| 141 | if (send_break) { | ||
| 142 | tty_insert_flip_char (tty, 0, TTY_BREAK); | ||
| 143 | flip = 1; | ||
| 144 | } | ||
| 145 | |||
| 146 | if (flip) | ||
| 147 | tty_schedule_flip (tty); | ||
| 148 | } | ||
| 149 | |||
| 150 | void simcons_poll_ttys (void) | ||
| 151 | { | ||
| 152 | if (tty_driver && tty_driver->ttys[0]) | ||
| 153 | simcons_poll_tty (tty_driver->ttys[0]); | ||
| 154 | } | ||
| 155 | |||
| 156 | void simcons_setup (void) | ||
| 157 | { | ||
| 158 | V850_SIM_SYSCALL (make_raw, 0); | ||
| 159 | register_console (&simcons); | ||
| 160 | printk (KERN_INFO "Console: GDB V850E simulator stdio\n"); | ||
| 161 | } | ||
diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c deleted file mode 100644 index 1a83daf8e24f..000000000000 --- a/arch/v850/kernel/syscalls.c +++ /dev/null | |||
| @@ -1,196 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/syscalls.c -- Various system-call definitions not | ||
| 3 | * defined in machine-independent code | ||
| 4 | * | ||
| 5 | * Copyright (C) 2001,02 NEC Corporation | ||
| 6 | * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * This file was derived the ppc version, arch/ppc/kernel/syscalls.c | ||
| 13 | * ... which was derived from "arch/i386/kernel/sys_i386.c" by Gary Thomas; | ||
| 14 | * modified by Cort Dougan (cort@cs.nmt.edu) | ||
| 15 | * and Paul Mackerras (paulus@cs.anu.edu.au). | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/errno.h> | ||
| 19 | #include <linux/mm.h> | ||
| 20 | #include <linux/smp.h> | ||
| 21 | #include <linux/syscalls.h> | ||
| 22 | #include <linux/sem.h> | ||
| 23 | #include <linux/msg.h> | ||
| 24 | #include <linux/shm.h> | ||
| 25 | #include <linux/stat.h> | ||
| 26 | #include <linux/mman.h> | ||
| 27 | #include <linux/sys.h> | ||
| 28 | #include <linux/ipc.h> | ||
| 29 | #include <linux/utsname.h> | ||
| 30 | #include <linux/file.h> | ||
| 31 | |||
| 32 | #include <asm/uaccess.h> | ||
| 33 | #include <asm/unistd.h> | ||
| 34 | |||
| 35 | /* | ||
| 36 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | ||
| 37 | * | ||
| 38 | * This is really horribly ugly. | ||
| 39 | */ | ||
| 40 | int | ||
| 41 | sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth) | ||
| 42 | { | ||
| 43 | int version, ret; | ||
| 44 | |||
| 45 | version = call >> 16; /* hack for backward compatibility */ | ||
| 46 | call &= 0xffff; | ||
| 47 | |||
| 48 | ret = -EINVAL; | ||
| 49 | switch (call) { | ||
| 50 | case SEMOP: | ||
| 51 | ret = sys_semop (first, (struct sembuf *)ptr, second); | ||
| 52 | break; | ||
| 53 | case SEMGET: | ||
| 54 | ret = sys_semget (first, second, third); | ||
| 55 | break; | ||
| 56 | case SEMCTL: | ||
| 57 | { | ||
| 58 | union semun fourth; | ||
| 59 | |||
| 60 | if (!ptr) | ||
| 61 | break; | ||
| 62 | if ((ret = access_ok(VERIFY_READ, ptr, sizeof(long)) ? 0 : -EFAULT) | ||
| 63 | || (ret = get_user(fourth.__pad, (void **)ptr))) | ||
| 64 | break; | ||
| 65 | ret = sys_semctl (first, second, third, fourth); | ||
| 66 | break; | ||
| 67 | } | ||
| 68 | case MSGSND: | ||
| 69 | ret = sys_msgsnd (first, (struct msgbuf *) ptr, second, third); | ||
| 70 | break; | ||
| 71 | case MSGRCV: | ||
| 72 | switch (version) { | ||
| 73 | case 0: { | ||
| 74 | struct ipc_kludge tmp; | ||
| 75 | |||
| 76 | if (!ptr) | ||
| 77 | break; | ||
| 78 | if ((ret = access_ok(VERIFY_READ, ptr, sizeof(tmp)) ? 0 : -EFAULT) | ||
| 79 | || (ret = copy_from_user(&tmp, | ||
| 80 | (struct ipc_kludge *) ptr, | ||
| 81 | sizeof (tmp)))) | ||
| 82 | break; | ||
| 83 | ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, | ||
| 84 | third); | ||
| 85 | break; | ||
| 86 | } | ||
| 87 | default: | ||
| 88 | ret = sys_msgrcv (first, (struct msgbuf *) ptr, | ||
| 89 | second, fifth, third); | ||
| 90 | break; | ||
| 91 | } | ||
| 92 | break; | ||
| 93 | case MSGGET: | ||
| 94 | ret = sys_msgget ((key_t) first, second); | ||
| 95 | break; | ||
| 96 | case MSGCTL: | ||
| 97 | ret = sys_msgctl (first, second, (struct msqid_ds *) ptr); | ||
| 98 | break; | ||
| 99 | case SHMAT: | ||
| 100 | switch (version) { | ||
| 101 | default: { | ||
| 102 | ulong raddr; | ||
| 103 | |||
| 104 | if ((ret = access_ok(VERIFY_WRITE, (ulong*) third, | ||
| 105 | sizeof(ulong)) ? 0 : -EFAULT)) | ||
| 106 | break; | ||
| 107 | ret = do_shmat (first, (char *) ptr, second, &raddr); | ||
| 108 | if (ret) | ||
| 109 | break; | ||
| 110 | ret = put_user (raddr, (ulong *) third); | ||
| 111 | break; | ||
| 112 | } | ||
| 113 | case 1: /* iBCS2 emulator entry point */ | ||
| 114 | if (!segment_eq(get_fs(), get_ds())) | ||
| 115 | break; | ||
| 116 | ret = do_shmat (first, (char *) ptr, second, | ||
| 117 | (ulong *) third); | ||
| 118 | break; | ||
| 119 | } | ||
| 120 | break; | ||
| 121 | case SHMDT: | ||
| 122 | ret = sys_shmdt ((char *)ptr); | ||
| 123 | break; | ||
| 124 | case SHMGET: | ||
| 125 | ret = sys_shmget (first, second, third); | ||
| 126 | break; | ||
| 127 | case SHMCTL: | ||
| 128 | ret = sys_shmctl (first, second, (struct shmid_ds *) ptr); | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | |||
| 132 | return ret; | ||
| 133 | } | ||
| 134 | |||
| 135 | static inline unsigned long | ||
| 136 | do_mmap2 (unsigned long addr, size_t len, | ||
| 137 | unsigned long prot, unsigned long flags, | ||
| 138 | unsigned long fd, unsigned long pgoff) | ||
| 139 | { | ||
| 140 | struct file * file = NULL; | ||
| 141 | int ret = -EBADF; | ||
| 142 | |||
| 143 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
| 144 | if (! (flags & MAP_ANONYMOUS)) { | ||
| 145 | if (!(file = fget (fd))) | ||
| 146 | goto out; | ||
| 147 | } | ||
| 148 | |||
| 149 | down_write (¤t->mm->mmap_sem); | ||
| 150 | ret = do_mmap_pgoff (file, addr, len, prot, flags, pgoff); | ||
| 151 | up_write (¤t->mm->mmap_sem); | ||
| 152 | if (file) | ||
| 153 | fput (file); | ||
| 154 | out: | ||
| 155 | return ret; | ||
| 156 | } | ||
| 157 | |||
| 158 | unsigned long sys_mmap2 (unsigned long addr, size_t len, | ||
| 159 | unsigned long prot, unsigned long flags, | ||
| 160 | unsigned long fd, unsigned long pgoff) | ||
| 161 | { | ||
| 162 | return do_mmap2 (addr, len, prot, flags, fd, pgoff); | ||
| 163 | } | ||
| 164 | |||
| 165 | unsigned long sys_mmap (unsigned long addr, size_t len, | ||
| 166 | unsigned long prot, unsigned long flags, | ||
| 167 | unsigned long fd, off_t offset) | ||
| 168 | { | ||
| 169 | int err = -EINVAL; | ||
| 170 | |||
| 171 | if (offset & ~PAGE_MASK) | ||
| 172 | goto out; | ||
| 173 | |||
| 174 | err = do_mmap2 (addr, len, prot, flags, fd, offset >> PAGE_SHIFT); | ||
| 175 | out: | ||
| 176 | return err; | ||
| 177 | } | ||
| 178 | |||
| 179 | /* | ||
| 180 | * Do a system call from kernel instead of calling sys_execve so we | ||
| 181 | * end up with proper pt_regs. | ||
| 182 | */ | ||
| 183 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | ||
| 184 | { | ||
| 185 | register char *__a __asm__ ("r6") = filename; | ||
| 186 | register void *__b __asm__ ("r7") = argv; | ||
| 187 | register void *__c __asm__ ("r8") = envp; | ||
| 188 | register unsigned long __syscall __asm__ ("r12") = __NR_execve; | ||
| 189 | register unsigned long __ret __asm__ ("r10"); | ||
| 190 | __asm__ __volatile__ ("trap 0" | ||
| 191 | : "=r" (__ret), "=r" (__syscall) | ||
| 192 | : "1" (__syscall), "r" (__a), "r" (__b), "r" (__c) | ||
| 193 | : "r1", "r5", "r11", "r13", "r14", | ||
| 194 | "r15", "r16", "r17", "r18", "r19"); | ||
| 195 | return __ret; | ||
| 196 | } | ||
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c deleted file mode 100644 index 699248f92aae..000000000000 --- a/arch/v850/kernel/teg.c +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/teg.c -- NB85E-TEG cpu chip | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/mm.h> | ||
| 17 | #include <linux/swap.h> | ||
| 18 | #include <linux/bootmem.h> | ||
| 19 | #include <linux/irq.h> | ||
| 20 | |||
| 21 | #include <asm/atomic.h> | ||
| 22 | #include <asm/page.h> | ||
| 23 | #include <asm/machdep.h> | ||
| 24 | #include <asm/v850e_timer_d.h> | ||
| 25 | |||
| 26 | #include "mach.h" | ||
| 27 | |||
| 28 | void __init mach_sched_init (struct irqaction *timer_action) | ||
| 29 | { | ||
| 30 | /* Select timer interrupt instead of external pin. */ | ||
| 31 | TEG_ISS |= 0x1; | ||
| 32 | /* Start hardware timer. */ | ||
| 33 | v850e_timer_d_configure (0, HZ); | ||
| 34 | /* Install timer interrupt handler. */ | ||
| 35 | setup_irq (IRQ_INTCMD(0), timer_action); | ||
| 36 | } | ||
| 37 | |||
| 38 | static struct v850e_intc_irq_init irq_inits[] = { | ||
| 39 | { "IRQ", 0, NUM_CPU_IRQS, 1, 7 }, | ||
| 40 | { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 }, | ||
| 41 | { "SER", IRQ_INTSER(0), IRQ_INTSER_NUM, 1, 3 }, | ||
| 42 | { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 1, 4 }, | ||
| 43 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 }, | ||
| 44 | { 0 } | ||
| 45 | }; | ||
| 46 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) | ||
| 47 | |||
| 48 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
| 49 | |||
| 50 | /* Initialize MA chip interrupts. */ | ||
| 51 | void __init teg_init_irqs (void) | ||
| 52 | { | ||
| 53 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
| 54 | } | ||
| 55 | |||
| 56 | /* Called before configuring an on-chip UART. */ | ||
| 57 | void teg_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | ||
| 58 | { | ||
| 59 | /* Enable UART I/O pins instead of external interrupt pins, and | ||
| 60 | UART interrupts instead of external pin interrupts. */ | ||
| 61 | TEG_ISS |= 0x4E; | ||
| 62 | } | ||
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c deleted file mode 100644 index d810c93fe665..000000000000 --- a/arch/v850/kernel/time.c +++ /dev/null | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/v850/kernel/time.c -- Arch-dependent timer functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 1991, 1992, 1995, 2001, 2002 Linus Torvalds | ||
| 5 | * | ||
| 6 | * This file contains the v850-specific time handling details. | ||
| 7 | * Most of the stuff is located in the machine specific files. | ||
| 8 | * | ||
| 9 | * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 | ||
| 10 | * "A Kernel Model for Precision Timekeeping" by Dave Mills | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/errno.h> | ||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/param.h> | ||
| 17 | #include <linux/string.h> | ||
| 18 | #include <linux/mm.h> | ||
| 19 | #include <linux/interrupt.h> | ||
| 20 | #include <linux/time.h> | ||
| 21 | #include <linux/timex.h> | ||
| 22 | #include <linux/profile.h> | ||
| 23 | |||
| 24 | #include <asm/io.h> | ||
| 25 | |||
| 26 | #include "mach.h" | ||
| 27 | |||
| 28 | #define TICK_SIZE (tick_nsec / 1000) | ||
| 29 | |||
| 30 | /* | ||
| 31 | * timer_interrupt() needs to keep up the real-time clock, | ||
| 32 | * as well as call the "do_timer()" routine every clocktick | ||
| 33 | */ | ||
| 34 | static irqreturn_t timer_interrupt (int irq, void *dummy, struct pt_regs *regs) | ||
| 35 | { | ||
| 36 | #if 0 | ||
| 37 | /* last time the cmos clock got updated */ | ||
| 38 | static long last_rtc_update=0; | ||
| 39 | #endif | ||
| 40 | |||
| 41 | /* may need to kick the hardware timer */ | ||
| 42 | if (mach_tick) | ||
| 43 | mach_tick (); | ||
| 44 | |||
| 45 | do_timer (1); | ||
| 46 | #ifndef CONFIG_SMP | ||
| 47 | update_process_times(user_mode(regs)); | ||
| 48 | #endif | ||
| 49 | profile_tick(CPU_PROFILING, regs); | ||
| 50 | #if 0 | ||
| 51 | /* | ||
| 52 | * If we have an externally synchronized Linux clock, then update | ||
| 53 | * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be | ||
| 54 | * called as close as possible to 500 ms before the new second starts. | ||
| 55 | */ | ||
| 56 | if (ntp_synced() && | ||
| 57 | xtime.tv_sec > last_rtc_update + 660 && | ||
| 58 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | ||
| 59 | (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { | ||
| 60 | if (set_rtc_mmss (xtime.tv_sec) == 0) | ||
| 61 | last_rtc_update = xtime.tv_sec; | ||
| 62 | else | ||
| 63 | last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ | ||
| 64 | } | ||
| 65 | #ifdef CONFIG_HEARTBEAT | ||
| 66 | /* use power LED as a heartbeat instead -- much more useful | ||
| 67 | for debugging -- based on the version for PReP by Cort */ | ||
| 68 | /* acts like an actual heart beat -- ie thump-thump-pause... */ | ||
| 69 | if (mach_heartbeat) { | ||
| 70 | static unsigned cnt = 0, period = 0, dist = 0; | ||
| 71 | |||
| 72 | if (cnt == 0 || cnt == dist) | ||
| 73 | mach_heartbeat ( 1 ); | ||
| 74 | else if (cnt == 7 || cnt == dist+7) | ||
| 75 | mach_heartbeat ( 0 ); | ||
| 76 | |||
| 77 | if (++cnt > period) { | ||
| 78 | cnt = 0; | ||
| 79 | /* The hyperbolic function below modifies the heartbeat period | ||
| 80 | * length in dependency of the current (5min) load. It goes | ||
| 81 | * through the points f(0)=126, f(1)=86, f(5)=51, | ||
| 82 | * f(inf)->30. */ | ||
| 83 | period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30; | ||
| 84 | dist = period / 4; | ||
| 85 | } | ||
| 86 | } | ||
| 87 | #endif /* CONFIG_HEARTBEAT */ | ||
| 88 | #endif /* 0 */ | ||
| 89 | |||
| 90 | return IRQ_HANDLED; | ||
| 91 | } | ||
| 92 | |||
| 93 | static int timer_dev_id; | ||
| 94 | static struct irqaction timer_irqaction = { | ||
| 95 | .handler = timer_interrupt, | ||
| 96 | .flags = IRQF_DISABLED, | ||
| 97 | .mask = CPU_MASK_NONE, | ||
| 98 | .name = "timer", | ||
| 99 | .dev_id = &timer_dev_id, | ||
| 100 | }; | ||
| 101 | |||
| 102 | void time_init (void) | ||
| 103 | { | ||
| 104 | mach_gettimeofday (&xtime); | ||
| 105 | mach_sched_init (&timer_irqaction); | ||
| 106 | } | ||
diff --git a/arch/v850/kernel/v850_ksyms.c b/arch/v850/kernel/v850_ksyms.c deleted file mode 100644 index 8d386a5dbc4a..000000000000 --- a/arch/v850/kernel/v850_ksyms.c +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | #include <linux/module.h> | ||
| 2 | #include <linux/linkage.h> | ||
| 3 | #include <linux/sched.h> | ||
| 4 | #include <linux/string.h> | ||
| 5 | #include <linux/mm.h> | ||
| 6 | #include <linux/user.h> | ||
| 7 | #include <linux/elfcore.h> | ||
| 8 | #include <linux/in6.h> | ||
| 9 | #include <linux/interrupt.h> | ||
| 10 | |||
| 11 | #include <asm/pgalloc.h> | ||
| 12 | #include <asm/irq.h> | ||
| 13 | #include <asm/io.h> | ||
| 14 | #include <asm/checksum.h> | ||
| 15 | #include <asm/current.h> | ||
| 16 | |||
| 17 | |||
| 18 | extern void *trap_table; | ||
| 19 | EXPORT_SYMBOL (trap_table); | ||
| 20 | |||
| 21 | /* platform dependent support */ | ||
| 22 | EXPORT_SYMBOL (kernel_thread); | ||
| 23 | EXPORT_SYMBOL (__bug); | ||
| 24 | |||
| 25 | /* Networking helper routines. */ | ||
| 26 | EXPORT_SYMBOL (csum_partial_copy_nocheck); | ||
| 27 | EXPORT_SYMBOL (csum_partial_copy_from_user); | ||
| 28 | EXPORT_SYMBOL (ip_compute_csum); | ||
| 29 | EXPORT_SYMBOL (ip_fast_csum); | ||
| 30 | |||
| 31 | /* string / mem functions */ | ||
| 32 | EXPORT_SYMBOL (memset); | ||
| 33 | EXPORT_SYMBOL (memcpy); | ||
| 34 | EXPORT_SYMBOL (memmove); | ||
| 35 | |||
| 36 | /* | ||
| 37 | * libgcc functions - functions that are used internally by the | ||
| 38 | * compiler... (prototypes are not correct though, but that | ||
| 39 | * doesn't really matter since they're not versioned). | ||
| 40 | */ | ||
| 41 | extern void __ashldi3 (void); | ||
| 42 | extern void __ashrdi3 (void); | ||
| 43 | extern void __lshrdi3 (void); | ||
| 44 | extern void __muldi3 (void); | ||
| 45 | extern void __negdi2 (void); | ||
| 46 | |||
| 47 | EXPORT_SYMBOL (__ashldi3); | ||
| 48 | EXPORT_SYMBOL (__ashrdi3); | ||
| 49 | EXPORT_SYMBOL (__lshrdi3); | ||
| 50 | EXPORT_SYMBOL (__muldi3); | ||
| 51 | EXPORT_SYMBOL (__negdi2); | ||
diff --git a/arch/v850/kernel/v850e2_cache.c b/arch/v850/kernel/v850e2_cache.c deleted file mode 100644 index 4570312c689c..000000000000 --- a/arch/v850/kernel/v850e2_cache.c +++ /dev/null | |||
| @@ -1,127 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/v850e2_cache.c -- Cache control for V850E2 cache | ||
| 3 | * memories | ||
| 4 | * | ||
| 5 | * Copyright (C) 2003 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2003 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/mm.h> | ||
| 16 | |||
| 17 | #include <asm/v850e2_cache.h> | ||
| 18 | |||
| 19 | /* Cache operations we can do. The encoding corresponds directly to the | ||
| 20 | value we need to write into the COPR register. */ | ||
| 21 | enum cache_op { | ||
| 22 | OP_SYNC_IF_DIRTY = V850E2_CACHE_COPR_CFC(0), /* 000 */ | ||
| 23 | OP_SYNC_IF_VALID = V850E2_CACHE_COPR_CFC(1), /* 001 */ | ||
| 24 | OP_SYNC_IF_VALID_AND_CLEAR = V850E2_CACHE_COPR_CFC(3), /* 011 */ | ||
| 25 | OP_WAY_CLEAR = V850E2_CACHE_COPR_CFC(4), /* 100 */ | ||
| 26 | OP_FILL = V850E2_CACHE_COPR_CFC(5), /* 101 */ | ||
| 27 | OP_CLEAR = V850E2_CACHE_COPR_CFC(6), /* 110 */ | ||
| 28 | OP_CREATE_DIRTY = V850E2_CACHE_COPR_CFC(7) /* 111 */ | ||
| 29 | }; | ||
| 30 | |||
| 31 | /* Which cache to use. This encoding also corresponds directly to the | ||
| 32 | value we need to write into the COPR register. */ | ||
| 33 | enum cache { | ||
| 34 | ICACHE = 0, | ||
| 35 | DCACHE = V850E2_CACHE_COPR_LBSL | ||
| 36 | }; | ||
| 37 | |||
| 38 | /* Returns ADDR rounded down to the beginning of its cache-line. */ | ||
| 39 | #define CACHE_LINE_ADDR(addr) \ | ||
| 40 | ((addr) & ~(V850E2_CACHE_LINE_SIZE - 1)) | ||
| 41 | /* Returns END_ADDR rounded up to the `limit' of its cache-line. */ | ||
| 42 | #define CACHE_LINE_END_ADDR(end_addr) \ | ||
| 43 | CACHE_LINE_ADDR(end_addr + (V850E2_CACHE_LINE_SIZE - 1)) | ||
| 44 | |||
| 45 | |||
| 46 | /* Low-level cache ops. */ | ||
| 47 | |||
| 48 | /* Apply cache-op OP to all entries in CACHE. */ | ||
| 49 | static inline void cache_op_all (enum cache_op op, enum cache cache) | ||
| 50 | { | ||
| 51 | int cmd = op | cache | V850E2_CACHE_COPR_WSLE | V850E2_CACHE_COPR_STRT; | ||
| 52 | |||
| 53 | if (op != OP_WAY_CLEAR) { | ||
| 54 | /* The WAY_CLEAR operation does the whole way, but other | ||
| 55 | ops take begin-index and count params; we just indicate | ||
| 56 | the entire cache. */ | ||
| 57 | V850E2_CACHE_CADL = 0; | ||
| 58 | V850E2_CACHE_CADH = 0; | ||
| 59 | V850E2_CACHE_CCNT = V850E2_CACHE_WAY_SIZE - 1; | ||
| 60 | } | ||
| 61 | |||
| 62 | V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(0); /* way 0 */ | ||
| 63 | V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(1); /* way 1 */ | ||
| 64 | V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(2); /* way 2 */ | ||
| 65 | V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(3); /* way 3 */ | ||
| 66 | } | ||
| 67 | |||
| 68 | /* Apply cache-op OP to all entries in CACHE covering addresses ADDR | ||
| 69 | through ADDR+LEN. */ | ||
| 70 | static inline void cache_op_range (enum cache_op op, u32 addr, u32 len, | ||
| 71 | enum cache cache) | ||
| 72 | { | ||
| 73 | u32 start = CACHE_LINE_ADDR (addr); | ||
| 74 | u32 end = CACHE_LINE_END_ADDR (addr + len); | ||
| 75 | u32 num_lines = (end - start) >> V850E2_CACHE_LINE_SIZE_BITS; | ||
| 76 | |||
| 77 | V850E2_CACHE_CADL = start & 0xFFFF; | ||
| 78 | V850E2_CACHE_CADH = start >> 16; | ||
| 79 | V850E2_CACHE_CCNT = num_lines - 1; | ||
| 80 | |||
| 81 | V850E2_CACHE_COPR = op | cache | V850E2_CACHE_COPR_STRT; | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | /* High-level ops. */ | ||
| 86 | |||
| 87 | static void cache_exec_after_store_all (void) | ||
| 88 | { | ||
| 89 | cache_op_all (OP_SYNC_IF_DIRTY, DCACHE); | ||
| 90 | cache_op_all (OP_WAY_CLEAR, ICACHE); | ||
| 91 | } | ||
| 92 | |||
| 93 | static void cache_exec_after_store_range (u32 start, u32 len) | ||
| 94 | { | ||
| 95 | cache_op_range (OP_SYNC_IF_DIRTY, start, len, DCACHE); | ||
| 96 | cache_op_range (OP_CLEAR, start, len, ICACHE); | ||
| 97 | } | ||
| 98 | |||
| 99 | |||
| 100 | /* Exported functions. */ | ||
| 101 | |||
| 102 | void flush_icache (void) | ||
| 103 | { | ||
| 104 | cache_exec_after_store_all (); | ||
| 105 | } | ||
| 106 | |||
| 107 | void flush_icache_range (unsigned long start, unsigned long end) | ||
| 108 | { | ||
| 109 | cache_exec_after_store_range (start, end - start); | ||
| 110 | } | ||
| 111 | |||
| 112 | void flush_icache_page (struct vm_area_struct *vma, struct page *page) | ||
| 113 | { | ||
| 114 | cache_exec_after_store_range (page_to_virt (page), PAGE_SIZE); | ||
| 115 | } | ||
| 116 | |||
| 117 | void flush_icache_user_range (struct vm_area_struct *vma, struct page *page, | ||
| 118 | unsigned long addr, int len) | ||
| 119 | { | ||
| 120 | cache_exec_after_store_range (addr, len); | ||
| 121 | } | ||
| 122 | |||
| 123 | void flush_cache_sigtramp (unsigned long addr) | ||
| 124 | { | ||
| 125 | /* For the exact size, see signal.c, but 16 bytes should be enough. */ | ||
| 126 | cache_exec_after_store_range (addr, 16); | ||
| 127 | } | ||
diff --git a/arch/v850/kernel/v850e_cache.c b/arch/v850/kernel/v850e_cache.c deleted file mode 100644 index ea3e51cfb259..000000000000 --- a/arch/v850/kernel/v850e_cache.c +++ /dev/null | |||
| @@ -1,174 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/v850e_cache.c -- Cache control for V850E cache memories | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2003 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | /* This file implements cache control for the rather simple cache used on | ||
| 15 | some V850E CPUs, specifically the NB85E/TEG CPU-core and the V850E/ME2 | ||
| 16 | CPU. V850E2 processors have their own (better) cache | ||
| 17 | implementation. */ | ||
| 18 | |||
| 19 | #include <asm/entry.h> | ||
| 20 | #include <asm/cacheflush.h> | ||
| 21 | #include <asm/v850e_cache.h> | ||
| 22 | |||
| 23 | #define WAIT_UNTIL_CLEAR(value) while (value) {} | ||
| 24 | |||
| 25 | /* Set caching params via the BHC and DCC registers. */ | ||
| 26 | void v850e_cache_enable (u16 bhc, u16 icc, u16 dcc) | ||
| 27 | { | ||
| 28 | unsigned long *r0_ram = (unsigned long *)R0_RAM_ADDR; | ||
| 29 | register u16 bhc_val asm ("r6") = bhc; | ||
| 30 | |||
| 31 | /* Read the instruction cache control register (ICC) and confirm | ||
| 32 | that bits 0 and 1 (TCLR0, TCLR1) are all cleared. */ | ||
| 33 | WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3); | ||
| 34 | V850E_CACHE_ICC = icc; | ||
| 35 | |||
| 36 | #ifdef V850E_CACHE_DCC | ||
| 37 | /* Configure data-cache. */ | ||
| 38 | V850E_CACHE_DCC = dcc; | ||
| 39 | #endif /* V850E_CACHE_DCC */ | ||
| 40 | |||
| 41 | /* Configure caching for various memory regions by writing the BHC | ||
| 42 | register. The documentation says that an instruction _cannot_ | ||
| 43 | enable/disable caching for the memory region in which the | ||
| 44 | instruction itself exists; to work around this, we store | ||
| 45 | appropriate instructions into the on-chip RAM area (which is never | ||
| 46 | cached), and briefly jump there to do the work. */ | ||
| 47 | #ifdef V850E_CACHE_WRITE_IBS | ||
| 48 | *r0_ram++ = 0xf0720760; /* st.h r0, 0xfffff072[r0] */ | ||
| 49 | #endif | ||
| 50 | *r0_ram++ = 0xf06a3760; /* st.h r6, 0xfffff06a[r0] */ | ||
| 51 | *r0_ram = 0x5640006b; /* jmp [r11] */ | ||
| 52 | |||
| 53 | asm ("mov hilo(1f), r11; jmp [%1]; 1:;" | ||
| 54 | :: "r" (bhc_val), "r" (R0_RAM_ADDR) : "r11"); | ||
| 55 | } | ||
| 56 | |||
| 57 | static void clear_icache (void) | ||
| 58 | { | ||
| 59 | /* 1. Read the instruction cache control register (ICC) and confirm | ||
| 60 | that bits 0 and 1 (TCLR0, TCLR1) are all cleared. */ | ||
| 61 | WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3); | ||
| 62 | |||
| 63 | /* 2. Read the ICC register and confirm that bit 12 (LOCK0) is | ||
| 64 | cleared. Bit 13 of the ICC register is always cleared. */ | ||
| 65 | WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x1000); | ||
| 66 | |||
| 67 | /* 3. Set the TCLR0 and TCLR1 bits of the ICC register as follows, | ||
| 68 | when clearing way 0 and way 1 at the same time: | ||
| 69 | (a) Set the TCLR0 and TCLR1 bits. | ||
| 70 | (b) Read the TCLR0 and TCLR1 bits to confirm that these bits | ||
| 71 | are cleared. | ||
| 72 | (c) Perform (a) and (b) above again. */ | ||
| 73 | V850E_CACHE_ICC |= 0x3; | ||
| 74 | WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3); | ||
| 75 | |||
| 76 | #ifdef V850E_CACHE_REPEAT_ICC_WRITE | ||
| 77 | /* Do it again. */ | ||
| 78 | V850E_CACHE_ICC |= 0x3; | ||
| 79 | WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3); | ||
| 80 | #endif | ||
| 81 | } | ||
| 82 | |||
| 83 | #ifdef V850E_CACHE_DCC | ||
| 84 | /* Flush or clear (or both) the data cache, depending on the value of FLAGS; | ||
| 85 | the procedure is the same for both, just the control bits used differ (and | ||
| 86 | both may be performed simultaneously). */ | ||
| 87 | static void dcache_op (unsigned short flags) | ||
| 88 | { | ||
| 89 | /* 1. Read the data cache control register (DCC) and confirm that bits | ||
| 90 | 0, 1, 4, and 5 (DC00, DC01, DC04, DC05) are all cleared. */ | ||
| 91 | WAIT_UNTIL_CLEAR (V850E_CACHE_DCC & 0x33); | ||
| 92 | |||
| 93 | /* 2. Clear DCC register bit 12 (DC12), bit 13 (DC13), or both | ||
| 94 | depending on the way for which tags are to be cleared. */ | ||
| 95 | V850E_CACHE_DCC &= ~0xC000; | ||
| 96 | |||
| 97 | /* 3. Set DCC register bit 0 (DC00), bit 1 (DC01) or both depending on | ||
| 98 | the way for which tags are to be cleared. | ||
| 99 | ... | ||
| 100 | Set DCC register bit 4 (DC04), bit 5 (DC05), or both depending | ||
| 101 | on the way to be data flushed. */ | ||
| 102 | V850E_CACHE_DCC |= flags; | ||
| 103 | |||
| 104 | /* 4. Read DCC register bit DC00, DC01 [DC04, DC05], or both depending | ||
| 105 | on the way for which tags were cleared [flushed] and confirm | ||
| 106 | that that bit is cleared. */ | ||
| 107 | WAIT_UNTIL_CLEAR (V850E_CACHE_DCC & flags); | ||
| 108 | } | ||
| 109 | #endif /* V850E_CACHE_DCC */ | ||
| 110 | |||
| 111 | /* Flushes the contents of the dcache to memory. */ | ||
| 112 | static inline void flush_dcache (void) | ||
| 113 | { | ||
| 114 | #ifdef V850E_CACHE_DCC | ||
| 115 | /* We only need to do something if in write-back mode. */ | ||
| 116 | if (V850E_CACHE_DCC & 0x0400) | ||
| 117 | dcache_op (0x30); | ||
| 118 | #endif /* V850E_CACHE_DCC */ | ||
| 119 | } | ||
| 120 | |||
| 121 | /* Flushes the contents of the dcache to memory, and then clears it. */ | ||
| 122 | static inline void clear_dcache (void) | ||
| 123 | { | ||
| 124 | #ifdef V850E_CACHE_DCC | ||
| 125 | /* We only need to do something if the dcache is enabled. */ | ||
| 126 | if (V850E_CACHE_DCC & 0x0C00) | ||
| 127 | dcache_op (0x33); | ||
| 128 | #endif /* V850E_CACHE_DCC */ | ||
| 129 | } | ||
| 130 | |||
| 131 | /* Clears the dcache without flushing to memory first. */ | ||
| 132 | static inline void clear_dcache_no_flush (void) | ||
| 133 | { | ||
| 134 | #ifdef V850E_CACHE_DCC | ||
| 135 | /* We only need to do something if the dcache is enabled. */ | ||
| 136 | if (V850E_CACHE_DCC & 0x0C00) | ||
| 137 | dcache_op (0x3); | ||
| 138 | #endif /* V850E_CACHE_DCC */ | ||
| 139 | } | ||
| 140 | |||
| 141 | static inline void cache_exec_after_store (void) | ||
| 142 | { | ||
| 143 | flush_dcache (); | ||
| 144 | clear_icache (); | ||
| 145 | } | ||
| 146 | |||
| 147 | |||
| 148 | /* Exported functions. */ | ||
| 149 | |||
| 150 | void flush_icache (void) | ||
| 151 | { | ||
| 152 | cache_exec_after_store (); | ||
| 153 | } | ||
| 154 | |||
| 155 | void flush_icache_range (unsigned long start, unsigned long end) | ||
| 156 | { | ||
| 157 | cache_exec_after_store (); | ||
| 158 | } | ||
| 159 | |||
| 160 | void flush_icache_page (struct vm_area_struct *vma, struct page *page) | ||
| 161 | { | ||
| 162 | cache_exec_after_store (); | ||
| 163 | } | ||
| 164 | |||
| 165 | void flush_icache_user_range (struct vm_area_struct *vma, struct page *page, | ||
| 166 | unsigned long adr, int len) | ||
| 167 | { | ||
| 168 | cache_exec_after_store (); | ||
| 169 | } | ||
| 170 | |||
| 171 | void flush_cache_sigtramp (unsigned long addr) | ||
| 172 | { | ||
| 173 | cache_exec_after_store (); | ||
| 174 | } | ||
diff --git a/arch/v850/kernel/v850e_intc.c b/arch/v850/kernel/v850e_intc.c deleted file mode 100644 index 8d39a52ee6d1..000000000000 --- a/arch/v850/kernel/v850e_intc.c +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/kernel/v850e_intc.c -- V850E interrupt controller (INTC) | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/kernel.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/irq.h> | ||
| 17 | |||
| 18 | #include <asm/v850e_intc.h> | ||
| 19 | |||
| 20 | static void irq_nop (unsigned irq) { } | ||
| 21 | |||
| 22 | static unsigned v850e_intc_irq_startup (unsigned irq) | ||
| 23 | { | ||
| 24 | v850e_intc_clear_pending_irq (irq); | ||
| 25 | v850e_intc_enable_irq (irq); | ||
| 26 | return 0; | ||
| 27 | } | ||
| 28 | |||
| 29 | static void v850e_intc_end_irq (unsigned irq) | ||
| 30 | { | ||
| 31 | unsigned long psw, temp; | ||
| 32 | |||
| 33 | /* Clear the highest-level bit in the In-service priority register | ||
| 34 | (ISPR), to allow this interrupt (or another of the same or | ||
| 35 | lesser priority) to happen again. | ||
| 36 | |||
| 37 | The `reti' instruction normally does this automatically when the | ||
| 38 | PSW bits EP and NP are zero, but we can't always rely on reti | ||
| 39 | being used consistently to return after an interrupt (another | ||
| 40 | process can be scheduled, for instance, which can delay the | ||
| 41 | associated reti for a long time, or this process may be being | ||
| 42 | single-stepped, which uses the `dbret' instruction to return | ||
| 43 | from the kernel). | ||
| 44 | |||
| 45 | We also set the PSW EP bit, which prevents reti from also | ||
| 46 | trying to modify the ISPR itself. */ | ||
| 47 | |||
| 48 | /* Get PSW and disable interrupts. */ | ||
| 49 | asm volatile ("stsr psw, %0; di" : "=r" (psw)); | ||
| 50 | /* We don't want to do anything for NMIs (they don't use the ISPR). */ | ||
| 51 | if (! (psw & 0xC0)) { | ||
| 52 | /* Transition to `trap' state, so that an eventual real | ||
| 53 | reti instruction won't modify the ISPR. */ | ||
| 54 | psw |= 0x40; | ||
| 55 | /* Fake an interrupt return, which automatically clears the | ||
| 56 | appropriate bit in the ISPR. */ | ||
| 57 | asm volatile ("mov hilo(1f), %0;" | ||
| 58 | "ldsr %0, eipc; ldsr %1, eipsw;" | ||
| 59 | "reti;" | ||
| 60 | "1:" | ||
| 61 | : "=&r" (temp) : "r" (psw)); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | /* Initialize HW_IRQ_TYPES for INTC-controlled irqs described in array | ||
| 66 | INITS (which is terminated by an entry with the name field == 0). */ | ||
| 67 | void __init v850e_intc_init_irq_types (struct v850e_intc_irq_init *inits, | ||
| 68 | struct hw_interrupt_type *hw_irq_types) | ||
| 69 | { | ||
| 70 | struct v850e_intc_irq_init *init; | ||
| 71 | for (init = inits; init->name; init++) { | ||
| 72 | unsigned i; | ||
| 73 | struct hw_interrupt_type *hwit = hw_irq_types++; | ||
| 74 | |||
| 75 | hwit->typename = init->name; | ||
| 76 | |||
| 77 | hwit->startup = v850e_intc_irq_startup; | ||
| 78 | hwit->shutdown = v850e_intc_disable_irq; | ||
| 79 | hwit->enable = v850e_intc_enable_irq; | ||
| 80 | hwit->disable = v850e_intc_disable_irq; | ||
| 81 | hwit->ack = irq_nop; | ||
| 82 | hwit->end = v850e_intc_end_irq; | ||
| 83 | |||
| 84 | /* Initialize kernel IRQ infrastructure for this interrupt. */ | ||
| 85 | init_irq_handlers(init->base, init->num, init->interval, hwit); | ||
| 86 | |||
| 87 | /* Set the interrupt priorities. */ | ||
| 88 | for (i = 0; i < init->num; i++) { | ||
| 89 | unsigned irq = init->base + i * init->interval; | ||
| 90 | |||
| 91 | /* If the interrupt is currently enabled (all | ||
| 92 | interrupts are initially disabled), then | ||
| 93 | assume whoever enabled it has set things up | ||
| 94 | properly, and avoid messing with it. */ | ||
| 95 | if (! v850e_intc_irq_enabled (irq)) | ||
| 96 | /* This write also (1) disables the | ||
| 97 | interrupt, and (2) clears any pending | ||
| 98 | interrupts. */ | ||
| 99 | V850E_INTC_IC (irq) | ||
| 100 | = (V850E_INTC_IC_PR (init->priority) | ||
| 101 | | V850E_INTC_IC_MK); | ||
| 102 | } | ||
| 103 | } | ||
| 104 | } | ||
diff --git a/arch/v850/kernel/v850e_timer_d.c b/arch/v850/kernel/v850e_timer_d.c deleted file mode 100644 index d2a4ece2574c..000000000000 --- a/arch/v850/kernel/v850e_timer_d.c +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-v850/v850e_timer_d.c -- `Timer D' component often used | ||
| 3 | * with V850E CPUs | ||
| 4 | * | ||
| 5 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/kernel.h> | ||
| 16 | |||
| 17 | #include <asm/v850e_utils.h> | ||
| 18 | #include <asm/v850e_timer_d.h> | ||
| 19 | |||
| 20 | /* Start interval timer TIMER (0-3). The timer will issue the | ||
| 21 | corresponding INTCMD interrupt RATE times per second. | ||
| 22 | This function does not enable the interrupt. */ | ||
| 23 | void v850e_timer_d_configure (unsigned timer, unsigned rate) | ||
| 24 | { | ||
| 25 | unsigned divlog2, count; | ||
| 26 | |||
| 27 | /* Calculate params for timer. */ | ||
| 28 | if (! calc_counter_params ( | ||
| 29 | V850E_TIMER_D_BASE_FREQ, rate, | ||
| 30 | V850E_TIMER_D_TMCD_CS_MIN, V850E_TIMER_D_TMCD_CS_MAX, 16, | ||
| 31 | &divlog2, &count)) | ||
| 32 | printk (KERN_WARNING | ||
| 33 | "Cannot find interval timer %d setting suitable" | ||
| 34 | " for rate of %dHz.\n" | ||
| 35 | "Using rate of %dHz instead.\n", | ||
| 36 | timer, rate, | ||
| 37 | (V850E_TIMER_D_BASE_FREQ >> divlog2) >> 16); | ||
| 38 | |||
| 39 | /* Do the actual hardware timer initialization: */ | ||
| 40 | |||
| 41 | /* Enable timer. */ | ||
| 42 | V850E_TIMER_D_TMCD(timer) = V850E_TIMER_D_TMCD_CAE; | ||
| 43 | /* Set clock divider. */ | ||
| 44 | V850E_TIMER_D_TMCD(timer) | ||
| 45 | = V850E_TIMER_D_TMCD_CAE | ||
| 46 | | V850E_TIMER_D_TMCD_CS(divlog2); | ||
| 47 | /* Set timer compare register. */ | ||
| 48 | V850E_TIMER_D_CMD(timer) = count; | ||
| 49 | /* Start counting. */ | ||
| 50 | V850E_TIMER_D_TMCD(timer) | ||
| 51 | = V850E_TIMER_D_TMCD_CAE | ||
| 52 | | V850E_TIMER_D_TMCD_CS(divlog2) | ||
| 53 | | V850E_TIMER_D_TMCD_CE; | ||
| 54 | } | ||
diff --git a/arch/v850/kernel/v850e_utils.c b/arch/v850/kernel/v850e_utils.c deleted file mode 100644 index e6807ef8dee6..000000000000 --- a/arch/v850/kernel/v850e_utils.c +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-v850/v850e_utils.h -- Utility functions associated with | ||
| 3 | * V850E CPUs | ||
| 4 | * | ||
| 5 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 6 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General | ||
| 9 | * Public License. See the file COPYING in the main directory of this | ||
| 10 | * archive for more details. | ||
| 11 | * | ||
| 12 | * Written by Miles Bader <miles@gnu.org> | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <asm/v850e_utils.h> | ||
| 16 | |||
| 17 | /* Calculate counter clock-divider and count values to attain the | ||
| 18 | desired frequency RATE from the base frequency BASE_FREQ. The | ||
| 19 | counter is expected to have a clock-divider, which can divide the | ||
| 20 | system cpu clock by a power of two value from MIN_DIVLOG2 to | ||
| 21 | MAX_DIV_LOG2, and a word-size of COUNTER_SIZE bits (the counter | ||
| 22 | counts up and resets whenever it's equal to the compare register, | ||
| 23 | generating an interrupt or whatever when it does so). The returned | ||
| 24 | values are: *DIVLOG2 -- log2 of the desired clock divider and *COUNT | ||
| 25 | -- the counter compare value to use. Returns true if it was possible | ||
| 26 | to find a reasonable value, otherwise false (and the other return | ||
| 27 | values will be set to be as good as possible). */ | ||
| 28 | int calc_counter_params (unsigned long base_freq, | ||
| 29 | unsigned long rate, | ||
| 30 | unsigned min_divlog2, unsigned max_divlog2, | ||
| 31 | unsigned counter_size, | ||
| 32 | unsigned *divlog2, unsigned *count) | ||
| 33 | { | ||
| 34 | unsigned _divlog2; | ||
| 35 | int ok = 0; | ||
| 36 | |||
| 37 | /* Find the lowest clock divider setting that can represent RATE. */ | ||
| 38 | for (_divlog2 = min_divlog2; _divlog2 <= max_divlog2; _divlog2++) { | ||
| 39 | /* Minimum interrupt rate possible using this divider. */ | ||
| 40 | unsigned min_int_rate | ||
| 41 | = (base_freq >> _divlog2) >> counter_size; | ||
| 42 | |||
| 43 | if (min_int_rate <= rate) { | ||
| 44 | /* This setting is the highest resolution | ||
| 45 | setting that's slow enough enough to attain | ||
| 46 | RATE interrupts per second, so use it. */ | ||
| 47 | ok = 1; | ||
| 48 | break; | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | if (_divlog2 > max_divlog2) | ||
| 53 | /* Can't find correct setting. */ | ||
| 54 | _divlog2 = max_divlog2; | ||
| 55 | |||
| 56 | if (divlog2) | ||
| 57 | *divlog2 = _divlog2; | ||
| 58 | if (count) | ||
| 59 | *count = ((base_freq >> _divlog2) + rate/2) / rate; | ||
| 60 | |||
| 61 | return ok; | ||
| 62 | } | ||
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S deleted file mode 100644 index d08cd1d27f27..000000000000 --- a/arch/v850/kernel/vmlinux.lds.S +++ /dev/null | |||
| @@ -1,306 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002,03,04,05 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2002,03,04,05 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | |||
| 15 | #define VMLINUX_SYMBOL(_sym_) _##_sym_ | ||
| 16 | #include <asm-generic/vmlinux.lds.h> | ||
| 17 | |||
| 18 | /* For most platforms, this will define useful things like RAM addr/size. */ | ||
| 19 | #include <asm/machdep.h> | ||
| 20 | |||
| 21 | |||
| 22 | /* The following macros contain the usual definitions for various data areas. | ||
| 23 | The prefix `RAMK_' is used to indicate macros suitable for kernels loaded | ||
| 24 | into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all | ||
| 25 | symbols are prefixed with an extra `_' for compatibility with the v850 | ||
| 26 | toolchain. */ | ||
| 27 | |||
| 28 | |||
| 29 | /* Interrupt vectors. */ | ||
| 30 | #define INTV_CONTENTS \ | ||
| 31 | . = ALIGN (0x10) ; \ | ||
| 32 | __intv_start = . ; \ | ||
| 33 | *(.intv.reset) /* Reset vector */ \ | ||
| 34 | . = __intv_start + 0x10 ; \ | ||
| 35 | *(.intv.common) /* Vectors common to all v850e proc */\ | ||
| 36 | . = __intv_start + 0x80 ; \ | ||
| 37 | *(.intv.mach) /* Machine-specific int. vectors. */ \ | ||
| 38 | __intv_end = . ; | ||
| 39 | |||
| 40 | #define RODATA_CONTENTS \ | ||
| 41 | . = ALIGN (16) ; \ | ||
| 42 | *(.rodata) *(.rodata.*) \ | ||
| 43 | *(__vermagic) /* Kernel version magic */ \ | ||
| 44 | *(.rodata1) \ | ||
| 45 | /* PCI quirks */ \ | ||
| 46 | ___start_pci_fixups_early = . ; \ | ||
| 47 | *(.pci_fixup_early) \ | ||
| 48 | ___end_pci_fixups_early = . ; \ | ||
| 49 | ___start_pci_fixups_header = . ; \ | ||
| 50 | *(.pci_fixup_header) \ | ||
| 51 | ___end_pci_fixups_header = . ; \ | ||
| 52 | ___start_pci_fixups_final = . ; \ | ||
| 53 | *(.pci_fixup_final) \ | ||
| 54 | ___end_pci_fixups_final = . ; \ | ||
| 55 | ___start_pci_fixups_enable = . ; \ | ||
| 56 | *(.pci_fixup_enable) \ | ||
| 57 | ___end_pci_fixups_enable = . ; \ | ||
| 58 | /* Kernel symbol table: Normal symbols */ \ | ||
| 59 | ___start___ksymtab = .; \ | ||
| 60 | *(__ksymtab) \ | ||
| 61 | ___stop___ksymtab = .; \ | ||
| 62 | /* Kernel symbol table: GPL-only symbols */ \ | ||
| 63 | ___start___ksymtab_gpl = .; \ | ||
| 64 | *(__ksymtab_gpl) \ | ||
| 65 | ___stop___ksymtab_gpl = .; \ | ||
| 66 | /* Kernel symbol table: GPL-future symbols */ \ | ||
| 67 | ___start___ksymtab_gpl_future = .; \ | ||
| 68 | *(__ksymtab_gpl_future) \ | ||
| 69 | ___stop___ksymtab_gpl_future = .; \ | ||
| 70 | /* Kernel symbol table: strings */ \ | ||
| 71 | *(__ksymtab_strings) \ | ||
| 72 | /* Kernel symbol table: Normal symbols */ \ | ||
| 73 | ___start___kcrctab = .; \ | ||
| 74 | *(__kcrctab) \ | ||
| 75 | ___stop___kcrctab = .; \ | ||
| 76 | /* Kernel symbol table: GPL-only symbols */ \ | ||
| 77 | ___start___kcrctab_gpl = .; \ | ||
| 78 | *(__kcrctab_gpl) \ | ||
| 79 | ___stop___kcrctab_gpl = .; \ | ||
| 80 | /* Kernel symbol table: GPL-future symbols */ \ | ||
| 81 | ___start___kcrctab_gpl_future = .; \ | ||
| 82 | *(__kcrctab_gpl_future) \ | ||
| 83 | ___stop___kcrctab_gpl_future = .; \ | ||
| 84 | /* Built-in module parameters */ \ | ||
| 85 | . = ALIGN (4) ; \ | ||
| 86 | ___start___param = .; \ | ||
| 87 | *(__param) \ | ||
| 88 | ___stop___param = .; | ||
| 89 | |||
| 90 | |||
| 91 | /* Kernel text segment, and some constant data areas. */ | ||
| 92 | #define TEXT_CONTENTS \ | ||
| 93 | _text = .; \ | ||
| 94 | __stext = . ; \ | ||
| 95 | TEXT_TEXT \ | ||
| 96 | SCHED_TEXT \ | ||
| 97 | *(.exit.text) /* 2.5 convention */ \ | ||
| 98 | *(.text.exit) /* 2.4 convention */ \ | ||
| 99 | *(.text.lock) \ | ||
| 100 | *(.exitcall.exit) \ | ||
| 101 | __real_etext = . ; /* There may be data after here. */ \ | ||
| 102 | RODATA_CONTENTS \ | ||
| 103 | . = ALIGN (4) ; \ | ||
| 104 | *(.call_table_data) \ | ||
| 105 | *(.call_table_text) \ | ||
| 106 | . = ALIGN (16) ; /* Exception table. */ \ | ||
| 107 | ___start___ex_table = . ; \ | ||
| 108 | *(__ex_table) \ | ||
| 109 | ___stop___ex_table = . ; \ | ||
| 110 | . = ALIGN (4) ; \ | ||
| 111 | __etext = . ; | ||
| 112 | |||
| 113 | /* Kernel data segment. */ | ||
| 114 | #define DATA_CONTENTS \ | ||
| 115 | __sdata = . ; \ | ||
| 116 | DATA_DATA \ | ||
| 117 | EXIT_DATA /* 2.5 convention */ \ | ||
| 118 | *(.data.exit) /* 2.4 convention */ \ | ||
| 119 | . = ALIGN (16) ; \ | ||
| 120 | *(.data.cacheline_aligned) \ | ||
| 121 | . = ALIGN (0x2000) ; \ | ||
| 122 | *(.data.init_task) \ | ||
| 123 | . = ALIGN (0x2000) ; \ | ||
| 124 | __edata = . ; | ||
| 125 | |||
| 126 | /* Kernel BSS segment. */ | ||
| 127 | #define BSS_CONTENTS \ | ||
| 128 | __sbss = . ; \ | ||
| 129 | *(.bss) \ | ||
| 130 | *(COMMON) \ | ||
| 131 | . = ALIGN (4) ; \ | ||
| 132 | __init_stack_end = . ; \ | ||
| 133 | __ebss = . ; | ||
| 134 | |||
| 135 | /* `initcall' tables. */ | ||
| 136 | #define INITCALL_CONTENTS \ | ||
| 137 | . = ALIGN (16) ; \ | ||
| 138 | ___setup_start = . ; \ | ||
| 139 | *(.init.setup) /* 2.5 convention */ \ | ||
| 140 | *(.setup.init) /* 2.4 convention */ \ | ||
| 141 | ___setup_end = . ; \ | ||
| 142 | ___initcall_start = . ; \ | ||
| 143 | *(.initcall.init) \ | ||
| 144 | INITCALLS \ | ||
| 145 | . = ALIGN (4) ; \ | ||
| 146 | ___initcall_end = . ; \ | ||
| 147 | ___con_initcall_start = .; \ | ||
| 148 | *(.con_initcall.init) \ | ||
| 149 | ___con_initcall_end = .; | ||
| 150 | |||
| 151 | /* Contents of `init' section for a kernel that's loaded into RAM. */ | ||
| 152 | #define RAMK_INIT_CONTENTS \ | ||
| 153 | RAMK_INIT_CONTENTS_NO_END \ | ||
| 154 | __init_end = . ; | ||
| 155 | /* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */ | ||
| 156 | #define RAMK_INIT_CONTENTS_NO_END \ | ||
| 157 | . = ALIGN (4096) ; \ | ||
| 158 | __init_start = . ; \ | ||
| 159 | __sinittext = .; \ | ||
| 160 | INIT_TEXT /* 2.5 convention */ \ | ||
| 161 | __einittext = .; \ | ||
| 162 | INIT_DATA \ | ||
| 163 | *(.text.init) /* 2.4 convention */ \ | ||
| 164 | *(.data.init) \ | ||
| 165 | INITCALL_CONTENTS \ | ||
| 166 | INITRAMFS_CONTENTS | ||
| 167 | |||
| 168 | /* The contents of `init' section for a ROM-resident kernel which | ||
| 169 | should go into RAM. */ | ||
| 170 | #define ROMK_INIT_RAM_CONTENTS \ | ||
| 171 | . = ALIGN (4096) ; \ | ||
| 172 | __init_start = . ; \ | ||
| 173 | INIT_DATA /* 2.5 convention */ \ | ||
| 174 | *(.data.init) /* 2.4 convention */ \ | ||
| 175 | __init_end = . ; \ | ||
| 176 | . = ALIGN (4096) ; | ||
| 177 | |||
| 178 | /* The contents of `init' section for a ROM-resident kernel which | ||
| 179 | should go into ROM. */ | ||
| 180 | #define ROMK_INIT_ROM_CONTENTS \ | ||
| 181 | _sinittext = .; \ | ||
| 182 | INIT_TEXT /* 2.5 convention */ \ | ||
| 183 | _einittext = .; \ | ||
| 184 | *(.text.init) /* 2.4 convention */ \ | ||
| 185 | INITCALL_CONTENTS \ | ||
| 186 | INITRAMFS_CONTENTS | ||
| 187 | |||
| 188 | /* A root filesystem image, for kernels with an embedded root filesystem. */ | ||
| 189 | #define ROOT_FS_CONTENTS \ | ||
| 190 | __root_fs_image_start = . ; \ | ||
| 191 | *(.root) \ | ||
| 192 | __root_fs_image_end = . ; | ||
| 193 | |||
| 194 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 195 | /* The initramfs archive. */ | ||
| 196 | #define INITRAMFS_CONTENTS \ | ||
| 197 | . = ALIGN (4) ; \ | ||
| 198 | ___initramfs_start = . ; \ | ||
| 199 | *(.init.ramfs) \ | ||
| 200 | ___initramfs_end = . ; | ||
| 201 | #endif | ||
| 202 | |||
| 203 | /* Where the initial bootmap (bitmap for the boot-time memory allocator) | ||
| 204 | should be place. */ | ||
| 205 | #define BOOTMAP_CONTENTS \ | ||
| 206 | . = ALIGN (4096) ; \ | ||
| 207 | __bootmap = . ; \ | ||
| 208 | . = . + 4096 ; /* enough for 128MB. */ | ||
| 209 | |||
| 210 | /* The contents of a `typical' kram area for a kernel in RAM. */ | ||
| 211 | #define RAMK_KRAM_CONTENTS \ | ||
| 212 | __kram_start = . ; \ | ||
| 213 | TEXT_CONTENTS \ | ||
| 214 | DATA_CONTENTS \ | ||
| 215 | BSS_CONTENTS \ | ||
| 216 | RAMK_INIT_CONTENTS \ | ||
| 217 | __kram_end = . ; \ | ||
| 218 | BOOTMAP_CONTENTS | ||
| 219 | |||
| 220 | |||
| 221 | /* Define output sections normally used for a ROM-resident kernel. | ||
| 222 | ROM and RAM should be appropriate memory areas to use for kernel | ||
| 223 | ROM and RAM data. This assumes that ROM starts at 0 (and thus can | ||
| 224 | hold the interrupt vectors). */ | ||
| 225 | #define ROMK_SECTIONS(ROM, RAM) \ | ||
| 226 | .rom : { \ | ||
| 227 | INTV_CONTENTS \ | ||
| 228 | TEXT_CONTENTS \ | ||
| 229 | ROMK_INIT_ROM_CONTENTS \ | ||
| 230 | ROOT_FS_CONTENTS \ | ||
| 231 | } > ROM \ | ||
| 232 | \ | ||
| 233 | __rom_copy_src_start = . ; \ | ||
| 234 | \ | ||
| 235 | .data : { \ | ||
| 236 | __kram_start = . ; \ | ||
| 237 | __rom_copy_dst_start = . ; \ | ||
| 238 | DATA_CONTENTS \ | ||
| 239 | ROMK_INIT_RAM_CONTENTS \ | ||
| 240 | __rom_copy_dst_end = . ; \ | ||
| 241 | } > RAM AT> ROM \ | ||
| 242 | \ | ||
| 243 | .bss ALIGN (4) : { \ | ||
| 244 | BSS_CONTENTS \ | ||
| 245 | __kram_end = . ; \ | ||
| 246 | BOOTMAP_CONTENTS \ | ||
| 247 | } > RAM | ||
| 248 | |||
| 249 | |||
| 250 | /* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */ | ||
| 251 | _jiffies = _jiffies_64 ; | ||
| 252 | |||
| 253 | |||
| 254 | /* Include an appropriate platform-dependent linker-script (which | ||
| 255 | usually should use the above macros to do most of the work). */ | ||
| 256 | |||
| 257 | #ifdef CONFIG_V850E_SIM | ||
| 258 | # include "sim.ld" | ||
| 259 | #endif | ||
| 260 | |||
| 261 | #ifdef CONFIG_V850E2_SIM85E2 | ||
| 262 | # include "sim85e2.ld" | ||
| 263 | #endif | ||
| 264 | |||
| 265 | #ifdef CONFIG_V850E2_FPGA85E2C | ||
| 266 | # include "fpga85e2c.ld" | ||
| 267 | #endif | ||
| 268 | |||
| 269 | #ifdef CONFIG_V850E2_ANNA | ||
| 270 | # ifdef CONFIG_ROM_KERNEL | ||
| 271 | # include "anna-rom.ld" | ||
| 272 | # else | ||
| 273 | # include "anna.ld" | ||
| 274 | # endif | ||
| 275 | #endif | ||
| 276 | |||
| 277 | #ifdef CONFIG_V850E_AS85EP1 | ||
| 278 | # ifdef CONFIG_ROM_KERNEL | ||
| 279 | # include "as85ep1-rom.ld" | ||
| 280 | # else | ||
| 281 | # include "as85ep1.ld" | ||
| 282 | # endif | ||
| 283 | #endif | ||
| 284 | |||
| 285 | #ifdef CONFIG_RTE_CB_MA1 | ||
| 286 | # ifdef CONFIG_ROM_KERNEL | ||
| 287 | # include "rte_ma1_cb-rom.ld" | ||
| 288 | # else | ||
| 289 | # include "rte_ma1_cb.ld" | ||
| 290 | # endif | ||
| 291 | #endif | ||
| 292 | |||
| 293 | #ifdef CONFIG_RTE_CB_NB85E | ||
| 294 | # ifdef CONFIG_ROM_KERNEL | ||
| 295 | # include "rte_nb85e_cb-rom.ld" | ||
| 296 | # elif defined(CONFIG_RTE_CB_MULTI) | ||
| 297 | # include "rte_nb85e_cb-multi.ld" | ||
| 298 | # else | ||
| 299 | # include "rte_nb85e_cb.ld" | ||
| 300 | # endif | ||
| 301 | #endif | ||
| 302 | |||
| 303 | #ifdef CONFIG_RTE_CB_ME2 | ||
| 304 | # include "rte_me2_cb.ld" | ||
| 305 | #endif | ||
| 306 | |||
diff --git a/arch/v850/lib/Makefile b/arch/v850/lib/Makefile deleted file mode 100644 index 1c78b728a117..000000000000 --- a/arch/v850/lib/Makefile +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | # | ||
| 2 | # arch/v850/lib/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | lib-y = ashrdi3.o ashldi3.o lshrdi3.o muldi3.o negdi2.o \ | ||
| 6 | checksum.o memcpy.o memset.o | ||
diff --git a/arch/v850/lib/ashldi3.c b/arch/v850/lib/ashldi3.c deleted file mode 100644 index 9e792d53f0e4..000000000000 --- a/arch/v850/lib/ashldi3.c +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | /* ashldi3.c extracted from gcc-2.95.2/libgcc2.c which is: */ | ||
| 2 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU CC. | ||
| 5 | |||
| 6 | GNU CC 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, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | GNU CC is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU CC; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 21 | #define BITS_PER_UNIT 8 | ||
| 22 | |||
| 23 | typedef int SItype __attribute__ ((mode (SI))); | ||
| 24 | typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
| 25 | typedef int DItype __attribute__ ((mode (DI))); | ||
| 26 | typedef int word_type __attribute__ ((mode (__word__))); | ||
| 27 | |||
| 28 | struct DIstruct {SItype high, low;}; | ||
| 29 | |||
| 30 | typedef union | ||
| 31 | { | ||
| 32 | struct DIstruct s; | ||
| 33 | DItype ll; | ||
| 34 | } DIunion; | ||
| 35 | |||
| 36 | DItype | ||
| 37 | __ashldi3 (DItype u, word_type b) | ||
| 38 | { | ||
| 39 | DIunion w; | ||
| 40 | word_type bm; | ||
| 41 | DIunion uu; | ||
| 42 | |||
| 43 | if (b == 0) | ||
| 44 | return u; | ||
| 45 | |||
| 46 | uu.ll = u; | ||
| 47 | |||
| 48 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | ||
| 49 | if (bm <= 0) | ||
| 50 | { | ||
| 51 | w.s.low = 0; | ||
| 52 | w.s.high = (USItype)uu.s.low << -bm; | ||
| 53 | } | ||
| 54 | else | ||
| 55 | { | ||
| 56 | USItype carries = (USItype)uu.s.low >> bm; | ||
| 57 | w.s.low = (USItype)uu.s.low << b; | ||
| 58 | w.s.high = ((USItype)uu.s.high << b) | carries; | ||
| 59 | } | ||
| 60 | |||
| 61 | return w.ll; | ||
| 62 | } | ||
diff --git a/arch/v850/lib/ashrdi3.c b/arch/v850/lib/ashrdi3.c deleted file mode 100644 index 78efb65e315a..000000000000 --- a/arch/v850/lib/ashrdi3.c +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | /* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */ | ||
| 2 | /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU CC. | ||
| 5 | |||
| 6 | GNU CC 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, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | GNU CC is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU CC; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 21 | #define BITS_PER_UNIT 8 | ||
| 22 | |||
| 23 | typedef int SItype __attribute__ ((mode (SI))); | ||
| 24 | typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
| 25 | typedef int DItype __attribute__ ((mode (DI))); | ||
| 26 | typedef int word_type __attribute__ ((mode (__word__))); | ||
| 27 | |||
| 28 | struct DIstruct {SItype high, low;}; | ||
| 29 | |||
| 30 | typedef union | ||
| 31 | { | ||
| 32 | struct DIstruct s; | ||
| 33 | DItype ll; | ||
| 34 | } DIunion; | ||
| 35 | |||
| 36 | DItype | ||
| 37 | __ashrdi3 (DItype u, word_type b) | ||
| 38 | { | ||
| 39 | DIunion w; | ||
| 40 | word_type bm; | ||
| 41 | DIunion uu; | ||
| 42 | |||
| 43 | if (b == 0) | ||
| 44 | return u; | ||
| 45 | |||
| 46 | uu.ll = u; | ||
| 47 | |||
| 48 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | ||
| 49 | if (bm <= 0) | ||
| 50 | { | ||
| 51 | /* w.s.high = 1..1 or 0..0 */ | ||
| 52 | w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1); | ||
| 53 | w.s.low = uu.s.high >> -bm; | ||
| 54 | } | ||
| 55 | else | ||
| 56 | { | ||
| 57 | USItype carries = (USItype)uu.s.high << bm; | ||
| 58 | w.s.high = uu.s.high >> b; | ||
| 59 | w.s.low = ((USItype)uu.s.low >> b) | carries; | ||
| 60 | } | ||
| 61 | |||
| 62 | return w.ll; | ||
| 63 | } | ||
diff --git a/arch/v850/lib/checksum.c b/arch/v850/lib/checksum.c deleted file mode 100644 index 042158dfe17a..000000000000 --- a/arch/v850/lib/checksum.c +++ /dev/null | |||
| @@ -1,155 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
| 3 | * operating system. INET is implemented using the BSD Socket | ||
| 4 | * interface as the means of communication with the user level. | ||
| 5 | * | ||
| 6 | * MIPS specific IP/TCP/UDP checksumming routines | ||
| 7 | * | ||
| 8 | * Authors: Ralf Baechle, <ralf@waldorf-gmbh.de> | ||
| 9 | * Lots of code moved from tcp.c and ip.c; see those files | ||
| 10 | * for more names. | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License | ||
| 14 | * as published by the Free Software Foundation; either version | ||
| 15 | * 2 of the License, or (at your option) any later version. | ||
| 16 | * | ||
| 17 | * $Id: checksum.c,v 1.1 2002/09/28 14:58:40 gerg Exp $ | ||
| 18 | */ | ||
| 19 | #include <net/checksum.h> | ||
| 20 | #include <linux/module.h> | ||
| 21 | #include <linux/types.h> | ||
| 22 | #include <asm/byteorder.h> | ||
| 23 | #include <asm/string.h> | ||
| 24 | #include <asm/uaccess.h> | ||
| 25 | |||
| 26 | static inline unsigned short from32to16 (unsigned long sum) | ||
| 27 | { | ||
| 28 | unsigned int result; | ||
| 29 | /* | ||
| 30 | %0 %1 | ||
| 31 | hsw %1, %0 H L L H | ||
| 32 | add %1, %0 H L H+L+C H+L | ||
| 33 | */ | ||
| 34 | asm ("hsw %1, %0; add %1, %0" : "=&r" (result) : "r" (sum)); | ||
| 35 | return result >> 16; | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline unsigned int do_csum(const unsigned char * buff, int len) | ||
| 39 | { | ||
| 40 | int odd, count; | ||
| 41 | unsigned int result = 0; | ||
| 42 | |||
| 43 | if (len <= 0) | ||
| 44 | goto out; | ||
| 45 | odd = 1 & (unsigned long) buff; | ||
| 46 | if (odd) { | ||
| 47 | result = be16_to_cpu(*buff); | ||
| 48 | len--; | ||
| 49 | buff++; | ||
| 50 | } | ||
| 51 | count = len >> 1; /* nr of 16-bit words.. */ | ||
| 52 | if (count) { | ||
| 53 | if (2 & (unsigned long) buff) { | ||
| 54 | result += *(unsigned short *) buff; | ||
| 55 | count--; | ||
| 56 | len -= 2; | ||
| 57 | buff += 2; | ||
| 58 | } | ||
| 59 | count >>= 1; /* nr of 32-bit words.. */ | ||
| 60 | if (count) { | ||
| 61 | unsigned int carry = 0; | ||
| 62 | do { | ||
| 63 | unsigned int w = *(unsigned int *) buff; | ||
| 64 | count--; | ||
| 65 | buff += 4; | ||
| 66 | result += carry; | ||
| 67 | result += w; | ||
| 68 | carry = (w > result); | ||
| 69 | } while (count); | ||
| 70 | result += carry; | ||
| 71 | result = (result & 0xffff) + (result >> 16); | ||
| 72 | } | ||
| 73 | if (len & 2) { | ||
| 74 | result += *(unsigned short *) buff; | ||
| 75 | buff += 2; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | if (len & 1) | ||
| 79 | result += le16_to_cpu(*buff); | ||
| 80 | result = from32to16(result); | ||
| 81 | if (odd) | ||
| 82 | result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); | ||
| 83 | out: | ||
| 84 | return result; | ||
| 85 | } | ||
| 86 | |||
| 87 | /* | ||
| 88 | * This is a version of ip_compute_csum() optimized for IP headers, | ||
| 89 | * which always checksum on 4 octet boundaries. | ||
| 90 | */ | ||
| 91 | __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | ||
| 92 | { | ||
| 93 | return (__force __sum16)~do_csum(iph,ihl*4); | ||
| 94 | } | ||
| 95 | |||
| 96 | /* | ||
| 97 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
| 98 | * in icmp.c | ||
| 99 | */ | ||
| 100 | __sum16 ip_compute_csum(const void *buff, int len) | ||
| 101 | { | ||
| 102 | return (__force __sum16)~do_csum(buff,len); | ||
| 103 | } | ||
| 104 | |||
| 105 | /* | ||
| 106 | * computes a partial checksum, e.g. for TCP/UDP fragments | ||
| 107 | */ | ||
| 108 | __wsum csum_partial(const void *buff, int len, __wsum sum) | ||
| 109 | { | ||
| 110 | unsigned int result = do_csum(buff, len); | ||
| 111 | |||
| 112 | /* add in old sum, and carry.. */ | ||
| 113 | result += (__force u32)sum; | ||
| 114 | if ((__force u32)sum > result) | ||
| 115 | result += 1; | ||
| 116 | return (__force __wsum)result; | ||
| 117 | } | ||
| 118 | |||
| 119 | EXPORT_SYMBOL(csum_partial); | ||
| 120 | |||
| 121 | /* | ||
| 122 | * copy while checksumming, otherwise like csum_partial | ||
| 123 | */ | ||
| 124 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, | ||
| 125 | int len, __wsum sum) | ||
| 126 | { | ||
| 127 | /* | ||
| 128 | * It's 2:30 am and I don't feel like doing it real ... | ||
| 129 | * This is lots slower than the real thing (tm) | ||
| 130 | */ | ||
| 131 | sum = csum_partial(src, len, sum); | ||
| 132 | memcpy(dst, src, len); | ||
| 133 | |||
| 134 | return sum; | ||
| 135 | } | ||
| 136 | |||
| 137 | /* | ||
| 138 | * Copy from userspace and compute checksum. If we catch an exception | ||
| 139 | * then zero the rest of the buffer. | ||
| 140 | */ | ||
| 141 | __wsum csum_partial_copy_from_user (const void *src, | ||
| 142 | void *dst, | ||
| 143 | int len, __wsum sum, | ||
| 144 | int *err_ptr) | ||
| 145 | { | ||
| 146 | int missing; | ||
| 147 | |||
| 148 | missing = copy_from_user(dst, src, len); | ||
| 149 | if (missing) { | ||
| 150 | memset(dst + len - missing, 0, missing); | ||
| 151 | *err_ptr = -EFAULT; | ||
| 152 | } | ||
| 153 | |||
| 154 | return csum_partial(dst, len, sum); | ||
| 155 | } | ||
diff --git a/arch/v850/lib/lshrdi3.c b/arch/v850/lib/lshrdi3.c deleted file mode 100644 index 93b1cb6fdee8..000000000000 --- a/arch/v850/lib/lshrdi3.c +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | /* lshrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */ | ||
| 2 | /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU CC. | ||
| 5 | |||
| 6 | GNU CC 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, or (at your option) | ||
| 9 | any later version. | ||
| 10 | |||
| 11 | GNU CC is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU CC; see the file COPYING. If not, write to | ||
| 18 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
| 19 | Boston, MA 02111-1307, USA. */ | ||
| 20 | |||
| 21 | #define BITS_PER_UNIT 8 | ||
| 22 | |||
| 23 | typedef int SItype __attribute__ ((mode (SI))); | ||
| 24 | typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
| 25 | typedef int DItype __attribute__ ((mode (DI))); | ||
| 26 | typedef int word_type __attribute__ ((mode (__word__))); | ||
| 27 | |||
| 28 | struct DIstruct {SItype high, low;}; | ||
| 29 | |||
| 30 | typedef union | ||
| 31 | { | ||
| 32 | struct DIstruct s; | ||
| 33 | DItype ll; | ||
| 34 | } DIunion; | ||
| 35 | |||
| 36 | DItype | ||
| 37 | __lshrdi3 (DItype u, word_type b) | ||
| 38 | { | ||
| 39 | DIunion w; | ||
| 40 | word_type bm; | ||
| 41 | DIunion uu; | ||
| 42 | |||
| 43 | if (b == 0) | ||
| 44 | return u; | ||
| 45 | |||
| 46 | uu.ll = u; | ||
| 47 | |||
| 48 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | ||
| 49 | if (bm <= 0) | ||
| 50 | { | ||
| 51 | w.s.high = 0; | ||
| 52 | w.s.low = (USItype)uu.s.high >> -bm; | ||
| 53 | } | ||
| 54 | else | ||
| 55 | { | ||
| 56 | USItype carries = (USItype)uu.s.high << bm; | ||
| 57 | w.s.high = (USItype)uu.s.high >> b; | ||
| 58 | w.s.low = ((USItype)uu.s.low >> b) | carries; | ||
| 59 | } | ||
| 60 | |||
| 61 | return w.ll; | ||
| 62 | } | ||
diff --git a/arch/v850/lib/memcpy.c b/arch/v850/lib/memcpy.c deleted file mode 100644 index 492847b3e612..000000000000 --- a/arch/v850/lib/memcpy.c +++ /dev/null | |||
| @@ -1,92 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/lib/memcpy.c -- Memory copying | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02 NEC Corporation | ||
| 5 | * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/types.h> | ||
| 15 | #include <asm/string.h> | ||
| 16 | |||
| 17 | #define CHUNK_SIZE 32 /* bytes */ | ||
| 18 | #define CHUNK_ALIGNED(addr) (((unsigned long)addr & 0x3) == 0) | ||
| 19 | |||
| 20 | /* Note that this macro uses 8 call-clobbered registers (not including | ||
| 21 | R1), which are few enough so that the following functions don't need | ||
| 22 | to spill anything to memory. It also uses R1, which is nominally | ||
| 23 | reserved for the assembler, but here it should be OK. */ | ||
| 24 | #define COPY_CHUNK(src, dst) \ | ||
| 25 | asm ("mov %0, ep;" \ | ||
| 26 | "sld.w 0[ep], r1; sld.w 4[ep], r12;" \ | ||
| 27 | "sld.w 8[ep], r13; sld.w 12[ep], r14;" \ | ||
| 28 | "sld.w 16[ep], r15; sld.w 20[ep], r17;" \ | ||
| 29 | "sld.w 24[ep], r18; sld.w 28[ep], r19;" \ | ||
| 30 | "mov %1, ep;" \ | ||
| 31 | "sst.w r1, 0[ep]; sst.w r12, 4[ep];" \ | ||
| 32 | "sst.w r13, 8[ep]; sst.w r14, 12[ep];" \ | ||
| 33 | "sst.w r15, 16[ep]; sst.w r17, 20[ep];" \ | ||
| 34 | "sst.w r18, 24[ep]; sst.w r19, 28[ep]" \ | ||
| 35 | :: "r" (src), "r" (dst) \ | ||
| 36 | : "r1", "r12", "r13", "r14", "r15", \ | ||
| 37 | "r17", "r18", "r19", "ep", "memory"); | ||
| 38 | |||
| 39 | void *memcpy (void *dst, const void *src, __kernel_size_t size) | ||
| 40 | { | ||
| 41 | char *_dst = dst; | ||
| 42 | const char *_src = src; | ||
| 43 | |||
| 44 | if (size >= CHUNK_SIZE && CHUNK_ALIGNED(_src) && CHUNK_ALIGNED(_dst)) { | ||
| 45 | /* Copy large blocks efficiently. */ | ||
| 46 | unsigned count; | ||
| 47 | for (count = size / CHUNK_SIZE; count; count--) { | ||
| 48 | COPY_CHUNK (_src, _dst); | ||
| 49 | _src += CHUNK_SIZE; | ||
| 50 | _dst += CHUNK_SIZE; | ||
| 51 | } | ||
| 52 | size %= CHUNK_SIZE; | ||
| 53 | } | ||
| 54 | |||
| 55 | if (size > 0) | ||
| 56 | do | ||
| 57 | *_dst++ = *_src++; | ||
| 58 | while (--size); | ||
| 59 | |||
| 60 | return dst; | ||
| 61 | } | ||
| 62 | |||
| 63 | void *memmove (void *dst, const void *src, __kernel_size_t size) | ||
| 64 | { | ||
| 65 | if ((unsigned long)dst < (unsigned long)src | ||
| 66 | || (unsigned long)src + size < (unsigned long)dst) | ||
| 67 | return memcpy (dst, src, size); | ||
| 68 | else { | ||
| 69 | char *_dst = dst + size; | ||
| 70 | const char *_src = src + size; | ||
| 71 | |||
| 72 | if (size >= CHUNK_SIZE | ||
| 73 | && CHUNK_ALIGNED (_src) && CHUNK_ALIGNED (_dst)) | ||
| 74 | { | ||
| 75 | /* Copy large blocks efficiently. */ | ||
| 76 | unsigned count; | ||
| 77 | for (count = size / CHUNK_SIZE; count; count--) { | ||
| 78 | _src -= CHUNK_SIZE; | ||
| 79 | _dst -= CHUNK_SIZE; | ||
| 80 | COPY_CHUNK (_src, _dst); | ||
| 81 | } | ||
| 82 | size %= CHUNK_SIZE; | ||
| 83 | } | ||
| 84 | |||
| 85 | if (size > 0) | ||
| 86 | do | ||
| 87 | *--_dst = *--_src; | ||
| 88 | while (--size); | ||
| 89 | |||
| 90 | return _dst; | ||
| 91 | } | ||
| 92 | } | ||
diff --git a/arch/v850/lib/memset.c b/arch/v850/lib/memset.c deleted file mode 100644 index d1b2ad821b15..000000000000 --- a/arch/v850/lib/memset.c +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/lib/memset.c -- Memory initialization | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,04 NEC Corporation | ||
| 5 | * Copyright (C) 2001,02,04 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/types.h> | ||
| 15 | |||
| 16 | void *memset (void *dst, int val, __kernel_size_t count) | ||
| 17 | { | ||
| 18 | if (count) { | ||
| 19 | register unsigned loop; | ||
| 20 | register void *ptr asm ("ep") = dst; | ||
| 21 | |||
| 22 | /* replicate VAL into a long. */ | ||
| 23 | val &= 0xff; | ||
| 24 | val |= val << 8; | ||
| 25 | val |= val << 16; | ||
| 26 | |||
| 27 | /* copy initial unaligned bytes. */ | ||
| 28 | if ((long)ptr & 1) { | ||
| 29 | *(char *)ptr = val; | ||
| 30 | ptr = (void *)((char *)ptr + 1); | ||
| 31 | count--; | ||
| 32 | } | ||
| 33 | if (count > 2 && ((long)ptr & 2)) { | ||
| 34 | *(short *)ptr = val; | ||
| 35 | ptr = (void *)((short *)ptr + 1); | ||
| 36 | count -= 2; | ||
| 37 | } | ||
| 38 | |||
| 39 | /* 32-byte copying loop. */ | ||
| 40 | for (loop = count / 32; loop; loop--) { | ||
| 41 | asm ("sst.w %0, 0[ep]; sst.w %0, 4[ep];" | ||
| 42 | "sst.w %0, 8[ep]; sst.w %0, 12[ep];" | ||
| 43 | "sst.w %0, 16[ep]; sst.w %0, 20[ep];" | ||
| 44 | "sst.w %0, 24[ep]; sst.w %0, 28[ep]" | ||
| 45 | :: "r" (val) : "memory"); | ||
| 46 | ptr += 32; | ||
| 47 | } | ||
| 48 | count %= 32; | ||
| 49 | |||
| 50 | /* long copying loop. */ | ||
| 51 | for (loop = count / 4; loop; loop--) { | ||
| 52 | *(long *)ptr = val; | ||
| 53 | ptr = (void *)((long *)ptr + 1); | ||
| 54 | } | ||
| 55 | count %= 4; | ||
| 56 | |||
| 57 | /* finish up with any trailing bytes. */ | ||
| 58 | if (count & 2) { | ||
| 59 | *(short *)ptr = val; | ||
| 60 | ptr = (void *)((short *)ptr + 1); | ||
| 61 | } | ||
| 62 | if (count & 1) { | ||
| 63 | *(char *)ptr = val; | ||
| 64 | } | ||
| 65 | } | ||
| 66 | |||
| 67 | return dst; | ||
| 68 | } | ||
diff --git a/arch/v850/lib/muldi3.c b/arch/v850/lib/muldi3.c deleted file mode 100644 index 277ca25c82c8..000000000000 --- a/arch/v850/lib/muldi3.c +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | /* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and | ||
| 2 | gcc-2.7.2.3/longlong.h which is: */ | ||
| 3 | /* Copyright (C) 1989, 1992, 1993, 1994, 1995, 2001 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU CC. | ||
| 6 | |||
| 7 | GNU CC 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, or (at your option) | ||
| 10 | any later version. | ||
| 11 | |||
| 12 | GNU CC 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 GNU CC; see the file COPYING. If not, write to | ||
| 19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
| 20 | Boston, MA 02111-1307, USA. */ | ||
| 21 | |||
| 22 | #define umul_ppmm(w1, w0, u, v) \ | ||
| 23 | __asm__ ("mulu %3, %0, %1" \ | ||
| 24 | : "=r" ((USItype)(w0)), \ | ||
| 25 | "=r" ((USItype)(w1)) \ | ||
| 26 | : "%0" ((USItype)(u)), \ | ||
| 27 | "r" ((USItype)(v))) | ||
| 28 | |||
| 29 | #define __umulsidi3(u, v) \ | ||
| 30 | ({DIunion __w; \ | ||
| 31 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ | ||
| 32 | __w.ll; }) | ||
| 33 | |||
| 34 | typedef int SItype __attribute__ ((mode (SI))); | ||
| 35 | typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
| 36 | typedef int DItype __attribute__ ((mode (DI))); | ||
| 37 | typedef int word_type __attribute__ ((mode (__word__))); | ||
| 38 | |||
| 39 | struct DIstruct {SItype high, low;}; | ||
| 40 | |||
| 41 | typedef union | ||
| 42 | { | ||
| 43 | struct DIstruct s; | ||
| 44 | DItype ll; | ||
| 45 | } DIunion; | ||
| 46 | |||
| 47 | DItype | ||
| 48 | __muldi3 (DItype u, DItype v) | ||
| 49 | { | ||
| 50 | DIunion w; | ||
| 51 | DIunion uu, vv; | ||
| 52 | |||
| 53 | uu.ll = u, | ||
| 54 | vv.ll = v; | ||
| 55 | |||
| 56 | w.ll = __umulsidi3 (uu.s.low, vv.s.low); | ||
| 57 | w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high | ||
| 58 | + (USItype) uu.s.high * (USItype) vv.s.low); | ||
| 59 | |||
| 60 | return w.ll; | ||
| 61 | } | ||
diff --git a/arch/v850/lib/negdi2.c b/arch/v850/lib/negdi2.c deleted file mode 100644 index 571e04fc619a..000000000000 --- a/arch/v850/lib/negdi2.c +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/v850/lib/negdi2.c -- 64-bit negation | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001 NEC Corporation | ||
| 5 | * Copyright (C) 2001 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | typedef int DItype __attribute__ ((mode (DI))); | ||
| 15 | |||
| 16 | DItype __negdi2 (DItype x) | ||
| 17 | { | ||
| 18 | __asm__ __volatile__ | ||
| 19 | ("not r6, r10;" | ||
| 20 | "add 1, r10;" | ||
| 21 | "setf c, r6;" | ||
| 22 | "not r7, r11;" | ||
| 23 | "add r6, r11" | ||
| 24 | ::: "r6", "r7", "r10", "r11"); | ||
| 25 | } | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 03980cb04291..b6fa2877b173 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -21,12 +21,16 @@ config X86 | |||
| 21 | select HAVE_UNSTABLE_SCHED_CLOCK | 21 | select HAVE_UNSTABLE_SCHED_CLOCK |
| 22 | select HAVE_IDE | 22 | select HAVE_IDE |
| 23 | select HAVE_OPROFILE | 23 | select HAVE_OPROFILE |
| 24 | select HAVE_IOREMAP_PROT | ||
| 25 | select HAVE_GET_USER_PAGES_FAST | ||
| 24 | select HAVE_KPROBES | 26 | select HAVE_KPROBES |
| 27 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
| 25 | select HAVE_KRETPROBES | 28 | select HAVE_KRETPROBES |
| 26 | select HAVE_DYNAMIC_FTRACE | 29 | select HAVE_DYNAMIC_FTRACE |
| 27 | select HAVE_FTRACE | 30 | select HAVE_FTRACE |
| 28 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) | 31 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) |
| 29 | select HAVE_ARCH_KGDB if !X86_VOYAGER | 32 | select HAVE_ARCH_KGDB if !X86_VOYAGER |
| 33 | select HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
| 30 | 34 | ||
| 31 | config ARCH_DEFCONFIG | 35 | config ARCH_DEFCONFIG |
| 32 | string | 36 | string |
| @@ -329,20 +333,6 @@ config X86_BIGSMP | |||
| 329 | 333 | ||
| 330 | endif | 334 | endif |
| 331 | 335 | ||
| 332 | config X86_RDC321X | ||
| 333 | bool "RDC R-321x SoC" | ||
| 334 | depends on X86_32 | ||
| 335 | select M486 | ||
| 336 | select X86_REBOOTFIXUPS | ||
| 337 | select GENERIC_GPIO | ||
| 338 | select LEDS_CLASS | ||
| 339 | select LEDS_GPIO | ||
| 340 | select NEW_LEDS | ||
| 341 | help | ||
| 342 | This option is needed for RDC R-321x system-on-chip, also known | ||
| 343 | as R-8610-(G). | ||
| 344 | If you don't have one of these chips, you should say N here. | ||
| 345 | |||
| 346 | config X86_VSMP | 336 | config X86_VSMP |
| 347 | bool "Support for ScaleMP vSMP" | 337 | bool "Support for ScaleMP vSMP" |
| 348 | select PARAVIRT | 338 | select PARAVIRT |
| @@ -366,6 +356,16 @@ config X86_VISWS | |||
| 366 | A kernel compiled for the Visual Workstation will run on general | 356 | A kernel compiled for the Visual Workstation will run on general |
| 367 | PCs as well. See <file:Documentation/sgi-visws.txt> for details. | 357 | PCs as well. See <file:Documentation/sgi-visws.txt> for details. |
| 368 | 358 | ||
| 359 | config X86_RDC321X | ||
| 360 | bool "RDC R-321x SoC" | ||
| 361 | depends on X86_32 | ||
| 362 | select M486 | ||
| 363 | select X86_REBOOTFIXUPS | ||
| 364 | help | ||
| 365 | This option is needed for RDC R-321x system-on-chip, also known | ||
| 366 | as R-8610-(G). | ||
| 367 | If you don't have one of these chips, you should say N here. | ||
| 368 | |||
| 369 | config SCHED_NO_NO_OMIT_FRAME_POINTER | 369 | config SCHED_NO_NO_OMIT_FRAME_POINTER |
| 370 | def_bool y | 370 | def_bool y |
| 371 | prompt "Single-depth WCHAN output" | 371 | prompt "Single-depth WCHAN output" |
| @@ -1276,6 +1276,14 @@ config CRASH_DUMP | |||
| 1276 | (CONFIG_RELOCATABLE=y). | 1276 | (CONFIG_RELOCATABLE=y). |
| 1277 | For more details see Documentation/kdump/kdump.txt | 1277 | For more details see Documentation/kdump/kdump.txt |
| 1278 | 1278 | ||
| 1279 | config KEXEC_JUMP | ||
| 1280 | bool "kexec jump (EXPERIMENTAL)" | ||
| 1281 | depends on EXPERIMENTAL | ||
| 1282 | depends on KEXEC && HIBERNATION && X86_32 | ||
| 1283 | help | ||
| 1284 | Jump between original kernel and kexeced kernel and invoke | ||
| 1285 | code in physical address mode via KEXEC | ||
| 1286 | |||
| 1279 | config PHYSICAL_START | 1287 | config PHYSICAL_START |
| 1280 | hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) | 1288 | hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) |
| 1281 | default "0x1000000" if X86_NUMAQ | 1289 | default "0x1000000" if X86_NUMAQ |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 919ce21ea654..f5631da585b6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -118,11 +118,6 @@ mflags-$(CONFIG_X86_GENERICARCH):= -Iinclude/asm-x86/mach-generic | |||
| 118 | fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/ | 118 | fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/ |
| 119 | mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/ | 119 | mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/ |
| 120 | 120 | ||
| 121 | # RDC R-321x subarch support | ||
| 122 | mflags-$(CONFIG_X86_RDC321X) := -Iinclude/asm-x86/mach-rdc321x | ||
| 123 | mcore-$(CONFIG_X86_RDC321X) := arch/x86/mach-default/ | ||
| 124 | core-$(CONFIG_X86_RDC321X) += arch/x86/mach-rdc321x/ | ||
| 125 | |||
| 126 | # default subarch .h files | 121 | # default subarch .h files |
| 127 | mflags-y += -Iinclude/asm-x86/mach-default | 122 | mflags-y += -Iinclude/asm-x86/mach-default |
| 128 | 123 | ||
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index bc5553b496f7..9fea73706479 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
| @@ -182,8 +182,6 @@ static unsigned outcnt; | |||
| 182 | static int fill_inbuf(void); | 182 | static int fill_inbuf(void); |
| 183 | static void flush_window(void); | 183 | static void flush_window(void); |
| 184 | static void error(char *m); | 184 | static void error(char *m); |
| 185 | static void gzip_mark(void **); | ||
| 186 | static void gzip_release(void **); | ||
| 187 | 185 | ||
| 188 | /* | 186 | /* |
| 189 | * This is set up by the setup-routine at boot-time | 187 | * This is set up by the setup-routine at boot-time |
| @@ -196,9 +194,6 @@ extern int input_len; | |||
| 196 | 194 | ||
| 197 | static long bytes_out; | 195 | static long bytes_out; |
| 198 | 196 | ||
| 199 | static void *malloc(int size); | ||
| 200 | static void free(void *where); | ||
| 201 | |||
| 202 | static void *memset(void *s, int c, unsigned n); | 197 | static void *memset(void *s, int c, unsigned n); |
| 203 | static void *memcpy(void *dest, const void *src, unsigned n); | 198 | static void *memcpy(void *dest, const void *src, unsigned n); |
| 204 | 199 | ||
| @@ -220,40 +215,6 @@ static int lines, cols; | |||
| 220 | 215 | ||
| 221 | #include "../../../../lib/inflate.c" | 216 | #include "../../../../lib/inflate.c" |
| 222 | 217 | ||
| 223 | static void *malloc(int size) | ||
| 224 | { | ||
| 225 | void *p; | ||
| 226 | |||
| 227 | if (size < 0) | ||
| 228 | error("Malloc error"); | ||
| 229 | if (free_mem_ptr <= 0) | ||
| 230 | error("Memory error"); | ||
| 231 | |||
| 232 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 233 | |||
| 234 | p = (void *)free_mem_ptr; | ||
| 235 | free_mem_ptr += size; | ||
| 236 | |||
| 237 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 238 | error("Out of memory"); | ||
| 239 | |||
| 240 | return p; | ||
| 241 | } | ||
| 242 | |||
| 243 | static void free(void *where) | ||
| 244 | { /* Don't care */ | ||
| 245 | } | ||
| 246 | |||
| 247 | static void gzip_mark(void **ptr) | ||
| 248 | { | ||
| 249 | *ptr = (void *) free_mem_ptr; | ||
| 250 | } | ||
| 251 | |||
| 252 | static void gzip_release(void **ptr) | ||
| 253 | { | ||
| 254 | free_mem_ptr = (memptr) *ptr; | ||
| 255 | } | ||
| 256 | |||
| 257 | static void scroll(void) | 218 | static void scroll(void) |
| 258 | { | 219 | { |
| 259 | int i; | 220 | int i; |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 58cccb6483b0..a0e1dbe67dc1 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
| @@ -441,12 +441,6 @@ beyond_if: | |||
| 441 | regs->r8 = regs->r9 = regs->r10 = regs->r11 = | 441 | regs->r8 = regs->r9 = regs->r10 = regs->r11 = |
| 442 | regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0; | 442 | regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0; |
| 443 | set_fs(USER_DS); | 443 | set_fs(USER_DS); |
| 444 | if (unlikely(current->ptrace & PT_PTRACED)) { | ||
| 445 | if (current->ptrace & PT_TRACE_EXEC) | ||
| 446 | ptrace_notify((PTRACE_EVENT_EXEC << 8) | SIGTRAP); | ||
| 447 | else | ||
| 448 | send_sig(SIGTRAP, current, 0); | ||
| 449 | } | ||
| 450 | return 0; | 444 | return 0; |
| 451 | } | 445 | } |
| 452 | 446 | ||
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 23d146ce676b..ffc1bb4fed7d 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
| @@ -15,6 +15,16 @@ | |||
| 15 | #include <asm/irqflags.h> | 15 | #include <asm/irqflags.h> |
| 16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
| 17 | 17 | ||
| 18 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ | ||
| 19 | #include <linux/elf-em.h> | ||
| 20 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | ||
| 21 | #define __AUDIT_ARCH_LE 0x40000000 | ||
| 22 | |||
| 23 | #ifndef CONFIG_AUDITSYSCALL | ||
| 24 | #define sysexit_audit int_ret_from_sys_call | ||
| 25 | #define sysretl_audit int_ret_from_sys_call | ||
| 26 | #endif | ||
| 27 | |||
| 18 | #define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) | 28 | #define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) |
| 19 | 29 | ||
| 20 | .macro IA32_ARG_FIXUP noebp=0 | 30 | .macro IA32_ARG_FIXUP noebp=0 |
| @@ -148,13 +158,15 @@ ENTRY(ia32_sysenter_target) | |||
| 148 | ja ia32_badsys | 158 | ja ia32_badsys |
| 149 | sysenter_do_call: | 159 | sysenter_do_call: |
| 150 | IA32_ARG_FIXUP 1 | 160 | IA32_ARG_FIXUP 1 |
| 161 | sysenter_dispatch: | ||
| 151 | call *ia32_sys_call_table(,%rax,8) | 162 | call *ia32_sys_call_table(,%rax,8) |
| 152 | movq %rax,RAX-ARGOFFSET(%rsp) | 163 | movq %rax,RAX-ARGOFFSET(%rsp) |
| 153 | GET_THREAD_INFO(%r10) | 164 | GET_THREAD_INFO(%r10) |
| 154 | DISABLE_INTERRUPTS(CLBR_NONE) | 165 | DISABLE_INTERRUPTS(CLBR_NONE) |
| 155 | TRACE_IRQS_OFF | 166 | TRACE_IRQS_OFF |
| 156 | testl $_TIF_ALLWORK_MASK,TI_flags(%r10) | 167 | testl $_TIF_ALLWORK_MASK,TI_flags(%r10) |
| 157 | jnz int_ret_from_sys_call | 168 | jnz sysexit_audit |
| 169 | sysexit_from_sys_call: | ||
| 158 | andl $~TS_COMPAT,TI_status(%r10) | 170 | andl $~TS_COMPAT,TI_status(%r10) |
| 159 | /* clear IF, that popfq doesn't enable interrupts early */ | 171 | /* clear IF, that popfq doesn't enable interrupts early */ |
| 160 | andl $~0x200,EFLAGS-R11(%rsp) | 172 | andl $~0x200,EFLAGS-R11(%rsp) |
| @@ -170,9 +182,63 @@ sysenter_do_call: | |||
| 170 | TRACE_IRQS_ON | 182 | TRACE_IRQS_ON |
| 171 | ENABLE_INTERRUPTS_SYSEXIT32 | 183 | ENABLE_INTERRUPTS_SYSEXIT32 |
| 172 | 184 | ||
| 173 | sysenter_tracesys: | 185 | #ifdef CONFIG_AUDITSYSCALL |
| 186 | .macro auditsys_entry_common | ||
| 187 | movl %esi,%r9d /* 6th arg: 4th syscall arg */ | ||
| 188 | movl %edx,%r8d /* 5th arg: 3rd syscall arg */ | ||
| 189 | /* (already in %ecx) 4th arg: 2nd syscall arg */ | ||
| 190 | movl %ebx,%edx /* 3rd arg: 1st syscall arg */ | ||
| 191 | movl %eax,%esi /* 2nd arg: syscall number */ | ||
| 192 | movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */ | ||
| 193 | call audit_syscall_entry | ||
| 194 | movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */ | ||
| 195 | cmpl $(IA32_NR_syscalls-1),%eax | ||
| 196 | ja ia32_badsys | ||
| 197 | movl %ebx,%edi /* reload 1st syscall arg */ | ||
| 198 | movl RCX-ARGOFFSET(%rsp),%esi /* reload 2nd syscall arg */ | ||
| 199 | movl RDX-ARGOFFSET(%rsp),%edx /* reload 3rd syscall arg */ | ||
| 200 | movl RSI-ARGOFFSET(%rsp),%ecx /* reload 4th syscall arg */ | ||
| 201 | movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */ | ||
| 202 | .endm | ||
| 203 | |||
| 204 | .macro auditsys_exit exit,ebpsave=RBP | ||
| 205 | testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) | ||
| 206 | jnz int_ret_from_sys_call | ||
| 207 | TRACE_IRQS_ON | ||
| 208 | sti | ||
| 209 | movl %eax,%esi /* second arg, syscall return value */ | ||
| 210 | cmpl $0,%eax /* is it < 0? */ | ||
| 211 | setl %al /* 1 if so, 0 if not */ | ||
| 212 | movzbl %al,%edi /* zero-extend that into %edi */ | ||
| 213 | inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */ | ||
| 214 | call audit_syscall_exit | ||
| 215 | GET_THREAD_INFO(%r10) | ||
| 216 | movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */ | ||
| 217 | movl \ebpsave-ARGOFFSET(%rsp),%ebp /* reload user register value */ | ||
| 218 | movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi | ||
| 219 | cli | ||
| 220 | TRACE_IRQS_OFF | ||
| 221 | testl %edi,TI_flags(%r10) | ||
| 222 | jnz int_with_check | ||
| 223 | jmp \exit | ||
| 224 | .endm | ||
| 225 | |||
| 226 | sysenter_auditsys: | ||
| 174 | CFI_RESTORE_STATE | 227 | CFI_RESTORE_STATE |
| 228 | auditsys_entry_common | ||
| 229 | movl %ebp,%r9d /* reload 6th syscall arg */ | ||
| 230 | jmp sysenter_dispatch | ||
| 231 | |||
| 232 | sysexit_audit: | ||
| 233 | auditsys_exit sysexit_from_sys_call | ||
| 234 | #endif | ||
| 235 | |||
| 236 | sysenter_tracesys: | ||
| 175 | xchgl %r9d,%ebp | 237 | xchgl %r9d,%ebp |
| 238 | #ifdef CONFIG_AUDITSYSCALL | ||
| 239 | testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) | ||
| 240 | jz sysenter_auditsys | ||
| 241 | #endif | ||
| 176 | SAVE_REST | 242 | SAVE_REST |
| 177 | CLEAR_RREGS | 243 | CLEAR_RREGS |
| 178 | movq %r9,R9(%rsp) | 244 | movq %r9,R9(%rsp) |
| @@ -252,13 +318,15 @@ cstar_do_call: | |||
| 252 | cmpl $IA32_NR_syscalls-1,%eax | 318 | cmpl $IA32_NR_syscalls-1,%eax |
| 253 | ja ia32_badsys | 319 | ja ia32_badsys |
| 254 | IA32_ARG_FIXUP 1 | 320 | IA32_ARG_FIXUP 1 |
| 321 | cstar_dispatch: | ||
| 255 | call *ia32_sys_call_table(,%rax,8) | 322 | call *ia32_sys_call_table(,%rax,8) |
| 256 | movq %rax,RAX-ARGOFFSET(%rsp) | 323 | movq %rax,RAX-ARGOFFSET(%rsp) |
| 257 | GET_THREAD_INFO(%r10) | 324 | GET_THREAD_INFO(%r10) |
| 258 | DISABLE_INTERRUPTS(CLBR_NONE) | 325 | DISABLE_INTERRUPTS(CLBR_NONE) |
| 259 | TRACE_IRQS_OFF | 326 | TRACE_IRQS_OFF |
| 260 | testl $_TIF_ALLWORK_MASK,TI_flags(%r10) | 327 | testl $_TIF_ALLWORK_MASK,TI_flags(%r10) |
| 261 | jnz int_ret_from_sys_call | 328 | jnz sysretl_audit |
| 329 | sysretl_from_sys_call: | ||
| 262 | andl $~TS_COMPAT,TI_status(%r10) | 330 | andl $~TS_COMPAT,TI_status(%r10) |
| 263 | RESTORE_ARGS 1,-ARG_SKIP,1,1,1 | 331 | RESTORE_ARGS 1,-ARG_SKIP,1,1,1 |
| 264 | movl RIP-ARGOFFSET(%rsp),%ecx | 332 | movl RIP-ARGOFFSET(%rsp),%ecx |
| @@ -270,8 +338,23 @@ cstar_do_call: | |||
| 270 | CFI_RESTORE rsp | 338 | CFI_RESTORE rsp |
| 271 | USERGS_SYSRET32 | 339 | USERGS_SYSRET32 |
| 272 | 340 | ||
| 273 | cstar_tracesys: | 341 | #ifdef CONFIG_AUDITSYSCALL |
| 342 | cstar_auditsys: | ||
| 274 | CFI_RESTORE_STATE | 343 | CFI_RESTORE_STATE |
| 344 | movl %r9d,R9-ARGOFFSET(%rsp) /* register to be clobbered by call */ | ||
| 345 | auditsys_entry_common | ||
| 346 | movl R9-ARGOFFSET(%rsp),%r9d /* reload 6th syscall arg */ | ||
| 347 | jmp cstar_dispatch | ||
| 348 | |||
| 349 | sysretl_audit: | ||
| 350 | auditsys_exit sysretl_from_sys_call, RCX /* user %ebp in RCX slot */ | ||
| 351 | #endif | ||
| 352 | |||
| 353 | cstar_tracesys: | ||
| 354 | #ifdef CONFIG_AUDITSYSCALL | ||
| 355 | testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) | ||
| 356 | jz cstar_auditsys | ||
| 357 | #endif | ||
| 275 | xchgl %r9d,%ebp | 358 | xchgl %r9d,%ebp |
| 276 | SAVE_REST | 359 | SAVE_REST |
| 277 | CLEAR_RREGS | 360 | CLEAR_RREGS |
| @@ -743,4 +826,10 @@ ia32_sys_call_table: | |||
| 743 | .quad sys32_fallocate | 826 | .quad sys32_fallocate |
| 744 | .quad compat_sys_timerfd_settime /* 325 */ | 827 | .quad compat_sys_timerfd_settime /* 325 */ |
| 745 | .quad compat_sys_timerfd_gettime | 828 | .quad compat_sys_timerfd_gettime |
| 829 | .quad compat_sys_signalfd4 | ||
| 830 | .quad sys_eventfd2 | ||
| 831 | .quad sys_epoll_create1 | ||
| 832 | .quad sys_dup3 /* 330 */ | ||
| 833 | .quad sys_pipe2 | ||
| 834 | .quad sys_inotify_init1 | ||
| 746 | ia32_syscall_end: | 835 | ia32_syscall_end: |
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index f00afdf61e67..d3c64088b981 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
| @@ -238,7 +238,7 @@ asmlinkage long sys32_pipe(int __user *fd) | |||
| 238 | int retval; | 238 | int retval; |
| 239 | int fds[2]; | 239 | int fds[2]; |
| 240 | 240 | ||
| 241 | retval = do_pipe(fds); | 241 | retval = do_pipe_flags(fds, 0); |
| 242 | if (retval) | 242 | if (retval) |
| 243 | goto out; | 243 | goto out; |
| 244 | if (copy_to_user(fd, fds, sizeof(fds))) | 244 | if (copy_to_user(fd, fds, sizeof(fds))) |
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index c2502eb9aa83..9220cf46aa10 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
| @@ -73,6 +73,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
| 73 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 73 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
| 74 | 74 | ||
| 75 | cpumask_t saved_mask; | 75 | cpumask_t saved_mask; |
| 76 | cpumask_of_cpu_ptr(new_mask, cpu); | ||
| 76 | int retval; | 77 | int retval; |
| 77 | unsigned int eax, ebx, ecx, edx; | 78 | unsigned int eax, ebx, ecx, edx; |
| 78 | unsigned int edx_part; | 79 | unsigned int edx_part; |
| @@ -91,7 +92,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
| 91 | 92 | ||
| 92 | /* Make sure we are running on right CPU */ | 93 | /* Make sure we are running on right CPU */ |
| 93 | saved_mask = current->cpus_allowed; | 94 | saved_mask = current->cpus_allowed; |
| 94 | retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 95 | retval = set_cpus_allowed_ptr(current, new_mask); |
| 95 | if (retval) | 96 | if (retval) |
| 96 | return -1; | 97 | return -1; |
| 97 | 98 | ||
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index a3ddad18aaa3..fa2161d5003b 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
| @@ -150,6 +150,10 @@ static int __init acpi_sleep_setup(char *str) | |||
| 150 | acpi_realmode_flags |= 2; | 150 | acpi_realmode_flags |= 2; |
| 151 | if (strncmp(str, "s3_beep", 7) == 0) | 151 | if (strncmp(str, "s3_beep", 7) == 0) |
| 152 | acpi_realmode_flags |= 4; | 152 | acpi_realmode_flags |= 4; |
| 153 | #ifdef CONFIG_HIBERNATION | ||
| 154 | if (strncmp(str, "s4_nohwsig", 10) == 0) | ||
| 155 | acpi_no_s4_hw_signature(); | ||
| 156 | #endif | ||
| 153 | if (strncmp(str, "old_ordering", 12) == 0) | 157 | if (strncmp(str, "old_ordering", 12) == 0) |
| 154 | acpi_old_suspend_ordering(); | 158 | acpi_old_suspend_ordering(); |
| 155 | str = strchr(str, ','); | 159 | str = strchr(str, ','); |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index c25210e6ac88..74697408576f 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
| @@ -667,7 +667,7 @@ static int get_device_resources(struct device *dev, | |||
| 667 | _bdf = calc_devid(pcidev->bus->number, pcidev->devfn); | 667 | _bdf = calc_devid(pcidev->bus->number, pcidev->devfn); |
| 668 | 668 | ||
| 669 | /* device not translated by any IOMMU in the system? */ | 669 | /* device not translated by any IOMMU in the system? */ |
| 670 | if (_bdf >= amd_iommu_last_bdf) { | 670 | if (_bdf > amd_iommu_last_bdf) { |
| 671 | *iommu = NULL; | 671 | *iommu = NULL; |
| 672 | *domain = NULL; | 672 | *domain = NULL; |
| 673 | *bdf = 0xffff; | 673 | *bdf = 0xffff; |
| @@ -1085,7 +1085,7 @@ void prealloc_protection_domains(void) | |||
| 1085 | 1085 | ||
| 1086 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 1086 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
| 1087 | devid = (dev->bus->number << 8) | dev->devfn; | 1087 | devid = (dev->bus->number << 8) | dev->devfn; |
| 1088 | if (devid >= amd_iommu_last_bdf) | 1088 | if (devid > amd_iommu_last_bdf) |
| 1089 | continue; | 1089 | continue; |
| 1090 | devid = amd_iommu_alias_table[devid]; | 1090 | devid = amd_iommu_alias_table[devid]; |
| 1091 | if (domain_for_device(devid)) | 1091 | if (domain_for_device(devid)) |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index c9d8ff2eb130..d9a9da597e79 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
| @@ -732,7 +732,7 @@ static int __init init_exclusion_range(struct ivmd_header *m) | |||
| 732 | set_device_exclusion_range(m->devid, m); | 732 | set_device_exclusion_range(m->devid, m); |
| 733 | break; | 733 | break; |
| 734 | case ACPI_IVMD_TYPE_ALL: | 734 | case ACPI_IVMD_TYPE_ALL: |
| 735 | for (i = 0; i < amd_iommu_last_bdf; ++i) | 735 | for (i = 0; i <= amd_iommu_last_bdf; ++i) |
| 736 | set_device_exclusion_range(i, m); | 736 | set_device_exclusion_range(i, m); |
| 737 | break; | 737 | break; |
| 738 | case ACPI_IVMD_TYPE_RANGE: | 738 | case ACPI_IVMD_TYPE_RANGE: |
| @@ -934,7 +934,7 @@ int __init amd_iommu_init(void) | |||
| 934 | /* | 934 | /* |
| 935 | * let all alias entries point to itself | 935 | * let all alias entries point to itself |
| 936 | */ | 936 | */ |
| 937 | for (i = 0; i < amd_iommu_last_bdf; ++i) | 937 | for (i = 0; i <= amd_iommu_last_bdf; ++i) |
| 938 | amd_iommu_alias_table[i] = i; | 938 | amd_iommu_alias_table[i] = i; |
| 939 | 939 | ||
| 940 | /* | 940 | /* |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index bf9b441331e9..9ee24e6bc4b0 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
| @@ -219,7 +219,6 @@ | |||
| 219 | #include <linux/time.h> | 219 | #include <linux/time.h> |
| 220 | #include <linux/sched.h> | 220 | #include <linux/sched.h> |
| 221 | #include <linux/pm.h> | 221 | #include <linux/pm.h> |
| 222 | #include <linux/pm_legacy.h> | ||
| 223 | #include <linux/capability.h> | 222 | #include <linux/capability.h> |
| 224 | #include <linux/device.h> | 223 | #include <linux/device.h> |
| 225 | #include <linux/kernel.h> | 224 | #include <linux/kernel.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index b0c8208df9fa..ff2fff56f0a8 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
| @@ -200,10 +200,12 @@ static void drv_read(struct drv_cmd *cmd) | |||
| 200 | static void drv_write(struct drv_cmd *cmd) | 200 | static void drv_write(struct drv_cmd *cmd) |
| 201 | { | 201 | { |
| 202 | cpumask_t saved_mask = current->cpus_allowed; | 202 | cpumask_t saved_mask = current->cpus_allowed; |
| 203 | cpumask_of_cpu_ptr_declare(cpu_mask); | ||
| 203 | unsigned int i; | 204 | unsigned int i; |
| 204 | 205 | ||
| 205 | for_each_cpu_mask(i, cmd->mask) { | 206 | for_each_cpu_mask_nr(i, cmd->mask) { |
| 206 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(i)); | 207 | cpumask_of_cpu_ptr_next(cpu_mask, i); |
| 208 | set_cpus_allowed_ptr(current, cpu_mask); | ||
| 207 | do_drv_write(cmd); | 209 | do_drv_write(cmd); |
| 208 | } | 210 | } |
| 209 | 211 | ||
| @@ -267,11 +269,12 @@ static unsigned int get_measured_perf(unsigned int cpu) | |||
| 267 | } aperf_cur, mperf_cur; | 269 | } aperf_cur, mperf_cur; |
| 268 | 270 | ||
| 269 | cpumask_t saved_mask; | 271 | cpumask_t saved_mask; |
| 272 | cpumask_of_cpu_ptr(cpu_mask, cpu); | ||
| 270 | unsigned int perf_percent; | 273 | unsigned int perf_percent; |
| 271 | unsigned int retval; | 274 | unsigned int retval; |
| 272 | 275 | ||
| 273 | saved_mask = current->cpus_allowed; | 276 | saved_mask = current->cpus_allowed; |
| 274 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 277 | set_cpus_allowed_ptr(current, cpu_mask); |
| 275 | if (get_cpu() != cpu) { | 278 | if (get_cpu() != cpu) { |
| 276 | /* We were not able to run on requested processor */ | 279 | /* We were not able to run on requested processor */ |
| 277 | put_cpu(); | 280 | put_cpu(); |
| @@ -337,6 +340,7 @@ static unsigned int get_measured_perf(unsigned int cpu) | |||
| 337 | 340 | ||
| 338 | static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | 341 | static unsigned int get_cur_freq_on_cpu(unsigned int cpu) |
| 339 | { | 342 | { |
| 343 | cpumask_of_cpu_ptr(cpu_mask, cpu); | ||
| 340 | struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); | 344 | struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); |
| 341 | unsigned int freq; | 345 | unsigned int freq; |
| 342 | unsigned int cached_freq; | 346 | unsigned int cached_freq; |
| @@ -349,7 +353,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | |||
| 349 | } | 353 | } |
| 350 | 354 | ||
| 351 | cached_freq = data->freq_table[data->acpi_data->state].frequency; | 355 | cached_freq = data->freq_table[data->acpi_data->state].frequency; |
| 352 | freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data); | 356 | freq = extract_freq(get_cur_val(cpu_mask), data); |
| 353 | if (freq != cached_freq) { | 357 | if (freq != cached_freq) { |
| 354 | /* | 358 | /* |
| 355 | * The dreaded BIOS frequency change behind our back. | 359 | * The dreaded BIOS frequency change behind our back. |
| @@ -451,7 +455,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
| 451 | 455 | ||
| 452 | freqs.old = perf->states[perf->state].core_frequency * 1000; | 456 | freqs.old = perf->states[perf->state].core_frequency * 1000; |
| 453 | freqs.new = data->freq_table[next_state].frequency; | 457 | freqs.new = data->freq_table[next_state].frequency; |
| 454 | for_each_cpu_mask(i, cmd.mask) { | 458 | for_each_cpu_mask_nr(i, cmd.mask) { |
| 455 | freqs.cpu = i; | 459 | freqs.cpu = i; |
| 456 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 460 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
| 457 | } | 461 | } |
| @@ -466,7 +470,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, | |||
| 466 | } | 470 | } |
| 467 | } | 471 | } |
| 468 | 472 | ||
| 469 | for_each_cpu_mask(i, cmd.mask) { | 473 | for_each_cpu_mask_nr(i, cmd.mask) { |
| 470 | freqs.cpu = i; | 474 | freqs.cpu = i; |
| 471 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 475 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 472 | } | 476 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 199e4e05e5dc..f1685fb91fbd 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
| @@ -122,7 +122,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy, | |||
| 122 | return 0; | 122 | return 0; |
| 123 | 123 | ||
| 124 | /* notifiers */ | 124 | /* notifiers */ |
| 125 | for_each_cpu_mask(i, policy->cpus) { | 125 | for_each_cpu_mask_nr(i, policy->cpus) { |
| 126 | freqs.cpu = i; | 126 | freqs.cpu = i; |
| 127 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 127 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
| 128 | } | 128 | } |
| @@ -130,11 +130,11 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy, | |||
| 130 | /* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software | 130 | /* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software |
| 131 | * Developer's Manual, Volume 3 | 131 | * Developer's Manual, Volume 3 |
| 132 | */ | 132 | */ |
| 133 | for_each_cpu_mask(i, policy->cpus) | 133 | for_each_cpu_mask_nr(i, policy->cpus) |
| 134 | cpufreq_p4_setdc(i, p4clockmod_table[newstate].index); | 134 | cpufreq_p4_setdc(i, p4clockmod_table[newstate].index); |
| 135 | 135 | ||
| 136 | /* notifiers */ | 136 | /* notifiers */ |
| 137 | for_each_cpu_mask(i, policy->cpus) { | 137 | for_each_cpu_mask_nr(i, policy->cpus) { |
| 138 | freqs.cpu = i; | 138 | freqs.cpu = i; |
| 139 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 139 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 140 | } | 140 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 206791eb46e3..53c7b6936973 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
| @@ -479,11 +479,12 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi | |||
| 479 | static int check_supported_cpu(unsigned int cpu) | 479 | static int check_supported_cpu(unsigned int cpu) |
| 480 | { | 480 | { |
| 481 | cpumask_t oldmask; | 481 | cpumask_t oldmask; |
| 482 | cpumask_of_cpu_ptr(cpu_mask, cpu); | ||
| 482 | u32 eax, ebx, ecx, edx; | 483 | u32 eax, ebx, ecx, edx; |
| 483 | unsigned int rc = 0; | 484 | unsigned int rc = 0; |
| 484 | 485 | ||
| 485 | oldmask = current->cpus_allowed; | 486 | oldmask = current->cpus_allowed; |
| 486 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 487 | set_cpus_allowed_ptr(current, cpu_mask); |
| 487 | 488 | ||
| 488 | if (smp_processor_id() != cpu) { | 489 | if (smp_processor_id() != cpu) { |
| 489 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu); | 490 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu); |
| @@ -966,7 +967,7 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, unsigned i | |||
| 966 | freqs.old = find_khz_freq_from_fid(data->currfid); | 967 | freqs.old = find_khz_freq_from_fid(data->currfid); |
| 967 | freqs.new = find_khz_freq_from_fid(fid); | 968 | freqs.new = find_khz_freq_from_fid(fid); |
| 968 | 969 | ||
| 969 | for_each_cpu_mask(i, *(data->available_cores)) { | 970 | for_each_cpu_mask_nr(i, *(data->available_cores)) { |
| 970 | freqs.cpu = i; | 971 | freqs.cpu = i; |
| 971 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 972 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
| 972 | } | 973 | } |
| @@ -974,7 +975,7 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, unsigned i | |||
| 974 | res = transition_fid_vid(data, fid, vid); | 975 | res = transition_fid_vid(data, fid, vid); |
| 975 | freqs.new = find_khz_freq_from_fid(data->currfid); | 976 | freqs.new = find_khz_freq_from_fid(data->currfid); |
| 976 | 977 | ||
| 977 | for_each_cpu_mask(i, *(data->available_cores)) { | 978 | for_each_cpu_mask_nr(i, *(data->available_cores)) { |
| 978 | freqs.cpu = i; | 979 | freqs.cpu = i; |
| 979 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 980 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 980 | } | 981 | } |
| @@ -997,7 +998,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i | |||
| 997 | freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); | 998 | freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); |
| 998 | freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); | 999 | freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); |
| 999 | 1000 | ||
| 1000 | for_each_cpu_mask(i, *(data->available_cores)) { | 1001 | for_each_cpu_mask_nr(i, *(data->available_cores)) { |
| 1001 | freqs.cpu = i; | 1002 | freqs.cpu = i; |
| 1002 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 1003 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
| 1003 | } | 1004 | } |
| @@ -1005,7 +1006,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i | |||
| 1005 | res = transition_pstate(data, pstate); | 1006 | res = transition_pstate(data, pstate); |
| 1006 | freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); | 1007 | freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); |
| 1007 | 1008 | ||
| 1008 | for_each_cpu_mask(i, *(data->available_cores)) { | 1009 | for_each_cpu_mask_nr(i, *(data->available_cores)) { |
| 1009 | freqs.cpu = i; | 1010 | freqs.cpu = i; |
| 1010 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 1011 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 1011 | } | 1012 | } |
| @@ -1016,6 +1017,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i | |||
| 1016 | static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation) | 1017 | static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation) |
| 1017 | { | 1018 | { |
| 1018 | cpumask_t oldmask; | 1019 | cpumask_t oldmask; |
| 1020 | cpumask_of_cpu_ptr(cpu_mask, pol->cpu); | ||
| 1019 | struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu); | 1021 | struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu); |
| 1020 | u32 checkfid; | 1022 | u32 checkfid; |
| 1021 | u32 checkvid; | 1023 | u32 checkvid; |
| @@ -1030,7 +1032,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
| 1030 | 1032 | ||
| 1031 | /* only run on specific CPU from here on */ | 1033 | /* only run on specific CPU from here on */ |
| 1032 | oldmask = current->cpus_allowed; | 1034 | oldmask = current->cpus_allowed; |
| 1033 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu)); | 1035 | set_cpus_allowed_ptr(current, cpu_mask); |
| 1034 | 1036 | ||
| 1035 | if (smp_processor_id() != pol->cpu) { | 1037 | if (smp_processor_id() != pol->cpu) { |
| 1036 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); | 1038 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); |
| @@ -1105,6 +1107,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
| 1105 | { | 1107 | { |
| 1106 | struct powernow_k8_data *data; | 1108 | struct powernow_k8_data *data; |
| 1107 | cpumask_t oldmask; | 1109 | cpumask_t oldmask; |
| 1110 | cpumask_of_cpu_ptr_declare(newmask); | ||
| 1108 | int rc; | 1111 | int rc; |
| 1109 | 1112 | ||
| 1110 | if (!cpu_online(pol->cpu)) | 1113 | if (!cpu_online(pol->cpu)) |
| @@ -1156,7 +1159,8 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
| 1156 | 1159 | ||
| 1157 | /* only run on specific CPU from here on */ | 1160 | /* only run on specific CPU from here on */ |
| 1158 | oldmask = current->cpus_allowed; | 1161 | oldmask = current->cpus_allowed; |
| 1159 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu)); | 1162 | cpumask_of_cpu_ptr_next(newmask, pol->cpu); |
| 1163 | set_cpus_allowed_ptr(current, newmask); | ||
| 1160 | 1164 | ||
| 1161 | if (smp_processor_id() != pol->cpu) { | 1165 | if (smp_processor_id() != pol->cpu) { |
| 1162 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); | 1166 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); |
| @@ -1178,7 +1182,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
| 1178 | set_cpus_allowed_ptr(current, &oldmask); | 1182 | set_cpus_allowed_ptr(current, &oldmask); |
| 1179 | 1183 | ||
| 1180 | if (cpu_family == CPU_HW_PSTATE) | 1184 | if (cpu_family == CPU_HW_PSTATE) |
| 1181 | pol->cpus = cpumask_of_cpu(pol->cpu); | 1185 | pol->cpus = *newmask; |
| 1182 | else | 1186 | else |
| 1183 | pol->cpus = per_cpu(cpu_core_map, pol->cpu); | 1187 | pol->cpus = per_cpu(cpu_core_map, pol->cpu); |
| 1184 | data->available_cores = &(pol->cpus); | 1188 | data->available_cores = &(pol->cpus); |
| @@ -1244,6 +1248,7 @@ static unsigned int powernowk8_get (unsigned int cpu) | |||
| 1244 | { | 1248 | { |
| 1245 | struct powernow_k8_data *data; | 1249 | struct powernow_k8_data *data; |
| 1246 | cpumask_t oldmask = current->cpus_allowed; | 1250 | cpumask_t oldmask = current->cpus_allowed; |
| 1251 | cpumask_of_cpu_ptr(newmask, cpu); | ||
| 1247 | unsigned int khz = 0; | 1252 | unsigned int khz = 0; |
| 1248 | unsigned int first; | 1253 | unsigned int first; |
| 1249 | 1254 | ||
| @@ -1253,7 +1258,7 @@ static unsigned int powernowk8_get (unsigned int cpu) | |||
| 1253 | if (!data) | 1258 | if (!data) |
| 1254 | return -EINVAL; | 1259 | return -EINVAL; |
| 1255 | 1260 | ||
| 1256 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 1261 | set_cpus_allowed_ptr(current, newmask); |
| 1257 | if (smp_processor_id() != cpu) { | 1262 | if (smp_processor_id() != cpu) { |
| 1258 | printk(KERN_ERR PFX | 1263 | printk(KERN_ERR PFX |
| 1259 | "limiting to CPU %d failed in powernowk8_get\n", cpu); | 1264 | "limiting to CPU %d failed in powernowk8_get\n", cpu); |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 908dd347c67e..ca2ac13b7af2 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
| @@ -28,7 +28,8 @@ | |||
| 28 | #define PFX "speedstep-centrino: " | 28 | #define PFX "speedstep-centrino: " |
| 29 | #define MAINTAINER "cpufreq@lists.linux.org.uk" | 29 | #define MAINTAINER "cpufreq@lists.linux.org.uk" |
| 30 | 30 | ||
| 31 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg) | 31 | #define dprintk(msg...) \ |
| 32 | cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg) | ||
| 32 | 33 | ||
| 33 | #define INTEL_MSR_RANGE (0xffff) | 34 | #define INTEL_MSR_RANGE (0xffff) |
| 34 | 35 | ||
| @@ -66,11 +67,12 @@ struct cpu_model | |||
| 66 | 67 | ||
| 67 | struct cpufreq_frequency_table *op_points; /* clock/voltage pairs */ | 68 | struct cpufreq_frequency_table *op_points; /* clock/voltage pairs */ |
| 68 | }; | 69 | }; |
| 69 | static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, const struct cpu_id *x); | 70 | static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, |
| 71 | const struct cpu_id *x); | ||
| 70 | 72 | ||
| 71 | /* Operating points for current CPU */ | 73 | /* Operating points for current CPU */ |
| 72 | static struct cpu_model *centrino_model[NR_CPUS]; | 74 | static DEFINE_PER_CPU(struct cpu_model *, centrino_model); |
| 73 | static const struct cpu_id *centrino_cpu[NR_CPUS]; | 75 | static DEFINE_PER_CPU(const struct cpu_id *, centrino_cpu); |
| 74 | 76 | ||
| 75 | static struct cpufreq_driver centrino_driver; | 77 | static struct cpufreq_driver centrino_driver; |
| 76 | 78 | ||
| @@ -255,7 +257,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) | |||
| 255 | return -ENOENT; | 257 | return -ENOENT; |
| 256 | } | 258 | } |
| 257 | 259 | ||
| 258 | centrino_model[policy->cpu] = model; | 260 | per_cpu(centrino_model, policy->cpu) = model; |
| 259 | 261 | ||
| 260 | dprintk("found \"%s\": max frequency: %dkHz\n", | 262 | dprintk("found \"%s\": max frequency: %dkHz\n", |
| 261 | model->model_name, model->max_freq); | 263 | model->model_name, model->max_freq); |
| @@ -264,10 +266,14 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) | |||
| 264 | } | 266 | } |
| 265 | 267 | ||
| 266 | #else | 268 | #else |
| 267 | static inline int centrino_cpu_init_table(struct cpufreq_policy *policy) { return -ENODEV; } | 269 | static inline int centrino_cpu_init_table(struct cpufreq_policy *policy) |
| 270 | { | ||
| 271 | return -ENODEV; | ||
| 272 | } | ||
| 268 | #endif /* CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE */ | 273 | #endif /* CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE */ |
| 269 | 274 | ||
| 270 | static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, const struct cpu_id *x) | 275 | static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, |
| 276 | const struct cpu_id *x) | ||
| 271 | { | 277 | { |
| 272 | if ((c->x86 == x->x86) && | 278 | if ((c->x86 == x->x86) && |
| 273 | (c->x86_model == x->x86_model) && | 279 | (c->x86_model == x->x86_model) && |
| @@ -286,23 +292,28 @@ static unsigned extract_clock(unsigned msr, unsigned int cpu, int failsafe) | |||
| 286 | * for centrino, as some DSDTs are buggy. | 292 | * for centrino, as some DSDTs are buggy. |
| 287 | * Ideally, this can be done using the acpi_data structure. | 293 | * Ideally, this can be done using the acpi_data structure. |
| 288 | */ | 294 | */ |
| 289 | if ((centrino_cpu[cpu] == &cpu_ids[CPU_BANIAS]) || | 295 | if ((per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_BANIAS]) || |
| 290 | (centrino_cpu[cpu] == &cpu_ids[CPU_DOTHAN_A1]) || | 296 | (per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_DOTHAN_A1]) || |
| 291 | (centrino_cpu[cpu] == &cpu_ids[CPU_DOTHAN_B0])) { | 297 | (per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_DOTHAN_B0])) { |
| 292 | msr = (msr >> 8) & 0xff; | 298 | msr = (msr >> 8) & 0xff; |
| 293 | return msr * 100000; | 299 | return msr * 100000; |
| 294 | } | 300 | } |
| 295 | 301 | ||
| 296 | if ((!centrino_model[cpu]) || (!centrino_model[cpu]->op_points)) | 302 | if ((!per_cpu(centrino_model, cpu)) || |
| 303 | (!per_cpu(centrino_model, cpu)->op_points)) | ||
| 297 | return 0; | 304 | return 0; |
| 298 | 305 | ||
| 299 | msr &= 0xffff; | 306 | msr &= 0xffff; |
| 300 | for (i=0;centrino_model[cpu]->op_points[i].frequency != CPUFREQ_TABLE_END; i++) { | 307 | for (i = 0; |
| 301 | if (msr == centrino_model[cpu]->op_points[i].index) | 308 | per_cpu(centrino_model, cpu)->op_points[i].frequency |
| 302 | return centrino_model[cpu]->op_points[i].frequency; | 309 | != CPUFREQ_TABLE_END; |
| 310 | i++) { | ||
| 311 | if (msr == per_cpu(centrino_model, cpu)->op_points[i].index) | ||
| 312 | return per_cpu(centrino_model, cpu)-> | ||
| 313 | op_points[i].frequency; | ||
| 303 | } | 314 | } |
| 304 | if (failsafe) | 315 | if (failsafe) |
| 305 | return centrino_model[cpu]->op_points[i-1].frequency; | 316 | return per_cpu(centrino_model, cpu)->op_points[i-1].frequency; |
| 306 | else | 317 | else |
| 307 | return 0; | 318 | return 0; |
| 308 | } | 319 | } |
| @@ -313,9 +324,10 @@ static unsigned int get_cur_freq(unsigned int cpu) | |||
| 313 | unsigned l, h; | 324 | unsigned l, h; |
| 314 | unsigned clock_freq; | 325 | unsigned clock_freq; |
| 315 | cpumask_t saved_mask; | 326 | cpumask_t saved_mask; |
| 327 | cpumask_of_cpu_ptr(new_mask, cpu); | ||
| 316 | 328 | ||
| 317 | saved_mask = current->cpus_allowed; | 329 | saved_mask = current->cpus_allowed; |
| 318 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 330 | set_cpus_allowed_ptr(current, new_mask); |
| 319 | if (smp_processor_id() != cpu) | 331 | if (smp_processor_id() != cpu) |
| 320 | return 0; | 332 | return 0; |
| 321 | 333 | ||
| @@ -347,7 +359,8 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
| 347 | int i; | 359 | int i; |
| 348 | 360 | ||
| 349 | /* Only Intel makes Enhanced Speedstep-capable CPUs */ | 361 | /* Only Intel makes Enhanced Speedstep-capable CPUs */ |
| 350 | if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST)) | 362 | if (cpu->x86_vendor != X86_VENDOR_INTEL || |
| 363 | !cpu_has(cpu, X86_FEATURE_EST)) | ||
| 351 | return -ENODEV; | 364 | return -ENODEV; |
| 352 | 365 | ||
| 353 | if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) | 366 | if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) |
| @@ -361,9 +374,9 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
| 361 | break; | 374 | break; |
| 362 | 375 | ||
| 363 | if (i != N_IDS) | 376 | if (i != N_IDS) |
| 364 | centrino_cpu[policy->cpu] = &cpu_ids[i]; | 377 | per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i]; |
| 365 | 378 | ||
| 366 | if (!centrino_cpu[policy->cpu]) { | 379 | if (!per_cpu(centrino_cpu, policy->cpu)) { |
| 367 | dprintk("found unsupported CPU with " | 380 | dprintk("found unsupported CPU with " |
| 368 | "Enhanced SpeedStep: send /proc/cpuinfo to " | 381 | "Enhanced SpeedStep: send /proc/cpuinfo to " |
| 369 | MAINTAINER "\n"); | 382 | MAINTAINER "\n"); |
| @@ -386,23 +399,26 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
| 386 | /* check to see if it stuck */ | 399 | /* check to see if it stuck */ |
| 387 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 400 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
| 388 | if (!(l & (1<<16))) { | 401 | if (!(l & (1<<16))) { |
| 389 | printk(KERN_INFO PFX "couldn't enable Enhanced SpeedStep\n"); | 402 | printk(KERN_INFO PFX |
| 403 | "couldn't enable Enhanced SpeedStep\n"); | ||
| 390 | return -ENODEV; | 404 | return -ENODEV; |
| 391 | } | 405 | } |
| 392 | } | 406 | } |
| 393 | 407 | ||
| 394 | freq = get_cur_freq(policy->cpu); | 408 | freq = get_cur_freq(policy->cpu); |
| 395 | 409 | policy->cpuinfo.transition_latency = 10000; | |
| 396 | policy->cpuinfo.transition_latency = 10000; /* 10uS transition latency */ | 410 | /* 10uS transition latency */ |
| 397 | policy->cur = freq; | 411 | policy->cur = freq; |
| 398 | 412 | ||
| 399 | dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur); | 413 | dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur); |
| 400 | 414 | ||
| 401 | ret = cpufreq_frequency_table_cpuinfo(policy, centrino_model[policy->cpu]->op_points); | 415 | ret = cpufreq_frequency_table_cpuinfo(policy, |
| 416 | per_cpu(centrino_model, policy->cpu)->op_points); | ||
| 402 | if (ret) | 417 | if (ret) |
| 403 | return (ret); | 418 | return (ret); |
| 404 | 419 | ||
| 405 | cpufreq_frequency_table_get_attr(centrino_model[policy->cpu]->op_points, policy->cpu); | 420 | cpufreq_frequency_table_get_attr( |
| 421 | per_cpu(centrino_model, policy->cpu)->op_points, policy->cpu); | ||
| 406 | 422 | ||
| 407 | return 0; | 423 | return 0; |
| 408 | } | 424 | } |
| @@ -411,12 +427,12 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy) | |||
| 411 | { | 427 | { |
| 412 | unsigned int cpu = policy->cpu; | 428 | unsigned int cpu = policy->cpu; |
| 413 | 429 | ||
| 414 | if (!centrino_model[cpu]) | 430 | if (!per_cpu(centrino_model, cpu)) |
| 415 | return -ENODEV; | 431 | return -ENODEV; |
| 416 | 432 | ||
| 417 | cpufreq_frequency_table_put_attr(cpu); | 433 | cpufreq_frequency_table_put_attr(cpu); |
| 418 | 434 | ||
| 419 | centrino_model[cpu] = NULL; | 435 | per_cpu(centrino_model, cpu) = NULL; |
| 420 | 436 | ||
| 421 | return 0; | 437 | return 0; |
| 422 | } | 438 | } |
| @@ -430,17 +446,26 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy) | |||
| 430 | */ | 446 | */ |
| 431 | static int centrino_verify (struct cpufreq_policy *policy) | 447 | static int centrino_verify (struct cpufreq_policy *policy) |
| 432 | { | 448 | { |
| 433 | return cpufreq_frequency_table_verify(policy, centrino_model[policy->cpu]->op_points); | 449 | return cpufreq_frequency_table_verify(policy, |
| 450 | per_cpu(centrino_model, policy->cpu)->op_points); | ||
| 434 | } | 451 | } |
| 435 | 452 | ||
| 436 | /** | 453 | /** |
| 437 | * centrino_setpolicy - set a new CPUFreq policy | 454 | * centrino_setpolicy - set a new CPUFreq policy |
| 438 | * @policy: new policy | 455 | * @policy: new policy |
| 439 | * @target_freq: the target frequency | 456 | * @target_freq: the target frequency |
| 440 | * @relation: how that frequency relates to achieved frequency (CPUFREQ_RELATION_L or CPUFREQ_RELATION_H) | 457 | * @relation: how that frequency relates to achieved frequency |
| 458 | * (CPUFREQ_RELATION_L or CPUFREQ_RELATION_H) | ||
| 441 | * | 459 | * |
| 442 | * Sets a new CPUFreq policy. | 460 | * Sets a new CPUFreq policy. |
| 443 | */ | 461 | */ |
| 462 | struct allmasks { | ||
| 463 | cpumask_t online_policy_cpus; | ||
| 464 | cpumask_t saved_mask; | ||
| 465 | cpumask_t set_mask; | ||
| 466 | cpumask_t covered_cpus; | ||
| 467 | }; | ||
| 468 | |||
| 444 | static int centrino_target (struct cpufreq_policy *policy, | 469 | static int centrino_target (struct cpufreq_policy *policy, |
| 445 | unsigned int target_freq, | 470 | unsigned int target_freq, |
| 446 | unsigned int relation) | 471 | unsigned int relation) |
| @@ -448,48 +473,55 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
| 448 | unsigned int newstate = 0; | 473 | unsigned int newstate = 0; |
| 449 | unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu; | 474 | unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu; |
| 450 | struct cpufreq_freqs freqs; | 475 | struct cpufreq_freqs freqs; |
| 451 | cpumask_t online_policy_cpus; | ||
| 452 | cpumask_t saved_mask; | ||
| 453 | cpumask_t set_mask; | ||
| 454 | cpumask_t covered_cpus; | ||
| 455 | int retval = 0; | 476 | int retval = 0; |
| 456 | unsigned int j, k, first_cpu, tmp; | 477 | unsigned int j, k, first_cpu, tmp; |
| 457 | 478 | CPUMASK_ALLOC(allmasks); | |
| 458 | if (unlikely(centrino_model[cpu] == NULL)) | 479 | CPUMASK_PTR(online_policy_cpus, allmasks); |
| 459 | return -ENODEV; | 480 | CPUMASK_PTR(saved_mask, allmasks); |
| 481 | CPUMASK_PTR(set_mask, allmasks); | ||
| 482 | CPUMASK_PTR(covered_cpus, allmasks); | ||
| 483 | |||
| 484 | if (unlikely(allmasks == NULL)) | ||
| 485 | return -ENOMEM; | ||
| 486 | |||
| 487 | if (unlikely(per_cpu(centrino_model, cpu) == NULL)) { | ||
| 488 | retval = -ENODEV; | ||
| 489 | goto out; | ||
| 490 | } | ||
| 460 | 491 | ||
| 461 | if (unlikely(cpufreq_frequency_table_target(policy, | 492 | if (unlikely(cpufreq_frequency_table_target(policy, |
| 462 | centrino_model[cpu]->op_points, | 493 | per_cpu(centrino_model, cpu)->op_points, |
| 463 | target_freq, | 494 | target_freq, |
| 464 | relation, | 495 | relation, |
| 465 | &newstate))) { | 496 | &newstate))) { |
| 466 | return -EINVAL; | 497 | retval = -EINVAL; |
| 498 | goto out; | ||
| 467 | } | 499 | } |
| 468 | 500 | ||
| 469 | #ifdef CONFIG_HOTPLUG_CPU | 501 | #ifdef CONFIG_HOTPLUG_CPU |
| 470 | /* cpufreq holds the hotplug lock, so we are safe from here on */ | 502 | /* cpufreq holds the hotplug lock, so we are safe from here on */ |
| 471 | cpus_and(online_policy_cpus, cpu_online_map, policy->cpus); | 503 | cpus_and(*online_policy_cpus, cpu_online_map, policy->cpus); |
| 472 | #else | 504 | #else |
| 473 | online_policy_cpus = policy->cpus; | 505 | *online_policy_cpus = policy->cpus; |
| 474 | #endif | 506 | #endif |
| 475 | 507 | ||
| 476 | saved_mask = current->cpus_allowed; | 508 | *saved_mask = current->cpus_allowed; |
| 477 | first_cpu = 1; | 509 | first_cpu = 1; |
| 478 | cpus_clear(covered_cpus); | 510 | cpus_clear(*covered_cpus); |
| 479 | for_each_cpu_mask(j, online_policy_cpus) { | 511 | for_each_cpu_mask_nr(j, *online_policy_cpus) { |
| 480 | /* | 512 | /* |
| 481 | * Support for SMP systems. | 513 | * Support for SMP systems. |
| 482 | * Make sure we are running on CPU that wants to change freq | 514 | * Make sure we are running on CPU that wants to change freq |
| 483 | */ | 515 | */ |
| 484 | cpus_clear(set_mask); | 516 | cpus_clear(*set_mask); |
| 485 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) | 517 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) |
| 486 | cpus_or(set_mask, set_mask, online_policy_cpus); | 518 | cpus_or(*set_mask, *set_mask, *online_policy_cpus); |
| 487 | else | 519 | else |
| 488 | cpu_set(j, set_mask); | 520 | cpu_set(j, *set_mask); |
| 489 | 521 | ||
| 490 | set_cpus_allowed_ptr(current, &set_mask); | 522 | set_cpus_allowed_ptr(current, set_mask); |
| 491 | preempt_disable(); | 523 | preempt_disable(); |
| 492 | if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) { | 524 | if (unlikely(!cpu_isset(smp_processor_id(), *set_mask))) { |
| 493 | dprintk("couldn't limit to CPUs in this domain\n"); | 525 | dprintk("couldn't limit to CPUs in this domain\n"); |
| 494 | retval = -EAGAIN; | 526 | retval = -EAGAIN; |
| 495 | if (first_cpu) { | 527 | if (first_cpu) { |
| @@ -500,7 +532,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
| 500 | break; | 532 | break; |
| 501 | } | 533 | } |
| 502 | 534 | ||
| 503 | msr = centrino_model[cpu]->op_points[newstate].index; | 535 | msr = per_cpu(centrino_model, cpu)->op_points[newstate].index; |
| 504 | 536 | ||
| 505 | if (first_cpu) { | 537 | if (first_cpu) { |
| 506 | rdmsr(MSR_IA32_PERF_CTL, oldmsr, h); | 538 | rdmsr(MSR_IA32_PERF_CTL, oldmsr, h); |
| @@ -517,7 +549,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
| 517 | dprintk("target=%dkHz old=%d new=%d msr=%04x\n", | 549 | dprintk("target=%dkHz old=%d new=%d msr=%04x\n", |
| 518 | target_freq, freqs.old, freqs.new, msr); | 550 | target_freq, freqs.old, freqs.new, msr); |
| 519 | 551 | ||
| 520 | for_each_cpu_mask(k, online_policy_cpus) { | 552 | for_each_cpu_mask_nr(k, *online_policy_cpus) { |
| 521 | freqs.cpu = k; | 553 | freqs.cpu = k; |
| 522 | cpufreq_notify_transition(&freqs, | 554 | cpufreq_notify_transition(&freqs, |
| 523 | CPUFREQ_PRECHANGE); | 555 | CPUFREQ_PRECHANGE); |
| @@ -536,11 +568,11 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
| 536 | break; | 568 | break; |
| 537 | } | 569 | } |
| 538 | 570 | ||
| 539 | cpu_set(j, covered_cpus); | 571 | cpu_set(j, *covered_cpus); |
| 540 | preempt_enable(); | 572 | preempt_enable(); |
| 541 | } | 573 | } |
| 542 | 574 | ||
| 543 | for_each_cpu_mask(k, online_policy_cpus) { | 575 | for_each_cpu_mask_nr(k, *online_policy_cpus) { |
| 544 | freqs.cpu = k; | 576 | freqs.cpu = k; |
| 545 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 577 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 546 | } | 578 | } |
| @@ -553,10 +585,12 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
| 553 | * Best effort undo.. | 585 | * Best effort undo.. |
| 554 | */ | 586 | */ |
| 555 | 587 | ||
| 556 | if (!cpus_empty(covered_cpus)) { | 588 | if (!cpus_empty(*covered_cpus)) { |
| 557 | for_each_cpu_mask(j, covered_cpus) { | 589 | cpumask_of_cpu_ptr_declare(new_mask); |
| 558 | set_cpus_allowed_ptr(current, | 590 | |
| 559 | &cpumask_of_cpu(j)); | 591 | for_each_cpu_mask_nr(j, *covered_cpus) { |
| 592 | cpumask_of_cpu_ptr_next(new_mask, j); | ||
| 593 | set_cpus_allowed_ptr(current, new_mask); | ||
| 560 | wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); | 594 | wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); |
| 561 | } | 595 | } |
| 562 | } | 596 | } |
| @@ -564,19 +598,22 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
| 564 | tmp = freqs.new; | 598 | tmp = freqs.new; |
| 565 | freqs.new = freqs.old; | 599 | freqs.new = freqs.old; |
| 566 | freqs.old = tmp; | 600 | freqs.old = tmp; |
| 567 | for_each_cpu_mask(j, online_policy_cpus) { | 601 | for_each_cpu_mask_nr(j, *online_policy_cpus) { |
| 568 | freqs.cpu = j; | 602 | freqs.cpu = j; |
| 569 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 603 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
| 570 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 604 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 571 | } | 605 | } |
| 572 | } | 606 | } |
| 573 | set_cpus_allowed_ptr(current, &saved_mask); | 607 | set_cpus_allowed_ptr(current, saved_mask); |
| 574 | return 0; | 608 | retval = 0; |
| 609 | goto out; | ||
| 575 | 610 | ||
| 576 | migrate_end: | 611 | migrate_end: |
| 577 | preempt_enable(); | 612 | preempt_enable(); |
| 578 | set_cpus_allowed_ptr(current, &saved_mask); | 613 | set_cpus_allowed_ptr(current, saved_mask); |
| 579 | return 0; | 614 | out: |
| 615 | CPUMASK_FREE(allmasks); | ||
| 616 | return retval; | ||
| 580 | } | 617 | } |
| 581 | 618 | ||
| 582 | static struct freq_attr* centrino_attr[] = { | 619 | static struct freq_attr* centrino_attr[] = { |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index 1b50244b1fdf..2f3728dc24f6 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | |||
| @@ -244,7 +244,8 @@ static unsigned int _speedstep_get(const cpumask_t *cpus) | |||
| 244 | 244 | ||
| 245 | static unsigned int speedstep_get(unsigned int cpu) | 245 | static unsigned int speedstep_get(unsigned int cpu) |
| 246 | { | 246 | { |
| 247 | return _speedstep_get(&cpumask_of_cpu(cpu)); | 247 | cpumask_of_cpu_ptr(newmask, cpu); |
| 248 | return _speedstep_get(newmask); | ||
| 248 | } | 249 | } |
| 249 | 250 | ||
| 250 | /** | 251 | /** |
| @@ -279,7 +280,7 @@ static int speedstep_target (struct cpufreq_policy *policy, | |||
| 279 | 280 | ||
| 280 | cpus_allowed = current->cpus_allowed; | 281 | cpus_allowed = current->cpus_allowed; |
| 281 | 282 | ||
| 282 | for_each_cpu_mask(i, policy->cpus) { | 283 | for_each_cpu_mask_nr(i, policy->cpus) { |
| 283 | freqs.cpu = i; | 284 | freqs.cpu = i; |
| 284 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 285 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
| 285 | } | 286 | } |
| @@ -292,7 +293,7 @@ static int speedstep_target (struct cpufreq_policy *policy, | |||
| 292 | /* allow to be run on all CPUs */ | 293 | /* allow to be run on all CPUs */ |
| 293 | set_cpus_allowed_ptr(current, &cpus_allowed); | 294 | set_cpus_allowed_ptr(current, &cpus_allowed); |
| 294 | 295 | ||
| 295 | for_each_cpu_mask(i, policy->cpus) { | 296 | for_each_cpu_mask_nr(i, policy->cpus) { |
| 296 | freqs.cpu = i; | 297 | freqs.cpu = i; |
| 297 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 298 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
| 298 | } | 299 | } |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index ff517f0b8cc4..650d40f7912b 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
| @@ -489,7 +489,7 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index) | |||
| 489 | int sibling; | 489 | int sibling; |
| 490 | 490 | ||
| 491 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 491 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
| 492 | for_each_cpu_mask(sibling, this_leaf->shared_cpu_map) { | 492 | for_each_cpu_mask_nr(sibling, this_leaf->shared_cpu_map) { |
| 493 | sibling_leaf = CPUID4_INFO_IDX(sibling, index); | 493 | sibling_leaf = CPUID4_INFO_IDX(sibling, index); |
| 494 | cpu_clear(cpu, sibling_leaf->shared_cpu_map); | 494 | cpu_clear(cpu, sibling_leaf->shared_cpu_map); |
| 495 | } | 495 | } |
| @@ -516,6 +516,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu) | |||
| 516 | unsigned long j; | 516 | unsigned long j; |
| 517 | int retval; | 517 | int retval; |
| 518 | cpumask_t oldmask; | 518 | cpumask_t oldmask; |
| 519 | cpumask_of_cpu_ptr(newmask, cpu); | ||
| 519 | 520 | ||
| 520 | if (num_cache_leaves == 0) | 521 | if (num_cache_leaves == 0) |
| 521 | return -ENOENT; | 522 | return -ENOENT; |
| @@ -526,7 +527,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu) | |||
| 526 | return -ENOMEM; | 527 | return -ENOMEM; |
| 527 | 528 | ||
| 528 | oldmask = current->cpus_allowed; | 529 | oldmask = current->cpus_allowed; |
| 529 | retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 530 | retval = set_cpus_allowed_ptr(current, newmask); |
| 530 | if (retval) | 531 | if (retval) |
| 531 | goto out; | 532 | goto out; |
| 532 | 533 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 9ab65be82427..65a339678ece 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
| @@ -580,7 +580,7 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, | |||
| 580 | char __user *buf = ubuf; | 580 | char __user *buf = ubuf; |
| 581 | int i, err; | 581 | int i, err; |
| 582 | 582 | ||
| 583 | cpu_tsc = kmalloc(NR_CPUS * sizeof(long), GFP_KERNEL); | 583 | cpu_tsc = kmalloc(nr_cpu_ids * sizeof(long), GFP_KERNEL); |
| 584 | if (!cpu_tsc) | 584 | if (!cpu_tsc) |
| 585 | return -ENOMEM; | 585 | return -ENOMEM; |
| 586 | 586 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 7c9a813e1193..88736cadbaa6 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c | |||
| @@ -527,7 +527,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
| 527 | if (err) | 527 | if (err) |
| 528 | goto out_free; | 528 | goto out_free; |
| 529 | 529 | ||
| 530 | for_each_cpu_mask(i, b->cpus) { | 530 | for_each_cpu_mask_nr(i, b->cpus) { |
| 531 | if (i == cpu) | 531 | if (i == cpu) |
| 532 | continue; | 532 | continue; |
| 533 | 533 | ||
| @@ -617,7 +617,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank) | |||
| 617 | #endif | 617 | #endif |
| 618 | 618 | ||
| 619 | /* remove all sibling symlinks before unregistering */ | 619 | /* remove all sibling symlinks before unregistering */ |
| 620 | for_each_cpu_mask(i, b->cpus) { | 620 | for_each_cpu_mask_nr(i, b->cpus) { |
| 621 | if (i == cpu) | 621 | if (i == cpu) |
| 622 | continue; | 622 | continue; |
| 623 | 623 | ||
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 0d0d9057e7c0..a26c480b9491 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
| @@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) | |||
| 160 | { | 160 | { |
| 161 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 161 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
| 162 | *pos = first_cpu(cpu_online_map); | 162 | *pos = first_cpu(cpu_online_map); |
| 163 | if ((*pos) < NR_CPUS && cpu_online(*pos)) | 163 | if ((*pos) < nr_cpu_ids && cpu_online(*pos)) |
| 164 | return &cpu_data(*pos); | 164 | return &cpu_data(*pos); |
| 165 | return NULL; | 165 | return NULL; |
| 166 | } | 166 | } |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index cdfd94cc6b14..109792bc7cfa 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
| @@ -54,6 +54,16 @@ | |||
| 54 | #include <asm/ftrace.h> | 54 | #include <asm/ftrace.h> |
| 55 | #include <asm/irq_vectors.h> | 55 | #include <asm/irq_vectors.h> |
| 56 | 56 | ||
| 57 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ | ||
| 58 | #include <linux/elf-em.h> | ||
| 59 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | ||
| 60 | #define __AUDIT_ARCH_LE 0x40000000 | ||
| 61 | |||
| 62 | #ifndef CONFIG_AUDITSYSCALL | ||
| 63 | #define sysenter_audit syscall_trace_entry | ||
| 64 | #define sysexit_audit syscall_exit_work | ||
| 65 | #endif | ||
| 66 | |||
| 57 | /* | 67 | /* |
| 58 | * We use macros for low-level operations which need to be overridden | 68 | * We use macros for low-level operations which need to be overridden |
| 59 | * for paravirtualization. The following will never clobber any registers: | 69 | * for paravirtualization. The following will never clobber any registers: |
| @@ -333,7 +343,8 @@ sysenter_past_esp: | |||
| 333 | 343 | ||
| 334 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 344 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
| 335 | testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) | 345 | testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) |
| 336 | jnz syscall_trace_entry | 346 | jnz sysenter_audit |
| 347 | sysenter_do_call: | ||
| 337 | cmpl $(nr_syscalls), %eax | 348 | cmpl $(nr_syscalls), %eax |
| 338 | jae syscall_badsys | 349 | jae syscall_badsys |
| 339 | call *sys_call_table(,%eax,4) | 350 | call *sys_call_table(,%eax,4) |
| @@ -343,7 +354,8 @@ sysenter_past_esp: | |||
| 343 | TRACE_IRQS_OFF | 354 | TRACE_IRQS_OFF |
| 344 | movl TI_flags(%ebp), %ecx | 355 | movl TI_flags(%ebp), %ecx |
| 345 | testw $_TIF_ALLWORK_MASK, %cx | 356 | testw $_TIF_ALLWORK_MASK, %cx |
| 346 | jne syscall_exit_work | 357 | jne sysexit_audit |
| 358 | sysenter_exit: | ||
| 347 | /* if something modifies registers it must also disable sysexit */ | 359 | /* if something modifies registers it must also disable sysexit */ |
| 348 | movl PT_EIP(%esp), %edx | 360 | movl PT_EIP(%esp), %edx |
| 349 | movl PT_OLDESP(%esp), %ecx | 361 | movl PT_OLDESP(%esp), %ecx |
| @@ -351,6 +363,45 @@ sysenter_past_esp: | |||
| 351 | TRACE_IRQS_ON | 363 | TRACE_IRQS_ON |
| 352 | 1: mov PT_FS(%esp), %fs | 364 | 1: mov PT_FS(%esp), %fs |
| 353 | ENABLE_INTERRUPTS_SYSEXIT | 365 | ENABLE_INTERRUPTS_SYSEXIT |
| 366 | |||
| 367 | #ifdef CONFIG_AUDITSYSCALL | ||
| 368 | sysenter_audit: | ||
| 369 | testw $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp) | ||
| 370 | jnz syscall_trace_entry | ||
| 371 | addl $4,%esp | ||
| 372 | CFI_ADJUST_CFA_OFFSET -4 | ||
| 373 | /* %esi already in 8(%esp) 6th arg: 4th syscall arg */ | ||
| 374 | /* %edx already in 4(%esp) 5th arg: 3rd syscall arg */ | ||
| 375 | /* %ecx already in 0(%esp) 4th arg: 2nd syscall arg */ | ||
| 376 | movl %ebx,%ecx /* 3rd arg: 1st syscall arg */ | ||
| 377 | movl %eax,%edx /* 2nd arg: syscall number */ | ||
| 378 | movl $AUDIT_ARCH_I386,%eax /* 1st arg: audit arch */ | ||
| 379 | call audit_syscall_entry | ||
| 380 | pushl %ebx | ||
| 381 | CFI_ADJUST_CFA_OFFSET 4 | ||
| 382 | movl PT_EAX(%esp),%eax /* reload syscall number */ | ||
| 383 | jmp sysenter_do_call | ||
| 384 | |||
| 385 | sysexit_audit: | ||
| 386 | testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx | ||
| 387 | jne syscall_exit_work | ||
| 388 | TRACE_IRQS_ON | ||
| 389 | ENABLE_INTERRUPTS(CLBR_ANY) | ||
| 390 | movl %eax,%edx /* second arg, syscall return value */ | ||
| 391 | cmpl $0,%eax /* is it < 0? */ | ||
| 392 | setl %al /* 1 if so, 0 if not */ | ||
| 393 | movzbl %al,%eax /* zero-extend that */ | ||
| 394 | inc %eax /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */ | ||
| 395 | call audit_syscall_exit | ||
| 396 | DISABLE_INTERRUPTS(CLBR_ANY) | ||
| 397 | TRACE_IRQS_OFF | ||
| 398 | movl TI_flags(%ebp), %ecx | ||
| 399 | testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx | ||
| 400 | jne syscall_exit_work | ||
| 401 | movl PT_EAX(%esp),%eax /* reload syscall return value */ | ||
| 402 | jmp sysenter_exit | ||
| 403 | #endif | ||
| 404 | |||
| 354 | CFI_ENDPROC | 405 | CFI_ENDPROC |
| 355 | .pushsection .fixup,"ax" | 406 | .pushsection .fixup,"ax" |
| 356 | 2: movl $0,PT_FS(%esp) | 407 | 2: movl $0,PT_FS(%esp) |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 8410e26f4183..89434d439605 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
| @@ -53,6 +53,12 @@ | |||
| 53 | #include <asm/paravirt.h> | 53 | #include <asm/paravirt.h> |
| 54 | #include <asm/ftrace.h> | 54 | #include <asm/ftrace.h> |
| 55 | 55 | ||
| 56 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ | ||
| 57 | #include <linux/elf-em.h> | ||
| 58 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
| 59 | #define __AUDIT_ARCH_64BIT 0x80000000 | ||
| 60 | #define __AUDIT_ARCH_LE 0x40000000 | ||
| 61 | |||
| 56 | .code64 | 62 | .code64 |
| 57 | 63 | ||
| 58 | #ifdef CONFIG_FTRACE | 64 | #ifdef CONFIG_FTRACE |
| @@ -351,6 +357,7 @@ ENTRY(system_call_after_swapgs) | |||
| 351 | GET_THREAD_INFO(%rcx) | 357 | GET_THREAD_INFO(%rcx) |
| 352 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%rcx) | 358 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%rcx) |
| 353 | jnz tracesys | 359 | jnz tracesys |
| 360 | system_call_fastpath: | ||
| 354 | cmpq $__NR_syscall_max,%rax | 361 | cmpq $__NR_syscall_max,%rax |
| 355 | ja badsys | 362 | ja badsys |
| 356 | movq %r10,%rcx | 363 | movq %r10,%rcx |
| @@ -402,16 +409,16 @@ sysret_careful: | |||
| 402 | sysret_signal: | 409 | sysret_signal: |
| 403 | TRACE_IRQS_ON | 410 | TRACE_IRQS_ON |
| 404 | ENABLE_INTERRUPTS(CLBR_NONE) | 411 | ENABLE_INTERRUPTS(CLBR_NONE) |
| 405 | testl $_TIF_DO_NOTIFY_MASK,%edx | 412 | #ifdef CONFIG_AUDITSYSCALL |
| 406 | jz 1f | 413 | bt $TIF_SYSCALL_AUDIT,%edx |
| 407 | 414 | jc sysret_audit | |
| 408 | /* Really a signal */ | 415 | #endif |
| 409 | /* edx: work flags (arg3) */ | 416 | /* edx: work flags (arg3) */ |
| 410 | leaq do_notify_resume(%rip),%rax | 417 | leaq do_notify_resume(%rip),%rax |
| 411 | leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 | 418 | leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 |
| 412 | xorl %esi,%esi # oldset -> arg2 | 419 | xorl %esi,%esi # oldset -> arg2 |
| 413 | call ptregscall_common | 420 | call ptregscall_common |
| 414 | 1: movl $_TIF_WORK_MASK,%edi | 421 | movl $_TIF_WORK_MASK,%edi |
| 415 | /* Use IRET because user could have changed frame. This | 422 | /* Use IRET because user could have changed frame. This |
| 416 | works because ptregscall_common has called FIXUP_TOP_OF_STACK. */ | 423 | works because ptregscall_common has called FIXUP_TOP_OF_STACK. */ |
| 417 | DISABLE_INTERRUPTS(CLBR_NONE) | 424 | DISABLE_INTERRUPTS(CLBR_NONE) |
| @@ -422,8 +429,45 @@ badsys: | |||
| 422 | movq $-ENOSYS,RAX-ARGOFFSET(%rsp) | 429 | movq $-ENOSYS,RAX-ARGOFFSET(%rsp) |
| 423 | jmp ret_from_sys_call | 430 | jmp ret_from_sys_call |
| 424 | 431 | ||
| 432 | #ifdef CONFIG_AUDITSYSCALL | ||
| 433 | /* | ||
| 434 | * Fast path for syscall audit without full syscall trace. | ||
| 435 | * We just call audit_syscall_entry() directly, and then | ||
| 436 | * jump back to the normal fast path. | ||
| 437 | */ | ||
| 438 | auditsys: | ||
| 439 | movq %r10,%r9 /* 6th arg: 4th syscall arg */ | ||
| 440 | movq %rdx,%r8 /* 5th arg: 3rd syscall arg */ | ||
| 441 | movq %rsi,%rcx /* 4th arg: 2nd syscall arg */ | ||
| 442 | movq %rdi,%rdx /* 3rd arg: 1st syscall arg */ | ||
| 443 | movq %rax,%rsi /* 2nd arg: syscall number */ | ||
| 444 | movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */ | ||
| 445 | call audit_syscall_entry | ||
| 446 | LOAD_ARGS 0 /* reload call-clobbered registers */ | ||
| 447 | jmp system_call_fastpath | ||
| 448 | |||
| 449 | /* | ||
| 450 | * Return fast path for syscall audit. Call audit_syscall_exit() | ||
| 451 | * directly and then jump back to the fast path with TIF_SYSCALL_AUDIT | ||
| 452 | * masked off. | ||
| 453 | */ | ||
| 454 | sysret_audit: | ||
| 455 | movq %rax,%rsi /* second arg, syscall return value */ | ||
| 456 | cmpq $0,%rax /* is it < 0? */ | ||
| 457 | setl %al /* 1 if so, 0 if not */ | ||
| 458 | movzbl %al,%edi /* zero-extend that into %edi */ | ||
| 459 | inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */ | ||
| 460 | call audit_syscall_exit | ||
| 461 | movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi | ||
| 462 | jmp sysret_check | ||
| 463 | #endif /* CONFIG_AUDITSYSCALL */ | ||
| 464 | |||
| 425 | /* Do syscall tracing */ | 465 | /* Do syscall tracing */ |
| 426 | tracesys: | 466 | tracesys: |
| 467 | #ifdef CONFIG_AUDITSYSCALL | ||
| 468 | testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%rcx) | ||
| 469 | jz auditsys | ||
| 470 | #endif | ||
| 427 | SAVE_REST | 471 | SAVE_REST |
| 428 | movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */ | 472 | movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */ |
| 429 | FIXUP_TOP_OF_STACK %rdi | 473 | FIXUP_TOP_OF_STACK %rdi |
| @@ -448,6 +492,7 @@ tracesys: | |||
| 448 | * Has correct top of stack, but partial stack frame. | 492 | * Has correct top of stack, but partial stack frame. |
| 449 | */ | 493 | */ |
| 450 | .globl int_ret_from_sys_call | 494 | .globl int_ret_from_sys_call |
| 495 | .globl int_with_check | ||
| 451 | int_ret_from_sys_call: | 496 | int_ret_from_sys_call: |
| 452 | DISABLE_INTERRUPTS(CLBR_NONE) | 497 | DISABLE_INTERRUPTS(CLBR_NONE) |
| 453 | TRACE_IRQS_OFF | 498 | TRACE_IRQS_OFF |
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c index 1a9c68845ee8..786548a62d38 100644 --- a/arch/x86/kernel/genapic_flat_64.c +++ b/arch/x86/kernel/genapic_flat_64.c | |||
| @@ -168,7 +168,7 @@ static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask) | |||
| 168 | * May as well be the first. | 168 | * May as well be the first. |
| 169 | */ | 169 | */ |
| 170 | cpu = first_cpu(cpumask); | 170 | cpu = first_cpu(cpumask); |
| 171 | if ((unsigned)cpu < NR_CPUS) | 171 | if ((unsigned)cpu < nr_cpu_ids) |
| 172 | return per_cpu(x86_cpu_to_apicid, cpu); | 172 | return per_cpu(x86_cpu_to_apicid, cpu); |
| 173 | else | 173 | else |
| 174 | return BAD_APICID; | 174 | return BAD_APICID; |
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c index 3c3929340692..2cfcbded888a 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/genx2apic_uv_x.c | |||
| @@ -98,7 +98,7 @@ static void uv_send_IPI_mask(cpumask_t mask, int vector) | |||
| 98 | { | 98 | { |
| 99 | unsigned int cpu; | 99 | unsigned int cpu; |
| 100 | 100 | ||
| 101 | for (cpu = 0; cpu < NR_CPUS; ++cpu) | 101 | for_each_possible_cpu(cpu) |
| 102 | if (cpu_isset(cpu, mask)) | 102 | if (cpu_isset(cpu, mask)) |
| 103 | uv_send_IPI_one(cpu, vector); | 103 | uv_send_IPI_one(cpu, vector); |
| 104 | } | 104 | } |
| @@ -132,7 +132,7 @@ static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask) | |||
| 132 | * May as well be the first. | 132 | * May as well be the first. |
| 133 | */ | 133 | */ |
| 134 | cpu = first_cpu(cpumask); | 134 | cpu = first_cpu(cpumask); |
| 135 | if ((unsigned)cpu < NR_CPUS) | 135 | if ((unsigned)cpu < nr_cpu_ids) |
| 136 | return per_cpu(x86_cpu_to_apicid, cpu); | 136 | return per_cpu(x86_cpu_to_apicid, cpu); |
| 137 | else | 137 | else |
| 138 | return BAD_APICID; | 138 | return BAD_APICID; |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 0ea6a19bfdfe..ad2b15a1334d 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
| @@ -468,7 +468,7 @@ void hpet_disable(void) | |||
| 468 | #define RTC_NUM_INTS 1 | 468 | #define RTC_NUM_INTS 1 |
| 469 | 469 | ||
| 470 | static unsigned long hpet_rtc_flags; | 470 | static unsigned long hpet_rtc_flags; |
| 471 | static unsigned long hpet_prev_update_sec; | 471 | static int hpet_prev_update_sec; |
| 472 | static struct rtc_time hpet_alarm_time; | 472 | static struct rtc_time hpet_alarm_time; |
| 473 | static unsigned long hpet_pie_count; | 473 | static unsigned long hpet_pie_count; |
| 474 | static unsigned long hpet_t1_cmp; | 474 | static unsigned long hpet_t1_cmp; |
| @@ -575,6 +575,9 @@ int hpet_set_rtc_irq_bit(unsigned long bit_mask) | |||
| 575 | 575 | ||
| 576 | hpet_rtc_flags |= bit_mask; | 576 | hpet_rtc_flags |= bit_mask; |
| 577 | 577 | ||
| 578 | if ((bit_mask & RTC_UIE) && !(oldbits & RTC_UIE)) | ||
| 579 | hpet_prev_update_sec = -1; | ||
| 580 | |||
| 578 | if (!oldbits) | 581 | if (!oldbits) |
| 579 | hpet_rtc_timer_init(); | 582 | hpet_rtc_timer_init(); |
| 580 | 583 | ||
| @@ -652,7 +655,7 @@ static void hpet_rtc_timer_reinit(void) | |||
| 652 | if (hpet_rtc_flags & RTC_PIE) | 655 | if (hpet_rtc_flags & RTC_PIE) |
| 653 | hpet_pie_count += lost_ints; | 656 | hpet_pie_count += lost_ints; |
| 654 | if (printk_ratelimit()) | 657 | if (printk_ratelimit()) |
| 655 | printk(KERN_WARNING "rtc: lost %d interrupts\n", | 658 | printk(KERN_WARNING "hpet1: lost %d rtc interrupts\n", |
| 656 | lost_ints); | 659 | lost_ints); |
| 657 | } | 660 | } |
| 658 | } | 661 | } |
| @@ -670,7 +673,8 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) | |||
| 670 | 673 | ||
| 671 | if (hpet_rtc_flags & RTC_UIE && | 674 | if (hpet_rtc_flags & RTC_UIE && |
| 672 | curr_time.tm_sec != hpet_prev_update_sec) { | 675 | curr_time.tm_sec != hpet_prev_update_sec) { |
| 673 | rtc_int_flag = RTC_UF; | 676 | if (hpet_prev_update_sec >= 0) |
| 677 | rtc_int_flag = RTC_UF; | ||
| 674 | hpet_prev_update_sec = curr_time.tm_sec; | 678 | hpet_prev_update_sec = curr_time.tm_sec; |
| 675 | } | 679 | } |
| 676 | 680 | ||
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 64a46affd858..8269434d1707 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
| @@ -732,7 +732,7 @@ static int __assign_irq_vector(int irq, cpumask_t mask) | |||
| 732 | return 0; | 732 | return 0; |
| 733 | } | 733 | } |
| 734 | 734 | ||
| 735 | for_each_cpu_mask(cpu, mask) { | 735 | for_each_cpu_mask_nr(cpu, mask) { |
| 736 | cpumask_t domain, new_mask; | 736 | cpumask_t domain, new_mask; |
| 737 | int new_cpu; | 737 | int new_cpu; |
| 738 | int vector, offset; | 738 | int vector, offset; |
| @@ -753,7 +753,7 @@ next: | |||
| 753 | continue; | 753 | continue; |
| 754 | if (vector == IA32_SYSCALL_VECTOR) | 754 | if (vector == IA32_SYSCALL_VECTOR) |
| 755 | goto next; | 755 | goto next; |
| 756 | for_each_cpu_mask(new_cpu, new_mask) | 756 | for_each_cpu_mask_nr(new_cpu, new_mask) |
| 757 | if (per_cpu(vector_irq, new_cpu)[vector] != -1) | 757 | if (per_cpu(vector_irq, new_cpu)[vector] != -1) |
| 758 | goto next; | 758 | goto next; |
| 759 | /* Found one! */ | 759 | /* Found one! */ |
| @@ -763,7 +763,7 @@ next: | |||
| 763 | cfg->move_in_progress = 1; | 763 | cfg->move_in_progress = 1; |
| 764 | cfg->old_domain = cfg->domain; | 764 | cfg->old_domain = cfg->domain; |
| 765 | } | 765 | } |
| 766 | for_each_cpu_mask(new_cpu, new_mask) | 766 | for_each_cpu_mask_nr(new_cpu, new_mask) |
| 767 | per_cpu(vector_irq, new_cpu)[vector] = irq; | 767 | per_cpu(vector_irq, new_cpu)[vector] = irq; |
| 768 | cfg->vector = vector; | 768 | cfg->vector = vector; |
| 769 | cfg->domain = domain; | 769 | cfg->domain = domain; |
| @@ -795,7 +795,7 @@ static void __clear_irq_vector(int irq) | |||
| 795 | 795 | ||
| 796 | vector = cfg->vector; | 796 | vector = cfg->vector; |
| 797 | cpus_and(mask, cfg->domain, cpu_online_map); | 797 | cpus_and(mask, cfg->domain, cpu_online_map); |
| 798 | for_each_cpu_mask(cpu, mask) | 798 | for_each_cpu_mask_nr(cpu, mask) |
| 799 | per_cpu(vector_irq, cpu)[vector] = -1; | 799 | per_cpu(vector_irq, cpu)[vector] = -1; |
| 800 | 800 | ||
| 801 | cfg->vector = 0; | 801 | cfg->vector = 0; |
| @@ -1373,12 +1373,10 @@ static unsigned int startup_ioapic_irq(unsigned int irq) | |||
| 1373 | static int ioapic_retrigger_irq(unsigned int irq) | 1373 | static int ioapic_retrigger_irq(unsigned int irq) |
| 1374 | { | 1374 | { |
| 1375 | struct irq_cfg *cfg = &irq_cfg[irq]; | 1375 | struct irq_cfg *cfg = &irq_cfg[irq]; |
| 1376 | cpumask_t mask; | ||
| 1377 | unsigned long flags; | 1376 | unsigned long flags; |
| 1378 | 1377 | ||
| 1379 | spin_lock_irqsave(&vector_lock, flags); | 1378 | spin_lock_irqsave(&vector_lock, flags); |
| 1380 | mask = cpumask_of_cpu(first_cpu(cfg->domain)); | 1379 | send_IPI_mask(cpumask_of_cpu(first_cpu(cfg->domain)), cfg->vector); |
| 1381 | send_IPI_mask(mask, cfg->vector); | ||
| 1382 | spin_unlock_irqrestore(&vector_lock, flags); | 1380 | spin_unlock_irqrestore(&vector_lock, flags); |
| 1383 | 1381 | ||
| 1384 | return 1; | 1382 | return 1; |
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c index 0373e88de95a..1f26fd9ec4f4 100644 --- a/arch/x86/kernel/irqinit_64.c +++ b/arch/x86/kernel/irqinit_64.c | |||
| @@ -43,10 +43,11 @@ | |||
| 43 | 43 | ||
| 44 | #define BUILD_IRQ(nr) \ | 44 | #define BUILD_IRQ(nr) \ |
| 45 | asmlinkage void IRQ_NAME(nr); \ | 45 | asmlinkage void IRQ_NAME(nr); \ |
| 46 | asm("\n.p2align\n" \ | 46 | asm("\n.text\n.p2align\n" \ |
| 47 | "IRQ" #nr "_interrupt:\n\t" \ | 47 | "IRQ" #nr "_interrupt:\n\t" \ |
| 48 | "push $~(" #nr ") ; " \ | 48 | "push $~(" #nr ") ; " \ |
| 49 | "jmp common_interrupt"); | 49 | "jmp common_interrupt\n" \ |
| 50 | ".previous"); | ||
| 50 | 51 | ||
| 51 | #define BI(x,y) \ | 52 | #define BI(x,y) \ |
| 52 | BUILD_IRQ(x##y) | 53 | BUILD_IRQ(x##y) |
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 43c019f85f0d..6c27679ec6aa 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
| @@ -431,7 +431,6 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | |||
| 431 | regs->ip = (unsigned long)p->ainsn.insn; | 431 | regs->ip = (unsigned long)p->ainsn.insn; |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | /* Called with kretprobe_lock held */ | ||
| 435 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 434 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 436 | struct pt_regs *regs) | 435 | struct pt_regs *regs) |
| 437 | { | 436 | { |
| @@ -682,8 +681,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
| 682 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; | 681 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; |
| 683 | 682 | ||
| 684 | INIT_HLIST_HEAD(&empty_rp); | 683 | INIT_HLIST_HEAD(&empty_rp); |
| 685 | spin_lock_irqsave(&kretprobe_lock, flags); | 684 | kretprobe_hash_lock(current, &head, &flags); |
| 686 | head = kretprobe_inst_table_head(current); | ||
| 687 | /* fixup registers */ | 685 | /* fixup registers */ |
| 688 | #ifdef CONFIG_X86_64 | 686 | #ifdef CONFIG_X86_64 |
| 689 | regs->cs = __KERNEL_CS; | 687 | regs->cs = __KERNEL_CS; |
| @@ -732,7 +730,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
| 732 | 730 | ||
| 733 | kretprobe_assert(ri, orig_ret_address, trampoline_address); | 731 | kretprobe_assert(ri, orig_ret_address, trampoline_address); |
| 734 | 732 | ||
| 735 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 733 | kretprobe_hash_unlock(current, &flags); |
| 736 | 734 | ||
| 737 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 735 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
| 738 | hlist_del(&ri->hlist); | 736 | hlist_del(&ri->hlist); |
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index a8449571858a..3fee2aa50f3f 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c | |||
| @@ -62,12 +62,12 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload) | |||
| 62 | 62 | ||
| 63 | if (reload) { | 63 | if (reload) { |
| 64 | #ifdef CONFIG_SMP | 64 | #ifdef CONFIG_SMP |
| 65 | cpumask_t mask; | 65 | cpumask_of_cpu_ptr_declare(mask); |
| 66 | 66 | ||
| 67 | preempt_disable(); | 67 | preempt_disable(); |
| 68 | load_LDT(pc); | 68 | load_LDT(pc); |
| 69 | mask = cpumask_of_cpu(smp_processor_id()); | 69 | cpumask_of_cpu_ptr_next(mask, smp_processor_id()); |
| 70 | if (!cpus_equal(current->mm->cpu_vm_mask, mask)) | 70 | if (!cpus_equal(current->mm->cpu_vm_mask, *mask)) |
| 71 | smp_call_function(flush_ldt, current->mm, 1); | 71 | smp_call_function(flush_ldt, current->mm, 1); |
| 72 | preempt_enable(); | 72 | preempt_enable(); |
| 73 | #else | 73 | #else |
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 8864230d55af..9fe478d98406 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <asm/cpufeature.h> | 22 | #include <asm/cpufeature.h> |
| 23 | #include <asm/desc.h> | 23 | #include <asm/desc.h> |
| 24 | #include <asm/system.h> | 24 | #include <asm/system.h> |
| 25 | #include <asm/cacheflush.h> | ||
| 25 | 26 | ||
| 26 | #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) | 27 | #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) |
| 27 | static u32 kexec_pgd[1024] PAGE_ALIGNED; | 28 | static u32 kexec_pgd[1024] PAGE_ALIGNED; |
| @@ -85,10 +86,12 @@ static void load_segments(void) | |||
| 85 | * reboot code buffer to allow us to avoid allocations | 86 | * reboot code buffer to allow us to avoid allocations |
| 86 | * later. | 87 | * later. |
| 87 | * | 88 | * |
| 88 | * Currently nothing. | 89 | * Make control page executable. |
| 89 | */ | 90 | */ |
| 90 | int machine_kexec_prepare(struct kimage *image) | 91 | int machine_kexec_prepare(struct kimage *image) |
| 91 | { | 92 | { |
| 93 | if (nx_enabled) | ||
| 94 | set_pages_x(image->control_code_page, 1); | ||
| 92 | return 0; | 95 | return 0; |
| 93 | } | 96 | } |
| 94 | 97 | ||
| @@ -98,27 +101,48 @@ int machine_kexec_prepare(struct kimage *image) | |||
| 98 | */ | 101 | */ |
| 99 | void machine_kexec_cleanup(struct kimage *image) | 102 | void machine_kexec_cleanup(struct kimage *image) |
| 100 | { | 103 | { |
| 104 | if (nx_enabled) | ||
| 105 | set_pages_nx(image->control_code_page, 1); | ||
| 101 | } | 106 | } |
| 102 | 107 | ||
| 103 | /* | 108 | /* |
| 104 | * Do not allocate memory (or fail in any way) in machine_kexec(). | 109 | * Do not allocate memory (or fail in any way) in machine_kexec(). |
| 105 | * We are past the point of no return, committed to rebooting now. | 110 | * We are past the point of no return, committed to rebooting now. |
| 106 | */ | 111 | */ |
| 107 | NORET_TYPE void machine_kexec(struct kimage *image) | 112 | void machine_kexec(struct kimage *image) |
| 108 | { | 113 | { |
| 109 | unsigned long page_list[PAGES_NR]; | 114 | unsigned long page_list[PAGES_NR]; |
| 110 | void *control_page; | 115 | void *control_page; |
| 116 | asmlinkage unsigned long | ||
| 117 | (*relocate_kernel_ptr)(unsigned long indirection_page, | ||
| 118 | unsigned long control_page, | ||
| 119 | unsigned long start_address, | ||
| 120 | unsigned int has_pae, | ||
| 121 | unsigned int preserve_context); | ||
| 111 | 122 | ||
| 112 | tracer_disable(); | 123 | tracer_disable(); |
| 113 | 124 | ||
| 114 | /* Interrupts aren't acceptable while we reboot */ | 125 | /* Interrupts aren't acceptable while we reboot */ |
| 115 | local_irq_disable(); | 126 | local_irq_disable(); |
| 116 | 127 | ||
| 128 | if (image->preserve_context) { | ||
| 129 | #ifdef CONFIG_X86_IO_APIC | ||
| 130 | /* We need to put APICs in legacy mode so that we can | ||
| 131 | * get timer interrupts in second kernel. kexec/kdump | ||
| 132 | * paths already have calls to disable_IO_APIC() in | ||
| 133 | * one form or other. kexec jump path also need | ||
| 134 | * one. | ||
| 135 | */ | ||
| 136 | disable_IO_APIC(); | ||
| 137 | #endif | ||
| 138 | } | ||
| 139 | |||
| 117 | control_page = page_address(image->control_code_page); | 140 | control_page = page_address(image->control_code_page); |
| 118 | memcpy(control_page, relocate_kernel, PAGE_SIZE); | 141 | memcpy(control_page, relocate_kernel, PAGE_SIZE/2); |
| 119 | 142 | ||
| 143 | relocate_kernel_ptr = control_page; | ||
| 120 | page_list[PA_CONTROL_PAGE] = __pa(control_page); | 144 | page_list[PA_CONTROL_PAGE] = __pa(control_page); |
| 121 | page_list[VA_CONTROL_PAGE] = (unsigned long)relocate_kernel; | 145 | page_list[VA_CONTROL_PAGE] = (unsigned long)control_page; |
| 122 | page_list[PA_PGD] = __pa(kexec_pgd); | 146 | page_list[PA_PGD] = __pa(kexec_pgd); |
| 123 | page_list[VA_PGD] = (unsigned long)kexec_pgd; | 147 | page_list[VA_PGD] = (unsigned long)kexec_pgd; |
| 124 | #ifdef CONFIG_X86_PAE | 148 | #ifdef CONFIG_X86_PAE |
| @@ -131,6 +155,7 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
| 131 | page_list[VA_PTE_0] = (unsigned long)kexec_pte0; | 155 | page_list[VA_PTE_0] = (unsigned long)kexec_pte0; |
| 132 | page_list[PA_PTE_1] = __pa(kexec_pte1); | 156 | page_list[PA_PTE_1] = __pa(kexec_pte1); |
| 133 | page_list[VA_PTE_1] = (unsigned long)kexec_pte1; | 157 | page_list[VA_PTE_1] = (unsigned long)kexec_pte1; |
| 158 | page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) << PAGE_SHIFT); | ||
| 134 | 159 | ||
| 135 | /* The segment registers are funny things, they have both a | 160 | /* The segment registers are funny things, they have both a |
| 136 | * visible and an invisible part. Whenever the visible part is | 161 | * visible and an invisible part. Whenever the visible part is |
| @@ -149,8 +174,10 @@ NORET_TYPE void machine_kexec(struct kimage *image) | |||
| 149 | set_idt(phys_to_virt(0),0); | 174 | set_idt(phys_to_virt(0),0); |
| 150 | 175 | ||
| 151 | /* now call it */ | 176 | /* now call it */ |
| 152 | relocate_kernel((unsigned long)image->head, (unsigned long)page_list, | 177 | image->start = relocate_kernel_ptr((unsigned long)image->head, |
| 153 | image->start, cpu_has_pae); | 178 | (unsigned long)page_list, |
| 179 | image->start, cpu_has_pae, | ||
| 180 | image->preserve_context); | ||
| 154 | } | 181 | } |
| 155 | 182 | ||
| 156 | void arch_crash_save_vmcoreinfo(void) | 183 | void arch_crash_save_vmcoreinfo(void) |
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 9dd9262693a3..c43caa3a91f3 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
| @@ -181,7 +181,7 @@ void machine_kexec_cleanup(struct kimage *image) | |||
| 181 | * Do not allocate memory (or fail in any way) in machine_kexec(). | 181 | * Do not allocate memory (or fail in any way) in machine_kexec(). |
| 182 | * We are past the point of no return, committed to rebooting now. | 182 | * We are past the point of no return, committed to rebooting now. |
| 183 | */ | 183 | */ |
| 184 | NORET_TYPE void machine_kexec(struct kimage *image) | 184 | void machine_kexec(struct kimage *image) |
| 185 | { | 185 | { |
| 186 | unsigned long page_list[PAGES_NR]; | 186 | unsigned long page_list[PAGES_NR]; |
| 187 | void *control_page; | 187 | void *control_page; |
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index fc4790638b69..6994c751590e 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c | |||
| @@ -388,6 +388,7 @@ static int do_microcode_update (void) | |||
| 388 | void *new_mc = NULL; | 388 | void *new_mc = NULL; |
| 389 | int cpu; | 389 | int cpu; |
| 390 | cpumask_t old; | 390 | cpumask_t old; |
| 391 | cpumask_of_cpu_ptr_declare(newmask); | ||
| 391 | 392 | ||
| 392 | old = current->cpus_allowed; | 393 | old = current->cpus_allowed; |
| 393 | 394 | ||
| @@ -404,7 +405,8 @@ static int do_microcode_update (void) | |||
| 404 | 405 | ||
| 405 | if (!uci->valid) | 406 | if (!uci->valid) |
| 406 | continue; | 407 | continue; |
| 407 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 408 | cpumask_of_cpu_ptr_next(newmask, cpu); |
| 409 | set_cpus_allowed_ptr(current, newmask); | ||
| 408 | error = get_maching_microcode(new_mc, cpu); | 410 | error = get_maching_microcode(new_mc, cpu); |
| 409 | if (error < 0) | 411 | if (error < 0) |
| 410 | goto out; | 412 | goto out; |
| @@ -574,6 +576,7 @@ static int apply_microcode_check_cpu(int cpu) | |||
| 574 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 576 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
| 575 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 577 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
| 576 | cpumask_t old; | 578 | cpumask_t old; |
| 579 | cpumask_of_cpu_ptr(newmask, cpu); | ||
| 577 | unsigned int val[2]; | 580 | unsigned int val[2]; |
| 578 | int err = 0; | 581 | int err = 0; |
| 579 | 582 | ||
| @@ -582,7 +585,7 @@ static int apply_microcode_check_cpu(int cpu) | |||
| 582 | return 0; | 585 | return 0; |
| 583 | 586 | ||
| 584 | old = current->cpus_allowed; | 587 | old = current->cpus_allowed; |
| 585 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 588 | set_cpus_allowed_ptr(current, newmask); |
| 586 | 589 | ||
| 587 | /* Check if the microcode we have in memory matches the CPU */ | 590 | /* Check if the microcode we have in memory matches the CPU */ |
| 588 | if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || | 591 | if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || |
| @@ -620,11 +623,12 @@ static int apply_microcode_check_cpu(int cpu) | |||
| 620 | static void microcode_init_cpu(int cpu, int resume) | 623 | static void microcode_init_cpu(int cpu, int resume) |
| 621 | { | 624 | { |
| 622 | cpumask_t old; | 625 | cpumask_t old; |
| 626 | cpumask_of_cpu_ptr(newmask, cpu); | ||
| 623 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 627 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
| 624 | 628 | ||
| 625 | old = current->cpus_allowed; | 629 | old = current->cpus_allowed; |
| 626 | 630 | ||
| 627 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 631 | set_cpus_allowed_ptr(current, newmask); |
| 628 | mutex_lock(µcode_mutex); | 632 | mutex_lock(µcode_mutex); |
| 629 | collect_cpu_info(cpu); | 633 | collect_cpu_info(cpu); |
| 630 | if (uci->valid && system_state == SYSTEM_RUNNING && !resume) | 634 | if (uci->valid && system_state == SYSTEM_RUNNING && !resume) |
| @@ -658,11 +662,12 @@ static ssize_t reload_store(struct sys_device *dev, | |||
| 658 | return -EINVAL; | 662 | return -EINVAL; |
| 659 | if (val == 1) { | 663 | if (val == 1) { |
| 660 | cpumask_t old; | 664 | cpumask_t old; |
| 665 | cpumask_of_cpu_ptr(newmask, cpu); | ||
| 661 | 666 | ||
| 662 | old = current->cpus_allowed; | 667 | old = current->cpus_allowed; |
| 663 | 668 | ||
| 664 | get_online_cpus(); | 669 | get_online_cpus(); |
| 665 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); | 670 | set_cpus_allowed_ptr(current, newmask); |
| 666 | 671 | ||
| 667 | mutex_lock(µcode_mutex); | 672 | mutex_lock(µcode_mutex); |
| 668 | if (uci->valid) | 673 | if (uci->valid) |
diff --git a/arch/x86/kernel/module_64.c b/arch/x86/kernel/module_64.c index 0e867676b5a5..6ba87830d4b1 100644 --- a/arch/x86/kernel/module_64.c +++ b/arch/x86/kernel/module_64.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
| 23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
| 24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
| 25 | #include <linux/mm.h> | ||
| 25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
| 26 | #include <linux/bug.h> | 27 | #include <linux/bug.h> |
| 27 | 28 | ||
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 151f2d171f7c..b67a4b1d4eae 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
| 30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
| 31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
| 32 | #include <linux/crash_dump.h> | ||
| 32 | #include <linux/dma-mapping.h> | 33 | #include <linux/dma-mapping.h> |
| 33 | #include <linux/bitops.h> | 34 | #include <linux/bitops.h> |
| 34 | #include <linux/pci_ids.h> | 35 | #include <linux/pci_ids.h> |
| @@ -36,6 +37,7 @@ | |||
| 36 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
| 37 | #include <linux/scatterlist.h> | 38 | #include <linux/scatterlist.h> |
| 38 | #include <linux/iommu-helper.h> | 39 | #include <linux/iommu-helper.h> |
| 40 | |||
| 39 | #include <asm/iommu.h> | 41 | #include <asm/iommu.h> |
| 40 | #include <asm/calgary.h> | 42 | #include <asm/calgary.h> |
| 41 | #include <asm/tce.h> | 43 | #include <asm/tce.h> |
| @@ -167,6 +169,8 @@ static void calgary_dump_error_regs(struct iommu_table *tbl); | |||
| 167 | static void calioc2_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev); | 169 | static void calioc2_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev); |
| 168 | static void calioc2_tce_cache_blast(struct iommu_table *tbl); | 170 | static void calioc2_tce_cache_blast(struct iommu_table *tbl); |
| 169 | static void calioc2_dump_error_regs(struct iommu_table *tbl); | 171 | static void calioc2_dump_error_regs(struct iommu_table *tbl); |
| 172 | static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl); | ||
| 173 | static void get_tce_space_from_tar(void); | ||
| 170 | 174 | ||
| 171 | static struct cal_chipset_ops calgary_chip_ops = { | 175 | static struct cal_chipset_ops calgary_chip_ops = { |
| 172 | .handle_quirks = calgary_handle_quirks, | 176 | .handle_quirks = calgary_handle_quirks, |
| @@ -410,22 +414,6 @@ static void calgary_unmap_sg(struct device *dev, | |||
| 410 | } | 414 | } |
| 411 | } | 415 | } |
| 412 | 416 | ||
| 413 | static int calgary_nontranslate_map_sg(struct device* dev, | ||
| 414 | struct scatterlist *sg, int nelems, int direction) | ||
| 415 | { | ||
| 416 | struct scatterlist *s; | ||
| 417 | int i; | ||
| 418 | |||
| 419 | for_each_sg(sg, s, nelems, i) { | ||
| 420 | struct page *p = sg_page(s); | ||
| 421 | |||
| 422 | BUG_ON(!p); | ||
| 423 | s->dma_address = virt_to_bus(sg_virt(s)); | ||
| 424 | s->dma_length = s->length; | ||
| 425 | } | ||
| 426 | return nelems; | ||
| 427 | } | ||
| 428 | |||
| 429 | static int calgary_map_sg(struct device *dev, struct scatterlist *sg, | 417 | static int calgary_map_sg(struct device *dev, struct scatterlist *sg, |
| 430 | int nelems, int direction) | 418 | int nelems, int direction) |
| 431 | { | 419 | { |
| @@ -436,9 +424,6 @@ static int calgary_map_sg(struct device *dev, struct scatterlist *sg, | |||
| 436 | unsigned long entry; | 424 | unsigned long entry; |
| 437 | int i; | 425 | int i; |
| 438 | 426 | ||
| 439 | if (!translation_enabled(tbl)) | ||
| 440 | return calgary_nontranslate_map_sg(dev, sg, nelems, direction); | ||
| 441 | |||
| 442 | for_each_sg(sg, s, nelems, i) { | 427 | for_each_sg(sg, s, nelems, i) { |
| 443 | BUG_ON(!sg_page(s)); | 428 | BUG_ON(!sg_page(s)); |
| 444 | 429 | ||
| @@ -474,7 +459,6 @@ error: | |||
| 474 | static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr, | 459 | static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr, |
| 475 | size_t size, int direction) | 460 | size_t size, int direction) |
| 476 | { | 461 | { |
| 477 | dma_addr_t dma_handle = bad_dma_address; | ||
| 478 | void *vaddr = phys_to_virt(paddr); | 462 | void *vaddr = phys_to_virt(paddr); |
| 479 | unsigned long uaddr; | 463 | unsigned long uaddr; |
| 480 | unsigned int npages; | 464 | unsigned int npages; |
| @@ -483,12 +467,7 @@ static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr, | |||
| 483 | uaddr = (unsigned long)vaddr; | 467 | uaddr = (unsigned long)vaddr; |
| 484 | npages = num_dma_pages(uaddr, size); | 468 | npages = num_dma_pages(uaddr, size); |
| 485 | 469 | ||
| 486 | if (translation_enabled(tbl)) | 470 | return iommu_alloc(dev, tbl, vaddr, npages, direction); |
| 487 | dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction); | ||
| 488 | else | ||
| 489 | dma_handle = virt_to_bus(vaddr); | ||
| 490 | |||
| 491 | return dma_handle; | ||
| 492 | } | 471 | } |
| 493 | 472 | ||
| 494 | static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, | 473 | static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, |
| @@ -497,9 +476,6 @@ static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, | |||
| 497 | struct iommu_table *tbl = find_iommu_table(dev); | 476 | struct iommu_table *tbl = find_iommu_table(dev); |
| 498 | unsigned int npages; | 477 | unsigned int npages; |
| 499 | 478 | ||
| 500 | if (!translation_enabled(tbl)) | ||
| 501 | return; | ||
| 502 | |||
| 503 | npages = num_dma_pages(dma_handle, size); | 479 | npages = num_dma_pages(dma_handle, size); |
| 504 | iommu_free(tbl, dma_handle, npages); | 480 | iommu_free(tbl, dma_handle, npages); |
| 505 | } | 481 | } |
| @@ -522,18 +498,12 @@ static void* calgary_alloc_coherent(struct device *dev, size_t size, | |||
| 522 | goto error; | 498 | goto error; |
| 523 | memset(ret, 0, size); | 499 | memset(ret, 0, size); |
| 524 | 500 | ||
| 525 | if (translation_enabled(tbl)) { | 501 | /* set up tces to cover the allocated range */ |
| 526 | /* set up tces to cover the allocated range */ | 502 | mapping = iommu_alloc(dev, tbl, ret, npages, DMA_BIDIRECTIONAL); |
| 527 | mapping = iommu_alloc(dev, tbl, ret, npages, DMA_BIDIRECTIONAL); | 503 | if (mapping == bad_dma_address) |
| 528 | if (mapping == bad_dma_address) | 504 | goto free; |
| 529 | goto free; | 505 | *dma_handle = mapping; |
| 530 | |||
| 531 | *dma_handle = mapping; | ||
| 532 | } else /* non translated slot */ | ||
| 533 | *dma_handle = virt_to_bus(ret); | ||
| 534 | |||
| 535 | return ret; | 506 | return ret; |
| 536 | |||
| 537 | free: | 507 | free: |
| 538 | free_pages((unsigned long)ret, get_order(size)); | 508 | free_pages((unsigned long)ret, get_order(size)); |
| 539 | ret = NULL; | 509 | ret = NULL; |
| @@ -541,7 +511,7 @@ error: | |||
| 541 | return ret; | 511 | return ret; |
| 542 | } | 512 | } |
| 543 | 513 | ||
| 544 | static const struct dma_mapping_ops calgary_dma_ops = { | 514 | static struct dma_mapping_ops calgary_dma_ops = { |
| 545 | .alloc_coherent = calgary_alloc_coherent, | 515 | .alloc_coherent = calgary_alloc_coherent, |
| 546 | .map_single = calgary_map_single, | 516 | .map_single = calgary_map_single, |
| 547 | .unmap_single = calgary_unmap_single, | 517 | .unmap_single = calgary_unmap_single, |
| @@ -830,7 +800,11 @@ static int __init calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar) | |||
| 830 | 800 | ||
| 831 | tbl = pci_iommu(dev->bus); | 801 | tbl = pci_iommu(dev->bus); |
| 832 | tbl->it_base = (unsigned long)bus_info[dev->bus->number].tce_space; | 802 | tbl->it_base = (unsigned long)bus_info[dev->bus->number].tce_space; |
| 833 | tce_free(tbl, 0, tbl->it_size); | 803 | |
| 804 | if (is_kdump_kernel()) | ||
| 805 | calgary_init_bitmap_from_tce_table(tbl); | ||
| 806 | else | ||
| 807 | tce_free(tbl, 0, tbl->it_size); | ||
| 834 | 808 | ||
| 835 | if (is_calgary(dev->device)) | 809 | if (is_calgary(dev->device)) |
| 836 | tbl->chip_ops = &calgary_chip_ops; | 810 | tbl->chip_ops = &calgary_chip_ops; |
| @@ -1209,6 +1183,10 @@ static int __init calgary_init(void) | |||
| 1209 | if (ret) | 1183 | if (ret) |
| 1210 | return ret; | 1184 | return ret; |
| 1211 | 1185 | ||
| 1186 | /* Purely for kdump kernel case */ | ||
| 1187 | if (is_kdump_kernel()) | ||
| 1188 | get_tce_space_from_tar(); | ||
| 1189 | |||
| 1212 | do { | 1190 | do { |
| 1213 | dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev); | 1191 | dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev); |
| 1214 | if (!dev) | 1192 | if (!dev) |
| @@ -1230,6 +1208,16 @@ static int __init calgary_init(void) | |||
| 1230 | goto error; | 1208 | goto error; |
| 1231 | } while (1); | 1209 | } while (1); |
| 1232 | 1210 | ||
| 1211 | dev = NULL; | ||
| 1212 | for_each_pci_dev(dev) { | ||
| 1213 | struct iommu_table *tbl; | ||
| 1214 | |||
| 1215 | tbl = find_iommu_table(&dev->dev); | ||
| 1216 | |||
| 1217 | if (translation_enabled(tbl)) | ||
| 1218 | dev->dev.archdata.dma_ops = &calgary_dma_ops; | ||
| 1219 | } | ||
| 1220 | |||
| 1233 | return ret; | 1221 | return ret; |
| 1234 | 1222 | ||
| 1235 | error: | 1223 | error: |
| @@ -1251,6 +1239,7 @@ error: | |||
| 1251 | calgary_disable_translation(dev); | 1239 | calgary_disable_translation(dev); |
| 1252 | calgary_free_bus(dev); | 1240 | calgary_free_bus(dev); |
| 1253 | pci_dev_put(dev); /* Undo calgary_init_one()'s pci_dev_get() */ | 1241 | pci_dev_put(dev); /* Undo calgary_init_one()'s pci_dev_get() */ |
| 1242 | dev->dev.archdata.dma_ops = NULL; | ||
| 1254 | } while (1); | 1243 | } while (1); |
| 1255 | 1244 | ||
| 1256 | return ret; | 1245 | return ret; |
| @@ -1339,6 +1328,61 @@ static int __init calgary_bus_has_devices(int bus, unsigned short pci_dev) | |||
| 1339 | return (val != 0xffffffff); | 1328 | return (val != 0xffffffff); |
| 1340 | } | 1329 | } |
| 1341 | 1330 | ||
| 1331 | /* | ||
| 1332 | * calgary_init_bitmap_from_tce_table(): | ||
| 1333 | * Funtion for kdump case. In the second/kdump kernel initialize | ||
| 1334 | * the bitmap based on the tce table entries obtained from first kernel | ||
| 1335 | */ | ||
| 1336 | static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl) | ||
| 1337 | { | ||
| 1338 | u64 *tp; | ||
| 1339 | unsigned int index; | ||
| 1340 | tp = ((u64 *)tbl->it_base); | ||
| 1341 | for (index = 0 ; index < tbl->it_size; index++) { | ||
| 1342 | if (*tp != 0x0) | ||
| 1343 | set_bit(index, tbl->it_map); | ||
| 1344 | tp++; | ||
| 1345 | } | ||
| 1346 | } | ||
| 1347 | |||
| 1348 | /* | ||
| 1349 | * get_tce_space_from_tar(): | ||
| 1350 | * Function for kdump case. Get the tce tables from first kernel | ||
| 1351 | * by reading the contents of the base adress register of calgary iommu | ||
| 1352 | */ | ||
| 1353 | static void get_tce_space_from_tar() | ||
| 1354 | { | ||
| 1355 | int bus; | ||
| 1356 | void __iomem *target; | ||
| 1357 | unsigned long tce_space; | ||
| 1358 | |||
| 1359 | for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { | ||
| 1360 | struct calgary_bus_info *info = &bus_info[bus]; | ||
| 1361 | unsigned short pci_device; | ||
| 1362 | u32 val; | ||
| 1363 | |||
| 1364 | val = read_pci_config(bus, 0, 0, 0); | ||
| 1365 | pci_device = (val & 0xFFFF0000) >> 16; | ||
| 1366 | |||
| 1367 | if (!is_cal_pci_dev(pci_device)) | ||
| 1368 | continue; | ||
| 1369 | if (info->translation_disabled) | ||
| 1370 | continue; | ||
| 1371 | |||
| 1372 | if (calgary_bus_has_devices(bus, pci_device) || | ||
| 1373 | translate_empty_slots) { | ||
| 1374 | target = calgary_reg(bus_info[bus].bbar, | ||
| 1375 | tar_offset(bus)); | ||
| 1376 | tce_space = be64_to_cpu(readq(target)); | ||
| 1377 | tce_space = tce_space & TAR_SW_BITS; | ||
| 1378 | |||
| 1379 | tce_space = tce_space & (~specified_table_size); | ||
| 1380 | info->tce_space = (u64 *)__va(tce_space); | ||
| 1381 | } | ||
| 1382 | } | ||
| 1383 | return; | ||
| 1384 | } | ||
| 1385 | |||
| 1342 | void __init detect_calgary(void) | 1386 | void __init detect_calgary(void) |
| 1343 | { | 1387 | { |
| 1344 | int bus; | 1388 | int bus; |
| @@ -1394,7 +1438,8 @@ void __init detect_calgary(void) | |||
| 1394 | return; | 1438 | return; |
| 1395 | } | 1439 | } |
| 1396 | 1440 | ||
| 1397 | specified_table_size = determine_tce_table_size(max_pfn * PAGE_SIZE); | 1441 | specified_table_size = determine_tce_table_size((is_kdump_kernel() ? |
| 1442 | saved_max_pfn : max_pfn) * PAGE_SIZE); | ||
| 1398 | 1443 | ||
| 1399 | for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { | 1444 | for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { |
| 1400 | struct calgary_bus_info *info = &bus_info[bus]; | 1445 | struct calgary_bus_info *info = &bus_info[bus]; |
| @@ -1412,10 +1457,16 @@ void __init detect_calgary(void) | |||
| 1412 | 1457 | ||
| 1413 | if (calgary_bus_has_devices(bus, pci_device) || | 1458 | if (calgary_bus_has_devices(bus, pci_device) || |
| 1414 | translate_empty_slots) { | 1459 | translate_empty_slots) { |
| 1415 | tbl = alloc_tce_table(); | 1460 | /* |
| 1416 | if (!tbl) | 1461 | * If it is kdump kernel, find and use tce tables |
| 1417 | goto cleanup; | 1462 | * from first kernel, else allocate tce tables here |
| 1418 | info->tce_space = tbl; | 1463 | */ |
| 1464 | if (!is_kdump_kernel()) { | ||
| 1465 | tbl = alloc_tce_table(); | ||
| 1466 | if (!tbl) | ||
| 1467 | goto cleanup; | ||
| 1468 | info->tce_space = tbl; | ||
| 1469 | } | ||
| 1419 | calgary_found = 1; | 1470 | calgary_found = 1; |
| 1420 | } | 1471 | } |
| 1421 | } | 1472 | } |
| @@ -1430,6 +1481,10 @@ void __init detect_calgary(void) | |||
| 1430 | printk(KERN_INFO "PCI-DMA: Calgary TCE table spec is %d, " | 1481 | printk(KERN_INFO "PCI-DMA: Calgary TCE table spec is %d, " |
| 1431 | "CONFIG_IOMMU_DEBUG is %s.\n", specified_table_size, | 1482 | "CONFIG_IOMMU_DEBUG is %s.\n", specified_table_size, |
| 1432 | debugging ? "enabled" : "disabled"); | 1483 | debugging ? "enabled" : "disabled"); |
| 1484 | |||
| 1485 | /* swiotlb for devices that aren't behind the Calgary. */ | ||
| 1486 | if (max_pfn > MAX_DMA32_PFN) | ||
| 1487 | swiotlb = 1; | ||
| 1433 | } | 1488 | } |
| 1434 | return; | 1489 | return; |
| 1435 | 1490 | ||
| @@ -1446,7 +1501,7 @@ int __init calgary_iommu_init(void) | |||
| 1446 | { | 1501 | { |
| 1447 | int ret; | 1502 | int ret; |
| 1448 | 1503 | ||
| 1449 | if (no_iommu || swiotlb) | 1504 | if (no_iommu || (swiotlb && !calgary_detected)) |
| 1450 | return -ENODEV; | 1505 | return -ENODEV; |
| 1451 | 1506 | ||
| 1452 | if (!calgary_detected) | 1507 | if (!calgary_detected) |
| @@ -1459,15 +1514,14 @@ int __init calgary_iommu_init(void) | |||
| 1459 | if (ret) { | 1514 | if (ret) { |
| 1460 | printk(KERN_ERR "PCI-DMA: Calgary init failed %d, " | 1515 | printk(KERN_ERR "PCI-DMA: Calgary init failed %d, " |
| 1461 | "falling back to no_iommu\n", ret); | 1516 | "falling back to no_iommu\n", ret); |
| 1462 | if (max_pfn > MAX_DMA32_PFN) | ||
| 1463 | printk(KERN_ERR "WARNING more than 4GB of memory, " | ||
| 1464 | "32bit PCI may malfunction.\n"); | ||
| 1465 | return ret; | 1517 | return ret; |
| 1466 | } | 1518 | } |
| 1467 | 1519 | ||
| 1468 | force_iommu = 1; | 1520 | force_iommu = 1; |
| 1469 | bad_dma_address = 0x0; | 1521 | bad_dma_address = 0x0; |
| 1470 | dma_ops = &calgary_dma_ops; | 1522 | /* dma_ops is set to swiotlb or nommu */ |
| 1523 | if (!dma_ops) | ||
| 1524 | dma_ops = &nommu_dma_ops; | ||
| 1471 | 1525 | ||
| 1472 | return 0; | 1526 | return 0; |
| 1473 | } | 1527 | } |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index cbecb05551bb..37544123896d 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | static int forbid_dac __read_mostly; | 12 | static int forbid_dac __read_mostly; |
| 13 | 13 | ||
| 14 | const struct dma_mapping_ops *dma_ops; | 14 | struct dma_mapping_ops *dma_ops; |
| 15 | EXPORT_SYMBOL(dma_ops); | 15 | EXPORT_SYMBOL(dma_ops); |
| 16 | 16 | ||
| 17 | static int iommu_sac_force __read_mostly; | 17 | static int iommu_sac_force __read_mostly; |
| @@ -312,6 +312,8 @@ static int dma_release_coherent(struct device *dev, int order, void *vaddr) | |||
| 312 | 312 | ||
| 313 | int dma_supported(struct device *dev, u64 mask) | 313 | int dma_supported(struct device *dev, u64 mask) |
| 314 | { | 314 | { |
| 315 | struct dma_mapping_ops *ops = get_dma_ops(dev); | ||
| 316 | |||
| 315 | #ifdef CONFIG_PCI | 317 | #ifdef CONFIG_PCI |
| 316 | if (mask > 0xffffffff && forbid_dac > 0) { | 318 | if (mask > 0xffffffff && forbid_dac > 0) { |
| 317 | dev_info(dev, "PCI: Disallowing DAC for device\n"); | 319 | dev_info(dev, "PCI: Disallowing DAC for device\n"); |
| @@ -319,8 +321,8 @@ int dma_supported(struct device *dev, u64 mask) | |||
| 319 | } | 321 | } |
| 320 | #endif | 322 | #endif |
| 321 | 323 | ||
| 322 | if (dma_ops->dma_supported) | 324 | if (ops->dma_supported) |
| 323 | return dma_ops->dma_supported(dev, mask); | 325 | return ops->dma_supported(dev, mask); |
| 324 | 326 | ||
| 325 | /* Copied from i386. Doesn't make much sense, because it will | 327 | /* Copied from i386. Doesn't make much sense, because it will |
| 326 | only work for pci_alloc_coherent. | 328 | only work for pci_alloc_coherent. |
| @@ -367,6 +369,7 @@ void * | |||
| 367 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 369 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
| 368 | gfp_t gfp) | 370 | gfp_t gfp) |
| 369 | { | 371 | { |
| 372 | struct dma_mapping_ops *ops = get_dma_ops(dev); | ||
| 370 | void *memory = NULL; | 373 | void *memory = NULL; |
| 371 | struct page *page; | 374 | struct page *page; |
| 372 | unsigned long dma_mask = 0; | 375 | unsigned long dma_mask = 0; |
| @@ -435,8 +438,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
| 435 | /* Let low level make its own zone decisions */ | 438 | /* Let low level make its own zone decisions */ |
| 436 | gfp &= ~(GFP_DMA32|GFP_DMA); | 439 | gfp &= ~(GFP_DMA32|GFP_DMA); |
| 437 | 440 | ||
| 438 | if (dma_ops->alloc_coherent) | 441 | if (ops->alloc_coherent) |
| 439 | return dma_ops->alloc_coherent(dev, size, | 442 | return ops->alloc_coherent(dev, size, |
| 440 | dma_handle, gfp); | 443 | dma_handle, gfp); |
| 441 | return NULL; | 444 | return NULL; |
| 442 | } | 445 | } |
| @@ -448,14 +451,14 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
| 448 | } | 451 | } |
| 449 | } | 452 | } |
| 450 | 453 | ||
| 451 | if (dma_ops->alloc_coherent) { | 454 | if (ops->alloc_coherent) { |
| 452 | free_pages((unsigned long)memory, get_order(size)); | 455 | free_pages((unsigned long)memory, get_order(size)); |
| 453 | gfp &= ~(GFP_DMA|GFP_DMA32); | 456 | gfp &= ~(GFP_DMA|GFP_DMA32); |
| 454 | return dma_ops->alloc_coherent(dev, size, dma_handle, gfp); | 457 | return ops->alloc_coherent(dev, size, dma_handle, gfp); |
| 455 | } | 458 | } |
| 456 | 459 | ||
| 457 | if (dma_ops->map_simple) { | 460 | if (ops->map_simple) { |
| 458 | *dma_handle = dma_ops->map_simple(dev, virt_to_phys(memory), | 461 | *dma_handle = ops->map_simple(dev, virt_to_phys(memory), |
| 459 | size, | 462 | size, |
| 460 | PCI_DMA_BIDIRECTIONAL); | 463 | PCI_DMA_BIDIRECTIONAL); |
| 461 | if (*dma_handle != bad_dma_address) | 464 | if (*dma_handle != bad_dma_address) |
| @@ -477,12 +480,14 @@ EXPORT_SYMBOL(dma_alloc_coherent); | |||
| 477 | void dma_free_coherent(struct device *dev, size_t size, | 480 | void dma_free_coherent(struct device *dev, size_t size, |
| 478 | void *vaddr, dma_addr_t bus) | 481 | void *vaddr, dma_addr_t bus) |
| 479 | { | 482 | { |
| 483 | struct dma_mapping_ops *ops = get_dma_ops(dev); | ||
| 484 | |||
| 480 | int order = get_order(size); | 485 | int order = get_order(size); |
| 481 | WARN_ON(irqs_disabled()); /* for portability */ | 486 | WARN_ON(irqs_disabled()); /* for portability */ |
| 482 | if (dma_release_coherent(dev, order, vaddr)) | 487 | if (dma_release_coherent(dev, order, vaddr)) |
| 483 | return; | 488 | return; |
| 484 | if (dma_ops->unmap_single) | 489 | if (ops->unmap_single) |
| 485 | dma_ops->unmap_single(dev, bus, size, 0); | 490 | ops->unmap_single(dev, bus, size, 0); |
| 486 | free_pages((unsigned long)vaddr, order); | 491 | free_pages((unsigned long)vaddr, order); |
| 487 | } | 492 | } |
| 488 | EXPORT_SYMBOL(dma_free_coherent); | 493 | EXPORT_SYMBOL(dma_free_coherent); |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index df5f142657d2..744126e64950 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
| @@ -692,8 +692,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info) | |||
| 692 | 692 | ||
| 693 | extern int agp_amd64_init(void); | 693 | extern int agp_amd64_init(void); |
| 694 | 694 | ||
| 695 | static const struct dma_mapping_ops gart_dma_ops = { | 695 | static struct dma_mapping_ops gart_dma_ops = { |
| 696 | .mapping_error = NULL, | ||
| 697 | .map_single = gart_map_single, | 696 | .map_single = gart_map_single, |
| 698 | .map_simple = gart_map_simple, | 697 | .map_simple = gart_map_simple, |
| 699 | .unmap_single = gart_unmap_single, | 698 | .unmap_single = gart_unmap_single, |
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index 792b9179eff3..3f91f71cdc3e 100644 --- a/arch/x86/kernel/pci-nommu.c +++ b/arch/x86/kernel/pci-nommu.c | |||
| @@ -72,21 +72,9 @@ static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, | |||
| 72 | return nents; | 72 | return nents; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | /* Make sure we keep the same behaviour */ | 75 | struct dma_mapping_ops nommu_dma_ops = { |
| 76 | static int nommu_mapping_error(dma_addr_t dma_addr) | ||
| 77 | { | ||
| 78 | #ifdef CONFIG_X86_32 | ||
| 79 | return 0; | ||
| 80 | #else | ||
| 81 | return (dma_addr == bad_dma_address); | ||
| 82 | #endif | ||
| 83 | } | ||
| 84 | |||
| 85 | |||
| 86 | const struct dma_mapping_ops nommu_dma_ops = { | ||
| 87 | .map_single = nommu_map_single, | 76 | .map_single = nommu_map_single, |
| 88 | .map_sg = nommu_map_sg, | 77 | .map_sg = nommu_map_sg, |
| 89 | .mapping_error = nommu_mapping_error, | ||
| 90 | .is_phys = 1, | 78 | .is_phys = 1, |
| 91 | }; | 79 | }; |
| 92 | 80 | ||
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c index 20df839b9c20..c4ce0332759e 100644 --- a/arch/x86/kernel/pci-swiotlb_64.c +++ b/arch/x86/kernel/pci-swiotlb_64.c | |||
| @@ -18,7 +18,7 @@ swiotlb_map_single_phys(struct device *hwdev, phys_addr_t paddr, size_t size, | |||
| 18 | return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction); | 18 | return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | const struct dma_mapping_ops swiotlb_dma_ops = { | 21 | struct dma_mapping_ops swiotlb_dma_ops = { |
| 22 | .mapping_error = swiotlb_dma_mapping_error, | 22 | .mapping_error = swiotlb_dma_mapping_error, |
| 23 | .alloc_coherent = swiotlb_alloc_coherent, | 23 | .alloc_coherent = swiotlb_alloc_coherent, |
| 24 | .free_coherent = swiotlb_free_coherent, | 24 | .free_coherent = swiotlb_free_coherent, |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 0c3927accb00..53bc653ed5ca 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
| @@ -128,7 +128,7 @@ void cpu_idle(void) | |||
| 128 | 128 | ||
| 129 | /* endless idle loop with no priority at all */ | 129 | /* endless idle loop with no priority at all */ |
| 130 | while (1) { | 130 | while (1) { |
| 131 | tick_nohz_stop_sched_tick(); | 131 | tick_nohz_stop_sched_tick(1); |
| 132 | while (!need_resched()) { | 132 | while (!need_resched()) { |
| 133 | 133 | ||
| 134 | check_pgt_cache(); | 134 | check_pgt_cache(); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index e8a8e1b99817..3fb62a7d9a16 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -120,7 +120,7 @@ void cpu_idle(void) | |||
| 120 | current_thread_info()->status |= TS_POLLING; | 120 | current_thread_info()->status |= TS_POLLING; |
| 121 | /* endless idle loop with no priority at all */ | 121 | /* endless idle loop with no priority at all */ |
| 122 | while (1) { | 122 | while (1) { |
| 123 | tick_nohz_stop_sched_tick(); | 123 | tick_nohz_stop_sched_tick(1); |
| 124 | while (!need_resched()) { | 124 | while (!need_resched()) { |
| 125 | 125 | ||
| 126 | rmb(); | 126 | rmb(); |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 9dcf39c02972..06a9f643817e 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -411,24 +411,28 @@ void native_machine_shutdown(void) | |||
| 411 | { | 411 | { |
| 412 | /* Stop the cpus and apics */ | 412 | /* Stop the cpus and apics */ |
| 413 | #ifdef CONFIG_SMP | 413 | #ifdef CONFIG_SMP |
| 414 | int reboot_cpu_id; | ||
| 415 | 414 | ||
| 416 | /* The boot cpu is always logical cpu 0 */ | 415 | /* The boot cpu is always logical cpu 0 */ |
| 417 | reboot_cpu_id = 0; | 416 | int reboot_cpu_id = 0; |
| 417 | cpumask_of_cpu_ptr(newmask, reboot_cpu_id); | ||
| 418 | 418 | ||
| 419 | #ifdef CONFIG_X86_32 | 419 | #ifdef CONFIG_X86_32 |
| 420 | /* See if there has been given a command line override */ | 420 | /* See if there has been given a command line override */ |
| 421 | if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) && | 421 | if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) && |
| 422 | cpu_online(reboot_cpu)) | 422 | cpu_online(reboot_cpu)) { |
| 423 | reboot_cpu_id = reboot_cpu; | 423 | reboot_cpu_id = reboot_cpu; |
| 424 | cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id); | ||
| 425 | } | ||
| 424 | #endif | 426 | #endif |
| 425 | 427 | ||
| 426 | /* Make certain the cpu I'm about to reboot on is online */ | 428 | /* Make certain the cpu I'm about to reboot on is online */ |
| 427 | if (!cpu_online(reboot_cpu_id)) | 429 | if (!cpu_online(reboot_cpu_id)) { |
| 428 | reboot_cpu_id = smp_processor_id(); | 430 | reboot_cpu_id = smp_processor_id(); |
| 431 | cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id); | ||
| 432 | } | ||
| 429 | 433 | ||
| 430 | /* Make certain I only run on the appropriate processor */ | 434 | /* Make certain I only run on the appropriate processor */ |
| 431 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id)); | 435 | set_cpus_allowed_ptr(current, newmask); |
| 432 | 436 | ||
| 433 | /* O.K Now that I'm on the appropriate processor, | 437 | /* O.K Now that I'm on the appropriate processor, |
| 434 | * stop all of the others. | 438 | * stop all of the others. |
diff --git a/arch/x86/kernel/relocate_kernel_32.S b/arch/x86/kernel/relocate_kernel_32.S index c30fe25d470d..703310a99023 100644 --- a/arch/x86/kernel/relocate_kernel_32.S +++ b/arch/x86/kernel/relocate_kernel_32.S | |||
| @@ -20,11 +20,44 @@ | |||
| 20 | #define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) | 20 | #define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) |
| 21 | #define PAE_PGD_ATTR (_PAGE_PRESENT) | 21 | #define PAE_PGD_ATTR (_PAGE_PRESENT) |
| 22 | 22 | ||
| 23 | /* control_page + PAGE_SIZE/2 ~ control_page + PAGE_SIZE * 3/4 are | ||
| 24 | * used to save some data for jumping back | ||
| 25 | */ | ||
| 26 | #define DATA(offset) (PAGE_SIZE/2+(offset)) | ||
| 27 | |||
| 28 | /* Minimal CPU state */ | ||
| 29 | #define ESP DATA(0x0) | ||
| 30 | #define CR0 DATA(0x4) | ||
| 31 | #define CR3 DATA(0x8) | ||
| 32 | #define CR4 DATA(0xc) | ||
| 33 | |||
| 34 | /* other data */ | ||
| 35 | #define CP_VA_CONTROL_PAGE DATA(0x10) | ||
| 36 | #define CP_PA_PGD DATA(0x14) | ||
| 37 | #define CP_PA_SWAP_PAGE DATA(0x18) | ||
| 38 | #define CP_PA_BACKUP_PAGES_MAP DATA(0x1c) | ||
| 39 | |||
| 23 | .text | 40 | .text |
| 24 | .align PAGE_SIZE | 41 | .align PAGE_SIZE |
| 25 | .globl relocate_kernel | 42 | .globl relocate_kernel |
| 26 | relocate_kernel: | 43 | relocate_kernel: |
| 27 | movl 8(%esp), %ebp /* list of pages */ | 44 | /* Save the CPU context, used for jumping back */ |
| 45 | |||
| 46 | pushl %ebx | ||
| 47 | pushl %esi | ||
| 48 | pushl %edi | ||
| 49 | pushl %ebp | ||
| 50 | pushf | ||
| 51 | |||
| 52 | movl 20+8(%esp), %ebp /* list of pages */ | ||
| 53 | movl PTR(VA_CONTROL_PAGE)(%ebp), %edi | ||
| 54 | movl %esp, ESP(%edi) | ||
| 55 | movl %cr0, %eax | ||
| 56 | movl %eax, CR0(%edi) | ||
| 57 | movl %cr3, %eax | ||
| 58 | movl %eax, CR3(%edi) | ||
| 59 | movl %cr4, %eax | ||
| 60 | movl %eax, CR4(%edi) | ||
| 28 | 61 | ||
| 29 | #ifdef CONFIG_X86_PAE | 62 | #ifdef CONFIG_X86_PAE |
| 30 | /* map the control page at its virtual address */ | 63 | /* map the control page at its virtual address */ |
| @@ -138,15 +171,25 @@ relocate_kernel: | |||
| 138 | 171 | ||
| 139 | relocate_new_kernel: | 172 | relocate_new_kernel: |
| 140 | /* read the arguments and say goodbye to the stack */ | 173 | /* read the arguments and say goodbye to the stack */ |
| 141 | movl 4(%esp), %ebx /* page_list */ | 174 | movl 20+4(%esp), %ebx /* page_list */ |
| 142 | movl 8(%esp), %ebp /* list of pages */ | 175 | movl 20+8(%esp), %ebp /* list of pages */ |
| 143 | movl 12(%esp), %edx /* start address */ | 176 | movl 20+12(%esp), %edx /* start address */ |
| 144 | movl 16(%esp), %ecx /* cpu_has_pae */ | 177 | movl 20+16(%esp), %ecx /* cpu_has_pae */ |
| 178 | movl 20+20(%esp), %esi /* preserve_context */ | ||
| 145 | 179 | ||
| 146 | /* zero out flags, and disable interrupts */ | 180 | /* zero out flags, and disable interrupts */ |
| 147 | pushl $0 | 181 | pushl $0 |
| 148 | popfl | 182 | popfl |
| 149 | 183 | ||
| 184 | /* save some information for jumping back */ | ||
| 185 | movl PTR(VA_CONTROL_PAGE)(%ebp), %edi | ||
| 186 | movl %edi, CP_VA_CONTROL_PAGE(%edi) | ||
| 187 | movl PTR(PA_PGD)(%ebp), %eax | ||
| 188 | movl %eax, CP_PA_PGD(%edi) | ||
| 189 | movl PTR(PA_SWAP_PAGE)(%ebp), %eax | ||
| 190 | movl %eax, CP_PA_SWAP_PAGE(%edi) | ||
| 191 | movl %ebx, CP_PA_BACKUP_PAGES_MAP(%edi) | ||
| 192 | |||
| 150 | /* get physical address of control page now */ | 193 | /* get physical address of control page now */ |
| 151 | /* this is impossible after page table switch */ | 194 | /* this is impossible after page table switch */ |
| 152 | movl PTR(PA_CONTROL_PAGE)(%ebp), %edi | 195 | movl PTR(PA_CONTROL_PAGE)(%ebp), %edi |
| @@ -197,8 +240,90 @@ identity_mapped: | |||
| 197 | xorl %eax, %eax | 240 | xorl %eax, %eax |
| 198 | movl %eax, %cr3 | 241 | movl %eax, %cr3 |
| 199 | 242 | ||
| 243 | movl CP_PA_SWAP_PAGE(%edi), %eax | ||
| 244 | pushl %eax | ||
| 245 | pushl %ebx | ||
| 246 | call swap_pages | ||
| 247 | addl $8, %esp | ||
| 248 | |||
| 249 | /* To be certain of avoiding problems with self-modifying code | ||
| 250 | * I need to execute a serializing instruction here. | ||
| 251 | * So I flush the TLB, it's handy, and not processor dependent. | ||
| 252 | */ | ||
| 253 | xorl %eax, %eax | ||
| 254 | movl %eax, %cr3 | ||
| 255 | |||
| 256 | /* set all of the registers to known values */ | ||
| 257 | /* leave %esp alone */ | ||
| 258 | |||
| 259 | testl %esi, %esi | ||
| 260 | jnz 1f | ||
| 261 | xorl %edi, %edi | ||
| 262 | xorl %eax, %eax | ||
| 263 | xorl %ebx, %ebx | ||
| 264 | xorl %ecx, %ecx | ||
| 265 | xorl %edx, %edx | ||
| 266 | xorl %esi, %esi | ||
| 267 | xorl %ebp, %ebp | ||
| 268 | ret | ||
| 269 | 1: | ||
| 270 | popl %edx | ||
| 271 | movl CP_PA_SWAP_PAGE(%edi), %esp | ||
| 272 | addl $PAGE_SIZE, %esp | ||
| 273 | 2: | ||
| 274 | call *%edx | ||
| 275 | |||
| 276 | /* get the re-entry point of the peer system */ | ||
| 277 | movl 0(%esp), %ebp | ||
| 278 | call 1f | ||
| 279 | 1: | ||
| 280 | popl %ebx | ||
| 281 | subl $(1b - relocate_kernel), %ebx | ||
| 282 | movl CP_VA_CONTROL_PAGE(%ebx), %edi | ||
| 283 | lea PAGE_SIZE(%ebx), %esp | ||
| 284 | movl CP_PA_SWAP_PAGE(%ebx), %eax | ||
| 285 | movl CP_PA_BACKUP_PAGES_MAP(%ebx), %edx | ||
| 286 | pushl %eax | ||
| 287 | pushl %edx | ||
| 288 | call swap_pages | ||
| 289 | addl $8, %esp | ||
| 290 | movl CP_PA_PGD(%ebx), %eax | ||
| 291 | movl %eax, %cr3 | ||
| 292 | movl %cr0, %eax | ||
| 293 | orl $(1<<31), %eax | ||
| 294 | movl %eax, %cr0 | ||
| 295 | lea PAGE_SIZE(%edi), %esp | ||
| 296 | movl %edi, %eax | ||
| 297 | addl $(virtual_mapped - relocate_kernel), %eax | ||
| 298 | pushl %eax | ||
| 299 | ret | ||
| 300 | |||
| 301 | virtual_mapped: | ||
| 302 | movl CR4(%edi), %eax | ||
| 303 | movl %eax, %cr4 | ||
| 304 | movl CR3(%edi), %eax | ||
| 305 | movl %eax, %cr3 | ||
| 306 | movl CR0(%edi), %eax | ||
| 307 | movl %eax, %cr0 | ||
| 308 | movl ESP(%edi), %esp | ||
| 309 | movl %ebp, %eax | ||
| 310 | |||
| 311 | popf | ||
| 312 | popl %ebp | ||
| 313 | popl %edi | ||
| 314 | popl %esi | ||
| 315 | popl %ebx | ||
| 316 | ret | ||
| 317 | |||
| 200 | /* Do the copies */ | 318 | /* Do the copies */ |
| 201 | movl %ebx, %ecx | 319 | swap_pages: |
| 320 | movl 8(%esp), %edx | ||
| 321 | movl 4(%esp), %ecx | ||
| 322 | pushl %ebp | ||
| 323 | pushl %ebx | ||
| 324 | pushl %edi | ||
| 325 | pushl %esi | ||
| 326 | movl %ecx, %ebx | ||
| 202 | jmp 1f | 327 | jmp 1f |
| 203 | 328 | ||
| 204 | 0: /* top, read another word from the indirection page */ | 329 | 0: /* top, read another word from the indirection page */ |
| @@ -226,27 +351,28 @@ identity_mapped: | |||
| 226 | movl %ecx, %esi /* For every source page do a copy */ | 351 | movl %ecx, %esi /* For every source page do a copy */ |
| 227 | andl $0xfffff000, %esi | 352 | andl $0xfffff000, %esi |
| 228 | 353 | ||
| 354 | movl %edi, %eax | ||
| 355 | movl %esi, %ebp | ||
| 356 | |||
| 357 | movl %edx, %edi | ||
| 229 | movl $1024, %ecx | 358 | movl $1024, %ecx |
| 230 | rep ; movsl | 359 | rep ; movsl |
| 231 | jmp 0b | ||
| 232 | 360 | ||
| 233 | 3: | 361 | movl %ebp, %edi |
| 234 | 362 | movl %eax, %esi | |
| 235 | /* To be certain of avoiding problems with self-modifying code | 363 | movl $1024, %ecx |
| 236 | * I need to execute a serializing instruction here. | 364 | rep ; movsl |
| 237 | * So I flush the TLB, it's handy, and not processor dependent. | ||
| 238 | */ | ||
| 239 | xorl %eax, %eax | ||
| 240 | movl %eax, %cr3 | ||
| 241 | 365 | ||
| 242 | /* set all of the registers to known values */ | 366 | movl %eax, %edi |
| 243 | /* leave %esp alone */ | 367 | movl %edx, %esi |
| 368 | movl $1024, %ecx | ||
| 369 | rep ; movsl | ||
| 244 | 370 | ||
| 245 | xorl %eax, %eax | 371 | lea PAGE_SIZE(%ebp), %esi |
| 246 | xorl %ebx, %ebx | 372 | jmp 0b |
| 247 | xorl %ecx, %ecx | 373 | 3: |
| 248 | xorl %edx, %edx | 374 | popl %esi |
| 249 | xorl %esi, %esi | 375 | popl %edi |
| 250 | xorl %edi, %edi | 376 | popl %ebx |
| 251 | xorl %ebp, %ebp | 377 | popl %ebp |
| 252 | ret | 378 | ret |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index b4aacb9f52e3..b520dae02bf4 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -597,11 +597,11 @@ void __init setup_arch(char **cmdline_p) | |||
| 597 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); | 597 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); |
| 598 | visws_early_detect(); | 598 | visws_early_detect(); |
| 599 | pre_setup_arch_hook(); | 599 | pre_setup_arch_hook(); |
| 600 | early_cpu_init(); | ||
| 601 | #else | 600 | #else |
| 602 | printk(KERN_INFO "Command line: %s\n", boot_command_line); | 601 | printk(KERN_INFO "Command line: %s\n", boot_command_line); |
| 603 | #endif | 602 | #endif |
| 604 | 603 | ||
| 604 | early_cpu_init(); | ||
| 605 | early_ioremap_init(); | 605 | early_ioremap_init(); |
| 606 | 606 | ||
| 607 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); | 607 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); |
| @@ -665,9 +665,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 665 | bss_resource.start = virt_to_phys(&__bss_start); | 665 | bss_resource.start = virt_to_phys(&__bss_start); |
| 666 | bss_resource.end = virt_to_phys(&__bss_stop)-1; | 666 | bss_resource.end = virt_to_phys(&__bss_stop)-1; |
| 667 | 667 | ||
| 668 | #ifdef CONFIG_X86_64 | ||
| 669 | early_cpu_init(); | ||
| 670 | #endif | ||
| 671 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); | 668 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); |
| 672 | *cmdline_p = command_line; | 669 | *cmdline_p = command_line; |
| 673 | 670 | ||
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 07faaa5109cb..6fb5bcdd8933 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
| @@ -661,8 +661,5 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
| 661 | if (thread_info_flags & _TIF_SIGPENDING) | 661 | if (thread_info_flags & _TIF_SIGPENDING) |
| 662 | do_signal(regs); | 662 | do_signal(regs); |
| 663 | 663 | ||
| 664 | if (thread_info_flags & _TIF_HRTICK_RESCHED) | ||
| 665 | hrtick_resched(); | ||
| 666 | |||
| 667 | clear_thread_flag(TIF_IRET); | 664 | clear_thread_flag(TIF_IRET); |
| 668 | } | 665 | } |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index bf87684474f1..b45ef8ddd651 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
| @@ -53,6 +53,59 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | |||
| 53 | return do_sigaltstack(uss, uoss, regs->sp); | 53 | return do_sigaltstack(uss, uoss, regs->sp); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | /* | ||
| 57 | * Signal frame handlers. | ||
| 58 | */ | ||
| 59 | |||
| 60 | static inline int save_i387(struct _fpstate __user *buf) | ||
| 61 | { | ||
| 62 | struct task_struct *tsk = current; | ||
| 63 | int err = 0; | ||
| 64 | |||
| 65 | BUILD_BUG_ON(sizeof(struct user_i387_struct) != | ||
| 66 | sizeof(tsk->thread.xstate->fxsave)); | ||
| 67 | |||
| 68 | if ((unsigned long)buf % 16) | ||
| 69 | printk("save_i387: bad fpstate %p\n", buf); | ||
| 70 | |||
| 71 | if (!used_math()) | ||
| 72 | return 0; | ||
| 73 | clear_used_math(); /* trigger finit */ | ||
| 74 | if (task_thread_info(tsk)->status & TS_USEDFPU) { | ||
| 75 | err = save_i387_checking((struct i387_fxsave_struct __user *) | ||
| 76 | buf); | ||
| 77 | if (err) | ||
| 78 | return err; | ||
| 79 | task_thread_info(tsk)->status &= ~TS_USEDFPU; | ||
| 80 | stts(); | ||
| 81 | } else { | ||
| 82 | if (__copy_to_user(buf, &tsk->thread.xstate->fxsave, | ||
| 83 | sizeof(struct i387_fxsave_struct))) | ||
| 84 | return -1; | ||
| 85 | } | ||
| 86 | return 1; | ||
| 87 | } | ||
| 88 | |||
| 89 | /* | ||
| 90 | * This restores directly out of user space. Exceptions are handled. | ||
| 91 | */ | ||
| 92 | static inline int restore_i387(struct _fpstate __user *buf) | ||
| 93 | { | ||
| 94 | struct task_struct *tsk = current; | ||
| 95 | int err; | ||
| 96 | |||
| 97 | if (!used_math()) { | ||
| 98 | err = init_fpu(tsk); | ||
| 99 | if (err) | ||
| 100 | return err; | ||
| 101 | } | ||
| 102 | |||
| 103 | if (!(task_thread_info(current)->status & TS_USEDFPU)) { | ||
| 104 | clts(); | ||
| 105 | task_thread_info(current)->status |= TS_USEDFPU; | ||
| 106 | } | ||
| 107 | return restore_fpu_checking((__force struct i387_fxsave_struct *)buf); | ||
| 108 | } | ||
| 56 | 109 | ||
| 57 | /* | 110 | /* |
| 58 | * Do a signal return; undo the signal stack. | 111 | * Do a signal return; undo the signal stack. |
| @@ -496,9 +549,6 @@ void do_notify_resume(struct pt_regs *regs, void *unused, | |||
| 496 | /* deal with pending signal delivery */ | 549 | /* deal with pending signal delivery */ |
| 497 | if (thread_info_flags & _TIF_SIGPENDING) | 550 | if (thread_info_flags & _TIF_SIGPENDING) |
| 498 | do_signal(regs); | 551 | do_signal(regs); |
| 499 | |||
| 500 | if (thread_info_flags & _TIF_HRTICK_RESCHED) | ||
| 501 | hrtick_resched(); | ||
| 502 | } | 552 | } |
| 503 | 553 | ||
| 504 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) | 554 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 4b53a647bc0a..332512767f4f 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -438,7 +438,7 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
| 438 | cpu_set(cpu, cpu_sibling_setup_map); | 438 | cpu_set(cpu, cpu_sibling_setup_map); |
| 439 | 439 | ||
| 440 | if (smp_num_siblings > 1) { | 440 | if (smp_num_siblings > 1) { |
| 441 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 441 | for_each_cpu_mask_nr(i, cpu_sibling_setup_map) { |
| 442 | if (c->phys_proc_id == cpu_data(i).phys_proc_id && | 442 | if (c->phys_proc_id == cpu_data(i).phys_proc_id && |
| 443 | c->cpu_core_id == cpu_data(i).cpu_core_id) { | 443 | c->cpu_core_id == cpu_data(i).cpu_core_id) { |
| 444 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); | 444 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); |
| @@ -461,7 +461,7 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
| 461 | return; | 461 | return; |
| 462 | } | 462 | } |
| 463 | 463 | ||
| 464 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 464 | for_each_cpu_mask_nr(i, cpu_sibling_setup_map) { |
| 465 | if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && | 465 | if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && |
| 466 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { | 466 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { |
| 467 | cpu_set(i, c->llc_shared_map); | 467 | cpu_set(i, c->llc_shared_map); |
| @@ -1219,7 +1219,7 @@ static void remove_siblinginfo(int cpu) | |||
| 1219 | int sibling; | 1219 | int sibling; |
| 1220 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 1220 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
| 1221 | 1221 | ||
| 1222 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { | 1222 | for_each_cpu_mask_nr(sibling, per_cpu(cpu_core_map, cpu)) { |
| 1223 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); | 1223 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); |
| 1224 | /*/ | 1224 | /*/ |
| 1225 | * last thread sibling in this cpu core going down | 1225 | * last thread sibling in this cpu core going down |
| @@ -1228,7 +1228,7 @@ static void remove_siblinginfo(int cpu) | |||
| 1228 | cpu_data(sibling).booted_cores--; | 1228 | cpu_data(sibling).booted_cores--; |
| 1229 | } | 1229 | } |
| 1230 | 1230 | ||
| 1231 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) | 1231 | for_each_cpu_mask_nr(sibling, per_cpu(cpu_sibling_map, cpu)) |
| 1232 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); | 1232 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); |
| 1233 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | 1233 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); |
| 1234 | cpus_clear(per_cpu(cpu_core_map, cpu)); | 1234 | cpus_clear(per_cpu(cpu_core_map, cpu)); |
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S index adff5562f5fd..d44395ff34c3 100644 --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S | |||
| @@ -326,3 +326,9 @@ ENTRY(sys_call_table) | |||
| 326 | .long sys_fallocate | 326 | .long sys_fallocate |
| 327 | .long sys_timerfd_settime /* 325 */ | 327 | .long sys_timerfd_settime /* 325 */ |
| 328 | .long sys_timerfd_gettime | 328 | .long sys_timerfd_gettime |
| 329 | .long sys_signalfd4 | ||
| 330 | .long sys_eventfd2 | ||
| 331 | .long sys_epoll_create1 | ||
| 332 | .long sys_dup3 /* 330 */ | ||
| 333 | .long sys_pipe2 | ||
| 334 | .long sys_inotify_init1 | ||
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 1fbb844c3d7a..2977ea37791f 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ | 1 | obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ |
| 2 | pat.o pgtable.o | 2 | pat.o pgtable.o |
| 3 | 3 | ||
| 4 | obj-$(CONFIG_HAVE_GET_USER_PAGES_FAST) += gup.o | ||
| 4 | obj-$(CONFIG_X86_32) += pgtable_32.o | 5 | obj-$(CONFIG_X86_32) += pgtable_32.o |
| 5 | 6 | ||
| 6 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o | 7 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o |
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index 5dfef9fa061a..62fa440678d8 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | 42 | ||
| 43 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; | 43 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; |
| 44 | EXPORT_SYMBOL(node_data); | 44 | EXPORT_SYMBOL(node_data); |
| 45 | static bootmem_data_t node0_bdata; | ||
| 46 | 45 | ||
| 47 | /* | 46 | /* |
| 48 | * numa interface - we expect the numa architecture specific code to have | 47 | * numa interface - we expect the numa architecture specific code to have |
| @@ -385,7 +384,7 @@ void __init initmem_init(unsigned long start_pfn, | |||
| 385 | for_each_online_node(nid) | 384 | for_each_online_node(nid) |
| 386 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); | 385 | memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); |
| 387 | 386 | ||
| 388 | NODE_DATA(0)->bdata = &node0_bdata; | 387 | NODE_DATA(0)->bdata = &bootmem_node_data[0]; |
| 389 | setup_bootmem_allocator(); | 388 | setup_bootmem_allocator(); |
| 390 | } | 389 | } |
| 391 | 390 | ||
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c new file mode 100644 index 000000000000..3085f25b4355 --- /dev/null +++ b/arch/x86/mm/gup.c | |||
| @@ -0,0 +1,295 @@ | |||
| 1 | /* | ||
| 2 | * Lockless get_user_pages_fast for x86 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008 Nick Piggin | ||
| 5 | * Copyright (C) 2008 Novell Inc. | ||
| 6 | */ | ||
| 7 | #include <linux/sched.h> | ||
| 8 | #include <linux/mm.h> | ||
| 9 | #include <linux/vmstat.h> | ||
| 10 | #include <linux/highmem.h> | ||
| 11 | |||
| 12 | #include <asm/pgtable.h> | ||
| 13 | |||
| 14 | static inline pte_t gup_get_pte(pte_t *ptep) | ||
| 15 | { | ||
| 16 | #ifndef CONFIG_X86_PAE | ||
| 17 | return *ptep; | ||
| 18 | #else | ||
| 19 | /* | ||
| 20 | * With get_user_pages_fast, we walk down the pagetables without taking | ||
| 21 | * any locks. For this we would like to load the pointers atoimcally, | ||
| 22 | * but that is not possible (without expensive cmpxchg8b) on PAE. What | ||
| 23 | * we do have is the guarantee that a pte will only either go from not | ||
| 24 | * present to present, or present to not present or both -- it will not | ||
| 25 | * switch to a completely different present page without a TLB flush in | ||
| 26 | * between; something that we are blocking by holding interrupts off. | ||
| 27 | * | ||
| 28 | * Setting ptes from not present to present goes: | ||
| 29 | * ptep->pte_high = h; | ||
| 30 | * smp_wmb(); | ||
| 31 | * ptep->pte_low = l; | ||
| 32 | * | ||
| 33 | * And present to not present goes: | ||
| 34 | * ptep->pte_low = 0; | ||
| 35 | * smp_wmb(); | ||
| 36 | * ptep->pte_high = 0; | ||
| 37 | * | ||
| 38 | * We must ensure here that the load of pte_low sees l iff pte_high | ||
| 39 | * sees h. We load pte_high *after* loading pte_low, which ensures we | ||
| 40 | * don't see an older value of pte_high. *Then* we recheck pte_low, | ||
| 41 | * which ensures that we haven't picked up a changed pte high. We might | ||
| 42 | * have got rubbish values from pte_low and pte_high, but we are | ||
| 43 | * guaranteed that pte_low will not have the present bit set *unless* | ||
| 44 | * it is 'l'. And get_user_pages_fast only operates on present ptes, so | ||
| 45 | * we're safe. | ||
| 46 | * | ||
| 47 | * gup_get_pte should not be used or copied outside gup.c without being | ||
| 48 | * very careful -- it does not atomically load the pte or anything that | ||
| 49 | * is likely to be useful for you. | ||
| 50 | */ | ||
| 51 | pte_t pte; | ||
| 52 | |||
| 53 | retry: | ||
| 54 | pte.pte_low = ptep->pte_low; | ||
| 55 | smp_rmb(); | ||
| 56 | pte.pte_high = ptep->pte_high; | ||
| 57 | smp_rmb(); | ||
| 58 | if (unlikely(pte.pte_low != ptep->pte_low)) | ||
| 59 | goto retry; | ||
| 60 | |||
| 61 | return pte; | ||
| 62 | #endif | ||
| 63 | } | ||
| 64 | |||
| 65 | /* | ||
| 66 | * The performance critical leaf functions are made noinline otherwise gcc | ||
| 67 | * inlines everything into a single function which results in too much | ||
| 68 | * register pressure. | ||
| 69 | */ | ||
| 70 | static noinline int gup_pte_range(pmd_t pmd, unsigned long addr, | ||
| 71 | unsigned long end, int write, struct page **pages, int *nr) | ||
| 72 | { | ||
| 73 | unsigned long mask; | ||
| 74 | pte_t *ptep; | ||
| 75 | |||
| 76 | mask = _PAGE_PRESENT|_PAGE_USER; | ||
| 77 | if (write) | ||
| 78 | mask |= _PAGE_RW; | ||
| 79 | |||
| 80 | ptep = pte_offset_map(&pmd, addr); | ||
| 81 | do { | ||
| 82 | pte_t pte = gup_get_pte(ptep); | ||
| 83 | struct page *page; | ||
| 84 | |||
| 85 | if ((pte_val(pte) & (mask | _PAGE_SPECIAL)) != mask) { | ||
| 86 | pte_unmap(ptep); | ||
| 87 | return 0; | ||
| 88 | } | ||
| 89 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); | ||
| 90 | page = pte_page(pte); | ||
| 91 | get_page(page); | ||
| 92 | pages[*nr] = page; | ||
| 93 | (*nr)++; | ||
| 94 | |||
| 95 | } while (ptep++, addr += PAGE_SIZE, addr != end); | ||
| 96 | pte_unmap(ptep - 1); | ||
| 97 | |||
| 98 | return 1; | ||
| 99 | } | ||
| 100 | |||
| 101 | static inline void get_head_page_multiple(struct page *page, int nr) | ||
| 102 | { | ||
| 103 | VM_BUG_ON(page != compound_head(page)); | ||
| 104 | VM_BUG_ON(page_count(page) == 0); | ||
| 105 | atomic_add(nr, &page->_count); | ||
| 106 | } | ||
| 107 | |||
| 108 | static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr, | ||
| 109 | unsigned long end, int write, struct page **pages, int *nr) | ||
| 110 | { | ||
| 111 | unsigned long mask; | ||
| 112 | pte_t pte = *(pte_t *)&pmd; | ||
| 113 | struct page *head, *page; | ||
| 114 | int refs; | ||
| 115 | |||
| 116 | mask = _PAGE_PRESENT|_PAGE_USER; | ||
| 117 | if (write) | ||
| 118 | mask |= _PAGE_RW; | ||
| 119 | if ((pte_val(pte) & mask) != mask) | ||
| 120 | return 0; | ||
| 121 | /* hugepages are never "special" */ | ||
| 122 | VM_BUG_ON(pte_val(pte) & _PAGE_SPECIAL); | ||
| 123 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); | ||
| 124 | |||
| 125 | refs = 0; | ||
| 126 | head = pte_page(pte); | ||
| 127 | page = head + ((addr & ~PMD_MASK) >> PAGE_SHIFT); | ||
| 128 | do { | ||
| 129 | VM_BUG_ON(compound_head(page) != head); | ||
| 130 | pages[*nr] = page; | ||
| 131 | (*nr)++; | ||
| 132 | page++; | ||
| 133 | refs++; | ||
| 134 | } while (addr += PAGE_SIZE, addr != end); | ||
| 135 | get_head_page_multiple(head, refs); | ||
| 136 | |||
| 137 | return 1; | ||
| 138 | } | ||
| 139 | |||
| 140 | static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end, | ||
| 141 | int write, struct page **pages, int *nr) | ||
| 142 | { | ||
| 143 | unsigned long next; | ||
| 144 | pmd_t *pmdp; | ||
| 145 | |||
| 146 | pmdp = pmd_offset(&pud, addr); | ||
| 147 | do { | ||
| 148 | pmd_t pmd = *pmdp; | ||
| 149 | |||
| 150 | next = pmd_addr_end(addr, end); | ||
| 151 | if (pmd_none(pmd)) | ||
| 152 | return 0; | ||
| 153 | if (unlikely(pmd_large(pmd))) { | ||
| 154 | if (!gup_huge_pmd(pmd, addr, next, write, pages, nr)) | ||
| 155 | return 0; | ||
| 156 | } else { | ||
| 157 | if (!gup_pte_range(pmd, addr, next, write, pages, nr)) | ||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | } while (pmdp++, addr = next, addr != end); | ||
| 161 | |||
| 162 | return 1; | ||
| 163 | } | ||
| 164 | |||
| 165 | static noinline int gup_huge_pud(pud_t pud, unsigned long addr, | ||
| 166 | unsigned long end, int write, struct page **pages, int *nr) | ||
| 167 | { | ||
| 168 | unsigned long mask; | ||
| 169 | pte_t pte = *(pte_t *)&pud; | ||
| 170 | struct page *head, *page; | ||
| 171 | int refs; | ||
| 172 | |||
| 173 | mask = _PAGE_PRESENT|_PAGE_USER; | ||
| 174 | if (write) | ||
| 175 | mask |= _PAGE_RW; | ||
| 176 | if ((pte_val(pte) & mask) != mask) | ||
| 177 | return 0; | ||
| 178 | /* hugepages are never "special" */ | ||
| 179 | VM_BUG_ON(pte_val(pte) & _PAGE_SPECIAL); | ||
| 180 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); | ||
| 181 | |||
| 182 | refs = 0; | ||
| 183 | head = pte_page(pte); | ||
| 184 | page = head + ((addr & ~PUD_MASK) >> PAGE_SHIFT); | ||
| 185 | do { | ||
| 186 | VM_BUG_ON(compound_head(page) != head); | ||
| 187 | pages[*nr] = page; | ||
| 188 | (*nr)++; | ||
| 189 | page++; | ||
| 190 | refs++; | ||
| 191 | } while (addr += PAGE_SIZE, addr != end); | ||
| 192 | get_head_page_multiple(head, refs); | ||
| 193 | |||
| 194 | return 1; | ||
| 195 | } | ||
| 196 | |||
| 197 | static int gup_pud_range(pgd_t pgd, unsigned long addr, unsigned long end, | ||
| 198 | int write, struct page **pages, int *nr) | ||
| 199 | { | ||
| 200 | unsigned long next; | ||
| 201 | pud_t *pudp; | ||
| 202 | |||
| 203 | pudp = pud_offset(&pgd, addr); | ||
| 204 | do { | ||
| 205 | pud_t pud = *pudp; | ||
| 206 | |||
| 207 | next = pud_addr_end(addr, end); | ||
| 208 | if (pud_none(pud)) | ||
| 209 | return 0; | ||
| 210 | if (unlikely(pud_large(pud))) { | ||
| 211 | if (!gup_huge_pud(pud, addr, next, write, pages, nr)) | ||
| 212 | return 0; | ||
| 213 | } else { | ||
| 214 | if (!gup_pmd_range(pud, addr, next, write, pages, nr)) | ||
| 215 | return 0; | ||
| 216 | } | ||
| 217 | } while (pudp++, addr = next, addr != end); | ||
| 218 | |||
| 219 | return 1; | ||
| 220 | } | ||
| 221 | |||
| 222 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | ||
| 223 | struct page **pages) | ||
| 224 | { | ||
| 225 | struct mm_struct *mm = current->mm; | ||
| 226 | unsigned long end = start + (nr_pages << PAGE_SHIFT); | ||
| 227 | unsigned long addr = start; | ||
| 228 | unsigned long next; | ||
| 229 | pgd_t *pgdp; | ||
| 230 | int nr = 0; | ||
| 231 | |||
| 232 | if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ, | ||
| 233 | start, nr_pages*PAGE_SIZE))) | ||
| 234 | goto slow_irqon; | ||
| 235 | |||
| 236 | /* | ||
| 237 | * XXX: batch / limit 'nr', to avoid large irq off latency | ||
| 238 | * needs some instrumenting to determine the common sizes used by | ||
| 239 | * important workloads (eg. DB2), and whether limiting the batch size | ||
| 240 | * will decrease performance. | ||
| 241 | * | ||
| 242 | * It seems like we're in the clear for the moment. Direct-IO is | ||
| 243 | * the main guy that batches up lots of get_user_pages, and even | ||
| 244 | * they are limited to 64-at-a-time which is not so many. | ||
| 245 | */ | ||
| 246 | /* | ||
| 247 | * This doesn't prevent pagetable teardown, but does prevent | ||
| 248 | * the pagetables and pages from being freed on x86. | ||
| 249 | * | ||
| 250 | * So long as we atomically load page table pointers versus teardown | ||
| 251 | * (which we do on x86, with the above PAE exception), we can follow the | ||
| 252 | * address down to the the page and take a ref on it. | ||
| 253 | */ | ||
| 254 | local_irq_disable(); | ||
| 255 | pgdp = pgd_offset(mm, addr); | ||
| 256 | do { | ||
| 257 | pgd_t pgd = *pgdp; | ||
| 258 | |||
| 259 | next = pgd_addr_end(addr, end); | ||
| 260 | if (pgd_none(pgd)) | ||
| 261 | goto slow; | ||
| 262 | if (!gup_pud_range(pgd, addr, next, write, pages, &nr)) | ||
| 263 | goto slow; | ||
| 264 | } while (pgdp++, addr = next, addr != end); | ||
| 265 | local_irq_enable(); | ||
| 266 | |||
| 267 | VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT); | ||
| 268 | return nr; | ||
| 269 | |||
| 270 | { | ||
| 271 | int ret; | ||
| 272 | |||
| 273 | slow: | ||
| 274 | local_irq_enable(); | ||
| 275 | slow_irqon: | ||
| 276 | /* Try to get the remaining pages with get_user_pages */ | ||
| 277 | start += nr << PAGE_SHIFT; | ||
| 278 | pages += nr; | ||
| 279 | |||
| 280 | down_read(&mm->mmap_sem); | ||
| 281 | ret = get_user_pages(current, mm, start, | ||
| 282 | (end - start) >> PAGE_SHIFT, write, 0, pages, NULL); | ||
| 283 | up_read(&mm->mmap_sem); | ||
| 284 | |||
| 285 | /* Have to be a bit careful with return values */ | ||
| 286 | if (nr > 0) { | ||
| 287 | if (ret < 0) | ||
| 288 | ret = nr; | ||
| 289 | else | ||
| 290 | ret += nr; | ||
| 291 | } | ||
| 292 | |||
| 293 | return ret; | ||
| 294 | } | ||
| 295 | } | ||
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 0b3d567e686d..8f307d914c2e 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
| @@ -124,7 +124,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
| 124 | return 1; | 124 | return 1; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | 127 | pte_t *huge_pte_alloc(struct mm_struct *mm, |
| 128 | unsigned long addr, unsigned long sz) | ||
| 128 | { | 129 | { |
| 129 | pgd_t *pgd; | 130 | pgd_t *pgd; |
| 130 | pud_t *pud; | 131 | pud_t *pud; |
| @@ -133,9 +134,14 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
| 133 | pgd = pgd_offset(mm, addr); | 134 | pgd = pgd_offset(mm, addr); |
| 134 | pud = pud_alloc(mm, pgd, addr); | 135 | pud = pud_alloc(mm, pgd, addr); |
| 135 | if (pud) { | 136 | if (pud) { |
| 136 | if (pud_none(*pud)) | 137 | if (sz == PUD_SIZE) { |
| 137 | huge_pmd_share(mm, addr, pud); | 138 | pte = (pte_t *)pud; |
| 138 | pte = (pte_t *) pmd_alloc(mm, pud, addr); | 139 | } else { |
| 140 | BUG_ON(sz != PMD_SIZE); | ||
| 141 | if (pud_none(*pud)) | ||
| 142 | huge_pmd_share(mm, addr, pud); | ||
| 143 | pte = (pte_t *) pmd_alloc(mm, pud, addr); | ||
| 144 | } | ||
| 139 | } | 145 | } |
| 140 | BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte)); | 146 | BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte)); |
| 141 | 147 | ||
| @@ -151,8 +157,11 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
| 151 | pgd = pgd_offset(mm, addr); | 157 | pgd = pgd_offset(mm, addr); |
| 152 | if (pgd_present(*pgd)) { | 158 | if (pgd_present(*pgd)) { |
| 153 | pud = pud_offset(pgd, addr); | 159 | pud = pud_offset(pgd, addr); |
| 154 | if (pud_present(*pud)) | 160 | if (pud_present(*pud)) { |
| 161 | if (pud_large(*pud)) | ||
| 162 | return (pte_t *)pud; | ||
| 155 | pmd = pmd_offset(pud, addr); | 163 | pmd = pmd_offset(pud, addr); |
| 164 | } | ||
| 156 | } | 165 | } |
| 157 | return (pte_t *) pmd; | 166 | return (pte_t *) pmd; |
| 158 | } | 167 | } |
| @@ -188,6 +197,11 @@ int pmd_huge(pmd_t pmd) | |||
| 188 | return 0; | 197 | return 0; |
| 189 | } | 198 | } |
| 190 | 199 | ||
| 200 | int pud_huge(pud_t pud) | ||
| 201 | { | ||
| 202 | return 0; | ||
| 203 | } | ||
| 204 | |||
| 191 | struct page * | 205 | struct page * |
| 192 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 206 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
| 193 | pmd_t *pmd, int write) | 207 | pmd_t *pmd, int write) |
| @@ -208,6 +222,11 @@ int pmd_huge(pmd_t pmd) | |||
| 208 | return !!(pmd_val(pmd) & _PAGE_PSE); | 222 | return !!(pmd_val(pmd) & _PAGE_PSE); |
| 209 | } | 223 | } |
| 210 | 224 | ||
| 225 | int pud_huge(pud_t pud) | ||
| 226 | { | ||
| 227 | return !!(pud_val(pud) & _PAGE_PSE); | ||
| 228 | } | ||
| 229 | |||
| 211 | struct page * | 230 | struct page * |
| 212 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 231 | follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
| 213 | pmd_t *pmd, int write) | 232 | pmd_t *pmd, int write) |
| @@ -216,9 +235,22 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
| 216 | 235 | ||
| 217 | page = pte_page(*(pte_t *)pmd); | 236 | page = pte_page(*(pte_t *)pmd); |
| 218 | if (page) | 237 | if (page) |
| 219 | page += ((address & ~HPAGE_MASK) >> PAGE_SHIFT); | 238 | page += ((address & ~PMD_MASK) >> PAGE_SHIFT); |
| 239 | return page; | ||
| 240 | } | ||
| 241 | |||
| 242 | struct page * | ||
| 243 | follow_huge_pud(struct mm_struct *mm, unsigned long address, | ||
| 244 | pud_t *pud, int write) | ||
| 245 | { | ||
| 246 | struct page *page; | ||
| 247 | |||
| 248 | page = pte_page(*(pte_t *)pud); | ||
| 249 | if (page) | ||
| 250 | page += ((address & ~PUD_MASK) >> PAGE_SHIFT); | ||
| 220 | return page; | 251 | return page; |
| 221 | } | 252 | } |
| 253 | |||
| 222 | #endif | 254 | #endif |
| 223 | 255 | ||
| 224 | /* x86_64 also uses this file */ | 256 | /* x86_64 also uses this file */ |
| @@ -228,6 +260,7 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file, | |||
| 228 | unsigned long addr, unsigned long len, | 260 | unsigned long addr, unsigned long len, |
| 229 | unsigned long pgoff, unsigned long flags) | 261 | unsigned long pgoff, unsigned long flags) |
| 230 | { | 262 | { |
| 263 | struct hstate *h = hstate_file(file); | ||
| 231 | struct mm_struct *mm = current->mm; | 264 | struct mm_struct *mm = current->mm; |
| 232 | struct vm_area_struct *vma; | 265 | struct vm_area_struct *vma; |
| 233 | unsigned long start_addr; | 266 | unsigned long start_addr; |
| @@ -240,7 +273,7 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file, | |||
| 240 | } | 273 | } |
| 241 | 274 | ||
| 242 | full_search: | 275 | full_search: |
| 243 | addr = ALIGN(start_addr, HPAGE_SIZE); | 276 | addr = ALIGN(start_addr, huge_page_size(h)); |
| 244 | 277 | ||
| 245 | for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { | 278 | for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { |
| 246 | /* At this point: (!vma || addr < vma->vm_end). */ | 279 | /* At this point: (!vma || addr < vma->vm_end). */ |
| @@ -262,7 +295,7 @@ full_search: | |||
| 262 | } | 295 | } |
| 263 | if (addr + mm->cached_hole_size < vma->vm_start) | 296 | if (addr + mm->cached_hole_size < vma->vm_start) |
| 264 | mm->cached_hole_size = vma->vm_start - addr; | 297 | mm->cached_hole_size = vma->vm_start - addr; |
| 265 | addr = ALIGN(vma->vm_end, HPAGE_SIZE); | 298 | addr = ALIGN(vma->vm_end, huge_page_size(h)); |
| 266 | } | 299 | } |
| 267 | } | 300 | } |
| 268 | 301 | ||
| @@ -270,6 +303,7 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file, | |||
| 270 | unsigned long addr0, unsigned long len, | 303 | unsigned long addr0, unsigned long len, |
| 271 | unsigned long pgoff, unsigned long flags) | 304 | unsigned long pgoff, unsigned long flags) |
| 272 | { | 305 | { |
| 306 | struct hstate *h = hstate_file(file); | ||
| 273 | struct mm_struct *mm = current->mm; | 307 | struct mm_struct *mm = current->mm; |
| 274 | struct vm_area_struct *vma, *prev_vma; | 308 | struct vm_area_struct *vma, *prev_vma; |
| 275 | unsigned long base = mm->mmap_base, addr = addr0; | 309 | unsigned long base = mm->mmap_base, addr = addr0; |
| @@ -290,7 +324,7 @@ try_again: | |||
| 290 | goto fail; | 324 | goto fail; |
| 291 | 325 | ||
| 292 | /* either no address requested or cant fit in requested address hole */ | 326 | /* either no address requested or cant fit in requested address hole */ |
| 293 | addr = (mm->free_area_cache - len) & HPAGE_MASK; | 327 | addr = (mm->free_area_cache - len) & huge_page_mask(h); |
| 294 | do { | 328 | do { |
| 295 | /* | 329 | /* |
| 296 | * Lookup failure means no vma is above this address, | 330 | * Lookup failure means no vma is above this address, |
| @@ -321,7 +355,7 @@ try_again: | |||
| 321 | largest_hole = vma->vm_start - addr; | 355 | largest_hole = vma->vm_start - addr; |
| 322 | 356 | ||
| 323 | /* try just below the current vma->vm_start */ | 357 | /* try just below the current vma->vm_start */ |
| 324 | addr = (vma->vm_start - len) & HPAGE_MASK; | 358 | addr = (vma->vm_start - len) & huge_page_mask(h); |
| 325 | } while (len <= vma->vm_start); | 359 | } while (len <= vma->vm_start); |
| 326 | 360 | ||
| 327 | fail: | 361 | fail: |
| @@ -359,22 +393,23 @@ unsigned long | |||
| 359 | hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | 393 | hugetlb_get_unmapped_area(struct file *file, unsigned long addr, |
| 360 | unsigned long len, unsigned long pgoff, unsigned long flags) | 394 | unsigned long len, unsigned long pgoff, unsigned long flags) |
| 361 | { | 395 | { |
| 396 | struct hstate *h = hstate_file(file); | ||
| 362 | struct mm_struct *mm = current->mm; | 397 | struct mm_struct *mm = current->mm; |
| 363 | struct vm_area_struct *vma; | 398 | struct vm_area_struct *vma; |
| 364 | 399 | ||
| 365 | if (len & ~HPAGE_MASK) | 400 | if (len & ~huge_page_mask(h)) |
| 366 | return -EINVAL; | 401 | return -EINVAL; |
| 367 | if (len > TASK_SIZE) | 402 | if (len > TASK_SIZE) |
| 368 | return -ENOMEM; | 403 | return -ENOMEM; |
| 369 | 404 | ||
| 370 | if (flags & MAP_FIXED) { | 405 | if (flags & MAP_FIXED) { |
| 371 | if (prepare_hugepage_range(addr, len)) | 406 | if (prepare_hugepage_range(file, addr, len)) |
| 372 | return -EINVAL; | 407 | return -EINVAL; |
| 373 | return addr; | 408 | return addr; |
| 374 | } | 409 | } |
| 375 | 410 | ||
| 376 | if (addr) { | 411 | if (addr) { |
| 377 | addr = ALIGN(addr, HPAGE_SIZE); | 412 | addr = ALIGN(addr, huge_page_size(h)); |
| 378 | vma = find_vma(mm, addr); | 413 | vma = find_vma(mm, addr); |
| 379 | if (TASK_SIZE - len >= addr && | 414 | if (TASK_SIZE - len >= addr && |
| 380 | (!vma || addr + len <= vma->vm_start)) | 415 | (!vma || addr + len <= vma->vm_start)) |
| @@ -390,3 +425,20 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
| 390 | 425 | ||
| 391 | #endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ | 426 | #endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ |
| 392 | 427 | ||
| 428 | #ifdef CONFIG_X86_64 | ||
| 429 | static __init int setup_hugepagesz(char *opt) | ||
| 430 | { | ||
| 431 | unsigned long ps = memparse(opt, &opt); | ||
| 432 | if (ps == PMD_SIZE) { | ||
| 433 | hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT); | ||
| 434 | } else if (ps == PUD_SIZE && cpu_has_gbpages) { | ||
| 435 | hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); | ||
| 436 | } else { | ||
| 437 | printk(KERN_ERR "hugepagesz: Unsupported page size %lu M\n", | ||
| 438 | ps >> 20); | ||
| 439 | return 0; | ||
| 440 | } | ||
| 441 | return 1; | ||
| 442 | } | ||
| 443 | __setup("hugepagesz=", setup_hugepagesz); | ||
| 444 | #endif | ||
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index ec37121f6709..129618ca0ea2 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
| @@ -86,43 +86,6 @@ early_param("gbpages", parse_direct_gbpages_on); | |||
| 86 | * around without checking the pgd every time. | 86 | * around without checking the pgd every time. |
| 87 | */ | 87 | */ |
| 88 | 88 | ||
| 89 | void show_mem(void) | ||
| 90 | { | ||
| 91 | long i, total = 0, reserved = 0; | ||
| 92 | long shared = 0, cached = 0; | ||
| 93 | struct page *page; | ||
| 94 | pg_data_t *pgdat; | ||
| 95 | |||
| 96 | printk(KERN_INFO "Mem-info:\n"); | ||
| 97 | show_free_areas(); | ||
| 98 | for_each_online_pgdat(pgdat) { | ||
| 99 | for (i = 0; i < pgdat->node_spanned_pages; ++i) { | ||
| 100 | /* | ||
| 101 | * This loop can take a while with 256 GB and | ||
| 102 | * 4k pages so defer the NMI watchdog: | ||
| 103 | */ | ||
| 104 | if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) | ||
| 105 | touch_nmi_watchdog(); | ||
| 106 | |||
| 107 | if (!pfn_valid(pgdat->node_start_pfn + i)) | ||
| 108 | continue; | ||
| 109 | |||
| 110 | page = pfn_to_page(pgdat->node_start_pfn + i); | ||
| 111 | total++; | ||
| 112 | if (PageReserved(page)) | ||
| 113 | reserved++; | ||
| 114 | else if (PageSwapCache(page)) | ||
| 115 | cached++; | ||
| 116 | else if (page_count(page)) | ||
| 117 | shared += page_count(page) - 1; | ||
| 118 | } | ||
| 119 | } | ||
| 120 | printk(KERN_INFO "%lu pages of RAM\n", total); | ||
| 121 | printk(KERN_INFO "%lu reserved pages\n", reserved); | ||
| 122 | printk(KERN_INFO "%lu pages shared\n", shared); | ||
| 123 | printk(KERN_INFO "%lu pages swap cached\n", cached); | ||
| 124 | } | ||
| 125 | |||
| 126 | int after_bootmem; | 89 | int after_bootmem; |
| 127 | 90 | ||
| 128 | static __init void *spp_getpage(void) | 91 | static __init void *spp_getpage(void) |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 24c1d3c30186..016f335bbeea 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
| @@ -330,6 +330,14 @@ static void __iomem *ioremap_default(resource_size_t phys_addr, | |||
| 330 | return (void __iomem *)ret; | 330 | return (void __iomem *)ret; |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size, | ||
| 334 | unsigned long prot_val) | ||
| 335 | { | ||
| 336 | return __ioremap_caller(phys_addr, size, (prot_val & _PAGE_CACHE_MASK), | ||
| 337 | __builtin_return_address(0)); | ||
| 338 | } | ||
| 339 | EXPORT_SYMBOL(ioremap_prot); | ||
| 340 | |||
| 333 | /** | 341 | /** |
| 334 | * iounmap - Free a IO remapping | 342 | * iounmap - Free a IO remapping |
| 335 | * @addr: virtual address from ioremap_* | 343 | * @addr: virtual address from ioremap_* |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 9782f42dd319..a4dd793d6003 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; | 23 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; |
| 24 | EXPORT_SYMBOL(node_data); | 24 | EXPORT_SYMBOL(node_data); |
| 25 | 25 | ||
| 26 | static bootmem_data_t plat_node_bdata[MAX_NUMNODES]; | ||
| 27 | |||
| 28 | struct memnode memnode; | 26 | struct memnode memnode; |
| 29 | 27 | ||
| 30 | s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = { | 28 | s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = { |
| @@ -198,7 +196,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, | |||
| 198 | nodedata_phys + pgdat_size - 1); | 196 | nodedata_phys + pgdat_size - 1); |
| 199 | 197 | ||
| 200 | memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); | 198 | memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); |
| 201 | NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid]; | 199 | NODE_DATA(nodeid)->bdata = &bootmem_node_data[nodeid]; |
| 202 | NODE_DATA(nodeid)->node_start_pfn = start_pfn; | 200 | NODE_DATA(nodeid)->node_start_pfn = start_pfn; |
| 203 | NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn; | 201 | NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn; |
| 204 | 202 | ||
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index b4becbf8c570..cab0abbd1ebe 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
| @@ -20,53 +20,6 @@ | |||
| 20 | #include <asm/tlb.h> | 20 | #include <asm/tlb.h> |
| 21 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
| 22 | 22 | ||
| 23 | void show_mem(void) | ||
| 24 | { | ||
| 25 | int total = 0, reserved = 0; | ||
| 26 | int shared = 0, cached = 0; | ||
| 27 | int highmem = 0; | ||
| 28 | struct page *page; | ||
| 29 | pg_data_t *pgdat; | ||
| 30 | unsigned long i; | ||
| 31 | unsigned long flags; | ||
| 32 | |||
| 33 | printk(KERN_INFO "Mem-info:\n"); | ||
| 34 | show_free_areas(); | ||
| 35 | for_each_online_pgdat(pgdat) { | ||
| 36 | pgdat_resize_lock(pgdat, &flags); | ||
| 37 | for (i = 0; i < pgdat->node_spanned_pages; ++i) { | ||
| 38 | if (unlikely(i % MAX_ORDER_NR_PAGES == 0)) | ||
| 39 | touch_nmi_watchdog(); | ||
| 40 | page = pgdat_page_nr(pgdat, i); | ||
| 41 | total++; | ||
| 42 | if (PageHighMem(page)) | ||
| 43 | highmem++; | ||
| 44 | if (PageReserved(page)) | ||
| 45 | reserved++; | ||
| 46 | else if (PageSwapCache(page)) | ||
| 47 | cached++; | ||
| 48 | else if (page_count(page)) | ||
| 49 | shared += page_count(page) - 1; | ||
| 50 | } | ||
| 51 | pgdat_resize_unlock(pgdat, &flags); | ||
| 52 | } | ||
| 53 | printk(KERN_INFO "%d pages of RAM\n", total); | ||
| 54 | printk(KERN_INFO "%d pages of HIGHMEM\n", highmem); | ||
| 55 | printk(KERN_INFO "%d reserved pages\n", reserved); | ||
| 56 | printk(KERN_INFO "%d pages shared\n", shared); | ||
| 57 | printk(KERN_INFO "%d pages swap cached\n", cached); | ||
| 58 | |||
| 59 | printk(KERN_INFO "%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); | ||
| 60 | printk(KERN_INFO "%lu pages writeback\n", | ||
| 61 | global_page_state(NR_WRITEBACK)); | ||
| 62 | printk(KERN_INFO "%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); | ||
| 63 | printk(KERN_INFO "%lu pages slab\n", | ||
| 64 | global_page_state(NR_SLAB_RECLAIMABLE) + | ||
| 65 | global_page_state(NR_SLAB_UNRECLAIMABLE)); | ||
| 66 | printk(KERN_INFO "%lu pages pagetables\n", | ||
| 67 | global_page_state(NR_PAGETABLE)); | ||
| 68 | } | ||
| 69 | |||
| 70 | /* | 23 | /* |
| 71 | * Associate a virtual page frame with a given physical page frame | 24 | * Associate a virtual page frame with a given physical page frame |
| 72 | * and protection flags for that frame. | 25 | * and protection flags for that frame. |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 7f3329b55d2e..3f90289410e6 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
| @@ -369,20 +369,34 @@ static int __init ppro_init(char **cpu_type) | |||
| 369 | { | 369 | { |
| 370 | __u8 cpu_model = boot_cpu_data.x86_model; | 370 | __u8 cpu_model = boot_cpu_data.x86_model; |
| 371 | 371 | ||
| 372 | if (cpu_model == 14) | 372 | switch (cpu_model) { |
| 373 | case 0 ... 2: | ||
| 374 | *cpu_type = "i386/ppro"; | ||
| 375 | break; | ||
| 376 | case 3 ... 5: | ||
| 377 | *cpu_type = "i386/pii"; | ||
| 378 | break; | ||
| 379 | case 6 ... 8: | ||
| 380 | *cpu_type = "i386/piii"; | ||
| 381 | break; | ||
| 382 | case 9: | ||
| 383 | *cpu_type = "i386/p6_mobile"; | ||
| 384 | break; | ||
| 385 | case 10 ... 13: | ||
| 386 | *cpu_type = "i386/p6"; | ||
| 387 | break; | ||
| 388 | case 14: | ||
| 373 | *cpu_type = "i386/core"; | 389 | *cpu_type = "i386/core"; |
| 374 | else if (cpu_model == 15 || cpu_model == 23) | 390 | break; |
| 391 | case 15: case 23: | ||
| 392 | *cpu_type = "i386/core_2"; | ||
| 393 | break; | ||
| 394 | case 26: | ||
| 375 | *cpu_type = "i386/core_2"; | 395 | *cpu_type = "i386/core_2"; |
| 376 | else if (cpu_model > 0xd) | 396 | break; |
| 397 | default: | ||
| 398 | /* Unknown */ | ||
| 377 | return 0; | 399 | return 0; |
| 378 | else if (cpu_model == 9) { | ||
| 379 | *cpu_type = "i386/p6_mobile"; | ||
| 380 | } else if (cpu_model > 5) { | ||
| 381 | *cpu_type = "i386/piii"; | ||
| 382 | } else if (cpu_model > 2) { | ||
| 383 | *cpu_type = "i386/pii"; | ||
| 384 | } else { | ||
| 385 | *cpu_type = "i386/ppro"; | ||
| 386 | } | 400 | } |
| 387 | 401 | ||
| 388 | model = &op_ppro_spec; | 402 | model = &op_ppro_spec; |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 2aafb67dc5f1..a09505806b82 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
| @@ -280,6 +280,7 @@ static void pci_track_mmap_page_range(struct vm_area_struct *vma) | |||
| 280 | static struct vm_operations_struct pci_mmap_ops = { | 280 | static struct vm_operations_struct pci_mmap_ops = { |
| 281 | .open = pci_track_mmap_page_range, | 281 | .open = pci_track_mmap_page_range, |
| 282 | .close = pci_unmap_page_range, | 282 | .close = pci_unmap_page_range, |
| 283 | .access = generic_access_phys, | ||
| 283 | }; | 284 | }; |
| 284 | 285 | ||
| 285 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 286 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index e693812ac59a..d8faf79a0a1d 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
| @@ -367,7 +367,7 @@ static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector) | |||
| 367 | 367 | ||
| 368 | cpus_and(mask, mask, cpu_online_map); | 368 | cpus_and(mask, mask, cpu_online_map); |
| 369 | 369 | ||
| 370 | for_each_cpu_mask(cpu, mask) | 370 | for_each_cpu_mask_nr(cpu, mask) |
| 371 | xen_send_IPI_one(cpu, vector); | 371 | xen_send_IPI_one(cpu, vector); |
| 372 | } | 372 | } |
| 373 | 373 | ||
| @@ -378,7 +378,7 @@ static void xen_smp_send_call_function_ipi(cpumask_t mask) | |||
| 378 | xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR); | 378 | xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR); |
| 379 | 379 | ||
| 380 | /* Make sure other vcpus get a chance to run if they need to. */ | 380 | /* Make sure other vcpus get a chance to run if they need to. */ |
| 381 | for_each_cpu_mask(cpu, mask) { | 381 | for_each_cpu_mask_nr(cpu, mask) { |
| 382 | if (xen_vcpu_stolen(cpu)) { | 382 | if (xen_vcpu_stolen(cpu)) { |
| 383 | HYPERVISOR_sched_op(SCHEDOP_yield, 0); | 383 | HYPERVISOR_sched_op(SCHEDOP_yield, 0); |
| 384 | break; | 384 | break; |
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S index 4038cbfe3331..7f58304fafb3 100644 --- a/arch/x86/xen/xen-asm_64.S +++ b/arch/x86/xen/xen-asm_64.S | |||
| @@ -173,7 +173,7 @@ ENTRY(xen_sysexit) | |||
| 173 | pushq $__USER32_CS | 173 | pushq $__USER32_CS |
| 174 | pushq %rdx | 174 | pushq %rdx |
| 175 | 175 | ||
| 176 | pushq $VGCF_in_syscall | 176 | pushq $0 |
| 177 | 1: jmp hypercall_iret | 177 | 1: jmp hypercall_iret |
| 178 | ENDPATCH(xen_sysexit) | 178 | ENDPATCH(xen_sysexit) |
| 179 | RELOC(xen_sysexit, 1b+1) | 179 | RELOC(xen_sysexit, 1b+1) |
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 5e6d75c9f92b..a00359e8f7a8 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/mm.h> | ||
| 19 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
| 20 | #include <linux/screen_info.h> | 21 | #include <linux/screen_info.h> |
| 21 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index f3e16efcd47a..ac15ecbdf919 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c | |||
| @@ -49,7 +49,7 @@ asmlinkage long xtensa_pipe(int __user *userfds) | |||
| 49 | int fd[2]; | 49 | int fd[2]; |
| 50 | int error; | 50 | int error; |
| 51 | 51 | ||
| 52 | error = do_pipe(fd); | 52 | error = do_pipe_flags(fd, 0); |
| 53 | if (!error) { | 53 | if (!error) { |
| 54 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) | 54 | if (copy_to_user(userfds, fd, 2 * sizeof(int))) |
| 55 | error = -EFAULT; | 55 | error = -EFAULT; |
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 81d0560eaea2..34163cfaaffc 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
| @@ -280,36 +280,9 @@ void free_initmem(void) | |||
| 280 | (&__init_end - &__init_begin) >> 10); | 280 | (&__init_end - &__init_begin) >> 10); |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | void show_mem(void) | ||
| 284 | { | ||
| 285 | int i, free = 0, total = 0, reserved = 0; | ||
| 286 | int shared = 0, cached = 0; | ||
| 287 | |||
| 288 | printk("Mem-info:\n"); | ||
| 289 | show_free_areas(); | ||
| 290 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 291 | i = max_mapnr; | ||
| 292 | while (i-- > 0) { | ||
| 293 | total++; | ||
| 294 | if (PageReserved(mem_map+i)) | ||
| 295 | reserved++; | ||
| 296 | else if (PageSwapCache(mem_map+i)) | ||
| 297 | cached++; | ||
| 298 | else if (!page_count(mem_map + i)) | ||
| 299 | free++; | ||
| 300 | else | ||
| 301 | shared += page_count(mem_map + i) - 1; | ||
| 302 | } | ||
| 303 | printk("%d pages of RAM\n", total); | ||
| 304 | printk("%d reserved pages\n", reserved); | ||
| 305 | printk("%d pages shared\n", shared); | ||
| 306 | printk("%d pages swap cached\n",cached); | ||
| 307 | printk("%d free pages\n", free); | ||
| 308 | } | ||
| 309 | |||
| 310 | struct kmem_cache *pgtable_cache __read_mostly; | 283 | struct kmem_cache *pgtable_cache __read_mostly; |
| 311 | 284 | ||
| 312 | static void pgd_ctor(struct kmem_cache *cache, void* addr) | 285 | static void pgd_ctor(void* addr) |
| 313 | { | 286 | { |
| 314 | pte_t* ptep = (pte_t*)addr; | 287 | pte_t* ptep = (pte_t*)addr; |
| 315 | int i; | 288 | int i; |
