aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-17 07:22:50 -0400
committerArnd Bergmann <arnd@arndb.de>2011-10-17 07:22:50 -0400
commit8eb41582d2106eccc7717047d1184481f5a1b3a6 (patch)
tree12257bbe39b5c8ae6918198fde682ed0aacd8e00 /arch/arm
parent127d4eb97b7bebc15fd692603263e75c220e24f9 (diff)
parent1cb17e2dbd09436069733500ea48e0c9b1f0a1cc (diff)
Merge branch 'ep93xx/board' into next/board
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig14
-rw-r--r--arch/arm/boot/dts/tegra-harmony.dts12
-rw-r--r--arch/arm/boot/dts/tegra-seaboard.dts6
-rw-r--r--arch/arm/include/asm/futex.h34
-rw-r--r--arch/arm/include/asm/unistd.h4
-rw-r--r--arch/arm/kernel/smp_scu.c10
-rw-r--r--arch/arm/kernel/vmlinux.lds.S15
-rw-r--r--arch/arm/mach-dove/common.c2
-rw-r--r--arch/arm/mach-ep93xx/Kconfig7
-rw-r--r--arch/arm/mach-ep93xx/Makefile1
-rw-r--r--arch/arm/mach-ep93xx/vision_ep9307.c364
-rw-r--r--arch/arm/mach-exynos4/clock.c6
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c2
-rw-r--r--arch/arm/mach-integrator/pci_v3.c2
-rw-r--r--arch/arm/mach-s3c2443/clock.c2
-rw-r--r--arch/arm/mach-s5pv210/clock.c6
-rw-r--r--arch/arm/mm/cache-v7.S20
-rw-r--r--arch/arm/mm/dma-mapping.c2
-rw-r--r--arch/arm/plat-s5p/irq-gpioint.c9
19 files changed, 471 insertions, 47 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3269576dbfa8..3146ed3f6eca 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1283,6 +1283,20 @@ config ARM_ERRATA_364296
1283 processor into full low interrupt latency mode. ARM11MPCore 1283 processor into full low interrupt latency mode. ARM11MPCore
1284 is not affected. 1284 is not affected.
1285 1285
1286config ARM_ERRATA_764369
1287 bool "ARM errata: Data cache line maintenance operation by MVA may not succeed"
1288 depends on CPU_V7 && SMP
1289 help
1290 This option enables the workaround for erratum 764369
1291 affecting Cortex-A9 MPCore with two or more processors (all
1292 current revisions). Under certain timing circumstances, a data
1293 cache line maintenance operation by MVA targeting an Inner
1294 Shareable memory region may fail to proceed up to either the
1295 Point of Coherency or to the Point of Unification of the
1296 system. This workaround adds a DSB instruction before the
1297 relevant cache maintenance functions and sets a specific bit
1298 in the diagnostic control register of the SCU.
1299
1286endmenu 1300endmenu
1287 1301
1288source "arch/arm/common/Kconfig" 1302source "arch/arm/common/Kconfig"
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts
index 4c053340ce33..e5818668d091 100644
--- a/arch/arm/boot/dts/tegra-harmony.dts
+++ b/arch/arm/boot/dts/tegra-harmony.dts
@@ -57,14 +57,14 @@
57 }; 57 };
58 58
59 sdhci@c8000200 { 59 sdhci@c8000200 {
60 gpios = <&gpio 69 0>, /* cd, gpio PI5 */ 60 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
61 <&gpio 57 0>, /* wp, gpio PH1 */ 61 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
62 <&gpio 155 0>; /* power, gpio PT3 */ 62 power-gpios = <&gpio 155 0>; /* gpio PT3 */
63 }; 63 };
64 64
65 sdhci@c8000600 { 65 sdhci@c8000600 {
66 gpios = <&gpio 58 0>, /* cd, gpio PH2 */ 66 cd-gpios = <&gpio 58 0>; /* gpio PH2 */
67 <&gpio 59 0>, /* wp, gpio PH3 */ 67 wp-gpios = <&gpio 59 0>; /* gpio PH3 */
68 <&gpio 70 0>; /* power, gpio PI6 */ 68 power-gpios = <&gpio 70 0>; /* gpio PI6 */
69 }; 69 };
70}; 70};
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts
index 1940cae00748..64cedca6fc79 100644
--- a/arch/arm/boot/dts/tegra-seaboard.dts
+++ b/arch/arm/boot/dts/tegra-seaboard.dts
@@ -21,8 +21,8 @@
21 }; 21 };
22 22
23 sdhci@c8000400 { 23 sdhci@c8000400 {
24 gpios = <&gpio 69 0>, /* cd, gpio PI5 */ 24 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
25 <&gpio 57 0>, /* wp, gpio PH1 */ 25 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
26 <&gpio 70 0>; /* power, gpio PI6 */ 26 power-gpios = <&gpio 70 0>; /* gpio PI6 */
27 }; 27 };
28}; 28};
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index 8c73900da9ed..253cc86318bf 100644
--- a/arch/arm/include/asm/futex.h
+++ b/arch/arm/include/asm/futex.h
@@ -25,17 +25,17 @@
25 25
26#ifdef CONFIG_SMP 26#ifdef CONFIG_SMP
27 27
28#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ 28#define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \
29 smp_mb(); \ 29 smp_mb(); \
30 __asm__ __volatile__( \ 30 __asm__ __volatile__( \
31 "1: ldrex %1, [%2]\n" \ 31 "1: ldrex %1, [%3]\n" \
32 " " insn "\n" \ 32 " " insn "\n" \
33 "2: strex %1, %0, [%2]\n" \ 33 "2: strex %2, %0, [%3]\n" \
34 " teq %1, #0\n" \ 34 " teq %2, #0\n" \
35 " bne 1b\n" \ 35 " bne 1b\n" \
36 " mov %0, #0\n" \ 36 " mov %0, #0\n" \
37 __futex_atomic_ex_table("%4") \ 37 __futex_atomic_ex_table("%5") \
38 : "=&r" (ret), "=&r" (oldval) \ 38 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \
39 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 39 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \
40 : "cc", "memory") 40 : "cc", "memory")
41 41
@@ -73,14 +73,14 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
73#include <linux/preempt.h> 73#include <linux/preempt.h>
74#include <asm/domain.h> 74#include <asm/domain.h>
75 75
76#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ 76#define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \
77 __asm__ __volatile__( \ 77 __asm__ __volatile__( \
78 "1: " T(ldr) " %1, [%2]\n" \ 78 "1: " T(ldr) " %1, [%3]\n" \
79 " " insn "\n" \ 79 " " insn "\n" \
80 "2: " T(str) " %0, [%2]\n" \ 80 "2: " T(str) " %0, [%3]\n" \
81 " mov %0, #0\n" \ 81 " mov %0, #0\n" \
82 __futex_atomic_ex_table("%4") \ 82 __futex_atomic_ex_table("%5") \
83 : "=&r" (ret), "=&r" (oldval) \ 83 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \
84 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 84 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \
85 : "cc", "memory") 85 : "cc", "memory")
86 86
@@ -117,7 +117,7 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
117 int cmp = (encoded_op >> 24) & 15; 117 int cmp = (encoded_op >> 24) & 15;
118 int oparg = (encoded_op << 8) >> 20; 118 int oparg = (encoded_op << 8) >> 20;
119 int cmparg = (encoded_op << 20) >> 20; 119 int cmparg = (encoded_op << 20) >> 20;
120 int oldval = 0, ret; 120 int oldval = 0, ret, tmp;
121 121
122 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) 122 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
123 oparg = 1 << oparg; 123 oparg = 1 << oparg;
@@ -129,19 +129,19 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
129 129
130 switch (op) { 130 switch (op) {
131 case FUTEX_OP_SET: 131 case FUTEX_OP_SET:
132 __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); 132 __futex_atomic_op("mov %0, %4", ret, oldval, tmp, uaddr, oparg);
133 break; 133 break;
134 case FUTEX_OP_ADD: 134 case FUTEX_OP_ADD:
135 __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); 135 __futex_atomic_op("add %0, %1, %4", ret, oldval, tmp, uaddr, oparg);
136 break; 136 break;
137 case FUTEX_OP_OR: 137 case FUTEX_OP_OR:
138 __futex_atomic_op("orr %0, %1, %3", ret, oldval, uaddr, oparg); 138 __futex_atomic_op("orr %0, %1, %4", ret, oldval, tmp, uaddr, oparg);
139 break; 139 break;
140 case FUTEX_OP_ANDN: 140 case FUTEX_OP_ANDN:
141 __futex_atomic_op("and %0, %1, %3", ret, oldval, uaddr, ~oparg); 141 __futex_atomic_op("and %0, %1, %4", ret, oldval, tmp, uaddr, ~oparg);
142 break; 142 break;
143 case FUTEX_OP_XOR: 143 case FUTEX_OP_XOR:
144 __futex_atomic_op("eor %0, %1, %3", ret, oldval, uaddr, oparg); 144 __futex_atomic_op("eor %0, %1, %4", ret, oldval, tmp, uaddr, oparg);
145 break; 145 break;
146 default: 146 default:
147 ret = -ENOSYS; 147 ret = -ENOSYS;
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 2c04ed5efeb5..c60a2944f95b 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -478,8 +478,8 @@
478/* 478/*
479 * Unimplemented (or alternatively implemented) syscalls 479 * Unimplemented (or alternatively implemented) syscalls
480 */ 480 */
481#define __IGNORE_fadvise64_64 1 481#define __IGNORE_fadvise64_64
482#define __IGNORE_migrate_pages 1 482#define __IGNORE_migrate_pages
483 483
484#endif /* __KERNEL__ */ 484#endif /* __KERNEL__ */
485#endif /* __ASM_ARM_UNISTD_H */ 485#endif /* __ASM_ARM_UNISTD_H */
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
index 79ed5e7f204a..7fcddb75c877 100644
--- a/arch/arm/kernel/smp_scu.c
+++ b/arch/arm/kernel/smp_scu.c
@@ -13,6 +13,7 @@
13 13
14#include <asm/smp_scu.h> 14#include <asm/smp_scu.h>
15#include <asm/cacheflush.h> 15#include <asm/cacheflush.h>
16#include <asm/cputype.h>
16 17
17#define SCU_CTRL 0x00 18#define SCU_CTRL 0x00
18#define SCU_CONFIG 0x04 19#define SCU_CONFIG 0x04
@@ -37,6 +38,15 @@ void __init scu_enable(void __iomem *scu_base)
37{ 38{
38 u32 scu_ctrl; 39 u32 scu_ctrl;
39 40
41#ifdef CONFIG_ARM_ERRATA_764369
42 /* Cortex-A9 only */
43 if ((read_cpuid(CPUID_ID) & 0xff0ffff0) == 0x410fc090) {
44 scu_ctrl = __raw_readl(scu_base + 0x30);
45 if (!(scu_ctrl & 1))
46 __raw_writel(scu_ctrl | 0x1, scu_base + 0x30);
47 }
48#endif
49
40 scu_ctrl = __raw_readl(scu_base + SCU_CTRL); 50 scu_ctrl = __raw_readl(scu_base + SCU_CTRL);
41 /* already enabled? */ 51 /* already enabled? */
42 if (scu_ctrl & 1) 52 if (scu_ctrl & 1)
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index bf977f8514f6..4e66f62b8d41 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -23,8 +23,10 @@
23 23
24#if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) 24#if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)
25#define ARM_EXIT_KEEP(x) x 25#define ARM_EXIT_KEEP(x) x
26#define ARM_EXIT_DISCARD(x)
26#else 27#else
27#define ARM_EXIT_KEEP(x) 28#define ARM_EXIT_KEEP(x)
29#define ARM_EXIT_DISCARD(x) x
28#endif 30#endif
29 31
30OUTPUT_ARCH(arm) 32OUTPUT_ARCH(arm)
@@ -39,6 +41,11 @@ jiffies = jiffies_64 + 4;
39SECTIONS 41SECTIONS
40{ 42{
41 /* 43 /*
44 * XXX: The linker does not define how output sections are
45 * assigned to input sections when there are multiple statements
46 * matching the same input section name. There is no documented
47 * order of matching.
48 *
42 * unwind exit sections must be discarded before the rest of the 49 * unwind exit sections must be discarded before the rest of the
43 * unwind sections get included. 50 * unwind sections get included.
44 */ 51 */
@@ -47,6 +54,9 @@ SECTIONS
47 *(.ARM.extab.exit.text) 54 *(.ARM.extab.exit.text)
48 ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text)) 55 ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text))
49 ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text)) 56 ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text))
57 ARM_EXIT_DISCARD(EXIT_TEXT)
58 ARM_EXIT_DISCARD(EXIT_DATA)
59 EXIT_CALL
50#ifndef CONFIG_HOTPLUG 60#ifndef CONFIG_HOTPLUG
51 *(.ARM.exidx.devexit.text) 61 *(.ARM.exidx.devexit.text)
52 *(.ARM.extab.devexit.text) 62 *(.ARM.extab.devexit.text)
@@ -58,6 +68,8 @@ SECTIONS
58#ifndef CONFIG_SMP_ON_UP 68#ifndef CONFIG_SMP_ON_UP
59 *(.alt.smp.init) 69 *(.alt.smp.init)
60#endif 70#endif
71 *(.discard)
72 *(.discard.*)
61 } 73 }
62 74
63#ifdef CONFIG_XIP_KERNEL 75#ifdef CONFIG_XIP_KERNEL
@@ -279,9 +291,6 @@ SECTIONS
279 291
280 STABS_DEBUG 292 STABS_DEBUG
281 .comment 0 : { *(.comment) } 293 .comment 0 : { *(.comment) }
282
283 /* Default discards */
284 DISCARDS
285} 294}
286 295
287/* 296/*
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index 83dce859886d..a9e0dae86a26 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -158,7 +158,7 @@ void __init dove_spi0_init(void)
158 158
159void __init dove_spi1_init(void) 159void __init dove_spi1_init(void)
160{ 160{
161 orion_spi_init(DOVE_SPI1_PHYS_BASE, get_tclk()); 161 orion_spi_1_init(DOVE_SPI1_PHYS_BASE, get_tclk());
162} 162}
163 163
164/***************************************************************************** 164/*****************************************************************************
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index 3a08b18f6433..97a249395b5a 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -182,6 +182,13 @@ config MACH_TS72XX
182 Say 'Y' here if you want your kernel to support the 182 Say 'Y' here if you want your kernel to support the
183 Technologic Systems TS-72xx board. 183 Technologic Systems TS-72xx board.
184 184
185config MACH_VISION_EP9307
186 bool "Support Vision Engraving Systems EP9307 SoM"
187 depends on EP93XX_SDCE0_PHYS_OFFSET
188 help
189 Say 'Y' here if you want your kernel to support the
190 Vision Engraving Systems EP9307 SoM.
191
185choice 192choice
186 prompt "Select a UART for early kernel messages" 193 prompt "Select a UART for early kernel messages"
187 194
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index 3cedcf2d39e5..574209d9e246 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -15,3 +15,4 @@ obj-$(CONFIG_MACH_MICRO9) += micro9.o
15obj-$(CONFIG_MACH_SIM_ONE) += simone.o 15obj-$(CONFIG_MACH_SIM_ONE) += simone.o
16obj-$(CONFIG_MACH_SNAPPER_CL15) += snappercl15.o 16obj-$(CONFIG_MACH_SNAPPER_CL15) += snappercl15.o
17obj-$(CONFIG_MACH_TS72XX) += ts72xx.o 17obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
18obj-$(CONFIG_MACH_VISION_EP9307)+= vision_ep9307.o
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
new file mode 100644
index 000000000000..10f6488f6e44
--- /dev/null
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -0,0 +1,364 @@
1/*
2 * arch/arm/mach-ep93xx/vision_ep9307.c
3 * Vision Engraving Systems EP9307 SoM support.
4 *
5 * Copyright (C) 2008-2011 Vision Engraving Systems
6 * H Hartley Sweeten <hsweeten@visionengravers.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or (at
11 * your option) any later version.
12 */
13
14#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/irq.h>
20#include <linux/gpio.h>
21#include <linux/fb.h>
22#include <linux/io.h>
23#include <linux/mtd/partitions.h>
24#include <linux/i2c.h>
25#include <linux/i2c-gpio.h>
26#include <linux/i2c/pca953x.h>
27#include <linux/spi/spi.h>
28#include <linux/spi/flash.h>
29#include <linux/spi/mmc_spi.h>
30#include <linux/mmc/host.h>
31
32#include <mach/hardware.h>
33#include <mach/fb.h>
34#include <mach/ep93xx_spi.h>
35
36#include <asm/mach-types.h>
37#include <asm/mach/map.h>
38#include <asm/mach/arch.h>
39
40/*************************************************************************
41 * Static I/O mappings for the FPGA
42 *************************************************************************/
43#define VISION_PHYS_BASE EP93XX_CS7_PHYS_BASE
44#define VISION_VIRT_BASE 0xfebff000
45
46static struct map_desc vision_io_desc[] __initdata = {
47 {
48 .virtual = VISION_VIRT_BASE,
49 .pfn = __phys_to_pfn(VISION_PHYS_BASE),
50 .length = SZ_4K,
51 .type = MT_DEVICE,
52 },
53};
54
55static void __init vision_map_io(void)
56{
57 ep93xx_map_io();
58
59 iotable_init(vision_io_desc, ARRAY_SIZE(vision_io_desc));
60}
61
62/*************************************************************************
63 * Ethernet
64 *************************************************************************/
65static struct ep93xx_eth_data vision_eth_data __initdata = {
66 .phy_id = 1,
67};
68
69/*************************************************************************
70 * Framebuffer
71 *************************************************************************/
72#define VISION_LCD_ENABLE EP93XX_GPIO_LINE_EGPIO1
73
74static int vision_lcd_setup(struct platform_device *pdev)
75{
76 int err;
77
78 err = gpio_request_one(VISION_LCD_ENABLE, GPIOF_INIT_HIGH,
79 dev_name(&pdev->dev));
80 if (err)
81 return err;
82
83 ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_RAS |
84 EP93XX_SYSCON_DEVCFG_RASONP3 |
85 EP93XX_SYSCON_DEVCFG_EXVC);
86
87 return 0;
88}
89
90static void vision_lcd_teardown(struct platform_device *pdev)
91{
92 gpio_free(VISION_LCD_ENABLE);
93}
94
95static void vision_lcd_blank(int blank_mode, struct fb_info *info)
96{
97 if (blank_mode)
98 gpio_set_value(VISION_LCD_ENABLE, 0);
99 else
100 gpio_set_value(VISION_LCD_ENABLE, 1);
101}
102
103static struct ep93xxfb_mach_info ep93xxfb_info __initdata = {
104 .num_modes = EP93XXFB_USE_MODEDB,
105 .bpp = 16,
106 .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING,
107 .setup = vision_lcd_setup,
108 .teardown = vision_lcd_teardown,
109 .blank = vision_lcd_blank,
110};
111
112
113/*************************************************************************
114 * GPIO Expanders
115 *************************************************************************/
116#define PCA9539_74_GPIO_BASE (EP93XX_GPIO_LINE_MAX + 1)
117#define PCA9539_75_GPIO_BASE (PCA9539_74_GPIO_BASE + 16)
118#define PCA9539_76_GPIO_BASE (PCA9539_75_GPIO_BASE + 16)
119#define PCA9539_77_GPIO_BASE (PCA9539_76_GPIO_BASE + 16)
120
121static struct pca953x_platform_data pca953x_74_gpio_data = {
122 .gpio_base = PCA9539_74_GPIO_BASE,
123 .irq_base = EP93XX_BOARD_IRQ(0),
124};
125
126static struct pca953x_platform_data pca953x_75_gpio_data = {
127 .gpio_base = PCA9539_75_GPIO_BASE,
128 .irq_base = -1,
129};
130
131static struct pca953x_platform_data pca953x_76_gpio_data = {
132 .gpio_base = PCA9539_76_GPIO_BASE,
133 .irq_base = -1,
134};
135
136static struct pca953x_platform_data pca953x_77_gpio_data = {
137 .gpio_base = PCA9539_77_GPIO_BASE,
138 .irq_base = -1,
139};
140
141/*************************************************************************
142 * I2C Bus
143 *************************************************************************/
144static struct i2c_gpio_platform_data vision_i2c_gpio_data __initdata = {
145 .sda_pin = EP93XX_GPIO_LINE_EEDAT,
146 .scl_pin = EP93XX_GPIO_LINE_EECLK,
147};
148
149static struct i2c_board_info vision_i2c_info[] __initdata = {
150 {
151 I2C_BOARD_INFO("isl1208", 0x6f),
152 .irq = IRQ_EP93XX_EXT1,
153 }, {
154 I2C_BOARD_INFO("pca9539", 0x74),
155 .platform_data = &pca953x_74_gpio_data,
156 .irq = gpio_to_irq(EP93XX_GPIO_LINE_F(7)),
157 }, {
158 I2C_BOARD_INFO("pca9539", 0x75),
159 .platform_data = &pca953x_75_gpio_data,
160 }, {
161 I2C_BOARD_INFO("pca9539", 0x76),
162 .platform_data = &pca953x_76_gpio_data,
163 }, {
164 I2C_BOARD_INFO("pca9539", 0x77),
165 .platform_data = &pca953x_77_gpio_data,
166 },
167};
168
169/*************************************************************************
170 * SPI Flash
171 *************************************************************************/
172#define VISION_SPI_FLASH_CS EP93XX_GPIO_LINE_EGPIO7
173
174static struct mtd_partition vision_spi_flash_partitions[] = {
175 {
176 .name = "SPI bootstrap",
177 .offset = 0,
178 .size = SZ_4K,
179 }, {
180 .name = "Bootstrap config",
181 .offset = MTDPART_OFS_APPEND,
182 .size = SZ_4K,
183 }, {
184 .name = "System config",
185 .offset = MTDPART_OFS_APPEND,
186 .size = MTDPART_SIZ_FULL,
187 },
188};
189
190static struct flash_platform_data vision_spi_flash_data = {
191 .name = "SPI Flash",
192 .parts = vision_spi_flash_partitions,
193 .nr_parts = ARRAY_SIZE(vision_spi_flash_partitions),
194};
195
196static int vision_spi_flash_hw_setup(struct spi_device *spi)
197{
198 return gpio_request_one(VISION_SPI_FLASH_CS, GPIOF_INIT_HIGH,
199 spi->modalias);
200}
201
202static void vision_spi_flash_hw_cleanup(struct spi_device *spi)
203{
204 gpio_free(VISION_SPI_FLASH_CS);
205}
206
207static void vision_spi_flash_hw_cs_control(struct spi_device *spi, int value)
208{
209 gpio_set_value(VISION_SPI_FLASH_CS, value);
210}
211
212static struct ep93xx_spi_chip_ops vision_spi_flash_hw = {
213 .setup = vision_spi_flash_hw_setup,
214 .cleanup = vision_spi_flash_hw_cleanup,
215 .cs_control = vision_spi_flash_hw_cs_control,
216};
217
218/*************************************************************************
219 * SPI SD/MMC host
220 *************************************************************************/
221#define VISION_SPI_MMC_CS EP93XX_GPIO_LINE_G(2)
222#define VISION_SPI_MMC_WP EP93XX_GPIO_LINE_F(0)
223#define VISION_SPI_MMC_CD EP93XX_GPIO_LINE_EGPIO15
224
225static struct gpio vision_spi_mmc_gpios[] = {
226 { VISION_SPI_MMC_WP, GPIOF_DIR_IN, "mmc_spi:wp" },
227 { VISION_SPI_MMC_CD, GPIOF_DIR_IN, "mmc_spi:cd" },
228};
229
230static int vision_spi_mmc_init(struct device *pdev,
231 irqreturn_t (*func)(int, void *), void *pdata)
232{
233 int err;
234
235 err = gpio_request_array(vision_spi_mmc_gpios,
236 ARRAY_SIZE(vision_spi_mmc_gpios));
237 if (err)
238 return err;
239
240 err = gpio_set_debounce(VISION_SPI_MMC_CD, 1);
241 if (err)
242 goto exit_err;
243
244 err = request_irq(gpio_to_irq(VISION_SPI_MMC_CD), func,
245 IRQ_TYPE_EDGE_BOTH, "mmc_spi:cd", pdata);
246 if (err)
247 goto exit_err;
248
249 return 0;
250
251exit_err:
252 gpio_free_array(vision_spi_mmc_gpios, ARRAY_SIZE(vision_spi_mmc_gpios));
253 return err;
254
255}
256
257static void vision_spi_mmc_exit(struct device *pdev, void *pdata)
258{
259 free_irq(gpio_to_irq(VISION_SPI_MMC_CD), pdata);
260 gpio_free_array(vision_spi_mmc_gpios, ARRAY_SIZE(vision_spi_mmc_gpios));
261}
262
263static int vision_spi_mmc_get_ro(struct device *pdev)
264{
265 return !!gpio_get_value(VISION_SPI_MMC_WP);
266}
267
268static int vision_spi_mmc_get_cd(struct device *pdev)
269{
270 return !gpio_get_value(VISION_SPI_MMC_CD);
271}
272
273static struct mmc_spi_platform_data vision_spi_mmc_data = {
274 .init = vision_spi_mmc_init,
275 .exit = vision_spi_mmc_exit,
276 .get_ro = vision_spi_mmc_get_ro,
277 .get_cd = vision_spi_mmc_get_cd,
278 .detect_delay = 100,
279 .powerup_msecs = 100,
280 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
281};
282
283static int vision_spi_mmc_hw_setup(struct spi_device *spi)
284{
285 return gpio_request_one(VISION_SPI_MMC_CS, GPIOF_INIT_HIGH,
286 spi->modalias);
287}
288
289static void vision_spi_mmc_hw_cleanup(struct spi_device *spi)
290{
291 gpio_free(VISION_SPI_MMC_CS);
292}
293
294static void vision_spi_mmc_hw_cs_control(struct spi_device *spi, int value)
295{
296 gpio_set_value(VISION_SPI_MMC_CS, value);
297}
298
299static struct ep93xx_spi_chip_ops vision_spi_mmc_hw = {
300 .setup = vision_spi_mmc_hw_setup,
301 .cleanup = vision_spi_mmc_hw_cleanup,
302 .cs_control = vision_spi_mmc_hw_cs_control,
303};
304
305/*************************************************************************
306 * SPI Bus
307 *************************************************************************/
308static struct spi_board_info vision_spi_board_info[] __initdata = {
309 {
310 .modalias = "sst25l",
311 .platform_data = &vision_spi_flash_data,
312 .controller_data = &vision_spi_flash_hw,
313 .max_speed_hz = 20000000,
314 .bus_num = 0,
315 .chip_select = 0,
316 .mode = SPI_MODE_3,
317 }, {
318 .modalias = "mmc_spi",
319 .platform_data = &vision_spi_mmc_data,
320 .controller_data = &vision_spi_mmc_hw,
321 .max_speed_hz = 20000000,
322 .bus_num = 0,
323 .chip_select = 1,
324 .mode = SPI_MODE_3,
325 },
326};
327
328static struct ep93xx_spi_info vision_spi_master __initdata = {
329 .num_chipselect = ARRAY_SIZE(vision_spi_board_info),
330};
331
332/*************************************************************************
333 * Machine Initialization
334 *************************************************************************/
335static void __init vision_init_machine(void)
336{
337 ep93xx_init_devices();
338 ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_64M);
339 ep93xx_register_eth(&vision_eth_data, 1);
340 ep93xx_register_fb(&ep93xxfb_info);
341 ep93xx_register_pwm(1, 0);
342
343 /*
344 * Request the gpio expander's interrupt gpio line now to prevent
345 * the kernel from doing a WARN in gpiolib:gpio_ensure_requested().
346 */
347 if (gpio_request_one(EP93XX_GPIO_LINE_F(7), GPIOF_DIR_IN,
348 "pca9539:74"))
349 pr_warn("cannot request interrupt gpio for pca9539:74\n");
350
351 ep93xx_register_i2c(&vision_i2c_gpio_data, vision_i2c_info,
352 ARRAY_SIZE(vision_i2c_info));
353 ep93xx_register_spi(&vision_spi_master, vision_spi_board_info,
354 ARRAY_SIZE(vision_spi_board_info));
355}
356
357MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
358 /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
359 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
360 .map_io = vision_map_io,
361 .init_irq = ep93xx_init_irq,
362 .timer = &ep93xx_timer,
363 .init_machine = vision_init_machine,
364MACHINE_END
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c
index 2a037cc221d0..0d59be3fa1fe 100644
--- a/arch/arm/mach-exynos4/clock.c
+++ b/arch/arm/mach-exynos4/clock.c
@@ -948,8 +948,7 @@ static struct clksrc_clk clksrcs[] = {
948 .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 28, .size = 4 }, 948 .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 28, .size = 4 },
949 }, { 949 }, {
950 .clk = { 950 .clk = {
951 .name = "sclk_cam", 951 .name = "sclk_cam0",
952 .devname = "exynos4-fimc.0",
953 .enable = exynos4_clksrc_mask_cam_ctrl, 952 .enable = exynos4_clksrc_mask_cam_ctrl,
954 .ctrlbit = (1 << 16), 953 .ctrlbit = (1 << 16),
955 }, 954 },
@@ -958,8 +957,7 @@ static struct clksrc_clk clksrcs[] = {
958 .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 16, .size = 4 }, 957 .reg_div = { .reg = S5P_CLKDIV_CAM, .shift = 16, .size = 4 },
959 }, { 958 }, {
960 .clk = { 959 .clk = {
961 .name = "sclk_cam", 960 .name = "sclk_cam1",
962 .devname = "exynos4-fimc.1",
963 .enable = exynos4_clksrc_mask_cam_ctrl, 961 .enable = exynos4_clksrc_mask_cam_ctrl,
964 .ctrlbit = (1 << 20), 962 .ctrlbit = (1 << 20),
965 }, 963 },
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index fcf0ae95651f..8cdc730dcb3a 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -32,6 +32,7 @@
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/io.h> 33#include <linux/io.h>
34#include <linux/mtd/physmap.h> 34#include <linux/mtd/physmap.h>
35#include <video/vga.h>
35 36
36#include <mach/hardware.h> 37#include <mach/hardware.h>
37#include <mach/platform.h> 38#include <mach/platform.h>
@@ -154,6 +155,7 @@ static struct map_desc ap_io_desc[] __initdata = {
154static void __init ap_map_io(void) 155static void __init ap_map_io(void)
155{ 156{
156 iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc)); 157 iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc));
158 vga_base = PCI_MEMORY_VADDR;
157} 159}
158 160
159#define INTEGRATOR_SC_VALID_INT 0x003fffff 161#define INTEGRATOR_SC_VALID_INT 0x003fffff
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index dd56bfb351e3..11b86e5b71c2 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -27,7 +27,6 @@
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/io.h> 29#include <linux/io.h>
30#include <video/vga.h>
31 30
32#include <mach/hardware.h> 31#include <mach/hardware.h>
33#include <mach/platform.h> 32#include <mach/platform.h>
@@ -505,7 +504,6 @@ void __init pci_v3_preinit(void)
505 504
506 pcibios_min_io = 0x6000; 505 pcibios_min_io = 0x6000;
507 pcibios_min_mem = 0x00100000; 506 pcibios_min_mem = 0x00100000;
508 vga_base = PCI_MEMORY_VADDR;
509 507
510 /* 508 /*
511 * Hook in our fault handler for PCI errors 509 * Hook in our fault handler for PCI errors
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c
index a1a7176675b9..38058af48972 100644
--- a/arch/arm/mach-s3c2443/clock.c
+++ b/arch/arm/mach-s3c2443/clock.c
@@ -128,7 +128,7 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate)
128 unsigned long clkcon0; 128 unsigned long clkcon0;
129 129
130 clkcon0 = __raw_readl(S3C2443_CLKDIV0); 130 clkcon0 = __raw_readl(S3C2443_CLKDIV0);
131 clkcon0 &= S3C2443_CLKDIV0_ARMDIV_MASK; 131 clkcon0 &= ~S3C2443_CLKDIV0_ARMDIV_MASK;
132 clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT; 132 clkcon0 |= val << S3C2443_CLKDIV0_ARMDIV_SHIFT;
133 __raw_writel(clkcon0, S3C2443_CLKDIV0); 133 __raw_writel(clkcon0, S3C2443_CLKDIV0);
134 } 134 }
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index 52a8e607bcc2..f5f8fa89679c 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -815,8 +815,7 @@ static struct clksrc_clk clksrcs[] = {
815 .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, 815 .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 },
816 }, { 816 }, {
817 .clk = { 817 .clk = {
818 .name = "sclk_cam", 818 .name = "sclk_cam0",
819 .devname = "s5pv210-fimc.0",
820 .enable = s5pv210_clk_mask0_ctrl, 819 .enable = s5pv210_clk_mask0_ctrl,
821 .ctrlbit = (1 << 3), 820 .ctrlbit = (1 << 3),
822 }, 821 },
@@ -825,8 +824,7 @@ static struct clksrc_clk clksrcs[] = {
825 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, 824 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 },
826 }, { 825 }, {
827 .clk = { 826 .clk = {
828 .name = "sclk_cam", 827 .name = "sclk_cam1",
829 .devname = "s5pv210-fimc.1",
830 .enable = s5pv210_clk_mask0_ctrl, 828 .enable = s5pv210_clk_mask0_ctrl,
831 .ctrlbit = (1 << 4), 829 .ctrlbit = (1 << 4),
832 }, 830 },
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S
index 3b24bfa3b828..07c4bc8ea0a4 100644
--- a/arch/arm/mm/cache-v7.S
+++ b/arch/arm/mm/cache-v7.S
@@ -174,6 +174,10 @@ ENTRY(v7_coherent_user_range)
174 dcache_line_size r2, r3 174 dcache_line_size r2, r3
175 sub r3, r2, #1 175 sub r3, r2, #1
176 bic r12, r0, r3 176 bic r12, r0, r3
177#ifdef CONFIG_ARM_ERRATA_764369
178 ALT_SMP(W(dsb))
179 ALT_UP(W(nop))
180#endif
1771: 1811:
178 USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification 182 USER( mcr p15, 0, r12, c7, c11, 1 ) @ clean D line to the point of unification
179 add r12, r12, r2 183 add r12, r12, r2
@@ -223,6 +227,10 @@ ENTRY(v7_flush_kern_dcache_area)
223 add r1, r0, r1 227 add r1, r0, r1
224 sub r3, r2, #1 228 sub r3, r2, #1
225 bic r0, r0, r3 229 bic r0, r0, r3
230#ifdef CONFIG_ARM_ERRATA_764369
231 ALT_SMP(W(dsb))
232 ALT_UP(W(nop))
233#endif
2261: 2341:
227 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line 235 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line
228 add r0, r0, r2 236 add r0, r0, r2
@@ -247,6 +255,10 @@ v7_dma_inv_range:
247 sub r3, r2, #1 255 sub r3, r2, #1
248 tst r0, r3 256 tst r0, r3
249 bic r0, r0, r3 257 bic r0, r0, r3
258#ifdef CONFIG_ARM_ERRATA_764369
259 ALT_SMP(W(dsb))
260 ALT_UP(W(nop))
261#endif
250 mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line 262 mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line
251 263
252 tst r1, r3 264 tst r1, r3
@@ -270,6 +282,10 @@ v7_dma_clean_range:
270 dcache_line_size r2, r3 282 dcache_line_size r2, r3
271 sub r3, r2, #1 283 sub r3, r2, #1
272 bic r0, r0, r3 284 bic r0, r0, r3
285#ifdef CONFIG_ARM_ERRATA_764369
286 ALT_SMP(W(dsb))
287 ALT_UP(W(nop))
288#endif
2731: 2891:
274 mcr p15, 0, r0, c7, c10, 1 @ clean D / U line 290 mcr p15, 0, r0, c7, c10, 1 @ clean D / U line
275 add r0, r0, r2 291 add r0, r0, r2
@@ -288,6 +304,10 @@ ENTRY(v7_dma_flush_range)
288 dcache_line_size r2, r3 304 dcache_line_size r2, r3
289 sub r3, r2, #1 305 sub r3, r2, #1
290 bic r0, r0, r3 306 bic r0, r0, r3
307#ifdef CONFIG_ARM_ERRATA_764369
308 ALT_SMP(W(dsb))
309 ALT_UP(W(nop))
310#endif
2911: 3111:
292 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line 312 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D / U line
293 add r0, r0, r2 313 add r0, r0, r2
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 0a0a1e7c20d2..c3ff82f92d9c 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -324,6 +324,8 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
324 324
325 if (addr) 325 if (addr)
326 *handle = pfn_to_dma(dev, page_to_pfn(page)); 326 *handle = pfn_to_dma(dev, page_to_pfn(page));
327 else
328 __dma_free_buffer(page, size);
327 329
328 return addr; 330 return addr;
329} 331}
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c
index f71078ef6bb5..f88216d23991 100644
--- a/arch/arm/plat-s5p/irq-gpioint.c
+++ b/arch/arm/plat-s5p/irq-gpioint.c
@@ -114,17 +114,18 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip)
114{ 114{
115 static int used_gpioint_groups = 0; 115 static int used_gpioint_groups = 0;
116 int group = chip->group; 116 int group = chip->group;
117 struct s5p_gpioint_bank *bank = NULL; 117 struct s5p_gpioint_bank *b, *bank = NULL;
118 struct irq_chip_generic *gc; 118 struct irq_chip_generic *gc;
119 struct irq_chip_type *ct; 119 struct irq_chip_type *ct;
120 120
121 if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT) 121 if (used_gpioint_groups >= S5P_GPIOINT_GROUP_COUNT)
122 return -ENOMEM; 122 return -ENOMEM;
123 123
124 list_for_each_entry(bank, &banks, list) { 124 list_for_each_entry(b, &banks, list) {
125 if (group >= bank->start && 125 if (group >= b->start && group < b->start + b->nr_groups) {
126 group < bank->start + bank->nr_groups) 126 bank = b;
127 break; 127 break;
128 }
128 } 129 }
129 if (!bank) 130 if (!bank)
130 return -EINVAL; 131 return -EINVAL;