Skip to content

Commit

Permalink
Revert "power: reset: support reboot for hi6220"
Browse files Browse the repository at this point in the history
In the commit 40a4407 "dts: hi6220:
update reboot" has changed to use syscon-reset driver, so can revert the
previous modification for hisi's reset driver.
  • Loading branch information
Leo Yan committed Jul 10, 2015
1 parent a5e5d0e commit 23a6181
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 23a6181

Please sign in to comment.