Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3ca9fab4
Commit
3ca9fab4
authored
Jun 29, 2006
by
David S. Miller
Committed by
David S. Miller
Jun 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Add of_io{remap,unmap}().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
95714e12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
arch/sparc/kernel/ioport.c
arch/sparc/kernel/ioport.c
+17
-0
arch/sparc64/kernel/of_device.c
arch/sparc64/kernel/of_device.c
+17
-0
include/asm-sparc/of_device.h
include/asm-sparc/of_device.h
+3
-0
include/asm-sparc64/of_device.h
include/asm-sparc64/of_device.h
+3
-0
No files found.
arch/sparc/kernel/ioport.c
View file @
3ca9fab4
...
...
@@ -26,6 +26,7 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
...
...
@@ -40,6 +41,7 @@
#include <asm/vaddrs.h>
#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/sbus.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
...
...
@@ -143,6 +145,21 @@ void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset,
phyres
->
start
+
offset
,
size
,
name
);
}
void
__iomem
*
of_ioremap
(
struct
resource
*
res
,
unsigned
long
offset
,
unsigned
long
size
,
char
*
name
)
{
return
_sparc_alloc_io
(
res
->
flags
&
0xF
,
res
->
start
+
offset
,
size
,
name
);
}
EXPORT_SYMBOL
(
of_ioremap
);
void
of_iounmap
(
void
__iomem
*
base
,
unsigned
long
size
)
{
iounmap
(
base
);
}
EXPORT_SYMBOL
(
of_iounmap
);
/*
*/
void
sbus_iounmap
(
volatile
void
__iomem
*
addr
,
unsigned
long
size
)
...
...
arch/sparc64/kernel/of_device.c
View file @
3ca9fab4
...
...
@@ -129,6 +129,23 @@ static int of_device_resume(struct device * dev)
return
error
;
}
void
__iomem
*
of_ioremap
(
struct
resource
*
res
,
unsigned
long
offset
,
unsigned
long
size
,
char
*
name
)
{
unsigned
long
ret
=
res
->
start
+
offset
;
if
(
!
request_region
(
ret
,
size
,
name
))
ret
=
0
;
return
(
void
__iomem
*
)
ret
;
}
EXPORT_SYMBOL
(
of_ioremap
);
void
of_iounmap
(
void
__iomem
*
base
,
unsigned
long
size
)
{
release_region
((
unsigned
long
)
base
,
size
);
}
EXPORT_SYMBOL
(
of_iounmap
);
#ifdef CONFIG_PCI
struct
bus_type
isa_bus_type
=
{
.
name
=
"isa"
,
...
...
include/asm-sparc/of_device.h
View file @
3ca9fab4
...
...
@@ -31,6 +31,9 @@ struct of_device
};
#define to_of_device(d) container_of(d, struct of_device, dev)
extern
void
__iomem
*
of_ioremap
(
struct
resource
*
res
,
unsigned
long
offset
,
unsigned
long
size
,
char
*
name
);
extern
void
of_iounmap
(
void
__iomem
*
base
,
unsigned
long
size
);
extern
const
struct
of_device_id
*
of_match_device
(
const
struct
of_device_id
*
matches
,
const
struct
of_device
*
dev
);
...
...
include/asm-sparc64/of_device.h
View file @
3ca9fab4
...
...
@@ -32,6 +32,9 @@ struct of_device
};
#define to_of_device(d) container_of(d, struct of_device, dev)
extern
void
__iomem
*
of_ioremap
(
struct
resource
*
res
,
unsigned
long
offset
,
unsigned
long
size
,
char
*
name
);
extern
void
of_iounmap
(
void
__iomem
*
base
,
unsigned
long
size
);
extern
const
struct
of_device_id
*
of_match_device
(
const
struct
of_device_id
*
matches
,
const
struct
of_device
*
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