diff options
-rw-r--r-- | arch/microblaze/include/asm/setup.h | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/platform.c | 22 | ||||
-rw-r--r-- | arch/microblaze/kernel/reset.c | 11 |
4 files changed, 7 insertions, 30 deletions
diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h index a38e4a56e3c6..ce9b7b786156 100644 --- a/arch/microblaze/include/asm/setup.h +++ b/arch/microblaze/include/asm/setup.h | |||
@@ -23,8 +23,6 @@ extern char *klimit; | |||
23 | extern void mmu_reset(void); | 23 | extern void mmu_reset(void); |
24 | # endif /* CONFIG_MMU */ | 24 | # endif /* CONFIG_MMU */ |
25 | 25 | ||
26 | extern void of_platform_reset_gpio_probe(void); | ||
27 | |||
28 | void time_init(void); | 26 | void time_init(void); |
29 | void init_IRQ(void); | 27 | void init_IRQ(void); |
30 | void machine_early_init(const char *cmdline, unsigned int ram, | 28 | void machine_early_init(const char *cmdline, unsigned int ram, |
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index 3a53378d66d9..dd71637437f4 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile | |||
@@ -16,7 +16,7 @@ extra-y := head.o vmlinux.lds | |||
16 | 16 | ||
17 | obj-y += dma.o exceptions.o \ | 17 | obj-y += dma.o exceptions.o \ |
18 | hw_exception_handler.o irq.o \ | 18 | hw_exception_handler.o irq.o \ |
19 | platform.o process.o prom.o ptrace.o \ | 19 | process.o prom.o ptrace.o \ |
20 | reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o | 20 | reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o |
21 | 21 | ||
22 | obj-y += cpu/ | 22 | obj-y += cpu/ |
diff --git a/arch/microblaze/kernel/platform.c b/arch/microblaze/kernel/platform.c deleted file mode 100644 index b9a414552d9b..000000000000 --- a/arch/microblaze/kernel/platform.c +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Michal Simek <monstr@monstr.eu> | ||
3 | * | ||
4 | * based on virtex.c file | ||
5 | * | ||
6 | * Copyright 2007 Secret Lab Technologies Ltd. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public License | ||
9 | * version 2. This program is licensed "as is" without any warranty of any | ||
10 | * kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/of_platform.h> | ||
15 | #include <asm/setup.h> | ||
16 | |||
17 | static int __init microblaze_device_probe(void) | ||
18 | { | ||
19 | of_platform_reset_gpio_probe(); | ||
20 | return 0; | ||
21 | } | ||
22 | device_initcall(microblaze_device_probe); | ||
diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c index bab4c8330ef4..fcbe1daf6316 100644 --- a/arch/microblaze/kernel/reset.c +++ b/arch/microblaze/kernel/reset.c | |||
@@ -18,7 +18,7 @@ | |||
18 | static int handle; /* reset pin handle */ | 18 | static int handle; /* reset pin handle */ |
19 | static unsigned int reset_val; | 19 | static unsigned int reset_val; |
20 | 20 | ||
21 | void of_platform_reset_gpio_probe(void) | 21 | static int of_platform_reset_gpio_probe(void) |
22 | { | 22 | { |
23 | int ret; | 23 | int ret; |
24 | handle = of_get_named_gpio(of_find_node_by_path("/"), | 24 | handle = of_get_named_gpio(of_find_node_by_path("/"), |
@@ -27,13 +27,13 @@ void of_platform_reset_gpio_probe(void) | |||
27 | if (!gpio_is_valid(handle)) { | 27 | if (!gpio_is_valid(handle)) { |
28 | pr_info("Skipping unavailable RESET gpio %d (%s)\n", | 28 | pr_info("Skipping unavailable RESET gpio %d (%s)\n", |
29 | handle, "reset"); | 29 | handle, "reset"); |
30 | return; | 30 | return -ENODEV; |
31 | } | 31 | } |
32 | 32 | ||
33 | ret = gpio_request(handle, "reset"); | 33 | ret = gpio_request(handle, "reset"); |
34 | if (ret < 0) { | 34 | if (ret < 0) { |
35 | pr_info("GPIO pin is already allocated\n"); | 35 | pr_info("GPIO pin is already allocated\n"); |
36 | return; | 36 | return ret; |
37 | } | 37 | } |
38 | 38 | ||
39 | /* get current setup value */ | 39 | /* get current setup value */ |
@@ -51,11 +51,12 @@ void of_platform_reset_gpio_probe(void) | |||
51 | 51 | ||
52 | pr_info("RESET: Registered gpio device: %d, current val: %d\n", | 52 | pr_info("RESET: Registered gpio device: %d, current val: %d\n", |
53 | handle, reset_val); | 53 | handle, reset_val); |
54 | return; | 54 | return 0; |
55 | err: | 55 | err: |
56 | gpio_free(handle); | 56 | gpio_free(handle); |
57 | return; | 57 | return ret; |
58 | } | 58 | } |
59 | device_initcall(of_platform_reset_gpio_probe); | ||
59 | 60 | ||
60 | 61 | ||
61 | static void gpio_system_reset(void) | 62 | static void gpio_system_reset(void) |