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
3c879898
Commit
3c879898
authored
16 years ago
by
Mike Frysinger
Browse files
Options
Downloads
Patches
Plain Diff
Blackfin: only initialize the RTC when actually used
Signed-off-by:
Mike Frysinger
<
vapier@gentoo.org
>
parent
621e579b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/rtc/bfin_rtc.c
+10
-9
10 additions, 9 deletions
drivers/rtc/bfin_rtc.c
lib_blackfin/board.c
+0
-4
0 additions, 4 deletions
lib_blackfin/board.c
with
10 additions
and
13 deletions
drivers/rtc/bfin_rtc.c
+
10
−
9
View file @
3c879898
...
...
@@ -26,10 +26,17 @@
#define NUM_SECS_IN_HR HRS_TO_SECS(1)
#define NUM_SECS_IN_DAY DAYS_TO_SECS(1)
/* Enable the RTC prescaler enable register */
static
void
rtc_init
(
void
)
{
if
(
!
(
bfin_read_RTC_PREN
()
&
0x1
))
bfin_write_RTC_PREN
(
0x1
);
}
/* Our on-chip RTC has no notion of "reset" */
void
rtc_reset
(
void
)
{
r
eturn
;
r
tc_init
()
;
}
/* Wait for pending writes to complete */
...
...
@@ -42,14 +49,6 @@ static void wait_for_complete(void)
bfin_write_RTC_ISTAT
(
WRITE_COMPLETE
);
}
/* Enable the RTC prescaler enable register */
int
rtc_init
(
void
)
{
pr_stamp
();
bfin_write_RTC_PREN
(
0x1
);
return
0
;
}
/* Set the time. Get the time_in_secs which is the number of seconds since Jan 1970 and set the RTC registers
* based on this value.
*/
...
...
@@ -64,6 +63,7 @@ int rtc_set(struct rtc_time *tmp)
return
-
1
;
}
rtc_init
();
wait_for_complete
();
/* Calculate number of seconds this incoming time represents */
...
...
@@ -100,6 +100,7 @@ int rtc_get(struct rtc_time *tmp)
return
-
1
;
}
rtc_init
();
wait_for_complete
();
/* Read the RTC_STAT register */
...
...
This diff is collapsed.
Click to expand it.
lib_blackfin/board.c
+
0
−
4
View file @
3c879898
...
...
@@ -250,7 +250,6 @@ void init_cplbtables(void)
extern
int
exception_init
(
void
);
extern
int
irq_init
(
void
);
extern
int
rtc_init
(
void
);
extern
int
timer_init
(
void
);
void
board_init_f
(
ulong
bootflag
)
...
...
@@ -313,9 +312,6 @@ void board_init_f(ulong bootflag)
display_banner
();
checkboard
();
#if defined(CONFIG_RTC_BFIN) && defined(CONFIG_CMD_DATE)
rtc_init
();
#endif
timer_init
();
printf
(
"Clock: VCO: %lu MHz, Core: %lu MHz, System: %lu MHz
\n
"
,
...
...
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