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
36a59bd8
Commit
36a59bd8
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
[SPARC64] auxio: Convert to pure of_device driver.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
50312ce9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
49 deletions
+24
-49
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/auxio.c
+24
-49
No files found.
arch/sparc64/kernel/auxio.c
View file @
36a59bd8
...
...
@@ -111,12 +111,6 @@ void auxio_set_lte(int on)
}
}
static
void
__devinit
auxio_report_dev
(
struct
device_node
*
dp
)
{
printk
(
KERN_INFO
"AUXIO: Found device at %s
\n
"
,
dp
->
full_name
);
}
static
struct
of_device_id
auxio_match
[]
=
{
{
.
name
=
"auxio"
,
...
...
@@ -126,67 +120,48 @@ static struct of_device_id auxio_match[] = {
MODULE_DEVICE_TABLE
(
of
,
auxio_match
);
#ifdef CONFIG_SBUS
static
int
__devinit
auxio_sbus_probe
(
struct
of_device
*
dev
,
const
struct
of_device_id
*
match
)
static
int
__devinit
auxio_probe
(
struct
of_device
*
dev
,
const
struct
of_device_id
*
match
)
{
struct
sbus_dev
*
sdev
=
to_sbus_device
(
&
dev
->
dev
);
auxio_devtype
=
AUXIO_TYPE_SBUS
;
auxio_register
=
sbus_ioremap
(
&
sdev
->
resource
[
0
],
0
,
sdev
->
reg_addrs
[
0
].
reg_size
,
"auxiliaryIO"
);
if
(
!
auxio_register
)
struct
device_node
*
dp
=
dev
->
node
;
unsigned
long
size
;
if
(
!
strcmp
(
dp
->
parent
->
name
,
"ebus"
))
{
auxio_devtype
=
AUXIO_TYPE_EBUS
;
size
=
sizeof
(
u32
);
}
else
if
(
!
strcmp
(
dp
->
parent
->
name
,
"sbus"
))
{
auxio_devtype
=
AUXIO_TYPE_SBUS
;
size
=
1
;
}
else
{
printk
(
"auxio: Unknown parent bus type [%s]
\n
"
,
dp
->
parent
->
name
);
return
-
ENODEV
;
auxio_report_dev
(
dev
->
node
);
return
0
;
}
static
struct
of_platform_driver
auxio_sbus_driver
=
{
.
name
=
"auxio"
,
.
match_table
=
auxio_match
,
.
probe
=
auxio_sbus_probe
,
};
#endif
#ifdef CONFIG_PCI
static
int
__devinit
auxio_ebus_probe
(
struct
of_device
*
dev
,
const
struct
of_device_id
*
match
)
{
struct
linux_ebus_device
*
edev
=
to_ebus_device
(
&
dev
->
dev
);
auxio_devtype
=
AUXIO_TYPE_EBUS
;
auxio_register
=
ioremap
(
edev
->
resource
[
0
].
start
,
sizeof
(
u32
));
}
auxio_register
=
of_ioremap
(
&
dev
->
resource
[
0
],
0
,
size
,
"auxio"
);
if
(
!
auxio_register
)
return
-
ENODEV
;
auxio_report_dev
(
dev
->
node
);
printk
(
KERN_INFO
"AUXIO: Found device at %s
\n
"
,
dp
->
full_name
);
auxio_set_led
(
AUXIO_LED_ON
);
if
(
auxio_devtype
==
AUXIO_TYPE_EBUS
)
auxio_set_led
(
AUXIO_LED_ON
);
return
0
;
}
static
struct
of_platform_driver
auxio_
ebus_
driver
=
{
static
struct
of_platform_driver
auxio_driver
=
{
.
name
=
"auxio"
,
.
match_table
=
auxio_match
,
.
probe
=
auxio_
ebus_
probe
,
.
probe
=
auxio_probe
,
};
#endif
static
int
__init
auxio_
probe
(
void
)
static
int
__init
auxio_
init
(
void
)
{
#ifdef CONFIG_SBUS
of_register_driver
(
&
auxio_sbus_driver
,
&
sbus_bus_type
);
#endif
#ifdef CONFIG_PCI
of_register_driver
(
&
auxio_ebus_driver
,
&
ebus_bus_type
);
#endif
return
0
;
return
of_register_driver
(
&
auxio_driver
,
&
of_bus_type
);
}
/* Must be after subsys_initcall() so that busses are probed. Must
* be before device_initcall() because things like the floppy driver
* need to use the AUXIO register.
*/
fs_initcall
(
auxio_
probe
);
fs_initcall
(
auxio_
init
);
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