aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/usage-model.txt8
l---------arch/arm/boot/dts/include/dt-bindings1
-rw-r--r--include/dt-bindings/gpio/gpio.h15
-rw-r--r--include/dt-bindings/interrupt-controller/arm-gic.h22
-rw-r--r--include/dt-bindings/interrupt-controller/irq.h19
-rw-r--r--include/linux/of_platform.h5
-rw-r--r--scripts/Makefile.lib17
-rw-r--r--scripts/basic/fixdep.c93
8 files changed, 133 insertions, 47 deletions
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt
index ef9d06c9f8fd..0efedaad5165 100644
--- a/Documentation/devicetree/usage-model.txt
+++ b/Documentation/devicetree/usage-model.txt
@@ -191,9 +191,11 @@ Linux it will look something like this:
191 }; 191 };
192 192
193The bootargs property contains the kernel arguments, and the initrd-* 193The bootargs property contains the kernel arguments, and the initrd-*
194properties define the address and size of an initrd blob. The 194properties define the address and size of an initrd blob. Note that
195chosen node may also optionally contain an arbitrary number of 195initrd-end is the first address after the initrd image, so this doesn't
196additional properties for platform-specific configuration data. 196match the usual semantic of struct resource. The chosen node may also
197optionally contain an arbitrary number of additional properties for
198platform-specific configuration data.
197 199
198During early boot, the architecture setup code calls of_scan_flat_dt() 200During early boot, the architecture setup code calls of_scan_flat_dt()
199several times with different helper callbacks to parse device tree 201several times with different helper callbacks to parse device tree
diff --git a/arch/arm/boot/dts/include/dt-bindings b/arch/arm/boot/dts/include/dt-bindings
new file mode 120000
index 000000000000..08c00e4972fa
--- /dev/null
+++ b/arch/arm/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
../../../../../include/dt-bindings \ No newline at end of file
diff --git a/include/dt-bindings/gpio/gpio.h b/include/dt-bindings/gpio/gpio.h
new file mode 100644
index 000000000000..e6b1e0a808ae
--- /dev/null
+++ b/include/dt-bindings/gpio/gpio.h
@@ -0,0 +1,15 @@
1/*
2 * This header provides constants for most GPIO bindings.
3 *
4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
5 * In most cases, the format of the flags cell uses the standard values
6 * defined in this header.
7 */
8
9#ifndef _DT_BINDINGS_GPIO_GPIO_H
10#define _DT_BINDINGS_GPIO_GPIO_H
11
12#define GPIO_ACTIVE_HIGH 0
13#define GPIO_ACTIVE_LOW 1
14
15#endif
diff --git a/include/dt-bindings/interrupt-controller/arm-gic.h b/include/dt-bindings/interrupt-controller/arm-gic.h
new file mode 100644
index 000000000000..1ea1b702fec2
--- /dev/null
+++ b/include/dt-bindings/interrupt-controller/arm-gic.h
@@ -0,0 +1,22 @@
1/*
2 * This header provides constants for the ARM GIC.
3 */
4
5#ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_ARM_GIC_H
6#define _DT_BINDINGS_INTERRUPT_CONTROLLER_ARM_GIC_H
7
8#include <dt-bindings/interrupt-controller/irq.h>
9
10/* interrupt specific cell 0 */
11
12#define GIC_SPI 0
13#define GIC_PPI 1
14
15/*
16 * Interrupt specifier cell 2.
17 * The flaggs in irq.h are valid, plus those below.
18 */
19#define GIC_CPU_MASK_RAW(x) ((x) << 8)
20#define GIC_CPU_MASK_SIMPLE(num) GIC_CPU_MASK_RAW((1 << (num)) - 1)
21
22#endif
diff --git a/include/dt-bindings/interrupt-controller/irq.h b/include/dt-bindings/interrupt-controller/irq.h
new file mode 100644
index 000000000000..33a1003c55aa
--- /dev/null
+++ b/include/dt-bindings/interrupt-controller/irq.h
@@ -0,0 +1,19 @@
1/*
2 * This header provides constants for most IRQ bindings.
3 *
4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
5 * In most cases, the format of the flags cell uses the standard values
6 * defined in this header.
7 */
8
9#ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_H
10#define _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_H
11
12#define IRQ_TYPE_NONE 0
13#define IRQ_TYPE_EDGE_RISING 1
14#define IRQ_TYPE_EDGE_FALLING 2
15#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
16#define IRQ_TYPE_LEVEL_HIGH 4
17#define IRQ_TYPE_LEVEL_LOW 8
18
19#endif
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 3863a4dbdf18..2a93b64a3869 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -11,9 +11,10 @@
11 * 11 *
12 */ 12 */
13 13
14#ifdef CONFIG_OF_DEVICE
15#include <linux/device.h> 14#include <linux/device.h>
16#include <linux/mod_devicetable.h> 15#include <linux/mod_devicetable.h>
16
17#ifdef CONFIG_OF_DEVICE
17#include <linux/pm.h> 18#include <linux/pm.h>
18#include <linux/of_device.h> 19#include <linux/of_device.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
@@ -100,7 +101,7 @@ extern int of_platform_populate(struct device_node *root,
100 101
101#if !defined(CONFIG_OF_ADDRESS) 102#if !defined(CONFIG_OF_ADDRESS)
102struct of_dev_auxdata; 103struct of_dev_auxdata;
103struct device; 104struct device_node;
104static inline int of_platform_populate(struct device_node *root, 105static inline int of_platform_populate(struct device_node *root,
105 const struct of_device_id *matches, 106 const struct of_device_id *matches,
106 const struct of_dev_auxdata *lookup, 107 const struct of_dev_auxdata *lookup,
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 07125e697d7a..3e73dfd838cd 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -156,9 +156,9 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
156 156
157ld_flags = $(LDFLAGS) $(ldflags-y) 157ld_flags = $(LDFLAGS) $(ldflags-y)
158 158
159dtc_cpp_flags = -Wp,-MD,$(depfile) -nostdinc \ 159dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \
160 -I$(srctree)/arch/$(SRCARCH)/boot/dts \ 160 -I$(srctree)/arch/$(SRCARCH)/boot/dts \
161 -I$(srctree)/arch/$(SRCARCH)/include/dts \ 161 -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \
162 -undef -D__DTS__ 162 -undef -D__DTS__
163 163
164# Finds the multi-part object the current object will be linked into 164# Finds the multi-part object the current object will be linked into
@@ -269,20 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
269 $(call cmd,dt_S_dtb) 269 $(call cmd,dt_S_dtb)
270 270
271quiet_cmd_dtc = DTC $@ 271quiet_cmd_dtc = DTC $@
272cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< 272cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
273 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
274 -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \
275 -d $(depfile).dtc $(dtc-tmp) ; \
276 cat $(depfile).pre $(depfile).dtc > $(depfile)
273 277
274$(obj)/%.dtb: $(src)/%.dts FORCE 278$(obj)/%.dtb: $(src)/%.dts FORCE
275 $(call if_changed_dep,dtc) 279 $(call if_changed_dep,dtc)
276 280
277dtc-tmp = $(subst $(comma),_,$(dot-target).dts) 281dtc-tmp = $(subst $(comma),_,$(dot-target).dts)
278 282
279quiet_cmd_dtc_cpp = DTC+CPP $@
280cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
281 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp)
282
283$(obj)/%.dtb: $(src)/%.dtsp FORCE
284 $(call if_changed_dep,dtc_cpp)
285
286# Bzip2 283# Bzip2
287# --------------------------------------------------------------------------- 284# ---------------------------------------------------------------------------
288 285
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 7f6425e24ce3..078fe1d64e7d 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -320,49 +320,78 @@ static void parse_dep_file(void *map, size_t len)
320 char *end = m + len; 320 char *end = m + len;
321 char *p; 321 char *p;
322 char s[PATH_MAX]; 322 char s[PATH_MAX];
323 int first; 323 int is_target;
324 324 int saw_any_target = 0;
325 p = strchr(m, ':'); 325 int is_first_dep = 0;
326 if (!p) {
327 fprintf(stderr, "fixdep: parse error\n");
328 exit(1);
329 }
330 memcpy(s, m, p-m); s[p-m] = 0;
331 m = p+1;
332 326
333 clear_config(); 327 clear_config();
334 328
335 first = 1;
336 while (m < end) { 329 while (m < end) {
330 /* Skip any "white space" */
337 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) 331 while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
338 m++; 332 m++;
333 /* Find next "white space" */
339 p = m; 334 p = m;
340 while (p < end && *p != ' ') p++; 335 while (p < end && *p != ' ' && *p != '\\' && *p != '\n')
341 if (p == end) {
342 do p--; while (!isalnum(*p));
343 p++; 336 p++;
337 /* Is the token we found a target name? */
338 is_target = (*(p-1) == ':');
339 /* Don't write any target names into the dependency file */
340 if (is_target) {
341 /* The /next/ file is the first dependency */
342 is_first_dep = 1;
343 } else {
344 /* Save this token/filename */
345 memcpy(s, m, p-m);
346 s[p - m] = 0;
347
348 /* Ignore certain dependencies */
349 if (strrcmp(s, "include/generated/autoconf.h") &&
350 strrcmp(s, "arch/um/include/uml-config.h") &&
351 strrcmp(s, "include/linux/kconfig.h") &&
352 strrcmp(s, ".ver")) {
353 /*
354 * Do not list the source file as dependency,
355 * so that kbuild is not confused if a .c file
356 * is rewritten into .S or vice versa. Storing
357 * it in source_* is needed for modpost to
358 * compute srcversions.
359 */
360 if (is_first_dep) {
361 /*
362 * If processing the concatenation of
363 * multiple dependency files, only
364 * process the first target name, which
365 * will be the original source name,
366 * and ignore any other target names,
367 * which will be intermediate temporary
368 * files.
369 */
370 if (!saw_any_target) {
371 saw_any_target = 1;
372 printf("source_%s := %s\n\n",
373 target, s);
374 printf("deps_%s := \\\n",
375 target);
376 }
377 is_first_dep = 0;
378 } else
379 printf(" %s \\\n", s);
380 do_config_file(s);
381 }
344 } 382 }
345 memcpy(s, m, p-m); s[p-m] = 0; 383 /*
346 if (strrcmp(s, "include/generated/autoconf.h") && 384 * Start searching for next token immediately after the first
347 strrcmp(s, "arch/um/include/uml-config.h") && 385 * "whitespace" character that follows this token.
348 strrcmp(s, "include/linux/kconfig.h") && 386 */
349 strrcmp(s, ".ver")) {
350 /*
351 * Do not list the source file as dependency, so that
352 * kbuild is not confused if a .c file is rewritten
353 * into .S or vice versa. Storing it in source_* is
354 * needed for modpost to compute srcversions.
355 */
356 if (first) {
357 printf("source_%s := %s\n\n", target, s);
358 printf("deps_%s := \\\n", target);
359 } else
360 printf(" %s \\\n", s);
361 do_config_file(s);
362 }
363 first = 0;
364 m = p + 1; 387 m = p + 1;
365 } 388 }
389
390 if (!saw_any_target) {
391 fprintf(stderr, "fixdep: parse error; no targets found\n");
392 exit(1);
393 }
394
366 printf("\n%s: $(deps_%s)\n\n", target, target); 395 printf("\n%s: $(deps_%s)\n\n", target, target);
367 printf("$(deps_%s):\n", target); 396 printf("$(deps_%s):\n", target);
368} 397}