aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/cavium/include/bdk/libbdk-boot
diff options
context:
space:
mode:
authorDavid Hendricks <dhendricks@fb.com>2018-03-09 14:30:38 -0800
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2018-07-03 15:53:32 +0000
commit7d48ac5c7dfb52fc470bbad1013b4d460bc6a1e0 (patch)
tree42002ba1e86627339ff4a6cf38efb4b3f00033bb /src/vendorcode/cavium/include/bdk/libbdk-boot
parentd837e660074e0621d63f59515f933c209441b653 (diff)
soc/cavium: Integrate BDK files into coreboot
* Make it compile. * Fix whitespace errors. * Fix printf formats. * Add missing headers includes * Guard headers with ifdefs Compile DRAM init code in romstage. Compile QLM, PCIe, RNG, PHY, GPIO, MDIO init code in ramstage. Change-Id: I0a93219a14bfb6ebe41103a825d5032b11e7f2c6 Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/25089 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode/cavium/include/bdk/libbdk-boot')
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-bgx.h54
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-ccpi.h54
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-dram.h60
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-info.h86
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-mdio.h54
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-status.h3
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-twsi.h54
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-usb.h5
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot.h14
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-image.h105
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-watchdog.h3
-rw-r--r--src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-xmodem.h59
12 files changed, 12 insertions, 539 deletions
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-bgx.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-bgx.h
deleted file mode 100644
index f3ea6a41d5..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-bgx.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Boot services for BGX
- *
- * @addtogroup boot
- * @{
- */
-
-/**
- * Configure BGX on all nodes as part of booting
- */
-extern void bdk_boot_bgx(void);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-ccpi.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-ccpi.h
deleted file mode 100644
index a457f8c0d0..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-ccpi.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Boot services for CCPI
- *
- * @addtogroup boot
- * @{
- */
-
-/**
- * Initialize the CCPI links and bringup the other nodes
- */
-extern void bdk_boot_ccpi(void);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-dram.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-dram.h
deleted file mode 100644
index 716efc3c3a..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-dram.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Boot services for DRAM
- *
- * @addtogroup boot
- * @{
- */
-
-/**
- * Configure DRAM on a specific node
- *
- * @param node Node to configure
- * @param override_for_speed
- * If non-zero, the DRAM init code will use this for the
- * DRAM clock speed. This is used for SLT and should not
- * be used otherwise.
- */
-extern void bdk_boot_dram(bdk_node_t node, int override_for_speed);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-info.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-info.h
deleted file mode 100644
index 4ba814ce77..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-info.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Functions for displaying and retrieving infomration about the
- * boot environment
- *
- * @addtogroup boot
- * @{
- */
-
-
-/**
- * Display information about strapping and other hard configuration items for
- * the specified node
- *
- * @param node Node to display
- */
-void bdk_boot_info_strapping(bdk_node_t node);
-
-/**
- * Return a string containing information about the chip's manufacture wafer
- *
- * @param node Node to query
- *
- * @return Static string, reused on each call
- */
-const char* bdk_boot_info_wafer(bdk_node_t node);
-
-/**
- * Return a string containing the chip's unique serial number
- *
- * @param node Node to query
- *
- * @return Static string, reused on each call
- */
-const char* bdk_boot_info_serial(bdk_node_t node);
-
-/**
- * Return a string containing the chip's unique ID
- *
- * @param node Node to query
- *
- * @return Static string, reused on each call
- */
-const char* bdk_boot_info_unique_id(bdk_node_t node);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-mdio.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-mdio.h
deleted file mode 100644
index e99be3ffd6..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-mdio.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Boot services for MDIO
- *
- * @addtogroup boot
- * @{
- */
-
-/**
- * Configure MDIO on all nodes as part of booting
- */
-extern void bdk_boot_mdio(void);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-status.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-status.h
index 2a0896fe10..f88ff2baf7 100644
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-status.h
+++ b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-status.h
@@ -1,3 +1,5 @@
+#ifndef __CB_BDK_BOOT_STATUS_H__
+#define __CB_BDK_BOOT_STATUS_H__
/***********************license start***********************************
* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
* reserved.
@@ -92,3 +94,4 @@ typedef enum
extern void bdk_boot_status(bdk_boot_status_t status);
/** @} */
+#endif /* !__CB_BDK_BOOT_STATUS_H__ */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-twsi.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-twsi.h
deleted file mode 100644
index 155509f3c1..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-twsi.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Boot services for TWSI
- *
- * @addtogroup boot
- * @{
- */
-
-/**
- * Configure TWSI on all nodes as part of booting
- */
-extern void bdk_boot_twsi(void);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-usb.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-usb.h
index 169047499b..20a049653d 100644
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-usb.h
+++ b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot-usb.h
@@ -1,3 +1,5 @@
+#ifndef __BDK_BOOT_USB_H__
+#define __BDK_BOOT_USB_H__
/***********************license start***********************************
* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
* reserved.
@@ -49,6 +51,7 @@
/**
* Configure USB on all nodes as part of booting
*/
-extern void bdk_boot_usb(void);
+void bdk_boot_usb(void);
/** @} */
+#endif
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot.h
index e40b8cebc2..46ec4b8679 100644
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot.h
+++ b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-boot.h
@@ -51,19 +51,9 @@
* @defgroup boot Boot related support functions
*/
-#include "bdk-boot-bgx.h"
-#include "bdk-boot-ccpi.h"
-#include "bdk-boot-dram.h"
-#include "bdk-boot-gpio.h"
-#include "bdk-boot-info.h"
-#include "bdk-boot-mdio.h"
-#include "bdk-boot-pcie.h"
-#include "bdk-boot-qlm.h"
#include "bdk-boot-status.h"
-#include "bdk-boot-twsi.h"
-#include "bdk-boot-usb.h"
-#include "bdk-image.h"
#include "bdk-watchdog.h"
-#include "bdk-xmodem.h"
+
+void bdk_boot(void);
#endif
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-image.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-image.h
deleted file mode 100644
index 725453c8a0..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-image.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Utility functions for handling binary images
- *
- * <hr>$Revision: 49448 $<hr>
- *
- * @defgroup image Binary image utility functions
- * @{
- */
-
-/**
- * Structure present at the beginning of BDK images
- */
-typedef struct
-{
- uint32_t instruction; /* Raw instruction for skipping header */
- uint32_t length; /* Length of the image, includes header */
- uint64_t magic; /* Magic string "THUNDERX" */
- uint32_t crc32; /* CRC32 of image + header. These bytes are zero when calculating the CRC */
- uint32_t reserved1; /* Zero, reserved for future use */
- char name[64]; /* ASCII Image name. Must always end in zero */
- char version[32]; /* ASCII Version. Must always end in zero */
- uint64_t reserved[17]; /* Zero, reserved for future use */
-} BDK_LITTLE_ENDIAN_STRUCT bdk_image_header_t;
-
-/**
- * Validate image header
- *
- * @param header Header to validate
- *
- * @return 1 if header is valid, zero if invalid
- */
-extern int bdk_image_header_is_valid(const bdk_image_header_t *header);
-
-/**
- * Verify image at the given address is good
- *
- * @param image Pointer to the image
- *
- * @return Zero on success, negative on failure
- */
-extern int bdk_image_verify(const void *image);
-
-/**
- * Read a image header from a file
- *
- * @param handle File handel to read from
- * @param header Pointer to header structure to fill
- *
- * @return Zero on success, negative on failure
- */
-extern int bdk_image_read_header(FILE *handle, bdk_image_header_t *header);
-
-/**
- * Read a image from a file and boot it, replacing the current running BDK image
- *
- * @param filename File to read the image from
- * @param loc Offset into file for image. This is normally zero for normal files. Device
- * files, such as /dev/mem, will use this to locate the image.
- *
- * @return Negative on failure. On success this function never returns.
- */
-extern int bdk_image_boot(const char *filename, uint64_t loc);
-
-/** @} */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-watchdog.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-watchdog.h
index 45f6efb537..0ab773e9c3 100644
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-watchdog.h
+++ b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-watchdog.h
@@ -1,3 +1,5 @@
+#ifndef __CB_BDK_WATCHDOG_H__
+#define __CB_BDK_WATCHDOG_H__
/***********************license start***********************************
* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
* reserved.
@@ -79,3 +81,4 @@ extern void bdk_watchdog_disable(void);
extern int bdk_watchdog_is_running(void);
/** @} */
+#endif /* !__CB_BDK_WATCHDOG_H__ */
diff --git a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-xmodem.h b/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-xmodem.h
deleted file mode 100644
index 3caff397c5..0000000000
--- a/src/vendorcode/cavium/include/bdk/libbdk-boot/bdk-xmodem.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/***********************license start***********************************
-* Copyright (c) 2003-2017 Cavium Inc. (support@cavium.com). All rights
-* reserved.
-*
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-*
-* * Neither the name of Cavium Inc. nor the names of
-* its contributors may be used to endorse or promote products
-* derived from this software without specific prior written
-* permission.
-*
-* This Software, including technical data, may be subject to U.S. export
-* control laws, including the U.S. Export Administration Act and its
-* associated regulations, and may be subject to export or import
-* regulations in other countries.
-*
-* TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
-* AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
-* WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT
-* TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
-* REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
-* DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
-* OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
-* PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT,
-* QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK
-* ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
-***********************license end**************************************/
-
-/**
- * @file
- *
- * Boot services for XMODEM transfers
- *
- * @addtogroup boot
- * @{
- */
-
-/**
- * Receive a file through Xmodem and write it to an internal file.
- *
- * @param dest_file File to write to
- * @param offset Offset into the file to write
- *
- * @return Zero on success, negative on failure
- */
-extern int bdk_xmodem_upload(const char *dest_file, uint64_t offset);
-
-/** @} */