Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xenomai
ipipe-arm
Commits
7b7aa8fd
Commit
7b7aa8fd
authored
Dec 08, 2017
by
Gilles Chanteperdrix
Committed by
Philippe Gerum
Nov 08, 2019
Browse files
ARM: davinci/time: ipipe: add user-visible TSC
parent
916a84e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
arch/arm/mach-davinci/Kconfig
View file @
7b7aa8fd
...
...
@@ -43,6 +43,7 @@ config ARCH_DAVINCI_DA850
depends on !ARCH_DAVINCI_DMx || (AUTO_ZRELADDR && ARM_PATCH_PHYS_VIRT)
select ARCH_DAVINCI_DA8XX
select CP_INTC
select IPIPE_ARM_KUSER_TSC if IPIPE
config ARCH_DAVINCI_DA8XX
bool
...
...
arch/arm/mach-davinci/time.c
View file @
7b7aa8fd
...
...
@@ -88,6 +88,9 @@ struct timer_s {
unsigned
long
opts
;
unsigned
long
flags
;
void
__iomem
*
base
;
#ifdef CONFIG_IPIPE
void
*
pbase
;
#endif
/*CONFIG_IPIPE */
unsigned
long
tim_off
;
unsigned
long
prd_off
;
unsigned
long
enamode_shift
;
...
...
@@ -238,6 +241,9 @@ static void __init timer_init(void)
t
->
base
=
base
[
timer
];
if
(
!
t
->
base
)
continue
;
#ifdef CONFIG_IPIPE
t
->
pbase
=
(
void
*
)
dtip
[
timer
].
base
;
#endif
/* CONFIG_IPIPE */
if
(
IS_TIMER_BOT
(
t
->
id
))
{
t
->
enamode_shift
=
6
;
...
...
@@ -334,6 +340,15 @@ static int davinci_set_periodic(struct clock_event_device *evt)
#ifdef CONFIG_IPIPE
static
struct
ipipe_timer
davinci_itimer
;
static
struct
__ipipe_tscinfo
tsc_info
=
{
.
type
=
IPIPE_TSC_TYPE_FREERUNNING
,
.
u
=
{
{
.
mask
=
0xffffffff
,
},
},
};
#endif
/* CONFIG_IPIPE */
static
struct
clock_event_device
clockevent_davinci
=
{
...
...
@@ -408,6 +423,13 @@ void __init davinci_timer_init(struct clk *timer_clk)
clockevent_davinci
.
cpumask
=
cpumask_of
(
0
);
#ifdef CONFIG_IPIPE
tsc_info
.
freq
=
davinci_clock_tick_rate
;
tsc_info
.
counter_vaddr
=
(
void
*
)(
timers
[
TID_CLOCKSOURCE
].
base
+
timers
[
TID_CLOCKSOURCE
].
tim_off
);
tsc_info
.
u
.
counter_paddr
=
timers
[
TID_CLOCKSOURCE
].
pbase
+
timers
[
TID_CLOCKSOURCE
].
tim_off
;
__ipipe_tsc_register
(
&
tsc_info
);
davinci_itimer
.
irq
=
timers
[
TID_CLOCKEVENT
].
irq
;
davinci_itimer
.
min_delay_ticks
=
3
;
#endif
/* CONFIG_IPIPE */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment