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
38150012
Commit
38150012
authored
Sep 13, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: __iomem annotations and iomap implementation.
parent
0490a31f
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
80 deletions
+139
-80
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/auxio.c
+6
-5
arch/sparc64/kernel/pci_schizo.c
arch/sparc64/kernel/pci_schizo.c
+2
-2
arch/sparc64/kernel/power.c
arch/sparc64/kernel/power.c
+4
-4
arch/sparc64/lib/Makefile
arch/sparc64/lib/Makefile
+1
-1
arch/sparc64/lib/iomap.c
arch/sparc64/lib/iomap.c
+48
-0
include/asm-sparc64/ebus.h
include/asm-sparc64/ebus.h
+1
-1
include/asm-sparc64/io.h
include/asm-sparc64/io.h
+77
-67
No files found.
arch/sparc64/kernel/auxio.c
View file @
38150012
...
...
@@ -17,7 +17,7 @@
#include <asm/auxio.h>
/* This cannot be static, as it is referenced in entry.S */
unsigned
long
auxio_register
=
0UL
;
void
__iomem
*
auxio_register
=
0UL
;
enum
auxio_type
{
AUXIO_TYPE_NODEV
,
...
...
@@ -30,7 +30,7 @@ static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
static
void
__auxio_sbus_set
(
u8
bits_on
,
u8
bits_off
)
{
if
(
auxio_register
)
{
if
(
auxio_register
)
{
unsigned
char
regval
;
unsigned
long
flags
;
unsigned
char
newval
;
...
...
@@ -49,7 +49,7 @@ static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
static
void
__auxio_ebus_set
(
u8
bits_on
,
u8
bits_off
)
{
if
(
auxio_register
)
{
if
(
auxio_register
)
{
unsigned
char
regval
;
unsigned
long
flags
;
unsigned
char
newval
;
...
...
@@ -126,7 +126,8 @@ void __init auxio_probe(void)
if
(
sdev
)
{
auxio_devtype
=
AUXIO_TYPE_SBUS
;
auxio_register
=
sbus_ioremap
(
&
sdev
->
resource
[
0
],
0
,
sdev
->
reg_addrs
[
0
].
reg_size
,
"auxiliaryIO"
);
sdev
->
reg_addrs
[
0
].
reg_size
,
"auxiliaryIO"
);
}
#ifdef CONFIG_PCI
else
{
...
...
@@ -142,7 +143,7 @@ void __init auxio_probe(void)
ebus_done:
if
(
edev
)
{
auxio_devtype
=
AUXIO_TYPE_EBUS
;
auxio_register
=
(
unsigned
long
)
auxio_register
=
ioremap
(
edev
->
resource
[
0
].
start
,
sizeof
(
u32
));
}
}
...
...
arch/sparc64/kernel/pci_schizo.c
View file @
38150012
...
...
@@ -1171,7 +1171,7 @@ static void __init tomatillo_register_error_handlers(struct pci_controller_info
prom_halt
();
}
bucket
=
__bucket
(
irq
);
tmp
=
readl
(
bucket
->
imap
);
tmp
=
upa_
readl
(
bucket
->
imap
);
upa_writel
(
tmp
,
(
pbm
->
pbm_regs
+
schizo_imap_offset
(
SCHIZO_UE_INO
)
+
4
));
...
...
@@ -1309,7 +1309,7 @@ static void __init schizo_register_error_handlers(struct pci_controller_info *p)
prom_halt
();
}
bucket
=
__bucket
(
irq
);
tmp
=
readl
(
bucket
->
imap
);
tmp
=
upa_
readl
(
bucket
->
imap
);
upa_writel
(
tmp
,
(
pbm
->
pbm_regs
+
schizo_imap_offset
(
SCHIZO_UE_INO
)
+
4
));
pbm
=
pbm_for_ino
(
p
,
SCHIZO_CE_INO
);
...
...
arch/sparc64/kernel/power.c
View file @
38150012
...
...
@@ -27,7 +27,7 @@
int
scons_pwroff
=
1
;
#ifdef CONFIG_PCI
static
unsigned
long
power_reg
=
0UL
;
static
void
__iomem
*
power_reg
;
static
DECLARE_WAIT_QUEUE_HEAD
(
powerd_wait
);
static
int
button_pressed
;
...
...
@@ -52,7 +52,7 @@ void machine_power_off(void)
{
if
(
!
serial_console
||
scons_pwroff
)
{
#ifdef CONFIG_PCI
if
(
power_reg
!=
0UL
)
{
if
(
power_reg
)
{
/* Both register bits seem to have the
* same effect, so until I figure out
* what the difference is...
...
...
@@ -130,8 +130,8 @@ void __init power_init(void)
return
;
found:
power_reg
=
(
unsigned
long
)
ioremap
(
edev
->
resource
[
0
].
start
,
0x4
);
printk
(
"power: Control reg at %
016lx
... "
,
power_reg
);
power_reg
=
ioremap
(
edev
->
resource
[
0
].
start
,
0x4
);
printk
(
"power: Control reg at %
p
... "
,
power_reg
);
poweroff_method
=
machine_halt
;
/* able to use the standard halt */
if
(
has_button_interrupt
(
edev
))
{
if
(
kernel_thread
(
powerd
,
NULL
,
CLONE_FS
)
<
0
)
{
...
...
arch/sparc64/lib/Makefile
View file @
38150012
...
...
@@ -12,7 +12,7 @@ lib-y := PeeCeeI.o copy_page.o clear_page.o strlen.o strncmp.o \
U1memcpy.o U1copy_from_user.o U1copy_to_user.o
\
U3memcpy.o U3copy_from_user.o U3copy_to_user.o U3patch.o
\
copy_in_user.o user_fixup.o memmove.o
\
mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o
mcount.o ipcsum.o rwsem.o xor.o find_bit.o delay.o
iomap.o
lib-$(CONFIG_DEBUG_SPINLOCK)
+=
debuglocks.o
lib-$(CONFIG_HAVE_DEC_LOCK)
+=
dec_and_lock.o
arch/sparc64/lib/iomap.c
0 → 100644
View file @
38150012
/*
* Implement the sparc64 iomap interfaces
*/
#include <linux/pci.h>
#include <linux/module.h>
#include <asm/io.h>
/* Create a virtual mapping cookie for an IO port range */
void
__iomem
*
ioport_map
(
unsigned
long
port
,
unsigned
int
nr
)
{
return
(
void
__iomem
*
)
(
unsigned
long
)
port
;
}
void
ioport_unmap
(
void
__iomem
*
addr
)
{
/* Nothing to do */
}
EXPORT_SYMBOL
(
ioport_map
);
EXPORT_SYMBOL
(
ioport_unmap
);
/* 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
)
{
unsigned
long
start
=
pci_resource_start
(
dev
,
bar
);
unsigned
long
len
=
pci_resource_len
(
dev
,
bar
);
unsigned
long
flags
=
pci_resource_flags
(
dev
,
bar
);
if
(
!
len
||
!
start
)
return
NULL
;
if
(
maxlen
&&
len
>
maxlen
)
len
=
maxlen
;
if
(
flags
&
IORESOURCE_IO
)
return
ioport_map
(
start
,
len
);
if
(
flags
&
IORESOURCE_MEM
)
{
if
(
flags
&
IORESOURCE_CACHEABLE
)
return
ioremap
(
start
,
len
);
return
ioremap_nocache
(
start
,
len
);
}
/* What? */
return
NULL
;
}
void
pci_iounmap
(
struct
pci_dev
*
dev
,
void
__iomem
*
addr
)
{
/* nothing to do */
}
EXPORT_SYMBOL
(
pci_iomap
);
EXPORT_SYMBOL
(
pci_iounmap
);
include/asm-sparc64/ebus.h
View file @
38150012
...
...
@@ -53,7 +53,7 @@ struct linux_ebus {
struct
ebus_dma_info
{
spinlock_t
lock
;
unsigned
long
regs
;
void
__iomem
*
regs
;
unsigned
int
flags
;
#define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001
...
...
include/asm-sparc64/io.h
View file @
38150012
This diff is collapsed.
Click to expand it.
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