Skip to content

Commit

Permalink
Merge pull request torvalds#94 from Leo-Yan/revert_reset_patch_0710
Browse files Browse the repository at this point in the history
Revert "power: reset: support reboot for hi6220"
  • Loading branch information
ldts committed Jul 14, 2015
2 parents 78ae668 + 23a6181 commit 8cabc23
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/power/reset/hisi-reboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,19 @@
#include <asm/proc-fns.h>
#include <asm/system_misc.h>

static void __iomem *reboot_base;
static void __iomem *base;
static u32 reboot_offset;
static u32 reboot_magic_num;

static void hisi_restart(enum reboot_mode mode, const char *cmd)
{
writel_relaxed(reboot_magic_num, reboot_base + reboot_offset);
writel_relaxed(0xdeadbeef, base + reboot_offset);

while (1)
cpu_do_idle();
}

static int hisi_reboot_probe(struct platform_device *pdev)
{
void __iomem *base;
struct device_node *np = pdev->dev.of_node;

base = of_iomap(np, 0);
Expand All @@ -49,20 +47,13 @@ static int hisi_reboot_probe(struct platform_device *pdev)
return -EINVAL;
}

if (of_machine_is_compatible("hisilicon,sysctrl"))
reboot_magic_num = 0xdeadbeef;
else /* hisilicon,aoctrl */
reboot_magic_num = 0x48698284;

reboot_base = base;
arm_pm_restart = hisi_restart;

return 0;
}

static struct of_device_id hisi_reboot_of_match[] = {
{ .compatible = "hisilicon,sysctrl" },
{ .compatible = "hisilicon,aoctrl" },
{}
};

Expand Down

0 comments on commit 8cabc23

Please sign in to comment.