mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-19 08:05:27 +08:00
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (150 commits) MIPS: PowerTV: Separate PowerTV USB support from non-USB code MIPS: strip the un-needed sections of vmlinuz MIPS: Clean up the calculation of VMLINUZ_LOAD_ADDRESS MIPS: Clean up arch/mips/boot/compressed/decompress.c MIPS: Clean up arch/mips/boot/compressed/ld.script MIPS: Unify the suffix of compressed vmlinux.bin MIPS: PowerTV: Add Gaia platform definitions. MIPS: BCM47xx: Fix nvram_getenv return value. MIPS: Octeon: Allow more than 3.75GB of memory with PCIe MIPS: Clean up notify_die() usage. MIPS: Remove unused task_struct.trap_no field. Documentation: Mention that KProbes is supported on MIPS SAMPLES: kprobe_example: Make it print something on MIPS. MIPS: kprobe: Add support. MIPS: Add instrunction format for BREAK and SYSCALL MIPS: kprobes: Define regs_return_value() MIPS: Ritually kill stupid printk. MIPS: Octeon: Disallow MSI-X interrupt and fall back to MSI interrupts. MIPS: Octeon: Support 256 MSI on PCIe MIPS: Decode core number for R2 CPUs. ...
This commit is contained in:
commit
c3d1f1746b
@ -285,6 +285,7 @@ architectures:
|
||||
- sparc64 (Return probes not yet implemented.)
|
||||
- arm
|
||||
- ppc
|
||||
- mips
|
||||
|
||||
3. Configuring Kprobes
|
||||
|
||||
|
15
arch/mips/Kbuild
Normal file
15
arch/mips/Kbuild
Normal file
@ -0,0 +1,15 @@
|
||||
# Fail on warnings - also for files referenced in subdirs
|
||||
# -Werror can be disabled for specific files using:
|
||||
# CFLAGS_<file.o> := -Wno-error
|
||||
subdir-ccflags-y := -Werror
|
||||
|
||||
# platform specific definitions
|
||||
include arch/mips/Kbuild.platforms
|
||||
obj-y := $(platform-y)
|
||||
|
||||
# mips object files
|
||||
# The object files are linked as core-y files would be linked
|
||||
|
||||
obj-y += kernel/
|
||||
obj-y += mm/
|
||||
obj-y += math-emu/
|
32
arch/mips/Kbuild.platforms
Normal file
32
arch/mips/Kbuild.platforms
Normal file
@ -0,0 +1,32 @@
|
||||
# All platforms listed in alphabetic order
|
||||
|
||||
platforms += alchemy
|
||||
platforms += ar7
|
||||
platforms += bcm47xx
|
||||
platforms += bcm63xx
|
||||
platforms += cavium-octeon
|
||||
platforms += cobalt
|
||||
platforms += dec
|
||||
platforms += emma
|
||||
platforms += jazz
|
||||
platforms += jz4740
|
||||
platforms += lasat
|
||||
platforms += loongson
|
||||
platforms += mipssim
|
||||
platforms += mti-malta
|
||||
platforms += pmc-sierra
|
||||
platforms += pnx833x
|
||||
platforms += pnx8550
|
||||
platforms += powertv
|
||||
platforms += rb532
|
||||
platforms += sgi-ip22
|
||||
platforms += sgi-ip27
|
||||
platforms += sgi-ip32
|
||||
platforms += sibyte
|
||||
platforms += sni
|
||||
platforms += txx9
|
||||
platforms += vr41xx
|
||||
platforms += wrppmc
|
||||
|
||||
# include the platform specific files
|
||||
include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms))
|
@ -10,6 +10,8 @@ config MIPS
|
||||
select HAVE_DYNAMIC_FTRACE
|
||||
select HAVE_FTRACE_MCOUNT_RECORD
|
||||
select HAVE_FUNCTION_GRAPH_TRACER
|
||||
select HAVE_KPROBES
|
||||
select HAVE_KRETPROBES
|
||||
select RTC_LIB if !MACH_LOONGSON
|
||||
|
||||
mainmenu "Linux/MIPS Kernel Configuration"
|
||||
@ -23,8 +25,17 @@ choice
|
||||
prompt "System type"
|
||||
default SGI_IP22
|
||||
|
||||
config MACH_ALCHEMY
|
||||
config MIPS_ALCHEMY
|
||||
bool "Alchemy processor based machines"
|
||||
select 64BIT_PHYS_ADDR
|
||||
select CEVT_R4K_LIB
|
||||
select CSRC_R4K_LIB
|
||||
select IRQ_CPU
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_APM_EMULATION
|
||||
select GENERIC_GPIO
|
||||
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||
select SYS_SUPPORTS_ZBOOT
|
||||
|
||||
config AR7
|
||||
@ -62,6 +73,7 @@ config BCM47XX
|
||||
select SSB_DRIVER_MIPS
|
||||
select SSB_DRIVER_EXTIF
|
||||
select SSB_EMBEDDED
|
||||
select SSB_B43_PCI_BRIDGE if PCI
|
||||
select SSB_PCICORE_HOSTMODE if PCI
|
||||
select GENERIC_GPIO
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
@ -162,6 +174,18 @@ config MACH_JAZZ
|
||||
Members include the Acer PICA, MIPS Magnum 4000, MIPS Millennium and
|
||||
Olivetti M700-10 workstations.
|
||||
|
||||
config MACH_JZ4740
|
||||
bool "Ingenic JZ4740 based machines"
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select GENERIC_GPIO
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select HAVE_PWM
|
||||
|
||||
config LASAT
|
||||
bool "LASAT Networks platforms"
|
||||
select CEVT_R4K
|
||||
@ -686,6 +710,7 @@ endchoice
|
||||
source "arch/mips/alchemy/Kconfig"
|
||||
source "arch/mips/bcm63xx/Kconfig"
|
||||
source "arch/mips/jazz/Kconfig"
|
||||
source "arch/mips/jz4740/Kconfig"
|
||||
source "arch/mips/lasat/Kconfig"
|
||||
source "arch/mips/pmc-sierra/Kconfig"
|
||||
source "arch/mips/powertv/Kconfig"
|
||||
@ -892,6 +917,9 @@ config CPU_LITTLE_ENDIAN
|
||||
|
||||
endchoice
|
||||
|
||||
config EXPORT_UASM
|
||||
bool
|
||||
|
||||
config SYS_SUPPORTS_APM_EMULATION
|
||||
bool
|
||||
|
||||
|
@ -130,26 +130,6 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
|
||||
cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
|
||||
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
|
||||
cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
|
||||
# only gcc >= 4.4 have the loongson-specific support
|
||||
cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap
|
||||
cflags-$(CONFIG_CPU_LOONGSON2E) += \
|
||||
$(call cc-option,-march=loongson2e,-march=r4600)
|
||||
cflags-$(CONFIG_CPU_LOONGSON2F) += \
|
||||
$(call cc-option,-march=loongson2f,-march=r4600)
|
||||
# enable the workarounds for loongson2f
|
||||
ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
|
||||
ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),)
|
||||
$(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop)
|
||||
else
|
||||
cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-nop
|
||||
endif
|
||||
ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-jump,),)
|
||||
$(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-jump)
|
||||
else
|
||||
cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump
|
||||
endif
|
||||
endif
|
||||
|
||||
cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
|
||||
-Wa,-mips32 -Wa,--trap
|
||||
cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
|
||||
@ -209,455 +189,7 @@ endif
|
||||
#
|
||||
# Board-dependent options and extra files
|
||||
#
|
||||
|
||||
#
|
||||
# Texas Instruments AR7
|
||||
#
|
||||
core-$(CONFIG_AR7) += arch/mips/ar7/
|
||||
cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7
|
||||
load-$(CONFIG_AR7) += 0xffffffff94100000
|
||||
|
||||
#
|
||||
# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
|
||||
#
|
||||
core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
|
||||
cflags-$(CONFIG_MACH_JAZZ) += -I$(srctree)/arch/mips/include/asm/mach-jazz
|
||||
load-$(CONFIG_MACH_JAZZ) += 0xffffffff80080000
|
||||
|
||||
#
|
||||
# Common Alchemy Au1x00 stuff
|
||||
#
|
||||
core-$(CONFIG_SOC_AU1X00) += arch/mips/alchemy/common/
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1000 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_PB1000) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1000) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1000) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1100 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_PB1100) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1100) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1100) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1500 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_PB1500) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1500) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1500) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1550 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_PB1550) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1550) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1200 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_PB1200) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1200) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1200) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1000 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_DB1000) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1000) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1100 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_DB1100) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1100) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1100) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1500 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_DB1500) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1500) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1500) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1550 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_DB1550) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1550) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1200 eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_DB1200) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1200) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Bosporus eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_BOSPORUS) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_BOSPORUS) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_BOSPORUS) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Mirage eval board
|
||||
#
|
||||
core-$(CONFIG_MIPS_MIRAGE) += arch/mips/alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_MIRAGE) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_MIRAGE) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# 4G-Systems eval board
|
||||
#
|
||||
libs-$(CONFIG_MIPS_MTX1) += arch/mips/alchemy/mtx-1/
|
||||
load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# MyCable eval board
|
||||
#
|
||||
libs-$(CONFIG_MIPS_XXS1500) += arch/mips/alchemy/xxs1500/
|
||||
load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
|
||||
|
||||
# must be last for Alchemy systems for GPIO to work properly
|
||||
cflags-$(CONFIG_SOC_AU1X00) += -I$(srctree)/arch/mips/include/asm/mach-au1x00
|
||||
|
||||
|
||||
#
|
||||
# Cobalt Server
|
||||
#
|
||||
core-$(CONFIG_MIPS_COBALT) += arch/mips/cobalt/
|
||||
cflags-$(CONFIG_MIPS_COBALT) += -I$(srctree)/arch/mips/include/asm/mach-cobalt
|
||||
load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
|
||||
|
||||
#
|
||||
# DECstation family
|
||||
#
|
||||
core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/
|
||||
cflags-$(CONFIG_MACH_DECSTATION)+= -I$(srctree)/arch/mips/include/asm/mach-dec
|
||||
libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/
|
||||
load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
|
||||
|
||||
#
|
||||
# Wind River PPMC Board (4KC + GT64120)
|
||||
#
|
||||
core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/
|
||||
cflags-$(CONFIG_WR_PPMC) += -I$(srctree)/arch/mips/include/asm/mach-wrppmc
|
||||
load-$(CONFIG_WR_PPMC) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# Loongson family
|
||||
#
|
||||
core-$(CONFIG_MACH_LOONGSON) += arch/mips/loongson/
|
||||
cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson \
|
||||
-mno-branch-likely
|
||||
load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
|
||||
load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
|
||||
|
||||
#
|
||||
# MIPS Malta board
|
||||
#
|
||||
core-$(CONFIG_MIPS_MALTA) += arch/mips/mti-malta/
|
||||
cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta
|
||||
load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
|
||||
all-$(CONFIG_MIPS_MALTA) := $(COMPRESSION_FNAME).bin
|
||||
|
||||
#
|
||||
# MIPS SIM
|
||||
#
|
||||
core-$(CONFIG_MIPS_SIM) += arch/mips/mipssim/
|
||||
cflags-$(CONFIG_MIPS_SIM) += -I$(srctree)/arch/mips/include/asm/mach-mipssim
|
||||
load-$(CONFIG_MIPS_SIM) += 0x80100000
|
||||
|
||||
#
|
||||
# PMC-Sierra MSP SOCs
|
||||
#
|
||||
core-$(CONFIG_PMC_MSP) += arch/mips/pmc-sierra/msp71xx/
|
||||
cflags-$(CONFIG_PMC_MSP) += -I$(srctree)/arch/mips/include/asm/pmc-sierra/msp71xx \
|
||||
-mno-branch-likely
|
||||
load-$(CONFIG_PMC_MSP) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# PMC-Sierra Yosemite
|
||||
#
|
||||
core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/
|
||||
cflags-$(CONFIG_PMC_YOSEMITE) += -I$(srctree)/arch/mips/include/asm/mach-yosemite
|
||||
load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# LASAT platforms
|
||||
#
|
||||
core-$(CONFIG_LASAT) += arch/mips/lasat/
|
||||
cflags-$(CONFIG_LASAT) += -I$(srctree)/arch/mips/include/asm/mach-lasat
|
||||
load-$(CONFIG_LASAT) += 0xffffffff80000000
|
||||
|
||||
#
|
||||
# Common VR41xx
|
||||
#
|
||||
core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/
|
||||
cflags-$(CONFIG_MACH_VR41XX) += -I$(srctree)/arch/mips/include/asm/mach-vr41xx
|
||||
|
||||
#
|
||||
# ZAO Networks Capcella (VR4131)
|
||||
#
|
||||
load-$(CONFIG_ZAO_CAPCELLA) += 0xffffffff80000000
|
||||
|
||||
#
|
||||
# Victor MP-C303/304 (VR4122)
|
||||
#
|
||||
load-$(CONFIG_VICTOR_MPC30X) += 0xffffffff80001000
|
||||
|
||||
#
|
||||
# IBM WorkPad z50 (VR4121)
|
||||
#
|
||||
core-$(CONFIG_IBM_WORKPAD) += arch/mips/vr41xx/ibm-workpad/
|
||||
load-$(CONFIG_IBM_WORKPAD) += 0xffffffff80004000
|
||||
|
||||
#
|
||||
# CASIO CASSIPEIA E-55/65 (VR4111)
|
||||
#
|
||||
core-$(CONFIG_CASIO_E55) += arch/mips/vr41xx/casio-e55/
|
||||
load-$(CONFIG_CASIO_E55) += 0xffffffff80004000
|
||||
|
||||
#
|
||||
# TANBAC VR4131 multichip module(TB0225) and TANBAC VR4131DIMM(TB0229) (VR4131)
|
||||
#
|
||||
load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000
|
||||
|
||||
# NXP STB225
|
||||
core-$(CONFIG_SOC_PNX833X) += arch/mips/nxp/pnx833x/common/
|
||||
cflags-$(CONFIG_SOC_PNX833X) += -Iarch/mips/include/asm/mach-pnx833x
|
||||
libs-$(CONFIG_NXP_STB220) += arch/mips/nxp/pnx833x/stb22x/
|
||||
load-$(CONFIG_NXP_STB220) += 0xffffffff80001000
|
||||
libs-$(CONFIG_NXP_STB225) += arch/mips/nxp/pnx833x/stb22x/
|
||||
load-$(CONFIG_NXP_STB225) += 0xffffffff80001000
|
||||
|
||||
#
|
||||
# Common NXP PNX8550
|
||||
#
|
||||
core-$(CONFIG_SOC_PNX8550) += arch/mips/nxp/pnx8550/common/
|
||||
cflags-$(CONFIG_SOC_PNX8550) += -I$(srctree)/arch/mips/include/asm/mach-pnx8550
|
||||
|
||||
#
|
||||
# NXP PNX8550 JBS board
|
||||
#
|
||||
libs-$(CONFIG_PNX8550_JBS) += arch/mips/nxp/pnx8550/jbs/
|
||||
#cflags-$(CONFIG_PNX8550_JBS) += -I$(srctree)/arch/mips/include/asm/mach-pnx8550
|
||||
load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000
|
||||
|
||||
# NXP PNX8550 STB810 board
|
||||
#
|
||||
libs-$(CONFIG_PNX8550_STB810) += arch/mips/nxp/pnx8550/stb810/
|
||||
load-$(CONFIG_PNX8550_STB810) += 0xffffffff80060000
|
||||
|
||||
#
|
||||
# Common NEC EMMAXXX
|
||||
#
|
||||
core-$(CONFIG_SOC_EMMA2RH) += arch/mips/emma/common/
|
||||
cflags-$(CONFIG_SOC_EMMA2RH) += -I$(srctree)/arch/mips/include/asm/mach-emma2rh
|
||||
|
||||
#
|
||||
# NEC EMMA2RH Mark-eins
|
||||
#
|
||||
core-$(CONFIG_NEC_MARKEINS) += arch/mips/emma/markeins/
|
||||
load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000
|
||||
|
||||
#
|
||||
# Cisco PowerTV Platform
|
||||
#
|
||||
core-$(CONFIG_POWERTV) += arch/mips/powertv/
|
||||
cflags-$(CONFIG_POWERTV) += -I$(srctree)/arch/mips/include/asm/mach-powertv
|
||||
load-$(CONFIG_POWERTV) += 0xffffffff90800000
|
||||
|
||||
#
|
||||
# SGI IP22 (Indy/Indigo2)
|
||||
#
|
||||
# Set the load address to >= 0xffffffff88069000 if you want to leave space for
|
||||
# symmon, 0xffffffff80002000 for production kernels. Note that the value must
|
||||
# be aligned to a multiple of the kernel stack size or the handling of the
|
||||
# current variable will break so for 64-bit kernels we have to raise the start
|
||||
# address by 8kb.
|
||||
#
|
||||
core-$(CONFIG_SGI_IP22) += arch/mips/sgi-ip22/
|
||||
cflags-$(CONFIG_SGI_IP22) += -I$(srctree)/arch/mips/include/asm/mach-ip22
|
||||
ifdef CONFIG_32BIT
|
||||
load-$(CONFIG_SGI_IP22) += 0xffffffff88002000
|
||||
endif
|
||||
ifdef CONFIG_64BIT
|
||||
load-$(CONFIG_SGI_IP22) += 0xffffffff88004000
|
||||
endif
|
||||
|
||||
#
|
||||
# SGI-IP27 (Origin200/2000)
|
||||
#
|
||||
# Set the load address to >= 0xc000000000300000 if you want to leave space for
|
||||
# symmon, 0xc00000000001c000 for production kernels. Note that the value must
|
||||
# be 16kb aligned or the handling of the current variable will break.
|
||||
#
|
||||
ifdef CONFIG_SGI_IP27
|
||||
core-$(CONFIG_SGI_IP27) += arch/mips/sgi-ip27/
|
||||
cflags-$(CONFIG_SGI_IP27) += -I$(srctree)/arch/mips/include/asm/mach-ip27
|
||||
ifdef CONFIG_MAPPED_KERNEL
|
||||
load-$(CONFIG_SGI_IP27) += 0xc00000004001c000
|
||||
OBJCOPYFLAGS := --change-addresses=0x3fffffff80000000
|
||||
dataoffset-$(CONFIG_SGI_IP27) += 0x01000000
|
||||
else
|
||||
load-$(CONFIG_SGI_IP27) += 0xa80000000001c000
|
||||
OBJCOPYFLAGS := --change-addresses=0x57ffffff80000000
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# SGI IP28 (Indigo2 R10k)
|
||||
#
|
||||
# Set the load address to >= 0xa800000020080000 if you want to leave space for
|
||||
# symmon, 0xa800000020004000 for production kernels ? Note that the value must
|
||||
# be 16kb aligned or the handling of the current variable will break.
|
||||
# Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
|
||||
#
|
||||
ifdef CONFIG_SGI_IP28
|
||||
ifeq ($(call cc-option-yn,-mr10k-cache-barrier=store), n)
|
||||
$(error gcc doesn't support needed option -mr10k-cache-barrier=store)
|
||||
endif
|
||||
endif
|
||||
core-$(CONFIG_SGI_IP28) += arch/mips/sgi-ip22/
|
||||
cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28
|
||||
load-$(CONFIG_SGI_IP28) += 0xa800000020004000
|
||||
|
||||
#
|
||||
# SGI-IP32 (O2)
|
||||
#
|
||||
# Set the load address to >= 80069000 if you want to leave space for symmon,
|
||||
# 0xffffffff80004000 for production kernels. Note that the value must be aligned to
|
||||
# a multiple of the kernel stack size or the handling of the current variable
|
||||
# will break.
|
||||
#
|
||||
core-$(CONFIG_SGI_IP32) += arch/mips/sgi-ip32/
|
||||
cflags-$(CONFIG_SGI_IP32) += -I$(srctree)/arch/mips/include/asm/mach-ip32
|
||||
load-$(CONFIG_SGI_IP32) += 0xffffffff80004000
|
||||
|
||||
#
|
||||
# Sibyte SB1250/BCM1480 SOC
|
||||
#
|
||||
# This is a LIB so that it links at the end, and initcalls are later
|
||||
# the sequence; but it is built as an object so that modules don't get
|
||||
# removed (as happens, even if they have __initcall/module_init)
|
||||
#
|
||||
core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/sb1250/
|
||||
core-$(CONFIG_SIBYTE_BCM112X) += arch/mips/sibyte/common/
|
||||
cflags-$(CONFIG_SIBYTE_BCM112X) += -I$(srctree)/arch/mips/include/asm/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
|
||||
|
||||
core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/sb1250/
|
||||
core-$(CONFIG_SIBYTE_SB1250) += arch/mips/sibyte/common/
|
||||
cflags-$(CONFIG_SIBYTE_SB1250) += -I$(srctree)/arch/mips/include/asm/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
|
||||
|
||||
core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/bcm1480/
|
||||
core-$(CONFIG_SIBYTE_BCM1x55) += arch/mips/sibyte/common/
|
||||
cflags-$(CONFIG_SIBYTE_BCM1x55) += -I$(srctree)/arch/mips/include/asm/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
|
||||
|
||||
core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/bcm1480/
|
||||
core-$(CONFIG_SIBYTE_BCM1x80) += arch/mips/sibyte/common/
|
||||
cflags-$(CONFIG_SIBYTE_BCM1x80) += -I$(srctree)/arch/mips/include/asm/mach-sibyte \
|
||||
-DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
|
||||
|
||||
#
|
||||
# Sibyte BCM91120x (Carmel) board
|
||||
# Sibyte BCM91120C (CRhine) board
|
||||
# Sibyte BCM91125C (CRhone) board
|
||||
# Sibyte BCM91125E (Rhone) board
|
||||
# Sibyte SWARM board
|
||||
# Sibyte BCM91x80 (BigSur) board
|
||||
#
|
||||
core-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000
|
||||
core-$(CONFIG_SIBYTE_CRHINE) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_CRHINE) := 0xffffffff80100000
|
||||
core-$(CONFIG_SIBYTE_CRHONE) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_CRHONE) := 0xffffffff80100000
|
||||
core-$(CONFIG_SIBYTE_RHONE) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_RHONE) := 0xffffffff80100000
|
||||
core-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000
|
||||
core-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
|
||||
core-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/
|
||||
load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
|
||||
|
||||
#
|
||||
# Broadcom BCM47XX boards
|
||||
#
|
||||
core-$(CONFIG_BCM47XX) += arch/mips/bcm47xx/
|
||||
cflags-$(CONFIG_BCM47XX) += -I$(srctree)/arch/mips/include/asm/mach-bcm47xx
|
||||
load-$(CONFIG_BCM47XX) := 0xffffffff80001000
|
||||
|
||||
#
|
||||
# Broadcom BCM63XX boards
|
||||
#
|
||||
core-$(CONFIG_BCM63XX) += arch/mips/bcm63xx/
|
||||
cflags-$(CONFIG_BCM63XX) += -I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
|
||||
load-$(CONFIG_BCM63XX) := 0xffffffff80010000
|
||||
|
||||
#
|
||||
# SNI RM
|
||||
#
|
||||
core-$(CONFIG_SNI_RM) += arch/mips/sni/
|
||||
cflags-$(CONFIG_SNI_RM) += -I$(srctree)/arch/mips/include/asm/mach-rm
|
||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
load-$(CONFIG_SNI_RM) += 0xffffffff80600000
|
||||
else
|
||||
load-$(CONFIG_SNI_RM) += 0xffffffff80030000
|
||||
endif
|
||||
all-$(CONFIG_SNI_RM) := $(COMPRESSION_FNAME).ecoff
|
||||
|
||||
#
|
||||
# Common TXx9
|
||||
#
|
||||
core-$(CONFIG_MACH_TX39XX) += arch/mips/txx9/generic/
|
||||
cflags-$(CONFIG_MACH_TX39XX) += -I$(srctree)/arch/mips/include/asm/mach-tx39xx
|
||||
load-$(CONFIG_MACH_TX39XX) += 0xffffffff80050000
|
||||
core-$(CONFIG_MACH_TX49XX) += arch/mips/txx9/generic/
|
||||
cflags-$(CONFIG_MACH_TX49XX) += -I$(srctree)/arch/mips/include/asm/mach-tx49xx
|
||||
load-$(CONFIG_MACH_TX49XX) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# Toshiba JMR-TX3927 board
|
||||
#
|
||||
core-$(CONFIG_TOSHIBA_JMR3927) += arch/mips/txx9/jmr3927/
|
||||
|
||||
#
|
||||
# Routerboard 532 board
|
||||
#
|
||||
core-$(CONFIG_MIKROTIK_RB532) += arch/mips/rb532/
|
||||
cflags-$(CONFIG_MIKROTIK_RB532) += -I$(srctree)/arch/mips/include/asm/mach-rc32434
|
||||
load-$(CONFIG_MIKROTIK_RB532) += 0xffffffff80101000
|
||||
|
||||
#
|
||||
# Toshiba RBTX49XX boards
|
||||
#
|
||||
core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/txx9/rbtx4927/
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/
|
||||
core-$(CONFIG_TOSHIBA_RBTX4939) += arch/mips/txx9/rbtx4939/
|
||||
|
||||
#
|
||||
# Cavium Octeon
|
||||
#
|
||||
core-$(CONFIG_CPU_CAVIUM_OCTEON) += arch/mips/cavium-octeon/
|
||||
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -I$(srctree)/arch/mips/include/asm/mach-cavium-octeon
|
||||
core-$(CONFIG_CPU_CAVIUM_OCTEON) += arch/mips/cavium-octeon/executive/
|
||||
ifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL
|
||||
load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff84100000
|
||||
else
|
||||
load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff81100000
|
||||
endif
|
||||
include $(srctree)/arch/mips/Kbuild.platforms
|
||||
|
||||
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
|
||||
drivers-$(CONFIG_PCI) += arch/mips/pci/
|
||||
@ -706,7 +238,8 @@ head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
|
||||
|
||||
libs-y += arch/mips/lib/
|
||||
|
||||
core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/
|
||||
# See arch/mips/Kbuild for content of core part of the kernel
|
||||
core-y += arch/mips/
|
||||
|
||||
drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
|
||||
|
||||
@ -726,6 +259,9 @@ endif
|
||||
vmlinux.32: vmlinux
|
||||
$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
|
||||
|
||||
|
||||
#obj-$(CONFIG_KPROBES) += kprobes.o
|
||||
|
||||
#
|
||||
# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
|
||||
# ELF files from 32-bit files by conversion.
|
||||
@ -733,35 +269,19 @@ vmlinux.32: vmlinux
|
||||
vmlinux.64: vmlinux
|
||||
$(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@
|
||||
|
||||
makeboot =$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) $(1)
|
||||
makezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
|
||||
VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $(1)
|
||||
|
||||
all: $(all-y)
|
||||
|
||||
vmlinuz: vmlinux FORCE
|
||||
+@$(call makezboot,$@)
|
||||
# boot
|
||||
vmlinux.bin vmlinux.ecoff vmlinux.srec: $(vmlinux-32) FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) arch/mips/boot/$@
|
||||
|
||||
vmlinuz.bin: vmlinux
|
||||
+@$(call makezboot,$@)
|
||||
# boot/compressed
|
||||
vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec: $(vmlinux-32) FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
|
||||
VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@
|
||||
|
||||
vmlinuz.ecoff: vmlinux
|
||||
+@$(call makezboot,$@)
|
||||
|
||||
vmlinuz.srec: vmlinux
|
||||
+@$(call makezboot,$@)
|
||||
|
||||
vmlinux.bin: $(vmlinux-32)
|
||||
+@$(call makeboot,$@)
|
||||
|
||||
vmlinux.ecoff: $(vmlinux-32)
|
||||
+@$(call makeboot,$@)
|
||||
|
||||
vmlinux.srec: $(vmlinux-32)
|
||||
+@$(call makeboot,$@)
|
||||
|
||||
CLEAN_FILES += vmlinux.ecoff \
|
||||
vmlinux.srec
|
||||
CLEAN_FILES += vmlinux.32 vmlinux.64
|
||||
|
||||
archprepare:
|
||||
ifdef CONFIG_MIPS32_N32
|
||||
@ -780,9 +300,9 @@ install:
|
||||
$(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
|
||||
|
||||
archclean:
|
||||
@$(MAKE) $(clean)=arch/mips/boot
|
||||
@$(MAKE) $(clean)=arch/mips/boot/compressed
|
||||
@$(MAKE) $(clean)=arch/mips/lasat
|
||||
$(Q)$(MAKE) $(clean)=arch/mips/boot
|
||||
$(Q)$(MAKE) $(clean)=arch/mips/boot/compressed
|
||||
$(Q)$(MAKE) $(clean)=arch/mips/lasat
|
||||
|
||||
define archhelp
|
||||
echo ' install - install kernel into $(INSTALL_PATH)'
|
||||
@ -796,11 +316,3 @@ define archhelp
|
||||
echo
|
||||
echo ' These will be default as apropriate for a configured platform.'
|
||||
endef
|
||||
|
||||
CLEAN_FILES += vmlinux.32 \
|
||||
vmlinux.64 \
|
||||
vmlinux.ecoff \
|
||||
vmlinuz \
|
||||
vmlinuz.ecoff \
|
||||
vmlinuz.bin \
|
||||
vmlinuz.srec
|
||||
|
@ -11,7 +11,7 @@ config ALCHEMY_GPIO_INDIRECT
|
||||
|
||||
choice
|
||||
prompt "Machine type"
|
||||
depends on MACH_ALCHEMY
|
||||
depends on MIPS_ALCHEMY
|
||||
default MIPS_DB1000
|
||||
|
||||
config MIPS_MTX1
|
||||
@ -128,41 +128,33 @@ config MIPS_XXS1500
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
|
||||
config MIPS_GPR
|
||||
bool "Trapeze ITS GPR board"
|
||||
select SOC_AU1550
|
||||
select HW_HAS_PCI
|
||||
select DMA_NONCOHERENT
|
||||
select MIPS_DISABLE_OBSOLETE_IDE
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
|
||||
endchoice
|
||||
|
||||
config SOC_AU1000
|
||||
bool
|
||||
select SOC_AU1X00
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
|
||||
config SOC_AU1100
|
||||
bool
|
||||
select SOC_AU1X00
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
|
||||
config SOC_AU1500
|
||||
bool
|
||||
select SOC_AU1X00
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
|
||||
config SOC_AU1550
|
||||
bool
|
||||
select SOC_AU1X00
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
|
||||
config SOC_AU1200
|
||||
bool
|
||||
select SOC_AU1X00
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
|
||||
config SOC_AU1X00
|
||||
bool
|
||||
select 64BIT_PHYS_ADDR
|
||||
select CEVT_R4K_LIB
|
||||
select CSRC_R4K_LIB
|
||||
select IRQ_CPU
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_APM_EMULATION
|
||||
select GENERIC_GPIO
|
||||
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||
|
114
arch/mips/alchemy/Platform
Normal file
114
arch/mips/alchemy/Platform
Normal file
@ -0,0 +1,114 @@
|
||||
#
|
||||
# Core Alchemy code
|
||||
#
|
||||
platform-$(CONFIG_MIPS_ALCHEMY) += alchemy/common/
|
||||
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1000 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_PB1000) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1000) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1000) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1100 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_PB1100) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1100) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1100) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1500 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_PB1500) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1500) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1500) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1550 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_PB1550) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1550) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1550) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Pb1200 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_PB1200) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_PB1200) += -I$(srctree)/arch/mips/include/asm/mach-pb1x00
|
||||
load-$(CONFIG_MIPS_PB1200) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1000 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_DB1000) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1000) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1000) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1100 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_DB1100) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1100) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1100) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1500 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_DB1500) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1500) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1500) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1550 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_DB1550) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1550) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1550) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1200 eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_DB1200) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1200) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1200) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Bosporus eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_BOSPORUS) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_BOSPORUS) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_BOSPORUS) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# AMD Alchemy Mirage eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_MIRAGE) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_MIRAGE) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_MIRAGE) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# 4G-Systems eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_MTX1) += alchemy/mtx-1/
|
||||
load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# MyCable eval board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_XXS1500) += alchemy/xxs1500/
|
||||
load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# Trapeze ITS GRP board
|
||||
#
|
||||
platform-$(CONFIG_MIPS_GPR) += alchemy/gpr/
|
||||
load-$(CONFIG_MIPS_GPR) += 0xffffffff80100000
|
||||
|
||||
# boards can specify their own <gpio.h> in one of their include dirs.
|
||||
# If they do, placing this line here at the end will make sure the
|
||||
# compiler picks the board one. If they don't, it will make sure
|
||||
# the alchemy generic gpio header is picked up.
|
||||
|
||||
cflags-$(CONFIG_MIPS_ALCHEMY) += -I$(srctree)/arch/mips/include/asm/mach-au1x00
|
@ -18,5 +18,3 @@ ifeq ($(CONFIG_ALCHEMY_GPIO_INDIRECT),)
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_PCI) += pci.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
@ -89,11 +89,7 @@ unsigned long au1xxx_calc_clock(void)
|
||||
* over backwards trying to determine the frequency.
|
||||
*/
|
||||
if (au1xxx_cpu_has_pll_wo())
|
||||
#ifdef CONFIG_SOC_AU1000_FREQUENCY
|
||||
cpu_speed = CONFIG_SOC_AU1000_FREQUENCY;
|
||||
#else
|
||||
cpu_speed = 396000000;
|
||||
#endif
|
||||
else
|
||||
cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK;
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/serial_8250.h>
|
||||
#include <linux/init.h>
|
||||
@ -21,6 +22,8 @@
|
||||
#include <asm/mach-au1x00/au1100_mmc.h>
|
||||
#include <asm/mach-au1x00/au1xxx_eth.h>
|
||||
|
||||
#include <prom.h>
|
||||
|
||||
#define PORT(_base, _irq) \
|
||||
{ \
|
||||
.mapbase = _base, \
|
||||
@ -33,7 +36,6 @@
|
||||
}
|
||||
|
||||
static struct plat_serial8250_port au1x00_uart_data[] = {
|
||||
#if defined(CONFIG_SERIAL_8250_AU1X00)
|
||||
#if defined(CONFIG_SOC_AU1000)
|
||||
PORT(UART0_PHYS_ADDR, AU1000_UART0_INT),
|
||||
PORT(UART1_PHYS_ADDR, AU1000_UART1_INT),
|
||||
@ -54,7 +56,6 @@ static struct plat_serial8250_port au1x00_uart_data[] = {
|
||||
PORT(UART0_PHYS_ADDR, AU1200_UART0_INT),
|
||||
PORT(UART1_PHYS_ADDR, AU1200_UART1_INT),
|
||||
#endif
|
||||
#endif /* CONFIG_SERIAL_8250_AU1X00 */
|
||||
{ },
|
||||
};
|
||||
|
||||
@ -436,17 +437,27 @@ static int __init au1xxx_platform_init(void)
|
||||
{
|
||||
unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
|
||||
int err, i;
|
||||
unsigned char ethaddr[6];
|
||||
|
||||
/* Fill up uartclk. */
|
||||
for (i = 0; au1x00_uart_data[i].flags; i++)
|
||||
au1x00_uart_data[i].uartclk = uartclk;
|
||||
|
||||
/* use firmware-provided mac addr if available and necessary */
|
||||
i = prom_get_ethernet_addr(ethaddr);
|
||||
if (!i && !is_valid_ether_addr(au1xxx_eth0_platform_data.mac))
|
||||
memcpy(au1xxx_eth0_platform_data.mac, ethaddr, 6);
|
||||
|
||||
err = platform_add_devices(au1xxx_platform_devices,
|
||||
ARRAY_SIZE(au1xxx_platform_devices));
|
||||
#ifndef CONFIG_SOC_AU1100
|
||||
ethaddr[5] += 1; /* next addr for 2nd MAC */
|
||||
if (!i && !is_valid_ether_addr(au1xxx_eth1_platform_data.mac))
|
||||
memcpy(au1xxx_eth1_platform_data.mac, ethaddr, 6);
|
||||
|
||||
/* Register second MAC if enabled in pinfunc */
|
||||
if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
|
||||
platform_device_register(&au1xxx_eth1_device);
|
||||
err = platform_device_register(&au1xxx_eth1_device);
|
||||
#endif
|
||||
|
||||
return err;
|
||||
|
@ -16,5 +16,3 @@ obj-$(CONFIG_MIPS_DB1500) += db1x00/
|
||||
obj-$(CONFIG_MIPS_DB1550) += db1x00/
|
||||
obj-$(CONFIG_MIPS_BOSPORUS) += db1x00/
|
||||
obj-$(CONFIG_MIPS_MIRAGE) += db1x00/
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
@ -216,14 +216,14 @@ static struct resource db1200_ide_res[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static u64 ide_dmamask = DMA_32BIT_MASK;
|
||||
static u64 ide_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device db1200_ide_dev = {
|
||||
.name = "au1200-ide",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &ide_dmamask,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(db1200_ide_res),
|
||||
.resource = db1200_ide_res,
|
||||
@ -385,12 +385,12 @@ static struct au1550_spi_info db1200_spi_platdata = {
|
||||
.activate_cs = db1200_spi_cs_en,
|
||||
};
|
||||
|
||||
static u64 spi_dmamask = DMA_32BIT_MASK;
|
||||
static u64 spi_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device db1200_spi_dev = {
|
||||
.dev = {
|
||||
.dma_mask = &spi_dmamask,
|
||||
.coherent_dma_mask = DMA_32BIT_MASK,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &db1200_spi_platdata,
|
||||
},
|
||||
.name = "au1550-spi",
|
||||
|
@ -79,7 +79,6 @@ static struct au1000_eth_platform_data eth0_pdata = {
|
||||
|
||||
static void bosporus_power_off(void)
|
||||
{
|
||||
printk(KERN_INFO "It's now safe to turn off power\n");
|
||||
while (1)
|
||||
asm volatile (".set mips3 ; wait ; .set mips0");
|
||||
}
|
||||
|
@ -47,9 +47,11 @@ static void board_reset(char *c)
|
||||
|
||||
static void board_power_off(void)
|
||||
{
|
||||
printk(KERN_ALERT "It's now safe to remove power\n");
|
||||
while (1)
|
||||
asm volatile (".set mips3 ; wait ; .set mips1");
|
||||
asm volatile (
|
||||
" .set mips32 \n"
|
||||
" wait \n"
|
||||
" .set mips0 \n");
|
||||
}
|
||||
|
||||
void __init board_setup(void)
|
||||
|
@ -3,5 +3,3 @@
|
||||
#
|
||||
|
||||
obj-y := board_setup.o platform.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
8
arch/mips/alchemy/gpr/Makefile
Normal file
8
arch/mips/alchemy/gpr/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Copyright 2003 MontaVista Software Inc.
|
||||
# Author: MontaVista Software, Inc. <source@mvista.com>
|
||||
#
|
||||
# Makefile for Trapeze ITS GPR board.
|
||||
#
|
||||
|
||||
obj-y += board_setup.o init.o platform.o
|
93
arch/mips/alchemy/gpr/board_setup.c
Normal file
93
arch/mips/alchemy/gpr/board_setup.c
Normal file
@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2010 Wolfgang Grandegger <wg@denx.de>
|
||||
*
|
||||
* Copyright 2000-2003, 2008 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* 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/gpio.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
|
||||
#include <prom.h>
|
||||
|
||||
#define UART1_ADDR KSEG1ADDR(UART1_PHYS_ADDR)
|
||||
#define UART3_ADDR KSEG1ADDR(UART3_PHYS_ADDR)
|
||||
|
||||
char irq_tab_alchemy[][5] __initdata = {
|
||||
[0] = { -1, AU1500_PCI_INTA, AU1500_PCI_INTB, 0xff, 0xff },
|
||||
};
|
||||
|
||||
static void gpr_reset(char *c)
|
||||
{
|
||||
/* switch System-LED to orange (red# and green# on) */
|
||||
alchemy_gpio_direction_output(4, 0);
|
||||
alchemy_gpio_direction_output(5, 0);
|
||||
|
||||
/* trigger watchdog to reset board in 200ms */
|
||||
printk(KERN_EMERG "Triggering watchdog soft reset...\n");
|
||||
raw_local_irq_disable();
|
||||
alchemy_gpio_direction_output(1, 0);
|
||||
udelay(1);
|
||||
alchemy_gpio_set_value(1, 1);
|
||||
while (1)
|
||||
cpu_wait();
|
||||
}
|
||||
|
||||
static void gpr_power_off(void)
|
||||
{
|
||||
while (1)
|
||||
cpu_wait();
|
||||
}
|
||||
|
||||
void __init board_setup(void)
|
||||
{
|
||||
printk(KERN_INFO "Tarpeze ITS GPR board\n");
|
||||
|
||||
pm_power_off = gpr_power_off;
|
||||
_machine_halt = gpr_power_off;
|
||||
_machine_restart = gpr_reset;
|
||||
|
||||
/* Enable UART3 */
|
||||
au_writel(0x1, UART3_ADDR + UART_MOD_CNTRL);/* clock enable (CE) */
|
||||
au_writel(0x3, UART3_ADDR + UART_MOD_CNTRL); /* CE and "enable" */
|
||||
/* Enable UART1 */
|
||||
au_writel(0x1, UART1_ADDR + UART_MOD_CNTRL); /* clock enable (CE) */
|
||||
au_writel(0x3, UART1_ADDR + UART_MOD_CNTRL); /* CE and "enable" */
|
||||
|
||||
/* Take away Reset of UMTS-card */
|
||||
alchemy_gpio_direction_output(215, 1);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
#if defined(__MIPSEB__)
|
||||
au_writel(0xf | (2 << 6) | (1 << 4), Au1500_PCI_CFG);
|
||||
#else
|
||||
au_writel(0xf, Au1500_PCI_CFG);
|
||||
#endif
|
||||
#endif
|
||||
}
|
63
arch/mips/alchemy/gpr/init.c
Normal file
63
arch/mips/alchemy/gpr/init.c
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2010 Wolfgang Grandegger <wg@denx.de>
|
||||
*
|
||||
* Copyright 2003, 2008 MontaVista Software Inc.
|
||||
* Author: MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* 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/init.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
|
||||
#include <prom.h>
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return "GPR";
|
||||
}
|
||||
|
||||
void __init prom_init(void)
|
||||
{
|
||||
unsigned char *memsize_str;
|
||||
unsigned long memsize;
|
||||
|
||||
prom_argc = fw_arg0;
|
||||
prom_argv = (char **)fw_arg1;
|
||||
prom_envp = (char **)fw_arg2;
|
||||
|
||||
prom_init_cmdline();
|
||||
|
||||
memsize_str = prom_getenv("memsize");
|
||||
if (!memsize_str)
|
||||
memsize = 0x04000000;
|
||||
else
|
||||
strict_strtoul(memsize_str, 0, &memsize);
|
||||
add_memory_region(0, memsize, BOOT_MEM_RAM);
|
||||
}
|
||||
|
||||
void prom_putchar(unsigned char c)
|
||||
{
|
||||
alchemy_uart_putchar(UART0_PHYS_ADDR, c);
|
||||
}
|
183
arch/mips/alchemy/gpr/platform.c
Normal file
183
arch/mips/alchemy/gpr/platform.c
Normal file
@ -0,0 +1,183 @@
|
||||
/*
|
||||
* GPR board platform device registration
|
||||
*
|
||||
* Copyright (C) 2010 Wolfgang Grandegger <wg@denx.de>
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c-gpio.h>
|
||||
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
|
||||
/*
|
||||
* Watchdog
|
||||
*/
|
||||
static struct resource gpr_wdt_resource[] = {
|
||||
[0] = {
|
||||
.start = 1,
|
||||
.end = 1,
|
||||
.name = "gpr-adm6320-wdt",
|
||||
.flags = IORESOURCE_IRQ,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device gpr_wdt_device = {
|
||||
.name = "adm6320-wdt",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(gpr_wdt_resource),
|
||||
.resource = gpr_wdt_resource,
|
||||
};
|
||||
|
||||
/*
|
||||
* FLASH
|
||||
*
|
||||
* 0x00000000-0x00200000 : "kernel"
|
||||
* 0x00200000-0x00a00000 : "rootfs"
|
||||
* 0x01d00000-0x01f00000 : "config"
|
||||
* 0x01c00000-0x01d00000 : "yamon"
|
||||
* 0x01d00000-0x01d40000 : "yamon env vars"
|
||||
* 0x00000000-0x00a00000 : "kernel+rootfs"
|
||||
*/
|
||||
static struct mtd_partition gpr_mtd_partitions[] = {
|
||||
{
|
||||
.name = "kernel",
|
||||
.size = 0x00200000,
|
||||
.offset = 0,
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.size = 0x00800000,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
.mask_flags = MTD_WRITEABLE,
|
||||
},
|
||||
{
|
||||
.name = "config",
|
||||
.size = 0x00200000,
|
||||
.offset = 0x01d00000,
|
||||
},
|
||||
{
|
||||
.name = "yamon",
|
||||
.size = 0x00100000,
|
||||
.offset = 0x01c00000,
|
||||
},
|
||||
{
|
||||
.name = "yamon env vars",
|
||||
.size = 0x00040000,
|
||||
.offset = MTDPART_OFS_APPEND,
|
||||
},
|
||||
{
|
||||
.name = "kernel+rootfs",
|
||||
.size = 0x00a00000,
|
||||
.offset = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data gpr_flash_data = {
|
||||
.width = 4,
|
||||
.nr_parts = ARRAY_SIZE(gpr_mtd_partitions),
|
||||
.parts = gpr_mtd_partitions,
|
||||
};
|
||||
|
||||
static struct resource gpr_mtd_resource = {
|
||||
.start = 0x1e000000,
|
||||
.end = 0x1fffffff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device gpr_mtd_device = {
|
||||
.name = "physmap-flash",
|
||||
.dev = {
|
||||
.platform_data = &gpr_flash_data,
|
||||
},
|
||||
.num_resources = 1,
|
||||
.resource = &gpr_mtd_resource,
|
||||
};
|
||||
|
||||
/*
|
||||
* LEDs
|
||||
*/
|
||||
static struct gpio_led gpr_gpio_leds[] = {
|
||||
{ /* green */
|
||||
.name = "gpr:green",
|
||||
.gpio = 4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{ /* red */
|
||||
.name = "gpr:red",
|
||||
.gpio = 5,
|
||||
.active_low = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data gpr_led_data = {
|
||||
.num_leds = ARRAY_SIZE(gpr_gpio_leds),
|
||||
.leds = gpr_gpio_leds,
|
||||
};
|
||||
|
||||
static struct platform_device gpr_led_devices = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &gpr_led_data,
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* I2C
|
||||
*/
|
||||
static struct i2c_gpio_platform_data gpr_i2c_data = {
|
||||
.sda_pin = 209,
|
||||
.sda_is_open_drain = 1,
|
||||
.scl_pin = 210,
|
||||
.scl_is_open_drain = 1,
|
||||
.udelay = 2, /* ~100 kHz */
|
||||
.timeout = HZ,
|
||||
};
|
||||
|
||||
static struct platform_device gpr_i2c_device = {
|
||||
.name = "i2c-gpio",
|
||||
.id = -1,
|
||||
.dev.platform_data = &gpr_i2c_data,
|
||||
};
|
||||
|
||||
static struct i2c_board_info gpr_i2c_info[] __initdata = {
|
||||
{
|
||||
I2C_BOARD_INFO("lm83", 0x18),
|
||||
.type = "lm83"
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device *gpr_devices[] __initdata = {
|
||||
&gpr_wdt_device,
|
||||
&gpr_mtd_device,
|
||||
&gpr_i2c_device,
|
||||
&gpr_led_devices,
|
||||
};
|
||||
|
||||
static int __init gpr_dev_init(void)
|
||||
{
|
||||
i2c_register_board_info(0, gpr_i2c_info, ARRAY_SIZE(gpr_i2c_info));
|
||||
|
||||
return platform_add_devices(gpr_devices, ARRAY_SIZE(gpr_devices));
|
||||
}
|
||||
device_initcall(gpr_dev_init);
|
@ -6,7 +6,4 @@
|
||||
# Makefile for 4G Systems MTX-1 board.
|
||||
#
|
||||
|
||||
lib-y := init.o board_setup.o
|
||||
obj-y := platform.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
obj-y += init.o board_setup.o platform.o
|
||||
|
@ -60,9 +60,11 @@ static void mtx1_reset(char *c)
|
||||
|
||||
static void mtx1_power_off(void)
|
||||
{
|
||||
printk(KERN_ALERT "It's now safe to remove power\n");
|
||||
while (1)
|
||||
asm volatile (".set mips3 ; wait ; .set mips1");
|
||||
asm volatile (
|
||||
" .set mips32 \n"
|
||||
" wait \n"
|
||||
" .set mips0 \n");
|
||||
}
|
||||
|
||||
void __init board_setup(void)
|
||||
@ -105,14 +107,10 @@ void __init board_setup(void)
|
||||
int
|
||||
mtx1_pci_idsel(unsigned int devsel, int assert)
|
||||
{
|
||||
#define MTX_IDSEL_ONLY_0_AND_3 0
|
||||
#if MTX_IDSEL_ONLY_0_AND_3
|
||||
if (devsel != 0 && devsel != 3) {
|
||||
printk(KERN_ERR "*** not 0 or 3\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This function is only necessary to support a proprietary Cardbus
|
||||
* adapter on the mtx-1 "singleboard" variant. It triggers a custom
|
||||
* logic chip connected to EXT_IO3 (GPIO1) to suppress IDSEL signals.
|
||||
*/
|
||||
if (assert && devsel != 0)
|
||||
/* Suppress signal to Cardbus */
|
||||
alchemy_gpio_set_value(1, 0); /* set EXT_IO3 OFF */
|
||||
|
@ -5,6 +5,4 @@
|
||||
# Makefile for MyCable XXS1500 board.
|
||||
#
|
||||
|
||||
lib-y := init.o board_setup.o platform.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
obj-y += init.o board_setup.o platform.o
|
||||
|
@ -42,9 +42,11 @@ static void xxs1500_reset(char *c)
|
||||
|
||||
static void xxs1500_power_off(void)
|
||||
{
|
||||
printk(KERN_ALERT "It's now safe to remove power\n");
|
||||
while (1)
|
||||
asm volatile (".set mips3 ; wait ; .set mips1");
|
||||
asm volatile (
|
||||
" .set mips32 \n"
|
||||
" wait \n"
|
||||
" .set mips0 \n");
|
||||
}
|
||||
|
||||
void __init board_setup(void)
|
||||
|
@ -8,4 +8,3 @@ obj-y := \
|
||||
platform.o \
|
||||
gpio.o \
|
||||
clock.o
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
6
arch/mips/ar7/Platform
Normal file
6
arch/mips/ar7/Platform
Normal file
@ -0,0 +1,6 @@
|
||||
#
|
||||
# Texas Instruments AR7
|
||||
#
|
||||
platform-$(CONFIG_AR7) += ar7/
|
||||
cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7
|
||||
load-$(CONFIG_AR7) += 0xffffffff94100000
|
@ -292,40 +292,28 @@ static struct platform_device cpmac_high = {
|
||||
.num_resources = ARRAY_SIZE(cpmac_high_res),
|
||||
};
|
||||
|
||||
static inline unsigned char char2hex(char h)
|
||||
static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
|
||||
{
|
||||
switch (h) {
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
return h - '0';
|
||||
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
|
||||
return h - 'A' + 10;
|
||||
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
|
||||
return h - 'a' + 10;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
char name[5], *mac;
|
||||
|
||||
static void cpmac_get_mac(int instance, unsigned char *dev_addr)
|
||||
{
|
||||
int i;
|
||||
char name[5], default_mac[ETH_ALEN], *mac;
|
||||
|
||||
mac = NULL;
|
||||
sprintf(name, "mac%c", 'a' + instance);
|
||||
mac = prom_getenv(name);
|
||||
if (!mac) {
|
||||
if (!mac && instance) {
|
||||
sprintf(name, "mac%c", 'a');
|
||||
mac = prom_getenv(name);
|
||||
}
|
||||
if (!mac) {
|
||||
random_ether_addr(default_mac);
|
||||
mac = default_mac;
|
||||
}
|
||||
for (i = 0; i < 6; i++)
|
||||
dev_addr[i] = (char2hex(mac[i * 3]) << 4) +
|
||||
char2hex(mac[i * 3 + 1]);
|
||||
|
||||
if (mac) {
|
||||
if (sscanf(mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
|
||||
&dev_addr[0], &dev_addr[1],
|
||||
&dev_addr[2], &dev_addr[3],
|
||||
&dev_addr[4], &dev_addr[5]) != 6) {
|
||||
pr_warning("cannot parse mac address, "
|
||||
"using random address\n");
|
||||
random_ether_addr(dev_addr);
|
||||
}
|
||||
} else
|
||||
random_ether_addr(dev_addr);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
7
arch/mips/bcm47xx/Platform
Normal file
7
arch/mips/bcm47xx/Platform
Normal file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Broadcom BCM47XX boards
|
||||
#
|
||||
platform-$(CONFIG_BCM47XX) += bcm47xx/
|
||||
cflags-$(CONFIG_BCM47XX) += \
|
||||
-I$(srctree)/arch/mips/include/asm/mach-bcm47xx
|
||||
load-$(CONFIG_BCM47XX) := 0xffffffff80001000
|
@ -69,7 +69,7 @@ int nvram_getenv(char *name, char *val, size_t val_len)
|
||||
char *var, *value, *end, *eq;
|
||||
|
||||
if (!name)
|
||||
return 1;
|
||||
return NVRAM_ERR_INV_PARAM;
|
||||
|
||||
if (!nvram_buf[0])
|
||||
early_nvram_init();
|
||||
@ -89,6 +89,6 @@ int nvram_getenv(char *name, char *val, size_t val_len)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return NVRAM_ERR_ENVNOTFOUND;
|
||||
}
|
||||
EXPORT_SYMBOL(nvram_getenv);
|
||||
|
@ -126,6 +126,7 @@ static __init void prom_init_cmdline(void)
|
||||
static __init void prom_init_mem(void)
|
||||
{
|
||||
unsigned long mem;
|
||||
unsigned long max;
|
||||
|
||||
/* Figure out memory size by finding aliases.
|
||||
*
|
||||
@ -134,21 +135,26 @@ static __init void prom_init_mem(void)
|
||||
* want to reuse the memory used by CFE (around 4MB). That means cfe_*
|
||||
* functions stop to work at some point during the boot, we should only
|
||||
* call them at the beginning of the boot.
|
||||
*
|
||||
* BCM47XX uses 128MB for addressing the ram, if the system contains
|
||||
* less that that amount of ram it remaps the ram more often into the
|
||||
* available space.
|
||||
* Accessing memory after 128MB will cause an exception.
|
||||
* max contains the biggest possible address supported by the platform.
|
||||
* If the method wants to try something above we assume 128MB ram.
|
||||
*/
|
||||
max = ((unsigned long)(prom_init) | ((128 << 20) - 1));
|
||||
for (mem = (1 << 20); mem < (128 << 20); mem += (1 << 20)) {
|
||||
if (((unsigned long)(prom_init) + mem) > max) {
|
||||
mem = (128 << 20);
|
||||
printk(KERN_DEBUG "assume 128MB RAM\n");
|
||||
break;
|
||||
}
|
||||
if (*(unsigned long *)((unsigned long)(prom_init) + mem) ==
|
||||
*(unsigned long *)(prom_init))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Ignoring the last page when ddr size is 128M. Cached
|
||||
* accesses to last page is causing the processor to prefetch
|
||||
* using address above 128M stepping out of the ddr address
|
||||
* space.
|
||||
*/
|
||||
if (mem == 0x8000000)
|
||||
mem -= 0x1000;
|
||||
|
||||
add_memory_region(0, mem, BOOT_MEM_RAM);
|
||||
}
|
||||
|
||||
|
@ -3,5 +3,3 @@ obj-y += clk.o cpu.o cs.o gpio.o irq.o prom.o setup.o timer.o \
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-y += boards/
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
7
arch/mips/bcm63xx/Platform
Normal file
7
arch/mips/bcm63xx/Platform
Normal file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Broadcom BCM63XX boards
|
||||
#
|
||||
platform-$(CONFIG_BCM63XX) += bcm63xx/
|
||||
cflags-$(CONFIG_BCM63XX) += \
|
||||
-I$(srctree)/arch/mips/include/asm/mach-bcm63xx/
|
||||
load-$(CONFIG_BCM63XX) := 0xffffffff80010000
|
1
arch/mips/boot/.gitignore
vendored
1
arch/mips/boot/.gitignore
vendored
@ -3,3 +3,4 @@ elf2ecoff
|
||||
vmlinux.*
|
||||
zImage
|
||||
zImage.tmp
|
||||
calc_vmlinuz_load_addr
|
||||
|
@ -11,35 +11,32 @@
|
||||
# Some DECstations need all possible sections of an ECOFF executable
|
||||
#
|
||||
ifdef CONFIG_MACH_DECSTATION
|
||||
E2EFLAGS = -a
|
||||
else
|
||||
E2EFLAGS =
|
||||
e2eflag := -a
|
||||
endif
|
||||
|
||||
#
|
||||
# Drop some uninteresting sections in the kernel.
|
||||
# This is only relevant for ELF kernels but doesn't hurt a.out
|
||||
#
|
||||
drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options
|
||||
strip-flags = $(addprefix --remove-section=,$(drop-sections))
|
||||
drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options
|
||||
strip-flags := $(addprefix --remove-section=,$(drop-sections))
|
||||
|
||||
VMLINUX = vmlinux
|
||||
hostprogs-y := elf2ecoff
|
||||
|
||||
all: vmlinux.ecoff vmlinux.srec
|
||||
targets := vmlinux.ecoff
|
||||
quiet_cmd_ecoff = ECOFF $@
|
||||
cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $@ $(e2eflag)
|
||||
$(obj)/vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) FORCE
|
||||
$(call if_changed,ecoff)
|
||||
|
||||
vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX)
|
||||
$(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS)
|
||||
targets += vmlinux.bin
|
||||
quiet_cmd_bin = OBJCOPY $@
|
||||
cmd_bin = $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $@
|
||||
$(obj)/vmlinux.bin: $(VMLINUX) FORCE
|
||||
$(call if_changed,bin)
|
||||
|
||||
$(obj)/elf2ecoff: $(obj)/elf2ecoff.c
|
||||
$(HOSTCC) -o $@ $^
|
||||
|
||||
vmlinux.bin: $(VMLINUX)
|
||||
$(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin
|
||||
|
||||
vmlinux.srec: $(VMLINUX)
|
||||
$(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec
|
||||
|
||||
clean-files += elf2ecoff \
|
||||
vmlinux.bin \
|
||||
vmlinux.ecoff \
|
||||
vmlinux.srec
|
||||
targets += vmlinux.srec
|
||||
quiet_cmd_srec = OBJCOPY $@
|
||||
cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $@
|
||||
$(obj)/vmlinux.srec: $(VMLINUX) FORCE
|
||||
$(call if_changed,srec)
|
||||
|
@ -12,14 +12,6 @@
|
||||
# Author: Wu Zhangjin <wuzhangjin@gmail.com>
|
||||
#
|
||||
|
||||
# compressed kernel load addr: VMLINUZ_LOAD_ADDRESS > VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE
|
||||
VMLINUX_SIZE := $(shell wc -c $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | cut -d' ' -f1)
|
||||
VMLINUX_SIZE := $(shell [ -n "$(VMLINUX_SIZE)" ] && echo -n $$(($(VMLINUX_SIZE) + (65536 - $(VMLINUX_SIZE) % 65536))))
|
||||
# VMLINUZ_LOAD_ADDRESS = concat "high32 of VMLINUX_LOAD_ADDRESS" and "(low32 of VMLINUX_LOAD_ADDRESS) + VMLINUX_SIZE"
|
||||
HIGH32 := $(shell A=$(VMLINUX_LOAD_ADDRESS); [ $${\#A} -gt 10 ] && expr substr "$(VMLINUX_LOAD_ADDRESS)" 3 $$(($${\#A} - 10)))
|
||||
LOW32 := $(shell [ -n "$(HIGH32)" ] && A=11 || A=3; expr substr "$(VMLINUX_LOAD_ADDRESS)" $${A} 8)
|
||||
VMLINUZ_LOAD_ADDRESS := 0x$(shell [ -n "$(VMLINUX_SIZE)" -a -n "$(LOW32)" ] && printf "$(HIGH32)%08x" $$(($(VMLINUX_SIZE) + 0x$(LOW32))))
|
||||
|
||||
# set the default size of the mallocing area for decompressing
|
||||
BOOT_HEAP_SIZE := 0x400000
|
||||
|
||||
@ -33,49 +25,61 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
|
||||
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
|
||||
-DKERNEL_ENTRY=0x$(shell $(NM) $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | grep " kernel_entry" | cut -f1 -d \ )
|
||||
|
||||
obj-y := $(obj)/head.o $(obj)/decompress.o $(obj)/dbg.o
|
||||
targets := head.o decompress.o dbg.o uart-16550.o uart-alchemy.o
|
||||
|
||||
# decompressor objects (linked with vmlinuz)
|
||||
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/dbg.o
|
||||
|
||||
ifdef CONFIG_DEBUG_ZBOOT
|
||||
obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
|
||||
obj-$(CONFIG_MACH_ALCHEMY) += $(obj)/uart-alchemy.o
|
||||
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
|
||||
vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
|
||||
endif
|
||||
|
||||
targets += vmlinux.bin
|
||||
OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S
|
||||
$(obj)/vmlinux.bin: $(KBUILD_IMAGE)
|
||||
$(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
suffix_$(CONFIG_KERNEL_GZIP) = gz
|
||||
suffix_$(CONFIG_KERNEL_BZIP2) = bz2
|
||||
suffix_$(CONFIG_KERNEL_LZMA) = lzma
|
||||
suffix_$(CONFIG_KERNEL_LZO) = lzo
|
||||
tool_$(CONFIG_KERNEL_GZIP) = gzip
|
||||
tool_$(CONFIG_KERNEL_BZIP2) = bzip2
|
||||
tool_$(CONFIG_KERNEL_LZMA) = lzma
|
||||
tool_$(CONFIG_KERNEL_LZO) = lzo
|
||||
$(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin
|
||||
|
||||
targets += vmlinux.bin.z
|
||||
$(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,$(tool_y))
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.$(suffix_y) $(obj)/dummy.o
|
||||
$(Q)$(OBJCOPY) $(OBJCOPYFLAGS) \
|
||||
--add-section=.image=$< \
|
||||
--set-section-flags=.image=contents,alloc,load,readonly,data \
|
||||
$(obj)/dummy.o $@
|
||||
targets += piggy.o
|
||||
OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \
|
||||
--set-section-flags=.image=contents,alloc,load,readonly,data
|
||||
$(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
LDFLAGS_vmlinuz := $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T
|
||||
vmlinuz: $(src)/ld.script $(obj-y) $(obj)/piggy.o
|
||||
$(call if_changed,ld)
|
||||
$(Q)$(OBJCOPY) $(OBJCOPYFLAGS) $@
|
||||
# Calculate the load address of the compressed kernel image
|
||||
hostprogs-y := calc_vmlinuz_load_addr
|
||||
|
||||
VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
|
||||
$(objtree)/$(KBUILD_IMAGE) $(VMLINUX_LOAD_ADDRESS))
|
||||
|
||||
vmlinuzobjs-y += $(obj)/piggy.o
|
||||
|
||||
quiet_cmd_zld = LD $@
|
||||
cmd_zld = $(LD) $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@
|
||||
quiet_cmd_strip = STRIP $@
|
||||
cmd_strip = $(STRIP) -s $@
|
||||
vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr
|
||||
$(call cmd,zld)
|
||||
$(call cmd,strip)
|
||||
|
||||
#
|
||||
# Some DECstations need all possible sections of an ECOFF executable
|
||||
#
|
||||
ifdef CONFIG_MACH_DECSTATION
|
||||
E2EFLAGS = -a
|
||||
else
|
||||
E2EFLAGS =
|
||||
e2eflag := -a
|
||||
endif
|
||||
|
||||
# elf2ecoff can only handle 32bit image
|
||||
hostprogs-y += ../elf2ecoff
|
||||
|
||||
ifdef CONFIG_32BIT
|
||||
VMLINUZ = vmlinuz
|
||||
@ -83,23 +87,22 @@ else
|
||||
VMLINUZ = vmlinuz.32
|
||||
endif
|
||||
|
||||
quiet_cmd_32 = OBJCOPY $@
|
||||
cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
|
||||
vmlinuz.32: vmlinuz
|
||||
$(Q)$(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
|
||||
$(call cmd,32)
|
||||
|
||||
quiet_cmd_ecoff = ECOFF $@
|
||||
cmd_ecoff = $< $(VMLINUZ) $@ $(e2eflag)
|
||||
vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ)
|
||||
$(Q)$(obj)/../elf2ecoff $(VMLINUZ) vmlinuz.ecoff $(E2EFLAGS)
|
||||
|
||||
$(obj)/../elf2ecoff: $(src)/../elf2ecoff.c
|
||||
$(Q)$(HOSTCC) -o $@ $^
|
||||
$(call cmd,ecoff)
|
||||
|
||||
OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary
|
||||
vmlinuz.bin: vmlinuz
|
||||
$(call if_changed,objcopy)
|
||||
$(call cmd,objcopy)
|
||||
|
||||
OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec
|
||||
vmlinuz.srec: vmlinuz
|
||||
$(call if_changed,objcopy)
|
||||
$(call cmd,objcopy)
|
||||
|
||||
clean:
|
||||
clean-files += *.o \
|
||||
vmlinu*
|
||||
clean-files := $(objtree)/vmlinuz.*
|
||||
|
57
arch/mips/boot/compressed/calc_vmlinuz_load_addr.c
Normal file
57
arch/mips/boot/compressed/calc_vmlinuz_load_addr.c
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2010 "Wu Zhangjin" <wuzhangjin@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct stat sb;
|
||||
uint64_t vmlinux_size, vmlinux_load_addr, vmlinuz_load_addr;
|
||||
|
||||
if (argc != 3) {
|
||||
fprintf(stderr, "Usage: %s <pathname> <vmlinux_load_addr>\n",
|
||||
argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (stat(argv[1], &sb) == -1) {
|
||||
perror("stat");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Convert hex characters to dec number */
|
||||
errno = 0;
|
||||
if (sscanf(argv[2], "%llx", &vmlinux_load_addr) != 1) {
|
||||
if (errno != 0)
|
||||
perror("sscanf");
|
||||
else
|
||||
fprintf(stderr, "No matching characters\n");
|
||||
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
vmlinux_size = (uint64_t)sb.st_size;
|
||||
vmlinuz_load_addr = vmlinux_load_addr + vmlinux_size;
|
||||
|
||||
/*
|
||||
* Align with 16 bytes: "greater than that used for any standard data
|
||||
* types by a MIPS compiler." -- See MIPS Run Linux (Second Edition).
|
||||
*/
|
||||
|
||||
vmlinuz_load_addr += (16 - vmlinux_size % 16);
|
||||
|
||||
printf("0x%llx\n", vmlinuz_load_addr);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
/*
|
||||
* Misc. bootloader code for many machines.
|
||||
*
|
||||
* Copyright 2001 MontaVista Software Inc.
|
||||
* Author: Matt Porter <mporter@mvista.com> Derived from
|
||||
* arch/ppc/boot/prep/misc.c
|
||||
* Author: Matt Porter <mporter@mvista.com>
|
||||
*
|
||||
* Copyright (C) 2009 Lemote, Inc.
|
||||
* Author: Wu Zhangjin <wuzhangjin@gmail.com>
|
||||
@ -19,12 +16,12 @@
|
||||
|
||||
#include <asm/addrspace.h>
|
||||
|
||||
/* These two variables specify the free mem region
|
||||
/*
|
||||
* These two variables specify the free mem region
|
||||
* that can be used for temporary malloc area
|
||||
*/
|
||||
unsigned long free_mem_ptr;
|
||||
unsigned long free_mem_end_ptr;
|
||||
char *zimage_start;
|
||||
|
||||
/* The linker tells us where the image is. */
|
||||
extern unsigned char __image_begin, __image_end;
|
||||
@ -83,38 +80,31 @@ void *memset(void *s, int c, size_t n)
|
||||
|
||||
void decompress_kernel(unsigned long boot_heap_start)
|
||||
{
|
||||
int zimage_size;
|
||||
unsigned long zimage_start, zimage_size;
|
||||
|
||||
/*
|
||||
* We link ourself to an arbitrary low address. When we run, we
|
||||
* relocate outself to that address. __image_beign points to
|
||||
* the part of the image where the zImage is. -- Tom
|
||||
*/
|
||||
zimage_start = (char *)(unsigned long)(&__image_begin);
|
||||
zimage_start = (unsigned long)(&__image_begin);
|
||||
zimage_size = (unsigned long)(&__image_end) -
|
||||
(unsigned long)(&__image_begin);
|
||||
|
||||
/*
|
||||
* The zImage and initrd will be between start and _end, so they've
|
||||
* already been moved once. We're good to go now. -- Tom
|
||||
*/
|
||||
puts("zimage at: ");
|
||||
puthex((unsigned long)zimage_start);
|
||||
puthex(zimage_start);
|
||||
puts(" ");
|
||||
puthex((unsigned long)(zimage_size + zimage_start));
|
||||
puthex(zimage_size + zimage_start);
|
||||
puts("\n");
|
||||
|
||||
/* this area are prepared for mallocing when decompressing */
|
||||
/* This area are prepared for mallocing when decompressing */
|
||||
free_mem_ptr = boot_heap_start;
|
||||
free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE;
|
||||
|
||||
/* Display standard Linux/MIPS boot prompt for kernel args */
|
||||
/* Display standard Linux/MIPS boot prompt */
|
||||
puts("Uncompressing Linux at load address ");
|
||||
puthex(VMLINUX_LOAD_ADDRESS_ULL);
|
||||
puts("\n");
|
||||
|
||||
/* Decompress the kernel with according algorithm */
|
||||
decompress(zimage_start, zimage_size, 0, 0,
|
||||
decompress((char *)zimage_start, zimage_size, 0, 0,
|
||||
(void *)VMLINUX_LOAD_ADDRESS_ULL, 0, error);
|
||||
/* FIXME: is there a need to flush cache here? */
|
||||
|
||||
/* FIXME: should we flush cache here? */
|
||||
puts("Now, booting the kernel...\n");
|
||||
}
|
||||
|
@ -2,61 +2,44 @@
|
||||
* ld.script for compressed kernel support of MIPS
|
||||
*
|
||||
* Copyright (C) 2009 Lemote Inc.
|
||||
* Author: Wu Zhangjin <wuzj@lemote.com>
|
||||
* Author: Wu Zhangjin <wuzhanjing@gmail.com>
|
||||
* Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com>
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(mips)
|
||||
ENTRY(start)
|
||||
SECTIONS
|
||||
{
|
||||
/* . = VMLINUZ_LOAD_ADDRESS */
|
||||
/* read-only */
|
||||
_text = .; /* Text and read-only data */
|
||||
.text : {
|
||||
_ftext = . ;
|
||||
/* Text and read-only data */
|
||||
/* . = VMLINUZ_LOAD_ADDRESS; */
|
||||
.text : {
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
} = 0
|
||||
_etext = .; /* End of text section */
|
||||
}
|
||||
/* End of text section */
|
||||
|
||||
/* writable */
|
||||
.data : { /* Data */
|
||||
_fdata = . ;
|
||||
/* Writable data */
|
||||
.data : {
|
||||
*(.data)
|
||||
/* Put the compressed image here, so bss is on the end. */
|
||||
/* Put the compressed image here */
|
||||
__image_begin = .;
|
||||
*(.image)
|
||||
__image_end = .;
|
||||
CONSTRUCTORS
|
||||
}
|
||||
.sdata : { *(.sdata) }
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* End of data section */
|
||||
. = ALIGN(16);
|
||||
_edata = .;
|
||||
/* End of data section */
|
||||
|
||||
/* BSS */
|
||||
__bss_start = .;
|
||||
_fbss = .;
|
||||
.sbss : { *(.sbss) *(.scommon) }
|
||||
.bss : {
|
||||
*(.dynbss)
|
||||
.bss : {
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
_end = . ;
|
||||
|
||||
/* These are needed for ELF backends which have not yet been converted
|
||||
* to the new style linker. */
|
||||
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
|
||||
/* These must appear regardless of . */
|
||||
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
|
||||
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
|
||||
. = ALIGN(16);
|
||||
_end = .;
|
||||
|
||||
/* Sections to be discarded */
|
||||
/DISCARD/ : {
|
||||
/DISCARD/ : {
|
||||
*(.MIPS.options)
|
||||
*(.options)
|
||||
*(.pdr)
|
||||
|
@ -12,7 +12,6 @@
|
||||
obj-y := cpu.o setup.o serial.o octeon-platform.o octeon-irq.o csrc-octeon.o
|
||||
obj-y += dma-octeon.o flash_setup.o
|
||||
obj-y += octeon-memcpy.o
|
||||
obj-y += executive/
|
||||
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
11
arch/mips/cavium-octeon/Platform
Normal file
11
arch/mips/cavium-octeon/Platform
Normal file
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Cavium Octeon
|
||||
#
|
||||
platform-$(CONFIG_CPU_CAVIUM_OCTEON) += cavium-octeon/
|
||||
cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += \
|
||||
-I$(srctree)/arch/mips/include/asm/mach-cavium-octeon
|
||||
ifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL
|
||||
load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff84100000
|
||||
else
|
||||
load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff81100000
|
||||
endif
|
@ -41,12 +41,8 @@ static int cnmips_cu2_call(struct notifier_block *nfb, unsigned long action,
|
||||
return NOTIFY_OK; /* Let default notifier send signals */
|
||||
}
|
||||
|
||||
static struct notifier_block cnmips_cu2_notifier = {
|
||||
.notifier_call = cnmips_cu2_call,
|
||||
};
|
||||
|
||||
static int cnmips_cu2_setup(void)
|
||||
{
|
||||
return register_cu2_notifier(&cnmips_cu2_notifier);
|
||||
return cu2_notifier(cnmips_cu2_call, 0);
|
||||
}
|
||||
early_initcall(cnmips_cu2_setup);
|
||||
|
@ -53,7 +53,6 @@ static struct clocksource clocksource_mips = {
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
/* 64-bit arithmatic can overflow, so use 128-bit. */
|
||||
#if (__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 3))
|
||||
u64 t1, t2, t3;
|
||||
unsigned long long rv;
|
||||
u64 mult = clocksource_mips.mult;
|
||||
@ -73,13 +72,6 @@ unsigned long long notrace sched_clock(void)
|
||||
: [cnt] "r" (cnt), [mult] "r" (mult), [shift] "r" (shift)
|
||||
: "hi", "lo");
|
||||
return rv;
|
||||
#else
|
||||
/* GCC > 4.3 do it the easy way. */
|
||||
unsigned int __attribute__((mode(TI))) t;
|
||||
t = read_c0_cvmcount();
|
||||
t = t * clocksource_mips.mult;
|
||||
return (unsigned long long)(t >> clocksource_mips.shift);
|
||||
#endif
|
||||
}
|
||||
|
||||
void __init plat_time_init(void)
|
||||
@ -88,3 +80,58 @@ void __init plat_time_init(void)
|
||||
clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
|
||||
clocksource_register(&clocksource_mips);
|
||||
}
|
||||
|
||||
static u64 octeon_udelay_factor;
|
||||
static u64 octeon_ndelay_factor;
|
||||
|
||||
void __init octeon_setup_delays(void)
|
||||
{
|
||||
octeon_udelay_factor = octeon_get_clock_rate() / 1000000;
|
||||
/*
|
||||
* For __ndelay we divide by 2^16, so the factor is multiplied
|
||||
* by the same amount.
|
||||
*/
|
||||
octeon_ndelay_factor = (octeon_udelay_factor * 0x10000ull) / 1000ull;
|
||||
|
||||
preset_lpj = octeon_get_clock_rate() / HZ;
|
||||
}
|
||||
|
||||
void __udelay(unsigned long us)
|
||||
{
|
||||
u64 cur, end, inc;
|
||||
|
||||
cur = read_c0_cvmcount();
|
||||
|
||||
inc = us * octeon_udelay_factor;
|
||||
end = cur + inc;
|
||||
|
||||
while (end > cur)
|
||||
cur = read_c0_cvmcount();
|
||||
}
|
||||
EXPORT_SYMBOL(__udelay);
|
||||
|
||||
void __ndelay(unsigned long ns)
|
||||
{
|
||||
u64 cur, end, inc;
|
||||
|
||||
cur = read_c0_cvmcount();
|
||||
|
||||
inc = ((ns * octeon_ndelay_factor) >> 16);
|
||||
end = cur + inc;
|
||||
|
||||
while (end > cur)
|
||||
cur = read_c0_cvmcount();
|
||||
}
|
||||
EXPORT_SYMBOL(__ndelay);
|
||||
|
||||
void __delay(unsigned long loops)
|
||||
{
|
||||
u64 cur, end;
|
||||
|
||||
cur = read_c0_cvmcount();
|
||||
end = cur + loops;
|
||||
|
||||
while (end > cur)
|
||||
cur = read_c0_cvmcount();
|
||||
}
|
||||
EXPORT_SYMBOL(__delay);
|
||||
|
@ -99,13 +99,16 @@ dma_addr_t octeon_map_dma_mem(struct device *dev, void *ptr, size_t size)
|
||||
panic("dma_map_single: "
|
||||
"Attempt to map illegal memory address 0x%llx\n",
|
||||
physical);
|
||||
else if ((physical + size >=
|
||||
(4ull<<30) - (OCTEON_PCI_BAR1_HOLE_SIZE<<20))
|
||||
&& physical < (4ull<<30))
|
||||
pr_warning("dma_map_single: Warning: "
|
||||
"Mapping memory address that might "
|
||||
"conflict with devices 0x%llx-0x%llx\n",
|
||||
physical, physical+size-1);
|
||||
else if (physical >= CVMX_PCIE_BAR1_PHYS_BASE &&
|
||||
physical + size < (CVMX_PCIE_BAR1_PHYS_BASE + CVMX_PCIE_BAR1_PHYS_SIZE)) {
|
||||
result = physical - CVMX_PCIE_BAR1_PHYS_BASE + CVMX_PCIE_BAR1_RC_BASE;
|
||||
|
||||
if (((result+size-1) & dma_mask) != result+size-1)
|
||||
panic("dma_map_single: Attempt to map address 0x%llx-0x%llx, which can't be accessed according to the dma mask 0x%llx\n",
|
||||
physical, physical+size-1, dma_mask);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* The 2nd 256MB is mapped at 256<<20 instead of 0x410000000 */
|
||||
if ((physical >= 0x410000000ull) && physical < 0x420000000ull)
|
||||
result = physical - 0x400000000ull;
|
||||
|
@ -3,15 +3,13 @@
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2004-2008 Cavium Networks
|
||||
* Copyright (C) 2004-2008, 2009, 2010 Cavium Networks
|
||||
*/
|
||||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/smp.h>
|
||||
|
||||
#include <asm/octeon/octeon.h>
|
||||
#include <asm/octeon/cvmx-pexp-defs.h>
|
||||
#include <asm/octeon/cvmx-npi-defs.h>
|
||||
|
||||
static DEFINE_RAW_SPINLOCK(octeon_irq_ciu0_lock);
|
||||
static DEFINE_RAW_SPINLOCK(octeon_irq_ciu1_lock);
|
||||
@ -41,14 +39,14 @@ static void octeon_irq_core_ack(unsigned int irq)
|
||||
|
||||
static void octeon_irq_core_eoi(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc = irq_desc + irq;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
unsigned int bit = irq - OCTEON_IRQ_SW0;
|
||||
/*
|
||||
* If an IRQ is being processed while we are disabling it the
|
||||
* handler will attempt to unmask the interrupt after it has
|
||||
* been disabled.
|
||||
*/
|
||||
if (desc->status & IRQ_DISABLED)
|
||||
if ((unlikely(desc->status & IRQ_DISABLED)))
|
||||
return;
|
||||
/*
|
||||
* We don't need to disable IRQs to make these atomic since
|
||||
@ -106,6 +104,29 @@ static struct irq_chip octeon_irq_chip_core = {
|
||||
|
||||
static void octeon_irq_ciu0_ack(unsigned int irq)
|
||||
{
|
||||
switch (irq) {
|
||||
case OCTEON_IRQ_GMX_DRP0:
|
||||
case OCTEON_IRQ_GMX_DRP1:
|
||||
case OCTEON_IRQ_IPD_DRP:
|
||||
case OCTEON_IRQ_KEY_ZERO:
|
||||
case OCTEON_IRQ_TIMER0:
|
||||
case OCTEON_IRQ_TIMER1:
|
||||
case OCTEON_IRQ_TIMER2:
|
||||
case OCTEON_IRQ_TIMER3:
|
||||
{
|
||||
int index = cvmx_get_core_num() * 2;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
/*
|
||||
* CIU timer type interrupts must be acknoleged by
|
||||
* writing a '1' bit to their sum0 bit.
|
||||
*/
|
||||
cvmx_write_csr(CVMX_CIU_INTX_SUM0(index), mask);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* In order to avoid any locking accessing the CIU, we
|
||||
* acknowledge CIU interrupts by disabling all of them. This
|
||||
@ -130,7 +151,53 @@ static void octeon_irq_ciu0_eoi(unsigned int irq)
|
||||
set_c0_status(0x100 << 2);
|
||||
}
|
||||
|
||||
static int next_coreid_for_irq(struct irq_desc *desc)
|
||||
{
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
int coreid;
|
||||
int weight = cpumask_weight(desc->affinity);
|
||||
|
||||
if (weight > 1) {
|
||||
int cpu = smp_processor_id();
|
||||
for (;;) {
|
||||
cpu = cpumask_next(cpu, desc->affinity);
|
||||
if (cpu >= nr_cpu_ids) {
|
||||
cpu = -1;
|
||||
continue;
|
||||
} else if (cpumask_test_cpu(cpu, cpu_online_mask)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
coreid = octeon_coreid_for_cpu(cpu);
|
||||
} else if (weight == 1) {
|
||||
coreid = octeon_coreid_for_cpu(cpumask_first(desc->affinity));
|
||||
} else {
|
||||
coreid = cvmx_get_core_num();
|
||||
}
|
||||
return coreid;
|
||||
#else
|
||||
return cvmx_get_core_num();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void octeon_irq_ciu0_enable(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int coreid = next_coreid_for_irq(desc);
|
||||
unsigned long flags;
|
||||
uint64_t en0;
|
||||
int bit = irq - OCTEON_IRQ_WORKQ0; /* Bit 0-63 of EN0 */
|
||||
|
||||
raw_spin_lock_irqsave(&octeon_irq_ciu0_lock, flags);
|
||||
en0 = cvmx_read_csr(CVMX_CIU_INTX_EN0(coreid * 2));
|
||||
en0 |= 1ull << bit;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0(coreid * 2), en0);
|
||||
cvmx_read_csr(CVMX_CIU_INTX_EN0(coreid * 2));
|
||||
raw_spin_unlock_irqrestore(&octeon_irq_ciu0_lock, flags);
|
||||
}
|
||||
|
||||
static void octeon_irq_ciu0_enable_mbox(unsigned int irq)
|
||||
{
|
||||
int coreid = cvmx_get_core_num();
|
||||
unsigned long flags;
|
||||
@ -167,14 +234,31 @@ static void octeon_irq_ciu0_disable(unsigned int irq)
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable the irq on the current core for chips that have the EN*_W1{S,C}
|
||||
* registers.
|
||||
* Enable the irq on the next core in the affinity set for chips that
|
||||
* have the EN*_W1{S,C} registers.
|
||||
*/
|
||||
static void octeon_irq_ciu0_enable_v2(unsigned int irq)
|
||||
{
|
||||
int index = cvmx_get_core_num() * 2;
|
||||
int index;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
if ((desc->status & IRQ_DISABLED) == 0) {
|
||||
index = next_coreid_for_irq(desc) * 2;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0_W1S(index), mask);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable the irq on the current CPU for chips that
|
||||
* have the EN*_W1{S,C} registers.
|
||||
*/
|
||||
static void octeon_irq_ciu0_enable_mbox_v2(unsigned int irq)
|
||||
{
|
||||
int index;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
|
||||
index = cvmx_get_core_num() * 2;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0_W1S(index), mask);
|
||||
}
|
||||
|
||||
@ -187,43 +271,39 @@ static void octeon_irq_ciu0_ack_v2(unsigned int irq)
|
||||
int index = cvmx_get_core_num() * 2;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
|
||||
switch (irq) {
|
||||
case OCTEON_IRQ_GMX_DRP0:
|
||||
case OCTEON_IRQ_GMX_DRP1:
|
||||
case OCTEON_IRQ_IPD_DRP:
|
||||
case OCTEON_IRQ_KEY_ZERO:
|
||||
case OCTEON_IRQ_TIMER0:
|
||||
case OCTEON_IRQ_TIMER1:
|
||||
case OCTEON_IRQ_TIMER2:
|
||||
case OCTEON_IRQ_TIMER3:
|
||||
/*
|
||||
* CIU timer type interrupts must be acknoleged by
|
||||
* writing a '1' bit to their sum0 bit.
|
||||
*/
|
||||
cvmx_write_csr(CVMX_CIU_INTX_SUM0(index), mask);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0_W1C(index), mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* CIU timer type interrupts must be acknoleged by writing a '1' bit
|
||||
* to their sum0 bit.
|
||||
*/
|
||||
static void octeon_irq_ciu0_timer_ack(unsigned int irq)
|
||||
{
|
||||
int index = cvmx_get_core_num() * 2;
|
||||
uint64_t mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
cvmx_write_csr(CVMX_CIU_INTX_SUM0(index), mask);
|
||||
}
|
||||
|
||||
static void octeon_irq_ciu0_timer_ack_v1(unsigned int irq)
|
||||
{
|
||||
octeon_irq_ciu0_timer_ack(irq);
|
||||
octeon_irq_ciu0_ack(irq);
|
||||
}
|
||||
|
||||
static void octeon_irq_ciu0_timer_ack_v2(unsigned int irq)
|
||||
{
|
||||
octeon_irq_ciu0_timer_ack(irq);
|
||||
octeon_irq_ciu0_ack_v2(irq);
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable the irq on the current core for chips that have the EN*_W1{S,C}
|
||||
* registers.
|
||||
*/
|
||||
static void octeon_irq_ciu0_eoi_v2(unsigned int irq)
|
||||
static void octeon_irq_ciu0_eoi_mbox_v2(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc = irq_desc + irq;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int index = cvmx_get_core_num() * 2;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
|
||||
if ((desc->status & IRQ_DISABLED) == 0)
|
||||
if (likely((desc->status & IRQ_DISABLED) == 0))
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0_W1S(index), mask);
|
||||
}
|
||||
|
||||
@ -246,18 +326,30 @@ static void octeon_irq_ciu0_disable_all_v2(unsigned int irq)
|
||||
static int octeon_irq_ciu0_set_affinity(unsigned int irq, const struct cpumask *dest)
|
||||
{
|
||||
int cpu;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int enable_one = (desc->status & IRQ_DISABLED) == 0;
|
||||
unsigned long flags;
|
||||
int bit = irq - OCTEON_IRQ_WORKQ0; /* Bit 0-63 of EN0 */
|
||||
|
||||
/*
|
||||
* For non-v2 CIU, we will allow only single CPU affinity.
|
||||
* This removes the need to do locking in the .ack/.eoi
|
||||
* functions.
|
||||
*/
|
||||
if (cpumask_weight(dest) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
raw_spin_lock_irqsave(&octeon_irq_ciu0_lock, flags);
|
||||
for_each_online_cpu(cpu) {
|
||||
int coreid = octeon_coreid_for_cpu(cpu);
|
||||
uint64_t en0 =
|
||||
cvmx_read_csr(CVMX_CIU_INTX_EN0(coreid * 2));
|
||||
if (cpumask_test_cpu(cpu, dest))
|
||||
if (cpumask_test_cpu(cpu, dest) && enable_one) {
|
||||
enable_one = 0;
|
||||
en0 |= 1ull << bit;
|
||||
else
|
||||
} else {
|
||||
en0 &= ~(1ull << bit);
|
||||
}
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0(coreid * 2), en0);
|
||||
}
|
||||
/*
|
||||
@ -279,13 +371,18 @@ static int octeon_irq_ciu0_set_affinity_v2(unsigned int irq,
|
||||
{
|
||||
int cpu;
|
||||
int index;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int enable_one = (desc->status & IRQ_DISABLED) == 0;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WORKQ0);
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
index = octeon_coreid_for_cpu(cpu) * 2;
|
||||
if (cpumask_test_cpu(cpu, dest))
|
||||
if (cpumask_test_cpu(cpu, dest) && enable_one) {
|
||||
enable_one = 0;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0_W1S(index), mask);
|
||||
else
|
||||
} else {
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN0_W1C(index), mask);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -298,8 +395,7 @@ static struct irq_chip octeon_irq_chip_ciu0_v2 = {
|
||||
.name = "CIU0",
|
||||
.enable = octeon_irq_ciu0_enable_v2,
|
||||
.disable = octeon_irq_ciu0_disable_all_v2,
|
||||
.ack = octeon_irq_ciu0_ack_v2,
|
||||
.eoi = octeon_irq_ciu0_eoi_v2,
|
||||
.eoi = octeon_irq_ciu0_enable_v2,
|
||||
#ifdef CONFIG_SMP
|
||||
.set_affinity = octeon_irq_ciu0_set_affinity_v2,
|
||||
#endif
|
||||
@ -309,35 +405,26 @@ static struct irq_chip octeon_irq_chip_ciu0 = {
|
||||
.name = "CIU0",
|
||||
.enable = octeon_irq_ciu0_enable,
|
||||
.disable = octeon_irq_ciu0_disable,
|
||||
.ack = octeon_irq_ciu0_ack,
|
||||
.eoi = octeon_irq_ciu0_eoi,
|
||||
#ifdef CONFIG_SMP
|
||||
.set_affinity = octeon_irq_ciu0_set_affinity,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct irq_chip octeon_irq_chip_ciu0_timer_v2 = {
|
||||
.name = "CIU0-T",
|
||||
.enable = octeon_irq_ciu0_enable_v2,
|
||||
.disable = octeon_irq_ciu0_disable_all_v2,
|
||||
.ack = octeon_irq_ciu0_timer_ack_v2,
|
||||
.eoi = octeon_irq_ciu0_eoi_v2,
|
||||
#ifdef CONFIG_SMP
|
||||
.set_affinity = octeon_irq_ciu0_set_affinity_v2,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct irq_chip octeon_irq_chip_ciu0_timer = {
|
||||
.name = "CIU0-T",
|
||||
.enable = octeon_irq_ciu0_enable,
|
||||
/* The mbox versions don't do any affinity or round-robin. */
|
||||
static struct irq_chip octeon_irq_chip_ciu0_mbox_v2 = {
|
||||
.name = "CIU0-M",
|
||||
.enable = octeon_irq_ciu0_enable_mbox_v2,
|
||||
.disable = octeon_irq_ciu0_disable,
|
||||
.ack = octeon_irq_ciu0_timer_ack_v1,
|
||||
.eoi = octeon_irq_ciu0_eoi,
|
||||
#ifdef CONFIG_SMP
|
||||
.set_affinity = octeon_irq_ciu0_set_affinity,
|
||||
#endif
|
||||
.eoi = octeon_irq_ciu0_eoi_mbox_v2,
|
||||
};
|
||||
|
||||
static struct irq_chip octeon_irq_chip_ciu0_mbox = {
|
||||
.name = "CIU0-M",
|
||||
.enable = octeon_irq_ciu0_enable_mbox,
|
||||
.disable = octeon_irq_ciu0_disable,
|
||||
.eoi = octeon_irq_ciu0_eoi,
|
||||
};
|
||||
|
||||
static void octeon_irq_ciu1_ack(unsigned int irq)
|
||||
{
|
||||
@ -365,7 +452,8 @@ static void octeon_irq_ciu1_eoi(unsigned int irq)
|
||||
|
||||
static void octeon_irq_ciu1_enable(unsigned int irq)
|
||||
{
|
||||
int coreid = cvmx_get_core_num();
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int coreid = next_coreid_for_irq(desc);
|
||||
unsigned long flags;
|
||||
uint64_t en1;
|
||||
int bit = irq - OCTEON_IRQ_WDOG0; /* Bit 0-63 of EN1 */
|
||||
@ -378,6 +466,25 @@ static void octeon_irq_ciu1_enable(unsigned int irq)
|
||||
raw_spin_unlock_irqrestore(&octeon_irq_ciu1_lock, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* Watchdog interrupts are special. They are associated with a single
|
||||
* core, so we hardwire the affinity to that core.
|
||||
*/
|
||||
static void octeon_irq_ciu1_wd_enable(unsigned int irq)
|
||||
{
|
||||
unsigned long flags;
|
||||
uint64_t en1;
|
||||
int bit = irq - OCTEON_IRQ_WDOG0; /* Bit 0-63 of EN1 */
|
||||
int coreid = bit;
|
||||
|
||||
raw_spin_lock_irqsave(&octeon_irq_ciu1_lock, flags);
|
||||
en1 = cvmx_read_csr(CVMX_CIU_INTX_EN1(coreid * 2 + 1));
|
||||
en1 |= 1ull << bit;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1(coreid * 2 + 1), en1);
|
||||
cvmx_read_csr(CVMX_CIU_INTX_EN1(coreid * 2 + 1));
|
||||
raw_spin_unlock_irqrestore(&octeon_irq_ciu1_lock, flags);
|
||||
}
|
||||
|
||||
static void octeon_irq_ciu1_disable(unsigned int irq)
|
||||
{
|
||||
int bit = irq - OCTEON_IRQ_WDOG0; /* Bit 0-63 of EN1 */
|
||||
@ -405,10 +512,31 @@ static void octeon_irq_ciu1_disable(unsigned int irq)
|
||||
*/
|
||||
static void octeon_irq_ciu1_enable_v2(unsigned int irq)
|
||||
{
|
||||
int index = cvmx_get_core_num() * 2 + 1;
|
||||
int index;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WDOG0);
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1S(index), mask);
|
||||
if ((desc->status & IRQ_DISABLED) == 0) {
|
||||
index = next_coreid_for_irq(desc) * 2 + 1;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1S(index), mask);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Watchdog interrupts are special. They are associated with a single
|
||||
* core, so we hardwire the affinity to that core.
|
||||
*/
|
||||
static void octeon_irq_ciu1_wd_enable_v2(unsigned int irq)
|
||||
{
|
||||
int index;
|
||||
int coreid = irq - OCTEON_IRQ_WDOG0;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WDOG0);
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
if ((desc->status & IRQ_DISABLED) == 0) {
|
||||
index = coreid * 2 + 1;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1S(index), mask);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -423,20 +551,6 @@ static void octeon_irq_ciu1_ack_v2(unsigned int irq)
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1C(index), mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable the irq on the current core for chips that have the EN*_W1{S,C}
|
||||
* registers.
|
||||
*/
|
||||
static void octeon_irq_ciu1_eoi_v2(unsigned int irq)
|
||||
{
|
||||
struct irq_desc *desc = irq_desc + irq;
|
||||
int index = cvmx_get_core_num() * 2 + 1;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WDOG0);
|
||||
|
||||
if ((desc->status & IRQ_DISABLED) == 0)
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1S(index), mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable the irq on the all cores for chips that have the EN*_W1{S,C}
|
||||
* registers.
|
||||
@ -457,19 +571,30 @@ static int octeon_irq_ciu1_set_affinity(unsigned int irq,
|
||||
const struct cpumask *dest)
|
||||
{
|
||||
int cpu;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int enable_one = (desc->status & IRQ_DISABLED) == 0;
|
||||
unsigned long flags;
|
||||
int bit = irq - OCTEON_IRQ_WDOG0; /* Bit 0-63 of EN1 */
|
||||
|
||||
/*
|
||||
* For non-v2 CIU, we will allow only single CPU affinity.
|
||||
* This removes the need to do locking in the .ack/.eoi
|
||||
* functions.
|
||||
*/
|
||||
if (cpumask_weight(dest) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
raw_spin_lock_irqsave(&octeon_irq_ciu1_lock, flags);
|
||||
for_each_online_cpu(cpu) {
|
||||
int coreid = octeon_coreid_for_cpu(cpu);
|
||||
uint64_t en1 =
|
||||
cvmx_read_csr(CVMX_CIU_INTX_EN1
|
||||
(coreid * 2 + 1));
|
||||
if (cpumask_test_cpu(cpu, dest))
|
||||
cvmx_read_csr(CVMX_CIU_INTX_EN1(coreid * 2 + 1));
|
||||
if (cpumask_test_cpu(cpu, dest) && enable_one) {
|
||||
enable_one = 0;
|
||||
en1 |= 1ull << bit;
|
||||
else
|
||||
} else {
|
||||
en1 &= ~(1ull << bit);
|
||||
}
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1(coreid * 2 + 1), en1);
|
||||
}
|
||||
/*
|
||||
@ -491,13 +616,17 @@ static int octeon_irq_ciu1_set_affinity_v2(unsigned int irq,
|
||||
{
|
||||
int cpu;
|
||||
int index;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
int enable_one = (desc->status & IRQ_DISABLED) == 0;
|
||||
u64 mask = 1ull << (irq - OCTEON_IRQ_WDOG0);
|
||||
for_each_online_cpu(cpu) {
|
||||
index = octeon_coreid_for_cpu(cpu) * 2 + 1;
|
||||
if (cpumask_test_cpu(cpu, dest))
|
||||
if (cpumask_test_cpu(cpu, dest) && enable_one) {
|
||||
enable_one = 0;
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1S(index), mask);
|
||||
else
|
||||
} else {
|
||||
cvmx_write_csr(CVMX_CIU_INTX_EN1_W1C(index), mask);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -507,11 +636,10 @@ static int octeon_irq_ciu1_set_affinity_v2(unsigned int irq,
|
||||
* Newer octeon chips have support for lockless CIU operation.
|
||||
*/
|
||||
static struct irq_chip octeon_irq_chip_ciu1_v2 = {
|
||||
.name = "CIU0",
|
||||
.name = "CIU1",
|
||||
.enable = octeon_irq_ciu1_enable_v2,
|
||||
.disable = octeon_irq_ciu1_disable_all_v2,
|
||||
.ack = octeon_irq_ciu1_ack_v2,
|
||||
.eoi = octeon_irq_ciu1_eoi_v2,
|
||||
.eoi = octeon_irq_ciu1_enable_v2,
|
||||
#ifdef CONFIG_SMP
|
||||
.set_affinity = octeon_irq_ciu1_set_affinity_v2,
|
||||
#endif
|
||||
@ -521,103 +649,36 @@ static struct irq_chip octeon_irq_chip_ciu1 = {
|
||||
.name = "CIU1",
|
||||
.enable = octeon_irq_ciu1_enable,
|
||||
.disable = octeon_irq_ciu1_disable,
|
||||
.ack = octeon_irq_ciu1_ack,
|
||||
.eoi = octeon_irq_ciu1_eoi,
|
||||
#ifdef CONFIG_SMP
|
||||
.set_affinity = octeon_irq_ciu1_set_affinity,
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
|
||||
static DEFINE_RAW_SPINLOCK(octeon_irq_msi_lock);
|
||||
|
||||
static void octeon_irq_msi_ack(unsigned int irq)
|
||||
{
|
||||
if (!octeon_has_feature(OCTEON_FEATURE_PCIE)) {
|
||||
/* These chips have PCI */
|
||||
cvmx_write_csr(CVMX_NPI_NPI_MSI_RCV,
|
||||
1ull << (irq - OCTEON_IRQ_MSI_BIT0));
|
||||
} else {
|
||||
/*
|
||||
* These chips have PCIe. Thankfully the ACK doesn't
|
||||
* need any locking.
|
||||
*/
|
||||
cvmx_write_csr(CVMX_PEXP_NPEI_MSI_RCV0,
|
||||
1ull << (irq - OCTEON_IRQ_MSI_BIT0));
|
||||
}
|
||||
}
|
||||
|
||||
static void octeon_irq_msi_eoi(unsigned int irq)
|
||||
{
|
||||
/* Nothing needed */
|
||||
}
|
||||
|
||||
static void octeon_irq_msi_enable(unsigned int irq)
|
||||
{
|
||||
if (!octeon_has_feature(OCTEON_FEATURE_PCIE)) {
|
||||
/*
|
||||
* Octeon PCI doesn't have the ability to mask/unmask
|
||||
* MSI interrupts individually. Instead of
|
||||
* masking/unmasking them in groups of 16, we simple
|
||||
* assume MSI devices are well behaved. MSI
|
||||
* interrupts are always enable and the ACK is assumed
|
||||
* to be enough.
|
||||
*/
|
||||
} else {
|
||||
/* These chips have PCIe. Note that we only support
|
||||
* the first 64 MSI interrupts. Unfortunately all the
|
||||
* MSI enables are in the same register. We use
|
||||
* MSI0's lock to control access to them all.
|
||||
*/
|
||||
uint64_t en;
|
||||
unsigned long flags;
|
||||
raw_spin_lock_irqsave(&octeon_irq_msi_lock, flags);
|
||||
en = cvmx_read_csr(CVMX_PEXP_NPEI_MSI_ENB0);
|
||||
en |= 1ull << (irq - OCTEON_IRQ_MSI_BIT0);
|
||||
cvmx_write_csr(CVMX_PEXP_NPEI_MSI_ENB0, en);
|
||||
cvmx_read_csr(CVMX_PEXP_NPEI_MSI_ENB0);
|
||||
raw_spin_unlock_irqrestore(&octeon_irq_msi_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void octeon_irq_msi_disable(unsigned int irq)
|
||||
{
|
||||
if (!octeon_has_feature(OCTEON_FEATURE_PCIE)) {
|
||||
/* See comment in enable */
|
||||
} else {
|
||||
/*
|
||||
* These chips have PCIe. Note that we only support
|
||||
* the first 64 MSI interrupts. Unfortunately all the
|
||||
* MSI enables are in the same register. We use
|
||||
* MSI0's lock to control access to them all.
|
||||
*/
|
||||
uint64_t en;
|
||||
unsigned long flags;
|
||||
raw_spin_lock_irqsave(&octeon_irq_msi_lock, flags);
|
||||
en = cvmx_read_csr(CVMX_PEXP_NPEI_MSI_ENB0);
|
||||
en &= ~(1ull << (irq - OCTEON_IRQ_MSI_BIT0));
|
||||
cvmx_write_csr(CVMX_PEXP_NPEI_MSI_ENB0, en);
|
||||
cvmx_read_csr(CVMX_PEXP_NPEI_MSI_ENB0);
|
||||
raw_spin_unlock_irqrestore(&octeon_irq_msi_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
static struct irq_chip octeon_irq_chip_msi = {
|
||||
.name = "MSI",
|
||||
.enable = octeon_irq_msi_enable,
|
||||
.disable = octeon_irq_msi_disable,
|
||||
.ack = octeon_irq_msi_ack,
|
||||
.eoi = octeon_irq_msi_eoi,
|
||||
static struct irq_chip octeon_irq_chip_ciu1_wd_v2 = {
|
||||
.name = "CIU1-W",
|
||||
.enable = octeon_irq_ciu1_wd_enable_v2,
|
||||
.disable = octeon_irq_ciu1_disable_all_v2,
|
||||
.eoi = octeon_irq_ciu1_wd_enable_v2,
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct irq_chip octeon_irq_chip_ciu1_wd = {
|
||||
.name = "CIU1-W",
|
||||
.enable = octeon_irq_ciu1_wd_enable,
|
||||
.disable = octeon_irq_ciu1_disable,
|
||||
.eoi = octeon_irq_ciu1_eoi,
|
||||
};
|
||||
|
||||
static void (*octeon_ciu0_ack)(unsigned int);
|
||||
static void (*octeon_ciu1_ack)(unsigned int);
|
||||
|
||||
void __init arch_init_irq(void)
|
||||
{
|
||||
int irq;
|
||||
unsigned int irq;
|
||||
struct irq_chip *chip0;
|
||||
struct irq_chip *chip0_timer;
|
||||
struct irq_chip *chip0_mbox;
|
||||
struct irq_chip *chip1;
|
||||
struct irq_chip *chip1_wd;
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Set the default affinity to the boot cpu. */
|
||||
@ -631,13 +692,19 @@ void __init arch_init_irq(void)
|
||||
if (OCTEON_IS_MODEL(OCTEON_CN58XX_PASS2_X) ||
|
||||
OCTEON_IS_MODEL(OCTEON_CN56XX_PASS2_X) ||
|
||||
OCTEON_IS_MODEL(OCTEON_CN52XX_PASS2_X)) {
|
||||
octeon_ciu0_ack = octeon_irq_ciu0_ack_v2;
|
||||
octeon_ciu1_ack = octeon_irq_ciu1_ack_v2;
|
||||
chip0 = &octeon_irq_chip_ciu0_v2;
|
||||
chip0_timer = &octeon_irq_chip_ciu0_timer_v2;
|
||||
chip0_mbox = &octeon_irq_chip_ciu0_mbox_v2;
|
||||
chip1 = &octeon_irq_chip_ciu1_v2;
|
||||
chip1_wd = &octeon_irq_chip_ciu1_wd_v2;
|
||||
} else {
|
||||
octeon_ciu0_ack = octeon_irq_ciu0_ack;
|
||||
octeon_ciu1_ack = octeon_irq_ciu1_ack;
|
||||
chip0 = &octeon_irq_chip_ciu0;
|
||||
chip0_timer = &octeon_irq_chip_ciu0_timer;
|
||||
chip0_mbox = &octeon_irq_chip_ciu0_mbox;
|
||||
chip1 = &octeon_irq_chip_ciu1;
|
||||
chip1_wd = &octeon_irq_chip_ciu1_wd;
|
||||
}
|
||||
|
||||
/* 0 - 15 reserved for i8259 master and slave controller. */
|
||||
@ -651,34 +718,23 @@ void __init arch_init_irq(void)
|
||||
/* 24 - 87 CIU_INT_SUM0 */
|
||||
for (irq = OCTEON_IRQ_WORKQ0; irq <= OCTEON_IRQ_BOOTDMA; irq++) {
|
||||
switch (irq) {
|
||||
case OCTEON_IRQ_GMX_DRP0:
|
||||
case OCTEON_IRQ_GMX_DRP1:
|
||||
case OCTEON_IRQ_IPD_DRP:
|
||||
case OCTEON_IRQ_KEY_ZERO:
|
||||
case OCTEON_IRQ_TIMER0:
|
||||
case OCTEON_IRQ_TIMER1:
|
||||
case OCTEON_IRQ_TIMER2:
|
||||
case OCTEON_IRQ_TIMER3:
|
||||
set_irq_chip_and_handler(irq, chip0_timer, handle_percpu_irq);
|
||||
case OCTEON_IRQ_MBOX0:
|
||||
case OCTEON_IRQ_MBOX1:
|
||||
set_irq_chip_and_handler(irq, chip0_mbox, handle_percpu_irq);
|
||||
break;
|
||||
default:
|
||||
set_irq_chip_and_handler(irq, chip0, handle_percpu_irq);
|
||||
set_irq_chip_and_handler(irq, chip0, handle_fasteoi_irq);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 88 - 151 CIU_INT_SUM1 */
|
||||
for (irq = OCTEON_IRQ_WDOG0; irq <= OCTEON_IRQ_RESERVED151; irq++) {
|
||||
set_irq_chip_and_handler(irq, chip1, handle_percpu_irq);
|
||||
}
|
||||
for (irq = OCTEON_IRQ_WDOG0; irq <= OCTEON_IRQ_WDOG15; irq++)
|
||||
set_irq_chip_and_handler(irq, chip1_wd, handle_fasteoi_irq);
|
||||
|
||||
for (irq = OCTEON_IRQ_UART2; irq <= OCTEON_IRQ_RESERVED151; irq++)
|
||||
set_irq_chip_and_handler(irq, chip1, handle_fasteoi_irq);
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
/* 152 - 215 PCI/PCIe MSI interrupts */
|
||||
for (irq = OCTEON_IRQ_MSI_BIT0; irq <= OCTEON_IRQ_MSI_BIT63; irq++) {
|
||||
set_irq_chip_and_handler(irq, &octeon_irq_chip_msi,
|
||||
handle_percpu_irq);
|
||||
}
|
||||
#endif
|
||||
set_c0_status(0x300 << 2);
|
||||
}
|
||||
|
||||
@ -693,6 +749,7 @@ asmlinkage void plat_irq_dispatch(void)
|
||||
unsigned long cop0_status;
|
||||
uint64_t ciu_en;
|
||||
uint64_t ciu_sum;
|
||||
unsigned int irq;
|
||||
|
||||
while (1) {
|
||||
cop0_cause = read_c0_cause();
|
||||
@ -704,18 +761,24 @@ asmlinkage void plat_irq_dispatch(void)
|
||||
ciu_sum = cvmx_read_csr(ciu_sum0_address);
|
||||
ciu_en = cvmx_read_csr(ciu_en0_address);
|
||||
ciu_sum &= ciu_en;
|
||||
if (likely(ciu_sum))
|
||||
do_IRQ(fls64(ciu_sum) + OCTEON_IRQ_WORKQ0 - 1);
|
||||
else
|
||||
if (likely(ciu_sum)) {
|
||||
irq = fls64(ciu_sum) + OCTEON_IRQ_WORKQ0 - 1;
|
||||
octeon_ciu0_ack(irq);
|
||||
do_IRQ(irq);
|
||||
} else {
|
||||
spurious_interrupt();
|
||||
}
|
||||
} else if (unlikely(cop0_cause & STATUSF_IP3)) {
|
||||
ciu_sum = cvmx_read_csr(ciu_sum1_address);
|
||||
ciu_en = cvmx_read_csr(ciu_en1_address);
|
||||
ciu_sum &= ciu_en;
|
||||
if (likely(ciu_sum))
|
||||
do_IRQ(fls64(ciu_sum) + OCTEON_IRQ_WDOG0 - 1);
|
||||
else
|
||||
if (likely(ciu_sum)) {
|
||||
irq = fls64(ciu_sum) + OCTEON_IRQ_WDOG0 - 1;
|
||||
octeon_ciu1_ack(irq);
|
||||
do_IRQ(irq);
|
||||
} else {
|
||||
spurious_interrupt();
|
||||
}
|
||||
} else if (likely(cop0_cause)) {
|
||||
do_IRQ(fls(cop0_cause) - 9 + MIPS_CPU_IRQ_BASE);
|
||||
} else {
|
||||
@ -725,54 +788,84 @@ asmlinkage void plat_irq_dispatch(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
static int is_irq_enabled_on_cpu(unsigned int irq, unsigned int cpu)
|
||||
{
|
||||
unsigned int isset;
|
||||
int coreid = octeon_coreid_for_cpu(cpu);
|
||||
int bit = (irq < OCTEON_IRQ_WDOG0) ?
|
||||
irq - OCTEON_IRQ_WORKQ0 : irq - OCTEON_IRQ_WDOG0;
|
||||
if (irq < 64) {
|
||||
isset = (cvmx_read_csr(CVMX_CIU_INTX_EN0(coreid * 2)) &
|
||||
(1ull << bit)) >> bit;
|
||||
} else {
|
||||
isset = (cvmx_read_csr(CVMX_CIU_INTX_EN1(coreid * 2 + 1)) &
|
||||
(1ull << bit)) >> bit;
|
||||
}
|
||||
return isset;
|
||||
}
|
||||
|
||||
void fixup_irqs(void)
|
||||
{
|
||||
int irq;
|
||||
int irq;
|
||||
struct irq_desc *desc;
|
||||
cpumask_t new_affinity;
|
||||
unsigned long flags;
|
||||
int do_set_affinity;
|
||||
int cpu;
|
||||
|
||||
cpu = smp_processor_id();
|
||||
|
||||
for (irq = OCTEON_IRQ_SW0; irq <= OCTEON_IRQ_TIMER; irq++)
|
||||
octeon_irq_core_disable_local(irq);
|
||||
|
||||
for (irq = OCTEON_IRQ_WORKQ0; irq <= OCTEON_IRQ_GPIO15; irq++) {
|
||||
if (is_irq_enabled_on_cpu(irq, smp_processor_id())) {
|
||||
/* ciu irq migrates to next cpu */
|
||||
octeon_irq_chip_ciu0.disable(irq);
|
||||
octeon_irq_ciu0_set_affinity(irq, &cpu_online_map);
|
||||
}
|
||||
}
|
||||
for (irq = OCTEON_IRQ_WORKQ0; irq < OCTEON_IRQ_LAST; irq++) {
|
||||
desc = irq_to_desc(irq);
|
||||
switch (irq) {
|
||||
case OCTEON_IRQ_MBOX0:
|
||||
case OCTEON_IRQ_MBOX1:
|
||||
/* The eoi function will disable them on this CPU. */
|
||||
desc->chip->eoi(irq);
|
||||
break;
|
||||
case OCTEON_IRQ_WDOG0:
|
||||
case OCTEON_IRQ_WDOG1:
|
||||
case OCTEON_IRQ_WDOG2:
|
||||
case OCTEON_IRQ_WDOG3:
|
||||
case OCTEON_IRQ_WDOG4:
|
||||
case OCTEON_IRQ_WDOG5:
|
||||
case OCTEON_IRQ_WDOG6:
|
||||
case OCTEON_IRQ_WDOG7:
|
||||
case OCTEON_IRQ_WDOG8:
|
||||
case OCTEON_IRQ_WDOG9:
|
||||
case OCTEON_IRQ_WDOG10:
|
||||
case OCTEON_IRQ_WDOG11:
|
||||
case OCTEON_IRQ_WDOG12:
|
||||
case OCTEON_IRQ_WDOG13:
|
||||
case OCTEON_IRQ_WDOG14:
|
||||
case OCTEON_IRQ_WDOG15:
|
||||
/*
|
||||
* These have special per CPU semantics and
|
||||
* are handled in the watchdog driver.
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
||||
/*
|
||||
* If this irq has an action, it is in use and
|
||||
* must be migrated if it has affinity to this
|
||||
* cpu.
|
||||
*/
|
||||
if (desc->action && cpumask_test_cpu(cpu, desc->affinity)) {
|
||||
if (cpumask_weight(desc->affinity) > 1) {
|
||||
/*
|
||||
* It has multi CPU affinity,
|
||||
* just remove this CPU from
|
||||
* the affinity set.
|
||||
*/
|
||||
cpumask_copy(&new_affinity, desc->affinity);
|
||||
cpumask_clear_cpu(cpu, &new_affinity);
|
||||
} else {
|
||||
/*
|
||||
* Otherwise, put it on lowest
|
||||
* numbered online CPU.
|
||||
*/
|
||||
cpumask_clear(&new_affinity);
|
||||
cpumask_set_cpu(cpumask_first(cpu_online_mask), &new_affinity);
|
||||
}
|
||||
do_set_affinity = 1;
|
||||
} else {
|
||||
do_set_affinity = 0;
|
||||
}
|
||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||
|
||||
#if 0
|
||||
for (irq = OCTEON_IRQ_MBOX0; irq <= OCTEON_IRQ_MBOX1; irq++)
|
||||
octeon_irq_mailbox_mask(irq);
|
||||
#endif
|
||||
for (irq = OCTEON_IRQ_UART0; irq <= OCTEON_IRQ_BOOTDMA; irq++) {
|
||||
if (is_irq_enabled_on_cpu(irq, smp_processor_id())) {
|
||||
/* ciu irq migrates to next cpu */
|
||||
octeon_irq_chip_ciu0.disable(irq);
|
||||
octeon_irq_ciu0_set_affinity(irq, &cpu_online_map);
|
||||
}
|
||||
}
|
||||
if (do_set_affinity)
|
||||
irq_set_affinity(irq, &new_affinity);
|
||||
|
||||
for (irq = OCTEON_IRQ_UART2; irq <= OCTEON_IRQ_RESERVED135; irq++) {
|
||||
if (is_irq_enabled_on_cpu(irq, smp_processor_id())) {
|
||||
/* ciu irq migrates to next cpu */
|
||||
octeon_irq_chip_ciu1.disable(irq);
|
||||
octeon_irq_ciu1_set_affinity(irq, &cpu_online_map);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +23,16 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
struct boot_init_vector {
|
||||
uint32_t stack_addr;
|
||||
uint32_t code_addr;
|
||||
/* First stage address - in ram instead of flash */
|
||||
uint64_t code_addr;
|
||||
/* Setup code for application, NOT application entry point */
|
||||
uint32_t app_start_func_addr;
|
||||
/* k0 is used for global data - needs to be passed to other cores */
|
||||
uint32_t k0_val;
|
||||
uint32_t flags;
|
||||
uint32_t boot_info_addr;
|
||||
/* Address of boot info block structure */
|
||||
uint64_t boot_info_addr;
|
||||
uint32_t flags; /* flags */
|
||||
uint32_t pad;
|
||||
uint32_t pad2;
|
||||
};
|
||||
|
||||
/* similar to bootloader's linux_app_boot_info but without global data */
|
||||
@ -40,7 +42,7 @@ struct linux_app_boot_info {
|
||||
uint32_t avail_coremask;
|
||||
uint32_t pci_console_active;
|
||||
uint32_t icache_prefetch_disable;
|
||||
uint32_t InitTLBStart_addr;
|
||||
uint64_t InitTLBStart_addr;
|
||||
uint32_t start_app_addr;
|
||||
uint32_t cur_exception_base;
|
||||
uint32_t no_mark_private_data;
|
||||
@ -58,7 +60,7 @@ struct linux_app_boot_info {
|
||||
|
||||
#define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot"
|
||||
|
||||
#define LABI_SIGNATURE 0xAABBCCDD
|
||||
#define LABI_SIGNATURE 0xAABBCC01
|
||||
|
||||
/* from uboot-headers/octeon_mem_map.h */
|
||||
#define EXCEPTION_BASE_INCR (4 * 1024)
|
||||
|
@ -18,11 +18,7 @@
|
||||
|
||||
#include <asm/octeon/octeon.h>
|
||||
|
||||
#ifdef CONFIG_GDB_CONSOLE
|
||||
#define DEBUG_UART 0
|
||||
#else
|
||||
#define DEBUG_UART 1
|
||||
#endif
|
||||
|
||||
unsigned int octeon_serial_in(struct uart_port *up, int offset)
|
||||
{
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <asm/time.h>
|
||||
|
||||
#include <asm/octeon/octeon.h>
|
||||
#include <asm/octeon/pci-octeon.h>
|
||||
|
||||
#ifdef CONFIG_CAVIUM_DECODE_RSL
|
||||
extern void cvmx_interrupt_rsl_decode(void);
|
||||
@ -578,9 +579,6 @@ void __init prom_init(void)
|
||||
}
|
||||
|
||||
if (strstr(arcs_cmdline, "console=") == NULL) {
|
||||
#ifdef CONFIG_GDB_CONSOLE
|
||||
strcat(arcs_cmdline, " console=gdb");
|
||||
#else
|
||||
#ifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL
|
||||
strcat(arcs_cmdline, " console=ttyS0,115200");
|
||||
#else
|
||||
@ -588,7 +586,6 @@ void __init prom_init(void)
|
||||
strcat(arcs_cmdline, " console=ttyS1,115200");
|
||||
else
|
||||
strcat(arcs_cmdline, " console=ttyS0,115200");
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -598,13 +595,13 @@ void __init prom_init(void)
|
||||
* the filesystem. Also specify the calibration delay
|
||||
* to avoid calculating it every time.
|
||||
*/
|
||||
strcat(arcs_cmdline, " rw root=1f00"
|
||||
" lpj=60176 slram=root,0x40000000,+1073741824");
|
||||
strcat(arcs_cmdline, " rw root=1f00 slram=root,0x40000000,+1073741824");
|
||||
}
|
||||
|
||||
mips_hpt_frequency = octeon_get_clock_rate();
|
||||
|
||||
octeon_init_cvmcount();
|
||||
octeon_setup_delays();
|
||||
|
||||
_machine_restart = octeon_restart;
|
||||
_machine_halt = octeon_halt;
|
||||
@ -613,6 +610,22 @@ void __init prom_init(void)
|
||||
register_smp_ops(&octeon_smp_ops);
|
||||
}
|
||||
|
||||
/* Exclude a single page from the regions obtained in plat_mem_setup. */
|
||||
static __init void memory_exclude_page(u64 addr, u64 *mem, u64 *size)
|
||||
{
|
||||
if (addr > *mem && addr < *mem + *size) {
|
||||
u64 inc = addr - *mem;
|
||||
add_memory_region(*mem, inc, BOOT_MEM_RAM);
|
||||
*mem += inc;
|
||||
*size -= inc;
|
||||
}
|
||||
|
||||
if (addr == *mem && *size > PAGE_SIZE) {
|
||||
*mem += PAGE_SIZE;
|
||||
*size -= PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
void __init plat_mem_setup(void)
|
||||
{
|
||||
uint64_t mem_alloc_size;
|
||||
@ -663,12 +676,27 @@ void __init plat_mem_setup(void)
|
||||
CVMX_BOOTMEM_FLAG_NO_LOCKING);
|
||||
#endif
|
||||
if (memory >= 0) {
|
||||
u64 size = mem_alloc_size;
|
||||
|
||||
/*
|
||||
* exclude a page at the beginning and end of
|
||||
* the 256MB PCIe 'hole' so the kernel will not
|
||||
* try to allocate multi-page buffers that
|
||||
* span the discontinuity.
|
||||
*/
|
||||
memory_exclude_page(CVMX_PCIE_BAR1_PHYS_BASE,
|
||||
&memory, &size);
|
||||
memory_exclude_page(CVMX_PCIE_BAR1_PHYS_BASE +
|
||||
CVMX_PCIE_BAR1_PHYS_SIZE,
|
||||
&memory, &size);
|
||||
|
||||
/*
|
||||
* This function automatically merges address
|
||||
* regions next to each other if they are
|
||||
* received in incrementing order.
|
||||
*/
|
||||
add_memory_region(memory, mem_alloc_size, BOOT_MEM_RAM);
|
||||
if (size)
|
||||
add_memory_region(memory, size, BOOT_MEM_RAM);
|
||||
total += mem_alloc_size;
|
||||
} else {
|
||||
break;
|
||||
@ -691,7 +719,10 @@ void __init plat_mem_setup(void)
|
||||
"cvmx_bootmem_phy_alloc\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Emit one character to the boot UART. Exported for use by the
|
||||
* watchdog timer.
|
||||
*/
|
||||
int prom_putchar(char c)
|
||||
{
|
||||
uint64_t lsrval;
|
||||
@ -705,6 +736,7 @@ int prom_putchar(char c)
|
||||
cvmx_write_csr(CVMX_MIO_UARTX_THR(octeon_uart), c & 0xffull);
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL(prom_putchar);
|
||||
|
||||
void prom_free_prom_memory(void)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2004-2008 Cavium Networks
|
||||
* Copyright (C) 2004-2008, 2009, 2010 Cavium Networks
|
||||
*/
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/init.h>
|
||||
@ -27,7 +27,8 @@ volatile unsigned long octeon_processor_sp;
|
||||
volatile unsigned long octeon_processor_gp;
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
static unsigned int InitTLBStart_addr;
|
||||
uint64_t octeon_bootloader_entry_addr;
|
||||
EXPORT_SYMBOL(octeon_bootloader_entry_addr);
|
||||
#endif
|
||||
|
||||
static irqreturn_t mailbox_interrupt(int irq, void *dev_id)
|
||||
@ -80,20 +81,13 @@ static inline void octeon_send_ipi_mask(const struct cpumask *mask,
|
||||
static void octeon_smp_hotplug_setup(void)
|
||||
{
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
uint32_t labi_signature;
|
||||
struct linux_app_boot_info *labi;
|
||||
|
||||
labi_signature =
|
||||
cvmx_read64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
LABI_ADDR_IN_BOOTLOADER +
|
||||
offsetof(struct linux_app_boot_info,
|
||||
labi_signature)));
|
||||
if (labi_signature != LABI_SIGNATURE)
|
||||
pr_err("The bootloader version on this board is incorrect\n");
|
||||
InitTLBStart_addr =
|
||||
cvmx_read64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
LABI_ADDR_IN_BOOTLOADER +
|
||||
offsetof(struct linux_app_boot_info,
|
||||
InitTLBStart_addr)));
|
||||
labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER);
|
||||
if (labi->labi_signature != LABI_SIGNATURE)
|
||||
panic("The bootloader version on this board is incorrect.");
|
||||
|
||||
octeon_bootloader_entry_addr = labi->InitTLBStart_addr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -102,24 +96,47 @@ static void octeon_smp_setup(void)
|
||||
const int coreid = cvmx_get_core_num();
|
||||
int cpus;
|
||||
int id;
|
||||
|
||||
int core_mask = octeon_get_boot_coremask();
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
unsigned int num_cores = cvmx_octeon_num_cores();
|
||||
#endif
|
||||
|
||||
/* The present CPUs are initially just the boot cpu (CPU 0). */
|
||||
for (id = 0; id < NR_CPUS; id++) {
|
||||
set_cpu_possible(id, id == 0);
|
||||
set_cpu_present(id, id == 0);
|
||||
}
|
||||
|
||||
cpus_clear(cpu_possible_map);
|
||||
__cpu_number_map[coreid] = 0;
|
||||
__cpu_logical_map[0] = coreid;
|
||||
cpu_set(0, cpu_possible_map);
|
||||
|
||||
/* The present CPUs get the lowest CPU numbers. */
|
||||
cpus = 1;
|
||||
for (id = 0; id < 16; id++) {
|
||||
for (id = 0; id < NR_CPUS; id++) {
|
||||
if ((id != coreid) && (core_mask & (1 << id))) {
|
||||
cpu_set(cpus, cpu_possible_map);
|
||||
set_cpu_possible(cpus, true);
|
||||
set_cpu_present(cpus, true);
|
||||
__cpu_number_map[id] = cpus;
|
||||
__cpu_logical_map[cpus] = id;
|
||||
cpus++;
|
||||
}
|
||||
}
|
||||
cpu_present_map = cpu_possible_map;
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
/*
|
||||
* The possible CPUs are all those present on the chip. We
|
||||
* will assign CPU numbers for possible cores as well. Cores
|
||||
* are always consecutively numberd from 0.
|
||||
*/
|
||||
for (id = 0; id < num_cores && id < NR_CPUS; id++) {
|
||||
if (!(core_mask & (1 << id))) {
|
||||
set_cpu_possible(cpus, true);
|
||||
__cpu_number_map[id] = cpus;
|
||||
__cpu_logical_map[cpus] = id;
|
||||
cpus++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
octeon_smp_hotplug_setup();
|
||||
}
|
||||
@ -158,18 +175,21 @@ static void octeon_init_secondary(void)
|
||||
{
|
||||
const int coreid = cvmx_get_core_num();
|
||||
union cvmx_ciu_intx_sum0 interrupt_enable;
|
||||
unsigned int sr;
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
unsigned int cur_exception_base;
|
||||
struct linux_app_boot_info *labi;
|
||||
|
||||
cur_exception_base = cvmx_read64_uint32(
|
||||
CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
LABI_ADDR_IN_BOOTLOADER +
|
||||
offsetof(struct linux_app_boot_info,
|
||||
cur_exception_base)));
|
||||
/* cur_exception_base is incremented in bootloader after setting */
|
||||
write_c0_ebase((unsigned int)(cur_exception_base - EXCEPTION_BASE_INCR));
|
||||
labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER);
|
||||
|
||||
if (labi->labi_signature != LABI_SIGNATURE)
|
||||
panic("The bootloader version on this board is incorrect.");
|
||||
#endif
|
||||
|
||||
sr = set_c0_status(ST0_BEV);
|
||||
write_c0_ebase((u32)ebase);
|
||||
write_c0_status(sr);
|
||||
|
||||
octeon_check_cpu_bist();
|
||||
octeon_init_cvmcount();
|
||||
/*
|
||||
@ -276,8 +296,8 @@ static int octeon_cpu_disable(void)
|
||||
static void octeon_cpu_die(unsigned int cpu)
|
||||
{
|
||||
int coreid = cpu_logical_map(cpu);
|
||||
uint32_t avail_coremask;
|
||||
struct cvmx_bootmem_named_block_desc *block_desc;
|
||||
uint32_t mask, new_mask;
|
||||
const struct cvmx_bootmem_named_block_desc *block_desc;
|
||||
|
||||
while (per_cpu(cpu_state, cpu) != CPU_DEAD)
|
||||
cpu_relax();
|
||||
@ -286,52 +306,40 @@ static void octeon_cpu_die(unsigned int cpu)
|
||||
* This is a bit complicated strategics of getting/settig available
|
||||
* cores mask, copied from bootloader
|
||||
*/
|
||||
|
||||
mask = 1 << coreid;
|
||||
/* LINUX_APP_BOOT_BLOCK is initialized in bootoct binary */
|
||||
block_desc = cvmx_bootmem_find_named_block(LINUX_APP_BOOT_BLOCK_NAME);
|
||||
|
||||
if (!block_desc) {
|
||||
avail_coremask =
|
||||
cvmx_read64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
LABI_ADDR_IN_BOOTLOADER +
|
||||
offsetof
|
||||
(struct linux_app_boot_info,
|
||||
avail_coremask)));
|
||||
struct linux_app_boot_info *labi;
|
||||
|
||||
labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER);
|
||||
|
||||
labi->avail_coremask |= mask;
|
||||
new_mask = labi->avail_coremask;
|
||||
} else { /* alternative, already initialized */
|
||||
avail_coremask =
|
||||
cvmx_read64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
block_desc->base_addr +
|
||||
AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK));
|
||||
uint32_t *p = (uint32_t *)PHYS_TO_XKSEG_CACHED(block_desc->base_addr +
|
||||
AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK);
|
||||
*p |= mask;
|
||||
new_mask = *p;
|
||||
}
|
||||
|
||||
avail_coremask |= 1 << coreid;
|
||||
|
||||
/* Setting avail_coremask for bootoct binary */
|
||||
if (!block_desc) {
|
||||
cvmx_write64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
LABI_ADDR_IN_BOOTLOADER +
|
||||
offsetof(struct linux_app_boot_info,
|
||||
avail_coremask)),
|
||||
avail_coremask);
|
||||
} else {
|
||||
cvmx_write64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
block_desc->base_addr +
|
||||
AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK),
|
||||
avail_coremask);
|
||||
}
|
||||
|
||||
pr_info("Reset core %d. Available Coremask = %x\n", coreid,
|
||||
avail_coremask);
|
||||
pr_info("Reset core %d. Available Coremask = 0x%x \n", coreid, new_mask);
|
||||
mb();
|
||||
cvmx_write_csr(CVMX_CIU_PP_RST, 1 << coreid);
|
||||
cvmx_write_csr(CVMX_CIU_PP_RST, 0);
|
||||
}
|
||||
|
||||
void play_dead(void)
|
||||
{
|
||||
int coreid = cvmx_get_core_num();
|
||||
int cpu = cpu_number_map(cvmx_get_core_num());
|
||||
|
||||
idle_task_exit();
|
||||
octeon_processor_boot = 0xff;
|
||||
per_cpu(cpu_state, coreid) = CPU_DEAD;
|
||||
per_cpu(cpu_state, cpu) = CPU_DEAD;
|
||||
|
||||
mb();
|
||||
|
||||
while (1) /* core will be reset here */
|
||||
;
|
||||
@ -344,29 +352,27 @@ static void start_after_reset(void)
|
||||
kernel_entry(0, 0, 0); /* set a2 = 0 for secondary core */
|
||||
}
|
||||
|
||||
int octeon_update_boot_vector(unsigned int cpu)
|
||||
static int octeon_update_boot_vector(unsigned int cpu)
|
||||
{
|
||||
|
||||
int coreid = cpu_logical_map(cpu);
|
||||
unsigned int avail_coremask;
|
||||
struct cvmx_bootmem_named_block_desc *block_desc;
|
||||
uint32_t avail_coremask;
|
||||
const struct cvmx_bootmem_named_block_desc *block_desc;
|
||||
struct boot_init_vector *boot_vect =
|
||||
(struct boot_init_vector *) cvmx_phys_to_ptr(0x0 +
|
||||
BOOTLOADER_BOOT_VECTOR);
|
||||
(struct boot_init_vector *)PHYS_TO_XKSEG_CACHED(BOOTLOADER_BOOT_VECTOR);
|
||||
|
||||
block_desc = cvmx_bootmem_find_named_block(LINUX_APP_BOOT_BLOCK_NAME);
|
||||
|
||||
if (!block_desc) {
|
||||
avail_coremask =
|
||||
cvmx_read64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
LABI_ADDR_IN_BOOTLOADER +
|
||||
offsetof(struct linux_app_boot_info,
|
||||
avail_coremask)));
|
||||
struct linux_app_boot_info *labi;
|
||||
|
||||
labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER);
|
||||
|
||||
avail_coremask = labi->avail_coremask;
|
||||
labi->avail_coremask &= ~(1 << coreid);
|
||||
} else { /* alternative, already initialized */
|
||||
avail_coremask =
|
||||
cvmx_read64_uint32(CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS,
|
||||
block_desc->base_addr +
|
||||
AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK));
|
||||
avail_coremask = *(uint32_t *)PHYS_TO_XKSEG_CACHED(
|
||||
block_desc->base_addr + AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK);
|
||||
}
|
||||
|
||||
if (!(avail_coremask & (1 << coreid))) {
|
||||
@ -377,9 +383,9 @@ int octeon_update_boot_vector(unsigned int cpu)
|
||||
|
||||
boot_vect[coreid].app_start_func_addr =
|
||||
(uint32_t) (unsigned long) start_after_reset;
|
||||
boot_vect[coreid].code_addr = InitTLBStart_addr;
|
||||
boot_vect[coreid].code_addr = octeon_bootloader_entry_addr;
|
||||
|
||||
CVMX_SYNC;
|
||||
mb();
|
||||
|
||||
cvmx_write_csr(CVMX_CIU_NMI, (1 << coreid) & avail_coremask);
|
||||
|
||||
@ -405,17 +411,11 @@ static int __cpuinit octeon_cpu_callback(struct notifier_block *nfb,
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block __cpuinitdata octeon_cpu_notifier = {
|
||||
.notifier_call = octeon_cpu_callback,
|
||||
};
|
||||
|
||||
static int __cpuinit register_cavium_notifier(void)
|
||||
{
|
||||
register_hotcpu_notifier(&octeon_cpu_notifier);
|
||||
|
||||
hotcpu_notifier(octeon_cpu_callback, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
late_initcall(register_cavium_notifier);
|
||||
|
||||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
@ -7,5 +7,3 @@ obj-y := buttons.o irq.o lcd.o led.o reset.o rtc.o serial.o setup.o time.o
|
||||
obj-$(CONFIG_PCI) += pci.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += console.o
|
||||
obj-$(CONFIG_MTD_PHYSMAP) += mtd.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
6
arch/mips/cobalt/Platform
Normal file
6
arch/mips/cobalt/Platform
Normal file
@ -0,0 +1,6 @@
|
||||
#
|
||||
# Cobalt Server
|
||||
#
|
||||
platform-$(CONFIG_MIPS_COBALT) += cobalt/
|
||||
cflags-$(CONFIG_MIPS_COBALT) += -I$(srctree)/arch/mips/include/asm/mach-cobalt
|
||||
load-$(CONFIG_MIPS_COBALT) += 0xffffffff80080000
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_DB1000=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1000=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_DB1100=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1100=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_DB1200=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1200=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_DB1500=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1500=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_DB1550=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1550=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
2060
arch/mips/configs/gpr_defconfig
Normal file
2060
arch/mips/configs/gpr_defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_MTX1=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1500=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_PB1100=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1100=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_PB1200=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1200=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_MIPS_PB1500=y
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1500=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -8,7 +8,7 @@ CONFIG_MIPS=y
|
||||
#
|
||||
# Machine selection
|
||||
#
|
||||
CONFIG_MACH_ALCHEMY=y
|
||||
CONFIG_MIPS_ALCHEMY=y
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
@ -64,7 +64,6 @@ CONFIG_ALCHEMY_GPIOINT_AU1000=y
|
||||
CONFIG_MIPS_PB1550=y
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_SOC_AU1550=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_LOONGSON_UART_BASE=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.31-rc5
|
||||
# Fri Aug 28 14:49:33 2009
|
||||
# Linux kernel version: 2.6.35-rc3
|
||||
# Thu Jul 1 11:03:28 2010
|
||||
#
|
||||
CONFIG_MIPS=y
|
||||
|
||||
@ -11,11 +11,12 @@ CONFIG_MIPS=y
|
||||
# CONFIG_MACH_ALCHEMY is not set
|
||||
# CONFIG_AR7 is not set
|
||||
# CONFIG_BCM47XX is not set
|
||||
# CONFIG_BCM63XX is not set
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_LASAT is not set
|
||||
# CONFIG_LEMOTE_FULONG is not set
|
||||
# CONFIG_MACH_LOONGSON is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_NEC_MARKEINS is not set
|
||||
@ -50,7 +51,6 @@ CONFIG_POWERTV=y
|
||||
# CONFIG_MIN_RUNTIME_RESOURCES is not set
|
||||
# CONFIG_BOOTLOADER_DRIVER is not set
|
||||
CONFIG_BOOTLOADER_FAMILY="R2"
|
||||
CONFIG_CSRC_POWERTV=y
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
@ -65,9 +65,9 @@ CONFIG_SCHED_OMIT_FRAME_POINTER=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CSRC_POWERTV=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
# CONFIG_EARLY_PRINTK is not set
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
# CONFIG_NO_IOPORT is not set
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
@ -79,7 +79,8 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
#
|
||||
# CPU selection
|
||||
#
|
||||
# CONFIG_CPU_LOONGSON2 is not set
|
||||
# CONFIG_CPU_LOONGSON2E is not set
|
||||
# CONFIG_CPU_LOONGSON2F is not set
|
||||
# CONFIG_CPU_MIPS32_R1 is not set
|
||||
CONFIG_CPU_MIPS32_R2=y
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
@ -122,7 +123,7 @@ CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_CPU_MIPSR2_IRQ_VI=y
|
||||
CONFIG_CPU_MIPSR2_IRQ_EI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
@ -144,8 +145,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
# CONFIG_KSM is not set
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
CONFIG_NO_HZ=y
|
||||
@ -177,6 +177,7 @@ CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_BROKEN_ON_SMP=y
|
||||
CONFIG_LOCK_KERNEL=y
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
CONFIG_CROSS_COMPILE="mips-linux-"
|
||||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
# CONFIG_SWAP is not set
|
||||
@ -190,19 +191,15 @@ CONFIG_SYSVIPC_SYSCTL=y
|
||||
#
|
||||
# RCU Subsystem
|
||||
#
|
||||
CONFIG_CLASSIC_RCU=y
|
||||
# CONFIG_TREE_RCU is not set
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
CONFIG_TREE_RCU=y
|
||||
# CONFIG_TREE_PREEMPT_RCU is not set
|
||||
# CONFIG_TINY_RCU is not set
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
CONFIG_RCU_FANOUT=32
|
||||
# CONFIG_RCU_FANOUT_EXACT is not set
|
||||
# CONFIG_TREE_RCU_TRACE is not set
|
||||
# CONFIG_PREEMPT_RCU_TRACE is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_GROUP_SCHED=y
|
||||
CONFIG_FAIR_GROUP_SCHED=y
|
||||
# CONFIG_RT_GROUP_SCHED is not set
|
||||
CONFIG_USER_SCHED=y
|
||||
# CONFIG_CGROUP_SCHED is not set
|
||||
# CONFIG_CGROUPS is not set
|
||||
# CONFIG_SYSFS_DEPRECATED_V2 is not set
|
||||
CONFIG_RELAY=y
|
||||
# CONFIG_NAMESPACES is not set
|
||||
@ -211,6 +208,7 @@ CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_RD_GZIP is not set
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
# CONFIG_RD_LZMA is not set
|
||||
# CONFIG_RD_LZO is not set
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_SYSCTL=y
|
||||
CONFIG_ANON_INODES=y
|
||||
@ -234,18 +232,16 @@ CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
# Kernel Performance Events And Counters
|
||||
#
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
CONFIG_PCI_QUIRKS=y
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLUB=y
|
||||
# CONFIG_SLOB is not set
|
||||
# CONFIG_PROFILING is not set
|
||||
# CONFIG_MARKERS is not set
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
|
||||
#
|
||||
@ -253,7 +249,7 @@ CONFIG_HAVE_OPROFILE=y
|
||||
#
|
||||
# CONFIG_GCOV_KERNEL is not set
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_RT_MUTEXES=y
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_MODULES=y
|
||||
@ -271,15 +267,41 @@ CONFIG_LBDAF=y
|
||||
# IO Schedulers
|
||||
#
|
||||
CONFIG_IOSCHED_NOOP=y
|
||||
# CONFIG_IOSCHED_AS is not set
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_IOSCHED_CFQ is not set
|
||||
# CONFIG_DEFAULT_AS is not set
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
# CONFIG_DEFAULT_CFQ is not set
|
||||
CONFIG_DEFAULT_NOOP=y
|
||||
CONFIG_DEFAULT_IOSCHED="noop"
|
||||
# CONFIG_PROBE_INITRD_HEADER is not set
|
||||
# CONFIG_INLINE_SPIN_TRYLOCK is not set
|
||||
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_BH is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_SPIN_UNLOCK is not set
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
|
||||
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_INLINE_READ_TRYLOCK is not set
|
||||
# CONFIG_INLINE_READ_LOCK is not set
|
||||
# CONFIG_INLINE_READ_LOCK_BH is not set
|
||||
# CONFIG_INLINE_READ_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_READ_UNLOCK is not set
|
||||
# CONFIG_INLINE_READ_UNLOCK_BH is not set
|
||||
# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
|
||||
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_INLINE_WRITE_TRYLOCK is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_BH is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
|
||||
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
|
||||
# CONFIG_INLINE_WRITE_UNLOCK is not set
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
|
||||
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
|
||||
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
|
||||
# CONFIG_FREEZER is not set
|
||||
|
||||
#
|
||||
@ -289,7 +311,6 @@ CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
# CONFIG_ARCH_SUPPORTS_MSI is not set
|
||||
# CONFIG_PCI_LEGACY is not set
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
# CONFIG_PCI_STUB is not set
|
||||
# CONFIG_PCI_IOV is not set
|
||||
@ -318,7 +339,6 @@ CONFIG_NET=y
|
||||
# Networking options
|
||||
#
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_MMAP=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM=y
|
||||
# CONFIG_XFRM_USER is not set
|
||||
@ -390,12 +410,26 @@ CONFIG_NETFILTER_ADVANCED=y
|
||||
# CONFIG_NETFILTER_NETLINK_LOG is not set
|
||||
# CONFIG_NF_CONNTRACK is not set
|
||||
CONFIG_NETFILTER_XTABLES=y
|
||||
|
||||
#
|
||||
# Xtables combined modules
|
||||
#
|
||||
# CONFIG_NETFILTER_XT_MARK is not set
|
||||
|
||||
#
|
||||
# Xtables targets
|
||||
#
|
||||
# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_MARK is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_TEE is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
|
||||
|
||||
#
|
||||
# Xtables matches
|
||||
#
|
||||
# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
|
||||
@ -465,10 +499,13 @@ CONFIG_IP6_NF_FILTER=y
|
||||
# CONFIG_IP6_NF_RAW is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_SCTP is not set
|
||||
# CONFIG_RDS is not set
|
||||
# CONFIG_TIPC is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_L2TP is not set
|
||||
CONFIG_STP=y
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
# CONFIG_DECNET is not set
|
||||
@ -526,10 +563,21 @@ CONFIG_NET_SCH_FIFO=y
|
||||
# CONFIG_IRDA is not set
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
CONFIG_WIRELESS=y
|
||||
# CONFIG_CFG80211 is not set
|
||||
# CONFIG_LIB80211 is not set
|
||||
|
||||
#
|
||||
# CFG80211 needs to be enabled for MAC80211
|
||||
#
|
||||
|
||||
#
|
||||
# Some wireless drivers require a rate control algorithm
|
||||
#
|
||||
# CONFIG_WIMAX is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
# CONFIG_CAIF is not set
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
@ -539,6 +587,7 @@ CONFIG_NET_SCH_FIFO=y
|
||||
# Generic Driver Options
|
||||
#
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
# CONFIG_DEVTMPFS is not set
|
||||
CONFIG_STANDALONE=y
|
||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
CONFIG_FW_LOADER=y
|
||||
@ -550,9 +599,9 @@ CONFIG_EXTRA_FIRMWARE=""
|
||||
# CONFIG_CONNECTOR is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_TESTS is not set
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_TESTS is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_AR7_PARTS is not set
|
||||
@ -568,6 +617,7 @@ CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_INFTL is not set
|
||||
# CONFIG_RFD_FTL is not set
|
||||
# CONFIG_SSFDC is not set
|
||||
# CONFIG_SM_FTL is not set
|
||||
# CONFIG_MTD_OOPS is not set
|
||||
|
||||
#
|
||||
@ -611,11 +661,16 @@ CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
# CONFIG_MTD_NAND_ECC_SMC is not set
|
||||
CONFIG_MTD_NAND=y
|
||||
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
|
||||
# CONFIG_MTD_NAND_ECC_SMC is not set
|
||||
# CONFIG_MTD_SM_COMMON is not set
|
||||
# CONFIG_MTD_NAND_MUSEUM_IDS is not set
|
||||
# CONFIG_MTD_NAND_DENALI is not set
|
||||
CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR=0xFF108018
|
||||
CONFIG_MTD_NAND_IDS=y
|
||||
# CONFIG_MTD_NAND_RICOH is not set
|
||||
# CONFIG_MTD_NAND_DISKONCHIP is not set
|
||||
# CONFIG_MTD_NAND_CAFE is not set
|
||||
# CONFIG_MTD_NAND_NANDSIM is not set
|
||||
@ -641,6 +696,10 @@ CONFIG_BLK_DEV=y
|
||||
# CONFIG_BLK_DEV_COW_COMMON is not set
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
|
||||
|
||||
#
|
||||
# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
|
||||
#
|
||||
# CONFIG_BLK_DEV_NBD is not set
|
||||
# CONFIG_BLK_DEV_SX8 is not set
|
||||
# CONFIG_BLK_DEV_UB is not set
|
||||
@ -658,6 +717,7 @@ CONFIG_HAVE_IDE=y
|
||||
#
|
||||
# SCSI device support
|
||||
#
|
||||
CONFIG_SCSI_MOD=y
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_DMA=y
|
||||
@ -693,64 +753,95 @@ CONFIG_SCSI_WAIT_SCAN=m
|
||||
# CONFIG_SCSI_OSD_INITIATOR is not set
|
||||
CONFIG_ATA=y
|
||||
# CONFIG_ATA_NONSTANDARD is not set
|
||||
CONFIG_ATA_VERBOSE_ERROR=y
|
||||
CONFIG_SATA_PMP=y
|
||||
|
||||
#
|
||||
# Controllers with non-SFF native interface
|
||||
#
|
||||
# CONFIG_SATA_AHCI is not set
|
||||
# CONFIG_SATA_AHCI_PLATFORM is not set
|
||||
# CONFIG_SATA_INIC162X is not set
|
||||
# CONFIG_SATA_SIL24 is not set
|
||||
CONFIG_ATA_SFF=y
|
||||
# CONFIG_SATA_SVW is not set
|
||||
|
||||
#
|
||||
# SFF controllers with custom DMA interface
|
||||
#
|
||||
# CONFIG_PDC_ADMA is not set
|
||||
# CONFIG_SATA_QSTOR is not set
|
||||
# CONFIG_SATA_SX4 is not set
|
||||
CONFIG_ATA_BMDMA=y
|
||||
|
||||
#
|
||||
# SATA SFF controllers with BMDMA
|
||||
#
|
||||
# CONFIG_ATA_PIIX is not set
|
||||
# CONFIG_SATA_MV is not set
|
||||
# CONFIG_SATA_NV is not set
|
||||
# CONFIG_PDC_ADMA is not set
|
||||
# CONFIG_SATA_QSTOR is not set
|
||||
# CONFIG_SATA_PROMISE is not set
|
||||
# CONFIG_SATA_SX4 is not set
|
||||
# CONFIG_SATA_SIL is not set
|
||||
# CONFIG_SATA_SIS is not set
|
||||
# CONFIG_SATA_SVW is not set
|
||||
# CONFIG_SATA_ULI is not set
|
||||
# CONFIG_SATA_VIA is not set
|
||||
# CONFIG_SATA_VITESSE is not set
|
||||
# CONFIG_SATA_INIC162X is not set
|
||||
|
||||
#
|
||||
# PATA SFF controllers with BMDMA
|
||||
#
|
||||
# CONFIG_PATA_ALI is not set
|
||||
# CONFIG_PATA_AMD is not set
|
||||
# CONFIG_PATA_ARTOP is not set
|
||||
# CONFIG_PATA_ATIIXP is not set
|
||||
# CONFIG_PATA_CMD640_PCI is not set
|
||||
# CONFIG_PATA_ATP867X is not set
|
||||
# CONFIG_PATA_CMD64X is not set
|
||||
# CONFIG_PATA_CS5520 is not set
|
||||
# CONFIG_PATA_CS5530 is not set
|
||||
# CONFIG_PATA_CYPRESS is not set
|
||||
# CONFIG_PATA_EFAR is not set
|
||||
# CONFIG_ATA_GENERIC is not set
|
||||
# CONFIG_PATA_HPT366 is not set
|
||||
# CONFIG_PATA_HPT37X is not set
|
||||
# CONFIG_PATA_HPT3X2N is not set
|
||||
# CONFIG_PATA_HPT3X3 is not set
|
||||
# CONFIG_PATA_IT821X is not set
|
||||
# CONFIG_PATA_IT8213 is not set
|
||||
# CONFIG_PATA_IT821X is not set
|
||||
# CONFIG_PATA_JMICRON is not set
|
||||
# CONFIG_PATA_TRIFLEX is not set
|
||||
# CONFIG_PATA_MARVELL is not set
|
||||
# CONFIG_PATA_MPIIX is not set
|
||||
# CONFIG_PATA_OLDPIIX is not set
|
||||
# CONFIG_PATA_NETCELL is not set
|
||||
# CONFIG_PATA_NINJA32 is not set
|
||||
# CONFIG_PATA_NS87410 is not set
|
||||
# CONFIG_PATA_NS87415 is not set
|
||||
# CONFIG_PATA_OPTI is not set
|
||||
# CONFIG_PATA_OLDPIIX is not set
|
||||
# CONFIG_PATA_OPTIDMA is not set
|
||||
# CONFIG_PATA_PDC2027X is not set
|
||||
# CONFIG_PATA_PDC_OLD is not set
|
||||
# CONFIG_PATA_RADISYS is not set
|
||||
# CONFIG_PATA_RZ1000 is not set
|
||||
# CONFIG_PATA_RDC is not set
|
||||
# CONFIG_PATA_SC1200 is not set
|
||||
# CONFIG_PATA_SCH is not set
|
||||
# CONFIG_PATA_SERVERWORKS is not set
|
||||
# CONFIG_PATA_PDC2027X is not set
|
||||
# CONFIG_PATA_SIL680 is not set
|
||||
# CONFIG_PATA_SIS is not set
|
||||
# CONFIG_PATA_TOSHIBA is not set
|
||||
# CONFIG_PATA_TRIFLEX is not set
|
||||
# CONFIG_PATA_VIA is not set
|
||||
# CONFIG_PATA_WINBOND is not set
|
||||
|
||||
#
|
||||
# PIO-only SFF controllers
|
||||
#
|
||||
# CONFIG_PATA_CMD640_PCI is not set
|
||||
# CONFIG_PATA_MPIIX is not set
|
||||
# CONFIG_PATA_NS87410 is not set
|
||||
# CONFIG_PATA_OPTI is not set
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
# CONFIG_PATA_SCH is not set
|
||||
# CONFIG_PATA_RZ1000 is not set
|
||||
|
||||
#
|
||||
# Generic fallback / legacy drivers
|
||||
#
|
||||
# CONFIG_ATA_GENERIC is not set
|
||||
# CONFIG_PATA_LEGACY is not set
|
||||
# CONFIG_MD is not set
|
||||
# CONFIG_FUSION is not set
|
||||
|
||||
@ -763,7 +854,7 @@ CONFIG_ATA_SFF=y
|
||||
#
|
||||
|
||||
#
|
||||
# See the help texts for more information.
|
||||
# The newer stack is recommended.
|
||||
#
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_IEEE1394 is not set
|
||||
@ -787,6 +878,7 @@ CONFIG_MII=y
|
||||
# CONFIG_SMC91X is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_ETHOC is not set
|
||||
# CONFIG_SMSC911X is not set
|
||||
# CONFIG_DNET is not set
|
||||
# CONFIG_NET_TULIP is not set
|
||||
# CONFIG_HP100 is not set
|
||||
@ -800,6 +892,7 @@ CONFIG_MII=y
|
||||
# CONFIG_NET_PCI is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_KS8842 is not set
|
||||
# CONFIG_KS8851_MLL is not set
|
||||
# CONFIG_ATL2 is not set
|
||||
CONFIG_NETDEV_1000=y
|
||||
# CONFIG_ACENIC is not set
|
||||
@ -829,6 +922,8 @@ CONFIG_NETDEV_10000=y
|
||||
# CONFIG_CHELSIO_T1 is not set
|
||||
CONFIG_CHELSIO_T3_DEPENDS=y
|
||||
# CONFIG_CHELSIO_T3 is not set
|
||||
CONFIG_CHELSIO_T4_DEPENDS=y
|
||||
# CONFIG_CHELSIO_T4 is not set
|
||||
# CONFIG_ENIC is not set
|
||||
# CONFIG_IXGBE is not set
|
||||
# CONFIG_IXGB is not set
|
||||
@ -841,16 +936,12 @@ CONFIG_CHELSIO_T3_DEPENDS=y
|
||||
# CONFIG_MLX4_CORE is not set
|
||||
# CONFIG_TEHUTI is not set
|
||||
# CONFIG_BNX2X is not set
|
||||
# CONFIG_QLCNIC is not set
|
||||
# CONFIG_QLGE is not set
|
||||
# CONFIG_SFC is not set
|
||||
# CONFIG_BE2NET is not set
|
||||
# CONFIG_TR is not set
|
||||
|
||||
#
|
||||
# Wireless LAN
|
||||
#
|
||||
# CONFIG_WLAN_PRE80211 is not set
|
||||
# CONFIG_WLAN_80211 is not set
|
||||
# CONFIG_WLAN is not set
|
||||
|
||||
#
|
||||
# Enable WiMAX (Networking options) to see the WiMAX drivers
|
||||
@ -864,6 +955,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
|
||||
# CONFIG_USB_PEGASUS is not set
|
||||
CONFIG_USB_RTL8150=y
|
||||
# CONFIG_USB_USBNET is not set
|
||||
# CONFIG_USB_IPHETH is not set
|
||||
# CONFIG_WAN is not set
|
||||
# CONFIG_FDDI is not set
|
||||
# CONFIG_HIPPI is not set
|
||||
@ -873,6 +965,7 @@ CONFIG_USB_RTL8150=y
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
# CONFIG_NETPOLL is not set
|
||||
# CONFIG_NET_POLL_CONTROLLER is not set
|
||||
# CONFIG_VMXNET3 is not set
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_PHONE is not set
|
||||
|
||||
@ -882,6 +975,7 @@ CONFIG_USB_RTL8150=y
|
||||
CONFIG_INPUT=y
|
||||
# CONFIG_INPUT_FF_MEMLESS is not set
|
||||
# CONFIG_INPUT_POLLDEV is not set
|
||||
# CONFIG_INPUT_SPARSEKMAP is not set
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
@ -913,6 +1007,7 @@ CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
# CONFIG_SERIAL_NONSTANDARD is not set
|
||||
# CONFIG_N_GSM is not set
|
||||
# CONFIG_NOZOMI is not set
|
||||
|
||||
#
|
||||
@ -924,6 +1019,9 @@ CONFIG_INPUT_EVDEV=y
|
||||
# Non-8250 serial port support
|
||||
#
|
||||
# CONFIG_SERIAL_JSM is not set
|
||||
# CONFIG_SERIAL_TIMBERDALE is not set
|
||||
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
|
||||
# CONFIG_SERIAL_ALTERA_UART is not set
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
@ -934,6 +1032,7 @@ CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
CONFIG_DEVPORT=y
|
||||
# CONFIG_RAMOOPS is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
|
||||
@ -945,7 +1044,6 @@ CONFIG_DEVPORT=y
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
@ -953,20 +1051,14 @@ CONFIG_SSB_POSSIBLE=y
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
#
|
||||
# CONFIG_MFD_CORE is not set
|
||||
# CONFIG_MFD_SM501 is not set
|
||||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_MFD_SUPPORT is not set
|
||||
# CONFIG_REGULATOR is not set
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_VGA_ARB is not set
|
||||
# CONFIG_DRM is not set
|
||||
# CONFIG_VGASTATE is not set
|
||||
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
|
||||
@ -980,7 +1072,6 @@ CONFIG_SSB_POSSIBLE=y
|
||||
# CONFIG_SOUND is not set
|
||||
CONFIG_HID_SUPPORT=y
|
||||
CONFIG_HID=y
|
||||
# CONFIG_HID_DEBUG is not set
|
||||
# CONFIG_HIDRAW is not set
|
||||
|
||||
#
|
||||
@ -993,31 +1084,43 @@ CONFIG_USB_HIDDEV=y
|
||||
#
|
||||
# Special HID drivers
|
||||
#
|
||||
# CONFIG_HID_3M_PCT is not set
|
||||
# CONFIG_HID_A4TECH is not set
|
||||
# CONFIG_HID_APPLE is not set
|
||||
# CONFIG_HID_BELKIN is not set
|
||||
# CONFIG_HID_CANDO is not set
|
||||
# CONFIG_HID_CHERRY is not set
|
||||
# CONFIG_HID_CHICONY is not set
|
||||
# CONFIG_HID_CYPRESS is not set
|
||||
# CONFIG_HID_DRAGONRISE is not set
|
||||
# CONFIG_HID_EGALAX is not set
|
||||
# CONFIG_HID_EZKEY is not set
|
||||
# CONFIG_HID_KYE is not set
|
||||
# CONFIG_HID_GYRATION is not set
|
||||
# CONFIG_HID_TWINHAN is not set
|
||||
# CONFIG_HID_KENSINGTON is not set
|
||||
# CONFIG_HID_LOGITECH is not set
|
||||
# CONFIG_HID_MICROSOFT is not set
|
||||
# CONFIG_HID_MOSART is not set
|
||||
# CONFIG_HID_MONTEREY is not set
|
||||
# CONFIG_HID_NTRIG is not set
|
||||
# CONFIG_HID_ORTEK is not set
|
||||
# CONFIG_HID_PANTHERLORD is not set
|
||||
# CONFIG_HID_PETALYNX is not set
|
||||
# CONFIG_HID_PICOLCD is not set
|
||||
# CONFIG_HID_QUANTA is not set
|
||||
# CONFIG_HID_ROCCAT is not set
|
||||
# CONFIG_HID_ROCCAT_KONE is not set
|
||||
# CONFIG_HID_SAMSUNG is not set
|
||||
# CONFIG_HID_SONY is not set
|
||||
# CONFIG_HID_STANTUM is not set
|
||||
# CONFIG_HID_SUNPLUS is not set
|
||||
# CONFIG_HID_GREENASIA is not set
|
||||
# CONFIG_HID_SMARTJOYPLUS is not set
|
||||
# CONFIG_HID_TOPSEED is not set
|
||||
# CONFIG_HID_THRUSTMASTER is not set
|
||||
# CONFIG_HID_ZEROPLUS is not set
|
||||
# CONFIG_HID_ZYDACRON is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
CONFIG_USB_ARCH_HAS_OHCI=y
|
||||
@ -1032,7 +1135,6 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
# CONFIG_USB_DEVICE_CLASS is not set
|
||||
# CONFIG_USB_DYNAMIC_MINORS is not set
|
||||
# CONFIG_USB_OTG is not set
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
# CONFIG_USB_MON is not set
|
||||
@ -1050,6 +1152,7 @@ CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_OXU210HP_HCD is not set
|
||||
# CONFIG_USB_ISP116X_HCD is not set
|
||||
# CONFIG_USB_ISP1760_HCD is not set
|
||||
# CONFIG_USB_ISP1362_HCD is not set
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
|
||||
@ -1133,6 +1236,7 @@ CONFIG_USB_SERIAL_CP210X=y
|
||||
# CONFIG_USB_SERIAL_NAVMAN is not set
|
||||
# CONFIG_USB_SERIAL_PL2303 is not set
|
||||
# CONFIG_USB_SERIAL_OTI6858 is not set
|
||||
# CONFIG_USB_SERIAL_QCAUX is not set
|
||||
# CONFIG_USB_SERIAL_QUALCOMM is not set
|
||||
# CONFIG_USB_SERIAL_SPCP8X5 is not set
|
||||
# CONFIG_USB_SERIAL_HP4X is not set
|
||||
@ -1146,6 +1250,8 @@ CONFIG_USB_SERIAL_CP210X=y
|
||||
# CONFIG_USB_SERIAL_OPTION is not set
|
||||
# CONFIG_USB_SERIAL_OMNINET is not set
|
||||
# CONFIG_USB_SERIAL_OPTICON is not set
|
||||
# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set
|
||||
# CONFIG_USB_SERIAL_ZIO is not set
|
||||
# CONFIG_USB_SERIAL_DEBUG is not set
|
||||
|
||||
#
|
||||
@ -1158,7 +1264,6 @@ CONFIG_USB_SERIAL_CP210X=y
|
||||
# CONFIG_USB_RIO500 is not set
|
||||
# CONFIG_USB_LEGOTOWER is not set
|
||||
# CONFIG_USB_LCD is not set
|
||||
# CONFIG_USB_BERRY_CHARGE is not set
|
||||
# CONFIG_USB_LED is not set
|
||||
# CONFIG_USB_CYPRESS_CY7C63 is not set
|
||||
# CONFIG_USB_CYTHERM is not set
|
||||
@ -1171,7 +1276,6 @@ CONFIG_USB_SERIAL_CP210X=y
|
||||
# CONFIG_USB_IOWARRIOR is not set
|
||||
# CONFIG_USB_TEST is not set
|
||||
# CONFIG_USB_ISIGHTFW is not set
|
||||
# CONFIG_USB_VST is not set
|
||||
# CONFIG_USB_GADGET is not set
|
||||
|
||||
#
|
||||
@ -1189,10 +1293,6 @@ CONFIG_RTC_LIB=y
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
@ -1214,6 +1314,7 @@ CONFIG_JBD=y
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
# CONFIG_NILFS2_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_FSNOTIFY=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
@ -1274,6 +1375,7 @@ CONFIG_JFFS2_ZLIB=y
|
||||
# CONFIG_JFFS2_LZO is not set
|
||||
CONFIG_JFFS2_RTIME=y
|
||||
# CONFIG_JFFS2_RUBIN is not set
|
||||
# CONFIG_LOGFS is not set
|
||||
CONFIG_CRAMFS=y
|
||||
# CONFIG_SQUASHFS is not set
|
||||
# CONFIG_VXFS_FS is not set
|
||||
@ -1284,7 +1386,6 @@ CONFIG_CRAMFS=y
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
# CONFIG_SYSV_FS is not set
|
||||
# CONFIG_UFS_FS is not set
|
||||
# CONFIG_NILFS2_FS is not set
|
||||
CONFIG_NETWORK_FILESYSTEMS=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3=y
|
||||
@ -1299,6 +1400,7 @@ CONFIG_SUNRPC=y
|
||||
# CONFIG_RPCSEC_GSS_KRB5 is not set
|
||||
# CONFIG_RPCSEC_GSS_SPKM3 is not set
|
||||
# CONFIG_SMB_FS is not set
|
||||
# CONFIG_CEPH_FS is not set
|
||||
# CONFIG_CIFS is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
@ -1360,6 +1462,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
CONFIG_FRAME_WARN=1024
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
CONFIG_DEBUG_FS=y
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
@ -1393,15 +1496,25 @@ CONFIG_DEBUG_INFO=y
|
||||
# CONFIG_DEBUG_LIST is not set
|
||||
# CONFIG_DEBUG_SG is not set
|
||||
# CONFIG_DEBUG_NOTIFIERS is not set
|
||||
# CONFIG_DEBUG_CREDENTIALS is not set
|
||||
# CONFIG_BOOT_PRINTK_DELAY is not set
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
# CONFIG_BACKTRACE_SELF_TEST is not set
|
||||
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
|
||||
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
|
||||
# CONFIG_LKDTM is not set
|
||||
# CONFIG_FAULT_INJECTION is not set
|
||||
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
|
||||
# CONFIG_PAGE_POISONING is not set
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_TRACING_SUPPORT=y
|
||||
CONFIG_FTRACE=y
|
||||
# CONFIG_FUNCTION_TRACER is not set
|
||||
# CONFIG_IRQSOFF_TRACER is not set
|
||||
# CONFIG_PREEMPT_TRACER is not set
|
||||
# CONFIG_SCHED_TRACER is not set
|
||||
@ -1410,19 +1523,22 @@ CONFIG_FTRACE=y
|
||||
CONFIG_BRANCH_PROFILE_NONE=y
|
||||
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
|
||||
# CONFIG_PROFILE_ALL_BRANCHES is not set
|
||||
# CONFIG_STACK_TRACER is not set
|
||||
# CONFIG_KMEMTRACE is not set
|
||||
# CONFIG_WORKQUEUE_TRACER is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
# CONFIG_DYNAMIC_DEBUG is not set
|
||||
# CONFIG_ATOMIC64_SELFTEST is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
# CONFIG_KGDB is not set
|
||||
# CONFIG_KMEMCHECK is not set
|
||||
# CONFIG_EARLY_PRINTK is not set
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE="rw dhash_entries=1024 ihash_entries=1024 ip=10.0.1.3:10.0.1.1:10.0.1.1:255.255.255.0:zeus:eth0: root=/dev/nfs nfsroot=/nfsroot/cramfs,wsize=512,rsize=512,tcp nokgdb console=ttyUSB0,115200 memsize=252M"
|
||||
CONFIG_CMDLINE=""
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
# CONFIG_DEBUG_STACK_USAGE is not set
|
||||
# CONFIG_RUNTIME_DEBUG is not set
|
||||
# CONFIG_SPINLOCK_TEST is not set
|
||||
|
||||
#
|
||||
# Security options
|
||||
@ -1430,13 +1546,16 @@ CONFIG_CMDLINE="rw dhash_entries=1024 ihash_entries=1024 ip=10.0.1.3:10.0.1.1:10
|
||||
# CONFIG_KEYS is not set
|
||||
# CONFIG_SECURITY is not set
|
||||
# CONFIG_SECURITYFS is not set
|
||||
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
|
||||
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
|
||||
# CONFIG_DEFAULT_SECURITY_SMACK is not set
|
||||
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_DEFAULT_SECURITY=""
|
||||
CONFIG_CRYPTO=y
|
||||
|
||||
#
|
||||
# Crypto core or helper
|
||||
#
|
||||
# CONFIG_CRYPTO_FIPS is not set
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
@ -1479,11 +1598,13 @@ CONFIG_CRYPTO_CBC=y
|
||||
#
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
# CONFIG_CRYPTO_XCBC is not set
|
||||
# CONFIG_CRYPTO_VMAC is not set
|
||||
|
||||
#
|
||||
# Digest
|
||||
#
|
||||
# CONFIG_CRYPTO_CRC32C is not set
|
||||
# CONFIG_CRYPTO_GHASH is not set
|
||||
# CONFIG_CRYPTO_MD4 is not set
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
||||
|
@ -8,5 +8,3 @@ obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn01-berr.o \
|
||||
obj-$(CONFIG_PROM_CONSOLE) += promcon.o
|
||||
obj-$(CONFIG_TC) += tc.o
|
||||
obj-$(CONFIG_CPU_HAS_WB) += wbflush.o
|
||||
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
8
arch/mips/dec/Platform
Normal file
8
arch/mips/dec/Platform
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# DECstation family
|
||||
#
|
||||
platform-$(CONFIG_MACH_DECSTATION) = dec/
|
||||
cflags-$(CONFIG_MACH_DECSTATION) += \
|
||||
-I$(srctree)/arch/mips/include/asm/mach-dec
|
||||
libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/
|
||||
load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000
|
@ -33,8 +33,7 @@ static int __init prom_console_setup(struct console *co, char *options)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct console sercons =
|
||||
{
|
||||
static struct console sercons = {
|
||||
.name = "ttyS",
|
||||
.write = prom_console_write,
|
||||
.setup = prom_console_setup,
|
||||
|
6
arch/mips/emma/Makefile
Normal file
6
arch/mips/emma/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
obj-$(CONFIG_SOC_EMMA2RH) += common/
|
||||
|
||||
#
|
||||
# NEC EMMA2RH Mark-eins
|
||||
#
|
||||
obj-$(CONFIG_NEC_MARKEINS) += markeins/
|
4
arch/mips/emma/Platform
Normal file
4
arch/mips/emma/Platform
Normal file
@ -0,0 +1,4 @@
|
||||
platform-$(CONFIG_SOC_EMMA2RH) += emma/
|
||||
cflags-$(CONFIG_SOC_EMMA2RH) += \
|
||||
-I$(srctree)/arch/mips/include/asm/mach-emma2rh
|
||||
load-$(CONFIG_NEC_MARKEINS) += 0xffffffff88100000
|
@ -301,7 +301,7 @@ void __init arch_init_irq(void)
|
||||
/* setup cascade interrupts */
|
||||
setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade);
|
||||
setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE, &irq_cascade);
|
||||
setup_irq(CPU_IRQ_BASE + CPU_EMMA2RH_CASCADE, &irq_cascade);
|
||||
setup_irq(MIPS_CPU_IRQ_BASE + 2, &irq_cascade);
|
||||
}
|
||||
|
||||
asmlinkage void plat_irq_dispatch(void)
|
||||
@ -309,13 +309,13 @@ asmlinkage void plat_irq_dispatch(void)
|
||||
unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
|
||||
|
||||
if (pending & STATUSF_IP7)
|
||||
do_IRQ(CPU_IRQ_BASE + 7);
|
||||
do_IRQ(MIPS_CPU_IRQ_BASE + 7);
|
||||
else if (pending & STATUSF_IP2)
|
||||
emma2rh_irq_dispatch();
|
||||
else if (pending & STATUSF_IP1)
|
||||
do_IRQ(CPU_IRQ_BASE + 1);
|
||||
do_IRQ(MIPS_CPU_IRQ_BASE + 1);
|
||||
else if (pending & STATUSF_IP0)
|
||||
do_IRQ(CPU_IRQ_BASE + 0);
|
||||
do_IRQ(MIPS_CPU_IRQ_BASE + 0);
|
||||
else
|
||||
spurious_interrupt();
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ static void markeins_machine_halt(void)
|
||||
|
||||
static void markeins_machine_power_off(void)
|
||||
{
|
||||
printk("EMMA2RH Mark-eins halted. Please turn off the power.\n");
|
||||
markeins_led("poweroff.");
|
||||
while (1) ;
|
||||
}
|
||||
|
38
arch/mips/include/asm/arch_hweight.h
Normal file
38
arch/mips/include/asm/arch_hweight.h
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
#ifndef _ASM_ARCH_HWEIGHT_H
|
||||
#define _ASM_ARCH_HWEIGHT_H
|
||||
|
||||
#ifdef ARCH_HAS_USABLE_BUILTIN_POPCOUNT
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
static inline unsigned int __arch_hweight32(unsigned int w)
|
||||
{
|
||||
return __builtin_popcount(w);
|
||||
}
|
||||
|
||||
static inline unsigned int __arch_hweight16(unsigned int w)
|
||||
{
|
||||
return __builtin_popcount(w & 0xffff);
|
||||
}
|
||||
|
||||
static inline unsigned int __arch_hweight8(unsigned int w)
|
||||
{
|
||||
return __builtin_popcount(w & 0xff);
|
||||
}
|
||||
|
||||
static inline unsigned long __arch_hweight64(__u64 w)
|
||||
{
|
||||
return __builtin_popcountll(w);
|
||||
}
|
||||
|
||||
#else
|
||||
#include <asm-generic/bitops/arch_hweight.h>
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_ARCH_HWEIGHT_H */
|
@ -700,7 +700,10 @@ static inline int ffs(int word)
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm-generic/bitops/sched.h>
|
||||
#include <asm-generic/bitops/hweight.h>
|
||||
|
||||
#include <asm/arch_hweight.h>
|
||||
#include <asm-generic/bitops/const_hweight.h>
|
||||
|
||||
#include <asm-generic/bitops/ext2-non-atomic.h>
|
||||
#include <asm-generic/bitops/ext2-atomic.h>
|
||||
#include <asm-generic/bitops/minix.h>
|
||||
|
@ -71,6 +71,12 @@
|
||||
#define MACH_LEMOTE_LL2F 7
|
||||
#define MACH_LOONGSON_END 8
|
||||
|
||||
/*
|
||||
* Valid machtype for group INGENIC
|
||||
*/
|
||||
#define MACH_INGENIC_JZ4730 0 /* JZ4730 SOC */
|
||||
#define MACH_INGENIC_JZ4740 1 /* JZ4740 SOC */
|
||||
|
||||
extern char *system_type;
|
||||
const char *get_system_type(void);
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
#define BRK_BUG 512 /* Used by BUG() */
|
||||
#define BRK_KDB 513 /* Used in KDB_ENTER() */
|
||||
#define BRK_MEMU 514 /* Used by FPU emulator */
|
||||
#define BRK_KPROBE_BP 515 /* Kprobe break */
|
||||
#define BRK_KPROBE_SSTEPBP 516 /* Kprobe single step software implementation */
|
||||
#define BRK_MULOVF 1023 /* Multiply overflow */
|
||||
|
||||
#endif /* __ASM_BREAK_H */
|
||||
|
@ -62,6 +62,8 @@
|
||||
* RM7000-specific cacheops
|
||||
*/
|
||||
#define Page_Invalidate_T 0x16
|
||||
#define Index_Store_Tag_T 0x0a
|
||||
#define Index_Load_Tag_T 0x06
|
||||
|
||||
/*
|
||||
* R10000-specific cacheops
|
||||
|
@ -9,6 +9,8 @@
|
||||
#ifndef __ASM_COP2_H
|
||||
#define __ASM_COP2_H
|
||||
|
||||
#include <linux/notifier.h>
|
||||
|
||||
enum cu2_ops {
|
||||
CU2_EXCEPTION,
|
||||
CU2_LWC2_OP,
|
||||
@ -20,4 +22,14 @@ enum cu2_ops {
|
||||
extern int register_cu2_notifier(struct notifier_block *nb);
|
||||
extern int cu2_notifier_call_chain(unsigned long val, void *v);
|
||||
|
||||
#define cu2_notifier(fn, pri) \
|
||||
({ \
|
||||
static struct notifier_block fn##_nb __cpuinitdata = { \
|
||||
.notifier_call = fn, \
|
||||
.priority = pri \
|
||||
}; \
|
||||
\
|
||||
register_cu2_notifier(&fn##_nb); \
|
||||
})
|
||||
|
||||
#endif /* __ASM_COP2_H */
|
||||
|
@ -159,7 +159,8 @@
|
||||
|
||||
/*
|
||||
* MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other
|
||||
* pre-MIPS32/MIPS53 processors have CLO, CLZ. For 64-bit kernels
|
||||
* pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and
|
||||
* has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels
|
||||
* cpu_has_clo_clz also indicates the availability of DCLO and DCLZ.
|
||||
*/
|
||||
# ifndef cpu_has_clo_clz
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define PRID_COMP_LSI 0x080000
|
||||
#define PRID_COMP_LEXRA 0x0b0000
|
||||
#define PRID_COMP_CAVIUM 0x0d0000
|
||||
|
||||
#define PRID_COMP_INGENIC 0xd00000
|
||||
|
||||
/*
|
||||
* Assigned values for the product ID register. In order to detect a
|
||||
@ -132,6 +132,12 @@
|
||||
#define PRID_IMP_CAVIUM_CN50XX 0x0600
|
||||
#define PRID_IMP_CAVIUM_CN52XX 0x0700
|
||||
|
||||
/*
|
||||
* These are the PRID's for when 23:16 == PRID_COMP_INGENIC
|
||||
*/
|
||||
|
||||
#define PRID_IMP_JZRISC 0x0200
|
||||
|
||||
/*
|
||||
* Definitions for 7:0 on legacy processors
|
||||
*/
|
||||
@ -219,6 +225,7 @@ enum cpu_type_enum {
|
||||
CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K,
|
||||
CPU_ALCHEMY, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
|
||||
CPU_BCM6338, CPU_BCM6345, CPU_BCM6348, CPU_BCM6358,
|
||||
CPU_JZRISC,
|
||||
|
||||
/*
|
||||
* MIPS64 class processors
|
||||
|
@ -372,4 +372,9 @@ extern const char *__elf_platform;
|
||||
struct linux_binprm;
|
||||
extern int arch_setup_additional_pages(struct linux_binprm *bprm,
|
||||
int uses_interp);
|
||||
|
||||
struct mm_struct;
|
||||
extern unsigned long arch_randomize_brk(struct mm_struct *mm);
|
||||
#define arch_randomize_brk arch_randomize_brk
|
||||
|
||||
#endif /* _ASM_ELF_H */
|
||||
|
@ -99,88 +99,22 @@
|
||||
#define EMMA2RH_PCI_CONFIG_BASE EMMA2RH_PCI_IO_BASE
|
||||
#define EMMA2RH_PCI_CONFIG_SIZE EMMA2RH_PCI_IO_SIZE
|
||||
|
||||
#define NUM_CPU_IRQ 8
|
||||
#define NUM_EMMA2RH_IRQ 96
|
||||
|
||||
#define CPU_EMMA2RH_CASCADE 2
|
||||
#define CPU_IRQ_BASE MIPS_CPU_IRQ_BASE
|
||||
#define EMMA2RH_IRQ_BASE (CPU_IRQ_BASE + NUM_CPU_IRQ)
|
||||
#define EMMA2RH_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8)
|
||||
|
||||
/*
|
||||
* emma2rh irq defs
|
||||
*/
|
||||
|
||||
#define EMMA2RH_IRQ_INT0 (0 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT1 (1 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT2 (2 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT3 (3 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT4 (4 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT5 (5 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT6 (6 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT7 (7 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT8 (8 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT9 (9 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT10 (10 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT11 (11 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT12 (12 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT13 (13 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT14 (14 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT15 (15 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT16 (16 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT17 (17 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT18 (18 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT19 (19 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT20 (20 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT21 (21 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT22 (22 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT23 (23 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT24 (24 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT25 (25 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT26 (26 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT27 (27 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT28 (28 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT29 (29 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT30 (30 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT31 (31 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT32 (32 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT33 (33 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT34 (34 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT35 (35 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT36 (36 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT37 (37 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT38 (38 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT39 (39 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT40 (40 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT41 (41 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT42 (42 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT43 (43 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT44 (44 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT45 (45 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT46 (46 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT47 (47 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT48 (48 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT49 (49 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT50 (50 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT51 (51 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT52 (52 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT53 (53 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT54 (54 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT55 (55 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT56 (56 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT57 (57 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT58 (58 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT59 (59 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT60 (60 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT61 (61 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT62 (62 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT63 (63 + EMMA2RH_IRQ_BASE)
|
||||
#define EMMA2RH_IRQ_INT(n) (EMMA2RH_IRQ_BASE + (n))
|
||||
|
||||
#define EMMA2RH_IRQ_PFUR0 EMMA2RH_IRQ_INT49
|
||||
#define EMMA2RH_IRQ_PFUR1 EMMA2RH_IRQ_INT50
|
||||
#define EMMA2RH_IRQ_PFUR2 EMMA2RH_IRQ_INT51
|
||||
#define EMMA2RH_IRQ_PIIC0 EMMA2RH_IRQ_INT56
|
||||
#define EMMA2RH_IRQ_PIIC1 EMMA2RH_IRQ_INT57
|
||||
#define EMMA2RH_IRQ_PIIC2 EMMA2RH_IRQ_INT58
|
||||
#define EMMA2RH_IRQ_PFUR0 EMMA2RH_IRQ_INT(49)
|
||||
#define EMMA2RH_IRQ_PFUR1 EMMA2RH_IRQ_INT(50)
|
||||
#define EMMA2RH_IRQ_PFUR2 EMMA2RH_IRQ_INT(51)
|
||||
#define EMMA2RH_IRQ_PIIC0 EMMA2RH_IRQ_INT(56)
|
||||
#define EMMA2RH_IRQ_PIIC1 EMMA2RH_IRQ_INT(57)
|
||||
#define EMMA2RH_IRQ_PIIC2 EMMA2RH_IRQ_INT(58)
|
||||
|
||||
/*
|
||||
* EMMA2RH Register Access
|
||||
|
@ -25,44 +25,13 @@
|
||||
#define NUM_EMMA2RH_IRQ_SW 32
|
||||
#define NUM_EMMA2RH_IRQ_GPIO 32
|
||||
|
||||
#define EMMA2RH_SW_CASCADE (EMMA2RH_IRQ_INT7 - EMMA2RH_IRQ_INT0)
|
||||
#define EMMA2RH_GPIO_CASCADE (EMMA2RH_IRQ_INT46 - EMMA2RH_IRQ_INT0)
|
||||
#define EMMA2RH_SW_CASCADE (EMMA2RH_IRQ_INT(7) - EMMA2RH_IRQ_INT(0))
|
||||
#define EMMA2RH_GPIO_CASCADE (EMMA2RH_IRQ_INT(46) - EMMA2RH_IRQ_INT(0))
|
||||
|
||||
#define EMMA2RH_SW_IRQ_BASE (EMMA2RH_IRQ_BASE + NUM_EMMA2RH_IRQ)
|
||||
#define EMMA2RH_GPIO_IRQ_BASE (EMMA2RH_SW_IRQ_BASE + NUM_EMMA2RH_IRQ_SW)
|
||||
|
||||
#define EMMA2RH_SW_IRQ_INT0 (0+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT1 (1+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT2 (2+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT3 (3+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT4 (4+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT5 (5+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT6 (6+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT7 (7+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT8 (8+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT9 (9+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT10 (10+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT11 (11+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT12 (12+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT13 (13+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT14 (14+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT15 (15+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT16 (16+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT17 (17+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT18 (18+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT19 (19+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT20 (20+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT21 (21+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT22 (22+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT23 (23+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT24 (24+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT25 (25+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT26 (26+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT27 (27+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT28 (28+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT29 (29+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT30 (30+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT31 (31+EMMA2RH_SW_IRQ_BASE)
|
||||
#define EMMA2RH_SW_IRQ_INT(n) (EMMA2RH_SW_IRQ_BASE + (n))
|
||||
|
||||
#define MARKEINS_PCI_IRQ_INTA EMMA2RH_GPIO_IRQ_BASE+15
|
||||
#define MARKEINS_PCI_IRQ_INTB EMMA2RH_GPIO_IRQ_BASE+16
|
||||
|
@ -87,7 +87,7 @@ do { \
|
||||
: "=r" (tmp)); \
|
||||
} while (0)
|
||||
|
||||
#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MACH_ALCHEMY)
|
||||
#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MIPS_ALCHEMY)
|
||||
|
||||
/*
|
||||
* These are slightly complicated by the fact that we guarantee R1 kernels to
|
||||
@ -138,7 +138,7 @@ do { \
|
||||
__instruction_hazard(); \
|
||||
} while (0)
|
||||
|
||||
#elif defined(CONFIG_MACH_ALCHEMY) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
|
||||
#elif defined(CONFIG_MIPS_ALCHEMY) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
|
||||
defined(CONFIG_CPU_LOONGSON2) || defined(CONFIG_CPU_R10000) || \
|
||||
defined(CONFIG_CPU_R5500)
|
||||
|
||||
|
@ -247,6 +247,12 @@ struct ma_format { /* FPU multipy and add format (MIPS IV) */
|
||||
unsigned int fmt : 2;
|
||||
};
|
||||
|
||||
struct b_format { /* BREAK and SYSCALL */
|
||||
unsigned int opcode:6;
|
||||
unsigned int code:20;
|
||||
unsigned int func:6;
|
||||
};
|
||||
|
||||
#elif defined(__MIPSEL__)
|
||||
|
||||
struct j_format { /* Jump format */
|
||||
@ -314,6 +320,12 @@ struct ma_format { /* FPU multipy and add format (MIPS IV) */
|
||||
unsigned int opcode : 6;
|
||||
};
|
||||
|
||||
struct b_format { /* BREAK and SYSCALL */
|
||||
unsigned int func:6;
|
||||
unsigned int code:20;
|
||||
unsigned int opcode:6;
|
||||
};
|
||||
|
||||
#else /* !defined (__MIPSEB__) && !defined (__MIPSEL__) */
|
||||
#error "MIPS but neither __MIPSEL__ nor __MIPSEB__?"
|
||||
#endif
|
||||
@ -328,7 +340,8 @@ union mips_instruction {
|
||||
struct c_format c_format;
|
||||
struct r_format r_format;
|
||||
struct f_format f_format;
|
||||
struct ma_format ma_format;
|
||||
struct ma_format ma_format;
|
||||
struct b_format b_format;
|
||||
};
|
||||
|
||||
/* HACHACHAHCAHC ... */
|
||||
|
@ -8,6 +8,9 @@ enum die_val {
|
||||
DIE_FP,
|
||||
DIE_TRAP,
|
||||
DIE_RI,
|
||||
DIE_PAGE_FAULT,
|
||||
DIE_BREAK,
|
||||
DIE_SSTEPBP
|
||||
};
|
||||
|
||||
#endif /* _ASM_MIPS_KDEBUG_H */
|
||||
|
92
arch/mips/include/asm/kprobes.h
Normal file
92
arch/mips/include/asm/kprobes.h
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Kernel Probes (KProbes)
|
||||
* include/asm-mips/kprobes.h
|
||||
*
|
||||
* Copyright 2006 Sony Corp.
|
||||
* Copyright 2010 Cavium Networks
|
||||
*
|
||||
* 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; version 2 of the License.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef _ASM_KPROBES_H
|
||||
#define _ASM_KPROBES_H
|
||||
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/kdebug.h>
|
||||
#include <asm/inst.h>
|
||||
|
||||
#define __ARCH_WANT_KPROBES_INSN_SLOT
|
||||
|
||||
struct kprobe;
|
||||
struct pt_regs;
|
||||
|
||||
typedef union mips_instruction kprobe_opcode_t;
|
||||
|
||||
#define MAX_INSN_SIZE 2
|
||||
|
||||
#define flush_insn_slot(p) \
|
||||
do { \
|
||||
flush_icache_range((unsigned long)p->addr, \
|
||||
(unsigned long)p->addr + \
|
||||
(MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define kretprobe_blacklist_size 0
|
||||
|
||||
void arch_remove_kprobe(struct kprobe *p);
|
||||
|
||||
/* Architecture specific copy of original instruction*/
|
||||
struct arch_specific_insn {
|
||||
/* copy of the original instruction */
|
||||
kprobe_opcode_t *insn;
|
||||
};
|
||||
|
||||
struct prev_kprobe {
|
||||
struct kprobe *kp;
|
||||
unsigned long status;
|
||||
unsigned long old_SR;
|
||||
unsigned long saved_SR;
|
||||
unsigned long saved_epc;
|
||||
};
|
||||
|
||||
#define MAX_JPROBES_STACK_SIZE 128
|
||||
#define MAX_JPROBES_STACK_ADDR \
|
||||
(((unsigned long)current_thread_info()) + THREAD_SIZE - 32 - sizeof(struct pt_regs))
|
||||
|
||||
#define MIN_JPROBES_STACK_SIZE(ADDR) \
|
||||
((((ADDR) + MAX_JPROBES_STACK_SIZE) > MAX_JPROBES_STACK_ADDR) \
|
||||
? MAX_JPROBES_STACK_ADDR - (ADDR) \
|
||||
: MAX_JPROBES_STACK_SIZE)
|
||||
|
||||
|
||||
/* per-cpu kprobe control block */
|
||||
struct kprobe_ctlblk {
|
||||
unsigned long kprobe_status;
|
||||
unsigned long kprobe_old_SR;
|
||||
unsigned long kprobe_saved_SR;
|
||||
unsigned long kprobe_saved_epc;
|
||||
unsigned long jprobe_saved_sp;
|
||||
struct pt_regs jprobe_saved_regs;
|
||||
u8 jprobes_stack[MAX_JPROBES_STACK_SIZE];
|
||||
struct prev_kprobe prev_kprobe;
|
||||
};
|
||||
|
||||
extern int kprobe_exceptions_notify(struct notifier_block *self,
|
||||
unsigned long val, void *data);
|
||||
|
||||
#endif /* _ASM_KPROBES_H */
|
@ -9,6 +9,7 @@ struct au1000_eth_platform_data {
|
||||
int phy_addr;
|
||||
int phy_busid;
|
||||
int phy_irq;
|
||||
char mac[6];
|
||||
};
|
||||
|
||||
void __init au1xxx_override_eth_cfg(unsigned port,
|
||||
|
@ -31,6 +31,9 @@ struct nvram_header {
|
||||
#define NVRAM_MAX_VALUE_LEN 255
|
||||
#define NVRAM_MAX_PARAM_LEN 64
|
||||
|
||||
#define NVRAM_ERR_INV_PARAM -8
|
||||
#define NVRAM_ERR_ENVNOTFOUND -9
|
||||
|
||||
extern int nvram_getenv(char *name, char *val, size_t val_len);
|
||||
|
||||
#endif
|
||||
|
@ -61,21 +61,18 @@
|
||||
|
||||
#define kernel_uses_smartmips_rixi (cpu_data[0].cputype == CPU_CAVIUM_OCTEON_PLUS)
|
||||
|
||||
#define ARCH_HAS_READ_CURRENT_TIMER 1
|
||||
#define ARCH_HAS_IRQ_PER_CPU 1
|
||||
#define ARCH_HAS_SPINLOCK_PREFETCH 1
|
||||
#define spin_lock_prefetch(x) prefetch(x)
|
||||
#define PREFETCH_STRIDE 128
|
||||
|
||||
static inline int read_current_timer(unsigned long *result)
|
||||
{
|
||||
asm volatile ("rdhwr %0,$31\n"
|
||||
#ifndef CONFIG_64BIT
|
||||
"\tsll %0, 0"
|
||||
#ifdef __OCTEON__
|
||||
/*
|
||||
* All gcc versions that have OCTEON support define __OCTEON__ and have the
|
||||
* __builtin_popcount support.
|
||||
*/
|
||||
#define ARCH_HAS_USABLE_BUILTIN_POPCOUNT 1
|
||||
#endif
|
||||
: "=r" (*result));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int octeon_has_saa(void)
|
||||
{
|
||||
|
@ -172,71 +172,9 @@
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
/* 152 - 215 represent the MSI interrupts 0-63 */
|
||||
#define OCTEON_IRQ_MSI_BIT0 152
|
||||
#define OCTEON_IRQ_MSI_BIT1 153
|
||||
#define OCTEON_IRQ_MSI_BIT2 154
|
||||
#define OCTEON_IRQ_MSI_BIT3 155
|
||||
#define OCTEON_IRQ_MSI_BIT4 156
|
||||
#define OCTEON_IRQ_MSI_BIT5 157
|
||||
#define OCTEON_IRQ_MSI_BIT6 158
|
||||
#define OCTEON_IRQ_MSI_BIT7 159
|
||||
#define OCTEON_IRQ_MSI_BIT8 160
|
||||
#define OCTEON_IRQ_MSI_BIT9 161
|
||||
#define OCTEON_IRQ_MSI_BIT10 162
|
||||
#define OCTEON_IRQ_MSI_BIT11 163
|
||||
#define OCTEON_IRQ_MSI_BIT12 164
|
||||
#define OCTEON_IRQ_MSI_BIT13 165
|
||||
#define OCTEON_IRQ_MSI_BIT14 166
|
||||
#define OCTEON_IRQ_MSI_BIT15 167
|
||||
#define OCTEON_IRQ_MSI_BIT16 168
|
||||
#define OCTEON_IRQ_MSI_BIT17 169
|
||||
#define OCTEON_IRQ_MSI_BIT18 170
|
||||
#define OCTEON_IRQ_MSI_BIT19 171
|
||||
#define OCTEON_IRQ_MSI_BIT20 172
|
||||
#define OCTEON_IRQ_MSI_BIT21 173
|
||||
#define OCTEON_IRQ_MSI_BIT22 174
|
||||
#define OCTEON_IRQ_MSI_BIT23 175
|
||||
#define OCTEON_IRQ_MSI_BIT24 176
|
||||
#define OCTEON_IRQ_MSI_BIT25 177
|
||||
#define OCTEON_IRQ_MSI_BIT26 178
|
||||
#define OCTEON_IRQ_MSI_BIT27 179
|
||||
#define OCTEON_IRQ_MSI_BIT28 180
|
||||
#define OCTEON_IRQ_MSI_BIT29 181
|
||||
#define OCTEON_IRQ_MSI_BIT30 182
|
||||
#define OCTEON_IRQ_MSI_BIT31 183
|
||||
#define OCTEON_IRQ_MSI_BIT32 184
|
||||
#define OCTEON_IRQ_MSI_BIT33 185
|
||||
#define OCTEON_IRQ_MSI_BIT34 186
|
||||
#define OCTEON_IRQ_MSI_BIT35 187
|
||||
#define OCTEON_IRQ_MSI_BIT36 188
|
||||
#define OCTEON_IRQ_MSI_BIT37 189
|
||||
#define OCTEON_IRQ_MSI_BIT38 190
|
||||
#define OCTEON_IRQ_MSI_BIT39 191
|
||||
#define OCTEON_IRQ_MSI_BIT40 192
|
||||
#define OCTEON_IRQ_MSI_BIT41 193
|
||||
#define OCTEON_IRQ_MSI_BIT42 194
|
||||
#define OCTEON_IRQ_MSI_BIT43 195
|
||||
#define OCTEON_IRQ_MSI_BIT44 196
|
||||
#define OCTEON_IRQ_MSI_BIT45 197
|
||||
#define OCTEON_IRQ_MSI_BIT46 198
|
||||
#define OCTEON_IRQ_MSI_BIT47 199
|
||||
#define OCTEON_IRQ_MSI_BIT48 200
|
||||
#define OCTEON_IRQ_MSI_BIT49 201
|
||||
#define OCTEON_IRQ_MSI_BIT50 202
|
||||
#define OCTEON_IRQ_MSI_BIT51 203
|
||||
#define OCTEON_IRQ_MSI_BIT52 204
|
||||
#define OCTEON_IRQ_MSI_BIT53 205
|
||||
#define OCTEON_IRQ_MSI_BIT54 206
|
||||
#define OCTEON_IRQ_MSI_BIT55 207
|
||||
#define OCTEON_IRQ_MSI_BIT56 208
|
||||
#define OCTEON_IRQ_MSI_BIT57 209
|
||||
#define OCTEON_IRQ_MSI_BIT58 210
|
||||
#define OCTEON_IRQ_MSI_BIT59 211
|
||||
#define OCTEON_IRQ_MSI_BIT60 212
|
||||
#define OCTEON_IRQ_MSI_BIT61 213
|
||||
#define OCTEON_IRQ_MSI_BIT62 214
|
||||
#define OCTEON_IRQ_MSI_BIT63 215
|
||||
#define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 255)
|
||||
|
||||
#define OCTEON_IRQ_LAST 216
|
||||
#define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1)
|
||||
#else
|
||||
#define OCTEON_IRQ_LAST 152
|
||||
#endif
|
||||
|
26
arch/mips/include/asm/mach-jz4740/base.h
Normal file
26
arch/mips/include/asm/mach-jz4740/base.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef __ASM_MACH_JZ4740_BASE_H__
|
||||
#define __ASM_MACH_JZ4740_BASE_H__
|
||||
|
||||
#define JZ4740_CPM_BASE_ADDR 0x10000000
|
||||
#define JZ4740_INTC_BASE_ADDR 0x10001000
|
||||
#define JZ4740_WDT_BASE_ADDR 0x10002000
|
||||
#define JZ4740_TCU_BASE_ADDR 0x10002010
|
||||
#define JZ4740_RTC_BASE_ADDR 0x10003000
|
||||
#define JZ4740_GPIO_BASE_ADDR 0x10010000
|
||||
#define JZ4740_AIC_BASE_ADDR 0x10020000
|
||||
#define JZ4740_MSC_BASE_ADDR 0x10021000
|
||||
#define JZ4740_UART0_BASE_ADDR 0x10030000
|
||||
#define JZ4740_UART1_BASE_ADDR 0x10031000
|
||||
#define JZ4740_I2C_BASE_ADDR 0x10042000
|
||||
#define JZ4740_SSI_BASE_ADDR 0x10043000
|
||||
#define JZ4740_SADC_BASE_ADDR 0x10070000
|
||||
#define JZ4740_EMC_BASE_ADDR 0x13010000
|
||||
#define JZ4740_DMAC_BASE_ADDR 0x13020000
|
||||
#define JZ4740_UHC_BASE_ADDR 0x13030000
|
||||
#define JZ4740_UDC_BASE_ADDR 0x13040000
|
||||
#define JZ4740_LCD_BASE_ADDR 0x13050000
|
||||
#define JZ4740_SLCD_BASE_ADDR 0x13050000
|
||||
#define JZ4740_CIM_BASE_ADDR 0x13060000
|
||||
#define JZ4740_IPU_BASE_ADDR 0x13080000
|
||||
|
||||
#endif
|
28
arch/mips/include/asm/mach-jz4740/clock.h
Normal file
28
arch/mips/include/asm/mach-jz4740/clock.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_JZ4740_CLOCK_H__
|
||||
#define __ASM_JZ4740_CLOCK_H__
|
||||
|
||||
enum jz4740_wait_mode {
|
||||
JZ4740_WAIT_MODE_IDLE,
|
||||
JZ4740_WAIT_MODE_SLEEP,
|
||||
};
|
||||
|
||||
void jz4740_clock_set_wait_mode(enum jz4740_wait_mode mode);
|
||||
|
||||
void jz4740_clock_udc_enable_auto_suspend(void);
|
||||
void jz4740_clock_udc_disable_auto_suspend(void);
|
||||
|
||||
#endif
|
51
arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h
Normal file
51
arch/mips/include/asm/mach-jz4740/cpu-feature-overrides.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
#ifndef __ASM_MACH_JZ4740_CPU_FEATURE_OVERRIDES_H
|
||||
#define __ASM_MACH_JZ4740_CPU_FEATURE_OVERRIDES_H
|
||||
|
||||
#define cpu_has_tlb 1
|
||||
#define cpu_has_4kex 1
|
||||
#define cpu_has_3k_cache 0
|
||||
#define cpu_has_4k_cache 1
|
||||
#define cpu_has_tx39_cache 0
|
||||
#define cpu_has_fpu 0
|
||||
#define cpu_has_32fpr 0
|
||||
#define cpu_has_counter 0
|
||||
#define cpu_has_watch 1
|
||||
#define cpu_has_divec 1
|
||||
#define cpu_has_vce 0
|
||||
#define cpu_has_cache_cdex_p 0
|
||||
#define cpu_has_cache_cdex_s 0
|
||||
#define cpu_has_prefetch 1
|
||||
#define cpu_has_mcheck 1
|
||||
#define cpu_has_ejtag 1
|
||||
#define cpu_has_llsc 1
|
||||
#define cpu_has_mips16 0
|
||||
#define cpu_has_mdmx 0
|
||||
#define cpu_has_mips3d 0
|
||||
#define cpu_has_smartmips 0
|
||||
#define kernel_uses_llsc 1
|
||||
#define cpu_has_vtag_icache 1
|
||||
#define cpu_has_dc_aliases 0
|
||||
#define cpu_has_ic_fills_f_dc 0
|
||||
#define cpu_has_pindexed_dcache 0
|
||||
#define cpu_has_mips32r1 1
|
||||
#define cpu_has_mips32r2 0
|
||||
#define cpu_has_mips64r1 0
|
||||
#define cpu_has_mips64r2 0
|
||||
#define cpu_has_dsp 0
|
||||
#define cpu_has_mipsmt 0
|
||||
#define cpu_has_userlocal 0
|
||||
#define cpu_has_nofpuex 0
|
||||
#define cpu_has_64bits 0
|
||||
#define cpu_has_64bit_zero_reg 0
|
||||
#define cpu_has_inclusive_pcaches 0
|
||||
|
||||
#define cpu_dcache_line_size() 32
|
||||
#define cpu_icache_line_size() 32
|
||||
|
||||
#endif
|
90
arch/mips/include/asm/mach-jz4740/dma.h
Normal file
90
arch/mips/include/asm/mach-jz4740/dma.h
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* JZ7420/JZ4740 DMA definitions
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_MACH_JZ4740_DMA_H__
|
||||
#define __ASM_MACH_JZ4740_DMA_H__
|
||||
|
||||
struct jz4740_dma_chan;
|
||||
|
||||
enum jz4740_dma_request_type {
|
||||
JZ4740_DMA_TYPE_AUTO_REQUEST = 8,
|
||||
JZ4740_DMA_TYPE_UART_TRANSMIT = 20,
|
||||
JZ4740_DMA_TYPE_UART_RECEIVE = 21,
|
||||
JZ4740_DMA_TYPE_SPI_TRANSMIT = 22,
|
||||
JZ4740_DMA_TYPE_SPI_RECEIVE = 23,
|
||||
JZ4740_DMA_TYPE_AIC_TRANSMIT = 24,
|
||||
JZ4740_DMA_TYPE_AIC_RECEIVE = 25,
|
||||
JZ4740_DMA_TYPE_MMC_TRANSMIT = 26,
|
||||
JZ4740_DMA_TYPE_MMC_RECEIVE = 27,
|
||||
JZ4740_DMA_TYPE_TCU = 28,
|
||||
JZ4740_DMA_TYPE_SADC = 29,
|
||||
JZ4740_DMA_TYPE_SLCD = 30,
|
||||
};
|
||||
|
||||
enum jz4740_dma_width {
|
||||
JZ4740_DMA_WIDTH_32BIT = 0,
|
||||
JZ4740_DMA_WIDTH_8BIT = 1,
|
||||
JZ4740_DMA_WIDTH_16BIT = 2,
|
||||
};
|
||||
|
||||
enum jz4740_dma_transfer_size {
|
||||
JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0,
|
||||
JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1,
|
||||
JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2,
|
||||
JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3,
|
||||
JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4,
|
||||
};
|
||||
|
||||
enum jz4740_dma_flags {
|
||||
JZ4740_DMA_SRC_AUTOINC = 0x2,
|
||||
JZ4740_DMA_DST_AUTOINC = 0x1,
|
||||
};
|
||||
|
||||
enum jz4740_dma_mode {
|
||||
JZ4740_DMA_MODE_SINGLE = 0,
|
||||
JZ4740_DMA_MODE_BLOCK = 1,
|
||||
};
|
||||
|
||||
struct jz4740_dma_config {
|
||||
enum jz4740_dma_width src_width;
|
||||
enum jz4740_dma_width dst_width;
|
||||
enum jz4740_dma_transfer_size transfer_size;
|
||||
enum jz4740_dma_request_type request_type;
|
||||
enum jz4740_dma_flags flags;
|
||||
enum jz4740_dma_mode mode;
|
||||
};
|
||||
|
||||
typedef void (*jz4740_dma_complete_callback_t)(struct jz4740_dma_chan *, int, void *);
|
||||
|
||||
struct jz4740_dma_chan *jz4740_dma_request(void *dev, const char *name);
|
||||
void jz4740_dma_free(struct jz4740_dma_chan *dma);
|
||||
|
||||
void jz4740_dma_configure(struct jz4740_dma_chan *dma,
|
||||
const struct jz4740_dma_config *config);
|
||||
|
||||
|
||||
void jz4740_dma_enable(struct jz4740_dma_chan *dma);
|
||||
void jz4740_dma_disable(struct jz4740_dma_chan *dma);
|
||||
|
||||
void jz4740_dma_set_src_addr(struct jz4740_dma_chan *dma, dma_addr_t src);
|
||||
void jz4740_dma_set_dst_addr(struct jz4740_dma_chan *dma, dma_addr_t dst);
|
||||
void jz4740_dma_set_transfer_count(struct jz4740_dma_chan *dma, uint32_t count);
|
||||
|
||||
uint32_t jz4740_dma_get_residue(const struct jz4740_dma_chan *dma);
|
||||
|
||||
void jz4740_dma_set_complete_cb(struct jz4740_dma_chan *dma,
|
||||
jz4740_dma_complete_callback_t cb);
|
||||
|
||||
#endif /* __ASM_JZ4740_DMA_H__ */
|
398
arch/mips/include/asm/mach-jz4740/gpio.h
Normal file
398
arch/mips/include/asm/mach-jz4740/gpio.h
Normal file
@ -0,0 +1,398 @@
|
||||
/*
|
||||
* Copyright (C) 2009, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* JZ4740 GPIO pin definitions
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _JZ_GPIO_H
|
||||
#define _JZ_GPIO_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
enum jz_gpio_function {
|
||||
JZ_GPIO_FUNC_NONE,
|
||||
JZ_GPIO_FUNC1,
|
||||
JZ_GPIO_FUNC2,
|
||||
JZ_GPIO_FUNC3,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Usually a driver for a SoC component has to request several gpio pins and
|
||||
configure them as funcion pins.
|
||||
jz_gpio_bulk_request can be used to ease this process.
|
||||
Usually one would do something like:
|
||||
|
||||
const static struct jz_gpio_bulk_request i2c_pins[] = {
|
||||
JZ_GPIO_BULK_PIN(I2C_SDA),
|
||||
JZ_GPIO_BULK_PIN(I2C_SCK),
|
||||
};
|
||||
|
||||
inside the probe function:
|
||||
|
||||
ret = jz_gpio_bulk_request(i2c_pins, ARRAY_SIZE(i2c_pins));
|
||||
if (ret) {
|
||||
...
|
||||
|
||||
inside the remove function:
|
||||
|
||||
jz_gpio_bulk_free(i2c_pins, ARRAY_SIZE(i2c_pins));
|
||||
|
||||
|
||||
*/
|
||||
struct jz_gpio_bulk_request {
|
||||
int gpio;
|
||||
const char *name;
|
||||
enum jz_gpio_function function;
|
||||
};
|
||||
|
||||
#define JZ_GPIO_BULK_PIN(pin) { \
|
||||
.gpio = JZ_GPIO_ ## pin, \
|
||||
.name = #pin, \
|
||||
.function = JZ_GPIO_FUNC_ ## pin \
|
||||
}
|
||||
|
||||
int jz_gpio_bulk_request(const struct jz_gpio_bulk_request *request, size_t num);
|
||||
void jz_gpio_bulk_free(const struct jz_gpio_bulk_request *request, size_t num);
|
||||
void jz_gpio_bulk_suspend(const struct jz_gpio_bulk_request *request, size_t num);
|
||||
void jz_gpio_bulk_resume(const struct jz_gpio_bulk_request *request, size_t num);
|
||||
void jz_gpio_enable_pullup(unsigned gpio);
|
||||
void jz_gpio_disable_pullup(unsigned gpio);
|
||||
int jz_gpio_set_function(int gpio, enum jz_gpio_function function);
|
||||
|
||||
int jz_gpio_port_direction_input(int port, uint32_t mask);
|
||||
int jz_gpio_port_direction_output(int port, uint32_t mask);
|
||||
void jz_gpio_port_set_value(int port, uint32_t value, uint32_t mask);
|
||||
uint32_t jz_gpio_port_get_value(int port, uint32_t mask);
|
||||
|
||||
#include <asm/mach-generic/gpio.h>
|
||||
|
||||
#define JZ_GPIO_PORTA(x) ((x) + 32 * 0)
|
||||
#define JZ_GPIO_PORTB(x) ((x) + 32 * 1)
|
||||
#define JZ_GPIO_PORTC(x) ((x) + 32 * 2)
|
||||
#define JZ_GPIO_PORTD(x) ((x) + 32 * 3)
|
||||
|
||||
/* Port A function pins */
|
||||
#define JZ_GPIO_MEM_DATA0 JZ_GPIO_PORTA(0)
|
||||
#define JZ_GPIO_MEM_DATA1 JZ_GPIO_PORTA(1)
|
||||
#define JZ_GPIO_MEM_DATA2 JZ_GPIO_PORTA(2)
|
||||
#define JZ_GPIO_MEM_DATA3 JZ_GPIO_PORTA(3)
|
||||
#define JZ_GPIO_MEM_DATA4 JZ_GPIO_PORTA(4)
|
||||
#define JZ_GPIO_MEM_DATA5 JZ_GPIO_PORTA(5)
|
||||
#define JZ_GPIO_MEM_DATA6 JZ_GPIO_PORTA(6)
|
||||
#define JZ_GPIO_MEM_DATA7 JZ_GPIO_PORTA(7)
|
||||
#define JZ_GPIO_MEM_DATA8 JZ_GPIO_PORTA(8)
|
||||
#define JZ_GPIO_MEM_DATA9 JZ_GPIO_PORTA(9)
|
||||
#define JZ_GPIO_MEM_DATA10 JZ_GPIO_PORTA(10)
|
||||
#define JZ_GPIO_MEM_DATA11 JZ_GPIO_PORTA(11)
|
||||
#define JZ_GPIO_MEM_DATA12 JZ_GPIO_PORTA(12)
|
||||
#define JZ_GPIO_MEM_DATA13 JZ_GPIO_PORTA(13)
|
||||
#define JZ_GPIO_MEM_DATA14 JZ_GPIO_PORTA(14)
|
||||
#define JZ_GPIO_MEM_DATA15 JZ_GPIO_PORTA(15)
|
||||
#define JZ_GPIO_MEM_DATA16 JZ_GPIO_PORTA(16)
|
||||
#define JZ_GPIO_MEM_DATA17 JZ_GPIO_PORTA(17)
|
||||
#define JZ_GPIO_MEM_DATA18 JZ_GPIO_PORTA(18)
|
||||
#define JZ_GPIO_MEM_DATA19 JZ_GPIO_PORTA(19)
|
||||
#define JZ_GPIO_MEM_DATA20 JZ_GPIO_PORTA(20)
|
||||
#define JZ_GPIO_MEM_DATA21 JZ_GPIO_PORTA(21)
|
||||
#define JZ_GPIO_MEM_DATA22 JZ_GPIO_PORTA(22)
|
||||
#define JZ_GPIO_MEM_DATA23 JZ_GPIO_PORTA(23)
|
||||
#define JZ_GPIO_MEM_DATA24 JZ_GPIO_PORTA(24)
|
||||
#define JZ_GPIO_MEM_DATA25 JZ_GPIO_PORTA(25)
|
||||
#define JZ_GPIO_MEM_DATA26 JZ_GPIO_PORTA(26)
|
||||
#define JZ_GPIO_MEM_DATA27 JZ_GPIO_PORTA(27)
|
||||
#define JZ_GPIO_MEM_DATA28 JZ_GPIO_PORTA(28)
|
||||
#define JZ_GPIO_MEM_DATA29 JZ_GPIO_PORTA(29)
|
||||
#define JZ_GPIO_MEM_DATA30 JZ_GPIO_PORTA(30)
|
||||
#define JZ_GPIO_MEM_DATA31 JZ_GPIO_PORTA(31)
|
||||
|
||||
#define JZ_GPIO_FUNC_MEM_DATA0 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA1 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA2 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA3 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA4 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA5 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA6 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA7 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA8 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA9 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA10 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA11 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA12 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA13 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA14 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA15 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA16 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA17 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA18 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA19 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA20 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA21 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA22 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA23 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA24 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA25 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA26 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA27 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA28 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA29 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA30 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DATA31 JZ_GPIO_FUNC1
|
||||
|
||||
/* Port B function pins */
|
||||
#define JZ_GPIO_MEM_ADDR0 JZ_GPIO_PORTB(0)
|
||||
#define JZ_GPIO_MEM_ADDR1 JZ_GPIO_PORTB(1)
|
||||
#define JZ_GPIO_MEM_ADDR2 JZ_GPIO_PORTB(2)
|
||||
#define JZ_GPIO_MEM_ADDR3 JZ_GPIO_PORTB(3)
|
||||
#define JZ_GPIO_MEM_ADDR4 JZ_GPIO_PORTB(4)
|
||||
#define JZ_GPIO_MEM_ADDR5 JZ_GPIO_PORTB(5)
|
||||
#define JZ_GPIO_MEM_ADDR6 JZ_GPIO_PORTB(6)
|
||||
#define JZ_GPIO_MEM_ADDR7 JZ_GPIO_PORTB(7)
|
||||
#define JZ_GPIO_MEM_ADDR8 JZ_GPIO_PORTB(8)
|
||||
#define JZ_GPIO_MEM_ADDR9 JZ_GPIO_PORTB(9)
|
||||
#define JZ_GPIO_MEM_ADDR10 JZ_GPIO_PORTB(10)
|
||||
#define JZ_GPIO_MEM_ADDR11 JZ_GPIO_PORTB(11)
|
||||
#define JZ_GPIO_MEM_ADDR12 JZ_GPIO_PORTB(12)
|
||||
#define JZ_GPIO_MEM_ADDR13 JZ_GPIO_PORTB(13)
|
||||
#define JZ_GPIO_MEM_ADDR14 JZ_GPIO_PORTB(14)
|
||||
#define JZ_GPIO_MEM_ADDR15 JZ_GPIO_PORTB(15)
|
||||
#define JZ_GPIO_MEM_ADDR16 JZ_GPIO_PORTB(16)
|
||||
#define JZ_GPIO_LCD_CLS JZ_GPIO_PORTB(17)
|
||||
#define JZ_GPIO_LCD_SPL JZ_GPIO_PORTB(18)
|
||||
#define JZ_GPIO_MEM_DCS JZ_GPIO_PORTB(19)
|
||||
#define JZ_GPIO_MEM_RAS JZ_GPIO_PORTB(20)
|
||||
#define JZ_GPIO_MEM_CAS JZ_GPIO_PORTB(21)
|
||||
#define JZ_GPIO_MEM_SDWE JZ_GPIO_PORTB(22)
|
||||
#define JZ_GPIO_MEM_CKE JZ_GPIO_PORTB(23)
|
||||
#define JZ_GPIO_MEM_CKO JZ_GPIO_PORTB(24)
|
||||
#define JZ_GPIO_MEM_CS0 JZ_GPIO_PORTB(25)
|
||||
#define JZ_GPIO_MEM_CS1 JZ_GPIO_PORTB(26)
|
||||
#define JZ_GPIO_MEM_CS2 JZ_GPIO_PORTB(27)
|
||||
#define JZ_GPIO_MEM_CS3 JZ_GPIO_PORTB(28)
|
||||
#define JZ_GPIO_MEM_RD JZ_GPIO_PORTB(29)
|
||||
#define JZ_GPIO_MEM_WR JZ_GPIO_PORTB(30)
|
||||
#define JZ_GPIO_MEM_WE0 JZ_GPIO_PORTB(31)
|
||||
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR0 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR1 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR2 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR3 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR4 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR5 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR6 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR7 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR8 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR9 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR10 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR11 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR12 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR13 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR14 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR15 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR16 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_CLS JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_SPL JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_DCS JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_RAS JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CAS JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_SDWE JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CKE JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CKO JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CS0 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CS1 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CS2 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_CS3 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_RD JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_WR JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_WE0 JZ_GPIO_FUNC1
|
||||
|
||||
|
||||
#define JZ_GPIO_MEM_ADDR21 JZ_GPIO_PORTB(17)
|
||||
#define JZ_GPIO_MEM_ADDR22 JZ_GPIO_PORTB(18)
|
||||
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR21 JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR22 JZ_GPIO_FUNC2
|
||||
|
||||
/* Port C function pins */
|
||||
#define JZ_GPIO_LCD_DATA0 JZ_GPIO_PORTC(0)
|
||||
#define JZ_GPIO_LCD_DATA1 JZ_GPIO_PORTC(1)
|
||||
#define JZ_GPIO_LCD_DATA2 JZ_GPIO_PORTC(2)
|
||||
#define JZ_GPIO_LCD_DATA3 JZ_GPIO_PORTC(3)
|
||||
#define JZ_GPIO_LCD_DATA4 JZ_GPIO_PORTC(4)
|
||||
#define JZ_GPIO_LCD_DATA5 JZ_GPIO_PORTC(5)
|
||||
#define JZ_GPIO_LCD_DATA6 JZ_GPIO_PORTC(6)
|
||||
#define JZ_GPIO_LCD_DATA7 JZ_GPIO_PORTC(7)
|
||||
#define JZ_GPIO_LCD_DATA8 JZ_GPIO_PORTC(8)
|
||||
#define JZ_GPIO_LCD_DATA9 JZ_GPIO_PORTC(9)
|
||||
#define JZ_GPIO_LCD_DATA10 JZ_GPIO_PORTC(10)
|
||||
#define JZ_GPIO_LCD_DATA11 JZ_GPIO_PORTC(11)
|
||||
#define JZ_GPIO_LCD_DATA12 JZ_GPIO_PORTC(12)
|
||||
#define JZ_GPIO_LCD_DATA13 JZ_GPIO_PORTC(13)
|
||||
#define JZ_GPIO_LCD_DATA14 JZ_GPIO_PORTC(14)
|
||||
#define JZ_GPIO_LCD_DATA15 JZ_GPIO_PORTC(15)
|
||||
#define JZ_GPIO_LCD_DATA16 JZ_GPIO_PORTC(16)
|
||||
#define JZ_GPIO_LCD_DATA17 JZ_GPIO_PORTC(17)
|
||||
#define JZ_GPIO_LCD_PCLK JZ_GPIO_PORTC(18)
|
||||
#define JZ_GPIO_LCD_HSYNC JZ_GPIO_PORTC(19)
|
||||
#define JZ_GPIO_LCD_VSYNC JZ_GPIO_PORTC(20)
|
||||
#define JZ_GPIO_LCD_DE JZ_GPIO_PORTC(21)
|
||||
#define JZ_GPIO_LCD_PS JZ_GPIO_PORTC(22)
|
||||
#define JZ_GPIO_LCD_REV JZ_GPIO_PORTC(23)
|
||||
#define JZ_GPIO_MEM_WE1 JZ_GPIO_PORTC(24)
|
||||
#define JZ_GPIO_MEM_WE2 JZ_GPIO_PORTC(25)
|
||||
#define JZ_GPIO_MEM_WE3 JZ_GPIO_PORTC(26)
|
||||
#define JZ_GPIO_MEM_WAIT JZ_GPIO_PORTC(27)
|
||||
#define JZ_GPIO_MEM_FRE JZ_GPIO_PORTC(28)
|
||||
#define JZ_GPIO_MEM_FWE JZ_GPIO_PORTC(29)
|
||||
|
||||
#define JZ_GPIO_FUNC_LCD_DATA0 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA1 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA2 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA3 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA4 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA5 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA6 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA7 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA8 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA9 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA10 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA11 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA12 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA13 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA14 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA15 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA16 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DATA17 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_PCLK JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_VSYNC JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_HSYNC JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_DE JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_PS JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_LCD_REV JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_WE1 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_WE2 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_WE3 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_WAIT JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_FRE JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MEM_FWE JZ_GPIO_FUNC1
|
||||
|
||||
|
||||
#define JZ_GPIO_MEM_ADDR19 JZ_GPIO_PORTB(22)
|
||||
#define JZ_GPIO_MEM_ADDR20 JZ_GPIO_PORTB(23)
|
||||
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR19 JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR20 JZ_GPIO_FUNC2
|
||||
|
||||
/* Port D function pins */
|
||||
#define JZ_GPIO_CIM_DATA0 JZ_GPIO_PORTD(0)
|
||||
#define JZ_GPIO_CIM_DATA1 JZ_GPIO_PORTD(1)
|
||||
#define JZ_GPIO_CIM_DATA2 JZ_GPIO_PORTD(2)
|
||||
#define JZ_GPIO_CIM_DATA3 JZ_GPIO_PORTD(3)
|
||||
#define JZ_GPIO_CIM_DATA4 JZ_GPIO_PORTD(4)
|
||||
#define JZ_GPIO_CIM_DATA5 JZ_GPIO_PORTD(5)
|
||||
#define JZ_GPIO_CIM_DATA6 JZ_GPIO_PORTD(6)
|
||||
#define JZ_GPIO_CIM_DATA7 JZ_GPIO_PORTD(7)
|
||||
#define JZ_GPIO_MSC_CMD JZ_GPIO_PORTD(8)
|
||||
#define JZ_GPIO_MSC_CLK JZ_GPIO_PORTD(9)
|
||||
#define JZ_GPIO_MSC_DATA0 JZ_GPIO_PORTD(10)
|
||||
#define JZ_GPIO_MSC_DATA1 JZ_GPIO_PORTD(11)
|
||||
#define JZ_GPIO_MSC_DATA2 JZ_GPIO_PORTD(12)
|
||||
#define JZ_GPIO_MSC_DATA3 JZ_GPIO_PORTD(13)
|
||||
#define JZ_GPIO_CIM_MCLK JZ_GPIO_PORTD(14)
|
||||
#define JZ_GPIO_CIM_PCLK JZ_GPIO_PORTD(15)
|
||||
#define JZ_GPIO_CIM_VSYNC JZ_GPIO_PORTD(16)
|
||||
#define JZ_GPIO_CIM_HSYNC JZ_GPIO_PORTD(17)
|
||||
#define JZ_GPIO_SPI_CLK JZ_GPIO_PORTD(18)
|
||||
#define JZ_GPIO_SPI_CE0 JZ_GPIO_PORTD(19)
|
||||
#define JZ_GPIO_SPI_DT JZ_GPIO_PORTD(20)
|
||||
#define JZ_GPIO_SPI_DR JZ_GPIO_PORTD(21)
|
||||
#define JZ_GPIO_SPI_CE1 JZ_GPIO_PORTD(22)
|
||||
#define JZ_GPIO_PWM0 JZ_GPIO_PORTD(23)
|
||||
#define JZ_GPIO_PWM1 JZ_GPIO_PORTD(24)
|
||||
#define JZ_GPIO_PWM2 JZ_GPIO_PORTD(25)
|
||||
#define JZ_GPIO_PWM3 JZ_GPIO_PORTD(26)
|
||||
#define JZ_GPIO_PWM4 JZ_GPIO_PORTD(27)
|
||||
#define JZ_GPIO_PWM5 JZ_GPIO_PORTD(28)
|
||||
#define JZ_GPIO_PWM6 JZ_GPIO_PORTD(30)
|
||||
#define JZ_GPIO_PWM7 JZ_GPIO_PORTD(31)
|
||||
|
||||
#define JZ_GPIO_FUNC_CIM_DATA JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_CIM_DATA0 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA1 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA2 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA3 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA4 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA5 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA6 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_DATA7 JZ_GPIO_FUNC_CIM_DATA
|
||||
#define JZ_GPIO_FUNC_MSC_CMD JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MSC_CLK JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MSC_DATA JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_MSC_DATA0 JZ_GPIO_FUNC_MSC_DATA
|
||||
#define JZ_GPIO_FUNC_MSC_DATA1 JZ_GPIO_FUNC_MSC_DATA
|
||||
#define JZ_GPIO_FUNC_MSC_DATA2 JZ_GPIO_FUNC_MSC_DATA
|
||||
#define JZ_GPIO_FUNC_MSC_DATA3 JZ_GPIO_FUNC_MSC_DATA
|
||||
#define JZ_GPIO_FUNC_CIM_MCLK JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_CIM_PCLK JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_CIM_VSYNC JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_CIM_HSYNC JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_SPI_CLK JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_SPI_CE0 JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_SPI_DT JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_SPI_DR JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_SPI_CE1 JZ_GPIO_FUNC1
|
||||
|
||||
#define JZ_GPIO_FUNC_PWM JZ_GPIO_FUNC1
|
||||
#define JZ_GPIO_FUNC_PWM0 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM1 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM2 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM3 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM4 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM5 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM6 JZ_GPIO_FUNC_PWM
|
||||
#define JZ_GPIO_FUNC_PWM7 JZ_GPIO_FUNC_PWM
|
||||
|
||||
#define JZ_GPIO_MEM_SCLK_RSTN JZ_GPIO_PORTD(18)
|
||||
#define JZ_GPIO_MEM_BCLK JZ_GPIO_PORTD(19)
|
||||
#define JZ_GPIO_MEM_SDATO JZ_GPIO_PORTD(20)
|
||||
#define JZ_GPIO_MEM_SDATI JZ_GPIO_PORTD(21)
|
||||
#define JZ_GPIO_MEM_SYNC JZ_GPIO_PORTD(22)
|
||||
#define JZ_GPIO_I2C_SDA JZ_GPIO_PORTD(23)
|
||||
#define JZ_GPIO_I2C_SCK JZ_GPIO_PORTD(24)
|
||||
#define JZ_GPIO_UART0_TXD JZ_GPIO_PORTD(25)
|
||||
#define JZ_GPIO_UART0_RXD JZ_GPIO_PORTD(26)
|
||||
#define JZ_GPIO_MEM_ADDR17 JZ_GPIO_PORTD(27)
|
||||
#define JZ_GPIO_MEM_ADDR18 JZ_GPIO_PORTD(28)
|
||||
#define JZ_GPIO_UART0_CTS JZ_GPIO_PORTD(30)
|
||||
#define JZ_GPIO_UART0_RTS JZ_GPIO_PORTD(31)
|
||||
|
||||
#define JZ_GPIO_FUNC_MEM_SCLK_RSTN JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_BCLK JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_SDATO JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_SDATI JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_SYNC JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_I2C_SDA JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_I2C_SCK JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_UART0_TXD JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_UART0_RXD JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR17 JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_MEM_ADDR18 JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_UART0_CTS JZ_GPIO_FUNC2
|
||||
#define JZ_GPIO_FUNC_UART0_RTS JZ_GPIO_FUNC2
|
||||
|
||||
#define JZ_GPIO_UART1_RXD JZ_GPIO_PORTD(30)
|
||||
#define JZ_GPIO_UART1_TXD JZ_GPIO_PORTD(31)
|
||||
|
||||
#define JZ_GPIO_FUNC_UART1_RXD JZ_GPIO_FUNC3
|
||||
#define JZ_GPIO_FUNC_UART1_TXD JZ_GPIO_FUNC3
|
||||
|
||||
#endif
|
57
arch/mips/include/asm/mach-jz4740/irq.h
Normal file
57
arch/mips/include/asm/mach-jz4740/irq.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* JZ4740 IRQ definitions
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_MACH_JZ4740_IRQ_H__
|
||||
#define __ASM_MACH_JZ4740_IRQ_H__
|
||||
|
||||
#define MIPS_CPU_IRQ_BASE 0
|
||||
#define JZ4740_IRQ_BASE 8
|
||||
|
||||
/* 1st-level interrupts */
|
||||
#define JZ4740_IRQ(x) (JZ4740_IRQ_BASE + (x))
|
||||
#define JZ4740_IRQ_I2C JZ4740_IRQ(1)
|
||||
#define JZ4740_IRQ_UHC JZ4740_IRQ(3)
|
||||
#define JZ4740_IRQ_UART1 JZ4740_IRQ(8)
|
||||
#define JZ4740_IRQ_UART0 JZ4740_IRQ(9)
|
||||
#define JZ4740_IRQ_SADC JZ4740_IRQ(12)
|
||||
#define JZ4740_IRQ_MSC JZ4740_IRQ(14)
|
||||
#define JZ4740_IRQ_RTC JZ4740_IRQ(15)
|
||||
#define JZ4740_IRQ_SSI JZ4740_IRQ(16)
|
||||
#define JZ4740_IRQ_CIM JZ4740_IRQ(17)
|
||||
#define JZ4740_IRQ_AIC JZ4740_IRQ(18)
|
||||
#define JZ4740_IRQ_ETH JZ4740_IRQ(19)
|
||||
#define JZ4740_IRQ_DMAC JZ4740_IRQ(20)
|
||||
#define JZ4740_IRQ_TCU2 JZ4740_IRQ(21)
|
||||
#define JZ4740_IRQ_TCU1 JZ4740_IRQ(22)
|
||||
#define JZ4740_IRQ_TCU0 JZ4740_IRQ(23)
|
||||
#define JZ4740_IRQ_UDC JZ4740_IRQ(24)
|
||||
#define JZ4740_IRQ_GPIO3 JZ4740_IRQ(25)
|
||||
#define JZ4740_IRQ_GPIO2 JZ4740_IRQ(26)
|
||||
#define JZ4740_IRQ_GPIO1 JZ4740_IRQ(27)
|
||||
#define JZ4740_IRQ_GPIO0 JZ4740_IRQ(28)
|
||||
#define JZ4740_IRQ_IPU JZ4740_IRQ(29)
|
||||
#define JZ4740_IRQ_LCD JZ4740_IRQ(30)
|
||||
|
||||
/* 2nd-level interrupts */
|
||||
#define JZ4740_IRQ_DMA(x) (JZ4740_IRQ(32) + (X))
|
||||
|
||||
#define JZ4740_IRQ_INTC_GPIO(x) (JZ4740_IRQ_GPIO0 - (x))
|
||||
#define JZ4740_IRQ_GPIO(x) (JZ4740_IRQ(48) + (x))
|
||||
|
||||
#define JZ4740_IRQ_ADC_BASE JZ4740_IRQ(176)
|
||||
|
||||
#define NR_IRQS (JZ4740_IRQ_ADC_BASE + 6)
|
||||
|
||||
#endif
|
67
arch/mips/include/asm/mach-jz4740/jz4740_fb.h
Normal file
67
arch/mips/include/asm/mach-jz4740/jz4740_fb.h
Normal file
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (C) 2009, Lars-Peter Clausen <lars@metafoo.de>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_MACH_JZ4740_JZ4740_FB_H__
|
||||
#define __ASM_MACH_JZ4740_JZ4740_FB_H__
|
||||
|
||||
#include <linux/fb.h>
|
||||
|
||||
enum jz4740_fb_lcd_type {
|
||||
JZ_LCD_TYPE_GENERIC_16_BIT = 0,
|
||||
JZ_LCD_TYPE_GENERIC_18_BIT = 0 | (1 << 4),
|
||||
JZ_LCD_TYPE_SPECIAL_TFT_1 = 1,
|
||||
JZ_LCD_TYPE_SPECIAL_TFT_2 = 2,
|
||||
JZ_LCD_TYPE_SPECIAL_TFT_3 = 3,
|
||||
JZ_LCD_TYPE_NON_INTERLACED_CCIR656 = 5,
|
||||
JZ_LCD_TYPE_INTERLACED_CCIR656 = 7,
|
||||
JZ_LCD_TYPE_SINGLE_COLOR_STN = 8,
|
||||
JZ_LCD_TYPE_SINGLE_MONOCHROME_STN = 9,
|
||||
JZ_LCD_TYPE_DUAL_COLOR_STN = 10,
|
||||
JZ_LCD_TYPE_DUAL_MONOCHROME_STN = 11,
|
||||
JZ_LCD_TYPE_8BIT_SERIAL = 12,
|
||||
};
|
||||
|
||||
#define JZ4740_FB_SPECIAL_TFT_CONFIG(start, stop) (((start) << 16) | (stop))
|
||||
|
||||
/*
|
||||
* width: width of the lcd display in mm
|
||||
* height: height of the lcd display in mm
|
||||
* num_modes: size of modes
|
||||
* modes: list of valid video modes
|
||||
* bpp: bits per pixel for the lcd
|
||||
* lcd_type: lcd type
|
||||
*/
|
||||
|
||||
struct jz4740_fb_platform_data {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
|
||||
size_t num_modes;
|
||||
struct fb_videomode *modes;
|
||||
|
||||
unsigned int bpp;
|
||||
enum jz4740_fb_lcd_type lcd_type;
|
||||
|
||||
struct {
|
||||
uint32_t spl;
|
||||
uint32_t cls;
|
||||
uint32_t ps;
|
||||
uint32_t rev;
|
||||
} special_tft_config;
|
||||
|
||||
unsigned pixclk_falling_edge:1;
|
||||
unsigned date_enable_active_low:1;
|
||||
};
|
||||
|
||||
#endif
|
15
arch/mips/include/asm/mach-jz4740/jz4740_mmc.h
Normal file
15
arch/mips/include/asm/mach-jz4740/jz4740_mmc.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef __LINUX_MMC_JZ4740_MMC
|
||||
#define __LINUX_MMC_JZ4740_MMC
|
||||
|
||||
struct jz4740_mmc_platform_data {
|
||||
int gpio_power;
|
||||
int gpio_card_detect;
|
||||
int gpio_read_only;
|
||||
unsigned card_detect_active_low:1;
|
||||
unsigned read_only_active_low:1;
|
||||
unsigned power_active_low:1;
|
||||
|
||||
unsigned data_1bit:1;
|
||||
};
|
||||
|
||||
#endif
|
34
arch/mips/include/asm/mach-jz4740/jz4740_nand.h
Normal file
34
arch/mips/include/asm/mach-jz4740/jz4740_nand.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* JZ4740 SoC NAND controller driver
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_MACH_JZ4740_JZ4740_NAND_H__
|
||||
#define __ASM_MACH_JZ4740_JZ4740_NAND_H__
|
||||
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
|
||||
struct jz_nand_platform_data {
|
||||
int num_partitions;
|
||||
struct mtd_partition *partitions;
|
||||
|
||||
struct nand_ecclayout *ecc_layout;
|
||||
|
||||
unsigned int busy_gpio;
|
||||
|
||||
void (*ident_callback)(struct platform_device *, struct nand_chip *,
|
||||
struct mtd_partition **, int *num_partitions);
|
||||
};
|
||||
|
||||
#endif
|
36
arch/mips/include/asm/mach-jz4740/platform.h
Normal file
36
arch/mips/include/asm/mach-jz4740/platform.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* JZ4740 platform device definitions
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __JZ4740_PLATFORM_H
|
||||
#define __JZ4740_PLATFORM_H
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
extern struct platform_device jz4740_usb_ohci_device;
|
||||
extern struct platform_device jz4740_udc_device;
|
||||
extern struct platform_device jz4740_mmc_device;
|
||||
extern struct platform_device jz4740_rtc_device;
|
||||
extern struct platform_device jz4740_i2c_device;
|
||||
extern struct platform_device jz4740_nand_device;
|
||||
extern struct platform_device jz4740_framebuffer_device;
|
||||
extern struct platform_device jz4740_i2s_device;
|
||||
extern struct platform_device jz4740_pcm_device;
|
||||
extern struct platform_device jz4740_codec_device;
|
||||
extern struct platform_device jz4740_adc_device;
|
||||
|
||||
void jz4740_serial_device_register(void);
|
||||
|
||||
#endif
|
22
arch/mips/include/asm/mach-jz4740/timer.h
Normal file
22
arch/mips/include/asm/mach-jz4740/timer.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
* JZ4740 platform timer support
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_MACH_JZ4740_TIMER
|
||||
#define __ASM_MACH_JZ4740_TIMER
|
||||
|
||||
void jz4740_timer_enable_watchdog(void);
|
||||
void jz4740_timer_disable_watchdog(void);
|
||||
|
||||
#endif
|
25
arch/mips/include/asm/mach-jz4740/war.h
Normal file
25
arch/mips/include/asm/mach-jz4740/war.h
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org>
|
||||
*/
|
||||
#ifndef __ASM_MIPS_MACH_JZ4740_WAR_H
|
||||
#define __ASM_MIPS_MACH_JZ4740_WAR_H
|
||||
|
||||
#define R4600_V1_INDEX_ICACHEOP_WAR 0
|
||||
#define R4600_V1_HIT_CACHEOP_WAR 0
|
||||
#define R4600_V2_HIT_CACHEOP_WAR 0
|
||||
#define R5432_CP0_INTERRUPT_WAR 0
|
||||
#define BCM1250_M3_WAR 0
|
||||
#define SIBYTE_1956_WAR 0
|
||||
#define MIPS4K_ICACHE_REFILL_WAR 0
|
||||
#define MIPS_CACHE_SYNC_WAR 0
|
||||
#define TX49XX_ICACHE_INDEX_INV_WAR 0
|
||||
#define RM9000_CDEX_SMP_WAR 0
|
||||
#define ICACHE_REFILLS_WORKAROUND_WAR 0
|
||||
#define R10000_LLSC_WAR 0
|
||||
#define MIPS34K_MISSED_ITLB_WAR 0
|
||||
|
||||
#endif /* __ASM_MIPS_MACH_JZ4740_WAR_H */
|
@ -45,7 +45,6 @@ static inline void prom_init_uart_base(void)
|
||||
/* irq operation functions */
|
||||
extern void bonito_irqdispatch(void);
|
||||
extern void __init bonito_irq_init(void);
|
||||
extern void __init set_irq_trigger_mode(void);
|
||||
extern void __init mach_init_irq(void);
|
||||
extern void mach_irq_dispatch(unsigned int pending);
|
||||
extern int mach_i8259_irq(void);
|
||||
@ -63,6 +62,14 @@ extern int mach_i8259_irq(void);
|
||||
#define LOONGSON_IRQ_BASE 32
|
||||
#define LOONGSON2_PERFCNT_IRQ (MIPS_CPU_IRQ_BASE + 6) /* cpu perf counter */
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
static inline void do_perfcnt_IRQ(void)
|
||||
{
|
||||
#if defined(CONFIG_OPROFILE) || defined(CONFIG_OPROFILE_MODULE)
|
||||
do_IRQ(LOONGSON2_PERFCNT_IRQ);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define LOONGSON_FLASH_BASE 0x1c000000
|
||||
#define LOONGSON_FLASH_SIZE 0x02000000 /* 32M */
|
||||
#define LOONGSON_FLASH_TOP (LOONGSON_FLASH_BASE+LOONGSON_FLASH_SIZE-1)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user