Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
cd309029
Commit
cd309029
authored
16 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://git.denx.de/u-boot-pxa
parents
f949bd8d
a922fdb8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpu/pxa/interrupts.c
+24
-22
24 additions, 22 deletions
cpu/pxa/interrupts.c
with
24 additions
and
22 deletions
cpu/pxa/interrupts.c
+
24
−
22
View file @
cd309029
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include
<common.h>
#include
<common.h>
#include
<asm/arch/pxa-regs.h>
#include
<asm/arch/pxa-regs.h>
#include
<div64.h>
#ifdef CONFIG_USE_IRQ
#ifdef CONFIG_USE_IRQ
#error: interrupts not implemented yet
#error: interrupts not implemented yet
...
@@ -41,6 +42,20 @@
...
@@ -41,6 +42,20 @@
#error "Timer frequency unknown - please config PXA CPU type"
#error "Timer frequency unknown - please config PXA CPU type"
#endif
#endif
static
inline
unsigned
long
long
tick_to_time
(
unsigned
long
long
tick
)
{
tick
*=
CONFIG_SYS_HZ
;
do_div
(
tick
,
TIMER_FREQ_HZ
);
return
tick
;
}
static
inline
unsigned
long
long
us_to_tick
(
unsigned
long
long
us
)
{
us
=
us
*
TIMER_FREQ_HZ
+
999999
;
do_div
(
us
,
1000000
);
return
us
;
}
int
interrupt_init
(
void
)
int
interrupt_init
(
void
)
{
{
/* nothing happens here - we don't setup any IRQs */
/* nothing happens here - we don't setup any IRQs */
...
@@ -75,33 +90,20 @@ void reset_timer_masked (void)
...
@@ -75,33 +90,20 @@ void reset_timer_masked (void)
ulong
get_timer_masked
(
void
)
ulong
get_timer_masked
(
void
)
{
{
unsigned
long
long
ticks
=
get_ticks
();
return
tick_to_time
(
get_ticks
());
return
(((
ticks
/
TIMER_FREQ_HZ
)
*
1000
)
+
((
ticks
%
TIMER_FREQ_HZ
)
*
1000
)
/
TIMER_FREQ_HZ
);
}
}
void
udelay_masked
(
unsigned
long
usec
)
void
udelay_masked
(
unsigned
long
usec
)
{
{
unsigned
long
long
tmp
;
ulong
tmo
;
ulong
tmo
;
ulong
endtime
;
signed
long
diff
;
tmo
=
us_to_tick
(
usec
);
tmp
=
get_ticks
()
+
tmo
;
/* get current timestamp */
if
(
usec
>=
1000
)
{
tmo
=
usec
/
1000
;
while
(
get_ticks
()
<
tmp
)
/* loop till event */
tmo
*=
TIMER_FREQ_HZ
;
/*NOP*/
;
tmo
/=
1000
;
}
else
{
tmo
=
usec
*
TIMER_FREQ_HZ
;
tmo
/=
(
1000
*
1000
);
}
endtime
=
get_ticks
()
+
tmo
;
do
{
ulong
now
=
get_ticks
();
diff
=
endtime
-
now
;
}
while
(
diff
>=
0
);
}
}
/*
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment