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
Kirill Smelkov
linux
Commits
0142b7ae
Commit
0142b7ae
authored
Sep 12, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export new PCI iomem access interfaces to modules too.
parent
e4dad071
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
lib/iomap.c
lib/iomap.c
+11
-0
No files found.
lib/iomap.c
View file @
0142b7ae
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* Implement the default iomap interfaces
* Implement the default iomap interfaces
*/
*/
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <asm/io.h>
#include <asm/io.h>
/*
/*
...
@@ -55,6 +56,9 @@ unsigned int fastcall ioread32(void __iomem *addr)
...
@@ -55,6 +56,9 @@ unsigned int fastcall ioread32(void __iomem *addr)
{
{
IO_COND
(
addr
,
return
inl
(
port
),
return
readl
(
addr
));
IO_COND
(
addr
,
return
inl
(
port
),
return
readl
(
addr
));
}
}
EXPORT_SYMBOL
(
ioread8
);
EXPORT_SYMBOL
(
ioread16
);
EXPORT_SYMBOL
(
ioread32
);
void
fastcall
iowrite8
(
u8
val
,
void
__iomem
*
addr
)
void
fastcall
iowrite8
(
u8
val
,
void
__iomem
*
addr
)
{
{
...
@@ -68,6 +72,9 @@ void fastcall iowrite32(u32 val, void __iomem *addr)
...
@@ -68,6 +72,9 @@ void fastcall iowrite32(u32 val, void __iomem *addr)
{
{
IO_COND
(
addr
,
outl
(
val
,
port
),
writel
(
val
,
addr
));
IO_COND
(
addr
,
outl
(
val
,
port
),
writel
(
val
,
addr
));
}
}
EXPORT_SYMBOL
(
iowrite8
);
EXPORT_SYMBOL
(
iowrite16
);
EXPORT_SYMBOL
(
iowrite32
);
/* Create a virtual mapping cookie for an IO port range */
/* Create a virtual mapping cookie for an IO port range */
void
__iomem
*
ioport_map
(
unsigned
int
port
,
unsigned
int
nr
)
void
__iomem
*
ioport_map
(
unsigned
int
port
,
unsigned
int
nr
)
...
@@ -81,6 +88,8 @@ void ioport_unmap(void __iomem *addr)
...
@@ -81,6 +88,8 @@ void ioport_unmap(void __iomem *addr)
{
{
/* Nothing to do */
/* Nothing to do */
}
}
EXPORT_SYMBOL
(
ioport_map
);
EXPORT_SYMBOL
(
ioport_unmap
);
/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
void
__iomem
*
pci_iomap
(
struct
pci_dev
*
dev
,
int
bar
,
unsigned
long
maxlen
)
void
__iomem
*
pci_iomap
(
struct
pci_dev
*
dev
,
int
bar
,
unsigned
long
maxlen
)
...
@@ -108,3 +117,5 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
...
@@ -108,3 +117,5 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
{
{
IO_COND
(
addr
,
/* nothing */
,
iounmap
(
addr
));
IO_COND
(
addr
,
/* nothing */
,
iounmap
(
addr
));
}
}
EXPORT_SYMBOL
(
pci_iomap
);
EXPORT_SYMBOL
(
pci_iounmap
);
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