mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 11:24:42 +00:00
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 <sjg@chromium.org>
This commit is contained in:
parent
0741165f3f
commit
3b52337c75
1 changed files with 3 additions and 2 deletions
|
@ -6,11 +6,12 @@
|
||||||
#ifdef USE_HOSTCC
|
#ifdef USE_HOSTCC
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <asm/sections.h>
|
||||||
#include <u-boot/crc.h>
|
#include <u-boot/crc.h>
|
||||||
|
|
||||||
#define POLY (0x1070U << 3)
|
#define POLY (0x1070U << 3)
|
||||||
|
|
||||||
static unsigned char _crc8(unsigned short data)
|
__rcode static unsigned char _crc8(unsigned short data)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ static unsigned char _crc8(unsigned short data)
|
||||||
return (unsigned char)(data >> 8);
|
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;
|
int i;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue