diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 14:14:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 14:14:29 -0400 |
commit | b3345d7c57d70e6cb6749af25cdbe80515582e99 (patch) | |
tree | 04cce706bc7e944ad1fb257108a8ae735948f97f /drivers/power | |
parent | 44c916d58b9ef1f2c4aec2def57fa8289c716a60 (diff) | |
parent | c2fff85e21818952aa0ee5778926beee6c03e579 (diff) |
Merge tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson:
"This is the bulk of new SoC enablement and other platform changes for
3.17:
- Samsung S5PV210 has been converted to DT and multiplatform
- Clock drivers and bindings for some of the lower-end i.MX 1/2
platforms
- Kirkwood, one of the popular Marvell platforms, is folded into the
mvebu platform code, removing mach-kirkwood
- Hwmod data for TI AM43xx and DRA7 platforms
- More additions of Renesas shmobile platform support
- Removal of plat-samsung contents that can be removed with S5PV210
being multiplatform/DT-enabled and the other two old platforms
being removed
New platforms (most with only basic support right now):
- Hisilicon X5HD2 settop box chipset is introduced
- Mediatek MT6589 (mobile chipset) is introduced
- Broadcom BCM7xxx settop box chipset is introduced
+ as usual a lot other pieces all over the platform code"
* tag 'soc-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (240 commits)
ARM: hisi: remove smp from machine descriptor
power: reset: move hisilicon reboot code
ARM: dts: Add hix5hd2-dkb dts file.
ARM: debug: Rename Hi3716 to HIX5HD2
ARM: hisi: enable hix5hd2 SoC
ARM: hisi: add ARCH_HISI
MAINTAINERS: add entry for Broadcom ARM STB architecture
ARM: brcmstb: select GISB arbiter and interrupt drivers
ARM: brcmstb: add infrastructure for ARM-based Broadcom STB SoCs
ARM: configs: enable SMP in bcm_defconfig
ARM: add SMP support for Broadcom mobile SoCs
Documentation: arm: misc updates to Marvell EBU SoC status
Documentation: arm: add URLs to public datasheets for the Marvell Armada XP SoC
ARM: mvebu: fix build without platforms selected
ARM: mvebu: add cpuidle support for Armada 38x
ARM: mvebu: add cpuidle support for Armada 370
cpuidle: mvebu: add Armada 38x support
cpuidle: mvebu: add Armada 370 support
cpuidle: mvebu: rename the driver from armada-370-xp to mvebu-v7
ARM: mvebu: export the SCU address
...
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/reset/Kconfig | 6 | ||||
-rw-r--r-- | drivers/power/reset/Makefile | 1 | ||||
-rw-r--r-- | drivers/power/reset/hisi-reboot.c | 67 |
3 files changed, 74 insertions, 0 deletions
diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index f2ac54df496f..ca41523bbebf 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig | |||
@@ -39,6 +39,12 @@ config POWER_RESET_GPIO | |||
39 | If your board needs a GPIO high/low to power down, say Y and | 39 | If your board needs a GPIO high/low to power down, say Y and |
40 | create a binding in your devicetree. | 40 | create a binding in your devicetree. |
41 | 41 | ||
42 | config POWER_RESET_HISI | ||
43 | bool "Hisilicon power-off driver" | ||
44 | depends on POWER_RESET && ARCH_HISI | ||
45 | help | ||
46 | Reboot support for Hisilicon boards. | ||
47 | |||
42 | config POWER_RESET_MSM | 48 | config POWER_RESET_MSM |
43 | bool "Qualcomm MSM power-off driver" | 49 | bool "Qualcomm MSM power-off driver" |
44 | depends on POWER_RESET && ARCH_QCOM | 50 | depends on POWER_RESET && ARCH_QCOM |
diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile index 7379818ca69d..a42e70edd037 100644 --- a/drivers/power/reset/Makefile +++ b/drivers/power/reset/Makefile | |||
@@ -2,6 +2,7 @@ obj-$(CONFIG_POWER_RESET_AS3722) += as3722-poweroff.o | |||
2 | obj-$(CONFIG_POWER_RESET_AXXIA) += axxia-reset.o | 2 | obj-$(CONFIG_POWER_RESET_AXXIA) += axxia-reset.o |
3 | obj-$(CONFIG_POWER_RESET_BRCMSTB) += brcmstb-reboot.o | 3 | obj-$(CONFIG_POWER_RESET_BRCMSTB) += brcmstb-reboot.o |
4 | obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o | 4 | obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o |
5 | obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o | ||
5 | obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o | 6 | obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o |
6 | obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o | 7 | obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o |
7 | obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o | 8 | obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o |
diff --git a/drivers/power/reset/hisi-reboot.c b/drivers/power/reset/hisi-reboot.c new file mode 100644 index 000000000000..0c91d0231d36 --- /dev/null +++ b/drivers/power/reset/hisi-reboot.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * Hisilicon SoC reset code | ||
3 | * | ||
4 | * Copyright (c) 2014 Hisilicon Ltd. | ||
5 | * Copyright (c) 2014 Linaro Ltd. | ||
6 | * | ||
7 | * Author: Haojian Zhuang <haojian.zhuang@linaro.org> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/delay.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/of_address.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/reboot.h> | ||
20 | |||
21 | #include <asm/proc-fns.h> | ||
22 | #include <asm/system_misc.h> | ||
23 | |||
24 | static void __iomem *base; | ||
25 | static u32 reboot_offset; | ||
26 | |||
27 | static void hisi_restart(enum reboot_mode mode, const char *cmd) | ||
28 | { | ||
29 | writel_relaxed(0xdeadbeef, base + reboot_offset); | ||
30 | |||
31 | while (1) | ||
32 | cpu_do_idle(); | ||
33 | } | ||
34 | |||
35 | static int hisi_reboot_probe(struct platform_device *pdev) | ||
36 | { | ||
37 | struct device_node *np = pdev->dev.of_node; | ||
38 | |||
39 | base = of_iomap(np, 0); | ||
40 | if (!base) { | ||
41 | WARN(1, "failed to map base address"); | ||
42 | return -ENODEV; | ||
43 | } | ||
44 | |||
45 | if (of_property_read_u32(np, "reboot-offset", &reboot_offset) < 0) { | ||
46 | pr_err("failed to find reboot-offset property\n"); | ||
47 | return -EINVAL; | ||
48 | } | ||
49 | |||
50 | arm_pm_restart = hisi_restart; | ||
51 | |||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | static struct of_device_id hisi_reboot_of_match[] = { | ||
56 | { .compatible = "hisilicon,sysctrl" }, | ||
57 | {} | ||
58 | }; | ||
59 | |||
60 | static struct platform_driver hisi_reboot_driver = { | ||
61 | .probe = hisi_reboot_probe, | ||
62 | .driver = { | ||
63 | .name = "hisi-reboot", | ||
64 | .of_match_table = hisi_reboot_of_match, | ||
65 | }, | ||
66 | }; | ||
67 | module_platform_driver(hisi_reboot_driver); | ||