@@ -74,11 +74,3 @@ config ZYNQ_GEM_I2C_MAC_OFFSET
Set the MAC offset for i2C.
endif
-
-config CMD_FRU
- bool "FRU information for product"
- help
- This option enables FRU commands to capture and display FRU
- information present in the device. The FRU Information is used
- to primarily to provide "inventory" information about the boards
- that the FRU Information Device is located on.
@@ -8,6 +8,3 @@ obj-y += board.o
ifndef CONFIG_ARCH_ZYNQ
obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
endif
-ifndef CONFIG_SPL_BUILD
-obj-$(CONFIG_CMD_FRU) += fru.o fru_ops.o
-endif
@@ -8,6 +8,7 @@
#include <efi.h>
#include <efi_loader.h>
#include <env.h>
+#include <fru.h>
#include <log.h>
#include <asm/global_data.h>
#include <asm/sections.h>
@@ -25,8 +26,6 @@
#include <linux/kernel.h>
#include <uuid.h>
-#include "fru.h"
-
#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT)
struct efi_fw_image fw_images[] = {
#if defined(XILINX_BOOT_IMAGE_GUID)
@@ -1063,6 +1063,14 @@ config CMD_FPGAD
fpga_get_reg() function. This functions similarly to the 'md'
command.
+config CMD_FRU
+ bool "FRU information for product"
+ help
+ This option enables FRU (Field Replaceable Unit) commands to capture
+ and display FRU information present in the device. The FRU Information
+ is used to primarily to provide "inventory" information about the
+ boards that the FRU Information Device is located on.
+
config CMD_FUSE
bool "fuse - support for the fuse subssystem"
help
@@ -74,6 +74,7 @@ obj-$(CONFIG_CMD_SQUASHFS) += sqfs.o
obj-$(CONFIG_CMD_FLASH) += flash.o
obj-$(CONFIG_CMD_FPGA) += fpga.o
obj-$(CONFIG_CMD_FPGAD) += fpgad.o
+obj-$(CONFIG_CMD_FRU) += fru.o
obj-$(CONFIG_CMD_FS_GENERIC) += fs.o
obj-$(CONFIG_CMD_FUSE) += fuse.o
obj-$(CONFIG_CMD_GETTIME) += gettime.o
similarity index 99%
rename from board/xilinx/common/fru.c
rename to cmd/fru.c
@@ -7,10 +7,9 @@
#include <common.h>
#include <command.h>
#include <fdtdec.h>
+#include <fru.h>
#include <malloc.h>
-#include "fru.h"
-
static int do_fru_capture(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
similarity index 100%
rename from board/xilinx/common/fru.h
rename to include/fru.h
@@ -39,6 +39,7 @@ obj-y += crc16-ccitt.o
obj-$(CONFIG_ERRNO_STR) += errno_str.o
obj-$(CONFIG_FIT) += fdtdec_common.o
obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
+obj-$(CONFIG_CMD_FRU) += fru_ops.o
obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o
obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbios.o
obj-$(CONFIG_SMBIOS_PARSER) += smbios-parser.o
similarity index 99%
rename from board/xilinx/common/fru_ops.c
rename to lib/fru_ops.c
@@ -7,14 +7,13 @@
#include <common.h>
#include <env.h>
#include <fdtdec.h>
+#include <fru.h>
#include <hexdump.h>
#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <linux/compat.h>
-#include "fru.h"
-
struct fru_table fru_data __section(".data") = {
.brd.custom_fields = LIST_HEAD_INIT(fru_data.brd.custom_fields),
.multi_recs = LIST_HEAD_INIT(fru_data.multi_recs),