Commit 0f002fdd authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mips_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips

Pull MIPS updates from James Hogan:
 "Here's the main MIPS pull request for 4.11.

  It contains a few new features such as IRQ stacks, cacheinfo support,
  and KASLR for Octeon CPUs, and a variety of smaller improvements and
  fixes including devicetree additions, kexec cleanups, microMIPS stack
  unwinding fixes, and a bunch of build fixes to clean up continuous
  integration builds.

  Its all been in linux-next for at least a couple of days, most of it
  far longer.

  Miscellaneous:
   - Add IRQ stacks
   - Add cacheinfo support
   - Add "uzImage.bin" zboot target
   - Unify performance counter definitions
   - Export various (mainly assembly) symbols alongside their
     definitions
   - Audit and remove unnecessary uses of module.h

  kexec & kdump:
   - Lots of improvements and fixes
   - Add correct copy_regs implementations
   - Add debug logging of new kernel information

  Security:
   - Use Makefile.postlink to insert relocations into vmlinux
   - Provide plat_post_relocation hook (used for Octeon KASLR)
   - Add support for tuning mmap randomisation
   - Relocate DTB

  microMIPS:
   - A load of unwind fixes
   - Add some missing .insn to fix link errors

  MIPSr6:
   - Fix MULTU/MADDU/MSUBU sign extension in r2 emulation
   - Remove r2_emul_return and use ERETNC unconditionally on MIPSr6
   - Allow pre-r6 emulation on SMP MIPSr6 kernels

  Cache management:
   - Treat physically indexed dcache as non-aliasing
   - Add return errors to protected cache ops for KVM
   - CM3: Ensure L1 & L2 cache ECC checking matches
   - CM3: Indicate inclusive caches
   - I6400: Treat dcache as physically indexed

  Memory management:
   - Ensure bootmem doesn't corrupt reserved memory
   - Export some TLB exception generation functions for KVM

  OF:
   - NULL check initial_boot_params before use in of_scan_flat_dt()
   - Fix unaligned access in of_alias_scan()

  SMP:
   - CPS: Don't BUG if a CPU fails to start

  Other fixes:
   - Fix longstanding 64-bit IP checksum carry bug
   - Fix KERN_CONT fallout in cpu-bugs64.c and sync-r4k.c
   - Update defconfigs for NF_CT_PROTO_DCCP, DPLITE,
     CPU_FREQ_STAT,SCSI_DH changes
   - Disable certain builtin compiler options, stack-check (whole
     kernel), asynchronous-unwind-tables (VDSO).
   - A bunch of build fixes from kernelci.org testing
   - Various other minor cleanups & corrections

  BMIPS:
   - Migrate interrupts during bmips_cpu_disable
   - BCM47xx: Add Luxul devices
   - BCM47xx: Fix Asus WL-500W button inversion
   - BCM7xxx: Add SPI device nodes

  Generic (multiplatform):
   - Add kexec DTB passing
   - Fix big endian
   - Add cpp_its_S in ksym_dep_filter to silence build warning

  IP22:
   - Reformat inline assembler code to modern standards
   - Fix binutils 2.25 build error

  IP27:
   - Fix duplicate CAC_BASE definition build error
   - Disable qlge driver to workaround broken compiler

  Lantiq:
   - Refresh defconfig and activate more drivers
   - Lock DMA register access
   - Fix cascading IRQ setup
   - Fix build of VPE loader
   - xway: Fix ethernet packet header corruption over reboot

  Loongson1
   - Add watchdog support
   - 1B: Reduce DEFAULT_MEMSIZE to 64MB
   - 1B: Change OSC clock name to match rest of kernel
   - 1C: Remove ARCH_WANT_OPTIONAL_GPIOLIB

  Octeon:
   - Add KASLR support
   - Support Octeon III USB controller
   - Fix large copy_from_user corner case
   - Enable devtmpfs in defconfig

  Netlogic:
   - Fix non-default XLR build error due to netlogic,xlp-pic code
   - Fix assembler warning from smpboot.S

  pic32mzda:
   - Fix linker error when early printk is disabled

  Pistachio:
   - Add base device tree
   - Add Ci40 "Marduk" device tree

  Ralink:
   - Support raw appended DTB
   - Add missing I2C & I2S clocks
   - Add missing pinmux and fix pinmux function name typo
   - Add missing clk_round_rate()
   - Clean up prom_init()
   - MT7621: Set SoC type
   - MT7621: Support highmem

  TXx9:
   - Modernize printing of kernel messages and resolve KERN_CONT fallout
   - 7segled: use permission-specific DEVICE_ATTR variants

  XilFPGA:
   - Add IRQ controller and UART IRQ
   - Add AXI I2C and emaclite to DT & defconfig"

* tag 'mips_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (148 commits)
  MIPS: VDSO: Explicitly use -fno-asynchronous-unwind-tables
  MIPS: BCM47XX: Fix button inversion for Asus WL-500W
  MIPS: DTS: Add img directory to Makefile
  MIPS: ip27: Disable qlge driver in defconfig
  MIPS: pic32mzda: Fix linker error for pic32_get_pbclk()
  MIPS: Lantiq: Keep ethernet enabled during boot
  MIPS: OCTEON: Fix copy_from_user fault handling for large buffers
  MIPS: Fix special case in 64 bit IP checksumming.
  MIPS: OCTEON: Enable DEVTMPFS
  MIPS: lantiq: Set physical_memsize
  MIPS: sysmips: Remove duplicated include from syscall.c
  Kbuild: Add cpp_its_S in ksym_dep_filter
  MIPS: Audit and remove any unnecessary uses of module.h
  MIPS: Unify perf counter register definitions
  MIPS: Disable stack checks on MIPS kernels
  MIPS: OCTEON: Platform support for OCTEON III USB controller
  MIPS: Lantiq: Fix cascaded IRQ setup
  MIPS: sync-r4k: Fix KERN_CONT fallout
  MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
  MIPS: Fix distclean with Makefile.postlink
  ...
