diff options
Diffstat (limited to 'arch')
80 files changed, 555 insertions, 243 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 376f22130791..326f0a2d56e5 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -409,7 +409,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen) | |||
409 | return -EFAULT; | 409 | return -EFAULT; |
410 | 410 | ||
411 | len = namelen; | 411 | len = namelen; |
412 | if (namelen > 32) | 412 | if (len > 32) |
413 | len = 32; | 413 | len = 32; |
414 | 414 | ||
415 | down_read(&uts_sem); | 415 | down_read(&uts_sem); |
@@ -594,7 +594,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count) | |||
594 | down_read(&uts_sem); | 594 | down_read(&uts_sem); |
595 | res = sysinfo_table[offset]; | 595 | res = sysinfo_table[offset]; |
596 | len = strlen(res)+1; | 596 | len = strlen(res)+1; |
597 | if (len > count) | 597 | if ((unsigned long)len > (unsigned long)count) |
598 | len = count; | 598 | len = count; |
599 | if (copy_to_user(buf, res, len)) | 599 | if (copy_to_user(buf, res, len)) |
600 | err = -EFAULT; | 600 | err = -EFAULT; |
@@ -649,7 +649,7 @@ SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer, | |||
649 | return 1; | 649 | return 1; |
650 | 650 | ||
651 | case GSI_GET_HWRPB: | 651 | case GSI_GET_HWRPB: |
652 | if (nbytes < sizeof(*hwrpb)) | 652 | if (nbytes > sizeof(*hwrpb)) |
653 | return -EINVAL; | 653 | return -EINVAL; |
654 | if (copy_to_user(buffer, hwrpb, nbytes) != 0) | 654 | if (copy_to_user(buffer, hwrpb, nbytes) != 0) |
655 | return -EFAULT; | 655 | return -EFAULT; |
@@ -1008,6 +1008,7 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, | |||
1008 | { | 1008 | { |
1009 | struct rusage r; | 1009 | struct rusage r; |
1010 | long ret, err; | 1010 | long ret, err; |
1011 | unsigned int status = 0; | ||
1011 | mm_segment_t old_fs; | 1012 | mm_segment_t old_fs; |
1012 | 1013 | ||
1013 | if (!ur) | 1014 | if (!ur) |
@@ -1016,13 +1017,15 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, | |||
1016 | old_fs = get_fs(); | 1017 | old_fs = get_fs(); |
1017 | 1018 | ||
1018 | set_fs (KERNEL_DS); | 1019 | set_fs (KERNEL_DS); |
1019 | ret = sys_wait4(pid, ustatus, options, (struct rusage __user *) &r); | 1020 | ret = sys_wait4(pid, (unsigned int __user *) &status, options, |
1021 | (struct rusage __user *) &r); | ||
1020 | set_fs (old_fs); | 1022 | set_fs (old_fs); |
1021 | 1023 | ||
1022 | if (!access_ok(VERIFY_WRITE, ur, sizeof(*ur))) | 1024 | if (!access_ok(VERIFY_WRITE, ur, sizeof(*ur))) |
1023 | return -EFAULT; | 1025 | return -EFAULT; |
1024 | 1026 | ||
1025 | err = 0; | 1027 | err = 0; |
1028 | err |= put_user(status, ustatus); | ||
1026 | err |= __put_user(r.ru_utime.tv_sec, &ur->ru_utime.tv_sec); | 1029 | err |= __put_user(r.ru_utime.tv_sec, &ur->ru_utime.tv_sec); |
1027 | err |= __put_user(r.ru_utime.tv_usec, &ur->ru_utime.tv_usec); | 1030 | err |= __put_user(r.ru_utime.tv_usec, &ur->ru_utime.tv_usec); |
1028 | err |= __put_user(r.ru_stime.tv_sec, &ur->ru_stime.tv_sec); | 1031 | err |= __put_user(r.ru_stime.tv_sec, &ur->ru_stime.tv_sec); |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index f9da41921c52..942fad97e447 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -691,9 +691,9 @@ proc_types: | |||
691 | 691 | ||
692 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) | 692 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) |
693 | .word 0xff0ffff0 | 693 | .word 0xff0ffff0 |
694 | b __arm926ejs_mmu_cache_on | 694 | W(b) __arm926ejs_mmu_cache_on |
695 | b __armv4_mmu_cache_off | 695 | W(b) __armv4_mmu_cache_off |
696 | b __armv5tej_mmu_cache_flush | 696 | W(b) __armv5tej_mmu_cache_flush |
697 | 697 | ||
698 | .word 0x00007000 @ ARM7 IDs | 698 | .word 0x00007000 @ ARM7 IDs |
699 | .word 0x0000f000 | 699 | .word 0x0000f000 |
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig index 889922ad229c..67b5abb6f857 100644 --- a/arch/arm/configs/davinci_all_defconfig +++ b/arch/arm/configs/davinci_all_defconfig | |||
@@ -157,7 +157,7 @@ CONFIG_LEDS_GPIO=m | |||
157 | CONFIG_LEDS_TRIGGERS=y | 157 | CONFIG_LEDS_TRIGGERS=y |
158 | CONFIG_LEDS_TRIGGER_TIMER=m | 158 | CONFIG_LEDS_TRIGGER_TIMER=m |
159 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | 159 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m |
160 | CONFIG_RTC_CLASS=m | 160 | CONFIG_RTC_CLASS=y |
161 | CONFIG_EXT2_FS=y | 161 | CONFIG_EXT2_FS=y |
162 | CONFIG_EXT3_FS=y | 162 | CONFIG_EXT3_FS=y |
163 | CONFIG_XFS_FS=m | 163 | CONFIG_XFS_FS=m |
diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig index 316af5479d90..9c0ad7993986 100644 --- a/arch/arm/configs/netx_defconfig +++ b/arch/arm/configs/netx_defconfig | |||
@@ -60,7 +60,7 @@ CONFIG_FB_ARMCLCD=y | |||
60 | # CONFIG_VGA_CONSOLE is not set | 60 | # CONFIG_VGA_CONSOLE is not set |
61 | CONFIG_FRAMEBUFFER_CONSOLE=y | 61 | CONFIG_FRAMEBUFFER_CONSOLE=y |
62 | CONFIG_LOGO=y | 62 | CONFIG_LOGO=y |
63 | CONFIG_RTC_CLASS=m | 63 | CONFIG_RTC_CLASS=y |
64 | CONFIG_INOTIFY=y | 64 | CONFIG_INOTIFY=y |
65 | CONFIG_TMPFS=y | 65 | CONFIG_TMPFS=y |
66 | CONFIG_JFFS2_FS=y | 66 | CONFIG_JFFS2_FS=y |
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig index 8b0c717378fa..1d01ddd33122 100644 --- a/arch/arm/configs/viper_defconfig +++ b/arch/arm/configs/viper_defconfig | |||
@@ -142,7 +142,7 @@ CONFIG_USB_GADGETFS=m | |||
142 | CONFIG_USB_FILE_STORAGE=m | 142 | CONFIG_USB_FILE_STORAGE=m |
143 | CONFIG_USB_G_SERIAL=m | 143 | CONFIG_USB_G_SERIAL=m |
144 | CONFIG_USB_G_PRINTER=m | 144 | CONFIG_USB_G_PRINTER=m |
145 | CONFIG_RTC_CLASS=m | 145 | CONFIG_RTC_CLASS=y |
146 | CONFIG_RTC_DRV_DS1307=m | 146 | CONFIG_RTC_DRV_DS1307=m |
147 | CONFIG_RTC_DRV_SA1100=m | 147 | CONFIG_RTC_DRV_SA1100=m |
148 | CONFIG_EXT2_FS=m | 148 | CONFIG_EXT2_FS=m |
diff --git a/arch/arm/configs/xcep_defconfig b/arch/arm/configs/xcep_defconfig index 5b5504143647..721832ffe2d7 100644 --- a/arch/arm/configs/xcep_defconfig +++ b/arch/arm/configs/xcep_defconfig | |||
@@ -73,7 +73,7 @@ CONFIG_SENSORS_MAX6650=m | |||
73 | # CONFIG_VGA_CONSOLE is not set | 73 | # CONFIG_VGA_CONSOLE is not set |
74 | # CONFIG_HID_SUPPORT is not set | 74 | # CONFIG_HID_SUPPORT is not set |
75 | # CONFIG_USB_SUPPORT is not set | 75 | # CONFIG_USB_SUPPORT is not set |
76 | CONFIG_RTC_CLASS=m | 76 | CONFIG_RTC_CLASS=y |
77 | CONFIG_RTC_DRV_SA1100=m | 77 | CONFIG_RTC_DRV_SA1100=m |
78 | CONFIG_DMADEVICES=y | 78 | CONFIG_DMADEVICES=y |
79 | # CONFIG_DNOTIFY is not set | 79 | # CONFIG_DNOTIFY is not set |
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig index 960f65514d88..59577ad3f4ef 100644 --- a/arch/arm/configs/zeus_defconfig +++ b/arch/arm/configs/zeus_defconfig | |||
@@ -158,7 +158,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m | |||
158 | CONFIG_LEDS_TRIGGER_BACKLIGHT=m | 158 | CONFIG_LEDS_TRIGGER_BACKLIGHT=m |
159 | CONFIG_LEDS_TRIGGER_GPIO=m | 159 | CONFIG_LEDS_TRIGGER_GPIO=m |
160 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m | 160 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m |
161 | CONFIG_RTC_CLASS=m | 161 | CONFIG_RTC_CLASS=y |
162 | CONFIG_RTC_DRV_ISL1208=m | 162 | CONFIG_RTC_DRV_ISL1208=m |
163 | CONFIG_RTC_DRV_PXA=m | 163 | CONFIG_RTC_DRV_PXA=m |
164 | CONFIG_EXT2_FS=y | 164 | CONFIG_EXT2_FS=y |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index a701e4226a6c..0cdd7b456cb2 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -76,6 +76,9 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | |||
76 | unsigned long dt_root; | 76 | unsigned long dt_root; |
77 | const char *model; | 77 | const char *model; |
78 | 78 | ||
79 | if (!dt_phys) | ||
80 | return NULL; | ||
81 | |||
79 | devtree = phys_to_virt(dt_phys); | 82 | devtree = phys_to_virt(dt_phys); |
80 | 83 | ||
81 | /* check device tree validity */ | 84 | /* check device tree validity */ |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index e8d885676807..90c62cd51ca9 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -435,6 +435,10 @@ __irq_usr: | |||
435 | usr_entry | 435 | usr_entry |
436 | kuser_cmpxchg_check | 436 | kuser_cmpxchg_check |
437 | 437 | ||
438 | #ifdef CONFIG_IRQSOFF_TRACER | ||
439 | bl trace_hardirqs_off | ||
440 | #endif | ||
441 | |||
438 | get_thread_info tsk | 442 | get_thread_info tsk |
439 | #ifdef CONFIG_PREEMPT | 443 | #ifdef CONFIG_PREEMPT |
440 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | 444 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count |
@@ -453,7 +457,7 @@ __irq_usr: | |||
453 | #endif | 457 | #endif |
454 | 458 | ||
455 | mov why, #0 | 459 | mov why, #0 |
456 | b ret_to_user | 460 | b ret_to_user_from_irq |
457 | UNWIND(.fnend ) | 461 | UNWIND(.fnend ) |
458 | ENDPROC(__irq_usr) | 462 | ENDPROC(__irq_usr) |
459 | 463 | ||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 1e7b04a40a31..b2a27b6b0046 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -64,6 +64,7 @@ work_resched: | |||
64 | ENTRY(ret_to_user) | 64 | ENTRY(ret_to_user) |
65 | ret_slow_syscall: | 65 | ret_slow_syscall: |
66 | disable_irq @ disable interrupts | 66 | disable_irq @ disable interrupts |
67 | ENTRY(ret_to_user_from_irq) | ||
67 | ldr r1, [tsk, #TI_FLAGS] | 68 | ldr r1, [tsk, #TI_FLAGS] |
68 | tst r1, #_TIF_WORK_MASK | 69 | tst r1, #_TIF_WORK_MASK |
69 | bne work_pending | 70 | bne work_pending |
@@ -75,6 +76,7 @@ no_work_pending: | |||
75 | arch_ret_to_user r1, lr | 76 | arch_ret_to_user r1, lr |
76 | 77 | ||
77 | restore_user_regs fast = 0, offset = 0 | 78 | restore_user_regs fast = 0, offset = 0 |
79 | ENDPROC(ret_to_user_from_irq) | ||
78 | ENDPROC(ret_to_user) | 80 | ENDPROC(ret_to_user) |
79 | 81 | ||
80 | /* | 82 | /* |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index d52eec268b47..6807cb1e76dd 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -139,7 +139,7 @@ static void dump_instr(const char *lvl, struct pt_regs *regs) | |||
139 | fs = get_fs(); | 139 | fs = get_fs(); |
140 | set_fs(KERNEL_DS); | 140 | set_fs(KERNEL_DS); |
141 | 141 | ||
142 | for (i = -4; i < 1; i++) { | 142 | for (i = -4; i < 1 + !!thumb; i++) { |
143 | unsigned int val, bad; | 143 | unsigned int val, bad; |
144 | 144 | ||
145 | if (thumb) | 145 | if (thumb) |
@@ -563,7 +563,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
563 | if (!pmd_present(*pmd)) | 563 | if (!pmd_present(*pmd)) |
564 | goto bad_access; | 564 | goto bad_access; |
565 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); | 565 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); |
566 | if (!pte_present(*pte) || !pte_dirty(*pte)) { | 566 | if (!pte_present(*pte) || !pte_write(*pte) || !pte_dirty(*pte)) { |
567 | pte_unmap_unlock(pte, ptl); | 567 | pte_unmap_unlock(pte, ptl); |
568 | goto bad_access; | 568 | goto bad_access; |
569 | } | 569 | } |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 4e66881c7aee..fc4e98ea7543 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -494,7 +494,7 @@ static struct platform_device da850_mcasp_device = { | |||
494 | .resource = da850_mcasp_resources, | 494 | .resource = da850_mcasp_resources, |
495 | }; | 495 | }; |
496 | 496 | ||
497 | struct platform_device davinci_pcm_device = { | 497 | static struct platform_device davinci_pcm_device = { |
498 | .name = "davinci-pcm-audio", | 498 | .name = "davinci-pcm-audio", |
499 | .id = -1, | 499 | .id = -1, |
500 | }; | 500 | }; |
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 8f4f736aa267..806a2f02b980 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -298,7 +298,7 @@ static void davinci_init_wdt(void) | |||
298 | 298 | ||
299 | /*-------------------------------------------------------------------------*/ | 299 | /*-------------------------------------------------------------------------*/ |
300 | 300 | ||
301 | struct platform_device davinci_pcm_device = { | 301 | static struct platform_device davinci_pcm_device = { |
302 | .name = "davinci-pcm-audio", | 302 | .name = "davinci-pcm-audio", |
303 | .id = -1, | 303 | .id = -1, |
304 | }; | 304 | }; |
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c index a0b838894ac9..e7221398e5af 100644 --- a/arch/arm/mach-davinci/gpio.c +++ b/arch/arm/mach-davinci/gpio.c | |||
@@ -252,9 +252,11 @@ static struct irq_chip gpio_irqchip = { | |||
252 | static void | 252 | static void |
253 | gpio_irq_handler(unsigned irq, struct irq_desc *desc) | 253 | gpio_irq_handler(unsigned irq, struct irq_desc *desc) |
254 | { | 254 | { |
255 | struct davinci_gpio_regs __iomem *g = irq2regs(irq); | 255 | struct davinci_gpio_regs __iomem *g; |
256 | u32 mask = 0xffff; | 256 | u32 mask = 0xffff; |
257 | 257 | ||
258 | g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc); | ||
259 | |||
258 | /* we only care about one bank */ | 260 | /* we only care about one bank */ |
259 | if (irq & 1) | 261 | if (irq & 1) |
260 | mask <<= 16; | 262 | mask <<= 16; |
@@ -422,8 +424,7 @@ static int __init davinci_gpio_irq_setup(void) | |||
422 | 424 | ||
423 | /* set up all irqs in this bank */ | 425 | /* set up all irqs in this bank */ |
424 | irq_set_chained_handler(bank_irq, gpio_irq_handler); | 426 | irq_set_chained_handler(bank_irq, gpio_irq_handler); |
425 | irq_set_chip_data(bank_irq, (__force void *)g); | 427 | irq_set_handler_data(bank_irq, (__force void *)g); |
426 | irq_set_handler_data(bank_irq, (void *)irq); | ||
427 | 428 | ||
428 | for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { | 429 | for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { |
429 | irq_set_chip(irq, &gpio_irqchip); | 430 | irq_set_chip(irq, &gpio_irqchip); |
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 5f1f9867fc70..121ad1d4fa39 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c | |||
@@ -103,6 +103,7 @@ static void __init footbridge_timer_init(void) | |||
103 | clockevents_calc_mult_shift(ce, mem_fclk_21285, 5); | 103 | clockevents_calc_mult_shift(ce, mem_fclk_21285, 5); |
104 | ce->max_delta_ns = clockevent_delta2ns(0xffffff, ce); | 104 | ce->max_delta_ns = clockevent_delta2ns(0xffffff, ce); |
105 | ce->min_delta_ns = clockevent_delta2ns(0x000004, ce); | 105 | ce->min_delta_ns = clockevent_delta2ns(0x000004, ce); |
106 | ce->cpumask = cpumask_of(smp_processor_id()); | ||
106 | 107 | ||
107 | clockevents_register_device(ce); | 108 | clockevents_register_device(ce); |
108 | } | 109 | } |
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S index 30b971d65815..1be2eeb7a0a0 100644 --- a/arch/arm/mach-footbridge/include/mach/debug-macro.S +++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/hardware/debug-8250.S> | 26 | #include <asm/hardware/debug-8250.S> |
27 | 27 | ||
28 | #else | 28 | #else |
29 | #include <mach/hardware.h> | ||
29 | /* For EBSA285 debugging */ | 30 | /* For EBSA285 debugging */ |
30 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 31 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
31 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 32 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
@@ -36,8 +37,8 @@ | |||
36 | .else | 37 | .else |
37 | mov \rp, #0 | 38 | mov \rp, #0 |
38 | .endif | 39 | .endif |
39 | orr \rv, \rp, #0x42000000 | 40 | orr \rv, \rp, #dc21285_high |
40 | orr \rp, \rp, #dc21285_high | 41 | orr \rp, \rp, #0x42000000 |
41 | .endm | 42 | .endm |
42 | 43 | ||
43 | .macro senduart,rd,rx | 44 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c index 65157a35dbba..54add60f94c9 100644 --- a/arch/arm/mach-mxs/ocotp.c +++ b/arch/arm/mach-mxs/ocotp.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | 18 | ||
19 | #include <asm/processor.h> /* for cpu_relax() */ | ||
20 | |||
19 | #include <mach/mxs.h> | 21 | #include <mach/mxs.h> |
20 | 22 | ||
21 | #define OCOTP_WORD_OFFSET 0x20 | 23 | #define OCOTP_WORD_OFFSET 0x20 |
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index af98117043d2..5b114d1558c8 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -4,14 +4,14 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o | 6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o |
7 | obj-y += clock.o clock_data.o opp_data.o reset.o | 7 | obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o |
8 | 8 | ||
9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | 9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o |
10 | 10 | ||
11 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o | 11 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o |
12 | 12 | ||
13 | # Power Management | 13 | # Power Management |
14 | obj-$(CONFIG_PM) += pm.o sleep.o pm_bus.o | 14 | obj-$(CONFIG_PM) += pm.o sleep.o |
15 | 15 | ||
16 | # DSP | 16 | # DSP |
17 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | 17 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o |
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c index fe31d933f0ed..334fb8871bc3 100644 --- a/arch/arm/mach-omap1/pm_bus.c +++ b/arch/arm/mach-omap1/pm_bus.c | |||
@@ -56,9 +56,13 @@ static struct dev_power_domain default_power_domain = { | |||
56 | USE_PLATFORM_PM_SLEEP_OPS | 56 | USE_PLATFORM_PM_SLEEP_OPS |
57 | }, | 57 | }, |
58 | }; | 58 | }; |
59 | #define OMAP1_PWR_DOMAIN (&default_power_domain) | ||
60 | #else | ||
61 | #define OMAP1_PWR_DOMAIN NULL | ||
62 | #endif /* CONFIG_PM_RUNTIME */ | ||
59 | 63 | ||
60 | static struct pm_clk_notifier_block platform_bus_notifier = { | 64 | static struct pm_clk_notifier_block platform_bus_notifier = { |
61 | .pwr_domain = &default_power_domain, | 65 | .pwr_domain = OMAP1_PWR_DOMAIN, |
62 | .con_ids = { "ick", "fck", NULL, }, | 66 | .con_ids = { "ick", "fck", NULL, }, |
63 | }; | 67 | }; |
64 | 68 | ||
@@ -72,4 +76,4 @@ static int __init omap1_pm_runtime_init(void) | |||
72 | return 0; | 76 | return 0; |
73 | } | 77 | } |
74 | core_initcall(omap1_pm_runtime_init); | 78 | core_initcall(omap1_pm_runtime_init); |
75 | #endif /* CONFIG_PM_RUNTIME */ | 79 | |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 2a0bb4818cae..23f71d40883e 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -84,7 +84,8 @@ static struct mtd_partition omap3pandora_nand_partitions[] = { | |||
84 | 84 | ||
85 | static struct omap_nand_platform_data pandora_nand_data = { | 85 | static struct omap_nand_platform_data pandora_nand_data = { |
86 | .cs = 0, | 86 | .cs = 0, |
87 | .devsize = 1, /* '0' for 8-bit, '1' for 16-bit device */ | 87 | .devsize = NAND_BUSWIDTH_16, |
88 | .xfer_type = NAND_OMAP_PREFETCH_DMA, | ||
88 | .parts = omap3pandora_nand_partitions, | 89 | .parts = omap3pandora_nand_partitions, |
89 | .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions), | 90 | .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions), |
90 | }; | 91 | }; |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index a5a83b358ddd..e01da45c0537 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -189,7 +189,7 @@ static struct dentry *pm_dbg_dir; | |||
189 | 189 | ||
190 | static int pm_dbg_init_done; | 190 | static int pm_dbg_init_done; |
191 | 191 | ||
192 | static int __init pm_dbg_init(void); | 192 | static int pm_dbg_init(void); |
193 | 193 | ||
194 | enum { | 194 | enum { |
195 | DEBUG_FILE_COUNTERS = 0, | 195 | DEBUG_FILE_COUNTERS = 0, |
@@ -595,7 +595,7 @@ static int option_set(void *data, u64 val) | |||
595 | 595 | ||
596 | DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); | 596 | DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); |
597 | 597 | ||
598 | static int __init pm_dbg_init(void) | 598 | static int pm_dbg_init(void) |
599 | { | 599 | { |
600 | int i; | 600 | int i; |
601 | struct dentry *d; | 601 | struct dentry *d; |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 7fe74067d85f..094279aefe9c 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/gpio.h> | ||
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/apm-emulation.h> | 20 | #include <linux/apm-emulation.h> |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index c95258c274c1..1e2aba23e0d6 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -382,10 +382,8 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | |||
382 | } | 382 | } |
383 | 383 | ||
384 | static struct sh_mobile_sdhi_info sh_sdhi1_platdata = { | 384 | static struct sh_mobile_sdhi_info sh_sdhi1_platdata = { |
385 | .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX, | ||
386 | .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, | ||
387 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, | 385 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, |
388 | .tmio_caps = MMC_CAP_NONREMOVABLE, | 386 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
389 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 387 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
390 | .set_pwr = ag5evm_sdhi1_set_pwr, | 388 | .set_pwr = ag5evm_sdhi1_set_pwr, |
391 | }; | 389 | }; |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 776f20560e72..7e1d37584321 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -126,7 +126,7 @@ | |||
126 | * ------+--------------------+--------------------+------- | 126 | * ------+--------------------+--------------------+------- |
127 | * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low | 127 | * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low |
128 | * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High | 128 | * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High |
129 | * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Tuch Panel | Low | 129 | * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Touch Panel | Low |
130 | * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low | 130 | * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low |
131 | * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low | 131 | * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low |
132 | * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High | 132 | * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High |
@@ -165,10 +165,10 @@ | |||
165 | * USB1 can become Host by r8a66597, and become Function by renesas_usbhs. | 165 | * USB1 can become Host by r8a66597, and become Function by renesas_usbhs. |
166 | * But don't select both drivers in same time. | 166 | * But don't select both drivers in same time. |
167 | * These uses same IRQ number for request_irq(), and aren't supporting | 167 | * These uses same IRQ number for request_irq(), and aren't supporting |
168 | * IRQF_SHARD / IORESOURCE_IRQ_SHAREABLE. | 168 | * IRQF_SHARED / IORESOURCE_IRQ_SHAREABLE. |
169 | * | 169 | * |
170 | * Actually these are old/new version of USB driver. | 170 | * Actually these are old/new version of USB driver. |
171 | * This mean its register will be broken if it supports SHARD IRQ, | 171 | * This mean its register will be broken if it supports shared IRQ, |
172 | */ | 172 | */ |
173 | 173 | ||
174 | /* | 174 | /* |
@@ -562,7 +562,121 @@ out: | |||
562 | clk_put(hdmi_ick); | 562 | clk_put(hdmi_ick); |
563 | } | 563 | } |
564 | 564 | ||
565 | /* USB1 (Host) */ | 565 | /* USBHS0 is connected to CN22 which takes a USB Mini-B plug |
566 | * | ||
567 | * The sh7372 SoC has IRQ7 set aside for USBHS0 hotplug, | ||
568 | * but on this particular board IRQ7 is already used by | ||
569 | * the touch screen. This leaves us with software polling. | ||
570 | */ | ||
571 | #define USBHS0_POLL_INTERVAL (HZ * 5) | ||
572 | |||
573 | struct usbhs_private { | ||
574 | unsigned int usbphyaddr; | ||
575 | unsigned int usbcrcaddr; | ||
576 | struct renesas_usbhs_platform_info info; | ||
577 | struct delayed_work work; | ||
578 | struct platform_device *pdev; | ||
579 | }; | ||
580 | |||
581 | #define usbhs_get_priv(pdev) \ | ||
582 | container_of(renesas_usbhs_get_info(pdev), \ | ||
583 | struct usbhs_private, info) | ||
584 | |||
585 | #define usbhs_is_connected(priv) \ | ||
586 | (!((1 << 7) & __raw_readw(priv->usbcrcaddr))) | ||
587 | |||
588 | static int usbhs_get_vbus(struct platform_device *pdev) | ||
589 | { | ||
590 | return usbhs_is_connected(usbhs_get_priv(pdev)); | ||
591 | } | ||
592 | |||
593 | static void usbhs_phy_reset(struct platform_device *pdev) | ||
594 | { | ||
595 | struct usbhs_private *priv = usbhs_get_priv(pdev); | ||
596 | |||
597 | /* init phy */ | ||
598 | __raw_writew(0x8a0a, priv->usbcrcaddr); | ||
599 | } | ||
600 | |||
601 | static int usbhs0_get_id(struct platform_device *pdev) | ||
602 | { | ||
603 | return USBHS_GADGET; | ||
604 | } | ||
605 | |||
606 | static void usbhs0_work_function(struct work_struct *work) | ||
607 | { | ||
608 | struct usbhs_private *priv = container_of(work, struct usbhs_private, | ||
609 | work.work); | ||
610 | |||
611 | renesas_usbhs_call_notify_hotplug(priv->pdev); | ||
612 | schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL); | ||
613 | } | ||
614 | |||
615 | static int usbhs0_hardware_init(struct platform_device *pdev) | ||
616 | { | ||
617 | struct usbhs_private *priv = usbhs_get_priv(pdev); | ||
618 | |||
619 | priv->pdev = pdev; | ||
620 | INIT_DELAYED_WORK(&priv->work, usbhs0_work_function); | ||
621 | schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL); | ||
622 | return 0; | ||
623 | } | ||
624 | |||
625 | static void usbhs0_hardware_exit(struct platform_device *pdev) | ||
626 | { | ||
627 | struct usbhs_private *priv = usbhs_get_priv(pdev); | ||
628 | |||
629 | cancel_delayed_work_sync(&priv->work); | ||
630 | } | ||
631 | |||
632 | static struct usbhs_private usbhs0_private = { | ||
633 | .usbcrcaddr = 0xe605810c, /* USBCR2 */ | ||
634 | .info = { | ||
635 | .platform_callback = { | ||
636 | .hardware_init = usbhs0_hardware_init, | ||
637 | .hardware_exit = usbhs0_hardware_exit, | ||
638 | .phy_reset = usbhs_phy_reset, | ||
639 | .get_id = usbhs0_get_id, | ||
640 | .get_vbus = usbhs_get_vbus, | ||
641 | }, | ||
642 | .driver_param = { | ||
643 | .buswait_bwait = 4, | ||
644 | }, | ||
645 | }, | ||
646 | }; | ||
647 | |||
648 | static struct resource usbhs0_resources[] = { | ||
649 | [0] = { | ||
650 | .name = "USBHS0", | ||
651 | .start = 0xe6890000, | ||
652 | .end = 0xe68900e6 - 1, | ||
653 | .flags = IORESOURCE_MEM, | ||
654 | }, | ||
655 | [1] = { | ||
656 | .start = evt2irq(0x1ca0) /* USB0_USB0I0 */, | ||
657 | .flags = IORESOURCE_IRQ, | ||
658 | }, | ||
659 | }; | ||
660 | |||
661 | static struct platform_device usbhs0_device = { | ||
662 | .name = "renesas_usbhs", | ||
663 | .id = 0, | ||
664 | .dev = { | ||
665 | .platform_data = &usbhs0_private.info, | ||
666 | }, | ||
667 | .num_resources = ARRAY_SIZE(usbhs0_resources), | ||
668 | .resource = usbhs0_resources, | ||
669 | }; | ||
670 | |||
671 | /* USBHS1 is connected to CN31 which takes a USB Mini-AB plug | ||
672 | * | ||
673 | * Use J30 to select between Host and Function. This setting | ||
674 | * can however not be detected by software. Hotplug of USBHS1 | ||
675 | * is provided via IRQ8. | ||
676 | */ | ||
677 | #define IRQ8 evt2irq(0x0300) | ||
678 | |||
679 | /* USBHS1 USB Host support via r8a66597_hcd */ | ||
566 | static void usb1_host_port_power(int port, int power) | 680 | static void usb1_host_port_power(int port, int power) |
567 | { | 681 | { |
568 | if (!power) /* only power-on is supported for now */ | 682 | if (!power) /* only power-on is supported for now */ |
@@ -579,9 +693,9 @@ static struct r8a66597_platdata usb1_host_data = { | |||
579 | 693 | ||
580 | static struct resource usb1_host_resources[] = { | 694 | static struct resource usb1_host_resources[] = { |
581 | [0] = { | 695 | [0] = { |
582 | .name = "USBHS", | 696 | .name = "USBHS1", |
583 | .start = 0xE68B0000, | 697 | .start = 0xe68b0000, |
584 | .end = 0xE68B00E6 - 1, | 698 | .end = 0xe68b00e6 - 1, |
585 | .flags = IORESOURCE_MEM, | 699 | .flags = IORESOURCE_MEM, |
586 | }, | 700 | }, |
587 | [1] = { | 701 | [1] = { |
@@ -602,37 +716,14 @@ static struct platform_device usb1_host_device = { | |||
602 | .resource = usb1_host_resources, | 716 | .resource = usb1_host_resources, |
603 | }; | 717 | }; |
604 | 718 | ||
605 | /* USB1 (Function) */ | 719 | /* USBHS1 USB Function support via renesas_usbhs */ |
720 | |||
606 | #define USB_PHY_MODE (1 << 4) | 721 | #define USB_PHY_MODE (1 << 4) |
607 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) | 722 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) |
608 | #define USB_PHY_ON (1 << 1) | 723 | #define USB_PHY_ON (1 << 1) |
609 | #define USB_PHY_OFF (1 << 0) | 724 | #define USB_PHY_OFF (1 << 0) |
610 | #define USB_PHY_INT_CLR (USB_PHY_ON | USB_PHY_OFF) | 725 | #define USB_PHY_INT_CLR (USB_PHY_ON | USB_PHY_OFF) |
611 | 726 | ||
612 | struct usbhs_private { | ||
613 | unsigned int irq; | ||
614 | unsigned int usbphyaddr; | ||
615 | unsigned int usbcrcaddr; | ||
616 | struct renesas_usbhs_platform_info info; | ||
617 | }; | ||
618 | |||
619 | #define usbhs_get_priv(pdev) \ | ||
620 | container_of(renesas_usbhs_get_info(pdev), \ | ||
621 | struct usbhs_private, info) | ||
622 | |||
623 | #define usbhs_is_connected(priv) \ | ||
624 | (!((1 << 7) & __raw_readw(priv->usbcrcaddr))) | ||
625 | |||
626 | static int usbhs1_get_id(struct platform_device *pdev) | ||
627 | { | ||
628 | return USBHS_GADGET; | ||
629 | } | ||
630 | |||
631 | static int usbhs1_get_vbus(struct platform_device *pdev) | ||
632 | { | ||
633 | return usbhs_is_connected(usbhs_get_priv(pdev)); | ||
634 | } | ||
635 | |||
636 | static irqreturn_t usbhs1_interrupt(int irq, void *data) | 727 | static irqreturn_t usbhs1_interrupt(int irq, void *data) |
637 | { | 728 | { |
638 | struct platform_device *pdev = data; | 729 | struct platform_device *pdev = data; |
@@ -654,12 +745,10 @@ static int usbhs1_hardware_init(struct platform_device *pdev) | |||
654 | struct usbhs_private *priv = usbhs_get_priv(pdev); | 745 | struct usbhs_private *priv = usbhs_get_priv(pdev); |
655 | int ret; | 746 | int ret; |
656 | 747 | ||
657 | irq_set_irq_type(priv->irq, IRQ_TYPE_LEVEL_HIGH); | ||
658 | |||
659 | /* clear interrupt status */ | 748 | /* clear interrupt status */ |
660 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); | 749 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); |
661 | 750 | ||
662 | ret = request_irq(priv->irq, usbhs1_interrupt, 0, | 751 | ret = request_irq(IRQ8, usbhs1_interrupt, IRQF_TRIGGER_HIGH, |
663 | dev_name(&pdev->dev), pdev); | 752 | dev_name(&pdev->dev), pdev); |
664 | if (ret) { | 753 | if (ret) { |
665 | dev_err(&pdev->dev, "request_irq err\n"); | 754 | dev_err(&pdev->dev, "request_irq err\n"); |
@@ -679,15 +768,12 @@ static void usbhs1_hardware_exit(struct platform_device *pdev) | |||
679 | /* clear interrupt status */ | 768 | /* clear interrupt status */ |
680 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); | 769 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); |
681 | 770 | ||
682 | free_irq(priv->irq, pdev); | 771 | free_irq(IRQ8, pdev); |
683 | } | 772 | } |
684 | 773 | ||
685 | static void usbhs1_phy_reset(struct platform_device *pdev) | 774 | static int usbhs1_get_id(struct platform_device *pdev) |
686 | { | 775 | { |
687 | struct usbhs_private *priv = usbhs_get_priv(pdev); | 776 | return USBHS_GADGET; |
688 | |||
689 | /* init phy */ | ||
690 | __raw_writew(0x8a0a, priv->usbcrcaddr); | ||
691 | } | 777 | } |
692 | 778 | ||
693 | static u32 usbhs1_pipe_cfg[] = { | 779 | static u32 usbhs1_pipe_cfg[] = { |
@@ -710,16 +796,15 @@ static u32 usbhs1_pipe_cfg[] = { | |||
710 | }; | 796 | }; |
711 | 797 | ||
712 | static struct usbhs_private usbhs1_private = { | 798 | static struct usbhs_private usbhs1_private = { |
713 | .irq = evt2irq(0x0300), /* IRQ8 */ | 799 | .usbphyaddr = 0xe60581e2, /* USBPHY1INTAP */ |
714 | .usbphyaddr = 0xE60581E2, /* USBPHY1INTAP */ | 800 | .usbcrcaddr = 0xe6058130, /* USBCR4 */ |
715 | .usbcrcaddr = 0xE6058130, /* USBCR4 */ | ||
716 | .info = { | 801 | .info = { |
717 | .platform_callback = { | 802 | .platform_callback = { |
718 | .hardware_init = usbhs1_hardware_init, | 803 | .hardware_init = usbhs1_hardware_init, |
719 | .hardware_exit = usbhs1_hardware_exit, | 804 | .hardware_exit = usbhs1_hardware_exit, |
720 | .phy_reset = usbhs1_phy_reset, | ||
721 | .get_id = usbhs1_get_id, | 805 | .get_id = usbhs1_get_id, |
722 | .get_vbus = usbhs1_get_vbus, | 806 | .phy_reset = usbhs_phy_reset, |
807 | .get_vbus = usbhs_get_vbus, | ||
723 | }, | 808 | }, |
724 | .driver_param = { | 809 | .driver_param = { |
725 | .buswait_bwait = 4, | 810 | .buswait_bwait = 4, |
@@ -731,9 +816,9 @@ static struct usbhs_private usbhs1_private = { | |||
731 | 816 | ||
732 | static struct resource usbhs1_resources[] = { | 817 | static struct resource usbhs1_resources[] = { |
733 | [0] = { | 818 | [0] = { |
734 | .name = "USBHS", | 819 | .name = "USBHS1", |
735 | .start = 0xE68B0000, | 820 | .start = 0xe68b0000, |
736 | .end = 0xE68B00E6 - 1, | 821 | .end = 0xe68b00e6 - 1, |
737 | .flags = IORESOURCE_MEM, | 822 | .flags = IORESOURCE_MEM, |
738 | }, | 823 | }, |
739 | [1] = { | 824 | [1] = { |
@@ -752,7 +837,6 @@ static struct platform_device usbhs1_device = { | |||
752 | .resource = usbhs1_resources, | 837 | .resource = usbhs1_resources, |
753 | }; | 838 | }; |
754 | 839 | ||
755 | |||
756 | /* LED */ | 840 | /* LED */ |
757 | static struct gpio_led mackerel_leds[] = { | 841 | static struct gpio_led mackerel_leds[] = { |
758 | { | 842 | { |
@@ -1203,6 +1287,7 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
1203 | &nor_flash_device, | 1287 | &nor_flash_device, |
1204 | &smc911x_device, | 1288 | &smc911x_device, |
1205 | &lcdc_device, | 1289 | &lcdc_device, |
1290 | &usbhs0_device, | ||
1206 | &usb1_host_device, | 1291 | &usb1_host_device, |
1207 | &usbhs1_device, | 1292 | &usbhs1_device, |
1208 | &leds_device, | 1293 | &leds_device, |
@@ -1301,6 +1386,7 @@ static void __init mackerel_map_io(void) | |||
1301 | 1386 | ||
1302 | #define GPIO_PORT9CR 0xE6051009 | 1387 | #define GPIO_PORT9CR 0xE6051009 |
1303 | #define GPIO_PORT10CR 0xE605100A | 1388 | #define GPIO_PORT10CR 0xE605100A |
1389 | #define GPIO_PORT167CR 0xE60520A7 | ||
1304 | #define GPIO_PORT168CR 0xE60520A8 | 1390 | #define GPIO_PORT168CR 0xE60520A8 |
1305 | #define SRCR4 0xe61580bc | 1391 | #define SRCR4 0xe61580bc |
1306 | #define USCCR1 0xE6058144 | 1392 | #define USCCR1 0xE6058144 |
@@ -1354,17 +1440,17 @@ static void __init mackerel_init(void) | |||
1354 | gpio_request(GPIO_PORT151, NULL); /* LCDDON */ | 1440 | gpio_request(GPIO_PORT151, NULL); /* LCDDON */ |
1355 | gpio_direction_output(GPIO_PORT151, 1); | 1441 | gpio_direction_output(GPIO_PORT151, 1); |
1356 | 1442 | ||
1357 | /* USB enable */ | 1443 | /* USBHS0 */ |
1358 | gpio_request(GPIO_FN_VBUS0_1, NULL); | 1444 | gpio_request(GPIO_FN_VBUS0_0, NULL); |
1359 | gpio_request(GPIO_FN_IDIN_1_18, NULL); | 1445 | gpio_pull_down(GPIO_PORT168CR); /* VBUS0_0 pull down */ |
1360 | gpio_request(GPIO_FN_PWEN_1_115, NULL); | 1446 | |
1361 | gpio_request(GPIO_FN_OVCN_1_114, NULL); | 1447 | /* USBHS1 */ |
1362 | gpio_request(GPIO_FN_EXTLP_1, NULL); | 1448 | gpio_request(GPIO_FN_VBUS0_1, NULL); |
1363 | gpio_request(GPIO_FN_OVCN2_1, NULL); | 1449 | gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ |
1364 | gpio_pull_down(GPIO_PORT168CR); | 1450 | gpio_request(GPIO_FN_IDIN_1_113, NULL); |
1365 | 1451 | ||
1366 | /* setup USB phy */ | 1452 | /* USB phy tweak to make the r8a66597_hcd host driver work */ |
1367 | __raw_writew(0x8a0a, 0xE6058130); /* USBCR4 */ | 1453 | __raw_writew(0x8a0a, 0xe6058130); /* USBCR4 */ |
1368 | 1454 | ||
1369 | /* enable FSI2 port A (ak4643) */ | 1455 | /* enable FSI2 port A (ak4643) */ |
1370 | gpio_request(GPIO_FN_FSIAIBT, NULL); | 1456 | gpio_request(GPIO_FN_FSIAIBT, NULL); |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index 5d0e1503ece6..a911a60e7719 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(int irq, void *dev_id) | |||
250 | return IRQ_HANDLED; | 250 | return IRQ_HANDLED; |
251 | } | 251 | } |
252 | 252 | ||
253 | static int sh73a0_set_wake(struct irq_data *data, unsigned int on) | ||
254 | { | ||
255 | return 0; /* always allow wakeup */ | ||
256 | } | ||
257 | |||
253 | void __init sh73a0_init_irq(void) | 258 | void __init sh73a0_init_irq(void) |
254 | { | 259 | { |
255 | void __iomem *gic_dist_base = __io(0xf0001000); | 260 | void __iomem *gic_dist_base = __io(0xf0001000); |
@@ -257,6 +262,7 @@ void __init sh73a0_init_irq(void) | |||
257 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | 262 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); |
258 | 263 | ||
259 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | 264 | gic_init(0, 29, gic_dist_base, gic_cpu_base); |
265 | gic_arch_extn.irq_set_wake = sh73a0_set_wake; | ||
260 | 266 | ||
261 | register_intc_controller(&intcs_desc); | 267 | register_intc_controller(&intcs_desc); |
262 | 268 | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c index 2c10190dbb55..e546017f15de 100644 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ b/arch/arm/mach-shmobile/setup-sh7367.c | |||
@@ -38,7 +38,7 @@ static struct plat_sci_port scif0_platform_data = { | |||
38 | .flags = UPF_BOOT_AUTOCONF, | 38 | .flags = UPF_BOOT_AUTOCONF, |
39 | .scscr = SCSCR_RE | SCSCR_TE, | 39 | .scscr = SCSCR_RE | SCSCR_TE, |
40 | .scbrr_algo_id = SCBRR_ALGO_4, | 40 | .scbrr_algo_id = SCBRR_ALGO_4, |
41 | .type = PORT_SCIF, | 41 | .type = PORT_SCIFA, |
42 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | 42 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), |
43 | evt2irq(0xc00), evt2irq(0xc00) }, | 43 | evt2irq(0xc00), evt2irq(0xc00) }, |
44 | }; | 44 | }; |
@@ -57,7 +57,7 @@ static struct plat_sci_port scif1_platform_data = { | |||
57 | .flags = UPF_BOOT_AUTOCONF, | 57 | .flags = UPF_BOOT_AUTOCONF, |
58 | .scscr = SCSCR_RE | SCSCR_TE, | 58 | .scscr = SCSCR_RE | SCSCR_TE, |
59 | .scbrr_algo_id = SCBRR_ALGO_4, | 59 | .scbrr_algo_id = SCBRR_ALGO_4, |
60 | .type = PORT_SCIF, | 60 | .type = PORT_SCIFA, |
61 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | 61 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), |
62 | evt2irq(0xc20), evt2irq(0xc20) }, | 62 | evt2irq(0xc20), evt2irq(0xc20) }, |
63 | }; | 63 | }; |
@@ -76,7 +76,7 @@ static struct plat_sci_port scif2_platform_data = { | |||
76 | .flags = UPF_BOOT_AUTOCONF, | 76 | .flags = UPF_BOOT_AUTOCONF, |
77 | .scscr = SCSCR_RE | SCSCR_TE, | 77 | .scscr = SCSCR_RE | SCSCR_TE, |
78 | .scbrr_algo_id = SCBRR_ALGO_4, | 78 | .scbrr_algo_id = SCBRR_ALGO_4, |
79 | .type = PORT_SCIF, | 79 | .type = PORT_SCIFA, |
80 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | 80 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), |
81 | evt2irq(0xc40), evt2irq(0xc40) }, | 81 | evt2irq(0xc40), evt2irq(0xc40) }, |
82 | }; | 82 | }; |
@@ -95,7 +95,7 @@ static struct plat_sci_port scif3_platform_data = { | |||
95 | .flags = UPF_BOOT_AUTOCONF, | 95 | .flags = UPF_BOOT_AUTOCONF, |
96 | .scscr = SCSCR_RE | SCSCR_TE, | 96 | .scscr = SCSCR_RE | SCSCR_TE, |
97 | .scbrr_algo_id = SCBRR_ALGO_4, | 97 | .scbrr_algo_id = SCBRR_ALGO_4, |
98 | .type = PORT_SCIF, | 98 | .type = PORT_SCIFA, |
99 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | 99 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), |
100 | evt2irq(0xc60), evt2irq(0xc60) }, | 100 | evt2irq(0xc60), evt2irq(0xc60) }, |
101 | }; | 101 | }; |
@@ -114,7 +114,7 @@ static struct plat_sci_port scif4_platform_data = { | |||
114 | .flags = UPF_BOOT_AUTOCONF, | 114 | .flags = UPF_BOOT_AUTOCONF, |
115 | .scscr = SCSCR_RE | SCSCR_TE, | 115 | .scscr = SCSCR_RE | SCSCR_TE, |
116 | .scbrr_algo_id = SCBRR_ALGO_4, | 116 | .scbrr_algo_id = SCBRR_ALGO_4, |
117 | .type = PORT_SCIF, | 117 | .type = PORT_SCIFA, |
118 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | 118 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), |
119 | evt2irq(0xd20), evt2irq(0xd20) }, | 119 | evt2irq(0xd20), evt2irq(0xd20) }, |
120 | }; | 120 | }; |
@@ -133,7 +133,7 @@ static struct plat_sci_port scif5_platform_data = { | |||
133 | .flags = UPF_BOOT_AUTOCONF, | 133 | .flags = UPF_BOOT_AUTOCONF, |
134 | .scscr = SCSCR_RE | SCSCR_TE, | 134 | .scscr = SCSCR_RE | SCSCR_TE, |
135 | .scbrr_algo_id = SCBRR_ALGO_4, | 135 | .scbrr_algo_id = SCBRR_ALGO_4, |
136 | .type = PORT_SCIF, | 136 | .type = PORT_SCIFA, |
137 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | 137 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), |
138 | evt2irq(0xd40), evt2irq(0xd40) }, | 138 | evt2irq(0xd40), evt2irq(0xd40) }, |
139 | }; | 139 | }; |
@@ -152,7 +152,7 @@ static struct plat_sci_port scif6_platform_data = { | |||
152 | .flags = UPF_BOOT_AUTOCONF, | 152 | .flags = UPF_BOOT_AUTOCONF, |
153 | .scscr = SCSCR_RE | SCSCR_TE, | 153 | .scscr = SCSCR_RE | SCSCR_TE, |
154 | .scbrr_algo_id = SCBRR_ALGO_4, | 154 | .scbrr_algo_id = SCBRR_ALGO_4, |
155 | .type = PORT_SCIF, | 155 | .type = PORT_SCIFB, |
156 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | 156 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), |
157 | evt2irq(0xd60), evt2irq(0xd60) }, | 157 | evt2irq(0xd60), evt2irq(0xd60) }, |
158 | }; | 158 | }; |
diff --git a/arch/arm/mach-u300/clock.h b/arch/arm/mach-u300/clock.h index c34f3ea3017c..4f50ca8f901e 100644 --- a/arch/arm/mach-u300/clock.h +++ b/arch/arm/mach-u300/clock.h | |||
@@ -31,7 +31,7 @@ struct clk { | |||
31 | bool reset; | 31 | bool reset; |
32 | __u16 clk_val; | 32 | __u16 clk_val; |
33 | __s8 usecount; | 33 | __s8 usecount; |
34 | __u32 res_reg; | 34 | void __iomem * res_reg; |
35 | __u16 res_mask; | 35 | __u16 res_mask; |
36 | 36 | ||
37 | bool hw_ctrld; | 37 | bool hw_ctrld; |
diff --git a/arch/arm/mach-u300/include/mach/u300-regs.h b/arch/arm/mach-u300/include/mach/u300-regs.h index 8b85df4c8d8f..035fdc9dbdb0 100644 --- a/arch/arm/mach-u300/include/mach/u300-regs.h +++ b/arch/arm/mach-u300/include/mach/u300-regs.h | |||
@@ -18,6 +18,12 @@ | |||
18 | * the defines are used for setting up the I/O memory mapping. | 18 | * the defines are used for setting up the I/O memory mapping. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifdef __ASSEMBLER__ | ||
22 | #define IOMEM(a) (a) | ||
23 | #else | ||
24 | #define IOMEM(a) (void __iomem *) a | ||
25 | #endif | ||
26 | |||
21 | /* NAND Flash CS0 */ | 27 | /* NAND Flash CS0 */ |
22 | #define U300_NAND_CS0_PHYS_BASE 0x80000000 | 28 | #define U300_NAND_CS0_PHYS_BASE 0x80000000 |
23 | 29 | ||
@@ -48,13 +54,6 @@ | |||
48 | #endif | 54 | #endif |
49 | 55 | ||
50 | /* | 56 | /* |
51 | * All the following peripherals are specified at their PHYSICAL address, | ||
52 | * so if you need to access them (in the kernel), you MUST use the macros | ||
53 | * defined in <asm/io.h> to map to the IO_ADDRESS_AHB() IO_ADDRESS_FAST() | ||
54 | * etc. | ||
55 | */ | ||
56 | |||
57 | /* | ||
58 | * AHB peripherals | 57 | * AHB peripherals |
59 | */ | 58 | */ |
60 | 59 | ||
@@ -63,11 +62,11 @@ | |||
63 | 62 | ||
64 | /* Vectored Interrupt Controller 0, servicing 32 interrupts */ | 63 | /* Vectored Interrupt Controller 0, servicing 32 interrupts */ |
65 | #define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000) | 64 | #define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000) |
66 | #define U300_INTCON0_VBASE (U300_AHB_PER_VIRT_BASE+0x1000) | 65 | #define U300_INTCON0_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x1000) |
67 | 66 | ||
68 | /* Vectored Interrupt Controller 1, servicing 32 interrupts */ | 67 | /* Vectored Interrupt Controller 1, servicing 32 interrupts */ |
69 | #define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000) | 68 | #define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000) |
70 | #define U300_INTCON1_VBASE (U300_AHB_PER_VIRT_BASE+0x2000) | 69 | #define U300_INTCON1_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x2000) |
71 | 70 | ||
72 | /* Memory Stick Pro (MSPRO) controller */ | 71 | /* Memory Stick Pro (MSPRO) controller */ |
73 | #define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000) | 72 | #define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000) |
@@ -115,7 +114,7 @@ | |||
115 | 114 | ||
116 | /* SYSCON */ | 115 | /* SYSCON */ |
117 | #define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000) | 116 | #define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000) |
118 | #define U300_SYSCON_VBASE (U300_SLOW_PER_VIRT_BASE+0x1000) | 117 | #define U300_SYSCON_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x1000) |
119 | 118 | ||
120 | /* Watchdog */ | 119 | /* Watchdog */ |
121 | #define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000) | 120 | #define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000) |
@@ -125,7 +124,7 @@ | |||
125 | 124 | ||
126 | /* APP side special timer */ | 125 | /* APP side special timer */ |
127 | #define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000) | 126 | #define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000) |
128 | #define U300_TIMER_APP_VBASE (U300_SLOW_PER_VIRT_BASE+0x4000) | 127 | #define U300_TIMER_APP_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x4000) |
129 | 128 | ||
130 | /* Keypad */ | 129 | /* Keypad */ |
131 | #define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000) | 130 | #define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000) |
@@ -181,5 +180,4 @@ | |||
181 | * Virtual accessor macros for static devices | 180 | * Virtual accessor macros for static devices |
182 | */ | 181 | */ |
183 | 182 | ||
184 | |||
185 | #endif | 183 | #endif |
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 891cf44591e0..18d7fa0603c2 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -411,8 +411,7 @@ static void __init u300_timer_init(void) | |||
411 | /* Use general purpose timer 2 as clock source */ | 411 | /* Use general purpose timer 2 as clock source */ |
412 | if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC, | 412 | if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC, |
413 | "GPT2", rate, 300, 32, clocksource_mmio_readl_up)) | 413 | "GPT2", rate, 300, 32, clocksource_mmio_readl_up)) |
414 | printk(KERN_ERR "timer: failed to initialize clock " | 414 | pr_err("timer: failed to initialize U300 clock source\n"); |
415 | "source %s\n", clocksource_u300_1mhz.name); | ||
416 | 415 | ||
417 | clockevents_calc_mult_shift(&clockevent_u300_1mhz, | 416 | clockevents_calc_mult_shift(&clockevent_u300_1mhz, |
418 | rate, APPTIMER_MIN_RANGE); | 417 | rate, APPTIMER_MIN_RANGE); |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 285edcd2da2a..9e6b93b1a043 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -46,12 +46,6 @@ static struct map_desc v2m_io_desc[] __initdata = { | |||
46 | }, | 46 | }, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static void __init v2m_init_early(void) | ||
50 | { | ||
51 | ct_desc->init_early(); | ||
52 | versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000); | ||
53 | } | ||
54 | |||
55 | static void __init v2m_timer_init(void) | 49 | static void __init v2m_timer_init(void) |
56 | { | 50 | { |
57 | u32 scctrl; | 51 | u32 scctrl; |
@@ -365,6 +359,13 @@ static struct clk_lookup v2m_lookups[] = { | |||
365 | }, | 359 | }, |
366 | }; | 360 | }; |
367 | 361 | ||
362 | static void __init v2m_init_early(void) | ||
363 | { | ||
364 | ct_desc->init_early(); | ||
365 | clkdev_add_table(v2m_lookups, ARRAY_SIZE(v2m_lookups)); | ||
366 | versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000); | ||
367 | } | ||
368 | |||
368 | static void v2m_power_off(void) | 369 | static void v2m_power_off(void) |
369 | { | 370 | { |
370 | if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE_MB, 0)) | 371 | if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE_MB, 0)) |
@@ -418,8 +419,6 @@ static void __init v2m_init(void) | |||
418 | { | 419 | { |
419 | int i; | 420 | int i; |
420 | 421 | ||
421 | clkdev_add_table(v2m_lookups, ARRAY_SIZE(v2m_lookups)); | ||
422 | |||
423 | platform_device_register(&v2m_pcie_i2c_device); | 422 | platform_device_register(&v2m_pcie_i2c_device); |
424 | platform_device_register(&v2m_ddc_i2c_device); | 423 | platform_device_register(&v2m_ddc_i2c_device); |
425 | platform_device_register(&v2m_flash_device); | 424 | platform_device_register(&v2m_flash_device); |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 8bfae964b133..b0ee9ba3cfab 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -24,7 +24,9 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm); | |||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * We fork()ed a process, and we need a new context for the child | 26 | * We fork()ed a process, and we need a new context for the child |
27 | * to run in. | 27 | * to run in. We reserve version 0 for initial tasks so we will |
28 | * always allocate an ASID. The ASID 0 is reserved for the TTBR | ||
29 | * register changing sequence. | ||
28 | */ | 30 | */ |
29 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
30 | { | 32 | { |
@@ -34,11 +36,8 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
34 | 36 | ||
35 | static void flush_context(void) | 37 | static void flush_context(void) |
36 | { | 38 | { |
37 | u32 ttb; | 39 | /* set the reserved ASID before flushing the TLB */ |
38 | /* Copy TTBR1 into TTBR0 */ | 40 | asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0)); |
39 | asm volatile("mrc p15, 0, %0, c2, c0, 1\n" | ||
40 | "mcr p15, 0, %0, c2, c0, 0" | ||
41 | : "=r" (ttb)); | ||
42 | isb(); | 41 | isb(); |
43 | local_flush_tlb_all(); | 42 | local_flush_tlb_all(); |
44 | if (icache_is_vivt_asid_tagged()) { | 43 | if (icache_is_vivt_asid_tagged()) { |
@@ -94,7 +93,7 @@ static void reset_context(void *info) | |||
94 | return; | 93 | return; |
95 | 94 | ||
96 | smp_rmb(); | 95 | smp_rmb(); |
97 | asid = cpu_last_asid + cpu; | 96 | asid = cpu_last_asid + cpu + 1; |
98 | 97 | ||
99 | flush_context(); | 98 | flush_context(); |
100 | set_mm_context(mm, asid); | 99 | set_mm_context(mm, asid); |
@@ -144,13 +143,13 @@ void __new_context(struct mm_struct *mm) | |||
144 | * to start a new version and flush the TLB. | 143 | * to start a new version and flush the TLB. |
145 | */ | 144 | */ |
146 | if (unlikely((asid & ~ASID_MASK) == 0)) { | 145 | if (unlikely((asid & ~ASID_MASK) == 0)) { |
147 | asid = cpu_last_asid + smp_processor_id(); | 146 | asid = cpu_last_asid + smp_processor_id() + 1; |
148 | flush_context(); | 147 | flush_context(); |
149 | #ifdef CONFIG_SMP | 148 | #ifdef CONFIG_SMP |
150 | smp_wmb(); | 149 | smp_wmb(); |
151 | smp_call_function(reset_context, NULL, 1); | 150 | smp_call_function(reset_context, NULL, 1); |
152 | #endif | 151 | #endif |
153 | cpu_last_asid += NR_CPUS - 1; | 152 | cpu_last_asid += NR_CPUS; |
154 | } | 153 | } |
155 | 154 | ||
156 | set_mm_context(mm, asid); | 155 | set_mm_context(mm, asid); |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 2c2cce9cd8c8..c19571c40a21 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -331,6 +331,12 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | |||
331 | #endif | 331 | #endif |
332 | #ifdef CONFIG_BLK_DEV_INITRD | 332 | #ifdef CONFIG_BLK_DEV_INITRD |
333 | if (phys_initrd_size && | 333 | if (phys_initrd_size && |
334 | !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { | ||
335 | pr_err("INITRD: 0x%08lx+0x%08lx is not a memory region - disabling initrd\n", | ||
336 | phys_initrd_start, phys_initrd_size); | ||
337 | phys_initrd_start = phys_initrd_size = 0; | ||
338 | } | ||
339 | if (phys_initrd_size && | ||
334 | memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) { | 340 | memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) { |
335 | pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n", | 341 | pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n", |
336 | phys_initrd_start, phys_initrd_size); | 342 | phys_initrd_start, phys_initrd_size); |
@@ -635,7 +641,8 @@ void __init mem_init(void) | |||
635 | " modules : 0x%08lx - 0x%08lx (%4ld MB)\n" | 641 | " modules : 0x%08lx - 0x%08lx (%4ld MB)\n" |
636 | " .init : 0x%p" " - 0x%p" " (%4d kB)\n" | 642 | " .init : 0x%p" " - 0x%p" " (%4d kB)\n" |
637 | " .text : 0x%p" " - 0x%p" " (%4d kB)\n" | 643 | " .text : 0x%p" " - 0x%p" " (%4d kB)\n" |
638 | " .data : 0x%p" " - 0x%p" " (%4d kB)\n", | 644 | " .data : 0x%p" " - 0x%p" " (%4d kB)\n" |
645 | " .bss : 0x%p" " - 0x%p" " (%4d kB)\n", | ||
639 | 646 | ||
640 | MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + | 647 | MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + |
641 | (PAGE_SIZE)), | 648 | (PAGE_SIZE)), |
@@ -657,7 +664,8 @@ void __init mem_init(void) | |||
657 | 664 | ||
658 | MLK_ROUNDUP(__init_begin, __init_end), | 665 | MLK_ROUNDUP(__init_begin, __init_end), |
659 | MLK_ROUNDUP(_text, _etext), | 666 | MLK_ROUNDUP(_text, _etext), |
660 | MLK_ROUNDUP(_sdata, _edata)); | 667 | MLK_ROUNDUP(_sdata, _edata), |
668 | MLK_ROUNDUP(__bss_start, __bss_stop)); | ||
661 | 669 | ||
662 | #undef MLK | 670 | #undef MLK |
663 | #undef MLM | 671 | #undef MLM |
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S index e4c165ca6696..537ffcb0646d 100644 --- a/arch/arm/mm/proc-arm7tdmi.S +++ b/arch/arm/mm/proc-arm7tdmi.S | |||
@@ -146,7 +146,7 @@ __arm7tdmi_proc_info: | |||
146 | .long 0 | 146 | .long 0 |
147 | .long 0 | 147 | .long 0 |
148 | .long v4_cache_fns | 148 | .long v4_cache_fns |
149 | .size __arm7tdmi_proc_info, . - __arm7dmi_proc_info | 149 | .size __arm7tdmi_proc_info, . - __arm7tdmi_proc_info |
150 | 150 | ||
151 | .type __triscenda7_proc_info, #object | 151 | .type __triscenda7_proc_info, #object |
152 | __triscenda7_proc_info: | 152 | __triscenda7_proc_info: |
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S index 7b7ebd4d096d..546b54da1005 100644 --- a/arch/arm/mm/proc-arm9tdmi.S +++ b/arch/arm/mm/proc-arm9tdmi.S | |||
@@ -116,7 +116,7 @@ __arm9tdmi_proc_info: | |||
116 | .long 0 | 116 | .long 0 |
117 | .long 0 | 117 | .long 0 |
118 | .long v4_cache_fns | 118 | .long v4_cache_fns |
119 | .size __arm9tdmi_proc_info, . - __arm9dmi_proc_info | 119 | .size __arm9tdmi_proc_info, . - __arm9tdmi_proc_info |
120 | 120 | ||
121 | .type __p2001_proc_info, #object | 121 | .type __p2001_proc_info, #object |
122 | __p2001_proc_info: | 122 | __p2001_proc_info: |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index b3b566ec83d3..3c3867850a30 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -108,16 +108,18 @@ ENTRY(cpu_v7_switch_mm) | |||
108 | #ifdef CONFIG_ARM_ERRATA_430973 | 108 | #ifdef CONFIG_ARM_ERRATA_430973 |
109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
110 | #endif | 110 | #endif |
111 | mrc p15, 0, r2, c2, c0, 1 @ load TTB 1 | 111 | #ifdef CONFIG_ARM_ERRATA_754322 |
112 | mcr p15, 0, r2, c2, c0, 0 @ into TTB 0 | 112 | dsb |
113 | #endif | ||
114 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
115 | isb | ||
116 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
113 | isb | 117 | isb |
114 | #ifdef CONFIG_ARM_ERRATA_754322 | 118 | #ifdef CONFIG_ARM_ERRATA_754322 |
115 | dsb | 119 | dsb |
116 | #endif | 120 | #endif |
117 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 121 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
118 | isb | 122 | isb |
119 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
120 | isb | ||
121 | #endif | 123 | #endif |
122 | mov pc, lr | 124 | mov pc, lr |
123 | ENDPROC(cpu_v7_switch_mm) | 125 | ENDPROC(cpu_v7_switch_mm) |
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c index 3538b85ede91..b130f60ca6b7 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-dma.c +++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c | |||
@@ -139,7 +139,7 @@ static struct sdma_script_start_addrs addr_imx35_to2 = { | |||
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | #ifdef CONFIG_SOC_IMX51 | 141 | #ifdef CONFIG_SOC_IMX51 |
142 | static struct sdma_script_start_addrs addr_imx51_to1 = { | 142 | static struct sdma_script_start_addrs addr_imx51 = { |
143 | .ap_2_ap_addr = 642, | 143 | .ap_2_ap_addr = 642, |
144 | .uart_2_mcu_addr = 817, | 144 | .uart_2_mcu_addr = 817, |
145 | .mcu_2_app_addr = 747, | 145 | .mcu_2_app_addr = 747, |
@@ -196,7 +196,9 @@ static int __init imxXX_add_imx_dma(void) | |||
196 | 196 | ||
197 | #if defined(CONFIG_SOC_IMX51) | 197 | #if defined(CONFIG_SOC_IMX51) |
198 | if (cpu_is_mx51()) { | 198 | if (cpu_is_mx51()) { |
199 | imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51_to1; | 199 | int to_version = mx51_revision() >> 4; |
200 | imx51_imx_sdma_data.pdata.to_version = to_version; | ||
201 | imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51; | ||
200 | ret = imx_add_imx_sdma(&imx51_imx_sdma_data); | 202 | ret = imx_add_imx_sdma(&imx51_imx_sdma_data); |
201 | } else | 203 | } else |
202 | #endif | 204 | #endif |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index a37b8eb65b76..49fc0df0c21f 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -84,6 +84,7 @@ | |||
84 | #include <linux/io.h> | 84 | #include <linux/io.h> |
85 | #include <linux/clk.h> | 85 | #include <linux/clk.h> |
86 | #include <linux/clkdev.h> | 86 | #include <linux/clkdev.h> |
87 | #include <linux/pm_runtime.h> | ||
87 | 88 | ||
88 | #include <plat/omap_device.h> | 89 | #include <plat/omap_device.h> |
89 | #include <plat/omap_hwmod.h> | 90 | #include <plat/omap_hwmod.h> |
@@ -539,20 +540,34 @@ int omap_early_device_register(struct omap_device *od) | |||
539 | static int _od_runtime_suspend(struct device *dev) | 540 | static int _od_runtime_suspend(struct device *dev) |
540 | { | 541 | { |
541 | struct platform_device *pdev = to_platform_device(dev); | 542 | struct platform_device *pdev = to_platform_device(dev); |
543 | int ret; | ||
544 | |||
545 | ret = pm_generic_runtime_suspend(dev); | ||
546 | |||
547 | if (!ret) | ||
548 | omap_device_idle(pdev); | ||
549 | |||
550 | return ret; | ||
551 | } | ||
542 | 552 | ||
543 | return omap_device_idle(pdev); | 553 | static int _od_runtime_idle(struct device *dev) |
554 | { | ||
555 | return pm_generic_runtime_idle(dev); | ||
544 | } | 556 | } |
545 | 557 | ||
546 | static int _od_runtime_resume(struct device *dev) | 558 | static int _od_runtime_resume(struct device *dev) |
547 | { | 559 | { |
548 | struct platform_device *pdev = to_platform_device(dev); | 560 | struct platform_device *pdev = to_platform_device(dev); |
549 | 561 | ||
550 | return omap_device_enable(pdev); | 562 | omap_device_enable(pdev); |
563 | |||
564 | return pm_generic_runtime_resume(dev); | ||
551 | } | 565 | } |
552 | 566 | ||
553 | static struct dev_power_domain omap_device_power_domain = { | 567 | static struct dev_power_domain omap_device_power_domain = { |
554 | .ops = { | 568 | .ops = { |
555 | .runtime_suspend = _od_runtime_suspend, | 569 | .runtime_suspend = _od_runtime_suspend, |
570 | .runtime_idle = _od_runtime_idle, | ||
556 | .runtime_resume = _od_runtime_resume, | 571 | .runtime_resume = _od_runtime_resume, |
557 | USE_PLATFORM_PM_SLEEP_OPS | 572 | USE_PLATFORM_PM_SLEEP_OPS |
558 | } | 573 | } |
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig index 6f9ca56de1f6..a06bfccc2840 100644 --- a/arch/avr32/configs/atngw100_defconfig +++ b/arch/avr32/configs/atngw100_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig b/arch/avr32/configs/atngw100_evklcd100_defconfig index 7eece0af34c9..d8f1fe80d210 100644 --- a/arch/avr32/configs/atngw100_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100_evklcd100_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig b/arch/avr32/configs/atngw100_evklcd101_defconfig index 387eb9d6e423..d4c5b19ec950 100644 --- a/arch/avr32/configs/atngw100_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100_evklcd101_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atngw100_mrmt_defconfig b/arch/avr32/configs/atngw100_mrmt_defconfig index 19f6ceeeff7b..77ca4f905d2c 100644 --- a/arch/avr32/configs/atngw100_mrmt_defconfig +++ b/arch/avr32/configs/atngw100_mrmt_defconfig | |||
@@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
10 | # CONFIG_SYSCTL_SYSCALL is not set | 11 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 12 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_SLUB_DEBUG is not set | 13 | # CONFIG_SLUB_DEBUG is not set |
@@ -109,7 +110,7 @@ CONFIG_LEDS_GPIO=y | |||
109 | CONFIG_LEDS_TRIGGERS=y | 110 | CONFIG_LEDS_TRIGGERS=y |
110 | CONFIG_LEDS_TRIGGER_TIMER=y | 111 | CONFIG_LEDS_TRIGGER_TIMER=y |
111 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 112 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
112 | CONFIG_RTC_CLASS=m | 113 | CONFIG_RTC_CLASS=y |
113 | CONFIG_RTC_DRV_S35390A=m | 114 | CONFIG_RTC_DRV_S35390A=m |
114 | CONFIG_RTC_DRV_AT32AP700X=m | 115 | CONFIG_RTC_DRV_AT32AP700X=m |
115 | CONFIG_DMADEVICES=y | 116 | CONFIG_DMADEVICES=y |
diff --git a/arch/avr32/configs/atngw100mkii_defconfig b/arch/avr32/configs/atngw100mkii_defconfig index f0fe237133a9..6e0dca4d3131 100644 --- a/arch/avr32/configs/atngw100mkii_defconfig +++ b/arch/avr32/configs/atngw100mkii_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig index e4a7c1dc8380..7f2a344a5fa8 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig index 6f37f70c2c37..085eeba88f67 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index 4fb01f5ab42f..d1a887e64055 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig index 9faaf9b900f2..956f2819ad45 100644 --- a/arch/avr32/configs/atstk1003_defconfig +++ b/arch/avr32/configs/atstk1003_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig index 3d2a5d85f970..40c69f38c61a 100644 --- a/arch/avr32/configs/atstk1004_defconfig +++ b/arch/avr32/configs/atstk1004_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig index 1ed8f22d4fe2..511eb8af356d 100644 --- a/arch/avr32/configs/atstk1006_defconfig +++ b/arch/avr32/configs/atstk1006_defconfig | |||
@@ -5,6 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
10 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig index aeadc955db32..19973b06170c 100644 --- a/arch/avr32/configs/favr-32_defconfig +++ b/arch/avr32/configs/favr-32_defconfig | |||
@@ -6,6 +6,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_RELAY=y | 7 | CONFIG_RELAY=y |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
9 | # CONFIG_SYSCTL_SYSCALL is not set | 10 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_BASE_FULL is not set | 11 | # CONFIG_BASE_FULL is not set |
11 | # CONFIG_COMPAT_BRK is not set | 12 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig index 1692beeb7ed3..6f45681196d1 100644 --- a/arch/avr32/configs/hammerhead_defconfig +++ b/arch/avr32/configs/hammerhead_defconfig | |||
@@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
10 | # CONFIG_SYSCTL_SYSCALL is not set | 11 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 12 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 13 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/configs/merisc_defconfig b/arch/avr32/configs/merisc_defconfig index 8b670a6530bf..3befab966827 100644 --- a/arch/avr32/configs/merisc_defconfig +++ b/arch/avr32/configs/merisc_defconfig | |||
@@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
10 | # CONFIG_SYSCTL_SYSCALL is not set | 11 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 12 | # CONFIG_BASE_FULL is not set |
12 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
diff --git a/arch/avr32/configs/mimc200_defconfig b/arch/avr32/configs/mimc200_defconfig index 5a51f2e7ffb9..1bee51f22154 100644 --- a/arch/avr32/configs/mimc200_defconfig +++ b/arch/avr32/configs/mimc200_defconfig | |||
@@ -7,6 +7,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
10 | # CONFIG_SYSCTL_SYSCALL is not set | 11 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 12 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 13 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/avr32/include/asm/processor.h b/arch/avr32/include/asm/processor.h index 49a88f5a9d2f..108502bc6770 100644 --- a/arch/avr32/include/asm/processor.h +++ b/arch/avr32/include/asm/processor.h | |||
@@ -131,7 +131,6 @@ struct thread_struct { | |||
131 | */ | 131 | */ |
132 | #define start_thread(regs, new_pc, new_sp) \ | 132 | #define start_thread(regs, new_pc, new_sp) \ |
133 | do { \ | 133 | do { \ |
134 | set_fs(USER_DS); \ | ||
135 | memset(regs, 0, sizeof(*regs)); \ | 134 | memset(regs, 0, sizeof(*regs)); \ |
136 | regs->sr = MODE_USER; \ | 135 | regs->sr = MODE_USER; \ |
137 | regs->pc = new_pc & ~1; \ | 136 | regs->pc = new_pc & ~1; \ |
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index aa677e2a3823..7fbf0dcb9afe 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1043,8 +1043,9 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) | |||
1043 | data->regs = (void __iomem *)pdev->resource[0].start; | 1043 | data->regs = (void __iomem *)pdev->resource[0].start; |
1044 | } | 1044 | } |
1045 | 1045 | ||
1046 | pdev->id = line; | ||
1046 | pdata = pdev->dev.platform_data; | 1047 | pdata = pdev->dev.platform_data; |
1047 | pdata->num = portnr; | 1048 | pdata->num = line; |
1048 | at32_usarts[line] = pdev; | 1049 | at32_usarts[line] = pdev; |
1049 | } | 1050 | } |
1050 | 1051 | ||
diff --git a/arch/avr32/mach-at32ap/include/mach/cpu.h b/arch/avr32/mach-at32ap/include/mach/cpu.h index 9c96a130f3a8..8181293115e4 100644 --- a/arch/avr32/mach-at32ap/include/mach/cpu.h +++ b/arch/avr32/mach-at32ap/include/mach/cpu.h | |||
@@ -31,8 +31,20 @@ | |||
31 | #define cpu_is_at91sam9263() (0) | 31 | #define cpu_is_at91sam9263() (0) |
32 | #define cpu_is_at91sam9rl() (0) | 32 | #define cpu_is_at91sam9rl() (0) |
33 | #define cpu_is_at91cap9() (0) | 33 | #define cpu_is_at91cap9() (0) |
34 | #define cpu_is_at91cap9_revB() (0) | ||
35 | #define cpu_is_at91cap9_revC() (0) | ||
34 | #define cpu_is_at91sam9g10() (0) | 36 | #define cpu_is_at91sam9g10() (0) |
37 | #define cpu_is_at91sam9g20() (0) | ||
35 | #define cpu_is_at91sam9g45() (0) | 38 | #define cpu_is_at91sam9g45() (0) |
36 | #define cpu_is_at91sam9g45es() (0) | 39 | #define cpu_is_at91sam9g45es() (0) |
40 | #define cpu_is_at91sam9m10() (0) | ||
41 | #define cpu_is_at91sam9g46() (0) | ||
42 | #define cpu_is_at91sam9m11() (0) | ||
43 | #define cpu_is_at91sam9x5() (0) | ||
44 | #define cpu_is_at91sam9g15() (0) | ||
45 | #define cpu_is_at91sam9g35() (0) | ||
46 | #define cpu_is_at91sam9x35() (0) | ||
47 | #define cpu_is_at91sam9g25() (0) | ||
48 | #define cpu_is_at91sam9x25() (0) | ||
37 | 49 | ||
38 | #endif /* __ASM_ARCH_CPU_H */ | 50 | #endif /* __ASM_ARCH_CPU_H */ |
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c index 3e3646186c9f..c9ac2f8e8f64 100644 --- a/arch/avr32/mach-at32ap/intc.c +++ b/arch/avr32/mach-at32ap/intc.c | |||
@@ -167,14 +167,12 @@ static int intc_suspend(void) | |||
167 | return 0; | 167 | return 0; |
168 | } | 168 | } |
169 | 169 | ||
170 | static int intc_resume(void) | 170 | static void intc_resume(void) |
171 | { | 171 | { |
172 | int i; | 172 | int i; |
173 | 173 | ||
174 | for (i = 0; i < 64; i++) | 174 | for (i = 0; i < 64; i++) |
175 | intc_writel(&intc0, INTPR0 + 4 * i, intc0.saved_ipr[i]); | 175 | intc_writel(&intc0, INTPR0 + 4 * i, intc0.saved_ipr[i]); |
176 | |||
177 | return 0; | ||
178 | } | 176 | } |
179 | #else | 177 | #else |
180 | #define intc_suspend NULL | 178 | #define intc_suspend NULL |
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig index 31d954216c05..9f1d08401fca 100644 --- a/arch/blackfin/configs/CM-BF548_defconfig +++ b/arch/blackfin/configs/CM-BF548_defconfig | |||
@@ -112,7 +112,7 @@ CONFIG_USB_G_SERIAL=m | |||
112 | CONFIG_USB_G_PRINTER=m | 112 | CONFIG_USB_G_PRINTER=m |
113 | CONFIG_MMC=m | 113 | CONFIG_MMC=m |
114 | CONFIG_SDH_BFIN=m | 114 | CONFIG_SDH_BFIN=m |
115 | CONFIG_RTC_CLASS=m | 115 | CONFIG_RTC_CLASS=y |
116 | CONFIG_RTC_DRV_BFIN=m | 116 | CONFIG_RTC_DRV_BFIN=m |
117 | CONFIG_EXT2_FS=m | 117 | CONFIG_EXT2_FS=m |
118 | # CONFIG_DNOTIFY is not set | 118 | # CONFIG_DNOTIFY is not set |
diff --git a/arch/m68k/Kconfig.nommu b/arch/m68k/Kconfig.nommu index fc98f9b9d4d2..b004dc1b1710 100644 --- a/arch/m68k/Kconfig.nommu +++ b/arch/m68k/Kconfig.nommu | |||
@@ -14,6 +14,33 @@ config GENERIC_CLOCKEVENTS | |||
14 | bool | 14 | bool |
15 | default n | 15 | default n |
16 | 16 | ||
17 | config M68000 | ||
18 | bool | ||
19 | help | ||
20 | The Freescale (was Motorola) 68000 CPU is the first generation of | ||
21 | the well known M68K family of processors. The CPU core as well as | ||
22 | being available as a stand alone CPU was also used in many | ||
23 | System-On-Chip devices (eg 68328, 68302, etc). It does not contain | ||
24 | a paging MMU. | ||
25 | |||
26 | config MCPU32 | ||
27 | bool | ||
28 | help | ||
29 | The Freescale (was then Motorola) CPU32 is a CPU core that is | ||
30 | based on the 68020 processor. For the most part it is used in | ||
31 | System-On-Chip parts, and does not contain a paging MMU. | ||
32 | |||
33 | config COLDFIRE | ||
34 | bool | ||
35 | select GENERIC_GPIO | ||
36 | select ARCH_REQUIRE_GPIOLIB | ||
37 | help | ||
38 | The Freescale ColdFire family of processors is a modern derivitive | ||
39 | of the 68000 processor family. They are mainly targeted at embedded | ||
40 | applications, and are all System-On-Chip (SOC) devices, as opposed | ||
41 | to stand alone CPUs. They implement a subset of the original 68000 | ||
42 | processor instruction set. | ||
43 | |||
17 | config COLDFIRE_SW_A7 | 44 | config COLDFIRE_SW_A7 |
18 | bool | 45 | bool |
19 | default n | 46 | default n |
@@ -36,26 +63,31 @@ choice | |||
36 | 63 | ||
37 | config M68328 | 64 | config M68328 |
38 | bool "MC68328" | 65 | bool "MC68328" |
66 | select M68000 | ||
39 | help | 67 | help |
40 | Motorola 68328 processor support. | 68 | Motorola 68328 processor support. |
41 | 69 | ||
42 | config M68EZ328 | 70 | config M68EZ328 |
43 | bool "MC68EZ328" | 71 | bool "MC68EZ328" |
72 | select M68000 | ||
44 | help | 73 | help |
45 | Motorola 68EX328 processor support. | 74 | Motorola 68EX328 processor support. |
46 | 75 | ||
47 | config M68VZ328 | 76 | config M68VZ328 |
48 | bool "MC68VZ328" | 77 | bool "MC68VZ328" |
78 | select M68000 | ||
49 | help | 79 | help |
50 | Motorola 68VZ328 processor support. | 80 | Motorola 68VZ328 processor support. |
51 | 81 | ||
52 | config M68360 | 82 | config M68360 |
53 | bool "MC68360" | 83 | bool "MC68360" |
84 | select MCPU32 | ||
54 | help | 85 | help |
55 | Motorola 68360 processor support. | 86 | Motorola 68360 processor support. |
56 | 87 | ||
57 | config M5206 | 88 | config M5206 |
58 | bool "MCF5206" | 89 | bool "MCF5206" |
90 | select COLDFIRE | ||
59 | select COLDFIRE_SW_A7 | 91 | select COLDFIRE_SW_A7 |
60 | select HAVE_MBAR | 92 | select HAVE_MBAR |
61 | help | 93 | help |
@@ -63,6 +95,7 @@ config M5206 | |||
63 | 95 | ||
64 | config M5206e | 96 | config M5206e |
65 | bool "MCF5206e" | 97 | bool "MCF5206e" |
98 | select COLDFIRE | ||
66 | select COLDFIRE_SW_A7 | 99 | select COLDFIRE_SW_A7 |
67 | select HAVE_MBAR | 100 | select HAVE_MBAR |
68 | help | 101 | help |
@@ -70,6 +103,7 @@ config M5206e | |||
70 | 103 | ||
71 | config M520x | 104 | config M520x |
72 | bool "MCF520x" | 105 | bool "MCF520x" |
106 | select COLDFIRE | ||
73 | select GENERIC_CLOCKEVENTS | 107 | select GENERIC_CLOCKEVENTS |
74 | select HAVE_CACHE_SPLIT | 108 | select HAVE_CACHE_SPLIT |
75 | help | 109 | help |
@@ -77,6 +111,7 @@ config M520x | |||
77 | 111 | ||
78 | config M523x | 112 | config M523x |
79 | bool "MCF523x" | 113 | bool "MCF523x" |
114 | select COLDFIRE | ||
80 | select GENERIC_CLOCKEVENTS | 115 | select GENERIC_CLOCKEVENTS |
81 | select HAVE_CACHE_SPLIT | 116 | select HAVE_CACHE_SPLIT |
82 | select HAVE_IPSBAR | 117 | select HAVE_IPSBAR |
@@ -85,6 +120,7 @@ config M523x | |||
85 | 120 | ||
86 | config M5249 | 121 | config M5249 |
87 | bool "MCF5249" | 122 | bool "MCF5249" |
123 | select COLDFIRE | ||
88 | select COLDFIRE_SW_A7 | 124 | select COLDFIRE_SW_A7 |
89 | select HAVE_MBAR | 125 | select HAVE_MBAR |
90 | help | 126 | help |
@@ -92,6 +128,7 @@ config M5249 | |||
92 | 128 | ||
93 | config M5271 | 129 | config M5271 |
94 | bool "MCF5271" | 130 | bool "MCF5271" |
131 | select COLDFIRE | ||
95 | select HAVE_CACHE_SPLIT | 132 | select HAVE_CACHE_SPLIT |
96 | select HAVE_IPSBAR | 133 | select HAVE_IPSBAR |
97 | help | 134 | help |
@@ -99,6 +136,7 @@ config M5271 | |||
99 | 136 | ||
100 | config M5272 | 137 | config M5272 |
101 | bool "MCF5272" | 138 | bool "MCF5272" |
139 | select COLDFIRE | ||
102 | select COLDFIRE_SW_A7 | 140 | select COLDFIRE_SW_A7 |
103 | select HAVE_MBAR | 141 | select HAVE_MBAR |
104 | help | 142 | help |
@@ -106,6 +144,7 @@ config M5272 | |||
106 | 144 | ||
107 | config M5275 | 145 | config M5275 |
108 | bool "MCF5275" | 146 | bool "MCF5275" |
147 | select COLDFIRE | ||
109 | select HAVE_CACHE_SPLIT | 148 | select HAVE_CACHE_SPLIT |
110 | select HAVE_IPSBAR | 149 | select HAVE_IPSBAR |
111 | help | 150 | help |
@@ -113,6 +152,7 @@ config M5275 | |||
113 | 152 | ||
114 | config M528x | 153 | config M528x |
115 | bool "MCF528x" | 154 | bool "MCF528x" |
155 | select COLDFIRE | ||
116 | select GENERIC_CLOCKEVENTS | 156 | select GENERIC_CLOCKEVENTS |
117 | select HAVE_CACHE_SPLIT | 157 | select HAVE_CACHE_SPLIT |
118 | select HAVE_IPSBAR | 158 | select HAVE_IPSBAR |
@@ -121,6 +161,7 @@ config M528x | |||
121 | 161 | ||
122 | config M5307 | 162 | config M5307 |
123 | bool "MCF5307" | 163 | bool "MCF5307" |
164 | select COLDFIRE | ||
124 | select COLDFIRE_SW_A7 | 165 | select COLDFIRE_SW_A7 |
125 | select HAVE_CACHE_CB | 166 | select HAVE_CACHE_CB |
126 | select HAVE_MBAR | 167 | select HAVE_MBAR |
@@ -129,12 +170,14 @@ config M5307 | |||
129 | 170 | ||
130 | config M532x | 171 | config M532x |
131 | bool "MCF532x" | 172 | bool "MCF532x" |
173 | select COLDFIRE | ||
132 | select HAVE_CACHE_CB | 174 | select HAVE_CACHE_CB |
133 | help | 175 | help |
134 | Freescale (Motorola) ColdFire 532x processor support. | 176 | Freescale (Motorola) ColdFire 532x processor support. |
135 | 177 | ||
136 | config M5407 | 178 | config M5407 |
137 | bool "MCF5407" | 179 | bool "MCF5407" |
180 | select COLDFIRE | ||
138 | select COLDFIRE_SW_A7 | 181 | select COLDFIRE_SW_A7 |
139 | select HAVE_CACHE_CB | 182 | select HAVE_CACHE_CB |
140 | select HAVE_MBAR | 183 | select HAVE_MBAR |
@@ -143,6 +186,7 @@ config M5407 | |||
143 | 186 | ||
144 | config M547x | 187 | config M547x |
145 | bool "MCF547x" | 188 | bool "MCF547x" |
189 | select COLDFIRE | ||
146 | select HAVE_CACHE_CB | 190 | select HAVE_CACHE_CB |
147 | select HAVE_MBAR | 191 | select HAVE_MBAR |
148 | help | 192 | help |
@@ -150,6 +194,7 @@ config M547x | |||
150 | 194 | ||
151 | config M548x | 195 | config M548x |
152 | bool "MCF548x" | 196 | bool "MCF548x" |
197 | select COLDFIRE | ||
153 | select HAVE_CACHE_CB | 198 | select HAVE_CACHE_CB |
154 | select HAVE_MBAR | 199 | select HAVE_MBAR |
155 | help | 200 | help |
@@ -168,13 +213,6 @@ config M54xx | |||
168 | depends on (M548x || M547x) | 213 | depends on (M548x || M547x) |
169 | default y | 214 | default y |
170 | 215 | ||
171 | config COLDFIRE | ||
172 | bool | ||
173 | depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx) | ||
174 | select GENERIC_GPIO | ||
175 | select ARCH_REQUIRE_GPIOLIB | ||
176 | default y | ||
177 | |||
178 | config CLOCK_SET | 216 | config CLOCK_SET |
179 | bool "Enable setting the CPU clock frequency" | 217 | bool "Enable setting the CPU clock frequency" |
180 | default n | 218 | default n |
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index 33f82769547c..1b7a14d1a000 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c | |||
@@ -14,8 +14,7 @@ EXPORT_SYMBOL(__ashrdi3); | |||
14 | EXPORT_SYMBOL(__lshrdi3); | 14 | EXPORT_SYMBOL(__lshrdi3); |
15 | EXPORT_SYMBOL(__muldi3); | 15 | EXPORT_SYMBOL(__muldi3); |
16 | 16 | ||
17 | #if !defined(__mc68020__) && !defined(__mc68030__) && \ | 17 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
18 | !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcpu32__) | ||
19 | /* | 18 | /* |
20 | * Simpler 68k and ColdFire parts also need a few other gcc functions. | 19 | * Simpler 68k and ColdFire parts also need a few other gcc functions. |
21 | */ | 20 | */ |
diff --git a/arch/m68k/kernel/vmlinux.lds_no.S b/arch/m68k/kernel/vmlinux.lds_no.S index f4d715cdca0e..7dc4087a9545 100644 --- a/arch/m68k/kernel/vmlinux.lds_no.S +++ b/arch/m68k/kernel/vmlinux.lds_no.S | |||
@@ -84,52 +84,52 @@ SECTIONS { | |||
84 | /* Kernel symbol table: Normal symbols */ | 84 | /* Kernel symbol table: Normal symbols */ |
85 | . = ALIGN(4); | 85 | . = ALIGN(4); |
86 | __start___ksymtab = .; | 86 | __start___ksymtab = .; |
87 | *(__ksymtab) | 87 | *(SORT(___ksymtab+*)) |
88 | __stop___ksymtab = .; | 88 | __stop___ksymtab = .; |
89 | 89 | ||
90 | /* Kernel symbol table: GPL-only symbols */ | 90 | /* Kernel symbol table: GPL-only symbols */ |
91 | __start___ksymtab_gpl = .; | 91 | __start___ksymtab_gpl = .; |
92 | *(__ksymtab_gpl) | 92 | *(SORT(___ksymtab_gpl+*)) |
93 | __stop___ksymtab_gpl = .; | 93 | __stop___ksymtab_gpl = .; |
94 | 94 | ||
95 | /* Kernel symbol table: Normal unused symbols */ | 95 | /* Kernel symbol table: Normal unused symbols */ |
96 | __start___ksymtab_unused = .; | 96 | __start___ksymtab_unused = .; |
97 | *(__ksymtab_unused) | 97 | *(SORT(___ksymtab_unused+*)) |
98 | __stop___ksymtab_unused = .; | 98 | __stop___ksymtab_unused = .; |
99 | 99 | ||
100 | /* Kernel symbol table: GPL-only unused symbols */ | 100 | /* Kernel symbol table: GPL-only unused symbols */ |
101 | __start___ksymtab_unused_gpl = .; | 101 | __start___ksymtab_unused_gpl = .; |
102 | *(__ksymtab_unused_gpl) | 102 | *(SORT(___ksymtab_unused_gpl+*)) |
103 | __stop___ksymtab_unused_gpl = .; | 103 | __stop___ksymtab_unused_gpl = .; |
104 | 104 | ||
105 | /* Kernel symbol table: GPL-future symbols */ | 105 | /* Kernel symbol table: GPL-future symbols */ |
106 | __start___ksymtab_gpl_future = .; | 106 | __start___ksymtab_gpl_future = .; |
107 | *(__ksymtab_gpl_future) | 107 | *(SORT(___ksymtab_gpl_future+*)) |
108 | __stop___ksymtab_gpl_future = .; | 108 | __stop___ksymtab_gpl_future = .; |
109 | 109 | ||
110 | /* Kernel symbol table: Normal symbols */ | 110 | /* Kernel symbol table: Normal symbols */ |
111 | __start___kcrctab = .; | 111 | __start___kcrctab = .; |
112 | *(__kcrctab) | 112 | *(SORT(___kcrctab+*)) |
113 | __stop___kcrctab = .; | 113 | __stop___kcrctab = .; |
114 | 114 | ||
115 | /* Kernel symbol table: GPL-only symbols */ | 115 | /* Kernel symbol table: GPL-only symbols */ |
116 | __start___kcrctab_gpl = .; | 116 | __start___kcrctab_gpl = .; |
117 | *(__kcrctab_gpl) | 117 | *(SORT(___kcrctab_gpl+*)) |
118 | __stop___kcrctab_gpl = .; | 118 | __stop___kcrctab_gpl = .; |
119 | 119 | ||
120 | /* Kernel symbol table: Normal unused symbols */ | 120 | /* Kernel symbol table: Normal unused symbols */ |
121 | __start___kcrctab_unused = .; | 121 | __start___kcrctab_unused = .; |
122 | *(__kcrctab_unused) | 122 | *(SORT(___kcrctab_unused+*)) |
123 | __stop___kcrctab_unused = .; | 123 | __stop___kcrctab_unused = .; |
124 | 124 | ||
125 | /* Kernel symbol table: GPL-only unused symbols */ | 125 | /* Kernel symbol table: GPL-only unused symbols */ |
126 | __start___kcrctab_unused_gpl = .; | 126 | __start___kcrctab_unused_gpl = .; |
127 | *(__kcrctab_unused_gpl) | 127 | *(SORT(___kcrctab_unused_gpl+*)) |
128 | __stop___kcrctab_unused_gpl = .; | 128 | __stop___kcrctab_unused_gpl = .; |
129 | 129 | ||
130 | /* Kernel symbol table: GPL-future symbols */ | 130 | /* Kernel symbol table: GPL-future symbols */ |
131 | __start___kcrctab_gpl_future = .; | 131 | __start___kcrctab_gpl_future = .; |
132 | *(__kcrctab_gpl_future) | 132 | *(SORT(___kcrctab_gpl_future+*)) |
133 | __stop___kcrctab_gpl_future = .; | 133 | __stop___kcrctab_gpl_future = .; |
134 | 134 | ||
135 | /* Kernel symbol table: strings */ | 135 | /* Kernel symbol table: strings */ |
diff --git a/arch/m68k/lib/memcpy.c b/arch/m68k/lib/memcpy.c index 62182c81e91c..064889316974 100644 --- a/arch/m68k/lib/memcpy.c +++ b/arch/m68k/lib/memcpy.c | |||
@@ -34,8 +34,10 @@ void *memcpy(void *to, const void *from, size_t n) | |||
34 | if (temp) { | 34 | if (temp) { |
35 | long *lto = to; | 35 | long *lto = to; |
36 | const long *lfrom = from; | 36 | const long *lfrom = from; |
37 | #if defined(__mc68020__) || defined(__mc68030__) || \ | 37 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
38 | defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__) | 38 | for (; temp; temp--) |
39 | *lto++ = *lfrom++; | ||
40 | #else | ||
39 | asm volatile ( | 41 | asm volatile ( |
40 | " movel %2,%3\n" | 42 | " movel %2,%3\n" |
41 | " andw #7,%3\n" | 43 | " andw #7,%3\n" |
@@ -56,9 +58,6 @@ void *memcpy(void *to, const void *from, size_t n) | |||
56 | " jpl 4b" | 58 | " jpl 4b" |
57 | : "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) | 59 | : "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) |
58 | : "0" (lfrom), "1" (lto), "2" (temp)); | 60 | : "0" (lfrom), "1" (lto), "2" (temp)); |
59 | #else | ||
60 | for (; temp; temp--) | ||
61 | *lto++ = *lfrom++; | ||
62 | #endif | 61 | #endif |
63 | to = lto; | 62 | to = lto; |
64 | from = lfrom; | 63 | from = lfrom; |
diff --git a/arch/m68k/lib/memset.c b/arch/m68k/lib/memset.c index f649e6a2e644..8a7639f0a2fe 100644 --- a/arch/m68k/lib/memset.c +++ b/arch/m68k/lib/memset.c | |||
@@ -32,8 +32,10 @@ void *memset(void *s, int c, size_t count) | |||
32 | temp = count >> 2; | 32 | temp = count >> 2; |
33 | if (temp) { | 33 | if (temp) { |
34 | long *ls = s; | 34 | long *ls = s; |
35 | #if defined(__mc68020__) || defined(__mc68030__) || \ | 35 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
36 | defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__) | 36 | for (; temp; temp--) |
37 | *ls++ = c; | ||
38 | #else | ||
37 | size_t temp1; | 39 | size_t temp1; |
38 | asm volatile ( | 40 | asm volatile ( |
39 | " movel %1,%2\n" | 41 | " movel %1,%2\n" |
@@ -55,9 +57,6 @@ void *memset(void *s, int c, size_t count) | |||
55 | " jpl 1b" | 57 | " jpl 1b" |
56 | : "=a" (ls), "=d" (temp), "=&d" (temp1) | 58 | : "=a" (ls), "=d" (temp), "=&d" (temp1) |
57 | : "d" (c), "0" (ls), "1" (temp)); | 59 | : "d" (c), "0" (ls), "1" (temp)); |
58 | #else | ||
59 | for (; temp; temp--) | ||
60 | *ls++ = c; | ||
61 | #endif | 60 | #endif |
62 | s = ls; | 61 | s = ls; |
63 | } | 62 | } |
diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c index 079bafca073e..79e928a525d0 100644 --- a/arch/m68k/lib/muldi3.c +++ b/arch/m68k/lib/muldi3.c | |||
@@ -19,17 +19,7 @@ along with GNU CC; see the file COPYING. If not, write to | |||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. */ | 20 | Boston, MA 02111-1307, USA. */ |
21 | 21 | ||
22 | #if defined(__mc68020__) || defined(__mc68030__) || \ | 22 | #if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE) |
23 | defined(__mc68040__) || defined(__mc68060__) || defined(__mcpu32__) | ||
24 | |||
25 | #define umul_ppmm(w1, w0, u, v) \ | ||
26 | __asm__ ("mulu%.l %3,%1:%0" \ | ||
27 | : "=d" ((USItype)(w0)), \ | ||
28 | "=d" ((USItype)(w1)) \ | ||
29 | : "%0" ((USItype)(u)), \ | ||
30 | "dmi" ((USItype)(v))) | ||
31 | |||
32 | #else | ||
33 | 23 | ||
34 | #define SI_TYPE_SIZE 32 | 24 | #define SI_TYPE_SIZE 32 |
35 | #define __BITS4 (SI_TYPE_SIZE / 4) | 25 | #define __BITS4 (SI_TYPE_SIZE / 4) |
@@ -61,6 +51,15 @@ Boston, MA 02111-1307, USA. */ | |||
61 | (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ | 51 | (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ |
62 | } while (0) | 52 | } while (0) |
63 | 53 | ||
54 | #else | ||
55 | |||
56 | #define umul_ppmm(w1, w0, u, v) \ | ||
57 | __asm__ ("mulu%.l %3,%1:%0" \ | ||
58 | : "=d" ((USItype)(w0)), \ | ||
59 | "=d" ((USItype)(w1)) \ | ||
60 | : "%0" ((USItype)(u)), \ | ||
61 | "dmi" ((USItype)(v))) | ||
62 | |||
64 | #endif | 63 | #endif |
65 | 64 | ||
66 | #define __umulsidi3(u, v) \ | 65 | #define __umulsidi3(u, v) \ |
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig index 37862b2ce363..807c97eed8a8 100644 --- a/arch/mips/configs/mtx1_defconfig +++ b/arch/mips/configs/mtx1_defconfig | |||
@@ -678,7 +678,7 @@ CONFIG_LEDS_TRIGGERS=y | |||
678 | CONFIG_LEDS_TRIGGER_TIMER=y | 678 | CONFIG_LEDS_TRIGGER_TIMER=y |
679 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 679 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
680 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | 680 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y |
681 | CONFIG_RTC_CLASS=m | 681 | CONFIG_RTC_CLASS=y |
682 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | 682 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y |
683 | CONFIG_RTC_DRV_TEST=m | 683 | CONFIG_RTC_DRV_TEST=m |
684 | CONFIG_RTC_DRV_DS1307=m | 684 | CONFIG_RTC_DRV_DS1307=m |
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig index 7f7e4a878602..22e719575c60 100644 --- a/arch/powerpc/configs/52xx/pcm030_defconfig +++ b/arch/powerpc/configs/52xx/pcm030_defconfig | |||
@@ -85,7 +85,7 @@ CONFIG_USB_OHCI_HCD=m | |||
85 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | 85 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y |
86 | # CONFIG_USB_OHCI_HCD_PCI is not set | 86 | # CONFIG_USB_OHCI_HCD_PCI is not set |
87 | CONFIG_USB_STORAGE=m | 87 | CONFIG_USB_STORAGE=m |
88 | CONFIG_RTC_CLASS=m | 88 | CONFIG_RTC_CLASS=y |
89 | CONFIG_RTC_DRV_PCF8563=m | 89 | CONFIG_RTC_DRV_PCF8563=m |
90 | CONFIG_EXT2_FS=m | 90 | CONFIG_EXT2_FS=m |
91 | CONFIG_EXT3_FS=m | 91 | CONFIG_EXT3_FS=m |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index 6472322bf13b..185c292b0f1c 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -141,7 +141,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y | |||
141 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 141 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
142 | CONFIG_USB_OHCI_HCD=m | 142 | CONFIG_USB_OHCI_HCD=m |
143 | CONFIG_USB_STORAGE=m | 143 | CONFIG_USB_STORAGE=m |
144 | CONFIG_RTC_CLASS=m | 144 | CONFIG_RTC_CLASS=y |
145 | CONFIG_RTC_DRV_PS3=m | 145 | CONFIG_RTC_DRV_PS3=m |
146 | CONFIG_EXT2_FS=m | 146 | CONFIG_EXT2_FS=m |
147 | CONFIG_EXT3_FS=m | 147 | CONFIG_EXT3_FS=m |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 3a32741cc0ac..513cb1a2e6c8 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/usb/r8a66597.h> | 22 | #include <linux/usb/r8a66597.h> |
23 | #include <linux/usb/renesas_usbhs.h> | ||
23 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
24 | #include <linux/i2c/tsc2007.h> | 25 | #include <linux/i2c/tsc2007.h> |
25 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
@@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = { | |||
232 | .resource = usb1_common_resources, | 233 | .resource = usb1_common_resources, |
233 | }; | 234 | }; |
234 | 235 | ||
236 | /* | ||
237 | * USBHS | ||
238 | */ | ||
239 | static int usbhs_get_id(struct platform_device *pdev) | ||
240 | { | ||
241 | return gpio_get_value(GPIO_PTB3); | ||
242 | } | ||
243 | |||
244 | static struct renesas_usbhs_platform_info usbhs_info = { | ||
245 | .platform_callback = { | ||
246 | .get_id = usbhs_get_id, | ||
247 | }, | ||
248 | .driver_param = { | ||
249 | .buswait_bwait = 4, | ||
250 | .detection_delay = 5, | ||
251 | }, | ||
252 | }; | ||
253 | |||
254 | static struct resource usbhs_resources[] = { | ||
255 | [0] = { | ||
256 | .start = 0xa4d90000, | ||
257 | .end = 0xa4d90124 - 1, | ||
258 | .flags = IORESOURCE_MEM, | ||
259 | }, | ||
260 | [1] = { | ||
261 | .start = 66, | ||
262 | .end = 66, | ||
263 | .flags = IORESOURCE_IRQ, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device usbhs_device = { | ||
268 | .name = "renesas_usbhs", | ||
269 | .id = 1, | ||
270 | .dev = { | ||
271 | .dma_mask = NULL, /* not use dma */ | ||
272 | .coherent_dma_mask = 0xffffffff, | ||
273 | .platform_data = &usbhs_info, | ||
274 | }, | ||
275 | .num_resources = ARRAY_SIZE(usbhs_resources), | ||
276 | .resource = usbhs_resources, | ||
277 | .archdata = { | ||
278 | .hwblk_id = HWBLK_USB1, | ||
279 | }, | ||
280 | }; | ||
281 | |||
235 | /* LCDC */ | 282 | /* LCDC */ |
236 | const static struct fb_videomode ecovec_lcd_modes[] = { | 283 | const static struct fb_videomode ecovec_lcd_modes[] = { |
237 | { | 284 | { |
@@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
897 | &sh_eth_device, | 944 | &sh_eth_device, |
898 | &usb0_host_device, | 945 | &usb0_host_device, |
899 | &usb1_common_device, | 946 | &usb1_common_device, |
947 | &usbhs_device, | ||
900 | &lcdc_device, | 948 | &lcdc_device, |
901 | &ceu0_device, | 949 | &ceu0_device, |
902 | &ceu1_device, | 950 | &ceu1_device, |
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 780e083e4d17..23bc849d9c64 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -27,8 +27,6 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | |||
27 | $(CONFIG_BOOT_LINK_OFFSET)]') | 27 | $(CONFIG_BOOT_LINK_OFFSET)]') |
28 | endif | 28 | endif |
29 | 29 | ||
30 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
31 | |||
32 | ifeq ($(CONFIG_MCOUNT),y) | 30 | ifeq ($(CONFIG_MCOUNT),y) |
33 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 31 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
34 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | 32 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) |
@@ -37,7 +35,25 @@ endif | |||
37 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ | 35 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ |
38 | -T $(obj)/../../kernel/vmlinux.lds | 36 | -T $(obj)/../../kernel/vmlinux.lds |
39 | 37 | ||
40 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE | 38 | # |
39 | # Pull in the necessary libgcc bits from the in-kernel implementation. | ||
40 | # | ||
41 | lib1funcs-$(CONFIG_SUPERH32) := ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S \ | ||
42 | lshrsi3.S | ||
43 | lib1funcs-obj := \ | ||
44 | $(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y)))) | ||
45 | |||
46 | lib1funcs-dir := $(srctree)/arch/$(SRCARCH)/lib | ||
47 | ifeq ($(BITS),64) | ||
48 | lib1funcs-dir := $(addsuffix $(BITS), $(lib1funcs-dir)) | ||
49 | endif | ||
50 | |||
51 | KBUILD_CFLAGS += -I$(lib1funcs-dir) | ||
52 | |||
53 | $(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE | ||
54 | $(call cmd,shipped) | ||
55 | |||
56 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE | ||
41 | $(call if_changed,ld) | 57 | $(call if_changed,ld) |
42 | @: | 58 | @: |
43 | 59 | ||
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig index 0f558914e760..e2cbd92d520b 100644 --- a/arch/sh/configs/titan_defconfig +++ b/arch/sh/configs/titan_defconfig | |||
@@ -227,7 +227,7 @@ CONFIG_USB_SERIAL=m | |||
227 | CONFIG_USB_SERIAL_GENERIC=y | 227 | CONFIG_USB_SERIAL_GENERIC=y |
228 | CONFIG_USB_SERIAL_ARK3116=m | 228 | CONFIG_USB_SERIAL_ARK3116=m |
229 | CONFIG_USB_SERIAL_PL2303=m | 229 | CONFIG_USB_SERIAL_PL2303=m |
230 | CONFIG_RTC_CLASS=m | 230 | CONFIG_RTC_CLASS=y |
231 | CONFIG_RTC_DRV_SH=m | 231 | CONFIG_RTC_DRV_SH=m |
232 | CONFIG_EXT2_FS=y | 232 | CONFIG_EXT2_FS=y |
233 | CONFIG_EXT3_FS=y | 233 | CONFIG_EXT3_FS=y |
diff --git a/arch/sh/include/asm/cmpxchg-grb.h b/arch/sh/include/asm/cmpxchg-grb.h index 4676bf57693a..f848dec9e483 100644 --- a/arch/sh/include/asm/cmpxchg-grb.h +++ b/arch/sh/include/asm/cmpxchg-grb.h | |||
@@ -15,8 +15,9 @@ static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val) | |||
15 | " mov.l %2, @%1 \n\t" /* store new value */ | 15 | " mov.l %2, @%1 \n\t" /* store new value */ |
16 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 16 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
17 | : "=&r" (retval), | 17 | : "=&r" (retval), |
18 | "+r" (m) | 18 | "+r" (m), |
19 | : "r" (val) | 19 | "+r" (val) /* inhibit r15 overloading */ |
20 | : | ||
20 | : "memory", "r0", "r1"); | 21 | : "memory", "r0", "r1"); |
21 | 22 | ||
22 | return retval; | 23 | return retval; |
@@ -36,8 +37,9 @@ static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val) | |||
36 | " mov.b %2, @%1 \n\t" /* store new value */ | 37 | " mov.b %2, @%1 \n\t" /* store new value */ |
37 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 38 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
38 | : "=&r" (retval), | 39 | : "=&r" (retval), |
39 | "+r" (m) | 40 | "+r" (m), |
40 | : "r" (val) | 41 | "+r" (val) /* inhibit r15 overloading */ |
42 | : | ||
41 | : "memory" , "r0", "r1"); | 43 | : "memory" , "r0", "r1"); |
42 | 44 | ||
43 | return retval; | 45 | return retval; |
@@ -54,13 +56,14 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, | |||
54 | " nop \n\t" | 56 | " nop \n\t" |
55 | " mov r15, r1 \n\t" /* r1 = saved sp */ | 57 | " mov r15, r1 \n\t" /* r1 = saved sp */ |
56 | " mov #-8, r15 \n\t" /* LOGIN */ | 58 | " mov #-8, r15 \n\t" /* LOGIN */ |
57 | " mov.l @%1, %0 \n\t" /* load old value */ | 59 | " mov.l @%3, %0 \n\t" /* load old value */ |
58 | " cmp/eq %0, %2 \n\t" | 60 | " cmp/eq %0, %1 \n\t" |
59 | " bf 1f \n\t" /* if not equal */ | 61 | " bf 1f \n\t" /* if not equal */ |
60 | " mov.l %3, @%1 \n\t" /* store new value */ | 62 | " mov.l %2, @%3 \n\t" /* store new value */ |
61 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 63 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
62 | : "=&r" (retval) | 64 | : "=&r" (retval), |
63 | : "r" (m), "r" (old), "r" (new) | 65 | "+r" (old), "+r" (new) /* old or new can be r15 */ |
66 | : "r" (m) | ||
64 | : "memory" , "r0", "r1", "t"); | 67 | : "memory" , "r0", "r1", "t"); |
65 | 68 | ||
66 | return retval; | 69 | return retval; |
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 2a541ddb5a1b..e25c4c7d6b63 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
@@ -150,7 +150,6 @@ struct thread_struct { | |||
150 | #define SR_USER (SR_MMU | SR_FD) | 150 | #define SR_USER (SR_MMU | SR_FD) |
151 | 151 | ||
152 | #define start_thread(_regs, new_pc, new_sp) \ | 152 | #define start_thread(_regs, new_pc, new_sp) \ |
153 | set_fs(USER_DS); \ | ||
154 | _regs->sr = SR_USER; /* User mode. */ \ | 153 | _regs->sr = SR_USER; /* User mode. */ \ |
155 | _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ | 154 | _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ |
156 | _regs->pc |= 1; /* Set SHmedia ! */ \ | 155 | _regs->pc |= 1; /* Set SHmedia ! */ \ |
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h index 3daef8ecbc63..cbc47e6bcab5 100644 --- a/arch/sh/include/cpu-sh4/cpu/sh7724.h +++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h | |||
@@ -298,6 +298,14 @@ enum { | |||
298 | SHDMA_SLAVE_SCIF4_RX, | 298 | SHDMA_SLAVE_SCIF4_RX, |
299 | SHDMA_SLAVE_SCIF5_TX, | 299 | SHDMA_SLAVE_SCIF5_TX, |
300 | SHDMA_SLAVE_SCIF5_RX, | 300 | SHDMA_SLAVE_SCIF5_RX, |
301 | SHDMA_SLAVE_USB0D0_TX, | ||
302 | SHDMA_SLAVE_USB0D0_RX, | ||
303 | SHDMA_SLAVE_USB0D1_TX, | ||
304 | SHDMA_SLAVE_USB0D1_RX, | ||
305 | SHDMA_SLAVE_USB1D0_TX, | ||
306 | SHDMA_SLAVE_USB1D0_RX, | ||
307 | SHDMA_SLAVE_USB1D1_TX, | ||
308 | SHDMA_SLAVE_USB1D1_RX, | ||
301 | SHDMA_SLAVE_SDHI0_TX, | 309 | SHDMA_SLAVE_SDHI0_TX, |
302 | SHDMA_SLAVE_SDHI0_RX, | 310 | SHDMA_SLAVE_SDHI0_RX, |
303 | SHDMA_SLAVE_SDHI1_TX, | 311 | SHDMA_SLAVE_SDHI1_TX, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 0333fe9e3881..134a397b1918 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -93,6 +93,46 @@ static const struct sh_dmae_slave_config sh7724_dmae_slaves[] = { | |||
93 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 93 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
94 | .mid_rid = 0x36, | 94 | .mid_rid = 0x36, |
95 | }, { | 95 | }, { |
96 | .slave_id = SHDMA_SLAVE_USB0D0_TX, | ||
97 | .addr = 0xA4D80100, | ||
98 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
99 | .mid_rid = 0x73, | ||
100 | }, { | ||
101 | .slave_id = SHDMA_SLAVE_USB0D0_RX, | ||
102 | .addr = 0xA4D80100, | ||
103 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
104 | .mid_rid = 0x73, | ||
105 | }, { | ||
106 | .slave_id = SHDMA_SLAVE_USB0D1_TX, | ||
107 | .addr = 0xA4D80120, | ||
108 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
109 | .mid_rid = 0x77, | ||
110 | }, { | ||
111 | .slave_id = SHDMA_SLAVE_USB0D1_RX, | ||
112 | .addr = 0xA4D80120, | ||
113 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
114 | .mid_rid = 0x77, | ||
115 | }, { | ||
116 | .slave_id = SHDMA_SLAVE_USB1D0_TX, | ||
117 | .addr = 0xA4D90100, | ||
118 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
119 | .mid_rid = 0xab, | ||
120 | }, { | ||
121 | .slave_id = SHDMA_SLAVE_USB1D0_RX, | ||
122 | .addr = 0xA4D90100, | ||
123 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
124 | .mid_rid = 0xab, | ||
125 | }, { | ||
126 | .slave_id = SHDMA_SLAVE_USB1D1_TX, | ||
127 | .addr = 0xA4D90120, | ||
128 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
129 | .mid_rid = 0xaf, | ||
130 | }, { | ||
131 | .slave_id = SHDMA_SLAVE_USB1D1_RX, | ||
132 | .addr = 0xA4D90120, | ||
133 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
134 | .mid_rid = 0xaf, | ||
135 | }, { | ||
96 | .slave_id = SHDMA_SLAVE_SDHI0_TX, | 136 | .slave_id = SHDMA_SLAVE_SDHI0_TX, |
97 | .addr = 0x04ce0030, | 137 | .addr = 0x04ce0030, |
98 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), | 138 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index b473f0c06fbc..aaf6d59c2012 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -102,8 +102,6 @@ EXPORT_SYMBOL(kernel_thread); | |||
102 | void start_thread(struct pt_regs *regs, unsigned long new_pc, | 102 | void start_thread(struct pt_regs *regs, unsigned long new_pc, |
103 | unsigned long new_sp) | 103 | unsigned long new_sp) |
104 | { | 104 | { |
105 | set_fs(USER_DS); | ||
106 | |||
107 | regs->pr = 0; | 105 | regs->pr = 0; |
108 | regs->sr = SR_FD; | 106 | regs->sr = SR_FD; |
109 | regs->pc = new_pc; | 107 | regs->pc = new_pc; |
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c index 52411462c409..115725198038 100644 --- a/arch/sh/mm/cache-debugfs.c +++ b/arch/sh/mm/cache-debugfs.c | |||
@@ -26,9 +26,9 @@ static int cache_seq_show(struct seq_file *file, void *iter) | |||
26 | { | 26 | { |
27 | unsigned int cache_type = (unsigned int)file->private; | 27 | unsigned int cache_type = (unsigned int)file->private; |
28 | struct cache_info *cache; | 28 | struct cache_info *cache; |
29 | unsigned int waysize, way, cache_size; | 29 | unsigned int waysize, way; |
30 | unsigned long ccr, base; | 30 | unsigned long ccr; |
31 | static unsigned long addrstart = 0; | 31 | unsigned long addrstart = 0; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Go uncached immediately so we don't skew the results any | 34 | * Go uncached immediately so we don't skew the results any |
@@ -45,28 +45,13 @@ static int cache_seq_show(struct seq_file *file, void *iter) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | if (cache_type == CACHE_TYPE_DCACHE) { | 47 | if (cache_type == CACHE_TYPE_DCACHE) { |
48 | base = CACHE_OC_ADDRESS_ARRAY; | 48 | addrstart = CACHE_OC_ADDRESS_ARRAY; |
49 | cache = ¤t_cpu_data.dcache; | 49 | cache = ¤t_cpu_data.dcache; |
50 | } else { | 50 | } else { |
51 | base = CACHE_IC_ADDRESS_ARRAY; | 51 | addrstart = CACHE_IC_ADDRESS_ARRAY; |
52 | cache = ¤t_cpu_data.icache; | 52 | cache = ¤t_cpu_data.icache; |
53 | } | 53 | } |
54 | 54 | ||
55 | /* | ||
56 | * Due to the amount of data written out (depending on the cache size), | ||
57 | * we may be iterated over multiple times. In this case, keep track of | ||
58 | * the entry position in addrstart, and rewind it when we've hit the | ||
59 | * end of the cache. | ||
60 | * | ||
61 | * Likewise, the same code is used for multiple caches, so care must | ||
62 | * be taken for bouncing addrstart back and forth so the appropriate | ||
63 | * cache is hit. | ||
64 | */ | ||
65 | cache_size = cache->ways * cache->sets * cache->linesz; | ||
66 | if (((addrstart & 0xff000000) != base) || | ||
67 | (addrstart & 0x00ffffff) > cache_size) | ||
68 | addrstart = base; | ||
69 | |||
70 | waysize = cache->sets; | 55 | waysize = cache->sets; |
71 | 56 | ||
72 | /* | 57 | /* |
diff --git a/arch/x86/include/asm/memblock.h b/arch/x86/include/asm/memblock.h index 19ae14ba6978..0cd3800f33b9 100644 --- a/arch/x86/include/asm/memblock.h +++ b/arch/x86/include/asm/memblock.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #define ARCH_DISCARD_MEMBLOCK | 4 | #define ARCH_DISCARD_MEMBLOCK |
5 | 5 | ||
6 | u64 memblock_x86_find_in_range_size(u64 start, u64 *sizep, u64 align); | 6 | u64 memblock_x86_find_in_range_size(u64 start, u64 *sizep, u64 align); |
7 | void memblock_x86_to_bootmem(u64 start, u64 end); | ||
8 | 7 | ||
9 | void memblock_x86_reserve_range(u64 start, u64 end, char *name); | 8 | void memblock_x86_reserve_range(u64 start, u64 end, char *name); |
10 | void memblock_x86_free_range(u64 start, u64 end); | 9 | void memblock_x86_free_range(u64 start, u64 end); |
@@ -19,5 +18,6 @@ u64 memblock_x86_hole_size(u64 start, u64 end); | |||
19 | u64 memblock_x86_find_in_range_node(int nid, u64 start, u64 end, u64 size, u64 align); | 18 | u64 memblock_x86_find_in_range_node(int nid, u64 start, u64 end, u64 size, u64 align); |
20 | u64 memblock_x86_free_memory_in_range(u64 addr, u64 limit); | 19 | u64 memblock_x86_free_memory_in_range(u64 addr, u64 limit); |
21 | u64 memblock_x86_memory_in_range(u64 addr, u64 limit); | 20 | u64 memblock_x86_memory_in_range(u64 addr, u64 limit); |
21 | bool memblock_x86_check_reserved_size(u64 *addrp, u64 *sizep, u64 align); | ||
22 | 22 | ||
23 | #endif | 23 | #endif |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index b511a011b7d0..adc66c3a1fef 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -632,14 +632,14 @@ late_initcall(uv_init_heartbeat); | |||
632 | 632 | ||
633 | /* Direct Legacy VGA I/O traffic to designated IOH */ | 633 | /* Direct Legacy VGA I/O traffic to designated IOH */ |
634 | int uv_set_vga_state(struct pci_dev *pdev, bool decode, | 634 | int uv_set_vga_state(struct pci_dev *pdev, bool decode, |
635 | unsigned int command_bits, bool change_bridge) | 635 | unsigned int command_bits, u32 flags) |
636 | { | 636 | { |
637 | int domain, bus, rc; | 637 | int domain, bus, rc; |
638 | 638 | ||
639 | PR_DEVEL("devfn %x decode %d cmd %x chg_brdg %d\n", | 639 | PR_DEVEL("devfn %x decode %d cmd %x flags %d\n", |
640 | pdev->devfn, decode, command_bits, change_bridge); | 640 | pdev->devfn, decode, command_bits, flags); |
641 | 641 | ||
642 | if (!change_bridge) | 642 | if (!(flags & PCI_VGA_STATE_CHANGE_BRIDGE)) |
643 | return 0; | 643 | return 0; |
644 | 644 | ||
645 | if ((command_bits & PCI_COMMAND_IO) == 0) | 645 | if ((command_bits & PCI_COMMAND_IO) == 0) |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 2e4928d45a2d..e1ba8cb24e4e 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -337,7 +337,7 @@ EXPORT_SYMBOL(boot_option_idle_override); | |||
337 | * Powermanagement idle function, if any.. | 337 | * Powermanagement idle function, if any.. |
338 | */ | 338 | */ |
339 | void (*pm_idle)(void); | 339 | void (*pm_idle)(void); |
340 | #if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE) | 340 | #ifdef CONFIG_APM_MODULE |
341 | EXPORT_SYMBOL(pm_idle); | 341 | EXPORT_SYMBOL(pm_idle); |
342 | #endif | 342 | #endif |
343 | 343 | ||
@@ -399,7 +399,7 @@ void default_idle(void) | |||
399 | cpu_relax(); | 399 | cpu_relax(); |
400 | } | 400 | } |
401 | } | 401 | } |
402 | #if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE) | 402 | #ifdef CONFIG_APM_MODULE |
403 | EXPORT_SYMBOL(default_idle); | 403 | EXPORT_SYMBOL(default_idle); |
404 | #endif | 404 | #endif |
405 | 405 | ||
diff --git a/arch/x86/mm/memblock.c b/arch/x86/mm/memblock.c index aa1169392b83..992da5ec5a64 100644 --- a/arch/x86/mm/memblock.c +++ b/arch/x86/mm/memblock.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <linux/range.h> | 8 | #include <linux/range.h> |
9 | 9 | ||
10 | /* Check for already reserved areas */ | 10 | /* Check for already reserved areas */ |
11 | static bool __init check_with_memblock_reserved_size(u64 *addrp, u64 *sizep, u64 align) | 11 | bool __init memblock_x86_check_reserved_size(u64 *addrp, u64 *sizep, u64 align) |
12 | { | 12 | { |
13 | struct memblock_region *r; | 13 | struct memblock_region *r; |
14 | u64 addr = *addrp, last; | 14 | u64 addr = *addrp, last; |
@@ -59,7 +59,7 @@ u64 __init memblock_x86_find_in_range_size(u64 start, u64 *sizep, u64 align) | |||
59 | if (addr >= ei_last) | 59 | if (addr >= ei_last) |
60 | continue; | 60 | continue; |
61 | *sizep = ei_last - addr; | 61 | *sizep = ei_last - addr; |
62 | while (check_with_memblock_reserved_size(&addr, sizep, align)) | 62 | while (memblock_x86_check_reserved_size(&addr, sizep, align)) |
63 | ; | 63 | ; |
64 | 64 | ||
65 | if (*sizep) | 65 | if (*sizep) |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 0d3a4fa34560..474356b98ede 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -310,14 +310,31 @@ void __init efi_reserve_boot_services(void) | |||
310 | 310 | ||
311 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { | 311 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
312 | efi_memory_desc_t *md = p; | 312 | efi_memory_desc_t *md = p; |
313 | unsigned long long start = md->phys_addr; | 313 | u64 start = md->phys_addr; |
314 | unsigned long long size = md->num_pages << EFI_PAGE_SHIFT; | 314 | u64 size = md->num_pages << EFI_PAGE_SHIFT; |
315 | 315 | ||
316 | if (md->type != EFI_BOOT_SERVICES_CODE && | 316 | if (md->type != EFI_BOOT_SERVICES_CODE && |
317 | md->type != EFI_BOOT_SERVICES_DATA) | 317 | md->type != EFI_BOOT_SERVICES_DATA) |
318 | continue; | 318 | continue; |
319 | 319 | /* Only reserve where possible: | |
320 | memblock_x86_reserve_range(start, start + size, "EFI Boot"); | 320 | * - Not within any already allocated areas |
321 | * - Not over any memory area (really needed, if above?) | ||
322 | * - Not within any part of the kernel | ||
323 | * - Not the bios reserved area | ||
324 | */ | ||
325 | if ((start+size >= virt_to_phys(_text) | ||
326 | && start <= virt_to_phys(_end)) || | ||
327 | !e820_all_mapped(start, start+size, E820_RAM) || | ||
328 | memblock_x86_check_reserved_size(&start, &size, | ||
329 | 1<<EFI_PAGE_SHIFT)) { | ||
330 | /* Could not reserve, skip it */ | ||
331 | md->num_pages = 0; | ||
332 | memblock_dbg(PFX "Could not reserve boot range " | ||
333 | "[0x%010llx-0x%010llx]\n", | ||
334 | start, start+size-1); | ||
335 | } else | ||
336 | memblock_x86_reserve_range(start, start+size, | ||
337 | "EFI Boot"); | ||
321 | } | 338 | } |
322 | } | 339 | } |
323 | 340 | ||
@@ -334,6 +351,10 @@ static void __init efi_free_boot_services(void) | |||
334 | md->type != EFI_BOOT_SERVICES_DATA) | 351 | md->type != EFI_BOOT_SERVICES_DATA) |
335 | continue; | 352 | continue; |
336 | 353 | ||
354 | /* Could not reserve boot area */ | ||
355 | if (!size) | ||
356 | continue; | ||
357 | |||
337 | free_bootmem_late(start, size); | 358 | free_bootmem_late(start, size); |
338 | } | 359 | } |
339 | } | 360 | } |