Commit ddacbff2 authored by Russell King's avatar Russell King

Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5

into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
parents f4e1c439 e78e17ad
......@@ -453,24 +453,6 @@ CONFIG_MAGIC_SYSRQ
keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
unless you really know what this hack does.
CONFIG_ARCH_ARCA5K
This selects what ARM system you wish to build the kernel for. It
also selects to some extent the CPU type. If you are unsure what
to set this option to, please consult any information supplied with
your system.
CONFIG_ARCH_A5K
Say Y here to to support the Acorn A5000. Linux can support the
internal IDE disk and CD-ROM interface, serial and parallel port,
and the floppy drive. Note that on some A5000s the floppy is
plugged into the wrong socket on the motherboard.
CONFIG_ARCH_ARC
The Acorn Archimedes was an personal computer based on an 8K ARM2
processor, released in 1987. It supported 512K of RAM and 2 800K
floppy disks. Picture and more detailed specifications at
<http://www.computingmuseum.com/museum/archi.htm>.
CONFIG_ARCH_EBSA110
This is an evaluation board for the StrongARM processor available
from Digital. It has limited hardware on-board, including an onboard
......@@ -481,32 +463,6 @@ CONFIG_ARCH_RPC
On the Acorn Risc-PC, Linux can support the internal IDE disk and
CD-ROM interface, serial and parallel port, and the floppy drive.
CONFIG_PAGESIZE_16
Say Y here if your Archimedes or A5000 system has only 2MB of
memory, otherwise say N. The resulting kernel will not run on a
machine with 4MB of memory.
CONFIG_ARCH_CATS
Say Y here if you intend to run this kernel on the CATS.
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_EBSA285_ADDIN
Say Y here if you intend to run this kernel on the EBSA285 card
in addin mode.
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_EBSA285_HOST
Say Y here if you intend to run this kernel on the EBSA285 card
in host ("central function") mode.
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_IQ80310
Say Y here if you want to run your kernel on the Intel IQ80310
evaluation kit for the IOP310 chipset.
CONFIG_ARCH_L7200
Say Y here if you intend to run this kernel on a LinkUp Systems
L7200 Software Development Board which uses an ARM720T processor.
......@@ -517,128 +473,6 @@ CONFIG_ARCH_L7200
If you have any questions or comments about the Linux kernel port
to this board, send e-mail to sjhill@cotw.com.
CONFIG_ARCH_NETWINDER
Say Y here if you intend to run this kernel on the Rebel.COM
NetWinder. Information about this machine can be found at:
<http://www.netwinder.org/>
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_P720T
Say Y here if you intend to run this kernel on the ARM Prospector
720T.
CONFIG_ARCH_PERSONAL_SERVER
Say Y here if you intend to run this kernel on the Compaq
Personal Server.
Saying N will reduce the size of the Footbridge kernel.
The Compaq Personal Server is not available for purchase.
There are no product plans beyond the current research
prototypes at this time. Information is available at:
<http://crl.research.compaq.com/projects/personalserver/>
If you have any questions or comments about the Compaq Personal
Server, send e-mail to skiff@crl.dec.com.
CONFIG_PLD_HOTSWAP
This enables support for the dynamic loading and configuration of
compatible drivers when the contents of the PLD are changed. This
is still experimental and requires configuration tools which are
not yet generally available. Say N here. You must enable the kernel
module loader for this feature to work.
CONFIG_SA1100_ASSABET
Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
Microprocessor Development Board (also known as the Assabet).
CONFIG_ASSABET_NEPONSET
Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
Microprocessor Development Board (Assabet) with the SA-1111
Development Board (Nepon).
CONFIG_SA1100_BADGE4
Say Y here if you want to build a kernel for the HP Laboratories
BadgePAD 4.
CONFIG_SA1100_BRUTUS
Say Y here if you are using the Intel(R) StrongARM(R) SA-1100
Microprocessor Development Board (also known as the Brutus).
CONFIG_SA1100_CERF
The Intrinsyc CerfBoard is based on the StrongARM 1110.
More information is available at:
<http://www.intrinsyc.com/products/referenceplatforms/cerfboard.html>.
Say Y if configuring for an Intrinsyc CerfBoard.
Say N otherwise.
CONFIG_SA1100_FLEXANET
Say Y here if you intend to run this kernel on the FlexaNet
handheld instruments. Information about this machine can be
found at: <http://www.flexanet.com/>.
CONFIG_SA1100_GRAPHICSCLIENT
Say Y here if you are using an Applied Data Systems Intel(R)
StrongARM(R) SA-1100 based Graphics Client SBC. See
<http://www.flatpanels.com/> for information on this system.
CONFIG_SA1100_H3600
Say Y here if you intend to run this kernel on the Compaq iPAQ
H3600 handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3600>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_SA1100_LART
Say Y here if you are using the Linux Advanced Radio Terminal
(also known as the LART). See <http://www.lart.tudelft.nl/> for
information on the LART.
CONFIG_SA1100_NANOENGINE
The nanoEngine is a StrongARM 1110-based single board computer
from Bright Star Engineering. More information is available at:
<http://www.brightstareng.com/arm/nanoeng.htm>.
Say Y if configuring for a nanoEngine.
Say N otherwise.
CONFIG_SA1100_PANGOLIN
Pangolin is a StrongARM 1110-based evaluation platform produced
by Dialogue Technology. It has EISA slots for ease of configuration
with SDRAM/Flash memory card, USB/Serial/Audio card, Compact Flash
card, and TFT-LCD card.
Say Y if configuring for a Pangolin.
Say N otherwise.
CONFIG_SA1100_PFS168
The Radisys Corp. PFS-168 (aka Tulsa) is an Intel® StrongArm® SA-1110 based
computer which includes the SA-1111 Microprocessor Companion Chip and other
custom I/O designed to add connectivity and multimedia features for vending
and business machine applications. Say Y here if you require support for
this target.
CONFIG_SA1100_SHANNON
The Shannon (also known as a Tuxscreen, and also as a IS2630) was a
limited edition webphone produced by Philips. The Shannon is a SA1100
platform with a 640x480 LCD, touchscreen, CIR keyboard, PCMCIA slots,
and a telco interface.
CONFIG_SA1100_STORK
Say Y here if you intend to run this kernel on the Stork
handheld computer.
CONFIG_SA1100_VICTOR
Say Y here if you are using a Visu Aide Intel(R) StrongARM(R)
SA-1100 based Victor Digital Talking Book Reader. See
<http://www.visuaide.com/pagevictor.en.html> for information on
this system.
CONFIG_CPU_ARM610
The ARM610 is the successor to the ARM3 processor
and was produced by VLSI Technology Inc.
......@@ -858,89 +692,6 @@ CONFIG_CPU_FREQ
written) to implement the policy. If you don't understand what this
is all about, it's safe to say 'N'.
CONFIG_ARCH_EDB7211
Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
evaluation board.
CONFIG_SA1100_H3100
Say Y here if you intend to run this kernel on the Compaq iPAQ
H3100 handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3100>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_SA1100_H3800
Say Y here if you intend to run this kernel on the Compaq iPAQ H3800
series handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3800>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_H3600_SLEEVE
Choose this option to enable support for extension packs (sleeves)
for the Compaq iPAQ H3XXX series of handheld computers. This option
is required for the CF, PCMCIA, Bluetooth and GSM/GPRS extension
packs.
CONFIG_SA1100_GRAPHICSMASTER
Say Y here if you are using an Applied Data Systems Intel(R)
StrongARM(R) SA-1100 based Graphics Master SBC with SA-1111
StrongARM companion chip. See
<http://www.applieddata.net/products_masterSpec.asp> for information
on this system.
CONFIG_SA1100_ADSBITSY
Say Y here if you are using Applied Data Systems Intel(R)
StrongARM(R) 1110 based Bitsy, 3 x 5 inches in size, Compaq - IPAQ -
like platform. See
<http://www.applieddata.net/products_bitsySpec.asp> for more
information.
CONFIG_SA1100_ITSY
Say Y here if you are using the Compaq Itsy experimental pocket
computer. See <http://research.compaq.com/wrl/projects/itsy/> for
more information.
CONFIG_SA1100_HUW_WEBPANEL
Say Y here to support the HuW Webpanel produced by Hoeft & Wessel
AG. English-language website is at
<http://www.hoeft-wessel.de/en.htm>; credits and build instructions
at Documentation/arm/SA1100/HUW_WEBPANEL.
CONFIG_SA1100_PLEB
Say Y here if you are using a Portable Linux Embedded Board
(also known as PLEB). See <http://www.cse.unsw.edu.au/~pleb/>
for more information.
CONFIG_SA1100_SHERMAN
Say Y here to support the Blazie Engineering `Sherman' StrongARM
1110-based SBC, used primarily in assistance products for the
visually impaired. The company is now Freedom Scientific, with
a website at <http://www.freedomscientific.com/index.html>. The
Sherman product, however, appears to have been discontinued.
CONFIG_SA1100_YOPY
Say Y here to support the Yopy PDA. Product information at
<http://www.yopy.com/>. See Documentation/arm/SA110/Yopy
for more.
CONFIG_SA1100_CERF_CPLD
Say Y here to support the Linux CerfPDA development kit from
Intrinsyc. This is a StrongARM-1110-based reference platform for
designing custom PDAs. Product info is at
<http://www.intrinsyc.com/products/referencedesigns/cerfpda.asp>.
CONFIG_SA1100_FREEBIRD
Support the FreeBird board used in Coventive embedded products. See
Documentation/arm/SA1100/Freebird for more.
CONFIG_SA1100_PT_SYSTEM3
Say Y here if you intend to build a kernel suitable to run on
a Pruftechnik Digital Board. For more information see
<http://www.pruftechnik.com>
CONFIG_CPU_ARM926T
This is a variant of the ARM920. It has slightly different
instruction sequences for cache and TLB operations. Curiously,
......@@ -949,40 +700,3 @@ CONFIG_CPU_ARM926T
Say Y if you want support for the ARM926T processor.
Otherwise, say N.
CONFIG_SA1100_JORNADA720
Say Y here if you want to build a kernel for the HP Jornada 720
handheld computer. See <http://www.hp.com/jornada/products/720>
for details.
CONFIG_SA1100_OMNIMETER
Say Y here if you are using the inhand electronics OmniMeter. See
<http://www.inhandelectronics.com/html/omni1.html> for details.
CONFIG_SA1100_SIMPAD
The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a
PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same
like CL4 in additional it has a PCMCIA-Slot. For more information
visit <http://www.my-siemens.com or www.siemens.ch>.
CONFIG_ARCH_CDB89712
This is an evaluation board from Cirrus for the CS89712 processor.
The board includes 2 serial ports, Ethernet, IRDA, and expansion
headers. It comes with 16 MB SDRAM and 8 MB flash ROM.
CONFIG_ARCH_AUTCPU12
Say Y if you intend to run the kernel on the autronix autcpu12
board. This board is based on a Cirrus Logic CS89712.
CONFIG_EP72XX_ROM_BOOT
If you say Y here, your CLPS711x-based kernel will use the bootstrap
mode memory map instead of the normal memory map.
Processors derived from the Cirrus CLPS-711X core support two boot
modes. Normal mode boots from the external memory device at CS0.
Bootstrap mode rearranges parts of the memory map, placing an
internal 128 byte bootstrap ROM at CS0. This option performs the
address map changes required to support booting in this mode.
You almost surely want to say N here.
......@@ -10,6 +10,11 @@
SYSTEM =$(TOPDIR)/vmlinux
# Note: the following conditions must always be true:
# ZRELADDR == virt_to_phys(TEXTADDR)
# PARAMS_PHYS must be with 4MB of ZRELADDR
# INITRD_PHYS must be in RAM
ifeq ($(CONFIG_CPU_26),y)
ZRELADDR = 0x02080000
PARAMS_PHYS = 0x0207c000
......@@ -129,14 +134,14 @@ zImage: compressed/vmlinux
bootpImage: bootp/bootp
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
compressed/vmlinux: $(TOPDIR)/vmlinux
compressed/vmlinux: $(TOPDIR)/vmlinux FORCE
@$(MAKE) -C compressed vmlinux
bootp/bootp: zImage initrd
bootp/bootp: zImage initrd FORCE
@$(MAKE) -C bootp bootp
initrd:
@test "$(INITRD_PHYS)" != "" || (echo This architecture does not support INITRD; exit -1)
@test "$(INITRD_PHYS)" != "" || (echo This machine does not support INITRD; exit -1)
@test "$(INITRD)" != "" || (echo You must specify INITRD; exit -1)
install: Image
......@@ -149,3 +154,5 @@ clean:
$(RM) Image zImage bootpImage
@$(MAKE) -C compressed clean
@$(MAKE) -C bootp clean
FORCE:
......@@ -5,8 +5,7 @@
ZSYSTEM =$(TOPDIR)/arch/arm/boot/zImage
ZLDFLAGS =-p -X -T bootp.lds \
--defsym initrd_addr=$(INITRD_PHYS) \
--defsym params=$(PARAMS_PHYS) \
--defsym kernel_addr=$(ZTEXTADDR)
--defsym params=$(PARAMS_PHYS)
all: bootp
......
/*
* linux/arch/arm/boot/bootp/bootp.lds
*
* Copyright (C) 2000 Russell King
* Copyright (C) 2000-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
......@@ -15,13 +15,9 @@ SECTIONS
_text = .;
.text : {
_stext = .;
_start = .;
init.o(.start)
kernel_start = .;
*(.start)
kernel.o
kernel_len = . - kernel_start;
. = ALIGN(32);
*(.text)
initrd_start = .;
initrd.o
initrd_len = . - initrd_start;
......
/*
* linux/arch/arm/boot/bootp/init.S
*
* Copyright (C) 2000 Russell King
* Copyright (C) 2000-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
......@@ -11,8 +11,9 @@
* r0 through to r3 straight through.
*/
.section .start,#alloc,#execinstr
.type _entry, #function
_entry: adr r10, initdata
.type _start, #function
.globl _start
_start: adr r10, initdata
ldr r11, initdata
sub r11, r10, r11 @ work out exec offset
b splitify
......@@ -22,17 +23,11 @@ _entry: adr r10, initdata
initdata: .word initdata @ compiled address of this
.size initdata,. - initdata
.text
splitify: adr r13, data
ldmia r13!, {r4-r6} @ move the initrd
add r4, r4, r11 @ correction
bl move
ldmia r13!, {r4-r6} @ then the kernel
mov r12, r5
add r4, r4, r11 @ correction
bl move
/*
* Setup the initrd parameters to pass to the kernel. This can either be
* passed in via a param_struct or a tag list. We spot the param_struct
......@@ -76,6 +71,7 @@ taglist: ldr r9, [r8, #0] @ tag length
mov r4, #16 @ length of initrd tag
mov r9, #0 @ end of tag list terminator
stmia r8, {r4, r5, r6, r7, r9}
adr r12, kernel_start
mov pc, r12 @ call kernel
/*
......@@ -97,15 +93,12 @@ data: .word initrd_start
.word initrd_addr
.word initrd_len
.word kernel_start
.word kernel_addr
.word kernel_len
.word 0x54410001 @ r4 = ATAG_CORE
.word 0x54420005 @ r5 = ATAG_INITRD
.word initrd_addr @ r6
.word initrd_len @ r7
.word params @ r8
.type kernel_start,#object
.type initrd_start,#object
kernel_start:
......@@ -40,6 +40,14 @@
.macro writeb, rb
strb \rb, [r3, #0]
.endm
#elif defined(CONFIG_ARCH_PXA) /* Xscale-type */
.macro loadsp, rb
mov \rb, #0x40000000
orr \rb, \rb, #0x00100000
.endm
.macro writeb, rb
strb \rb, [r3, #0]
.endm
#else
#error no serial architecture defined
#endif
......
......@@ -37,142 +37,13 @@ choice 'ARM system type' \
SA1100-based CONFIG_ARCH_SA1100 \
Shark CONFIG_ARCH_SHARK" RiscPC
mainmenu_option next_comment
comment 'Archimedes/A5000 Implementations'
# These architectures will be combined. However, until this
# is complete... Note that the ARC will take precedence over
# A5K
comment 'Archimedes/A5000 Implementations (select only ONE)'
dep_bool ' Archimedes' CONFIG_ARCH_ARC $CONFIG_ARCH_ARCA5K
dep_bool ' A5000' CONFIG_ARCH_A5K $CONFIG_ARCH_ARCA5K
endmenu
mainmenu_option next_comment
comment 'Footbridge Implementations'
dep_bool ' CATS' CONFIG_ARCH_CATS $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' Compaq Personal Server' CONFIG_ARCH_PERSONAL_SERVER $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' EBSA285 (addin mode)' CONFIG_ARCH_EBSA285_ADDIN $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' EBSA285 (host mode)' CONFIG_ARCH_EBSA285_HOST $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' NetWinder' CONFIG_ARCH_NETWINDER $CONFIG_ARCH_FOOTBRIDGE
endmenu
mainmenu_option next_comment
comment 'SA11x0 Implementations'
dep_bool ' Assabet' CONFIG_SA1100_ASSABET $CONFIG_ARCH_SA1100
dep_bool ' Include support for Neponset' CONFIG_ASSABET_NEPONSET $CONFIG_SA1100_ASSABET
dep_bool ' ADS Bitsy' CONFIG_SA1100_ADSBITSY $CONFIG_ARCH_SA1100
dep_bool ' Brutus' CONFIG_SA1100_BRUTUS $CONFIG_ARCH_SA1100
dep_bool ' CerfBoard' CONFIG_SA1100_CERF $CONFIG_ARCH_SA1100
if [ "$CONFIG_SA1100_CERF" = "y" ]; then
choice 'Cerf Flash available' \
"8MB CONFIG_SA1100_CERF_FLASH_8MB \
16MB CONFIG_SA1100_CERF_FLASH_16MB \
32MB CONFIG_SA1100_CERF_FLASH_32MB" 8MB
bool 'Cerf w/CPLD support (CerfPDA)' CONFIG_SA1100_CERF_CPLD
fi
dep_bool ' Compaq iPAQ H3100' CONFIG_SA1100_H3100 $CONFIG_ARCH_SA1100
dep_bool ' Compaq iPAQ H3600/H3700' CONFIG_SA1100_H3600 $CONFIG_ARCH_SA1100
dep_bool ' Compaq iPAQ H3800' CONFIG_SA1100_H3800 $CONFIG_ARCH_SA1100
if [ "$CONFIG_SA1100_H3100" = "y" -o "$CONFIG_SA1100_H3600" = "y" -o "$CONFIG_SA1100_H3800" = "y" ]; then
define_bool CONFIG_SA1100_H3XXX y
else
define_bool CONFIG_SA1100_H3XXX n
fi
#dep_bool ' Empeg' CONFIG_SA1100_EMPEG $CONFIG_ARCH_SA1100
dep_bool ' Extenex HandHeld Theater (Squashtail)' CONFIG_SA1100_EXTENEX1 $CONFIG_ARCH_SA1100
if [ "$CONFIG_SA1100_EXTENEX1" = "y" ]; then
bool ' Support 16 MB of DRAM (not just 8)' CONFIG_SA1100_EXTENEX1_16MB
fi
dep_bool ' FlexaNet' CONFIG_SA1100_FLEXANET $CONFIG_ARCH_SA1100
dep_bool ' FreeBird-v1.1' CONFIG_SA1100_FREEBIRD $CONFIG_ARCH_SA1100
dep_bool ' GraphicsClient Plus' CONFIG_SA1100_GRAPHICSCLIENT $CONFIG_ARCH_SA1100
dep_bool ' GraphicsMaster' CONFIG_SA1100_GRAPHICSMASTER $CONFIG_ARCH_SA1100
dep_bool ' HP Labs BadgePAD 4' CONFIG_SA1100_BADGE4 $CONFIG_ARCH_SA1100
dep_bool ' HP Jornada 720' CONFIG_SA1100_JORNADA720 $CONFIG_ARCH_SA1100
dep_bool ' HuW WebPanel' CONFIG_SA1100_HUW_WEBPANEL $CONFIG_ARCH_SA1100
dep_bool ' Itsy' CONFIG_SA1100_ITSY $CONFIG_ARCH_SA1100
dep_bool ' LART' CONFIG_SA1100_LART $CONFIG_ARCH_SA1100
dep_bool ' nanoEngine' CONFIG_SA1100_NANOENGINE $CONFIG_ARCH_SA1100
dep_bool ' OmniMeter' CONFIG_SA1100_OMNIMETER $CONFIG_ARCH_SA1100
dep_bool ' Pangolin' CONFIG_SA1100_PANGOLIN $CONFIG_ARCH_SA1100
dep_bool ' PLEB' CONFIG_SA1100_PLEB $CONFIG_ARCH_SA1100
dep_bool ' PT System 3' CONFIG_SA1100_PT_SYSTEM3 $CONFIG_ARCH_SA1100
dep_bool ' Shannon' CONFIG_SA1100_SHANNON $CONFIG_ARCH_SA1100
dep_bool ' Sherman' CONFIG_SA1100_SHERMAN $CONFIG_ARCH_SA1100
dep_bool ' Simpad' CONFIG_SA1100_SIMPAD $CONFIG_ARCH_SA1100
dep_bool ' Tulsa' CONFIG_SA1100_PFS168 $CONFIG_ARCH_SA1100
dep_bool ' Victor' CONFIG_SA1100_VICTOR $CONFIG_ARCH_SA1100
dep_bool ' XP860' CONFIG_SA1100_XP860 $CONFIG_ARCH_SA1100
dep_bool ' Yopy' CONFIG_SA1100_YOPY $CONFIG_ARCH_SA1100
dep_bool ' Stork' CONFIG_SA1100_STORK $CONFIG_ARCH_SA1100
# Determine if SA1111 support is required
if [ "$CONFIG_ASSABET_NEPONSET" = "y" -o \
"$CONFIG_SA1100_JORNADA720" = "y" -o \
"$CONFIG_SA1100_PFS168" = "y" -o \
"$CONFIG_SA1100_XP860" = "y" -o \
"$CONFIG_SA1100_GRAPHICSMASTER" = "y" -o \
"$CONFIG_SA1100_PT_SYSTEM3" = "y" -o \
"$CONFIG_SA1100_ADSBITSY" = "y" -o \
"$CONFIG_SA1100_BADGE4" = "y" ]; then
define_bool CONFIG_SA1111 y
define_int CONFIG_FORCE_MAX_ZONEORDER 9
fi
dep_tristate 'SA1100 USB function support' CONFIG_SA1100_USB $CONFIG_ARCH_SA1100
dep_tristate ' Support for SA11x0 USB network link function' CONFIG_SA1100_USB_NETLINK $CONFIG_SA1100_USB
dep_tristate ' Support for SA11x0 USB character device emulation' CONFIG_SA1100_USB_CHAR $CONFIG_SA1100_USB
dep_tristate 'Compaq iPAQ Handheld sleeve support' CONFIG_H3600_SLEEVE $CONFIG_SA1100_H3600
endmenu
mainmenu_option next_comment
comment 'Intel PXA250/210 Implementations'
dep_bool ' Intel DBPXA250 Development Platform' CONFIG_ARCH_LUBBOCK $CONFIG_ARCH_PXA
dep_bool ' Accelent Xscale IDP' CONFIG_ARCH_PXA_IDP $CONFIG_ARCH_PXA
if [ "$CONFIG_ARCH_LUBBOCK" = "y" ]; then
define_bool CONFIG_SA1111 y
fi
endmenu
mainmenu_option next_comment
comment 'CLPS711X/EP721X Implementations'
dep_bool ' AUTCPU12' CONFIG_ARCH_AUTCPU12 $CONFIG_ARCH_CLPS711X
dep_bool ' CDB89712' CONFIG_ARCH_CDB89712 $CONFIG_ARCH_CLPS711X
dep_bool ' CLEP7312' CONFIG_ARCH_CLEP7312 $CONFIG_ARCH_CLPS711X
dep_bool ' EDB7211' CONFIG_ARCH_EDB7211 $CONFIG_ARCH_CLPS711X
dep_bool ' P720T' CONFIG_ARCH_P720T $CONFIG_ARCH_CLPS711X
dep_bool ' FORTUNET' CONFIG_ARCH_FORTUNET $CONFIG_ARCH_CLPS711X
# XXX Maybe these should indicate register compatibility
# instead of being mutually exclusive.
if [ "$CONFIG_ARCH_EDB7211" = "y" ]; then
define_bool CONFIG_ARCH_EP7211 y
else
define_bool CONFIG_ARCH_EP7211 n
fi
if [ "$CONFIG_ARCH_P720T" = "y" ]; then
define_bool CONFIG_ARCH_EP7212 y
else
define_bool CONFIG_ARCH_EP7212 n
fi
if [ "$CONFIG_ARCH_EP7211" = "y" -o \
"$CONFIG_ARCH_EP7212" = "y" ]; then
bool ' EP72xx ROM boot' CONFIG_EP72XX_ROM_BOOT
fi
endmenu
mainmenu_option next_comment
comment 'IOP310 Implementation Options'
dep_bool ' IQ80310' CONFIG_ARCH_IQ80310 $CONFIG_ARCH_IOP310
comment 'IOP310 Chipset Features'
dep_bool 'Support Intel 80312 Application Accelerator Unit (EXPERIMENTAL)' CONFIG_IOP310_AAU $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
dep_bool 'Support Intel 80312 DMA (EXPERIMENTAL)' CONFIG_IOP310_DMA $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
dep_bool 'Support Intel 80312 Messaging Unit (EXPERIMENTAL)' CONFIG_IOP310_MU $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
dep_bool 'Support Intel 80312 Performance Monitor (EXPERIMENTAL)' CONFIG_IOP310_PMON $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
endmenu
source arch/arm/mach-arc/Config.in
source arch/arm/mach-clps711x/Config.in
source arch/arm/mach-epxa10db/Config.in
source arch/arm/mach-footbridge/Config.in
source arch/arm/mach-iop310/Config.in
source arch/arm/mach-pxa/Config.in
source arch/arm/mach-sa1100/Config.in
# Definitions to make life easier
if [ "$CONFIG_ARCH_ARCA5K" = "y" -o \
......@@ -182,7 +53,8 @@ else
define_bool CONFIG_ARCH_ACORN n
fi
# see Documentation/arm/ConfigVars for a description of these
#####################################################################
# Footbridge support
if [ "$CONFIG_ARCH_CO285" = "y" -o \
"$CONFIG_ARCH_FOOTBRIDGE" = "y" ]; then
define_bool CONFIG_FOOTBRIDGE y
......@@ -208,44 +80,33 @@ if [ "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
define_bool CONFIG_ARCH_EBSA285 y
fi
#####################################################################
# SA1111 support
if [ "$CONFIG_ASSABET_NEPONSET" = "y" -o \
"$CONFIG_SA1100_ADSBITSY" = "y" -o \
"$CONFIG_SA1100_BADGE4" = "y" -o \
"$CONFIG_SA1100_CONSUS" = "y" -o \
"$CONFIG_SA1100_GRAPHICSMASTER" = "y" -o \
"$CONFIG_SA1100_JORNADA720" = "y" -o \
"$CONFIG_ARCH_LUBBOCK" = "y" -o \
"$CONFIG_SA1100_PFS168" = "y" -o \
"$CONFIG_SA1100_PT_SYSTEM3" = "y" -o \
"$CONFIG_SA1100_XP860" = "y" ]; then
define_bool CONFIG_SA1111 y
define_int CONFIG_FORCE_MAX_ZONEORDER 9
fi
comment 'Processor Type'
# Figure out whether this system uses 26-bit or 32-bit CPUs.
if [ "$CONFIG_ARCH_ARCA5K" = "y" ]; then
define_bool CONFIG_CPU_32 n
define_bool CONFIG_CPU_26 y
bool '2MB physical memory' CONFIG_PAGESIZE_16
else
define_bool CONFIG_CPU_32 y
define_bool CONFIG_CPU_26 n
fi
comment 'Processor Type'
# Firstly, figure out what processor architecture version we should be using.
# This defines the compiler instruction set which depends on the machine type.
if [ "$CONFIG_ARCH_RPC" = "y" -o "$CONFIG_ARCH_CLPS7500" = "y" ]; then
define_bool CONFIG_CPU_32v3 y
else
define_bool CONFIG_CPU_32v3 n
fi
if [ "$CONFIG_ARCH_EBSA110" = "y" -o "$CONFIG_FOOTBRIDGE" = "y" -o \
"$CONFIG_ARCH_TBOX" = "y" -o "$CONFIG_ARCH_SHARK" = "y" -o \
"$CONFIG_ARCH_NEXUSPCI" = "y" -o "$CONFIG_ARCH_CLPS711X" = "y" -o \
"$CONFIG_ARCH_INTEGRATOR" = "y" -o "$CONFIG_ARCH_SA1100" = "y" -o \
"$CONFIG_ARCH_L7200" = "y" -o "$CONFIG_ARCH_ANAKIN" = "y" -o \
"$CONFIG_ARCH_CAMELOT" = "y" ]; then
define_bool CONFIG_CPU_32v4 y
else
define_bool CONFIG_CPU_32v4 n
fi
if [ "$CONFIG_ARCH_IOP310" = "y" -o \
"$CONFIG_ARCH_ADIFCC" = "y" -o \
"$CONFIG_ARCH_PXA" = "y" ]; then
define_bool CONFIG_CPU_32v5 y
else
define_bool CONFIG_CPU_32v5 n
fi
# Select CPU types depending on the architecture selected. This selects
# which CPUs we support in the kernel image, and the compiler instruction
# optimiser behaviour.
......@@ -338,14 +199,30 @@ else
define_bool CONFIG_CPU_XSCALE n
fi
#if [ "$CONFIG_CPU_XSCALE" = "y" ]; then
# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER
#fi
# Figure out what processor architecture version we should be using.
# This defines the compiler instruction set which depends on the machine type.
if [ "$CONFIG_CPU_XSCALE" = "y" -a "$CONFIG_XSCALE_PMU_TIMER" != "y" ]; then
define_bool CONFIG_XSCALE_PMU y
if [ "$CONFIG_ARCH_RPC" = "y" -o "$CONFIG_ARCH_CLPS7500" = "y" ]; then
define_bool CONFIG_CPU_32v3 y
else
define_bool CONFIG_XSCALE_PMU n
define_bool CONFIG_CPU_32v3 n
fi
if [ "$CONFIG_ARCH_EBSA110" = "y" -o "$CONFIG_FOOTBRIDGE" = "y" -o \
"$CONFIG_ARCH_TBOX" = "y" -o "$CONFIG_ARCH_SHARK" = "y" -o \
"$CONFIG_ARCH_NEXUSPCI" = "y" -o "$CONFIG_ARCH_CLPS711X" = "y" -o \
"$CONFIG_ARCH_INTEGRATOR" = "y" -o "$CONFIG_ARCH_SA1100" = "y" -o \
"$CONFIG_ARCH_L7200" = "y" -o "$CONFIG_ARCH_ANAKIN" = "y" -o \
"$CONFIG_ARCH_CAMELOT" = "y" ]; then
define_bool CONFIG_CPU_32v4 y
else
define_bool CONFIG_CPU_32v4 n
fi
if [ "$CONFIG_ARCH_IOP310" = "y" -o \
"$CONFIG_ARCH_ADIFCC" = "y" -o \
"$CONFIG_ARCH_PXA" = "y" ]; then
define_bool CONFIG_CPU_32v5 y
else
define_bool CONFIG_CPU_32v5 n
fi
comment 'Processor Features'
......@@ -372,6 +249,15 @@ if [ "$CONFIG_CPU_ARM1020" = "y" ]; then
bool 'Disable branch prediction' CONFIG_CPU_BPREDICT_DISABLE
fi
if [ "$CONFIG_CPU_XSCALE" = "y" ]; then
# bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER
if [ "$CONFIG_XSCALE_PMU_TIMER" != "y" ]; then
define_bool CONFIG_XSCALE_PMU y
else
define_bool CONFIG_XSCALE_PMU n
fi
fi
endmenu
mainmenu_option next_comment
......@@ -601,31 +487,6 @@ source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
# Select the keyboard type for this architecture.
if [ "$CONFIG_FOOTBRIDGE_HOST" = "y" -o \
"$CONFIG_ARCH_CLPS7500" = "y" -o \
"$CONFIG_ARCH_SHARK" = "y" ]; then
define_bool CONFIG_PC_KEYB y
fi
if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
define_bool CONFIG_KMI_KEYB y
define_bool CONFIG_KMI_MOUSE y
fi
if [ "$CONFIG_ARCH_L7200" = "y" ]; then
define_bool CONFIG_L7200_KEYB y
fi
# Do we use the PC-type keyboard map?
if [ "$CONFIG_FOOTBRIDGE_HOST" = "y" -o \
"$CONFIG_ARCH_SHARK" = "y" -o \
"$CONFIG_ARCH_SA1100" = "y" -o \
"$CONFIG_ARCH_INTEGRATOR" = "y" -o \
"$CONFIG_ARCH_TBOX" = "y" -o \
"$CONFIG_ARCH_CLPS7500" = "y" -o \
"$CONFIG_ARCH_P720T" = "y" -o \
"$CONFIG_ARCH_ANAKIN" = "y" ]; then
define_bool CONFIG_PC_KEYMAP y
fi
if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then
bool 'VGA text console' CONFIG_VGA_CONSOLE
fi
......
......@@ -73,6 +73,7 @@ extern void abort(void);
extern void ret_from_exception(void);
extern void fpundefinstr(void);
extern void fp_enter(void);
extern void fp_init(union fp_state *);
/*
* This has a special calling convention; it doesn't
......@@ -129,6 +130,7 @@ EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(set_irq_type);
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(fp_init);
/* processor dependencies */
EXPORT_SYMBOL(__machine_arch_type);
......
......@@ -117,8 +117,8 @@ __turn_mmu_on:
#ifdef CONFIG_ALIGNMENT_TRAP
orr r0, r0, #2 @ ...........A.
#endif
mcr p15, 0, r0, c1, c0
mov r0, r0
mcr p15, 0, r0, c1, c0, 0 @ write control reg
mrc p15, 0, r0, c1, c0, 0 @ read it back.
mov r0, r0
mov r0, r0
mov pc, lr
......
......@@ -217,14 +217,11 @@ do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
desc->triggered = 1;
irq_enter();
kstat.irqs[cpu][irq]++;
action = desc->action;
if (action)
__do_irq(irq, desc->action, regs);
irq_exit();
}
/*
......@@ -256,7 +253,6 @@ do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
*/
desc->running = 1;
irq_enter();
kstat.irqs[cpu][irq]++;
do {
......@@ -274,8 +270,6 @@ do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
__do_irq(irq, action, regs);
} while (desc->pending);
irq_exit();
desc->running = 0;
/*
......@@ -311,7 +305,6 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
desc->chip->ack(irq);
if (likely(desc->enabled)) {
irq_enter();
kstat.irqs[cpu][irq]++;
/*
......@@ -325,7 +318,6 @@ do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
!check_irq_lock(desc, irq, regs)))
desc->chip->unmask(irq);
}
irq_exit();
}
}
......@@ -345,12 +337,11 @@ asmlinkage void asm_do_IRQ(int irq, struct pt_regs *regs)
if (irq >= NR_IRQS)
desc = &bad_irq_desc;
irq_enter();
spin_lock(&irq_controller_lock);
desc->handle(irq, desc, regs);
spin_unlock(&irq_controller_lock);
if (softirq_pending(smp_processor_id()))
do_softirq();
irq_exit();
}
void __set_irq_handler(unsigned int irq, irq_handler_t handle, int is_chained)
......
......@@ -177,9 +177,9 @@ void show_regs(struct pt_regs * regs)
flags & PSR_Z_BIT ? 'Z' : 'z',
flags & PSR_C_BIT ? 'C' : 'c',
flags & PSR_V_BIT ? 'V' : 'v');
printk(" IRQs %s FIQs %s Mode %s%s Segment %s\n",
interrupts_enabled(regs) ? "on" : "off",
fast_interrupts_enabled(regs) ? "on" : "off",
printk(" IRQs o%s FIQs o%s Mode %s%s Segment %s\n",
interrupts_enabled(regs) ? "n" : "ff",
fast_interrupts_enabled(regs) ? "n" : "ff",
processor_modes[processor_mode(regs)],
thumb_mode(regs) ? " (T)" : "",
get_fs() == get_ds() ? "kernel" : "user");
......@@ -293,15 +293,22 @@ void exit_thread(void)
{
}
static void default_fp_init(union fp_state *fp)
{
memset(fp, 0, sizeof(union fp_state));
}
void (*fp_init)(union fp_state *) = default_fp_init;
void flush_thread(void)
{
struct thread_info *thread = current_thread_info();
struct task_struct *tsk = current;
memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
memset(&thread->fpstate, 0, sizeof(union fp_state));
tsk->used_math = 0;
current->used_math = 0;
memset(&tsk->thread.debug, 0, sizeof(struct debug_info));
fp_init(&thread->fpstate);
}
void release_thread(struct task_struct *dead_task)
......
CONFIG_ARCH_ARCA5K
This selects what ARM system you wish to build the kernel for. It
also selects to some extent the CPU type. If you are unsure what
to set this option to, please consult any information supplied with
your system.
CONFIG_ARCH_A5K
Say Y here to to support the Acorn A5000. Linux can support the
internal IDE disk and CD-ROM interface, serial and parallel port,
and the floppy drive. Note that on some A5000s the floppy is
plugged into the wrong socket on the motherboard.
CONFIG_ARCH_ARC
The Acorn Archimedes was an personal computer based on an 8K ARM2
processor, released in 1987. It supported 512K of RAM and 2 800K
floppy disks. Picture and more detailed specifications at
<http://www.computingmuseum.com/museum/archi.htm>.
CONFIG_PAGESIZE_16
Say Y here if your Archimedes or A5000 system has only 2MB of
memory, otherwise say N. The resulting kernel will not run on a
machine with 4MB of memory.
mainmenu_option next_comment
comment 'Archimedes/A5000 Implementations'
# These architectures will be combined. However, until this
# is complete... Note that the ARC will take precedence over
# A5K
comment 'Archimedes/A5000 Implementations (select only ONE)'
dep_bool ' Archimedes' CONFIG_ARCH_ARC $CONFIG_ARCH_ARCA5K
dep_bool ' A5000' CONFIG_ARCH_A5K $CONFIG_ARCH_ARCA5K
if [ "$CONFIG_ARCH_ARCA5K" = "y" ]; then
bool '2MB physical memory' CONFIG_PAGESIZE_16
fi
endmenu
CONFIG_ARCH_AUTCPU12
Say Y if you intend to run the kernel on the autronix autcpu12
board. This board is based on a Cirrus Logic CS89712.
CONFIG_ARCH_CDB89712
This is an evaluation board from Cirrus for the CS89712 processor.
The board includes 2 serial ports, Ethernet, IRDA, and expansion
headers. It comes with 16 MB SDRAM and 8 MB flash ROM.
CONFIG_ARCH_CEIVA
Say Y here if you intend to run this kernel on the Ceiva/Polaroid
PhotoMax Digital Picture Frame.
CONFIG_ARCH_EDB7211
Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
evaluation board.
CONFIG_ARCH_P720T
Say Y here if you intend to run this kernel on the ARM Prospector
720T.
CONFIG_EP72XX_ROM_BOOT
If you say Y here, your CLPS711x-based kernel will use the bootstrap
mode memory map instead of the normal memory map.
Processors derived from the Cirrus CLPS-711X core support two boot
modes. Normal mode boots from the external memory device at CS0.
Bootstrap mode rearranges parts of the memory map, placing an
internal 128 byte bootstrap ROM at CS0. This option performs the
address map changes required to support booting in this mode.
You almost surely want to say N here.
mainmenu_option next_comment
comment 'CLPS711X/EP721X Implementations'
dep_bool ' AUTCPU12' CONFIG_ARCH_AUTCPU12 $CONFIG_ARCH_CLPS711X
dep_bool ' CDB89712' CONFIG_ARCH_CDB89712 $CONFIG_ARCH_CLPS711X
dep_bool ' CEIVA' CONFIG_ARCH_CEIVA $CONFIG_ARCH_CLPS711X
dep_bool ' CLEP7312' CONFIG_ARCH_CLEP7312 $CONFIG_ARCH_CLPS711X
dep_bool ' EDB7211' CONFIG_ARCH_EDB7211 $CONFIG_ARCH_CLPS711X
dep_bool ' P720T' CONFIG_ARCH_P720T $CONFIG_ARCH_CLPS711X
dep_bool ' FORTUNET' CONFIG_ARCH_FORTUNET $CONFIG_ARCH_CLPS711X
# XXX Maybe these should indicate register compatibility
# instead of being mutually exclusive.
if [ "$CONFIG_ARCH_EDB7211" = "y" ]; then
define_bool CONFIG_ARCH_EP7211 y
else
define_bool CONFIG_ARCH_EP7211 n
fi
if [ "$CONFIG_ARCH_P720T" = "y" -o \
"$CONFIG_ARCH_CEIVA" = "y" ]; then
define_bool CONFIG_ARCH_EP7212 y
else
define_bool CONFIG_ARCH_EP7212 n
fi
if [ "$CONFIG_ARCH_EP7211" = "y" -o \
"$CONFIG_ARCH_EP7212" = "y" ]; then
bool ' EP72xx ROM boot' CONFIG_EP72XX_ROM_BOOT
fi
endmenu
CONFIG_PLD_HOTSWAP
This enables support for the dynamic loading and configuration of
compatible drivers when the contents of the PLD are changed. This
is still experimental and requires configuration tools which are
not yet generally available. Say N here. You must enable the kernel
module loader for this feature to work.
mainmenu_option next_comment
comment 'Epxa10db'
if [ "$CONFIG_ARCH_CAMELOT" = "y" ]; then
comment 'PLD hotswap support'
define_bool CONFIG_PLD y
dep_bool 'Support for PLD device hotplugging (experimental)' CONFIG_PLD_HOTSWAP $CONFIG_EXPERIMENTAL
fi
endmenu
CONFIG_ARCH_CATS
Say Y here if you intend to run this kernel on the CATS.
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_EBSA285_ADDIN
Say Y here if you intend to run this kernel on the EBSA285 card
in addin mode.
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_EBSA285_HOST
Say Y here if you intend to run this kernel on the EBSA285 card
in host ("central function") mode.
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_NETWINDER
Say Y here if you intend to run this kernel on the Rebel.COM
NetWinder. Information about this machine can be found at:
<http://www.netwinder.org/>
Saying N will reduce the size of the Footbridge kernel.
CONFIG_ARCH_PERSONAL_SERVER
Say Y here if you intend to run this kernel on the Compaq
Personal Server.
Saying N will reduce the size of the Footbridge kernel.
The Compaq Personal Server is not available for purchase.
There are no product plans beyond the current research
prototypes at this time. Information is available at:
<http://crl.research.compaq.com/projects/personalserver/>
If you have any questions or comments about the Compaq Personal
Server, send e-mail to skiff@crl.dec.com.
mainmenu_option next_comment
comment 'Footbridge Implementations'
dep_bool ' CATS' CONFIG_ARCH_CATS $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' Compaq Personal Server' CONFIG_ARCH_PERSONAL_SERVER $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' EBSA285 (addin mode)' CONFIG_ARCH_EBSA285_ADDIN $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' EBSA285 (host mode)' CONFIG_ARCH_EBSA285_HOST $CONFIG_ARCH_FOOTBRIDGE
dep_bool ' NetWinder' CONFIG_ARCH_NETWINDER $CONFIG_ARCH_FOOTBRIDGE
endmenu
......@@ -29,38 +29,10 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/amba_kmi.h>
extern void integrator_map_io(void);
extern void integrator_init_irq(void);
#ifdef CONFIG_KMI_KEYB
static struct kmi_info integrator_keyboard __initdata = {
.base = IO_ADDRESS(KMI0_BASE),
.irq = IRQ_KMIINT0,
.divisor = 24 / 8 - 1,
.type = KMI_KEYBOARD,
};
static struct kmi_info integrator_mouse __initdata = {
.base = IO_ADDRESS(KMI1_BASE),
.irq = IRQ_KMIINT1,
.divisor = 24 / 8 - 1,
.type = KMI_MOUSE,
};
#endif
static int __init integrator_init(void)
{
#ifdef CONFIG_KMI_KEYB
register_kmi(&integrator_keyboard);
register_kmi(&integrator_mouse);
#endif
return 0;
}
__initcall(integrator_init);
MACHINE_START(INTEGRATOR, "ARM-Integrator")
MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd")
BOOT_MEM(0x00000000, 0x16000000, 0xf1600000)
......
......@@ -181,4 +181,4 @@ static int __init integrator_cpu_init(void)
return 0;
}
__initcall(integrator_cpu_init);
core_initcall(integrator_cpu_init);
CONFIG_ARCH_IQ80310
Say Y here if you want to run your kernel on the Intel IQ80310
evaluation kit for the IOP310 chipset.
mainmenu_option next_comment
comment 'IOP310 Implementation Options'
dep_bool ' IQ80310' CONFIG_ARCH_IQ80310 $CONFIG_ARCH_IOP310
comment 'IOP310 Chipset Features'
dep_bool 'Support Intel 80312 Application Accelerator Unit (EXPERIMENTAL)' CONFIG_IOP310_AAU $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
dep_bool 'Support Intel 80312 DMA (EXPERIMENTAL)' CONFIG_IOP310_DMA $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
dep_bool 'Support Intel 80312 Messaging Unit (EXPERIMENTAL)' CONFIG_IOP310_MU $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
dep_bool 'Support Intel 80312 Performance Monitor (EXPERIMENTAL)' CONFIG_IOP310_PMON $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
endmenu
mainmenu_option next_comment
comment 'Intel PXA250/210 Implementations'
dep_bool ' Intel DBPXA250 Development Platform' CONFIG_ARCH_LUBBOCK $CONFIG_ARCH_PXA
dep_bool ' Accelent Xscale IDP' CONFIG_ARCH_PXA_IDP $CONFIG_ARCH_PXA
endmenu
......@@ -124,7 +124,7 @@ static int __init pxa_dma_init (void)
return ret;
}
__initcall(pxa_dma_init);
arch_initcall(pxa_dma_init);
EXPORT_SYMBOL(pxa_request_dma);
EXPORT_SYMBOL(pxa_free_dma);
......
......@@ -9,6 +9,8 @@
*
* 2001-09-13: Cliff Brake <cbrake@accelent.com>
* Initial code
*
* Expected command line: mem=32M initrd=0xa1000000,4M root=/dev/ram ramdisk=8192
*/
#include <linux/kernel.h>
#include <linux/init.h>
......@@ -29,8 +31,6 @@
#include "generic.h"
#define PXA_IDP_REV02
#ifndef PXA_IDP_REV02
/* shadow registers for write only registers */
unsigned int idp_cpld_led_control_shadow = 0x1;
......@@ -103,9 +103,19 @@ static void __init idp_map_io(void)
pxa_map_io();
iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
set_GPIO_IRQ_edge(IRQ_TO_GPIO_2_80(TOUCH_PANEL_IRQ), TOUCH_PANEL_IRQ_EDGE);
set_irq_type(IRQ_TO_GPIO_2_80(TOUCH_PANEL_IRQ), TOUCH_PANEL_IRQ_EDGE);
// serial ports 2 & 3
pxa_gpio_mode(GPIO42_BTRXD_MD);
pxa_gpio_mode(GPIO43_BTTXD_MD);
pxa_gpio_mode(GPIO44_BTCTS_MD);
pxa_gpio_mode(GPIO45_BTRTS_MD);
pxa_gpio_mode(GPIO46_STRXD_MD);
pxa_gpio_mode(GPIO47_STTXD_MD);
}
MACHINE_START(PXA_IDP, "Accelent Xscale IDP")
MAINTAINER("Accelent Systems Inc.")
BOOT_MEM(0xa0000000, 0x40000000, 0xfc000000)
......
CONFIG_SA1100_ASSABET
Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
Microprocessor Development Board (also known as the Assabet).
CONFIG_ASSABET_NEPONSET
Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
Microprocessor Development Board (Assabet) with the SA-1111
Development Board (Nepon).
CONFIG_SA1100_ADSBITSY
Say Y here if you are using Applied Data Systems Intel(R)
StrongARM(R) 1110 based Bitsy, 3 x 5 inches in size, Compaq - IPAQ -
like platform. See
<http://www.applieddata.net/products_bitsySpec.asp> for more
information.
CONFIG_SA1100_BRUTUS
Say Y here if you are using the Intel(R) StrongARM(R) SA-1100
Microprocessor Development Board (also known as the Brutus).
CONFIG_SA1100_CERF
The Intrinsyc CerfBoard is based on the StrongARM 1110.
More information is available at:
<http://www.intrinsyc.com/products/referenceplatforms/cerfboard.html>.
Say Y if configuring for an Intrinsyc CerfBoard.
Say N otherwise.
CONFIG_SA1100_CERF_CPLD
Say Y here to support the Linux CerfPDA development kit from
Intrinsyc. This is a StrongARM-1110-based reference platform for
designing custom PDAs. Product info is at
<http://www.intrinsyc.com/products/referencedesigns/cerfpda.asp>.
CONFIG_SA1100_H3100
Say Y here if you intend to run this kernel on the Compaq iPAQ
H3100 handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3100>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_SA1100_H3600
Say Y here if you intend to run this kernel on the Compaq iPAQ
H3600 handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3600>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_SA1100_H3800
Say Y here if you intend to run this kernel on the Compaq iPAQ H3800
series handheld computer. Information about this machine and the
Linux port to this machine can be found at:
<http://www.handhelds.org/Compaq/index.html#iPAQ_H3800>
<http://www.compaq.com/products/handhelds/pocketpc/>
CONFIG_H3600_SLEEVE
Choose this option to enable support for extension packs (sleeves)
for the Compaq iPAQ H3XXX series of handheld computers. This option
is required for the CF, PCMCIA, Bluetooth and GSM/GPRS extension
packs.
CONFIG_SA1100_FLEXANET
Say Y here if you intend to run this kernel on the FlexaNet
handheld instruments. Information about this machine can be
found at: <http://www.flexanet.com/>.
CONFIG_SA1100_FREEBIRD
Support the FreeBird board used in Coventive embedded products. See
Documentation/arm/SA1100/Freebird for more.
CONFIG_SA1100_GRAPHICSCLIENT
Say Y here if you are using an Applied Data Systems Intel(R)
StrongARM(R) SA-1100 based Graphics Client SBC. See
<http://www.flatpanels.com/> for information on this system.
CONFIG_SA1100_GRAPHICSMASTER
Say Y here if you are using an Applied Data Systems Intel(R)
StrongARM(R) SA-1100 based Graphics Master SBC with SA-1111
StrongARM companion chip. See
<http://www.applieddata.net/products_masterSpec.asp> for information
on this system.
CONFIG_SA1100_BADGE4
Say Y here if you want to build a kernel for the HP Laboratories
BadgePAD 4.
CONFIG_SA1100_JORNADA720
Say Y here if you want to build a kernel for the HP Jornada 720
handheld computer. See <http://www.hp.com/jornada/products/720>
for details.
CONFIG_SA1100_HUW_WEBPANEL
Say Y here to support the HuW Webpanel produced by Hoeft & Wessel
AG. English-language website is at
<http://www.hoeft-wessel.de/en.htm>; credits and build instructions
at Documentation/arm/SA1100/HUW_WEBPANEL.
CONFIG_SA1100_ITSY
Say Y here if you are using the Compaq Itsy experimental pocket
computer. See <http://research.compaq.com/wrl/projects/itsy/> for
more information.
CONFIG_SA1100_LART
Say Y here if you are using the Linux Advanced Radio Terminal
(also known as the LART). See <http://www.lart.tudelft.nl/> for
information on the LART.
CONFIG_SA1100_NANOENGINE
The nanoEngine is a StrongARM 1110-based single board computer
from Bright Star Engineering. More information is available at:
<http://www.brightstareng.com/arm/nanoeng.htm>.
Say Y if configuring for a nanoEngine.
Say N otherwise.
CONFIG_SA1100_OMNIMETER
Say Y here if you are using the inhand electronics OmniMeter. See
<http://www.inhandelectronics.com/html/omni1.html> for details.
CONFIG_SA1100_PANGOLIN
Pangolin is a StrongARM 1110-based evaluation platform produced
by Dialogue Technology. It has EISA slots for ease of configuration
with SDRAM/Flash memory card, USB/Serial/Audio card, Compact Flash
card, and TFT-LCD card.
Say Y if configuring for a Pangolin.
Say N otherwise.
CONFIG_SA1100_PLEB
Say Y here if you are using a Portable Linux Embedded Board
(also known as PLEB). See <http://www.cse.unsw.edu.au/~pleb/>
for more information.
CONFIG_SA1100_PT_SYSTEM3
Say Y here if you intend to build a kernel suitable to run on
a Pruftechnik Digital Board. For more information see
<http://www.pruftechnik.com>
CONFIG_SA1100_SHANNON
The Shannon (also known as a Tuxscreen, and also as a IS2630) was a
limited edition webphone produced by Philips. The Shannon is a SA1100
platform with a 640x480 LCD, touchscreen, CIR keyboard, PCMCIA slots,
and a telco interface.
CONFIG_SA1100_SHERMAN
Say Y here to support the Blazie Engineering `Sherman' StrongARM
1110-based SBC, used primarily in assistance products for the
visually impaired. The company is now Freedom Scientific, with
a website at <http://www.freedomscientific.com/index.html>. The
Sherman product, however, appears to have been discontinued.
CONFIG_SA1100_SIMPAD
The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a
PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same
like CL4 in additional it has a PCMCIA-Slot. For more information
visit <http://www.my-siemens.com or www.siemens.ch>.
CONFIG_SA1100_PFS168
The Radisys Corp. PFS-168 (aka Tulsa) is an Intel® StrongArm® SA-1110 based
computer which includes the SA-1111 Microprocessor Companion Chip and other
custom I/O designed to add connectivity and multimedia features for vending
and business machine applications. Say Y here if you require support for
this target.
CONFIG_SA1100_VICTOR
Say Y here if you are using a Visu Aide Intel(R) StrongARM(R)
SA-1100 based Victor Digital Talking Book Reader. See
<http://www.visuaide.com/pagevictor.en.html> for information on
this system.
CONFIG_SA1100_XP860
:: Config help missing ::
:: 06 August 2002 ::
CONFIG_SA1100_YOPY
Say Y here to support the Yopy PDA. Product information at
<http://www.yopy.com/>. See Documentation/arm/SA110/Yopy
for more.
CONFIG_SA1100_STORK
Say Y here if you intend to run this kernel on the Stork
handheld computer.
mainmenu_option next_comment
comment 'SA11x0 Implementations'
dep_bool ' Assabet' CONFIG_SA1100_ASSABET $CONFIG_ARCH_SA1100
dep_bool ' Include support for Neponset' CONFIG_ASSABET_NEPONSET $CONFIG_SA1100_ASSABET
dep_bool ' ADS Bitsy' CONFIG_SA1100_ADSBITSY $CONFIG_ARCH_SA1100
dep_bool ' Brutus' CONFIG_SA1100_BRUTUS $CONFIG_ARCH_SA1100
dep_bool ' CerfBoard' CONFIG_SA1100_CERF $CONFIG_ARCH_SA1100
if [ "$CONFIG_SA1100_CERF" = "y" ]; then
choice 'Cerf Flash available' \
"8MB CONFIG_SA1100_CERF_FLASH_8MB \
16MB CONFIG_SA1100_CERF_FLASH_16MB \
32MB CONFIG_SA1100_CERF_FLASH_32MB" 8MB
bool 'Cerf w/CPLD support (CerfPDA)' CONFIG_SA1100_CERF_CPLD
fi
dep_bool ' Compaq iPAQ H3100' CONFIG_SA1100_H3100 $CONFIG_ARCH_SA1100
dep_bool ' Compaq iPAQ H3600/H3700' CONFIG_SA1100_H3600 $CONFIG_ARCH_SA1100
dep_bool ' Compaq iPAQ H3800' CONFIG_SA1100_H3800 $CONFIG_ARCH_SA1100
if [ "$CONFIG_SA1100_H3100" = "y" -o "$CONFIG_SA1100_H3600" = "y" -o "$CONFIG_SA1100_H3800" = "y" ]; then
define_bool CONFIG_SA1100_H3XXX y
else
define_bool CONFIG_SA1100_H3XXX n
fi
#dep_bool ' Consus' CONFIG_SA1100_CONSUS $CONFIG_ARCH_SA1100
#dep_bool ' Empeg' CONFIG_SA1100_EMPEG $CONFIG_ARCH_SA1100
dep_bool ' Extenex HandHeld Theater (Squashtail)' CONFIG_SA1100_EXTENEX1 $CONFIG_ARCH_SA1100
if [ "$CONFIG_SA1100_EXTENEX1" = "y" ]; then
bool ' Support 16 MB of DRAM (not just 8)' CONFIG_SA1100_EXTENEX1_16MB
fi
dep_bool ' FlexaNet' CONFIG_SA1100_FLEXANET $CONFIG_ARCH_SA1100
dep_bool ' FreeBird-v1.1' CONFIG_SA1100_FREEBIRD $CONFIG_ARCH_SA1100
dep_bool ' GraphicsClient Plus' CONFIG_SA1100_GRAPHICSCLIENT $CONFIG_ARCH_SA1100
dep_bool ' GraphicsMaster' CONFIG_SA1100_GRAPHICSMASTER $CONFIG_ARCH_SA1100
dep_bool ' HP Labs BadgePAD 4' CONFIG_SA1100_BADGE4 $CONFIG_ARCH_SA1100
dep_bool ' HP Jornada 720' CONFIG_SA1100_JORNADA720 $CONFIG_ARCH_SA1100
dep_bool ' HuW WebPanel' CONFIG_SA1100_HUW_WEBPANEL $CONFIG_ARCH_SA1100
dep_bool ' Itsy' CONFIG_SA1100_ITSY $CONFIG_ARCH_SA1100
dep_bool ' LART' CONFIG_SA1100_LART $CONFIG_ARCH_SA1100
dep_bool ' nanoEngine' CONFIG_SA1100_NANOENGINE $CONFIG_ARCH_SA1100
dep_bool ' OmniMeter' CONFIG_SA1100_OMNIMETER $CONFIG_ARCH_SA1100
dep_bool ' Pangolin' CONFIG_SA1100_PANGOLIN $CONFIG_ARCH_SA1100
dep_bool ' PLEB' CONFIG_SA1100_PLEB $CONFIG_ARCH_SA1100
dep_bool ' PT System 3' CONFIG_SA1100_PT_SYSTEM3 $CONFIG_ARCH_SA1100
dep_bool ' Shannon' CONFIG_SA1100_SHANNON $CONFIG_ARCH_SA1100
dep_bool ' Sherman' CONFIG_SA1100_SHERMAN $CONFIG_ARCH_SA1100
dep_bool ' Simpad' CONFIG_SA1100_SIMPAD $CONFIG_ARCH_SA1100
dep_bool ' Tulsa' CONFIG_SA1100_PFS168 $CONFIG_ARCH_SA1100
dep_bool ' Victor' CONFIG_SA1100_VICTOR $CONFIG_ARCH_SA1100
dep_bool ' XP860' CONFIG_SA1100_XP860 $CONFIG_ARCH_SA1100
dep_bool ' Yopy' CONFIG_SA1100_YOPY $CONFIG_ARCH_SA1100
dep_bool ' Stork' CONFIG_SA1100_STORK $CONFIG_ARCH_SA1100
dep_tristate 'SA1100 USB function support' CONFIG_SA1100_USB $CONFIG_ARCH_SA1100
dep_tristate ' Support for SA11x0 USB network link function' CONFIG_SA1100_USB_NETLINK $CONFIG_SA1100_USB
dep_tristate ' Support for SA11x0 USB character device emulation' CONFIG_SA1100_USB_CHAR $CONFIG_SA1100_USB
dep_tristate 'Compaq iPAQ Handheld sleeve support' CONFIG_H3600_SLEEVE $CONFIG_SA1100_H3600
endmenu
......@@ -27,7 +27,7 @@ endif
# Next, the SA1111 stuff.
obj-$(CONFIG_SA1111) += sa1111.o
obj-$(CONFIG_USB_OHCI_SA1111) += sa1111-pcibuf.o pcipool.o
obj-$(CONFIG_USB_OHCI_HCD) += sa1111-pcibuf.o pcipool.o
# Specific board support
obj-$(CONFIG_SA1100_ADSBITSY) += adsbitsy.o
......
......@@ -69,7 +69,7 @@ static int __init adsbitsy_init(void)
return 0;
}
__initcall(adsbitsy_init);
arch_initcall(adsbitsy_init);
static void __init adsbitsy_init_irq(void)
{
......
......@@ -126,7 +126,7 @@ static int __init assabet_init(void)
return 0;
}
__initcall(assabet_init);
arch_initcall(assabet_init);
/*
......
......@@ -109,7 +109,7 @@ static int __init badge4_init(void)
return 0;
}
__initcall(badge4_init);
arch_initcall(badge4_init);
static unsigned badge4_5V_bitmap = 0;
......
......@@ -254,4 +254,4 @@ static int __init sa1100_dram_init(void)
return ret;
}
__initcall(sa1100_dram_init);
core_initcall(sa1100_dram_init);
......@@ -327,4 +327,4 @@ static int __init sa1110_clk_init(void)
return 0;
}
__initcall(sa1110_clk_init);
core_initcall(sa1110_clk_init);
......@@ -143,14 +143,6 @@ static int flexanet_serial_init(void)
}
static int __init flexanet_init(void)
{
return 0;
}
__initcall(flexanet_init);
static struct map_desc flexanet_io_desc[] __initdata = {
/* virtual physical length type */
{ 0xf0000000, 0x10000000, 0x00001000, MT_DEVICE }, /* Board Control Register */
......
......@@ -48,7 +48,7 @@ static int __init freebird_init(void)
return 0;
}
__initcall(freebird_init);
arch_initcall(freebird_init);
static struct map_desc freebird_io_desc[] __initdata = {
/* virtual physical length type */
......
......@@ -8,11 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Since this file should be linked before any other machine specific file,
* the __initcall() here will be executed first. This serves as default
* initialization stuff for SA1100 machines which can be overriden later if
* need be.
*/
#include <linux/config.h>
#include <linux/module.h>
......@@ -117,7 +112,7 @@ static int __init sa1100_init(void)
return 0;
}
__initcall(sa1100_init);
core_initcall(sa1100_init);
void (*sa1100fb_backlight_power)(int on);
void (*sa1100fb_lcd_power)(int on);
......
......@@ -59,7 +59,7 @@ static int __init graphicsmaster_init(void)
return 0;
}
__initcall(graphicsmaster_init);
arch_initcall(graphicsmaster_init);
/*
* Handlers for GraphicsMaster's external IRQ logic
......
......@@ -52,7 +52,7 @@ static int __init init_huw_cs3(void)
return 0;
}
__initcall(init_huw_cs3);
arch_initcall(init_huw_cs3);
/**
......
......@@ -53,7 +53,7 @@ static int __init jornada720_init(void)
return 0;
}
__initcall(jornada720_init);
arch_initcall(jornada720_init);
static struct map_desc jornada720_io_desc[] __initdata = {
/* virtual physical length type */
......
......@@ -44,4 +44,4 @@ sa1100_leds_init(void)
return 0;
}
__initcall(sa1100_leds_init);
core_initcall(sa1100_leds_init);
......@@ -216,7 +216,7 @@ static int __init neponset_init(void)
return sa1111_init(&neponset_device, 0x40000000, IRQ_NEPONSET_SA1111);
}
__initcall(neponset_init);
arch_initcall(neponset_init);
static struct map_desc neponset_io_desc[] __initdata = {
/* virtual physical length type */
......
......@@ -39,7 +39,7 @@ static int __init omnimeter_init(void)
return 0;
}
__initcall(omnimeter_init);
arch_initcall(omnimeter_init);
static struct map_desc omnimeter_io_desc[] __initdata = {
/* virtual physical length type */
......
......@@ -20,8 +20,6 @@
#include <asm/page.h>
#include "pcipool.h"
/*
* Pool allocator ... wraps the pci_alloc_consistent page allocator, so
* small blocks are easily used by drivers for bus mastering controllers.
......@@ -33,7 +31,6 @@ struct pci_pool { /* the pool */
spinlock_t lock;
size_t blocks_per_page;
size_t size;
int flags;
struct pci_dev *dev;
size_t allocation;
char name [32];
......@@ -52,6 +49,19 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
// #define CONFIG_PCIPOOL_DEBUG
static inline const char *slot_name(const struct pci_pool *pool)
{
const struct pci_dev *pdev = pool->dev;
if (pdev == 0)
return "[0]";
else if (dev_is_sa1111(pdev))
return "[SA-1111]";
else
return pdev->slot_name;
}
/**
* pci_pool_create - Creates a pool of pci consistent memory blocks, for dma.
......@@ -60,7 +70,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
* @size: size of the blocks in this pool.
* @align: alignment requirement for blocks; must be a power of two
* @allocation: returned blocks won't cross this boundary (or zero)
* @flags: SLAB_* flags (not all are supported).
* @mem_flags: SLAB_* flags.
*
* Returns a pci allocation pool with the requested characteristics, or
* null if one can't be created. Given one of these pools, pci_pool_alloc()
......@@ -76,7 +86,7 @@ struct pci_page { /* cacheable header for 'allocation' bytes */
*/
struct pci_pool *
pci_pool_create (const char *name, struct pci_dev *pdev,
size_t size, size_t align, size_t allocation, int flags)
size_t size, size_t align, size_t allocation, int mem_flags)
{
struct pci_pool *retval;
......@@ -100,13 +110,9 @@ pci_pool_create (const char *name, struct pci_dev *pdev,
} else if (allocation < size)
return 0;
if (!(retval = kmalloc (sizeof *retval, flags)))
if (!(retval = kmalloc (sizeof *retval, mem_flags)))
return retval;
#ifdef CONFIG_PCIPOOL_DEBUG
flags |= SLAB_POISON;
#endif
strncpy (retval->name, name, sizeof retval->name);
retval->name [sizeof retval->name - 1] = 0;
......@@ -114,14 +120,13 @@ pci_pool_create (const char *name, struct pci_dev *pdev,
INIT_LIST_HEAD (&retval->page_list);
spin_lock_init (&retval->lock);
retval->size = size;
retval->flags = flags;
retval->allocation = allocation;
retval->blocks_per_page = allocation / size;
init_waitqueue_head (&retval->waitq);
#ifdef CONFIG_PCIPOOL_DEBUG
printk (KERN_DEBUG "pcipool create %s/%s size %d, %d/page (%d alloc)\n",
pdev ? pdev->slot_name : NULL, retval->name, size,
slot_name(retval), retval->name, size,
retval->blocks_per_page, allocation);
#endif
......@@ -143,11 +148,13 @@ pool_alloc_page (struct pci_pool *pool, int mem_flags)
if (!page)
return 0;
page->vaddr = pci_alloc_consistent (pool->dev,
pool->allocation, &page->dma);
pool->allocation,
&page->dma);
if (page->vaddr) {
memset (page->bitmap, 0xff, mapsize); // bit set == free
if (pool->flags & SLAB_POISON)
#ifdef CONFIG_DEBUG_SLAB
memset (page->vaddr, POOL_POISON_BYTE, pool->allocation);
#endif
list_add (&page->page_list, &pool->page_list);
} else {
kfree (page);
......@@ -173,8 +180,9 @@ pool_free_page (struct pci_pool *pool, struct pci_page *page)
{
dma_addr_t dma = page->dma;
if (pool->flags & SLAB_POISON)
#ifdef CONFIG_DEBUG_SLAB
memset (page->vaddr, POOL_POISON_BYTE, pool->allocation);
#endif
pci_free_consistent (pool->dev, pool->allocation, page->vaddr, dma);
list_del (&page->page_list);
kfree (page);
......@@ -195,8 +203,7 @@ pci_pool_destroy (struct pci_pool *pool)
#ifdef CONFIG_PCIPOOL_DEBUG
printk (KERN_DEBUG "pcipool destroy %s/%s\n",
pool->dev ? pool->dev->slot_name : NULL,
pool->name);
slot_name(pool), pool->name);
#endif
spin_lock_irqsave (&pool->lock, flags);
......@@ -206,8 +213,7 @@ pci_pool_destroy (struct pci_pool *pool)
struct pci_page, page_list);
if (is_page_busy (pool->blocks_per_page, page->bitmap)) {
printk (KERN_ERR "pci_pool_destroy %s/%s, %p busy\n",
pool->dev ? pool->dev->slot_name : NULL,
pool->name, page->vaddr);
slot_name(pool), pool->name, page->vaddr);
/* leak the still-in-use consistent memory */
list_del (&page->page_list);
kfree (page);
......@@ -327,35 +333,32 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
int map, block;
if ((page = pool_find_page (pool, dma)) == 0) {
printk (KERN_ERR "pci_pool_free %s/%s, %p/%x (bad dma)\n",
pool->dev ? pool->dev->slot_name : NULL,
pool->name, vaddr, dma);
return;
}
#ifdef CONFIG_PCIPOOL_DEBUG
if (((dma - page->dma) + (void *)page->vaddr) != vaddr) {
printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%x\n",
printk (KERN_ERR "pci_pool_free %s/%s, %p/%lx (bad dma)\n",
pool->dev ? pool->dev->slot_name : NULL,
pool->name, vaddr, dma);
pool->name, vaddr, (unsigned long) dma);
return;
}
#endif
block = dma - page->dma;
block /= pool->size;
map = block / BITS_PER_LONG;
block %= BITS_PER_LONG;
#ifdef CONFIG_PCIPOOL_DEBUG
#ifdef CONFIG_DEBUG_SLAB
if (((dma - page->dma) + (void *)page->vaddr) != vaddr) {
printk (KERN_ERR "pci_pool_free %s/%s, %p (bad vaddr)/%lx\n",
pool->dev ? pool->dev->slot_name : NULL,
pool->name, vaddr, (unsigned long) dma);
return;
}
if (page->bitmap [map] & (1UL << block)) {
printk (KERN_ERR "pci_pool_free %s/%s, dma %x already free\n",
pool->dev ? pool->dev->slot_name : NULL,
pool->name, dma);
return;
}
#endif
if (pool->flags & SLAB_POISON)
memset (vaddr, POOL_POISON_BYTE, pool->size);
#endif
spin_lock_irqsave (&pool->lock, flags);
set_bit (block, &page->bitmap [map]);
......@@ -369,9 +372,19 @@ pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t dma)
spin_unlock_irqrestore (&pool->lock, flags);
}
EXPORT_SYMBOL (pci_pool_create);
EXPORT_SYMBOL (pci_pool_destroy);
EXPORT_SYMBOL (pci_pool_alloc);
EXPORT_SYMBOL (pci_pool_free);
/* **************************************** */
static int __init pcipool_init(void)
{
MOD_INC_USE_COUNT; /* never unload */
return 0;
}
module_init(pcipool_init);
MODULE_LICENSE("GPL");
struct pci_pool *pci_pool_create (const char *name, struct pci_dev *dev,
size_t size, size_t align, size_t allocation, int flags);
void pci_pool_destroy (struct pci_pool *pool);
void *pci_pool_alloc (struct pci_pool *pool, int flags, dma_addr_t *handle);
void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
......@@ -39,7 +39,7 @@ static int __init pfs168_init(void)
return sa1111_init(NULL, 0x40000000, IRQ_GPIO25);
}
__initcall(pfs168_init);
arch_initcall(pfs168_init);
static void __init pfs168_init_irq(void)
......
......@@ -225,7 +225,7 @@ static int __init pm_init(void)
return 0;
}
__initcall(pm_init);
fs_initcall(pm_init);
#endif
......
/*
* linux/arch/arm/mach-sa1100/pci-sa1111.c
*
* Special pci_map/unmap_single routines for SA-1111. These functions
* compensate for a bug in the SA-1111 hardware which don't allow DMA
* to/from addresses above 1MB.
* Special pci_{map/unmap/dma_sync}_* routines for SA-1111.
*
* Brad Parker (brad@heeltoe.com)
* These functions utilize bouncer buffers to compensate for a bug in
* the SA-1111 hardware which don't allow DMA to/from addresses
* certain addresses above 1MB.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* Re-written by Christopher Hoover <ch@murgatroid.com>
* Original version by Brad Parker (brad@heeltoe.com)
*
* 06/13/2001 - created.
*/
* Copyright (C) 2002 Hewlett Packard Company.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
* */
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/list.h>
#include <asm/hardware/sa1111.h>
#include "pcipool.h"
//#define DEBUG
#ifdef DEBUG
#define DPRINTK(...) do { printk(KERN_DEBUG __VA_ARGS__); } while (0)
#else
#define DPRINTK(...) do { } while (0)
#endif
/*
* simple buffer allocator for copying of unsafe to safe buffers
* uses __alloc/__free for actual buffers
* keeps track of safe buffers we've allocated so we can recover the
* unsafe buffers.
*/
#define MAX_SAFE 32
#define SIZE_SMALL 1024
#define SIZE_LARGE (16*1024)
struct safe_buffer {
struct list_head node;
/* original request */
void *ptr;
size_t size;
int direction;
/* safe buffer info */
struct pci_pool *pool;
void *safe;
dma_addr_t safe_dma_addr;
};
LIST_HEAD(safe_buffers);
static long mapped_alloc_size;
static char *safe_buffers[MAX_SAFE][2];
#define SIZE_SMALL 1024
#define SIZE_LARGE (16*1024)
static struct pci_pool *small_buffer_cache, *large_buffer_cache;
static struct pci_pool *small_buffer_pool, *large_buffer_pool;
static int
init_safe_buffers(struct pci_dev *dev)
static int __init
create_safe_buffer_pools(void)
{
small_buffer_cache = pci_pool_create("pci_small_buffer",
dev,
small_buffer_pool = pci_pool_create("sa1111_small_dma_buffer",
SA1111_FAKE_PCIDEV,
SIZE_SMALL,
0 /* byte alignment */,
0 /* no page-crossing issues */,
GFP_KERNEL | GFP_DMA);
if (small_buffer_cache == 0)
SLAB_KERNEL);
if (0 == small_buffer_pool) {
printk(KERN_ERR
"sa1111_pcibuf: could not allocate small pci pool\n");
return -1;
}
large_buffer_cache = pci_pool_create("pci_large_buffer",
dev,
large_buffer_pool = pci_pool_create("sa1111_large_dma_buffer",
SA1111_FAKE_PCIDEV,
SIZE_LARGE,
0 /* byte alignment */,
0 /* no page-crossing issues */,
GFP_KERNEL | GFP_DMA);
if (large_buffer_cache == 0)
SLAB_KERNEL);
if (0 == large_buffer_pool) {
printk(KERN_ERR
"sa1111_pcibuf: could not allocate large pci pool\n");
pci_pool_destroy(small_buffer_pool);
small_buffer_pool = 0;
return -1;
}
return 0;
}
static void __exit
destroy_safe_buffer_pools(void)
{
if (small_buffer_pool)
pci_pool_destroy(small_buffer_pool);
if (large_buffer_pool)
pci_pool_destroy(large_buffer_pool);
small_buffer_pool = large_buffer_pool = 0;
}
/* allocate a 'safe' buffer and keep track of it */
static char *
alloc_safe_buffer(char *unsafe, int size, dma_addr_t *pbus)
static struct safe_buffer *
alloc_safe_buffer(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
char *safe;
dma_addr_t busptr;
struct safe_buffer *buf;
struct pci_pool *pool;
int i;
void *safe;
dma_addr_t safe_dma_addr;
if (0) printk("alloc_safe_buffer(size=%d)\n", size);
DPRINTK("%s(ptr=%p, size=%d, direction=%d)\n",
__func__, ptr, size, direction);
if (size <= SIZE_SMALL)
pool = small_buffer_cache;
else
if (size < SIZE_LARGE)
pool = large_buffer_cache;
else
return 0;
safe = pci_pool_alloc(pool, SLAB_ATOMIC, &busptr);
if (safe == 0)
buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC);
if (buf == 0) {
printk(KERN_WARNING "%s: kmalloc failed\n", __func__);
return 0;
for (i = 0; i < MAX_SAFE; i++)
if (safe_buffers[i][0] == 0) {
break;
}
if (i == MAX_SAFE) {
panic(__FILE__ ": exceeded MAX_SAFE buffers");
if (size <= SIZE_SMALL) {
pool = small_buffer_pool;
safe = pci_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
} else if (size <= SIZE_LARGE) {
pool = large_buffer_pool;
safe = pci_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
} else {
printk(KERN_DEBUG
"sa111_pcibuf: resorting to pci_alloc_consistent\n");
pool = 0;
safe = pci_alloc_consistent(SA1111_FAKE_PCIDEV, size,
&safe_dma_addr);
}
/* place the size index and the old buffer ptr in the first 8 bytes
* and return a ptr + 12 to caller
*/
((int *)safe)[0] = i;
((char **)safe)[1] = (char *)pool;
((char **)safe)[2] = unsafe;
if (safe == 0) {
printk(KERN_WARNING
"%s: could not alloc dma memory (size=%d)\n",
__func__, size);
kfree(buf);
return 0;
}
busptr += sizeof(int) + sizeof(char *) + sizeof(char *);
BUG_ON(sa1111_check_dma_bug(safe_dma_addr)); // paranoia
safe_buffers[i][0] = (void *)busptr;
safe_buffers[i][1] = (void *)safe;
buf->ptr = ptr;
buf->size = size;
buf->direction = direction;
buf->pool = pool;
buf->safe = safe;
buf->safe_dma_addr = safe_dma_addr;
safe += sizeof(int) + sizeof(char *) + sizeof(char *);
MOD_INC_USE_COUNT;
list_add(&buf->node, &safe_buffers);
*pbus = busptr;
return safe;
return buf;
}
/* determine if a buffer is from our "safe" pool */
static char *
find_safe_buffer(char *busptr, char **unsafe)
static struct safe_buffer *
find_safe_buffer(dma_addr_t safe_dma_addr)
{
int i;
char *buf;
for (i = 0; i < MAX_SAFE; i++) {
if (safe_buffers[i][0] == busptr) {
if (0) printk("find_safe_buffer(%p) found @ %d\n", busptr, i);
buf = safe_buffers[i][1];
*unsafe = ((char **)buf)[2];
return buf + sizeof(int) + sizeof(char *) + sizeof(char *);
struct list_head *entry;
list_for_each(entry, &safe_buffers) {
struct safe_buffer *b =
list_entry(entry, struct safe_buffer, node);
if (b->safe_dma_addr == safe_dma_addr) {
return b;
}
}
return (char *)0;
return 0;
}
static void
free_safe_buffer(char *buf)
free_safe_buffer(struct safe_buffer *buf)
{
int index;
struct pci_pool *pool;
char *dma;
DPRINTK("%s(buf=%p)\n", __func__, buf);
if (0) printk("free_safe_buffer(buf=%p)\n", buf);
list_del(&buf->node);
/* retrieve the buffer size index */
buf -= sizeof(int) + sizeof(char*) + sizeof(char*);
index = ((int *)buf)[0];
pool = (struct pci_pool *)((char **)buf)[1];
if (buf->pool)
pci_pool_free(buf->pool, buf->safe, buf->safe_dma_addr);
else
pci_free_consistent(SA1111_FAKE_PCIDEV, buf->size, buf->safe,
buf->safe_dma_addr);
kfree(buf);
if (0) printk("free_safe_buffer(%p) index %d\n",
buf, index);
MOD_DEC_USE_COUNT;
}
if (index < 0 || index >= MAX_SAFE) {
printk(__FILE__ ": free_safe_buffer() corrupt buffer\n");
return;
}
static inline int
dma_range_is_safe(dma_addr_t addr, size_t size)
{
unsigned int physaddr = SA1111_DMA_ADDR((unsigned int) addr);
dma = safe_buffers[index][0];
safe_buffers[index][0] = 0;
/* Any address within one megabyte of the start of the target
* bank will be OK. This is an overly conservative test:
* other addresses can be OK depending on the dram
* configuration. (See sa1111.c:sa1111_check_dma_bug() * for
* details.)
*
* We take care to ensure the entire dma region is within
* the safe range.
*/
pci_pool_free(pool, buf, (u32)dma);
return ((physaddr + size - 1) < (1<<20));
}
/*
NOTE:
replace pci_map/unmap_single with local routines which will
do buffer copies if buffer is above 1mb...
*/
/*
* see if a buffer address is in an 'unsafe' range. if it is
* allocate a 'safe' buffer and copy the unsafe buffer into it.
* substitute the safe buffer for the unsafe one.
* (basically move the buffer from an unsafe area to a safe one)
*
* we assume calls to map_single are symmetric with calls to unmap_single...
*/
dma_addr_t
sa1111_map_single(struct pci_dev *hwdev, void *virtptr,
size_t size, int direction)
sa1111_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
dma_addr_t busptr;
unsigned long flags;
dma_addr_t dma_addr;
mapped_alloc_size += size;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, ptr, size, direction);
if (0) printk("pci_map_single(hwdev=%p,ptr=%p,size=%d,dir=%x) "
"alloced=%ld\n",
hwdev, virtptr, size, direction, mapped_alloc_size);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
busptr = virt_to_bus(virtptr);
local_irq_save(flags);
/* we assume here that a buffer will never be >=64k */
if ( (((unsigned long)busptr) & 0x100000) ||
((((unsigned long)busptr)+size) & 0x100000) )
{
char *safe;
dma_addr = virt_to_bus(ptr);
safe = alloc_safe_buffer(virtptr, size, &busptr);
if (safe == 0) {
printk("unable to map unsafe buffer %p!\n", virtptr);
if (!dma_range_is_safe(dma_addr, size)) {
struct safe_buffer *buf;
buf = alloc_safe_buffer(hwdev, ptr, size, direction);
if (buf == 0) {
printk(KERN_ERR
"%s: unable to map unsafe buffer %p!\n",
__func__, ptr);
local_irq_restore(flags);
return 0;
}
if (0) printk("unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
virtptr, (void *)virt_to_bus(virtptr),
safe, (void *)busptr);
DPRINTK("%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
__func__,
buf->ptr, (void *) virt_to_bus(buf->ptr),
buf->safe, (void *) buf->safe_dma_addr);
memcpy(safe, virtptr, size);
consistent_sync(safe, size, direction);
if ((direction == PCI_DMA_TODEVICE) ||
(direction == PCI_DMA_BIDIRECTIONAL)) {
DPRINTK("%s: copy out from unsafe %p, to safe %p, size %d\n",
__func__, ptr, buf->safe, size);
memcpy(buf->safe, ptr, size);
}
consistent_sync(buf->safe, size, direction);
return busptr;
dma_addr = buf->safe_dma_addr;
} else {
consistent_sync(ptr, size, direction);
}
consistent_sync(virtptr, size, direction);
return busptr;
local_irq_restore(flags);
return dma_addr;
}
/*
* see if a mapped address was really a "safe" buffer and if so,
* copy the data from the safe buffer back to the unsafe buffer
* and free up the safe buffer.
* (basically return things back to the way they should be)
* see if a mapped address was really a "safe" buffer and if so, copy
* the data from the safe buffer back to the unsafe buffer and free up
* the safe buffer. (basically return things back to the way they
* should be)
*/
void
sa1111_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
char *safe, *unsafe;
void *buf;
unsigned long flags;
struct safe_buffer *buf;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, (void *) dma_addr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
/* hack; usb-ohci.c never sends hwdev==NULL, all others do */
if (hwdev == NULL) {
return;
buf = find_safe_buffer(dma_addr);
if (buf) {
BUG_ON(buf->size != size);
BUG_ON(buf->direction != direction);
DPRINTK("%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
__func__,
buf->ptr, (void *) virt_to_bus(buf->ptr),
buf->safe, (void *) buf->safe_dma_addr);
if ((direction == PCI_DMA_FROMDEVICE) ||
(direction == PCI_DMA_BIDIRECTIONAL)) {
DPRINTK("%s: copy back from safe %p, to unsafe %p size %d\n",
__func__, buf->safe, buf->ptr, size);
memcpy(buf->ptr, buf->safe, size);
}
free_safe_buffer(buf);
}
mapped_alloc_size -= size;
local_irq_restore(flags);
}
if (0) printk("pci_unmap_single(hwdev=%p,ptr=%p,size=%d,dir=%x) "
"alloced=%ld\n",
hwdev, (void *)dma_addr, size, direction,
mapped_alloc_size);
int
sa1111_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
BUG(); /* Not implemented. */
}
if ((safe = find_safe_buffer((void *)dma_addr, &unsafe))) {
if (0) printk("copyback unsafe %p, safe %p, size %d\n",
unsafe, safe, size);
void
sa1111_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
int direction)
{
BUG(); /* Not implemented. */
}
consistent_sync(safe, size, PCI_DMA_FROMDEVICE);
memcpy(unsafe, safe, size);
free_safe_buffer(safe);
void
sa1111_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
unsigned long flags;
struct safe_buffer *buf;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, (void *) dma_addr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
local_irq_save(flags);
buf = find_safe_buffer(dma_addr);
if (buf) {
BUG_ON(buf->size != size);
BUG_ON(buf->direction != direction);
DPRINTK("%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n",
__func__,
buf->ptr, (void *) virt_to_bus(buf->ptr),
buf->safe, (void *) buf->safe_dma_addr);
switch (direction) {
case PCI_DMA_FROMDEVICE:
DPRINTK("%s: copy back from safe %p, to unsafe %p size %d\n",
__func__, buf->safe, buf->ptr, size);
memcpy(buf->ptr, buf->safe, size);
break;
case PCI_DMA_TODEVICE:
DPRINTK("%s: copy out from unsafe %p, to safe %p, size %d\n",
__func__,buf->ptr, buf->safe, size);
memcpy(buf->safe, buf->ptr, size);
break;
case PCI_DMA_BIDIRECTIONAL:
BUG(); /* is this allowed? what does it mean? */
default:
BUG();
}
consistent_sync(buf->safe, size, direction);
} else {
/* assume this is normal memory */
buf = bus_to_virt(dma_addr);
consistent_sync(buf, size, PCI_DMA_FROMDEVICE);
consistent_sync(bus_to_virt(dma_addr), size, direction);
}
local_irq_restore(flags);
}
void
sa1111_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nelems, int direction)
{
BUG(); /* Not implemented. */
}
EXPORT_SYMBOL(sa1111_map_single);
EXPORT_SYMBOL(sa1111_unmap_single);
EXPORT_SYMBOL(sa1111_map_sg);
EXPORT_SYMBOL(sa1111_unmap_sg);
EXPORT_SYMBOL(sa1111_dma_sync_single);
EXPORT_SYMBOL(sa1111_dma_sync_sg);
/* **************************************** */
static int __init sa1111_init_safe_buffers(void)
static int __init sa1111_pcibuf_init(void)
{
printk("Initializing SA1111 buffer pool for DMA workaround\n");
init_safe_buffers(NULL);
return 0;
int ret;
printk(KERN_DEBUG
"sa1111_pcibuf: initializing SA-1111 DMA workaround\n");
ret = create_safe_buffer_pools();
return ret;
}
module_init(sa1111_pcibuf_init);
static void free_safe_buffers(void)
static void __exit sa1111_pcibuf_exit(void)
{
pci_pool_destroy(small_buffer_cache);
pci_pool_destroy(large_buffer_cache);
BUG_ON(!list_empty(&safe_buffers));
destroy_safe_buffer_pools();
}
module_exit(sa1111_pcibuf_exit);
module_init(sa1111_init_safe_buffers);
module_exit(free_safe_buffers);
MODULE_AUTHOR("Christopher Hoover <ch@hpl.hp.com>");
MODULE_DESCRIPTION("Special pci_{map/unmap/dma_sync}_* routines for SA-1111.");
MODULE_LICENSE("GPL");
......@@ -131,7 +131,7 @@ static int __init cs3_init(void)
return 0;
}
__initcall(cs3_init);
arch_initcall(cs3_init);
#endif // CONFIG_PROC_FS
......
......@@ -429,7 +429,7 @@ static int __init system3_init(void)
/**********************************************************************
* kernel magic macros
*/
__initcall(system3_init);
arch_initcall(system3_init);
MACHINE_START(PT_SYSTEM3, "PT System 3")
BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000)
......
......@@ -54,7 +54,7 @@ static int __init xp860_init(void)
return 0;
}
__initcall(xp860_init);
arch_initcall(xp860_init);
static struct map_desc xp860_io_desc[] __initdata = {
/* virtual physical length type */
......
......@@ -65,7 +65,7 @@ static int __init yopy_hw_init(void)
return 0;
}
__initcall(yopy_hw_init);
arch_initcall(yopy_hw_init);
static struct map_desc yopy_io_desc[] __initdata = {
......
......@@ -21,9 +21,9 @@ ENTRY(v4t_late_abort)
tst r3, #PSR_T_BIT @ check for thumb mode
mrc p15, 0, r1, c5, c0, 0 @ get FSR
mrc p15, 0, r0, c6, c0, 0 @ get FAR
bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR
ldreq r8, [r2] @ read arm instruction
bne .data_thumb_abort
ldr r8, [r2] @ read arm instruction
bic r1, r1, #1 << 11 | 1 << 10 @ clear bits 11 and 10 of FSR
tst r8, #1 << 20 @ L = 1 -> write?
orreq r1, r1, #1 << 11 @ yes.
and r7, r8, #15 << 24
......@@ -203,7 +203,7 @@ ENTRY(v4t_late_abort)
ldr r7, [sp, #13 << 2]
tst r8, #1 << 11
addne r7, r7, r6, lsl #2 @ increment SP if PUSH
subeq r7, r7, r6, lsr #2 @ decrement SP if POP
subeq r7, r7, r6, lsl #2 @ decrement SP if POP
str r7, [sp, #13 << 2]
mov pc, lr
......
......@@ -611,4 +611,4 @@ static int __init alignment_init(void)
return 0;
}
__initcall(alignment_init);
fs_initcall(alignment_init);
......@@ -98,7 +98,8 @@ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handl
{
int gfp = GFP_KERNEL;
if (hwdev == NULL || hwdev->dma_mask != 0xffffffff)
if (hwdev == NULL || dev_is_sa1111(hwdev) ||
hwdev->dma_mask != 0xffffffff)
gfp |= GFP_DMA;
return consistent_alloc(gfp, size, handle);
......
......@@ -65,4 +65,4 @@ static int __init minicache_init(void)
return 0;
}
__initcall(minicache_init);
core_initcall(minicache_init);
......@@ -73,8 +73,6 @@ nwfpe_enter:
mov r4, lr @ save the failure-return addresses
mov sl, sp
bl FPA11_CheckInit @ check to see if we are initialised
ldr r5, [sp, #60] @ get contents of PC;
sub r8, r5, #4
.Lx2: ldrt r0, [r8] @ get actual instruction into r0
......
......@@ -66,7 +66,6 @@ several floating point instructions. */
.globl nwfpe_enter
nwfpe_enter:
mov sl, sp
bl FPA11_CheckInit @ check to see if we are initialised
ldr r5, [sp, #60] @ get contents of PC
bic r5, r5, #0xfc000003
......
......@@ -34,7 +34,7 @@ unsigned int EmulateCPDT(const unsigned int);
unsigned int EmulateCPRT(const unsigned int);
/* Reset the FPA11 chip. Called to initialize and reset the emulator. */
void resetFPA11(void)
static void resetFPA11(void)
{
int i;
FPA11 *fpa11 = GET_FPA11();
......@@ -126,16 +126,14 @@ void SetRoundingPrecision(const unsigned int opcode)
}
}
void FPA11_CheckInit(void)
void nwfpe_init(union fp_state *fp)
{
FPA11 *fpa11 = GET_FPA11();
if (unlikely(fpa11->initflag == 0))
{
FPA11 *fpa11 = (FPA11 *)fp;
memset(fpa11, 0, sizeof(FPA11));
resetFPA11();
SetRoundingMode(ROUND_TO_NEAREST);
SetRoundingPrecision(ROUND_EXTENDED);
fpa11->initflag = 1;
}
}
/* Emulate the instruction in the opcode. */
......
......@@ -80,8 +80,8 @@ typedef struct tagFPA11 {
initialised. */
} FPA11;
extern void resetFPA11(void);
extern void SetRoundingMode(const unsigned int);
extern void SetRoundingPrecision(const unsigned int);
extern void nwfpe_init(union fp_state *fp);
#endif
......@@ -42,10 +42,8 @@
#include "fpa11.inl"
/* kernel symbols required for signal handling */
typedef struct task_struct* PTASK;
#ifdef MODULE
void fp_send_sig(unsigned long sig, PTASK p, int priv);
void fp_send_sig(unsigned long sig, struct task_struct *p, int priv);
#if LINUX_VERSION_CODE > 0x20115
MODULE_AUTHOR("Scott Bambrough <scottb@rebel.com>");
MODULE_DESCRIPTION("NWFPE floating point emulator");
......@@ -63,9 +61,11 @@ void fp_setup(void);
/* external declarations for saved kernel symbols */
extern void (*kern_fp_enter)(void);
extern void (*fp_init)(union fp_state *);
/* Original value of fp_enter from kernel before patched by fpe_init. */
static void (*orig_fp_enter)(void);
static void (*orig_fp_init)(union fp_state *);
/* forward declarations */
extern void nwfpe_enter(void);
......@@ -108,7 +108,9 @@ static int __init fpe_init(void)
/* Save pointer to the old FP handler and then patch ourselves in */
orig_fp_enter = kern_fp_enter;
orig_fp_init = fp_init;
kern_fp_enter = nwfpe_enter;
fp_init = nwfpe_init;
return 0;
}
......@@ -117,6 +119,7 @@ static void __exit fpe_exit(void)
{
/* Restore the values we saved earlier. */
kern_fp_enter = orig_fp_enter;
fp_init = orig_fp_init;
}
/*
......
......@@ -52,6 +52,4 @@
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(x) 0
#endif
......@@ -31,6 +31,4 @@
#define __virt_to_bus__is_a_macro
#define __bus_to_virt__is_a_macro
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -50,6 +50,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -46,6 +46,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -90,8 +90,6 @@
* memory bank. For those systems, simply undefine CONFIG_DISCONTIGMEM.
*/
#ifdef CONFIG_ARCH_EDB7211
#ifdef CONFIG_DISCONTIGMEM
/*
* Because of the wide memory address space between physical RAM banks on the
......@@ -155,11 +153,5 @@
#endif /* CONFIG_DISCONTIGMEM */
#endif /* CONFIG_ARCH_EDB7211 */
#ifndef PFN_TO_NID
#define PFN_TO_NID(pfn) (0)
#endif
#endif
......@@ -48,6 +48,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -80,6 +80,4 @@ extern unsigned long __bus_to_virt(unsigned long);
#define __phys_to_virt__is_a_macro
#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -38,8 +38,6 @@
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL)
#define PHYS_TO_NID(addr) (0)
/*
* On epxa10, the dram is contiguous
*/
......
......@@ -58,6 +58,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) (x - INTEGRATOR_HDR0_SDRAM_BASE + PAGE_OFFSET)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -49,8 +49,6 @@
#define __virt_to_bus(x) (((__virt_to_phys(x)) & ~(*IOP310_SIATVR)) | ((*IOP310_SIABAR) & 0xfffffff0))
#define __bus_to_virt(x) (__phys_to_virt(((x) & ~(*IOP310_SIALR)) | ( *IOP310_SIATVR)))
#define PHYS_TO_NID(x) 0
/* boot mem allocate global pointer for MU circular queues QBAR */
#ifdef CONFIG_IOP310_MU
extern void *mu_mem;
......
......@@ -47,6 +47,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -43,6 +43,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -19,9 +19,10 @@
/* comment out following if you have a rev01 board */
#define PXA_IDP_REV02 1
//#undef PXA_IDP_REV02
#ifdef PXA_IDP_REV02
//Use this as well for 0017-x004 and greater pcb's:
#define PXA_IDP_REV04 1
#define IDP_FLASH_PHYS (PXA_CS0_PHYS)
#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS)
......@@ -38,6 +39,7 @@
#define IDP_IDE_BASE (0xf0000000)
#define IDP_IDE_SIZE (1*1024*1024)
#define IDE_REG_STRIDE 4
#define IDP_ETH_BASE (IDP_IDE_BASE + IDP_IDE_SIZE)
#define IDP_ETH_SIZE (1*1024*1024)
......@@ -111,6 +113,33 @@
* Bit masks for various registers
*/
// IDP_CPLD_PCCARD_PWR
#define PCC0_PWR0 (1 << 0)
#define PCC0_PWR1 (1 << 1)
#define PCC0_PWR2 (1 << 2)
#define PCC0_PWR3 (1 << 3)
#define PCC1_PWR0 (1 << 4)
#define PCC1_PWR1 (1 << 5)
#define PCC1_PWR2 (1 << 6)
#define PCC1_PWR3 (1 << 7)
// IDP_CPLD_PCCARD_EN
#define PCC0_RESET (1 << 6)
#define PCC1_RESET (1 << 7)
#define PCC0_ENABLE (1 << 0)
#define PCC1_ENABLE (1 << 1)
// IDP_CPLD_PCCARDx_STATUS
#define _PCC_WRPROT (1 << 7) // 7-4 read as low true
#define _PCC_RESET (1 << 6)
#define _PCC_IRQ (1 << 5)
#define _PCC_INPACK (1 << 4)
#define PCC_BVD2 (1 << 3)
#define PCC_BVD1 (1 << 2)
#define PCC_VS2 (1 << 1)
#define PCC_VS1 (1 << 0)
#define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x)))
/*
* Macros for LCD Driver
......@@ -129,6 +158,32 @@
#endif
/* A listing of interrupts used by external hardware devices */
#ifdef PXA_IDP_REV04
#define TOUCH_PANEL_IRQ IRQ_GPIO(5)
#define IDE_IRQ IRQ_GPIO(21)
#else
#define TOUCH_PANEL_IRQ IRQ_GPIO(21)
#define IDE_IRQ IRQ_GPIO(5)
#endif
#define TOUCH_PANEL_IRQ_EDGE IRQT_FALLING
#define ETHERNET_IRQ IRQ_GPIO(4)
#define ETHERNET_IRQ_EDGE IRQT_RISING
#define IDE_IRQ_EDGE IRQT_RISING
#define PCMCIA_S0_CD_VALID IRQ_GPIO(7)
#define PCMCIA_S0_CD_VALID_EDGE IRQT_BOTHEDGE
#define PCMCIA_S1_CD_VALID IRQ_GPIO(8)
#define PCMCIA_S1_CD_VALID_EDGE IRQT_BOTHEDGE
#define PCMCIA_S0_RDYINT IRQ_GPIO(19)
#define PCMCIA_S1_RDYINT IRQ_GPIO(22)
/*
* Macros for LED Driver
......@@ -173,14 +228,6 @@
inputs = (IDP_CPLD_KB_ROW & 0x7f);\
}
/* A listing of interrupts used by external hardware devices */
#define TOUCH_PANEL_IRQ IRQ_GPIO(21)
#define TOUCH_PANEL_IRQ_EGDE GPIO_FALLING_EDGE
#define ETHERNET_IRQ IRQ_GPIO(4)
#define ETHERNET_IRQ_EDGE GPIO_RISING_EDGE
#else
/*
......@@ -286,7 +333,7 @@ extern unsigned int idp_control_port_shadow;
#define WRITE_IDP_CPLD_LED_CONTROL(value, mask) \
{\
idp_cpld_led_control_shadow = ((value & mask) | (idp_cpld_led_control_shadow & ~mask));\
idp_cpld_led_control_shadow = (((value & mask) | (idp_cpld_led_control_shadow & ~mask)));\
IDP_CPLD_LED_CONTROL = idp_cpld_led_control_shadow;\
}
#define WRITE_IDP_CPLD_PERIPH_PWR(value, mask) \
......@@ -346,10 +393,10 @@ extern unsigned int idp_control_port_shadow;
/* A listing of interrupts used by external hardware devices */
#define TOUCH_PANEL_IRQ IRQ_GPIO(21)
#define TOUCH_PANEL_IRQ_EGDE GPIO_FALLING_EDGE
#define TOUCH_PANEL_IRQ_EGDE IRQT_FALLING
#define ETHERNET_IRQ IRQ_GPIO(4)
#define ETHERNET_IRQ_EDGE GPIO_RISING_EDGE
#define ETHERNET_IRQ_EDGE IRQT_RISING
/*
* Bit masks for various registers
......
......@@ -34,7 +34,6 @@
* Physical DRAM offset.
*/
#define PHYS_OFFSET (0xa0000000UL)
#define PHYS_TO_NID(addr) (0)
/*
* physical vs virtual ram conversion
......
......@@ -50,6 +50,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -40,6 +40,4 @@
#define isa_virt_to_bus virt_to_bus
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -41,6 +41,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define PHYS_TO_NID(addr) (0)
#endif
......@@ -53,7 +53,6 @@ typedef struct { void *null; } elf_fpregset_t;
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */
extern unsigned int elf_hwcap;
#define ELF_HWCAP (elf_hwcap)
/* This yields a string that ld.so will use to load implementation
......
......@@ -611,10 +611,13 @@ struct sa1111_device {
extern struct sa1111_device *sa1111;
int sa1111_check_dma_bug(dma_addr_t addr);
/*
* These frob the SKPCR register.
*/
void sa1111_enable_device(unsigned int mask);
void sa1111_disable_device(unsigned int mask);
#endif /* _ASM_ARCH_SA1111 */
/*
* linux/include/asm-arm/mach/amba_kmi.h
*
* Copyright (C) 2000 Deep Blue Solutions Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
struct kmi_info {
u_int base;
u_int irq;
u_char divisor;
u_char type;
u_char state;
u_char prev_rx;
u_char last_tx;
u_char resend_count;
u_short res;
u_char present;
wait_queue_head_t wait_q;
void (*rx)(struct kmi_info *, u_int val,
struct pt_regs *regs);
char name[8];
};
#define KMI_KEYBOARD 0
#define KMI_MOUSE 1
int register_kmi(struct kmi_info *kmi);
......@@ -74,6 +74,8 @@ static inline void *phys_to_virt(unsigned long x)
#define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
#define virt_addr_valid(kaddr) ((kaddr) >= PAGE_OFFSET && (kaddr) < (unsigned long)high_memory)
#define PHYS_TO_NID(addr) (0)
#else
/*
* This is more complex. We have a set of mem_map arrays spread
......
......@@ -34,13 +34,17 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
/*
* This is the actual mm switch as far as the scheduler
* is concerned. No registers are touched.
* is concerned. No registers are touched. We avoid
* calling the CPU specific function when the mm hasn't
* actually changed.
*/
static inline void
switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk, unsigned int cpu)
{
if (prev != next) {
cpu_switch_mm(next->pgd, next);
}
}
static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
......
......@@ -12,6 +12,34 @@
struct pci_dev;
/*
* For SA-1111 these functions are "magic" and utilize bounce
* buffers as need to workaround SA-1111 DMA bugs. They are called in
* place of their pci_* counterparts when dev_is_sa1111() returns true.
*/
dma_addr_t sa1111_map_single(struct pci_dev *, void *, size_t, int);
void sa1111_unmap_single(struct pci_dev *, dma_addr_t, size_t, int);
int sa1111_map_sg(struct pci_dev *, struct scatterlist *, int, int);
void sa1111_unmap_sg(struct pci_dev *, struct scatterlist *, int, int);
void sa1111_dma_sync_single(struct pci_dev *, dma_addr_t, size_t, int);
void sa1111_dma_sync_sg(struct pci_dev *, struct scatterlist *, int, int);
#ifdef CONFIG_SA1111
#define SA1111_FAKE_PCIDEV ((struct pci_dev *) 1111)
static inline int dev_is_sa1111(const struct pci_dev *dev)
{
return (dev == SA1111_FAKE_PCIDEV);
}
#else
static inline int dev_is_sa1111(const struct pci_dev *dev) { return 0; }
#endif
static inline void pcibios_set_master(struct pci_dev *dev)
{
/* No special bus mastering setup handling */
......@@ -61,17 +89,9 @@ pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr,
static inline dma_addr_t
pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
#ifdef CONFIG_SA1111
extern dma_addr_t sa1111_map_single(struct pci_dev *, void *, size_t, int);
/*
* for SA1111 these functions are "magic" and relocate buffers. We
* only need to do these if hwdev is non-null; otherwise we expect
* the buffer to already be suitable for DMA.
*/
if (hwdev != NULL)
if (dev_is_sa1111(hwdev))
return sa1111_map_single(hwdev, ptr, size, direction);
#endif
consistent_sync(ptr, size, direction);
return virt_to_bus(ptr);
}
......@@ -86,12 +106,9 @@ pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
static inline void
pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction)
{
#ifdef CONFIG_SA1111
extern void sa1111_unmap_single(struct pci_dev *, dma_addr_t, size_t, int);
if (hwdev != NULL)
if (dev_is_sa1111(hwdev))
sa1111_unmap_single(hwdev, dma_addr, size, direction);
#endif
/* nothing to do */
}
......@@ -99,7 +116,7 @@ pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int di
* Whether pci_unmap_{single,page} is a nop depends upon the
* configuration.
*/
#ifdef CONFIG_PCI
#if defined(CONFIG_PCI) || defined(CONFIG_SA1111)
#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME;
#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME;
#define pci_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME)
......@@ -135,6 +152,9 @@ pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int directi
{
int i;
if (dev_is_sa1111(hwdev))
return sa1111_map_sg(hwdev, sg, nents, direction);
for (i = 0; i < nents; i++, sg++) {
char *virt;
......@@ -153,6 +173,11 @@ pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int directi
static inline void
pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction)
{
if (dev_is_sa1111(hwdev)) {
sa1111_unmap_sg(hwdev, sg, nents, direction);
return;
}
/* nothing to do */
}
......@@ -168,6 +193,11 @@ pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direc
static inline void
pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction)
{
if (dev_is_sa1111(hwdev)) {
sa1111_dma_sync_single(hwdev, dma_handle, size, direction);
return;
}
consistent_sync(bus_to_virt(dma_handle), size, direction);
}
......@@ -182,6 +212,11 @@ pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int d
{
int i;
if (dev_is_sa1111(hwdev)) {
sa1111_dma_sync_sg(hwdev, sg, nelems, direction);
return;
}
for (i = 0; i < nelems; i++, sg++) {
char *virt = page_address(sg->page) + sg->offset;
consistent_sync(virt, sg->length, direction);
......@@ -204,6 +239,19 @@ static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
/* Return the index of the PCI controller for device PDEV. */
#define pci_controller_num(PDEV) (0)
#if defined(CONFIG_SA1111) && !defined(CONFIG_PCI)
/* SA-1111 needs these prototypes even when !defined(CONFIG_PCI) */
/* kmem_cache style wrapper around pci_alloc_consistent() */
struct pci_pool *pci_pool_create (const char *name, struct pci_dev *dev,
size_t size, size_t align, size_t allocation, int flags);
void pci_pool_destroy (struct pci_pool *pool);
void *pci_pool_alloc (struct pci_pool *pool, int flags, dma_addr_t *handle);
void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
#endif
#endif /* __KERNEL__ */
#endif
......@@ -6,10 +6,14 @@
#ifdef __KERNEL__
/* 32-bit code is always OK. Some cpus can do 26-bit, some can't. */
/*
* 32-bit code is always OK. Some cpus can do 26-bit, some can't.
*/
#define ELF_PROC_OK(x) \
((! ((x)->e_flags & EF_ARM_APCS26)) \
|| (elf_hwcap & HWCAP_26BIT))
(( (elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 1) == 1) || \
(!(elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 3) == 0) || \
( (elf_hwcap & HWCAP_26BIT) && (x)->e_flags & EF_ARM_APCS26) || \
((x)->e_flags & EF_ARM_APCS26) == 0)
/* Old NetWinder binaries were compiled in such a way that the iBCS
heuristic always trips on them. Until these binaries become uncommon
......
......@@ -36,7 +36,9 @@
regs->ARM_cpsr = USR_MODE; \
else \
regs->ARM_cpsr = USR26_MODE; \
regs->ARM_pc = pc; /* pc */ \
if (elf_hwcap & HWCAP_THUMB && pc & 1) \
regs->ARM_cpsr |= PSR_T_BIT; \
regs->ARM_pc = pc & ~1; /* pc */ \
regs->ARM_sp = sp; /* sp */ \
regs->ARM_r2 = stack[2]; /* r2 (envp) */ \
regs->ARM_r1 = stack[1]; /* r1 (argv) */ \
......
......@@ -25,6 +25,7 @@
#include <asm/atomic.h>
#include <asm/ptrace.h>
#include <asm/procinfo.h>
#include <asm/arch/memory.h>
#include <asm/proc/processor.h>
......
......@@ -46,6 +46,8 @@ struct proc_info_list {
struct cpu_user_fns *user;
};
extern unsigned int elf_hwcap;
#endif /* __ASSEMBLY__ */
#define PROC_INFO_SZ 44
......
......@@ -15,7 +15,11 @@
#include <linux/linkage.h>
#if defined(__thumb__)
#define __NR_SYSCALL_BASE 0
#else
#define __NR_SYSCALL_BASE 0x900000
#endif
/*
* This file contains the system call numbers.
......@@ -273,8 +277,16 @@
#define __sys1(x) __sys2(x)
#ifndef __syscall
#if defined(__thumb__)
#define __syscall(name) \
"push {r7}\n\t" \
"mov r7, #" __sys1(__NR_##name) "\n\t" \
"swi 0\n\t" \
"pop {r7}"
#else
#define __syscall(name) "swi\t" __sys1(__NR_##name) "\n\t"
#endif
#endif
#define __syscall_return(type, res) \
do { \
......@@ -287,90 +299,102 @@ do { \
#define _syscall0(type,name) \
type name(void) { \
long __res; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
__syscall(name) \
"mov %0,r0" \
:"=r" (__res) : : "r0","lr"); \
:"=r" (__res) \
: \
: "lr"); \
__syscall_return(type,__res); \
}
#define _syscall1(type,name,type1,arg1) \
type name(type1 arg1) { \
long __res; \
register long __r0 __asm__("r0") = (long)arg1; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
"mov\tr0,%1\n\t" \
__syscall(name) \
"mov %0,r0" \
: "=r" (__res) \
: "r" ((long)(arg1)) \
: "r0","lr"); \
: "r" (__r0) \
: "lr"); \
__syscall_return(type,__res); \
}
#define _syscall2(type,name,type1,arg1,type2,arg2) \
type name(type1 arg1,type2 arg2) { \
long __res; \
register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
"mov\tr0,%1\n\t" \
"mov\tr1,%2\n\t" \
__syscall(name) \
"mov\t%0,r0" \
: "=r" (__res) \
: "r" ((long)(arg1)),"r" ((long)(arg2)) \
: "r0","r1","lr"); \
: "r" (__r0),"r" (__r1) \
: "lr"); \
__syscall_return(type,__res); \
}
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
type name(type1 arg1,type2 arg2,type3 arg3) { \
long __res; \
register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \
register long __r2 __asm__("r2") = (long)arg3; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
"mov\tr0,%1\n\t" \
"mov\tr1,%2\n\t" \
"mov\tr2,%3\n\t" \
__syscall(name) \
"mov\t%0,r0" \
: "=r" (__res) \
: "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)) \
: "r0","r1","r2","lr"); \
: "r" (__r0),"r" (__r1),"r" (__r2) \
: "lr"); \
__syscall_return(type,__res); \
}
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
long __res; \
register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \
register long __r2 __asm__("r2") = (long)arg3; \
register long __r3 __asm__("r3") = (long)arg4; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
"mov\tr0,%1\n\t" \
"mov\tr1,%2\n\t" \
"mov\tr2,%3\n\t" \
"mov\tr3,%4\n\t" \
__syscall(name) \
"mov\t%0,r0" \
: "=r" (__res) \
: "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)),"r" ((long)(arg4)) \
: "r0","r1","r2","r3","lr"); \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3) \
: "lr"); \
__syscall_return(type,__res); \
}
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \
long __res; \
register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \
register long __r2 __asm__("r2") = (long)arg3; \
register long __r3 __asm__("r3") = (long)arg4; \
register long __r4 __asm__("r4") = (long)arg5; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
__syscall(name) \
: "=r" (__res) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4) \
: "lr"); \
__syscall_return(type,__res); \
}
#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) { \
register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \
register long __r2 __asm__("r2") = (long)arg3; \
register long __r3 __asm__("r3") = (long)arg4; \
register long __r4 __asm__("r4") = (long)arg5; \
register long __r5 __asm__("r5") = (long)arg6; \
register long __res __asm__("r0"); \
__asm__ __volatile__ ( \
"mov\tr0,%1\n\t" \
"mov\tr1,%2\n\t" \
"mov\tr2,%3\n\t" \
"mov\tr3,%4\n\t" \
"mov\tr4,%5\n\t" \
__syscall(name) \
"mov\t%0,r0" \
: "=r" (__res) \
: "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)),"r" ((long)(arg4)), \
"r" ((long)(arg5)) \
: "r0","r1","r2","r3","r4","lr"); \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5) \
: "lr"); \
__syscall_return(type,__res); \
}
......
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