diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 |
commit | ab11b487402f97975f3ac1eeea09c82f4431481e (patch) | |
tree | 86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /include/asm-generic | |
parent | 1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff) | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/gpio.h | 15 | ||||
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 13 |
2 files changed, 27 insertions, 1 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 4f3d75e1ad39..c7376bf80b06 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -31,6 +31,7 @@ static inline int gpio_is_valid(int number) | |||
31 | struct device; | 31 | struct device; |
32 | struct seq_file; | 32 | struct seq_file; |
33 | struct module; | 33 | struct module; |
34 | struct device_node; | ||
34 | 35 | ||
35 | /** | 36 | /** |
36 | * struct gpio_chip - abstract a GPIO controller | 37 | * struct gpio_chip - abstract a GPIO controller |
@@ -106,6 +107,17 @@ struct gpio_chip { | |||
106 | const char *const *names; | 107 | const char *const *names; |
107 | unsigned can_sleep:1; | 108 | unsigned can_sleep:1; |
108 | unsigned exported:1; | 109 | unsigned exported:1; |
110 | |||
111 | #if defined(CONFIG_OF_GPIO) | ||
112 | /* | ||
113 | * If CONFIG_OF is enabled, then all GPIO controllers described in the | ||
114 | * device tree automatically may have an OF translation | ||
115 | */ | ||
116 | struct device_node *of_node; | ||
117 | int of_gpio_n_cells; | ||
118 | int (*of_xlate)(struct gpio_chip *gc, struct device_node *np, | ||
119 | const void *gpio_spec, u32 *flags); | ||
120 | #endif | ||
109 | }; | 121 | }; |
110 | 122 | ||
111 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, | 123 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, |
@@ -115,6 +127,9 @@ extern int __must_check gpiochip_reserve(int start, int ngpio); | |||
115 | /* add/remove chips */ | 127 | /* add/remove chips */ |
116 | extern int gpiochip_add(struct gpio_chip *chip); | 128 | extern int gpiochip_add(struct gpio_chip *chip); |
117 | extern int __must_check gpiochip_remove(struct gpio_chip *chip); | 129 | extern int __must_check gpiochip_remove(struct gpio_chip *chip); |
130 | extern struct gpio_chip *gpiochip_find(void *data, | ||
131 | int (*match)(struct gpio_chip *chip, | ||
132 | void *data)); | ||
118 | 133 | ||
119 | 134 | ||
120 | /* Always use the library code for GPIO management calls, | 135 | /* Always use the library code for GPIO management calls, |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 48c5299cbf26..4e7ae6002056 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -63,6 +63,12 @@ | |||
63 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ | 63 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ |
64 | #define ALIGN_FUNCTION() . = ALIGN(8) | 64 | #define ALIGN_FUNCTION() . = ALIGN(8) |
65 | 65 | ||
66 | /* | ||
67 | * Align to a 32 byte boundary equal to the | ||
68 | * alignment gcc 4.5 uses for a struct | ||
69 | */ | ||
70 | #define STRUCT_ALIGN() . = ALIGN(32) | ||
71 | |||
66 | /* The actual configuration determine if the init/exit sections | 72 | /* The actual configuration determine if the init/exit sections |
67 | * are handled as text/data or they can be discarded (which | 73 | * are handled as text/data or they can be discarded (which |
68 | * often happens at runtime) | 74 | * often happens at runtime) |
@@ -166,7 +172,11 @@ | |||
166 | LIKELY_PROFILE() \ | 172 | LIKELY_PROFILE() \ |
167 | BRANCH_PROFILE() \ | 173 | BRANCH_PROFILE() \ |
168 | TRACE_PRINTKS() \ | 174 | TRACE_PRINTKS() \ |
175 | \ | ||
176 | STRUCT_ALIGN(); \ | ||
169 | FTRACE_EVENTS() \ | 177 | FTRACE_EVENTS() \ |
178 | \ | ||
179 | STRUCT_ALIGN(); \ | ||
170 | TRACE_SYSCALLS() | 180 | TRACE_SYSCALLS() |
171 | 181 | ||
172 | /* | 182 | /* |
@@ -435,7 +445,7 @@ | |||
435 | */ | 445 | */ |
436 | #define INIT_TASK_DATA_SECTION(align) \ | 446 | #define INIT_TASK_DATA_SECTION(align) \ |
437 | . = ALIGN(align); \ | 447 | . = ALIGN(align); \ |
438 | .data..init_task : { \ | 448 | .data..init_task : AT(ADDR(.data..init_task) - LOAD_OFFSET) { \ |
439 | INIT_TASK_DATA(align) \ | 449 | INIT_TASK_DATA(align) \ |
440 | } | 450 | } |
441 | 451 | ||
@@ -643,6 +653,7 @@ | |||
643 | EXIT_DATA \ | 653 | EXIT_DATA \ |
644 | EXIT_CALL \ | 654 | EXIT_CALL \ |
645 | *(.discard) \ | 655 | *(.discard) \ |
656 | *(.discard.*) \ | ||
646 | } | 657 | } |
647 | 658 | ||
648 | /** | 659 | /** |