aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/boot
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-01-29 04:48:30 -0500
committerJiri Kosina <jkosina@suse.cz>2013-01-29 04:48:30 -0500
commit617677295b53a40d0e54aac4cbbc216ffbc755dd (patch)
tree51b9e87213243ed5efff252c8e8d8fec4eebc588 /arch/xtensa/boot
parent5c8d1b68e01a144813e38795fe6dbe7ebb506131 (diff)
parent6abb7c25775b7fb2225ad0508236d63ca710e65f (diff)
Merge branch 'master' into for-next
Conflicts: drivers/devfreq/exynos4_bus.c Sync with Linus' tree to be able to apply patches that are against newer code (mvneta).
Diffstat (limited to 'arch/xtensa/boot')
-rw-r--r--arch/xtensa/boot/Makefile25
-rw-r--r--arch/xtensa/boot/boot-elf/Makefile26
-rw-r--r--arch/xtensa/boot/boot-redboot/Makefile26
-rw-r--r--arch/xtensa/boot/boot-uboot/Makefile14
-rw-r--r--arch/xtensa/boot/dts/lx60.dts11
-rw-r--r--arch/xtensa/boot/dts/ml605.dts11
-rw-r--r--arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi26
-rw-r--r--arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi18
-rw-r--r--arch/xtensa/boot/dts/xtfpga.dtsi56
9 files changed, 183 insertions, 30 deletions
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index 4018f8994196..818647e815d7 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -22,12 +22,35 @@ subdir-y := lib
22# Subdirs for the boot loader(s) 22# Subdirs for the boot loader(s)
23 23
24bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf 24bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
25bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf 25bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
26bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
26 27
27 28
29BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB)).dtb.o
30ifneq ($(CONFIG_BUILTIN_DTB),"")
31obj-$(CONFIG_OF) += $(BUILTIN_DTB)
32endif
33
34# Rule to build device tree blobs
35$(obj)/%.dtb: $(src)/dts/%.dts FORCE
36 $(call if_changed_dep,dtc)
37
38clean-files := *.dtb.S
39
28zImage Image: $(bootdir-y) 40zImage Image: $(bootdir-y)
29 41
30$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ 42$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
31 $(addprefix $(obj)/,$(host-progs)) 43 $(addprefix $(obj)/,$(host-progs))
32 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) 44 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
33 45
46OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
47
48vmlinux.bin: vmlinux FORCE
49 $(call if_changed,objcopy)
50
51vmlinux.bin.gz: vmlinux.bin FORCE
52 $(call if_changed,gzip)
53
54boot-elf: vmlinux.bin
55boot-redboot: vmlinux.bin.gz
56boot-uboot: vmlinux.bin.gz
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile
index f10992b89027..1fe01b78c124 100644
--- a/arch/xtensa/boot/boot-elf/Makefile
+++ b/arch/xtensa/boot/boot-elf/Makefile
@@ -4,9 +4,6 @@
4# for more details. 4# for more details.
5# 5#
6 6
7GZIP = gzip
8GZIP_FLAGS = -v9fc
9
10ifeq ($(BIG_ENDIAN),1) 7ifeq ($(BIG_ENDIAN),1)
11OBJCOPY_ARGS := -O elf32-xtensa-be 8OBJCOPY_ARGS := -O elf32-xtensa-be
12else 9else
@@ -20,18 +17,17 @@ boot-y := bootstrap.o
20 17
21OBJS := $(addprefix $(obj)/,$(boot-y)) 18OBJS := $(addprefix $(obj)/,$(boot-y))
22 19
23vmlinux.tmp: vmlinux 20$(obj)/Image.o: vmlinux.bin $(OBJS)
24 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 21 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
25 $^ $@ 22 --add-section image=vmlinux.bin \
26
27Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
28 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
29 --add-section image=vmlinux.tmp \
30 --set-section-flags image=contents,alloc,load,load,data \ 23 --set-section-flags image=contents,alloc,load,load,data \
31 $(OBJS) $@.tmp 24 $(OBJS) $@
32 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
33 -T arch/$(ARCH)/boot/boot-elf/boot.lds \
34 -o arch/$(ARCH)/boot/$@.elf $@.tmp
35 25
36zImage: Image 26$(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
27 $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
28 -T $(obj)/boot.lds \
29 --build-id=none \
30 -o $@ $(obj)/Image.o
31 $(Q)$(kecho) ' Kernel: $@ is ready'
37 32
33zImage: $(obj)/../Image.elf
diff --git a/arch/xtensa/boot/boot-redboot/Makefile b/arch/xtensa/boot/boot-redboot/Makefile
index 25a78c6b1530..8be8b9436981 100644
--- a/arch/xtensa/boot/boot-redboot/Makefile
+++ b/arch/xtensa/boot/boot-redboot/Makefile
@@ -4,8 +4,6 @@
4# for more details. 4# for more details.
5# 5#
6 6
7GZIP = gzip
8GZIP_FLAGS = -v9fc
9ifeq ($(BIG_ENDIAN),1) 7ifeq ($(BIG_ENDIAN),1)
10OBJCOPY_ARGS := -O elf32-xtensa-be 8OBJCOPY_ARGS := -O elf32-xtensa-be
11else 9else
@@ -21,17 +19,17 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
21 19
22LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 20LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
23 21
24vmlinux.tmp: vmlinux 22$(obj)/zImage.o: vmlinux.bin.gz $(OBJS)
25 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 23 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
26 $^ $@ 24 --add-section image=vmlinux.bin.gz \
25 --set-section-flags image=contents,alloc,load,load,data \
26 $(OBJS) $@
27 27
28vmlinux.tmp.gz: vmlinux.tmp 28$(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
29 $(GZIP) $(GZIP_FLAGS) $^ > $@ 29 $(Q)$(LD) $(LD_ARGS) -o $@ $^ -L/xtensa-elf/lib $(LIBGCC)
30 30
31zImage: vmlinux.tmp.gz $(OBJS) $(LIBS) 31$(obj)/../zImage.redboot: $(obj)/zImage.elf
32 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 32 $(Q)$(OBJCOPY) -S -O binary $< $@
33 --add-section image=vmlinux.tmp.gz \ 33 $(Q)$(kecho) ' Kernel: $@ is ready'
34 --set-section-flags image=contents,alloc,load,load,data \ 34
35 $(OBJS) $@.tmp 35zImage: $(obj)/../zImage.redboot
36 $(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC)
37 $(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot
diff --git a/arch/xtensa/boot/boot-uboot/Makefile b/arch/xtensa/boot/boot-uboot/Makefile
new file mode 100644
index 000000000000..bfbf8af582f1
--- /dev/null
+++ b/arch/xtensa/boot/boot-uboot/Makefile
@@ -0,0 +1,14 @@
1#
2# This file is subject to the terms and conditions of the GNU General Public
3# License. See the file "COPYING" in the main directory of this archive
4# for more details.
5#
6
7UIMAGE_LOADADDR = 0xd0001000
8UIMAGE_COMPRESSION = gzip
9
10$(obj)/../uImage: vmlinux.bin.gz FORCE
11 $(call if_changed,uimage)
12 $(Q)$(kecho) ' Kernel: $@ is ready'
13
14zImage: $(obj)/../uImage
diff --git a/arch/xtensa/boot/dts/lx60.dts b/arch/xtensa/boot/dts/lx60.dts
new file mode 100644
index 000000000000..2eab3658e1bd
--- /dev/null
+++ b/arch/xtensa/boot/dts/lx60.dts
@@ -0,0 +1,11 @@
1/dts-v1/;
2/include/ "xtfpga.dtsi"
3/include/ "xtfpga-flash-4m.dtsi"
4
5/ {
6 compatible = "xtensa,lx60";
7 memory@0 {
8 device_type = "memory";
9 reg = <0x00000000 0x04000000>;
10 };
11};
diff --git a/arch/xtensa/boot/dts/ml605.dts b/arch/xtensa/boot/dts/ml605.dts
new file mode 100644
index 000000000000..6ed51d6554e6
--- /dev/null
+++ b/arch/xtensa/boot/dts/ml605.dts
@@ -0,0 +1,11 @@
1/dts-v1/;
2/include/ "xtfpga.dtsi"
3/include/ "xtfpga-flash-16m.dtsi"
4
5/ {
6 compatible = "xtensa,ml605";
7 memory@0 {
8 device_type = "memory";
9 reg = <0x00000000 0x08000000>;
10 };
11};
diff --git a/arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi b/arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi
new file mode 100644
index 000000000000..e5703c7beeb6
--- /dev/null
+++ b/arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi
@@ -0,0 +1,26 @@
1/ {
2 flash: flash@f8000000 {
3 #address-cells = <1>;
4 #size-cells = <1>;
5 compatible = "cfi-flash";
6 reg = <0xf8000000 0x01000000>;
7 bank-width = <2>;
8 device-width = <2>;
9 partition@0x0 {
10 label = "boot loader area";
11 reg = <0x00000000 0x00400000>;
12 };
13 partition@0x400000 {
14 label = "kernel image";
15 reg = <0x00400000 0x00600000>;
16 };
17 partition@0xa00000 {
18 label = "data";
19 reg = <0x00a00000 0x005e0000>;
20 };
21 partition@0xfe0000 {
22 label = "boot environment";
23 reg = <0x00fe0000 0x00020000>;
24 };
25 };
26};
diff --git a/arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi b/arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi
new file mode 100644
index 000000000000..6f9c10d6b689
--- /dev/null
+++ b/arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi
@@ -0,0 +1,18 @@
1/ {
2 flash: flash@f8000000 {
3 #address-cells = <1>;
4 #size-cells = <1>;
5 compatible = "cfi-flash";
6 reg = <0xf8000000 0x00400000>;
7 bank-width = <2>;
8 device-width = <2>;
9 partition@0x0 {
10 label = "boot loader area";
11 reg = <0x00000000 0x003f0000>;
12 };
13 partition@0x3f0000 {
14 label = "boot environment";
15 reg = <0x003f0000 0x00010000>;
16 };
17 };
18};
diff --git a/arch/xtensa/boot/dts/xtfpga.dtsi b/arch/xtensa/boot/dts/xtfpga.dtsi
new file mode 100644
index 000000000000..7eda6ecf7eef
--- /dev/null
+++ b/arch/xtensa/boot/dts/xtfpga.dtsi
@@ -0,0 +1,56 @@
1/ {
2 compatible = "xtensa,xtfpga";
3 #address-cells = <1>;
4 #size-cells = <1>;
5 interrupt-parent = <&pic>;
6
7 chosen {
8 bootargs = "earlycon=uart8250,mmio32,0xfd050020,115200n8 console=ttyS0,115200n8 ip=dhcp root=/dev/nfs rw debug";
9 };
10
11 memory@0 {
12 device_type = "memory";
13 reg = <0x00000000 0x06000000>;
14 };
15
16 cpus {
17 #address-cells = <1>;
18 #size-cells = <0>;
19 cpu@0 {
20 compatible = "xtensa,cpu";
21 reg = <0>;
22 /* Filled in by platform_setup from FPGA register
23 * clock-frequency = <100000000>;
24 */
25 };
26 };
27
28 pic: pic {
29 compatible = "xtensa,pic";
30 /* one cell: internal irq number,
31 * two cells: second cell == 0: internal irq number
32 * second cell == 1: external irq number
33 */
34 #interrupt-cells = <2>;
35 interrupt-controller;
36 };
37
38 serial0: serial@fd050020 {
39 device_type = "serial";
40 compatible = "ns16550a";
41 no-loopback-test;
42 reg = <0xfd050020 0x20>;
43 reg-shift = <2>;
44 interrupts = <0 1>; /* external irq 0 */
45 /* Filled in by platform_setup from FPGA register
46 * clock-frequency = <100000000>;
47 */
48 };
49
50 enet0: ethoc@fd030000 {
51 compatible = "opencores,ethoc";
52 reg = <0xfd030000 0x4000 0xfd800000 0x4000>;
53 interrupts = <1 1>; /* external irq 1 */
54 local-mac-address = [00 50 c2 13 6f 00];
55 };
56};