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>
This commit is contained in:
Juan Quintela 2009-07-27 16:12:52 +02:00 committed by Anthony Liguori
parent 67c0f08d16
commit 3f0855b14b
6 changed files with 10 additions and 9 deletions

View File

@ -513,8 +513,8 @@ ifeq ($(TARGET_BASE_ARCH), ppc)
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
endif endif
obj-ppc-$(CONFIG_FDT) += device_tree.o
ifdef FDT_LIBS ifdef FDT_LIBS
obj-ppc-y += device_tree.o
LIBS+= $(FDT_LIBS) LIBS+= $(FDT_LIBS)
endif endif
@ -541,8 +541,8 @@ obj-microblaze-y += xilinx_ethlite.o
obj-microblaze-y += pflash_cfi02.o obj-microblaze-y += pflash_cfi02.o
obj-microblaze-$(CONFIG_FDT) += device_tree.o
ifdef FDT_LIBS ifdef FDT_LIBS
obj-microblaze-y += device_tree.o
LIBS+= $(FDT_LIBS) LIBS+= $(FDT_LIBS)
endif endif

3
configure vendored
View File

@ -1739,7 +1739,8 @@ if test "$preadv" = "yes" ; then
echo "#define HAVE_PREADV 1" >> $config_host_h echo "#define HAVE_PREADV 1" >> $config_host_h
fi fi
if test "$fdt" = "yes" ; then if test "$fdt" = "yes" ; then
echo "#define HAVE_FDT 1" >> $config_host_h echo "CONFIG_FDT=y" >> $config_host_mak
echo "#define CONFIG_FDT 1" >> $config_host_h
echo "FDT_LIBS=-lfdt" >> $config_host_mak echo "FDT_LIBS=-lfdt" >> $config_host_mak
fi fi

View File

@ -52,14 +52,14 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,
target_phys_addr_t initrd_size, target_phys_addr_t initrd_size,
const char *kernel_cmdline) const char *kernel_cmdline)
{ {
#ifdef HAVE_FDT #ifdef CONFIG_FDT
void *fdt; void *fdt;
int r; int r;
#endif #endif
char *path; char *path;
int fdt_size; int fdt_size;
#ifdef HAVE_FDT #ifdef CONFIG_FDT
/* Try the local "mb.dtb" override. */ /* Try the local "mb.dtb" override. */
fdt = load_device_tree("mb.dtb", &fdt_size); fdt = load_device_tree("mb.dtb", &fdt_size);
if (!fdt) { if (!fdt) {

View File

@ -32,7 +32,7 @@ static void *bamboo_load_device_tree(target_phys_addr_t addr,
const char *kernel_cmdline) const char *kernel_cmdline)
{ {
void *fdt = NULL; void *fdt = NULL;
#ifdef HAVE_FDT #ifdef CONFIG_FDT
uint32_t mem_reg_property[] = { 0, 0, ramsize }; uint32_t mem_reg_property[] = { 0, 0, ramsize };
char *filename; char *filename;
int fdt_size; int fdt_size;

View File

@ -46,7 +46,7 @@
#define MPC8544_PCI_IO 0xE1000000 #define MPC8544_PCI_IO 0xE1000000
#define MPC8544_PCI_IOLEN 0x10000 #define MPC8544_PCI_IOLEN 0x10000
#ifdef HAVE_FDT #ifdef CONFIG_FDT
static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop) static int mpc8544_copy_soc_cell(void *fdt, const char *node, const char *prop)
{ {
uint32_t cell; uint32_t cell;
@ -77,7 +77,7 @@ static void *mpc8544_load_device_tree(target_phys_addr_t addr,
const char *kernel_cmdline) const char *kernel_cmdline)
{ {
void *fdt = NULL; void *fdt = NULL;
#ifdef HAVE_FDT #ifdef CONFIG_FDT
uint32_t mem_reg_property[] = {0, ramsize}; uint32_t mem_reg_property[] = {0, ramsize};
char *filename; char *filename;
int fdt_size; int fdt_size;

View File

@ -21,7 +21,7 @@
static QEMUTimer *kvmppc_timer; static QEMUTimer *kvmppc_timer;
static unsigned int kvmppc_timer_rate; static unsigned int kvmppc_timer_rate;
#ifdef HAVE_FDT #ifdef CONFIG_FDT
int kvmppc_read_host_property(const char *node_path, const char *prop, int kvmppc_read_host_property(const char *node_path, const char *prop,
void *val, size_t len) void *val, size_t len)
{ {