parents 252b95c0 cfd75c2d
Imagination Technologies' Pistachio SoC based Marduk Board
==========================================================
Compatible string must be "img,pistachio-marduk", "img,pistachio"
Hardware and other related documentation is available at
https://docs.creatordev.io/ci40/
It is also known as Creator Ci40. Marduk is legacy name and will
be there for decades.
...@@ -7707,6 +7707,12 @@ W: http://www.kernel.org/doc/man-pages ...@@ -7707,6 +7707,12 @@ W: http://www.kernel.org/doc/man-pages
L: linux-man@vger.kernel.org L: linux-man@vger.kernel.org
S: Maintained S: Maintained
MARDUK (CREATOR CI40) DEVICE TREE SUPPORT
M: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
L: linux-mips@linux-mips.org
S: Maintained
F: arch/mips/boot/dts/img/pistachio_marduk.dts
MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER
M: Andrew Lunn <andrew@lunn.ch> M: Andrew Lunn <andrew@lunn.ch>
M: Vivien Didelot <vivien.didelot@savoirfairelinux.com> M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
...@@ -9795,7 +9801,7 @@ L: linux-mips@linux-mips.org ...@@ -9795,7 +9801,7 @@ L: linux-mips@linux-mips.org
S: Maintained S: Maintained
F: arch/mips/pistachio/ F: arch/mips/pistachio/
F: arch/mips/include/asm/mach-pistachio/ F: arch/mips/include/asm/mach-pistachio/
F: arch/mips/boot/dts/pistachio/ F: arch/mips/boot/dts/img/pistachio*
F: arch/mips/configs/pistachio*_defconfig F: arch/mips/configs/pistachio*_defconfig
PKTCDVD DRIVER PKTCDVD DRIVER
......
...@@ -9,10 +9,13 @@ config MIPS ...@@ -9,10 +9,13 @@ config MIPS
select HAVE_CONTEXT_TRACKING select HAVE_CONTEXT_TRACKING
select HAVE_GENERIC_DMA_COHERENT select HAVE_GENERIC_DMA_COHERENT
select HAVE_IDE select HAVE_IDE
select HAVE_IRQ_EXIT_ON_IRQ_STACK
select HAVE_OPROFILE select HAVE_OPROFILE
select HAVE_PERF_EVENTS select HAVE_PERF_EVENTS
select PERF_USE_VMALLOC select PERF_USE_VMALLOC
select HAVE_ARCH_KGDB select HAVE_ARCH_KGDB
select HAVE_ARCH_MMAP_RND_BITS if MMU
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT
select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK select HAVE_ARCH_TRACEHOOK
select HAVE_CBPF_JIT if !CPU_MICROMIPS select HAVE_CBPF_JIT if !CPU_MICROMIPS
...@@ -94,6 +97,7 @@ config MIPS_GENERIC ...@@ -94,6 +97,7 @@ config MIPS_GENERIC
select PCI_DRIVERS_GENERIC select PCI_DRIVERS_GENERIC
select PINCTRL select PINCTRL
select SMP_UP if SMP select SMP_UP if SMP
select SWAP_IO_SPACE
select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_MIPS32_R2 select SYS_HAS_CPU_MIPS32_R2
select SYS_HAS_CPU_MIPS32_R6 select SYS_HAS_CPU_MIPS32_R6
...@@ -478,6 +482,7 @@ config MACH_XILFPGA ...@@ -478,6 +482,7 @@ config MACH_XILFPGA
select SYS_SUPPORTS_ZBOOT_UART16550 select SYS_SUPPORTS_ZBOOT_UART16550
select USE_OF select USE_OF
select USE_GENERIC_EARLY_PRINTK_8250 select USE_GENERIC_EARLY_PRINTK_8250
select XILINX_INTC
help help
This enables support for the IMG University Program MIPSfpga platform. This enables support for the IMG University Program MIPSfpga platform.
...@@ -909,6 +914,7 @@ config CAVIUM_OCTEON_SOC ...@@ -909,6 +914,7 @@ config CAVIUM_OCTEON_SOC
select NR_CPUS_DEFAULT_16 select NR_CPUS_DEFAULT_16
select BUILTIN_DTB select BUILTIN_DTB
select MTD_COMPLEX_MAPPINGS select MTD_COMPLEX_MAPPINGS
select SYS_SUPPORTS_RELOCATABLE
help help
This option supports all of the Octeon reference boards from Cavium This option supports all of the Octeon reference boards from Cavium
Networks. It builds a kernel that dynamically determines the Octeon Networks. It builds a kernel that dynamically determines the Octeon
...@@ -1427,7 +1433,6 @@ config CPU_LOONGSON1C ...@@ -1427,7 +1433,6 @@ config CPU_LOONGSON1C
bool "Loongson 1C" bool "Loongson 1C"
depends on SYS_HAS_CPU_LOONGSON1C depends on SYS_HAS_CPU_LOONGSON1C
select CPU_LOONGSON1 select CPU_LOONGSON1
select ARCH_WANT_OPTIONAL_GPIOLIB
select LEDS_GPIO_REGISTER select LEDS_GPIO_REGISTER
help help
The Loongson 1C is a 32-bit SoC, which implements the MIPS32 The Loongson 1C is a 32-bit SoC, which implements the MIPS32
...@@ -2288,7 +2293,7 @@ config MIPS_MT_FPAFF ...@@ -2288,7 +2293,7 @@ config MIPS_MT_FPAFF
config MIPSR2_TO_R6_EMULATOR config MIPSR2_TO_R6_EMULATOR
bool "MIPS R2-to-R6 emulator" bool "MIPS R2-to-R6 emulator"
depends on CPU_MIPSR6 && !SMP depends on CPU_MIPSR6
default y default y
help help
Choose this option if you want to run non-R6 MIPS userland code. Choose this option if you want to run non-R6 MIPS userland code.
...@@ -2296,8 +2301,6 @@ config MIPSR2_TO_R6_EMULATOR ...@@ -2296,8 +2301,6 @@ config MIPSR2_TO_R6_EMULATOR
default. You can enable it using the 'mipsr2emu' kernel option. default. You can enable it using the 'mipsr2emu' kernel option.
The only reason this is a build-time option is to save ~14K from the The only reason this is a build-time option is to save ~14K from the
final kernel image. final kernel image.
comment "MIPS R2-to-R6 emulator is only available for UP kernels"
depends on SMP && CPU_MIPSR6
config MIPS_VPE_LOADER config MIPS_VPE_LOADER
bool "VPE loader support." bool "VPE loader support."
...@@ -2572,7 +2575,7 @@ config SYS_SUPPORTS_NUMA ...@@ -2572,7 +2575,7 @@ config SYS_SUPPORTS_NUMA
config RELOCATABLE config RELOCATABLE
bool "Relocatable kernel" bool "Relocatable kernel"
depends on SYS_SUPPORTS_RELOCATABLE && (CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_MIPS32_R6 || CPU_MIPS64_R6) depends on SYS_SUPPORTS_RELOCATABLE && (CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_MIPS32_R6 || CPU_MIPS64_R6 || CAVIUM_OCTEON_SOC)
help help
This builds a kernel image that retains relocation information This builds a kernel image that retains relocation information
so it can be loaded someplace besides the default 1MB. so it can be loaded someplace besides the default 1MB.
...@@ -2828,8 +2831,8 @@ config KEXEC ...@@ -2828,8 +2831,8 @@ config KEXEC
made. made.
config CRASH_DUMP config CRASH_DUMP
bool "Kernel crash dumps" bool "Kernel crash dumps"
help help
Generate crash dump after being started by kexec. Generate crash dump after being started by kexec.
This should be normally only set in special crash dump kernels This should be normally only set in special crash dump kernels
which are loaded in the main kernel with kexec-tools into which are loaded in the main kernel with kexec-tools into
...@@ -2839,11 +2842,11 @@ config CRASH_DUMP ...@@ -2839,11 +2842,11 @@ config CRASH_DUMP
PHYSICAL_START. PHYSICAL_START.
config PHYSICAL_START config PHYSICAL_START
hex "Physical address where the kernel is loaded" hex "Physical address where the kernel is loaded"
default "0xffffffff84000000" if 64BIT default "0xffffffff84000000" if 64BIT
default "0x84000000" if 32BIT default "0x84000000" if 32BIT
depends on CRASH_DUMP depends on CRASH_DUMP
help help
This gives the CKSEG0 or KSEG0 address where the kernel is loaded. This gives the CKSEG0 or KSEG0 address where the kernel is loaded.
If you plan to use kernel for capturing the crash dump change If you plan to use kernel for capturing the crash dump change
this value to start of the reserved region (the "X" value as this value to start of the reserved region (the "X" value as
...@@ -3075,6 +3078,20 @@ config MMU ...@@ -3075,6 +3078,20 @@ config MMU
bool bool
default y default y
config ARCH_MMAP_RND_BITS_MIN
default 12 if 64BIT
default 8
config ARCH_MMAP_RND_BITS_MAX
default 18 if 64BIT
default 15
config ARCH_MMAP_RND_COMPAT_BITS_MIN
default 8
config ARCH_MMAP_RND_COMPAT_BITS_MAX
default 15
config I8253 config I8253
bool bool
select CLKSRC_I8253 select CLKSRC_I8253
......
...@@ -131,6 +131,21 @@ cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips. ...@@ -131,6 +131,21 @@ cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.
cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
-fno-omit-frame-pointer -fno-omit-frame-pointer
# Some distribution-specific toolchains might pass the -fstack-check
# option during the build, which adds a simple stack-probe at the beginning
# of every function. This stack probe is to ensure that there is enough
# stack space, else a SEGV is generated. This is not desirable for MIPS
# as kernel stacks are small, placed in unmapped virtual memory, and do not
# grow when overflowed. Especially on SGI IP27 platforms, this check will
# lead to a NULL pointer dereference in _raw_spin_lock_irq.
#
# In disassembly, this stack probe appears at the top of a function as:
# sd zero,<offset>(sp)
# Where <offset> is a negative value.
#
cflags-y += -fno-stack-check
# #
# CPU-dependent compiler/assembler options for optimization. # CPU-dependent compiler/assembler options for optimization.
# #
...@@ -320,6 +335,9 @@ bootz-y := vmlinuz ...@@ -320,6 +335,9 @@ bootz-y := vmlinuz
bootz-y += vmlinuz.bin bootz-y += vmlinuz.bin
bootz-y += vmlinuz.ecoff bootz-y += vmlinuz.ecoff
bootz-y += vmlinuz.srec bootz-y += vmlinuz.srec
ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0)
bootz-y += uzImage.bin
endif
ifdef CONFIG_LASAT ifdef CONFIG_LASAT
rom.bin rom.sw: vmlinux rom.bin rom.sw: vmlinux
...@@ -327,10 +345,6 @@ rom.bin rom.sw: vmlinux ...@@ -327,10 +345,6 @@ rom.bin rom.sw: vmlinux
$(bootvars-y) $@ $(bootvars-y) $@
endif endif
CMD_RELOCS = arch/mips/boot/tools/relocs
quiet_cmd_relocs = RELOCS $<
cmd_relocs = $(CMD_RELOCS) $<
# #
# Some machines like the Indy need 32-bit ELF binaries for booting purposes. # Some machines like the Indy need 32-bit ELF binaries for booting purposes.
# Other need ECOFF, so we build a 32-bit ELF binary for them which we then # Other need ECOFF, so we build a 32-bit ELF binary for them which we then
...@@ -339,11 +353,6 @@ quiet_cmd_relocs = RELOCS $< ...@@ -339,11 +353,6 @@ quiet_cmd_relocs = RELOCS $<
quiet_cmd_32 = OBJCOPY $@ quiet_cmd_32 = OBJCOPY $@
cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@ cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@
vmlinux.32: vmlinux vmlinux.32: vmlinux
ifeq ($(CONFIG_RELOCATABLE)$(CONFIG_64BIT),yy)
# Currently, objcopy fails to handle the relocations in the elf64
# So the relocs tool must be run here to remove them first
$(call cmd,relocs)
endif
$(call cmd,32) $(call cmd,32)
# #
...@@ -359,9 +368,6 @@ all: $(all-y) ...@@ -359,9 +368,6 @@ all: $(all-y)
# boot # boot
$(boot-y): $(vmlinux-32) FORCE $(boot-y): $(vmlinux-32) FORCE
ifeq ($(CONFIG_RELOCATABLE)$(CONFIG_32BIT),yy)
$(call cmd,relocs)
endif
$(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \ $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \
$(bootvars-y) arch/mips/boot/$@ $(bootvars-y) arch/mips/boot/$@
...@@ -395,11 +401,11 @@ dtbs_install: ...@@ -395,11 +401,11 @@ dtbs_install:
archprepare: archprepare:
ifdef CONFIG_MIPS32_N32 ifdef CONFIG_MIPS32_N32
@echo ' Checking missing-syscalls for N32' @$(kecho) ' Checking missing-syscalls for N32'
$(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=n32" $(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=n32"
endif endif
ifdef CONFIG_MIPS32_O32 ifdef CONFIG_MIPS32_O32
@echo ' Checking missing-syscalls for O32' @$(kecho) ' Checking missing-syscalls for O32'
$(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=32" $(Q)$(MAKE) $(build)=. missing-syscalls missing_syscalls_flags="-mabi=32"
endif endif
...@@ -433,6 +439,7 @@ define archhelp ...@@ -433,6 +439,7 @@ define archhelp
echo ' uImage.gz - U-Boot image (gzip)' echo ' uImage.gz - U-Boot image (gzip)'
echo ' uImage.lzma - U-Boot image (lzma)' echo ' uImage.lzma - U-Boot image (lzma)'
echo ' uImage.lzo - U-Boot image (lzo)' echo ' uImage.lzo - U-Boot image (lzo)'
echo ' uzImage.bin - U-Boot image (self-extracting)'
echo ' dtbs - Device-tree blobs for enabled boards' echo ' dtbs - Device-tree blobs for enabled boards'
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)' echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
echo echo
......
# ===========================================================================
# Post-link MIPS pass
# ===========================================================================
#
# 1. Insert relocations into vmlinux
PHONY := __archpost
__archpost:
-include include/config/auto.conf
include scripts/Kbuild.include
CMD_RELOCS = arch/mips/boot/tools/relocs
quiet_cmd_relocs = RELOCS $@
cmd_relocs = $(CMD_RELOCS) $@
# `@true` prevents complaint when there is nothing to be done
vmlinux: FORCE
@true
ifeq ($(CONFIG_RELOCATABLE),y)
$(call if_changed,relocs)
endif
%.ko: FORCE
@true
clean:
@true
PHONY += FORCE clean
FORCE:
.PHONY: $(PHONY)
...@@ -236,7 +236,6 @@ static struct platform_device gpr_i2c_device = { ...@@ -236,7 +236,6 @@ static struct platform_device gpr_i2c_device = {
static struct i2c_board_info gpr_i2c_info[] __initdata = { static struct i2c_board_info gpr_i2c_info[] __initdata = {
{ {
I2C_BOARD_INFO("lm83", 0x18), I2C_BOARD_INFO("lm83", 0x18),
.type = "lm83"
} }
}; };
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/syscore_ops.h> #include <linux/syscore_ops.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_dbdma.h> #include <asm/mach-au1x00/au1xxx_dbdma.h>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <asm/mach-au1x00/gpio-au1000.h> #include <asm/mach-au1x00/gpio-au1000.h>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
* 675 Mass Ave, Cambridge, MA 02139, USA. * 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/string.h> #include <linux/string.h>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
*/ */
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/export.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/syscore_ops.h> #include <linux/syscore_ops.h>
#include <asm/cpu.h> #include <asm/cpu.h>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* for various media blocks are enabled/disabled. * for various media blocks are enabled/disabled.
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
#include <linux/module.h> #include <linux/init.h>
#include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <asm/addrspace.h> #include <asm/addrspace.h>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/gcd.h> #include <linux/gcd.h>
#include <linux/io.h> #include <linux/io.h>
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <linux/module.h> #include <linux/init.h>
#include <linux/export.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <asm/mach-ar7/ar7.h> #include <asm/mach-ar7/ar7.h>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/module.h>
#include <linux/pfn.h> #include <linux/pfn.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/string.h> #include <linux/string.h>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h> #include <linux/clk.h>
...@@ -45,7 +44,7 @@ static struct clk *__init ath79_add_sys_clkdev( ...@@ -45,7 +44,7 @@ static struct clk *__init ath79_add_sys_clkdev(
int err; int err;
clk = clk_register_fixed_rate(NULL, id, NULL, 0, rate); clk = clk_register_fixed_rate(NULL, id, NULL, 0, rate);
if (!clk) if (IS_ERR(clk))
panic("failed to allocate %s clock structure", id); panic("failed to allocate %s clock structure", id);
err = clk_register_clkdev(clk, id, NULL); err = clk_register_clkdev(clk, id, NULL);
...@@ -508,16 +507,19 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np) ...@@ -508,16 +507,19 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np)
ar9330_clk_init(ref_clk, pll_base); ar9330_clk_init(ref_clk, pll_base);
else { else {
pr_err("%s: could not find any appropriate clk_init()\n", dnfn); pr_err("%s: could not find any appropriate clk_init()\n", dnfn);
goto err_clk; goto err_iounmap;
} }
if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) { if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
pr_err("%s: could not register clk provider\n", dnfn); pr_err("%s: could not register clk provider\n", dnfn);
goto err_clk; goto err_iounmap;
} }
return; return;
err_iounmap:
iounmap(pll_base);
err_clk: err_clk:
clk_put(ref_clk); clk_put(ref_clk);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
...@@ -149,6 +149,15 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = { ...@@ -149,6 +149,15 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = {
/* board_id */ /* board_id */
static const static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
{{BCM47XX_BOARD_LUXUL_ABR_4400_V1, "Luxul ABR-4400 V1"}, "luxul_abr4400_v1"},
{{BCM47XX_BOARD_LUXUL_XAP_310_V1, "Luxul XAP-310 V1"}, "luxul_xap310_v1"},
{{BCM47XX_BOARD_LUXUL_XAP_1210_V1, "Luxul XAP-1210 V1"}, "luxul_xap1210_v1"},
{{BCM47XX_BOARD_LUXUL_XAP_1230_V1, "Luxul XAP-1230 V1"}, "luxul_xap1230_v1"},
{{BCM47XX_BOARD_LUXUL_XAP_1240_V1, "Luxul XAP-1240 V1"}, "luxul_xap1240_v1"},
{{BCM47XX_BOARD_LUXUL_XAP_1500_V1, "Luxul XAP-1500 V1"}, "luxul_xap1500_v1"},
{{BCM47XX_BOARD_LUXUL_XBR_4400_V1, "Luxul XBR-4400 V1"}, "luxul_xbr4400_v1"},
{{BCM47XX_BOARD_LUXUL_XVW_P30_V1, "Luxul XVW-P30 V1"}, "luxul_xvwp30_v1"},
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"}, {{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
......
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
.active_low = 1, \ .active_low = 1, \
} }
#define BCM47XX_GPIO_KEY_H(_gpio, _code) \
{ \
.code = _code, \
.gpio = _gpio, \
}
/* Asus */ /* Asus */
static const struct gpio_keys_button static const struct gpio_keys_button
...@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = { ...@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = {
static const struct gpio_keys_button static const struct gpio_keys_button
bcm47xx_buttons_asus_wl500w[] __initconst = { bcm47xx_buttons_asus_wl500w[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART), BCM47XX_GPIO_KEY_H(6, KEY_RESTART),
BCM47XX_GPIO_KEY(7, KEY_WPS_BUTTON), BCM47XX_GPIO_KEY_H(7, KEY_WPS_BUTTON),
}; };
static const struct gpio_keys_button static const struct gpio_keys_button
...@@ -301,6 +307,51 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = { ...@@ -301,6 +307,51 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = {
/* Luxul */ /* Luxul */
static const struct gpio_keys_button
bcm47xx_buttons_luxul_abr_4400_v1[] = {
BCM47XX_GPIO_KEY(14, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xap_310_v1[] = {
BCM47XX_GPIO_KEY(20, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xap_1210_v1[] = {
BCM47XX_GPIO_KEY(8, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xap_1230_v1[] = {
BCM47XX_GPIO_KEY(8, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xap_1240_v1[] = {
BCM47XX_GPIO_KEY(8, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xap_1500_v1[] = {
BCM47XX_GPIO_KEY(14, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xbr_4400_v1[] = {
BCM47XX_GPIO_KEY(14, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xvw_p30_v1[] = {
BCM47XX_GPIO_KEY(20, KEY_RESTART),
};
static const struct gpio_keys_button
bcm47xx_buttons_luxul_xwr_600_v1[] = {
BCM47XX_GPIO_KEY(8, KEY_RESTART),
};
static const struct gpio_keys_button static const struct gpio_keys_button
bcm47xx_buttons_luxul_xwr_1750_v1[] = { bcm47xx_buttons_luxul_xwr_1750_v1[] = {
BCM47XX_GPIO_KEY(14, BTN_TASK), BCM47XX_GPIO_KEY(14, BTN_TASK),
...@@ -561,6 +612,33 @@ int __init bcm47xx_buttons_register(void) ...@@ -561,6 +612,33 @@ int __init bcm47xx_buttons_register(void)
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs); err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs);
break; break;
case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_abr_4400_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_310_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_310_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1210_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1230_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1240_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xap_1500_v1);
break;
case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xbr_4400_v1);
break;
case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xvw_p30_v1);
break;
case BCM47XX_BOARD_LUXUL_XWR_600_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_600_v1);
break;
case BCM47XX_BOARD_LUXUL_XWR_1750_V1: case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1); err = bcm47xx_copy_bdata(bcm47xx_buttons_luxul_xwr_1750_v1);
break; break;
......
...@@ -372,6 +372,60 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initconst = { ...@@ -372,6 +372,60 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initconst = {
/* Luxul */ /* Luxul */
static const struct gpio_led
bcm47xx_leds_luxul_abr_4400_v1[] __initconst = {
BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xap_310_v1[] __initconst = {
BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xap_1210_v1[] __initconst = {
BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xap_1230_v1[] __initconst = {
BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xap_1240_v1[] __initconst = {
BCM47XX_GPIO_LED(3, "blue", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED(4, "green", "bridge", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED_TRIGGER(15, "green", "status", 0, "timer"),
};
static const struct gpio_led
bcm47xx_leds_luxul_xvw_p30_v1[] __initconst = {
BCM47XX_GPIO_LED_TRIGGER(0, "blue", "status", 1, "timer"),
BCM47XX_GPIO_LED(1, "green", "link", 1, LEDS_GPIO_DEFSTATE_OFF),
};
static const struct gpio_led
bcm47xx_leds_luxul_xwr_600_v1[] __initconst = {
BCM47XX_GPIO_LED(3, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED_TRIGGER(6, "green", "status", 1, "timer"),
BCM47XX_GPIO_LED(9, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
};
static const struct gpio_led static const struct gpio_led
bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = { bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF), BCM47XX_GPIO_LED(5, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
...@@ -633,6 +687,33 @@ void __init bcm47xx_leds_register(void) ...@@ -633,6 +687,33 @@ void __init bcm47xx_leds_register(void)
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs); bcm47xx_set_pdata(bcm47xx_leds_linksys_wrtsl54gs);
break; break;
case BCM47XX_BOARD_LUXUL_ABR_4400_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_abr_4400_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_310_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_310_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1210_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1210_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1230_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1230_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1240_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1240_v1);
break;
case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
break;
case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
break;
case BCM47XX_BOARD_LUXUL_XVW_P30_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xvw_p30_v1);
break;
case BCM47XX_BOARD_LUXUL_XWR_600_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_600_v1);
break;
case BCM47XX_BOARD_LUXUL_XWR_1750_V1: case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1); bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
break; break;
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
* Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr> * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
*/ */
#include <linux/module.h> #include <linux/init.h>
#include <linux/export.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h> #include <linux/clk.h>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/cpu-info.h> #include <asm/cpu-info.h>
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/errno.h>
#include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/log2.h> #include <linux/log2.h>
#include <bcm63xx_cpu.h> #include <bcm63xx_cpu.h>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio/driver.h> #include <linux/gpio/driver.h>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/irq_cpu.h> #include <asm/irq_cpu.h>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
* Copyright (C) 2012 Jonas Gorski <jonas.gorski@gmail.com> * Copyright (C) 2012 Jonas Gorski <jonas.gorski@gmail.com>
*/ */
#include <linux/module.h> #include <linux/init.h>
#include <linux/export.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h> #include <linux/clk.h>
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/module.h> #include <linux/init.h>
#include <linux/export.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/clk.h> #include <linux/clk.h>
......
...@@ -18,14 +18,14 @@ include $(srctree)/arch/mips/Kbuild.platforms ...@@ -18,14 +18,14 @@ include $(srctree)/arch/mips/Kbuild.platforms
BOOT_HEAP_SIZE := 0x400000 BOOT_HEAP_SIZE := 0x400000
# Disable Function Tracer # Disable Function Tracer
KBUILD_CFLAGS := $(shell echo $(KBUILD_CFLAGS) | sed -e "s/-pg//") KBUILD_CFLAGS := $(filter-out -pg, $(KBUILD_CFLAGS))
KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS))
KBUILD_CFLAGS := $(LINUXINCLUDE) $(KBUILD_CFLAGS) -D__KERNEL__ \ KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ \
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull"
KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
...@@ -84,6 +84,7 @@ else ...@@ -84,6 +84,7 @@ else
VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
endif endif
UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS)
vmlinuzobjs-y += $(obj)/piggy.o vmlinuzobjs-y += $(obj)/piggy.o
...@@ -129,4 +130,7 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec ...@@ -129,4 +130,7 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec
vmlinuz.srec: vmlinuz vmlinuz.srec: vmlinuz
$(call cmd,objcopy) $(call cmd,objcopy)
uzImage.bin: vmlinuz.bin FORCE
$(call if_changed,uimage,none)
clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec} clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec}
dts-dirs += brcm dts-dirs += brcm
dts-dirs += cavium-octeon dts-dirs += cavium-octeon
dts-dirs += img
dts-dirs += ingenic dts-dirs += ingenic
dts-dirs += lantiq dts-dirs += lantiq
dts-dirs += mti dts-dirs += mti
......
...@@ -91,15 +91,15 @@ upg_irq0_intc: interrupt-controller@406780 { ...@@ -91,15 +91,15 @@ upg_irq0_intc: interrupt-controller@406780 {
compatible = "brcm,bcm7120-l2-intc"; compatible = "brcm,bcm7120-l2-intc";
reg = <0x406780 0x8>; reg = <0x406780 0x8>;
brcm,int-map-mask = <0x44>, <0xf000000>; brcm,int-map-mask = <0x44>, <0xf000000>, <0x100000>;
brcm,int-fwd-mask = <0x70000>; brcm,int-fwd-mask = <0x70000>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&periph_intc>; interrupt-parent = <&periph_intc>;
interrupts = <18>, <19>; interrupts = <18>, <19>, <20>;
interrupt-names = "upg_main", "upg_bsc"; interrupt-names = "upg_main", "upg_bsc", "upg_spi";
}; };
sun_top_ctrl: syscon@404000 { sun_top_ctrl: syscon@404000 {
...@@ -226,5 +226,48 @@ ohci0: usb@488400 { ...@@ -226,5 +226,48 @@ ohci0: usb@488400 {
interrupts = <61>; interrupts = <61>;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@411d00 {
compatible = "brcm,l2-intc";
reg = <0x411d00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <79>;
};
qspi: spi@443000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@406400 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x406400 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -439,5 +439,48 @@ sdhci0: sdhci@413500 { ...@@ -439,5 +439,48 @@ sdhci0: sdhci@413500 {
interrupts = <85>; interrupts = <85>;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@411d00 {
compatible = "brcm,l2-intc";
reg = <0x411d00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <31>;
};
qspi: spi@413000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@408a00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x408a00 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_aon_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -318,5 +318,48 @@ nand: nand@412800 { ...@@ -318,5 +318,48 @@ nand: nand@412800 {
interrupts = <24>; interrupts = <24>;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@411d00 {
compatible = "brcm,l2-intc";
reg = <0x411d00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <31>;
};
qspi: spi@413000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@408a00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x408a00 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_aon_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -358,5 +358,48 @@ sdhci0: sdhci@410000 { ...@@ -358,5 +358,48 @@ sdhci0: sdhci@410000 {
interrupts = <82>; interrupts = <82>;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@411d00 {
compatible = "brcm,l2-intc";
reg = <0x411d00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <31>;
};
qspi: spi@413000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@408a00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x408a00 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_aon_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -354,5 +354,48 @@ sdhci0: sdhci@410000 { ...@@ -354,5 +354,48 @@ sdhci0: sdhci@410000 {
interrupts = <82>; interrupts = <82>;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@411d00 {
compatible = "brcm,l2-intc";
reg = <0x411d00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <31>;
};
qspi: spi@413000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@408a00 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x408a00 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_aon_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -92,15 +92,15 @@ upg_irq0_intc: interrupt-controller@406780 { ...@@ -92,15 +92,15 @@ upg_irq0_intc: interrupt-controller@406780 {
compatible = "brcm,bcm7120-l2-intc"; compatible = "brcm,bcm7120-l2-intc";
reg = <0x406780 0x8>; reg = <0x406780 0x8>;
brcm,int-map-mask = <0x44>, <0x1f000000>; brcm,int-map-mask = <0x44>, <0x1f000000>, <0x100000>;
brcm,int-fwd-mask = <0x70000>; brcm,int-fwd-mask = <0x70000>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&periph_intc>; interrupt-parent = <&periph_intc>;
interrupts = <18>, <19>; interrupts = <18>, <19>, <20>;
interrupt-names = "upg_main", "upg_bsc"; interrupt-names = "upg_main", "upg_bsc", "upg_spi";
}; };
sun_top_ctrl: syscon@404000 { sun_top_ctrl: syscon@404000 {
...@@ -287,5 +287,48 @@ ohci1: usb@488600 { ...@@ -287,5 +287,48 @@ ohci1: usb@488600 {
interrupts = <62>; interrupts = <62>;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@411d00 {
compatible = "brcm,l2-intc";
reg = <0x411d00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <78>;
};
qspi: spi@443000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@406400 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x406400 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -450,5 +450,48 @@ sdhci1: sdhci@419200 { ...@@ -450,5 +450,48 @@ sdhci1: sdhci@419200 {
mmc-hs200-1_8v; mmc-hs200-1_8v;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@41ad00 {
compatible = "brcm,l2-intc";
reg = <0x41ad00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <25>;
};
qspi: spi@41c000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x419920 0x4 0x41c200 0x188 0x41c000 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@409200 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x409200 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_aon_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -465,5 +465,48 @@ sdhci1: sdhci@41a200 { ...@@ -465,5 +465,48 @@ sdhci1: sdhci@41a200 {
mmc-hs200-1_8v; mmc-hs200-1_8v;
status = "disabled"; status = "disabled";
}; };
spi_l2_intc: interrupt-controller@41bd00 {
compatible = "brcm,l2-intc";
reg = <0x41bd00 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <25>;
};
qspi: spi@41d200 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-qspi";
clocks = <&upg_clk>;
reg = <0x41a920 0x4 0x41d400 0x188 0x41d200 0x50>;
reg-names = "cs_reg", "hif_mspi", "bspi";
interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>;
interrupt-parent = <&spi_l2_intc>;
interrupt-names = "spi_lr_fullness_reached",
"spi_lr_session_aborted",
"spi_lr_impatient",
"spi_lr_session_done",
"spi_lr_overread",
"mspi_done",
"mspi_halted";
status = "disabled";
};
mspi: spi@409200 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "brcm,spi-bcm-qspi",
"brcm,spi-brcmstb-mspi";
clocks = <&upg_clk>;
reg = <0x409200 0x180>;
reg-names = "mspi";
interrupts = <0x14>;
interrupt-parent = <&upg_aon_irq0_intc>;
interrupt-names = "mspi_done";
status = "disabled";
};
}; };
}; };
...@@ -57,3 +57,7 @@ &ehci0 { ...@@ -57,3 +57,7 @@ &ehci0 {
&ohci0 { &ohci0 {
status = "disabled"; status = "disabled";
}; };
&mspi {
status = "okay";
};
...@@ -109,3 +109,7 @@ &sata_phy { ...@@ -109,3 +109,7 @@ &sata_phy {
&sdhci0 { &sdhci0 {
status = "okay"; status = "okay";
}; };
&mspi {
status = "okay";
};
...@@ -69,3 +69,39 @@ &ohci0 { ...@@ -69,3 +69,39 @@ &ohci0 {
&nand { &nand {
status = "okay"; status = "okay";
}; };
&qspi {
status = "okay";
m25p80@0 {
compatible = "m25p80";
reg = <0>;
spi-max-frequency = <40000000>;
spi-cpol;
spi-cpha;
use-bspi;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
flash0.cfe@0 {
reg = <0x0 0x200000>;
};
flash0.mac@200000 {
reg = <0x200000 0x40000>;
};
flash0.nvram@240000 {
reg = <0x240000 0x10000>;
};
};
};
};
&mspi {
status = "okay";
};
...@@ -72,3 +72,39 @@ &sata_phy { ...@@ -72,3 +72,39 @@ &sata_phy {
&sdhci0 { &sdhci0 {
status = "okay"; status = "okay";
}; };
&qspi {
status = "okay";
m25p80@0 {
compatible = "m25p80";
reg = <0>;
spi-max-frequency = <40000000>;
spi-cpol;
spi-cpha;
use-bspi;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
flash0.cfe@0 {
reg = <0x0 0x200000>;
};
flash0.mac@200000 {
reg = <0x200000 0x40000>;
};
flash0.nvram@240000 {
reg = <0x240000 0x10000>;
};
};
};
};
&mspi {
status = "okay";
};
...@@ -73,3 +73,7 @@ &sata_phy { ...@@ -73,3 +73,7 @@ &sata_phy {
&sdhci0 { &sdhci0 {
status = "okay"; status = "okay";
}; };
&mspi {
status = "okay";
};
...@@ -79,3 +79,7 @@ &ehci1 { ...@@ -79,3 +79,7 @@ &ehci1 {
&ohci1 { &ohci1 {
status = "okay"; status = "okay";
}; };
&mspi {
status = "okay";
};
...@@ -107,3 +107,39 @@ &sdhci0 { ...@@ -107,3 +107,39 @@ &sdhci0 {
&sdhci1 { &sdhci1 {
status = "okay"; status = "okay";
}; };
&qspi {
status = "okay";
m25p80@0 {
compatible = "m25p80";
reg = <0>;
spi-max-frequency = <40000000>;
spi-cpol;
spi-cpha;
use-bspi;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
flash0.cfe@0 {
reg = <0x0 0x200000>;
};
flash0.mac@200000 {
reg = <0x200000 0x40000>;
};
flash0.nvram@240000 {
reg = <0x240000 0x10000>;
};
};
};
};
&mspi {
status = "okay";
};
...@@ -115,3 +115,7 @@ &sdhci0 { ...@@ -115,3 +115,7 @@ &sdhci0 {
&sdhci1 { &sdhci1 {
status = "okay"; status = "okay";
}; };
&mspi {
status = "okay";
};
dtb-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
This diff is collapsed.
/*
* Copyright (C) 2015, 2016 Imagination Technologies Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* IMG Marduk board is also known as Creator Ci40.
*/
/dts-v1/;
#include "pistachio.dtsi"
/ {
model = "IMG Marduk (Creator Ci40)";
compatible = "img,pistachio-marduk", "img,pistachio";
aliases {
serial0 = &uart0;
serial1 = &uart1;
ethernet0 = &enet;
spi0 = &spfi0;
spi1 = &spfi1;
};
chosen {
bootargs = "root=/dev/sda1 rootwait ro lpj=723968";
stdout-path = "serial1:115200";
};
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
reg_1v8: fixed-regulator {
compatible = "regulator-fixed";
regulator-name = "aux_adc_vref";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
};
internal_dac_supply: internal-dac-supply {
compatible = "regulator-fixed";
regulator-name = "internal_dac_supply";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
leds {
compatible = "pwm-leds";
heartbeat {
label = "marduk:red:heartbeat";
pwms = <&pwm 3 300000>;
max-brightness = <255>;
linux,default-trigger = "heartbeat";
};
};
keys {
compatible = "gpio-keys";
button@1 {
label = "Button 1";
linux,code = <0x101>; /* BTN_1 */
gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
};
button@2 {
label = "Button 2";
linux,code = <0x102>; /* BTN_2 */
gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
};
};
};
&internal_dac {
VDD-supply = <&internal_dac_supply>;
};
&spfi1 {
status = "okay";
pinctrl-0 = <&spim1_pins>, <&spim1_quad_pins>, <&spim1_cs0_pin>,
<&spim1_cs1_pin>;
pinctrl-names = "default";
cs-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>;
flash@0 {
compatible = "spansion,s25fl016k", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
};
};
&uart0 {
status = "okay";
assigned-clock-rates = <114278400>, <1843200>;
};
&uart1 {
status = "okay";
};
&usb {
status = "okay";
};
&enet {
status = "okay";
};
&pin_enet {
drive-strength = <2>;
};
&pin_enet_phy_clk {
drive-strength = <2>;
};
&sdhost {
status = "okay";
bus-width = <4>;
disable-wp;
};
&pin_sdhost_cmd {
drive-strength = <2>;
};
&pin_sdhost_data {
drive-strength = <2>;
};
&pwm {
status = "okay";
pinctrl-0 = <&pwmpdm0_pin>, <&pwmpdm1_pin>, <&pwmpdm2_pin>,
<&pwmpdm3_pin>;
pinctrl-names = "default";
};
&adc {
status = "okay";
vref-supply = <&reg_1v8>;
adc-reserved-channels = <0x10>;
};
&i2c2 {
status = "okay";
clock-frequency = <400000>;
tpm@20 {
compatible = "infineon,slb9645tt";
reg = <0x20>;
};
};
&i2c3 {
status = "okay";
clock-frequency = <400000>;
};
...@@ -17,6 +17,18 @@ cpuintc: interrupt-controller { ...@@ -17,6 +17,18 @@ cpuintc: interrupt-controller {
compatible = "mti,cpu-interrupt-controller"; compatible = "mti,cpu-interrupt-controller";
}; };
axi_intc: interrupt-controller@10200000 {
#interrupt-cells = <1>;
compatible = "xlnx,xps-intc-1.00.a";
interrupt-controller;
reg = <0x10200000 0x10000>;
xlnx,kind-of-intr = <0x0>;
xlnx,num-intr-inputs = <0x6>;
interrupt-parent = <&cpuintc>;
interrupts = <6>;
};
axi_gpio: gpio@10600000 { axi_gpio: gpio@10600000 {
#gpio-cells = <1>; #gpio-cells = <1>;
compatible = "xlnx,xps-gpio-1.00.a"; compatible = "xlnx,xps-gpio-1.00.a";
...@@ -30,6 +42,32 @@ axi_gpio: gpio@10600000 { ...@@ -30,6 +42,32 @@ axi_gpio: gpio@10600000 {
xlnx,tri-default = <0xffffffff>; xlnx,tri-default = <0xffffffff>;
} ; } ;
axi_ethernetlite: ethernet@10e00000 {
compatible = "xlnx,xps-ethernetlite-3.00.a";
device_type = "network";
interrupt-parent = <&axi_intc>;
interrupts = <1>;
phy-handle = <&phy0>;
reg = <0x10e00000 0x10000>;
xlnx,duplex = <0x1>;
xlnx,include-global-buffers = <0x1>;
xlnx,include-internal-loopback = <0x0>;
xlnx,include-mdio = <0x1>;
xlnx,instance = "axi_ethernetlite_inst";
xlnx,rx-ping-pong = <0x1>;
xlnx,s-axi-id-width = <0x1>;
xlnx,tx-ping-pong = <0x1>;
xlnx,use-internal = <0x0>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@1 {
device_type = "ethernet-phy";
reg = <1>;
};
};
};
axi_uart16550: serial@10400000 { axi_uart16550: serial@10400000 {
compatible = "ns16550a"; compatible = "ns16550a";
reg = <0x10400000 0x10000>; reg = <0x10400000 0x10000>;
...@@ -38,7 +76,32 @@ axi_uart16550: serial@10400000 { ...@@ -38,7 +76,32 @@ axi_uart16550: serial@10400000 {
reg-offset = <0x1000>; reg-offset = <0x1000>;
clocks = <&ext>; clocks = <&ext>;
interrupt-parent = <&axi_intc>;
interrupts = <0>;
}; };
axi_i2c: i2c@10A00000 {
compatible = "xlnx,xps-iic-2.00.a";
interrupt-parent = <&axi_intc>;
interrupts = <4>;
reg = < 0x10A00000 0x10000 >;
clocks = <&ext>;
xlnx,clk-freq = <0x5f5e100>;
xlnx,family = "Artix7";
xlnx,gpo-width = <0x1>;
xlnx,iic-freq = <0x186a0>;
xlnx,scl-inertial-delay = <0x0>;
xlnx,sda-inertial-delay = <0x0>;
xlnx,ten-bit-adr = <0x0>;
#address-cells = <1>;
#size-cells = <0>;
ad7420@4B {
compatible = "adi,adt7420";
reg = <0x4B>;
};
} ;
}; };
&ext { &ext {
......
...@@ -18,3 +18,4 @@ obj-y += crypto/ ...@@ -18,3 +18,4 @@ obj-y += crypto/
obj-$(CONFIG_MTD) += flash_setup.o obj-$(CONFIG_MTD) += flash_setup.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_OCTEON_ILM) += oct_ilm.o obj-$(CONFIG_OCTEON_ILM) += oct_ilm.o
obj-$(CONFIG_USB) += octeon-usb.o
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
#include <asm/cop2.h> #include <asm/cop2.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include "octeon-crypto.h" #include "octeon-crypto.h"
......
...@@ -164,19 +164,14 @@ static void *octeon_dma_alloc_coherent(struct device *dev, size_t size, ...@@ -164,19 +164,14 @@ static void *octeon_dma_alloc_coherent(struct device *dev, size_t size,
/* ignore region specifiers */ /* ignore region specifiers */
gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);
#ifdef CONFIG_ZONE_DMA if (IS_ENABLED(CONFIG_ZONE_DMA) && dev == NULL)
if (dev == NULL)
gfp |= __GFP_DMA; gfp |= __GFP_DMA;
else if (dev->coherent_dma_mask <= DMA_BIT_MASK(24)) else if (IS_ENABLED(CONFIG_ZONE_DMA) &&
dev->coherent_dma_mask <= DMA_BIT_MASK(24))
gfp |= __GFP_DMA; gfp |= __GFP_DMA;
else else if (IS_ENABLED(CONFIG_ZONE_DMA32) &&
#endif dev->coherent_dma_mask <= DMA_BIT_MASK(32))
#ifdef CONFIG_ZONE_DMA32
if (dev->coherent_dma_mask <= DMA_BIT_MASK(32))
gfp |= __GFP_DMA32; gfp |= __GFP_DMA32;
else
#endif
;
/* Don't invoke OOM killer */ /* Don't invoke OOM killer */
gfp |= __GFP_NORETRY; gfp |= __GFP_NORETRY;
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
* application start time. * application start time.
*/ */
#include <linux/export.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <asm/octeon/cvmx.h> #include <asm/octeon/cvmx.h>
#include <asm/octeon/cvmx-spinlock.h> #include <asm/octeon/cvmx-spinlock.h>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* these functions directly. * these functions directly.
* *
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
......
...@@ -287,8 +287,7 @@ cvmx_helper_link_info_t __cvmx_helper_rgmii_link_get(int ipd_port) ...@@ -287,8 +287,7 @@ cvmx_helper_link_info_t __cvmx_helper_rgmii_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -500,8 +500,7 @@ cvmx_helper_link_info_t __cvmx_helper_sgmii_link_get(int ipd_port) ...@@ -500,8 +500,7 @@ cvmx_helper_link_info_t __cvmx_helper_sgmii_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -188,8 +188,7 @@ cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port) ...@@ -188,8 +188,7 @@ cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -295,8 +295,7 @@ cvmx_helper_link_info_t __cvmx_helper_xaui_link_get(int ipd_port) ...@@ -295,8 +295,7 @@ cvmx_helper_link_info_t __cvmx_helper_xaui_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -69,10 +69,6 @@ void (*cvmx_override_ipd_port_setup) (int ipd_port); ...@@ -69,10 +69,6 @@ void (*cvmx_override_ipd_port_setup) (int ipd_port);
/* Port count per interface */ /* Port count per interface */
static int interface_port_count[5]; static int interface_port_count[5];
/* Port last configured link info index by IPD/PKO port */
static cvmx_helper_link_info_t
port_link_info[CVMX_PIP_NUM_INPUT_PORTS];
/** /**
* Return the number of interfaces the chip has. Each interface * Return the number of interfaces the chip has. Each interface
* may have multiple ports. Most chips support two interfaces, * may have multiple ports. Most chips support two interfaces,
...@@ -1135,41 +1131,6 @@ int cvmx_helper_initialize_packet_io_local(void) ...@@ -1135,41 +1131,6 @@ int cvmx_helper_initialize_packet_io_local(void)
return cvmx_pko_initialize_local(); return cvmx_pko_initialize_local();
} }
/**
* Auto configure an IPD/PKO port link state and speed. This
* function basically does the equivalent of:
* cvmx_helper_link_set(ipd_port, cvmx_helper_link_get(ipd_port));
*
* @ipd_port: IPD/PKO port to auto configure
*
* Returns Link state after configure
*/
cvmx_helper_link_info_t cvmx_helper_link_autoconf(int ipd_port)
{
cvmx_helper_link_info_t link_info;
int interface = cvmx_helper_get_interface_num(ipd_port);
int index = cvmx_helper_get_interface_index_num(ipd_port);
if (index >= cvmx_helper_ports_on_interface(interface)) {
link_info.u64 = 0;
return link_info;
}
link_info = cvmx_helper_link_get(ipd_port);
if (link_info.u64 == port_link_info[ipd_port].u64)
return link_info;
/* If we fail to set the link speed, port_link_info will not change */
cvmx_helper_link_set(ipd_port, link_info);
/*
* port_link_info should be the current value, which will be
* different than expect if cvmx_helper_link_set() failed.
*/
return port_link_info[ipd_port];
}
EXPORT_SYMBOL_GPL(cvmx_helper_link_autoconf);
/** /**
* Return the link state of an IPD/PKO port as returned by * Return the link state of an IPD/PKO port as returned by
* auto negotiation. The result of this function may not match * auto negotiation. The result of this function may not match
...@@ -1233,8 +1194,7 @@ EXPORT_SYMBOL_GPL(cvmx_helper_link_get); ...@@ -1233,8 +1194,7 @@ EXPORT_SYMBOL_GPL(cvmx_helper_link_get);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
...@@ -1276,11 +1236,6 @@ int cvmx_helper_link_set(int ipd_port, cvmx_helper_link_info_t link_info) ...@@ -1276,11 +1236,6 @@ int cvmx_helper_link_set(int ipd_port, cvmx_helper_link_info_t link_info)
case CVMX_HELPER_INTERFACE_MODE_LOOP: case CVMX_HELPER_INTERFACE_MODE_LOOP:
break; break;
} }
/* Set the port_link_info here so that the link status is updated
no matter how cvmx_helper_link_set is called. We don't change
the value if link_set failed */
if (result == 0)
port_link_info[ipd_port].u64 = link_info.u64;
return result; return result;
} }
EXPORT_SYMBOL_GPL(cvmx_helper_link_set); EXPORT_SYMBOL_GPL(cvmx_helper_link_set);
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* This module provides system/board/application information obtained * This module provides system/board/application information obtained
* by the bootloader. * by the bootloader.
*/ */
#include <linux/module.h> #include <linux/export.h>
#include <asm/octeon/cvmx.h> #include <asm/octeon/cvmx.h>
#include <asm/octeon/cvmx-sysinfo.h> #include <asm/octeon/cvmx-sysinfo.h>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/export.h>
#include <asm/regdef.h> #include <asm/regdef.h>
#define dst a0 #define dst a0
...@@ -142,6 +143,7 @@ ...@@ -142,6 +143,7 @@
* t7 is used as a flag to note inatomic mode. * t7 is used as a flag to note inatomic mode.
*/ */
LEAF(__copy_user_inatomic) LEAF(__copy_user_inatomic)
EXPORT_SYMBOL(__copy_user_inatomic)
b __copy_user_common b __copy_user_common
li t7, 1 li t7, 1
END(__copy_user_inatomic) END(__copy_user_inatomic)
...@@ -154,9 +156,11 @@ LEAF(__copy_user_inatomic) ...@@ -154,9 +156,11 @@ LEAF(__copy_user_inatomic)
*/ */
.align 5 .align 5
LEAF(memcpy) /* a0=dst a1=src a2=len */ LEAF(memcpy) /* a0=dst a1=src a2=len */
EXPORT_SYMBOL(memcpy)
move v0, dst /* return value */ move v0, dst /* return value */
__memcpy: __memcpy:
FEXPORT(__copy_user) FEXPORT(__copy_user)
EXPORT_SYMBOL(__copy_user)
li t7, 0 /* not inatomic */ li t7, 0 /* not inatomic */
__copy_user_common: __copy_user_common:
/* /*
...@@ -208,18 +212,18 @@ EXC( STORE t2, UNIT(6)(dst), s_exc_p10u) ...@@ -208,18 +212,18 @@ EXC( STORE t2, UNIT(6)(dst), s_exc_p10u)
ADD src, src, 16*NBYTES ADD src, src, 16*NBYTES
EXC( STORE t3, UNIT(7)(dst), s_exc_p9u) EXC( STORE t3, UNIT(7)(dst), s_exc_p9u)
ADD dst, dst, 16*NBYTES ADD dst, dst, 16*NBYTES
EXC( LOAD t0, UNIT(-8)(src), l_exc_copy) EXC( LOAD t0, UNIT(-8)(src), l_exc_copy_rewind16)
EXC( LOAD t1, UNIT(-7)(src), l_exc_copy) EXC( LOAD t1, UNIT(-7)(src), l_exc_copy_rewind16)
EXC( LOAD t2, UNIT(-6)(src), l_exc_copy) EXC( LOAD t2, UNIT(-6)(src), l_exc_copy_rewind16)
EXC( LOAD t3, UNIT(-5)(src), l_exc_copy) EXC( LOAD t3, UNIT(-5)(src), l_exc_copy_rewind16)
EXC( STORE t0, UNIT(-8)(dst), s_exc_p8u) EXC( STORE t0, UNIT(-8)(dst), s_exc_p8u)
EXC( STORE t1, UNIT(-7)(dst), s_exc_p7u) EXC( STORE t1, UNIT(-7)(dst), s_exc_p7u)
EXC( STORE t2, UNIT(-6)(dst), s_exc_p6u) EXC( STORE t2, UNIT(-6)(dst), s_exc_p6u)
EXC( STORE t3, UNIT(-5)(dst), s_exc_p5u) EXC( STORE t3, UNIT(-5)(dst), s_exc_p5u)
EXC( LOAD t0, UNIT(-4)(src), l_exc_copy) EXC( LOAD t0, UNIT(-4)(src), l_exc_copy_rewind16)
EXC( LOAD t1, UNIT(-3)(src), l_exc_copy) EXC( LOAD t1, UNIT(-3)(src), l_exc_copy_rewind16)
EXC( LOAD t2, UNIT(-2)(src), l_exc_copy) EXC( LOAD t2, UNIT(-2)(src), l_exc_copy_rewind16)
EXC( LOAD t3, UNIT(-1)(src), l_exc_copy) EXC( LOAD t3, UNIT(-1)(src), l_exc_copy_rewind16)
EXC( STORE t0, UNIT(-4)(dst), s_exc_p4u) EXC( STORE t0, UNIT(-4)(dst), s_exc_p4u)
EXC( STORE t1, UNIT(-3)(dst), s_exc_p3u) EXC( STORE t1, UNIT(-3)(dst), s_exc_p3u)
EXC( STORE t2, UNIT(-2)(dst), s_exc_p2u) EXC( STORE t2, UNIT(-2)(dst), s_exc_p2u)
...@@ -383,6 +387,10 @@ done: ...@@ -383,6 +387,10 @@ done:
nop nop
END(memcpy) END(memcpy)
l_exc_copy_rewind16:
/* Rewind src and dst by 16*NBYTES for l_exc_copy */
SUB src, src, 16*NBYTES
SUB dst, dst, 16*NBYTES
l_exc_copy: l_exc_copy:
/* /*
* Copy bytes from src until faulting load address (or until a * Copy bytes from src until faulting load address (or until a
...@@ -459,6 +467,7 @@ s_exc: ...@@ -459,6 +467,7 @@ s_exc:
.align 5 .align 5
LEAF(memmove) LEAF(memmove)
EXPORT_SYMBOL(memmove)
ADD t0, a0, a2 ADD t0, a0, a2
ADD t1, a1, a2 ADD t1, a1, a2
sltu t0, a1, t0 # dst + len <= src -> memcpy sltu t0, a1, t0 # dst + len <= src -> memcpy
......
...@@ -448,6 +448,7 @@ static struct of_device_id __initdata octeon_ids[] = { ...@@ -448,6 +448,7 @@ static struct of_device_id __initdata octeon_ids[] = {
{ .compatible = "cavium,octeon-3860-bootbus", }, { .compatible = "cavium,octeon-3860-bootbus", },
{ .compatible = "cavium,mdio-mux", }, { .compatible = "cavium,mdio-mux", },
{ .compatible = "gpio-leds", }, { .compatible = "gpio-leds", },
{ .compatible = "cavium,octeon-7130-usb-uctl", },
{}, {},
}; };
......
This diff is collapsed.
...@@ -949,6 +949,29 @@ static __init void memory_exclude_page(u64 addr, u64 *mem, u64 *size) ...@@ -949,6 +949,29 @@ static __init void memory_exclude_page(u64 addr, u64 *mem, u64 *size)
} }
#endif /* CONFIG_CRASH_DUMP */ #endif /* CONFIG_CRASH_DUMP */
void __init fw_init_cmdline(void)
{
int i;
octeon_boot_desc_ptr = (struct octeon_boot_descriptor *)fw_arg3;
for (i = 0; i < octeon_boot_desc_ptr->argc; i++) {
const char *arg =
cvmx_phys_to_ptr(octeon_boot_desc_ptr->argv[i]);
if (strlen(arcs_cmdline) + strlen(arg) + 1 <
sizeof(arcs_cmdline) - 1) {
strcat(arcs_cmdline, " ");
strcat(arcs_cmdline, arg);
}
}
}
void __init *plat_get_fdt(void)
{
octeon_bootinfo =
cvmx_phys_to_ptr(octeon_boot_desc_ptr->cvmx_desc_vaddr);
return phys_to_virt(octeon_bootinfo->fdt_addr);
}
void __init plat_mem_setup(void) void __init plat_mem_setup(void)
{ {
uint64_t mem_alloc_size; uint64_t mem_alloc_size;
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/module.h> #include <linux/init.h>
#include <linux/export.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/time.h> #include <asm/time.h>
...@@ -24,12 +25,17 @@ ...@@ -24,12 +25,17 @@
volatile unsigned long octeon_processor_boot = 0xff; volatile unsigned long octeon_processor_boot = 0xff;
volatile unsigned long octeon_processor_sp; volatile unsigned long octeon_processor_sp;
volatile unsigned long octeon_processor_gp; volatile unsigned long octeon_processor_gp;
#ifdef CONFIG_RELOCATABLE
volatile unsigned long octeon_processor_relocated_kernel_entry;
#endif /* CONFIG_RELOCATABLE */
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
uint64_t octeon_bootloader_entry_addr; uint64_t octeon_bootloader_entry_addr;
EXPORT_SYMBOL(octeon_bootloader_entry_addr); EXPORT_SYMBOL(octeon_bootloader_entry_addr);
#endif #endif
extern void kernel_entry(unsigned long arg1, ...);
static void octeon_icache_flush(void) static void octeon_icache_flush(void)
{ {
asm volatile ("synci 0($0)\n"); asm volatile ("synci 0($0)\n");
...@@ -180,6 +186,19 @@ static void __init octeon_smp_setup(void) ...@@ -180,6 +186,19 @@ static void __init octeon_smp_setup(void)
octeon_smp_hotplug_setup(); octeon_smp_hotplug_setup();
} }
#ifdef CONFIG_RELOCATABLE
int plat_post_relocation(long offset)
{
unsigned long entry = (unsigned long)kernel_entry;
/* Send secondaries into relocated kernel */
octeon_processor_relocated_kernel_entry = entry + offset;
return 0;
}
#endif /* CONFIG_RELOCATABLE */
/** /**
* Firmware CPU startup hook * Firmware CPU startup hook
* *
...@@ -272,7 +291,6 @@ static int octeon_cpu_disable(void) ...@@ -272,7 +291,6 @@ static int octeon_cpu_disable(void)
set_cpu_online(cpu, false); set_cpu_online(cpu, false);
calculate_cpu_foreign_map(); calculate_cpu_foreign_map();
cpumask_clear_cpu(cpu, &cpu_callin_map);
octeon_fixup_irqs(); octeon_fixup_irqs();
__flush_cache_all(); __flush_cache_all();
...@@ -333,8 +351,6 @@ void play_dead(void) ...@@ -333,8 +351,6 @@ void play_dead(void)
; ;
} }
extern void kernel_entry(unsigned long arg1, ...);
static void start_after_reset(void) static void start_after_reset(void)
{ {
kernel_entry(0, 0, 0); /* set a2 = 0 for secondary core */ kernel_entry(0, 0, 0); /* set a2 = 0 for secondary core */
......
...@@ -45,6 +45,7 @@ CONFIG_SYN_COOKIES=y ...@@ -45,6 +45,7 @@ CONFIG_SYN_COOKIES=y
# CONFIG_INET_LRO is not set # CONFIG_INET_LRO is not set
CONFIG_IPV6=y CONFIG_IPV6=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
# CONFIG_FW_LOADER is not set # CONFIG_FW_LOADER is not set
CONFIG_MTD=y CONFIG_MTD=y
# CONFIG_MTD_OF_PARTS is not set # CONFIG_MTD_OF_PARTS is not set
......
...@@ -67,8 +67,8 @@ CONFIG_NETFILTER_NETLINK_QUEUE=m ...@@ -67,8 +67,8 @@ CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -133,7 +133,7 @@ CONFIG_LIBFC=m ...@@ -133,7 +133,7 @@ CONFIG_LIBFC=m
CONFIG_SCSI_QLOGIC_1280=y CONFIG_SCSI_QLOGIC_1280=y
CONFIG_SCSI_PMCRAID=m CONFIG_SCSI_PMCRAID=m
CONFIG_SCSI_BFA_FC=m CONFIG_SCSI_BFA_FC=m
CONFIG_SCSI_DH=m CONFIG_SCSI_DH=y
CONFIG_SCSI_DH_RDAC=m CONFIG_SCSI_DH_RDAC=m
CONFIG_SCSI_DH_HP_SW=m CONFIG_SCSI_DH_HP_SW=m
CONFIG_SCSI_DH_EMC=m CONFIG_SCSI_DH_EMC=m
...@@ -205,7 +205,6 @@ CONFIG_MLX4_EN=m ...@@ -205,7 +205,6 @@ CONFIG_MLX4_EN=m
# CONFIG_MLX4_DEBUG is not set # CONFIG_MLX4_DEBUG is not set
CONFIG_TEHUTI=m CONFIG_TEHUTI=m
CONFIG_BNX2X=m CONFIG_BNX2X=m
CONFIG_QLGE=m
CONFIG_SFC=m CONFIG_SFC=m
CONFIG_BE2NET=m CONFIG_BE2NET=m
CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM=m
......
...@@ -39,7 +39,7 @@ CONFIG_HIBERNATION=y ...@@ -39,7 +39,7 @@ CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="/dev/hda3" CONFIG_PM_STD_PARTITION="/dev/hda3"
CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m CONFIG_CPU_FREQ_GOV_USERSPACE=m
......
...@@ -74,6 +74,10 @@ CONFIG_SERIAL_8250_CONSOLE=y ...@@ -74,6 +74,10 @@ CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_GPIOLIB=y CONFIG_GPIOLIB=y
CONFIG_GPIO_LOONGSON1=y CONFIG_GPIO_LOONGSON1=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_WATCHDOG_SYSFS=y
CONFIG_LOONGSON1_WDT=y
# CONFIG_VGA_CONSOLE is not set # CONFIG_VGA_CONSOLE is not set
CONFIG_HID_GENERIC=m CONFIG_HID_GENERIC=m
CONFIG_USB_HID=m CONFIG_USB_HID=m
......
...@@ -75,6 +75,10 @@ CONFIG_SERIAL_8250_CONSOLE=y ...@@ -75,6 +75,10 @@ CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_GPIOLIB=y CONFIG_GPIOLIB=y
CONFIG_GPIO_LOONGSON1=y CONFIG_GPIO_LOONGSON1=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_WATCHDOG_SYSFS=y
CONFIG_LOONGSON1_WDT=y
# CONFIG_VGA_CONSOLE is not set # CONFIG_VGA_CONSOLE is not set
CONFIG_HID_GENERIC=m CONFIG_HID_GENERIC=m
CONFIG_USB_HID=m CONFIG_USB_HID=m
......
...@@ -59,8 +59,8 @@ CONFIG_NETFILTER=y ...@@ -59,8 +59,8 @@ CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -60,8 +60,8 @@ CONFIG_NETFILTER=y ...@@ -60,8 +60,8 @@ CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -59,8 +59,8 @@ CONFIG_NETFILTER=y ...@@ -59,8 +59,8 @@ CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -61,8 +61,8 @@ CONFIG_NETFILTER=y ...@@ -61,8 +61,8 @@ CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -110,7 +110,7 @@ CONFIG_NETFILTER=y ...@@ -110,7 +110,7 @@ CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -90,7 +90,7 @@ CONFIG_NETFILTER=y ...@@ -90,7 +90,7 @@ CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_UDPLITE=m CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m CONFIG_NF_CONNTRACK_H323=m
......
...@@ -7,6 +7,12 @@ CONFIG_EMBEDDED=y ...@@ -7,6 +7,12 @@ CONFIG_EMBEDDED=y
CONFIG_SLAB=y CONFIG_SLAB=y
# CONFIG_BLOCK is not set # CONFIG_BLOCK is not set
# CONFIG_SUSPEND is not set # CONFIG_SUSPEND is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IPV6 is not set
# CONFIG_WIRELESS is not set
# CONFIG_UEVENT_HELPER is not set # CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y CONFIG_DEVTMPFS_MOUNT=y
...@@ -14,6 +20,30 @@ CONFIG_DEVTMPFS_MOUNT=y ...@@ -14,6 +20,30 @@ CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set
# CONFIG_FW_LOADER is not set # CONFIG_FW_LOADER is not set
# CONFIG_ALLOW_DEV_COREDUMP is not set # CONFIG_ALLOW_DEV_COREDUMP is not set
CONFIG_NETDEVICES=y
# CONFIG_NET_CORE is not set
# CONFIG_NET_VENDOR_ARC is not set
# CONFIG_NET_CADENCE is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_EZCHIP is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NETRONOME is not set
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_NET_VENDOR_ROCKER is not set
# CONFIG_NET_VENDOR_SAMSUNG is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SYNOPSYS is not set
# CONFIG_NET_VENDOR_VIA is not set
# CONFIG_NET_VENDOR_WIZNET is not set
CONFIG_XILINX_EMACLITE=y
CONFIG_SMSC_PHY=y
# CONFIG_WLAN is not set
# CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSE is not set
...@@ -25,13 +55,18 @@ CONFIG_SERIAL_8250=y ...@@ -25,13 +55,18 @@ CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HW_RANDOM is not set # CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
CONFIG_I2C_XILINX=y
CONFIG_GPIO_SYSFS=y CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_XILINX=y CONFIG_GPIO_XILINX=y
# CONFIG_HWMON is not set CONFIG_SENSORS_ADT7410=y
# CONFIG_USB_SUPPORT is not set # CONFIG_USB_SUPPORT is not set
# CONFIG_MIPS_PLATFORM_DEVICES is not set # CONFIG_MIPS_PLATFORM_DEVICES is not set
# CONFIG_IOMMU_SUPPORT is not set # CONFIG_IOMMU_SUPPORT is not set
# CONFIG_PROC_PAGE_MONITOR is not set # CONFIG_PROC_PAGE_MONITOR is not set
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set # CONFIG_MISC_FILESYSTEMS is not set
CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_ON_OOPS=y
# CONFIG_SCHED_DEBUG is not set # CONFIG_SCHED_DEBUG is not set
......
CONFIG_LANTIQ=y CONFIG_LANTIQ=y
CONFIG_PCI_LANTIQ=y
CONFIG_XRX200_PHY_FW=y CONFIG_XRX200_PHY_FW=y
CONFIG_CPU_MIPS32_R2=y CONFIG_CPU_MIPS32_R2=y
CONFIG_MIPS_MT_SMP=y
CONFIG_MIPS_VPE_LOADER=y
# CONFIG_COMPACTION is not set # CONFIG_COMPACTION is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set CONFIG_NR_CPUS=2
CONFIG_HZ_100=y CONFIG_HZ_100=y
# CONFIG_SECCOMP is not set # CONFIG_SECCOMP is not set
# CONFIG_LOCALVERSION_AUTO is not set # CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_GZIP is not set # CONFIG_RD_GZIP is not set
...@@ -22,8 +26,8 @@ CONFIG_MODULE_UNLOAD=y ...@@ -22,8 +26,8 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y CONFIG_PARTITION_ADVANCED=y
# CONFIG_IOSCHED_CFQ is not set # CONFIG_IOSCHED_CFQ is not set
CONFIG_PCI=y
# CONFIG_COREDUMP is not set # CONFIG_COREDUMP is not set
# CONFIG_SUSPEND is not set
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
...@@ -35,12 +39,10 @@ CONFIG_IP_ROUTE_MULTIPATH=y ...@@ -35,12 +39,10 @@ CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_MROUTE=y CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_ARPD=y
CONFIG_SYN_COOKIES=y CONFIG_SYN_COOKIES=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set # CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set # CONFIG_INET_DIAG is not set
CONFIG_TCP_CONG_ADVANCED=y CONFIG_TCP_CONG_ADVANCED=y
# CONFIG_TCP_CONG_BIC is not set # CONFIG_TCP_CONG_BIC is not set
...@@ -62,7 +64,6 @@ CONFIG_NETFILTER_XT_MATCH_MAC=m ...@@ -62,7 +64,6 @@ CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_STATE=m CONFIG_NETFILTER_XT_MATCH_STATE=m
CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m
# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_REJECT=m
...@@ -84,6 +85,8 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y ...@@ -84,6 +85,8 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_PHYSMAP_OF=y CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_LANTIQ=y CONFIG_MTD_LANTIQ=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_XWAY=y
CONFIG_EEPROM_93CX6=m CONFIG_EEPROM_93CX6=m
CONFIG_SCSI=y CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
...@@ -91,6 +94,7 @@ CONFIG_NETDEVICES=y ...@@ -91,6 +94,7 @@ CONFIG_NETDEVICES=y
CONFIG_LANTIQ_ETOP=y CONFIG_LANTIQ_ETOP=y
# CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_NET_VENDOR_WIZNET is not set
CONFIG_PHYLIB=y CONFIG_PHYLIB=y
CONFIG_INTEL_XWAY_PHY=y
CONFIG_PPP=m CONFIG_PPP=m
CONFIG_PPP_FILTER=y CONFIG_PPP_FILTER=y
CONFIG_PPP_MULTILINK=y CONFIG_PPP_MULTILINK=y
...@@ -111,17 +115,21 @@ CONFIG_SERIAL_8250=y ...@@ -111,17 +115,21 @@ CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_RUNTIME_UARTS=2 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_LANTIQ=y
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_GPIO_MM_LANTIQ=y CONFIG_GPIO_MM_LANTIQ=y
CONFIG_GPIO_STP_XWAY=y CONFIG_GPIO_STP_XWAY=y
# CONFIG_HWMON is not set # CONFIG_HWMON is not set
CONFIG_WATCHDOG=y CONFIG_WATCHDOG=y
CONFIG_LANTIQ_WDT=y
# CONFIG_HID is not set # CONFIG_HID is not set
# CONFIG_USB_HID is not set # CONFIG_USB_HID is not set
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC2_PCI=y
CONFIG_NEW_LEDS=y CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS=y
CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGERS=y
...@@ -151,9 +159,6 @@ CONFIG_MAGIC_SYSRQ=y ...@@ -151,9 +159,6 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHED_DEBUG is not set # CONFIG_SCHED_DEBUG is not set
# CONFIG_FTRACE is not set # CONFIG_FTRACE is not set
CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE_BOOL=y
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_ARC4=m
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRC_ITU_T=m CONFIG_CRC_ITU_T=m
CONFIG_CRC32_SARWATE=y CONFIG_CRC32_SARWATE=y
CONFIG_AVERAGE=y
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/mc146818rtc.h> #include <linux/mc146818rtc.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/types.h> #include <linux/types.h>
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
* Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki * Copyright (C) 2000, 2001, 2002, 2003, 2005 Maciej W. Rozycki
*/ */
#include <linux/console.h> #include <linux/console.h>
#include <linux/export.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqnr.h> #include <linux/irqnr.h>
#include <linux/module.h>
#include <linux/param.h> #include <linux/param.h>
#include <linux/percpu-defs.h> #include <linux/percpu-defs.h>
#include <linux/sched.h> #include <linux/sched.h>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* Copyright (C) 2002 Maciej W. Rozycki * Copyright (C) 2002 Maciej W. Rozycki
*/ */
#include <linux/export.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
...@@ -88,7 +89,4 @@ static void wbflush_mips(void) ...@@ -88,7 +89,4 @@ static void wbflush_mips(void)
{ {
__fast_iob(); __fast_iob();
} }
#include <linux/module.h>
EXPORT_SYMBOL(__wbflush); EXPORT_SYMBOL(__wbflush);
...@@ -90,7 +90,7 @@ void __init plat_time_init(void) ...@@ -90,7 +90,7 @@ void __init plat_time_init(void)
static void markeins_board_init(void); static void markeins_board_init(void);
extern void markeins_irq_setup(void); extern void markeins_irq_setup(void);
static void inline __init markeins_sio_setup(void) static inline void __init markeins_sio_setup(void)
{ {
} }
......
...@@ -13,3 +13,4 @@ obj-y += irq.o ...@@ -13,3 +13,4 @@ obj-y += irq.o
obj-y += proc.o obj-y += proc.o
obj-$(CONFIG_LEGACY_BOARD_SEAD3) += board-sead3.o obj-$(CONFIG_LEGACY_BOARD_SEAD3) += board-sead3.o
obj-$(CONFIG_KEXEC) += kexec.o
...@@ -88,6 +88,19 @@ void __init *plat_get_fdt(void) ...@@ -88,6 +88,19 @@ void __init *plat_get_fdt(void)
return (void *)fdt; return (void *)fdt;
} }
void __init plat_fdt_relocated(void *new_location)
{
/*
* reset fdt as the cached value would point to the location
* before relocations happened and update the location argument
* if it was passed using UHI
*/
fdt = NULL;
if (fw_arg0 == -2)
fw_arg1 = (unsigned long)new_location;
}
void __init plat_mem_setup(void) void __init plat_mem_setup(void)
{ {
if (mach && mach->fixup_fdt) if (mach && mach->fixup_fdt)
......
/*
* Copyright (C) 2016 Imagination Technologies
* Author: Marcin Nowakowski <marcin.nowakowski@imgtec.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 <linux/kexec.h>
#include <linux/libfdt.h>
#include <linux/uaccess.h>
static int generic_kexec_prepare(struct kimage *image)
{
int i;
for (i = 0; i < image->nr_segments; i++) {
struct fdt_header fdt;
if (image->segment[i].memsz <= sizeof(fdt))
continue;
if (copy_from_user(&fdt, image->segment[i].buf, sizeof(fdt)))
continue;
if (fdt_check_header(&fdt))
continue;
kexec_args[0] = -2;
kexec_args[1] = (unsigned long)
phys_to_virt((unsigned long)image->segment[i].mem);
break;
}
return 0;
}
static int __init register_generic_kexec(void)
{
_machine_kexec_prepare = generic_kexec_prepare;
return 0;
}
arch_initcall(register_generic_kexec);
...@@ -4,6 +4,7 @@ generic-y += clkdev.h ...@@ -4,6 +4,7 @@ generic-y += clkdev.h
generic-y += current.h generic-y += current.h
generic-y += dma-contiguous.h generic-y += dma-contiguous.h
generic-y += emergency-restart.h generic-y += emergency-restart.h
generic-y += export.h
generic-y += irq_work.h generic-y += irq_work.h
generic-y += local64.h generic-y += local64.h
generic-y += mcs_spinlock.h generic-y += mcs_spinlock.h
...@@ -15,6 +16,7 @@ generic-y += sections.h ...@@ -15,6 +16,7 @@ generic-y += sections.h
generic-y += segment.h generic-y += segment.h
generic-y += serial.h generic-y += serial.h
generic-y += trace_clock.h generic-y += trace_clock.h
generic-y += unaligned.h
generic-y += user.h generic-y += user.h
generic-y += word-at-a-time.h generic-y += word-at-a-time.h
generic-y += xor.h generic-y += xor.h
#include <asm/checksum.h>
#include <asm/page.h>
#include <asm/fpu.h>
#include <asm-generic/asm-prototypes.h>
#include <asm/uaccess.h>
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
.align 2; \ .align 2; \
.type symbol, @function; \ .type symbol, @function; \
.ent symbol, 0; \ .ent symbol, 0; \
symbol: .frame sp, 0, ra symbol: .frame sp, 0, ra; \
.insn
/* /*
* NESTED - declare nested routine entry point * NESTED - declare nested routine entry point
...@@ -63,8 +64,9 @@ symbol: .frame sp, 0, ra ...@@ -63,8 +64,9 @@ symbol: .frame sp, 0, ra
.globl symbol; \ .globl symbol; \
.align 2; \ .align 2; \
.type symbol, @function; \ .type symbol, @function; \
.ent symbol, 0; \ .ent symbol, 0; \
symbol: .frame sp, framesize, rpc symbol: .frame sp, framesize, rpc; \
.insn
/* /*
* END - mark end of function * END - mark end of function
...@@ -86,7 +88,7 @@ symbol: .frame sp, framesize, rpc ...@@ -86,7 +88,7 @@ symbol: .frame sp, framesize, rpc
#define FEXPORT(symbol) \ #define FEXPORT(symbol) \
.globl symbol; \ .globl symbol; \
.type symbol, @function; \ .type symbol, @function; \
symbol: symbol: .insn
/* /*
* ABS - export absolute symbol * ABS - export absolute symbol
......
...@@ -164,6 +164,19 @@ static inline void plat_swiotlb_setup(void) {} ...@@ -164,6 +164,19 @@ static inline void plat_swiotlb_setup(void) {}
* Return: Pointer to the flattened device tree blob. * Return: Pointer to the flattened device tree blob.
*/ */
extern void *plat_get_fdt(void); extern void *plat_get_fdt(void);
#ifdef CONFIG_RELOCATABLE
/**
* plat_fdt_relocated() - Update platform's information about relocated dtb
*
* This function provides a platform-independent API to set platform's
* information about relocated DTB if it needs to be moved due to kernel
* relocation occurring at boot.
*/
void plat_fdt_relocated(void *new_location);
#endif /* CONFIG_RELOCATABLE */
#endif /* CONFIG_USE_OF */ #endif /* CONFIG_USE_OF */
#endif /* _ASM_BOOTINFO_H */ #endif /* _ASM_BOOTINFO_H */
...@@ -186,7 +186,9 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, ...@@ -186,7 +186,9 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
" daddu %0, %4 \n" " daddu %0, %4 \n"
" dsll32 $1, %0, 0 \n" " dsll32 $1, %0, 0 \n"
" daddu %0, $1 \n" " daddu %0, $1 \n"
" sltu $1, %0, $1 \n"
" dsra32 %0, %0, 0 \n" " dsra32 %0, %0, 0 \n"
" addu %0, $1 \n"
#endif #endif
" .set pop" " .set pop"
: "=r" (sum) : "=r" (sum)
......
...@@ -210,6 +210,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ...@@ -210,6 +210,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef double elf_fpreg_t; typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
void mips_dump_regs32(u32 *uregs, const struct pt_regs *regs);
void mips_dump_regs64(u64 *uregs, const struct pt_regs *regs);
#ifdef CONFIG_32BIT #ifdef CONFIG_32BIT
/* /*
* This is used to ensure we don't load something for the wrong architecture. * This is used to ensure we don't load something for the wrong architecture.
...@@ -221,6 +224,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ...@@ -221,6 +224,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
*/ */
#define ELF_CLASS ELFCLASS32 #define ELF_CLASS ELFCLASS32
#define ELF_CORE_COPY_REGS(dest, regs) \
mips_dump_regs32((u32 *)&(dest), (regs));
#endif /* CONFIG_32BIT */ #endif /* CONFIG_32BIT */
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
...@@ -234,6 +240,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ...@@ -234,6 +240,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
*/ */
#define ELF_CLASS ELFCLASS64 #define ELF_CLASS ELFCLASS64
#define ELF_CORE_COPY_REGS(dest, regs) \
mips_dump_regs64((u64 *)&(dest), (regs));
#endif /* CONFIG_64BIT */ #endif /* CONFIG_64BIT */
/* /*
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#include <asm/cpu-features.h> #include <asm/cpu-features.h>
#include <asm/kmap_types.h> #include <asm/kmap_types.h>
/* undef for production */
#define HIGHMEM_DEBUG 1
/* declarations for highmem.c */ /* declarations for highmem.c */
extern unsigned long highstart_pfn, highend_pfn; extern unsigned long highstart_pfn, highend_pfn;
......
...@@ -40,7 +40,6 @@ extern raw_spinlock_t i8259A_lock; ...@@ -40,7 +40,6 @@ extern raw_spinlock_t i8259A_lock;
extern void make_8259A_irq(unsigned int irq); extern void make_8259A_irq(unsigned int irq);
extern void init_i8259_irqs(void); extern void init_i8259_irqs(void);
extern int i8259_of_init(struct device_node *node, struct device_node *parent);
/** /**
* i8159_set_poll() - Override the i8259 polling function * i8159_set_poll() - Override the i8259 polling function
......
...@@ -17,6 +17,18 @@ ...@@ -17,6 +17,18 @@
#include <irq.h> #include <irq.h>
#define IRQ_STACK_SIZE THREAD_SIZE
extern void *irq_stack[NR_CPUS];
static inline bool on_irq_stack(int cpu, unsigned long sp)
{
unsigned long low = (unsigned long)irq_stack[cpu];
unsigned long high = low + IRQ_STACK_SIZE;
return (low <= sp && sp <= high);
}
#ifdef CONFIG_I8259 #ifdef CONFIG_I8259
static inline int irq_canonicalize(int irq) static inline int irq_canonicalize(int irq)
{ {
......
...@@ -80,6 +80,15 @@ enum bcm47xx_board { ...@@ -80,6 +80,15 @@ enum bcm47xx_board {
BCM47XX_BOARD_LINKSYS_WRT610NV2, BCM47XX_BOARD_LINKSYS_WRT610NV2,
BCM47XX_BOARD_LINKSYS_WRTSL54GS, BCM47XX_BOARD_LINKSYS_WRTSL54GS,
BCM47XX_BOARD_LUXUL_ABR_4400_V1,
BCM47XX_BOARD_LUXUL_XAP_310_V1,
BCM47XX_BOARD_LUXUL_XAP_1210_V1,
BCM47XX_BOARD_LUXUL_XAP_1230_V1,
BCM47XX_BOARD_LUXUL_XAP_1240_V1,
BCM47XX_BOARD_LUXUL_XAP_1500_V1,
BCM47XX_BOARD_LUXUL_XBR_4400_V1,
BCM47XX_BOARD_LUXUL_XVW_P30_V1,
BCM47XX_BOARD_LUXUL_XWR_600_V1,
BCM47XX_BOARD_LUXUL_XWR_1750_V1, BCM47XX_BOARD_LUXUL_XWR_1750_V1,
BCM47XX_BOARD_MICROSOFT_MN700, BCM47XX_BOARD_MICROSOFT_MN700,
......
...@@ -99,9 +99,20 @@ ...@@ -99,9 +99,20 @@
# to begin # to begin
# #
# This is the variable where the next core to boot os stored
PTR_LA t0, octeon_processor_boot
octeon_spin_wait_boot: octeon_spin_wait_boot:
#ifdef CONFIG_RELOCATABLE
PTR_LA t0, octeon_processor_relocated_kernel_entry
LONG_L t0, (t0)
beq zero, t0, 1f
nop
jr t0
nop
1:
#endif /* CONFIG_RELOCATABLE */
# This is the variable where the next core to boot is stored
PTR_LA t0, octeon_processor_boot
# Get the core id of the next to be booted # Get the core id of the next to be booted
LONG_L t1, (t0) LONG_L t1, (t0)
# Keep looping if it isn't me # Keep looping if it isn't me
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment