From: Simon Glass Date: Sun, 26 Jan 2025 18:43:21 +0000 (-0700) Subject: lib: Mark crc8 as relocation code X-Git-Tag: v2025.04-rc2~34^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b52337c759aea13379ff624c3204d920d87eeb7;p=pandora-u-boot.git lib: Mark crc8 as relocation code Mark the crc8 code as needed by relocation. This is used as a simple check against corruption of the code when copying. Signed-off-by: Simon Glass --- diff --git a/lib/crc8.c b/lib/crc8.c index 811e19917b4..bbb229c3892 100644 --- a/lib/crc8.c +++ b/lib/crc8.c @@ -6,11 +6,12 @@ #ifdef USE_HOSTCC #include #endif +#include #include #define POLY (0x1070U << 3) -static unsigned char _crc8(unsigned short data) +__rcode static unsigned char _crc8(unsigned short data) { int i; @@ -23,7 +24,7 @@ static unsigned char _crc8(unsigned short data) return (unsigned char)(data >> 8); } -unsigned int crc8(unsigned int crc, const unsigned char *vptr, int len) +__rcode unsigned int crc8(unsigned int crc, const unsigned char *vptr, int len) { int i;