Commit c7b0b16d authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://cifs.bkbits.net/linux-2.5cifs

into home.osdl.org:/home/torvalds/v2.5/linux
parents 4947a1a3 020a2446
......@@ -68,8 +68,8 @@ setattr: yes
permission: no
getattr: no
setxattr: yes
getxattr: yes
listxattr: yes
getxattr: no
listxattr: no
removexattr: yes
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_sem on
victim.
......
......@@ -1265,8 +1265,8 @@ L: linux-hams@vger.kernel.org
S: Maintained
NETWORK BLOCK DEVICE
P: Pavel Machek
M: pavel@atrey.karlin.mff.cuni.cz
P: Paul Clements
M: Paul.Clements@steeleye.com
S: Maintained
NETWORK DEVICE DRIVERS
......
......@@ -62,7 +62,7 @@ void config_BSP(char *commandp, int size)
{
mcf_disableall();
#if defined(CONFIG_BOOTPARAM)
#ifdef CONFIG_BOOTPARAM
strncpy(commandp, CONFIG_BOOTPARAM_STRING, size);
commandp[size-1] = 0;
#else
......
......@@ -127,6 +127,7 @@ _start:
movc %d0,%CACR
#ifdef CONFIG_ROMFS_FS
/*
* Move ROM filesystem above bss :-)
*/
......@@ -148,6 +149,12 @@ _copy_romfs:
cmp.l %a0, %a2 /* Check if at end */
bne _copy_romfs
#else /* CONFIG_ROMFS_FS */
lea.l _ebss, %a1
move.l %a1, _ramstart
#endif /* CONFIG_ROMFS_FS */
/*
* Zero out the bss region.
*/
......
......@@ -110,6 +110,8 @@ _start:
movc %d0,%CACR
nop
#ifdef CONFIG_ROMFS_FS
/*
* Move ROM filesystem above bss :-)
*/
......@@ -131,6 +133,12 @@ _copy_romfs:
cmp.l %a0, %a2 /* Check if at end */
bne _copy_romfs
#else /* CONFIG_ROMFS_FS */
lea.l _ebss, %a1
move.l %a1, _ramstart
#endif /* CONFIG_ROMFS_FS */
/*
* Zero out the bss region.
*/
......
......@@ -450,9 +450,6 @@ config EV64260
config SPRUCE
bool "IBM-Spruce"
config MENF1
bool "MEN-F1"
config LOPEC
bool "Motorola-LoPEC"
......@@ -473,6 +470,10 @@ config PRPMC800
config SANDPOINT
bool "Motorola-Sandpoint"
help
Select SANDPOINT if configuring for a Motorola Sandpoint X3
or X3(b).
X3 (any flavor).
config ADIR
bool "SBS-Adirondack"
......@@ -490,9 +491,6 @@ config GEMINI
series Single Board Computer. More information is available at:
<http://www.synergymicro.com/PressRel/97_10_15.html>.
config ZX4500
bool "Zynx-ZX4500"
endchoice
config PPC_CHRP
......@@ -500,6 +498,11 @@ config PPC_CHRP
depends on PPC_MULTIPLATFORM
default y
config PPC_GEN550
bool
depends on SANDPOINT
default y
config PPC_PMAC
bool
depends on PPC_MULTIPLATFORM
......@@ -515,10 +518,6 @@ config PPC_OF
depends on PPC_PMAC || PPC_CHRP
default y
config SANDPOINT_X3
bool "Sandpoint X3"
depends on SANDPOINT
config FORCE
bool
depends on 6xx && !8260 && (PCORE || POWERPMC250)
......@@ -526,7 +525,7 @@ config FORCE
config EPIC_SERIAL_MODE
bool
depends on 6xx && !8260 && (LOPEC || SANDPOINT_X3)
depends on 6xx && !8260 && (LOPEC || SANDPOINT)
default y
config WILLOW
......@@ -536,7 +535,7 @@ config WILLOW
config MPC10X_STORE_GATHERING
bool "Enable MPC10x store gathering"
depends on FORCE || MENF1 || SANDPOINT || ZX4500
depends on FORCE || SANDPOINT
config GT64260
bool
......@@ -1528,7 +1527,7 @@ config BOOTX_TEXT
config SERIAL_TEXT_DEBUG
bool "Support for early boot texts over serial port"
depends on 4xx || GT64260 || LOPEC || MCPN765 || PPLUS || PRPMC800 || SANDPOINT || ZX4500
depends on 4xx || GT64260 || LOPEC || MCPN765 || PPLUS || PRPMC800 || SANDPOINT
config OCP
bool
......
......@@ -8,7 +8,8 @@
# Tom Rini January 2001
#
lib-y := string.o util.o misc-common.o
lib-y := string.o util.o misc-common.o \
serial_stub.o
lib-$(CONFIG_PPC_PREP) += mpc10x_memory.o
lib-$(CONFIG_LOPEC) += mpc10x_memory.o
lib-$(CONFIG_PAL4) += cpc700_memory.o
......
......@@ -95,8 +95,3 @@ serial_tstc(unsigned long com_port)
{
return ((inb(com_port + (UART_LSR << shift)) & UART_LSR_DR) != 0);
}
void
serial_close(unsigned long com_port)
{
}
/*
* arch/ppc/boot/common/serial_stub.c
*
* This is a few stub routines to make the boot code cleaner looking when
* there is no serial port support doesn't need to be closed, for example.
*
* Author: Tom Rini <trini@mvista.com>
*
* 2003 (c) MontaVista, Software, Inc. This file is licensed under the terms
* of the GNU General Public License version 2. This program is licensed "as
* is" without any warranty of any kind, whether express or implied.
*/
void __attribute__ ((weak))
serial_fixups(void)
{
}
unsigned long __attribute__ ((weak))
serial_init(int chan, void *ignored)
{
return 0;
}
void __attribute__ ((weak))
serial_close(unsigned long com_port)
{
}
......@@ -47,28 +47,20 @@ endif
ifeq ($(CONFIG_EBONY),y)
ZIMAGE := zImage-TREE
ZIMAGEINITRD := zImage.initrd-TREE
EXTRA := direct.o
END := ebony
ENTRYPOINT := 0x01000000
TFTPIMAGE := /tftpboot/zImage.$(END)
endif
ifeq ($(CONFIG_EV64260),y)
EXTRA := direct.o misc-ev64260.o
EXTRA := misc-ev64260.o
TFTPIMAGE := /tftpboot/zImage.ev64260
endif
ifeq ($(CONFIG_GEMINI),y)
ZIMAGE := zImage-STRIPELF
ZIMAGEINITRD := zImage.initrd-STRIPELF
EXTRA := direct.o
END := gemini
TFTPIMAGE := /tftpboot/zImage.$(END)
endif
ifeq ($(CONFIG_MENF1),y)
ZIMAGE := zImage-MENF1
ZIMAGEINITRD := zImage.initrd-MENF1
EXTRA := chrpmap.o
TFTPIMAGE := /tftpboot/zImage.menf1
endif
ifeq ($(CONFIG_K2),y)
EXTRA := legacy.o
TFTPIMAGE := /tftpboot/zImage.k2
......@@ -78,7 +70,6 @@ endif
ifeq ($(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750)$(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS),y)
ZIMAGE := zImage-PPLUS
ZIMAGEINITRD := zImage.initrd-PPLUS
EXTRA := direct.o
TFTPIMAGE := /tftpboot/zImage.pplus
ZNETBOOT := zImage.pplus
ZNETBOOTRD := zImage.initrd.pplus
......@@ -86,9 +77,6 @@ endif
ifeq ($(CONFIG_PPLUS),y)
EXTRA := legacy.o
endif
ifeq ($(CONFIG_PAL4),y)
EXTRA := direct.o
endif
ifeq ($(CONFIG_PCORE)$(CONFIG_POWERPMC250),y)
ZIMAGE := zImage-STRIPELF
ZIMAGEINITRD := zImage.initrd-STRIPELF
......@@ -96,30 +84,17 @@ EXTRA := chrpmap.o
END := pcore
TFTPIMAGE := /tftpboot/zImage.$(END)
endif
# The PowerPMC 250 needs the dummy serial_fixups()
ifeq ($(CONFIG_POWERPMC250),y)
EXTRA := direct.o
endif
ifeq ($(CONFIG_SANDPOINT),y)
EXTRA := direct.o
TFTPIMAGE := /tftpboot/zImage.sandpoint
endif
ifeq ($(CONFIG_SPRUCE),y)
ZIMAGE := zImage-TREE
ZIMAGEINITRD := zImage.initrd-TREE
EXTRA := direct.o
END := spruce
ENTRYPOINT := 0x00800000
MISC := misc-spruce.o
TFTPIMAGE := /tftpboot/zImage.$(END)
endif
ifeq ($(CONFIG_ZX4500),y)
ZIMAGE := zImage-STRIPELF
ZIMAGEINITRD := zImage.initrd-STRIPELF
EXTRA := direct.o
END := zx4500
TFTPIMAGE := /tftpboot/zImage.$(END)
endif
ifeq ($(CONFIG_SMP),y)
TFTPIMAGE += .smp
endif
......@@ -221,12 +196,6 @@ $(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE)
$(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(END) \
$(ENTRYPOINT)
$(images)/zImage-MENF1: $(obj)/zvmlinux $(MKPREP)
$(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.menf1
$(images)/zImage.initrd-MENF1: $(obj)/zvmlinux.initrd $(MKPREP)
$(MKPREP) -pbp $(obj)/zvmlinux.initrd $(images)/zImage.initrd.menf1
$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT)
$(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.pplus
$(MKBUGBOOT) $(obj)/zvmlinux $(images)/zImage.bugboot
......
/*
* arch/ppc/boot/simple/direct.S
*
* Author: Tom Rini <trini@mvista.com>
*
* This is an empty function for machines which use SERIAL_IO_MEM
* and don't need ISA_io set to anything but 0, or perform any other
* serial fixups.
*/
.text
.globl serial_fixups
serial_fixups:
blr
......@@ -311,8 +311,3 @@ serial_tstc(void *ignored)
return(!(rbdf->cbd_sc & BD_SC_EMPTY));
}
void
serial_close(unsigned long com_port)
{
}
......@@ -288,8 +288,3 @@ serial_tstc(void *ignored)
return(!(rbdf->cbd_sc & BD_SC_EMPTY));
}
void
serial_close(unsigned long com_port)
{
}
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_ADIR=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_ALTIVEC is not set
......
......@@ -56,7 +56,6 @@ CONFIG_APUS=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -68,7 +67,6 @@ CONFIG_APUS=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_ALTIVEC is not set
......
......@@ -56,7 +56,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -68,7 +67,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PREP=y
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
CONFIG_EV64260=y
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_EV64260=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_GT64260=y
CONFIG_SERIAL_CONSOLE_BAUD=115200
# CONFIG_SMP is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
CONFIG_GEMINI=y
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
CONFIG_ALTIVEC=y
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PREP=y
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PPC_STD_MMU=y
CONFIG_K2=y
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_CPC710_DATA_GATHERING is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
CONFIG_LOPEC=y
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_LOPEC=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_EPIC_SERIAL_MODE=y
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
......
......@@ -50,7 +50,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
CONFIG_MCPN765=y
# CONFIG_MVME5100 is not set
......@@ -62,7 +61,6 @@ CONFIG_MCPN765=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
CONFIG_ALTIVEC=y
......
......@@ -67,7 +67,6 @@ CONFIG_MENF1=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_MPC10X_STORE_GATHERING=y
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
CONFIG_MVME5100=y
......@@ -67,7 +66,6 @@ CONFIG_MVME5100=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_MVME5100_IPMC761_PRESENT is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PCORE=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PCORE=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_FORCE=y
# CONFIG_MPC10X_STORE_GATHERING is not set
# CONFIG_SMP is not set
......
......@@ -57,7 +57,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -69,7 +68,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PREP=y
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PREP=y
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PPLUS=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_ALTIVEC is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PRPMC750=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_ALTIVEC is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_PRPMC800=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_ALTIVEC is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,8 +66,7 @@ CONFIG_SANDPOINT=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_SANDPOINT_X3=y
CONFIG_PPC_GEN550=y
CONFIG_EPIC_SERIAL_MODE=y
# CONFIG_MPC10X_STORE_GATHERING is not set
# CONFIG_SMP is not set
......@@ -84,8 +82,8 @@ CONFIG_ALTIVEC=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
# CONFIG_PCI_LEGACY_PROC is not set
# CONFIG_PCI_NAMES is not set
......@@ -117,6 +115,11 @@ CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_BOOT_LOAD=0x00800000
#
# Generic Driver Options
#
# CONFIG_FW_LOADER is not set
#
# Memory Technology Devices (MTD)
#
......@@ -147,7 +150,7 @@ CONFIG_BLK_DEV_INITRD=y
# CONFIG_MD is not set
#
# ATA/IDE/MFM/RLL support
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
......@@ -166,6 +169,7 @@ CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_TASKFILE_IO=y
#
# IDE chipset support/bugfixes
......@@ -173,7 +177,7 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEPCI is not set
#
# SCSI support
# SCSI device support
#
# CONFIG_SCSI is not set
......@@ -292,6 +296,7 @@ CONFIG_NET_PCI=y
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_TC35815 is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
CONFIG_E100=y
......@@ -412,11 +417,6 @@ CONFIG_FONT_8x16=y
#
# CONFIG_LOGO is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Input device support
#
......@@ -443,6 +443,7 @@ CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set
#
# Input Device Drivers
......@@ -731,6 +732,7 @@ CONFIG_USB_SE401=m
#
# USB Network adaptors
#
# CONFIG_USB_AX8817X is not set
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
......
......@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
CONFIG_SPRUCE=y
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -67,7 +66,6 @@ CONFIG_SPRUCE=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
# CONFIG_SPRUCE_BAUD_33M is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
......
#
# Automatically generated make config: don't edit
#
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_HAVE_DEC_LOCK=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# General setup
#
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_EMBEDDED=y
CONFIG_FUTEX=y
# CONFIG_EPOLL is not set
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
# Platform support
#
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_6xx=y
# CONFIG_40x is not set
# CONFIG_POWER3 is not set
# CONFIG_8xx is not set
#
# IBM 4xx options
#
# CONFIG_8260 is not set
CONFIG_GENERIC_ISA_DMA=y
CONFIG_PPC_STD_MMU=y
# CONFIG_PPC_MULTIPLATFORM is not set
# CONFIG_APUS is not set
# CONFIG_WILLOW_2 is not set
# CONFIG_PCORE is not set
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
# CONFIG_PPLUS is not set
# CONFIG_PRPMC750 is not set
# CONFIG_PRPMC800 is not set
# CONFIG_SANDPOINT is not set
# CONFIG_ADIR is not set
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
CONFIG_ZX4500=y
# CONFIG_MPC10X_STORE_GATHERING is not set
# CONFIG_SMP is not set
# CONFIG_PREEMPT is not set
# CONFIG_ALTIVEC is not set
# CONFIG_TAU is not set
# CONFIG_CPU_FREQ is not set
#
# General setup
#
# CONFIG_HIGHMEM is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_MISC=y
# CONFIG_PCI_LEGACY_PROC is not set
CONFIG_PCI_NAMES=y
# CONFIG_HOTPLUG is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
CONFIG_PPC601_SYNC_FIX=y
# CONFIG_CMDLINE_BOOL is not set
#
# Advanced setup
#
# CONFIG_ADVANCED_OPTIONS is not set
#
# Default settings for advanced configuration options are used
#
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_BOOT_LOAD=0x00800000
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Plug and Play support
#
# CONFIG_PNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_BLK_DEV_INITRD=y
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Fusion MPT device support
#
#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
#
# Networking support
#
CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_NETFILTER is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_IPV6 is not set
# CONFIG_XFRM_USER is not set
#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MII is not set
# CONFIG_OAKNET is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_DGRS is not set
CONFIG_EEPRO100=y
# CONFIG_EEPRO100_PIO is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring devices (depends on LLC=y)
#
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# ISDN subsystem
#
# CONFIG_ISDN_BOOL is not set
#
# Graphics support
#
# CONFIG_FB is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Input device support
#
# CONFIG_INPUT is not set
#
# Userland interfaces
#
#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
# CONFIG_SERIO is not set
#
# Input Device Drivers
#
#
# Macintosh device drivers
#
#
# Character devices
#
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
#
# I2C support
#
# CONFIG_I2C is not set
#
# I2C Hardware Sensors Mainboard support
#
#
# I2C Hardware Sensors Chip support
#
# CONFIG_I2C_SENSOR is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
CONFIG_GEN_RTC=y
# CONFIG_GEN_RTC_X is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HANGCHECK_TIMER is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set
#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_UDF_FS is not set
#
# DOS/FAT/NT Filesystems
#
# CONFIG_FAT_FS is not set
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_DEVFS_FS=y
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
CONFIG_RAMFS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_EXPORTFS=y
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
# CONFIG_USB_GADGET is not set
#
# Bluetooth support
#
# CONFIG_BT is not set
#
# Library routines
#
# CONFIG_CRC32 is not set
#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_KALLSYMS is not set
CONFIG_SERIAL_TEXT_DEBUG=y
#
# Security options
#
# CONFIG_SECURITY is not set
#
# Cryptographic options
#
# CONFIG_CRYPTO is not set
......@@ -56,7 +56,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set
......@@ -68,7 +67,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_K2 is not set
# CONFIG_PAL4 is not set
# CONFIG_GEMINI is not set
# CONFIG_ZX4500 is not set
CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PREP=y
......
......@@ -851,14 +851,4 @@ kgdb_output_string (const char* s, unsigned int count)
putpacket(buffer);
return 1;
}
#if defined(CONFIG_6xx) || defined(CONFIG_POWER3)
/* This is used on arches which don't have a serial driver that maps
* the ports for us */
void
kgdb_map_scc(void)
{
}
#endif
......@@ -272,8 +272,10 @@ EXPORT_SYMBOL(kd_mksound);
#ifdef CONFIG_NVRAM
EXPORT_SYMBOL(nvram_read_byte);
EXPORT_SYMBOL(nvram_write_byte);
#ifdef CONFIG_PPC_PMAC
EXPORT_SYMBOL(pmac_xpram_read);
EXPORT_SYMBOL(pmac_xpram_write);
#endif
#endif /* CONFIG_NVRAM */
EXPORT_SYMBOL(to_tm);
......
......@@ -619,6 +619,8 @@ void __init setup_arch(char **cmdline_p)
if (strstr(cmd_line, "nokgdb"))
printk("kgdb default breakpoint deactivated on command line\n");
else {
if (ppc_md.progress)
ppc_md.progress("setup_arch: kgdb breakpoint", 0x4000);
printk("kgdb default breakpoint activated\n");
breakpoint();
}
......
......@@ -43,9 +43,8 @@ obj-$(CONFIG_POWERPMC250) += powerpmc250.o
obj-$(CONFIG_PPLUS) += pplus_pci.o pplus_setup.o
obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o
obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o
obj-$(CONFIG_SANDPOINT) += sandpoint_setup.o sandpoint_pci.o
obj-$(CONFIG_SANDPOINT) += sandpoint.o
obj-$(CONFIG_SPRUCE) += spruce_setup.o spruce_pci.o
obj-$(CONFIG_ZX4500) += zx4500_setup.o zx4500_pci.o
ifeq ($(CONFIG_SMP),y)
obj-$(CONFIG_PPC_PMAC) += pmac_smp.o
......
/*
* arch/ppc/platforms/menf1.h
*
* Definitions for MEN F1 board support
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#ifndef __PPC_PLATFORMS_MENF1_H
#define __PPC_PLATFORMS_MENF1_H
#define MENF1_NVRAM_AS0 0x70
#define MENF1_NVRAM_AS1 0x72
#define MENF1_NVRAM_DATA 0x71
#define MENF1_IDE0_BASE_ADDR 0x1f0
#define MENF1_IDE1_BASE_ADDR 0x170
#endif /* __PPC_PLATFORMS_MENF1_H */
/*
* arch/ppc/platforms/menf1_pci.c
*
* PCI support for MEN F1
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/mpc10x.h>
#include "menf1.h"
#undef DEBUG
#ifdef DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#endif /* DEBUG */
static inline int __init
menf1_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
static char pci_irq_table[][4] =
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{10, 11, 7, 9}, /* IDSEL 26 - PCMIP 0 */
{0, 0, 0, 0}, /* IDSEL 27 - M5229 IDE */
{0, 0, 0, 0}, /* IDSEL 28 - M7101 PMU */
{9, 10, 11, 7}, /* IDSEL 29 - PCMIP 1 */
{10, 11, 7, 9}, /* IDSEL 30 - P2P Bridge */
};
const long min_idsel = 26, max_idsel = 30, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
};
static int
menf1_exclude_device(u_char bus, u_char devfn)
{
if ((bus == 0) && (devfn == 0xe0)) {
return PCIBIOS_DEVICE_NOT_FOUND;
}
else {
return PCIBIOS_SUCCESSFUL;
}
}
void __init
menf1_find_bridges(void)
{
struct pci_controller* hose;
hose = pcibios_alloc_controller();
if (!hose)
return;
hose->first_busno = 0;
hose->last_busno = 0xff;
ppc_md.pci_exclude_device = menf1_exclude_device;
mpc10x_bridge_init(hose,
MPC10X_MEM_MAP_B,
MPC10X_MEM_MAP_B,
MPC10X_MAPB_EUMB_BASE);
hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
{
/* Add ISA bus wait states */
unsigned char isa_control;
early_read_config_byte(hose, 0, 0x90, 0x43, &isa_control);
isa_control |= 0x33;
early_write_config_byte(hose, 0, 0x90, 0x43, isa_control);
}
ppc_md.pci_swizzle = common_swizzle;
ppc_md.pci_map_irq = menf1_map_irq;
}
/*
* arch/ppc/platforms/menf1_setup.c
*
* Board setup routines for MEN F1
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/reboot.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/types.h>
#include <linux/major.h>
#include <linux/initrd.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/ide.h>
#include <linux/irq.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/time.h>
#include <asm/i8259.h>
#include <asm/mpc10x.h>
#include <asm/todc.h>
#include <asm/bootinfo.h>
#include "menf1.h"
extern void menf1_find_bridges(void);
extern unsigned long loops_per_jiffy;
/* Dummy variable to satisfy mpc10x_common.o */
void *OpenPIC_Addr;
static int
menf1_show_cpuinfo(struct seq_file *m)
{
seq_printf(m, "machine\t\t: MEN F1\n");
return 0;
}
static void __init
menf1_setup_arch(void)
{
/* init to some ~sane value until calibrate_delay() runs */
loops_per_jiffy = 50000000/HZ;
/* Lookup PCI host bridges */
menf1_find_bridges();
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
ROOT_DEV = Root_RAM0;
else
#endif
#ifdef CONFIG_ROOT_NFS
ROOT_DEV = Root_NFS;
#else
ROOT_DEV = Root_HDA2;
#endif
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
printk("MEN F1 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n");
}
static void
menf1_restart(char *cmd)
{
int picr1;
struct pci_dev *pdev;
local_irq_disable();
/*
* Firmware doesn't like re-entry using Map B (CHRP), so make sure the
* PCI bridge is using MAP A (PReP).
*/
pdev = pci_find_slot(0, PCI_DEVFN(0,0));
while(pdev == NULL); /* paranoia */
pci_read_config_dword(pdev, MPC10X_CFG_PICR1_REG, &picr1);
picr1 = (picr1 & ~MPC10X_CFG_PICR1_ADDR_MAP_MASK) |
MPC10X_CFG_PICR1_ADDR_MAP_A;
pci_write_config_dword(pdev, MPC10X_CFG_PICR1_REG, picr1);
asm volatile("sync");
/* SRR0 has system reset vector, SRR1 has default MSR value */
/* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
__asm__ __volatile__
("\n\
lis 3,0xfff0
ori 3,3,0x0100
mtspr 26,3
li 3,0
mtspr 27,3
rfi
");
while(1);
}
static void
menf1_halt(void)
{
local_irq_disable();
while (1);
}
static void
menf1_power_off(void)
{
menf1_halt();
}
static void __init
menf1_init_IRQ(void)
{
int i;
for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ )
irq_desc[i].handler = &i8259_pic;
i8259_init(NULL);
}
/*
* Set BAT 3 to map 0xF0000000.
*/
static __inline__ void
menf1_set_bat(void)
{
static int mapping_set = 0;
if (!mapping_set)
{
/* wait for all outstanding memory accesses to complete */
mb();
/* setup DBATs */
mtspr(DBAT3U, 0xf0001ffe);
mtspr(DBAT3L, 0xf000002a);
/* wait for updates */
mb();
mapping_set = 1;
}
return;
}
static unsigned long __init
menf1_find_end_of_memory(void)
{
/* Cover the I/O with a BAT */
menf1_set_bat();
/* Read the memory size from the MPC107 SMC */
return mpc10x_get_mem_size(MPC10X_MEM_MAP_B);
}
static void __init
menf1_map_io(void)
{
io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO);
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* IDE functions */
static void __init
menf1_ide_init_hwif_ports (hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{
unsigned long reg = data_port;
int i = 8;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg;
reg += 1;
}
if (ctrl_port)
hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
else
hw->io_ports[IDE_CONTROL_OFFSET] =
hw->io_ports[IDE_DATA_OFFSET] + 0x206;
if (irq != NULL)
*irq = 0;
}
static int
menf1_ide_default_irq(unsigned long base)
{
if (base == MENF1_IDE0_BASE_ADDR)
return 14;
else if (base == MENF1_IDE1_BASE_ADDR)
return 15;
else
return 0;
}
static unsigned long
menf1_ide_default_io_base(int index)
{
if (index == 0)
return MENF1_IDE0_BASE_ADDR;
else if (index == 1)
return MENF1_IDE1_BASE_ADDR;
else
return 0;
}
#endif
TODC_ALLOC();
void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
parse_bootinfo(find_bootinfo());
isa_io_base = MPC10X_MAPB_ISA_IO_BASE;
isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE;
pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET;
ppc_md.setup_arch = menf1_setup_arch;
ppc_md.show_cpuinfo = menf1_show_cpuinfo;
ppc_md.init_IRQ = menf1_init_IRQ;
ppc_md.get_irq = i8259_irq;
ppc_md.find_end_of_memory = menf1_find_end_of_memory;
ppc_md.setup_io_mappings = menf1_map_io;
ppc_md.restart = menf1_restart;
ppc_md.power_off = menf1_power_off;
ppc_md.halt = menf1_halt;
TODC_INIT(TODC_TYPE_MK48T59,
MENF1_NVRAM_AS0,
MENF1_NVRAM_AS1,
MENF1_NVRAM_DATA,
7);
ppc_md.time_init = todc_time_init;
ppc_md.get_rtc_time = todc_get_rtc_time;
ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.calibrate_decr = todc_calibrate_decr;
ppc_md.nvram_read_val = todc_m48txx_read_val;
ppc_md.nvram_write_val = todc_m48txx_write_val;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_io_base = menf1_ide_default_io_base;
ppc_ide_md.default_irq = menf1_ide_default_irq;
ppc_ide_md.ide_init_hwif = menf1_ide_init_hwif_ports;
#endif
}
......@@ -6,7 +6,7 @@
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
* 2000-2003 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
......@@ -19,8 +19,8 @@
#ifndef __PPC_PLATFORMS_SANDPOINT_H
#define __PPC_PLATFORMS_SANDPOINT_H
#ifdef CONFIG_SANDPOINT_X3
#define SANDPOINT_SIO_SLOT 0 /* Cascaded from EPIC IRQ 0 */
#include <asm/ppcboot.h>
#if 0
/* The Sandpoint X3 allows the IDE interrupt to be directly connected
* from the Windbond (PCI INTC or INTD) to the serial EPIC. Someday
......@@ -34,20 +34,6 @@
#define SANDPOINT_IDE_INT0 14 /* 8259 Test */
#define SANDPOINT_IDE_INT1 15 /* 8259 Test */
#endif
#else
/*
* Define the PCI slot that the 8259 is sharing interrupts with.
* Valid values are 1 (PCI slot 2) and 2 (PCI slot 3).
*/
#define SANDPOINT_SIO_SLOT 1
/* ...and for the IDE from the 8259....
*/
#define SANDPOINT_IDE_INT0 14
#define SANDPOINT_IDE_INT1 15
#endif
#define SANDPOINT_SIO_IRQ (SANDPOINT_SIO_SLOT + NUM_8259_INTERRUPTS)
/*
* The sandpoint boards have processor modules that either have an 8240 or
......@@ -62,7 +48,33 @@
*/
#define SANDPOINT_HOST_BRIDGE_IDSEL 12
/*
* Serial defines.
*/
#define SANDPOINT_SERIAL_0 0xfe0003f8
#define SANDPOINT_SERIAL_1 0xfe0002f8
#define RS_TABLE_SIZE 2
/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
#define BASE_BAUD ( 1843200 / 16 )
#define UART_CLK 1843200
#ifdef CONFIG_SERIAL_DETECT_IRQ
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
#else
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
#endif
#define STD_SERIAL_PORT_DFNS \
{ 0, BASE_BAUD, SANDPOINT_SERIAL_0, 4, STD_COM_FLAGS, /* ttyS0 */ \
iomem_base: (u8 *)SANDPOINT_SERIAL_0, \
io_type: SERIAL_IO_MEM }, \
{ 0, BASE_BAUD, SANDPOINT_SERIAL_1, 3, STD_COM_FLAGS, /* ttyS1 */ \
iomem_base: (u8 *)SANDPOINT_SERIAL_1, \
io_type: SERIAL_IO_MEM },
void sandpoint_find_bridges(void);
#define SERIAL_PORT_DFNS \
STD_SERIAL_PORT_DFNS
#endif /* __PPC_PLATFORMS_SANDPOINT_H */
/*
* arch/ppc/platforms/sandpoint_pci.c
*
* PCI setup routines for the Motorola SPS Sandpoint Test Platform
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/mpc10x.h>
#include "sandpoint.h"
/*
* Motorola SPS Sandpoint interrupt routing.
*/
static inline int
sandpoint_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
static char pci_irq_table[][4] =
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{ SANDPOINT_SIO_IRQ,
0, 0, 0 }, /* IDSEL 11 - i8259 on Winbond */
{ 0, 0, 0, 0 }, /* IDSEL 12 - unused */
#ifdef CONFIG_SANDPOINT_X3
#if 0 /* This is what it _should_ look like -- Dan */
{ 17, 20, 19, 18 }, /* IDSEL 13 - PCI slot 1 */
{ 18, 17, 20, 19 }, /* IDSEL 14 - PCI slot 2 */
{ 19, 18, 17, 20 }, /* IDSEL 15 - PCI slot 3 */
{ 20, 19, 18, 17 }, /* IDSEL 16 - PCI slot 4 */
#else
{ 18, 21, 20, 19 }, /* IDSEL 13 - PCI slot 1 */
{ 19, 18, 21, 20 }, /* IDSEL 14 - PCI slot 2 */
{ 20, 19, 18, 21 }, /* IDSEL 15 - PCI slot 3 */
{ 21, 20, 19, 18 }, /* IDSEL 16 - PCI slot 4 */
#endif
#else
{ 16, 19, 18, 17 }, /* IDSEL 13 - PCI slot 1 */
{ 17, 16, 19, 18 }, /* IDSEL 14 - PCI slot 2 */
{ 18, 17, 16, 19 }, /* IDSEL 15 - PCI slot 3 */
{ 19, 18, 17, 16 }, /* IDSEL 16 - PCI slot 4 */
#endif
};
const long min_idsel = 11, max_idsel = 16, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
}
static void __init
sandpoint_setup_winbond_83553(struct pci_controller *hose)
{
int devfn;
/*
* Route IDE interrupts directly to the 8259's IRQ 14 & 15.
* We can't route the IDE interrupt to PCI INTC# or INTD# because those
* woule interfere with the PMC's INTC# and INTD# lines.
*/
/*
* Winbond Fcn 0
*/
devfn = PCI_DEVFN(11,0);
early_write_config_byte(hose,
0,
devfn,
0x43, /* IDE Interrupt Routing Control */
0xef);
early_write_config_word(hose,
0,
devfn,
0x44, /* PCI Interrupt Routing Control */
0x0000);
/* Want ISA memory cycles to be forwarded to PCI bus */
early_write_config_byte(hose,
0,
devfn,
0x48, /* ISA-to-PCI Addr Decoder Control */
0xf0);
/* Enable RTC and Keyboard address locations. */
early_write_config_byte(hose,
0,
devfn,
0x4d, /* Chip Select Control Register */
0x00);
/* Enable Port 92. */
early_write_config_byte(hose,
0,
devfn,
0x4e, /* AT System Control Register */
0x06);
/*
* Winbond Fcn 1
*/
devfn = PCI_DEVFN(11,1);
/* Put IDE controller into native mode. */
early_write_config_byte(hose,
0,
devfn,
0x09, /* Programming interface Register */
0x8f);
/* Init IRQ routing, enable both ports, disable fast 16 */
early_write_config_dword(hose,
0,
devfn,
0x40, /* IDE Control/Status Register */
0x00ff0011);
return;
}
static int
sandpoint_exclude_device(u_char bus, u_char devfn)
{
if ((bus == 0) && (PCI_SLOT(devfn) == SANDPOINT_HOST_BRIDGE_IDSEL)) {
return PCIBIOS_DEVICE_NOT_FOUND;
}
else {
return PCIBIOS_SUCCESSFUL;
}
}
void __init
sandpoint_find_bridges(void)
{
struct pci_controller *hose;
hose = pcibios_alloc_controller();
if (!hose)
return;
hose->first_busno = 0;
hose->last_busno = 0xff;
if (mpc10x_bridge_init(hose,
MPC10X_MEM_MAP_B,
MPC10X_MEM_MAP_B,
MPC10X_MAPB_EUMB_BASE) == 0) {
/* Do early winbond init, then scan PCI bus */
sandpoint_setup_winbond_83553(hose);
ppc_md.pci_exclude_device = sandpoint_exclude_device;
hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
ppc_md.pcibios_fixup = NULL;
ppc_md.pcibios_fixup_bus = NULL;
ppc_md.pci_swizzle = common_swizzle;
ppc_md.pci_map_irq = sandpoint_map_irq;
}
else {
if (ppc_md.progress)
ppc_md.progress("Bridge init failed", 0x100);
printk("Host bridge init failed\n");
}
return;
}
/*
* include/asm-ppc/sandpoint_serial.h
*
* Definitions for Motorola SPS Sandpoint Test Platform
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#ifndef __ASMPPC_SANDPOINT_SERIAL_H
#define __ASMPPC_SANDPOINT_SERIAL_H
#include <linux/config.h>
#define SANDPOINT_SERIAL_0 0xfe0003f8
#define SANDPOINT_SERIAL_1 0xfe0002f8
#ifdef CONFIG_SERIAL_MANY_PORTS
#define RS_TABLE_SIZE 64
#else
#define RS_TABLE_SIZE 2
#endif
/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
#define BASE_BAUD ( 1843200 / 16 )
#ifdef CONFIG_SERIAL_DETECT_IRQ
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
#else
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
#endif
#define STD_SERIAL_PORT_DFNS \
{ 0, BASE_BAUD, SANDPOINT_SERIAL_0, 4, STD_COM_FLAGS, /* ttyS0 */ \
iomem_base: (u8 *)SANDPOINT_SERIAL_0, \
io_type: SERIAL_IO_MEM }, \
{ 0, BASE_BAUD, SANDPOINT_SERIAL_1, 3, STD_COM_FLAGS, /* ttyS1 */ \
iomem_base: (u8 *)SANDPOINT_SERIAL_1, \
io_type: SERIAL_IO_MEM },
#define SERIAL_PORT_DFNS \
STD_SERIAL_PORT_DFNS
#endif /* __ASMPPC_SANDPOINT_SERIAL_H */
/* * arch/ppc/platforms/zx4500.h
*
* Board setup routines for Znyx ZX4500 cPCI board.
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#ifndef __PPC_PLATFORMS_ZX4500_H_
#define __PPC_PLATFORMS_ZX4500_H_
/*
* Define the addresses of CPLD registers in CLPD area.
*/
#define ZX4500_CPLD_BOARD_ID 0xff800001
#define ZX4500_CPLD_REV 0xff800002
#define ZX4500_CPLD_RESET 0xff800011
#define ZX4500_CPLD_PHY1 0xff800014
#define ZX4500_CPLD_PHY2 0xff800015
#define ZX4500_CPLD_PHY3 0xff800016
#define ZX4500_CPLD_SYSCTL 0xff800017
#define ZX4500_CPLD_EXT_FLASH 0xff800018
#define ZX4500_CPLD_DUAL1 0xff800019
#define ZX4500_CPLD_DUAL2 0xff80001A
#define ZX4500_CPLD_STATUS 0xff800030
#define ZX4500_CPLD_STREAM 0xff800032
#define ZX4500_CPLD_PHY1_LED 0xff800034
#define ZX4500_CPLD_PHY2_LED 0xff800035
#define ZX4500_CPLD_PHY3_LED 0xff800036
#define ZX4500_CPLD_PHY1_LNK 0xff80003C
#define ZX4500_CPLD_PHY2_LNK 0xff80003D
#define ZX4500_CPLD_PHY3_LNK 0xff80003E
#define ZX4500_CPLD_RESET_SOFT 0x01 /* Soft Reset */
#define ZX4500_CPLD_RESET_XBUS 0x40 /* Reset entire board */
#define ZX4500_CPLD_SYSCTL_PMC 0x01 /* Enable INTA/B/C/D from PMC */
#define ZX4500_CPLD_SYSCTL_BCM 0x04 /* Enable INTA from BCM */
#define ZX4500_CPLD_SYSCTL_SINTA 0x08 /* Enable SINTA from 21554 */
#define ZX4500_CPLD_SYSCTL_WD 0x20 /* Enable Watchdog Timer */
#define ZX4500_CPLD_SYSCTL_PMC_TRI 0x80 /* Tri-state PMC EREADY */
#define ZX4500_CPLD_DUAL2_LED_PULL 0x01 /* Pull LED */
#define ZX4500_CPLD_DUAL2_LED_EXT_FAULT 0x02 /* External Fault LED */
#define ZX4500_CPLD_DUAL2_LED_INT_FAULT 0x04 /* Internal Fault LED */
#define ZX4500_CPLD_DUAL2_LED_OK 0x08 /* OK LED */
#define ZX4500_CPLD_DUAL2_LED_CLK 0x10 /* CLK LED */
/*
* Defines related to boot string stored in flash.
*/
#define ZX4500_BOOT_STRING_ADDR 0xfff7f000
#define ZX4500_BOOT_STRING_LEN 80
/*
* Define the IDSEL that the PCI bus side of the 8240 is connected to.
* This IDSEL must not be selected from the 8240 processor side.
*/
#define ZX4500_HOST_BRIDGE_IDSEL 20
void zx4500_find_bridges(void);
#endif /* __PPC_PLATFORMS_ZX4500_H_ */
/*
* arch/ppc/platforms/zx4500_pci.c
*
* PCI setup routines for Znyx ZX4500 cPCI boards.
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
#include <asm/mpc10x.h>
#include <asm/pci-bridge.h>
#include "zx4500.h"
/*
* Znyx ZX4500 interrupt routes.
*/
static inline int
zx4500_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
static char pci_irq_table[][4] =
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{ 19, 0, 0, 0 }, /* IDSEL 21 - 21554 PCI-cPCI bridge */
{ 18, 0, 0, 0 }, /* IDSEL 22 - BCM5600 INTA */
{ 16, 20, 16, 20 }, /* IDSEL 23 - PPMC Slot */
};
const long min_idsel = 21, max_idsel = 23, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
}
void __init
zx4500_board_init(struct pci_controller *hose)
{
uint val;
u_char sysctl;
/*
* CPLD Registers are mapped in by BAT 3 in zx4500_setup_arch().
*
* Turn off all interrupts routed through the CPLD.
* Also, turn off watchdog timer and drive PMC EREADY low.
*/
sysctl = in_8((volatile u_char *)ZX4500_CPLD_SYSCTL);
sysctl &= ~(ZX4500_CPLD_SYSCTL_PMC |
ZX4500_CPLD_SYSCTL_BCM |
ZX4500_CPLD_SYSCTL_SINTA |
ZX4500_CPLD_SYSCTL_WD |
ZX4500_CPLD_SYSCTL_PMC_TRI);
out_8((volatile u_char *)ZX4500_CPLD_SYSCTL, sysctl);
/*
* Kludge the size that BAR2 of the 21554 asks for
* (i.e., set Upstream I/O or Memory 0 Setup Register).
* Old versions of SROM wants 1 GB which is too large, make it ask
* for 256 MB.
*/
early_read_config_dword(hose, 0, PCI_DEVFN(21,0), 0xc4, &val);
if (val != 0) {
early_write_config_dword(hose,
0,
PCI_DEVFN(21,0),
0xc4,
val | 0xf0000000);
}
return;
}
static int
zx4500_exclude_device(u_char bus, u_char devfn)
{
if ((bus == 0) && (PCI_SLOT(devfn) == ZX4500_HOST_BRIDGE_IDSEL)) {
return PCIBIOS_DEVICE_NOT_FOUND;
}
else {
return PCIBIOS_SUCCESSFUL;
}
}
void __init
zx4500_find_bridges(void)
{
struct pci_controller *hose;
hose = pcibios_alloc_controller();
if (!hose)
return;
hose->first_busno = 0;
hose->last_busno = 0xff;
if (mpc10x_bridge_init(hose,
MPC10X_MEM_MAP_B,
MPC10X_MEM_MAP_B,
MPC10X_MAPB_EUMB_BASE) == 0) {
hose->mem_resources[0].end = 0xffffffff;
/* Initialize the board */
zx4500_board_init(hose);
/* scan PCI bus */
ppc_md.pci_exclude_device = zx4500_exclude_device;
hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
ppc_md.pcibios_fixup = NULL;
ppc_md.pcibios_fixup_bus = NULL;
ppc_md.pci_swizzle = common_swizzle;
ppc_md.pci_map_irq = zx4500_map_irq;
}
else {
if (ppc_md.progress)
ppc_md.progress("Bridge init failed", 0x100);
printk("Host bridge init failed\n");
}
return;
}
/*
* arch/ppc/platforms/zx4500_serial.h
*
* Definitions for Znyx ZX4500 board support
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#ifndef __ASMPPC_ZX4500_SERIAL_H
#define __ASMPPC_ZX4500_SERIAL_H
#include <linux/config.h>
/* Define the UART base address (only 1 UART) */
#define ZX4500_SERIAL_1 0xff880000
#ifdef CONFIG_SERIAL_MANY_PORTS
#define RS_TABLE_SIZE 64
#else
#define RS_TABLE_SIZE 1
#endif
/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
#define BASE_BAUD ( 1843200 / 16 )
#ifdef CONFIG_SERIAL_DETECT_IRQ
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
#else
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
#endif
#define STD_SERIAL_PORT_DFNS \
{ 0, BASE_BAUD, ZX4500_SERIAL_1, 17, STD_COM_FLAGS, /* ttyS0 */ \
iomem_base: (u8 *)ZX4500_SERIAL_1, \
io_type: SERIAL_IO_MEM },
#define SERIAL_PORT_DFNS \
STD_SERIAL_PORT_DFNS
#endif /* __ASMPPC_ZX4500_SERIAL_H */
/*
* arch/ppc/platforms/zx4500_setup.c
*
* Board setup routines for Znyx ZX4500 family of cPCI boards.
*
* Author: Mark A. Greer
* mgreer@mvista.com
*
* 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
/*
* This file adds support for the Znyx ZX4500 series of cPCI boards.
* These boards have an 8240, UART on the processor bus, a PPMC slot (for now
* the card in this slot can _not_ be a monarch), Broadcom BCM5600, and an
* Intel 21554 bridge.
*
* Currently, this port assumes that the 8240 is the master and performs PCI
* arbitration, etc. It is also assumed that the 8240 is wired to come up
* using memory MAP B (CHRP map).
*
* Note: This board port will not work properly as it is. You must apply the
* patch that is at ftp://ftp.mvista.com/pub/Area51/zx4500/zx_patch_2_5
*/
#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/reboot.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/types.h>
#include <linux/major.h>
#include <linux/initrd.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/prom.h>
#include <asm/time.h>
#include <asm/open_pic.h>
#include <asm/mpc10x.h>
#include <asm/pci-bridge.h>
#include <asm/bootinfo.h>
#include "zx4500.h"
static u_char zx4500_openpic_initsenses[] __initdata = {
0, /* 0-15 are not used on an 8240 EPIC */
0, /* 1 */
0, /* 2 */
0, /* 3 */
0, /* 4 */
0, /* 5 */
0, /* 6 */
0, /* 7 */
0, /* 8 */
0, /* 9 */
0, /* 10 */
0, /* 11 */
0, /* 12 */
0, /* 13 */
0, /* 14 */
0, /* 15 */
1, /* 16: EPIC IRQ 0: Active Low -- PMC #INTA & #INTC */
1, /* 17: EPIC IRQ 1: Active Low -- UART */
1, /* 18: EPIC IRQ 2: Active Low -- BCM5600 #INTA */
1, /* 19: EPIC IRQ 3: Active Low -- 21554 #SINTA */
1, /* 20: EPIC IRQ 4: Active Low -- PMC #INTB & #INTD */
};
static void __init
zx4500_setup_arch(void)
{
char boot_string[ZX4500_BOOT_STRING_LEN + 1];
char *boot_arg;
extern char cmd_line[];
loops_per_jiffy = 50000000 / HZ;
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
ROOT_DEV = Root_RAM0;
else
#endif
#if defined(CONFIG_ROOT_NFS)
ROOT_DEV = Root_NFS;
#else
ROOT_DEV = Root_SDA1;
#endif
/* Get boot string from flash */
strlcpy(boot_string,
(char *)ZX4500_BOOT_STRING_ADDR,
sizeof(boot_string));
boot_string[ZX4500_BOOT_STRING_LEN] = '\0';
/* Can be delimited by 0xff */
boot_arg = strchr(boot_string, 0xff);
if (boot_arg != NULL) {
*boot_arg = '\0';
}
/* First 3 chars must be 'dev'. If not, ignore. */
if (!strncmp(boot_string, "dev", 3)) {
/* skip 'dev?' and any blanks after it */
boot_arg = strchr(boot_string, ' ');
if (boot_arg != NULL) {
while (*boot_arg == ' ') boot_arg++;
strcat(cmd_line, " ");
strcat(cmd_line, boot_arg);
}
}
/* nothing but serial consoles... */
printk("Znyx ZX4500 Series High Performance Switch\n");
printk("ZX4500 port (C) 2000, 2001 MontaVista Software, Inc. (source@mvista.com)\n");
/* Lookup PCI host bridge */
zx4500_find_bridges();
printk("ZX4500 Board ID: 0x%x, Revision #: 0x%x\n",
in_8((volatile u_char *)ZX4500_CPLD_BOARD_ID),
in_8((volatile u_char *)ZX4500_CPLD_REV));
return;
}
static ulong __init
zx4500_find_end_of_memory(void)
{
return mpc10x_get_mem_size(MPC10X_MEM_MAP_B);
}
static void __init
zx4500_map_io(void)
{
io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO);
}
/*
* Enable interrupts routed thru CPLD to reach the 8240's EPIC.
* Need to enable all 4 PMC intrs, BCM INTA, and 21554 SINTA to 8240.
* UART intrs routed directly to 8240 (not thru CPLD).
*/
static void __init
zx4500_enable_cpld_intrs(void)
{
u_char sysctl;
sysctl = in_8((volatile u_char *)ZX4500_CPLD_SYSCTL);
sysctl |= (ZX4500_CPLD_SYSCTL_PMC |
ZX4500_CPLD_SYSCTL_BCM |
ZX4500_CPLD_SYSCTL_SINTA);
out_8((volatile u_char *)ZX4500_CPLD_SYSCTL, sysctl);
return;
}
static void __init
zx4500_init_IRQ(void)
{
OpenPIC_InitSenses = zx4500_openpic_initsenses;
OpenPIC_NumInitSenses = sizeof(zx4500_openpic_initsenses);
openpic_init(1, 0, NULL, -1);
zx4500_enable_cpld_intrs(); /* Allow CPLD to route intrs to 8240 */
return;
}
static void
zx4500_restart(char *cmd)
{
local_irq_disable();
out_8((volatile u_char *)ZX4500_CPLD_RESET, ZX4500_CPLD_RESET_XBUS);
for (;;);
panic("Restart failed.\n");
/* NOTREACHED */
}
static void
zx4500_power_off(void)
{
local_irq_disable();
for(;;); /* No way to shut power off with software */
/* NOTREACHED */
}
static void
zx4500_halt(void)
{
zx4500_power_off();
/* NOTREACHED */
}
static int
zx4500_get_bus_speed(void)
{
int bus_speed;
bus_speed = 100000000;
return bus_speed;
}
static int
zx4500_show_cpuinfo(struct seq_file *m)
{
uint pvid;
seq_printf(m, "vendor\t\t: Znyx\n");
seq_printf(m, "machine\t\t: ZX4500\n");
seq_printf(m, "processor\t: PVID: 0x%x, vendor: %s\n",
pvid, (pvid & (1<<15) ? "IBM" : "Motorola"));
seq_printf(m, "bus speed\t: %dMhz\n",
zx4500_get_bus_speed()/1000000);
return 0;
}
static void __init
zx4500_calibrate_decr(void)
{
ulong freq;
freq = zx4500_get_bus_speed() / 4;
printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
freq/1000000, freq%1000000);
tb_ticks_per_jiffy = freq / HZ;
tb_to_us = mulhwu_scale_factor(freq, 1000000);
return;
}
/*
* Set BAT 3 to map 0xf0000000 to end of physical memory space 1-1.
*/
static __inline__ void
zx4500_set_bat(void)
{
unsigned long bat3u, bat3l;
static int mapping_set = 0;
if (!mapping_set) {
__asm__ __volatile__(
" lis %0,0xf800\n \
ori %1,%0,0x002a\n \
ori %0,%0,0x0ffe\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> */
};
void
zx4500_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
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
parse_bootinfo(find_bootinfo());
/* Map in board registers, etc. */
zx4500_set_bat();
isa_io_base = MPC10X_MAPB_ISA_IO_BASE;
isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE;
pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET;
ppc_md.setup_arch = zx4500_setup_arch;
ppc_md.show_cpuinfo = zx4500_show_cpuinfo;
ppc_md.irq_canonicalize = NULL;
ppc_md.init_IRQ = zx4500_init_IRQ;
ppc_md.get_irq = openpic_get_irq;
ppc_md.init = NULL;
ppc_md.restart = zx4500_restart;
ppc_md.power_off = zx4500_power_off;
ppc_md.halt = zx4500_halt;
ppc_md.find_end_of_memory = zx4500_find_end_of_memory;
ppc_md.setup_io_mappings = zx4500_map_io;
ppc_md.calibrate_decr = zx4500_calibrate_decr;
ppc_md.heartbeat = NULL;
ppc_md.heartbeat_reset = 0;
ppc_md.heartbeat_count = 0;
#ifdef CONFIG_SERIAL_TEXT_DEBUG
ppc_md.progress = zx4500_progress;
#else /* !CONFIG_SERIAL_TEXT_DEBUG */
ppc_md.progress = NULL;
#endif /* CONFIG_SERIAL_TEXT_DEBUG */
return;
}
......@@ -61,8 +61,9 @@ obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \
pci_auto.o indirect_pci.o todc_time.o
obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \
todc_time.o
obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
i8259.o open_pic.o
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
ifeq ($(CONFIG_SERIAL_8250)$(CONFIG_PPC_GEN550),yy)
obj-$(CONFIG_KGDB) += gen550_kgdb.o gen550_dbg.o
obj-$(CONFIG_SERIAL_TEXT_DEBUG) += gen550_dbg.o
endif
obj-$(CONFIG_BOOTX_TEXT) += btext.o
/*
* arch/ppc/syslib/gen550_dbg.c
*
* A library of polled 16550 serial routines. These are intended to
* be used to support progress messages, xmon, kgdb, etc. on a
* variety of platforms.
*
* Adapted from lots of code ripped from the arch/ppc/boot/ polled
* 16550 support.
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2002-2003 (c) MontaVista Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/config.h>
#include <linux/tty.h> /* For linux/serial_core.h */
#include <linux/serial_core.h>
#include <linux/serialP.h>
#include <linux/serial_reg.h>
#include <asm/machdep.h>
#include <asm/serial.h>
#include <asm/io.h>
#define SERIAL_BAUD 9600
static struct serial_state rs_table[RS_TABLE_SIZE] = {
SERIAL_PORT_DFNS /* defined in <asm/serial.h> */
};
static void (*serial_outb)(unsigned long, unsigned char);
static unsigned long (*serial_inb)(unsigned long);
static int shift;
unsigned long direct_inb(unsigned long addr)
{
return readb(addr);
}
void direct_outb(unsigned long addr, unsigned char val)
{
writeb(val, addr);
}
unsigned long io_inb(unsigned long port)
{
return inb(port);
}
void io_outb(unsigned long port, unsigned char val)
{
outb(val, port);
}
unsigned long serial_init(int chan, void *ignored)
{
unsigned long com_port;
unsigned char lcr, dlm;
/* We need to find out which type io we're expecting. If it's
* 'SERIAL_IO_PORT', we get an offset from the isa_io_base.
* If it's 'SERIAL_IO_MEM', we can the exact location. -- Tom */
switch (rs_table[chan].io_type) {
case SERIAL_IO_PORT:
com_port = rs_table[chan].port;
serial_outb = io_outb;
serial_inb = io_inb;
break;
case SERIAL_IO_MEM:
com_port = (unsigned long)rs_table[chan].iomem_base;
serial_outb = direct_outb;
serial_inb = direct_inb;
break;
default:
/* We can't deal with it. */
return -1;
}
/* How far apart the registers are. */
shift = rs_table[chan].iomem_reg_shift;
/* save the LCR */
lcr = serial_inb(com_port + (UART_LCR << shift));
/* Access baud rate */
serial_outb(com_port + (UART_LCR << shift), UART_LCR_DLAB);
dlm = serial_inb(com_port + (UART_DLM << shift));
/*
* Test if serial port is unconfigured
* We assume that no-one uses less than 110 baud or
* less than 7 bits per character these days.
* -- paulus.
*/
if ((dlm <= 4) && (lcr & 2)) {
/* port is configured, put the old LCR back */
serial_outb(com_port + (UART_LCR << shift), lcr);
}
else {
/* Input clock. */
serial_outb(com_port + (UART_DLL << shift),
(rs_table[chan].baud_base / SERIAL_BAUD) & 0xFF);
serial_outb(com_port + (UART_DLM << shift),
(rs_table[chan].baud_base / SERIAL_BAUD) >> 8);
/* 8 data, 1 stop, no parity */
serial_outb(com_port + (UART_LCR << shift), 0x03);
/* RTS/DTR */
serial_outb(com_port + (UART_MCR << shift), 0x03);
/* Clear & enable FIFOs */
serial_outb(com_port + (UART_FCR << shift), 0x07);
}
return (com_port);
}
void
serial_putc(unsigned long com_port, unsigned char c)
{
while ((serial_inb(com_port + (UART_LSR << shift)) & UART_LSR_THRE) == 0)
;
serial_outb(com_port, c);
}
unsigned char
serial_getc(unsigned long com_port)
{
while ((serial_inb(com_port + (UART_LSR << shift)) & UART_LSR_DR) == 0)
;
return serial_inb(com_port);
}
int
serial_tstc(unsigned long com_port)
{
return ((serial_inb(com_port + (UART_LSR << shift)) & UART_LSR_DR) != 0);
}
void
serial_close(unsigned long com_port)
{
}
void
gen550_init(int i, struct uart_port *serial_req)
{
rs_table[i].io_type = serial_req->iotype;
rs_table[i].port = serial_req->line;
rs_table[i].iomem_base = serial_req->membase;
rs_table[i].iomem_reg_shift = serial_req->regshift;
}
#ifdef CONFIG_SERIAL_TEXT_DEBUG
void
gen550_progress(char *s, unsigned short hex)
{
volatile unsigned int progress_debugport;
volatile char c;
progress_debugport = serial_init(0, NULL);
serial_putc(progress_debugport, '\r');
while ((c = *s++) != 0)
serial_putc(progress_debugport, c);
serial_putc(progress_debugport, '\n');
serial_putc(progress_debugport, '\r');
}
#endif /* CONFIG_SERIAL_TEXT_DEBUG */
/*
* arch/ppc/syslib/gen550_kgdb.c
*
* Generic 16550 kgdb support intended to be useful on a variety
* of platforms. To enable this support, it is necessary to set
* the CONFIG_GEN550 option. Any virtual mapping of the serial
* port(s) to be used can be accomplished by setting
* ppc_md.early_serial_map to a platform-specific mapping function.
*
* Adapted from ppc4xx_kgdb.c.
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2002-2003 (c) MontaVista Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <asm/machdep.h>
extern unsigned long serial_init(int, void *);
extern unsigned long serial_getc(unsigned long);
extern unsigned long serial_putc(unsigned long, unsigned char);
#if defined(CONFIG_KGDB_TTYS0)
#define KGDB_PORT 0
#elif defined(CONFIG_KGDB_TTYS1)
#define KGDB_PORT 1
#elif defined(CONFIG_KGDB_TTYS2)
#define KGDB_PORT 2
#elif defined(CONFIG_KGDB_TTYS3)
#define KGDB_PORT 3
#else
#error "invalid kgdb_tty port"
#endif
static volatile unsigned int kgdb_debugport;
void putDebugChar(unsigned char c)
{
if (kgdb_debugport == 0)
kgdb_debugport = serial_init(KGDB_PORT, NULL);
serial_putc(kgdb_debugport, c);
}
int getDebugChar(void)
{
if (kgdb_debugport == 0)
kgdb_debugport = serial_init(KGDB_PORT, NULL);
return(serial_getc(kgdb_debugport));
}
void kgdb_interruptible(int enable)
{
return;
}
void putDebugString(char* str)
{
while (*str != '\0') {
putDebugChar(*str);
str++;
}
putDebugChar('\r');
return;
}
/*
* Note: gen550_init() must be called already on the port we are going
* to use.
*/
void
kgdb_map_scc(void)
{
printk(KERN_DEBUG "kgdb init\n");
kgdb_debugport = serial_init(KGDB_PORT, NULL);
}
......@@ -33,6 +33,7 @@
void* OpenPIC_Addr;
static volatile struct OpenPIC *OpenPIC = NULL;
/*
* We define OpenPIC_InitSenses table thusly:
* bit 0x1: sense, 0 for edge and 1 for level.
......@@ -261,32 +262,32 @@ static void openpic_safe_writefield_IPI(volatile u_int *addr, u_int mask, u_int
}
#endif /* CONFIG_SMP */
#if defined(CONFIG_EPIC_SERIAL_MODE) || defined(CONFIG_PMAC_PBOOK)
static void openpic_reset(void)
#ifdef CONFIG_EPIC_SERIAL_MODE
static void __init openpic_eicr_set_clk(u_int clkval)
{
openpic_setfield(&OpenPIC->Global.Global_Configuration0,
OPENPIC_CONFIG_RESET);
while (openpic_readfield(&OpenPIC->Global.Global_Configuration0,
OPENPIC_CONFIG_RESET))
mb();
openpic_writefield(&OpenPIC->Global.Global_Configuration1,
OPENPIC_EICR_S_CLK_MASK, (clkval << 28));
}
#endif
#ifdef CONFIG_EPIC_SERIAL_MODE
static void openpic_enable_sie(void)
static void __init openpic_enable_sie(void)
{
openpic_setfield(&OpenPIC->Global.Global_Configuration1,
OPENPIC_EICR_SIE);
}
#endif
static void openpic_eicr_set_clk(u_int clkval)
#if defined(CONFIG_EPIC_SERIAL_MODE) || defined(CONFIG_PMAC_PBOOK)
static void openpic_reset(void)
{
openpic_writefield(&OpenPIC->Global.Global_Configuration1,
OPENPIC_EICR_S_CLK_MASK, (clkval << 28));
openpic_setfield(&OpenPIC->Global.Global_Configuration0,
OPENPIC_CONFIG_RESET);
while (openpic_readfield(&OpenPIC->Global.Global_Configuration0,
OPENPIC_CONFIG_RESET))
mb();
}
#endif
void openpic_set_sources(int first_irq, int num_irqs, void *first_ISR)
void __init openpic_set_sources(int first_irq, int num_irqs, void *first_ISR)
{
volatile OpenPIC_Source *src = first_ISR;
int i, last_irq;
......@@ -300,7 +301,14 @@ void openpic_set_sources(int first_irq, int num_irqs, void *first_ISR)
ISR[i] = src;
}
void __init openpic_init(int linux_irq_offset)
/*
* The `offset' parameter defines where the interrupts handled by the
* OpenPIC start in the space of interrupt numbers that the kernel knows
* about. In other words, the OpenPIC's IRQ0 is numbered `offset' in the
* kernel's interrupt numbering scheme.
* We assume there is only one OpenPIC.
*/
void __init openpic_init(int offset)
{
u_int t, i;
u_int timerfreq;
......@@ -349,13 +357,13 @@ void __init openpic_init(int linux_irq_offset)
printk("OpenPIC timer frequency is %d.%06d MHz\n",
timerfreq / 1000000, timerfreq % 1000000);
open_pic_irq_offset = linux_irq_offset;
open_pic_irq_offset = offset;
/* Initialize timer interrupts */
if ( ppc_md.progress ) ppc_md.progress("openpic: timer",0x3ba);
for (i = 0; i < OPENPIC_NUM_TIMERS; i++) {
/* Disabled, Priority 0 */
openpic_inittimer(i, 0, OPENPIC_VEC_TIMER+i+linux_irq_offset);
openpic_inittimer(i, 0, OPENPIC_VEC_TIMER+i+offset);
/* No processor */
openpic_maptimer(i, 0);
}
......@@ -365,12 +373,10 @@ void __init openpic_init(int linux_irq_offset)
if ( ppc_md.progress ) ppc_md.progress("openpic: ipi",0x3bb);
for (i = 0; i < OPENPIC_NUM_IPI; i++) {
/* Disabled, Priority 10..13 */
openpic_initipi(i, 10+i, OPENPIC_VEC_IPI+i+linux_irq_offset);
openpic_initipi(i, 10+i, OPENPIC_VEC_IPI+i+offset);
/* IPIs are per-CPU */
irq_desc[OPENPIC_VEC_IPI+i+linux_irq_offset].status |=
IRQ_PER_CPU;
irq_desc[OPENPIC_VEC_IPI+i+linux_irq_offset].handler =
&open_pic_ipi;
irq_desc[OPENPIC_VEC_IPI+i+offset].status |= IRQ_PER_CPU;
irq_desc[OPENPIC_VEC_IPI+i+offset].handler = &open_pic_ipi;
}
#endif
......@@ -387,36 +393,32 @@ void __init openpic_init(int linux_irq_offset)
continue;
/* the bootloader may have left it enabled (bad !) */
openpic_disable_irq(i+linux_irq_offset);
openpic_disable_irq(i+offset);
/*
* We find the value from either the InitSenses table
* or assume a negative polarity level interrupt.
*/
sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: 1;
sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: \
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE);
if ((sense & IRQ_SENSE_MASK) == 1)
irq_desc[i+linux_irq_offset].status = IRQ_LEVEL;
if (sense & IRQ_SENSE_MASK)
irq_desc[i+offset].status = IRQ_LEVEL;
/* Enabled, Priority 8 */
openpic_initirq(i, 8, i + linux_irq_offset,
(sense & IRQ_POLARITY_MASK),
openpic_initirq(i, 8, i+offset, (sense & IRQ_POLARITY_MASK),
(sense & IRQ_SENSE_MASK));
/* Processor 0 */
openpic_mapirq(i, 1<<0, 0);
}
/* Init descriptors */
for (i = linux_irq_offset; i < NumSources + linux_irq_offset; i++)
for (i = offset; i < NumSources + offset; i++)
irq_desc[i].handler = &open_pic;
/* Initialize the spurious interrupt */
if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd);
openpic_set_spurious(OPENPIC_VEC_SPURIOUS+linux_irq_offset);
openpic_set_spurious(OPENPIC_VEC_SPURIOUS+offset);
/* Initialize the cascade */
if (linux_irq_offset) {
if (request_irq(linux_irq_offset, no_action, SA_INTERRUPT,
if (offset) {
if (request_irq(offset, no_action, SA_INTERRUPT,
"82c59 cascade", NULL))
printk("Unable to get OpenPIC IRQ 0 for cascade\n");
}
......@@ -479,7 +481,7 @@ static u_int openpic_get_priority(void)
}
#endif /* notused */
static void openpic_set_priority(u_int pri)
static void __init openpic_set_priority(u_int pri)
{
DECL_THIS_CPU;
......@@ -656,29 +658,18 @@ static void __init openpic_maptimer(u_int timer, u_int cpumask)
}
/*
* Initalize the interrupt source which will generate an NMI (and disable it).
* Initalize the interrupt source which will generate an NMI.
* This raises the interrupt's priority from 8 to 9.
*
* irq: The logical IRQ which generates an NMI.
*/
void __init
openpic_init_nmi_irq(u_int irq)
{
int sense;
/* If this wasn't given, assume a level, negative polarity interrupt. */
sense = (irq < OpenPIC_NumInitSenses) ? OpenPIC_InitSenses[irq] :
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE);
openpic_safe_writefield(&ISR[irq]->Vector_Priority,
OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK |
OPENPIC_SENSE_MASK | OPENPIC_POLARITY_MASK,
(9 << OPENPIC_PRIORITY_SHIFT) |
(irq + open_pic_irq_offset) |
((sense & IRQ_POLARITY_MASK) ?
OPENPIC_POLARITY_POSITIVE :
OPENPIC_POLARITY_NEGATIVE) |
((sense & IRQ_SENSE_MASK) ? OPENPIC_SENSE_LEVEL
: OPENPIC_SENSE_EDGE));
check_arg_irq(irq);
openpic_safe_writefield(&ISR[irq - open_pic_irq_offset]->Vector_Priority,
OPENPIC_PRIORITY_MASK,
9 << OPENPIC_PRIORITY_SHIFT);
}
/*
......@@ -752,7 +743,8 @@ void openpic_disable_ipi(u_int irq)
* pol: polarity (1 for positive, 0 for negative)
* sense: 1 for level, 0 for edge
*/
static void openpic_initirq(u_int irq, u_int pri, u_int vec, int pol, int sense)
static void __init
openpic_initirq(u_int irq, u_int pri, u_int vec, int pol, int sense)
{
openpic_safe_writefield(&ISR[irq]->Vector_Priority,
OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK |
......
......@@ -8,7 +8,13 @@
# In the future, some of these should be built conditionally.
#
obj-y := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o deadline-iosched.o
#
# NOTE that ll_rw_blk.c must come early in linkage order - it starts the
# kblockd threads
#
obj-y := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o \
deadline-iosched.o as-iosched.o
obj-$(CONFIG_MAC_FLOPPY) += swim3.o
obj-$(CONFIG_BLK_DEV_FD) += floppy.o
......
This diff is collapsed.
......@@ -361,17 +361,31 @@ void elv_put_request(request_queue_t *q, struct request *rq)
e->elevator_put_req_fn(q, rq);
}
int elv_register_queue(struct gendisk *disk)
int elv_may_queue(request_queue_t *q, int rw)
{
request_queue_t *q = disk->queue;
elevator_t *e;
elevator_t *e = &q->elevator;
if (e->elevator_may_queue_fn)
return e->elevator_may_queue_fn(q, rw);
return 0;
}
void elv_completed_request(request_queue_t *q, struct request *rq)
{
elevator_t *e = &q->elevator;
if (!q)
return -ENXIO;
if (e->elevator_completed_req_fn)
e->elevator_completed_req_fn(q, rq);
}
int elv_register_queue(struct request_queue *q)
{
elevator_t *e;
e = &q->elevator;
e->kobj.parent = kobject_get(&disk->kobj);
e->kobj.parent = kobject_get(&q->kobj);
if (!e->kobj.parent)
return -EBUSY;
......@@ -381,14 +395,12 @@ int elv_register_queue(struct gendisk *disk)
return kobject_register(&e->kobj);
}
void elv_unregister_queue(struct gendisk *disk)
void elv_unregister_queue(struct request_queue *q)
{
request_queue_t *q = disk->queue;
if (q) {
elevator_t * e = &q->elevator;
kobject_unregister(&e->kobj);
kobject_put(&disk->kobj);
kobject_put(&q->kobj);
}
}
......@@ -408,5 +420,6 @@ EXPORT_SYMBOL(__elv_add_request);
EXPORT_SYMBOL(elv_next_request);
EXPORT_SYMBOL(elv_remove_request);
EXPORT_SYMBOL(elv_queue_empty);
EXPORT_SYMBOL(elv_completed_request);
EXPORT_SYMBOL(elevator_exit);
EXPORT_SYMBOL(elevator_init);
......@@ -191,7 +191,7 @@ void add_disk(struct gendisk *disk)
blk_register_region(MKDEV(disk->major, disk->first_minor),
disk->minors, NULL, exact_match, exact_lock, disk);
register_disk(disk);
elv_register_queue(disk);
blk_register_queue(disk);
}
EXPORT_SYMBOL(add_disk);
......@@ -199,7 +199,7 @@ EXPORT_SYMBOL(del_gendisk); /* in partitions/check.c */
void unlink_gendisk(struct gendisk *disk)
{
elv_unregister_queue(disk);
blk_unregister_queue(disk);
blk_unregister_region(MKDEV(disk->major, disk->first_minor),
disk->minors);
}
......
This diff is collapsed.
/*
* linux/drivers/char/pcmcia/synclink_cs.c
*
* $Id: synclink_cs.c,v 4.10 2003/05/13 16:06:03 paulkf Exp $
* $Id: synclink_cs.c,v 4.13 2003/06/18 15:29:32 paulkf Exp $
*
* Device driver for Microgate SyncLink PC Card
* multiprotocol serial adapter.
......@@ -467,7 +467,6 @@ static int break_on_load=0;
* assigned major number. May be forced as module parameter.
*/
static int ttymajor=0;
static int cuamajor=0;
static int debug_level = 0;
static int maxframe[MAX_DEVICE_COUNT] = {0,};
......@@ -485,7 +484,6 @@ MODULE_PARM(irq_list, "1-4i");
MODULE_PARM(break_on_load,"i");
MODULE_PARM(ttymajor,"i");
MODULE_PARM(cuamajor,"i");
MODULE_PARM(debug_level,"i");
MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
......@@ -493,7 +491,7 @@ MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICE_COUNT) "i");
MODULE_LICENSE("GPL");
static char *driver_name = "SyncLink PC Card driver";
static char *driver_version = "$Revision: 4.10 $";
static char *driver_version = "$Revision: 4.13 $";
static struct tty_driver *serial_driver;
......@@ -1290,7 +1288,7 @@ void dcd_change(MGSLPC_INFO *info)
(info->serial_signals & SerialSignal_DCD) ? "on" : "off");
if (info->serial_signals & SerialSignal_DCD)
wake_up_interruptible(&info->open_wait);
else if (!(info->flags & ASYNC_CALLOUT_NOHUP)) {
else {
if (debug_level >= DEBUG_LEVEL_ISR)
printk("doing serial hangup...");
if (info->tty)
......@@ -2538,14 +2536,17 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
{
MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data;
if (!info || mgslpc_paranoia_check(info, tty->name, "mgslpc_close"))
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_close"))
return;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):mgslpc_close(%s) entry, count=%d\n",
__FILE__,__LINE__, info->device_name, info->count);
if (!info->count || tty_hung_up_p(filp))
if (!info->count)
return;
if (tty_hung_up_p(filp))
goto cleanup;
if ((tty->count == 1) && (info->count != 1)) {
......@@ -2822,16 +2823,11 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
info = mgslpc_device_list;
while(info && info->line != line)
info = info->next_device;
if ( !info ){
printk("%s(%d):Can't find specified device on open (line=%d)\n",
__FILE__,__LINE__,line);
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_open"))
return -ENODEV;
}
tty->driver_data = info;
info->tty = tty;
if (mgslpc_paranoia_check(info, tty->name, "mgslpc_open"))
return -ENODEV;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):mgslpc_open(%s), old ref count = %d\n",
......@@ -2879,6 +2875,8 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
cleanup:
if (retval) {
if (tty->count == 1)
info->tty = 0; /* tty layer will release tty struct */
if(info->count)
info->count--;
}
......
/*
* linux/drivers/char/synclink.c
*
* $Id: synclink.c,v 4.9 2003/05/06 21:18:51 paulkf Exp $
* $Id: synclink.c,v 4.12 2003/06/18 15:29:32 paulkf Exp $
*
* Device driver for Microgate SyncLink ISA and PCI
* high speed multiprotocol serial adapters.
......@@ -910,7 +910,7 @@ MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i");
static char *driver_name = "SyncLink serial driver";
static char *driver_version = "$Revision: 4.9 $";
static char *driver_version = "$Revision: 4.12 $";
static int synclink_init_one (struct pci_dev *dev,
const struct pci_device_id *ent);
......@@ -3170,14 +3170,17 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
{
struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data;
if (!info || mgsl_paranoia_check(info, tty->name, "mgsl_close"))
if (mgsl_paranoia_check(info, tty->name, "mgsl_close"))
return;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):mgsl_close(%s) entry, count=%d\n",
__FILE__,__LINE__, info->device_name, info->count);
if (!info->count || tty_hung_up_p(filp))
if (!info->count)
return;
if (tty_hung_up_p(filp))
goto cleanup;
if ((tty->count == 1) && (info->count != 1)) {
......@@ -3493,16 +3496,11 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
info = mgsl_device_list;
while(info && info->line != line)
info = info->next_device;
if ( !info ){
printk("%s(%d):Can't find specified device on open (line=%d)\n",
__FILE__,__LINE__,line);
if (mgsl_paranoia_check(info, tty->name, "mgsl_open"))
return -ENODEV;
}
tty->driver_data = info;
info->tty = tty;
if (mgsl_paranoia_check(info, tty->name, "mgsl_open"))
return -ENODEV;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):mgsl_open(%s), old ref count = %d\n",
......@@ -3562,6 +3560,8 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
cleanup:
if (retval) {
if (tty->count == 1)
info->tty = 0; /* tty layer will release tty struct */
if(info->count)
info->count--;
}
......@@ -4461,7 +4461,6 @@ static struct tty_operations mgsl_ops = {
int mgsl_init_tty(void);
int mgsl_init_tty()
{
struct mgsl_struct *info;
serial_driver = alloc_tty_driver(mgsl_device_count);
if (!serial_driver)
return -ENOMEM;
......
/*
* $Id: synclinkmp.c,v 4.8 2003/04/21 17:46:55 paulkf Exp $
* $Id: synclinkmp.c,v 4.12 2003/06/18 15:29:33 paulkf Exp $
*
* Device driver for Microgate SyncLink Multiport
* high speed multiprotocol serial adapter.
......@@ -481,7 +481,6 @@ static int break_on_load=0;
* assigned major number. May be forced as module parameter.
*/
static int ttymajor=0;
static int cuamajor=0;
/*
* Array of user specified options for ISA adapters.
......@@ -492,13 +491,12 @@ static int dosyncppp[MAX_DEVICES] = {0,};
MODULE_PARM(break_on_load,"i");
MODULE_PARM(ttymajor,"i");
MODULE_PARM(cuamajor,"i");
MODULE_PARM(debug_level,"i");
MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_DEVICES) "i");
MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICES) "i");
static char *driver_name = "SyncLink MultiPort driver";
static char *driver_version = "$Revision: 4.8 $";
static char *driver_version = "$Revision: 4.12 $";
static int synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent);
static void synclinkmp_remove_one(struct pci_dev *dev);
......@@ -739,12 +737,8 @@ static int open(struct tty_struct *tty, struct file *filp)
info = synclinkmp_device_list;
while(info && info->line != line)
info = info->next_device;
if ( !info ){
printk("%s(%d):%s Can't find specified device on open (line=%d)\n",
__FILE__,__LINE__,info->device_name,line);
if (sanity_check(info, tty->name, "open"))
return -ENODEV;
}
if ( info->init_error ) {
printk("%s(%d):%s device is not allocated, init error=%d\n",
__FILE__,__LINE__,info->device_name,info->init_error);
......@@ -753,8 +747,6 @@ static int open(struct tty_struct *tty, struct file *filp)
tty->driver_data = info;
info->tty = tty;
if (sanity_check(info, tty->name, "open"))
return -ENODEV;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):%s open(), old ref count = %d\n",
......@@ -802,6 +794,8 @@ static int open(struct tty_struct *tty, struct file *filp)
cleanup:
if (retval) {
if (tty->count == 1)
info->tty = 0; /* tty layer will release tty struct */
if(info->count)
info->count--;
}
......@@ -816,14 +810,17 @@ static void close(struct tty_struct *tty, struct file *filp)
{
SLMP_INFO * info = (SLMP_INFO *)tty->driver_data;
if (!info || sanity_check(info, tty->name, "close"))
if (sanity_check(info, tty->name, "close"))
return;
if (debug_level >= DEBUG_LEVEL_INFO)
printk("%s(%d):%s close() entry, count=%d\n",
__FILE__,__LINE__, info->device_name, info->count);
if (!info->count || tty_hung_up_p(filp))
if (!info->count)
return;
if (tty_hung_up_p(filp))
goto cleanup;
if ((tty->count == 1) && (info->count != 1)) {
......@@ -3775,8 +3772,6 @@ static struct tty_operations ops = {
static int __init synclinkmp_init(void)
{
SLMP_INFO *info;
if (break_on_load) {
synclinkmp_get_text_ptr();
BREAKPOINT();
......
......@@ -1514,6 +1514,8 @@ pmac_ide_setup_dma(struct device_node *np, int ix)
ide_hwifs[ix].ide_dma_timeout = &__ide_dma_timeout;
ide_hwifs[ix].ide_dma_retune = &__ide_dma_retune;
ide_hwifs[ix].ide_dma_lostirq = &pmac_ide_dma_lostirq;
ide_hwifs[ix].ide_dma_queued_on = &__ide_dma_queued_on;
ide_hwifs[ix].ide_dma_queued_off = &__ide_dma_queued_off;
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO
if (!noautodma)
......
......@@ -49,6 +49,7 @@
#include <linux/delay.h>
#include <linux/proc_fs.h>
#include <linux/prefetch.h>
#include <linux/pci.h>
#include <asm/dma.h>
#include <asm/system.h>
#include <asm/io.h>
......
......@@ -211,9 +211,10 @@ static int blktrans_ioctl(struct inode *inode, struct file *file,
case HDIO_GETGEO:
if (tr->getgeo) {
struct hd_geometry g;
int ret;
memset(&g, 0, sizeof(g));
int ret = tr->getgeo(dev, &g);
ret = tr->getgeo(dev, &g);
if (ret)
return ret;
......
......@@ -177,11 +177,8 @@ EXPORT_SYMBOL(unregister_hdlc_device);
struct packet_type hdlc_packet_type=
{
__constant_htons(ETH_P_HDLC),
NULL,
hdlc_rcv,
NULL,
NULL
.type = __constant_htons(ETH_P_HDLC),
.func = hdlc_rcv,
};
......
......@@ -637,12 +637,6 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
{
struct pci_bus *b;
if (pci_find_bus(0, bus)) {
/* If we already got to this bus through a different bridge, ignore it */
DBG("PCI: Bus %02x already known\n", bus);
return NULL;
}
b = pci_alloc_bus();
if (!b)
return NULL;
......@@ -656,6 +650,14 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
b->sysdata = sysdata;
b->ops = ops;
if (pci_find_bus(pci_domain_nr(b), bus)) {
/* If we already got to this bus through a different bridge, ignore it */
DBG("PCI: Bus %02x already known\n", bus);
kfree(b->dev);
kfree(b);
return NULL;
}
list_add_tail(&b->node, &pci_root_buses);
memset(b->dev,0,sizeof(*(b->dev)));
......
......@@ -133,7 +133,7 @@ static dev_link_t *dev_list = NULL;
static void serial_remove(dev_link_t *link)
{
struct serial_info *info = link->priv;
int i, ret;
int i;
link->state &= ~DEV_PRESENT;
......
This diff is collapsed.
......@@ -319,6 +319,7 @@ asmlinkage long sys_fsync(unsigned int fd)
/* We need to protect against concurrent writers.. */
down(&inode->i_sem);
current->flags |= PF_SYNCWRITE;
ret = filemap_fdatawrite(inode->i_mapping);
err = file->f_op->fsync(file, dentry, 0);
if (!ret)
......@@ -326,6 +327,7 @@ asmlinkage long sys_fsync(unsigned int fd)
err = filemap_fdatawait(inode->i_mapping);
if (!ret)
ret = err;
current->flags &= ~PF_SYNCWRITE;
up(&inode->i_sem);
out_putf:
......@@ -354,6 +356,7 @@ asmlinkage long sys_fdatasync(unsigned int fd)
goto out_putf;
down(&inode->i_sem);
current->flags |= PF_SYNCWRITE;
ret = filemap_fdatawrite(inode->i_mapping);
err = file->f_op->fsync(file, dentry, 1);
if (!ret)
......@@ -361,6 +364,7 @@ asmlinkage long sys_fdatasync(unsigned int fd)
err = filemap_fdatawait(inode->i_mapping);
if (!ret)
ret = err;
current->flags &= ~PF_SYNCWRITE;
up(&inode->i_sem);
out_putf:
......@@ -1450,24 +1454,13 @@ EXPORT_SYMBOL(__getblk);
/*
* Do async read-ahead on a buffer..
*/
void
__breadahead(struct block_device *bdev, sector_t block, int size)
void __breadahead(struct block_device *bdev, sector_t block, int size)
{
struct buffer_head *bh = __getblk(bdev, block, size);
if (!test_set_buffer_locked(bh)) {
if (!buffer_uptodate(bh)) {
/*
* This eats the bh count from __getblk() and
* unlocks when the read is done.
*/
bh->b_end_io = end_buffer_io_sync;
submit_bh(READ, bh);
return;
}
unlock_buffer(bh);
}
ll_rw_block(READA, 1, &bh);
brelse(bh);
}
EXPORT_SYMBOL(__breadahead);
/**
* __bread() - reads a specified block and returns the bh
......
......@@ -74,6 +74,7 @@
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/security.h>
#include <linux/kmod.h>
#include <asm/uaccess.h>
......@@ -96,6 +97,7 @@ spinlock_t dq_data_lock = SPIN_LOCK_UNLOCKED;
static char *quotatypes[] = INITQFNAMES;
static struct quota_format_type *quota_formats; /* List of registered formats */
static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
int register_quota_format(struct quota_format_type *fmt)
{
......@@ -123,8 +125,19 @@ static struct quota_format_type *find_quota_format(int id)
spin_lock(&dq_list_lock);
for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next);
if (!actqf || !try_module_get(actqf->qf_owner)) {
int qm;
for (qm = 0; module_names[qm].qm_fmt_id && module_names[qm].qm_fmt_id != id; qm++);
if (!module_names[qm].qm_fmt_id || request_module(module_names[qm].qm_mod_name)) {
actqf = NULL;
goto out;
}
for (actqf = quota_formats; actqf && actqf->qf_fmt_id != id; actqf = actqf->qf_next);
if (actqf && !try_module_get(actqf->qf_owner))
actqf = NULL;
}
out:
spin_unlock(&dq_list_lock);
return actqf;
}
......
......@@ -443,28 +443,16 @@ void eventpoll_init_file(struct file *file)
/*
* This is called from inside fs/file_table.c:__fput() to unlink files
* from the eventpoll interface. We need to have this facility to cleanup
* correctly files that are closed without being removed from the eventpoll
* interface.
* This is called from eventpoll_release() to unlink files from the eventpoll
* interface. We need to have this facility to cleanup correctly files that are
* closed without being removed from the eventpoll interface.
*/
void eventpoll_release(struct file *file)
void eventpoll_release_file(struct file *file)
{
struct list_head *lsthead = &file->f_ep_links;
struct eventpoll *ep;
struct epitem *epi;
/*
* Fast check to avoid the get/release of the semaphore. Since
* we're doing this outside the semaphore lock, it might return
* false negatives, but we don't care. It'll help in 99.99% of cases
* to avoid the semaphore lock. False positives simply cannot happen
* because the file in on the way to be removed and nobody ( but
* eventpoll ) has still a reference to this file.
*/
if (list_empty(lsthead))
return;
/*
* We don't want to get "file->f_ep_lock" because it is not
* necessary. It is not necessary because we're in the "struct file"
......@@ -541,7 +529,7 @@ asmlinkage long sys_epoll_create(int size)
/*
* The following function implement the controller interface for the eventpoll
* file that enable the insertion/removal/change of file descriptors inside
* the interest set. It rapresents the kernel part of the user spcae epoll_ctl(2).
* the interest set. It rapresents the kernel part of the user space epoll_ctl(2).
*/
asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
{
......@@ -551,8 +539,8 @@ asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, struct epoll_event *even
struct epitem *epi;
struct epoll_event epds;
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %u)\n",
current, epfd, op, fd, event->events));
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %p)\n",
current, epfd, op, fd, event));
error = -EFAULT;
if (copy_from_user(&epds, event, sizeof(struct epoll_event)))
......@@ -633,8 +621,8 @@ asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, struct epoll_event *even
eexit_2:
fput(file);
eexit_1:
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %u) = %d\n",
current, epfd, op, fd, event->events, error));
DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %p) = %d\n",
current, epfd, op, fd, event, error));
return error;
}
......
......@@ -760,16 +760,17 @@ int flush_old_exec(struct linux_binprm * bprm)
int i, ch, retval;
/*
* Release all of the old mmap stuff
* Make sure we have a private signal table and that
* we are unassociated from the previous thread group.
*/
retval = exec_mmap(bprm->mm);
retval = de_thread(current);
if (retval)
goto out;
/*
* Make sure we have a private signal table and that
* we are unassociated from the previous thread group.
* Release all of the old mmap stuff
*/
retval = de_thread(current);
retval = exec_mmap(bprm->mm);
if (retval)
goto out;
......
This diff is collapsed.
......@@ -60,7 +60,6 @@ static inline int ext2_acl_count(size_t size)
/* acl.c */
extern int ext2_permission (struct inode *, int, struct nameidata *);
extern int ext2_permission_locked (struct inode *, int);
extern int ext2_acl_chmod (struct inode *);
extern int ext2_init_acl (struct inode *, struct inode *);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -60,7 +60,6 @@ static inline int ext3_acl_count(size_t size)
/* acl.c */
extern int ext3_permission (struct inode *, int, struct nameidata *);
extern int ext3_permission_locked (struct inode *, int);
extern int ext3_acl_chmod (struct inode *);
extern int ext3_init_acl (handle_t *, struct inode *, struct inode *);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment