x86: qemu: Create separate i440fx and q35 device trees
authorBin Meng <bmeng.cn@gmail.com>
Wed, 3 Jun 2015 01:20:04 +0000 (09:20 +0800)
committerSimon Glass <sjg@chromium.org>
Thu, 4 Jun 2015 09:03:18 +0000 (03:03 -0600)
Although the two qemu-x86 targets (i440fx and q35) share a lot in
common, they still have something that cannot easily handled in one
single device tree). Split to create two dedicated device tree files
and make the i440fx be the default build target.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/dts/Makefile
arch/x86/dts/qemu-x86.dts [deleted file]
arch/x86/dts/qemu-x86_i440fx.dts [new file with mode: 0644]
arch/x86/dts/qemu-x86_q35.dts [new file with mode: 0644]
board/coreboot/coreboot/Kconfig
configs/qemu-x86_defconfig
doc/README.x86

index ca2eab3fa2746fe7ce91e117fbad6d9d1f580432..f86514ce83930c6e5c77e72f266b8c2f48c0af1b 100644 (file)
@@ -3,7 +3,8 @@ dtb-y += chromebook_link.dtb \
        crownbay.dtb \
        galileo.dtb \
        minnowmax.dtb \
-       qemu-x86.dtb
+       qemu-x86_i440fx.dtb \
+       qemu-x86_q35.dtb
 
 targets += $(dtb-y)
 
diff --git a/arch/x86/dts/qemu-x86.dts b/arch/x86/dts/qemu-x86.dts
deleted file mode 100644 (file)
index f1291b5..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/dts-v1/;
-
-/include/ "skeleton.dtsi"
-/include/ "serial.dtsi"
-
-/ {
-       model = "QEMU x86";
-       compatible = "qemu,x86";
-
-       config {
-               silent_console = <0>;
-       };
-
-       chosen {
-               stdout-path = "/serial";
-       };
-
-       pci {
-               compatible = "pci-x86";
-               #address-cells = <3>;
-               #size-cells = <2>;
-               u-boot,dm-pre-reloc;
-               ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0 0x10000000
-                       0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
-                       0x01000000 0x0 0x2000 0x2000 0 0xe000>;
-       };
-
-};
diff --git a/arch/x86/dts/qemu-x86_i440fx.dts b/arch/x86/dts/qemu-x86_i440fx.dts
new file mode 100644 (file)
index 0000000..4cf843b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+/include/ "skeleton.dtsi"
+/include/ "serial.dtsi"
+
+/ {
+       model = "QEMU x86 (I440FX)";
+       compatible = "qemu,x86";
+
+       config {
+               silent_console = <0>;
+       };
+
+       chosen {
+               stdout-path = "/serial";
+       };
+
+       pci {
+               compatible = "pci-x86";
+               #address-cells = <3>;
+               #size-cells = <2>;
+               u-boot,dm-pre-reloc;
+               ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0 0x10000000
+                       0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
+                       0x01000000 0x0 0x2000 0x2000 0 0xe000>;
+       };
+
+};
diff --git a/arch/x86/dts/qemu-x86_q35.dts b/arch/x86/dts/qemu-x86_q35.dts
new file mode 100644 (file)
index 0000000..6c89283
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+/include/ "skeleton.dtsi"
+/include/ "serial.dtsi"
+
+/ {
+       model = "QEMU x86 (Q35)";
+       compatible = "qemu,x86";
+
+       config {
+               silent_console = <0>;
+       };
+
+       chosen {
+               stdout-path = "/serial";
+       };
+
+       pci {
+               compatible = "pci-x86";
+               #address-cells = <3>;
+               #size-cells = <2>;
+               u-boot,dm-pre-reloc;
+               ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0 0x10000000
+                       0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
+                       0x01000000 0x0 0x2000 0x2000 0 0xe000>;
+       };
+
+};
index 69e34375a23c45e183dbecabb99a77c06d235513..3ff64f40844a7782e4a006c7a5a3dd71e2ccbe9e 100644 (file)
@@ -23,7 +23,7 @@ config SYS_CONFIG_NAME
 
 config DEFAULT_DEVICE_TREE
        string "Board Device Tree Source (dts) file"
-       default "qemu-x86"
+       default "qemu-x86_i440fx"
        help
          This option selects the board Device Tree Source (dts) file in
          arch/x86/dts/ directory to be used to build U-Boot for coreboot.
index 4509d52f0c0861f8ee53380e4c21b391559bc94d..0959a98283f5d77fe5f46562c3c53f6f8e2883d4 100644 (file)
@@ -1,10 +1,9 @@
 CONFIG_X86=y
 CONFIG_VENDOR_EMULATION=y
+CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
 CONFIG_TARGET_QEMU_X86=y
 CONFIG_CMD_NET=y
 CONFIG_OF_CONTROL=y
-CONFIG_OF_SEPARATE=y
-CONFIG_DEFAULT_DEVICE_TREE="qemu-x86"
 CONFIG_VIDEO_VESA=y
 CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
 CONFIG_FRAMEBUFFER_VESA_MODE_111=y
index 072620554099e14aa3764703c414a5efa37fef8d..c19f4a03ba07d1ddc93e182d16cf2607ec7bca3b 100644 (file)
@@ -40,7 +40,7 @@ configuration during the 'make menuconfig' process.
 x86 architecture  --->
        ...
        (qemu-x86) Board configuration file
-       (qemu-x86) Board Device Tree Source (dts) file
+       (qemu-x86_i440fx) Board Device Tree Source (dts) file
        (0x01920000) Board specific Cache-As-RAM (CAR) address
        (0x4000) Board specific Cache-As-RAM (CAR) size
 
@@ -186,6 +186,14 @@ To build u-boot.rom for QEMU x86 targets, just simply run
 $ make qemu-x86_defconfig
 $ make all
 
+Note this default configuration will build a U-Boot for the QEMU x86 i440FX
+board. To build a U-Boot against QEMU x86 Q35 board, you can change the build
+configuration during the 'make menuconfig' process like below:
+
+Device Tree Control  --->
+       ...
+       (qemu-x86_q35) Default Device Tree for DT control
+
 Test with coreboot
 ------------------
 For testing U-Boot as the coreboot payload, there are things that need be paid