diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2012-10-09 16:03:21 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-10-09 16:04:25 +0200 |
commit | ffe315012510165ce82e4dd4767f0a5dba9edbf7 (patch) | |
tree | f601cd980af9d0ced5ca9aedecef4fa0d2ca0e15 /arch/microblaze/kernel/reset.c | |
parent | mtd: nand: detect Samsung K9GBG08U0A, K9GAG08U0F ID (diff) | |
parent | UAPI: (Scripted) Disintegrate include/mtd (diff) | |
download | linux-ffe315012510165ce82e4dd4767f0a5dba9edbf7.tar.xz linux-ffe315012510165ce82e4dd4767f0a5dba9edbf7.zip |
Merge tag 'disintegrate-mtd-20121009' of git://git.infradead.org/users/dhowells/linux-headers
UAPI Disintegration 2012-10-09
Conflicts:
MAINTAINERS
arch/arm/configs/bcmring_defconfig
arch/arm/mach-imx/clk-imx51-imx53.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/nand_bcm_umi.h
drivers/mtd/nand/orion_nand.c
Diffstat (limited to 'arch/microblaze/kernel/reset.c')
-rw-r--r-- | arch/microblaze/kernel/reset.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c index 88a01636f785..2e5079ab53d2 100644 --- a/arch/microblaze/kernel/reset.c +++ b/arch/microblaze/kernel/reset.c @@ -26,13 +26,14 @@ void of_platform_reset_gpio_probe(void) "hard-reset-gpios", 0); if (!gpio_is_valid(handle)) { - printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n", + pr_info("Skipping unavailable RESET gpio %d (%s)\n", handle, "reset"); + return; } ret = gpio_request(handle, "reset"); if (ret < 0) { - printk(KERN_INFO "GPIO pin is already allocated\n"); + pr_info("GPIO pin is already allocated\n"); return; } @@ -49,7 +50,7 @@ void of_platform_reset_gpio_probe(void) /* Setup output direction */ gpio_set_value(handle, 0); - printk(KERN_INFO "RESET: Registered gpio device: %d, current val: %d\n", + pr_info("RESET: Registered gpio device: %d, current val: %d\n", handle, reset_val); return; err: @@ -60,7 +61,10 @@ err: static void gpio_system_reset(void) { - gpio_set_value(handle, 1 - reset_val); + if (gpio_is_valid(handle)) + gpio_set_value(handle, 1 - reset_val); + else + pr_notice("Reset GPIO unavailable - halting!\n"); } #else #define gpio_system_reset() do {} while (0) @@ -72,30 +76,29 @@ void of_platform_reset_gpio_probe(void) void machine_restart(char *cmd) { - printk(KERN_NOTICE "Machine restart...\n"); + pr_notice("Machine restart...\n"); gpio_system_reset(); - dump_stack(); while (1) ; } void machine_shutdown(void) { - printk(KERN_NOTICE "Machine shutdown...\n"); + pr_notice("Machine shutdown...\n"); while (1) ; } void machine_halt(void) { - printk(KERN_NOTICE "Machine halt...\n"); + pr_notice("Machine halt...\n"); while (1) ; } void machine_power_off(void) { - printk(KERN_NOTICE "Machine power off...\n"); + pr_notice("Machine power off...\n"); while (1) ; } |