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
54303f1e
Commit
54303f1e
authored
Jan 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: sbus.c ifdeffing cleanup.
parent
3e9dad0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
drivers/sbus/sbus.c
drivers/sbus/sbus.c
+17
-12
No files found.
drivers/sbus/sbus.c
View file @
54303f1e
...
@@ -20,7 +20,9 @@
...
@@ -20,7 +20,9 @@
struct
sbus_bus
*
sbus_root
=
NULL
;
struct
sbus_bus
*
sbus_root
=
NULL
;
static
struct
linux_prom_irqs
irqs
[
PROMINTR_MAX
]
__initdata
=
{
{
0
}
};
static
struct
linux_prom_irqs
irqs
[
PROMINTR_MAX
]
__initdata
=
{
{
0
}
};
#ifdef CONFIG_SPARC32
static
int
interrupts
[
PROMINTR_MAX
]
__initdata
=
{
0
};
static
int
interrupts
[
PROMINTR_MAX
]
__initdata
=
{
0
};
#endif
#ifdef CONFIG_PCI
#ifdef CONFIG_PCI
extern
int
pcic_present
(
void
);
extern
int
pcic_present
(
void
);
...
@@ -109,7 +111,7 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
...
@@ -109,7 +111,7 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
* XXX Pull this crud out into an arch specific area
* XXX Pull this crud out into an arch specific area
* XXX at some point. -DaveM
* XXX at some point. -DaveM
*/
*/
#ifdef
__sparc_v9__
#ifdef
CONFIG_SPARC64
len
=
prom_getproperty
(
prom_node
,
"interrupts"
,
len
=
prom_getproperty
(
prom_node
,
"interrupts"
,
(
char
*
)
irqs
,
sizeof
(
irqs
));
(
char
*
)
irqs
,
sizeof
(
irqs
));
if
(
len
==
-
1
||
len
==
0
)
{
if
(
len
==
-
1
||
len
==
0
)
{
...
@@ -124,7 +126,9 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
...
@@ -124,7 +126,9 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
sdev
->
irqs
[
0
]
=
sbus_build_irq
(
sdev
->
bus
,
pri
);
sdev
->
irqs
[
0
]
=
sbus_build_irq
(
sdev
->
bus
,
pri
);
}
}
#else
#endif
/* CONFIG_SPARC64 */
#ifdef CONFIG_SPARC32
len
=
prom_getproperty
(
prom_node
,
"intr"
,
len
=
prom_getproperty
(
prom_node
,
"intr"
,
(
char
*
)
irqs
,
sizeof
(
irqs
));
(
char
*
)
irqs
,
sizeof
(
irqs
));
if
(
len
!=
-
1
)
{
if
(
len
!=
-
1
)
{
...
@@ -158,7 +162,7 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
...
@@ -158,7 +162,7 @@ static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev)
}
}
}
}
}
}
#endif
/*
!__sparc_v9__
*/
#endif
/*
CONFIG_SPARC32
*/
}
}
/* This routine gets called from whoever needs the sbus first, to scan
/* This routine gets called from whoever needs the sbus first, to scan
...
@@ -313,7 +317,7 @@ static int __init sbus_init(void)
...
@@ -313,7 +317,7 @@ static int __init sbus_init(void)
struct
sbus_dev
*
this_dev
;
struct
sbus_dev
*
this_dev
;
int
num_sbus
=
0
;
/* How many did we find? */
int
num_sbus
=
0
;
/* How many did we find? */
#if
ndef __sparc_v9__
#if
def CONFIG_SPARC32
register_proc_sparc_ioport
();
register_proc_sparc_ioport
();
#endif
#endif
...
@@ -334,7 +338,7 @@ static int __init sbus_init(void)
...
@@ -334,7 +338,7 @@ static int __init sbus_init(void)
prom_printf
(
"Neither SBUS nor PCI found.
\n
"
);
prom_printf
(
"Neither SBUS nor PCI found.
\n
"
);
prom_halt
();
prom_halt
();
}
else
{
}
else
{
#ifdef
__sparc_v9__
#ifdef
CONFIG_SPARC64
firetruck_init
();
firetruck_init
();
#endif
#endif
}
}
...
@@ -380,18 +384,19 @@ static int __init sbus_init(void)
...
@@ -380,18 +384,19 @@ static int __init sbus_init(void)
/* Loop until we find no more SBUS's */
/* Loop until we find no more SBUS's */
while
(
this_sbus
)
{
while
(
this_sbus
)
{
#ifdef
__sparc_v9__
#ifdef
CONFIG_SPARC64
/* IOMMU hides inside SBUS/SYSIO prom node on Ultra. */
/* IOMMU hides inside SBUS/SYSIO prom node on Ultra. */
if
(
sparc_cpu_model
==
sun4u
)
{
if
(
sparc_cpu_model
==
sun4u
)
{
extern
void
sbus_iommu_init
(
int
prom_node
,
struct
sbus_bus
*
sbus
);
extern
void
sbus_iommu_init
(
int
prom_node
,
struct
sbus_bus
*
sbus
);
sbus_iommu_init
(
this_sbus
,
sbus
);
sbus_iommu_init
(
this_sbus
,
sbus
);
}
}
#endif
#endif
/* CONFIG_SPARC64 */
#ifndef __sparc_v9__
#ifdef CONFIG_SPARC32
if
(
sparc_cpu_model
==
sun4d
)
if
(
sparc_cpu_model
==
sun4d
)
iounit_init
(
this_sbus
,
iommund
,
sbus
);
iounit_init
(
this_sbus
,
iommund
,
sbus
);
#endif
#endif
/* CONFIG_SPARC32 */
printk
(
"sbus%d: "
,
num_sbus
);
printk
(
"sbus%d: "
,
num_sbus
);
sbus_clock
=
prom_getint
(
this_sbus
,
"clock-frequency"
);
sbus_clock
=
prom_getint
(
this_sbus
,
"clock-frequency"
);
if
(
sbus_clock
==
-
1
)
if
(
sbus_clock
==
-
1
)
...
@@ -403,7 +408,7 @@ static int __init sbus_init(void)
...
@@ -403,7 +408,7 @@ static int __init sbus_init(void)
prom_getstring
(
this_sbus
,
"name"
,
prom_getstring
(
this_sbus
,
"name"
,
sbus
->
prom_name
,
sizeof
(
sbus
->
prom_name
));
sbus
->
prom_name
,
sizeof
(
sbus
->
prom_name
));
sbus
->
clock_freq
=
sbus_clock
;
sbus
->
clock_freq
=
sbus_clock
;
#if
ndef __sparc_v9__
#if
def CONFIG_SPARC32
if
(
sparc_cpu_model
==
sun4d
)
{
if
(
sparc_cpu_model
==
sun4d
)
{
sbus
->
devid
=
prom_getint
(
iommund
,
"device-id"
);
sbus
->
devid
=
prom_getint
(
iommund
,
"device-id"
);
sbus
->
board
=
prom_getint
(
iommund
,
"board#"
);
sbus
->
board
=
prom_getint
(
iommund
,
"board#"
);
...
@@ -516,7 +521,7 @@ static int __init sbus_init(void)
...
@@ -516,7 +521,7 @@ static int __init sbus_init(void)
sun4d_init_sbi_irq
();
sun4d_init_sbi_irq
();
}
}
#ifdef
__sparc_v9__
#ifdef
CONFIG_SPARC64
if
(
sparc_cpu_model
==
sun4u
)
{
if
(
sparc_cpu_model
==
sun4u
)
{
firetruck_init
();
firetruck_init
();
}
}
...
@@ -525,7 +530,7 @@ static int __init sbus_init(void)
...
@@ -525,7 +530,7 @@ static int __init sbus_init(void)
if
(
sparc_cpu_model
==
sun4u
)
if
(
sparc_cpu_model
==
sun4u
)
auxio_probe
();
auxio_probe
();
#endif
#endif
#ifdef
__sparc_v9__
#ifdef
CONFIG_SPARC64
if
(
sparc_cpu_model
==
sun4u
)
{
if
(
sparc_cpu_model
==
sun4u
)
{
extern
void
clock_probe
(
void
);
extern
void
clock_probe
(
void
);
...
...
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