Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
1a7277bf
Commit
1a7277bf
authored
Dec 09, 2009
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'davinci-upstream-accepted'
parents
9bfddbca
1c28c745
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
24 deletions
+30
-24
drivers/rtc/Kconfig
drivers/rtc/Kconfig
+4
-3
drivers/rtc/rtc-omap.c
drivers/rtc/rtc-omap.c
+26
-21
No files found.
drivers/rtc/Kconfig
View file @
1a7277bf
...
...
@@ -588,10 +588,11 @@ config RTC_DRV_DAVINCI
config RTC_DRV_OMAP
tristate "TI OMAP1"
depends on ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730
depends on ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730
|| ARCH_DAVINCI_DA8XX
help
Say "yes" here to support the real time clock on TI OMAP1 chips.
This driver can also be built as a module called rtc-omap.
Say "yes" here to support the real time clock on TI OMAP1 and
DA8xx/OMAP-L13x chips. This driver can also be built as a
module called rtc-omap.
config RTC_DRV_S3C
tristate "Samsung S3C series SoC RTC"
...
...
drivers/rtc/rtc-omap.c
View file @
1a7277bf
...
...
@@ -87,9 +87,10 @@
#define OMAP_RTC_INTERRUPTS_IT_ALARM (1<<3)
#define OMAP_RTC_INTERRUPTS_IT_TIMER (1<<2)
static
void
__iomem
*
rtc_base
;
#define rtc_read(addr)
omap_readb(OMAP_RTC_BASE
+ (addr))
#define rtc_write(val, addr)
omap_writeb(val, OMAP_RTC_BASE
+ (addr))
#define rtc_read(addr)
__raw_readb(rtc_base
+ (addr))
#define rtc_write(val, addr)
__raw_writeb(val, rtc_base
+ (addr))
/* we rely on the rtc framework to handle locking (rtc->ops_lock),
...
...
@@ -330,32 +331,31 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
return
-
ENOENT
;
}
/* NOTE: using static mapping for RTC registers */
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
if
(
res
&&
res
->
start
!=
OMAP_RTC_BASE
)
{
pr_debug
(
"%s: RTC registers at %08x, expected %08x
\n
"
,
pdev
->
name
,
(
unsigned
)
res
->
start
,
OMAP_RTC_BASE
);
if
(
!
res
)
{
pr_debug
(
"%s: RTC resource data missing
\n
"
,
pdev
->
name
);
return
-
ENOENT
;
}
if
(
res
)
mem
=
request_mem_region
(
res
->
start
,
res
->
end
-
res
->
start
+
1
,
pdev
->
name
);
else
mem
=
NULL
;
mem
=
request_mem_region
(
res
->
start
,
resource_size
(
res
),
pdev
->
name
);
if
(
!
mem
)
{
pr_debug
(
"%s: RTC registers at %08x are not free
\n
"
,
pdev
->
name
,
OMAP_RTC_BASE
);
pdev
->
name
,
res
->
start
);
return
-
EBUSY
;
}
rtc_base
=
ioremap
(
res
->
start
,
resource_size
(
res
));
if
(
!
rtc_base
)
{
pr_debug
(
"%s: RTC registers can't be mapped
\n
"
,
pdev
->
name
);
goto
fail
;
}
rtc
=
rtc_device_register
(
pdev
->
name
,
&
pdev
->
dev
,
&
omap_rtc_ops
,
THIS_MODULE
);
if
(
IS_ERR
(
rtc
))
{
pr_debug
(
"%s: can't register RTC device, err %ld
\n
"
,
pdev
->
name
,
PTR_ERR
(
rtc
));
goto
fail
;
goto
fail
0
;
}
platform_set_drvdata
(
pdev
,
rtc
);
dev_set_drvdata
(
&
rtc
->
dev
,
mem
);
...
...
@@ -380,13 +380,14 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
dev_name
(
&
rtc
->
dev
),
rtc
))
{
pr_debug
(
"%s: RTC timer interrupt IRQ%d already claimed
\n
"
,
pdev
->
name
,
omap_rtc_timer
);
goto
fail
0
;
goto
fail
1
;
}
if
(
request_irq
(
omap_rtc_alarm
,
rtc_irq
,
IRQF_DISABLED
,
dev_name
(
&
rtc
->
dev
),
rtc
))
{
if
((
omap_rtc_timer
!=
omap_rtc_alarm
)
&&
(
request_irq
(
omap_rtc_alarm
,
rtc_irq
,
IRQF_DISABLED
,
dev_name
(
&
rtc
->
dev
),
rtc
)))
{
pr_debug
(
"%s: RTC alarm interrupt IRQ%d already claimed
\n
"
,
pdev
->
name
,
omap_rtc_alarm
);
goto
fail
1
;
goto
fail
2
;
}
/* On boards with split power, RTC_ON_NOFF won't reset the RTC */
...
...
@@ -414,10 +415,12 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
return
0
;
fail
1
:
fail
2
:
free_irq
(
omap_rtc_timer
,
NULL
);
fail
0
:
fail
1
:
rtc_device_unregister
(
rtc
);
fail0:
iounmap
(
rtc_base
);
fail:
release_resource
(
mem
);
return
-
EIO
;
...
...
@@ -433,6 +436,8 @@ static int __exit omap_rtc_remove(struct platform_device *pdev)
rtc_write
(
0
,
OMAP_RTC_INTERRUPTS_REG
);
free_irq
(
omap_rtc_timer
,
rtc
);
if
(
omap_rtc_timer
!=
omap_rtc_alarm
)
free_irq
(
omap_rtc_alarm
,
rtc
);
release_resource
(
dev_get_drvdata
(
&
rtc
->
dev
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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