Skip to content

Commit 0bd2cbc

Browse files
committed
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits) of/flattree: forward declare struct device_node in of_fdt.h ipmi: explicitly include of_address.h and of_irq.h sparc: explicitly cast negative phandle checks to s32 powerpc/405: Fix missing #{address,size}-cells in i2c node powerpc/5200: dts: refactor dts files powerpc/5200: dts: Change combatible strings on localbus powerpc/5200: dts: remove unused properties powerpc/5200: dts: rename nodes to prepare for refactoring dts files of/flattree: Update dtc to current mainline. of/device: Don't register disabled devices powerpc/dts: fix syntax bugs in bluestone.dts of: Fixes for OF probing on little endian systems of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF of/flattree: Add of_flat_dt_match() helper function of_serial: explicitly include of_irq.h of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree of/flattree: Reorder unflatten_dt_node of/flattree: Refactor unflatten_dt_node of/flattree: Add non-boottime device tree functions of/flattree: Add Kconfig for EARLY_FLATTREE ... Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.
2 parents 57cc721 + a081748 commit 0bd2cbc

83 files changed

Lines changed: 2890 additions & 3404 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/kbuild/makefiles.txt‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,21 @@ When kbuild executes, the following steps are followed (roughly):
11361136
resulting in the target file being recompiled for no
11371137
obvious reason.
11381138

1139+
dtc
1140+
Create flattend device tree blob object suitable for linking
1141+
into vmlinux. Device tree blobs linked into vmlinux are placed
1142+
in an init section in the image. Platform code *must* copy the
1143+
blob to non-init memory prior to calling unflatten_device_tree().
1144+
1145+
Example:
1146+
#arch/x86/platform/ce4100/Makefile
1147+
clean-files := *dtb.S
1148+
1149+
DTC_FLAGS := -p 1024
1150+
obj-y += foo.dtb.o
1151+
1152+
$(obj)/%.dtb: $(src)/%.dts
1153+
$(call cmd,dtc)
11391154

11401155
--- 6.7 Custom kbuild commands
11411156

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
EEPROMs (I2C)
2+
3+
Required properties:
4+
5+
- compatible : should be "<manufacturer>,<type>"
6+
If there is no specific driver for <manufacturer>, a generic
7+
driver based on <type> is selected. Possible types are:
8+
24c00, 24c01, 24c02, 24c04, 24c08, 24c16, 24c32, 24c64,
9+
24c128, 24c256, 24c512, 24c1024, spd
10+
11+
- reg : the I2C address of the EEPROM
12+
13+
Optional properties:
14+
15+
- pagesize : the length of the pagesize for writing. Please consult the
16+
manual of your device, that value varies a lot. A wrong value
17+
may result in data loss! If not specified, a safety value of
18+
'1' is used which will be very slow.
19+
20+
- read-only: this parameterless property disables writes to the eeprom
21+
22+
Example:
23+
24+
eeprom@52 {
25+
compatible = "atmel,24c32";
26+
reg = <0x52>;
27+
pagesize = <32>;
28+
};

‎arch/microblaze/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ config MICROBLAZE
1414
select HAVE_DMA_API_DEBUG
1515
select TRACING_SUPPORT
1616
select OF
17-
select OF_FLATTREE
17+
select OF_EARLY_FLATTREE
1818

1919
config SWAP
2020
def_bool n

‎arch/microblaze/boot/Makefile‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ targets := linux.bin linux.bin.gz simpleImage.%
1010

1111
OBJCOPYFLAGS := -O binary
1212

13-
# Where the DTS files live
14-
dtstree := $(srctree)/$(src)/dts
15-
1613
# Ensure system.dtb exists
1714
$(obj)/linked_dtb.o: $(obj)/system.dtb
1815

@@ -51,14 +48,11 @@ $(obj)/simpleImage.%: vmlinux FORCE
5148
$(call if_changed,strip)
5249
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
5350

54-
# Rule to build device tree blobs
55-
DTC = $(objtree)/scripts/dtc/dtc
5651

5752
# Rule to build device tree blobs
58-
quiet_cmd_dtc = DTC $@
59-
cmd_dtc = $(DTC) -O dtb -o $(obj)/$*.dtb -b 0 -p 1024 $(dtstree)/$*.dts
53+
DTC_FLAGS := -p 1024
6054

61-
$(obj)/%.dtb: $(dtstree)/%.dts FORCE
62-
$(call if_changed,dtc)
55+
$(obj)/%.dtb: $(src)/dts/%.dts FORCE
56+
$(call cmd,dtc)
6357

6458
clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub

‎arch/microblaze/include/asm/prom.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ extern void kdump_move_device_tree(void);
6464
/* CPU OF node matching */
6565
struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
6666

