GK SDK 源码库: XMIPCLinuxV100R005C00SPC030 (kernel/tools/open_source excluded)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef ADDRESSMAP_H
|
||||
#define ADDRESSMAP_H
|
||||
|
||||
#include <addressmap_shared.h>
|
||||
|
||||
/* Registers base address for M0 */
|
||||
#define MMIO_BASE 0x40000000
|
||||
|
||||
#endif /* ADDRESSMAP_H */
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef RK3399_MCU_H
|
||||
#define RK3399_MCU_H
|
||||
|
||||
#include <addressmap.h>
|
||||
|
||||
typedef unsigned int uint32_t;
|
||||
|
||||
#define mmio_read_32(c) ({unsigned int __v = \
|
||||
(*(volatile unsigned int *)(c)); __v; })
|
||||
#define mmio_write_32(c, v) ((*(volatile unsigned int *)(c)) = (v))
|
||||
|
||||
#define mmio_clrbits_32(addr, clear) \
|
||||
mmio_write_32(addr, (mmio_read_32(addr) & ~(clear)))
|
||||
#define mmio_setbits_32(addr, set) \
|
||||
mmio_write_32(addr, (mmio_read_32(addr)) | (set))
|
||||
#define mmio_clrsetbits_32(addr, clear, set) \
|
||||
mmio_write_32(addr, (mmio_read_32(addr) & ~(clear)) | (set))
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
void stopwatch_init_usecs_expire(unsigned int usecs);
|
||||
int stopwatch_expired(void);
|
||||
void stopwatch_reset(void);
|
||||
|
||||
#endif /* RK3399_MCU_H */
|
||||
Reference in New Issue
Block a user