Linux_SDK_V1.0.2

This commit is contained in:
thead_admin
2022-11-22 15:53:40 +08:00
parent c9df2bbe57
commit c20e64a982
77 changed files with 5382 additions and 1320 deletions

View File

@@ -36,13 +36,12 @@
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
"Unsupported access size for {READ,WRITE}_ONCE().")
#define smp_mb() __asm__ __volatile__ ("fence rw, rw" : : : "memory")
/*
* Use __READ_ONCE() instead of READ_ONCE() if you do not require any
* atomicity. Note that this may result in tears!
*/
#ifndef __READ_ONCE
#define __READ_ONCE(x) ({smp_mb();(*(const volatile __unqual_scalar_typeof(x) *)&(x));})
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
#endif
#define READ_ONCE(x) \
@@ -53,9 +52,7 @@
#define __WRITE_ONCE(x, val) \
do { \
smp_mb(); \
*(volatile typeof(x) *)&(x) = (val); \
smp_mb(); \
} while (0)
#define WRITE_ONCE(x, val) \
@@ -86,7 +83,6 @@ static __no_kasan_or_inline
unsigned long read_word_at_a_time(const void *addr)
{
kasan_check_read(addr, 1);
smp_mb();
return *(unsigned long *)addr;
}

View File

@@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2021 Alibaba, Inc.
*
* Author: zenglinghui <zenglinghui.zlh@linux.alibaba.com>
*/
#ifndef DT_BINDING_RESET_LIGHT_H
#define DT_BINDING_RESET_LIGHT_H
#define LIGHT_RESET_WDT0 0
#define LIGHT_RESET_WDT1 1
#endif

View File

@@ -34,6 +34,8 @@ enum light_aon_misc_func {
LIGHT_AON_MISC_FUNC_WDG_RESTART = 7,
LIGHT_AON_MISC_FUNC_WDG_GET_STATE = 8,
LIGHT_AON_MISC_FUNC_WDG_POWER_OFF = 9,
LIGHT_AON_MISC_FUNC_AON_WDT_ON = 10,
LIGHT_AON_MISC_FUNC_AON_WDT_OFF = 11,
};
enum light_aon_pm_func {