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 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"The most notable new addition inside this pull request is the support
for MIPS's latest and greatest core called "inter/proAptiv". The
patch series describes this core as follows.
"The interAptiv is a power-efficient multi-core microprocessor
for use in system-on-chip (SoC) applications. The interAptiv combines
a multi-threading pipeline with a coherence manager to deliver improved
computational throughput and power efficiency. The interAptiv can
contain one to four MIPS32R3 interAptiv cores, system level
coherence manager with L2 cache, optional coherent I/O port,
and optional floating point unit."
The platform specific patches touch all 3 Broadcom families. It adds
support for the new Broadcom/Netlogix XLP9xx Soc, building a common
BCM63XX SMP kernel for all BCM63XX SoCs regardless of core type/count
and full gpio button/led descriptions for BCM47xx.
The rest of the series are cleanups and bug fixes that are MIPS
generic and consist largely of changes that Imgtec/MIPS had published
in their linux-mti-3.10.git stable tree. Random other cleanups and
patches preparing code to be merged in 3.15"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (139 commits)
mips: select ARCH_MIGHT_HAVE_PC_SERIO
mips: delete non-required instances of include <linux/init.h>
MIPS: KVM: remove shadow_tlb code
MIPS: KVM: use common EHINV aware UNIQUE_ENTRYHI
mips/ide: flush dcache also if icache does not snoop dcache
MIPS: BCM47XX: fix position of cpu_wait disabling
MIPS: BCM63XX: select correct MIPS_L1_CACHE_SHIFT value
MIPS: update MIPS_L1_CACHE_SHIFT based on MIPS_L1_CACHE_SHIFT_<N>
MIPS: introduce MIPS_L1_CACHE_SHIFT_<N>
MIPS: ZBOOT: gather string functions into string.c
arch/mips/pci: don't check resource with devm_ioremap_resource
arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
bcma: gpio: don't cast u32 to unsigned long
ssb: gpio: add own IRQ domain
MIPS: BCM47XX: fix sparse warnings in board.c
MIPS: BCM47XX: add board detection for Linksys WRT54GS V1
MIPS: BCM47XX: fix detection for some boards
MIPS: BCM47XX: Enable buttons support on SSB
MIPS: BCM47XX: Convert WNDR4500 to new syntax
MIPS: BCM47XX: Use "timer" trigger for status LEDs
...
This commit is contained in:
+133
-88
@@ -116,7 +116,6 @@ config BCM47XX
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
select FW_CFE
|
||||
select HW_HAS_PCI
|
||||
select IRQ_CPU
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
@@ -124,6 +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
|
||||
help
|
||||
Support for BCM47XX based boards
|
||||
|
||||
@@ -134,14 +134,13 @@ config BCM63XX
|
||||
select CSRC_R4K
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_BMIPS4350 if !BCM63XX_CPU_6338 && !BCM63XX_CPU_6345 && !BCM63XX_CPU_6348
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select SWAP_IO_SPACE
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select HAVE_CLK
|
||||
select MIPS_L1_CACHE_SHIFT_4
|
||||
help
|
||||
Support for BCM63XX based boards
|
||||
|
||||
@@ -186,6 +185,7 @@ config MACH_DECSTATION
|
||||
select SYS_SUPPORTS_128HZ
|
||||
select SYS_SUPPORTS_256HZ
|
||||
select SYS_SUPPORTS_1024HZ
|
||||
select MIPS_L1_CACHE_SHIFT_4
|
||||
help
|
||||
This enables support for DEC's MIPS based workstations. For details
|
||||
see the Linux/MIPS FAQ on <http://www.linux-mips.org/> and the
|
||||
@@ -305,7 +305,7 @@ config MIPS_MALTA
|
||||
select CEVT_R4K
|
||||
select CSRC_R4K
|
||||
select CSRC_GIC
|
||||
select DMA_NONCOHERENT
|
||||
select DMA_MAYBE_COHERENT
|
||||
select GENERIC_ISA_DMA
|
||||
select HAVE_PCSPKR_PLATFORM
|
||||
select IRQ_CPU
|
||||
@@ -324,7 +324,6 @@ config MIPS_MALTA
|
||||
select SYS_HAS_CPU_MIPS64_R2
|
||||
select SYS_HAS_CPU_NEVADA
|
||||
select SYS_HAS_CPU_RM7000
|
||||
select SYS_HAS_EARLY_PRINTK
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
@@ -349,6 +348,7 @@ config MIPS_SEAD3
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select IRQ_GIC
|
||||
select LIBFDT
|
||||
select MIPS_MSC
|
||||
select SYS_HAS_CPU_MIPS32_R1
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
@@ -471,6 +471,7 @@ config SGI_IP22
|
||||
select SYS_SUPPORTS_32BIT_KERNEL
|
||||
select SYS_SUPPORTS_64BIT_KERNEL
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select MIPS_L1_CACHE_SHIFT_7
|
||||
help
|
||||
This are the SGI Indy, Challenge S and Indigo2, as well as certain
|
||||
OEM variants like the Tandem CMN B006S. To compile a Linux kernel
|
||||
@@ -491,6 +492,7 @@ config SGI_IP27
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_NUMA
|
||||
select SYS_SUPPORTS_SMP
|
||||
select MIPS_L1_CACHE_SHIFT_7
|
||||
help
|
||||
This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
|
||||
workstations. To compile a Linux kernel that runs on these, say Y
|
||||
@@ -697,6 +699,7 @@ config MIKROTIK_RB532
|
||||
select SWAP_IO_SPACE
|
||||
select BOOT_RAW
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select MIPS_L1_CACHE_SHIFT_4
|
||||
help
|
||||
Support the Mikrotik(tm) RouterBoard 532 series,
|
||||
based on the IDT RC32434 SoC.
|
||||
@@ -779,6 +782,7 @@ 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
|
||||
@@ -897,6 +901,10 @@ config FW_CFE
|
||||
config ARCH_DMA_ADDR_T_64BIT
|
||||
def_bool (HIGHMEM && 64BIT_PHYS_ADDR) || 64BIT
|
||||
|
||||
config DMA_MAYBE_COHERENT
|
||||
select DMA_NONCOHERENT
|
||||
bool
|
||||
|
||||
config DMA_COHERENT
|
||||
bool
|
||||
|
||||
@@ -1091,11 +1099,24 @@ config FW_SNIPROM
|
||||
config BOOT_ELF32
|
||||
bool
|
||||
|
||||
config MIPS_L1_CACHE_SHIFT_4
|
||||
bool
|
||||
|
||||
config MIPS_L1_CACHE_SHIFT_5
|
||||
bool
|
||||
|
||||
config MIPS_L1_CACHE_SHIFT_6
|
||||
bool
|
||||
|
||||
config MIPS_L1_CACHE_SHIFT_7
|
||||
bool
|
||||
|
||||
config MIPS_L1_CACHE_SHIFT
|
||||
int
|
||||
default "4" if MACH_DECSTATION || MIKROTIK_RB532 || PMC_MSP4200_EVAL || SOC_RT288X
|
||||
default "6" if MIPS_CPU_SCACHE
|
||||
default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM || CPU_CAVIUM_OCTEON
|
||||
default "4" if MIPS_L1_CACHE_SHIFT_4
|
||||
default "5" if MIPS_L1_CACHE_SHIFT_5
|
||||
default "6" if MIPS_L1_CACHE_SHIFT_6
|
||||
default "7" if MIPS_L1_CACHE_SHIFT_7
|
||||
default "5"
|
||||
|
||||
config HAVE_STD_PC_SERIAL_PORT
|
||||
@@ -1375,47 +1396,31 @@ 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
|
||||
many ethernet hardware widgets for networking tasks. The processor
|
||||
can have up to 16 Mips64v2 cores and 8 integrated gigabit ethernets.
|
||||
Full details can be found at http://www.caviumnetworks.com.
|
||||
|
||||
config CPU_BMIPS3300
|
||||
bool "BMIPS3300"
|
||||
depends on SYS_HAS_CPU_BMIPS3300
|
||||
select CPU_BMIPS
|
||||
help
|
||||
Broadcom BMIPS3300 processors.
|
||||
|
||||
config CPU_BMIPS4350
|
||||
bool "BMIPS4350"
|
||||
depends on SYS_HAS_CPU_BMIPS4350
|
||||
select CPU_BMIPS
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
help
|
||||
Broadcom BMIPS4350 ("VIPER") processors.
|
||||
|
||||
config CPU_BMIPS4380
|
||||
bool "BMIPS4380"
|
||||
depends on SYS_HAS_CPU_BMIPS4380
|
||||
select CPU_BMIPS
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
help
|
||||
Broadcom BMIPS4380 processors.
|
||||
|
||||
config CPU_BMIPS5000
|
||||
bool "BMIPS5000"
|
||||
depends on SYS_HAS_CPU_BMIPS5000
|
||||
select CPU_BMIPS
|
||||
config CPU_BMIPS
|
||||
bool "Broadcom BMIPS"
|
||||
depends on SYS_HAS_CPU_BMIPS
|
||||
select CPU_MIPS32
|
||||
select CPU_BMIPS32_3300 if SYS_HAS_CPU_BMIPS32_3300
|
||||
select CPU_BMIPS4350 if SYS_HAS_CPU_BMIPS4350
|
||||
select CPU_BMIPS4380 if SYS_HAS_CPU_BMIPS4380
|
||||
select CPU_BMIPS5000 if SYS_HAS_CPU_BMIPS5000
|
||||
select CPU_SUPPORTS_32BIT_KERNEL
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select SWAP_IO_SPACE
|
||||
select WEAK_ORDERING
|
||||
select CPU_SUPPORTS_HIGHMEM
|
||||
select MIPS_CPU_SCACHE
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
select CPU_HAS_PREFETCH
|
||||
help
|
||||
Broadcom BMIPS5000 processors.
|
||||
Support for BMIPS32/3300/4350/4380 and BMIPS5000 processors.
|
||||
|
||||
config CPU_XLR
|
||||
bool "Netlogic XLR SoC"
|
||||
@@ -1498,14 +1503,25 @@ config CPU_LOONGSON1
|
||||
select CPU_SUPPORTS_32BIT_KERNEL
|
||||
select CPU_SUPPORTS_HIGHMEM
|
||||
|
||||
config CPU_BMIPS
|
||||
config CPU_BMIPS32_3300
|
||||
select SMP_UP if SMP
|
||||
bool
|
||||
select CPU_MIPS32
|
||||
select CPU_SUPPORTS_32BIT_KERNEL
|
||||
select DMA_NONCOHERENT
|
||||
select IRQ_CPU
|
||||
select SWAP_IO_SPACE
|
||||
select WEAK_ORDERING
|
||||
|
||||
config CPU_BMIPS4350
|
||||
bool
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
|
||||
config CPU_BMIPS4380
|
||||
bool
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
|
||||
config CPU_BMIPS5000
|
||||
bool
|
||||
select MIPS_CPU_SCACHE
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
|
||||
config SYS_HAS_CPU_LOONGSON2E
|
||||
bool
|
||||
@@ -1579,17 +1595,24 @@ config SYS_HAS_CPU_SB1
|
||||
config SYS_HAS_CPU_CAVIUM_OCTEON
|
||||
bool
|
||||
|
||||
config SYS_HAS_CPU_BMIPS3300
|
||||
config SYS_HAS_CPU_BMIPS
|
||||
bool
|
||||
|
||||
config SYS_HAS_CPU_BMIPS32_3300
|
||||
bool
|
||||
select SYS_HAS_CPU_BMIPS
|
||||
|
||||
config SYS_HAS_CPU_BMIPS4350
|
||||
bool
|
||||
select SYS_HAS_CPU_BMIPS
|
||||
|
||||
config SYS_HAS_CPU_BMIPS4380
|
||||
bool
|
||||
select SYS_HAS_CPU_BMIPS
|
||||
|
||||
config SYS_HAS_CPU_BMIPS5000
|
||||
bool
|
||||
select SYS_HAS_CPU_BMIPS
|
||||
|
||||
config SYS_HAS_CPU_XLR
|
||||
bool
|
||||
@@ -1797,6 +1820,7 @@ config IP22_CPU_SCACHE
|
||||
config MIPS_CPU_SCACHE
|
||||
bool
|
||||
select BOARD_SCACHE
|
||||
select MIPS_L1_CACHE_SHIFT_6
|
||||
|
||||
config R5000_CPU_SCACHE
|
||||
bool
|
||||
@@ -1833,59 +1857,48 @@ choice
|
||||
prompt "MIPS MT options"
|
||||
|
||||
config MIPS_MT_DISABLED
|
||||
bool "Disable multithreading support."
|
||||
bool "Disable multithreading support"
|
||||
help
|
||||
Use this option if your workload can't take advantage of
|
||||
MIPS hardware multithreading support. On systems that don't have
|
||||
the option of an MT-enabled processor this option will be the only
|
||||
option in this menu.
|
||||
Use this option if your platform does not support the MT ASE
|
||||
which is hardware multithreading support. On systems without
|
||||
an MT-enabled processor, this will be the only option that is
|
||||
available in this menu.
|
||||
|
||||
config MIPS_MT_SMP
|
||||
bool "Use 1 TC on each available VPE for SMP"
|
||||
depends on SYS_SUPPORTS_MULTITHREADING
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select CPU_MIPSR2_IRQ_EI
|
||||
select SYNC_R4K
|
||||
select MIPS_MT
|
||||
select SMP
|
||||
select SYS_SUPPORTS_SCHED_SMT if SMP
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SMP_UP
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_SCHED_SMT
|
||||
select MIPS_PERF_SHARED_TC_COUNTERS
|
||||
help
|
||||
This is a kernel model which is known a VSMP but lately has been
|
||||
marketesed into SMVP.
|
||||
Virtual SMP uses the processor's VPEs to implement virtual
|
||||
processors. In currently available configuration of the 34K processor
|
||||
this allows for a dual processor. Both processors will share the same
|
||||
primary caches; each will obtain the half of the TLB for it's own
|
||||
exclusive use. For a layman this model can be described as similar to
|
||||
what Intel calls Hyperthreading.
|
||||
|
||||
For further information see http://www.linux-mips.org/wiki/34K#VSMP
|
||||
This is a kernel model which is known as SMVP. This is supported
|
||||
on cores with the MT ASE and uses the available VPEs to implement
|
||||
virtual processors which supports SMP. This is equivalent to the
|
||||
Intel Hyperthreading feature. For further information go to
|
||||
<http://www.imgtec.com/mips/mips-multithreading.asp>.
|
||||
|
||||
config MIPS_MT_SMTC
|
||||
bool "SMTC: Use all TCs on all VPEs for SMP"
|
||||
bool "Use all TCs on all VPEs for SMP (DEPRECATED)"
|
||||
depends on CPU_MIPS32_R2
|
||||
#depends on CPU_MIPS64_R2 # once there is hardware ...
|
||||
depends on SYS_SUPPORTS_MULTITHREADING
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select CPU_MIPSR2_IRQ_EI
|
||||
select MIPS_MT
|
||||
select NR_CPUS_DEFAULT_8
|
||||
select SMP
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SMP_UP
|
||||
select SYS_SUPPORTS_SMP
|
||||
select NR_CPUS_DEFAULT_8
|
||||
help
|
||||
This is a kernel model which is known a SMTC or lately has been
|
||||
marketesed into SMVP.
|
||||
is presenting the available TC's of the core as processors to Linux.
|
||||
On currently available 34K processors this means a Linux system will
|
||||
see up to 5 processors. The implementation of the SMTC kernel differs
|
||||
significantly from VSMP and cannot efficiently coexist in the same
|
||||
kernel binary so the choice between VSMP and SMTC is a compile time
|
||||
decision.
|
||||
|
||||
For further information see http://www.linux-mips.org/wiki/34K#SMTC
|
||||
This is a kernel model which is known as SMTC. This is
|
||||
supported on cores with the MT ASE and presents all TCs
|
||||
available on all VPEs to support SMP. For further
|
||||
information see <http://www.linux-mips.org/wiki/34K#SMTC>.
|
||||
|
||||
endchoice
|
||||
|
||||
@@ -1922,6 +1935,16 @@ config MIPS_VPE_LOADER
|
||||
Includes a loader for loading an elf relocatable object
|
||||
onto another VPE and running it.
|
||||
|
||||
config MIPS_VPE_LOADER_CMP
|
||||
bool
|
||||
default "y"
|
||||
depends on MIPS_VPE_LOADER && MIPS_CMP
|
||||
|
||||
config MIPS_VPE_LOADER_MT
|
||||
bool
|
||||
default "y"
|
||||
depends on MIPS_VPE_LOADER && !MIPS_CMP
|
||||
|
||||
config MIPS_MT_SMTC_IM_BACKSTOP
|
||||
bool "Use per-TC register bits as backstop for inhibited IM bits"
|
||||
depends on MIPS_MT_SMTC
|
||||
@@ -1955,24 +1978,29 @@ config MIPS_VPE_LOADER_TOM
|
||||
you to ensure the amount you put in the option and the space your
|
||||
program requires is less or equal to the amount physically present.
|
||||
|
||||
# this should possibly be in drivers/char, but it is rather cpu related. Hmmm
|
||||
config MIPS_VPE_APSP_API
|
||||
bool "Enable support for AP/SP API (RTLX)"
|
||||
depends on MIPS_VPE_LOADER
|
||||
help
|
||||
|
||||
config MIPS_VPE_APSP_API_CMP
|
||||
bool
|
||||
default "y"
|
||||
depends on MIPS_VPE_APSP_API && MIPS_CMP
|
||||
|
||||
config MIPS_VPE_APSP_API_MT
|
||||
bool
|
||||
default "y"
|
||||
depends on MIPS_VPE_APSP_API && !MIPS_CMP
|
||||
|
||||
config MIPS_CMP
|
||||
bool "MIPS CMP framework support"
|
||||
depends on SYS_SUPPORTS_MIPS_CMP
|
||||
select SMP
|
||||
bool "MIPS CMP support"
|
||||
depends on SYS_SUPPORTS_MIPS_CMP && MIPS_MT_SMP
|
||||
select SYNC_R4K
|
||||
select SYS_SUPPORTS_SMP
|
||||
select SYS_SUPPORTS_SCHED_SMT if SMP
|
||||
select WEAK_ORDERING
|
||||
default n
|
||||
help
|
||||
This is a placeholder option for the GCMP work. It will need to
|
||||
be handled differently...
|
||||
Enable Coherency Manager processor (CMP) support.
|
||||
|
||||
config SB1_PASS_1_WORKAROUNDS
|
||||
bool
|
||||
@@ -2324,6 +2352,23 @@ config SECCOMP
|
||||
|
||||
If unsure, say Y. Only embedded should say N here.
|
||||
|
||||
config MIPS_O32_FP64_SUPPORT
|
||||
bool "Support for O32 binaries using 64-bit FP"
|
||||
depends on 32BIT || MIPS32_O32
|
||||
default y
|
||||
help
|
||||
When this is enabled, the kernel will support use of 64-bit floating
|
||||
point registers with binaries using the O32 ABI along with the
|
||||
EF_MIPS_FP64 ELF header flag (typically built with -mfp64). On
|
||||
32-bit MIPS systems this support is at the cost of increasing the
|
||||
size and complexity of the compiled FPU emulator. Thus if you are
|
||||
running a MIPS32 system and know that none of your userland binaries
|
||||
will require 64-bit floating point, you may wish to reduce the size
|
||||
of your kernel & potentially improve FP emulation performance by
|
||||
saying N here.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config USE_OF
|
||||
bool
|
||||
select OF
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*e
|
||||
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
|
||||
|
||||
cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,-msmartmips)
|
||||
cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips -mno-jals)
|
||||
cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips)
|
||||
|
||||
cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
|
||||
-fno-omit-frame-pointer
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* Setting up the clock on the MIPS boards.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define __ATH79_COMMON_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#define ATH79_MEM_SIZE_MIN (2 * 1024 * 1024)
|
||||
#define ATH79_MEM_SIZE_MAX (128 * 1024 * 1024)
|
||||
|
||||
@@ -2,6 +2,7 @@ if BCM47XX
|
||||
|
||||
config BCM47XX_SSB
|
||||
bool "SSB Support for Broadcom BCM47XX"
|
||||
select SYS_HAS_CPU_BMIPS32_3300
|
||||
select SSB
|
||||
select SSB_DRIVER_MIPS
|
||||
select SSB_DRIVER_EXTIF
|
||||
@@ -11,6 +12,7 @@ config BCM47XX_SSB
|
||||
select SSB_PCICORE_HOSTMODE if PCI
|
||||
select SSB_DRIVER_GPIO
|
||||
select GPIOLIB
|
||||
select LEDS_GPIO_REGISTER
|
||||
default y
|
||||
help
|
||||
Add support for old Broadcom BCM47xx boards with Sonics Silicon Backplane support.
|
||||
@@ -20,6 +22,7 @@ config BCM47XX_SSB
|
||||
config BCM47XX_BCMA
|
||||
bool "BCMA Support for Broadcom BCM47XX"
|
||||
select SYS_HAS_CPU_MIPS32_R2
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select BCMA
|
||||
select BCMA_HOST_SOC
|
||||
select BCMA_DRIVER_MIPS
|
||||
@@ -27,6 +30,7 @@ config BCM47XX_BCMA
|
||||
select BCMA_DRIVER_PCI_HOSTMODE if PCI
|
||||
select BCMA_DRIVER_GPIO
|
||||
select GPIOLIB
|
||||
select LEDS_GPIO_REGISTER
|
||||
default y
|
||||
help
|
||||
Add support for new Broadcom BCM47xx boards with Broadcom specific Advanced Microcontroller Bus.
|
||||
|
||||
@@ -4,5 +4,4 @@
|
||||
#
|
||||
|
||||
obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o
|
||||
obj-y += board.o
|
||||
obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o
|
||||
obj-y += board.o buttons.o leds.o
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef LINUX_BCM47XX_PRIVATE_H_
|
||||
#define LINUX_BCM47XX_PRIVATE_H_
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
||||
/* buttons.c */
|
||||
int __init bcm47xx_buttons_register(void);
|
||||
|
||||
/* leds.c */
|
||||
void __init bcm47xx_leds_register(void);
|
||||
|
||||
#endif
|
||||
+18
-16
@@ -36,26 +36,32 @@ static const
|
||||
struct bcm47xx_board_type_list1 bcm47xx_board_list_model_name[] __initconst = {
|
||||
{{BCM47XX_BOARD_DLINK_DIR130, "D-Link DIR-130"}, "DIR-130"},
|
||||
{{BCM47XX_BOARD_DLINK_DIR330, "D-Link DIR-330"}, "DIR-330"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* model_no */
|
||||
static const
|
||||
struct bcm47xx_board_type_list1 bcm47xx_board_list_model_no[] __initconst = {
|
||||
{{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "WL700"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* machine_name */
|
||||
static const
|
||||
struct bcm47xx_board_type_list1 bcm47xx_board_list_machine_name[] __initconst = {
|
||||
{{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "WRTSL54GS"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* hardware_version */
|
||||
static const
|
||||
struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initconst = {
|
||||
{{BCM47XX_BOARD_ASUS_RTN10U, "Asus RT-N10U"}, "RTN10U"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12, "Asus RT-N12"}, "RT-N12"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12B1, "Asus RT-N12B1"}, "RTN12B1"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12C1, "Asus RT-N12C1"}, "RTN12C1"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12D1, "Asus RT-N12D1"}, "RTN12D1"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12HP, "Asus RT-N12HP"}, "RTN12HP"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN16, "Asus RT-N16"}, "RT-N16-"},
|
||||
{{BCM47XX_BOARD_ASUS_WL320GE, "Asus WL320GE"}, "WL320G-"},
|
||||
{{BCM47XX_BOARD_ASUS_WL330GE, "Asus WL330GE"}, "WL330GE-"},
|
||||
@@ -66,7 +72,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initcons
|
||||
{{BCM47XX_BOARD_ASUS_WL520GC, "Asus WL520GC"}, "WL520GC-"},
|
||||
{{BCM47XX_BOARD_ASUS_WL520GU, "Asus WL520GU"}, "WL520GU-"},
|
||||
{{BCM47XX_BOARD_BELKIN_F7D4301, "Belkin F7D4301"}, "F7D4301"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* productid */
|
||||
@@ -75,19 +81,13 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_productid[] __initconst = {
|
||||
{{BCM47XX_BOARD_ASUS_RTAC66U, "Asus RT-AC66U"}, "RT-AC66U"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN10, "Asus RT-N10"}, "RT-N10"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN10D, "Asus RT-N10D"}, "RT-N10D"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN10U, "Asus RT-N10U"}, "RT-N10U"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12, "Asus RT-N12"}, "RT-N12"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12B1, "Asus RT-N12B1"}, "RT-N12B1"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12C1, "Asus RT-N12C1"}, "RT-N12C1"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12D1, "Asus RT-N12D1"}, "RT-N12D1"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN12HP, "Asus RT-N12HP"}, "RT-N12HP"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN15U, "Asus RT-N15U"}, "RT-N15U"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN16, "Asus RT-N16"}, "RT-N16"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN53, "Asus RT-N53"}, "RT-N53"},
|
||||
{{BCM47XX_BOARD_ASUS_RTN66U, "Asus RT-N66U"}, "RT-N66U"},
|
||||
{{BCM47XX_BOARD_ASUS_WL300G, "Asus WL300G"}, "WL300g"},
|
||||
{{BCM47XX_BOARD_ASUS_WLHDD, "Asus WLHDD"}, "WLHDD"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* ModelId */
|
||||
@@ -97,7 +97,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_ModelId[] __initconst = {
|
||||
{{BCM47XX_BOARD_MOTOROLA_WE800G, "Motorola WE800G"}, "WE800G"},
|
||||
{{BCM47XX_BOARD_MOTOROLA_WR850GP, "Motorola WR850GP"}, "WR850GP"},
|
||||
{{BCM47XX_BOARD_MOTOROLA_WR850GV2V3, "Motorola WR850G"}, "WR850G"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* melco_id or buf1falo_id */
|
||||
@@ -112,7 +112,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_melco_id[] __initconst = {
|
||||
{{BCM47XX_BOARD_BUFFALO_WZR_G300N, "Buffalo WZR-G300N"}, "31120"},
|
||||
{{BCM47XX_BOARD_BUFFALO_WZR_RS_G54, "Buffalo WZR-RS-G54"}, "30083"},
|
||||
{{BCM47XX_BOARD_BUFFALO_WZR_RS_G54HP, "Buffalo WZR-RS-G54HP"}, "30103"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* boot_hw_model, boot_hw_ver */
|
||||
@@ -143,7 +143,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* board_id */
|
||||
@@ -165,7 +165,7 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR834BV2, "Netgear WNR834B V2"}, "U12H081T00_NETGEAR"},
|
||||
{ {0}, 0},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
/* boardtype, boardnum, boardrev */
|
||||
@@ -174,7 +174,9 @@ struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
|
||||
{{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},
|
||||
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
|
||||
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
|
||||
{ {0}, 0},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54GSV1, "Linksys WRT54GS V1"}, "0x0101", "42", "0x10"},
|
||||
{ {0}, NULL},
|
||||
};
|
||||
|
||||
static const
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+24
-1
@@ -25,10 +25,11 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/irq_cpu.h>
|
||||
#include <bcm47xx.h>
|
||||
|
||||
void plat_irq_dispatch(void)
|
||||
asmlinkage void plat_irq_dispatch(void)
|
||||
{
|
||||
u32 cause;
|
||||
|
||||
@@ -50,6 +51,18 @@ void plat_irq_dispatch(void)
|
||||
do_IRQ(6);
|
||||
}
|
||||
|
||||
#define DEFINE_HWx_IRQDISPATCH(x) \
|
||||
static void bcm47xx_hw ## x ## _irqdispatch(void) \
|
||||
{ \
|
||||
do_IRQ(x); \
|
||||
}
|
||||
DEFINE_HWx_IRQDISPATCH(2)
|
||||
DEFINE_HWx_IRQDISPATCH(3)
|
||||
DEFINE_HWx_IRQDISPATCH(4)
|
||||
DEFINE_HWx_IRQDISPATCH(5)
|
||||
DEFINE_HWx_IRQDISPATCH(6)
|
||||
DEFINE_HWx_IRQDISPATCH(7)
|
||||
|
||||
void __init arch_init_irq(void)
|
||||
{
|
||||
#ifdef CONFIG_BCM47XX_BCMA
|
||||
@@ -64,4 +77,14 @@ void __init arch_init_irq(void)
|
||||
}
|
||||
#endif
|
||||
mips_cpu_irq_init();
|
||||
|
||||
if (cpu_has_vint) {
|
||||
pr_info("Setting up vectored interrupts\n");
|
||||
set_vi_handler(2, bcm47xx_hw2_irqdispatch);
|
||||
set_vi_handler(3, bcm47xx_hw3_irqdispatch);
|
||||
set_vi_handler(4, bcm47xx_hw4_irqdispatch);
|
||||
set_vi_handler(5, bcm47xx_hw5_irqdispatch);
|
||||
set_vi_handler(6, bcm47xx_hw6_irqdispatch);
|
||||
set_vi_handler(7, bcm47xx_hw7_irqdispatch);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,6 @@
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/ssb/ssb.h>
|
||||
@@ -22,11 +21,11 @@
|
||||
#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
|
||||
static char nvram_buf[NVRAM_SPACE];
|
||||
static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
|
||||
|
||||
static u32 find_nvram_size(u32 end)
|
||||
{
|
||||
struct nvram_header *header;
|
||||
u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) {
|
||||
|
||||
+16
-111
@@ -28,126 +28,27 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/ssb/ssb_driver_chipcommon.h>
|
||||
#include <linux/ssb/ssb_regs.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/fw/cfe/cfe_api.h>
|
||||
#include <asm/fw/cfe/cfe_error.h>
|
||||
#include <bcm47xx.h>
|
||||
#include <bcm47xx_board.h>
|
||||
|
||||
static int cfe_cons_handle;
|
||||
|
||||
static u16 get_chip_id(void)
|
||||
{
|
||||
switch (bcm47xx_bus_type) {
|
||||
#ifdef CONFIG_BCM47XX_SSB
|
||||
case BCM47XX_BUS_TYPE_SSB:
|
||||
return bcm47xx_bus.ssb.chip_id;
|
||||
#endif
|
||||
#ifdef CONFIG_BCM47XX_BCMA
|
||||
case BCM47XX_BUS_TYPE_BCMA:
|
||||
return bcm47xx_bus.bcma.bus.chipinfo.id;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static char bcm47xx_system_type[20] = "Broadcom BCM47XX";
|
||||
|
||||
const char *get_system_type(void)
|
||||
{
|
||||
static char buf[50];
|
||||
u16 chip_id = get_chip_id();
|
||||
|
||||
snprintf(buf, sizeof(buf),
|
||||
(chip_id > 0x9999) ? "Broadcom BCM%d (%s)" :
|
||||
"Broadcom BCM%04X (%s)",
|
||||
chip_id, bcm47xx_board_get_name());
|
||||
|
||||
return buf;
|
||||
return bcm47xx_system_type;
|
||||
}
|
||||
|
||||
void prom_putchar(char c)
|
||||
__init void bcm47xx_set_system_type(u16 chip_id)
|
||||
{
|
||||
while (cfe_write(cfe_cons_handle, &c, 1) == 0)
|
||||
;
|
||||
}
|
||||
|
||||
static __init void prom_init_cfe(void)
|
||||
{
|
||||
uint32_t cfe_ept;
|
||||
uint32_t cfe_handle;
|
||||
uint32_t cfe_eptseal;
|
||||
int argc = fw_arg0;
|
||||
char **envp = (char **) fw_arg2;
|
||||
int *prom_vec = (int *) fw_arg3;
|
||||
|
||||
/*
|
||||
* Check if a loader was used; if NOT, the 4 arguments are
|
||||
* what CFE gives us (handle, 0, EPT and EPTSEAL)
|
||||
*/
|
||||
if (argc < 0) {
|
||||
cfe_handle = (uint32_t)argc;
|
||||
cfe_ept = (uint32_t)envp;
|
||||
cfe_eptseal = (uint32_t)prom_vec;
|
||||
} else {
|
||||
if ((int)prom_vec < 0) {
|
||||
/*
|
||||
* Old loader; all it gives us is the handle,
|
||||
* so use the "known" entrypoint and assume
|
||||
* the seal.
|
||||
*/
|
||||
cfe_handle = (uint32_t)prom_vec;
|
||||
cfe_ept = 0xBFC00500;
|
||||
cfe_eptseal = CFE_EPTSEAL;
|
||||
} else {
|
||||
/*
|
||||
* Newer loaders bundle the handle/ept/eptseal
|
||||
* Note: prom_vec is in the loader's useg
|
||||
* which is still alive in the TLB.
|
||||
*/
|
||||
cfe_handle = prom_vec[0];
|
||||
cfe_ept = prom_vec[2];
|
||||
cfe_eptseal = prom_vec[3];
|
||||
}
|
||||
}
|
||||
|
||||
if (cfe_eptseal != CFE_EPTSEAL) {
|
||||
/* too early for panic to do any good */
|
||||
printk(KERN_ERR "CFE's entrypoint seal doesn't match.");
|
||||
while (1) ;
|
||||
}
|
||||
|
||||
cfe_init(cfe_handle, cfe_ept);
|
||||
}
|
||||
|
||||
static __init void prom_init_console(void)
|
||||
{
|
||||
/* Initialize CFE console */
|
||||
cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE);
|
||||
}
|
||||
|
||||
static __init void prom_init_cmdline(void)
|
||||
{
|
||||
static char buf[COMMAND_LINE_SIZE] __initdata;
|
||||
|
||||
/* Get the kernel command line from CFE */
|
||||
if (cfe_getenv("LINUX_CMDLINE", buf, COMMAND_LINE_SIZE) >= 0) {
|
||||
buf[COMMAND_LINE_SIZE - 1] = 0;
|
||||
strcpy(arcs_cmdline, buf);
|
||||
}
|
||||
|
||||
/* Force a console handover by adding a console= argument if needed,
|
||||
* as CFE is not available anymore later in the boot process. */
|
||||
if ((strstr(arcs_cmdline, "console=")) == NULL) {
|
||||
/* Try to read the default serial port used by CFE */
|
||||
if ((cfe_getenv("BOOT_CONSOLE", buf, COMMAND_LINE_SIZE) < 0)
|
||||
|| (strncmp("uart", buf, 4)))
|
||||
/* Default to uart0 */
|
||||
strcpy(buf, "uart0");
|
||||
|
||||
/* Compute the new command line */
|
||||
snprintf(arcs_cmdline, COMMAND_LINE_SIZE, "%s console=ttyS%c,115200",
|
||||
arcs_cmdline, buf[4]);
|
||||
}
|
||||
snprintf(bcm47xx_system_type, sizeof(bcm47xx_system_type),
|
||||
(chip_id > 0x9999) ? "Broadcom BCM%d" :
|
||||
"Broadcom BCM%04X",
|
||||
chip_id);
|
||||
}
|
||||
|
||||
static __init void prom_init_mem(void)
|
||||
@@ -195,12 +96,16 @@ static __init void prom_init_mem(void)
|
||||
add_memory_region(0, mem, BOOT_MEM_RAM);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the first serial on the chip common core, it is at this position
|
||||
* for sb (ssb) and ai (bcma) bus.
|
||||
*/
|
||||
#define BCM47XX_SERIAL_ADDR (SSB_ENUM_BASE + SSB_CHIPCO_UART0_DATA)
|
||||
|
||||
void __init prom_init(void)
|
||||
{
|
||||
prom_init_cfe();
|
||||
prom_init_console();
|
||||
prom_init_cmdline();
|
||||
prom_init_mem();
|
||||
setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL_ADDR), 0, 0);
|
||||
}
|
||||
|
||||
void __init prom_free_prom_memory(void)
|
||||
|
||||
@@ -31,7 +31,8 @@ static int __init uart8250_init_ssb(void)
|
||||
|
||||
memset(&uart8250_data, 0, sizeof(uart8250_data));
|
||||
|
||||
for (i = 0; i < mcore->nr_serial_ports; i++) {
|
||||
for (i = 0; i < mcore->nr_serial_ports &&
|
||||
i < ARRAY_SIZE(uart8250_data) - 1; i++) {
|
||||
struct plat_serial8250_port *p = &(uart8250_data[i]);
|
||||
struct ssb_serial_port *ssb_port = &(mcore->serial_ports[i]);
|
||||
|
||||
@@ -55,7 +56,8 @@ static int __init uart8250_init_bcma(void)
|
||||
|
||||
memset(&uart8250_data, 0, sizeof(uart8250_data));
|
||||
|
||||
for (i = 0; i < cc->nr_serial_ports; i++) {
|
||||
for (i = 0; i < cc->nr_serial_ports &&
|
||||
i < ARRAY_SIZE(uart8250_data) - 1; i++) {
|
||||
struct plat_serial8250_port *p = &(uart8250_data[i]);
|
||||
struct bcma_serial_port *bcma_port;
|
||||
bcma_port = &(cc->serial_ports[i]);
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "bcm47xx_private.h"
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/ethtool.h>
|
||||
@@ -35,6 +37,8 @@
|
||||
#include <linux/ssb/ssb_embedded.h>
|
||||
#include <linux/bcma/bcma_soc.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/idle.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/time.h>
|
||||
#include <bcm47xx.h>
|
||||
@@ -213,12 +217,14 @@ void __init plat_mem_setup(void)
|
||||
#ifdef CONFIG_BCM47XX_BCMA
|
||||
bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
|
||||
bcm47xx_register_bcma();
|
||||
bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
|
||||
#endif
|
||||
} else {
|
||||
printk(KERN_INFO "bcm47xx: using ssb bus\n");
|
||||
#ifdef CONFIG_BCM47XX_SSB
|
||||
bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB;
|
||||
bcm47xx_register_ssb();
|
||||
bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -226,8 +232,34 @@ void __init plat_mem_setup(void)
|
||||
_machine_halt = bcm47xx_machine_halt;
|
||||
pm_power_off = bcm47xx_machine_halt;
|
||||
bcm47xx_board_detect();
|
||||
mips_set_machine_name(bcm47xx_board_get_name());
|
||||
}
|
||||
|
||||
static int __init bcm47xx_cpu_fixes(void)
|
||||
{
|
||||
switch (bcm47xx_bus_type) {
|
||||
#ifdef CONFIG_BCM47XX_SSB
|
||||
case BCM47XX_BUS_TYPE_SSB:
|
||||
/* Nothing to do */
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_BCM47XX_BCMA
|
||||
case BCM47XX_BUS_TYPE_BCMA:
|
||||
/* The BCM4706 has a problem with the CPU wait instruction.
|
||||
* When r4k_wait or r4k_wait_irqoff is used will just hang and
|
||||
* not return from a msleep(). Removing the cpu_wait
|
||||
* functionality is a workaround for this problem. The BCM4716
|
||||
* does not have this problem.
|
||||
*/
|
||||
if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
|
||||
cpu_wait = NULL;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(bcm47xx_cpu_fixes);
|
||||
|
||||
static struct fixed_phy_status bcm47xx_fixed_phy_status __initdata = {
|
||||
.link = 1,
|
||||
.speed = SPEED_100,
|
||||
@@ -248,6 +280,9 @@ static int __init bcm47xx_register_bus_complete(void)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
bcm47xx_buttons_register();
|
||||
bcm47xx_leds_register();
|
||||
|
||||
fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ static void nvram_read_leddc(const char *prefix, const char *name,
|
||||
}
|
||||
|
||||
static void nvram_read_macaddr(const char *prefix, const char *name,
|
||||
u8 (*val)[6], bool fallback)
|
||||
u8 val[6], bool fallback)
|
||||
{
|
||||
char buf[100];
|
||||
int err;
|
||||
@@ -144,11 +144,11 @@ static void nvram_read_macaddr(const char *prefix, const char *name,
|
||||
if (err < 0)
|
||||
return;
|
||||
|
||||
bcm47xx_nvram_parse_macaddr(buf, *val);
|
||||
bcm47xx_nvram_parse_macaddr(buf, val);
|
||||
}
|
||||
|
||||
static void nvram_read_alpha2(const char *prefix, const char *name,
|
||||
char (*val)[2], bool fallback)
|
||||
char val[2], bool fallback)
|
||||
{
|
||||
char buf[10];
|
||||
int err;
|
||||
@@ -162,7 +162,7 @@ static void nvram_read_alpha2(const char *prefix, const char *name,
|
||||
pr_warn("alpha2 is too long %s\n", buf);
|
||||
return;
|
||||
}
|
||||
memcpy(val, buf, sizeof(val));
|
||||
memcpy(val, buf, 2);
|
||||
}
|
||||
|
||||
static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom,
|
||||
@@ -180,7 +180,7 @@ static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom,
|
||||
fallback);
|
||||
nvram_read_s8(prefix, NULL, "ag1", &sprom->antenna_gain.a1, 0,
|
||||
fallback);
|
||||
nvram_read_alpha2(prefix, "ccode", &sprom->alpha2, fallback);
|
||||
nvram_read_alpha2(prefix, "ccode", sprom->alpha2, fallback);
|
||||
}
|
||||
|
||||
static void bcm47xx_fill_sprom_r12389(struct ssb_sprom *sprom,
|
||||
@@ -633,20 +633,20 @@ static void bcm47xx_fill_sprom_path_r45(struct ssb_sprom *sprom,
|
||||
static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom,
|
||||
const char *prefix, bool fallback)
|
||||
{
|
||||
nvram_read_macaddr(prefix, "et0macaddr", &sprom->et0mac, fallback);
|
||||
nvram_read_macaddr(prefix, "et0macaddr", sprom->et0mac, fallback);
|
||||
nvram_read_u8(prefix, NULL, "et0mdcport", &sprom->et0mdcport, 0,
|
||||
fallback);
|
||||
nvram_read_u8(prefix, NULL, "et0phyaddr", &sprom->et0phyaddr, 0,
|
||||
fallback);
|
||||
|
||||
nvram_read_macaddr(prefix, "et1macaddr", &sprom->et1mac, fallback);
|
||||
nvram_read_macaddr(prefix, "et1macaddr", sprom->et1mac, fallback);
|
||||
nvram_read_u8(prefix, NULL, "et1mdcport", &sprom->et1mdcport, 0,
|
||||
fallback);
|
||||
nvram_read_u8(prefix, NULL, "et1phyaddr", &sprom->et1phyaddr, 0,
|
||||
fallback);
|
||||
|
||||
nvram_read_macaddr(prefix, "macaddr", &sprom->il0mac, fallback);
|
||||
nvram_read_macaddr(prefix, "il0macaddr", &sprom->il0mac, fallback);
|
||||
nvram_read_macaddr(prefix, "macaddr", sprom->il0mac, fallback);
|
||||
nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback);
|
||||
}
|
||||
|
||||
static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix,
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
* 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) 2007 Aurelien Jarno <aurelien@aurel32.net>
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/mtd/physmap.h>
|
||||
#include <linux/ssb/ssb.h>
|
||||
#include <linux/ssb/ssb_embedded.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <asm/mach-bcm47xx/bcm47xx.h>
|
||||
|
||||
/* GPIO definitions for the WGT634U */
|
||||
#define WGT634U_GPIO_LED 3
|
||||
#define WGT634U_GPIO_RESET 2
|
||||
#define WGT634U_GPIO_TP1 7
|
||||
#define WGT634U_GPIO_TP2 6
|
||||
#define WGT634U_GPIO_TP3 5
|
||||
#define WGT634U_GPIO_TP4 4
|
||||
#define WGT634U_GPIO_TP5 1
|
||||
|
||||
static struct gpio_led wgt634u_leds[] = {
|
||||
{
|
||||
.name = "power",
|
||||
.gpio = WGT634U_GPIO_LED,
|
||||
.active_low = 1,
|
||||
.default_trigger = "heartbeat",
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data wgt634u_led_data = {
|
||||
.num_leds = ARRAY_SIZE(wgt634u_leds),
|
||||
.leds = wgt634u_leds,
|
||||
};
|
||||
|
||||
static struct platform_device wgt634u_gpio_leds = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &wgt634u_led_data,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* 8MiB flash. The struct mtd_partition matches original Netgear WGT634U
|
||||
firmware. */
|
||||
static struct mtd_partition wgt634u_partitions[] = {
|
||||
{
|
||||
.name = "cfe",
|
||||
.offset = 0,
|
||||
.size = 0x60000, /* 384k */
|
||||
.mask_flags = MTD_WRITEABLE /* force read-only */
|
||||
},
|
||||
{
|
||||
.name = "config",
|
||||
.offset = 0x60000,
|
||||
.size = 0x20000 /* 128k */
|
||||
},
|
||||
{
|
||||
.name = "linux",
|
||||
.offset = 0x80000,
|
||||
.size = 0x140000 /* 1280k */
|
||||
},
|
||||
{
|
||||
.name = "jffs",
|
||||
.offset = 0x1c0000,
|
||||
.size = 0x620000 /* 6272k */
|
||||
},
|
||||
{
|
||||
.name = "nvram",
|
||||
.offset = 0x7e0000,
|
||||
.size = 0x20000 /* 128k */
|
||||
},
|
||||
};
|
||||
|
||||
static struct physmap_flash_data wgt634u_flash_data = {
|
||||
.parts = wgt634u_partitions,
|
||||
.nr_parts = ARRAY_SIZE(wgt634u_partitions)
|
||||
};
|
||||
|
||||
static struct resource wgt634u_flash_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
|
||||
static struct platform_device wgt634u_flash = {
|
||||
.name = "physmap-flash",
|
||||
.id = 0,
|
||||
.dev = { .platform_data = &wgt634u_flash_data, },
|
||||
.resource = &wgt634u_flash_resource,
|
||||
.num_resources = 1,
|
||||
};
|
||||
|
||||
/* Platform devices */
|
||||
static struct platform_device *wgt634u_devices[] __initdata = {
|
||||
&wgt634u_flash,
|
||||
&wgt634u_gpio_leds,
|
||||
};
|
||||
|
||||
static irqreturn_t gpio_interrupt(int irq, void *ignored)
|
||||
{
|
||||
int state;
|
||||
|
||||
/* Interrupts are shared, check if the current one is
|
||||
a GPIO interrupt. */
|
||||
if (!ssb_chipco_irq_status(&bcm47xx_bus.ssb.chipco,
|
||||
SSB_CHIPCO_IRQ_GPIO))
|
||||
return IRQ_NONE;
|
||||
|
||||
state = gpio_get_value(WGT634U_GPIO_RESET);
|
||||
|
||||
/* Interrupt are level triggered, revert the interrupt polarity
|
||||
to clear the interrupt. */
|
||||
ssb_gpio_polarity(&bcm47xx_bus.ssb, 1 << WGT634U_GPIO_RESET,
|
||||
state ? 1 << WGT634U_GPIO_RESET : 0);
|
||||
|
||||
if (!state) {
|
||||
printk(KERN_INFO "Reset button pressed");
|
||||
ctrl_alt_del();
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __init wgt634u_init(void)
|
||||
{
|
||||
/* There is no easy way to detect that we are running on a WGT634U
|
||||
* machine. Use the MAC address as an heuristic. Netgear Inc. has
|
||||
* been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx.
|
||||
*/
|
||||
u8 *et0mac;
|
||||
|
||||
if (bcm47xx_bus_type != BCM47XX_BUS_TYPE_SSB)
|
||||
return -ENODEV;
|
||||
|
||||
et0mac = bcm47xx_bus.ssb.sprom.et0mac;
|
||||
|
||||
if (et0mac[0] == 0x00 &&
|
||||
((et0mac[1] == 0x09 && et0mac[2] == 0x5b) ||
|
||||
(et0mac[1] == 0x0f && et0mac[2] == 0xb5))) {
|
||||
struct ssb_mipscore *mcore = &bcm47xx_bus.ssb.mipscore;
|
||||
|
||||
printk(KERN_INFO "WGT634U machine detected.\n");
|
||||
|
||||
if (!request_irq(gpio_to_irq(WGT634U_GPIO_RESET),
|
||||
gpio_interrupt, IRQF_SHARED,
|
||||
"WGT634U GPIO", &bcm47xx_bus.ssb.chipco)) {
|
||||
gpio_direction_input(WGT634U_GPIO_RESET);
|
||||
ssb_gpio_intmask(&bcm47xx_bus.ssb,
|
||||
1 << WGT634U_GPIO_RESET,
|
||||
1 << WGT634U_GPIO_RESET);
|
||||
ssb_chipco_irq_mask(&bcm47xx_bus.ssb.chipco,
|
||||
SSB_CHIPCO_IRQ_GPIO,
|
||||
SSB_CHIPCO_IRQ_GPIO);
|
||||
}
|
||||
|
||||
wgt634u_flash_data.width = mcore->pflash.buswidth;
|
||||
wgt634u_flash_resource.start = mcore->pflash.window;
|
||||
wgt634u_flash_resource.end = mcore->pflash.window
|
||||
+ mcore->pflash.window_size
|
||||
- 1;
|
||||
return platform_add_devices(wgt634u_devices,
|
||||
ARRAY_SIZE(wgt634u_devices));
|
||||
} else
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
module_init(wgt634u_init);
|
||||
@@ -3,33 +3,41 @@ menu "CPU support"
|
||||
|
||||
config BCM63XX_CPU_3368
|
||||
bool "support 3368 CPU"
|
||||
select SYS_HAS_CPU_BMIPS4350
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6328
|
||||
bool "support 6328 CPU"
|
||||
select SYS_HAS_CPU_BMIPS4350
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6338
|
||||
bool "support 6338 CPU"
|
||||
select SYS_HAS_CPU_BMIPS32_3300
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6345
|
||||
bool "support 6345 CPU"
|
||||
select SYS_HAS_CPU_BMIPS32_3300
|
||||
|
||||
config BCM63XX_CPU_6348
|
||||
bool "support 6348 CPU"
|
||||
select SYS_HAS_CPU_BMIPS32_3300
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6358
|
||||
bool "support 6358 CPU"
|
||||
select SYS_HAS_CPU_BMIPS4350
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6362
|
||||
bool "support 6362 CPU"
|
||||
select SYS_HAS_CPU_BMIPS4350
|
||||
select HW_HAS_PCI
|
||||
|
||||
config BCM63XX_CPU_6368
|
||||
bool "support 6368 CPU"
|
||||
select SYS_HAS_CPU_BMIPS4350
|
||||
select HW_HAS_PCI
|
||||
endmenu
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
|
||||
setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
|
||||
dev-pcmcia.o dev-rng.o dev-spi.o dev-uart.o dev-wdt.o \
|
||||
dev-usb-usbd.o
|
||||
dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
|
||||
dev-wdt.o dev-usb-usbd.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-y += boards/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user