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
451fcec7
Commit
451fcec7
authored
Jan 08, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
732e9603
5d0d1d27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
78 deletions
+68
-78
drivers/serial/sunsab.c
drivers/serial/sunsab.c
+12
-0
drivers/serial/sunzilog.c
drivers/serial/sunzilog.c
+56
-78
No files found.
drivers/serial/sunsab.c
View file @
451fcec7
...
...
@@ -583,10 +583,22 @@ static void sunsab_shutdown(struct uart_port *port)
tmp
&=
~
SAB82532_MODE_RAC
;
writeb
(
tmp
,
&
up
->
regs
->
rw
.
mode
);
/*
* XXX FIXME
*
* If the chip is powered down here the system hangs/crashes during
* reboot or shutdown. This needs to be investigated further,
* similar behaviour occurs in 2.4 when the driver is configured
* as a module only. One hint may be that data is sometimes
* transmitted at 9600 baud during shutdown (regardless of the
* speed the chip was configured for when the port was open).
*/
#if 0
/* Power Down */
tmp = readb(&up->regs->rw.ccr0);
tmp &= ~SAB82532_CCR0_PU;
writeb(tmp, &up->regs->rw.ccr0);
#endif
spin_unlock_irqrestore
(
&
up
->
port
.
lock
,
flags
);
}
...
...
drivers/serial/sunzilog.c
View file @
451fcec7
...
...
@@ -1036,91 +1036,69 @@ static void __init sunzilog_alloc_tables(void)
/* We used to attempt to use the address property of the Zilog device node
* but that totally is not necessary on sparc64.
*/
static
struct
zilog_layout
*
__init
get_zs_sun4u
(
int
chip
,
int
node
)
static
struct
zilog_layout
*
__init
get_zs_sun4u
(
int
chip
,
int
zs
node
)
{
unsigned
long
mapped_addr
=
0xdeadbeefUL
;
unsigned
long
mapped_addr
;
unsigned
int
sun4u_ino
;
int
zsnode
,
seen
;
zsnode
=
node
;
seen
=
0
;
while
(
zsnode
)
{
int
slave
;
zsnode
=
prom_searchsiblings
(
zsnode
,
"zs"
);
if
(
zsnode
==
0
||
zsnode
==
-
1
)
break
;
slave
=
prom_getintdefault
(
zsnode
,
"slave"
,
-
1
);
if
((
slave
==
chip
)
||
(
seen
==
chip
))
{
struct
sbus_bus
*
sbus
=
NULL
;
struct
sbus_dev
*
sdev
=
NULL
;
int
err
;
if
(
central_bus
==
NULL
)
{
for_each_sbus
(
sbus
)
{
for_each_sbusdev
(
sdev
,
sbus
)
{
if
(
sdev
->
prom_node
==
zsnode
)
goto
found
;
}
}
}
found:
if
(
sdev
==
NULL
&&
central_bus
==
NULL
)
{
prom_printf
(
"SunZilog: sdev&¢ral == NULL for "
"Zilog %d in get_zs_sun4u.
\n
"
,
chip
);
prom_halt
();
struct
sbus_bus
*
sbus
=
NULL
;
struct
sbus_dev
*
sdev
=
NULL
;
int
err
;
if
(
central_bus
==
NULL
)
{
for_each_sbus
(
sbus
)
{
for_each_sbusdev
(
sdev
,
sbus
)
{
if
(
sdev
->
prom_node
==
zsnode
)
goto
found
;
}
if
(
central_bus
==
NULL
)
{
mapped_addr
=
sbus_ioremap
(
&
sdev
->
resource
[
0
],
0
,
PAGE_SIZE
,
"Zilog Registers"
);
}
else
{
struct
linux_prom_registers
zsregs
[
1
];
err
=
prom_getproperty
(
zsnode
,
"reg"
,
(
char
*
)
&
zsregs
[
0
],
sizeof
(
zsregs
));
if
(
err
==
-
1
)
{
prom_printf
(
"SunZilog: Cannot map "
"Zilog %d regs on "
"central bus.
\n
"
,
chip
);
prom_halt
();
}
apply_fhc_ranges
(
central_bus
->
child
,
&
zsregs
[
0
],
1
);
apply_central_ranges
(
central_bus
,
&
zsregs
[
0
],
1
);
mapped_addr
=
(((
u64
)
zsregs
[
0
].
which_io
)
<<
32UL
)
|
((
u64
)
zsregs
[
0
].
phys_addr
);
}
if
(
zilog_irq
==
-
1
)
{
if
(
central_bus
)
{
unsigned
long
iclr
,
imap
;
iclr
=
central_bus
->
child
->
fhc_regs
.
uregs
+
FHC_UREGS_ICLR
;
imap
=
central_bus
->
child
->
fhc_regs
.
uregs
+
FHC_UREGS_IMAP
;
zilog_irq
=
build_irq
(
12
,
0
,
iclr
,
imap
);
}
else
{
err
=
prom_getproperty
(
zsnode
,
"interrupts"
,
(
char
*
)
&
sun4u_ino
,
sizeof
(
sun4u_ino
));
zilog_irq
=
sbus_build_irq
(
sbus_root
,
sun4u_ino
);
}
}
break
;
}
zsnode
=
prom_getsibling
(
zsnode
);
seen
++
;
}
if
(
zsnode
==
0
||
zsnode
==
-
1
)
{
prom_printf
(
"SunZilog: Cannot find Zilog %d in get_zs_sun4u.
\n
"
,
chip
);
found:
if
(
sdev
==
NULL
&&
central_bus
==
NULL
)
{
prom_printf
(
"SunZilog: sdev&¢ral == NULL for "
"Zilog %d in get_zs_sun4u.
\n
"
,
chip
);
prom_halt
();
}
if
(
central_bus
==
NULL
)
{
mapped_addr
=
sbus_ioremap
(
&
sdev
->
resource
[
0
],
0
,
PAGE_SIZE
,
"Zilog Registers"
);
}
else
{
struct
linux_prom_registers
zsregs
[
1
];
err
=
prom_getproperty
(
zsnode
,
"reg"
,
(
char
*
)
&
zsregs
[
0
],
sizeof
(
zsregs
));
if
(
err
==
-
1
)
{
prom_printf
(
"SunZilog: Cannot map "
"Zilog %d regs on "
"central bus.
\n
"
,
chip
);
prom_halt
();
}
apply_fhc_ranges
(
central_bus
->
child
,
&
zsregs
[
0
],
1
);
apply_central_ranges
(
central_bus
,
&
zsregs
[
0
],
1
);
mapped_addr
=
(((
u64
)
zsregs
[
0
].
which_io
)
<<
32UL
)
|
((
u64
)
zsregs
[
0
].
phys_addr
);
}
if
(
zilog_irq
==
-
1
)
{
if
(
central_bus
)
{
unsigned
long
iclr
,
imap
;
iclr
=
central_bus
->
child
->
fhc_regs
.
uregs
+
FHC_UREGS_ICLR
;
imap
=
central_bus
->
child
->
fhc_regs
.
uregs
+
FHC_UREGS_IMAP
;
zilog_irq
=
build_irq
(
12
,
0
,
iclr
,
imap
);
}
else
{
err
=
prom_getproperty
(
zsnode
,
"interrupts"
,
(
char
*
)
&
sun4u_ino
,
sizeof
(
sun4u_ino
));
zilog_irq
=
sbus_build_irq
(
sbus_root
,
sun4u_ino
);
}
}
return
(
struct
zilog_layout
*
)
mapped_addr
;
}
...
...
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