All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/30] lib: Allow crc32 to be disabled.
@ 2019-10-27 15:53 Simon Glass
  2019-10-27 15:53 ` [U-Boot] [PATCH 02/30] spi: Allow separate control of SPI_FLASH_TINY for SPL/TPL Simon Glass
                   ` (29 more replies)
  0 siblings, 30 replies; 45+ messages in thread
From: Simon Glass @ 2019-10-27 15:53 UTC (permalink / raw)
  To: u-boot

Unfortunately this table seems to appear in TPL with gcc 7.3 even if it
is not used. Fix it by creating a Kconfig that can be used to disable this
routine.

It is enabled by default, since most boards use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/Kconfig  | 29 +++++++++++++++++++++++++++++
 lib/Makefile |  2 +-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/lib/Kconfig b/lib/Kconfig
index 135f0b372b..be5f9d343a 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -353,6 +353,35 @@ config SHA_PROG_HW_ACCEL
 config MD5
 	bool
 
+config CRC32
+	bool "Enable crc32 routine"
+	default y
+	help
+	  This enables a 32-bit CRC (cyclic-redundancy check) routine. It is
+	  typically used to check for changes in a group of bytes. Even a
+	  small change typically produces a very different CRC value. This
+	  algorithm is simple and quite fast.
+
+config SPL_CRC32
+	bool "Enable crc32 routine in SPL"
+	depends on SPL
+	default y
+	help
+	  This enables a 32-bit CRC (cyclic-redundancy check) routine in SPL. It
+	  is typically used to check for changes in a group of bytes. Even a
+	  small change typically produces a very different CRC value. This
+	  algorithm is simple and quite fast.
+
+config TPL_CRC32
+	bool "Enable crc32 routine in SPL"
+	depends on TPL
+	default y
+	help
+	  This enables a 32-bit CRC (cyclic-redundancy check) routine in SPL. It
+	  is typically used to check for changes in a group of bytes. Even a
+	  small change typically produces a very different CRC value. This
+	  algorithm is simple and quite fast.
+
 config CRC32C
 	bool
 
diff --git a/lib/Makefile b/lib/Makefile
index d248d8626c..8adc08fd73 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -84,7 +84,7 @@ obj-y += errno.o
 obj-y += display_options.o
 CFLAGS_display_options.o := $(if $(BUILD_TAG),-DBUILD_TAG='"$(BUILD_TAG)"')
 obj-$(CONFIG_BCH) += bch.o
-obj-y += crc32.o
+obj-$(CONFIG_$(SPL_TPL_)CRC32) += crc32.o
 obj-$(CONFIG_CRC32C) += crc32c.o
 obj-y += ctype.o
 obj-y += div64.o
-- 
2.24.0.rc0.303.g954a862665-goog

^ permalink raw reply related	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2020-01-07 10:16 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 15:53 [U-Boot] [PATCH 01/30] lib: Allow crc32 to be disabled Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 02/30] spi: Allow separate control of SPI_FLASH_TINY for SPL/TPL Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 03/30] mtd: spi-nor: Tidy up error handling / debug code Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 04/30] mtd: spi: Export spi_flash_std_probe() Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 05/30] wdt: Move code out of the header Simon Glass
2019-10-28  5:07   ` Stefan Roese
2019-10-27 15:53 ` [U-Boot] [PATCH 06/30] wdt: Drop dm.h header file Simon Glass
2019-10-28  5:44   ` Stefan Roese
2019-10-27 15:53 ` [U-Boot] [PATCH 07/30] mtd: spi-mem: " Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 08/30] mtd: spi: Drop SPI_XFER_MMAP* Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 09/30] dm: core: Drop dm.h header file from dm-demo.h Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 10/30] dm: core: Drop header files from dm/test.h Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 11/30] fs: fs-loader: Drop dm.h header file Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 12/30] net: Drop dm.h header file from phy.h Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 13/30] sf: Drop dm.h header file from spi_flash.h Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 14/30] thermal: Drop dm.h header file Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 15/30] w1: " Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 16/30] efi: Tidy up header includes Simon Glass
2019-10-27 17:42   ` Heinrich Schuchardt
2019-10-27 18:59     ` Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 17/30] power: Tidy up inclusion of regulator_common.h Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 18/30] mmc: Drop duplicate dm.h inclusion Simon Glass
2019-10-27 15:53 ` [U-Boot] [PATCH 19/30] spi: " Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 20/30] ti: am654: " Simon Glass
2019-10-29  5:43   ` Lokesh Vutla
2019-10-27 15:54 ` [U-Boot] [PATCH 21/30] liebherr: " Simon Glass
2019-11-01 22:45   ` Lukasz Majewski
2019-10-27 15:54 ` [U-Boot] [PATCH 22/30] pci: Drop dm.h inclusion from header file Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 23/30] video: meson: Drop unnecessary header includes Simon Glass
2019-10-27 15:54   ` Simon Glass
2019-10-27 17:06   ` [U-Boot] " Anatolij Gustschin
2019-10-27 17:06     ` Anatolij Gustschin
2019-10-27 17:48   ` [U-Boot] " Neil Armstrong
2019-10-27 17:48     ` Neil Armstrong
2020-01-07 10:16     ` Neil Armstrong
2020-01-07 10:16       ` Neil Armstrong
2019-10-27 15:54 ` [U-Boot] [PATCH 24/30] mediatek: Drop dm.h header file Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 25/30] mscc: " Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 26/30] adc: " Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 27/30] nand: " Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 28/30] ufs: " Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 29/30] usb: " Simon Glass
2019-10-27 15:54 ` [U-Boot] [PATCH 30/30] dm: core: Guard against including dm.h in header files Simon Glass
2019-10-27 16:48 ` [U-Boot] [PATCH 01/30] lib: Allow crc32 to be disabled Heinrich Schuchardt
2019-11-08 14:59   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.