summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorfangjianzhou <[email protected]>2023-11-28 14:20:11 +0800
committerGitHub <[email protected]>2023-11-28 14:20:11 +0800
commit249871cbbcdc14f1c16a2d502639780ebc6ae078 (patch)
tree95b9bd49d440bd9e18c0614e33451a59ea410445 /components
parentc06f4e98fce6c86ef412aa70c1f31c971a9d61a9 (diff)
[libcpu][aarch64] 使用设备树对CPU进行初始化 (#8221)
Diffstat (limited to 'components')
-rw-r--r--components/drivers/ofw/base.c1
-rwxr-xr-xcomponents/drivers/ofw/fdt.c2
-rwxr-xr-xcomponents/drivers/ofw/ofw_internal.h3
-rw-r--r--components/drivers/pm/pm.c4
4 files changed, 3 insertions, 7 deletions
diff --git a/components/drivers/ofw/base.c b/components/drivers/ofw/base.c
index 2e95741e5f..d8c33033a3 100644
--- a/components/drivers/ofw/base.c
+++ b/components/drivers/ofw/base.c
@@ -8,7 +8,6 @@
* 2022-08-25 GuEe-GUI first version
*/
-#define _GNU_SOURCE
#include <rtthread.h>
diff --git a/components/drivers/ofw/fdt.c b/components/drivers/ofw/fdt.c
index 3fa721b74b..8745fbc993 100755
--- a/components/drivers/ofw/fdt.c
+++ b/components/drivers/ofw/fdt.c
@@ -8,8 +8,6 @@
* 2022-08-25 GuEe-GUI first version
*/
-#define _GNU_SOURCE
-
#include <rthw.h>
#include <rtthread.h>
diff --git a/components/drivers/ofw/ofw_internal.h b/components/drivers/ofw/ofw_internal.h
index 619cf4a922..b8bffe41c4 100755
--- a/components/drivers/ofw/ofw_internal.h
+++ b/components/drivers/ofw/ofw_internal.h
@@ -12,7 +12,7 @@
#define __OFW_INTERNAL_H__
#include <rtthread.h>
-
+#include <posix/string.h>
#include <drivers/ofw.h>
#define OFW_PHANDLE_MIN 1
@@ -23,7 +23,6 @@
#define OFW_ROOT_NODE_ADDR_CELLS_DEFAULT 1
#define OFW_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
struct fdt_info
{
/* Always "/", because we save "ofw" information in root node. */
diff --git a/components/drivers/pm/pm.c b/components/drivers/pm/pm.c
index 61f5337846..024e301792 100644
--- a/components/drivers/pm/pm.c
+++ b/components/drivers/pm/pm.c
@@ -901,12 +901,12 @@ static rt_err_t _rt_pm_device_control(rt_device_t dev,
switch (cmd)
{
case RT_PM_DEVICE_CTRL_REQUEST:
- mode = (rt_uint32_t)args;
+ mode = (rt_uint32_t)(rt_ubase_t)args;
rt_pm_request(mode);
break;
case RT_PM_DEVICE_CTRL_RELEASE:
- mode = (rt_uint32_t)args;
+ mode = (rt_uint32_t)(rt_ubase_t)args;
rt_pm_release(mode);
break;
}