[uboot] create uboot from github:
repo: https://github.com/u-boot/u-boot commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91 Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
This commit is contained in:
26
u-boot-2021.10/include/asm-generic/unaligned.h
Normal file
26
u-boot-2021.10/include/asm-generic/unaligned.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef _GENERIC_UNALIGNED_H
|
||||
#define _GENERIC_UNALIGNED_H
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include <linux/unaligned/le_byteshift.h>
|
||||
#include <linux/unaligned/be_byteshift.h>
|
||||
#include <linux/unaligned/generic.h>
|
||||
|
||||
/*
|
||||
* Select endianness
|
||||
*/
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
#define get_unaligned __get_unaligned_le
|
||||
#define put_unaligned __put_unaligned_le
|
||||
#elif defined(__BIG_ENDIAN)
|
||||
#define get_unaligned __get_unaligned_be
|
||||
#define put_unaligned __put_unaligned_be
|
||||
#else
|
||||
#error invalid endian
|
||||
#endif
|
||||
|
||||
/* Allow unaligned memory access */
|
||||
void allow_unaligned(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user