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
63322f88
Commit
63322f88
authored
Jul 27, 2003
by
Stephen Lord
Browse files
Options
Browse Files
Download
Plain Diff
Merge
ssh://lord@kernel.bkbits.net/xfs-2.5
into laptop.americas.sgi.com:/home/lord/src/xfs-2.5
parents
1ca335e9
7609f11e
Changes
70
Hide whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
641 additions
and
689 deletions
+641
-689
CREDITS
CREDITS
+3
-3
Documentation/nmi_watchdog.txt
Documentation/nmi_watchdog.txt
+14
-3
Documentation/zorro.txt
Documentation/zorro.txt
+0
-2
Makefile
Makefile
+1
-1
arch/m68k/Kconfig
arch/m68k/Kconfig
+0
-29
arch/m68k/apollo/config.c
arch/m68k/apollo/config.c
+0
-4
arch/m68k/atari/atari_ksyms.c
arch/m68k/atari/atari_ksyms.c
+0
-8
arch/m68k/atari/stram.c
arch/m68k/atari/stram.c
+1
-0
arch/m68k/atari/time.c
arch/m68k/atari/time.c
+1
-1
arch/m68k/defconfig
arch/m68k/defconfig
+1
-1
arch/m68k/kernel/entry.S
arch/m68k/kernel/entry.S
+5
-3
arch/m68k/kernel/m68k_defs.c
arch/m68k/kernel/m68k_defs.c
+0
-1
arch/m68k/kernel/module.c
arch/m68k/kernel/module.c
+4
-0
arch/m68k/kernel/process.c
arch/m68k/kernel/process.c
+5
-11
arch/m68k/kernel/traps.c
arch/m68k/kernel/traps.c
+9
-10
arch/m68k/math-emu/fp_emu.h
arch/m68k/math-emu/fp_emu.h
+9
-0
arch/m68k/math-emu/fp_log.c
arch/m68k/math-emu/fp_log.c
+84
-3
arch/m68k/mm/memory.c
arch/m68k/mm/memory.c
+103
-4
arch/m68k/mm/motorola.c
arch/m68k/mm/motorola.c
+0
-12
arch/ppc/configs/apus_defconfig
arch/ppc/configs/apus_defconfig
+1
-2
drivers/block/Kconfig.iosched
drivers/block/Kconfig.iosched
+8
-0
drivers/block/Makefile
drivers/block/Makefile
+3
-2
drivers/block/acsi_slm.c
drivers/block/acsi_slm.c
+1
-1
drivers/block/as-iosched.c
drivers/block/as-iosched.c
+1
-0
drivers/block/deadline-iosched.c
drivers/block/deadline-iosched.c
+1
-0
drivers/block/elevator.c
drivers/block/elevator.c
+1
-0
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+19
-8
drivers/char/amiserial.c
drivers/char/amiserial.c
+3
-3
drivers/input/gameport/ns558.c
drivers/input/gameport/ns558.c
+1
-1
drivers/input/serio/q40kbd.c
drivers/input/serio/q40kbd.c
+3
-1
drivers/macintosh/adbhid.c
drivers/macintosh/adbhid.c
+4
-0
drivers/net/8390.h
drivers/net/8390.h
+1
-1
drivers/net/Kconfig
drivers/net/Kconfig
+14
-17
drivers/net/Makefile
drivers/net/Makefile
+1
-1
drivers/net/Makefile.lib
drivers/net/Makefile.lib
+1
-1
drivers/net/atari_pamsnet.c
drivers/net/atari_pamsnet.c
+1
-1
drivers/net/mac8390.c
drivers/net/mac8390.c
+1
-1
drivers/net/macsonic.c
drivers/net/macsonic.c
+1
-1
drivers/net/sonic.c
drivers/net/sonic.c
+0
-9
drivers/net/wan/lmc/lmc_proto.c
drivers/net/wan/lmc/lmc_proto.c
+1
-1
drivers/net/zorro8390.c
drivers/net/zorro8390.c
+47
-47
drivers/scsi/NCR53C9x.c
drivers/scsi/NCR53C9x.c
+1
-1
drivers/scsi/a2091.c
drivers/scsi/a2091.c
+2
-2
drivers/scsi/a3000.c
drivers/scsi/a3000.c
+2
-2
drivers/scsi/dec_esp.c
drivers/scsi/dec_esp.c
+5
-8
drivers/scsi/gvp11.c
drivers/scsi/gvp11.c
+2
-2
drivers/scsi/oktagon_esp.c
drivers/scsi/oktagon_esp.c
+1
-1
drivers/scsi/sun3_NCR5380.c
drivers/scsi/sun3_NCR5380.c
+2
-2
drivers/scsi/wd33c93.c
drivers/scsi/wd33c93.c
+1
-1
drivers/video/Makefile
drivers/video/Makefile
+1
-1
drivers/video/logo/logo.c
drivers/video/logo/logo.c
+1
-1
drivers/video/macfb.c
drivers/video/macfb.c
+17
-17
drivers/video/valkyriefb.c
drivers/video/valkyriefb.c
+175
-372
include/asm-m68k/cacheflush.h
include/asm-m68k/cacheflush.h
+3
-27
include/asm-m68k/checksum.h
include/asm-m68k/checksum.h
+2
-0
include/asm-m68k/dma-mapping.h
include/asm-m68k/dma-mapping.h
+9
-0
include/asm-m68k/entry.h
include/asm-m68k/entry.h
+2
-2
include/asm-m68k/floppy.h
include/asm-m68k/floppy.h
+11
-7
include/asm-m68k/hardirq.h
include/asm-m68k/hardirq.h
+0
-2
include/asm-m68k/kmap_types.h
include/asm-m68k/kmap_types.h
+0
-2
include/asm-m68k/mc146818rtc.h
include/asm-m68k/mc146818rtc.h
+1
-26
include/asm-m68k/motorola_pgtable.h
include/asm-m68k/motorola_pgtable.h
+12
-11
include/asm-m68k/sun3_pgtable.h
include/asm-m68k/sun3_pgtable.h
+15
-0
include/asm-m68k/sun3xflop.h
include/asm-m68k/sun3xflop.h
+7
-5
include/linux/elevator.h
include/linux/elevator.h
+1
-0
include/linux/zorro.h
include/linux/zorro.h
+0
-3
init/Kconfig
init/Kconfig
+2
-0
kernel/signal.c
kernel/signal.c
+9
-0
sound/Makefile
sound/Makefile
+1
-0
sound/oss/dmasound/dmasound_core.c
sound/oss/dmasound/dmasound_core.c
+2
-0
No files found.
CREDITS
View file @
63322f88
...
...
@@ -3185,7 +3185,7 @@ S: Germany
N: Geert Uytterhoeven
E: geert@linux-m68k.org
W: http://home.tvd.be/cr26864/
P: 1024/
EC4A1EE1 8B 88 38 35 88 1E 95 A1 CD 9E AE DC 4B 4A 2F 41
P: 1024/
862678A6 C51D 361C 0BD1 4C90 B275 C553 6EEA 11BA 8626 78A6
D: m68k/Amiga and PPC/CHRP Longtrail coordinator
D: Frame buffer device and XF68_FBDev maintainer
D: m68k IDE maintainer
...
...
@@ -3194,8 +3194,8 @@ D: Amiga Buddha and Catweasel chipset IDE
D: Atari Falcon chipset IDE
D: Amiga Gayle chipset IDE
D: mipsel NEC DDB Vrc-5074
S:
C. Huysmansstraat 12
S: B-3
128 Baal
S:
Holsbeeksesteenweg 166
S: B-3
010 Kessel-Lo
S: Belgium
N: Chris Vance
...
...
Documentation/nmi_watchdog.txt
View file @
63322f88
...
...
@@ -8,9 +8,20 @@ us to generate 'watchdog NMI interrupts'. (NMI: Non Maskable Interrupt
which get executed even if the system is otherwise locked up hard).
This can be used to debug hard kernel lockups. By executing periodic
NMI interrupts, the kernel can monitor whether any CPU has locked up,
and print out debugging messages if so. You must enable the NMI
watchdog at boot time with the 'nmi_watchdog=n' boot parameter. Eg.
the relevant lilo.conf entry:
and print out debugging messages if so.
In order to use the NMI watchdoc, you need to have APIC support in your
kernel. For SMP kernels, APIC support gets compiled in automatically. For
UP, enable either CONFIG_X86_UP_APIC (Processor type and features -> Local
APIC support on uniprocessors) or CONFIG_X86_UP_IOAPIC (Processor type and
features -> IO-APIC support on uniprocessors) in your kernel config.
CONFIG_X86_UP_APIC is for uniprocessor machines without an IO-APIC.
CONFIG_X86_UP_IOAPIC is for uniprocessor with an IO-APIC. [Note: certain
kernel debugging options, such as Kernel Stack Meter or Kernel Tracer,
may implicitly disable the NMI watchdog.]
To actually enable the NMI watchdog, use the 'nmi_watchdog=N' boot
parameter. Eg. the relevant lilo.conf entry:
append="nmi_watchdog=1"
...
...
Documentation/zorro.txt
View file @
63322f88
...
...
@@ -57,13 +57,11 @@ not yet in use. This is done using the I/O memory space resource management
functions:
request_mem_region()
check_mem_region() (deprecated)
release_mem_region()
Shortcuts to claim the whole device's address space are provided as well:
zorro_request_device
zorro_check_device (deprecated)
zorro_release_device
...
...
Makefile
View file @
63322f88
VERSION
=
2
PATCHLEVEL
=
6
SUBLEVEL
=
0
EXTRAVERSION
=
-test
1
EXTRAVERSION
=
-test
2
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
...
...
arch/m68k/Kconfig
View file @
63322f88
...
...
@@ -1126,37 +1126,8 @@ config SOFT_WATCHDOG
<file:Documentation/modules.txt>. The module will be called
softdog.
config RTC
bool "Enhanced Real Time Clock Support"
depends on ATARI
---help---
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
will get access to the real time clock (or hardware clock) built
into your computer.
Every PC has such a clock built in. It can be used to generate
signals from as low as 1Hz up to 8192Hz, and can also be used
as a 24 hour alarm. It reports status information via the file
/proc/driver/rtc and its behaviour is set by various ioctls on
/dev/rtc.
If you run Linux on a multiprocessor machine and said Y to
"Symmetric Multi Processing" above, you should say Y here to read
and set the RTC in an SMP compatible fashion.
If you think you have a use for such a device (such as periodic data
sampling), then say Y here, and read <file:Documentation/rtc.txt>
for details.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module is called rtc. If you want to compile it as a module,
say M here and read <file:Documentation/modules.txt>.
config GEN_RTC
tristate "Generic /dev/rtc emulation" if !SUN3
depends on !ATARI
default y if SUN3
---help---
If you say Y here and create a character special file /dev/rtc with
...
...
arch/m68k/apollo/config.c
View file @
63322f88
...
...
@@ -174,10 +174,6 @@ void config_apollo(void) {
mach_hwclk
=
dn_dummy_hwclk
;
/* */
mach_set_clock_mmss
=
dn_dummy_set_clock_mmss
;
/* */
mach_process_int
=
dn_process_int
;
#ifdef CONFIG_BLK_DEV_FD
mach_floppy_init
=
dn_dummy_floppy_init
;
mach_floppy_setup
=
dn_dummy_floppy_setup
;
#endif
mach_reset
=
dn_dummy_reset
;
/* */
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp
=
&
dummy_con
;
...
...
arch/m68k/atari/atari_ksyms.c
View file @
63322f88
...
...
@@ -28,16 +28,8 @@ EXPORT_SYMBOL(stdma_islocked);
EXPORT_SYMBOL
(
atari_stram_alloc
);
EXPORT_SYMBOL
(
atari_stram_free
);
EXPORT_SYMBOL
(
atari_mouse_buttons
);
EXPORT_SYMBOL
(
atari_mouse_interrupt_hook
);
EXPORT_SYMBOL
(
atari_MIDI_interrupt_hook
);
EXPORT_SYMBOL
(
atari_MFP_init_done
);
EXPORT_SYMBOL
(
atari_SCC_init_done
);
EXPORT_SYMBOL
(
atari_SCC_reset_done
);
EXPORT_SYMBOL
(
ikbd_write
);
EXPORT_SYMBOL
(
ikbd_mouse_y0_top
);
EXPORT_SYMBOL
(
ikbd_mouse_thresh
);
EXPORT_SYMBOL
(
ikbd_mouse_rel_pos
);
EXPORT_SYMBOL
(
ikbd_mouse_disable
);
EXPORT_SYMBOL
(
atari_microwire_cmd
);
arch/m68k/atari/stram.c
View file @
63322f88
...
...
@@ -21,6 +21,7 @@
#include <linux/pagemap.h>
#include <linux/shm.h>
#include <linux/bootmem.h>
#include <linux/mount.h>
#include <asm/setup.h>
#include <asm/machdep.h>
...
...
arch/m68k/atari/time.c
View file @
63322f88
...
...
@@ -17,7 +17,7 @@
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <asm/
rtc
.h>
#include <asm/
atariints
.h>
void
__init
atari_sched_init
(
irqreturn_t
(
*
timer_routine
)(
int
,
void
*
,
struct
pt_regs
*
))
...
...
arch/m68k/defconfig
View file @
63322f88
...
...
@@ -177,7 +177,7 @@ CONFIG_NETDEVICES=y
# CONFIG_PPP is not set
# CONFIG_EQUALIZER is not set
# CONFIG_ARIADNE is not set
# CONFIG_
ARIADNE2
is not set
# CONFIG_
ZORRO8390
is not set
# CONFIG_A2065 is not set
# CONFIG_HYDRA is not set
...
...
arch/m68k/kernel/entry.S
View file @
63322f88
...
...
@@ -68,11 +68,13 @@ ENTRY(trap)
addql
#
4
,%
sp
jra
ret_from_exception
|
schedule_tail
is
only
used
with
CONFIG_SMP
|
After
a
fork
we
jump
here
directly
from
resume
,
|
so
that
%
d1
contains
the
previous
task
|
schedule_tail
now
used
regardless
of
CONFIG_SMP
ENTRY
(
ret_from_fork
)
#ifdef CONFIG_SMP
movel
%
d1
,%
sp
@
-
jsr
schedule_tail
#endif
addql
#
4
,%
sp
jra
ret_from_exception
badsys
:
...
...
arch/m68k/kernel/m68k_defs.c
View file @
63322f88
...
...
@@ -71,7 +71,6 @@ int main(void)
/* offsets into the irq_cpustat_t struct */
DEFINE
(
CPUSTAT_SOFTIRQ_PENDING
,
offsetof
(
irq_cpustat_t
,
__softirq_pending
));
DEFINE
(
CPUSTAT_SYSCALL_COUNT
,
offsetof
(
irq_cpustat_t
,
__syscall_count
));
/* offsets into the bi_record struct */
DEFINE
(
BIR_TAG
,
offsetof
(
struct
bi_record
,
tag
));
...
...
arch/m68k/kernel/module.c
View file @
63322f88
...
...
@@ -93,3 +93,7 @@ int module_finalize(const Elf_Ehdr *hdr,
{
return
0
;
}
void
module_arch_cleanup
(
struct
module
*
mod
)
{
}
arch/m68k/kernel/process.c
View file @
63322f88
...
...
@@ -202,24 +202,19 @@ void flush_thread(void)
asmlinkage
int
m68k_fork
(
struct
pt_regs
*
regs
)
{
struct
task_struct
*
p
;
p
=
do_fork
(
SIGCHLD
,
rdusp
(),
regs
,
0
,
NULL
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
do_fork
(
SIGCHLD
,
rdusp
(),
regs
,
0
,
NULL
,
NULL
);
}
asmlinkage
int
m68k_vfork
(
struct
pt_regs
*
regs
)
{
struct
task_struct
*
p
;
p
=
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
rdusp
(),
regs
,
0
,
NULL
,
NULL
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
rdusp
(),
regs
,
0
,
NULL
,
NULL
);
}
asmlinkage
int
m68k_clone
(
struct
pt_regs
*
regs
)
{
unsigned
long
clone_flags
;
unsigned
long
newsp
;
struct
task_struct
*
p
;
int
*
parent_tidptr
,
*
child_tidptr
;
/* syscall2 puts clone_flags in d1 and usp in d2 */
...
...
@@ -229,9 +224,8 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
child_tidptr
=
(
int
*
)
regs
->
d4
;
if
(
!
newsp
)
newsp
=
rdusp
();
p
=
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
newsp
,
regs
,
0
,
parent_tidptr
,
child_tidptr
);
return
IS_ERR
(
p
)
?
PTR_ERR
(
p
)
:
p
->
pid
;
return
do_fork
(
clone_flags
&
~
CLONE_IDLETASK
,
newsp
,
regs
,
0
,
parent_tidptr
,
child_tidptr
);
}
int
copy_thread
(
int
nr
,
unsigned
long
clone_flags
,
unsigned
long
usp
,
...
...
arch/m68k/kernel/traps.c
View file @
63322f88
...
...
@@ -852,11 +852,6 @@ void show_trace(unsigned long *stack)
printk
(
"
\n
"
);
}
void
show_trace_task
(
struct
task_struct
*
tsk
)
{
show_trace
((
unsigned
long
*
)
tsk
->
thread
.
esp0
);
}
void
show_registers
(
struct
pt_regs
*
regs
)
{
struct
frame
*
fp
=
(
struct
frame
*
)
regs
;
...
...
@@ -915,7 +910,7 @@ void show_registers(struct pt_regs *regs)
default:
printk
(
"
\n
"
);
}
show_stack
((
unsigned
long
*
)
addr
);
show_stack
(
NULL
,
(
unsigned
long
*
)
addr
);
printk
(
"Code: "
);
for
(
i
=
0
;
i
<
10
;
i
++
)
...
...
@@ -923,13 +918,17 @@ void show_registers(struct pt_regs *regs)
printk
(
"
\n
"
);
}
extern
void
show_stack
(
unsigned
long
*
stack
)
extern
void
show_stack
(
struct
task_struct
*
task
,
unsigned
long
*
stack
)
{
unsigned
long
*
endstack
;
int
i
;
if
(
!
stack
)
stack
=
(
unsigned
long
*
)
&
stack
;
if
(
!
stack
)
{
if
(
task
)
stack
=
(
unsigned
long
*
)
task
->
thread
.
esp0
;
else
stack
=
(
unsigned
long
*
)
&
stack
;
}
endstack
=
(
unsigned
long
*
)(((
unsigned
long
)
stack
+
THREAD_SIZE
-
1
)
&
-
THREAD_SIZE
);
printk
(
"Stack from %08lx:"
,
(
unsigned
long
)
stack
);
...
...
@@ -1124,7 +1123,7 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)
printk
(
"Process %s (pid: %d, stackpage=%08lx)
\n
"
,
current
->
comm
,
current
->
pid
,
PAGE_SIZE
+
(
unsigned
long
)
current
);
show_stack
((
unsigned
long
*
)
fp
);
show_stack
(
NULL
,
(
unsigned
long
*
)
fp
);
do_exit
(
SIGSEGV
);
}
...
...
arch/m68k/math-emu/fp_emu.h
View file @
63322f88
...
...
@@ -115,6 +115,15 @@ extern const struct fp_ext fp_Inf;
__res; \
})
#define fp_conv_long2ext(dest, src) ({ \
register struct fp_ext *__dest asm ("a0") = dest; \
register int __src asm ("d0") = src; \
\
asm volatile ("jsr fp_conv_ext2long" \
: : "d" (__src), "a" (__dest) \
: "a1", "d1", "d2", "memory"); \
})
#else
/* __ASSEMBLY__ */
/*
...
...
arch/m68k/math-emu/fp_log.c
View file @
63322f88
...
...
@@ -17,10 +17,22 @@
#include "fp_emu.h"
static
const
struct
fp_ext
fp_one
=
{
0
,
0
,
0x3fff
,
{
0
}
};
extern
struct
fp_ext
*
fp_fadd
(
struct
fp_ext
*
dest
,
const
struct
fp_ext
*
src
);
extern
struct
fp_ext
*
fp_fdiv
(
struct
fp_ext
*
dest
,
const
struct
fp_ext
*
src
);
extern
struct
fp_ext
*
fp_fmul
(
struct
fp_ext
*
dest
,
const
struct
fp_ext
*
src
);
struct
fp_ext
*
fp_fsqrt
(
struct
fp_ext
*
dest
,
struct
fp_ext
*
src
)
{
uprint
(
"fsqrt
\n
"
);
struct
fp_ext
tmp
,
src2
;
int
i
,
exp
;
dprint
(
PINSTR
,
"fsqrt
\n
"
);
fp_monadic_check
(
dest
,
src
);
...
...
@@ -34,6 +46,56 @@ fp_fsqrt(struct fp_ext *dest, struct fp_ext *src)
if
(
IS_INF
(
dest
))
return
dest
;
/*
* sqrt(m) * 2^(p) , if e = 2*p
* sqrt(m*2^e) =
* sqrt(2*m) * 2^(p) , if e = 2*p + 1
*
* So we use the last bit of the exponent to decide wether to
* use the m or 2*m.
*
* Since only the fractional part of the mantissa is stored and
* the integer part is assumed to be one, we place a 1 or 2 into
* the fixed point representation.
*/
exp
=
dest
->
exp
;
dest
->
exp
=
0x3FFF
;
if
(
!
(
exp
&
1
))
/* lowest bit of exponent is set */
dest
->
exp
++
;
fp_copy_ext
(
&
src2
,
dest
);
/*
* The taylor row arround a for sqrt(x) is:
* sqrt(x) = sqrt(a) + 1/(2*sqrt(a))*(x-a) + R
* With a=1 this gives:
* sqrt(x) = 1 + 1/2*(x-1)
* = 1/2*(1+x)
*/
fp_fadd
(
dest
,
&
fp_one
);
dest
->
exp
--
;
/* * 1/2 */
/*
* We now apply the newton rule to the function
* f(x) := x^2 - r
* which has a null point on x = sqrt(r).
*
* It gives:
* x' := x - f(x)/f'(x)
* = x - (x^2 -r)/(2*x)
* = x - (x - r/x)/2
* = (2*x - x + r/x)/2
* = (x + r/x)/2
*/
for
(
i
=
0
;
i
<
9
;
i
++
)
{
fp_copy_ext
(
&
tmp
,
&
src2
);
fp_fdiv
(
&
tmp
,
dest
);
fp_fadd
(
dest
,
&
tmp
);
dest
->
exp
--
;
}
dest
->
exp
+=
(
exp
-
0x3FFF
)
/
2
;
return
dest
;
}
...
...
@@ -123,20 +185,39 @@ fp_flog2(struct fp_ext *dest, struct fp_ext *src)
struct
fp_ext
*
fp_fgetexp
(
struct
fp_ext
*
dest
,
struct
fp_ext
*
src
)
{
uprint
(
"fgetexp
\n
"
);
dprint
(
PINSTR
,
"fgetexp
\n
"
);
fp_monadic_check
(
dest
,
src
);
if
(
IS_INF
(
dest
))
{
fp_set_nan
(
dest
);
return
dest
;
}
if
(
IS_ZERO
(
dest
))
return
dest
;
fp_conv_long2ext
(
dest
,
(
int
)
dest
->
exp
-
0x3FFF
);
fp_normalize_ext
(
dest
);
return
dest
;
}
struct
fp_ext
*
fp_fgetman
(
struct
fp_ext
*
dest
,
struct
fp_ext
*
src
)
{
uprint
(
"fgetman
\n
"
);
dprint
(
PINSTR
,
"fgetman
\n
"
);
fp_monadic_check
(
dest
,
src
);
if
(
IS_ZERO
(
dest
))
return
dest
;
if
(
IS_INF
(
dest
))
return
dest
;
dest
->
exp
=
0x3FFF
;
return
dest
;
}
arch/m68k/mm/memory.c
View file @
63322f88
...
...
@@ -19,11 +19,7 @@
#include <asm/pgalloc.h>
#include <asm/system.h>
#include <asm/traps.h>
#include <asm/io.h>
#include <asm/machdep.h>
#ifdef CONFIG_AMIGA
#include <asm/amigahw.h>
#endif
/* ++andreas: {get,free}_pointer_table rewritten to use unused fields from
...
...
@@ -358,6 +354,109 @@ void cache_push (unsigned long paddr, int len)
#endif
}
static
unsigned
long
virt_to_phys_slow
(
unsigned
long
vaddr
)
{
if
(
CPU_IS_060
)
{
mm_segment_t
fs
=
get_fs
();
unsigned
long
paddr
;
set_fs
(
get_ds
());
/* The PLPAR instruction causes an access error if the translation
* is not possible. To catch this we use the same exception mechanism
* as for user space accesses in <asm/uaccess.h>. */
asm
volatile
(
".chip 68060
\n
"
"1: plpar (%0)
\n
"
".chip 68k
\n
"
"2:
\n
"
".section .fixup,
\"
ax
\"\n
"
" .even
\n
"
"3: sub.l %0,%0
\n
"
" jra 2b
\n
"
".previous
\n
"
".section __ex_table,
\"
a
\"\n
"
" .align 4
\n
"
" .long 1b,3b
\n
"
".previous"
:
"=a"
(
paddr
)
:
"0"
(
vaddr
));
set_fs
(
fs
);
return
paddr
;
}
else
if
(
CPU_IS_040
)
{
mm_segment_t
fs
=
get_fs
();
unsigned
long
mmusr
;
set_fs
(
get_ds
());
asm
volatile
(
".chip 68040
\n\t
"
"ptestr (%1)
\n\t
"
"movec %%mmusr, %0
\n\t
"
".chip 68k"
:
"=r"
(
mmusr
)
:
"a"
(
vaddr
));
set_fs
(
fs
);
if
(
mmusr
&
MMU_R_040
)
return
(
mmusr
&
PAGE_MASK
)
|
(
vaddr
&
~
PAGE_MASK
);
}
else
{
unsigned
short
mmusr
;
unsigned
long
*
descaddr
;
asm
volatile
(
"ptestr #5,%2@,#7,%0
\n\t
"
"pmove %%psr,%1@"
:
"=a&"
(
descaddr
)
:
"a"
(
&
mmusr
),
"a"
(
vaddr
));
if
(
mmusr
&
(
MMU_I
|
MMU_B
|
MMU_L
))
return
0
;
descaddr
=
phys_to_virt
((
unsigned
long
)
descaddr
);
switch
(
mmusr
&
MMU_NUM
)
{
case
1
:
return
(
*
descaddr
&
0xfe000000
)
|
(
vaddr
&
0x01ffffff
);
case
2
:
return
(
*
descaddr
&
0xfffc0000
)
|
(
vaddr
&
0x0003ffff
);
case
3
:
return
(
*
descaddr
&
PAGE_MASK
)
|
(
vaddr
&
~
PAGE_MASK
);
}
}
return
0
;
}
/* Push n pages at kernel virtual address and clear the icache */
/* RZ: use cpush %bc instead of cpush %dc, cinv %ic */
void
flush_icache_range
(
unsigned
long
address
,
unsigned
long
endaddr
)
{
if
(
CPU_IS_040_OR_060
)
{
address
&=
PAGE_MASK
;
if
(
address
>=
PAGE_OFFSET
&&
address
<
(
unsigned
long
)
high_memory
)
{
do
{
asm
volatile
(
"nop
\n\t
"
".chip 68040
\n\t
"
"cpushp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
virt_to_phys
((
void
*
)
address
)));
address
+=
PAGE_SIZE
;
}
while
(
address
<
endaddr
);
}
else
{
do
{
asm
volatile
(
"nop
\n\t
"
".chip 68040
\n\t
"
"cpushp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
virt_to_phys_slow
(
address
)));
address
+=
PAGE_SIZE
;
}
while
(
address
<
endaddr
);
}
}
else
{
unsigned
long
tmp
;
asm
volatile
(
"movec %%cacr,%0
\n\t
"
"orw %1,%0
\n\t
"
"movec %0,%%cacr"
:
"=&d"
(
tmp
)
:
"di"
(
FLUSH_I
));
}
}
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
int
mm_end_of_chunk
(
unsigned
long
addr
,
int
len
)
...
...
arch/m68k/mm/motorola.c
View file @
63322f88
...
...
@@ -220,18 +220,6 @@ void __init paging_init(void)
for
(
i
=
0
;
i
<
16
;
i
++
)
pgprot_val
(
protection_map
[
i
])
|=
_PAGE_CACHE040
;
}
/* Fix the PAGE_NONE value. */
if
(
CPU_IS_040_OR_060
)
{
/* On the 680[46]0 we can use the _PAGE_SUPER bit. */
pgprot_val
(
protection_map
[
0
])
|=
_PAGE_SUPER
;
pgprot_val
(
protection_map
[
VM_SHARED
])
|=
_PAGE_SUPER
;
}
else
{
/* Otherwise we must fake it. */
pgprot_val
(
protection_map
[
0
])
&=
~
_PAGE_PRESENT
;
pgprot_val
(
protection_map
[
0
])
|=
_PAGE_FAKE_SUPER
;
pgprot_val
(
protection_map
[
VM_SHARED
])
&=
~
_PAGE_PRESENT
;
pgprot_val
(
protection_map
[
VM_SHARED
])
|=
_PAGE_FAKE_SUPER
;
}
/*
* Map the physical memory available into the kernel virtual
...
...
arch/ppc/configs/apus_defconfig
View file @
63322f88
...
...
@@ -421,8 +421,7 @@ CONFIG_NET_ETHERNET=y
# CONFIG_MII is not set
# CONFIG_OAKNET is not set
CONFIG_ARIADNE=y
# CONFIG_ARIADNE2 is not set
CONFIG_NE2K_ZORRO=y
# CONFIG_ZORRO8390 is not set
CONFIG_A2065=y
CONFIG_HYDRA=y
# CONFIG_HAPPYMEAL is not set
...
...
drivers/block/Kconfig.iosched
0 → 100644
View file @
63322f88
config IOSCHED_AS
bool "Anticipatory I/O scheduler" if EMBEDDED
default y
config IOSCHED_DEADLINE
bool "Deadline I/O scheduler" if EMBEDDED
default y
drivers/block/Makefile
View file @
63322f88
...
...
@@ -13,9 +13,10 @@
# kblockd threads
#
obj-y
:=
elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o
\
deadline-iosched.o as-iosched.o
obj-y
:=
elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o
obj-$(CONFIG_IOSCHED_AS)
+=
as-iosched.o
obj-$(CONFIG_IOSCHED_DEADLINE)
+=
deadline-iosched.o
obj-$(CONFIG_MAC_FLOPPY)
+=
swim3.o
obj-$(CONFIG_BLK_DEV_FD)
+=
floppy.o
obj-$(CONFIG_BLK_DEV_FD98)
+=
floppy98.o
...
...
drivers/block/acsi_slm.c
View file @
63322f88
...
...
@@ -999,7 +999,7 @@ int slm_init( void )
return
-
EBUSY
;
}
if
(
!
(
SLMBuffer
=
atari_stram_alloc
(
SLM_BUFFER_SIZE
,
NULL
,
"SLM"
)))
{
if
(
!
(
SLMBuffer
=
atari_stram_alloc
(
SLM_BUFFER_SIZE
,
"SLM"
)))
{
printk
(
KERN_ERR
"Unable to get SLM ST-Ram buffer.
\n
"
);
unregister_chrdev
(
ACSI_MAJOR
,
"slm"
);
return
-
ENOMEM
;
...
...
drivers/block/as-iosched.c
View file @
63322f88
...
...
@@ -1842,6 +1842,7 @@ elevator_t iosched_as = {
.
elevator_exit_fn
=
as_exit
,
.
elevator_ktype
=
&
as_ktype
,
.
elevator_name
=
"anticipatory scheduling"
,
};
EXPORT_SYMBOL
(
iosched_as
);
drivers/block/deadline-iosched.c
View file @
63322f88
...
...
@@ -940,6 +940,7 @@ elevator_t iosched_deadline = {
.
elevator_exit_fn
=
deadline_exit
,
.
elevator_ktype
=
&
deadline_ktype
,
.
elevator_name
=
"deadline"
,
};
EXPORT_SYMBOL
(
iosched_deadline
);
drivers/block/elevator.c
View file @
63322f88
...
...
@@ -420,6 +420,7 @@ elevator_t elevator_noop = {
.
elevator_merge_req_fn
=
elevator_noop_merge_requests
,
.
elevator_next_req_fn
=
elevator_noop_next_request
,
.
elevator_add_req_fn
=
elevator_noop_add_request
,
.
elevator_name
=
"noop"
,
};
module_init
(
elevator_global_init
);
...
...
drivers/block/ll_rw_blk.c
View file @
63322f88
...
...
@@ -1209,17 +1209,31 @@ static int blk_init_free_list(request_queue_t *q)
static
int
__make_request
(
request_queue_t
*
,
struct
bio
*
);
static
elevator_t
*
chosen_elevator
=
&
iosched_as
;
static
elevator_t
*
chosen_elevator
=
#if defined(CONFIG_IOSCHED_AS)
&
iosched_as
;
#elif defined(CONFIG_IOSCHED_DEADLINE)
&
iosched_deadline
;
#else
&
elevator_noop
;
#endif
#if defined(CONFIG_IOSCHED_AS) || defined(CONFIG_IOSCHED_DEADLINE)
static
int
__init
elevator_setup
(
char
*
str
)
{
#ifdef CONFIG_IOSCHED_DEADLINE
if
(
!
strcmp
(
str
,
"deadline"
))
chosen_elevator
=
&
iosched_deadline
;
#endif
#ifdef CONFIG_IOSCHED_AS
if
(
!
strcmp
(
str
,
"as"
))
chosen_elevator
=
&
iosched_as
;
#endif
return
1
;
}
__setup
(
"elevator="
,
elevator_setup
);
#endif
/* CONFIG_IOSCHED_AS || CONFIG_IOSCHED_DEADLINE */
/**
* blk_init_queue - prepare a request queue for use with a block device
...
...
@@ -1259,10 +1273,7 @@ int blk_init_queue(request_queue_t *q, request_fn_proc *rfn, spinlock_t *lock)
if
(
!
printed
)
{
printed
=
1
;
if
(
chosen_elevator
==
&
iosched_deadline
)
printk
(
"deadline elevator
\n
"
);
else
if
(
chosen_elevator
==
&
iosched_as
)
printk
(
"anticipatory scheduling elevator
\n
"
);
printk
(
"Using %s elevator
\n
"
,
chosen_elevator
->
elevator_name
);
}
if
((
ret
=
elevator_init
(
q
,
chosen_elevator
)))
{
...
...
@@ -2296,8 +2307,8 @@ static int __end_that_request_first(struct request *req, int uptodate,
* not a complete bvec done
*/
if
(
unlikely
(
nbytes
>
nr_bytes
))
{
bio_iovec
(
bio
)
->
bv_offset
+=
nr_bytes
;
bio_iovec
(
bio
)
->
bv_len
-=
nr_bytes
;
bio_iovec
_idx
(
bio
,
idx
)
->
bv_offset
+=
nr_bytes
;
bio_iovec
_idx
(
bio
,
idx
)
->
bv_len
-=
nr_bytes
;
bio_nbytes
+=
nr_bytes
;
total_bytes
+=
nr_bytes
;
break
;
...
...
drivers/char/amiserial.c
View file @
63322f88
...
...
@@ -2145,14 +2145,14 @@ static int __init rs_init(void)
static
__exit
void
rs_exit
(
void
)
{
int
e
1
,
e2
;
int
e
rror
;
struct
async_struct
*
info
=
rs_table
[
0
].
info
;
/* printk("Unloading %s: version %s\n", serial_name, serial_version); */
tasklet_kill
(
&
info
->
tlet
);
if
((
e
1
=
tty_unregister_driver
(
serial_driver
)))
if
((
e
rror
=
tty_unregister_driver
(
serial_driver
)))
printk
(
"SERIAL: failed to unregister serial driver (%d)
\n
"
,
e
1
);
e
rror
);
put_tty_driver
(
serial_driver
);
if
(
info
)
{
...
...
drivers/input/gameport/ns558.c
View file @
63322f88
...
...
@@ -243,7 +243,7 @@ static struct pnp_driver ns558_pnp_driver = {
#else
static
const
struct
pnp_driver
ns558_pnp_driver
;
static
struct
pnp_driver
ns558_pnp_driver
;
#endif
...
...
drivers/input/serio/q40kbd.c
View file @
63322f88
...
...
@@ -66,12 +66,14 @@ static struct serio q40kbd_port =
.
close
=
q40kbd_close
,
};
static
void
q40kbd_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
q40kbd_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
if
(
Q40_IRQ_KEYB_MASK
&
master_inb
(
INTERRUPT_REG
))
serio_interrupt
(
&
q40kbd_port
,
master_inb
(
KEYCODE_REG
),
0
,
regs
);
master_outb
(
-
1
,
KEYBOARD_UNLOCK_REG
);
return
IRQ_HANDLED
;
}
static
int
__init
q40kbd_init
(
void
)
...
...
drivers/macintosh/adbhid.c
View file @
63322f88
...
...
@@ -44,7 +44,9 @@
#include <linux/pmu.h>
#include <asm/machdep.h>
#ifdef CONFIG_PPC_PMAC
#include <asm/pmac_feature.h>
#endif
#ifdef CONFIG_PMAC_BACKLIGHT
#include <asm/backlight.h>
...
...
@@ -160,6 +162,7 @@ adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs)
return
;
case
0x3f
:
/* ignore Powerbook Fn key */
return
;
#ifdef CONFIG_PPC_PMAC
case
0x7e
:
/* Power key on PBook 3400 needs remapping */
switch
(
pmac_call_feature
(
PMAC_FTR_GET_MB_INFO
,
NULL
,
PMAC_MB_INFO_MODEL
,
0
))
{
...
...
@@ -169,6 +172,7 @@ adbhid_input_keycode(int id, int keycode, int repeat, struct pt_regs *regs)
keycode
=
0x7f
;
}
break
;
#endif
/* CONFIG_PPC_PMAC */
}
if
(
adbhid
[
id
]
->
keycode
[
keycode
])
{
...
...
drivers/net/8390.h
View file @
63322f88
...
...
@@ -110,7 +110,7 @@ struct ei_device {
*/
#if defined(CONFIG_MAC) || \
defined(CONFIG_
ARIADNE2) || defined(CONFIG_ARIADNE2
_MODULE) || \
defined(CONFIG_
ZORRO8390) || defined(CONFIG_ZORRO8390
_MODULE) || \
defined(CONFIG_HYDRA) || defined(CONFIG_HYDRA_MODULE)
#define EI_SHIFT(x) (ei_local->reg_offset[x])
#undef inb
...
...
drivers/net/Kconfig
View file @
63322f88
...
...
@@ -282,23 +282,6 @@ config ARIADNE
want). The module is called ariadne. If you want to compile it as
a module, say M here and read <file:Documentation/modules.txt>.
config ARIADNE2
tristate "Ariadne II support"
depends on NETDEVICES && ZORRO
help
This driver is for the Village Tronic Ariadne II and the Individual
Computers X-Surf Ethernet cards. If you have such a card, say Y.
Otherwise, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called ariadne2. If you want to compile it as
a module, say M here and read <file:Documentation/modules.txt>.
config NE2K_ZORRO
tristate "Ariadne II and X-Surf support"
depends on NET_ETHERNET && ZORRO
config A2065
tristate "A2065 support"
depends on NET_ETHERNET && ZORRO
...
...
@@ -322,6 +305,20 @@ config HYDRA
want). The module is called hydra. If you want to compile it as a
module, say M here and read <file:Documentation/modules.txt>.
config ZORRO8390
tristate "Zorro NS8390-based Ethernet support"
depends on NET_ETHERNET && ZORRO
help
This driver is for Zorro Ethernet cards using an NS8390-compatible
chipset, like the Village Tronic Ariadne II and the Individual
Computers X-Surf Ethernet cards. If you have such a card, say Y.
Otherwise, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module is called zorro8390. If you want to compile it as
a module, say M here and read <file:Documentation/modules.txt>.
config APNE
tristate "PCMCIA NE2000 support"
depends on NETDEVICES && AMIGA_PCMCIA
...
...
drivers/net/Makefile
View file @
63322f88
...
...
@@ -151,7 +151,7 @@ obj-$(CONFIG_BVME6000_NET) += 82596.o
obj-$(CONFIG_LP486E)
+=
lp486e.o
obj-$(CONFIG_ETH16I)
+=
eth16i.o
obj-$(CONFIG_
ARIADNE2)
+=
ariadne2
.o 8390.o
obj-$(CONFIG_
ZORRO8390)
+=
zorro8390
.o 8390.o
obj-$(CONFIG_HPLANCE)
+=
hplance.o 7990.o
obj-$(CONFIG_MVME147_NET)
+=
mvme147.o 7990.o
obj-$(CONFIG_EQUALIZER)
+=
eql.o
...
...
drivers/net/Makefile.lib
View file @
63322f88
...
...
@@ -70,5 +70,5 @@ obj-$(CONFIG_ES3210) += crc32.o
obj-$(CONFIG_LNE390)
+=
crc32.o
obj-$(CONFIG_NE3210)
+=
crc32.o
obj-$(CONFIG_AC3200)
+=
crc32.o
obj-$(CONFIG_
ARIADNE2
)
+=
crc32.o
obj-$(CONFIG_
ZORRO8390
)
+=
crc32.o
obj-$(CONFIG_HYDRA)
+=
crc32.o
drivers/net/atari_pamsnet.c
View file @
63322f88
...
...
@@ -169,7 +169,7 @@ static void pamsnet_tick(unsigned long);
static
irqreturn_t
pamsnet_intr
(
int
irq
,
void
*
data
,
struct
pt_regs
*
fp
);
static
struct
timer_list
pamsnet_timer
=
TIMER_INITIALIZER
(
amsnet_tick
,
0
,
0
);
static
struct
timer_list
pamsnet_timer
=
TIMER_INITIALIZER
(
p
amsnet_tick
,
0
,
0
);
#define STRAM_ADDR(a) (((a) & 0xff000000) == 0)
...
...
drivers/net/mac8390.c
View file @
63322f88
...
...
@@ -378,7 +378,7 @@ int __init mac8390_probe(struct net_device * dev)
#ifdef MODULE
MODULE_AUTHOR
(
"David Huggins-Daines <dhd@debian.org> and others"
);
MODULE_DESCRIPTION
(
"Macintosh NS8390-based Nubus Ethernet driver"
);
MODU
EL
_LICENSE
(
"GPL"
);
MODU
LE
_LICENSE
(
"GPL"
);
int
init_module
(
void
)
{
...
...
drivers/net/macsonic.c
View file @
63322f88
...
...
@@ -138,7 +138,7 @@ static inline void bit_reverse_addr(unsigned char addr[6])
int
__init
macsonic_init
(
struct
net_device
*
dev
)
{
struct
sonic_local
*
lp
;
struct
sonic_local
*
lp
=
NULL
;
int
i
;
/* Allocate the entire chunk of memory for the descriptors.
...
...
drivers/net/sonic.c
View file @
63322f88
...
...
@@ -113,15 +113,6 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
if
(
sonic_debug
>
2
)
printk
(
"sonic_send_packet: skb=%p, dev=%p
\n
"
,
skb
,
dev
);
/*
* Block a timer-based transmit from overlapping. This could better be
* done with atomic_swap(1, dev->tbusy), but set_bit() works as well.
*/
if
(
test_and_set_bit
(
0
,
(
void
*
)
&
dev
->
tbusy
)
!=
0
)
{
printk
(
"%s: Transmitter access conflict.
\n
"
,
dev
->
name
);
return
1
;
}
/*
* Map the packet data into the logical DMA address space
*/
...
...
drivers/net/wan/lmc/lmc_proto.c
View file @
63322f88
...
...
@@ -43,7 +43,7 @@
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <
asm
/smp.h>
#include <
linux
/smp.h>
#include "lmc.h"
#include "lmc_var.h"
...
...
drivers/net/
ariadne2
.c
→
drivers/net/
zorro8390
.c
View file @
63322f88
/*
* Amiga Linux/m68k and Linux/PPC
Ariadne II and X-Surf
Ethernet Driver
* Amiga Linux/m68k and Linux/PPC
Zorro NS8390
Ethernet Driver
*
* (C) Copyright 1998-2000 by some Elitist 680x0 Users(TM)
*
...
...
@@ -60,7 +60,7 @@
#define WORDSWAP(a) ((((a)>>8)&0xff) | ((a)<<8))
#ifdef MODULE
static
struct
net_device
*
root_
ariadne2
_dev
;
static
struct
net_device
*
root_
zorro8390
_dev
;
#endif
static
const
struct
card_info
{
...
...
@@ -72,22 +72,22 @@ static const struct card_info {
{
ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF
,
"X-Surf"
,
0x8600
},
};
static
int
__init
ariadne2
_probe
(
void
);
static
int
__init
ariadne2
_init
(
struct
net_device
*
dev
,
unsigned
long
board
,
const
char
*
name
,
unsigned
long
ioaddr
);
static
int
ariadne2
_open
(
struct
net_device
*
dev
);
static
int
ariadne2
_close
(
struct
net_device
*
dev
);
static
void
ariadne2
_reset_8390
(
struct
net_device
*
dev
);
static
void
ariadne2
_get_8390_hdr
(
struct
net_device
*
dev
,
struct
e8390_pkt_hdr
*
hdr
,
int
ring_page
);
static
void
ariadne2
_block_input
(
struct
net_device
*
dev
,
int
count
,
struct
sk_buff
*
skb
,
int
ring_offset
);
static
void
ariadne2
_block_output
(
struct
net_device
*
dev
,
const
int
count
,
const
unsigned
char
*
buf
,
const
int
start_page
);
static
void
__exit
ariadne2
_cleanup
(
void
);
static
int
__init
ariadne2
_probe
(
void
)
static
int
__init
zorro8390
_probe
(
void
);
static
int
__init
zorro8390
_init
(
struct
net_device
*
dev
,
unsigned
long
board
,
const
char
*
name
,
unsigned
long
ioaddr
);
static
int
zorro8390
_open
(
struct
net_device
*
dev
);
static
int
zorro8390
_close
(
struct
net_device
*
dev
);
static
void
zorro8390
_reset_8390
(
struct
net_device
*
dev
);
static
void
zorro8390
_get_8390_hdr
(
struct
net_device
*
dev
,
struct
e8390_pkt_hdr
*
hdr
,
int
ring_page
);
static
void
zorro8390
_block_input
(
struct
net_device
*
dev
,
int
count
,
struct
sk_buff
*
skb
,
int
ring_offset
);
static
void
zorro8390
_block_output
(
struct
net_device
*
dev
,
const
int
count
,
const
unsigned
char
*
buf
,
const
int
start_page
);
static
void
__exit
zorro8390
_cleanup
(
void
);
static
int
__init
zorro8390
_probe
(
void
)
{
struct
net_device
*
dev
;
struct
zorro_dev
*
z
=
NULL
;
...
...
@@ -111,8 +111,8 @@ static int __init ariadne2_probe(void)
kfree
(
dev
);
continue
;
}
if
((
err
=
ariadne2
_init
(
dev
,
board
,
cards
[
i
].
name
,
ZTWO_VADDR
(
ioaddr
))))
{
if
((
err
=
zorro8390
_init
(
dev
,
board
,
cards
[
i
].
name
,
ZTWO_VADDR
(
ioaddr
))))
{
release_mem_region
(
ioaddr
,
NE_IO_EXTENT
*
2
);
kfree
(
dev
);
return
err
;
...
...
@@ -125,13 +125,13 @@ static int __init ariadne2_probe(void)
return
err
;
}
static
int
__init
ariadne2
_init
(
struct
net_device
*
dev
,
unsigned
long
board
,
const
char
*
name
,
unsigned
long
ioaddr
)
static
int
__init
zorro8390
_init
(
struct
net_device
*
dev
,
unsigned
long
board
,
const
char
*
name
,
unsigned
long
ioaddr
)
{
int
i
;
unsigned
char
SA_prom
[
32
];
int
start_page
,
stop_page
;
static
u32
ariadne2
_offsets
[
16
]
=
{
static
u32
zorro8390
_offsets
[
16
]
=
{
0x00
,
0x02
,
0x04
,
0x06
,
0x08
,
0x0a
,
0x0c
,
0x0e
,
0x10
,
0x12
,
0x14
,
0x16
,
0x18
,
0x1a
,
0x1c
,
0x1e
,
};
...
...
@@ -220,28 +220,28 @@ static int __init ariadne2_init(struct net_device *dev, unsigned long board,
ei_status
.
rx_start_page
=
start_page
+
TX_PAGES
;
ei_status
.
reset_8390
=
&
ariadne2
_reset_8390
;
ei_status
.
block_input
=
&
ariadne2
_block_input
;
ei_status
.
block_output
=
&
ariadne2
_block_output
;
ei_status
.
get_8390_hdr
=
&
ariadne2
_get_8390_hdr
;
ei_status
.
reg_offset
=
ariadne2
_offsets
;
dev
->
open
=
&
ariadne2
_open
;
dev
->
stop
=
&
ariadne2
_close
;
ei_status
.
reset_8390
=
&
zorro8390
_reset_8390
;
ei_status
.
block_input
=
&
zorro8390
_block_input
;
ei_status
.
block_output
=
&
zorro8390
_block_output
;
ei_status
.
get_8390_hdr
=
&
zorro8390
_get_8390_hdr
;
ei_status
.
reg_offset
=
zorro8390
_offsets
;
dev
->
open
=
&
zorro8390
_open
;
dev
->
stop
=
&
zorro8390
_close
;
#ifdef MODULE
ei_status
.
priv
=
(
unsigned
long
)
root_
ariadne2
_dev
;
root_
ariadne2
_dev
=
dev
;
ei_status
.
priv
=
(
unsigned
long
)
root_
zorro8390
_dev
;
root_
zorro8390
_dev
=
dev
;
#endif
NS8390_init
(
dev
,
0
);
return
0
;
}
static
int
ariadne2
_open
(
struct
net_device
*
dev
)
static
int
zorro8390
_open
(
struct
net_device
*
dev
)
{
ei_open
(
dev
);
return
0
;
}
static
int
ariadne2
_close
(
struct
net_device
*
dev
)
static
int
zorro8390
_close
(
struct
net_device
*
dev
)
{
if
(
ei_debug
>
1
)
printk
(
"%s: Shutting down ethercard.
\n
"
,
dev
->
name
);
...
...
@@ -251,7 +251,7 @@ static int ariadne2_close(struct net_device *dev)
/* Hard reset the card. This used to pause for the same period that a
8390 reset command required, but that shouldn't be necessary. */
static
void
ariadne2
_reset_8390
(
struct
net_device
*
dev
)
static
void
zorro8390
_reset_8390
(
struct
net_device
*
dev
)
{
unsigned
long
reset_start_time
=
jiffies
;
...
...
@@ -276,8 +276,8 @@ static void ariadne2_reset_8390(struct net_device *dev)
we don't need to be concerned with ring wrap as the header will be at
the start of a page, so we optimize accordingly. */
static
void
ariadne2
_get_8390_hdr
(
struct
net_device
*
dev
,
struct
e8390_pkt_hdr
*
hdr
,
int
ring_page
)
static
void
zorro8390
_get_8390_hdr
(
struct
net_device
*
dev
,
struct
e8390_pkt_hdr
*
hdr
,
int
ring_page
)
{
int
nic_base
=
dev
->
base_addr
;
int
cnt
;
...
...
@@ -316,7 +316,7 @@ static void ariadne2_get_8390_hdr(struct net_device *dev,
The NEx000 doesn't share the on-board packet memory -- you have to put
the packet out through the "remote DMA" dataport using z_writeb. */
static
void
ariadne2
_block_input
(
struct
net_device
*
dev
,
int
count
,
static
void
zorro8390
_block_input
(
struct
net_device
*
dev
,
int
count
,
struct
sk_buff
*
skb
,
int
ring_offset
)
{
int
nic_base
=
dev
->
base_addr
;
...
...
@@ -349,9 +349,9 @@ static void ariadne2_block_input(struct net_device *dev, int count,
ei_status
.
dmaing
&=
~
0x01
;
}
static
void
ariadne2
_block_output
(
struct
net_device
*
dev
,
int
count
,
const
unsigned
char
*
buf
,
const
int
start_page
)
static
void
zorro8390
_block_output
(
struct
net_device
*
dev
,
int
count
,
const
unsigned
char
*
buf
,
const
int
start_page
)
{
int
nic_base
=
NE_BASE
;
unsigned
long
dma_start
;
...
...
@@ -393,7 +393,7 @@ static void ariadne2_block_output(struct net_device *dev, int count,
while
((
z_readb
(
NE_BASE
+
NE_EN0_ISR
)
&
ENISR_RDC
)
==
0
)
if
(
jiffies
-
dma_start
>
2
*
HZ
/
100
)
{
/* 20ms */
printk
(
"%s: timeout waiting for Tx RDC.
\n
"
,
dev
->
name
);
ariadne2
_reset_8390
(
dev
);
zorro8390
_reset_8390
(
dev
);
NS8390_init
(
dev
,
1
);
break
;
}
...
...
@@ -403,23 +403,23 @@ static void ariadne2_block_output(struct net_device *dev, int count,
return
;
}
static
void
__exit
ariadne2
_cleanup
(
void
)
static
void
__exit
zorro8390
_cleanup
(
void
)
{
#ifdef MODULE
struct
net_device
*
dev
,
*
next
;
while
((
dev
=
root_
ariadne2
_dev
))
{
while
((
dev
=
root_
zorro8390
_dev
))
{
next
=
(
struct
net_device
*
)(
ei_status
.
priv
);
unregister_netdev
(
dev
);
free_irq
(
IRQ_AMIGA_PORTS
,
dev
);
release_mem_region
(
ZTWO_PADDR
(
dev
->
base_addr
),
NE_IO_EXTENT
*
2
);
kfree
(
dev
);
root_
ariadne2
_dev
=
next
;
root_
zorro8390
_dev
=
next
;
}
#endif
}
module_init
(
ariadne2
_probe
);
module_exit
(
ariadne2
_cleanup
);
module_init
(
zorro8390
_probe
);
module_exit
(
zorro8390
_cleanup
);
MODULE_LICENSE
(
"GPL"
);
drivers/scsi/NCR53C9x.c
View file @
63322f88
...
...
@@ -911,7 +911,7 @@ static void esp_get_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
if
(
esp
->
dma_mmu_get_scsi_one
)
esp
->
dma_mmu_get_scsi_one
(
esp
,
sp
);
else
sp
->
SCp
.
have_data_in
=
(
int
)
sp
->
SCp
.
ptr
=
sp
->
SCp
.
ptr
=
(
char
*
)
virt_to_phys
(
sp
->
request_buffer
);
}
else
{
sp
->
SCp
.
buffer
=
(
struct
scatterlist
*
)
sp
->
buffer
;
...
...
drivers/scsi/a2091.c
View file @
63322f88
...
...
@@ -43,9 +43,9 @@ static irqreturn_t a2091_intr (int irq, void *dummy, struct pt_regs *fp)
continue
;
if
(
status
&
ISTR_INTS
)
{
spin_lock_irqsave
(
&
instance
->
host_lock
,
flags
);
spin_lock_irqsave
(
instance
->
host_lock
,
flags
);
wd33c93_intr
(
instance
);
spin_unlock_irqrestore
(
&
instance
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
instance
->
host_lock
,
flags
);
handled
=
1
;
}
}
...
...
drivers/scsi/a3000.c
View file @
63322f88
...
...
@@ -36,9 +36,9 @@ static irqreturn_t a3000_intr (int irq, void *dummy, struct pt_regs *fp)
return
IRQ_NONE
;
if
(
status
&
ISTR_INTS
)
{
spin_lock_irqsave
(
&
a3000_host
->
host_lock
,
flags
);
spin_lock_irqsave
(
a3000_host
->
host_lock
,
flags
);
wd33c93_intr
(
a3000_host
);
spin_unlock_irqrestore
(
&
a3000_host
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
a3000_host
->
host_lock
,
flags
);
return
IRQ_HANDLED
;
}
printk
(
"Non-serviced A3000 SCSI-interrupt? ISTR = %02x
\n
"
,
status
);
...
...
drivers/scsi/dec_esp.c
View file @
63322f88
...
...
@@ -348,7 +348,7 @@ static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count)
static
void
dma_drain
(
struct
NCR_ESP
*
esp
)
{
unsigned
long
nw
=
*
scsi_scr
;
unsigned
short
*
p
=
KSEG1ADDR
((
unsigned
short
*
)
((
*
scsi_dma_ptr
)
>>
3
)
);
unsigned
short
*
p
=
(
unsigned
short
*
)
KSEG1ADDR
((
*
scsi_dma_ptr
)
>>
3
);
/*
* Is there something in the dma buffers left?
...
...
@@ -478,8 +478,7 @@ static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write)
*/
static
void
dma_mmu_get_scsi_one
(
struct
NCR_ESP
*
esp
,
Scsi_Cmnd
*
sp
)
{
sp
->
SCp
.
have_data_in
=
PHYSADDR
(
sp
->
SCp
.
buffer
);
sp
->
SCp
.
ptr
=
(
char
*
)
((
unsigned
long
)
sp
->
SCp
.
have_data_in
);
sp
->
SCp
.
ptr
=
(
char
*
)
PHYSADDR
(
sp
->
SCp
.
buffer
);
}
static
void
dma_mmu_get_scsi_sgl
(
struct
NCR_ESP
*
esp
,
Scsi_Cmnd
*
sp
)
...
...
@@ -523,8 +522,8 @@ static void pmaz_dma_init_write(struct NCR_ESP *esp, __u32 vaddress, int length)
{
volatile
int
*
dmareg
=
(
volatile
int
*
)
(
esp
->
slot
+
DEC_SCSI_DMAREG
);
memcpy
((
void
*
)
(
esp
->
slot
+
DEC_SCSI_SRAM
+
ESP_TGT_DMA_SIZE
),
KSEG0ADDR
((
void
*
)
vaddress
),
length
);
memcpy
((
void
*
)(
esp
->
slot
+
DEC_SCSI_SRAM
+
ESP_TGT_DMA_SIZE
),
(
void
*
)
KSEG0ADDR
(
vaddress
),
length
);
*
dmareg
=
TC_ESP_DMAR_WRITE
|
TC_ESP_DMA_ADDR
(
esp
->
slot
+
DEC_SCSI_SRAM
+
ESP_TGT_DMA_SIZE
);
...
...
@@ -554,7 +553,5 @@ static void pmaz_dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write
static
void
pmaz_dma_mmu_get_scsi_one
(
struct
NCR_ESP
*
esp
,
Scsi_Cmnd
*
sp
)
{
sp
->
SCp
.
have_data_in
=
(
int
)
sp
->
SCp
.
ptr
=
(
char
*
)
KSEG0ADDR
((
sp
->
request_buffer
));
sp
->
SCp
.
ptr
=
(
char
*
)
KSEG0ADDR
((
sp
->
request_buffer
));
}
drivers/scsi/gvp11.c
View file @
63322f88
...
...
@@ -42,9 +42,9 @@ static irqreturn_t gvp11_intr (int irq, void *dummy, struct pt_regs *fp)
if
(
!
(
status
&
GVP11_DMAC_INT_PENDING
))
continue
;
spin_lock_irqsave
(
&
instance
->
host_lock
,
flags
);
spin_lock_irqsave
(
instance
->
host_lock
,
flags
);
wd33c93_intr
(
instance
);
spin_unlock_irqrestore
(
&
instance
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
instance
->
host_lock
,
flags
);
handled
=
1
;
}
return
IRQ_RETVAL
(
handled
);
...
...
drivers/scsi/oktagon_esp.c
View file @
63322f88
...
...
@@ -550,7 +550,7 @@ static void dma_invalidate(struct NCR_ESP *esp)
void
dma_mmu_get_scsi_one
(
struct
NCR_ESP
*
esp
,
Scsi_Cmnd
*
sp
)
{
sp
->
SCp
.
have_data_in
=
(
int
)
sp
->
SCp
.
ptr
=
sp
->
SCp
.
ptr
=
sp
->
request_buffer
;
}
...
...
drivers/scsi/sun3_NCR5380.c
View file @
63322f88
...
...
@@ -754,8 +754,8 @@ static void NCR5380_print_status (struct Scsi_Host *instance)
static
char
*
lprint_Scsi_Cmnd
(
Scsi_Cmnd
*
cmd
,
char
*
pos
,
char
*
buffer
,
int
length
);
static
int
NCR5380_proc_info
(
struct
Scsi_Host
*
instance
,
char
*
buffer
,
char
**
start
,
off_t
offse
t
,
int
length
,
int
inout
)
int
NCR5380_proc_info
(
struct
Scsi_Host
*
instance
,
char
*
buffer
,
char
**
star
t
,
off_t
offset
,
int
length
,
int
inout
)
{
char
*
pos
=
buffer
;
struct
NCR5380_hostdata
*
hostdata
;
...
...
drivers/scsi/wd33c93.c
View file @
63322f88
...
...
@@ -1920,7 +1920,7 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off
char
*
bp
;
char
tbuf
[
128
];
struct
Scsi_Host
*
instance
;
struct
WD33C93_hostdata
*
hd
;
Scsi_Cmnd
*
cmd
;
int
x
,
i
;
static
int
stop
=
0
;
...
...
drivers/video/Makefile
View file @
63322f88
...
...
@@ -26,7 +26,7 @@ obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgb
obj-$(CONFIG_FB_IGA)
+=
igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CONTROL)
+=
controlfb.o
obj-$(CONFIG_FB_PLATINUM)
+=
platinumfb.o
obj-$(CONFIG_FB_VALKYRIE)
+=
valkyriefb.o
obj-$(CONFIG_FB_VALKYRIE)
+=
valkyriefb.o
macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CT65550)
+=
chipsfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_ANAKIN)
+=
anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_CLPS711X)
+=
clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
...
...
drivers/video/logo/logo.c
View file @
63322f88
...
...
@@ -66,7 +66,7 @@ const struct linux_logo *fb_find_logo(int depth)
#endif
#ifdef CONFIG_LOGO_DEC_CLUT224
/* DEC Linux logo on MIPS/MIPS64 */
if
(
mips_machgroup
==
MACH_GROUP_
SGI
)
if
(
mips_machgroup
==
MACH_GROUP_
DEC
)
logo
=
&
logo_dec_clut224
;
#endif
#ifdef CONFIG_LOGO_MAC_CLUT224
...
...
drivers/video/macfb.c
View file @
63322f88
...
...
@@ -233,11 +233,11 @@ static int dafb_setpalette (unsigned int regno, unsigned int red,
/* Loop until we get to the register we want */
for
(
i
=
0
;
i
<
regno
;
i
++
)
{
nubus_writeb
(
info
->
cmap
[
i
].
red
>>
8
,
&
dafb_cmap_regs
->
lut
);
nubus_writeb
(
info
->
cmap
.
red
[
i
]
>>
8
,
&
dafb_cmap_regs
->
lut
);
nop
();
nubus_writeb
(
info
->
cmap
[
i
].
green
>>
8
,
&
dafb_cmap_regs
->
lut
);
nubus_writeb
(
info
->
cmap
.
green
[
i
]
>>
8
,
&
dafb_cmap_regs
->
lut
);
nop
();
nubus_writeb
(
info
->
cmap
[
i
].
blue
>>
8
,
&
dafb_cmap_regs
->
lut
);
nubus_writeb
(
info
->
cmap
.
blue
[
i
]
>>
8
,
&
dafb_cmap_regs
->
lut
);
nop
();
}
}
...
...
@@ -528,10 +528,10 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
* != 0 for invalid regno.
*/
if
(
regno
>=
info
->
cmap
.
len
)
if
(
regno
>=
fb_
info
->
cmap
.
len
)
return
1
;
switch
(
info
->
var
.
bits_per_pixel
)
{
switch
(
fb_
info
->
var
.
bits_per_pixel
)
{
case
1
:
/* We shouldn't get here */
break
;
...
...
@@ -539,21 +539,21 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
case
4
:
case
8
:
if
(
macfb_setpalette
)
macfb_setpalette
(
regno
,
red
,
green
,
blue
,
info
);
macfb_setpalette
(
regno
,
red
,
green
,
blue
,
fb_
info
);
else
return
1
;
break
;
case
16
:
if
(
info
->
var
.
red
.
offset
==
10
)
{
if
(
fb_
info
->
var
.
red
.
offset
==
10
)
{
/* 1:5:5:5 */
((
u32
*
)
(
info
->
pseudo_palette
))[
regno
]
=
((
u32
*
)
(
fb_
info
->
pseudo_palette
))[
regno
]
=
((
red
&
0xf800
)
>>
1
)
|
((
green
&
0xf800
)
>>
6
)
|
((
blue
&
0xf800
)
>>
11
)
|
((
transp
!=
0
)
<<
15
);
}
else
{
/* 0:5:6:5 */
((
u32
*
)
(
info
->
pseudo_palette
))[
regno
]
=
((
u32
*
)
(
fb_
info
->
pseudo_palette
))[
regno
]
=
((
red
&
0xf800
)
)
|
((
green
&
0xfc00
)
>>
5
)
|
((
blue
&
0xf800
)
>>
11
);
...
...
@@ -565,19 +565,19 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
red
>>=
8
;
green
>>=
8
;
blue
>>=
8
;
((
u32
*
)(
info
->
pseudo_palette
))[
regno
]
=
(
red
<<
info
->
var
.
red
.
offset
)
|
(
green
<<
info
->
var
.
green
.
offset
)
|
(
blue
<<
info
->
var
.
blue
.
offset
);
((
u32
*
)(
fb_
info
->
pseudo_palette
))[
regno
]
=
(
red
<<
fb_
info
->
var
.
red
.
offset
)
|
(
green
<<
fb_
info
->
var
.
green
.
offset
)
|
(
blue
<<
fb_
info
->
var
.
blue
.
offset
);
break
;
case
32
:
red
>>=
8
;
green
>>=
8
;
blue
>>=
8
;
((
u32
*
)(
info
->
pseudo_palette
))[
regno
]
=
(
red
<<
info
->
var
.
red
.
offset
)
|
(
green
<<
info
->
var
.
green
.
offset
)
|
(
blue
<<
info
->
var
.
blue
.
offset
);
((
u32
*
)(
fb_
info
->
pseudo_palette
))[
regno
]
=
(
red
<<
fb_
info
->
var
.
red
.
offset
)
|
(
green
<<
fb_
info
->
var
.
green
.
offset
)
|
(
blue
<<
fb_
info
->
var
.
blue
.
offset
);
break
;
}
return
0
;
...
...
drivers/video/valkyriefb.c
View file @
63322f88
...
...
@@ -66,15 +66,9 @@
#endif
#include <asm/pgtable.h>
#include <video/fbcon.h>
#include <video/fbcon-cfb8.h>
#include <video/fbcon-cfb16.h>
#include <video/macmodes.h>
#include "macmodes.h"
#include "valkyriefb.h"
static
int
can_soft_blank
=
1
;
#ifdef CONFIG_MAC
/* We don't yet have functions to read the PRAM... perhaps we can
adapt them from the PPC code? */
...
...
@@ -84,27 +78,17 @@ static int default_cmode = CMODE_8;
static
int
default_vmode
=
VMODE_NVRAM
;
static
int
default_cmode
=
CMODE_NVRAM
;
#endif
static
char
fontname
[
40
]
__initdata
=
{
0
};
static
int
switching
=
0
;
struct
fb_par_valkyrie
{
int
vmode
,
cmode
;
int
xres
,
yres
;
int
vxres
,
vyres
;
int
xoffset
,
yoffse
t
;
struct
valkyrie_regvals
*
ini
t
;
};
struct
fb_info_valkyrie
{
struct
fb_info
info
;
struct
fb_fix_screeninfo
fix
;
struct
fb_var_screeninfo
var
;
struct
display
disp
;
struct
fb_par_valkyrie
par
;
struct
{
__u8
red
,
green
,
blue
;
}
palette
[
256
];
struct
fb_info
info
;
struct
fb_par_valkyrie
par
;
struct
cmap_regs
*
cmap_regs
;
unsigned
long
cmap_regs_phys
;
...
...
@@ -116,9 +100,8 @@ struct fb_info_valkyrie {
int
sense
;
unsigned
long
total_vram
;
#ifdef FBCON_HAS_CFB16
u16
fbcon_cfb16_cmap
[
16
];
#endif
u32
pseudo_palette
[
16
];
};
/*
...
...
@@ -127,10 +110,9 @@ struct fb_info_valkyrie {
int
valkyriefb_init
(
void
);
int
valkyriefb_setup
(
char
*
);
static
int
valkyrie_set_var
(
struct
fb_var_screeninfo
*
var
,
int
con
,
struct
fb_info
*
info
);
static
int
valkyrie_get_cmap
(
struct
fb_cmap
*
cmap
,
int
kspc
,
int
con
,
struct
fb_info
*
info
);
static
int
valkyriefb_check_var
(
struct
fb_var_screeninfo
*
var
,
struct
fb_info
*
info
);
static
int
valkyriefb_set_par
(
struct
fb_info
*
info
);
static
int
valkyriefb_setcolreg
(
u_int
regno
,
u_int
red
,
u_int
green
,
u_int
blue
,
u_int
transp
,
struct
fb_info
*
info
);
static
int
valkyriefb_blank
(
int
blank_mode
,
struct
fb_info
*
info
);
...
...
@@ -138,136 +120,69 @@ static int valkyriefb_blank(int blank_mode, struct fb_info *info);
static
int
read_valkyrie_sense
(
struct
fb_info_valkyrie
*
p
);
static
inline
int
valkyrie_vram_reqd
(
int
video_mode
,
int
color_mode
);
static
void
set_valkyrie_clock
(
unsigned
char
*
params
);
static
void
valkyrie_set_par
(
const
struct
fb_par_valkyrie
*
p
,
struct
fb_info_valkyrie
*
info
);
static
inline
int
valkyrie_par_to_var
(
struct
fb_par_valkyrie
*
par
,
struct
fb_var_screeninfo
*
var
);
static
int
valkyrie_var_to_par
(
struct
fb_var_screeninfo
*
var
,
struct
fb_par_valkyrie
*
par
,
const
struct
fb_info
*
fb_info
);
static
void
valkyrie_init_info
(
struct
fb_info
*
info
,
struct
fb_info_valkyrie
*
p
);
static
void
valkyrie_par_to_display
(
struct
fb_par_valkyrie
*
par
,
struct
display
*
disp
,
struct
fb_fix_screeninfo
*
fix
,
struct
fb_info_valkyrie
*
p
);
static
void
valkyrie_init_display
(
struct
display
*
disp
);
static
void
valkyrie_par_to_fix
(
struct
fb_par_valkyrie
*
par
,
struct
fb_fix_screeninfo
*
fix
,
struct
fb_info_valkyrie
*
p
);
static
void
valkyrie_par_to_fix
(
struct
fb_par_valkyrie
*
par
,
struct
fb_fix_screeninfo
*
fix
);
static
void
valkyrie_init_fix
(
struct
fb_fix_screeninfo
*
fix
,
struct
fb_info_valkyrie
*
p
);
static
struct
fb_ops
valkyriefb_ops
=
{
.
owner
=
THIS_MODULE
,
.
fb_set_var
=
valkyrie_set_var
,
.
fb_get_cmap
=
valkyrie_get_cmap
,
.
fb_set_cmap
=
gen_set_cmap
,
.
fb_check_var
=
valkyriefb_check_var
,
.
fb_set_par
=
valkyriefb_set_par
,
.
fb_setcolreg
=
valkyriefb_setcolreg
,
.
fb_blank
=
valkyriefb_blank
,
.
fb_fillrect
=
cfb_fillrect
,
.
fb_copyarea
=
cfb_copyarea
,
.
fb_imageblit
=
cfb_imageblit
,
.
fb_cursor
=
soft_cursor
,
};
static
int
valkyriefb_getcolreg
(
u_int
regno
,
u_int
*
red
,
u_int
*
green
,
u_int
*
blue
,
u_int
*
transp
,
struct
fb_info
*
info
);
/* Sets everything according to var */
static
int
valkyrie_set_var
(
struct
fb_var_screeninfo
*
var
,
int
con
,
struct
fb_info
*
info
)
/* Sets the video mode according to info->var */
static
int
valkyriefb_set_par
(
struct
fb_info
*
info
)
{
struct
fb_info_valkyrie
*
p
=
(
struct
fb_info_valkyrie
*
)
info
;
struct
display
*
disp
;
struct
fb_par_valkyrie
par
;
int
depthchange
,
err
;
volatile
struct
valkyrie_regs
*
valkyrie_regs
=
p
->
valkyrie_regs
;
struct
fb_par_valkyrie
*
par
=
info
->
par
;
struct
valkyrie_regvals
*
init
;
int
err
;
disp
=
(
con
>=
0
)
?
&
fb_display
[
con
]
:
&
p
->
disp
;
if
((
err
=
valkyrie_var_to_par
(
var
,
&
par
,
info
)))
{
/* printk (KERN_ERR "Error in valkyrie_set_var, calling valkyrie_var_to_par: %d.\n", err); */
if
((
err
=
valkyrie_var_to_par
(
&
info
->
var
,
par
,
info
)))
return
err
;
}
if
((
var
->
activate
&
FB_ACTIVATE_MASK
)
!=
FB_ACTIVATE_NOW
)
{
/* printk(KERN_ERR "Not activating, in valkyrie_set_var.\n"); */
valkyrie_par_to_var
(
&
par
,
var
);
return
0
;
}
/*
* I know, we want to use fb_display[con], but grab certain info
* from p->var instead.
*/
#define DIRTY(x) (p->var.x != var->x)
depthchange
=
DIRTY
(
bits_per_pixel
);
/* adding "&& !DIRTY(pixclock)" corrects vmode-switching problems */
if
(
!
DIRTY
(
xres
)
&&
!
DIRTY
(
yres
)
&&
!
DIRTY
(
xres_virtual
)
&&
!
DIRTY
(
yres_virtual
)
&&
!
DIRTY
(
bits_per_pixel
)
&&
!
DIRTY
(
pixclock
))
{
valkyrie_par_to_var
(
&
par
,
var
);
p
->
var
=
disp
->
var
=
*
var
;
return
0
;
}
valkyrie_par_to_fix
(
par
,
&
info
->
fix
);
p
->
par
=
par
;
valkyrie_par_to_var
(
&
par
,
var
);
p
->
var
=
*
var
;
valkyrie_par_to_fix
(
&
par
,
&
p
->
fix
,
p
);
valkyrie_par_to_display
(
&
par
,
disp
,
&
p
->
fix
,
p
);
p
->
disp
=
*
disp
;
if
(
info
->
changevar
&&
!
switching
)
{
/* Don't want to do this if just switching consoles. */
(
*
info
->
changevar
)(
con
);
}
if
(
con
==
info
->
currcon
)
valkyrie_set_par
(
&
par
,
p
);
if
(
depthchange
)
if
((
err
=
fb_alloc_cmap
(
&
disp
->
cmap
,
0
,
0
)))
return
err
;
if
(
depthchange
||
switching
)
do_install_cmap
(
con
,
info
);
return
0
;
}
/* Reset the valkyrie */
out_8
(
&
valkyrie_regs
->
status
.
r
,
0
);
udelay
(
100
);
static
int
valkyrie_get_cmap
(
struct
fb_cmap
*
cmap
,
int
kspc
,
int
con
,
struct
fb_info
*
info
)
{
if
(
con
==
info
->
currcon
)
{
/* current console? */
return
fb_get_cmap
(
cmap
,
kspc
,
valkyriefb_getcolreg
,
info
);
}
if
(
fb_display
[
con
].
cmap
.
len
)
{
/* non default colormap? */
fb_copy_cmap
(
&
fb_display
[
con
].
cmap
,
cmap
,
kspc
?
0
:
2
);
}
else
{
int
size
=
fb_display
[
con
].
var
.
bits_per_pixel
==
16
?
32
:
256
;
fb_copy_cmap
(
fb_default_cmap
(
size
),
cmap
,
kspc
?
0
:
2
);
}
return
0
;
}
/* Initialize display timing registers */
init
=
par
->
init
;
out_8
(
&
valkyrie_regs
->
mode
.
r
,
init
->
mode
|
0x80
);
out_8
(
&
valkyrie_regs
->
depth
.
r
,
par
->
cmode
+
3
);
set_valkyrie_clock
(
init
->
clock_params
);
udelay
(
100
);
static
int
valkyriefb_switch
(
int
con
,
struct
fb_info
*
fb
)
{
struct
fb_info_valkyrie
*
info
=
(
struct
fb_info_valkyrie
*
)
fb
;
struct
fb_par_valkyrie
par
;
/* Turn on display */
out_8
(
&
valkyrie_regs
->
mode
.
r
,
init
->
mode
);
if
(
fb_display
[
fb
->
currcon
].
cmap
.
len
)
fb_get_cmap
(
&
fb_display
[
fb
->
currcon
].
cmap
,
1
,
valkyriefb_getcolreg
,
fb
);
fb
->
currcon
=
con
;
#if 1
valkyrie_var_to_par
(
&
fb_display
[
fb
->
currcon
].
var
,
&
par
,
fb
);
valkyrie_set_par
(
&
par
,
info
);
do_install_cmap
(
con
,
fb
);
#else
/* I see no reason not to do this. Minus info->changevar(). */
/* DOH. This makes valkyrie_set_var compare, you guessed it, */
/* fb_display[con].var (first param), and fb_display[con].var! */
/* Perhaps I just fixed that... */
switching
=
1
;
valkyrie_set_var
(
&
fb_display
[
con
].
var
,
con
,
info
);
switching
=
0
;
#endif
return
0
;
}
static
int
valkyriefb_updatevar
(
int
con
,
struct
fb_info
*
info
)
static
int
valkyriefb_check_var
(
struct
fb_var_screeninfo
*
var
,
struct
fb_info
*
info
)
{
int
err
;
struct
fb_par_valkyrie
par
;
if
((
err
=
valkyrie_var_to_par
(
var
,
&
par
,
info
)))
return
err
;
valkyrie_par_to_var
(
&
par
,
var
);
return
0
;
}
static
int
valkyriefb_blank
(
int
blank_mode
,
struct
fb_info
*
info
)
{
/*
* Blank the screen if blank_mode != 0, else unblank. If blank_mode == NULL
* then the caller blanks by setting the CLUT (Color Look Up Table) to all
...
...
@@ -278,48 +193,34 @@ static int valkyriefb_blank(int blank_mode, struct fb_info *info)
* blank_mode == 3: suspend hsync
* blank_mode == 4: powerdown
*/
struct
fb_info_valkyrie
*
p
=
(
struct
fb_info_valkyrie
*
)
info
;
struct
valkyrie_regvals
*
init
;
unsigned
char
vmode
;
if
(
p
->
disp
.
can_soft_blank
&&
((
vmode
=
p
->
par
.
vmode
)
>
0
)
&&
(
vmode
<=
VMODE_MAX
)
&&
((
init
=
valkyrie_reg_init
[
vmode
-
1
])
!=
NULL
))
{
if
(
blank_mode
)
--
blank_mode
;
switch
(
blank_mode
)
{
default:
/* unblank */
out_8
(
&
p
->
valkyrie_regs
->
mode
.
r
,
init
->
mode
);
break
;
case
VESA_VSYNC_SUSPEND
:
case
VESA_HSYNC_SUSPEND
:
/*
* [kps] Value extracted from MacOS. I don't know
* whether this bit disables hsync or vsync, or
* whether the hardware can do the other as well.
*/
out_8
(
&
p
->
valkyrie_regs
->
mode
.
r
,
init
->
mode
|
0x40
);
break
;
case
VESA_POWERDOWN
:
out_8
(
&
p
->
valkyrie_regs
->
mode
.
r
,
0x66
);
break
;
}
}
return
0
;
}
static
int
valkyriefb_getcolreg
(
u_int
regno
,
u_int
*
red
,
u_int
*
green
,
u_int
*
blue
,
u_int
*
transp
,
struct
fb_info
*
info
)
static
int
valkyriefb_blank
(
int
blank_mode
,
struct
fb_info
*
info
)
{
struct
fb_info_valkyrie
*
p
=
(
struct
fb_info_valkyrie
*
)
info
;
struct
fb_par_valkyrie
*
par
=
info
->
par
;
struct
valkyrie_regvals
*
init
=
par
->
init
;
if
(
regno
>
255
)
if
(
init
==
NULL
)
return
1
;
*
red
=
(
p
->
palette
[
regno
].
red
<<
8
)
|
p
->
palette
[
regno
].
red
;
*
green
=
(
p
->
palette
[
regno
].
green
<<
8
)
|
p
->
palette
[
regno
].
green
;
*
blue
=
(
p
->
palette
[
regno
].
blue
<<
8
)
|
p
->
palette
[
regno
].
blue
;
switch
(
blank_mode
)
{
case
0
:
/* unblank */
out_8
(
&
p
->
valkyrie_regs
->
mode
.
r
,
init
->
mode
);
break
;
case
1
:
return
1
;
/* get caller to set CLUT to all black */
case
VESA_VSYNC_SUSPEND
+
1
:
case
VESA_HSYNC_SUSPEND
+
1
:
/*
* [kps] Value extracted from MacOS. I don't know
* whether this bit disables hsync or vsync, or
* whether the hardware can do the other as well.
*/
out_8
(
&
p
->
valkyrie_regs
->
mode
.
r
,
init
->
mode
|
0x40
);
break
;
case
VESA_POWERDOWN
+
1
:
out_8
(
&
p
->
valkyrie_regs
->
mode
.
r
,
0x66
);
break
;
}
return
0
;
}
...
...
@@ -328,16 +229,13 @@ static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
{
struct
fb_info_valkyrie
*
p
=
(
struct
fb_info_valkyrie
*
)
info
;
volatile
struct
cmap_regs
*
cmap_regs
=
p
->
cmap_regs
;
struct
fb_par_valkyrie
*
par
=
info
->
par
;
if
(
regno
>
255
)
return
1
;
red
>>=
8
;
green
>>=
8
;
blue
>>=
8
;
p
->
palette
[
regno
].
red
=
red
;
p
->
palette
[
regno
].
green
=
green
;
p
->
palette
[
regno
].
blue
=
blue
;
/* tell clut which address to fill */
out_8
(
&
p
->
cmap_regs
->
addr
,
regno
);
...
...
@@ -347,11 +245,9 @@ static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
out_8
(
&
cmap_regs
->
lut
,
green
);
out_8
(
&
cmap_regs
->
lut
,
blue
);
if
(
regno
<
16
)
{
#ifdef FBCON_HAS_CFB16
p
->
fbcon_cfb16_cmap
[
regno
]
=
(
regno
<<
10
)
|
(
regno
<<
5
)
|
regno
;
#endif
}
if
(
regno
<
16
&&
par
->
cmode
==
CMODE_16
)
((
u32
*
)
info
->
pseudo_palette
)[
regno
]
=
(
regno
<<
10
)
|
(
regno
<<
5
)
|
regno
;
return
0
;
}
...
...
@@ -359,10 +255,11 @@ static int valkyriefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
static
int
valkyrie_vram_reqd
(
int
video_mode
,
int
color_mode
)
{
int
pitch
;
struct
valkyrie_regvals
*
init
=
valkyrie_reg_init
[
video_mode
-
1
];
if
((
pitch
=
valkyrie_reg_init
[
video_mode
-
1
]
->
pitch
[
color_mode
])
==
0
)
pitch
=
2
*
valkyrie_reg_init
[
video_mode
-
1
]
->
pitch
[
0
];
return
valkyrie_reg_init
[
video_mode
-
1
]
->
vres
*
pitch
;
if
((
pitch
=
init
->
pitch
[
color_mode
])
==
0
)
pitch
=
2
*
init
->
pitch
[
0
];
return
init
->
vres
*
pitch
;
}
static
void
set_valkyrie_clock
(
unsigned
char
*
params
)
...
...
@@ -380,14 +277,10 @@ static void set_valkyrie_clock(unsigned char *params)
#endif
}
static
void
__init
init_valkyri
e
(
struct
fb_info_valkyrie
*
p
)
static
void
__init
valkyrie_choose_mod
e
(
struct
fb_info_valkyrie
*
p
)
{
struct
fb_par_valkyrie
*
par
=
&
p
->
par
;
struct
fb_var_screeninfo
var
;
int
j
,
k
;
p
->
sense
=
read_valkyrie_sense
(
p
);
printk
(
KERN_INFO
"Monitor sense value = 0x%x
,
"
,
p
->
sense
);
printk
(
KERN_INFO
"Monitor sense value = 0x%x
\n
"
,
p
->
sense
);
/* Try to pick a video mode out of NVRAM if we have one. */
#ifndef CONFIG_MAC
...
...
@@ -409,80 +302,22 @@ static void __init init_valkyrie(struct fb_info_valkyrie *p)
#endif
/*
* Reduce the pixel size if we don't have enough VRAM or bandwi
td
h.
* Reduce the pixel size if we don't have enough VRAM or bandwi
dt
h.
*/
if
(
default_cmode
<
CMODE_8
||
default_cmode
>
CMODE_16
||
valkyrie_reg_init
[
default_vmode
-
1
]
->
pitch
[
default_cmode
]
==
0
||
valkyrie_vram_reqd
(
default_vmode
,
default_cmode
)
>
p
->
total_vram
)
if
(
default_cmode
<
CMODE_8
||
default_cmode
>
CMODE_16
||
valkyrie_reg_init
[
default_vmode
-
1
]
->
pitch
[
default_cmode
]
==
0
||
valkyrie_vram_reqd
(
default_vmode
,
default_cmode
)
>
p
->
total_vram
)
default_cmode
=
CMODE_8
;
printk
(
KERN_INFO
"using video mode %d and color mode %d.
\n
"
,
default_vmode
,
default_cmode
);
mac_vmode_to_var
(
default_vmode
,
default_cmode
,
&
var
);
if
(
valkyrie_var_to_par
(
&
var
,
par
,
&
p
->
info
))
{
printk
(
KERN_ERR
"valkyriefb: can't set default video mode
\n
"
);
return
;
}
valkyrie_init_fix
(
&
p
->
fix
,
p
);
valkyrie_par_to_fix
(
&
p
->
par
,
&
p
->
fix
,
p
);
valkyrie_par_to_var
(
&
p
->
par
,
&
p
->
var
);
valkyrie_init_display
(
&
p
->
disp
);
valkyrie_par_to_display
(
&
p
->
par
,
&
p
->
disp
,
&
p
->
fix
,
p
);
valkyrie_init_info
(
&
p
->
info
,
p
);
/* Initialize colormap */
for
(
j
=
0
;
j
<
16
;
j
++
)
{
k
=
color_table
[
j
];
p
->
palette
[
j
].
red
=
default_red
[
k
];
p
->
palette
[
j
].
green
=
default_grn
[
k
];
p
->
palette
[
j
].
blue
=
default_blu
[
k
];
}
valkyrie_set_var
(
&
var
,
-
1
,
&
p
->
info
);
if
(
register_framebuffer
(
&
p
->
info
)
<
0
)
{
kfree
(
p
);
return
;
}
printk
(
KERN_INFO
"fb%d: valkyrie frame buffer device
\n
"
,
p
->
info
.
node
);
}
static
void
valkyrie_set_par
(
const
struct
fb_par_valkyrie
*
par
,
struct
fb_info_valkyrie
*
p
)
{
struct
valkyrie_regvals
*
init
;
volatile
struct
valkyrie_regs
*
valkyrie_regs
=
p
->
valkyrie_regs
;
int
vmode
,
cmode
;
vmode
=
par
->
vmode
;
cmode
=
par
->
cmode
;
if
(
vmode
<=
0
||
vmode
>
VMODE_MAX
||
(
init
=
valkyrie_reg_init
[
vmode
-
1
])
==
NULL
)
panic
(
"valkyrie: display mode %d not supported"
,
vmode
);
/* Reset the valkyrie */
out_8
(
&
valkyrie_regs
->
status
.
r
,
0
);
udelay
(
100
);
/* Initialize display timing registers */
out_8
(
&
valkyrie_regs
->
mode
.
r
,
init
->
mode
|
0x80
);
out_8
(
&
valkyrie_regs
->
depth
.
r
,
cmode
+
3
);
set_valkyrie_clock
(
init
->
clock_params
);
udelay
(
100
);
/* Turn on display */
out_8
(
&
valkyrie_regs
->
mode
.
r
,
init
->
mode
);
printk
(
KERN_INFO
"using video mode %d and color mode %d.
\n
"
,
default_vmode
,
default_cmode
);
}
int
__init
valkyriefb_init
(
void
)
{
struct
fb_info_valkyrie
*
p
;
unsigned
long
frame_buffer_phys
,
cmap_regs_phys
,
flags
;
int
err
;
#ifdef CONFIG_MAC
if
(
!
MACH_IS_MAC
)
...
...
@@ -503,10 +338,11 @@ int __init valkyriefb_init(void)
if
(
dp
==
0
)
return
0
;
if
(
dp
->
n_addrs
!=
1
)
{
printk
(
KERN_ERR
"expecting 1 address for valkyrie (got %d)"
,
dp
->
n_addrs
);
if
(
dp
->
n_addrs
!=
1
)
{
printk
(
KERN_ERR
"expecting 1 address for valkyrie (got %d)
\n
"
,
dp
->
n_addrs
);
return
0
;
}
}
frame_buffer_phys
=
dp
->
addrs
[
0
].
address
;
cmap_regs_phys
=
dp
->
addrs
[
0
].
address
+
0x304000
;
...
...
@@ -515,7 +351,7 @@ int __init valkyriefb_init(void)
p
=
kmalloc
(
sizeof
(
*
p
),
GFP_ATOMIC
);
if
(
p
==
0
)
return
0
;
return
-
ENOMEM
;
memset
(
p
,
0
,
sizeof
(
*
p
));
/* Map in frame buffer and registers */
...
...
@@ -524,14 +360,42 @@ int __init valkyriefb_init(void)
return
0
;
}
p
->
total_vram
=
0x100000
;
p
->
frame_buffer_phys
=
frame_buffer_phys
;
p
->
frame_buffer_phys
=
frame_buffer_phys
;
p
->
frame_buffer
=
__ioremap
(
frame_buffer_phys
,
p
->
total_vram
,
flags
);
p
->
cmap_regs_phys
=
cmap_regs_phys
;
p
->
cmap_regs
=
ioremap
(
p
->
cmap_regs_phys
,
0x1000
);
p
->
valkyrie_regs_phys
=
cmap_regs_phys
+
0x6000
;
p
->
valkyrie_regs
=
ioremap
(
p
->
valkyrie_regs_phys
,
0x1000
);
init_valkyrie
(
p
);
err
=
-
ENOMEM
;
if
(
p
->
frame_buffer
==
NULL
||
p
->
cmap_regs
==
NULL
||
p
->
valkyrie_regs
==
NULL
)
{
printk
(
KERN_ERR
"valkyriefb: couldn't map resources
\n
"
);
goto
out_free
;
}
valkyrie_choose_mode
(
p
);
mac_vmode_to_var
(
default_vmode
,
default_cmode
,
&
p
->
info
.
var
);
valkyrie_init_info
(
&
p
->
info
,
p
);
valkyrie_init_fix
(
&
p
->
info
.
fix
,
p
);
if
(
valkyriefb_set_par
(
&
p
->
info
))
/* "can't happen" */
printk
(
KERN_ERR
"valkyriefb: can't set default video mode
\n
"
);
if
((
err
=
register_framebuffer
(
&
p
->
info
))
!=
0
)
goto
out_free
;
printk
(
KERN_INFO
"fb%d: valkyrie frame buffer device
\n
"
,
p
->
info
.
node
);
return
0
;
out_free:
if
(
p
->
frame_buffer
)
iounmap
(
p
->
frame_buffer
);
if
(
p
->
cmap_regs
)
iounmap
(
p
->
cmap_regs
);
if
(
p
->
valkyrie_regs
)
iounmap
(
p
->
valkyrie_regs
);
kfree
(
p
);
return
err
;
}
/*
...
...
@@ -541,22 +405,22 @@ static int read_valkyrie_sense(struct fb_info_valkyrie *p)
{
int
sense
,
in
;
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
0
);
/* release all lines */
__delay
(
20000
);
sense
=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x70
)
<<
4
;
/* drive each sense line low in turn and collect the other 2 */
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
4
);
/* drive A low */
__delay
(
20000
);
sense
|=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x30
);
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
2
);
/* drive B low */
__delay
(
20000
);
sense
|=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x40
)
>>
3
;
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
0
);
/* release all lines */
__delay
(
20000
);
sense
=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x70
)
<<
4
;
/* drive each sense line low in turn and collect the other 2 */
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
4
);
/* drive A low */
__delay
(
20000
);
sense
|=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x30
);
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
2
);
/* drive B low */
__delay
(
20000
);
sense
|=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x40
)
>>
3
;
sense
|=
(
in
&
0x10
)
>>
2
;
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
1
);
/* drive C low */
__delay
(
20000
);
sense
|=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x60
)
>>
5
;
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
1
);
/* drive C low */
__delay
(
20000
);
sense
|=
((
in
=
in_8
(
&
p
->
valkyrie_regs
->
msense
.
r
))
&
0x60
)
>>
5
;
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
7
);
out_8
(
&
p
->
valkyrie_regs
->
msense
.
r
,
7
);
return
sense
;
}
...
...
@@ -565,8 +429,6 @@ static int read_valkyrie_sense(struct fb_info_valkyrie *p)
* This routine takes a user-supplied var,
* and picks the best vmode/cmode from it.
*/
static
int
valkyrie_var_to_par
(
struct
fb_var_screeninfo
*
var
,
struct
fb_par_valkyrie
*
par
,
const
struct
fb_info
*
fb_info
)
/* [bkn] I did a major overhaul of this function.
*
...
...
@@ -589,55 +451,56 @@ static int valkyrie_var_to_par(struct fb_var_screeninfo *var,
* good start...
*/
static
int
valkyrie_var_to_par
(
struct
fb_var_screeninfo
*
var
,
struct
fb_par_valkyrie
*
par
,
const
struct
fb_info
*
fb_info
)
{
int
bpp
=
var
->
bits_per_pixel
;
int
vmode
,
cmode
;
struct
valkyrie_regvals
*
init
;
struct
fb_info_valkyrie
*
p
=
(
struct
fb_info_valkyrie
*
)
fb_info
;
if
(
mac_var_to_vmode
(
var
,
&
par
->
vmode
,
&
par
->
cmode
)
!=
0
)
{
printk
(
KERN_ERR
"valkyrie_var_to_par: %dx%dx%d unsuccessful.
\n
"
,
var
->
xres
,
var
->
yres
,
var
->
bits_per_pixel
);
if
(
mac_var_to_vmode
(
var
,
&
vmode
,
&
cmode
)
!=
0
)
{
printk
(
KERN_ERR
"valkyriefb: can't do %dx%dx%d.
\n
"
,
var
->
xres
,
var
->
yres
,
var
->
bits_per_pixel
);
return
-
EINVAL
;
}
/* Check if we know about the wanted video mode */
if
(
!
valkyrie_reg_init
[
par
->
vmode
-
1
])
{
printk
(
KERN_ERR
"valkyrie
_var_to_par: vmode %d not valid.
\n
"
,
par
->
vmode
);
if
(
vmode
<
1
||
vmode
>
VMODE_MAX
||
!
valkyrie_reg_init
[
vmode
-
1
])
{
printk
(
KERN_ERR
"valkyrie
fb: vmode %d not valid.
\n
"
,
vmode
);
return
-
EINVAL
;
}
par
->
xres
=
var
->
xres
;
par
->
yres
=
var
->
yres
;
par
->
xoffset
=
0
;
par
->
yoffset
=
0
;
par
->
vxres
=
par
->
xres
;
par
->
vyres
=
par
->
yres
;
if
(
var
->
xres_virtual
>
var
->
xres
||
var
->
yres_virtual
>
var
->
yres
||
var
->
xoffset
!=
0
||
var
->
yoffset
!=
0
)
{
if
(
cmode
!=
CMODE_8
&&
cmode
!=
CMODE_16
)
{
printk
(
KERN_ERR
"valkyriefb: cmode %d not valid.
\n
"
,
cmode
);
return
-
EINVAL
;
}
if
(
bpp
<=
8
)
par
->
cmode
=
CMODE_8
;
else
if
(
bpp
<=
16
)
par
->
cmode
=
CMODE_16
;
else
{
printk
(
KERN_ERR
"valkyrie_var_to_par: cmode %d not supported.
\n
"
,
par
->
cmode
);
if
(
var
->
xres_virtual
>
var
->
xres
||
var
->
yres_virtual
>
var
->
yres
||
var
->
xoffset
!=
0
||
var
->
yoffset
!=
0
)
{
return
-
EINVAL
;
}
init
=
valkyrie_reg_init
[
par
->
vmode
-
1
];
if
(
init
->
pitch
[
par
->
cmode
]
==
0
)
{
printk
(
KERN_ERR
"valkyrie_var_to_par: vmode %d does not support cmode %d.
\n
"
,
par
->
vmode
,
par
->
cmode
);
init
=
valkyrie_reg_init
[
vmode
-
1
];
if
(
init
->
pitch
[
cmode
]
==
0
)
{
printk
(
KERN_ERR
"valkyriefb: vmode %d does not support "
"cmode %d.
\n
"
,
vmode
,
cmode
);
return
-
EINVAL
;
}
if
(
valkyrie_vram_reqd
(
par
->
vmode
,
par
->
cmode
)
>
p
->
total_vram
)
{
printk
(
KERN_ERR
"valkyrie_var_to_par: not enough ram for vmode %d, cmode %d.
\n
"
,
par
->
vmode
,
par
->
cmode
);
if
(
valkyrie_vram_reqd
(
vmode
,
cmode
)
>
p
->
total_vram
)
{
printk
(
KERN_ERR
"valkyriefb: not enough ram for vmode %d, "
"cmode %d.
\n
"
,
vmode
,
cmode
);
return
-
EINVAL
;
}
par
->
vmode
=
vmode
;
par
->
cmode
=
cmode
;
par
->
init
=
init
;
par
->
xres
=
var
->
xres
;
par
->
yres
=
var
->
yres
;
par
->
vxres
=
par
->
xres
;
par
->
vyres
=
par
->
yres
;
return
0
;
}
...
...
@@ -653,7 +516,9 @@ static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valk
fix
->
mmio_start
=
p
->
valkyrie_regs_phys
;
fix
->
mmio_len
=
sizeof
(
struct
valkyrie_regs
);
fix
->
type
=
FB_TYPE_PACKED_PIXELS
;
fix
->
smem_start
=
p
->
frame_buffer_phys
+
0x1000
;
fix
->
smem_len
=
p
->
total_vram
;
fix
->
type_aux
=
0
;
fix
->
ywrapstep
=
0
;
fix
->
ypanstep
=
0
;
...
...
@@ -663,67 +528,23 @@ static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valk
/* Fix must already be inited above */
static
void
valkyrie_par_to_fix
(
struct
fb_par_valkyrie
*
par
,
struct
fb_fix_screeninfo
*
fix
,
struct
fb_info_valkyrie
*
p
)
struct
fb_fix_screeninfo
*
fix
)
{
fix
->
smem_start
=
p
->
frame_buffer_phys
+
0x1000
;
#if 1
fix
->
smem_len
=
valkyrie_vram_reqd
(
par
->
vmode
,
par
->
cmode
);
#else
fix
->
smem_len
=
p
->
total_vram
;
#endif
fix
->
visual
=
(
par
->
cmode
==
CMODE_8
)
?
FB_VISUAL_PSEUDOCOLOR
:
FB_VISUAL_DIRECTCOLOR
;
fix
->
line_length
=
par
->
vxres
<<
par
->
cmode
;
/* ywrapstep, xpanstep, ypanstep */
}
static
void
valkyrie_init_display
(
struct
display
*
disp
)
{
memset
(
disp
,
0
,
sizeof
(
*
disp
));
disp
->
can_soft_blank
=
can_soft_blank
;
disp
->
scrollmode
=
SCROLL_YREDRAW
;
}
static
void
valkyrie_par_to_display
(
struct
fb_par_valkyrie
*
par
,
struct
display
*
disp
,
struct
fb_fix_screeninfo
*
fix
,
struct
fb_info_valkyrie
*
p
)
{
disp
->
var
=
p
->
var
;
if
(
disp
->
scrollmode
!=
SCROLL_YREDRAW
)
{
printk
(
KERN_ERR
"Scroll mode not YREDRAW in valkyrie_par_to_display
\n
"
);
disp
->
scrollmode
=
SCROLL_YREDRAW
;
}
switch
(
par
->
cmode
)
{
#ifdef FBCON_HAS_CFB8
case
CMODE_8
:
disp
->
dispsw
=
&
fbcon_cfb8
;
break
;
#endif
#ifdef FBCON_HAS_CFB16
case
CMODE_16
:
disp
->
dispsw
=
&
fbcon_cfb16
;
disp
->
dispsw_data
=
p
->
fbcon_cfb16_cmap
;
break
;
#endif
default:
disp
->
dispsw
=
&
fbcon_dummy
;
break
;
}
}
static
void
__init
valkyrie_init_info
(
struct
fb_info
*
info
,
struct
fb_info_valkyrie
*
p
)
{
strcpy
(
info
->
modename
,
p
->
fix
.
id
);
info
->
fbops
=
&
valkyriefb_ops
;
info
->
screen_base
=
(
char
*
)
p
->
frame_buffer
+
0x1000
;
info
->
disp
=
&
p
->
disp
;
info
->
currcon
=
-
1
;
strcpy
(
info
->
fontname
,
fontname
);
info
->
changevar
=
NULL
;
info
->
switch_con
=
&
valkyriefb_switch
;
info
->
updatevar
=
&
valkyriefb_updatevar
;
info
->
flags
=
FBINFO_FLAG_DEFAULT
;
info
->
pseudo_palette
=
p
->
pseudo_palette
;
fb_alloc_cmap
(
&
info
->
cmap
,
256
,
0
);
info
->
par
=
&
p
->
par
;
}
...
...
@@ -738,41 +559,23 @@ int __init valkyriefb_setup(char *options)
return
0
;
while
((
this_opt
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!
strncmp
(
this_opt
,
"font:"
,
5
))
{
char
*
p
;
int
i
;
p
=
this_opt
+
5
;
for
(
i
=
0
;
i
<
sizeof
(
fontname
)
-
1
;
i
++
)
if
(
!*
p
||
*
p
==
' '
||
*
p
==
','
)
break
;
memcpy
(
fontname
,
this_opt
+
5
,
i
);
fontname
[
i
]
=
0
;
}
else
if
(
!
strncmp
(
this_opt
,
"vmode:"
,
6
))
{
if
(
!
strncmp
(
this_opt
,
"vmode:"
,
6
))
{
int
vmode
=
simple_strtoul
(
this_opt
+
6
,
NULL
,
0
);
if
(
vmode
>
0
&&
vmode
<=
VMODE_MAX
)
if
(
vmode
>
0
&&
vmode
<=
VMODE_MAX
)
default_vmode
=
vmode
;
}
else
if
(
!
strncmp
(
this_opt
,
"cmode:"
,
6
))
{
int
depth
=
simple_strtoul
(
this_opt
+
6
,
NULL
,
0
);
switch
(
depth
)
{
case
8
:
default_cmode
=
CMODE_8
;
break
;
case
15
:
case
16
:
default_cmode
=
CMODE_16
;
break
;
case
8
:
default_cmode
=
CMODE_8
;
break
;
case
15
:
case
16
:
default_cmode
=
CMODE_16
;
break
;
}
}
/* XXX - remove these options once blanking has been tested */
else
if
(
!
strncmp
(
this_opt
,
"noblank"
,
7
))
{
can_soft_blank
=
0
;
}
else
if
(
!
strncmp
(
this_opt
,
"blank"
,
5
))
{
can_soft_blank
=
1
;
}
}
return
0
;
}
...
...
include/asm-m68k/cacheflush.h
View file @
63322f88
...
...
@@ -124,34 +124,10 @@ extern inline void __flush_page_to_ram(void *vaddr)
}
}
#define flush_dcache_page(page) __flush_page_to_ram(page_address(page))
#define flush_icache_page(vma,
pg) do { } while (0
)
#define flush_dcache_page(page)
__flush_page_to_ram(page_address(page))
#define flush_icache_page(vma,
page) __flush_page_to_ram(page_address(page)
)
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
/* Push n pages at kernel virtual address and clear the icache */
/* RZ: use cpush %bc instead of cpush %dc, cinv %ic */
extern
inline
void
flush_icache_range
(
unsigned
long
address
,
unsigned
long
endaddr
)
{
if
(
CPU_IS_040_OR_060
)
{
short
n
=
(
endaddr
-
address
+
PAGE_SIZE
-
1
)
/
PAGE_SIZE
;
while
(
--
n
>=
0
)
{
__asm__
__volatile__
(
"nop
\n\t
"
".chip 68040
\n\t
"
"cpushp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
virt_to_phys
((
void
*
)
address
)));
address
+=
PAGE_SIZE
;
}
}
else
{
unsigned
long
tmp
;
__asm__
__volatile__
(
"movec %%cacr,%0
\n\t
"
"orw %1,%0
\n\t
"
"movec %0,%%cacr"
:
"=&d"
(
tmp
)
:
"di"
(
FLUSH_I
));
}
}
extern
void
flush_icache_range
(
unsigned
long
address
,
unsigned
long
endaddr
);
#endif
/* _M68K_CACHEFLUSH_H */
include/asm-m68k/checksum.h
View file @
63322f88
#ifndef _M68K_CHECKSUM_H
#define _M68K_CHECKSUM_H
#include <linux/in6.h>
/*
* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
...
...
include/asm-m68k/dma-mapping.h
View file @
63322f88
#ifndef _M68K_DMA_MAPPING_H
#define _M68K_DMA_MAPPING_H
#include <linux/config.h>
#ifdef CONFIG_PCI
#include <asm-generic/dma-mapping.h>
#endif
#endif
/* _M68K_DMA_MAPPING_H */
include/asm-m68k/entry.h
View file @
63322f88
...
...
@@ -34,11 +34,11 @@
/* the following macro is used when enabling interrupts */
#if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
/* block out HSYNC on the atari */
#define ALLOWINT
0xfbff
#define ALLOWINT
(~0x400)
#define MAX_NOINT_IPL 3
#else
/* portable version */
#define ALLOWINT
0xf8ff
#define ALLOWINT
(~0x700)
#define MAX_NOINT_IPL 0
#endif
/* machine compilation types */
...
...
include/asm-m68k/floppy.h
View file @
63322f88
...
...
@@ -17,7 +17,8 @@
#include <linux/vmalloc.h>
asmlinkage
void
floppy_hardint
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
asmlinkage
irqreturn_t
floppy_hardint
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
/* constants... */
...
...
@@ -72,6 +73,7 @@ static __inline__ unsigned char fd_inb(int port)
return
inb_p
(
port
);
else
if
(
MACH_IS_SUN3X
)
return
sun3x_82072_fd_inb
(
port
);
return
0
;
}
static
__inline__
void
fd_outb
(
unsigned
char
value
,
int
port
)
...
...
@@ -88,9 +90,9 @@ static int fd_request_irq(void)
if
(
MACH_IS_Q40
)
return
request_irq
(
FLOPPY_IRQ
,
floppy_hardint
,
SA_INTERRUPT
,
"floppy"
,
floppy_hardint
);
else
if
(
MACH_IS_SUN3X
)
else
if
(
MACH_IS_SUN3X
)
return
sun3xflop_request_irq
();
return
-
ENXIO
;
}
static
void
fd_free_irq
(
void
)
...
...
@@ -182,7 +184,8 @@ static void fd_disable_dma(void)
/* this is the only truly Q40 specific function */
asmlinkage
void
floppy_hardint
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
asmlinkage
irqreturn_t
floppy_hardint
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
register
unsigned
char
st
;
...
...
@@ -196,7 +199,7 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif
if
(
!
doing_pdma
)
{
floppy_interrupt
(
irq
,
dev_id
,
regs
);
return
;
return
IRQ_HANDLED
;
}
#ifdef TRACE_FLPY_INT
...
...
@@ -231,7 +234,7 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
calls
++
;
#endif
if
(
st
==
0x20
)
return
;
return
IRQ_HANDLED
;
if
(
!
(
st
&
0x20
))
{
virtual_dma_residue
+=
virtual_dma_count
;
virtual_dma_count
=
0
;
...
...
@@ -244,12 +247,13 @@ asmlinkage void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif
doing_pdma
=
0
;
floppy_interrupt
(
irq
,
dev_id
,
regs
);
return
;
return
IRQ_HANDLED
;
}
#ifdef TRACE_FLPY_INT
if
(
!
virtual_dma_count
)
dma_wait
++
;
#endif
return
IRQ_HANDLED
;
}
#define EXTRA_FLOPPY_PARAMS
include/asm-m68k/hardirq.h
View file @
63322f88
...
...
@@ -7,8 +7,6 @@
/* entry.S is sensitive to the offsets of these fields */
typedef
struct
{
unsigned
int
__softirq_pending
;
unsigned
int
__syscall_count
;
struct
task_struct
*
__ksoftirqd_task
;
}
____cacheline_aligned
irq_cpustat_t
;
#include <linux/irq_cpustat.h>
/* Standard mappings for irq_cpustat_t above */
...
...
include/asm-m68k/kmap_types.h
View file @
63322f88
#ifndef __ASM_M68K_KMAP_TYPES_H
#define __ASM_M68K_KMAP_TYPES_H
#include <linux/config.h>
enum
km_type
{
KM_BOUNCE_READ
,
KM_SKB_SUNRPC_DATA
,
...
...
include/asm-m68k/mc146818rtc.h
View file @
63322f88
...
...
@@ -4,37 +4,12 @@
#ifndef _ASM_MC146818RTC_H
#define _ASM_MC146818RTC_H
#include <linux/config.h>
#include <asm/atarihw.h>
#ifdef CONFIG_ATARI
/* RTC in Atari machines */
#include <asm/atarihw.h>
#include <asm/atariints.h>
#include <asm/io.h>
#define RTC_HAS_IRQ (ATARIHW_PRESENT(TT_MFP))
#define RTC_IRQ IRQ_TT_MFP_RTC
#define RTC_IRQ_FLAGS IRQ_TYPE_FAST
#define RTC_PORT(x) (TT_RTC_BAS + 2*(x))
#define RTC_ALWAYS_BCD 0
/* TOS uses binary mode, Linux should be able
* to deal with both modes */
#define RTC_CHECK_DRIVER_INIT() (MACH_IS_ATARI && ATARIHW_PRESENT(TT_CLK))
#define RTC_MACH_INIT() \
do { \
epoch = atari_rtc_year_offset + 1900; \
if (RTC_HAS_IRQ) \
/* select RTC int on H->L edge */
\
tt_mfp.active_edge &= ~0x40; \
} while(0)
#define RTC_MACH_EXIT()
/* On Atari, the year was stored with base 1970 in old TOS versions (before
* 3.06). Later, Atari recognized that this broke leap year recognition, and
* changed the base to 1968. Medusa and Hades always use the new version. */
#define RTC_CENTURY_SWITCH -1
/* no century switch */
#define RTC_MINYEAR epoch
#define RTC_PORT(x) (TT_RTC_BAS + 2*(x))
#define CMOS_READ(addr) ({ \
atari_outb_p((addr),RTC_PORT(0)); \
...
...
include/asm-m68k/motorola_pgtable.h
View file @
63322f88
...
...
@@ -12,9 +12,7 @@
#define _PAGE_ACCESSED 0x008
#define _PAGE_DIRTY 0x010
#define _PAGE_SUPER 0x080
/* 68040 supervisor only */
#define _PAGE_FAKE_SUPER 0x200
/* fake supervisor only on 680[23]0 */
#define _PAGE_GLOBAL040 0x400
/* 68040 global bit, used for kva descs */
#define _PAGE_FILE 0x800
/* pagecache or swap? */
#define _PAGE_NOCACHE030 0x040
/* 68030 no-cache mode */
#define _PAGE_NOCACHE 0x060
/* 68040 cache mode, non-serialized */
#define _PAGE_NOCACHE_S 0x040
/* 68040 no-cache mode, serialized */
...
...
@@ -29,6 +27,9 @@
#define _PAGE_TABLE (_PAGE_SHORT)
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_NOCACHE)
#define _PAGE_PROTNONE 0x004
#define _PAGE_FILE 0x008
/* pagecache or swap? */
#ifndef __ASSEMBLY__
/* This is the cache mode to be used for pages containing page descriptors for
...
...
@@ -54,7 +55,7 @@ extern int m68k_supervisor_cachemode;
extern
unsigned
long
mm_cachebits
;
#endif
#define PAGE_NONE __pgprot(_PAGE_PR
ESENT | _PAGE_RONLY
| _PAGE_ACCESSED | mm_cachebits)
#define PAGE_NONE __pgprot(_PAGE_PR
OTNONE
| _PAGE_ACCESSED | mm_cachebits)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | mm_cachebits)
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_RONLY | _PAGE_ACCESSED | mm_cachebits)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_RONLY | _PAGE_ACCESSED | mm_cachebits)
...
...
@@ -62,7 +63,7 @@ extern unsigned long mm_cachebits;
/* Alternate definitions that are compile time constants, for
initializing protection_map. The cachebits are fixed later. */
#define PAGE_NONE_C __pgprot(_PAGE_PR
ESENT | _PAGE_RONLY
| _PAGE_ACCESSED)
#define PAGE_NONE_C __pgprot(_PAGE_PR
OTNONE
| _PAGE_ACCESSED)
#define PAGE_SHARED_C __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
#define PAGE_COPY_C __pgprot(_PAGE_PRESENT | _PAGE_RONLY | _PAGE_ACCESSED)
#define PAGE_READONLY_C __pgprot(_PAGE_PRESENT | _PAGE_RONLY | _PAGE_ACCESSED)
...
...
@@ -118,7 +119,7 @@ extern inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
#define pte_none(pte) (!pte_val(pte))
#define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_
FAKE_SUPER
))
#define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_
PROTNONE
))
#define pte_clear(ptep) ({ pte_val(*(ptep)) = 0; })
#define pte_page(pte) (mem_map + ((unsigned long)(__va(pte_val(pte)) - PAGE_OFFSET) >> PAGE_SHIFT))
...
...
@@ -256,23 +257,23 @@ static inline void cache_page(void *vaddr)
}
}
#define PTE_FILE_MAX_BITS 2
9
#define PTE_FILE_MAX_BITS 2
8
static
inline
unsigned
long
pte_to_pgoff
(
pte_t
pte
)
{
return
((
pte
.
pte
>>
12
)
<<
7
)
+
((
pte
.
pte
>>
2
)
&
0x1ff
)
;
return
pte
.
pte
>>
4
;
}
static
inline
pte_t
pgoff_to_pte
(
inline
unsigned
off
)
static
inline
pte_t
pgoff_to_pte
(
unsigned
off
)
{
pte_t
pte
=
{
(
(
off
>>
7
)
<<
12
)
+
((
off
&
0x1ff
)
<<
2
)
+
_PAGE_FILE
};
pte_t
pte
=
{
(
off
<<
4
)
+
_PAGE_FILE
};
return
pte
;
}
/* Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e)) */
#define __swp_type(x) (((x).val >>
2) & 0x1
ff)
#define __swp_type(x) (((x).val >>
4) & 0x
ff)
#define __swp_offset(x) ((x).val >> 12)
#define __swp_entry(type, offset) ((swp_entry_t) { ((type) <<
2
) | ((offset) << 12) })
#define __swp_entry(type, offset) ((swp_entry_t) { ((type) <<
4
) | ((offset) << 12) })
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
...
...
include/asm-m68k/sun3_pgtable.h
View file @
63322f88
...
...
@@ -38,6 +38,8 @@
#define _PAGE_PRESENT (SUN3_PAGE_VALID)
#define _PAGE_ACCESSED (SUN3_PAGE_ACCESSED)
#define PTE_FILE_MAX_BITS 28
/* Compound page protection values. */
//todo: work out which ones *should* have SUN3_PAGE_NOCACHE and fix...
// is it just PAGE_KERNEL and PAGE_SHARED?
...
...
@@ -160,6 +162,7 @@ extern inline int pte_write(pte_t pte) { return pte_val(pte) & SUN3_PAGE_WRITEA
extern
inline
int
pte_exec
(
pte_t
pte
)
{
return
1
;
}
extern
inline
int
pte_dirty
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
SUN3_PAGE_MODIFIED
;
}
extern
inline
int
pte_young
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
SUN3_PAGE_ACCESSED
;
}
extern
inline
int
pte_file
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
SUN3_PAGE_ACCESSED
;
}
extern
inline
pte_t
pte_wrprotect
(
pte_t
pte
)
{
pte_val
(
pte
)
&=
~
SUN3_PAGE_WRITEABLE
;
return
pte
;
}
extern
inline
pte_t
pte_rdprotect
(
pte_t
pte
)
{
return
pte
;
}
...
...
@@ -195,6 +198,18 @@ extern inline pmd_t *pmd_offset (pgd_t *pgd, unsigned long address)
return
(
pmd_t
*
)
pgd
;
}
static
inline
unsigned
long
pte_to_pgoff
(
pte_t
pte
)
{
return
pte
.
pte
&
SUN3_PAGE_PGNUM_MASK
;
}
static
inline
pte_t
pgoff_to_pte
(
inline
unsigned
off
)
{
pte_t
pte
=
{
off
+
SUN3_PAGE_ACCESSED
};
return
pte
;
}
/* Find an entry in the third-level pagetable. */
#define pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE-1))
#define pte_offset_kernel(pmd, address) ((pte_t *) __pmd_page(*pmd) + pte_index(address))
...
...
include/asm-m68k/sun3xflop.h
View file @
63322f88
...
...
@@ -113,7 +113,8 @@ static void sun3x_82072_fd_outb(unsigned char value, int port)
}
asmlinkage
void
sun3xflop_hardint
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
asmlinkage
irqreturn_t
sun3xflop_hardint
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
register
unsigned
char
st
;
...
...
@@ -127,7 +128,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif
if
(
!
doing_pdma
)
{
floppy_interrupt
(
irq
,
dev_id
,
regs
);
return
;
return
IRQ_HANDLED
;
}
// printk("doing pdma\n");// st %x\n", sun_fdc->status_82072);
...
...
@@ -151,7 +152,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
if
((
st
&
0x80
)
==
0
)
{
virtual_dma_count
=
lcount
;
virtual_dma_addr
=
lptr
;
return
;
return
IRQ_HANDLED
;
}
if
((
st
&
0x20
)
==
0
)
...
...
@@ -176,7 +177,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif
// printk("st=%02x\n", st);
if
(
st
==
0x20
)
return
;
return
IRQ_HANDLED
;
if
(
!
(
st
&
0x20
))
{
virtual_dma_residue
+=
virtual_dma_count
;
virtual_dma_count
=
0
;
...
...
@@ -191,7 +192,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
#endif
floppy_interrupt
(
irq
,
dev_id
,
regs
);
return
;
return
IRQ_HANDLED
;
}
...
...
@@ -199,6 +200,7 @@ asmlinkage void sun3xflop_hardint(int irq, void *dev_id, struct pt_regs * regs)
if
(
!
virtual_dma_count
)
dma_wait
++
;
#endif
return
IRQ_HANDLED
;
}
static
int
sun3xflop_request_irq
(
void
)
...
...
include/linux/elevator.h
View file @
63322f88
...
...
@@ -54,6 +54,7 @@ struct elevator_s
struct
kobject
kobj
;
struct
kobj_type
*
elevator_ktype
;
const
char
*
elevator_name
;
};
/*
...
...
include/linux/zorro.h
View file @
63322f88
...
...
@@ -182,9 +182,6 @@ extern struct zorro_dev *zorro_find_device(zorro_id id,
#define zorro_request_device(z, name) \
request_mem_region((z)->resource.start, \
(z)->resource.end-(z)->resource.start+1, (name))
#define zorro_check_device(z) \
check_mem_region((z)->resource.start, \
(z)->resource.end-(z)->resource.start+1)
#define zorro_release_device(z) \
release_mem_region((z)->resource.start, \
(z)->resource.end-(z)->resource.start+1)
...
...
init/Kconfig
View file @
63322f88
...
...
@@ -141,6 +141,8 @@ config EPOLL
Disabling this option will cause the kernel to be built without
support for epoll family of system calls.
source "drivers/block/Kconfig.iosched"
endmenu # General setup
...
...
kernel/signal.c
View file @
63322f88
...
...
@@ -1000,6 +1000,15 @@ void zap_other_threads(struct task_struct *p)
return
;
for
(
t
=
next_thread
(
p
);
t
!=
p
;
t
=
next_thread
(
t
))
{
/*
* We don't want to notify the parent, since we are
* killed as part of a thread group due to another
* thread doing an execve() or similar. So set the
* exit signal to -1 to allow immediate reaping of
* the process.
*/
t
->
exit_signal
=
-
1
;
sigaddset
(
&
t
->
pending
.
signal
,
SIGKILL
);
rm_from_queue
(
SIG_KERNEL_STOP_MASK
,
&
t
->
pending
);
signal_wake_up
(
t
,
1
);
...
...
sound/Makefile
View file @
63322f88
...
...
@@ -3,6 +3,7 @@
obj-$(CONFIG_SOUND)
+=
soundcore.o
obj-$(CONFIG_SOUND_PRIME)
+=
oss/
obj-$(CONFIG_DMASOUND)
+=
oss/
obj-$(CONFIG_SND)
+=
core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/
ifeq
($(CONFIG_SND),y)
...
...
sound/oss/dmasound/dmasound_core.c
View file @
63322f88
...
...
@@ -1210,6 +1210,8 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd,
shared_resources_initialised
=
0
;
return
result
;
break
;
case
SOUND_PCM_READ_RATE
:
return
IOCTL_OUT
(
arg
,
dmasound
.
soft
.
speed
);
case
SNDCTL_DSP_SPEED
:
/* changing this on the fly will have weird effects on the sound.
Where there are rate conversions implemented in soft form - 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