diff options
Diffstat (limited to 'arch/arm')
53 files changed, 493 insertions, 219 deletions
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 5df26a9976a2..fc871e719aae 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -59,9 +59,11 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | |||
59 | 59 | ||
60 | endif | 60 | endif |
61 | 61 | ||
62 | targets += $(dtb-y) | ||
63 | |||
62 | # Rule to build device tree blobs | 64 | # Rule to build device tree blobs |
63 | $(obj)/%.dtb: $(src)/dts/%.dts | 65 | $(obj)/%.dtb: $(src)/dts/%.dts FORCE |
64 | $(call cmd,dtc) | 66 | $(call if_changed_dep,dtc) |
65 | 67 | ||
66 | $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) | 68 | $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) |
67 | 69 | ||
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 7151753b0989..c402e9b31f4c 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ARCH_ARM_GPIO_H | 2 | #define _ARCH_ARM_GPIO_H |
3 | 3 | ||
4 | #if CONFIG_ARCH_NR_GPIO > 0 | 4 | #if CONFIG_ARCH_NR_GPIO > 0 |
5 | #define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO | 5 | #define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | /* not all ARM platforms necessarily support this API ... */ | 8 | /* not all ARM platforms necessarily support this API ... */ |
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index c93a22a8b924..917626128a1d 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -25,7 +25,8 @@ | |||
25 | #define HWCAP_IDIVT (1 << 18) | 25 | #define HWCAP_IDIVT (1 << 18) |
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | 26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) |
27 | 27 | ||
28 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 28 | #if defined(__KERNEL__) |
29 | #if !defined(__ASSEMBLY__) | ||
29 | /* | 30 | /* |
30 | * This yields a mask that user programs can use to figure out what | 31 | * This yields a mask that user programs can use to figure out what |
31 | * instruction set this cpu supports. | 32 | * instruction set this cpu supports. |
@@ -33,5 +34,6 @@ | |||
33 | #define ELF_HWCAP (elf_hwcap) | 34 | #define ELF_HWCAP (elf_hwcap) |
34 | extern unsigned int elf_hwcap; | 35 | extern unsigned int elf_hwcap; |
35 | #endif | 36 | #endif |
37 | #endif | ||
36 | 38 | ||
37 | #endif | 39 | #endif |
diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h index b8da2e415e4e..00ca5f92648e 100644 --- a/arch/arm/include/asm/memblock.h +++ b/arch/arm/include/asm/memblock.h | |||
@@ -6,4 +6,6 @@ struct machine_desc; | |||
6 | 6 | ||
7 | extern void arm_memblock_init(struct meminfo *, struct machine_desc *); | 7 | extern void arm_memblock_init(struct meminfo *, struct machine_desc *); |
8 | 8 | ||
9 | phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align); | ||
10 | |||
9 | #endif | 11 | #endif |
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 32ee164a2f6b..b859d82e30ca 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h | |||
@@ -22,7 +22,8 @@ | |||
22 | # define __SWAB_64_THRU_32__ | 22 | # define __SWAB_64_THRU_32__ |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6 | 25 | #if defined(__KERNEL__) |
26 | #if __LINUX_ARM_ARCH__ >= 6 | ||
26 | 27 | ||
27 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) | 28 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) |
28 | { | 29 | { |
@@ -39,8 +40,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
39 | } | 40 | } |
40 | #define __arch_swab32 __arch_swab32 | 41 | #define __arch_swab32 __arch_swab32 |
41 | 42 | ||
42 | #else | 43 | #endif |
44 | #endif | ||
43 | 45 | ||
46 | #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6 | ||
44 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | 47 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
45 | { | 48 | { |
46 | __u32 t; | 49 | __u32 t; |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 4a1123783806..512cd1473454 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -427,7 +427,8 @@ | |||
427 | /* | 427 | /* |
428 | * The following syscalls are obsolete and no longer available for EABI. | 428 | * The following syscalls are obsolete and no longer available for EABI. |
429 | */ | 429 | */ |
430 | #if defined(__ARM_EABI__) && !defined(__KERNEL__) | 430 | #if !defined(__KERNEL__) |
431 | #if defined(__ARM_EABI__) | ||
431 | #undef __NR_time | 432 | #undef __NR_time |
432 | #undef __NR_umount | 433 | #undef __NR_umount |
433 | #undef __NR_stime | 434 | #undef __NR_stime |
@@ -441,6 +442,7 @@ | |||
441 | #undef __NR_syscall | 442 | #undef __NR_syscall |
442 | #undef __NR_ipc | 443 | #undef __NR_ipc |
443 | #endif | 444 | #endif |
445 | #endif | ||
444 | 446 | ||
445 | #ifdef __KERNEL__ | 447 | #ifdef __KERNEL__ |
446 | 448 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 14e277d2ff91..6d5791144066 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -99,6 +99,14 @@ ENTRY(stext) | |||
99 | THUMB( it eq ) @ force fixup-able long branch encoding | 99 | THUMB( it eq ) @ force fixup-able long branch encoding |
100 | beq __error_p @ yes, error 'p' | 100 | beq __error_p @ yes, error 'p' |
101 | 101 | ||
102 | #ifdef CONFIG_ARM_LPAE | ||
103 | mrc p15, 0, r3, c0, c1, 4 @ read ID_MMFR0 | ||
104 | and r3, r3, #0xf @ extract VMSA support | ||
105 | cmp r3, #5 @ long-descriptor translation table format? | ||
106 | THUMB( it lo ) @ force fixup-able long branch encoding | ||
107 | blo __error_p @ only classic page table format | ||
108 | #endif | ||
109 | |||
102 | #ifndef CONFIG_XIP_KERNEL | 110 | #ifndef CONFIG_XIP_KERNEL |
103 | adr r3, 2f | 111 | adr r3, 2f |
104 | ldmia r3, {r4, r8} | 112 | ldmia r3, {r4, r8} |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 89c33258639f..4d1aab154400 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
37 | #include <asm/memory.h> | 37 | #include <asm/memory.h> |
38 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
39 | #include <asm/memblock.h> | ||
39 | #include <mach/common.h> | 40 | #include <mach/common.h> |
40 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
41 | #include <mach/3ds_debugboard.h> | 42 | #include <mach/3ds_debugboard.h> |
@@ -754,10 +755,8 @@ static struct sys_timer mx31_3ds_timer = { | |||
754 | static void __init mx31_3ds_reserve(void) | 755 | static void __init mx31_3ds_reserve(void) |
755 | { | 756 | { |
756 | /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ | 757 | /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ |
757 | mx3_camera_base = memblock_alloc(MX31_3DS_CAMERA_BUF_SIZE, | 758 | mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE, |
758 | MX31_3DS_CAMERA_BUF_SIZE); | 759 | MX31_3DS_CAMERA_BUF_SIZE); |
759 | memblock_free(mx3_camera_base, MX31_3DS_CAMERA_BUF_SIZE); | ||
760 | memblock_remove(mx3_camera_base, MX31_3DS_CAMERA_BUF_SIZE); | ||
761 | } | 760 | } |
762 | 761 | ||
763 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | 762 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index b95981dacb2b..f225262b5c38 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/time.h> | 42 | #include <asm/mach/time.h> |
43 | #include <asm/mach/map.h> | 43 | #include <asm/mach/map.h> |
44 | #include <asm/memblock.h> | ||
44 | #include <mach/board-mx31moboard.h> | 45 | #include <mach/board-mx31moboard.h> |
45 | #include <mach/common.h> | 46 | #include <mach/common.h> |
46 | #include <mach/hardware.h> | 47 | #include <mach/hardware.h> |
@@ -584,10 +585,8 @@ struct sys_timer mx31moboard_timer = { | |||
584 | static void __init mx31moboard_reserve(void) | 585 | static void __init mx31moboard_reserve(void) |
585 | { | 586 | { |
586 | /* reserve 4 MiB for mx3-camera */ | 587 | /* reserve 4 MiB for mx3-camera */ |
587 | mx3_camera_base = memblock_alloc(MX3_CAMERA_BUF_SIZE, | 588 | mx3_camera_base = arm_memblock_steal(MX3_CAMERA_BUF_SIZE, |
588 | MX3_CAMERA_BUF_SIZE); | 589 | MX3_CAMERA_BUF_SIZE); |
589 | memblock_free(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | ||
590 | memblock_remove(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | ||
591 | } | 590 | } |
592 | 591 | ||
593 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | 592 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index d7e151669ed3..e48854b9d990 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
41 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
42 | #include <asm/memblock.h> | ||
42 | #include <mach/common.h> | 43 | #include <mach/common.h> |
43 | #include <mach/hardware.h> | 44 | #include <mach/hardware.h> |
44 | #include <mach/iomux-mx3.h> | 45 | #include <mach/iomux-mx3.h> |
@@ -680,10 +681,8 @@ struct sys_timer pcm037_timer = { | |||
680 | static void __init pcm037_reserve(void) | 681 | static void __init pcm037_reserve(void) |
681 | { | 682 | { |
682 | /* reserve 4 MiB for mx3-camera */ | 683 | /* reserve 4 MiB for mx3-camera */ |
683 | mx3_camera_base = memblock_alloc(MX3_CAMERA_BUF_SIZE, | 684 | mx3_camera_base = arm_memblock_steal(MX3_CAMERA_BUF_SIZE, |
684 | MX3_CAMERA_BUF_SIZE); | 685 | MX3_CAMERA_BUF_SIZE); |
685 | memblock_free(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | ||
686 | memblock_remove(mx3_camera_base, MX3_CAMERA_BUF_SIZE); | ||
687 | } | 686 | } |
688 | 687 | ||
689 | MACHINE_START(PCM037, "Phytec Phycore pcm037") | 688 | MACHINE_START(PCM037, "Phytec Phycore pcm037") |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 904bd1dfcd2e..a8ba7b96dcd1 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -366,8 +366,8 @@ config OMAP3_SDRC_AC_TIMING | |||
366 | going on could result in system crashes; | 366 | going on could result in system crashes; |
367 | 367 | ||
368 | config OMAP4_ERRATA_I688 | 368 | config OMAP4_ERRATA_I688 |
369 | bool "OMAP4 errata: Async Bridge Corruption" | 369 | bool "OMAP4 errata: Async Bridge Corruption (BROKEN)" |
370 | depends on ARCH_OMAP4 | 370 | depends on ARCH_OMAP4 && BROKEN |
371 | select ARCH_HAS_BARRIERS | 371 | select ARCH_HAS_BARRIERS |
372 | help | 372 | help |
373 | If a data is stalled inside asynchronous bridge because of back | 373 | If a data is stalled inside asynchronous bridge because of back |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 2ceb75d21eb2..39fba9df17fb 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -602,20 +602,6 @@ static void __init omap_sfh7741prox_init(void) | |||
602 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); | 602 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); |
603 | } | 603 | } |
604 | 604 | ||
605 | static void sdp4430_hdmi_mux_init(void) | ||
606 | { | ||
607 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
608 | omap_mux_init_signal("hdmi_hpd", | ||
609 | OMAP_PIN_INPUT_PULLUP); | ||
610 | omap_mux_init_signal("hdmi_cec", | ||
611 | OMAP_PIN_INPUT_PULLUP); | ||
612 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
613 | omap_mux_init_signal("hdmi_ddc_scl", | ||
614 | OMAP_PIN_INPUT_PULLUP); | ||
615 | omap_mux_init_signal("hdmi_ddc_sda", | ||
616 | OMAP_PIN_INPUT_PULLUP); | ||
617 | } | ||
618 | |||
619 | static struct gpio sdp4430_hdmi_gpios[] = { | 605 | static struct gpio sdp4430_hdmi_gpios[] = { |
620 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 606 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, |
621 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 607 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
@@ -833,9 +819,16 @@ static void omap_4430sdp_display_init(void) | |||
833 | pr_err("%s: Could not get display_sel GPIO\n", __func__); | 819 | pr_err("%s: Could not get display_sel GPIO\n", __func__); |
834 | 820 | ||
835 | sdp4430_lcd_init(); | 821 | sdp4430_lcd_init(); |
836 | sdp4430_hdmi_mux_init(); | ||
837 | sdp4430_picodlp_init(); | 822 | sdp4430_picodlp_init(); |
838 | omap_display_init(&sdp4430_dss_data); | 823 | omap_display_init(&sdp4430_dss_data); |
824 | /* | ||
825 | * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and | ||
826 | * later have external pull up on the HDMI I2C lines | ||
827 | */ | ||
828 | if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2) | ||
829 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | ||
830 | else | ||
831 | omap_hdmi_init(0); | ||
839 | } | 832 | } |
840 | 833 | ||
841 | #ifdef CONFIG_OMAP_MUX | 834 | #ifdef CONFIG_OMAP_MUX |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e96a2e7ad36f..30ad40db2cf3 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -412,21 +412,6 @@ int __init omap4_panda_dvi_init(void) | |||
412 | return r; | 412 | return r; |
413 | } | 413 | } |
414 | 414 | ||
415 | |||
416 | static void omap4_panda_hdmi_mux_init(void) | ||
417 | { | ||
418 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
419 | omap_mux_init_signal("hdmi_hpd", | ||
420 | OMAP_PIN_INPUT_PULLUP); | ||
421 | omap_mux_init_signal("hdmi_cec", | ||
422 | OMAP_PIN_INPUT_PULLUP); | ||
423 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
424 | omap_mux_init_signal("hdmi_ddc_scl", | ||
425 | OMAP_PIN_INPUT_PULLUP); | ||
426 | omap_mux_init_signal("hdmi_ddc_sda", | ||
427 | OMAP_PIN_INPUT_PULLUP); | ||
428 | } | ||
429 | |||
430 | static struct gpio panda_hdmi_gpios[] = { | 415 | static struct gpio panda_hdmi_gpios[] = { |
431 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 416 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, |
432 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 417 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
@@ -478,8 +463,16 @@ void omap4_panda_display_init(void) | |||
478 | if (r) | 463 | if (r) |
479 | pr_err("error initializing panda DVI\n"); | 464 | pr_err("error initializing panda DVI\n"); |
480 | 465 | ||
481 | omap4_panda_hdmi_mux_init(); | ||
482 | omap_display_init(&omap4_panda_dss_data); | 466 | omap_display_init(&omap4_panda_dss_data); |
467 | |||
468 | /* | ||
469 | * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and | ||
470 | * later have external pull up on the HDMI I2C lines | ||
471 | */ | ||
472 | if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2) | ||
473 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | ||
474 | else | ||
475 | omap_hdmi_init(0); | ||
483 | } | 476 | } |
484 | 477 | ||
485 | static void __init omap4_panda_init(void) | 478 | static void __init omap4_panda_init(void) |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 46dfd1ae8f71..0b510ad01a00 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <plat/board.h> | 28 | #include <plat/board.h> |
29 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
30 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
31 | #include <plat/iommu.h> | ||
32 | #include <plat/dma.h> | 31 | #include <plat/dma.h> |
33 | #include <plat/omap_hwmod.h> | 32 | #include <plat/omap_hwmod.h> |
34 | #include <plat/omap_device.h> | 33 | #include <plat/omap_device.h> |
@@ -128,6 +127,10 @@ static struct platform_device omap2cam_device = { | |||
128 | }; | 127 | }; |
129 | #endif | 128 | #endif |
130 | 129 | ||
130 | #if defined(CONFIG_IOMMU_API) | ||
131 | |||
132 | #include <plat/iommu.h> | ||
133 | |||
131 | static struct resource omap3isp_resources[] = { | 134 | static struct resource omap3isp_resources[] = { |
132 | { | 135 | { |
133 | .start = OMAP3430_ISP_BASE, | 136 | .start = OMAP3430_ISP_BASE, |
@@ -224,6 +227,15 @@ int omap3_init_camera(struct isp_platform_data *pdata) | |||
224 | return platform_device_register(&omap3isp_device); | 227 | return platform_device_register(&omap3isp_device); |
225 | } | 228 | } |
226 | 229 | ||
230 | #else /* !CONFIG_IOMMU_API */ | ||
231 | |||
232 | int omap3_init_camera(struct isp_platform_data *pdata) | ||
233 | { | ||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | #endif | ||
238 | |||
227 | static inline void omap_init_camera(void) | 239 | static inline void omap_init_camera(void) |
228 | { | 240 | { |
229 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | 241 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index bc6cf863a563..3c446d1a1781 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <plat/omap-pm.h> | 30 | #include <plat/omap-pm.h> |
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #include "mux.h" | ||
33 | #include "control.h" | 34 | #include "control.h" |
34 | #include "display.h" | 35 | #include "display.h" |
35 | 36 | ||
@@ -97,6 +98,36 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { | |||
97 | { "dss_hdmi", "omapdss_hdmi", -1 }, | 98 | { "dss_hdmi", "omapdss_hdmi", -1 }, |
98 | }; | 99 | }; |
99 | 100 | ||
101 | static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | ||
102 | { | ||
103 | u32 reg; | ||
104 | u16 control_i2c_1; | ||
105 | |||
106 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
107 | omap_mux_init_signal("hdmi_hpd", | ||
108 | OMAP_PIN_INPUT_PULLUP); | ||
109 | omap_mux_init_signal("hdmi_cec", | ||
110 | OMAP_PIN_INPUT_PULLUP); | ||
111 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
112 | omap_mux_init_signal("hdmi_ddc_scl", | ||
113 | OMAP_PIN_INPUT_PULLUP); | ||
114 | omap_mux_init_signal("hdmi_ddc_sda", | ||
115 | OMAP_PIN_INPUT_PULLUP); | ||
116 | |||
117 | /* | ||
118 | * CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and | ||
119 | * HDMI_DDC_SCL_PULLUPRESX (bit 24) are set to disable | ||
120 | * internal pull up resistor. | ||
121 | */ | ||
122 | if (flags & OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP) { | ||
123 | control_i2c_1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_I2C_1; | ||
124 | reg = omap4_ctrl_pad_readl(control_i2c_1); | ||
125 | reg |= (OMAP4_HDMI_DDC_SDA_PULLUPRESX_MASK | | ||
126 | OMAP4_HDMI_DDC_SCL_PULLUPRESX_MASK); | ||
127 | omap4_ctrl_pad_writel(reg, control_i2c_1); | ||
128 | } | ||
129 | } | ||
130 | |||
100 | static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | 131 | static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) |
101 | { | 132 | { |
102 | u32 enable_mask, enable_shift; | 133 | u32 enable_mask, enable_shift; |
@@ -130,6 +161,14 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | |||
130 | return 0; | 161 | return 0; |
131 | } | 162 | } |
132 | 163 | ||
164 | int omap_hdmi_init(enum omap_hdmi_flags flags) | ||
165 | { | ||
166 | if (cpu_is_omap44xx()) | ||
167 | omap4_hdmi_mux_pads(flags); | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
133 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) | 172 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) |
134 | { | 173 | { |
135 | if (cpu_is_omap44xx()) | 174 | if (cpu_is_omap44xx()) |
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c index 69f3c72d959b..d8f8ef40290f 100644 --- a/arch/arm/mach-omap2/omap-secure.c +++ b/arch/arm/mach-omap2/omap-secure.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/memblock.h> | 16 | #include <linux/memblock.h> |
17 | 17 | ||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/memblock.h> | ||
19 | 20 | ||
20 | #include <mach/omap-secure.h> | 21 | #include <mach/omap-secure.h> |
21 | 22 | ||
@@ -57,20 +58,10 @@ u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs, u32 arg1, u32 arg2, | |||
57 | /* Allocate the memory to save secure ram */ | 58 | /* Allocate the memory to save secure ram */ |
58 | int __init omap_secure_ram_reserve_memblock(void) | 59 | int __init omap_secure_ram_reserve_memblock(void) |
59 | { | 60 | { |
60 | phys_addr_t paddr; | ||
61 | u32 size = OMAP_SECURE_RAM_STORAGE; | 61 | u32 size = OMAP_SECURE_RAM_STORAGE; |
62 | 62 | ||
63 | size = ALIGN(size, SZ_1M); | 63 | size = ALIGN(size, SZ_1M); |
64 | paddr = memblock_alloc(size, SZ_1M); | 64 | omap_secure_memblock_base = arm_memblock_steal(size, SZ_1M); |
65 | if (!paddr) { | ||
66 | pr_err("%s: failed to reserve %x bytes\n", | ||
67 | __func__, size); | ||
68 | return -ENOMEM; | ||
69 | } | ||
70 | memblock_free(paddr, size); | ||
71 | memblock_remove(paddr, size); | ||
72 | |||
73 | omap_secure_memblock_base = paddr; | ||
74 | 65 | ||
75 | return 0; | 66 | return 0; |
76 | } | 67 | } |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index bc16c818c6b7..40a8fbc07e4b 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/hardware/gic.h> | 20 | #include <asm/hardware/gic.h> |
21 | #include <asm/hardware/cache-l2x0.h> | 21 | #include <asm/hardware/cache-l2x0.h> |
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <asm/memblock.h> | ||
23 | 24 | ||
24 | #include <plat/irqs.h> | 25 | #include <plat/irqs.h> |
25 | #include <plat/sram.h> | 26 | #include <plat/sram.h> |
@@ -61,13 +62,8 @@ static int __init omap_barriers_init(void) | |||
61 | return -ENODEV; | 62 | return -ENODEV; |
62 | 63 | ||
63 | size = ALIGN(PAGE_SIZE, SZ_1M); | 64 | size = ALIGN(PAGE_SIZE, SZ_1M); |
64 | paddr = memblock_alloc(size, SZ_1M); | 65 | paddr = arm_memblock_steal(size, SZ_1M); |
65 | if (!paddr) { | 66 | |
66 | pr_err("%s: failed to reserve 4 Kbytes\n", __func__); | ||
67 | return -ENOMEM; | ||
68 | } | ||
69 | memblock_free(paddr, size); | ||
70 | memblock_remove(paddr, size); | ||
71 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; | 67 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; |
72 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); | 68 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); |
73 | dram_io_desc[0].length = size; | 69 | dram_io_desc[0].length = size; |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 0069561464f9..e62962117763 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -117,17 +117,14 @@ static void __init realview_eb_map_io(void) | |||
117 | 117 | ||
118 | static struct pl061_platform_data gpio0_plat_data = { | 118 | static struct pl061_platform_data gpio0_plat_data = { |
119 | .gpio_base = 0, | 119 | .gpio_base = 0, |
120 | .irq_base = -1, | ||
121 | }; | 120 | }; |
122 | 121 | ||
123 | static struct pl061_platform_data gpio1_plat_data = { | 122 | static struct pl061_platform_data gpio1_plat_data = { |
124 | .gpio_base = 8, | 123 | .gpio_base = 8, |
125 | .irq_base = -1, | ||
126 | }; | 124 | }; |
127 | 125 | ||
128 | static struct pl061_platform_data gpio2_plat_data = { | 126 | static struct pl061_platform_data gpio2_plat_data = { |
129 | .gpio_base = 16, | 127 | .gpio_base = 16, |
130 | .irq_base = -1, | ||
131 | }; | 128 | }; |
132 | 129 | ||
133 | static struct pl022_ssp_controller ssp0_plat_data = { | 130 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 8fe395568a47..e4abe94fb11a 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -113,17 +113,14 @@ static void __init realview_pb1176_map_io(void) | |||
113 | 113 | ||
114 | static struct pl061_platform_data gpio0_plat_data = { | 114 | static struct pl061_platform_data gpio0_plat_data = { |
115 | .gpio_base = 0, | 115 | .gpio_base = 0, |
116 | .irq_base = -1, | ||
117 | }; | 116 | }; |
118 | 117 | ||
119 | static struct pl061_platform_data gpio1_plat_data = { | 118 | static struct pl061_platform_data gpio1_plat_data = { |
120 | .gpio_base = 8, | 119 | .gpio_base = 8, |
121 | .irq_base = -1, | ||
122 | }; | 120 | }; |
123 | 121 | ||
124 | static struct pl061_platform_data gpio2_plat_data = { | 122 | static struct pl061_platform_data gpio2_plat_data = { |
125 | .gpio_base = 16, | 123 | .gpio_base = 16, |
126 | .irq_base = -1, | ||
127 | }; | 124 | }; |
128 | 125 | ||
129 | static struct pl022_ssp_controller ssp0_plat_data = { | 126 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 34a26011bb89..127a3fd42ab1 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -112,17 +112,14 @@ static void __init realview_pb11mp_map_io(void) | |||
112 | 112 | ||
113 | static struct pl061_platform_data gpio0_plat_data = { | 113 | static struct pl061_platform_data gpio0_plat_data = { |
114 | .gpio_base = 0, | 114 | .gpio_base = 0, |
115 | .irq_base = -1, | ||
116 | }; | 115 | }; |
117 | 116 | ||
118 | static struct pl061_platform_data gpio1_plat_data = { | 117 | static struct pl061_platform_data gpio1_plat_data = { |
119 | .gpio_base = 8, | 118 | .gpio_base = 8, |
120 | .irq_base = -1, | ||
121 | }; | 119 | }; |
122 | 120 | ||
123 | static struct pl061_platform_data gpio2_plat_data = { | 121 | static struct pl061_platform_data gpio2_plat_data = { |
124 | .gpio_base = 16, | 122 | .gpio_base = 16, |
125 | .irq_base = -1, | ||
126 | }; | 123 | }; |
127 | 124 | ||
128 | static struct pl022_ssp_controller ssp0_plat_data = { | 125 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index d26a6def1d65..25b2e59296f8 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -102,17 +102,14 @@ static void __init realview_pba8_map_io(void) | |||
102 | 102 | ||
103 | static struct pl061_platform_data gpio0_plat_data = { | 103 | static struct pl061_platform_data gpio0_plat_data = { |
104 | .gpio_base = 0, | 104 | .gpio_base = 0, |
105 | .irq_base = -1, | ||
106 | }; | 105 | }; |
107 | 106 | ||
108 | static struct pl061_platform_data gpio1_plat_data = { | 107 | static struct pl061_platform_data gpio1_plat_data = { |
109 | .gpio_base = 8, | 108 | .gpio_base = 8, |
110 | .irq_base = -1, | ||
111 | }; | 109 | }; |
112 | 110 | ||
113 | static struct pl061_platform_data gpio2_plat_data = { | 111 | static struct pl061_platform_data gpio2_plat_data = { |
114 | .gpio_base = 16, | 112 | .gpio_base = 16, |
115 | .irq_base = -1, | ||
116 | }; | 113 | }; |
117 | 114 | ||
118 | static struct pl022_ssp_controller ssp0_plat_data = { | 115 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index a250fb4124bf..ac715645b860 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -124,17 +124,14 @@ static void __init realview_pbx_map_io(void) | |||
124 | 124 | ||
125 | static struct pl061_platform_data gpio0_plat_data = { | 125 | static struct pl061_platform_data gpio0_plat_data = { |
126 | .gpio_base = 0, | 126 | .gpio_base = 0, |
127 | .irq_base = -1, | ||
128 | }; | 127 | }; |
129 | 128 | ||
130 | static struct pl061_platform_data gpio1_plat_data = { | 129 | static struct pl061_platform_data gpio1_plat_data = { |
131 | .gpio_base = 8, | 130 | .gpio_base = 8, |
132 | .irq_base = -1, | ||
133 | }; | 131 | }; |
134 | 132 | ||
135 | static struct pl061_platform_data gpio2_plat_data = { | 133 | static struct pl061_platform_data gpio2_plat_data = { |
136 | .gpio_base = 16, | 134 | .gpio_base = 16, |
137 | .irq_base = -1, | ||
138 | }; | 135 | }; |
139 | 136 | ||
140 | static struct pl022_ssp_controller ssp0_plat_data = { | 137 | static struct pl022_ssp_controller ssp0_plat_data = { |
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index 6b93e200bcac..ebafe8aa8956 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -202,6 +202,7 @@ static struct irda_platform_data assabet_irda_data = { | |||
202 | static struct mcp_plat_data assabet_mcp_data = { | 202 | static struct mcp_plat_data assabet_mcp_data = { |
203 | .mccr0 = MCCR0_ADM, | 203 | .mccr0 = MCCR0_ADM, |
204 | .sclk_rate = 11981000, | 204 | .sclk_rate = 11981000, |
205 | .codec = "ucb1x00", | ||
205 | }; | 206 | }; |
206 | 207 | ||
207 | static void __init assabet_init(void) | 208 | static void __init assabet_init(void) |
@@ -252,6 +253,17 @@ static void __init assabet_init(void) | |||
252 | sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources, | 253 | sa11x0_register_mtd(&assabet_flash_data, assabet_flash_resources, |
253 | ARRAY_SIZE(assabet_flash_resources)); | 254 | ARRAY_SIZE(assabet_flash_resources)); |
254 | sa11x0_register_irda(&assabet_irda_data); | 255 | sa11x0_register_irda(&assabet_irda_data); |
256 | |||
257 | /* | ||
258 | * Setup the PPC unit correctly. | ||
259 | */ | ||
260 | PPDR &= ~PPC_RXD4; | ||
261 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
262 | PSDR |= PPC_RXD4; | ||
263 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
264 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
265 | |||
266 | ASSABET_BCR_set(ASSABET_BCR_CODEC_RST); | ||
255 | sa11x0_register_mcp(&assabet_mcp_data); | 267 | sa11x0_register_mcp(&assabet_mcp_data); |
256 | } | 268 | } |
257 | 269 | ||
@@ -268,7 +280,7 @@ static void __init map_sa1100_gpio_regs( void ) | |||
268 | int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO); | 280 | int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO); |
269 | pmd_t *pmd; | 281 | pmd_t *pmd; |
270 | 282 | ||
271 | pmd = pmd_offset(pgd_offset_k(virt), virt); | 283 | pmd = pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt); |
272 | *pmd = __pmd(phys | prot); | 284 | *pmd = __pmd(phys | prot); |
273 | flush_pmd_entry(pmd); | 285 | flush_pmd_entry(pmd); |
274 | } | 286 | } |
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index 11bb6d0b9be3..d12d0f48b1dc 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c | |||
@@ -124,12 +124,23 @@ static void __init cerf_map_io(void) | |||
124 | static struct mcp_plat_data cerf_mcp_data = { | 124 | static struct mcp_plat_data cerf_mcp_data = { |
125 | .mccr0 = MCCR0_ADM, | 125 | .mccr0 = MCCR0_ADM, |
126 | .sclk_rate = 11981000, | 126 | .sclk_rate = 11981000, |
127 | .codec = "ucb1x00", | ||
127 | }; | 128 | }; |
128 | 129 | ||
129 | static void __init cerf_init(void) | 130 | static void __init cerf_init(void) |
130 | { | 131 | { |
131 | platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); | 132 | platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); |
132 | sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); | 133 | sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); |
134 | |||
135 | /* | ||
136 | * Setup the PPC unit correctly. | ||
137 | */ | ||
138 | PPDR &= ~PPC_RXD4; | ||
139 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
140 | PSDR |= PPC_RXD4; | ||
141 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
142 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
143 | |||
133 | sa11x0_register_mcp(&cerf_mcp_data); | 144 | sa11x0_register_mcp(&cerf_mcp_data); |
134 | } | 145 | } |
135 | 146 | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index b9060e236def..c483912d08af 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/timer.h> | 27 | #include <linux/timer.h> |
28 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
29 | #include <linux/pda_power.h> | 29 | #include <linux/pda_power.h> |
30 | #include <linux/mfd/ucb1x00.h> | ||
30 | 31 | ||
31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
@@ -85,10 +86,15 @@ static struct scoop_pcmcia_config collie_pcmcia_config = { | |||
85 | .num_devs = 1, | 86 | .num_devs = 1, |
86 | }; | 87 | }; |
87 | 88 | ||
89 | static struct ucb1x00_plat_data collie_ucb1x00_data = { | ||
90 | .gpio_base = COLLIE_TC35143_GPIO_BASE, | ||
91 | }; | ||
92 | |||
88 | static struct mcp_plat_data collie_mcp_data = { | 93 | static struct mcp_plat_data collie_mcp_data = { |
89 | .mccr0 = MCCR0_ADM | MCCR0_ExtClk, | 94 | .mccr0 = MCCR0_ADM | MCCR0_ExtClk, |
90 | .sclk_rate = 9216000, | 95 | .sclk_rate = 9216000, |
91 | .gpio_base = COLLIE_TC35143_GPIO_BASE, | 96 | .codec = "ucb1x00", |
97 | .codec_pdata = &collie_ucb1x00_data, | ||
92 | }; | 98 | }; |
93 | 99 | ||
94 | /* | 100 | /* |
@@ -351,6 +357,16 @@ static void __init collie_init(void) | |||
351 | 357 | ||
352 | sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, | 358 | sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, |
353 | ARRAY_SIZE(collie_flash_resources)); | 359 | ARRAY_SIZE(collie_flash_resources)); |
360 | |||
361 | /* | ||
362 | * Setup the PPC unit correctly. | ||
363 | */ | ||
364 | PPDR &= ~PPC_RXD4; | ||
365 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
366 | PSDR |= PPC_RXD4; | ||
367 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
368 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
369 | |||
354 | sa11x0_register_mcp(&collie_mcp_data); | 370 | sa11x0_register_mcp(&collie_mcp_data); |
355 | 371 | ||
356 | sharpsl_save_param(); | 372 | sharpsl_save_param(); |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 480d2ea46b00..e3a28ca2a7b7 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -217,10 +217,15 @@ static struct platform_device sa11x0uart3_device = { | |||
217 | static struct resource sa11x0mcp_resources[] = { | 217 | static struct resource sa11x0mcp_resources[] = { |
218 | [0] = { | 218 | [0] = { |
219 | .start = __PREG(Ser4MCCR0), | 219 | .start = __PREG(Ser4MCCR0), |
220 | .end = __PREG(Ser4MCCR0) + 0xffff, | 220 | .end = __PREG(Ser4MCCR0) + 0x1C - 1, |
221 | .flags = IORESOURCE_MEM, | 221 | .flags = IORESOURCE_MEM, |
222 | }, | 222 | }, |
223 | [1] = { | 223 | [1] = { |
224 | .start = __PREG(Ser4MCCR1), | ||
225 | .end = __PREG(Ser4MCCR1) + 0x4 - 1, | ||
226 | .flags = IORESOURCE_MEM, | ||
227 | }, | ||
228 | [2] = { | ||
224 | .start = IRQ_Ser4MCP, | 229 | .start = IRQ_Ser4MCP, |
225 | .end = IRQ_Ser4MCP, | 230 | .end = IRQ_Ser4MCP, |
226 | .flags = IORESOURCE_IRQ, | 231 | .flags = IORESOURCE_IRQ, |
diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h index 703631887c94..a38fc4f54241 100644 --- a/arch/arm/mach-sa1100/include/mach/gpio.h +++ b/arch/arm/mach-sa1100/include/mach/gpio.h | |||
@@ -51,7 +51,4 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
51 | 51 | ||
52 | #define gpio_cansleep __gpio_cansleep | 52 | #define gpio_cansleep __gpio_cansleep |
53 | 53 | ||
54 | #define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ | ||
55 | (IRQ_GPIO11 - 11 + gpio)) | ||
56 | |||
57 | #endif | 54 | #endif |
diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h index ed1a331508a7..586cec898b35 100644 --- a/arch/arm/mach-sa1100/include/mach/mcp.h +++ b/arch/arm/mach-sa1100/include/mach/mcp.h | |||
@@ -17,6 +17,8 @@ struct mcp_plat_data { | |||
17 | u32 mccr1; | 17 | u32 mccr1; |
18 | unsigned int sclk_rate; | 18 | unsigned int sclk_rate; |
19 | int gpio_base; | 19 | int gpio_base; |
20 | const char *codec; | ||
21 | void *codec_pdata; | ||
20 | }; | 22 | }; |
21 | 23 | ||
22 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index af4e2761f3db..d117ceab6215 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
@@ -24,10 +24,20 @@ | |||
24 | static struct mcp_plat_data lart_mcp_data = { | 24 | static struct mcp_plat_data lart_mcp_data = { |
25 | .mccr0 = MCCR0_ADM, | 25 | .mccr0 = MCCR0_ADM, |
26 | .sclk_rate = 11981000, | 26 | .sclk_rate = 11981000, |
27 | .codec = "ucb1x00", | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | static void __init lart_init(void) | 30 | static void __init lart_init(void) |
30 | { | 31 | { |
32 | /* | ||
33 | * Setup the PPC unit correctly. | ||
34 | */ | ||
35 | PPDR &= ~PPC_RXD4; | ||
36 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
37 | PSDR |= PPC_RXD4; | ||
38 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
39 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
40 | |||
31 | sa11x0_register_mcp(&lart_mcp_data); | 41 | sa11x0_register_mcp(&lart_mcp_data); |
32 | } | 42 | } |
33 | 43 | ||
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index 318b2b766a0b..748d34435b3f 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c | |||
@@ -55,11 +55,22 @@ static struct resource shannon_flash_resource = { | |||
55 | static struct mcp_plat_data shannon_mcp_data = { | 55 | static struct mcp_plat_data shannon_mcp_data = { |
56 | .mccr0 = MCCR0_ADM, | 56 | .mccr0 = MCCR0_ADM, |
57 | .sclk_rate = 11981000, | 57 | .sclk_rate = 11981000, |
58 | .codec = "ucb1x00", | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | static void __init shannon_init(void) | 61 | static void __init shannon_init(void) |
61 | { | 62 | { |
62 | sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); | 63 | sa11x0_register_mtd(&shannon_flash_data, &shannon_flash_resource, 1); |
64 | |||
65 | /* | ||
66 | * Setup the PPC unit correctly. | ||
67 | */ | ||
68 | PPDR &= ~PPC_RXD4; | ||
69 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
70 | PSDR |= PPC_RXD4; | ||
71 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
72 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
73 | |||
63 | sa11x0_register_mcp(&shannon_mcp_data); | 74 | sa11x0_register_mcp(&shannon_mcp_data); |
64 | } | 75 | } |
65 | 76 | ||
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index e17c04d6e324..458ececefa58 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/mfd/ucb1x00.h> | ||
17 | 18 | ||
18 | #include <asm/irq.h> | 19 | #include <asm/irq.h> |
19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
@@ -187,10 +188,15 @@ static struct resource simpad_flash_resources [] = { | |||
187 | } | 188 | } |
188 | }; | 189 | }; |
189 | 190 | ||
191 | static struct ucb1x00_plat_data simpad_ucb1x00_data = { | ||
192 | .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, | ||
193 | }; | ||
194 | |||
190 | static struct mcp_plat_data simpad_mcp_data = { | 195 | static struct mcp_plat_data simpad_mcp_data = { |
191 | .mccr0 = MCCR0_ADM, | 196 | .mccr0 = MCCR0_ADM, |
192 | .sclk_rate = 11981000, | 197 | .sclk_rate = 11981000, |
193 | .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, | 198 | .codec = "ucb1300", |
199 | .codec_pdata = &simpad_ucb1x00_data, | ||
194 | }; | 200 | }; |
195 | 201 | ||
196 | 202 | ||
@@ -378,6 +384,16 @@ static int __init simpad_init(void) | |||
378 | 384 | ||
379 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, | 385 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, |
380 | ARRAY_SIZE(simpad_flash_resources)); | 386 | ARRAY_SIZE(simpad_flash_resources)); |
387 | |||
388 | /* | ||
389 | * Setup the PPC unit correctly. | ||
390 | */ | ||
391 | PPDR &= ~PPC_RXD4; | ||
392 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; | ||
393 | PSDR |= PPC_RXD4; | ||
394 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
395 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); | ||
396 | |||
381 | sa11x0_register_mcp(&simpad_mcp_data); | 397 | sa11x0_register_mcp(&simpad_mcp_data); |
382 | 398 | ||
383 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 399 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 75596948029c..9245f21c29d1 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -160,19 +160,12 @@ static struct resource sh_mmcif_resources[] = { | |||
160 | }, | 160 | }, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
164 | .chan_priv_rx = { | ||
165 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
166 | }, | ||
167 | .chan_priv_tx = { | ||
168 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
169 | }, | ||
170 | }; | ||
171 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { | 163 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { |
172 | .sup_pclk = 0, | 164 | .sup_pclk = 0, |
173 | .ocr = MMC_VDD_165_195, | 165 | .ocr = MMC_VDD_165_195, |
174 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, | 166 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, |
175 | .dma = &sh_mmcif_dma, | 167 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
168 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
176 | }; | 169 | }; |
177 | 170 | ||
178 | static struct platform_device mmc_device = { | 171 | static struct platform_device mmc_device = { |
@@ -272,7 +265,7 @@ static struct sh_mobile_lcdc_info lcdc0_info = { | |||
272 | .flags = LCDC_FLAGS_DWPOL, | 265 | .flags = LCDC_FLAGS_DWPOL, |
273 | .lcd_size_cfg.width = 44, | 266 | .lcd_size_cfg.width = 44, |
274 | .lcd_size_cfg.height = 79, | 267 | .lcd_size_cfg.height = 79, |
275 | .bpp = 16, | 268 | .fourcc = V4L2_PIX_FMT_RGB565, |
276 | .lcd_cfg = lcdc0_modes, | 269 | .lcd_cfg = lcdc0_modes, |
277 | .num_cfg = ARRAY_SIZE(lcdc0_modes), | 270 | .num_cfg = ARRAY_SIZE(lcdc0_modes), |
278 | .board_cfg = { | 271 | .board_cfg = { |
@@ -322,12 +315,54 @@ static struct resource mipidsi0_resources[] = { | |||
322 | }, | 315 | }, |
323 | }; | 316 | }; |
324 | 317 | ||
318 | static int sh_mipi_set_dot_clock(struct platform_device *pdev, | ||
319 | void __iomem *base, | ||
320 | int enable) | ||
321 | { | ||
322 | struct clk *pck, *phy; | ||
323 | int ret; | ||
324 | |||
325 | pck = clk_get(&pdev->dev, "dsip_clk"); | ||
326 | if (IS_ERR(pck)) { | ||
327 | ret = PTR_ERR(pck); | ||
328 | goto sh_mipi_set_dot_clock_pck_err; | ||
329 | } | ||
330 | |||
331 | phy = clk_get(&pdev->dev, "dsiphy_clk"); | ||
332 | if (IS_ERR(phy)) { | ||
333 | ret = PTR_ERR(phy); | ||
334 | goto sh_mipi_set_dot_clock_phy_err; | ||
335 | } | ||
336 | |||
337 | if (enable) { | ||
338 | clk_set_rate(pck, clk_round_rate(pck, 24000000)); | ||
339 | clk_set_rate(phy, clk_round_rate(pck, 510000000)); | ||
340 | clk_enable(pck); | ||
341 | clk_enable(phy); | ||
342 | } else { | ||
343 | clk_disable(pck); | ||
344 | clk_disable(phy); | ||
345 | } | ||
346 | |||
347 | ret = 0; | ||
348 | |||
349 | clk_put(phy); | ||
350 | sh_mipi_set_dot_clock_phy_err: | ||
351 | clk_put(pck); | ||
352 | sh_mipi_set_dot_clock_pck_err: | ||
353 | return ret; | ||
354 | } | ||
355 | |||
325 | static struct sh_mipi_dsi_info mipidsi0_info = { | 356 | static struct sh_mipi_dsi_info mipidsi0_info = { |
326 | .data_format = MIPI_RGB888, | 357 | .data_format = MIPI_RGB888, |
327 | .lcd_chan = &lcdc0_info.ch[0], | 358 | .lcd_chan = &lcdc0_info.ch[0], |
359 | .lane = 2, | ||
328 | .vsynw_offset = 20, | 360 | .vsynw_offset = 20, |
329 | .clksrc = 1, | 361 | .clksrc = 1, |
330 | .flags = SH_MIPI_DSI_HSABM, | 362 | .flags = SH_MIPI_DSI_HSABM | |
363 | SH_MIPI_DSI_SYNC_PULSES_MODE | | ||
364 | SH_MIPI_DSI_HSbyteCLK, | ||
365 | .set_dot_clock = sh_mipi_set_dot_clock, | ||
331 | }; | 366 | }; |
332 | 367 | ||
333 | static struct platform_device mipidsi0_device = { | 368 | static struct platform_device mipidsi0_device = { |
@@ -473,8 +508,6 @@ static void __init ag5evm_map_io(void) | |||
473 | shmobile_setup_console(); | 508 | shmobile_setup_console(); |
474 | } | 509 | } |
475 | 510 | ||
476 | #define DSI0PHYCR 0xe615006c | ||
477 | |||
478 | static void __init ag5evm_init(void) | 511 | static void __init ag5evm_init(void) |
479 | { | 512 | { |
480 | sh73a0_pinmux_init(); | 513 | sh73a0_pinmux_init(); |
@@ -555,9 +588,6 @@ static void __init ag5evm_init(void) | |||
555 | gpio_direction_output(GPIO_PORT235, 0); | 588 | gpio_direction_output(GPIO_PORT235, 0); |
556 | lcd_backlight_reset(); | 589 | lcd_backlight_reset(); |
557 | 590 | ||
558 | /* MIPI-DSI clock setup */ | ||
559 | __raw_writel(0x2a809010, DSI0PHYCR); | ||
560 | |||
561 | /* enable SDHI0 on CN15 [SD I/F] */ | 591 | /* enable SDHI0 on CN15 [SD I/F] */ |
562 | gpio_request(GPIO_FN_SDHICD0, NULL); | 592 | gpio_request(GPIO_FN_SDHICD0, NULL); |
563 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 593 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index d2e7b73aa9b6..eeb4d9664584 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -295,15 +295,6 @@ static struct resource sh_mmcif_resources[] = { | |||
295 | }, | 295 | }, |
296 | }; | 296 | }; |
297 | 297 | ||
298 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
299 | .chan_priv_rx = { | ||
300 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
301 | }, | ||
302 | .chan_priv_tx = { | ||
303 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
304 | }, | ||
305 | }; | ||
306 | |||
307 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 298 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
308 | .sup_pclk = 0, | 299 | .sup_pclk = 0, |
309 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | 300 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
@@ -311,7 +302,8 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { | |||
311 | MMC_CAP_8_BIT_DATA | | 302 | MMC_CAP_8_BIT_DATA | |
312 | MMC_CAP_NEEDS_POLL, | 303 | MMC_CAP_NEEDS_POLL, |
313 | .get_cd = slot_cn7_get_cd, | 304 | .get_cd = slot_cn7_get_cd, |
314 | .dma = &sh_mmcif_dma, | 305 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
306 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
315 | }; | 307 | }; |
316 | 308 | ||
317 | static struct platform_device sh_mmcif_device = { | 309 | static struct platform_device sh_mmcif_device = { |
@@ -491,7 +483,7 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
491 | .meram_dev = &meram_info, | 483 | .meram_dev = &meram_info, |
492 | .ch[0] = { | 484 | .ch[0] = { |
493 | .chan = LCDC_CHAN_MAINLCD, | 485 | .chan = LCDC_CHAN_MAINLCD, |
494 | .bpp = 16, | 486 | .fourcc = V4L2_PIX_FMT_RGB565, |
495 | .lcd_cfg = ap4evb_lcdc_modes, | 487 | .lcd_cfg = ap4evb_lcdc_modes, |
496 | .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), | 488 | .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), |
497 | .meram_cfg = &lcd_meram_cfg, | 489 | .meram_cfg = &lcd_meram_cfg, |
@@ -564,6 +556,30 @@ static struct platform_device keysc_device = { | |||
564 | }; | 556 | }; |
565 | 557 | ||
566 | /* MIPI-DSI */ | 558 | /* MIPI-DSI */ |
559 | #define PHYCTRL 0x0070 | ||
560 | static int sh_mipi_set_dot_clock(struct platform_device *pdev, | ||
561 | void __iomem *base, | ||
562 | int enable) | ||
563 | { | ||
564 | struct clk *pck = clk_get(&pdev->dev, "dsip_clk"); | ||
565 | void __iomem *phy = base + PHYCTRL; | ||
566 | |||
567 | if (IS_ERR(pck)) | ||
568 | return PTR_ERR(pck); | ||
569 | |||
570 | if (enable) { | ||
571 | clk_set_rate(pck, clk_round_rate(pck, 24000000)); | ||
572 | iowrite32(ioread32(phy) | (0xb << 8), phy); | ||
573 | clk_enable(pck); | ||
574 | } else { | ||
575 | clk_disable(pck); | ||
576 | } | ||
577 | |||
578 | clk_put(pck); | ||
579 | |||
580 | return 0; | ||
581 | } | ||
582 | |||
567 | static struct resource mipidsi0_resources[] = { | 583 | static struct resource mipidsi0_resources[] = { |
568 | [0] = { | 584 | [0] = { |
569 | .start = 0xffc60000, | 585 | .start = 0xffc60000, |
@@ -580,7 +596,11 @@ static struct resource mipidsi0_resources[] = { | |||
580 | static struct sh_mipi_dsi_info mipidsi0_info = { | 596 | static struct sh_mipi_dsi_info mipidsi0_info = { |
581 | .data_format = MIPI_RGB888, | 597 | .data_format = MIPI_RGB888, |
582 | .lcd_chan = &lcdc_info.ch[0], | 598 | .lcd_chan = &lcdc_info.ch[0], |
599 | .lane = 2, | ||
583 | .vsynw_offset = 17, | 600 | .vsynw_offset = 17, |
601 | .flags = SH_MIPI_DSI_SYNC_PULSES_MODE | | ||
602 | SH_MIPI_DSI_HSbyteCLK, | ||
603 | .set_dot_clock = sh_mipi_set_dot_clock, | ||
584 | }; | 604 | }; |
585 | 605 | ||
586 | static struct platform_device mipidsi0_device = { | 606 | static struct platform_device mipidsi0_device = { |
@@ -798,7 +818,7 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = { | |||
798 | .meram_dev = &meram_info, | 818 | .meram_dev = &meram_info, |
799 | .ch[0] = { | 819 | .ch[0] = { |
800 | .chan = LCDC_CHAN_MAINLCD, | 820 | .chan = LCDC_CHAN_MAINLCD, |
801 | .bpp = 16, | 821 | .fourcc = V4L2_PIX_FMT_RGB565, |
802 | .interface_type = RGB24, | 822 | .interface_type = RGB24, |
803 | .clock_divider = 1, | 823 | .clock_divider = 1, |
804 | .flags = LCDC_FLAGS_DWPOL, | 824 | .flags = LCDC_FLAGS_DWPOL, |
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index 857ceeec1bb0..c8e7ca23fc06 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -143,11 +143,10 @@ static struct gpio_keys_button gpio_buttons[] = { | |||
143 | static struct gpio_keys_platform_data gpio_key_info = { | 143 | static struct gpio_keys_platform_data gpio_key_info = { |
144 | .buttons = gpio_buttons, | 144 | .buttons = gpio_buttons, |
145 | .nbuttons = ARRAY_SIZE(gpio_buttons), | 145 | .nbuttons = ARRAY_SIZE(gpio_buttons), |
146 | .poll_interval = 250, /* polled for now */ | ||
147 | }; | 146 | }; |
148 | 147 | ||
149 | static struct platform_device gpio_keys_device = { | 148 | static struct platform_device gpio_keys_device = { |
150 | .name = "gpio-keys-polled", /* polled for now */ | 149 | .name = "gpio-keys", |
151 | .id = -1, | 150 | .id = -1, |
152 | .dev = { | 151 | .dev = { |
153 | .platform_data = &gpio_key_info, | 152 | .platform_data = &gpio_key_info, |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index cbc5934ae03f..a2813247b455 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/smsc911x.h> | 43 | #include <linux/smsc911x.h> |
44 | #include <linux/sh_intc.h> | 44 | #include <linux/sh_intc.h> |
45 | #include <linux/tca6416_keypad.h> | 45 | #include <linux/tca6416_keypad.h> |
46 | #include <linux/usb/r8a66597.h> | ||
47 | #include <linux/usb/renesas_usbhs.h> | 46 | #include <linux/usb/renesas_usbhs.h> |
48 | #include <linux/dma-mapping.h> | 47 | #include <linux/dma-mapping.h> |
49 | 48 | ||
@@ -145,11 +144,6 @@ | |||
145 | * 1-2 short | VBUS 5V | Host | 144 | * 1-2 short | VBUS 5V | Host |
146 | * open | external VBUS | Function | 145 | * open | external VBUS | Function |
147 | * | 146 | * |
148 | * *1 | ||
149 | * CN31 is used as | ||
150 | * CONFIG_USB_R8A66597_HCD Host | ||
151 | * CONFIG_USB_RENESAS_USBHS Function | ||
152 | * | ||
153 | * CAUTION | 147 | * CAUTION |
154 | * | 148 | * |
155 | * renesas_usbhs driver can use external interrupt mode | 149 | * renesas_usbhs driver can use external interrupt mode |
@@ -161,15 +155,6 @@ | |||
161 | * mackerel can not use external interrupt (IRQ7-PORT167) mode on "USB0", | 155 | * mackerel can not use external interrupt (IRQ7-PORT167) mode on "USB0", |
162 | * because Touchscreen is using IRQ7-PORT40. | 156 | * because Touchscreen is using IRQ7-PORT40. |
163 | * It is impossible to use IRQ7 demux on this board. | 157 | * It is impossible to use IRQ7 demux on this board. |
164 | * | ||
165 | * We can use external interrupt mode USB-Function on "USB1". | ||
166 | * USB1 can become Host by r8a66597, and become Function by renesas_usbhs. | ||
167 | * But don't select both drivers in same time. | ||
168 | * These uses same IRQ number for request_irq(), and aren't supporting | ||
169 | * IRQF_SHARED / IORESOURCE_IRQ_SHAREABLE. | ||
170 | * | ||
171 | * Actually these are old/new version of USB driver. | ||
172 | * This mean its register will be broken if it supports shared IRQ, | ||
173 | */ | 158 | */ |
174 | 159 | ||
175 | /* | 160 | /* |
@@ -208,6 +193,16 @@ | |||
208 | */ | 193 | */ |
209 | 194 | ||
210 | /* | 195 | /* |
196 | * FSI - AK4642 | ||
197 | * | ||
198 | * it needs amixer settings for playing | ||
199 | * | ||
200 | * amixer set "Headphone" on | ||
201 | * amixer set "HPOUTL Mixer DACH" on | ||
202 | * amixer set "HPOUTR Mixer DACH" on | ||
203 | */ | ||
204 | |||
205 | /* | ||
211 | * FIXME !! | 206 | * FIXME !! |
212 | * | 207 | * |
213 | * gpio_no_direction | 208 | * gpio_no_direction |
@@ -388,7 +383,7 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
388 | .clock_source = LCDC_CLK_BUS, | 383 | .clock_source = LCDC_CLK_BUS, |
389 | .ch[0] = { | 384 | .ch[0] = { |
390 | .chan = LCDC_CHAN_MAINLCD, | 385 | .chan = LCDC_CHAN_MAINLCD, |
391 | .bpp = 16, | 386 | .fourcc = V4L2_PIX_FMT_RGB565, |
392 | .lcd_cfg = mackerel_lcdc_modes, | 387 | .lcd_cfg = mackerel_lcdc_modes, |
393 | .num_cfg = ARRAY_SIZE(mackerel_lcdc_modes), | 388 | .num_cfg = ARRAY_SIZE(mackerel_lcdc_modes), |
394 | .interface_type = RGB24, | 389 | .interface_type = RGB24, |
@@ -451,7 +446,7 @@ static struct sh_mobile_lcdc_info hdmi_lcdc_info = { | |||
451 | .clock_source = LCDC_CLK_EXTERNAL, | 446 | .clock_source = LCDC_CLK_EXTERNAL, |
452 | .ch[0] = { | 447 | .ch[0] = { |
453 | .chan = LCDC_CHAN_MAINLCD, | 448 | .chan = LCDC_CHAN_MAINLCD, |
454 | .bpp = 16, | 449 | .fourcc = V4L2_PIX_FMT_RGB565, |
455 | .interface_type = RGB24, | 450 | .interface_type = RGB24, |
456 | .clock_divider = 1, | 451 | .clock_divider = 1, |
457 | .flags = LCDC_FLAGS_DWPOL, | 452 | .flags = LCDC_FLAGS_DWPOL, |
@@ -676,51 +671,16 @@ static struct platform_device usbhs0_device = { | |||
676 | * Use J30 to select between Host and Function. This setting | 671 | * Use J30 to select between Host and Function. This setting |
677 | * can however not be detected by software. Hotplug of USBHS1 | 672 | * can however not be detected by software. Hotplug of USBHS1 |
678 | * is provided via IRQ8. | 673 | * is provided via IRQ8. |
674 | * | ||
675 | * Current USB1 works as "USB Host". | ||
676 | * - set J30 "short" | ||
677 | * | ||
678 | * If you want to use it as "USB gadget", | ||
679 | * - J30 "open" | ||
680 | * - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET | ||
681 | * - add .get_vbus = usbhs_get_vbus in usbhs1_private | ||
679 | */ | 682 | */ |
680 | #define IRQ8 evt2irq(0x0300) | 683 | #define IRQ8 evt2irq(0x0300) |
681 | |||
682 | /* USBHS1 USB Host support via r8a66597_hcd */ | ||
683 | static void usb1_host_port_power(int port, int power) | ||
684 | { | ||
685 | if (!power) /* only power-on is supported for now */ | ||
686 | return; | ||
687 | |||
688 | /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */ | ||
689 | __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008); | ||
690 | } | ||
691 | |||
692 | static struct r8a66597_platdata usb1_host_data = { | ||
693 | .on_chip = 1, | ||
694 | .port_power = usb1_host_port_power, | ||
695 | }; | ||
696 | |||
697 | static struct resource usb1_host_resources[] = { | ||
698 | [0] = { | ||
699 | .name = "USBHS1", | ||
700 | .start = 0xe68b0000, | ||
701 | .end = 0xe68b00e6 - 1, | ||
702 | .flags = IORESOURCE_MEM, | ||
703 | }, | ||
704 | [1] = { | ||
705 | .start = evt2irq(0x1ce0) /* USB1_USB1I0 */, | ||
706 | .flags = IORESOURCE_IRQ, | ||
707 | }, | ||
708 | }; | ||
709 | |||
710 | static struct platform_device usb1_host_device = { | ||
711 | .name = "r8a66597_hcd", | ||
712 | .id = 1, | ||
713 | .dev = { | ||
714 | .dma_mask = NULL, /* not use dma */ | ||
715 | .coherent_dma_mask = 0xffffffff, | ||
716 | .platform_data = &usb1_host_data, | ||
717 | }, | ||
718 | .num_resources = ARRAY_SIZE(usb1_host_resources), | ||
719 | .resource = usb1_host_resources, | ||
720 | }; | ||
721 | |||
722 | /* USBHS1 USB Function support via renesas_usbhs */ | ||
723 | |||
724 | #define USB_PHY_MODE (1 << 4) | 684 | #define USB_PHY_MODE (1 << 4) |
725 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) | 685 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) |
726 | #define USB_PHY_ON (1 << 1) | 686 | #define USB_PHY_ON (1 << 1) |
@@ -776,7 +736,7 @@ static void usbhs1_hardware_exit(struct platform_device *pdev) | |||
776 | 736 | ||
777 | static int usbhs1_get_id(struct platform_device *pdev) | 737 | static int usbhs1_get_id(struct platform_device *pdev) |
778 | { | 738 | { |
779 | return USBHS_GADGET; | 739 | return USBHS_HOST; |
780 | } | 740 | } |
781 | 741 | ||
782 | static u32 usbhs1_pipe_cfg[] = { | 742 | static u32 usbhs1_pipe_cfg[] = { |
@@ -807,7 +767,6 @@ static struct usbhs_private usbhs1_private = { | |||
807 | .hardware_exit = usbhs1_hardware_exit, | 767 | .hardware_exit = usbhs1_hardware_exit, |
808 | .get_id = usbhs1_get_id, | 768 | .get_id = usbhs1_get_id, |
809 | .phy_reset = usbhs_phy_reset, | 769 | .phy_reset = usbhs_phy_reset, |
810 | .get_vbus = usbhs_get_vbus, | ||
811 | }, | 770 | }, |
812 | .driver_param = { | 771 | .driver_param = { |
813 | .buswait_bwait = 4, | 772 | .buswait_bwait = 4, |
@@ -1184,15 +1143,6 @@ static struct resource sh_mmcif_resources[] = { | |||
1184 | }, | 1143 | }, |
1185 | }; | 1144 | }; |
1186 | 1145 | ||
1187 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
1188 | .chan_priv_rx = { | ||
1189 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
1190 | }, | ||
1191 | .chan_priv_tx = { | ||
1192 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
1193 | }, | ||
1194 | }; | ||
1195 | |||
1196 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 1146 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
1197 | .sup_pclk = 0, | 1147 | .sup_pclk = 0, |
1198 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | 1148 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
@@ -1200,7 +1150,8 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { | |||
1200 | MMC_CAP_8_BIT_DATA | | 1150 | MMC_CAP_8_BIT_DATA | |
1201 | MMC_CAP_NEEDS_POLL, | 1151 | MMC_CAP_NEEDS_POLL, |
1202 | .get_cd = slot_cn7_get_cd, | 1152 | .get_cd = slot_cn7_get_cd, |
1203 | .dma = &sh_mmcif_dma, | 1153 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
1154 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
1204 | }; | 1155 | }; |
1205 | 1156 | ||
1206 | static struct platform_device sh_mmcif_device = { | 1157 | static struct platform_device sh_mmcif_device = { |
@@ -1311,7 +1262,6 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
1311 | &nor_flash_device, | 1262 | &nor_flash_device, |
1312 | &smc911x_device, | 1263 | &smc911x_device, |
1313 | &lcdc_device, | 1264 | &lcdc_device, |
1314 | &usb1_host_device, | ||
1315 | &usbhs1_device, | 1265 | &usbhs1_device, |
1316 | &usbhs0_device, | 1266 | &usbhs0_device, |
1317 | &leds_device, | 1267 | &leds_device, |
@@ -1473,9 +1423,6 @@ static void __init mackerel_init(void) | |||
1473 | gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ | 1423 | gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ |
1474 | gpio_request(GPIO_FN_IDIN_1_113, NULL); | 1424 | gpio_request(GPIO_FN_IDIN_1_113, NULL); |
1475 | 1425 | ||
1476 | /* USB phy tweak to make the r8a66597_hcd host driver work */ | ||
1477 | __raw_writew(0x8a0a, 0xe6058130); /* USBCR4 */ | ||
1478 | |||
1479 | /* enable FSI2 port A (ak4643) */ | 1426 | /* enable FSI2 port A (ak4643) */ |
1480 | gpio_request(GPIO_FN_FSIAIBT, NULL); | 1427 | gpio_request(GPIO_FN_FSIAIBT, NULL); |
1481 | gpio_request(GPIO_FN_FSIAILR, NULL); | 1428 | gpio_request(GPIO_FN_FSIAILR, NULL); |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index e349c22a0d71..293456d8dcfd 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -612,8 +612,8 @@ static struct clk_lookup lookups[] = { | |||
612 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), | 612 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), |
613 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | 613 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), |
614 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | 614 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), |
615 | CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | 615 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), |
616 | CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | 616 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), |
617 | 617 | ||
618 | /* MSTP32 clocks */ | 618 | /* MSTP32 clocks */ |
619 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 619 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 34944d01bf1e..7727cca6136c 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -365,6 +365,114 @@ static struct clk div6_clks[DIV6_NR] = { | |||
365 | dsi_parent, ARRAY_SIZE(dsi_parent), 12, 3), | 365 | dsi_parent, ARRAY_SIZE(dsi_parent), 12, 3), |
366 | }; | 366 | }; |
367 | 367 | ||
368 | /* DSI DIV */ | ||
369 | static unsigned long dsiphy_recalc(struct clk *clk) | ||
370 | { | ||
371 | u32 value; | ||
372 | |||
373 | value = __raw_readl(clk->mapping->base); | ||
374 | |||
375 | /* FIXME */ | ||
376 | if (!(value & 0x000B8000)) | ||
377 | return clk->parent->rate; | ||
378 | |||
379 | value &= 0x3f; | ||
380 | value += 1; | ||
381 | |||
382 | if ((value < 12) || | ||
383 | (value > 33)) { | ||
384 | pr_err("DSIPHY has wrong value (%d)", value); | ||
385 | return 0; | ||
386 | } | ||
387 | |||
388 | return clk->parent->rate / value; | ||
389 | } | ||
390 | |||
391 | static long dsiphy_round_rate(struct clk *clk, unsigned long rate) | ||
392 | { | ||
393 | return clk_rate_mult_range_round(clk, 12, 33, rate); | ||
394 | } | ||
395 | |||
396 | static void dsiphy_disable(struct clk *clk) | ||
397 | { | ||
398 | u32 value; | ||
399 | |||
400 | value = __raw_readl(clk->mapping->base); | ||
401 | value &= ~0x000B8000; | ||
402 | |||
403 | __raw_writel(value , clk->mapping->base); | ||
404 | } | ||
405 | |||
406 | static int dsiphy_enable(struct clk *clk) | ||
407 | { | ||
408 | u32 value; | ||
409 | int multi; | ||
410 | |||
411 | value = __raw_readl(clk->mapping->base); | ||
412 | multi = (value & 0x3f) + 1; | ||
413 | |||
414 | if ((multi < 12) || (multi > 33)) | ||
415 | return -EIO; | ||
416 | |||
417 | __raw_writel(value | 0x000B8000, clk->mapping->base); | ||
418 | |||
419 | return 0; | ||
420 | } | ||
421 | |||
422 | static int dsiphy_set_rate(struct clk *clk, unsigned long rate) | ||
423 | { | ||
424 | u32 value; | ||
425 | int idx; | ||
426 | |||
427 | idx = rate / clk->parent->rate; | ||
428 | if ((idx < 12) || (idx > 33)) | ||
429 | return -EINVAL; | ||
430 | |||
431 | idx += -1; | ||
432 | |||
433 | value = __raw_readl(clk->mapping->base); | ||
434 | value = (value & ~0x3f) + idx; | ||
435 | |||
436 | __raw_writel(value, clk->mapping->base); | ||
437 | |||
438 | return 0; | ||
439 | } | ||
440 | |||
441 | static struct clk_ops dsiphy_clk_ops = { | ||
442 | .recalc = dsiphy_recalc, | ||
443 | .round_rate = dsiphy_round_rate, | ||
444 | .set_rate = dsiphy_set_rate, | ||
445 | .enable = dsiphy_enable, | ||
446 | .disable = dsiphy_disable, | ||
447 | }; | ||
448 | |||
449 | static struct clk_mapping dsi0phy_clk_mapping = { | ||
450 | .phys = DSI0PHYCR, | ||
451 | .len = 4, | ||
452 | }; | ||
453 | |||
454 | static struct clk_mapping dsi1phy_clk_mapping = { | ||
455 | .phys = DSI1PHYCR, | ||
456 | .len = 4, | ||
457 | }; | ||
458 | |||
459 | static struct clk dsi0phy_clk = { | ||
460 | .ops = &dsiphy_clk_ops, | ||
461 | .parent = &div6_clks[DIV6_DSI0P], /* late install */ | ||
462 | .mapping = &dsi0phy_clk_mapping, | ||
463 | }; | ||
464 | |||
465 | static struct clk dsi1phy_clk = { | ||
466 | .ops = &dsiphy_clk_ops, | ||
467 | .parent = &div6_clks[DIV6_DSI1P], /* late install */ | ||
468 | .mapping = &dsi1phy_clk_mapping, | ||
469 | }; | ||
470 | |||
471 | static struct clk *late_main_clks[] = { | ||
472 | &dsi0phy_clk, | ||
473 | &dsi1phy_clk, | ||
474 | }; | ||
475 | |||
368 | enum { MSTP001, | 476 | enum { MSTP001, |
369 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, | 477 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, |
370 | MSTP219, | 478 | MSTP219, |
@@ -427,8 +535,10 @@ static struct clk_lookup lookups[] = { | |||
427 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), | 535 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), |
428 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | 536 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), |
429 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | 537 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), |
430 | CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | 538 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), |
431 | CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | 539 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), |
540 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
541 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
432 | 542 | ||
433 | /* MSTP32 clocks */ | 543 | /* MSTP32 clocks */ |
434 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ | 544 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ |
@@ -504,6 +614,9 @@ void __init sh73a0_clock_init(void) | |||
504 | if (!ret) | 614 | if (!ret) |
505 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | 615 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); |
506 | 616 | ||
617 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) | ||
618 | ret = clk_register(late_main_clks[k]); | ||
619 | |||
507 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 620 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
508 | 621 | ||
509 | if (!ret) | 622 | if (!ret) |
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h index 881d515a9686..cad57578ceed 100644 --- a/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h | |||
@@ -515,8 +515,8 @@ enum { | |||
515 | SHDMA_SLAVE_MMCIF_RX, | 515 | SHDMA_SLAVE_MMCIF_RX, |
516 | }; | 516 | }; |
517 | 517 | ||
518 | /* PINT interrupts are located at Linux IRQ 768 and up */ | 518 | /* PINT interrupts are located at Linux IRQ 800 and up */ |
519 | #define SH73A0_PINT0_IRQ(irq) ((irq) + 768) | 519 | #define SH73A0_PINT0_IRQ(irq) ((irq) + 800) |
520 | #define SH73A0_PINT1_IRQ(irq) ((irq) + 800) | 520 | #define SH73A0_PINT1_IRQ(irq) ((irq) + 832) |
521 | 521 | ||
522 | #endif /* __ASM_SH73A0_H__ */ | 522 | #endif /* __ASM_SH73A0_H__ */ |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index 1eda6b0b69e3..9857595eaa79 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/module.h> | ||
22 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <linux/sh_intc.h> | 25 | #include <linux/sh_intc.h> |
@@ -445,6 +446,7 @@ void __init sh73a0_init_irq(void) | |||
445 | setup_irq(gic_spi(1 + k), &sh73a0_irq_pin_cascade[k]); | 446 | setup_irq(gic_spi(1 + k), &sh73a0_irq_pin_cascade[k]); |
446 | 447 | ||
447 | n = intcs_evt2irq(to_intc_vect(gic_spi(1 + k))); | 448 | n = intcs_evt2irq(to_intc_vect(gic_spi(1 + k))); |
449 | WARN_ON(irq_alloc_desc_at(n, numa_node_id()) != n); | ||
448 | irq_set_chip_and_handler_name(n, &intca_gic_irq_chip, | 450 | irq_set_chip_and_handler_name(n, &intca_gic_irq_chip, |
449 | handle_level_irq, "level"); | 451 | handle_level_irq, "level"); |
450 | set_irq_flags(n, IRQF_VALID); /* yuck */ | 452 | set_irq_flags(n, IRQF_VALID); /* yuck */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index 1bd6585a6acf..336093f9210a 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <mach/irqs.h> | ||
26 | #include <mach/sh7372.h> | 27 | #include <mach/sh7372.h> |
27 | 28 | ||
28 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | 29 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
@@ -1594,6 +1595,43 @@ static struct pinmux_data_reg pinmux_data_regs[] = { | |||
1594 | { }, | 1595 | { }, |
1595 | }; | 1596 | }; |
1596 | 1597 | ||
1598 | #define EXT_IRQ16L(n) evt2irq(0x200 + ((n) << 5)) | ||
1599 | #define EXT_IRQ16H(n) evt2irq(0x3200 + (((n) - 16) << 5)) | ||
1600 | static struct pinmux_irq pinmux_irqs[] = { | ||
1601 | PINMUX_IRQ(EXT_IRQ16L(0), PORT6_FN0, PORT162_FN0), | ||
1602 | PINMUX_IRQ(EXT_IRQ16L(1), PORT12_FN0), | ||
1603 | PINMUX_IRQ(EXT_IRQ16L(2), PORT4_FN0, PORT5_FN0), | ||
1604 | PINMUX_IRQ(EXT_IRQ16L(3), PORT8_FN0, PORT16_FN0), | ||
1605 | PINMUX_IRQ(EXT_IRQ16L(4), PORT17_FN0, PORT163_FN0), | ||
1606 | PINMUX_IRQ(EXT_IRQ16L(5), PORT18_FN0), | ||
1607 | PINMUX_IRQ(EXT_IRQ16L(6), PORT39_FN0, PORT164_FN0), | ||
1608 | PINMUX_IRQ(EXT_IRQ16L(7), PORT40_FN0, PORT167_FN0), | ||
1609 | PINMUX_IRQ(EXT_IRQ16L(8), PORT41_FN0, PORT168_FN0), | ||
1610 | PINMUX_IRQ(EXT_IRQ16L(9), PORT42_FN0, PORT169_FN0), | ||
1611 | PINMUX_IRQ(EXT_IRQ16L(10), PORT65_FN0), | ||
1612 | PINMUX_IRQ(EXT_IRQ16L(11), PORT67_FN0), | ||
1613 | PINMUX_IRQ(EXT_IRQ16L(12), PORT80_FN0, PORT137_FN0), | ||
1614 | PINMUX_IRQ(EXT_IRQ16L(13), PORT81_FN0, PORT145_FN0), | ||
1615 | PINMUX_IRQ(EXT_IRQ16L(14), PORT82_FN0, PORT146_FN0), | ||
1616 | PINMUX_IRQ(EXT_IRQ16L(15), PORT83_FN0, PORT147_FN0), | ||
1617 | PINMUX_IRQ(EXT_IRQ16H(16), PORT84_FN0, PORT170_FN0), | ||
1618 | PINMUX_IRQ(EXT_IRQ16H(17), PORT85_FN0), | ||
1619 | PINMUX_IRQ(EXT_IRQ16H(18), PORT86_FN0), | ||
1620 | PINMUX_IRQ(EXT_IRQ16H(19), PORT87_FN0), | ||
1621 | PINMUX_IRQ(EXT_IRQ16H(20), PORT92_FN0), | ||
1622 | PINMUX_IRQ(EXT_IRQ16H(21), PORT93_FN0), | ||
1623 | PINMUX_IRQ(EXT_IRQ16H(22), PORT94_FN0), | ||
1624 | PINMUX_IRQ(EXT_IRQ16H(23), PORT95_FN0), | ||
1625 | PINMUX_IRQ(EXT_IRQ16H(24), PORT112_FN0), | ||
1626 | PINMUX_IRQ(EXT_IRQ16H(25), PORT119_FN0), | ||
1627 | PINMUX_IRQ(EXT_IRQ16H(26), PORT121_FN0, PORT172_FN0), | ||
1628 | PINMUX_IRQ(EXT_IRQ16H(27), PORT122_FN0, PORT180_FN0), | ||
1629 | PINMUX_IRQ(EXT_IRQ16H(28), PORT123_FN0, PORT181_FN0), | ||
1630 | PINMUX_IRQ(EXT_IRQ16H(29), PORT129_FN0, PORT182_FN0), | ||
1631 | PINMUX_IRQ(EXT_IRQ16H(30), PORT130_FN0, PORT183_FN0), | ||
1632 | PINMUX_IRQ(EXT_IRQ16H(31), PORT138_FN0, PORT184_FN0), | ||
1633 | }; | ||
1634 | |||
1597 | static struct pinmux_info sh7372_pinmux_info = { | 1635 | static struct pinmux_info sh7372_pinmux_info = { |
1598 | .name = "sh7372_pfc", | 1636 | .name = "sh7372_pfc", |
1599 | .reserved_id = PINMUX_RESERVED, | 1637 | .reserved_id = PINMUX_RESERVED, |
@@ -1614,6 +1652,9 @@ static struct pinmux_info sh7372_pinmux_info = { | |||
1614 | 1652 | ||
1615 | .gpio_data = pinmux_data, | 1653 | .gpio_data = pinmux_data, |
1616 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | 1654 | .gpio_data_size = ARRAY_SIZE(pinmux_data), |
1655 | |||
1656 | .gpio_irq = pinmux_irqs, | ||
1657 | .gpio_irq_size = ARRAY_SIZE(pinmux_irqs), | ||
1617 | }; | 1658 | }; |
1618 | 1659 | ||
1619 | void sh7372_pinmux_init(void) | 1660 | void sh7372_pinmux_init(void) |
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 77b8fc12fc2f..fcf8b1761aef 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -276,7 +276,7 @@ static int sh7372_a3sp_suspend(void) | |||
276 | * Serial consoles make use of SCIF hardware located in A3SP, | 276 | * Serial consoles make use of SCIF hardware located in A3SP, |
277 | * keep such power domain on if "no_console_suspend" is set. | 277 | * keep such power domain on if "no_console_suspend" is set. |
278 | */ | 278 | */ |
279 | return console_suspend_enabled ? -EBUSY : 0; | 279 | return console_suspend_enabled ? 0 : -EBUSY; |
280 | } | 280 | } |
281 | 281 | ||
282 | struct sh7372_pm_domain sh7372_a3sp = { | 282 | struct sh7372_pm_domain sh7372_a3sp = { |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 9361a5290177..5c00712907d1 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -19,11 +19,11 @@ | |||
19 | #include <linux/amba/pl022.h> | 19 | #include <linux/amba/pl022.h> |
20 | #include <linux/amba/serial.h> | 20 | #include <linux/amba/serial.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/mfd/ab8500.h> | 22 | #include <linux/mfd/abx500/ab8500.h> |
23 | #include <linux/regulator/ab8500.h> | 23 | #include <linux/regulator/ab8500.h> |
24 | #include <linux/mfd/tc3589x.h> | 24 | #include <linux/mfd/tc3589x.h> |
25 | #include <linux/mfd/tps6105x.h> | 25 | #include <linux/mfd/tps6105x.h> |
26 | #include <linux/mfd/ab8500/gpio.h> | 26 | #include <linux/mfd/abx500/ab8500-gpio.h> |
27 | #include <linux/leds-lp5521.h> | 27 | #include <linux/leds-lp5521.h> |
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/smsc911x.h> | 29 | #include <linux/smsc911x.h> |
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index fe1569b67c91..9de9e9c4dbbb 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/amba/bus.h> | 10 | #include <linux/amba/bus.h> |
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
13 | #include <linux/mfd/ab5500/ab5500.h> | 13 | #include <linux/mfd/abx500/ab5500.h> |
14 | 14 | ||
15 | #include <asm/hardware/gic.h> | 15 | #include <asm/hardware/gic.h> |
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h index 47969909836c..d2d4131435a6 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define __MACH_IRQS_BOARD_MOP500_H | 9 | #define __MACH_IRQS_BOARD_MOP500_H |
10 | 10 | ||
11 | /* Number of AB8500 irqs is taken from header file */ | 11 | /* Number of AB8500 irqs is taken from header file */ |
12 | #include <linux/mfd/ab8500.h> | 12 | #include <linux/mfd/abx500/ab8500.h> |
13 | 13 | ||
14 | #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START | 14 | #define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START |
15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ | 15 | #define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \ |
diff --git a/arch/arm/mach-w90x900/clksel.c b/arch/arm/mach-w90x900/clksel.c index 3de4a5211c3b..06d867dce551 100644 --- a/arch/arm/mach-w90x900/clksel.c +++ b/arch/arm/mach-w90x900/clksel.c | |||
@@ -48,7 +48,7 @@ static void clock_source_select(const char *dev_id, unsigned int clkval) | |||
48 | offset = ATAOFFSET; | 48 | offset = ATAOFFSET; |
49 | else if (strcmp(dev_id, "nuc900-lcd") == 0) | 49 | else if (strcmp(dev_id, "nuc900-lcd") == 0) |
50 | offset = LCDOFFSET; | 50 | offset = LCDOFFSET; |
51 | else if (strcmp(dev_id, "nuc900-audio") == 0) | 51 | else if (strcmp(dev_id, "nuc900-ac97") == 0) |
52 | offset = AUDOFFSET; | 52 | offset = AUDOFFSET; |
53 | else | 53 | else |
54 | offset = CPUOFFSET; | 54 | offset = CPUOFFSET; |
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 604e1db266e8..9a0661992909 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c | |||
@@ -79,7 +79,7 @@ static DEFINE_CLK(timer4, 23); | |||
79 | 79 | ||
80 | static struct clk_lookup nuc900_clkregs[] = { | 80 | static struct clk_lookup nuc900_clkregs[] = { |
81 | DEF_CLKLOOK(&clk_lcd, "nuc900-lcd", NULL), | 81 | DEF_CLKLOOK(&clk_lcd, "nuc900-lcd", NULL), |
82 | DEF_CLKLOOK(&clk_audio, "nuc900-audio", NULL), | 82 | DEF_CLKLOOK(&clk_audio, "nuc900-ac97", NULL), |
83 | DEF_CLKLOOK(&clk_fmi, "nuc900-fmi", NULL), | 83 | DEF_CLKLOOK(&clk_fmi, "nuc900-fmi", NULL), |
84 | DEF_CLKLOOK(&clk_ms, "nuc900-fmi", "MS"), | 84 | DEF_CLKLOOK(&clk_ms, "nuc900-fmi", "MS"), |
85 | DEF_CLKLOOK(&clk_sd, "nuc900-fmi", "SD"), | 85 | DEF_CLKLOOK(&clk_sd, "nuc900-fmi", "SD"), |
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index 5b0c38abacc1..78110befb7a9 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c | |||
@@ -501,8 +501,8 @@ static struct resource nuc900_ac97_resource[] = { | |||
501 | 501 | ||
502 | }; | 502 | }; |
503 | 503 | ||
504 | struct platform_device nuc900_device_audio = { | 504 | struct platform_device nuc900_device_ac97 = { |
505 | .name = "nuc900-audio", | 505 | .name = "nuc900-ac97", |
506 | .id = -1, | 506 | .id = -1, |
507 | .num_resources = ARRAY_SIZE(nuc900_ac97_resource), | 507 | .num_resources = ARRAY_SIZE(nuc900_ac97_resource), |
508 | .resource = nuc900_ac97_resource, | 508 | .resource = nuc900_ac97_resource, |
@@ -523,7 +523,7 @@ static struct platform_device *nuc900_public_dev[] __initdata = { | |||
523 | &nuc900_device_emc, | 523 | &nuc900_device_emc, |
524 | &nuc900_device_spi, | 524 | &nuc900_device_spi, |
525 | &nuc900_device_wdt, | 525 | &nuc900_device_wdt, |
526 | &nuc900_device_audio, | 526 | &nuc900_device_ac97, |
527 | }; | 527 | }; |
528 | 528 | ||
529 | /* Provide adding specific CPU platform devices API */ | 529 | /* Provide adding specific CPU platform devices API */ |
diff --git a/arch/arm/mach-w90x900/mfp.c b/arch/arm/mach-w90x900/mfp.c index 9dd74612bb87..c58d142b8a46 100644 --- a/arch/arm/mach-w90x900/mfp.c +++ b/arch/arm/mach-w90x900/mfp.c | |||
@@ -155,7 +155,7 @@ void mfp_set_groupg(struct device *dev, const char *subname) | |||
155 | } else if (strcmp(dev_id, "nuc900-i2c1") == 0) { | 155 | } else if (strcmp(dev_id, "nuc900-i2c1") == 0) { |
156 | mfpen &= ~(GPIOG2TO3); | 156 | mfpen &= ~(GPIOG2TO3); |
157 | mfpen |= ENI2C1;/*enable i2c1*/ | 157 | mfpen |= ENI2C1;/*enable i2c1*/ |
158 | } else if (strcmp(dev_id, "nuc900-audio") == 0) { | 158 | } else if (strcmp(dev_id, "nuc900-ac97") == 0) { |
159 | mfpen &= ~(GPIOG22TO23); | 159 | mfpen &= ~(GPIOG22TO23); |
160 | mfpen |= ENAC97;/*enable AC97*/ | 160 | mfpen |= ENAC97;/*enable AC97*/ |
161 | } else if (strcmp(dev_id, "nuc900-mmc-port1") == 0) { | 161 | } else if (strcmp(dev_id, "nuc900-mmc-port1") == 0) { |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index e34ea8adc1f9..6ec1226fc62d 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
23 | 23 | ||
24 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/memblock.h> | ||
25 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
26 | #include <asm/sections.h> | 27 | #include <asm/sections.h> |
27 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
@@ -307,6 +308,21 @@ static void arm_memory_present(void) | |||
307 | } | 308 | } |
308 | #endif | 309 | #endif |
309 | 310 | ||
311 | static bool arm_memblock_steal_permitted = true; | ||
312 | |||
313 | phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align) | ||
314 | { | ||
315 | phys_addr_t phys; | ||
316 | |||
317 | BUG_ON(!arm_memblock_steal_permitted); | ||
318 | |||
319 | phys = memblock_alloc(size, align); | ||
320 | memblock_free(phys, size); | ||
321 | memblock_remove(phys, size); | ||
322 | |||
323 | return phys; | ||
324 | } | ||
325 | |||
310 | void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | 326 | void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) |
311 | { | 327 | { |
312 | int i; | 328 | int i; |
@@ -349,6 +365,7 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | |||
349 | if (mdesc->reserve) | 365 | if (mdesc->reserve) |
350 | mdesc->reserve(); | 366 | mdesc->reserve(); |
351 | 367 | ||
368 | arm_memblock_steal_permitted = false; | ||
352 | memblock_allow_resize(); | 369 | memblock_allow_resize(); |
353 | memblock_dump_all(); | 370 | memblock_dump_all(); |
354 | } | 371 | } |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 19719329a47b..60278f47c0bd 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <asm/memblock.h> | ||
23 | 24 | ||
24 | #include <plat/tc.h> | 25 | #include <plat/tc.h> |
25 | #include <plat/board.h> | 26 | #include <plat/board.h> |
@@ -164,14 +165,12 @@ void __init omap_dsp_reserve_sdram_memblock(void) | |||
164 | if (!size) | 165 | if (!size) |
165 | return; | 166 | return; |
166 | 167 | ||
167 | paddr = memblock_alloc(size, SZ_1M); | 168 | paddr = arm_memblock_steal(size, SZ_1M); |
168 | if (!paddr) { | 169 | if (!paddr) { |
169 | pr_err("%s: failed to reserve %x bytes\n", | 170 | pr_err("%s: failed to reserve %x bytes\n", |
170 | __func__, size); | 171 | __func__, size); |
171 | return; | 172 | return; |
172 | } | 173 | } |
173 | memblock_free(paddr, size); | ||
174 | memblock_remove(paddr, size); | ||
175 | 174 | ||
176 | omap_dsp_phys_mempool_base = paddr; | 175 | omap_dsp_phys_mempool_base = paddr; |
177 | } | 176 | } |
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c index 1121df13e15f..21f1fda8b661 100644 --- a/arch/arm/plat-s3c24xx/cpu.c +++ b/arch/arm/plat-s3c24xx/cpu.c | |||
@@ -38,8 +38,6 @@ | |||
38 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
40 | 40 | ||
41 | #include <mach/system-reset.h> | ||
42 | |||
43 | #include <mach/regs-gpio.h> | 41 | #include <mach/regs-gpio.h> |
44 | #include <plat/regs-serial.h> | 42 | #include <plat/regs-serial.h> |
45 | 43 | ||
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 656dc00d30ed..f82f888b91a9 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -63,6 +63,7 @@ enum clk_types { | |||
63 | struct s3c_sdhci_platdata { | 63 | struct s3c_sdhci_platdata { |
64 | unsigned int max_width; | 64 | unsigned int max_width; |
65 | unsigned int host_caps; | 65 | unsigned int host_caps; |
66 | unsigned int pm_caps; | ||
66 | enum cd_types cd_type; | 67 | enum cd_types cd_type; |
67 | enum clk_types clk_type; | 68 | enum clk_types clk_type; |
68 | 69 | ||
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/plat-samsung/platformdata.c index ceb9fa3a80c0..0f707184eae0 100644 --- a/arch/arm/plat-samsung/platformdata.c +++ b/arch/arm/plat-samsung/platformdata.c | |||
@@ -53,6 +53,8 @@ void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd, | |||
53 | set->cfg_gpio = pd->cfg_gpio; | 53 | set->cfg_gpio = pd->cfg_gpio; |
54 | if (pd->host_caps) | 54 | if (pd->host_caps) |
55 | set->host_caps |= pd->host_caps; | 55 | set->host_caps |= pd->host_caps; |
56 | if (pd->pm_caps) | ||
57 | set->pm_caps |= pd->pm_caps; | ||
56 | if (pd->clk_type) | 58 | if (pd->clk_type) |
57 | set->clk_type = pd->clk_type; | 59 | set->clk_type = pd->clk_type; |
58 | } | 60 | } |