projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v2021.01-rc5' into next
[platform/kernel/u-boot.git]
/
drivers
/
timer
/
stm32_timer.c
diff --git
a/drivers/timer/stm32_timer.c
b/drivers/timer/stm32_timer.c
index
9a856b1
..
215334f
100644
(file)
--- a/
drivers/timer/stm32_timer.c
+++ b/
drivers/timer/stm32_timer.c
@@
-1,7
+1,7
@@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2018, STMicroelectronics - All Rights Reserved
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2018, STMicroelectronics - All Rights Reserved
- * Author(s): Patrice Chotard, <patrice.chotard@st.com> for STMicroelectronics.
+ * Author(s): Patrice Chotard, <patrice.chotard@
foss.
st.com> for STMicroelectronics.
*/
#include <common.h>
*/
#include <common.h>
@@
-9,6
+9,8
@@
#include <dm.h>
#include <fdtdec.h>
#include <timer.h>
#include <dm.h>
#include <fdtdec.h>
#include <timer.h>
+#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/io.h>
@@
-50,14
+52,12
@@
struct stm32_timer_priv {
struct stm32_timer_regs *base;
};
struct stm32_timer_regs *base;
};
-static
int stm32_timer_get_count(struct udevice *dev, u64 *count
)
+static
u64 stm32_timer_get_count(struct udevice *dev
)
{
struct stm32_timer_priv *priv = dev_get_priv(dev);
struct stm32_timer_regs *regs = priv->base;
{
struct stm32_timer_priv *priv = dev_get_priv(dev);
struct stm32_timer_regs *regs = priv->base;
- *count = readl(®s->cnt);
-
- return 0;
+ return readl(®s->cnt);
}
static int stm32_timer_probe(struct udevice *dev)
}
static int stm32_timer_probe(struct udevice *dev)
@@
-129,9
+129,8
@@
U_BOOT_DRIVER(stm32_timer) = {
.name = "stm32_timer",
.id = UCLASS_TIMER,
.of_match = stm32_timer_ids,
.name = "stm32_timer",
.id = UCLASS_TIMER,
.of_match = stm32_timer_ids,
- .priv_auto
_alloc_size
= sizeof(struct stm32_timer_priv),
+ .priv_auto
= sizeof(struct stm32_timer_priv),
.probe = stm32_timer_probe,
.ops = &stm32_timer_ops,
.probe = stm32_timer_probe,
.ops = &stm32_timer_ops,
- .flags = DM_FLAG_PRE_RELOC,
};
};