diff options
author | Olof Johansson <olof@lixom.net> | 2015-01-29 17:04:22 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2015-01-29 17:08:04 -0500 |
commit | ee481c84fa0675c94fd4443f6da5be836664d821 (patch) | |
tree | 8fade8c7f83d0ae54d112ad32178a0c790c894c8 | |
parent | ff6a8168d2e57cf36c10b8add6ae5773c02babdc (diff) | |
parent | 3329659df0300d1d0aa22f5e7063f83a88ef92aa (diff) |
Merge tag 'zynq-soc-for-3.20' of https://github.com/Xilinx/linux-xlnx into next/soc
Merge "Zynq SoC changes for 3.20" from Michal Simek:
arm: Xilinx Zynq SoC patches for v3.20
- Enable pincontrol
- Simplified SLCR initialization
- Setup default ARCH_NR_GPIO
* tag 'zynq-soc-for-3.20' of https://github.com/Xilinx/linux-xlnx:
ARM: zynq: Simplify SLCR initialization
ARM: zynq: PM: Fixed simple typo.
ARM: zynq: Setup default gpio number for Xilinx Zynq
ARM: zynq: Enable pinctrl
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-zynq/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-zynq/common.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-zynq/pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-zynq/slcr.c | 35 |
5 files changed, 11 insertions, 32 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 86e2202565e6..f5dd6e970f53 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1490,7 +1490,7 @@ config ARM_PSCI | |||
1490 | # selected platforms. | 1490 | # selected platforms. |
1491 | config ARCH_NR_GPIO | 1491 | config ARCH_NR_GPIO |
1492 | int | 1492 | int |
1493 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA | 1493 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA || ARCH_ZYNQ |
1494 | default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \ | 1494 | default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \ |
1495 | SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 | 1495 | SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 |
1496 | default 416 if ARCH_SUNXI | 1496 | default 416 if ARCH_SUNXI |
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index aaa5162c1509..78e5e007f52d 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig | |||
@@ -9,6 +9,8 @@ config ARCH_ZYNQ | |||
9 | select HAVE_ARM_TWD if SMP | 9 | select HAVE_ARM_TWD if SMP |
10 | select ICST | 10 | select ICST |
11 | select MFD_SYSCON | 11 | select MFD_SYSCON |
12 | select PINCTRL | ||
13 | select PINCTRL_ZYNQ | ||
12 | select SOC_BUS | 14 | select SOC_BUS |
13 | help | 15 | help |
14 | Support for Xilinx Zynq ARM Cortex A9 Platform | 16 | Support for Xilinx Zynq ARM Cortex A9 Platform |
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 26f92c28d22b..c887196cfdbe 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -146,8 +146,6 @@ out: | |||
146 | 146 | ||
147 | platform_device_register(&zynq_cpuidle_device); | 147 | platform_device_register(&zynq_cpuidle_device); |
148 | platform_device_register_full(&devinfo); | 148 | platform_device_register_full(&devinfo); |
149 | |||
150 | zynq_slcr_init(); | ||
151 | } | 149 | } |
152 | 150 | ||
153 | static void __init zynq_timer_init(void) | 151 | static void __init zynq_timer_init(void) |
diff --git a/arch/arm/mach-zynq/pm.c b/arch/arm/mach-zynq/pm.c index 911fcf865be8..fa44fc1b6dd5 100644 --- a/arch/arm/mach-zynq/pm.c +++ b/arch/arm/mach-zynq/pm.c | |||
@@ -61,7 +61,7 @@ static void __iomem *zynq_pm_ioremap(const char *comp) | |||
61 | /** | 61 | /** |
62 | * zynq_pm_late_init() - Power management init | 62 | * zynq_pm_late_init() - Power management init |
63 | * | 63 | * |
64 | * Initialization of power management related featurs and infrastructure. | 64 | * Initialization of power management related features and infrastructure. |
65 | */ | 65 | */ |
66 | void __init zynq_pm_late_init(void) | 66 | void __init zynq_pm_late_init(void) |
67 | { | 67 | { |
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index d4cb50cf97c0..c3c24fd8b306 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c | |||
@@ -47,11 +47,6 @@ static struct regmap *zynq_slcr_regmap; | |||
47 | */ | 47 | */ |
48 | static int zynq_slcr_write(u32 val, u32 offset) | 48 | static int zynq_slcr_write(u32 val, u32 offset) |
49 | { | 49 | { |
50 | if (!zynq_slcr_regmap) { | ||
51 | writel(val, zynq_slcr_base + offset); | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | return regmap_write(zynq_slcr_regmap, offset, val); | 50 | return regmap_write(zynq_slcr_regmap, offset, val); |
56 | } | 51 | } |
57 | 52 | ||
@@ -65,12 +60,7 @@ static int zynq_slcr_write(u32 val, u32 offset) | |||
65 | */ | 60 | */ |
66 | static int zynq_slcr_read(u32 *val, u32 offset) | 61 | static int zynq_slcr_read(u32 *val, u32 offset) |
67 | { | 62 | { |
68 | if (zynq_slcr_regmap) | 63 | return regmap_read(zynq_slcr_regmap, offset, val); |
69 | return regmap_read(zynq_slcr_regmap, offset, val); | ||
70 | |||
71 | *val = readl(zynq_slcr_base + offset); | ||
72 | |||
73 | return 0; | ||
74 | } | 64 | } |
75 | 65 | ||
76 | /** | 66 | /** |
@@ -196,23 +186,6 @@ void zynq_slcr_cpu_state_write(int cpu, bool die) | |||
196 | } | 186 | } |
197 | 187 | ||
198 | /** | 188 | /** |
199 | * zynq_slcr_init - Regular slcr driver init | ||
200 | * Return: 0 on success, negative errno otherwise. | ||
201 | * | ||
202 | * Called early during boot from platform code to remap SLCR area. | ||
203 | */ | ||
204 | int __init zynq_slcr_init(void) | ||
205 | { | ||
206 | zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr"); | ||
207 | if (IS_ERR(zynq_slcr_regmap)) { | ||
208 | pr_err("%s: failed to find zynq-slcr\n", __func__); | ||
209 | return -ENODEV; | ||
210 | } | ||
211 | |||
212 | return 0; | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * zynq_early_slcr_init - Early slcr init function | 189 | * zynq_early_slcr_init - Early slcr init function |
217 | * | 190 | * |
218 | * Return: 0 on success, negative errno otherwise. | 191 | * Return: 0 on success, negative errno otherwise. |
@@ -237,6 +210,12 @@ int __init zynq_early_slcr_init(void) | |||
237 | 210 | ||
238 | np->data = (__force void *)zynq_slcr_base; | 211 | np->data = (__force void *)zynq_slcr_base; |
239 | 212 | ||
213 | zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr"); | ||
214 | if (IS_ERR(zynq_slcr_regmap)) { | ||
215 | pr_err("%s: failed to find zynq-slcr\n", __func__); | ||
216 | return -ENODEV; | ||
217 | } | ||
218 | |||
240 | /* unlock the SLCR so that registers can be changed */ | 219 | /* unlock the SLCR so that registers can be changed */ |
241 | zynq_slcr_unlock(); | 220 | zynq_slcr_unlock(); |
242 | 221 | ||