aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/Kbuild1
-rw-r--r--include/asm-x86/gpio.h56
-rw-r--r--include/asm-x86/thread_info.h2
3 files changed, 58 insertions, 1 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
index 811e9828ccb3..4a8e80cdcfa5 100644
--- a/include/asm-x86/Kbuild
+++ b/include/asm-x86/Kbuild
@@ -18,7 +18,6 @@ unifdef-y += msr.h
18unifdef-y += mtrr.h 18unifdef-y += mtrr.h
19unifdef-y += posix_types_32.h 19unifdef-y += posix_types_32.h
20unifdef-y += posix_types_64.h 20unifdef-y += posix_types_64.h
21unifdef-y += ptrace.h
22unifdef-y += unistd_32.h 21unifdef-y += unistd_32.h
23unifdef-y += unistd_64.h 22unifdef-y += unistd_64.h
24unifdef-y += vm86.h 23unifdef-y += vm86.h
diff --git a/include/asm-x86/gpio.h b/include/asm-x86/gpio.h
index ff87fca0caf9..116e9147fe66 100644
--- a/include/asm-x86/gpio.h
+++ b/include/asm-x86/gpio.h
@@ -1,6 +1,62 @@
1/*
2 * Generic GPIO API implementation for x86.
3 *
4 * Derived from the generic GPIO API for powerpc:
5 *
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
7 *
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
1#ifndef _ASM_I386_GPIO_H 16#ifndef _ASM_I386_GPIO_H
2#define _ASM_I386_GPIO_H 17#define _ASM_I386_GPIO_H
3 18
19#ifdef CONFIG_X86_RDC321X
4#include <gpio.h> 20#include <gpio.h>
21#else /* CONFIG_X86_RDC321X */
22
23#include <asm-generic/gpio.h>
24
25#ifdef CONFIG_GPIOLIB
26
27/*
28 * Just call gpiolib.
29 */
30static inline int gpio_get_value(unsigned int gpio)
31{
32 return __gpio_get_value(gpio);
33}
34
35static inline void gpio_set_value(unsigned int gpio, int value)
36{
37 __gpio_set_value(gpio, value);
38}
39
40static inline int gpio_cansleep(unsigned int gpio)
41{
42 return __gpio_cansleep(gpio);
43}
44
45/*
46 * Not implemented, yet.
47 */
48static inline int gpio_to_irq(unsigned int gpio)
49{
50 return -ENOSYS;
51}
52
53static inline int irq_to_gpio(unsigned int irq)
54{
55 return -EINVAL;
56}
57
58#endif /* CONFIG_GPIOLIB */
59
60#endif /* CONFIG_X86_RDC321X */
5 61
6#endif /* _ASM_I386_GPIO_H */ 62#endif /* _ASM_I386_GPIO_H */
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h
index 3f2de1050988..da0a675adf94 100644
--- a/include/asm-x86/thread_info.h
+++ b/include/asm-x86/thread_info.h
@@ -152,6 +152,8 @@ struct thread_info {
152#define THREAD_FLAGS GFP_KERNEL 152#define THREAD_FLAGS GFP_KERNEL
153#endif 153#endif
154 154
155#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
156
155#define alloc_thread_info(tsk) \ 157#define alloc_thread_info(tsk) \
156 ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) 158 ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER))
157 159