提交 187f1bcb 编写于 作者: P Peter Maydell

ppc: Remove CONFIG_FDT conditionals

Now that we know we're compiling with libfdt we can remove the
CONFIG_FDT conditionals.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Tested-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
Message-id: 1369409217-7553-5-git-send-email-peter.maydell@linaro.org
上级 56472021
...@@ -42,6 +42,6 @@ CONFIG_I8259=y ...@@ -42,6 +42,6 @@ CONFIG_I8259=y
CONFIG_XILINX=y CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y CONFIG_XILINX_ETHLITE=y
CONFIG_OPENPIC=y CONFIG_OPENPIC=y
CONFIG_E500=$(CONFIG_FDT) CONFIG_E500=y
# For PReP # For PReP
CONFIG_MC146818RTC=y CONFIG_MC146818RTC=y
...@@ -42,8 +42,8 @@ CONFIG_I8259=y ...@@ -42,8 +42,8 @@ CONFIG_I8259=y
CONFIG_XILINX=y CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y CONFIG_XILINX_ETHLITE=y
CONFIG_OPENPIC=y CONFIG_OPENPIC=y
CONFIG_PSERIES=$(CONFIG_FDT) CONFIG_PSERIES=y
CONFIG_E500=$(CONFIG_FDT) CONFIG_E500=y
# For pSeries # For pSeries
CONFIG_PCI_HOTPLUG=y CONFIG_PCI_HOTPLUG=y
# For PReP # For PReP
......
...@@ -37,6 +37,6 @@ CONFIG_I8259=y ...@@ -37,6 +37,6 @@ CONFIG_I8259=y
CONFIG_XILINX=y CONFIG_XILINX=y
CONFIG_XILINX_ETHLITE=y CONFIG_XILINX_ETHLITE=y
CONFIG_OPENPIC=y CONFIG_OPENPIC=y
CONFIG_E500=$(CONFIG_FDT) CONFIG_E500=y
# For PReP # For PReP
CONFIG_MC146818RTC=y CONFIG_MC146818RTC=y
...@@ -58,7 +58,6 @@ static int bamboo_load_device_tree(hwaddr addr, ...@@ -58,7 +58,6 @@ static int bamboo_load_device_tree(hwaddr addr,
const char *kernel_cmdline) const char *kernel_cmdline)
{ {
int ret = -1; int ret = -1;
#ifdef CONFIG_FDT
uint32_t mem_reg_property[] = { 0, 0, cpu_to_be32(ramsize) }; uint32_t mem_reg_property[] = { 0, 0, cpu_to_be32(ramsize) };
char *filename; char *filename;
int fdt_size; int fdt_size;
...@@ -115,7 +114,6 @@ static int bamboo_load_device_tree(hwaddr addr, ...@@ -115,7 +114,6 @@ static int bamboo_load_device_tree(hwaddr addr,
g_free(fdt); g_free(fdt);
out: out:
#endif
return ret; return ret;
} }
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include "hw/ppc/spapr_vio.h" #include "hw/ppc/spapr_vio.h"
#include "hw/ppc/xics.h" #include "hw/ppc/xics.h"
#ifdef CONFIG_FDT
#include <libfdt.h> #include <libfdt.h>
#endif /* CONFIG_FDT */
/* #define DEBUG_SPAPR */ /* #define DEBUG_SPAPR */
...@@ -94,7 +92,6 @@ VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg) ...@@ -94,7 +92,6 @@ VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg)
return NULL; return NULL;
} }
#ifdef CONFIG_FDT
static int vio_make_devnode(VIOsPAPRDevice *dev, static int vio_make_devnode(VIOsPAPRDevice *dev,
void *fdt) void *fdt)
{ {
...@@ -159,7 +156,6 @@ static int vio_make_devnode(VIOsPAPRDevice *dev, ...@@ -159,7 +156,6 @@ static int vio_make_devnode(VIOsPAPRDevice *dev,
return node_off; return node_off;
} }
#endif /* CONFIG_FDT */
/* /*
* CRQ handling * CRQ handling
...@@ -570,7 +566,6 @@ static void spapr_vio_register_types(void) ...@@ -570,7 +566,6 @@ static void spapr_vio_register_types(void)
type_init(spapr_vio_register_types) type_init(spapr_vio_register_types)
#ifdef CONFIG_FDT
static int compare_reg(const void *p1, const void *p2) static int compare_reg(const void *p1, const void *p2)
{ {
VIOsPAPRDevice const *dev1, *dev2; VIOsPAPRDevice const *dev1, *dev2;
...@@ -655,4 +650,3 @@ int spapr_populate_chosen_stdout(void *fdt, VIOsPAPRBus *bus) ...@@ -655,4 +650,3 @@ int spapr_populate_chosen_stdout(void *fdt, VIOsPAPRBus *bus)
return ret; return ret;
} }
#endif /* CONFIG_FDT */
...@@ -141,7 +141,6 @@ static int xilinx_load_device_tree(hwaddr addr, ...@@ -141,7 +141,6 @@ static int xilinx_load_device_tree(hwaddr addr,
{ {
char *path; char *path;
int fdt_size; int fdt_size;
#ifdef CONFIG_FDT
void *fdt; void *fdt;
int r; int r;
...@@ -162,23 +161,6 @@ static int xilinx_load_device_tree(hwaddr addr, ...@@ -162,23 +161,6 @@ static int xilinx_load_device_tree(hwaddr addr,
if (r < 0) if (r < 0)
fprintf(stderr, "couldn't set /chosen/bootargs\n"); fprintf(stderr, "couldn't set /chosen/bootargs\n");
cpu_physical_memory_write(addr, fdt, fdt_size); cpu_physical_memory_write(addr, fdt, fdt_size);
#else
/* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
to the kernel. */
fdt_size = load_image_targphys("ppc.dtb", addr, 0x10000);
if (fdt_size < 0) {
path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
if (path) {
fdt_size = load_image_targphys(path, addr, 0x10000);
g_free(path);
}
}
if (kernel_cmdline) {
fprintf(stderr,
"Warning: missing libfdt, cannot pass cmdline to kernel!\n");
}
#endif
return fdt_size; return fdt_size;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册