Commit 3f0855b14b071655396c71f0d38970b9e21be92f

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent 67c0f08d

Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Makefile.target
@@ -513,8 +513,8 @@ ifeq ($(TARGET_BASE_ARCH), ppc) @@ -513,8 +513,8 @@ ifeq ($(TARGET_BASE_ARCH), ppc)
513 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE 513 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
514 endif 514 endif
515 515
  516 +obj-ppc-$(CONFIG_FDT) += device_tree.o
516 ifdef FDT_LIBS 517 ifdef FDT_LIBS
517 -obj-ppc-y += device_tree.o  
518 LIBS+= $(FDT_LIBS) 518 LIBS+= $(FDT_LIBS)
519 endif 519 endif
520 520
@@ -541,8 +541,8 @@ obj-microblaze-y += xilinx_ethlite.o @@ -541,8 +541,8 @@ obj-microblaze-y += xilinx_ethlite.o
541 541
542 obj-microblaze-y += pflash_cfi02.o 542 obj-microblaze-y += pflash_cfi02.o
543 543
  544 +obj-microblaze-$(CONFIG_FDT) += device_tree.o
544 ifdef FDT_LIBS 545 ifdef FDT_LIBS
545 -obj-microblaze-y += device_tree.o  
546 LIBS+= $(FDT_LIBS) 546 LIBS+= $(FDT_LIBS)
547 endif 547 endif
548 548
configure
@@ -1739,7 +1739,8 @@ if test &quot;$preadv&quot; = &quot;yes&quot; ; then @@ -1739,7 +1739,8 @@ if test &quot;$preadv&quot; = &quot;yes&quot; ; then
1739 echo "#define HAVE_PREADV 1" >> $config_host_h 1739 echo "#define HAVE_PREADV 1" >> $config_host_h
1740 fi 1740 fi
1741 if test "$fdt" = "yes" ; then 1741 if test "$fdt" = "yes" ; then
1742 - echo "#define HAVE_FDT 1" >> $config_host_h 1742 + echo "CONFIG_FDT=y" >> $config_host_mak
  1743 + echo "#define CONFIG_FDT 1" >> $config_host_h
1743 echo "FDT_LIBS=-lfdt" >> $config_host_mak 1744 echo "FDT_LIBS=-lfdt" >> $config_host_mak
1744 fi 1745 fi
1745 1746
hw/petalogix_s3adsp1800_mmu.c
@@ -52,14 +52,14 @@ static int petalogix_load_device_tree(target_phys_addr_t addr, @@ -52,14 +52,14 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,
52 target_phys_addr_t initrd_size, 52 target_phys_addr_t initrd_size,
53 const char *kernel_cmdline) 53 const char *kernel_cmdline)
54 { 54 {
55 -#ifdef HAVE_FDT 55 +#ifdef CONFIG_FDT
56 void *fdt; 56 void *fdt;
57 int r; 57 int r;
58 #endif 58 #endif
59 char *path; 59 char *path;
60 int fdt_size; 60 int fdt_size;
61 61
62 -#ifdef HAVE_FDT 62 +#ifdef CONFIG_FDT
63 /* Try the local "mb.dtb" override. */ 63 /* Try the local "mb.dtb" override. */
64 fdt = load_device_tree("mb.dtb", &fdt_size); 64 fdt = load_device_tree("mb.dtb", &fdt_size);
65 if (!fdt) { 65 if (!fdt) {
hw/ppc440_bamboo.c
@@ -32,7 +32,7 @@ static void *bamboo_load_device_tree(target_phys_addr_t addr, @@ -32,7 +32,7 @@ static void *bamboo_load_device_tree(target_phys_addr_t addr,
32 const char *kernel_cmdline) 32 const char *kernel_cmdline)
33 { 33 {
34 void *fdt = NULL; 34 void *fdt = NULL;
35 -#ifdef HAVE_FDT 35 +#ifdef CONFIG_FDT
36 uint32_t mem_reg_property[] = { 0, 0, ramsize }; 36 uint32_t mem_reg_property[] = { 0, 0, ramsize };
37 char *filename; 37 char *filename;
38 int fdt_size; 38 int fdt_size;
hw/ppce500_mpc8544ds.c
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 #define MPC8544_PCI_IO 0xE1000000 46 #define MPC8544_PCI_IO 0xE1000000
47 #define MPC8544_PCI_IOLEN 0x10000 47 #define MPC8544_PCI_IOLEN 0x10000
48 48
49 -#ifdef HAVE_FDT 49 +#ifdef CONFIG_FDT
50 static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop) 50 static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop)
51 { 51 {
52 uint32_t cell; 52 uint32_t cell;
@@ -77,7 +77,7 @@ static void *mpc8544_load_device_tree(target_phys_addr_t addr, @@ -77,7 +77,7 @@ static void *mpc8544_load_device_tree(target_phys_addr_t addr,
77 const char *kernel_cmdline) 77 const char *kernel_cmdline)
78 { 78 {
79 void *fdt = NULL; 79 void *fdt = NULL;
80 -#ifdef HAVE_FDT 80 +#ifdef CONFIG_FDT
81 uint32_t mem_reg_property[] = {0, ramsize}; 81 uint32_t mem_reg_property[] = {0, ramsize};
82 char *filename; 82 char *filename;
83 int fdt_size; 83 int fdt_size;
target-ppc/kvm_ppc.c
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 static QEMUTimer *kvmppc_timer; 21 static QEMUTimer *kvmppc_timer;
22 static unsigned int kvmppc_timer_rate; 22 static unsigned int kvmppc_timer_rate;
23 23
24 -#ifdef HAVE_FDT 24 +#ifdef CONFIG_FDT
25 int kvmppc_read_host_property(const char *node_path, const char *prop, 25 int kvmppc_read_host_property(const char *node_path, const char *prop,
26 void *val, size_t len) 26 void *val, size_t len)
27 { 27 {