mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
This commit is contained in:
commit
e9d52234e3
522 files changed
+50102
-14668
No files matched your search
@@ -0,0 +1,168 @@
|
||||
README for MIPS AU1XXX IDE driver - Released 2005-07-15
|
||||
|
||||
ABOUT
|
||||
-----
|
||||
This file describes the 'drivers/ide/mips/au1xxx-ide.c', related files and the
|
||||
services they provide.
|
||||
|
||||
If you are short in patience and just want to know how to add your hard disc to
|
||||
the white or black list, go to the 'ADD NEW HARD DISC TO WHITE OR BLACK LIST'
|
||||
section.
|
||||
|
||||
|
||||
LICENSE
|
||||
-------
|
||||
|
||||
Copyright (c) 2003-2005 AMD, Personal Connectivity Solutions
|
||||
|
||||
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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
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.,
|
||||
675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE
|
||||
Interface and Linux Device Driver" Application Note.
|
||||
|
||||
|
||||
FILES, CONFIGS AND COMPATABILITY
|
||||
--------------------------------
|
||||
|
||||
Two files are introduced:
|
||||
|
||||
a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
|
||||
containes : struct _auide_hwif
|
||||
struct drive_list_entry dma_white_list
|
||||
struct drive_list_entry dma_black_list
|
||||
timing parameters for PIO mode 0/1/2/3/4
|
||||
timing parameters for MWDMA 0/1/2
|
||||
|
||||
b) 'drivers/ide/mips/au1xxx-ide.c'
|
||||
contains the functionality of the AU1XXX IDE driver
|
||||
|
||||
Four configs variables are introduced:
|
||||
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA
|
||||
controler
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size
|
||||
per descriptor
|
||||
|
||||
If MWDMA is enabled and the connected hard disc is not on the white list, the
|
||||
kernel switches to a "safe mwdma mode" at boot time. In this mode the IDE
|
||||
performance is substantial slower then in full speed mwdma. In this case
|
||||
please add your hard disc to the white list (follow instruction from 'ADD NEW
|
||||
HARD DISC TO WHITE OR BLACK LIST' section).
|
||||
|
||||
|
||||
SUPPORTED IDE MODES
|
||||
-------------------
|
||||
|
||||
The AU1XXX IDE driver supported all PIO modes - PIO mode 0/1/2/3/4 - and all
|
||||
MWDMA modes - MWDMA 0/1/2 -. There is no support for SWDMA and UDMA mode.
|
||||
|
||||
To change the PIO mode use the program hdparm with option -p, e.g.
|
||||
'hdparm -p0 [device]' for PIO mode 0. To enable the MWDMA mode use the option
|
||||
-X, e.g. 'hdparm -X32 [device]' for MWDMA mode 0.
|
||||
|
||||
|
||||
PERFORMANCE CONFIGURATIONS
|
||||
--------------------------
|
||||
|
||||
If the used system doesn't need USB support enable the following kernel configs:
|
||||
|
||||
CONFIG_IDE=y
|
||||
CONFIG_BLK_DEV_IDE=y
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEPCI=y
|
||||
CONFIG_BLK_DEV_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEDMA_PCI=y
|
||||
CONFIG_IDEDMA_PCI_AUTO=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
CONFIG_IDEDMA_AUTO=y
|
||||
|
||||
If the used system need the USB support enable the following kernel configs for
|
||||
high IDE to USB throughput.
|
||||
|
||||
CONFIG_BLK_DEV_IDEDISK=y
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEPCI=y
|
||||
CONFIG_BLK_DEV_GENERIC=y
|
||||
CONFIG_BLK_DEV_IDEDMA_PCI=y
|
||||
CONFIG_IDEDMA_PCI_AUTO=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA=y
|
||||
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ=128
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
CONFIG_IDEDMA_AUTO=y
|
||||
|
||||
|
||||
ADD NEW HARD DISC TO WHITE OR BLACK LIST
|
||||
----------------------------------------
|
||||
|
||||
Step 1 : detect the model name of your hard disc
|
||||
|
||||
a) connect your hard disc to the AU1XXX
|
||||
|
||||
b) boot your kernel and get the hard disc model.
|
||||
|
||||
Example boot log:
|
||||
|
||||
--snipped--
|
||||
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
|
||||
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
|
||||
Au1xxx IDE(builtin) configured for MWDMA2
|
||||
Probing IDE interface ide0...
|
||||
hda: Maxtor 6E040L0, ATA DISK drive
|
||||
ide0 at 0xac800000-0xac800007,0xac8001c0 on irq 64
|
||||
hda: max request size: 64KiB
|
||||
hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, (U)DMA
|
||||
--snipped--
|
||||
|
||||
In this example 'Maxtor 6E040L0'.
|
||||
|
||||
Step 2 : edit 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
|
||||
|
||||
Add your hard disc to the dma_white_list or dma_black_list structur.
|
||||
|
||||
Step 3 : Recompile the kernel
|
||||
|
||||
Enable MWDMA support in the kernel configuration. Recompile the kernel and
|
||||
reboot.
|
||||
|
||||
Step 4 : Tests
|
||||
|
||||
If you have add a hard disc to the white list, please run some stress tests
|
||||
for verification.
|
||||
|
||||
|
||||
ACKNOWLEDGMENTS
|
||||
---------------
|
||||
|
||||
These drivers wouldn't have been done without the base of kernel 2.4.x AU1XXX
|
||||
IDE driver from AMD.
|
||||
|
||||
Additional input also from:
|
||||
Matthias Lenk <matthias.lenk@amd.com>
|
||||
|
||||
Happy hacking!
|
||||
Enrico Walther <enrico.walther@amd.com>
|
||||
+1
-1
@@ -1643,7 +1643,7 @@ S: Maintained
|
||||
MIPS
|
||||
P: Ralf Baechle
|
||||
M: ralf@linux-mips.org
|
||||
W: http://oss.sgi.com/mips/mips-howto.html
|
||||
W: http://www.linux-mips.org/
|
||||
L: linux-mips@linux-mips.org
|
||||
S: Maintained
|
||||
|
||||
|
||||
+1424
-1354
File diff suppressed because it is too large.
Load diff
+112
-6
@@ -52,6 +52,21 @@ ifdef CONFIG_CROSSCOMPILE
|
||||
CROSS_COMPILE := $(tool-prefix)
|
||||
endif
|
||||
|
||||
CHECKFLAGS-y += -D__linux__ -D__mips__ \
|
||||
-D_ABIO32=1 \
|
||||
-D_ABIN32=2 \
|
||||
-D_ABI64=3
|
||||
CHECKFLAGS-$(CONFIG_32BIT) += -D_MIPS_SIM=_ABIO32 \
|
||||
-D_MIPS_SZLONG=32 \
|
||||
-D__PTRDIFF_TYPE__=int
|
||||
CHECKFLAGS-$(CONFIG_64BIT) += -m64 -D_MIPS_SIM=_ABI64 \
|
||||
-D_MIPS_SZLONG=64 \
|
||||
-D__PTRDIFF_TYPE__="long int"
|
||||
CHECKFLAGS-$(CONFIG_CPU_BIG_ENDIAN) += -D__MIPSEB__
|
||||
CHECKFLAGS-$(CONFIG_CPU_LITTLE_ENDIAN) += -D__MIPSEL__
|
||||
|
||||
CHECKFLAGS = $(CHECKFLAGS-y)
|
||||
|
||||
ifdef CONFIG_BUILD_ELF64
|
||||
gas-abi = 64
|
||||
ld-emul = $(64bit-emul)
|
||||
@@ -79,9 +94,18 @@ endif
|
||||
cflags-y += -I $(TOPDIR)/include/asm/gcc
|
||||
cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
|
||||
cflags-y += $(call cc-option, -finline-limit=100000)
|
||||
LDFLAGS_vmlinux += -G 0 -static -n
|
||||
LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
|
||||
MODFLAGS += -mlong-calls
|
||||
|
||||
#
|
||||
# We explicitly add the endianness specifier if needed, this allows
|
||||
# to compile kernels with a toolchain for the other endianness. We
|
||||
# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
|
||||
# when fed the toolchain default!
|
||||
#
|
||||
cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB)
|
||||
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL)
|
||||
|
||||
cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer
|
||||
|
||||
#
|
||||
@@ -167,14 +191,22 @@ cflags-$(CONFIG_CPU_TX49XX) += \
|
||||
$(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
|
||||
-Wa,--trap
|
||||
|
||||
cflags-$(CONFIG_CPU_MIPS32) += \
|
||||
cflags-$(CONFIG_CPU_MIPS32_R1) += \
|
||||
$(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \
|
||||
-Wa,--trap
|
||||
|
||||
cflags-$(CONFIG_CPU_MIPS64) += \
|
||||
cflags-$(CONFIG_CPU_MIPS32_R2) += \
|
||||
$(call set_gccflags,mips32r2,mips32r2,r4600,mips3,mips2) \
|
||||
-Wa,--trap
|
||||
|
||||
cflags-$(CONFIG_CPU_MIPS64_R1) += \
|
||||
$(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \
|
||||
-Wa,--trap
|
||||
|
||||
cflags-$(CONFIG_CPU_MIPS64_R2) += \
|
||||
$(call set_gccflags,mips64r2,mips64r2,r4600,mips3,mips2) \
|
||||
-Wa,--trap
|
||||
|
||||
cflags-$(CONFIG_CPU_R5000) += \
|
||||
$(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \
|
||||
-Wa,--trap
|
||||
@@ -196,6 +228,7 @@ cflags-$(CONFIG_CPU_RM9000) += \
|
||||
$(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \
|
||||
-Wa,--trap
|
||||
|
||||
|
||||
cflags-$(CONFIG_CPU_SB1) += \
|
||||
$(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \
|
||||
-Wa,--trap
|
||||
@@ -265,6 +298,13 @@ libs-$(CONFIG_MIPS_PB1550) += arch/mips/au1000/pb1550/
|
||||
cflags-$(CONFIG_MIPS_PB1550) += -Iinclude/asm-mips/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1200 eval board
|
||||
#
|
||||
libs-$(CONFIG_MIPS_PB1200) += arch/mips/au1000/pb1200/
|
||||
cflags-$(CONFIG_MIPS_PB1200) += -Iinclude/asm-mips/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1200) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1000 eval board
|
||||
#
|
||||
@@ -293,6 +333,13 @@ libs-$(CONFIG_MIPS_DB1550) += arch/mips/au1000/db1x00/
|
||||
cflags-$(CONFIG_MIPS_DB1550) += -Iinclude/asm-mips/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1200 eval board
|
||||
#
|
||||
libs-$(CONFIG_MIPS_DB1200) += arch/mips/au1000/pb1200/
|
||||
cflags-$(CONFIG_MIPS_DB1200) += -Iinclude/asm-mips/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Bosporus eval board
|
||||
#
|
||||
@@ -323,6 +370,7 @@ load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
|
||||
# Cobalt Server
|
||||
#
|
||||
core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
|
||||
cflags-$(CONFIG_MIPS_COBALT) += -Iinclude/asm-mips/cobalt
|
||||
load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
|
||||
|
||||
#
|
||||
@@ -388,6 +436,13 @@ load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
|
||||
core-$(CONFIG_MIPS_SEAD) += arch/mips/mips-boards/sead/
|
||||
load-$(CONFIG_MIPS_SEAD) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# MIPS SIM
|
||||
#
|
||||
core-$(CONFIG_MIPS_SIM) += arch/mips/mips-boards/sim/
|
||||
cflags-$(CONFIG_MIPS_SIM) += -Iinclude/asm-mips/mach-sim
|
||||
load-$(CONFIG_MIPS_SIM) += 0x80100000
|
||||
|
||||
#
|
||||
# Momentum Ocelot board
|
||||
#
|
||||
@@ -513,6 +568,19 @@ load-$(CONFIG_CASIO_E55) += 0xffffffff80004000
|
||||
#
|
||||
load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000
|
||||
|
||||
#
|
||||
# Common Philips PNX8550
|
||||
#
|
||||
core-$(CONFIG_SOC_PNX8550) += arch/mips/philips/pnx8550/common/
|
||||
cflags-$(CONFIG_SOC_PNX8550) += -Iinclude/asm-mips/mach-pnx8550
|
||||
|
||||
#
|
||||
# Philips PNX8550 JBS board
|
||||
#
|
||||
libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/
|
||||
#cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550
|
||||
load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000
|
||||
|
||||
#
|
||||
# SGI IP22 (Indy/Indigo2)
|
||||
#
|
||||
@@ -582,10 +650,20 @@ load-$(CONFIG_SGI_IP32) += 0xffffffff80004000
|
||||
# removed (as happens, even if they have __initcall/module_init)
|
||||
#
|
||||
core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/
|
||||
cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte
|
||||
cflags-$(CONFIG_SIBYTE_BCM112X) += -Iinclude/asm-mips/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
|
||||
|
||||
core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/
|
||||
cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte
|
||||
cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
|
||||
|
||||
core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/bcm1480/
|
||||
cflags-$(CONFIG_SIBYTE_BCM1x55) += -Iinclude/asm-mips/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
|
||||
|
||||
core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/bcm1480/
|
||||
cflags-$(CONFIG_SIBYTE_BCM1x80) += -Iinclude/asm-mips/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
|
||||
|
||||
#
|
||||
# Sibyte BCM91120x (Carmel) board
|
||||
@@ -593,6 +671,7 @@ cflags-$(CONFIG_SIBYTE_SB1250) += -Iinclude/asm-mips/mach-sibyte
|
||||
# Sibyte BCM91125C (CRhone) board
|
||||
# Sibyte BCM91125E (Rhone) board
|
||||
# Sibyte SWARM board
|
||||
# Sibyte BCM91x80 (BigSur) board
|
||||
#
|
||||
libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000
|
||||
@@ -606,6 +685,8 @@ libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000
|
||||
libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
|
||||
libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
|
||||
|
||||
#
|
||||
# SNI RM200 PCI
|
||||
@@ -629,6 +710,13 @@ core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/toshiba_rbtx4927/
|
||||
core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/tx4927/common/
|
||||
load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000
|
||||
|
||||
#
|
||||
# Toshiba RBTX4938 board
|
||||
#
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/toshiba_rbtx4938/
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
|
||||
load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
|
||||
|
||||
cflags-y += -Iinclude/asm-mips/mach-generic
|
||||
drivers-$(CONFIG_PCI) += arch/mips/pci/
|
||||
|
||||
@@ -701,10 +789,29 @@ ifdef CONFIG_BOOT_ELF64
|
||||
all: $(vmlinux-64)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MIPS_ATLAS
|
||||
all: vmlinux.srec
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MIPS_MALTA
|
||||
all: vmlinux.srec
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MIPS_SEAD
|
||||
all: vmlinux.srec
|
||||
endif
|
||||
|
||||
ifdef CONFIG_QEMU
|
||||
all: vmlinux.bin
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SNI_RM200_PCI
|
||||
all: vmlinux.ecoff
|
||||
endif
|
||||
|
||||
vmlinux.bin: $(vmlinux-32)
|
||||
+@$(call makeboot,$@)
|
||||
|
||||
vmlinux.ecoff vmlinux.rm200: $(vmlinux-32)
|
||||
+@$(call makeboot,$@)
|
||||
|
||||
@@ -720,7 +827,6 @@ archclean:
|
||||
@$(MAKE) $(clean)=arch/mips/boot
|
||||
@$(MAKE) $(clean)=arch/mips/lasat
|
||||
|
||||
|
||||
CLEAN_FILES += vmlinux.32 \
|
||||
vmlinux.64 \
|
||||
vmlinux.ecoff
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
lib-y += cmdline.o env.o file.o identify.o init.o \
|
||||
misc.o time.o tree.o
|
||||
misc.o salone.o time.o tree.o
|
||||
|
||||
lib-$(CONFIG_ARC_MEMORY) += memory.o
|
||||
lib-$(CONFIG_ARC_CONSOLE) += arc_con.o
|
||||
|
||||
@@ -44,6 +44,11 @@ static struct smatch mach_table[] = {
|
||||
MACH_GROUP_SGI,
|
||||
MACH_SGI_IP28,
|
||||
PROM_FLAG_ARCS
|
||||
}, { "SGI-IP30",
|
||||
"SGI Octane",
|
||||
MACH_GROUP_SGI,
|
||||
MACH_SGI_IP30,
|
||||
PROM_FLAG_ARCS
|
||||
}, { "SGI-IP32",
|
||||
"SGI O2",
|
||||
MACH_GROUP_SGI,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
obj-y += prom.o int-handler.o irq.o puts.o time.o reset.o \
|
||||
au1xxx_irqmap.o clocks.o platform.o power.o setup.o \
|
||||
sleeper.o cputable.o dma.o dbdma.o
|
||||
sleeper.o cputable.o dma.o dbdma.o gpio.o
|
||||
|
||||
obj-$(CONFIG_AU1X00_USB_DEVICE) += usbdev.o
|
||||
obj-$(CONFIG_KGDB) += dbg_io.o
|
||||
|
||||
@@ -173,14 +173,14 @@ au1xxx_irq_map_t au1xxx_ic0_map[] = {
|
||||
{ AU1550_PSC1_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
{ AU1550_PSC2_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
{ AU1550_PSC3_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
{ AU1550_TOY_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
|
||||
{ AU1550_RTC_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
|
||||
{ AU1000_RTC_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1550_NAND_INT, INTC_INT_RISE_EDGE, 0},
|
||||
{ AU1550_USB_DEV_REQ_INT, INTC_INT_HIGH_LEVEL, 0 },
|
||||
{ AU1550_USB_DEV_SUS_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
@@ -201,14 +201,14 @@ au1xxx_irq_map_t au1xxx_ic0_map[] = {
|
||||
{ AU1200_PSC1_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
{ AU1200_AES_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
{ AU1200_CAMERA_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
{ AU1200_TOY_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
|
||||
{ AU1200_RTC_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_TOY_MATCH2_INT, INTC_INT_RISE_EDGE, 1 },
|
||||
{ AU1000_RTC_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_RTC_MATCH0_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_RTC_MATCH1_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1000_RTC_MATCH2_INT, INTC_INT_RISE_EDGE, 0 },
|
||||
{ AU1200_NAND_INT, INTC_INT_RISE_EDGE, 0},
|
||||
{ AU1200_USB_INT, INTC_INT_HIGH_LEVEL, 0 },
|
||||
{ AU1200_LCD_INT, INTC_INT_HIGH_LEVEL, 0},
|
||||
|
||||
@@ -37,7 +37,8 @@ struct cpu_spec cpu_specs[] = {
|
||||
{ 0xffffffff, 0x02030203, "Au1100 BD", 0, 1 },
|
||||
{ 0xffffffff, 0x02030204, "Au1100 BE", 0, 1 },
|
||||
{ 0xffffffff, 0x03030200, "Au1550 AA", 0, 1 },
|
||||
{ 0xffffffff, 0x04030200, "Au1200 AA", 0, 1 },
|
||||
{ 0xffffffff, 0x04030200, "Au1200 AB", 0, 0 },
|
||||
{ 0xffffffff, 0x04030201, "Au1200 AC", 0, 1 },
|
||||
{ 0x00000000, 0x00000000, "Unknown Au1xxx", 1, 0 },
|
||||
};
|
||||
|
||||
|
||||
+236
-83
File diff suppressed because it is too large.
Load diff
@@ -39,7 +39,6 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
#include <asm/mach-au1x00/au1000_dma.h>
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* 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.,
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include <linux/config.h>
|
||||
#include <linux/module.h>
|
||||
#include <au1000.h>
|
||||
#include <au1xxx_gpio.h>
|
||||
|
||||
#define gpio1 sys
|
||||
#if !defined(CONFIG_SOC_AU1000)
|
||||
static AU1X00_GPIO2 * const gpio2 = (AU1X00_GPIO2 *)GPIO2_BASE;
|
||||
|
||||
#define GPIO2_OUTPUT_ENABLE_MASK 0x00010000
|
||||
|
||||
int au1xxx_gpio2_read(int signal)
|
||||
{
|
||||
signal -= 200;
|
||||
/* gpio2->dir &= ~(0x01 << signal); //Set GPIO to input */
|
||||
return ((gpio2->pinstate >> signal) & 0x01);
|
||||
}
|
||||
|
||||
void au1xxx_gpio2_write(int signal, int value)
|
||||
{
|
||||
signal -= 200;
|
||||
|
||||
gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << signal) |
|
||||
(value << signal);
|
||||
}
|
||||
|
||||
void au1xxx_gpio2_tristate(int signal)
|
||||
{
|
||||
signal -= 200;
|
||||
gpio2->dir &= ~(0x01 << signal); /* Set GPIO to input */
|
||||
}
|
||||
#endif
|
||||
|
||||
int au1xxx_gpio1_read(int signal)
|
||||
{
|
||||
/* gpio1->trioutclr |= (0x01 << signal); */
|
||||
return ((gpio1->pinstaterd >> signal) & 0x01);
|
||||
}
|
||||
|
||||
void au1xxx_gpio1_write(int signal, int value)
|
||||
{
|
||||
if(value)
|
||||
gpio1->outputset = (0x01 << signal);
|
||||
else
|
||||
gpio1->outputclr = (0x01 << signal); /* Output a Zero */
|
||||
}
|
||||
|
||||
void au1xxx_gpio1_tristate(int signal)
|
||||
{
|
||||
gpio1->trioutclr = (0x01 << signal); /* Tristate signal */
|
||||
}
|
||||
|
||||
|
||||
int au1xxx_gpio_read(int signal)
|
||||
{
|
||||
if(signal >= 200)
|
||||
#if defined(CONFIG_SOC_AU1000)
|
||||
return 0;
|
||||
#else
|
||||
return au1xxx_gpio2_read(signal);
|
||||
#endif
|
||||
else
|
||||
return au1xxx_gpio1_read(signal);
|
||||
}
|
||||
|
||||
void au1xxx_gpio_write(int signal, int value)
|
||||
{
|
||||
if(signal >= 200)
|
||||
#if defined(CONFIG_SOC_AU1000)
|
||||
;
|
||||
#else
|
||||
au1xxx_gpio2_write(signal, value);
|
||||
#endif
|
||||
else
|
||||
au1xxx_gpio1_write(signal, value);
|
||||
}
|
||||
|
||||
void au1xxx_gpio_tristate(int signal)
|
||||
{
|
||||
if(signal >= 200)
|
||||
#if defined(CONFIG_SOC_AU1000)
|
||||
;
|
||||
#else
|
||||
au1xxx_gpio2_tristate(signal);
|
||||
#endif
|
||||
else
|
||||
au1xxx_gpio1_tristate(signal);
|
||||
}
|
||||
|
||||
void au1xxx_gpio1_set_inputs(void)
|
||||
{
|
||||
gpio1->pininputen = 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(au1xxx_gpio1_set_inputs);
|
||||
EXPORT_SYMBOL(au1xxx_gpio_tristate);
|
||||
EXPORT_SYMBOL(au1xxx_gpio_write);
|
||||
EXPORT_SYMBOL(au1xxx_gpio_read);
|
||||
@@ -83,7 +83,7 @@ inline void local_disable_irq(unsigned int irq_nr);
|
||||
void (*board_init_irq)(void);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
extern void counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
|
||||
extern irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
|
||||
#endif
|
||||
|
||||
static DEFINE_SPINLOCK(irq_lock);
|
||||
@@ -253,52 +253,72 @@ void restore_local_and_enable(int controller, unsigned long mask)
|
||||
|
||||
|
||||
static struct hw_interrupt_type rise_edge_irq_type = {
|
||||
"Au1000 Rise Edge",
|
||||
startup_irq,
|
||||
shutdown_irq,
|
||||
local_enable_irq,
|
||||
local_disable_irq,
|
||||
mask_and_ack_rise_edge_irq,
|
||||
end_irq,
|
||||
NULL
|
||||
.typename = "Au1000 Rise Edge",
|
||||
.startup = startup_irq,
|
||||
.shutdown = shutdown_irq,
|
||||
.enable = local_enable_irq,
|
||||
.disable = local_disable_irq,
|
||||
.ack = mask_and_ack_rise_edge_irq,
|
||||
.end = end_irq,
|
||||
};
|
||||
|
||||
static struct hw_interrupt_type fall_edge_irq_type = {
|
||||
"Au1000 Fall Edge",
|
||||
startup_irq,
|
||||
shutdown_irq,
|
||||
local_enable_irq,
|
||||
local_disable_irq,
|
||||
mask_and_ack_fall_edge_irq,
|
||||
end_irq,
|
||||
NULL
|
||||
.typename = "Au1000 Fall Edge",
|
||||
.startup = startup_irq,
|
||||
.shutdown = shutdown_irq,
|
||||
.enable = local_enable_irq,
|
||||
.disable = local_disable_irq,
|
||||
.ack = mask_and_ack_fall_edge_irq,
|
||||
.end = end_irq,
|
||||
};
|
||||
|
||||
static struct hw_interrupt_type either_edge_irq_type = {
|
||||
"Au1000 Rise or Fall Edge",
|
||||
startup_irq,
|
||||
shutdown_irq,
|
||||
local_enable_irq,
|
||||
local_disable_irq,
|
||||
mask_and_ack_either_edge_irq,
|
||||
end_irq,
|
||||
NULL
|
||||
.typename = "Au1000 Rise or Fall Edge",
|
||||
.startup = startup_irq,
|
||||
.shutdown = shutdown_irq,
|
||||
.enable = local_enable_irq,
|
||||
.disable = local_disable_irq,
|
||||
.ack = mask_and_ack_either_edge_irq,
|
||||
.end = end_irq,
|
||||
};
|
||||
|
||||
static struct hw_interrupt_type level_irq_type = {
|
||||
"Au1000 Level",
|
||||
startup_irq,
|
||||
shutdown_irq,
|
||||
local_enable_irq,
|
||||
local_disable_irq,
|
||||
mask_and_ack_level_irq,
|
||||
end_irq,
|
||||
NULL
|
||||
.typename = "Au1000 Level",
|
||||
.startup = startup_irq,
|
||||
.shutdown = shutdown_irq,
|
||||
.enable = local_enable_irq,
|
||||
.disable = local_disable_irq,
|
||||
.ack = mask_and_ack_level_irq,
|
||||
.end = end_irq,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
void startup_match20_interrupt(void)
|
||||
void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_regs *))
|
||||
{
|
||||
struct irq_desc *desc = &irq_desc[AU1000_TOY_MATCH2_INT];
|
||||
|
||||
static struct irqaction action;
|
||||
memset(&action, 0, sizeof(struct irqaction));
|
||||
|
||||
/* This is a big problem.... since we didn't use request_irq
|
||||
* when kernel/irq.c calls probe_irq_xxx this interrupt will
|
||||
* be probed for usage. This will end up disabling the device :(
|
||||
* Give it a bogus "action" pointer -- this will keep it from
|
||||
* getting auto-probed!
|
||||
*
|
||||
* By setting the status to match that of request_irq() we
|
||||
* can avoid it. --cgray
|
||||
*/
|
||||
action.dev_id = handler;
|
||||
action.flags = SA_INTERRUPT;
|
||||
cpus_clear(action.mask);
|
||||
action.name = "Au1xxx TOY";
|
||||
action.handler = handler;
|
||||
action.next = NULL;
|
||||
|
||||
desc->action = &action;
|
||||
desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
|
||||
|
||||
local_enable_irq(AU1000_TOY_MATCH2_INT);
|
||||
}
|
||||
#endif
|
||||
@@ -426,7 +446,6 @@ void __init arch_init_irq(void)
|
||||
extern int au1xxx_ic0_nr_irqs;
|
||||
|
||||
cp0_status = read_c0_status();
|
||||
memset(irq_desc, 0, sizeof(irq_desc));
|
||||
set_except_vector(0, au1000_IRQ);
|
||||
|
||||
/* Initialize interrupt controllers to a safe state.
|
||||
@@ -492,7 +511,7 @@ void intc0_req0_irqdispatch(struct pt_regs *regs)
|
||||
intc0_req0 |= au_readl(IC0_REQ0INT);
|
||||
|
||||
if (!intc0_req0) return;
|
||||
|
||||
#ifdef AU1000_USB_DEV_REQ_INT
|
||||
/*
|
||||
* Because of the tight timing of SETUP token to reply
|
||||
* transactions, the USB devices-side packet complete
|
||||
@@ -503,7 +522,7 @@ void intc0_req0_irqdispatch(struct pt_regs *regs)
|
||||
do_IRQ(AU1000_USB_DEV_REQ_INT, regs);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
irq = au_ffs(intc0_req0) - 1;
|
||||
intc0_req0 &= ~(1<<irq);
|
||||
do_IRQ(irq, regs);
|
||||
@@ -521,17 +540,7 @@ void intc0_req1_irqdispatch(struct pt_regs *regs)
|
||||
|
||||
irq = au_ffs(intc0_req1) - 1;
|
||||
intc0_req1 &= ~(1<<irq);
|
||||
#ifdef CONFIG_PM
|
||||
if (irq == AU1000_TOY_MATCH2_INT) {
|
||||
mask_and_ack_rise_edge_irq(irq);
|
||||
counter0_irq(irq, NULL, regs);
|
||||
local_enable_irq(irq);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
do_IRQ(irq, regs);
|
||||
}
|
||||
do_IRQ(irq, regs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,15 @@
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
#include <linux/config.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/resource.h>
|
||||
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
#include <asm/mach-au1x00/au1xxx.h>
|
||||
|
||||
/* OHCI (USB full speed host controller) */
|
||||
static struct resource au1xxx_usb_ohci_resources[] = {
|
||||
[0] = {
|
||||
.start = USB_OHCI_BASE,
|
||||
@@ -41,8 +43,252 @@ static struct platform_device au1xxx_usb_ohci_device = {
|
||||
.resource = au1xxx_usb_ohci_resources,
|
||||
};
|
||||
|
||||
/*** AU1100 LCD controller ***/
|
||||
|
||||
#ifdef CONFIG_FB_AU1100
|
||||
static struct resource au1100_lcd_resources[] = {
|
||||
[0] = {
|
||||
.start = LCD_PHYS_ADDR,
|
||||
.end = LCD_PHYS_ADDR + 0x800 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1100_LCD_INT,
|
||||
.end = AU1100_LCD_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static u64 au1100_lcd_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1100_lcd_device = {
|
||||
.name = "au1100-lcd",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1100_lcd_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1100_lcd_resources),
|
||||
.resource = au1100_lcd_resources,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_AU1200
|
||||
/* EHCI (USB high speed host controller) */
|
||||
static struct resource au1xxx_usb_ehci_resources[] = {
|
||||
[0] = {
|
||||
.start = USB_EHCI_BASE,
|
||||
.end = USB_EHCI_BASE + USB_EHCI_LEN - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1000_USB_HOST_INT,
|
||||
.end = AU1000_USB_HOST_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 ehci_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1xxx_usb_ehci_device = {
|
||||
.name = "au1xxx-ehci",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ehci_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
|
||||
.resource = au1xxx_usb_ehci_resources,
|
||||
};
|
||||
|
||||
/* Au1200 UDC (USB gadget controller) */
|
||||
static struct resource au1xxx_usb_gdt_resources[] = {
|
||||
[0] = {
|
||||
.start = USB_UDC_BASE,
|
||||
.end = USB_UDC_BASE + USB_UDC_LEN - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1200_USB_INT,
|
||||
.end = AU1200_USB_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource au1xxx_mmc_resources[] = {
|
||||
[0] = {
|
||||
.start = SD0_PHYS_ADDR,
|
||||
.end = SD0_PHYS_ADDR + 0x40,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = SD1_PHYS_ADDR,
|
||||
.end = SD1_PHYS_ADDR + 0x40,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
.start = AU1200_SD_INT,
|
||||
.end = AU1200_SD_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static u64 udc_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1xxx_usb_gdt_device = {
|
||||
.name = "au1xxx-udc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &udc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
|
||||
.resource = au1xxx_usb_gdt_resources,
|
||||
};
|
||||
|
||||
/* Au1200 UOC (USB OTG controller) */
|
||||
static struct resource au1xxx_usb_otg_resources[] = {
|
||||
[0] = {
|
||||
.start = USB_UOC_BASE,
|
||||
.end = USB_UOC_BASE + USB_UOC_LEN - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1200_USB_INT,
|
||||
.end = AU1200_USB_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 uoc_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1xxx_usb_otg_device = {
|
||||
.name = "au1xxx-uoc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &uoc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
|
||||
.resource = au1xxx_usb_otg_resources,
|
||||
};
|
||||
|
||||
static struct resource au1200_lcd_resources[] = {
|
||||
[0] = {
|
||||
.start = LCD_PHYS_ADDR,
|
||||
.end = LCD_PHYS_ADDR + 0x800 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1200_LCD_INT,
|
||||
.end = AU1200_LCD_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static struct resource au1200_ide0_resources[] = {
|
||||
[0] = {
|
||||
.start = AU1XXX_ATA_PHYS_ADDR,
|
||||
.end = AU1XXX_ATA_PHYS_ADDR + AU1XXX_ATA_PHYS_LEN,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1XXX_ATA_INT,
|
||||
.end = AU1XXX_ATA_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static u64 au1200_lcd_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1200_lcd_device = {
|
||||
.name = "au1200-lcd",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1200_lcd_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1200_lcd_resources),
|
||||
.resource = au1200_lcd_resources,
|
||||
};
|
||||
|
||||
|
||||
static u64 ide0_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1200_ide0_device = {
|
||||
.name = "au1200-ide",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ide0_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1200_ide0_resources),
|
||||
.resource = au1200_ide0_resources,
|
||||
};
|
||||
|
||||
static u64 au1xxx_mmc_dmamask = ~(u32)0;
|
||||
|
||||
static struct platform_device au1xxx_mmc_device = {
|
||||
.name = "au1xxx-mmc",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1xxx_mmc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffff,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(au1xxx_mmc_resources),
|
||||
.resource = au1xxx_mmc_resources,
|
||||
};
|
||||
#endif /* #ifdef CONFIG_SOC_AU1200 */
|
||||
|
||||
static struct platform_device au1x00_pcmcia_device = {
|
||||
.name = "au1x00-pcmcia",
|
||||
.id = 0,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MIPS_DB1200
|
||||
|
||||
static struct resource smc91x_resources[] = {
|
||||
[0] = {
|
||||
.name = "smc91x-regs",
|
||||
.start = AU1XXX_SMC91111_PHYS_ADDR,
|
||||
.end = AU1XXX_SMC91111_PHYS_ADDR + 0xfffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = AU1XXX_SMC91111_IRQ,
|
||||
.end = AU1XXX_SMC91111_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
.name = "smc91x",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(smc91x_resources),
|
||||
.resource = smc91x_resources,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static struct platform_device *au1xxx_platform_devices[] __initdata = {
|
||||
&au1xxx_usb_ohci_device,
|
||||
&au1x00_pcmcia_device,
|
||||
#ifdef CONFIG_FB_AU1100
|
||||
&au1100_lcd_device,
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_AU1200
|
||||
#if 0 /* fixme */
|
||||
&au1xxx_usb_ehci_device,
|
||||
#endif
|
||||
&au1xxx_usb_gdt_device,
|
||||
&au1xxx_usb_otg_device,
|
||||
&au1200_lcd_device,
|
||||
&au1200_ide0_device,
|
||||
&au1xxx_mmc_device,
|
||||
#endif
|
||||
#ifdef CONFIG_MIPS_DB1200
|
||||
&smc91x_device,
|
||||
#endif
|
||||
};
|
||||
|
||||
int au1xxx_platform_init(void)
|
||||
|
||||
@@ -34,11 +34,13 @@
|
||||
#include <linux/pm.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <asm/string.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -50,7 +52,7 @@
|
||||
# define DPRINTK(fmt, args...)
|
||||
#endif
|
||||
|
||||
static void calibrate_delay(void);
|
||||
static void au1000_calibrate_delay(void);
|
||||
|
||||
extern void set_au1x00_speed(unsigned int new_freq);
|
||||
extern unsigned int get_au1x00_speed(void);
|
||||
@@ -260,7 +262,7 @@ int au_sleep(void)
|
||||
}
|
||||
|
||||
static int pm_do_sleep(ctl_table * ctl, int write, struct file *file,
|
||||
void *buffer, size_t * len)
|
||||
void __user *buffer, size_t * len, loff_t *ppos)
|
||||
{
|
||||
int retval = 0;
|
||||
#ifdef SLEEP_TEST_TIMEOUT
|
||||
@@ -294,10 +296,9 @@ static int pm_do_sleep(ctl_table * ctl, int write, struct file *file,
|
||||
}
|
||||
|
||||
static int pm_do_suspend(ctl_table * ctl, int write, struct file *file,
|
||||
void *buffer, size_t * len)
|
||||
void __user *buffer, size_t * len, loff_t *ppos)
|
||||
{
|
||||
int retval = 0;
|
||||
void au1k_wait(void);
|
||||
|
||||
if (!write) {
|
||||
*len = 0;
|
||||
@@ -306,7 +307,7 @@ static int pm_do_suspend(ctl_table * ctl, int write, struct file *file,
|
||||
if (retval)
|
||||
return retval;
|
||||
suspend_mode = 1;
|
||||
au1k_wait();
|
||||
|
||||
retval = pm_send_all(PM_RESUME, (void *) 0);
|
||||
}
|
||||
return retval;
|
||||
@@ -314,7 +315,7 @@ static int pm_do_suspend(ctl_table * ctl, int write, struct file *file,
|
||||
|
||||
|
||||
static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
|
||||
void *buffer, size_t * len)
|
||||
void __user *buffer, size_t * len, loff_t *ppos)
|
||||
{
|
||||
int retval = 0, i;
|
||||
unsigned long val, pll;
|
||||
@@ -409,14 +410,14 @@ static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
|
||||
|
||||
|
||||
/* We don't want _any_ interrupts other than
|
||||
* match20. Otherwise our calibrate_delay()
|
||||
* match20. Otherwise our au1000_calibrate_delay()
|
||||
* calculation will be off, potentially a lot.
|
||||
*/
|
||||
intc0_mask = save_local_and_disable(0);
|
||||
intc1_mask = save_local_and_disable(1);
|
||||
local_enable_irq(AU1000_TOY_MATCH2_INT);
|
||||
spin_unlock_irqrestore(&pm_lock, flags);
|
||||
calibrate_delay();
|
||||
au1000_calibrate_delay();
|
||||
restore_local_and_enable(0, intc0_mask);
|
||||
restore_local_and_enable(1, intc1_mask);
|
||||
return retval;
|
||||
@@ -456,7 +457,7 @@ __initcall(pm_init);
|
||||
better than 1% */
|
||||
#define LPS_PREC 8
|
||||
|
||||
static void calibrate_delay(void)
|
||||
static void au1000_calibrate_delay(void)
|
||||
{
|
||||
unsigned long ticks, loopbit;
|
||||
int lps_precision = LPS_PREC;
|
||||
|
||||
@@ -75,7 +75,8 @@ void prom_init_cmdline(void)
|
||||
}
|
||||
if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
|
||||
--cp;
|
||||
*cp = '\0';
|
||||
if (prom_argc > 1)
|
||||
*cp = '\0';
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#define TIMEOUT 0xffffff
|
||||
#define SLOW_DOWN
|
||||
|
||||
static const char digits[16] = "0123456789abcdef";
|
||||
static volatile unsigned long * const com1 = (unsigned long *)SERIAL_BASE;
|
||||
|
||||
|
||||
@@ -54,7 +53,7 @@ static inline void slow_down(void)
|
||||
#endif
|
||||
|
||||
void
|
||||
putch(const unsigned char c)
|
||||
prom_putchar(const unsigned char c)
|
||||
{
|
||||
unsigned char ch;
|
||||
int i = 0;
|
||||
@@ -69,77 +68,3 @@ putch(const unsigned char c)
|
||||
} while (0 == (ch & TX_BUSY));
|
||||
com1[SER_DATA] = c;
|
||||
}
|
||||
|
||||
void
|
||||
puts(unsigned char *cp)
|
||||
{
|
||||
unsigned char ch;
|
||||
int i = 0;
|
||||
|
||||
while (*cp) {
|
||||
do {
|
||||
ch = com1[SER_CMD];
|
||||
slow_down();
|
||||
i++;
|
||||
if (i>TIMEOUT) {
|
||||
break;
|
||||
}
|
||||
} while (0 == (ch & TX_BUSY));
|
||||
com1[SER_DATA] = *cp++;
|
||||
}
|
||||
putch('\r');
|
||||
putch('\n');
|
||||
}
|
||||
|
||||
void
|
||||
fputs(const char *cp)
|
||||
{
|
||||
unsigned char ch;
|
||||
int i = 0;
|
||||
|
||||
while (*cp) {
|
||||
|
||||
do {
|
||||
ch = com1[SER_CMD];
|
||||
slow_down();
|
||||
i++;
|
||||
if (i>TIMEOUT) {
|
||||
break;
|
||||
}
|
||||
} while (0 == (ch & TX_BUSY));
|
||||
com1[SER_DATA] = *cp++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
put64(uint64_t ul)
|
||||
{
|
||||
int cnt;
|
||||
unsigned ch;
|
||||
|
||||
cnt = 16; /* 16 nibbles in a 64 bit long */
|
||||
putch('0');
|
||||
putch('x');
|
||||
do {
|
||||
cnt--;
|
||||
ch = (unsigned char)(ul >> cnt * 4) & 0x0F;
|
||||
putch(digits[ch]);
|
||||
} while (cnt > 0);
|
||||
}
|
||||
|
||||
void
|
||||
put32(unsigned u)
|
||||
{
|
||||
int cnt;
|
||||
unsigned ch;
|
||||
|
||||
cnt = 8; /* 8 nibbles in a 32 bit long */
|
||||
putch('0');
|
||||
putch('x');
|
||||
do {
|
||||
cnt--;
|
||||
ch = (unsigned char)(u >> cnt * 4) & 0x0F;
|
||||
putch(digits[ch]);
|
||||
} while (cnt > 0);
|
||||
}
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/bootinfo.h>
|
||||
@@ -57,7 +58,7 @@ extern void au1xxx_time_init(void);
|
||||
extern void au1xxx_timer_setup(struct irqaction *irq);
|
||||
extern void set_cpuspec(void);
|
||||
|
||||
static int __init au1x00_setup(void)
|
||||
void __init plat_setup(void)
|
||||
{
|
||||
struct cpu_spec *sp;
|
||||
char *argptr;
|
||||
@@ -106,8 +107,6 @@ static int __init au1x00_setup(void)
|
||||
/*strcat(argptr, " video=au1100fb:panel:Sharp_320x240_16");*/
|
||||
#ifdef CONFIG_MIPS_HYDROGEN3
|
||||
strcat(argptr, " video=au1100fb:panel:Hydrogen_3_NEC_panel_320x240,nohwcursor");
|
||||
#else
|
||||
strcat(argptr, " video=au1100fb:panel:s10,nohwcursor");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -153,15 +152,11 @@ static int __init au1x00_setup(void)
|
||||
au_sync();
|
||||
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S);
|
||||
au_writel(0, SYS_TOYTRIM);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
early_initcall(au1x00_setup);
|
||||
|
||||
#if defined(CONFIG_64BIT_PHYS_ADDR)
|
||||
/* This routine should be valid for all Au1x based boards */
|
||||
phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
|
||||
phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
|
||||
{
|
||||
u32 start, end;
|
||||
|
||||
@@ -192,4 +187,5 @@ phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
|
||||
/* default nop */
|
||||
return phys_addr;
|
||||
}
|
||||
EXPORT_SYMBOL(__fixup_bigphys_addr);
|
||||
#endif
|
||||
@@ -50,7 +50,6 @@
|
||||
#include <linux/mc146818rtc.h>
|
||||
#include <linux/timex.h>
|
||||
|
||||
extern void startup_match20_interrupt(void);
|
||||
extern void do_softirq(void);
|
||||
extern volatile unsigned long wall_jiffies;
|
||||
unsigned long missed_heart_beats = 0;
|
||||
@@ -58,14 +57,17 @@ unsigned long missed_heart_beats = 0;
|
||||
static unsigned long r4k_offset; /* Amount to increment compare reg each time */
|
||||
static unsigned long r4k_cur; /* What counter should be at next timer irq */
|
||||
int no_au1xxx_32khz;
|
||||
void (*au1k_wait_ptr)(void);
|
||||
extern int allow_au1k_wait; /* default off for CP0 Counter */
|
||||
|
||||
/* Cycle counter value at the previous timer interrupt.. */
|
||||
static unsigned int timerhi = 0, timerlo = 0;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
#define MATCH20_INC 328
|
||||
extern void startup_match20_interrupt(void);
|
||||
#if HZ < 100 || HZ > 1000
|
||||
#error "unsupported HZ value! Must be in [100,1000]"
|
||||
#endif
|
||||
#define MATCH20_INC (328*100/HZ) /* magic number 328 is for HZ=100... */
|
||||
extern void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_regs *));
|
||||
static unsigned long last_pc0, last_match20;
|
||||
#endif
|
||||
|
||||
@@ -117,17 +119,16 @@ null:
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
void counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
|
||||
irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
unsigned long pc0;
|
||||
int time_elapsed;
|
||||
static int jiffie_drift = 0;
|
||||
|
||||
kstat.irqs[0][irq]++;
|
||||
if (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20) {
|
||||
/* should never happen! */
|
||||
printk(KERN_WARNING "counter 0 w status eror\n");
|
||||
return;
|
||||
printk(KERN_WARNING "counter 0 w status error\n");
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
pc0 = au_readl(SYS_TOYREAD);
|
||||
@@ -164,6 +165,8 @@ void counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
|
||||
update_process_times(user_mode(regs));
|
||||
#endif
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/* When we wakeup from sleep, we have to "catch up" on all of the
|
||||
@@ -388,7 +391,6 @@ void au1xxx_timer_setup(struct irqaction *irq)
|
||||
{
|
||||
unsigned int est_freq;
|
||||
extern unsigned long (*do_gettimeoffset)(void);
|
||||
extern void au1k_wait(void);
|
||||
|
||||
printk("calculating r4koff... ");
|
||||
r4k_offset = cal_r4koff();
|
||||
@@ -441,18 +443,18 @@ void au1xxx_timer_setup(struct irqaction *irq)
|
||||
au_sync();
|
||||
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
|
||||
|
||||
/* setup match20 to interrupt once every 10ms */
|
||||
/* setup match20 to interrupt once every HZ */
|
||||
last_pc0 = last_match20 = au_readl(SYS_TOYREAD);
|
||||
au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
|
||||
au_sync();
|
||||
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
|
||||
startup_match20_interrupt();
|
||||
startup_match20_interrupt(counter0_irq);
|
||||
|
||||
do_gettimeoffset = do_fast_pm_gettimeoffset;
|
||||
|
||||
/* We can use the real 'wait' instruction.
|
||||
*/
|
||||
au1k_wait_ptr = au1k_wait;
|
||||
allow_au1k_wait = 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -1005,11 +1005,11 @@ process_ep0_receive (struct usb_dev* dev)
|
||||
#endif
|
||||
dev->ep0_stage = SETUP_STAGE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock(&ep0->lock);
|
||||
// we're done processing the packet, free it
|
||||
kfree(pkt);
|
||||
// we're done processing the packet, free it
|
||||
kfree(pkt);
|
||||
}
|
||||
|
||||
|
||||
@@ -1072,8 +1072,7 @@ dma_done_ep0_intr(int irq, void *dev_id, struct pt_regs *regs)
|
||||
clear_dma_done1(ep0->indma);
|
||||
|
||||
pkt = send_packet_complete(ep0);
|
||||
if (pkt)
|
||||
kfree(pkt);
|
||||
kfree(pkt);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1302,8 +1301,7 @@ usbdev_exit(void)
|
||||
endpoint_flush(ep);
|
||||
}
|
||||
|
||||
if (usbdev.full_conf_desc)
|
||||
kfree(usbdev.full_conf_desc);
|
||||
kfree(usbdev.full_conf_desc);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Loaded 20 of 522 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user