mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Fix compilation if CONFIG_INTERNAL=no
Change-Id: Id9e07332003832465a0eccf1d89e73d15abb35c0 Signed-off-by: Jonathan Liu <net147@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/35808 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Tested-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
d58128eb83
commit
7f15de164c
@ -170,6 +170,7 @@ struct flashrom_flashchip_info *flashrom_supported_flash_chips(void)
|
|||||||
*/
|
*/
|
||||||
struct flashrom_board_info *flashrom_supported_boards(void)
|
struct flashrom_board_info *flashrom_supported_boards(void)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_INTERNAL == 1
|
||||||
int boards_known_size = 0;
|
int boards_known_size = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
const struct board_info *binfo = boards_known;
|
const struct board_info *binfo = boards_known;
|
||||||
@ -194,6 +195,9 @@ struct flashrom_board_info *flashrom_supported_boards(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return supported_boards;
|
return supported_boards;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -202,6 +206,7 @@ struct flashrom_board_info *flashrom_supported_boards(void)
|
|||||||
*/
|
*/
|
||||||
struct flashrom_chipset_info *flashrom_supported_chipsets(void)
|
struct flashrom_chipset_info *flashrom_supported_chipsets(void)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_INTERNAL == 1
|
||||||
int chipset_enables_size = 0;
|
int chipset_enables_size = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
const struct penable *chipset = chipset_enables;
|
const struct penable *chipset = chipset_enables;
|
||||||
@ -228,6 +233,9 @@ struct flashrom_chipset_info *flashrom_supported_chipsets(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return supported_chipsets;
|
return supported_chipsets;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -363,6 +363,7 @@ void *physmap_ro_unaligned(const char *descr, uintptr_t phys_addr, size_t len)
|
|||||||
return physmap_common(descr, phys_addr, len, PHYSM_RO, PHYSM_NOCLEANUP, PHYSM_EXACT);
|
return physmap_common(descr, phys_addr, len, PHYSM_RO, PHYSM_NOCLEANUP, PHYSM_EXACT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_INTERNAL == 1
|
||||||
/* MSR abstraction implementations for Linux, OpenBSD, FreeBSD/Dragonfly, OSX, libpayload
|
/* MSR abstraction implementations for Linux, OpenBSD, FreeBSD/Dragonfly, OSX, libpayload
|
||||||
* and a non-working default implementation on the bottom. See also hwaccess.h for some (re)declarations. */
|
* and a non-working default implementation on the bottom. See also hwaccess.h for some (re)declarations. */
|
||||||
#if defined(__i386__) || defined(__x86_64__)
|
#if defined(__i386__) || defined(__x86_64__)
|
||||||
@ -687,3 +688,4 @@ void cleanup_cpu_msr(void)
|
|||||||
#else // x86
|
#else // x86
|
||||||
/* Does MSR exist on non-x86 architectures? */
|
/* Does MSR exist on non-x86 architectures? */
|
||||||
#endif // arch switches for MSR code
|
#endif // arch switches for MSR code
|
||||||
|
#endif // CONFIG_INTERNAL == 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user