You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'mips-for-linux-next' of git://git.linux-mips.org/pub/scm/ralf/upstream-sfr
Pull MIPS updates from Ralf Baechle: - Support for Imgtec's Aptiv family of MIPS cores. - Improved detection of BCM47xx configurations. - Fix hiberation for certain configurations. - Add support for the Chinese Loongson 3 CPU, a MIPS64 R2 core and systems. - Detection and support for the MIPS P5600 core. - A few more random fixes that didn't make 3.14. - Support for the EVA Extended Virtual Addressing - Switch Alchemy to the platform PATA driver - Complete unification of Alchemy support - Allow availability of I/O cache coherency to be runtime detected - Improvments to multiprocessing support for Imgtec platforms - A few microoptimizations - Cleanups of FPU support - Paul Gortmaker's fixes for the init stuff - Support for seccomp * 'mips-for-linux-next' of git://git.linux-mips.org/pub/scm/ralf/upstream-sfr: (165 commits) MIPS: CPC: Use __raw_ memory access functions MIPS: CM: use __raw_ memory access functions MIPS: Fix warning when including smp-ops.h with CONFIG_SMP=n MIPS: Malta: GIC IPIs may be used without MT MIPS: smp-mt: Use common GIC IPI implementation MIPS: smp-cmp: Remove incorrect core number probe MIPS: Fix gigaton of warning building with microMIPS. MIPS: Fix core number detection for MT cores MIPS: MT: core_nvpes function to retrieve VPE count MIPS: Provide empty mips_mt_set_cpuoptions when CONFIG_MIPS_MT=n MIPS: Lasat: Replace del_timer by del_timer_sync MIPS: Malta: Setup PM I/O region on boot MIPS: Loongson: Add a Loongson-3 default config file MIPS: Loongson 3: Add CPU hotplug support MIPS: Loongson 3: Add Loongson-3 SMP support MIPS: Loongson: Add Loongson-3 Kconfig options MIPS: Loongson: Add swiotlb to support All-Memory DMA MIPS: Loongson 3: Add serial port support MIPS: Loongson 3: Add IRQ init and dispatch support MIPS: Loongson 3: Add HT-linked PCI support ...
This commit is contained in:
+125
-10
@@ -10,6 +10,7 @@ config MIPS
|
||||
select HAVE_PERF_EVENTS
|
||||
select PERF_USE_VMALLOC
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_ARCH_SECCOMP_FILTER
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select ARCH_HAVE_CUSTOM_GPIO_H
|
||||
select HAVE_FUNCTION_TRACER
|
||||
@@ -62,6 +63,7 @@ config MIPS_ALCHEMY
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select IRQ_CPU
|
||||
select DMA_MAYBE_COHERENT # Au1000,1500,1100 aren't, rest is
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_APM_EMULATION
|
||||
@@ -121,7 +123,7 @@ config BCM47XX
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select EARLY_PRINTK_8250 if EARLY_PRINTK
|
||||
select USE_GENERIC_EARLY_PRINTK_8250
|
||||
help
|
||||
Support for BCM47XX based boards
|
||||
|
||||
@@ -148,7 +150,6 @@ config MIPS_COBALT
|
||||
select CSRC_R4K
|
||||
select CEVT_GT641XX
|
||||
select DMA_NONCOHERENT
|
||||
select EARLY_PRINTK_8250 if EARLY_PRINTK
|
||||
select HW_HAS_PCI
|
||||
select I8253
|
||||
select I8259
|
||||
@@ -161,6 +162,7 @@ config MIPS_COBALT
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select USE_GENERIC_EARLY_PRINTK_8250
|
||||
|
||||
config MACH_DECSTATION
|
||||
bool "DECstations"
|
||||
@@ -233,7 +235,6 @@ config MACH_JZ4740
|
||||
select IRQ_CPU
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select HAVE_PWM
|
||||
select HAVE_CLK
|
||||
select GENERIC_IRQ_CHIP
|
||||
|
||||
@@ -318,6 +319,7 @@ config MIPS_MALTA
|
||||
select SWAP_IO_SPACE
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select SYS_HAS_CPU_MIPS32_R3_5
|
||||
select SYS_HAS_CPU_MIPS64_R1
|
||||
select SYS_HAS_CPU_MIPS64_R2
|
||||
select SYS_HAS_CPU_NEVADA
|
||||
@@ -327,6 +329,7 @@ config MIPS_MALTA
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_SUPPORTS_MIPS_CMP
|
||||
select SYS_SUPPORTS_MIPS_CPS
|
||||
select SYS_SUPPORTS_MULTITHREADING
|
||||
select SYS_SUPPORTS_SMARTMIPS
|
||||
select SYS_SUPPORTS_ZBOOT
|
||||
@@ -671,6 +674,7 @@ config SNI_RM
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_HIGHMEM
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select USE_GENERIC_EARLY_PRINTK_8250
|
||||
help
|
||||
The SNI RM200/300/400 are MIPS-based machines manufactured by
|
||||
Siemens Nixdorf Informationssysteme (SNI), parent company of Pyramid
|
||||
@@ -775,7 +779,6 @@ config NLM_XLP_BOARD
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select IRQ_CPU
|
||||
select ARCH_SUPPORTS_MSI
|
||||
select ZONE_DMA32 if 64BIT
|
||||
select SYNC_R4K
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
@@ -861,6 +864,7 @@ config CEVT_R4K
|
||||
bool
|
||||
|
||||
config CEVT_GIC
|
||||
select MIPS_CM
|
||||
bool
|
||||
|
||||
config CEVT_SB1250
|
||||
@@ -879,6 +883,7 @@ config CSRC_R4K
|
||||
bool
|
||||
|
||||
config CSRC_GIC
|
||||
select MIPS_CM
|
||||
bool
|
||||
|
||||
config CSRC_SB1250
|
||||
@@ -1023,6 +1028,7 @@ config IRQ_GT641XX
|
||||
bool
|
||||
|
||||
config IRQ_GIC
|
||||
select MIPS_CM
|
||||
bool
|
||||
|
||||
config PCI_GT64XXX_PCI0
|
||||
@@ -1141,6 +1147,18 @@ choice
|
||||
prompt "CPU type"
|
||||
default CPU_R4X00
|
||||
|
||||
config CPU_LOONGSON3
|
||||
bool "Loongson 3 CPU"
|
||||
depends on SYS_HAS_CPU_LOONGSON3
|
||||
select CPU_SUPPORTS_64BIT_KERNEL
|
||||
select CPU_SUPPORTS_HIGHMEM
|
||||
select CPU_SUPPORTS_HUGEPAGES
|
||||
select WEAK_ORDERING
|
||||
select WEAK_REORDERING_BEYOND_LLSC
|
||||
help
|
||||
The Loongson 3 processor implements the MIPS64R2 instruction
|
||||
set with many extensions.
|
||||
|
||||
config CPU_LOONGSON2E
|
||||
bool "Loongson 2E"
|
||||
depends on SYS_HAS_CPU_LOONGSON2E
|
||||
@@ -1196,6 +1214,7 @@ config CPU_MIPS32_R2
|
||||
select CPU_HAS_PREFETCH
|
||||
select CPU_SUPPORTS_32BIT_KERNEL
|
||||
select CPU_SUPPORTS_HIGHMEM
|
||||
select CPU_SUPPORTS_MSA
|
||||
select HAVE_KVM
|
||||
help
|
||||
Choose this option to build a kernel for release 2 or later of the
|
||||
@@ -1231,6 +1250,7 @@ config CPU_MIPS64_R2
|
||||
select CPU_SUPPORTS_64BIT_KERNEL
|
||||
select CPU_SUPPORTS_HIGHMEM
|
||||
select CPU_SUPPORTS_HUGEPAGES
|
||||
select CPU_SUPPORTS_MSA
|
||||
help
|
||||
Choose this option to build a kernel for release 2 or later of the
|
||||
MIPS64 architecture. Many modern embedded systems with a 64-bit
|
||||
@@ -1389,7 +1409,6 @@ config CPU_CAVIUM_OCTEON
|
||||
select LIBFDT
|
||||
select USE_OF
|
||||
select USB_EHCI_BIG_ENDIAN_MMIO
|
||||
select SYS_HAS_DMA_OPS
|
||||
select MIPS_L1_CACHE_SHIFT_7
|
||||
help
|
||||
The Cavium Octeon processor is a highly integrated chip containing
|
||||
@@ -1441,6 +1460,26 @@ config CPU_XLP
|
||||
Netlogic Microsystems XLP processors.
|
||||
endchoice
|
||||
|
||||
config CPU_MIPS32_3_5_FEATURES
|
||||
bool "MIPS32 Release 3.5 Features"
|
||||
depends on SYS_HAS_CPU_MIPS32_R3_5
|
||||
depends on CPU_MIPS32_R2
|
||||
help
|
||||
Choose this option to build a kernel for release 2 or later of the
|
||||
MIPS32 architecture including features from the 3.5 release such as
|
||||
support for Enhanced Virtual Addressing (EVA).
|
||||
|
||||
config CPU_MIPS32_3_5_EVA
|
||||
bool "Enhanced Virtual Addressing (EVA)"
|
||||
depends on CPU_MIPS32_3_5_FEATURES
|
||||
select EVA
|
||||
default y
|
||||
help
|
||||
Choose this option if you want to enable the Enhanced Virtual
|
||||
Addressing (EVA) on your MIPS32 core (such as proAptiv).
|
||||
One of its primary benefits is an increase in the maximum size
|
||||
of lowmem (up to 3GB). If unsure, say 'N' here.
|
||||
|
||||
if CPU_LOONGSON2F
|
||||
config CPU_NOP_WORKAROUNDS
|
||||
bool
|
||||
@@ -1516,6 +1555,10 @@ config CPU_BMIPS5000
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
|
||||
config SYS_HAS_CPU_LOONGSON3
|
||||
bool
|
||||
select CPU_SUPPORTS_CPUFREQ
|
||||
|
||||
config SYS_HAS_CPU_LOONGSON2E
|
||||
bool
|
||||
|
||||
@@ -1534,6 +1577,9 @@ config SYS_HAS_CPU_MIPS32_R1
|
||||
config SYS_HAS_CPU_MIPS32_R2
|
||||
bool
|
||||
|
||||
config SYS_HAS_CPU_MIPS32_R3_5
|
||||
bool
|
||||
|
||||
config SYS_HAS_CPU_MIPS64_R1
|
||||
bool
|
||||
|
||||
@@ -1650,6 +1696,9 @@ config CPU_MIPSR2
|
||||
bool
|
||||
default y if CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_CAVIUM_OCTEON
|
||||
|
||||
config EVA
|
||||
bool
|
||||
|
||||
config SYS_SUPPORTS_32BIT_KERNEL
|
||||
bool
|
||||
config SYS_SUPPORTS_64BIT_KERNEL
|
||||
@@ -1722,7 +1771,7 @@ choice
|
||||
|
||||
config PAGE_SIZE_4KB
|
||||
bool "4kB"
|
||||
depends on !CPU_LOONGSON2
|
||||
depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
|
||||
help
|
||||
This option select the standard 4kB Linux page size. On some
|
||||
R3000-family processors this is the only available page size. Using
|
||||
@@ -1863,6 +1912,7 @@ config MIPS_MT_SMP
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select CPU_MIPSR2_IRQ_EI
|
||||
select SYNC_R4K
|
||||
select MIPS_GIC_IPI
|
||||
select MIPS_MT
|
||||
select SMP
|
||||
select SMP_UP
|
||||
@@ -1880,6 +1930,7 @@ config MIPS_MT_SMTC
|
||||
bool "Use all TCs on all VPEs for SMP (DEPRECATED)"
|
||||
depends on CPU_MIPS32_R2
|
||||
depends on SYS_SUPPORTS_MULTITHREADING
|
||||
depends on !MIPS_CPS
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select CPU_MIPSR2_IRQ_EI
|
||||
select MIPS_MT
|
||||
@@ -1987,13 +2038,45 @@ config MIPS_VPE_APSP_API_MT
|
||||
depends on MIPS_VPE_APSP_API && !MIPS_CMP
|
||||
|
||||
config MIPS_CMP
|
||||
bool "MIPS CMP support"
|
||||
depends on SYS_SUPPORTS_MIPS_CMP && MIPS_MT_SMP
|
||||
bool "MIPS CMP framework support (DEPRECATED)"
|
||||
depends on SYS_SUPPORTS_MIPS_CMP && !MIPS_MT_SMTC
|
||||
select MIPS_GIC_IPI
|
||||
select SYNC_R4K
|
||||
select WEAK_ORDERING
|
||||
default n
|
||||
help
|
||||
Enable Coherency Manager processor (CMP) support.
|
||||
Select this if you are using a bootloader which implements the "CMP
|
||||
framework" protocol (ie. YAMON) and want your kernel to make use of
|
||||
its ability to start secondary CPUs.
|
||||
|
||||
Unless you have a specific need, you should use CONFIG_MIPS_CPS
|
||||
instead of this.
|
||||
|
||||
config MIPS_CPS
|
||||
bool "MIPS Coherent Processing System support"
|
||||
depends on SYS_SUPPORTS_MIPS_CPS
|
||||
select MIPS_CM
|
||||
select MIPS_CPC
|
||||
select MIPS_GIC_IPI
|
||||
select SMP
|
||||
select SYNC_R4K if (CEVT_R4K || CSRC_R4K)
|
||||
select SYS_SUPPORTS_SMP
|
||||
select WEAK_ORDERING
|
||||
help
|
||||
Select this if you wish to run an SMP kernel across multiple cores
|
||||
within a MIPS Coherent Processing System. When this option is
|
||||
enabled the kernel will probe for other cores and boot them with
|
||||
no external assistance. It is safe to enable this when hardware
|
||||
support is unavailable.
|
||||
|
||||
config MIPS_GIC_IPI
|
||||
bool
|
||||
|
||||
config MIPS_CM
|
||||
bool
|
||||
|
||||
config MIPS_CPC
|
||||
bool
|
||||
|
||||
config SB1_PASS_1_WORKAROUNDS
|
||||
bool
|
||||
@@ -2036,6 +2119,21 @@ config CPU_MICROMIPS
|
||||
When this option is enabled the kernel will be built using the
|
||||
microMIPS ISA
|
||||
|
||||
config CPU_HAS_MSA
|
||||
bool "Support for the MIPS SIMD Architecture"
|
||||
depends on CPU_SUPPORTS_MSA
|
||||
default y
|
||||
help
|
||||
MIPS SIMD Architecture (MSA) introduces 128 bit wide vector registers
|
||||
and a set of SIMD instructions to operate on them. When this option
|
||||
is enabled the kernel will support allocating & switching MSA
|
||||
vector register contexts. If you know that your kernel will only be
|
||||
running on CPUs which do not support MSA or that your userland will
|
||||
not be making use of it then you may wish to say N here to reduce
|
||||
the size & complexity of your kernel.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CPU_HAS_WB
|
||||
bool
|
||||
|
||||
@@ -2087,7 +2185,7 @@ config CPU_R4400_WORKAROUNDS
|
||||
#
|
||||
config HIGHMEM
|
||||
bool "High Memory Support"
|
||||
depends on 32BIT && CPU_SUPPORTS_HIGHMEM && SYS_SUPPORTS_HIGHMEM
|
||||
depends on 32BIT && CPU_SUPPORTS_HIGHMEM && SYS_SUPPORTS_HIGHMEM && !CPU_MIPS32_3_5_EVA
|
||||
|
||||
config CPU_SUPPORTS_HIGHMEM
|
||||
bool
|
||||
@@ -2101,6 +2199,9 @@ config SYS_SUPPORTS_SMARTMIPS
|
||||
config SYS_SUPPORTS_MICROMIPS
|
||||
bool
|
||||
|
||||
config CPU_SUPPORTS_MSA
|
||||
bool
|
||||
|
||||
config ARCH_FLATMEM_ENABLE
|
||||
def_bool y
|
||||
depends on !NUMA && !CPU_LOONGSON2
|
||||
@@ -2174,6 +2275,9 @@ config SMP_UP
|
||||
config SYS_SUPPORTS_MIPS_CMP
|
||||
bool
|
||||
|
||||
config SYS_SUPPORTS_MIPS_CPS
|
||||
bool
|
||||
|
||||
config SYS_SUPPORTS_SMP
|
||||
bool
|
||||
|
||||
@@ -2406,6 +2510,17 @@ config PCI
|
||||
your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
|
||||
say Y, otherwise N.
|
||||
|
||||
config HT_PCI
|
||||
bool "Support for HT-linked PCI"
|
||||
default y
|
||||
depends on CPU_LOONGSON3
|
||||
select PCI
|
||||
select PCI_DOMAINS
|
||||
help
|
||||
Loongson family machines use Hyper-Transport bus for inter-core
|
||||
connection and device connection. The PCI bus is a subordinate
|
||||
linked at HT. Choose Y for Loongson-3 based machines.
|
||||
|
||||
config PCI_DOMAINS
|
||||
bool
|
||||
|
||||
|
||||
@@ -21,13 +21,17 @@ config EARLY_PRINTK
|
||||
unless you want to debug such a crash.
|
||||
|
||||
config EARLY_PRINTK_8250
|
||||
bool "8250/16550 and compatible serial early printk driver"
|
||||
depends on EARLY_PRINTK
|
||||
default n
|
||||
bool
|
||||
depends on EARLY_PRINTK && USE_GENERIC_EARLY_PRINTK_8250
|
||||
default y
|
||||
help
|
||||
"8250/16550 and compatible serial early printk driver"
|
||||
If you say Y here, it will be possible to use a 8250/16550 serial
|
||||
port as the boot console.
|
||||
|
||||
config USE_GENERIC_EARLY_PRINTK_8250
|
||||
bool
|
||||
|
||||
config CMDLINE_BOOL
|
||||
bool "Built-in kernel command line"
|
||||
default n
|
||||
|
||||
@@ -119,6 +119,11 @@ cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips)
|
||||
cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
|
||||
-fno-omit-frame-pointer
|
||||
|
||||
ifeq ($(CONFIG_CPU_HAS_MSA),y)
|
||||
toolchain-msa := $(call cc-option-yn,-mhard-float -mfp64 -mmsa)
|
||||
cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA
|
||||
endif
|
||||
|
||||
#
|
||||
# CPU-dependent compiler/assembler options for optimization.
|
||||
#
|
||||
|
||||
@@ -16,36 +16,29 @@ config ALCHEMY_GPIO_INDIRECT
|
||||
choice
|
||||
prompt "Machine type"
|
||||
depends on MIPS_ALCHEMY
|
||||
default MIPS_DB1000
|
||||
default MIPS_DB1XXX
|
||||
|
||||
config MIPS_MTX1
|
||||
bool "4G Systems MTX-1 board"
|
||||
select DMA_NONCOHERENT
|
||||
select HW_HAS_PCI
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
|
||||
config MIPS_DB1000
|
||||
bool "Alchemy DB1000/DB1500/DB1100 PB1500/1100 boards"
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
select DMA_NONCOHERENT
|
||||
select HW_HAS_PCI
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
|
||||
config MIPS_DB1235
|
||||
bool "Alchemy DB1200/PB1200/DB1300/DB1550/PB1550 boards"
|
||||
config MIPS_DB1XXX
|
||||
bool "Alchemy DB1XXX / PB1XXX boards"
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select HW_HAS_PCI
|
||||
select DMA_COHERENT
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
help
|
||||
Select this option if you have one of the following Alchemy
|
||||
development boards: DB1000 DB1500 DB1100 DB1550 DB1200 DB1300
|
||||
PB1500 PB1100 PB1550 PB1200
|
||||
Board type is autodetected during boot.
|
||||
|
||||
config MIPS_XXS1500
|
||||
bool "MyCable XXS1500 board"
|
||||
select DMA_NONCOHERENT
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
@@ -54,7 +47,6 @@ config MIPS_GPR
|
||||
bool "Trapeze ITS GPR board"
|
||||
select ALCHEMY_GPIOINT_AU1000
|
||||
select HW_HAS_PCI
|
||||
select DMA_NONCOHERENT
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
|
||||
|
||||
@@ -5,18 +5,12 @@ platform-$(CONFIG_MIPS_ALCHEMY) += alchemy/common/
|
||||
|
||||
|
||||
#
|
||||
# AMD Alchemy Db1000/Db1500/Pb1500/Db1100/Pb1100 eval boards
|
||||
# AMD Alchemy Db1000/Db1500/Pb1500/Db1100/Pb1100
|
||||
# Db1550/Pb1550/Db1200/Pb1200/Db1300
|
||||
#
|
||||
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 Db1200/Pb1200/Db1550/Pb1550/Db1300 eval boards
|
||||
#
|
||||
platform-$(CONFIG_MIPS_DB1235) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1235) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1235) += 0xffffffff80100000
|
||||
platform-$(CONFIG_MIPS_DB1XXX) += alchemy/devboards/
|
||||
cflags-$(CONFIG_MIPS_DB1XXX) += -I$(srctree)/arch/mips/include/asm/mach-db1x00
|
||||
load-$(CONFIG_MIPS_DB1XXX) += 0xffffffff80100000
|
||||
|
||||
#
|
||||
# 4G-Systems MTX-1 "MeshCube" wireless router
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/dma-coherence.h>
|
||||
#include <asm/mipsregs.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
@@ -59,6 +60,15 @@ void __init plat_mem_setup(void)
|
||||
/* Clear to obtain best system bus performance */
|
||||
clear_c0_config(1 << 19); /* Clear Config[OD] */
|
||||
|
||||
hw_coherentio = 0;
|
||||
coherentio = 1;
|
||||
switch (alchemy_get_cputype()) {
|
||||
case ALCHEMY_CPU_AU1000:
|
||||
case ALCHEMY_CPU_AU1500:
|
||||
case ALCHEMY_CPU_AU1100:
|
||||
coherentio = 0;
|
||||
}
|
||||
|
||||
board_setup(); /* board specific setup */
|
||||
|
||||
/* IO/MEM resources. */
|
||||
|
||||
@@ -95,7 +95,7 @@ LEAF(alchemy_sleep_au1000)
|
||||
|
||||
/* cache following instructions, as memory gets put to sleep */
|
||||
la t0, 1f
|
||||
.set mips3
|
||||
.set arch=r4000
|
||||
cache 0x14, 0(t0)
|
||||
cache 0x14, 32(t0)
|
||||
cache 0x14, 64(t0)
|
||||
@@ -121,7 +121,7 @@ LEAF(alchemy_sleep_au1550)
|
||||
|
||||
/* cache following instructions, as memory gets put to sleep */
|
||||
la t0, 1f
|
||||
.set mips3
|
||||
.set arch=r4000
|
||||
cache 0x14, 0(t0)
|
||||
cache 0x14, 32(t0)
|
||||
cache 0x14, 64(t0)
|
||||
@@ -163,7 +163,7 @@ LEAF(alchemy_sleep_au1300)
|
||||
la t1, 4f
|
||||
subu t2, t1, t0
|
||||
|
||||
.set mips3
|
||||
.set arch=r4000
|
||||
|
||||
1: cache 0x14, 0(t0)
|
||||
subu t2, t2, 32
|
||||
|
||||
@@ -2,7 +2,5 @@
|
||||
# Alchemy Develboards
|
||||
#
|
||||
|
||||
obj-y += bcsr.o platform.o
|
||||
obj-y += bcsr.o platform.o db1000.o db1200.o db1300.o db1550.o db1xxx.o
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
obj-$(CONFIG_MIPS_DB1000) += db1000.o
|
||||
obj-$(CONFIG_MIPS_DB1235) += db1235.o db1200.o db1300.o db1550.o
|
||||
|
||||
@@ -41,42 +41,27 @@
|
||||
|
||||
#define F_SWAPPED (bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT)
|
||||
|
||||
struct pci_dev;
|
||||
const char *get_system_type(void);
|
||||
|
||||
static const char *board_type_str(void)
|
||||
{
|
||||
switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
|
||||
case BCSR_WHOAMI_DB1000:
|
||||
return "DB1000";
|
||||
case BCSR_WHOAMI_DB1500:
|
||||
return "DB1500";
|
||||
case BCSR_WHOAMI_DB1100:
|
||||
return "DB1100";
|
||||
case BCSR_WHOAMI_PB1500:
|
||||
case BCSR_WHOAMI_PB1500R2:
|
||||
return "PB1500";
|
||||
case BCSR_WHOAMI_PB1100:
|
||||
return "PB1100";
|
||||
default:
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
return board_type_str();
|
||||
}
|
||||
|
||||
void __init board_setup(void)
|
||||
int __init db1000_board_setup(void)
|
||||
{
|
||||
/* initialize board register space */
|
||||
bcsr_init(DB1000_BCSR_PHYS_ADDR,
|
||||
DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS);
|
||||
|
||||
printk(KERN_INFO "AMD Alchemy %s Board\n", board_type_str());
|
||||
switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
|
||||
case BCSR_WHOAMI_DB1000:
|
||||
case BCSR_WHOAMI_DB1500:
|
||||
case BCSR_WHOAMI_DB1100:
|
||||
case BCSR_WHOAMI_PB1500:
|
||||
case BCSR_WHOAMI_PB1500R2:
|
||||
case BCSR_WHOAMI_PB1100:
|
||||
pr_info("AMD Alchemy %s Board\n", get_system_type());
|
||||
return 0;
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
static int db1500_map_pci_irq(const struct pci_dev *d, u8 slot, u8 pin)
|
||||
{
|
||||
if ((slot < 12) || (slot > 13) || pin == 0)
|
||||
@@ -114,17 +99,10 @@ static struct platform_device db1500_pci_host_dev = {
|
||||
.resource = alchemy_pci_host_res,
|
||||
};
|
||||
|
||||
static int __init db1500_pci_init(void)
|
||||
int __init db1500_pci_setup(void)
|
||||
{
|
||||
int id = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
|
||||
if ((id == BCSR_WHOAMI_DB1500) || (id == BCSR_WHOAMI_PB1500) ||
|
||||
(id == BCSR_WHOAMI_PB1500R2))
|
||||
return platform_device_register(&db1500_pci_host_dev);
|
||||
return 0;
|
||||
return platform_device_register(&db1500_pci_host_dev);
|
||||
}
|
||||
/* must be arch_initcall; MIPS PCI scans busses in a subsys_initcall */
|
||||
arch_initcall(db1500_pci_init);
|
||||
|
||||
|
||||
static struct resource au1100_lcd_resources[] = {
|
||||
[0] = {
|
||||
@@ -513,7 +491,7 @@ static struct platform_device *db1100_devs[] = {
|
||||
&db1000_irda_dev,
|
||||
};
|
||||
|
||||
static int __init db1000_dev_init(void)
|
||||
int __init db1000_dev_setup(void)
|
||||
{
|
||||
int board = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
|
||||
int c0, c1, d0, d1, s0, s1, flashsize = 32, twosocks = 1;
|
||||
@@ -623,4 +601,3 @@ static int __init db1000_dev_init(void)
|
||||
db1x_register_norflash(flashsize << 20, 4 /* 32bit */, F_SWAPPED);
|
||||
return 0;
|
||||
}
|
||||
device_initcall(db1000_dev_init);
|
||||
|
||||
@@ -35,16 +35,63 @@
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/flash.h>
|
||||
#include <linux/smc91x.h>
|
||||
#include <linux/ata_platform.h>
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
#include <asm/mach-au1x00/au1100_mmc.h>
|
||||
#include <asm/mach-au1x00/au1xxx_dbdma.h>
|
||||
#include <asm/mach-au1x00/au1xxx_psc.h>
|
||||
#include <asm/mach-au1x00/au1200fb.h>
|
||||
#include <asm/mach-au1x00/au1550_spi.h>
|
||||
#include <asm/mach-db1x00/bcsr.h>
|
||||
#include <asm/mach-db1x00/db1200.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#define BCSR_INT_IDE 0x0001
|
||||
#define BCSR_INT_ETH 0x0002
|
||||
#define BCSR_INT_PC0 0x0004
|
||||
#define BCSR_INT_PC0STSCHG 0x0008
|
||||
#define BCSR_INT_PC1 0x0010
|
||||
#define BCSR_INT_PC1STSCHG 0x0020
|
||||
#define BCSR_INT_DC 0x0040
|
||||
#define BCSR_INT_FLASHBUSY 0x0080
|
||||
#define BCSR_INT_PC0INSERT 0x0100
|
||||
#define BCSR_INT_PC0EJECT 0x0200
|
||||
#define BCSR_INT_PC1INSERT 0x0400
|
||||
#define BCSR_INT_PC1EJECT 0x0800
|
||||
#define BCSR_INT_SD0INSERT 0x1000
|
||||
#define BCSR_INT_SD0EJECT 0x2000
|
||||
#define BCSR_INT_SD1INSERT 0x4000
|
||||
#define BCSR_INT_SD1EJECT 0x8000
|
||||
|
||||
#define DB1200_IDE_PHYS_ADDR 0x18800000
|
||||
#define DB1200_IDE_REG_SHIFT 5
|
||||
#define DB1200_IDE_PHYS_LEN (16 << DB1200_IDE_REG_SHIFT)
|
||||
#define DB1200_ETH_PHYS_ADDR 0x19000300
|
||||
#define DB1200_NAND_PHYS_ADDR 0x20000000
|
||||
|
||||
#define PB1200_IDE_PHYS_ADDR 0x0C800000
|
||||
#define PB1200_ETH_PHYS_ADDR 0x0D000300
|
||||
#define PB1200_NAND_PHYS_ADDR 0x1C000000
|
||||
|
||||
#define DB1200_INT_BEGIN (AU1000_MAX_INTR + 1)
|
||||
#define DB1200_IDE_INT (DB1200_INT_BEGIN + 0)
|
||||
#define DB1200_ETH_INT (DB1200_INT_BEGIN + 1)
|
||||
#define DB1200_PC0_INT (DB1200_INT_BEGIN + 2)
|
||||
#define DB1200_PC0_STSCHG_INT (DB1200_INT_BEGIN + 3)
|
||||
#define DB1200_PC1_INT (DB1200_INT_BEGIN + 4)
|
||||
#define DB1200_PC1_STSCHG_INT (DB1200_INT_BEGIN + 5)
|
||||
#define DB1200_DC_INT (DB1200_INT_BEGIN + 6)
|
||||
#define DB1200_FLASHBUSY_INT (DB1200_INT_BEGIN + 7)
|
||||
#define DB1200_PC0_INSERT_INT (DB1200_INT_BEGIN + 8)
|
||||
#define DB1200_PC0_EJECT_INT (DB1200_INT_BEGIN + 9)
|
||||
#define DB1200_PC1_INSERT_INT (DB1200_INT_BEGIN + 10)
|
||||
#define DB1200_PC1_EJECT_INT (DB1200_INT_BEGIN + 11)
|
||||
#define DB1200_SD0_INSERT_INT (DB1200_INT_BEGIN + 12)
|
||||
#define DB1200_SD0_EJECT_INT (DB1200_INT_BEGIN + 13)
|
||||
#define PB1200_SD1_INSERT_INT (DB1200_INT_BEGIN + 14)
|
||||
#define PB1200_SD1_EJECT_INT (DB1200_INT_BEGIN + 15)
|
||||
#define DB1200_INT_END (DB1200_INT_BEGIN + 15)
|
||||
|
||||
const char *get_system_type(void);
|
||||
|
||||
static int __init db1200_detect_board(void)
|
||||
@@ -89,6 +136,15 @@ int __init db1200_board_setup(void)
|
||||
return -ENODEV;
|
||||
|
||||
whoami = bcsr_read(BCSR_WHOAMI);
|
||||
switch (BCSR_WHOAMI_BOARD(whoami)) {
|
||||
case BCSR_WHOAMI_PB1200_DDR1:
|
||||
case BCSR_WHOAMI_PB1200_DDR2:
|
||||
case BCSR_WHOAMI_DB1200:
|
||||
break;
|
||||
default:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "Alchemy/AMD/RMI %s Board, CPLD Rev %d"
|
||||
" Board-ID %d Daughtercard ID %d\n", get_system_type(),
|
||||
(whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf);
|
||||
@@ -275,32 +331,38 @@ static struct platform_device db1200_eth_dev = {
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
static struct pata_platform_info db1200_ide_info = {
|
||||
.ioport_shift = DB1200_IDE_REG_SHIFT,
|
||||
};
|
||||
|
||||
#define IDE_ALT_START (14 << DB1200_IDE_REG_SHIFT)
|
||||
static struct resource db1200_ide_res[] = {
|
||||
[0] = {
|
||||
.start = DB1200_IDE_PHYS_ADDR,
|
||||
.end = DB1200_IDE_PHYS_ADDR + DB1200_IDE_PHYS_LEN - 1,
|
||||
.end = DB1200_IDE_PHYS_ADDR + IDE_ALT_START - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DB1200_IDE_PHYS_ADDR + IDE_ALT_START,
|
||||
.end = DB1200_IDE_PHYS_ADDR + DB1200_IDE_PHYS_LEN - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[2] = {
|
||||
.start = DB1200_IDE_INT,
|
||||
.end = DB1200_IDE_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
[2] = {
|
||||
.start = AU1200_DSCR_CMD0_DMA_REQ1,
|
||||
.end = AU1200_DSCR_CMD0_DMA_REQ1,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 au1200_ide_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static struct platform_device db1200_ide_dev = {
|
||||
.name = "au1200-ide",
|
||||
.name = "pata_platform",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.dma_mask = &au1200_ide_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
.platform_data = &db1200_ide_info,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(db1200_ide_res),
|
||||
.resource = db1200_ide_res,
|
||||
|
||||
@@ -26,12 +26,44 @@
|
||||
#include <asm/mach-au1x00/au1200fb.h>
|
||||
#include <asm/mach-au1x00/au1xxx_dbdma.h>
|
||||
#include <asm/mach-au1x00/au1xxx_psc.h>
|
||||
#include <asm/mach-db1x00/db1300.h>
|
||||
#include <asm/mach-db1x00/bcsr.h>
|
||||
#include <asm/mach-au1x00/prom.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
/* FPGA (external mux) interrupt sources */
|
||||
#define DB1300_FIRST_INT (ALCHEMY_GPIC_INT_LAST + 1)
|
||||
#define DB1300_IDE_INT (DB1300_FIRST_INT + 0)
|
||||
#define DB1300_ETH_INT (DB1300_FIRST_INT + 1)
|
||||
#define DB1300_CF_INT (DB1300_FIRST_INT + 2)
|
||||
#define DB1300_VIDEO_INT (DB1300_FIRST_INT + 4)
|
||||
#define DB1300_HDMI_INT (DB1300_FIRST_INT + 5)
|
||||
#define DB1300_DC_INT (DB1300_FIRST_INT + 6)
|
||||
#define DB1300_FLASH_INT (DB1300_FIRST_INT + 7)
|
||||
#define DB1300_CF_INSERT_INT (DB1300_FIRST_INT + 8)
|
||||
#define DB1300_CF_EJECT_INT (DB1300_FIRST_INT + 9)
|
||||
#define DB1300_AC97_INT (DB1300_FIRST_INT + 10)
|
||||
#define DB1300_AC97_PEN_INT (DB1300_FIRST_INT + 11)
|
||||
#define DB1300_SD1_INSERT_INT (DB1300_FIRST_INT + 12)
|
||||
#define DB1300_SD1_EJECT_INT (DB1300_FIRST_INT + 13)
|
||||
#define DB1300_OTG_VBUS_OC_INT (DB1300_FIRST_INT + 14)
|
||||
#define DB1300_HOST_VBUS_OC_INT (DB1300_FIRST_INT + 15)
|
||||
#define DB1300_LAST_INT (DB1300_FIRST_INT + 15)
|
||||
|
||||
/* SMSC9210 CS */
|
||||
#define DB1300_ETH_PHYS_ADDR 0x19000000
|
||||
#define DB1300_ETH_PHYS_END 0x197fffff
|
||||
|
||||
/* ATA CS */
|
||||
#define DB1300_IDE_PHYS_ADDR 0x18800000
|
||||
#define DB1300_IDE_REG_SHIFT 5
|
||||
#define DB1300_IDE_PHYS_LEN (16 << DB1300_IDE_REG_SHIFT)
|
||||
|
||||
/* NAND CS */
|
||||
#define DB1300_NAND_PHYS_ADDR 0x20000000
|
||||
#define DB1300_NAND_PHYS_END 0x20000fff
|
||||
|
||||
|
||||
static struct i2c_board_info db1300_i2c_devs[] __initdata = {
|
||||
{ I2C_BOARD_INFO("wm8731", 0x1b), }, /* I2S audio codec */
|
||||
{ I2C_BOARD_INFO("ne1619", 0x2d), }, /* adm1025-compat hwmon */
|
||||
@@ -759,11 +791,15 @@ int __init db1300_board_setup(void)
|
||||
{
|
||||
unsigned short whoami;
|
||||
|
||||
db1300_gpio_config();
|
||||
bcsr_init(DB1300_BCSR_PHYS_ADDR,
|
||||
DB1300_BCSR_PHYS_ADDR + DB1300_BCSR_HEXLED_OFS);
|
||||
|
||||
whoami = bcsr_read(BCSR_WHOAMI);
|
||||
if (BCSR_WHOAMI_BOARD(whoami) != BCSR_WHOAMI_DB1300)
|
||||
return -ENODEV;
|
||||
|
||||
db1300_gpio_config();
|
||||
|
||||
printk(KERN_INFO "NetLogic DBAu1300 Development Platform.\n\t"
|
||||
"BoardID %d CPLD Rev %d DaughtercardID %d\n",
|
||||
BCSR_WHOAMI_BOARD(whoami), BCSR_WHOAMI_CPLD(whoami),
|
||||
|
||||
@@ -62,10 +62,16 @@ int __init db1550_board_setup(void)
|
||||
DB1550_BCSR_PHYS_ADDR + DB1550_BCSR_HEXLED_OFS);
|
||||
|
||||
whoami = bcsr_read(BCSR_WHOAMI); /* PB1550 hexled offset differs */
|
||||
if ((BCSR_WHOAMI_BOARD(whoami) == BCSR_WHOAMI_PB1550_SDR) ||
|
||||
(BCSR_WHOAMI_BOARD(whoami) == BCSR_WHOAMI_PB1550_DDR))
|
||||
switch (BCSR_WHOAMI_BOARD(whoami)) {
|
||||
case BCSR_WHOAMI_PB1550_SDR:
|
||||
case BCSR_WHOAMI_PB1550_DDR:
|
||||
bcsr_init(PB1550_BCSR_PHYS_ADDR,
|
||||
PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS);
|
||||
case BCSR_WHOAMI_DB1550:
|
||||
break;
|
||||
default:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pr_info("Alchemy/AMD %s Board, CPLD Rev %d Board-ID %d " \
|
||||
"Daughtercard ID %d\n", get_system_type(),
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
/*
|
||||
* DB1200/PB1200 / DB1550 / DB1300 board support.
|
||||
*
|
||||
* These 4 boards can reliably be supported in a single kernel image.
|
||||
* Alchemy DB/PB1xxx board support.
|
||||
*/
|
||||
|
||||
#include <asm/mach-au1x00/au1000.h>
|
||||
#include <asm/mach-db1x00/bcsr.h>
|
||||
|
||||
int __init db1000_board_setup(void);
|
||||
int __init db1000_dev_setup(void);
|
||||
int __init db1500_pci_setup(void);
|
||||
int __init db1200_board_setup(void);
|
||||
int __init db1200_dev_setup(void);
|
||||
int __init db1300_board_setup(void);
|
||||
@@ -18,6 +19,17 @@ int __init db1550_pci_setup(int);
|
||||
static const char *board_type_str(void)
|
||||
{
|
||||
switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
|
||||
case BCSR_WHOAMI_DB1000:
|
||||
return "DB1000";
|
||||
case BCSR_WHOAMI_DB1500:
|
||||
return "DB1500";
|
||||
case BCSR_WHOAMI_DB1100:
|
||||
return "DB1100";
|
||||
case BCSR_WHOAMI_PB1500:
|
||||
case BCSR_WHOAMI_PB1500R2:
|
||||
return "PB1500";
|
||||
case BCSR_WHOAMI_PB1100:
|
||||
return "PB1100";
|
||||
case BCSR_WHOAMI_PB1200_DDR1:
|
||||
case BCSR_WHOAMI_PB1200_DDR2:
|
||||
return "PB1200";
|
||||
@@ -45,6 +57,11 @@ void __init board_setup(void)
|
||||
int ret;
|
||||
|
||||
switch (alchemy_get_cputype()) {
|
||||
case ALCHEMY_CPU_AU1000:
|
||||
case ALCHEMY_CPU_AU1500:
|
||||
case ALCHEMY_CPU_AU1100:
|
||||
ret = db1000_board_setup();
|
||||
break;
|
||||
case ALCHEMY_CPU_AU1550:
|
||||
ret = db1550_board_setup();
|
||||
break;
|
||||
@@ -62,7 +79,7 @@ void __init board_setup(void)
|
||||
panic("cannot initialize board support");
|
||||
}
|
||||
|
||||
int __init db1235_arch_init(void)
|
||||
static int __init db1xxx_arch_init(void)
|
||||
{
|
||||
int id = BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI));
|
||||
if (id == BCSR_WHOAMI_DB1550)
|
||||
@@ -70,14 +87,24 @@ int __init db1235_arch_init(void)
|
||||
else if ((id == BCSR_WHOAMI_PB1550_SDR) ||
|
||||
(id == BCSR_WHOAMI_PB1550_DDR))
|
||||
return db1550_pci_setup(1);
|
||||
else if ((id == BCSR_WHOAMI_DB1500) || (id == BCSR_WHOAMI_PB1500) ||
|
||||
(id == BCSR_WHOAMI_PB1500R2))
|
||||
return db1500_pci_setup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(db1235_arch_init);
|
||||
arch_initcall(db1xxx_arch_init);
|
||||
|
||||
int __init db1235_dev_init(void)
|
||||
static int __init db1xxx_dev_init(void)
|
||||
{
|
||||
switch (BCSR_WHOAMI_BOARD(bcsr_read(BCSR_WHOAMI))) {
|
||||
case BCSR_WHOAMI_DB1000:
|
||||
case BCSR_WHOAMI_DB1500:
|
||||
case BCSR_WHOAMI_DB1100:
|
||||
case BCSR_WHOAMI_PB1500:
|
||||
case BCSR_WHOAMI_PB1500R2:
|
||||
case BCSR_WHOAMI_PB1100:
|
||||
return db1000_dev_setup();
|
||||
case BCSR_WHOAMI_PB1200_DDR1:
|
||||
case BCSR_WHOAMI_PB1200_DDR2:
|
||||
case BCSR_WHOAMI_DB1200:
|
||||
@@ -91,4 +118,4 @@ int __init db1235_dev_init(void)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
device_initcall(db1235_dev_init);
|
||||
device_initcall(db1xxx_dev_init);
|
||||
@@ -18,6 +18,7 @@
|
||||
* Setting up the clock on the MIPS boards.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
#
|
||||
|
||||
obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
|
||||
obj-y += board.o buttons.o leds.o
|
||||
obj-y += board.o buttons.o leds.o workarounds.o
|
||||
|
||||
@@ -9,4 +9,7 @@ int __init bcm47xx_buttons_register(void);
|
||||
/* leds.c */
|
||||
void __init bcm47xx_leds_register(void);
|
||||
|
||||
/* workarounds.c */
|
||||
void __init bcm47xx_workarounds(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -72,7 +72,11 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initcons
|
||||
{{BCM47XX_BOARD_ASUS_WL500W, "Asus WL500W"}, "WL500gW-"},
|
||||
{{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-"},
|
||||
{{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-"},
|
||||
{{BCM47XX_BOARD_BELKIN_F7D3301, "Belkin F7D3301"}, "F7D3301"},
|
||||
{{BCM47XX_BOARD_BELKIN_F7D3302, "Belkin F7D3302"}, "F7D3302"},
|
||||
{{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"},
|
||||
{{BCM47XX_BOARD_BELKIN_F7D4302, "Belkin F7D4302"}, "F7D4302"},
|
||||
{{BCM47XX_BOARD_BELKIN_F7D4401, "Belkin F7D4401"}, "F7D4401"},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
@@ -176,7 +180,16 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
|
||||
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
|
||||
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54GSV1, "Linksys WRT54GS V1"}, "0x0101", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* boardtype, boardrev */
|
||||
static const
|
||||
struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst = {
|
||||
{{BCM47XX_BOARD_SIEMENS_SE505V2, "Siemens SE505 V2"}, "0x0101", "0x10"},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
@@ -273,6 +286,16 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
|
||||
return &e3->board;
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm47xx_nvram_getenv("boardtype", buf1, sizeof(buf1)) >= 0 &&
|
||||
bcm47xx_nvram_getenv("boardrev", buf2, sizeof(buf2)) >= 0 &&
|
||||
bcm47xx_nvram_getenv("boardnum", buf3, sizeof(buf3)) == -ENOENT) {
|
||||
for (e2 = bcm47xx_board_list_board_type_rev; e2->value1; e2++) {
|
||||
if (!strcmp(buf1, e2->value1) &&
|
||||
!strcmp(buf2, e2->value2))
|
||||
return &e2->board;
|
||||
}
|
||||
}
|
||||
return bcm47xx_board_unknown;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,6 +258,18 @@ bcm47xx_buttons_linksys_wrt310nv1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(8, KEY_UNKNOWN),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54gsv1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt610nv1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -270,6 +282,12 @@ bcm47xx_buttons_linksys_wrt610nv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
|
||||
/* Motorola */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
@@ -402,7 +420,11 @@ int __init bcm47xx_buttons_register(void)
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_wlhdd);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_BELKIN_F7D3301:
|
||||
case BCM47XX_BOARD_BELKIN_F7D3302:
|
||||
case BCM47XX_BOARD_BELKIN_F7D4301:
|
||||
case BCM47XX_BOARD_BELKIN_F7D4302:
|
||||
case BCM47XX_BOARD_BELKIN_F7D4401:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_belkin_f7d4301);
|
||||
break;
|
||||
|
||||
@@ -479,12 +501,21 @@ int __init bcm47xx_buttons_register(void)
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54gsv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT610NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT610NV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt610nv2);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_MOTOROLA_WE800G:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_motorola_we800g);
|
||||
|
||||
@@ -291,6 +291,21 @@ bcm47xx_leds_linksys_wrt310nv1[] __initconst = {
|
||||
BCM47XX_GPIO_LED(9, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54gsv1[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(5, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(2, "green", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(3, "blue", "3g", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt610nv1[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "usb", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -308,6 +323,15 @@ bcm47xx_leds_linksys_wrt610nv2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(7, "unk", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(2, "white", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(3, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(7, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
/* Motorola */
|
||||
|
||||
static const struct gpio_led
|
||||
@@ -359,6 +383,14 @@ bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(7, "unk", "connected", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
|
||||
/* Siemens */
|
||||
static const struct gpio_led
|
||||
bcm47xx_leds_siemens_se505v2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(3, "unk", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(5, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
};
|
||||
|
||||
/* SimpleTech */
|
||||
|
||||
static const struct gpio_led
|
||||
@@ -425,7 +457,11 @@ void __init bcm47xx_leds_register(void)
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_wlhdd);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_BELKIN_F7D3301:
|
||||
case BCM47XX_BOARD_BELKIN_F7D3302:
|
||||
case BCM47XX_BOARD_BELKIN_F7D4301:
|
||||
case BCM47XX_BOARD_BELKIN_F7D4302:
|
||||
case BCM47XX_BOARD_BELKIN_F7D4401:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_belkin_f7d4301);
|
||||
break;
|
||||
|
||||
@@ -502,12 +538,21 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54gsv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT610NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv1);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT610NV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt610nv2);
|
||||
break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRTSL54GS:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_MOTOROLA_WE800G:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_motorola_we800g);
|
||||
@@ -529,6 +574,10 @@ void __init bcm47xx_leds_register(void)
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_SIEMENS_SE505V2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_siemens_se505v2);
|
||||
break;
|
||||
|
||||
case BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_simpletech_simpleshare);
|
||||
break;
|
||||
|
||||
@@ -212,7 +212,7 @@ void __init plat_mem_setup(void)
|
||||
{
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
if (c->cputype == CPU_74K) {
|
||||
if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K)) {
|
||||
printk(KERN_INFO "bcm47xx: using bcma bus\n");
|
||||
#ifdef CONFIG_BCM47XX_BCMA
|
||||
bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
|
||||
@@ -282,6 +282,7 @@ static int __init bcm47xx_register_bus_complete(void)
|
||||
}
|
||||
bcm47xx_buttons_register();
|
||||
bcm47xx_leds_register();
|
||||
bcm47xx_workarounds();
|
||||
|
||||
fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
|
||||
return 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user