67-
/* Get the MAC address */
68-
extern const void *of_get_mac_address(struct device_node *np);
69-
7067
/**
7168
* of_irq_map_pci - Resolve the interrupt for a PCI device
7269
* @pdev: the device whose interrupt is to be resolved

‎arch/microblaze/kernel/prom_parse.c‎

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -110,41 +110,3 @@ void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
110110
cells = prop ? *(u32 *)prop : of_n_size_cells(dn);
111111
*size = of_read_number(dma_window, cells);
112112
}
113-
114-
/**
115-
* Search the device tree for the best MAC address to use. 'mac-address' is
116-
* checked first, because that is supposed to contain to "most recent" MAC
117-
* address. If that isn't set, then 'local-mac-address' is checked next,
118-
* because that is the default address. If that isn't set, then the obsolete
119-
* 'address' is checked, just in case we're using an old device tree.
120-
*
121-
* Note that the 'address' property is supposed to contain a virtual address of
122-
* the register set, but some DTS files have redefined that property to be the
123-
* MAC address.
124-
*
125-
* All-zero MAC addresses are rejected, because those could be properties that
126-
* exist in the device tree, but were not set by U-Boot. For example, the
127-
* DTS could define 'mac-address' and 'local-mac-address', with zero MAC
128-
* addresses. Some older U-Boots only initialized 'local-mac-address'. In
129-
* this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
130-
* but is all zeros.
131-
*/
132-
const void *of_get_mac_address(struct device_node *np)
133-
{
134-
struct property *pp;
135-
136-
pp = of_find_property(np, "mac-address", NULL);
137-
if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
138-
return pp->value;
139-
140-
pp = of_find_property(np, "local-mac-address", NULL);
141-
if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
142-
return pp->value;
143-
144-
pp = of_find_property(np, "address", NULL);
145-
if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
146-
return pp->value;
147-
148-
return NULL;
149-
}
150-
EXPORT_SYMBOL(of_get_mac_address);

‎arch/mips/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ config SECCOMP
22182218
config USE_OF
22192219
bool "Flattened Device Tree support"
22202220
select OF
2221-
select OF_FLATTREE
2221+
select OF_EARLY_FLATTREE
22222222
help
22232223
Include support for flattened device tree machine descriptions.
22242224

‎arch/powerpc/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ config PPC
116116
bool
117117
default y
118118
select OF
119-
select OF_FLATTREE
119+
select OF_EARLY_FLATTREE
120120
select HAVE_FTRACE_MCOUNT_RECORD
121121
select HAVE_DYNAMIC_FTRACE
122122
select HAVE_FUNCTION_TRACER

‎arch/powerpc/boot/Makefile‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ endif
3535

3636
BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
3737

38-
DTS_FLAGS ?= -p 1024
38+
DTC_FLAGS ?= -p 1024
3939

4040
$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
4141
$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
@@ -332,10 +332,8 @@ $(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
332332
$(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb)
333333

334334
# Rule to build device tree blobs
335-
DTC = $(objtree)/scripts/dtc/dtc
336-
337-
$(obj)/%.dtb: $(dtstree)/%.dts
338-
$(DTC) -O dtb -o $(obj)/$*.dtb -b 0 $(DTS_FLAGS) $(dtstree)/$*.dts
335+
$(obj)/%.dtb: $(src)/dts/%.dts
336+
$(call cmd,dtc)
339337

340338
# If there isn't a platform selected then just strip the vmlinux.
341339
ifeq (,$(image-y))

‎arch/powerpc/boot/dts/bluestone.dts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
aliases {
3434
ethernet0 = &EMAC0;
3535
serial0 = &UART0;
36-
serial1 = &UART1;
36+
//serial1 = &UART1; --gcl missing UART1 label
3737
};
3838

3939
cpus {
@@ -52,7 +52,7 @@
5252
d-cache-size = <32768>;
5353
dcr-controller;
5454
dcr-access-method = "native";
55-
next-level-cache = <&L2C0>;
55+
//next-level-cache = <&L2C0>; --gcl missing L2C0 label
5656
};
5757
};
5858

@@ -142,7 +142,7 @@
142142
/*RXEOB*/ 0x7 0x4
143143
/*SERR*/ 0x3 0x4
144144
/*TXDE*/ 0x4 0x4
145-
/*RXDE*/ 0x5 0x4
145+
/*RXDE*/ 0x5 0x4>;
146146
};
147147

148148
POB0: opb {
@@ -182,7 +182,7 @@
182182
reg = <0x001a0000 0x00060000>;
183183
};
184184
};
185-
}
185+
};
186186

187187
UART0: serial@ef600300 {
188188
device_type = "serial";

0 commit comments

Comments
 (0)