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
1f068b65
Commit
1f068b65
authored
Aug 23, 2003
by
Paul Mackerras
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://stop.crashing.org/linux-2.6-misc
into samba.org:/stuff/paulus/kernel/for-linus-ppc
parents
024b1e31
8e1c75c9
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
184 additions
and
143 deletions
+184
-143
arch/ppc/8260_io/uart.c
arch/ppc/8260_io/uart.c
+1
-1
arch/ppc/8xx_io/uart.c
arch/ppc/8xx_io/uart.c
+2
-2
arch/ppc/Kconfig
arch/ppc/Kconfig
+18
-20
arch/ppc/Makefile
arch/ppc/Makefile
+0
-3
arch/ppc/boot/common/ns16550.c
arch/ppc/boot/common/ns16550.c
+1
-1
arch/ppc/boot/common/util.S
arch/ppc/boot/common/util.S
+21
-3
arch/ppc/boot/simple/embed_config.c
arch/ppc/boot/simple/embed_config.c
+2
-0
arch/ppc/boot/simple/misc-embedded.c
arch/ppc/boot/simple/misc-embedded.c
+1
-1
arch/ppc/boot/simple/misc-spruce.c
arch/ppc/boot/simple/misc-spruce.c
+1
-1
arch/ppc/boot/simple/misc.c
arch/ppc/boot/simple/misc.c
+7
-0
arch/ppc/boot/simple/relocate.S
arch/ppc/boot/simple/relocate.S
+1
-1
arch/ppc/boot/utils/mktree.c
arch/ppc/boot/utils/mktree.c
+1
-1
arch/ppc/configs/mcpn765_defconfig
arch/ppc/configs/mcpn765_defconfig
+11
-9
arch/ppc/kernel/ppc-stub.c
arch/ppc/kernel/ppc-stub.c
+6
-4
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/kernel/ppc_ksyms.c
+1
-0
arch/ppc/platforms/mcpn765_serial.h
arch/ppc/platforms/mcpn765_serial.h
+2
-1
arch/ppc/platforms/mcpn765_setup.c
arch/ppc/platforms/mcpn765_setup.c
+91
-78
arch/ppc/platforms/sandpoint.c
arch/ppc/platforms/sandpoint.c
+15
-15
arch/ppc/platforms/sandpoint.h
arch/ppc/platforms/sandpoint.h
+2
-2
No files found.
arch/ppc/8260_io/uart.c
View file @
1f068b65
...
@@ -2278,7 +2278,7 @@ static void my_console_write(int idx, const char *s,
...
@@ -2278,7 +2278,7 @@ static void my_console_write(int idx, const char *s,
static
void
serial_console_write
(
struct
console
*
c
,
const
char
*
s
,
static
void
serial_console_write
(
struct
console
*
c
,
const
char
*
s
,
unsigned
count
)
unsigned
count
)
{
{
#if defined(CONFIG_KGDB) && !defined(CONFIG_USE_SERIAL2_KGDB)
#if defined(CONFIG_KGDB
_CONSOLE
) && !defined(CONFIG_USE_SERIAL2_KGDB)
/* Try to let stub handle output. Returns true if it did. */
/* Try to let stub handle output. Returns true if it did. */
if
(
kgdb_output_string
(
s
,
count
))
if
(
kgdb_output_string
(
s
,
count
))
return
;
return
;
...
...
arch/ppc/8xx_io/uart.c
View file @
1f068b65
...
@@ -1068,7 +1068,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user,
...
@@ -1068,7 +1068,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user,
volatile
cbd_t
*
bdp
;
volatile
cbd_t
*
bdp
;
unsigned
char
*
cp
;
unsigned
char
*
cp
;
#ifdef CONFIG_KGDB
#ifdef CONFIG_KGDB
_CONSOLE
/* Try to let stub handle output. Returns true if it did. */
/* Try to let stub handle output. Returns true if it did. */
if
(
kgdb_output_string
(
buf
,
count
))
if
(
kgdb_output_string
(
buf
,
count
))
return
ret
;
return
ret
;
...
@@ -2271,7 +2271,7 @@ static void my_console_write(int idx, const char *s,
...
@@ -2271,7 +2271,7 @@ static void my_console_write(int idx, const char *s,
static
void
serial_console_write
(
struct
console
*
c
,
const
char
*
s
,
static
void
serial_console_write
(
struct
console
*
c
,
const
char
*
s
,
unsigned
count
)
unsigned
count
)
{
{
#ifdef CONFIG_KGDB
#ifdef CONFIG_KGDB
_CONSOLE
/* Try to let stub handle output. Returns true if it did. */
/* Try to let stub handle output. Returns true if it did. */
if
(
kgdb_output_string
(
s
,
count
))
if
(
kgdb_output_string
(
s
,
count
))
return
;
return
;
...
...
arch/ppc/Kconfig
View file @
1f068b65
...
@@ -1426,20 +1426,12 @@ config DEBUG_SPINLOCK_SLEEP
...
@@ -1426,20 +1426,12 @@ config DEBUG_SPINLOCK_SLEEP
config KGDB
config KGDB
bool "Include kgdb kernel debugger"
bool "Include kgdb kernel debugger"
depends on DEBUG_KERNEL
depends on DEBUG_KERNEL
select DEBUG_INFO
help
help
Include in-kernel hooks for kgdb, the Linux kernel source level
Include in-kernel hooks for kgdb, the Linux kernel source level
debugger. See <http://kgdb.sourceforge.net/> for more information.
debugger. See <http://kgdb.sourceforge.net/> for more information.
Unless you are intending to debug the kernel, say N here.
Unless you are intending to debug the kernel, say N here.
config DEBUG_INFO
bool "Compile the kernel with debug info"
depends on DEBUG_KERNEL
help
If you say Y here the resulting kernel image will include
debugging info resulting in a larger kernel image.
Say Y here only if you plan to use gdb to debug the kernel.
If you don't debug the kernel, you can say N.
choice
choice
prompt "Serial Port"
prompt "Serial Port"
depends on KGDB
depends on KGDB
...
@@ -1459,6 +1451,14 @@ config KGDB_TTYS3
...
@@ -1459,6 +1451,14 @@ config KGDB_TTYS3
endchoice
endchoice
config KGDB_CONSOLE
bool "Enable serial console thru kgdb port"
depends on KGDB && 8xx || 8260
help
If you enable this, all serial console messages will be sent
over the gdb stub.
If unsure, say N.
config XMON
config XMON
bool "Include xmon kernel debugger"
bool "Include xmon kernel debugger"
depends on DEBUG_KERNEL
depends on DEBUG_KERNEL
...
@@ -1474,18 +1474,16 @@ config BDI_SWITCH
...
@@ -1474,18 +1474,16 @@ config BDI_SWITCH
Unless you are intending to debug the kernel with one of these
Unless you are intending to debug the kernel with one of these
machines, say N here.
machines, say N here.
config MORE_COMPILE_OPTIONS
config DEBUG_INFO
bool "Add any additional compile options"
bool "Compile the kernel with debug info"
depends on DEBUG_KERNEL && (KGDB || XMON || BDI_SWITCH)
depends on DEBUG_KERNEL
default y if BDI_SWITCH || XMON
help
help
If you want to add additional CFLAGS to the kernel build, such as -g
If you say Y here the resulting kernel image will include
for KGDB or the BDI2000, enable this option and then enter what you
debugging info resulting in a larger kernel image.
would like to add in the next question.
Say Y here only if you plan to use some sort of debugger to
debug the kernel.
config COMPILE_OPTIONS
If you don't debug the kernel, you can say N.
string "Additional compile arguments"
depends on MORE_COMPILE_OPTIONS
default "-g -ggdb"
config BOOTX_TEXT
config BOOTX_TEXT
bool "Support for early boot text console (BootX or OpenFirmware only)"
bool "Support for early boot text console (BootX or OpenFirmware only)"
...
...
arch/ppc/Makefile
View file @
1f068b65
...
@@ -22,9 +22,6 @@ CPP = $(CC) -E $(CFLAGS)
...
@@ -22,9 +22,6 @@ CPP = $(CC) -E $(CFLAGS)
cflags-$(CONFIG_4xx)
+=
-Wa
,-m405
cflags-$(CONFIG_4xx)
+=
-Wa
,-m405
cflags-$(CONFIG_PPC64BRIDGE)
+=
-Wa
,-mppc64bridge
cflags-$(CONFIG_PPC64BRIDGE)
+=
-Wa
,-mppc64bridge
# Use sed to remove the quotes.
cflags-$(CONFIG_MORE_COMPILE_OPTIONS)
+=
\
$(
shell
echo
$(CONFIG_COMPILE_OPTIONS)
|
sed
-e
's/"//g'
)
CFLAGS
+=
$
(
cflags-y
)
CFLAGS
+=
$
(
cflags-y
)
...
...
arch/ppc/boot/common/ns16550.c
View file @
1f068b65
...
@@ -60,7 +60,7 @@ unsigned long serial_init(int chan, void *ignored)
...
@@ -60,7 +60,7 @@ unsigned long serial_init(int chan, void *ignored)
else
{
else
{
/* Input clock. */
/* Input clock. */
outb
(
com_port
+
(
UART_DLL
<<
shift
),
outb
(
com_port
+
(
UART_DLL
<<
shift
),
(
BASE_BAUD
/
SERIAL_BAUD
));
(
BASE_BAUD
/
SERIAL_BAUD
)
&
0xFF
);
outb
(
com_port
+
(
UART_DLM
<<
shift
),
outb
(
com_port
+
(
UART_DLM
<<
shift
),
(
BASE_BAUD
/
SERIAL_BAUD
)
>>
8
);
(
BASE_BAUD
/
SERIAL_BAUD
)
>>
8
);
/* 8 data, 1 stop, no parity */
/* 8 data, 1 stop, no parity */
...
...
arch/ppc/boot/common/util.S
View file @
1f068b65
...
@@ -160,9 +160,22 @@ _setup_L3CR:
...
@@ -160,9 +160,22 @@ _setup_L3CR:
blr
blr
/*
udelay
(
on
non
-
601
processors
)
needs
to
know
the
period
of
the
*
timebase
in
nanoseconds
.
This
used
to
be
hardcoded
to
be
60
ns
*
(
period
of
66
MHz
/
4
)
.
Now
a
variable
is
used
that
is
initialized
to
*
60
for
backward
compatibility
,
but
it
can
be
overridden
as
necessary
*
with
code
something
like
this
:
*
extern
unsigned
long
timebase_period_ns
;
*
timebase_period_ns
=
1000000000
/
bd
->
bi_tbfreq
;
*/
.
data
.
globl
timebase_period_ns
timebase_period_ns
:
.
long
60
.
text
/*
/*
*
Delay
for
a
number
of
microseconds
*
Delay
for
a
number
of
microseconds
*
--
Use
the
BUS
timer
(
assumes
66
MHz
)
*/
*/
.
globl
udelay
.
globl
udelay
udelay
:
udelay
:
...
@@ -180,8 +193,13 @@ udelay:
...
@@ -180,8 +193,13 @@ udelay:
.
udelay_not_601
:
.
udelay_not_601
:
mulli
r4
,
r3
,
1000
/*
nanoseconds
*/
mulli
r4
,
r3
,
1000
/*
nanoseconds
*/
addi
r4
,
r4
,
59
/
*
Change
r4
to
be
the
number
of
ticks
using
:
li
r5
,
60
*
(
nanoseconds
+
(
timebase_period_ns
-
1
))
/
timebase_period_ns
*
timebase_period_ns
defaults
to
60
(
16
.6
MHz
)
*/
lis
r5
,
timebase_period_ns
@
h
lwz
r5
,
timebase_period_ns
@
l
(
r5
)
addi
r4
,
r4
,
r5
addi
r4
,
r4
,-
1
divw
r4
,
r4
,
r5
/*
BUS
ticks
*/
divw
r4
,
r4
,
r5
/*
BUS
ticks
*/
1
:
mftbu
r5
1
:
mftbu
r5
mftb
r6
mftb
r6
...
...
arch/ppc/boot/simple/embed_config.c
View file @
1f068b65
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#ifdef CONFIG_40x
#ifdef CONFIG_40x
#include <asm/io.h>
#include <asm/io.h>
#endif
#endif
extern
unsigned
long
timebase_period_ns
;
/* For those boards that don't provide one.
/* For those boards that don't provide one.
*/
*/
...
@@ -768,6 +769,7 @@ embed_config(bd_t **bdp)
...
@@ -768,6 +769,7 @@ embed_config(bd_t **bdp)
#if defined(CONFIG_REDWOOD_5) || defined (CONFIG_REDWOOD_6)
#if defined(CONFIG_REDWOOD_5) || defined (CONFIG_REDWOOD_6)
bd
->
bi_tbfreq
=
27
*
1000
*
1000
;
bd
->
bi_tbfreq
=
27
*
1000
*
1000
;
#endif
#endif
timebase_period_ns
=
1000000000
/
bd
->
bi_tbfreq
;
}
}
#endif
/* CONFIG_BEECH */
#endif
/* CONFIG_BEECH */
#endif
/* CONFIG_IBM_OPENBIOS */
#endif
/* CONFIG_IBM_OPENBIOS */
...
...
arch/ppc/boot/simple/misc-embedded.c
View file @
1f068b65
...
@@ -75,7 +75,7 @@ extern void gunzip(void *, int, unsigned char *, int *);
...
@@ -75,7 +75,7 @@ extern void gunzip(void *, int, unsigned char *, int *);
extern
void
embed_config
(
bd_t
**
bp
);
extern
void
embed_config
(
bd_t
**
bp
);
unsigned
long
unsigned
long
decompress
_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
,
bd_t
*
bp
)
load
_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
,
bd_t
*
bp
)
{
{
char
*
cp
,
ch
;
char
*
cp
,
ch
;
int
timer
=
0
,
zimage_size
;
int
timer
=
0
,
zimage_size
;
...
...
arch/ppc/boot/simple/misc-spruce.c
View file @
1f068b65
...
@@ -147,7 +147,7 @@ unsigned long isa_io_base = SPRUCE_ISA_IO_BASE;
...
@@ -147,7 +147,7 @@ unsigned long isa_io_base = SPRUCE_ISA_IO_BASE;
#define MEM_B2EA 0x60
#define MEM_B2EA 0x60
unsigned
long
unsigned
long
decompress
_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
)
load
_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
)
{
{
int
timer
=
0
;
int
timer
=
0
;
char
*
cp
,
ch
;
char
*
cp
,
ch
;
...
...
arch/ppc/boot/simple/misc.c
View file @
1f068b65
...
@@ -252,3 +252,10 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
...
@@ -252,3 +252,10 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
return
(
struct
bi_record
*
)
rec_loc
;
return
(
struct
bi_record
*
)
rec_loc
;
}
}
/* Allow decompress_kernel to be hooked into. This is the default. */
void
*
__attribute__
((
weak
))
load_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
)
{
return
decompress_kernel
(
load_addr
,
num_words
,
cksum
);
}
arch/ppc/boot/simple/relocate.S
View file @
1f068b65
...
@@ -183,7 +183,7 @@ start_ldr:
...
@@ -183,7 +183,7 @@ start_ldr:
mr
r4
,
r7
/*
Program
length
*/
mr
r4
,
r7
/*
Program
length
*/
mr
r5
,
r6
/*
Checksum
*/
mr
r5
,
r6
/*
Checksum
*/
mr
r6
,
r11
/*
Residual
data
*/
mr
r6
,
r11
/*
Residual
data
*/
bl
decompress
_kernel
bl
load
_kernel
/
*
/
*
*
Make
sure
the
kernel
knows
we
don
't have things set in
*
Make
sure
the
kernel
knows
we
don
't have things set in
...
...
arch/ppc/boot/utils/mktree.c
View file @
1f068b65
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
}
}
cksum
=
0
;
cksum
=
0
;
cp
=
(
uint
*
)
&
bt
;
cp
=
(
void
*
)
&
bt
;
for
(
i
=
0
;
i
<
sizeof
(
bt
)
/
sizeof
(
uint
);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
bt
)
/
sizeof
(
uint
);
i
++
)
cksum
+=
*
cp
++
;
cksum
+=
*
cp
++
;
...
...
arch/ppc/configs/mcpn765_defconfig
View file @
1f068b65
...
@@ -19,6 +19,7 @@ CONFIG_SYSVIPC=y
...
@@ -19,6 +19,7 @@ CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_EMBEDDED is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_FUTEX=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_EPOLL=y
...
@@ -74,8 +75,8 @@ CONFIG_HIGHMEM=y
...
@@ -74,8 +75,8 @@ CONFIG_HIGHMEM=y
CONFIG_PCI=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_DOMAINS=y
CONFIG_KCORE_ELF=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_BINFMT_MISC is not set
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_NAMES is not set
# CONFIG_PCI_NAMES is not set
...
@@ -103,6 +104,11 @@ CONFIG_KERNEL_START=0xc0000000
...
@@ -103,6 +104,11 @@ CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_BOOT_LOAD=0x00800000
CONFIG_BOOT_LOAD=0x00800000
#
# Generic Driver Options
#
# CONFIG_FW_LOADER is not set
#
#
# Memory Technology Devices (MTD)
# Memory Technology Devices (MTD)
#
#
...
@@ -122,10 +128,12 @@ CONFIG_BOOT_LOAD=0x00800000
...
@@ -122,10 +128,12 @@ CONFIG_BOOT_LOAD=0x00800000
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_LBD is not set
#
#
# Multi-device support (RAID and LVM)
# Multi-device support (RAID and LVM)
...
@@ -133,12 +141,12 @@ CONFIG_BLK_DEV_INITRD=y
...
@@ -133,12 +141,12 @@ CONFIG_BLK_DEV_INITRD=y
# CONFIG_MD is not set
# CONFIG_MD is not set
#
#
# ATA/
IDE
/MFM/RLL support
# ATA/
ATAPI
/MFM/RLL support
#
#
# CONFIG_IDE is not set
# CONFIG_IDE is not set
#
#
# SCSI support
# SCSI
device
support
#
#
# CONFIG_SCSI is not set
# CONFIG_SCSI is not set
...
@@ -319,11 +327,6 @@ CONFIG_NET_PCI=y
...
@@ -319,11 +327,6 @@ CONFIG_NET_PCI=y
#
#
# CONFIG_FB is not set
# CONFIG_FB is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
#
# Input device support
# Input device support
#
#
...
@@ -526,7 +529,6 @@ CONFIG_MSDOS_PARTITION=y
...
@@ -526,7 +529,6 @@ CONFIG_MSDOS_PARTITION=y
# Kernel hacking
# Kernel hacking
#
#
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_KALLSYMS is not set
# CONFIG_SERIAL_TEXT_DEBUG is not set
# CONFIG_SERIAL_TEXT_DEBUG is not set
#
#
...
...
arch/ppc/kernel/ppc-stub.c
View file @
1f068b65
...
@@ -106,6 +106,7 @@
...
@@ -106,6 +106,7 @@
#include <linux/smp.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <asm/cacheflush.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/signal.h>
#include <asm/signal.h>
#include <asm/kgdb.h>
#include <asm/kgdb.h>
...
@@ -186,7 +187,7 @@ hex(unsigned char ch)
...
@@ -186,7 +187,7 @@ hex(unsigned char ch)
* return 0.
* return 0.
*/
*/
static
unsigned
char
*
static
unsigned
char
*
mem2hex
(
char
*
mem
,
char
*
buf
,
int
count
)
mem2hex
(
c
onst
c
har
*
mem
,
char
*
buf
,
int
count
)
{
{
unsigned
char
ch
;
unsigned
char
ch
;
unsigned
short
tmp_s
;
unsigned
short
tmp_s
;
...
@@ -828,11 +829,11 @@ breakpoint(void)
...
@@ -828,11 +829,11 @@ breakpoint(void)
return
;
return
;
}
}
asm
(
" .globl breakinst
asm
(
" .globl breakinst
\n
\
breakinst: .long 0x7d821008
breakinst: .long 0x7d821008"
);
"
);
}
}
#ifdef CONFIG_KGDB_CONSOLE
/* Output string in GDB O-packet format if GDB has connected. If nothing
/* Output string in GDB O-packet format if GDB has connected. If nothing
output, returns 0 (caller must then handle output). */
output, returns 0 (caller must then handle output). */
int
int
...
@@ -852,3 +853,4 @@ kgdb_output_string (const char* s, unsigned int count)
...
@@ -852,3 +853,4 @@ kgdb_output_string (const char* s, unsigned int count)
return
1
;
return
1
;
}
}
#endif
arch/ppc/kernel/ppc_ksyms.c
View file @
1f068b65
...
@@ -200,6 +200,7 @@ EXPORT_SYMBOL(flush_dcache_range);
...
@@ -200,6 +200,7 @@ EXPORT_SYMBOL(flush_dcache_range);
EXPORT_SYMBOL
(
flush_icache_user_range
);
EXPORT_SYMBOL
(
flush_icache_user_range
);
EXPORT_SYMBOL
(
flush_dcache_page
);
EXPORT_SYMBOL
(
flush_dcache_page
);
EXPORT_SYMBOL
(
flush_tlb_kernel_range
);
EXPORT_SYMBOL
(
flush_tlb_kernel_range
);
EXPORT_SYMBOL
(
flush_tlb_page
);
#ifdef CONFIG_ALTIVEC
#ifdef CONFIG_ALTIVEC
EXPORT_SYMBOL
(
last_task_used_altivec
);
EXPORT_SYMBOL
(
last_task_used_altivec
);
EXPORT_SYMBOL
(
giveup_altivec
);
EXPORT_SYMBOL
(
giveup_altivec
);
...
...
arch/ppc/platforms/mcpn765_serial.h
View file @
1f068b65
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
#define BASE_BAUD ( 1843200 / 16 )
#define BASE_BAUD ( 1843200 / 16 )
#define UART_CLK 1843200
#ifdef CONFIG_SERIAL_DETECT_IRQ
#ifdef CONFIG_SERIAL_DETECT_IRQ
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
...
...
arch/ppc/platforms/mcpn765_setup.c
View file @
1f068b65
...
@@ -31,6 +31,9 @@
...
@@ -31,6 +31,9 @@
#include <linux/ide.h>
#include <linux/ide.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <linux/root_dev.h>
#include <linux/serial.h>
#include <linux/tty.h>
/* for linux/serial_core.h */
#include <linux/serial_core.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/pgtable.h>
...
@@ -49,36 +52,94 @@
...
@@ -49,36 +52,94 @@
#include <asm/pplus.h>
#include <asm/pplus.h>
#include "mcpn765.h"
#include "mcpn765.h"
#include "mcpn765_serial.h"
static
u_char
mcpn765_openpic_initsenses
[]
__initdata
=
{
static
u_char
mcpn765_openpic_initsenses
[]
__initdata
=
{
0
,
/* 16: i8259 cascade (active high)
*/
(
IRQ_SENSE_EDGE
|
IRQ_POLARITY_POSITIVE
),
/* 16: i8259 cascade
*/
1
,
/* 17: COM1,2,3,4 */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 17: COM1,2,3,4 */
1
,
/* 18: Enet 1 (front panel
) */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 18: Enet 1 (front
) */
1
,
/* 19: HAWK WDT XXXX */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 19: HAWK WDT XXXX */
1
,
/* 20: 21554 PCI-PCI
bridge */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 20: 21554
bridge */
1
,
/* 21: cPCI INTA# */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 21: cPCI INTA# */
1
,
/* 22: cPCI INTB# */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 22: cPCI INTB# */
1
,
/* 23: cPCI INTC# */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 23: cPCI INTC# */
1
,
/* 24: cPCI INTD# */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 24: cPCI INTD# */
1
,
/* 25: PMC1 INTA#, PMC2 INTB#
*/
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 25: PMC1 INTA#,PMC2 INTB#
*/
1
,
/* 26: PMC1 INTB#, PMC2 INTC#
*/
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 26: PMC1 INTB#,PMC2 INTC#
*/
1
,
/* 27: PMC1 INTC#, PMC2 INTD#
*/
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 27: PMC1 INTC#,PMC2 INTD#
*/
1
,
/* 28: PMC1 INTD#, PMC2 INTA#
*/
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 28: PMC1 INTD#,PMC2 INTA#
*/
1
,
/* 29: Enet 2 (connected to
J3) */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 29: Enet 2 (
J3) */
1
,
/* 30: Abort Switch */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 30: Abort Switch */
1
,
/* 31: RTC Alarm */
(
IRQ_SENSE_LEVEL
|
IRQ_POLARITY_NEGATIVE
),
/* 31: RTC Alarm */
};
};
extern
u_int
openpic_irq
(
void
);
extern
u_int
openpic_irq
(
void
);
extern
char
cmd_line
[];
extern
char
cmd_line
[];
extern
void
gen550_progress
(
char
*
,
unsigned
short
);
extern
void
gen550_init
(
int
,
struct
uart_port
*
);
int
use_of_interrupt_tree
=
0
;
int
use_of_interrupt_tree
=
0
;
static
void
mcpn765_halt
(
void
);
static
void
mcpn765_halt
(
void
);
TODC_ALLOC
();
TODC_ALLOC
();
#if defined(CONFIG_SERIAL_8250) && \
(defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
static
void
__init
mcpn765_early_serial_map
(
void
)
{
struct
uart_port
serial_req
;
/* Setup serial port access */
memset
(
&
serial_req
,
0
,
sizeof
(
serial_req
));
serial_req
.
uartclk
=
UART_CLK
;
serial_req
.
irq
=
17
;
serial_req
.
flags
=
STD_COM_FLAGS
;
serial_req
.
iotype
=
SERIAL_IO_MEM
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_1
;
serial_req
.
regshift
=
4
;
gen550_init
(
0
,
&
serial_req
);
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 0 failed
\n
"
);
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req
.
line
=
1
;
serial_req
.
irq
=
17
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_2
;
gen550_init
(
1
,
&
serial_req
);
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 1 failed
\n
"
);
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req
.
line
=
2
;
serial_req
.
irq
=
17
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_3
;
gen550_init
(
2
,
&
serial_req
);
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 2 failed
\n
"
);
/* Assume early_serial_setup() doesn't modify serial_req */
serial_req
.
line
=
3
;
serial_req
.
irq
=
17
;
serial_req
.
membase
=
(
u_char
*
)
MCPN765_SERIAL_4
;
gen550_init
(
3
,
&
serial_req
);
if
(
early_serial_setup
(
&
serial_req
)
!=
0
)
printk
(
KERN_ERR
"Early serial init of port 3 failed
\n
"
);
}
#endif
static
void
__init
static
void
__init
mcpn765_setup_arch
(
void
)
mcpn765_setup_arch
(
void
)
{
{
...
@@ -187,12 +248,12 @@ mcpn765_init_IRQ(void)
...
@@ -187,12 +248,12 @@ mcpn765_init_IRQ(void)
if
(
ppc_md
.
progress
)
if
(
ppc_md
.
progress
)
ppc_md
.
progress
(
"init_irq: enter"
,
0
);
ppc_md
.
progress
(
"init_irq: enter"
,
0
);
openpic_init
(
1
,
NUM_8259_INTERRUPTS
,
NULL
,
-
1
);
openpic_init
(
NUM_8259_INTERRUPTS
);
for
(
i
=
0
;
i
<
NUM_8259_INTERRUPTS
;
i
++
)
for
(
i
=
0
;
i
<
NUM_8259_INTERRUPTS
;
i
++
)
irq_desc
[
i
].
handler
=
&
i8259_pic
;
irq_desc
[
i
].
handler
=
&
i8259_pic
;
i8259_init
(
NULL
);
i8259_init
(
0
);
if
(
ppc_md
.
progress
)
if
(
ppc_md
.
progress
)
ppc_md
.
progress
(
"init_irq: exit"
,
0
);
ppc_md
.
progress
(
"init_irq: exit"
,
0
);
...
@@ -361,62 +422,12 @@ mcpn765_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
...
@@ -361,62 +422,12 @@ mcpn765_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
static
__inline__
void
static
__inline__
void
mcpn765_set_bat
(
void
)
mcpn765_set_bat
(
void
)
{
{
unsigned
long
bat3u
,
bat3l
;
mb
();
static
int
mapping_set
=
0
;
mtspr
(
DBAT1U
,
0xfe8000fe
);
mtspr
(
DBAT1L
,
0xfe80002a
);
if
(
!
mapping_set
)
{
mb
();
__asm__
__volatile__
(
" lis %0,0xf000
\n
\
ori %1,%0,0x002a
\n
\
ori %0,%0,0x1ffe
\n
\
mtspr 0x21e,%0
\n
\
mtspr 0x21f,%1
\n
\
isync
\n
\
sync "
:
"=r"
(
bat3u
),
"=r"
(
bat3l
));
mapping_set
=
1
;
}
return
;
}
}
#ifdef CONFIG_SERIAL_TEXT_DEBUG
#include <linux/serialP.h>
#include <linux/serial_reg.h>
#include <asm/serial.h>
static
struct
serial_state
rs_table
[
RS_TABLE_SIZE
]
=
{
SERIAL_PORT_DFNS
/* Defined in <asm/serial.h> */
};
static
void
mcpn765_progress
(
char
*
s
,
unsigned
short
hex
)
{
volatile
char
c
;
volatile
unsigned
long
com_port
;
u16
shift
;
com_port
=
rs_table
[
0
].
port
;
shift
=
rs_table
[
0
].
iomem_reg_shift
;
while
((
c
=
*
s
++
)
!=
0
)
{
while
((
*
((
volatile
unsigned
char
*
)
com_port
+
(
UART_LSR
<<
shift
))
&
UART_LSR_THRE
)
==
0
)
;
*
(
volatile
unsigned
char
*
)
com_port
=
c
;
if
(
c
==
'\n'
)
{
while
((
*
((
volatile
unsigned
char
*
)
com_port
+
(
UART_LSR
<<
shift
))
&
UART_LSR_THRE
)
==
0
)
;
*
(
volatile
unsigned
char
*
)
com_port
=
'\r'
;
}
}
}
#endif
/* CONFIG_SERIAL_TEXT_DEBUG */
void
__init
void
__init
platform_init
(
unsigned
long
r3
,
unsigned
long
r4
,
unsigned
long
r5
,
platform_init
(
unsigned
long
r3
,
unsigned
long
r4
,
unsigned
long
r5
,
unsigned
long
r6
,
unsigned
long
r7
)
unsigned
long
r6
,
unsigned
long
r7
)
...
@@ -458,11 +469,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -458,11 +469,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md
.
heartbeat_reset
=
0
;
ppc_md
.
heartbeat_reset
=
0
;
ppc_md
.
heartbeat_count
=
0
;
ppc_md
.
heartbeat_count
=
0
;
#if defined(CONFIG_SERIAL_8250) && \
(defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
mcpn765_early_serial_map
();
#ifdef CONFIG_SERIAL_TEXT_DEBUG
#ifdef CONFIG_SERIAL_TEXT_DEBUG
ppc_md
.
progress
=
mcpn765_progress
;
ppc_md
.
progress
=
gen550_progress
;
#else
/* !CONFIG_SERIAL_TEXT_DEBUG */
#endif
ppc_md
.
progress
=
NULL
;
#endif
#endif
/* CONFIG_SERIAL_TEXT_DEBUG */
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md
.
default_irq
=
mcpn765_ide_default_irq
;
ppc_ide_md
.
default_irq
=
mcpn765_ide_default_irq
;
...
...
arch/ppc/platforms/sandpoint.c
View file @
1f068b65
...
@@ -356,6 +356,21 @@ sandpoint_setup_arch(void)
...
@@ -356,6 +356,21 @@ sandpoint_setup_arch(void)
SANDPOINT_87308_CFG_OUTB(0x30, 0x01); \
SANDPOINT_87308_CFG_OUTB(0x30, 0x01); \
}
}
/*
* Fix IDE interrupts.
*/
static
int
__init
sandpoint_fix_winbond_83553
(
void
)
{
/* Make all 8259 interrupt level sensitive */
outb
(
0xf8
,
0x4d0
);
outb
(
0xde
,
0x4d1
);
return
0
;
}
arch_initcall
(
sandpoint_fix_winbond_83553
);
/*
/*
* Initialize the ISA devices on the Nat'l PC87308VUL SuperIO chip.
* Initialize the ISA devices on the Nat'l PC87308VUL SuperIO chip.
*/
*/
...
@@ -391,21 +406,6 @@ sandpoint_setup_natl_87308(void)
...
@@ -391,21 +406,6 @@ sandpoint_setup_natl_87308(void)
arch_initcall
(
sandpoint_setup_natl_87308
);
arch_initcall
(
sandpoint_setup_natl_87308
);
/*
* Fix IDE interrupts.
*/
static
int
__init
sandpoint_fix_winbond_83553
(
void
)
{
/* Make all 8259 interrupt level sensitive */
outb
(
0xf8
,
0x4d0
);
outb
(
0xde
,
0x4d1
);
return
0
;
}
arch_initcall
(
sandpoint_fix_winbond_83553
);
static
int
__init
static
int
__init
sandpoint_request_io
(
void
)
sandpoint_request_io
(
void
)
{
{
...
...
arch/ppc/platforms/sandpoint.h
View file @
1f068b65
...
@@ -61,9 +61,9 @@
...
@@ -61,9 +61,9 @@
#define UART_CLK 1843200
#define UART_CLK 1843200
#ifdef CONFIG_SERIAL_DETECT_IRQ
#ifdef CONFIG_SERIAL_DETECT_IRQ
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_
SKIP_TEST|ASYNC_
AUTO_IRQ)
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ)
#else
#else
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF
|ASYNC_SKIP_TEST
)
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF)
#endif
#endif
#define STD_SERIAL_PORT_DFNS \
#define STD_SERIAL_PORT_DFNS \
...
...
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