Add Cavium OCTEON processor support (v4).
Subsystems (4)
cover Add Cavium OCTEON processor support (v4).
This patch set introduces preliminary support for Cavium Networks' OCTEON processor family. More (but not detailed) information about these processors may be obtained here:
http://www.caviumnetworks.com/OCTEON_MIPS64.html
Patches 19 - 23 I am sending to akpm, linux-serial and linux-kernel. So far I have been underwhelmed by the review of these serial patches which are a necessary part of the processor support, so I am hoping that Andrew or a similarly authoritative person will review them.
This initial patch set adds support for booting an initramfs to a serial console. Follow-on patch sets will add support for the on-chip Compact Flash, ethernet, USB, PCI, PCIe, I2c and other peripherals.
With this forth version of the patches I think we have fixed or removed most of the parts flagged as objectionable in the first three rounds of reviews. There has been more rearrangement of some of the chip and board support files. Perhaps most notable is adding the serial ports as platform devices, which gives the proper initialization order for KGDB to be able to work. I have also moved the main Kconfig patch to the end, so that it is no longer possible to build with only a subset of the patches applied.
26 patches to follow as replies (I hope).
David Daney (26):
MIPS: Add Cavium OCTEON processor support files to
arch/mips/cavium-octeon/executive and asm/octeon.
MIPS: Add Cavium OCTEON processor CSR definitions
MIPS: Add Cavium OCTEON processor support files to
arch/mips/cavium-octeon.
MIPS: For Cavium OCTEON handle hazards as per the R10000 handling.
MIPS: For Cavium OCTEON set hwrena and lazily restore CP2 state.
MIPS: Add Cavium OCTEON specific register definitions to mipsregs.h
MIPS: Override assembler target architecture for octeon.
MIPS: Add Cavium OCTEON processor constants and CPU probe.
MIPS: Hook Cavium OCTEON cache init into cache.c
MIPS: Hook up Cavium OCTEON in arch/mips.
MIPS: Modify core io.h macros to account for the Octeon Errata
Core-301.
MIPS: Add Cavium OCTEON cop2/cvmseg state entries to processor.h.
MIPS: Add Cavium OCTEON specific registers to ptrace.h and
asm-offsets.c
MIPS: Add SMP_ICACHE_FLUSH for the Cavium CPU family.
MIPS: Cavium OCTEON: PT vs MFC0 reorder, multiplier state
preservation.
MIPS: Add Cavium OCTEON irq hazard in asmmacro.h.
MIPS: Compute branch returns for Cavium OCTEON specific branch
instructions.
MIPS: Add Cavium OCTEON slot into proper tlb category. 8250: Don't clobber spinlocks.
8250: Serial driver changes to support future Cavium OCTEON serial
patches.
Serial: Allow port type to be specified when calling
serial8250_register_port.
8250: Allow port type to specify bugs that are not probed for.
Serial: UART driver changes for Cavium OCTEON.
MIPS: Adjust the dma-common.c platform hooks.
MIPS: Add defconfig for Cavium OCTEON.
MIPS: Add Cavium OCTEON to arch/mips/Kconfig
arch/mips/Kconfig | 65 +- arch/mips/Makefile | 16 + arch/mips/cavium-octeon/Kconfig | 85 + arch/mips/cavium-octeon/Makefile | 20 + arch/mips/cavium-octeon/dma-octeon.c | 32 + arch/mips/cavium-octeon/executive/Makefile | 24 + arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 929 +++++++++ arch/mips/cavium-octeon/executive/cvmx-l2c.c | 736 +++++++ arch/mips/cavium-octeon/executive/cvmx-sysinfo.c | 117 ++ arch/mips/cavium-octeon/executive/octeon-model.c | 346 ++++ arch/mips/cavium-octeon/flash_setup.c | 83 + arch/mips/cavium-octeon/octeon-irq.c | 498 +++++ arch/mips/cavium-octeon/octeon-memcpy.S | 521 +++++ arch/mips/cavium-octeon/serial.c | 134 ++ arch/mips/cavium-octeon/setup.c | 919 +++++++++ arch/mips/cavium-octeon/smp.c | 216 ++ arch/mips/configs/cavium-octeon_defconfig | 1143 +++++++++++ arch/mips/include/asm/asmmacro.h | 10 + arch/mips/include/asm/cpu-features.h | 3 + arch/mips/include/asm/cpu.h | 14 + arch/mips/include/asm/hazards.h | 4 +- arch/mips/include/asm/io.h | 14 + .../asm/mach-cavium-octeon/cpu-feature-overrides.h | 62 + .../include/asm/mach-cavium-octeon/dma-coherence.h | 64 + arch/mips/include/asm/mach-cavium-octeon/irq.h | 244 +++ .../asm/mach-cavium-octeon/kernel-entry-init.h | 137 ++ arch/mips/include/asm/mach-cavium-octeon/war.h | 26 + arch/mips/include/asm/mach-generic/dma-coherence.h | 26 +- arch/mips/include/asm/mach-ip27/dma-coherence.h | 26 +- arch/mips/include/asm/mach-ip32/dma-coherence.h | 26 +- arch/mips/include/asm/mach-jazz/dma-coherence.h | 26 +- arch/mips/include/asm/mach-lemote/dma-coherence.h | 26 +- arch/mips/include/asm/mipsregs.h | 22 + arch/mips/include/asm/module.h | 2 + arch/mips/include/asm/octeon/cvmx-asm.h | 446 ++++ arch/mips/include/asm/octeon/cvmx-bootinfo.h | 238 +++ arch/mips/include/asm/octeon/cvmx-bootmem.h | 403 ++++ arch/mips/include/asm/octeon/cvmx-ciu-defs.h | 1650 +++++++++++++++ arch/mips/include/asm/octeon/cvmx-gpio-defs.h | 227 +++ arch/mips/include/asm/octeon/cvmx-iob-defs.h | 551 +++++ arch/mips/include/asm/octeon/cvmx-ipd-defs.h | 910 +++++++++ arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 990 +++++++++ arch/mips/include/asm/octeon/cvmx-l2c.h | 328 +++ arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 380 ++++ arch/mips/include/asm/octeon/cvmx-l2t-defs.h | 141 ++ arch/mips/include/asm/octeon/cvmx-led-defs.h | 252 +++ arch/mips/include/asm/octeon/cvmx-mio-defs.h | 2117 ++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-packet.h | 64 + arch/mips/include/asm/octeon/cvmx-platform.h | 56 + arch/mips/include/asm/octeon/cvmx-pow-defs.h | 720 +++++++ arch/mips/include/asm/octeon/cvmx-spinlock.h | 376 ++++ arch/mips/include/asm/octeon/cvmx-sysinfo.h | 144 ++ arch/mips/include/asm/octeon/cvmx-warn.h | 40 + arch/mips/include/asm/octeon/cvmx.h | 776 +++++++ arch/mips/include/asm/octeon/octeon-feature.h | 120 ++ arch/mips/include/asm/octeon/octeon-model.h | 225 +++ arch/mips/include/asm/octeon/octeon.h | 245 +++ arch/mips/include/asm/processor.h | 69 + arch/mips/include/asm/ptrace.h | 4 + arch/mips/include/asm/smp.h | 3 + arch/mips/include/asm/stackframe.h | 17 + arch/mips/kernel/Makefile | 1 + arch/mips/kernel/asm-offsets.c | 31 + arch/mips/kernel/branch.c | 33 + arch/mips/kernel/cpu-probe.c | 25 + arch/mips/kernel/genex.S | 4 + arch/mips/kernel/octeon_switch.S | 506 +++++ arch/mips/kernel/traps.c | 21 + arch/mips/lib/Makefile | 1 + arch/mips/mm/Makefile | 1 + arch/mips/mm/c-octeon.c | 307 +++ arch/mips/mm/cache.c | 6 + arch/mips/mm/cex-oct.S | 70 + arch/mips/mm/dma-default.c | 24 +- arch/mips/mm/tlbex.c | 1 + drivers/serial/8250.c | 236 ++- drivers/serial/8250.h | 3 + drivers/serial/serial_core.c | 7 +- include/linux/serial_8250.h | 3 + include/linux/serial_core.h | 7 +- include/linux/serial_reg.h | 6 + 81 files changed, 19315 insertions(+), 86 deletions(-)
create mode 100644 arch/mips/cavium-octeon/Kconfig
create mode 100644 arch/mips/cavium-octeon/Makefile
create mode 100644 arch/mips/cavium-octeon/dma-octeon.c
create mode 100644 arch/mips/cavium-octeon/executive/Makefile
create mode 100644 arch/mips/cavium-octeon/executive/cvmx-bootmem.c create mode 100644 arch/mips/cavium-octeon/executive/cvmx-l2c.c
create mode 100644 arch/mips/cavium-octeon/executive/cvmx-sysinfo.c create mode 100644 arch/mips/cavium-octeon/executive/octeon-model.c create mode 100644 arch/mips/cavium-octeon/flash_setup.c
create mode 100644 arch/mips/cavium-octeon/octeon-irq.c
create mode 100644 arch/mips/cavium-octeon/octeon-memcpy.S
create mode 100644 arch/mips/cavium-octeon/serial.c
create mode 100644 arch/mips/cavium-octeon/setup.c
create mode 100644 arch/mips/cavium-octeon/smp.c
create mode 100644 arch/mips/configs/cavium-octeon_defconfig
create mode 100644 arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/irq.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/war.h create mode 100644 arch/mips/include/asm/octeon/cvmx-asm.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-bootinfo.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-bootmem.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-ciu-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-gpio-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-iob-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-ipd-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-l2c-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-l2c.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-l2d-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-l2t-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-led-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-mio-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-packet.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-platform.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-pow-defs.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-spinlock.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-sysinfo.h
create mode 100644 arch/mips/include/asm/octeon/cvmx-warn.h
create mode 100644 arch/mips/include/asm/octeon/cvmx.h
create mode 100644 arch/mips/include/asm/octeon/octeon-feature.h create mode 100644 arch/mips/include/asm/octeon/octeon-model.h
create mode 100644 arch/mips/include/asm/octeon/octeon.h
create mode 100644 arch/mips/kernel/octeon_switch.S
create mode 100644 arch/mips/mm/c-octeon.c
create mode 100644 arch/mips/mm/cex-oct.S
PATCH 4/26 MIPS: For Cavium OCTEON handle hazards as per the R10000 handling.
For Cavium CPU, we treat the same as R10000, in that all hazards are dealt with in hardware.
--- arch/mips/include/asm/hazards.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/hazards.h +2 -2
@@ -42,7 +42,7 @@ ASMMACRO(_ehb,/* * TLB hazards */ -#if defined(CONFIG_CPU_MIPSR2 ) +#if defined(CONFIG_CPU_MIPSR2 ) && !defined(CONFIG_CPU_CAVIUM_OCTEON )/* * MIPSR2 defines ehb for hazard avoidance
@@ -138,7 +138,7 @@ do { \__instruction_hazard (); \ } while (0) -#elif defined(CONFIG_CPU_R10000 ) +#elif defined(CONFIG_CPU_R10000 ) || defined(CONFIG_CPU_CAVIUM_OCTEON )/* * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
Signature · 1 line
1.5.6.5
PATCH 3/26 MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon.
In reply to David DaneyThese are the rest of the new files needed to add OCTEON processor support to the Linux kernel. Other than Makefile and Kconfig which should be obvious, we have:
dma-octeon.c -- Helper functions for mapping DMA memory. flash_setup.c -- Register on-board flash with the MTD subsystem. octeon-irq.c -- OCTEON interrupt controller managment. octeon-memcpy.S -- Optimized memcpy() implementation. serial.c -- Register 8250 platform driver and early console. setup.c -- Early architecture initialization. smp.c -- OCTEON SMP support.
octeon_switch.S -- Scheduler context switch for OCTEON.c-octeon.c -- OCTEON cache controller support.cex-oct.S -- OCTEON cache exception handler.
asm/mach-cavium-octeon/*.h -- Architecture include files.
--- arch/mips/cavium-octeon/Kconfig | 85 ++ arch/mips/cavium-octeon/Makefile | 20 + arch/mips/cavium-octeon/dma-octeon.c | 32 + arch/mips/cavium-octeon/flash_setup.c | 83 ++ arch/mips/cavium-octeon/octeon-irq.c | 498 +++++++++++ arch/mips/cavium-octeon/octeon-memcpy.S | 521 +++++++++++ arch/mips/cavium-octeon/serial.c | 134 +++ arch/mips/cavium-octeon/setup.c | 919 ++++++++++++++++++++ arch/mips/cavium-octeon/smp.c | 216 +++++ .../asm/mach-cavium-octeon/cpu-feature-overrides.h | 62 ++ .../include/asm/mach-cavium-octeon/dma-coherence.h | 64 ++ arch/mips/include/asm/mach-cavium-octeon/irq.h | 244 ++++++ .../asm/mach-cavium-octeon/kernel-entry-init.h | 137 +++ arch/mips/include/asm/mach-cavium-octeon/war.h | 26 + arch/mips/include/asm/octeon/octeon.h | 245 ++++++ arch/mips/kernel/octeon_switch.S | 506 +++++++++++ arch/mips/mm/c-octeon.c | 307 +++++++ arch/mips/mm/cex-oct.S | 70 ++ 18 files changed, 4169 insertions(+), 0 deletions(-) create mode 100644 arch/mips/cavium-octeon/Kconfig create mode 100644 arch/mips/cavium-octeon/Makefile create mode 100644 arch/mips/cavium-octeon/dma-octeon.c create mode 100644 arch/mips/cavium-octeon/flash_setup.c create mode 100644 arch/mips/cavium-octeon/octeon-irq.c create mode 100644 arch/mips/cavium-octeon/octeon-memcpy.S create mode 100644 arch/mips/cavium-octeon/serial.c create mode 100644 arch/mips/cavium-octeon/setup.c create mode 100644 arch/mips/cavium-octeon/smp.c create mode 100644 arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/irq.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h create mode 100644 arch/mips/include/asm/mach-cavium-octeon/war.h create mode 100644 arch/mips/include/asm/octeon/octeon.h create mode 100644 arch/mips/kernel/octeon_switch.S create mode 100644 arch/mips/mm/c-octeon.c create mode 100644 arch/mips/mm/cex-oct.S
arch/mips/cavium-octeon/Kconfig new file +85 -0
@@ -0,0 +1,85 @@ +config CAVIUM_OCTEON_SPECIFIC_OPTIONS + bool "Enable Octeon specific options" + depends on CPU_CAVIUM_OCTEON + default "y" + +config CAVIUM_OCTEON_2ND_KERNEL + bool "Build the kernel to be used as a 2nd kernel on the same chip" + depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS + default "n" + help + This option configures this kernel to be linked at a different + address and use the 2nd uart for output. This allows a kernel built + with this option to be run at the same time as one built without this + option. + +config CAVIUM_OCTEON_HW_FIX_UNALIGNED + bool "Enable hardware fixups of unaligned loads and stores" + depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS + default "y" + help + Configure the Octeon hardware to automatically fix unaligned loads + and stores. Normally unaligned accesses are fixed using a kernel + exception handler. This option enables the hardware automatic fixups, + which requires only an extra 3 cycles. Disable this option if you + are running code that relies on address exceptions on unaligned + accesses. + +config CAVIUM_OCTEON_CVMSEG_SIZE + int "Number of L1 cache lines reserved for CVMSEG memory" + depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS + range 0 54 + default 1 + help + CVMSEG LM is a segment that accesses portions of the dcache as a + local memory; the larger CVMSEG is, the smaller the cache is. + This selects the size of CVMSEG LM, which is in cache blocks. The + legally range is from zero to 54 cache blocks (i.e. CVMSEG LM is + between zero and 6192 bytes). + +config CAVIUM_OCTEON_LOCK_L2 + bool "Lock often used kernel code in the L2" + depends on CAVIUM_OCTEON_SPECIFIC_OPTIONS + default "y" + help + Enable locking parts of the kernel into the L2 cache. + +config CAVIUM_OCTEON_LOCK_L2_TLB + bool "Lock the TLB handler in L2" + depends on CAVIUM_OCTEON_LOCK_L2 + default "y" + help + Lock the low level TLB fast path into L2. + +config CAVIUM_OCTEON_LOCK_L2_EXCEPTION + bool "Lock the exception handler in L2" + depends on CAVIUM_OCTEON_LOCK_L2 + default "y" + help + Lock the low level exception handler into L2. + +config CAVIUM_OCTEON_LOCK_L2_LOW_LEVEL_INTERRUPT + bool "Lock the interrupt handler in L2" + depends on CAVIUM_OCTEON_LOCK_L2 + default "y" + help + Lock the low level interrupt handler into L2. + +config CAVIUM_OCTEON_LOCK_L2_INTERRUPT + bool "Lock the 2nd level interrupt handler in L2" + depends on CAVIUM_OCTEON_LOCK_L2 + default "y" + help + Lock the 2nd level interrupt handler in L2. + +config CAVIUM_OCTEON_LOCK_L2_MEMCPY + bool "Lock memcpy() in L2" + depends on CAVIUM_OCTEON_LOCK_L2 + default "y" + help + Lock the kernel's implementation of memcpy() into L2. + +config ARCH_SPARSEMEM_ENABLE + def_bool y + select SPARSEMEM_STATIC + depends on CPU_CAVIUM_OCTEON
arch/mips/cavium-octeon/Makefile new file +20 -0
@@ -0,0 +1,20 @@ +# +# Makefile for the Cavium Octeon specific kernel interface routines +# under Linux. +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2005-2007 Cavium Networks +# + +OCTEON_ROOT = $(srctree)/arch/mips/cavium-octeon +EXTRA_CFLAGS += -I$(OCTEON_ROOT)/executive/config \ + -I$(OCTEON_ROOT)/executive + +obj-y := setup.o serial.o octeon-irq.o +obj-y += dma-octeon.o flash_setup.o +obj-y += octeon-memcpy.o + +obj-$(CONFIG_SMP) += smp.o
arch/mips/cavium-octeon/dma-octeon.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2000 Ani Joshi <[email protected]> +* Copyright (C) 2000, 2001 Ralf Baechle <[email protected]> +* Copyright (C) 2005 Ilya A. Volynets-Evenbakh <[email protected]> +* swiped from i386, and cloned for MIPS by Geert, polished by Ralf. +* IP32 changes by Ilya. +* Cavium Networks: Create new dma setup for Cavium Networks Octeon based on +* the kernels original. +*/ +#include <linux/types.h> +#include <linux/mm.h> + +#include <dma-coherence.h> + +dma_addr_t octeon_map_dma_mem (struct device *dev,void *ptr,size_t size) +{ +/* Without PCI/PCIe this function can be called for Octeon internal +devices such as USB. These devices all support 64bit addressing */ +mb (); +return virt_to_phys (ptr); +} + +void octeon_unmap_dma_mem (struct device *dev,dma_addr_t dma_addr) +{ +/* Without PCI/PCIe this function can be called for Octeon internal +* devices such as USB. These devices all support 64bit addressing */ +return ; +}
arch/mips/cavium-octeon/flash_setup.c new file +83 -0
83 lines not on this page · raw message
arch/mips/cavium-octeon/octeon-irq.c new file +498 -0
498 lines not on this page · raw message
arch/mips/cavium-octeon/octeon-memcpy.S new file +521 -0
521 lines not on this page · raw message
arch/mips/cavium-octeon/serial.c new file +134 -0
134 lines not on this page · raw message
arch/mips/cavium-octeon/setup.c new file +919 -0
919 lines not on this page · raw message
arch/mips/cavium-octeon/smp.c new file +216 -0
216 lines not on this page · raw message
arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h new file +62 -0
62 lines not on this page · raw message
arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h new file +64 -0
64 lines not on this page · raw message
arch/mips/include/asm/mach-cavium-octeon/irq.h new file +244 -0
244 lines not on this page · raw message
arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h new file +137 -0
122 lines not on this page · raw message
arch/mips/include/asm/mach-cavium-octeon/war.h new file +26 -0
Lines of this file are not shown. View the raw message.
arch/mips/include/asm/octeon/octeon.h new file +245 -0
245 lines not on this page · raw message
arch/mips/kernel/octeon_switch.S new file +506 -0
506 lines not on this page · raw message
arch/mips/mm/c-octeon.c new file +307 -0
307 lines not on this page · raw message
arch/mips/mm/cex-oct.S new file +70 -0
70 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.5.6.5
Part of the diff is not shown here. View the raw message.
PATCH 21/26 Serial: Allow port type to be specified when calling serial8250_register_port.
In reply to David DaneyAdd flag value UPF_FIXED_TYPE which specifies that the UART type is known and should not be probed. For this case the UARTs properties are just copied out of the uart_config entry.
This allows us to keep SOC specific 8250 probe code out of 8250.c. In this case we know the serial hardware will not be changing as it is on the same silicon as the CPU, and we can specify it with certainty in the board/cpu setup code.
The alternative is to load up 8250.c with a bunch of OCTEON specific special cases in the probing code.
--- drivers/serial/8250.c | 9 +++++++++ drivers/serial/serial_core.c | 7 +++++-- include/linux/serial_8250.h | 1 + include/linux/serial_core.h | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-)
drivers/serial/8250.c +9 -0
@@ -2903,6 +2903,7 @@ static int __devinit serial8250_probe(struct platform_device *dev) port.mapbase = p->mapbase; port.hub6 = p->hub6; port.private_data = p->private_data; + port.type = p->type; port.serial_in_fn = p->serial_in_fn; port.serial_out_fn = p->serial_out_fn; port.dev = &dev->dev;
@@ -3058,6 +3059,14 @@ int serial8250_register_port(struct uart_port *port) uart->port.private_data = port->private_data;if (port->dev) uart->port.dev = port->dev; + +if (port->flags &UPF_FIXED_TYPE ) { + uart->port.type = port->type; + uart->port.fifosize = uart_config[port->type].fifo_size; + uart->capabilities = uart_config[port->type].flags; + uart->tx_loadsz = uart_config[port->type].tx_loadsz; + } +set_io_fns_from_upio (&uart->port);/* Possibly override default I/O functions. */ if (port->serial_in_fn)
drivers/serial/serial_core.c +5 -2
@@ -2198,11 +2198,14 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state,* Now do the auto configuration stuff. Note that config_port * is expected to claim the resources and map the port for us. */ - flags =UART_CONFIG_TYPE ; + flags =0 ;if (port->flags &UPF_AUTO_IRQ ) flags |=UART_CONFIG_IRQ ;if (port->flags &UPF_BOOT_AUTOCONF ) { - port->type =PORT_UNKNOWN ; +if (!(port->flags &UPF_FIXED_TYPE )) { + port->type =PORT_UNKNOWN ; + flags |=UART_CONFIG_TYPE ; + } port->ops->config_port (port, flags); }
include/linux/serial_8250.h +1 -0
@@ -28,6 +28,7 @@ struct plat_serial8250_port {unsigned char iotype;/* UPIO_* */ unsigned char hub6;upf_t flags;/* UPF_* flags */ +unsigned int type;/* If UPF_FIXED_TYPE */ unsigned int (*serial_in_fn)(struct uart_port *,int );void (*serial_out_fn)(struct uart_port *,int ,int ); };
include/linux/serial_core.h +2 -0
@@ -293,6 +293,8 @@ struct uart_port {#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16))#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) +/* The exact UART type is known and should not be probed. */ +#define UPF_FIXED_TYPE ((__force upf_t) (1 << 27))#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28))#define UPF_FIXED_PORT ((__force upf_t) (1 << 29))#define UPF_DEAD ((__force upf_t) (1 << 30))
Signature · 1 line
1.5.6.5
PATCH 23/26 Serial: UART driver changes for Cavium OCTEON.
In reply to David DaneyCavium UART implementation won't work with the standard 8250 driver as-is. Define a new uart_config (PORT_OCTEON) and use it to enable special handling required by the OCTEON's serial port. Two new bug types are defined.
--- drivers/serial/8250.c | 16 +++++++++++++++- drivers/serial/8250.h | 2 ++ include/linux/serial_core.h | 3 ++- include/linux/serial_reg.h | 6 ++++++ 4 files changed, 25 insertions(+), 2 deletions(-)
drivers/serial/8250.c +15 -1
@@ -279,6 +279,14 @@ static const struct serial8250_config uart_config[] = { .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, .flags = UART_CAP_FIFO, }, + [PORT_OCTEON] = { + .name = "OCTEON", + .fifo_size = 64, + .tx_loadsz = 64, + .bugs = UART_BUG_TIMEOUT | UART_BUG_OCTEON_IIR, + .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, + .flags = UART_CAP_FIFO, + }, };#if defined (CONFIG_SERIAL_8250_AU1X00 )
@@ -1554,6 +1562,12 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) up = list_entry(l, struct uart_8250_port, list); iir =serial_in (up,UART_IIR ); +if ((up->bugs &UART_BUG_OCTEON_IIR ) && (iir &0xf ) ==7 ) { +/* Busy interrupt */ +serial_in (up,UART_OCTEON_USR ); + iir =serial_in (up,UART_IIR ); + } +if (!(iir &UART_IIR_NO_INT )) {serial8250_handle_port (up);
@@ -1714,7 +1728,7 @@ static void serial8250_timeout(unsigned long data)unsigned int iir; iir =serial_in (up,UART_IIR ); -if (!(iir &UART_IIR_NO_INT )) +if (!(iir &UART_IIR_NO_INT ) || (up->bugs &UART_BUG_TIMEOUT ))serial8250_handle_port (up);mod_timer (&up->timer, jiffies +poll_timeout (up->port.timeout)); }
drivers/serial/8250.h +2 -0
@@ -49,6 +49,8 @@ struct serial8250_config {#define UART_BUG_TXEN (1 << 1)/* UART has buggy TX IIR status */ #define UART_BUG_NOMSR (1 << 2)/* UART has buggy MSR status bits (Au1x00) */ #define UART_BUG_THRE (1 << 3)/* UART has buggy THRE reassertion */ +#define UART_BUG_TIMEOUT (1 << 4)/* UART should always handle timeout */ +#define UART_BUG_OCTEON_IIR (1 << 5)/* UART OCTEON IIR workaround */ #define PROBE_RSA (1 << 0)#define PROBE_ANY (~0)
include/linux/serial_core.h +2 -1
@@ -40,7 +40,8 @@#define PORT_NS16550A 14#define PORT_XSCALE 15#define PORT_RM9000 16/* PMC-Sierra RM9xxx internal UART */ -#define PORT_MAX_8250 16/* max port ID */ +#define PORT_OCTEON 17/* Cavium OCTEON internal UART */ +#define PORT_MAX_8250 17/* max port ID */ /* * ARM specific type numbers. These are not currently guaranteed
include/linux/serial_reg.h +6 -0
@@ -324,5 +324,11 @@#define UART_OMAP_SYSC 0x15/* System configuration register */ #define UART_OMAP_SYSS 0x16/* System status register */ +/* +* Extra serial register definitions for the internal UARTs in Cavium +* Networks OCTEON processors. +*/ +#define UART_OCTEON_USR 0x27/* UART Status Register */ +#endif /* _LINUX_SERIAL_REG_H */
Signature · 1 line
1.5.6.5
PATCH 19/26 8250: Don't clobber spinlocks.
In reply to David DaneyIn serial8250_isa_init_ports(), the port's lock is initialized. We should not overwrite it. In early_serial_setup(), only copy in the fields we need. Since the early console code only uses a subset of the fields, these are sufficient.
--- drivers/serial/8250.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)
drivers/serial/8250.c +13 -2
@@ -2752,12 +2752,23 @@ static struct uart_driver serial8250_reg = {*/ int __init early_serial_setup (struct uart_port *port) { +struct uart_port *p; +if (port->line >=ARRAY_SIZE (serial8250_ports))return -ENODEV ;serial8250_isa_init_ports (); - serial8250_ports[port->line].port = *port; - serial8250_ports[port->line].port.ops = &serial8250_pops; + p = &serial8250_ports[port->line].port; + p->iobase = port->iobase; + p->membase = port->membase; + p->irq = port->irq; + p->uartclk = port->uartclk; + p->fifosize = port->fifosize; + p->regshift = port->regshift; + p->iotype = port->iotype; + p->flags = port->flags; + p->mapbase = port->mapbase; + p->private_data = port->private_data;return 0 ; }
Signature · 1 line
1.5.6.5
PATCH 20/26 8250: Serial driver changes to support future Cavium OCTEON serial patches.
In reply to David DaneyIn order to use Cavium OCTEON specific serial i/o drivers, we first patch the 8250 driver to use replaceable I/O functions. Compatible I/O functions are added for existing iotypeS.
An added benefit of this change is that it makes it easy to factor some of the existing special cases out to board/SOC specific support code.
The alternative is to load up 8250.c with a bunch of OCTEON specific iotype code and bug work-arounds.
--- drivers/serial/8250.c | 194 ++++++++++++++++++++++++++++++------------- include/linux/serial_8250.h | 2 + include/linux/serial_core.h | 2 + 3 files changed, 140 insertions(+), 58 deletions(-)
drivers/serial/8250.c +136 -58
@@ -303,16 +303,16 @@ static const u8 au_io_out_map[] = { };/* sane hardware needs no mapping */ -static inline int map_8250_in_reg (struct uart_8250_port *up,int offset) +static inline int map_8250_in_reg (struct uart_port *p,int offset) { -if (up->port.iotype !=UPIO_AU ) +if (p->iotype !=UPIO_AU )return offset;return au_io_in_map[offset]; } -static inline int map_8250_out_reg (struct uart_8250_port *up,int offset) +static inline int map_8250_out_reg (struct uart_port *p,int offset) { -if (up->port.iotype !=UPIO_AU ) +if (p->iotype !=UPIO_AU )return offset;return au_io_out_map[offset]; }
@@ -341,16 +341,16 @@ static const u8 [UART_SCR] = 0x2c }; -static inline int map_8250_in_reg (struct uart_8250_port *up,int offset) +static inline int map_8250_in_reg (struct uart_port *p,int offset) { -if (up->port.iotype !=UPIO_RM9000 ) +if (p->iotype !=UPIO_RM9000 )return offset;return regmap_in[offset]; } -static inline int map_8250_out_reg (struct uart_8250_port *up,int offset) +static inline int map_8250_out_reg (struct uart_port *p,int offset) { -if (up->port.iotype !=UPIO_RM9000 ) +if (p->iotype !=UPIO_RM9000 )return offset;return regmap_out[offset]; }
@@ -363,108 +363,170 @@ static inline int map_8250_out_reg(struct uart_8250_port *up, int offset)#endif -static unsigned int serial_in (struct uart_8250_port *up,int offset) +static unsigned int hub6_serial_in_fn (struct uart_port *p,int offset) { -unsigned int tmp; - offset =map_8250_in_reg (up, offset) << up->port.regshift; + offset =map_8250_in_reg (p, offset) << p->regshift; +outb (p->hub6 -1 + offset, p->iobase); +return inb (p->iobase +1 ); +} -switch (up->port.iotype) { -case UPIO_HUB6 : -outb (up->port.hub6 -1 + offset, up->port.iobase); -return inb (up->port.iobase +1 ); +static void hub6_serial_out_fn (struct uart_port *p,int offset,int value) +{ + offset =map_8250_out_reg (p, offset) << p->regshift; +outb (p->hub6 -1 + offset, p->iobase); +outb (value, p->iobase +1 ); +} -case UPIO_MEM : -case UPIO_DWAPB : -return readb (up->port.membase + offset); +static unsigned int mem_serial_in_fn (struct uart_port *p,int offset) +{ + offset =map_8250_in_reg (p, offset) << p->regshift; +return readb (p->membase + offset); +} -case UPIO_RM9000 : -case UPIO_MEM32 : -return readl (up->port.membase + offset); +static void mem_serial_out_fn (struct uart_port *p,int offset,int value) +{ + offset =map_8250_out_reg (p, offset) << p->regshift; +writeb (value, p->membase + offset); +} + +static void mem32_serial_out_fn (struct uart_port *p,int offset,int value) +{ + offset =map_8250_out_reg (p, offset) << p->regshift; +writel (value, p->membase + offset); +} + +static unsigned int mem32_serial_in_fn (struct uart_port *p,int offset) +{ + offset =map_8250_in_reg (p, offset) << p->regshift; +return readl (p->membase + offset); +}#ifdef CONFIG_SERIAL_8250_AU1X00 -case UPIO_AU : -return __raw_readl (up->port.membase + offset); +static unsigned int au_serial_in_fn (struct uart_port *p,int offset) +{ + offset =map_8250_in_reg (p, offset) << p->regshift; +return __raw_readl (p->membase + offset); +} + +static void au_serial_out_fn (struct uart_port *p,int offset,int value) +{ + offset =map_8250_out_reg (p, offset) << p->regshift; +__raw_writel (value, p->membase + offset); +}#endif -case UPIO_TSI : -if (offset ==UART_IIR ) { - tmp =readl (up->port.membase + (UART_IIR & ~3 )); -return (tmp >>16 ) &0xff ;/* UART_IIR % 4 == 2 */ - }else -return readb (up->port.membase + offset); +static unsigned int tsi_serial_in_fn (struct uart_port *p,int offset) +{ +unsigned int tmp; + offset =map_8250_in_reg (p, offset) << p->regshift; +if (offset ==UART_IIR ) { + tmp =readl (p->membase + (UART_IIR & ~3 )); +return (tmp >>16 ) &0xff ;/* UART_IIR % 4 == 2 */ + }else +return readb (p->membase + offset); +} -default : -return inb (up->port.iobase + offset); - } +static void tsi_serial_out_fn (struct uart_port *p,int offset,int value) +{ + offset =map_8250_out_reg (p, offset) << p->regshift; +if (!((offset ==UART_IER ) && (value &UART_IER_UUE ))) +writeb (value, p->membase + offset); } -static void -serial_out (struct uart_8250_port *up,int offset,int value) +static void dwapb_serial_out_fn (struct uart_port *p,int offset,int value) { -/* Save the offset before it's remapped */ int save_offset = offset; - offset =map_8250_out_reg (up, offset) << up->port.regshift; + offset =map_8250_out_reg (p, offset) << p->regshift; +/* Save the LCR value so it can be re-written when a +* Busy Detect interrupt occurs. */ +if (save_offset ==UART_LCR ) { +struct uart_8250_port *up = (struct uart_8250_port *)p; + up->lcr = value; + } +writeb (value, p->membase + offset); +/* Read the IER to ensure any interrupt is cleared before +* returning from ISR. */ +if (save_offset ==UART_TX || save_offset ==UART_IER ) + value = p->serial_in_fn (p,UART_IER ); +} -switch (up->port.iotype) { +static unsigned int io_serial_in_fn (struct uart_port *p,int offset) +{ + offset =map_8250_in_reg (p, offset) << p->regshift; +return inb (p->iobase + offset); +} + +static void io_serial_out_fn (struct uart_port *p,int offset,int value) +{ + offset =map_8250_out_reg (p, offset) << p->regshift; +outb (value, p->iobase + offset); +} + +static void set_io_fns_from_upio (struct uart_port *p) +{ +switch (p->iotype) {case UPIO_HUB6 : -outb (up->port.hub6 -1 + offset, up->port.iobase); -outb (value, up->port.iobase +1 ); + p->serial_in_fn = hub6_serial_in_fn; + p->serial_out_fn = hub6_serial_out_fn;break ;case UPIO_MEM : -writeb (value, up->port.membase + offset); + p->serial_in_fn = mem_serial_in_fn; + p->serial_out_fn = mem_serial_out_fn;break ;case UPIO_RM9000 :case UPIO_MEM32 : -writel (value, up->port.membase + offset); + p->serial_in_fn = mem32_serial_in_fn; + p->serial_out_fn = mem32_serial_out_fn;break ;#ifdef CONFIG_SERIAL_8250_AU1X00 case UPIO_AU : -__raw_writel (value, up->port.membase + offset); + p->serial_in_fn = au_serial_in_fn; + p->serial_out_fn = au_serial_out_fn;break ;#endif case UPIO_TSI : -if (!((offset ==UART_IER ) && (value &UART_IER_UUE ))) -writeb (value, up->port.membase + offset); + p->serial_in_fn = tsi_serial_in_fn; + p->serial_out_fn = tsi_serial_out_fn;break ;case UPIO_DWAPB : -/* Save the LCR value so it can be re-written when a -* Busy Detect interrupt occurs. */ -if (save_offset ==UART_LCR ) - up->lcr = value; -writeb (value, up->port.membase + offset); -/* Read the IER to ensure any interrupt is cleared before -* returning from ISR. */ -if (save_offset ==UART_TX || save_offset ==UART_IER ) - value =serial_in (up,UART_IER ); + p->serial_in_fn = mem_serial_in_fn; + p->serial_out_fn = dwapb_serial_out_fn;break ;default : -outb (value, up->port.iobase + offset); + p->serial_in_fn = io_serial_in_fn; + p->serial_out_fn = io_serial_out_fn; +break ; } }static void serial_out_sync (struct uart_8250_port *up,int offset,int value) { -switch (up->port.iotype) { +struct uart_port *p = &up->port; +switch (p->iotype) {case UPIO_MEM :case UPIO_MEM32 :#ifdef CONFIG_SERIAL_8250_AU1X00 case UPIO_AU :#endif case UPIO_DWAPB : -serial_out (up, offset, value); -serial_in (up,UART_LCR );/* safe, no side-effects */ + p->serial_out_fn (p, offset, value); + p->serial_in_fn (p,UART_LCR );/* safe, no side-effects */ break ;default : -serial_out (up, offset, value); + p->serial_out_fn (p, offset, value); } } +#define serial_in (up, offset) \ + (up->port.serial_in_fn(&(up)->port, (offset))) +#define serial_out (up, offset, value) \ + (up->port.serial_out_fn(&(up)->port, (offset), (value)))/* * We used to support using pause I/O for certain machines. We * haven't supported this for a while, but just in case it's badly
@@ -2576,6 +2638,7 @@ static void __init serial8250_isa_init_ports(void) up->port.membase = old_serial_port[i].iomem_base; up->port.iotype = old_serial_port[i].io_type; up->port.regshift = old_serial_port[i].iomem_reg_shift; +set_io_fns_from_upio (&up->port);if (share_irqs) up->port.flags |=UPF_SHARE_IRQ ; }
@@ -2769,6 +2832,13 @@ int __init early_serial_setup(struct uart_port *port) p->flags = port->flags; p->mapbase = port->mapbase; p->private_data = port->private_data; + +set_io_fns_from_upio (p); +if (port->serial_in_fn) + p->serial_in_fn = port->serial_in_fn; +if (port->serial_out_fn) + p->serial_out_fn = port->serial_out_fn; +return 0 ; }
@@ -2833,6 +2903,8 @@ static int __devinit serial8250_probe(struct platform_device *dev) port.mapbase = p->mapbase; port.hub6 = p->hub6; port.private_data = p->private_data; + port.serial_in_fn = p->serial_in_fn; + port.serial_out_fn = p->serial_out_fn; port.dev = &dev->dev;if (share_irqs) port.flags |=UPF_SHARE_IRQ ;
@@ -2986,6 +3058,12 @@ int serial8250_register_port(struct uart_port *port) uart->port.private_data = port->private_data;if (port->dev) uart->port.dev = port->dev; +set_io_fns_from_upio (&uart->port); +/* Possibly override default I/O functions. */ +if (port->serial_in_fn) + uart->port.serial_in_fn = port->serial_in_fn; +if (port->serial_out_fn) + uart->port.serial_out_fn = port->serial_out_fn; ret =uart_add_one_port (&serial8250_reg, &uart->port);if (ret ==0 )
include/linux/serial_8250.h +2 -0
@@ -28,6 +28,8 @@ struct plat_serial8250_port {unsigned char iotype;/* UPIO_* */ unsigned char hub6;upf_t flags;/* UPF_* flags */ +unsigned int (*serial_in_fn)(struct uart_port *,int ); +void (*serial_out_fn)(struct uart_port *,int ,int ); };/*
include/linux/serial_core.h +2 -0
@@ -246,6 +246,8 @@ struct uart_port {spinlock_t lock;/* port lock */ unsigned long iobase;/* in/out[bwl] */ unsigned char __iomem *membase;/* read/write[bwl] */ +unsigned int (*serial_in_fn)(struct uart_port *,int ); +void (*serial_out_fn)(struct uart_port *,int ,int );unsigned int irq;/* irq number */ unsigned int uartclk;/* base uart clock */ unsigned int fifosize;/* tx fifo size */
Signature · 1 line
1.5.6.5
PATCH 22/26 8250: Allow port type to specify bugs that are not probed for.
In reply to David DaneyAdd a bugs field to the serial8250_config and propagate it to the port's bugs field when the port is registered and configured.
This is a follow on to the previous patch. Now that we can specify the port type and don't have to probe for it, we can avoid probing for bugs if they are known with certainty to exist.
The alternative is to load up 8250.c with a bunch of OCTEON specific special cases in the probing code.
--- drivers/serial/8250.c | 2 ++ drivers/serial/8250.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-)
drivers/serial/8250.c +2 -0
@@ -1212,6 +1212,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags) up->port.fifosize = uart_config[up->port.type].fifo_size; up->capabilities = uart_config[up->port.type].flags; up->tx_loadsz = uart_config[up->port.type].tx_loadsz; + up->bugs |= uart_config[up->port.type].bugs;if (up->port.type ==PORT_UNKNOWN ) goto out;
@@ -3065,6 +3066,7 @@ int serial8250_register_port(struct uart_port *port) uart->port.fifosize = uart_config[port->type].fifo_size; uart->capabilities = uart_config[port->type].flags; uart->tx_loadsz = uart_config[port->type].tx_loadsz; + uart->bugs = uart_config[port->type].bugs; }set_io_fns_from_upio (&uart->port);
drivers/serial/8250.h +1 -0
@@ -34,6 +34,7 @@ struct serial8250_config {const char *name;unsigned short fifo_size;unsigned short tx_loadsz; +unsigned short bugs;unsigned char fcr;unsigned int flags; };
Signature · 1 line
1.5.6.5
PATCH 2/26 MIPS: Add Cavium OCTEON processor CSR definitions
In reply to David DaneyHere we define the addresses and bit-fields of the Configuration and Status Registers (CSRs) for some of the hardware functional units on the OCTEON SOC.
Definitions are needed for:
CIU -- Central Interrupt Unit.
GPIO -- General Purpose Input Output.
IOB -- Input / Output {Busing,Bridge}.
IPD -- Input Packet Data unit.
L2C -- Level-2 Cache controller.
L2D -- Level-2 Data cache.
L2T -- Level-2 cache Tag.
LED -- Light Emitting Diode controller.
MIO -- Miscellaneous Input / Output.
POW -- Packet Order / Work unit.--- arch/mips/include/asm/octeon/cvmx-ciu-defs.h | 1650 +++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-gpio-defs.h | 227 +++ arch/mips/include/asm/octeon/cvmx-iob-defs.h | 551 +++++++ arch/mips/include/asm/octeon/cvmx-ipd-defs.h | 910 +++++++++++ arch/mips/include/asm/octeon/cvmx-l2c-defs.h | 990 ++++++++++++ arch/mips/include/asm/octeon/cvmx-l2d-defs.h | 380 +++++ arch/mips/include/asm/octeon/cvmx-l2t-defs.h | 141 ++ arch/mips/include/asm/octeon/cvmx-led-defs.h | 252 +++ arch/mips/include/asm/octeon/cvmx-mio-defs.h | 2117 +++++++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-pow-defs.h | 720 +++++++++ 10 files changed, 7938 insertions(+), 0 deletions(-) create mode 100644 arch/mips/include/asm/octeon/cvmx-ciu-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-gpio-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-iob-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-ipd-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-l2c-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-l2d-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-l2t-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-led-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-mio-defs.h create mode 100644 arch/mips/include/asm/octeon/cvmx-pow-defs.h
arch/mips/include/asm/octeon/cvmx-ciu-defs.h new file +1650 -0
@@ -0,0 +1,1650 @@ +/***********************license start*************** +* Author: Cavium Networks +* +* Contact: [email protected] +* This file is part of the OCTEON SDK +* +* Copyright (c) 2003-2008 Cavium Networks +* +* This file 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. +* +* This file is distributed in the hope that it will be useful, +* but AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. +* See the GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this file; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* or visit http://www.gnu.org/licenses/. +* +* This file may also be available under a different license from Cavium. +* Contact Cavium Networks for more information +***********************license end**************************************/ + +#ifndef __CVMX_CIU_DEFS_H__ +#define __CVMX_CIU_DEFS_H__ + +#define CVMX_CIU_BIST \ + CVMX_ADD_IO_SEG(0x0001070000000730ull) +#define CVMX_CIU_DINT \ + CVMX_ADD_IO_SEG(0x0001070000000720ull) +#define CVMX_CIU_FUSE \ + CVMX_ADD_IO_SEG(0x0001070000000728ull) +#define CVMX_CIU_GSTOP \ + CVMX_ADD_IO_SEG(0x0001070000000710ull) +#define CVMX_CIU_INTX_EN0 (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000200ull + (((offset) & 63) * 16)) +#define CVMX_CIU_INTX_EN0_W1C (offset) \ + CVMX_ADD_IO_SEG(0x0001070000002200ull + (((offset) & 63) * 16)) +#define CVMX_CIU_INTX_EN0_W1S (offset) \ + CVMX_ADD_IO_SEG(0x0001070000006200ull + (((offset) & 63) * 16)) +#define CVMX_CIU_INTX_EN1 (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000208ull + (((offset) & 63) * 16)) +#define CVMX_CIU_INTX_EN1_W1C (offset) \ + CVMX_ADD_IO_SEG(0x0001070000002208ull + (((offset) & 63) * 16)) +#define CVMX_CIU_INTX_EN1_W1S (offset) \ + CVMX_ADD_IO_SEG(0x0001070000006208ull + (((offset) & 63) * 16)) +#define CVMX_CIU_INTX_EN4_0 (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000C80ull + (((offset) & 15) * 16)) +#define CVMX_CIU_INTX_EN4_0_W1C (offset) \ + CVMX_ADD_IO_SEG(0x0001070000002C80ull + (((offset) & 15) * 16)) +#define CVMX_CIU_INTX_EN4_0_W1S (offset) \ + CVMX_ADD_IO_SEG(0x0001070000006C80ull + (((offset) & 15) * 16)) +#define CVMX_CIU_INTX_EN4_1 (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000C88ull + (((offset) & 15) * 16)) +#define CVMX_CIU_INTX_EN4_1_W1C (offset) \ + CVMX_ADD_IO_SEG(0x0001070000002C88ull + (((offset) & 15) * 16)) +#define CVMX_CIU_INTX_EN4_1_W1S (offset) \ + CVMX_ADD_IO_SEG(0x0001070000006C88ull + (((offset) & 15) * 16)) +#define CVMX_CIU_INTX_SUM0 (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000000ull + (((offset) & 63) * 8)) +#define CVMX_CIU_INTX_SUM4 (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000C00ull + (((offset) & 15) * 8)) +#define CVMX_CIU_INT_SUM1 \ + CVMX_ADD_IO_SEG(0x0001070000000108ull) +#define CVMX_CIU_MBOX_CLRX (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000680ull + (((offset) & 15) * 8)) +#define CVMX_CIU_MBOX_SETX (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000600ull + (((offset) & 15) * 8)) +#define CVMX_CIU_NMI \ + CVMX_ADD_IO_SEG(0x0001070000000718ull) +#define CVMX_CIU_PCI_INTA \ + CVMX_ADD_IO_SEG(0x0001070000000750ull) +#define CVMX_CIU_PP_DBG \ + CVMX_ADD_IO_SEG(0x0001070000000708ull) +#define CVMX_CIU_PP_POKEX (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000580ull + (((offset) & 15) * 8)) +#define CVMX_CIU_PP_RST \ + CVMX_ADD_IO_SEG(0x0001070000000700ull) +#define CVMX_CIU_QLM_DCOK \ + CVMX_ADD_IO_SEG(0x0001070000000760ull) +#define CVMX_CIU_QLM_JTGC \ + CVMX_ADD_IO_SEG(0x0001070000000768ull) +#define CVMX_CIU_QLM_JTGD \ + CVMX_ADD_IO_SEG(0x0001070000000770ull) +#define CVMX_CIU_SOFT_BIST \ + CVMX_ADD_IO_SEG(0x0001070000000738ull) +#define CVMX_CIU_SOFT_PRST \ + CVMX_ADD_IO_SEG(0x0001070000000748ull) +#define CVMX_CIU_SOFT_PRST1 \ + CVMX_ADD_IO_SEG(0x0001070000000758ull) +#define CVMX_CIU_SOFT_RST \ + CVMX_ADD_IO_SEG(0x0001070000000740ull) +#define CVMX_CIU_TIMX (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000480ull + (((offset) & 3) * 8)) +#define CVMX_CIU_WDOGX (offset) \ + CVMX_ADD_IO_SEG(0x0001070000000500ull + (((offset) & 15) * 8)) + +union cvmx_ciu_bist { +uint64_t u64; +struct cvmx_ciu_bist_s { +uint64_t reserved_4_63:60 ; +uint64_t bist:4 ; + } s; +struct cvmx_ciu_bist_s cn30xx; +struct cvmx_ciu_bist_s cn31xx; +struct cvmx_ciu_bist_s cn38xx; +struct cvmx_ciu_bist_s cn38xxp2; +struct cvmx_ciu_bist_cn50xx { +uint64_t reserved_2_63:62 ; +uint64_t bist:2 ; + } cn50xx; +struct cvmx_ciu_bist_cn52xx { +uint64_t reserved_3_63:61 ; +uint64_t bist:3 ; + } cn52xx; +struct cvmx_ciu_bist_cn52xx cn52xxp1; +struct cvmx_ciu_bist_s cn56xx; +struct cvmx_ciu_bist_s cn56xxp1; +struct cvmx_ciu_bist_s cn58xx; +struct cvmx_ciu_bist_s cn58xxp1; +}; +typedef union cvmx_ciu_bist cvmx_ciu_bist_t ; + +union cvmx_ciu_dint { +uint64_t u64; +struct cvmx_ciu_dint_s { +uint64_t reserved_16_63:48 ; +uint64_t dint:16 ; + } s; +struct cvmx_ciu_dint_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t dint:1 ; + } cn30xx; +struct cvmx_ciu_dint_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t dint:2 ; + } cn31xx; +struct cvmx_ciu_dint_s cn38xx; +struct cvmx_ciu_dint_s cn38xxp2; +struct cvmx_ciu_dint_cn31xx cn50xx; +struct cvmx_ciu_dint_cn52xx { +uint64_t reserved_4_63:60 ; +uint64_t dint:4 ; + } cn52xx; +struct cvmx_ciu_dint_cn52xx cn52xxp1; +struct cvmx_ciu_dint_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t dint:12 ; + } cn56xx; +struct cvmx_ciu_dint_cn56xx cn56xxp1; +struct cvmx_ciu_dint_s cn58xx; +struct cvmx_ciu_dint_s cn58xxp1; +}; +typedef union cvmx_ciu_dint cvmx_ciu_dint_t ; + +union cvmx_ciu_fuse { +uint64_t u64; +struct cvmx_ciu_fuse_s { +uint64_t reserved_16_63:48 ; +uint64_t fuse:16 ; + } s; +struct cvmx_ciu_fuse_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t fuse:1 ; + } cn30xx; +struct cvmx_ciu_fuse_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t fuse:2 ; + } cn31xx; +struct cvmx_ciu_fuse_s cn38xx; +struct cvmx_ciu_fuse_s cn38xxp2; +struct cvmx_ciu_fuse_cn31xx cn50xx; +struct cvmx_ciu_fuse_cn52xx { +uint64_t reserved_4_63:60 ; +uint64_t fuse:4 ; + } cn52xx; +struct cvmx_ciu_fuse_cn52xx cn52xxp1; +struct cvmx_ciu_fuse_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t fuse:12 ; + } cn56xx; +struct cvmx_ciu_fuse_cn56xx cn56xxp1; +struct cvmx_ciu_fuse_s cn58xx; +struct cvmx_ciu_fuse_s cn58xxp1; +}; +typedef union cvmx_ciu_fuse cvmx_ciu_fuse_t ; + +union cvmx_ciu_gstop { +uint64_t u64; +struct cvmx_ciu_gstop_s { +uint64_t reserved_1_63:63 ; +uint64_t gstop:1 ; + } s; +struct cvmx_ciu_gstop_s cn30xx; +struct cvmx_ciu_gstop_s cn31xx; +struct cvmx_ciu_gstop_s cn38xx; +struct cvmx_ciu_gstop_s cn38xxp2; +struct cvmx_ciu_gstop_s cn50xx; +struct cvmx_ciu_gstop_s cn52xx; +struct cvmx_ciu_gstop_s cn52xxp1; +struct cvmx_ciu_gstop_s cn56xx; +struct cvmx_ciu_gstop_s cn56xxp1; +struct cvmx_ciu_gstop_s cn58xx; +struct cvmx_ciu_gstop_s cn58xxp1; +}; +typedef union cvmx_ciu_gstop cvmx_ciu_gstop_t ; + +union cvmx_ciu_intx_en0 { +uint64_t u64; +struct cvmx_ciu_intx_en0_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_en0_cn30xx { +uint64_t reserved_59_63:5 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t reserved_47_47:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn30xx; +struct cvmx_ciu_intx_en0_cn31xx { +uint64_t reserved_59_63:5 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn31xx; +struct cvmx_ciu_intx_en0_cn38xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn38xx; +struct cvmx_ciu_intx_en0_cn38xx cn38xxp2; +struct cvmx_ciu_intx_en0_cn30xx cn50xx; +struct cvmx_ciu_intx_en0_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_en0_cn52xx cn52xxp1; +struct cvmx_ciu_intx_en0_cn56xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn56xx; +struct cvmx_ciu_intx_en0_cn56xx cn56xxp1; +struct cvmx_ciu_intx_en0_cn38xx cn58xx; +struct cvmx_ciu_intx_en0_cn38xx cn58xxp1; +}; +typedef union cvmx_ciu_intx_en0 cvmx_ciu_intx_en0_t ; + +union cvmx_ciu_intx_en0_w1c { +uint64_t u64; +struct cvmx_ciu_intx_en0_w1c_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_en0_w1c_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_en0_w1c_s cn56xx; +struct cvmx_ciu_intx_en0_w1c_cn58xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en0_w1c cvmx_ciu_intx_en0_w1c_t ; + +union cvmx_ciu_intx_en0_w1s { +uint64_t u64; +struct cvmx_ciu_intx_en0_w1s_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_en0_w1s_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_en0_w1s_s cn56xx; +struct cvmx_ciu_intx_en0_w1s_cn58xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en0_w1s cvmx_ciu_intx_en0_w1s_t ; + +union cvmx_ciu_intx_en1 { +uint64_t u64; +struct cvmx_ciu_intx_en1_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_intx_en1_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t wdog:1 ; + } cn30xx; +struct cvmx_ciu_intx_en1_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t wdog:2 ; + } cn31xx; +struct cvmx_ciu_intx_en1_cn38xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn38xx; +struct cvmx_ciu_intx_en1_cn38xx cn38xxp2; +struct cvmx_ciu_intx_en1_cn31xx cn50xx; +struct cvmx_ciu_intx_en1_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_intx_en1_cn52xxp1 { +uint64_t reserved_19_63:45 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xxp1; +struct cvmx_ciu_intx_en1_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_intx_en1_cn56xx cn56xxp1; +struct cvmx_ciu_intx_en1_cn38xx cn58xx; +struct cvmx_ciu_intx_en1_cn38xx cn58xxp1; +}; +typedef union cvmx_ciu_intx_en1 cvmx_ciu_intx_en1_t ; + +union cvmx_ciu_intx_en1_w1c { +uint64_t u64; +struct cvmx_ciu_intx_en1_w1c_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_intx_en1_w1c_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_intx_en1_w1c_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_intx_en1_w1c_cn58xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en1_w1c cvmx_ciu_intx_en1_w1c_t ; + +union cvmx_ciu_intx_en1_w1s { +uint64_t u64; +struct cvmx_ciu_intx_en1_w1s_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_intx_en1_w1s_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_intx_en1_w1s_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_intx_en1_w1s_cn58xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en1_w1s cvmx_ciu_intx_en1_w1s_t ; + +union cvmx_ciu_intx_en4_0 { +uint64_t u64; +struct cvmx_ciu_intx_en4_0_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_en4_0_cn50xx { +uint64_t reserved_59_63:5 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t reserved_47_47:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn50xx; +struct cvmx_ciu_intx_en4_0_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_en4_0_cn52xx cn52xxp1; +struct cvmx_ciu_intx_en4_0_cn56xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn56xx; +struct cvmx_ciu_intx_en4_0_cn56xx cn56xxp1; +struct cvmx_ciu_intx_en4_0_cn58xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn58xx; +struct cvmx_ciu_intx_en4_0_cn58xx cn58xxp1; +}; +typedef union cvmx_ciu_intx_en4_0 cvmx_ciu_intx_en4_0_t ; + +union cvmx_ciu_intx_en4_0_w1c { +uint64_t u64; +struct cvmx_ciu_intx_en4_0_w1c_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_en4_0_w1c_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_en4_0_w1c_s cn56xx; +struct cvmx_ciu_intx_en4_0_w1c_cn58xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en4_0_w1c cvmx_ciu_intx_en4_0_w1c_t ; + +union cvmx_ciu_intx_en4_0_w1s { +uint64_t u64; +struct cvmx_ciu_intx_en4_0_w1s_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_en4_0_w1s_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_en4_0_w1s_s cn56xx; +struct cvmx_ciu_intx_en4_0_w1s_cn58xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t reserved_44_44:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en4_0_w1s cvmx_ciu_intx_en4_0_w1s_t ; + +union cvmx_ciu_intx_en4_1 { +uint64_t u64; +struct cvmx_ciu_intx_en4_1_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_intx_en4_1_cn50xx { +uint64_t reserved_2_63:62 ; +uint64_t wdog:2 ; + } cn50xx; +struct cvmx_ciu_intx_en4_1_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_intx_en4_1_cn52xxp1 { +uint64_t reserved_19_63:45 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xxp1; +struct cvmx_ciu_intx_en4_1_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_intx_en4_1_cn56xx cn56xxp1; +struct cvmx_ciu_intx_en4_1_cn58xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn58xx; +struct cvmx_ciu_intx_en4_1_cn58xx cn58xxp1; +}; +typedef union cvmx_ciu_intx_en4_1 cvmx_ciu_intx_en4_1_t ; + +union cvmx_ciu_intx_en4_1_w1c { +uint64_t u64; +struct cvmx_ciu_intx_en4_1_w1c_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_intx_en4_1_w1c_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_intx_en4_1_w1c_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_intx_en4_1_w1c_cn58xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en4_1_w1c cvmx_ciu_intx_en4_1_w1c_t ; + +union cvmx_ciu_intx_en4_1_w1s { +uint64_t u64; +struct cvmx_ciu_intx_en4_1_w1s_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_intx_en4_1_w1s_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_intx_en4_1_w1s_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_intx_en4_1_w1s_cn58xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn58xx; +}; +typedef union cvmx_ciu_intx_en4_1_w1s cvmx_ciu_intx_en4_1_w1s_t ; + +union cvmx_ciu_intx_sum0 { +uint64_t u64; +struct cvmx_ciu_intx_sum0_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_sum0_cn30xx { +uint64_t reserved_59_63:5 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t reserved_47_47:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn30xx; +struct cvmx_ciu_intx_sum0_cn31xx { +uint64_t reserved_59_63:5 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn31xx; +struct cvmx_ciu_intx_sum0_cn38xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn38xx; +struct cvmx_ciu_intx_sum0_cn38xx cn38xxp2; +struct cvmx_ciu_intx_sum0_cn30xx cn50xx; +struct cvmx_ciu_intx_sum0_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_sum0_cn52xx cn52xxp1; +struct cvmx_ciu_intx_sum0_cn56xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn56xx; +struct cvmx_ciu_intx_sum0_cn56xx cn56xxp1; +struct cvmx_ciu_intx_sum0_cn38xx cn58xx; +struct cvmx_ciu_intx_sum0_cn38xx cn58xxp1; +}; +typedef union cvmx_ciu_intx_sum0 cvmx_ciu_intx_sum0_t ; + +union cvmx_ciu_intx_sum4 { +uint64_t u64; +struct cvmx_ciu_intx_sum4_s { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } s; +struct cvmx_ciu_intx_sum4_cn50xx { +uint64_t reserved_59_63:5 ; +uint64_t mpi:1 ; +uint64_t pcm:1 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t reserved_47_47:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn50xx; +struct cvmx_ciu_intx_sum4_cn52xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t reserved_51_51:1 ; +uint64_t ipd_drp:1 ; +uint64_t reserved_49_49:1 ; +uint64_t gmx_drp:1 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn52xx; +struct cvmx_ciu_intx_sum4_cn52xx cn52xxp1; +struct cvmx_ciu_intx_sum4_cn56xx { +uint64_t bootdma:1 ; +uint64_t mii:1 ; +uint64_t ipdppthr:1 ; +uint64_t powiq:1 ; +uint64_t twsi2:1 ; +uint64_t reserved_57_58:2 ; +uint64_t usb:1 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn56xx; +struct cvmx_ciu_intx_sum4_cn56xx cn56xxp1; +struct cvmx_ciu_intx_sum4_cn58xx { +uint64_t reserved_56_63:8 ; +uint64_t timer:4 ; +uint64_t key_zero:1 ; +uint64_t ipd_drp:1 ; +uint64_t gmx_drp:2 ; +uint64_t trace:1 ; +uint64_t rml:1 ; +uint64_t twsi:1 ; +uint64_t wdog_sum:1 ; +uint64_t pci_msi:4 ; +uint64_t pci_int:4 ; +uint64_t uart:2 ; +uint64_t mbox:2 ; +uint64_t gpio:16 ; +uint64_t workq:16 ; + } cn58xx; +struct cvmx_ciu_intx_sum4_cn58xx cn58xxp1; +}; +typedef union cvmx_ciu_intx_sum4 cvmx_ciu_intx_sum4_t ; + +union cvmx_ciu_int_sum1 { +uint64_t u64; +struct cvmx_ciu_int_sum1_s { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t wdog:16 ; + } s; +struct cvmx_ciu_int_sum1_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t wdog:1 ; + } cn30xx; +struct cvmx_ciu_int_sum1_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t wdog:2 ; + } cn31xx; +struct cvmx_ciu_int_sum1_cn38xx { +uint64_t reserved_16_63:48 ; +uint64_t wdog:16 ; + } cn38xx; +struct cvmx_ciu_int_sum1_cn38xx cn38xxp2; +struct cvmx_ciu_int_sum1_cn31xx cn50xx; +struct cvmx_ciu_int_sum1_cn52xx { +uint64_t reserved_20_63:44 ; +uint64_t nand:1 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xx; +struct cvmx_ciu_int_sum1_cn52xxp1 { +uint64_t reserved_19_63:45 ; +uint64_t mii1:1 ; +uint64_t usb1:1 ; +uint64_t uart2:1 ; +uint64_t reserved_4_15:12 ; +uint64_t wdog:4 ; + } cn52xxp1; +struct cvmx_ciu_int_sum1_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t wdog:12 ; + } cn56xx; +struct cvmx_ciu_int_sum1_cn56xx cn56xxp1; +struct cvmx_ciu_int_sum1_cn38xx cn58xx; +struct cvmx_ciu_int_sum1_cn38xx cn58xxp1; +}; +typedef union cvmx_ciu_int_sum1 cvmx_ciu_int_sum1_t ; + +union cvmx_ciu_mbox_clrx { +uint64_t u64; +struct cvmx_ciu_mbox_clrx_s { +uint64_t reserved_32_63:32 ; +uint64_t bits:32 ; + } s; +struct cvmx_ciu_mbox_clrx_s cn30xx; +struct cvmx_ciu_mbox_clrx_s cn31xx; +struct cvmx_ciu_mbox_clrx_s cn38xx; +struct cvmx_ciu_mbox_clrx_s cn38xxp2; +struct cvmx_ciu_mbox_clrx_s cn50xx; +struct cvmx_ciu_mbox_clrx_s cn52xx; +struct cvmx_ciu_mbox_clrx_s cn52xxp1; +struct cvmx_ciu_mbox_clrx_s cn56xx; +struct cvmx_ciu_mbox_clrx_s cn56xxp1; +struct cvmx_ciu_mbox_clrx_s cn58xx; +struct cvmx_ciu_mbox_clrx_s cn58xxp1; +}; +typedef union cvmx_ciu_mbox_clrx cvmx_ciu_mbox_clrx_t ; + +union cvmx_ciu_mbox_setx { +uint64_t u64; +struct cvmx_ciu_mbox_setx_s { +uint64_t reserved_32_63:32 ; +uint64_t bits:32 ; + } s; +struct cvmx_ciu_mbox_setx_s cn30xx; +struct cvmx_ciu_mbox_setx_s cn31xx; +struct cvmx_ciu_mbox_setx_s cn38xx; +struct cvmx_ciu_mbox_setx_s cn38xxp2; +struct cvmx_ciu_mbox_setx_s cn50xx; +struct cvmx_ciu_mbox_setx_s cn52xx; +struct cvmx_ciu_mbox_setx_s cn52xxp1; +struct cvmx_ciu_mbox_setx_s cn56xx; +struct cvmx_ciu_mbox_setx_s cn56xxp1; +struct cvmx_ciu_mbox_setx_s cn58xx; +struct cvmx_ciu_mbox_setx_s cn58xxp1; +}; +typedef union cvmx_ciu_mbox_setx cvmx_ciu_mbox_setx_t ; + +union cvmx_ciu_nmi { +uint64_t u64; +struct cvmx_ciu_nmi_s { +uint64_t reserved_16_63:48 ; +uint64_t nmi:16 ; + } s; +struct cvmx_ciu_nmi_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t nmi:1 ; + } cn30xx; +struct cvmx_ciu_nmi_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t nmi:2 ; + } cn31xx; +struct cvmx_ciu_nmi_s cn38xx; +struct cvmx_ciu_nmi_s cn38xxp2; +struct cvmx_ciu_nmi_cn31xx cn50xx; +struct cvmx_ciu_nmi_cn52xx { +uint64_t reserved_4_63:60 ; +uint64_t nmi:4 ; + } cn52xx; +struct cvmx_ciu_nmi_cn52xx cn52xxp1; +struct cvmx_ciu_nmi_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t nmi:12 ; + } cn56xx; +struct cvmx_ciu_nmi_cn56xx cn56xxp1; +struct cvmx_ciu_nmi_s cn58xx; +struct cvmx_ciu_nmi_s cn58xxp1; +}; +typedef union cvmx_ciu_nmi cvmx_ciu_nmi_t ; + +union cvmx_ciu_pci_inta { +uint64_t u64; +struct cvmx_ciu_pci_inta_s { +uint64_t reserved_2_63:62 ; +uint64_t intr:2 ; + } s; +struct cvmx_ciu_pci_inta_s cn30xx; +struct cvmx_ciu_pci_inta_s cn31xx; +struct cvmx_ciu_pci_inta_s cn38xx; +struct cvmx_ciu_pci_inta_s cn38xxp2; +struct cvmx_ciu_pci_inta_s cn50xx; +struct cvmx_ciu_pci_inta_s cn52xx; +struct cvmx_ciu_pci_inta_s cn52xxp1; +struct cvmx_ciu_pci_inta_s cn56xx; +struct cvmx_ciu_pci_inta_s cn56xxp1; +struct cvmx_ciu_pci_inta_s cn58xx; +struct cvmx_ciu_pci_inta_s cn58xxp1; +}; +typedef union cvmx_ciu_pci_inta cvmx_ciu_pci_inta_t ; + +union cvmx_ciu_pp_dbg { +uint64_t u64; +struct cvmx_ciu_pp_dbg_s { +uint64_t reserved_16_63:48 ; +uint64_t ppdbg:16 ; + } s; +struct cvmx_ciu_pp_dbg_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t ppdbg:1 ; + } cn30xx; +struct cvmx_ciu_pp_dbg_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t ppdbg:2 ; + } cn31xx; +struct cvmx_ciu_pp_dbg_s cn38xx; +struct cvmx_ciu_pp_dbg_s cn38xxp2; +struct cvmx_ciu_pp_dbg_cn31xx cn50xx; +struct cvmx_ciu_pp_dbg_cn52xx { +uint64_t reserved_4_63:60 ; +uint64_t ppdbg:4 ; + } cn52xx; +struct cvmx_ciu_pp_dbg_cn52xx cn52xxp1; +struct cvmx_ciu_pp_dbg_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t ppdbg:12 ; + } cn56xx; +struct cvmx_ciu_pp_dbg_cn56xx cn56xxp1; +struct cvmx_ciu_pp_dbg_s cn58xx; +struct cvmx_ciu_pp_dbg_s cn58xxp1; +}; +typedef union cvmx_ciu_pp_dbg cvmx_ciu_pp_dbg_t ; + +union cvmx_ciu_pp_pokex { +uint64_t u64; +struct cvmx_ciu_pp_pokex_s { +uint64_t reserved_0_63:64 ; + } s; +struct cvmx_ciu_pp_pokex_s cn30xx; +struct cvmx_ciu_pp_pokex_s cn31xx; +struct cvmx_ciu_pp_pokex_s cn38xx; +struct cvmx_ciu_pp_pokex_s cn38xxp2; +struct cvmx_ciu_pp_pokex_s cn50xx; +struct cvmx_ciu_pp_pokex_s cn52xx; +struct cvmx_ciu_pp_pokex_s cn52xxp1; +struct cvmx_ciu_pp_pokex_s cn56xx; +struct cvmx_ciu_pp_pokex_s cn56xxp1; +struct cvmx_ciu_pp_pokex_s cn58xx; +struct cvmx_ciu_pp_pokex_s cn58xxp1; +}; +typedef union cvmx_ciu_pp_pokex cvmx_ciu_pp_pokex_t ; + +union cvmx_ciu_pp_rst { +uint64_t u64; +struct cvmx_ciu_pp_rst_s { +uint64_t reserved_16_63:48 ; +uint64_t rst:15 ; +uint64_t rst0:1 ; + } s; +struct cvmx_ciu_pp_rst_cn30xx { +uint64_t reserved_1_63:63 ; +uint64_t rst0:1 ; + } cn30xx; +struct cvmx_ciu_pp_rst_cn31xx { +uint64_t reserved_2_63:62 ; +uint64_t rst:1 ; +uint64_t rst0:1 ; + } cn31xx; +struct cvmx_ciu_pp_rst_s cn38xx; +struct cvmx_ciu_pp_rst_s cn38xxp2; +struct cvmx_ciu_pp_rst_cn31xx cn50xx; +struct cvmx_ciu_pp_rst_cn52xx { +uint64_t reserved_4_63:60 ; +uint64_t rst:3 ; +uint64_t rst0:1 ; + } cn52xx; +struct cvmx_ciu_pp_rst_cn52xx cn52xxp1; +struct cvmx_ciu_pp_rst_cn56xx { +uint64_t reserved_12_63:52 ; +uint64_t rst:11 ; +uint64_t rst0:1 ; + } cn56xx; +struct cvmx_ciu_pp_rst_cn56xx cn56xxp1; +struct cvmx_ciu_pp_rst_s cn58xx; +struct cvmx_ciu_pp_rst_s cn58xxp1; +}; +typedef union cvmx_ciu_pp_rst cvmx_ciu_pp_rst_t ; + +union cvmx_ciu_qlm_dcok { +uint64_t u64; +struct cvmx_ciu_qlm_dcok_s { +uint64_t reserved_4_63:60 ; +uint64_t qlm_dcok:4 ; + } s; +struct cvmx_ciu_qlm_dcok_cn52xx { +uint64_t reserved_2_63:62 ; +uint64_t qlm_dcok:2 ; + } cn52xx; +struct cvmx_ciu_qlm_dcok_cn52xx cn52xxp1; +struct cvmx_ciu_qlm_dcok_s cn56xx; +struct cvmx_ciu_qlm_dcok_s cn56xxp1; +}; +typedef union cvmx_ciu_qlm_dcok cvmx_ciu_qlm_dcok_t ; + +union cvmx_ciu_qlm_jtgc { +uint64_t u64; +struct cvmx_ciu_qlm_jtgc_s { +uint64_t reserved_11_63:53 ; +uint64_t clk_div:3 ; +uint64_t reserved_6_7:2 ; +uint64_t mux_sel:2 ; +uint64_t bypass:4 ; + } s; +struct cvmx_ciu_qlm_jtgc_cn52xx { +uint64_t reserved_11_63:53 ; +uint64_t clk_div:3 ; +uint64_t reserved_5_7:3 ; +uint64_t mux_sel:1 ; +uint64_t reserved_2_3:2 ; +uint64_t bypass:2 ; + } cn52xx; +struct cvmx_ciu_qlm_jtgc_cn52xx cn52xxp1; +struct cvmx_ciu_qlm_jtgc_s cn56xx; +struct cvmx_ciu_qlm_jtgc_s cn56xxp1; +}; +typedef union cvmx_ciu_qlm_jtgc cvmx_ciu_qlm_jtgc_t ; + +union cvmx_ciu_qlm_jtgd { +uint64_t u64; +struct cvmx_ciu_qlm_jtgd_s { +uint64_t capture:1 ; +uint64_t shift:1 ; +uint64_t update:1 ; +uint64_t reserved_44_60:17 ; +uint64_t select:4 ; +uint64_t reserved_37_39:3 ; +uint64_t shft_cnt:5 ; +uint64_t shft_reg:32 ; + } s; +struct cvmx_ciu_qlm_jtgd_cn52xx { +uint64_t capture:1 ; +uint64_t shift:1 ; +uint64_t update:1 ; +uint64_t reserved_42_60:19 ; +uint64_t select:2 ; +uint64_t reserved_37_39:3 ; +uint64_t shft_cnt:5 ; +uint64_t shft_reg:32 ; + } cn52xx; +struct cvmx_ciu_qlm_jtgd_cn52xx cn52xxp1; +struct cvmx_ciu_qlm_jtgd_s cn56xx; +struct cvmx_ciu_qlm_jtgd_cn56xxp1 { +uint64_t capture:1 ; +uint64_t shift:1 ; +uint64_t update:1 ; +uint64_t reserved_37_60:24 ; +uint64_t shft_cnt:5 ; +uint64_t shft_reg:32 ; + } cn56xxp1; +}; +typedef union cvmx_ciu_qlm_jtgd cvmx_ciu_qlm_jtgd_t ; + +union cvmx_ciu_soft_bist { +uint64_t u64; +struct cvmx_ciu_soft_bist_s { +uint64_t reserved_1_63:63 ; +uint64_t soft_bist:1 ; + } s; +struct cvmx_ciu_soft_bist_s cn30xx; +struct cvmx_ciu_soft_bist_s cn31xx; +struct cvmx_ciu_soft_bist_s cn38xx; +struct cvmx_ciu_soft_bist_s cn38xxp2; +struct cvmx_ciu_soft_bist_s cn50xx; +struct cvmx_ciu_soft_bist_s cn52xx; +struct cvmx_ciu_soft_bist_s cn52xxp1; +struct cvmx_ciu_soft_bist_s cn56xx; +struct cvmx_ciu_soft_bist_s cn56xxp1; +struct cvmx_ciu_soft_bist_s cn58xx; +struct cvmx_ciu_soft_bist_s cn58xxp1; +}; +typedef union cvmx_ciu_soft_bist cvmx_ciu_soft_bist_t ; + +union cvmx_ciu_soft_prst { +uint64_t u64; +struct cvmx_ciu_soft_prst_s { +uint64_t reserved_3_63:61 ; +uint64_t host64:1 ; +uint64_t npi:1 ; +uint64_t soft_prst:1 ; + } s; +struct cvmx_ciu_soft_prst_s cn30xx; +struct cvmx_ciu_soft_prst_s cn31xx; +struct cvmx_ciu_soft_prst_s cn38xx; +struct cvmx_ciu_soft_prst_s cn38xxp2; +struct cvmx_ciu_soft_prst_s cn50xx; +struct cvmx_ciu_soft_prst_cn52xx { +uint64_t reserved_1_63:63 ; +uint64_t soft_prst:1 ; + } cn52xx; +struct cvmx_ciu_soft_prst_cn52xx cn52xxp1; +struct cvmx_ciu_soft_prst_cn52xx cn56xx; +struct cvmx_ciu_soft_prst_cn52xx cn56xxp1; +struct cvmx_ciu_soft_prst_s cn58xx; +struct cvmx_ciu_soft_prst_s cn58xxp1; +}; +typedef union cvmx_ciu_soft_prst cvmx_ciu_soft_prst_t ; + +union cvmx_ciu_soft_prst1 { +uint64_t u64; +struct cvmx_ciu_soft_prst1_s { +uint64_t reserved_1_63:63 ; +uint64_t soft_prst:1 ; + } s; +struct cvmx_ciu_soft_prst1_s cn52xx; +struct cvmx_ciu_soft_prst1_s cn52xxp1; +struct cvmx_ciu_soft_prst1_s cn56xx; +struct cvmx_ciu_soft_prst1_s cn56xxp1; +}; +typedef union cvmx_ciu_soft_prst1 cvmx_ciu_soft_prst1_t ; + +union cvmx_ciu_soft_rst { +uint64_t u64; +struct cvmx_ciu_soft_rst_s { +uint64_t reserved_1_63:63 ; +uint64_t soft_rst:1 ; + } s; +struct cvmx_ciu_soft_rst_s cn30xx; +struct cvmx_ciu_soft_rst_s cn31xx; +struct cvmx_ciu_soft_rst_s cn38xx; +struct cvmx_ciu_soft_rst_s cn38xxp2; +struct cvmx_ciu_soft_rst_s cn50xx; +struct cvmx_ciu_soft_rst_s cn52xx; +struct cvmx_ciu_soft_rst_s cn52xxp1; +struct cvmx_ciu_soft_rst_s cn56xx; +struct cvmx_ciu_soft_rst_s cn56xxp1; +struct cvmx_ciu_soft_rst_s cn58xx; +struct cvmx_ciu_soft_rst_s cn58xxp1; +}; +typedef union cvmx_ciu_soft_rst cvmx_ciu_soft_rst_t ; + +union cvmx_ciu_timx { +uint64_t u64; +struct cvmx_ciu_timx_s { +uint64_t reserved_37_63:27 ; +uint64_t one_shot:1 ; +uint64_t len:36 ; + } s; +struct cvmx_ciu_timx_s cn30xx; +struct cvmx_ciu_timx_s cn31xx; +struct cvmx_ciu_timx_s cn38xx; +struct cvmx_ciu_timx_s cn38xxp2; +struct cvmx_ciu_timx_s cn50xx; +struct cvmx_ciu_timx_s cn52xx; +struct cvmx_ciu_timx_s cn52xxp1; +struct cvmx_ciu_timx_s cn56xx; +struct cvmx_ciu_timx_s cn56xxp1; +struct cvmx_ciu_timx_s cn58xx; +struct cvmx_ciu_timx_s cn58xxp1; +}; +typedef union cvmx_ciu_timx cvmx_ciu_timx_t ; + +union cvmx_ciu_wdogx { +uint64_t u64; +struct cvmx_ciu_wdogx_s { +uint64_t reserved_46_63:18 ; +uint64_t gstopen:1 ; +uint64_t dstop:1 ; +uint64_t cnt:24 ; +uint64_t len:16 ; +uint64_t state:2 ; +uint64_t mode:2 ; + } s; +struct cvmx_ciu_wdogx_s cn30xx; +struct cvmx_ciu_wdogx_s cn31xx; +struct cvmx_ciu_wdogx_s cn38xx; +struct cvmx_ciu_wdogx_s cn38xxp2; +struct cvmx_ciu_wdogx_s cn50xx; +struct cvmx_ciu_wdogx_s cn52xx; +struct cvmx_ciu_wdogx_s cn52xxp1; +struct cvmx_ciu_wdogx_s cn56xx; +struct cvmx_ciu_wdogx_s cn56xxp1; +struct cvmx_ciu_wdogx_s cn58xx; +struct cvmx_ciu_wdogx_s cn58xxp1; +}; +typedef union cvmx_ciu_wdogx cvmx_ciu_wdogx_t ; + +#endif
arch/mips/include/asm/octeon/cvmx-gpio-defs.h new file +227 -0
227 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-iob-defs.h new file +551 -0
551 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-ipd-defs.h new file +910 -0
572 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-l2c-defs.h new file +990 -0
990 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-l2d-defs.h new file +380 -0
380 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-l2t-defs.h new file +141 -0
141 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-led-defs.h new file +252 -0
252 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-mio-defs.h new file +2117 -0
2,117 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-pow-defs.h new file +720 -0
720 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.5.6.5
Part of the diff is not shown here. View the raw message.
PATCH 6/26 MIPS: Add Cavium OCTEON specific register definitions to mipsregs.h
In reply to David Daney--- arch/mips/include/asm/mipsregs.h | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
arch/mips/include/asm/mipsregs.h +20 -0
@@ -1000,6 +1000,26 @@ do { \#define read_c0_ebase () __read_32bit_c0_register($15, 1)#define write_c0_ebase (val) __write_32bit_c0_register($15, 1, val) + +/* Cavium OCTEON (cnMIPS) */ +#define read_c0_cvmcount () __read_ulong_c0_register($9, 6) +#define write_c0_cvmcount (val) __write_ulong_c0_register($9, 6, val) + +#define read_c0_cvmctl () __read_64bit_c0_register($9, 7) +#define write_c0_cvmctl (val) __write_64bit_c0_register($9, 7, val) + +#define read_c0_cvmmemctl () __read_64bit_c0_register($11, 7) +#define write_c0_cvmmemctl (val) __write_64bit_c0_register($11, 7, val) +/* +* The cacheerr registers are not standardized. On OCTEON, they are +* 64 bits wide. +*/ +#define read_octeon_c0_icacheerr () __read_64bit_c0_register($27, 0) +#define write_octeon_c0_icacheerr (val) __write_64bit_c0_register($27, 0, val) + +#define read_octeon_c0_dcacheerr () __read_64bit_c0_register($27, 1) +#define write_octeon_c0_dcacheerr (val) __write_64bit_c0_register($27, 1, val) +/* * Macros to access the floating point coprocessor control registers */
Signature · 1 line
1.5.6.5
PATCH 1/26 MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon/executive and asm/octeon.
In reply to David DaneyThese files are used to coordinate resource sharing between all of the programs running on the OCTEON SOC. The OCTEON processor has many CPU cores (current parts have up to 16, but more are possible). It also has a variety of on-chip hardware blocks for things like network acceleration, encryption and RAID.
One typical configuration is to run Linux on several of the CPU cores, and other dedicated applications on the other cores.
Resource allocation between the various programs running on the system (Linux kernel and other dedicated applications) needs to be coordinated. The code we use to do this we call the 'executive'. All of this resource allocation and sharing code is gathered together in the executive directory.
Included in the patch set are the following files:
cvmx-bootmem.c and cvmx-sysinfo.c -- Coordinate memory allocation. All memory used by the Linux kernel is obtained here at boot time.
cvmx-l2c.c -- Coordinates operations on the shared level 2 cache.
octeon-model.c -- Probes chip capabilities and version.
The corresponding headers are in asm/octeon.
--- arch/mips/cavium-octeon/executive/Makefile | 24 + arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 929 ++++++++++++++++++++++ arch/mips/cavium-octeon/executive/cvmx-l2c.c | 736 +++++++++++++++++ arch/mips/cavium-octeon/executive/cvmx-sysinfo.c | 117 +++ arch/mips/cavium-octeon/executive/octeon-model.c | 346 ++++++++ arch/mips/include/asm/octeon/cvmx-asm.h | 446 +++++++++++ arch/mips/include/asm/octeon/cvmx-bootinfo.h | 238 ++++++ arch/mips/include/asm/octeon/cvmx-bootmem.h | 403 ++++++++++ arch/mips/include/asm/octeon/cvmx-l2c.h | 328 ++++++++ arch/mips/include/asm/octeon/cvmx-packet.h | 64 ++ arch/mips/include/asm/octeon/cvmx-platform.h | 56 ++ arch/mips/include/asm/octeon/cvmx-spinlock.h | 376 +++++++++ arch/mips/include/asm/octeon/cvmx-sysinfo.h | 144 ++++ arch/mips/include/asm/octeon/cvmx-warn.h | 40 + arch/mips/include/asm/octeon/cvmx.h | 776 ++++++++++++++++++ arch/mips/include/asm/octeon/octeon-feature.h | 120 +++ arch/mips/include/asm/octeon/octeon-model.h | 225 ++++++ 17 files changed, 5368 insertions(+), 0 deletions(-) create mode 100644 arch/mips/cavium-octeon/executive/Makefile create mode 100644 arch/mips/cavium-octeon/executive/cvmx-bootmem.c create mode 100644 arch/mips/cavium-octeon/executive/cvmx-l2c.c create mode 100644 arch/mips/cavium-octeon/executive/cvmx-sysinfo.c create mode 100644 arch/mips/cavium-octeon/executive/octeon-model.c create mode 100644 arch/mips/include/asm/octeon/cvmx-asm.h create mode 100644 arch/mips/include/asm/octeon/cvmx-bootinfo.h create mode 100644 arch/mips/include/asm/octeon/cvmx-bootmem.h create mode 100644 arch/mips/include/asm/octeon/cvmx-l2c.h create mode 100644 arch/mips/include/asm/octeon/cvmx-packet.h create mode 100644 arch/mips/include/asm/octeon/cvmx-platform.h create mode 100644 arch/mips/include/asm/octeon/cvmx-spinlock.h create mode 100644 arch/mips/include/asm/octeon/cvmx-sysinfo.h create mode 100644 arch/mips/include/asm/octeon/cvmx-warn.h create mode 100644 arch/mips/include/asm/octeon/cvmx.h create mode 100644 arch/mips/include/asm/octeon/octeon-feature.h create mode 100644 arch/mips/include/asm/octeon/octeon-model.h
arch/mips/cavium-octeon/executive/Makefile new file +24 -0
@@ -0,0 +1,24 @@ +# +# Makefile for the Cavium Octeon specific kernel interface routines +# under Linux. +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2005-2008 Cavium Networks +# + + +source:=$(srctree)/arch/mips/include/asm/octeon +EXTRA_CFLAGS += -I$(source) -I$(source)/config + +executive-files := cvmx-bootmem.o +executive-files += cvmx-l2c.o +executive-files += cvmx-sysinfo.o +executive-files += octeon-model.o +obj-y := $(executive-files) + +executive-obj-files := $(executive-files:%=$(obj)/%) +executive-src-files := $(executive-obj-files:%.o=%.c) +
arch/mips/cavium-octeon/executive/cvmx-bootmem.c new file +929 -0
929 lines not on this page · raw message
arch/mips/cavium-octeon/executive/cvmx-l2c.c new file +736 -0
736 lines not on this page · raw message
arch/mips/cavium-octeon/executive/cvmx-sysinfo.c new file +117 -0
117 lines not on this page · raw message
arch/mips/cavium-octeon/executive/octeon-model.c new file +346 -0
346 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-asm.h new file +446 -0
446 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-bootinfo.h new file +238 -0
238 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-bootmem.h new file +403 -0
164 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-l2c.h new file +328 -0
328 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-packet.h new file +64 -0
64 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-platform.h new file +56 -0
56 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-spinlock.h new file +376 -0
376 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-sysinfo.h new file +144 -0
144 lines not on this page · raw message
arch/mips/include/asm/octeon/cvmx-warn.h new file +40 -0
Lines of this file are not shown. View the raw message.
arch/mips/include/asm/octeon/cvmx.h new file +776 -0
776 lines not on this page · raw message
arch/mips/include/asm/octeon/octeon-feature.h new file +120 -0
120 lines not on this page · raw message
arch/mips/include/asm/octeon/octeon-model.h new file +225 -0
225 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.5.6.5
Part of the diff is not shown here. View the raw message.
PATCH 7/26 MIPS: Override assembler target architecture for octeon.
In reply to David DaneyGas from binutils 2.19 fails to compile some cop1 instructions with -march=octeon. Since the cop1 instructions are present in mips1, use that arch instead. This will be fixed in binutils 2.20.
--- arch/mips/include/asm/mipsregs.h | 2 ++ arch/mips/kernel/genex.S | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-)
arch/mips/include/asm/mipsregs.h +2 -0
@@ -1028,6 +1028,8 @@ do { \ __asm__ __volatile__( \".set\tpush\n\t" \".set\treorder\n\t" \ +/* gas fails to assemble cfc1 for some archs (octeon).*/ \ +".set\tmips1\n\t" \ "cfc1\t%0,"STR(source)"\n\t" \ ".set\tpop" \ : "=r" (__res)); \
arch/mips/kernel/genex.S +4 -0
@@ -385,10 +385,14 @@ NESTED(nmi_handler, PT_SIZE, sp) .endm .macro __build_clear_fpe + .set push + /* gas fails to assemble cfc1 for some archs (octeon).*/ \ + .set mips1 cfc1 a1, fcr31 li a2, ~(0x3f << 12) and a2, a1 ctc1 a2, fcr31 + .set pop TRACE_IRQS_ON STI .endm
Signature · 1 line
1.5.6.5
PATCH 8/26 MIPS: Add Cavium OCTEON processor constants and CPU probe.
In reply to David DaneyAdd OCTEON constants to asm/cpu.h and asm/module.h.
Add probe function for Cavium OCTEON CPUs and hook it up.
--- arch/mips/include/asm/cpu.h | 14 ++++++++++++++ arch/mips/include/asm/module.h | 2 ++ arch/mips/kernel/cpu-probe.c | 25 +++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-)
arch/mips/include/asm/cpu.h +14 -0
@@ -33,6 +33,7 @@#define PRID_COMP_TOSHIBA 0x070000#define PRID_COMP_LSI 0x080000#define PRID_COMP_LEXRA 0x0b0000 +#define PRID_COMP_CAVIUM 0x0d0000/*
@@ -114,6 +115,18 @@#define PRID_IMP_BCM3302 0x9000/* +* These are the PRID's for when 23:16 == PRID_COMP_CAVIUM +*/ + +#define PRID_IMP_CAVIUM_CN38XX 0x0000 +#define PRID_IMP_CAVIUM_CN31XX 0x0100 +#define PRID_IMP_CAVIUM_CN30XX 0x0200 +#define PRID_IMP_CAVIUM_CN58XX 0x0300 +#define PRID_IMP_CAVIUM_CN56XX 0x0400 +#define PRID_IMP_CAVIUM_CN50XX 0x0600 +#define PRID_IMP_CAVIUM_CN52XX 0x0700 + +/* * Definitions for 7:0 on legacy processors */
@@ -203,6 +216,7 @@ enum cpu_type_enum {* MIPS64 class processors */ CPU_5KC ,CPU_20KC ,CPU_25KF ,CPU_SB1 ,CPU_SB1A ,CPU_LOONGSON2 , +CPU_CAVIUM_OCTEON , CPU_LAST };
arch/mips/include/asm/module.h +2 -0
@@ -116,6 +116,8 @@ search_module_dbetables(unsigned long addr)#define MODULE_PROC_FAMILY "SB1 "#elif definedCONFIG_CPU_LOONGSON2 #define MODULE_PROC_FAMILY "LOONGSON2 " +#elif definedCONFIG_CPU_CAVIUM_OCTEON +#define MODULE_PROC_FAMILY "OCTEON "#else #error MODULE_PROC_FAMILY undefined for your processor configuration#endif
arch/mips/kernel/cpu-probe.c +25 -0
@@ -154,6 +154,7 @@ void __init check_wait(void)case CPU_25KF :case CPU_PR4450 :case CPU_BCM3302 : +case CPU_CAVIUM_OCTEON : cpu_wait = r4k_wait;break ;
@@ -875,6 +876,27 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) } } +static inline void cpu_probe_cavium (struct cpuinfo_mips *c,unsigned int cpu) +{ +decode_configs (c); +switch (c->processor_id &0xff00 ) { +case PRID_IMP_CAVIUM_CN38XX : +case PRID_IMP_CAVIUM_CN31XX : +case PRID_IMP_CAVIUM_CN30XX : +case PRID_IMP_CAVIUM_CN58XX : +case PRID_IMP_CAVIUM_CN56XX : +case PRID_IMP_CAVIUM_CN50XX : +case PRID_IMP_CAVIUM_CN52XX : + c->cputype =CPU_CAVIUM_OCTEON ; + __cpu_name[cpu] ="Cavium Octeon" ; +break ; +default : +printk (KERN_INFO "Unknown Octeon chip!\n" ); + c->cputype =CPU_UNKNOWN ; +break ; + } +} +const char *__cpu_name[NR_CPUS ];__cpuinit void cpu_probe (void )
@@ -909,6 +931,9 @@ __cpuinit void cpu_probe(void)case PRID_COMP_NXP :cpu_probe_nxp (c, cpu);break ; +case PRID_COMP_CAVIUM : +cpu_probe_cavium (c, cpu); +break ; }BUG_ON (!__cpu_name[cpu]);
Signature · 1 line
1.5.6.5
PATCH 9/26 MIPS: Hook Cavium OCTEON cache init into cache.c
In reply to David DaneyFollow precedent of other boards, and hook-up the CPU specific cache init.
--- arch/mips/include/asm/cpu-features.h | 3 +++ arch/mips/mm/cache.c | 6 ++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
arch/mips/include/asm/cpu-features.h +3 -0
@@ -38,6 +38,9 @@#ifndef cpu_has_tx39_cache#define cpu_has_tx39_cache (cpu_data[0].options & MIPS_CPU_TX39_CACHE)#endif +#ifndef cpu_has_octeon_cache +#define cpu_has_octeon_cache 0 +#endif #ifndef cpu_has_fpu#define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU)#define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU)
arch/mips/mm/cache.c +6 -0
@@ -182,6 +182,12 @@ void __devinit cpu_cache_init(void)tx39_cache_init (); } +if (cpu_has_octeon_cache) { +extern void __weak octeon_cache_init (void ); + +octeon_cache_init (); + } +setup_protection_map (); }
Signature · 1 line
1.5.6.5
PATCH 10/26 MIPS: Hook up Cavium OCTEON in arch/mips.
In reply to David DaneyTake all the OCTEON specific files that were added, and hook them into the build system for the arch/mips. For versions of GCC that lack OCTEON support, override gas target architecture.
--- arch/mips/Makefile | 16 ++++++++++++++++ arch/mips/kernel/Makefile | 1 + arch/mips/lib/Makefile | 1 + arch/mips/mm/Makefile | 1 + 4 files changed, 19 insertions(+), 0 deletions(-)
arch/mips/Makefile +16 -0
@@ -144,6 +144,10 @@ cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=r5000) \ cflags-$(CONFIG_CPU_R8000) += -march=r8000 -Wa,--trap cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \ -Wa,--trap +cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap +ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON)))) +cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon +endif cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,) cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,)
@@ -586,6 +590,18 @@ core-$(CONFIG_TOSHIBA_RBTX4927) += arch/mips/txx9/rbtx4927/ core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/txx9/rbtx4938/ core-$(CONFIG_TOSHIBA_RBTX4939) += arch/mips/txx9/rbtx4939/ +# +# Cavium Octeon +# +core-$(CONFIG_CPU_CAVIUM_OCTEON) += arch/mips/cavium-octeon/ +cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -I$(srctree)/arch/mips/include/asm/mach-cavium-octeon +core-$(CONFIG_CPU_CAVIUM_OCTEON) += arch/mips/cavium-octeon/executive/ +ifdef CONFIG_CAVIUM_OCTEON_2ND_KERNEL +load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff84100000 +else +load-$(CONFIG_CPU_CAVIUM_OCTEON) += 0xffffffff81100000 +endif + cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic drivers-$(CONFIG_PCI) += arch/mips/pci/
arch/mips/kernel/Makefile +1 -0
@@ -43,6 +43,7 @@ obj-$(CONFIG_CPU_SB1) += r4k_fpu.o r4k_switch.o obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o +obj-$(CONFIG_CPU_CAVIUM_OCTEON) += octeon_switch.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP_UP) += smp-up.o
arch/mips/lib/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_CPU_SB1) += dump_tlb.o obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o obj-$(CONFIG_CPU_TX49XX) += dump_tlb.o obj-$(CONFIG_CPU_VR41XX) += dump_tlb.o +obj-$(CONFIG_CPU_CAVIUM_OCTEON) += dump_tlb.o # libgcc-style stuff needed in the kernel obj-y += ashldi3.o ashrdi3.o cmpdi2.o lshrdi3.o ucmpdi2.o
arch/mips/mm/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o obj-$(CONFIG_CPU_TX39XX) += c-tx39.o tlb-r3k.o obj-$(CONFIG_CPU_TX49XX) += c-r4k.o cex-gen.o tlb-r4k.o obj-$(CONFIG_CPU_VR41XX) += c-r4k.o cex-gen.o tlb-r4k.o +obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
Signature · 1 line
1.5.6.5
PATCH 11/26 MIPS: Modify core io.h macros to account for the Octeon Errata Core-301.
In reply to David Daney--- arch/mips/include/asm/io.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
arch/mips/include/asm/io.h +14 -0
@@ -295,6 +295,12 @@ static inline void iounmap(const volatile void __iomem *addr)#undef __IS_KSEG1 } +#ifdef CONFIG_CPU_CAVIUM_OCTEON +#define war_octeon_io_reorder_wmb () wmb() +#else +#define war_octeon_io_reorder_wmb () do { } while (0) +#endif +#define __BUILD_MEMORY_SINGLE (pfx, bwlq, type, irq) \ \ static inline void pfx##write##bwlq(type val, \
@@ -303,6 +309,8 @@ static inline void pfx##write##bwlq(type val, \volatile type *__mem; \type __val; \ \ +war_octeon_io_reorder_wmb (); \ + \ __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem)); \ \ __val = pfx##ioswab##bwlq(__mem, val); \
@@ -370,6 +378,8 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \volatile type *__addr; \type __val; \ \ +war_octeon_io_reorder_wmb (); \ + \ __addr = (void *)__swizzle_addr_##bwlq(mips_io_port_base + port); \ \ __val = pfx##ioswab##bwlq(__addr, val); \
@@ -504,8 +514,12 @@ BUILDSTRING(q, u64)#endif +#ifdef CONFIG_CPU_CAVIUM_OCTEON +#define mmiowb () wmb() +#else /* Depends on MIPS II instruction set */ #define mmiowb () asm volatile ("sync" ::: "memory") +#endif static inline void memset_io (volatile void __iomem *addr,unsigned char val,int count) {
Signature · 1 line
1.5.6.5
PATCH 12/26 MIPS: Add Cavium OCTEON cop2/cvmseg state entries to processor.h.
In reply to David DaneyAdd in the cop2 and cvmseg state info to the known proc reg data for Cavium so that it can be tracked, saved, restored.
--- arch/mips/include/asm/processor.h | 69 +++++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-)
arch/mips/include/asm/processor.h +69 -0
@@ -118,6 +118,60 @@ union mips_watch_reg_state {struct mips3264_watch_reg_state mips3264; }; +#ifdef CONFIG_CPU_CAVIUM_OCTEON + +struct octeon_cop2_state { +/* DMFC2 rt, 0x0201 */ +unsigned long cop2_crc_iv; +/* DMFC2 rt, 0x0202 (Set with DMTC2 rt, 0x1202) */ +unsigned long cop2_crc_length; +/* DMFC2 rt, 0x0200 (set with DMTC2 rt, 0x4200) */ +unsigned long cop2_crc_poly; +/* DMFC2 rt, 0x0402; DMFC2 rt, 0x040A */ +unsigned long cop2_llm_dat[2 ]; +/* DMFC2 rt, 0x0084 */ +unsigned long cop2_3des_iv; +/* DMFC2 rt, 0x0080; DMFC2 rt, 0x0081; DMFC2 rt, 0x0082 */ +unsigned long cop2_3des_key[3 ]; +/* DMFC2 rt, 0x0088 (Set with DMTC2 rt, 0x0098) */ +unsigned long cop2_3des_result; +/* DMFC2 rt, 0x0111 (FIXME: Read Pass1 Errata) */ +unsigned long cop2_aes_inp0; +/* DMFC2 rt, 0x0102; DMFC2 rt, 0x0103 */ +unsigned long cop2_aes_iv[2 ]; +/* DMFC2 rt, 0x0104; DMFC2 rt, 0x0105; DMFC2 rt, 0x0106; DMFC2 +* rt, 0x0107 */ +unsigned long cop2_aes_key[4 ]; +/* DMFC2 rt, 0x0110 */ +unsigned long cop2_aes_keylen; +/* DMFC2 rt, 0x0100; DMFC2 rt, 0x0101 */ +unsigned long cop2_aes_result[2 ]; +/* DMFC2 rt, 0x0240; DMFC2 rt, 0x0241; DMFC2 rt, 0x0242; DMFC2 +* rt, 0x0243; DMFC2 rt, 0x0244; DMFC2 rt, 0x0245; DMFC2 rt, +* 0x0246; DMFC2 rt, 0x0247; DMFC2 rt, 0x0248; DMFC2 rt, +* 0x0249; DMFC2 rt, 0x024A; DMFC2 rt, 0x024B; DMFC2 rt, +* 0x024C; DMFC2 rt, 0x024D; DMFC2 rt, 0x024E - Pass2 */ +unsigned long cop2_hsh_datw[15 ]; +/* DMFC2 rt, 0x0250; DMFC2 rt, 0x0251; DMFC2 rt, 0x0252; DMFC2 +* rt, 0x0253; DMFC2 rt, 0x0254; DMFC2 rt, 0x0255; DMFC2 rt, +* 0x0256; DMFC2 rt, 0x0257 - Pass2 */ +unsigned long cop2_hsh_ivw[8 ]; +/* DMFC2 rt, 0x0258; DMFC2 rt, 0x0259 - Pass2 */ +unsigned long cop2_gfm_mult[2 ]; +/* DMFC2 rt, 0x025E - Pass2 */ +unsigned long cop2_gfm_poly; +/* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */ +unsigned long cop2_gfm_result[2 ]; +}; +#define INIT_OCTEON_COP2 {0,} + +struct octeon_cvmseg_state { +unsigned long cvmseg[CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE ] + [cpu_dcache_line_size () /sizeof (unsigned long )]; +}; + +#endif +typedef struct {unsigned long seg; }mm_segment_t ;
@@ -160,6 +214,10 @@ struct thread_struct {unsigned long trap_no;unsigned long irix_trampoline;/* Wheee... */ unsigned long irix_oldctx; +#ifdef CONFIG_CPU_CAVIUM_OCTEON + struct octeon_cop2_state cp2 __attribute__ ((__aligned__(128))); + struct octeon_cvmseg_state cvmseg __attribute__ ((__aligned__(128))); +#endif struct mips_abi *abi; };
@@ -171,6 +229,13 @@ struct thread_struct {#define FPAFF_INIT #endif /* CONFIG_MIPS_MT_FPAFF */ +#ifdef CONFIG_CPU_CAVIUM_OCTEON +#define OCTEON_INIT \ + .cp2 = INIT_OCTEON_COP2, +#else +#define OCTEON_INIT +#endif /* CONFIG_CPU_CAVIUM_OCTEON */ +#define INIT_THREAD { \/* \ * Saved main processor registers \
@@ -221,6 +286,10 @@ struct thread_struct { .trap_no = 0, \ .irix_trampoline = 0, \ .irix_oldctx = 0, \ +/* \ +* Cavium Octeon specifics (null if not Octeon) \ +*/ \ + OCTEON_INIT \ }struct task_struct ;
Signature · 1 line
1.5.6.5
PATCH 5/26 MIPS: For Cavium OCTEON set hwrena and lazily restore CP2 state.
In reply to David DaneyIf on Cavium, be aware of cop2 and hwrena during do_cpu().
--- arch/mips/kernel/traps.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
arch/mips/kernel/traps.c +21 -0
@@ -47,6 +47,7 @@#include <asm/mmu_context.h> #include <asm/types.h> #include <asm/stacktrace.h> +#include <asm/irq.h> extern void check_wait (void ); extern asmlinkage void r4k_wait(void);
@@ -78,6 +79,10 @@ extern asmlinkage void handle_reserved(void);extern int fpu_emulator_cop1Handler (struct pt_regs *xcp,struct mips_fpu_struct *ctx,int has_fpu); +#ifdef CONFIG_CPU_CAVIUM_OCTEON +extern asmlinkage void octeon_cop2_restore(struct octeon_cop2_state *task); +#endif +void (*board_be_init)(void );int (*board_be_handler)(struct pt_regs *regs,int is_fixup);void (*board_nmi_handler_setup)(void );
@@ -860,6 +865,7 @@ asmlinkage void do_cpu(struct pt_regs *regs)unsigned int opcode;unsigned int cpid;int status; +unsigned long __maybe_unused flags;die_if_kernel ("do_cpu invoked from kernel context!" , regs);
@@ -915,6 +921,17 @@ asmlinkage void do_cpu(struct pt_regs *regs)return ;case 2 : +#ifdef CONFIG_CPU_CAVIUM_OCTEON +prefetch (¤t->thread.cp2); +local_irq_save (flags); +KSTK_STATUS (current) |=ST0_CU2 ; + status =read_c0_status (); +write_c0_status (status |ST0_CU2 ); +octeon_cop2_restore (&(current->thread.cp2)); +write_c0_status (status & ~ST0_CU2 ); +local_irq_restore (flags); +return ; +#endif case 3 :break ; }
@@ -1488,6 +1505,10 @@ void __cpuinit per_cpu_trap_init(void)write_c0_hwrena (enable); } +#ifdef CONFIG_CPU_CAVIUM_OCTEON +write_c0_hwrena (0xc000000f );/* Octeon has register 30 and 31 */ +#endif +#ifdef CONFIG_MIPS_MT_SMTC if (!secondaryTC) {#endif /* CONFIG_MIPS_MT_SMTC */
Signature · 1 line
1.5.6.5
PATCH 13/26 MIPS: Add Cavium OCTEON specific registers to ptrace.h and asm-offsets.c
In reply to David Daney--- arch/mips/include/asm/ptrace.h | 4 ++++ arch/mips/kernel/asm-offsets.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-)
arch/mips/include/asm/ptrace.h +4 -0
@@ -52,6 +52,10 @@ struct pt_regs {#ifdef CONFIG_MIPS_MT_SMTC unsigned long cp0_tcstatus;#endif /* CONFIG_MIPS_MT_SMTC */ +#ifdef CONFIG_CPU_CAVIUM_OCTEON +unsigned long long mpl[3 ];/* MTM{0,1,2} */ +unsigned long long mtp[3 ];/* MTP{0,1,2} */ +#endif } __attribute__ ((aligned (8)));/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
arch/mips/kernel/asm-offsets.c +31 -0
@@ -64,6 +64,10 @@ void output_ptreg_defines(void)#ifdef CONFIG_MIPS_MT_SMTC OFFSET (PT_TCSTATUS , pt_regs, cp0_tcstatus);#endif /* CONFIG_MIPS_MT_SMTC */ +#ifdef CONFIG_CPU_CAVIUM_OCTEON +OFFSET (PT_MPL , pt_regs, mpl); +OFFSET (PT_MTP , pt_regs, mtp); +#endif /* CONFIG_CPU_CAVIUM_OCTEON */ DEFINE (PT_SIZE ,sizeof (struct pt_regs ));BLANK (); }
@@ -295,3 +299,30 @@ void output_irq_cpustat_t_defines(void)DEFINE (IC_IRQ_CPUSTAT_T ,sizeof (irq_cpustat_t));BLANK (); } + +#ifdef CONFIG_CPU_CAVIUM_OCTEON +void output_octeon_cop2_state_defines (void ) +{ +COMMENT ("Octeon specific octeon_cop2_state offsets." ); +OFFSET (OCTEON_CP2_CRC_IV , octeon_cop2_state, cop2_crc_iv); +OFFSET (OCTEON_CP2_CRC_LENGTH , octeon_cop2_state, cop2_crc_length); +OFFSET (OCTEON_CP2_CRC_POLY , octeon_cop2_state, cop2_crc_poly); +OFFSET (OCTEON_CP2_LLM_DAT , octeon_cop2_state, cop2_llm_dat); +OFFSET (OCTEON_CP2_3DES_IV , octeon_cop2_state, cop2_3des_iv); +OFFSET (OCTEON_CP2_3DES_KEY , octeon_cop2_state, cop2_3des_key); +OFFSET (OCTEON_CP2_3DES_RESULT , octeon_cop2_state, cop2_3des_result); +OFFSET (OCTEON_CP2_AES_INP0 , octeon_cop2_state, cop2_aes_inp0); +OFFSET (OCTEON_CP2_AES_IV , octeon_cop2_state, cop2_aes_iv); +OFFSET (OCTEON_CP2_AES_KEY , octeon_cop2_state, cop2_aes_key); +OFFSET (OCTEON_CP2_AES_KEYLEN , octeon_cop2_state, cop2_aes_keylen); +OFFSET (OCTEON_CP2_AES_RESULT , octeon_cop2_state, cop2_aes_result); +OFFSET (OCTEON_CP2_GFM_MULT , octeon_cop2_state, cop2_gfm_mult); +OFFSET (OCTEON_CP2_GFM_POLY , octeon_cop2_state, cop2_gfm_poly); +OFFSET (OCTEON_CP2_GFM_RESULT , octeon_cop2_state, cop2_gfm_result); +OFFSET (OCTEON_CP2_HSH_DATW , octeon_cop2_state, cop2_hsh_datw); +OFFSET (OCTEON_CP2_HSH_IVW , octeon_cop2_state, cop2_hsh_ivw); +OFFSET (THREAD_CP2 , task_struct, thread.cp2); +OFFSET (THREAD_CVMSEG , task_struct, thread.cvmseg.cvmseg); +BLANK (); +} +#endif
Signature · 1 line
1.5.6.5
PATCH 14/26 MIPS: Add SMP_ICACHE_FLUSH for the Cavium CPU family.
In reply to David Daney--- arch/mips/include/asm/smp.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/mips/include/asm/smp.h +3 -0
@@ -37,6 +37,9 @@ extern int __cpu_logical_map[NR_CPUS];#define SMP_RESCHEDULE_YOURSELF 0x1/* XXX braindead */ #define SMP_CALL_FUNCTION 0x2 +/* Octeon - Tell another core to flush its icache */ +#define SMP_ICACHE_FLUSH 0x4 +extern cpumask_t phys_cpu_present_map;#define cpu_possible_map phys_cpu_present_map
Signature · 1 line
1.5.6.5
PATCH 15/26 MIPS: Cavium OCTEON: PT vs MFC0 reorder, multiplier state preservation.
In reply to David DaneyFor cavium, implement a save and restore of the multiplier state so that if it gets corrupted, it will not impact things.
--- arch/mips/include/asm/stackframe.h | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
arch/mips/include/asm/stackframe.h +17 -0
@@ -194,6 +194,19 @@ LONG_S $31, PT_R31(sp) ori $28, sp, _THREAD_MASK xori $28, _THREAD_MASK +#ifdef CONFIG_CPU_CAVIUM_OCTEON + .set mips64 + pref 0, 0($28) /* Prefetch the current pointer */ + pref 0, PT_R31(sp) /* Prefetch the $31(ra) */ + /* The Octeon multiplier state is affected by general multiply + instructions. It must be saved before and kernel code might + corrupt it */ + jal octeon_mult_save + LONG_L v1, 0($28) /* Load the current pointer */ + /* Restore $31(ra) that was changed by the jal */ + LONG_L ra, PT_R31(sp) + pref 0, 0(v1) /* Prefetch the current thread */ +#endif .set pop .endm
@@ -324,6 +337,10 @@ DVPE 5 # dvpe a1 jal mips_ihb#endif /* CONFIG_MIPS_MT_SMTC */ +#ifdef CONFIG_CPU_CAVIUM_OCTEON +/* Restore the Octeon multiplier state */ + jal octeon_mult_restore +#endif mfc0 a0,CP0_STATUS ori a0, STATMASK xori a0, STATMASK
Signature · 1 line
1.5.6.5
PATCH 16/26 MIPS: Add Cavium OCTEON irq hazard in asmmacro.h.
In reply to David DaneyPlace irq_enable_hazard and irq_disable_hazard into asmmacro.h
--- arch/mips/include/asm/asmmacro.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/mips/include/asm/asmmacro.h +10 -0
@@ -35,6 +35,16 @@ mtc0 \reg, CP0_TCSTATUS _ehb .endm +#elif defined(CONFIG_CPU_CAVIUM_OCTEON ) + .macro local_irq_enable reg=t0 + ei + irq_enable_hazard + .endm + + .macro local_irq_disable reg=t0 + di + irq_disable_hazard + .endm #else .macro local_irq_enable reg=t0 mfc0 \reg, CP0_STATUS
Signature · 1 line
1.5.6.5
PATCH 17/26 MIPS: Compute branch returns for Cavium OCTEON specific branch instructions.
In reply to David DaneyFor Cavium OCTEON, compute the return epc value for OCTEON specific branch instructions.
--- arch/mips/kernel/branch.c | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-)
arch/mips/kernel/branch.c +33 -0
@@ -205,6 +205,39 @@ int __compute_return_epc(struct pt_regs *regs)break ; }break ; +#ifdef CONFIG_CPU_CAVIUM_OCTEON +case lwc2_op:/* This is bbit0 on Octeon */ +if ((regs->regs[insn.i_format.rs] & (1ull <<insn.i_format.rt)) + ==0 ) + epc = epc +4 + (insn.i_format.simmediate <<2 ); +else + epc +=8 ; + regs->cp0_epc = epc; +break ; +case ldc2_op:/* This is bbit032 on Octeon */ +if ((regs->regs[insn.i_format.rs] & + (1ull <<(insn.i_format.rt+32 ))) ==0 ) + epc = epc +4 + (insn.i_format.simmediate <<2 ); +else + epc +=8 ; + regs->cp0_epc = epc; +break ; +case swc2_op:/* This is bbit1 on Octeon */ +if (regs->regs[insn.i_format.rs] & (1ull <<insn.i_format.rt)) + epc = epc +4 + (insn.i_format.simmediate <<2 ); +else + epc +=8 ; + regs->cp0_epc = epc; +break ; +case sdc2_op:/* This is bbit132 on Octeon */ +if (regs->regs[insn.i_format.rs] & + (1ull <<(insn.i_format.rt+32 ))) + epc = epc +4 + (insn.i_format.simmediate <<2 ); +else + epc +=8 ; + regs->cp0_epc = epc; +break ; +#endif }return 0 ;
Signature · 1 line
1.5.6.5
PATCH 18/26 MIPS: Add Cavium OCTEON slot into proper tlb category.
In reply to David DaneyExpand the case statement for build_tlb_write_entry so that it does the right thing on Cavium CPU variants.
--- arch/mips/mm/tlbex.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/mips/mm/tlbex.c +1 -0
@@ -317,6 +317,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,case CPU_BCM3302 :case CPU_BCM4710 :case CPU_LOONGSON2 : +case CPU_CAVIUM_OCTEON :if (m4kc_tlbp_war ())uasm_i_nop (p);tlbw (p);
Signature · 1 line
1.5.6.5
PATCH 24/26 MIPS: Adjust the dma-common.c platform hooks.
In reply to David DaneyCavium OCTEON CPU support, requires a couple of additional hooks in dem-default.c
Other than add a dev parameter to plat_unmap_dma_mem(), and hooks for plat_dma_supported() and plat_extra_sync_for_device() which should be nop changes for all existing targets, the only real change is to call plat_unmap_dma_mem() from dma_free_{,non}coherent(). This is a nop for all targets except jazz, and I expect that it is needed there. Really if you map the memory in dma_alloc*, you should unmap it in dma_free*.
--- arch/mips/include/asm/mach-generic/dma-coherence.h | 26 +++++++++++++++++++- arch/mips/include/asm/mach-ip27/dma-coherence.h | 26 +++++++++++++++++++- arch/mips/include/asm/mach-ip32/dma-coherence.h | 26 +++++++++++++++++++- arch/mips/include/asm/mach-jazz/dma-coherence.h | 26 +++++++++++++++++++- arch/mips/include/asm/mach-lemote/dma-coherence.h | 26 +++++++++++++++++++- arch/mips/mm/dma-default.c | 24 ++++++++---------- 6 files changed, 136 insertions(+), 18 deletions(-)
arch/mips/include/asm/mach-generic/dma-coherence.h +25 -1
@@ -28,10 +28,34 @@ static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)return dma_addr; } -static inline void plat_unmap_dma_mem (dma_addr_t dma_addr) +static inline void plat_unmap_dma_mem (struct device *dev,dma_addr_t dma_addr) { } +static inline int plat_dma_supported (struct device *dev,u64 mask) +{ +/* +* we fall back to GFP_DMA when the mask isn't all 1s, +* so we can't guarantee allocations that must be +* within a tighter range than GFP_DMA.. +*/ +if (mask <DMA_BIT_MASK (24 )) +return 0 ; + +return 1 ; +} + +static inline void plat_extra_sync_for_device (struct device *dev) +{ +return ; +} + +static inline int plat_dma_mapping_error (struct device *dev, +dma_addr_t dma_addr) +{ +return 0 ; +} +static inline int plat_device_is_coherent (struct device *dev) {#ifdef CONFIG_DMA_COHERENT
arch/mips/include/asm/mach-ip27/dma-coherence.h +25 -1
@@ -38,10 +38,34 @@ static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)return dma_addr & ~(0xffUL <<56 ); } -static inline void plat_unmap_dma_mem (dma_addr_t dma_addr) +static inline void plat_unmap_dma_mem (struct device *dev,dma_addr_t dma_addr) { } +static inline int plat_dma_supported (struct device *dev,u64 mask) +{ +/* +* we fall back to GFP_DMA when the mask isn't all 1s, +* so we can't guarantee allocations that must be +* within a tighter range than GFP_DMA.. +*/ +if (mask <DMA_BIT_MASK (24 )) +return 0 ; + +return 1 ; +} + +static inline void plat_extra_sync_for_device (struct device *dev) +{ +return ; +} + +static inline int plat_dma_mapping_error (struct device *dev, +dma_addr_t dma_addr) +{ +return 0 ; +} +static inline int plat_device_is_coherent (struct device *dev) {return 1 ;/* IP27 non-cohernet mode is unsupported */
arch/mips/include/asm/mach-ip32/dma-coherence.h +25 -1
@@ -60,10 +60,34 @@ static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)return addr; } -static inline void plat_unmap_dma_mem (dma_addr_t dma_addr) +static inline void plat_unmap_dma_mem (struct device *dev,dma_addr_t dma_addr) { } +static inline int plat_dma_supported (struct device *dev,u64 mask) +{ +/* +* we fall back to GFP_DMA when the mask isn't all 1s, +* so we can't guarantee allocations that must be +* within a tighter range than GFP_DMA.. +*/ +if (mask <DMA_BIT_MASK (24 )) +return 0 ; + +return 1 ; +} + +static inline void plat_extra_sync_for_device (struct device *dev) +{ +return ; +} + +static inline int plat_dma_mapping_error (struct device *dev, +dma_addr_t dma_addr) +{ +return 0 ; +} +static inline int plat_device_is_coherent (struct device *dev) {return 0 ;/* IP32 is non-cohernet */
arch/mips/include/asm/mach-jazz/dma-coherence.h +25 -1
@@ -27,11 +27,35 @@ static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)return vdma_log2phys (dma_addr); } -static void plat_unmap_dma_mem (dma_addr_t dma_addr) +static void plat_unmap_dma_mem (struct device *dev,dma_addr_t dma_addr) {vdma_free (dma_addr); } +static inline int plat_dma_supported (struct device *dev,u64 mask) +{ +/* +* we fall back to GFP_DMA when the mask isn't all 1s, +* so we can't guarantee allocations that must be +* within a tighter range than GFP_DMA.. +*/ +if (mask <DMA_BIT_MASK (24 )) +return 0 ; + +return 1 ; +} + +static inline void plat_extra_sync_for_device (struct device *dev) +{ +return ; +} + +static inline int plat_dma_mapping_error (struct device *dev, +dma_addr_t dma_addr) +{ +return 0 ; +} +static inline int plat_device_is_coherent (struct device *dev) {return 0 ;
arch/mips/include/asm/mach-lemote/dma-coherence.h +25 -1
@@ -30,10 +30,34 @@ static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr)return dma_addr &0x7fffffff ; } -static inline void plat_unmap_dma_mem (dma_addr_t dma_addr) +static inline void plat_unmap_dma_mem (struct device *dev,dma_addr_t dma_addr) { } +static inline int plat_dma_supported (struct device *dev,u64 mask) +{ +/* +* we fall back to GFP_DMA when the mask isn't all 1s, +* so we can't guarantee allocations that must be +* within a tighter range than GFP_DMA.. +*/ +if (mask <DMA_BIT_MASK (24 )) +return 0 ; + +return 1 ; +} + +static inline void plat_extra_sync_for_device (struct device *dev) +{ +return ; +} + +static inline int plat_dma_mapping_error (struct device *dev, +dma_addr_t dma_addr) +{ +return 0 ; +} +static inline int plat_device_is_coherent (struct device *dev) {return 0 ;
arch/mips/mm/dma-default.c +11 -13
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);void dma_free_noncoherent (struct device *dev,size_t size,void *vaddr,dma_addr_t dma_handle) { +plat_unmap_dma_mem (dev, dma_handle);free_pages ((unsigned long ) vaddr,get_order (size)); }
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, {unsigned long addr = (unsigned long ) vaddr; +plat_unmap_dma_mem (dev, dma_handle); +if (!plat_device_is_coherent (dev)) addr =CAC_ADDR (addr);
@@ -170,7 +173,7 @@ void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,__dma_sync (dma_addr_to_virt (dma_addr), size, direction); -plat_unmap_dma_mem (dma_addr); +plat_unmap_dma_mem (dev, dma_addr); }EXPORT_SYMBOL (dma_unmap_single);
@@ -226,7 +229,7 @@ void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,dma_cache_wback_inv (addr, size); } -plat_unmap_dma_mem (dma_address); +plat_unmap_dma_mem (dev, dma_address); }EXPORT_SYMBOL (dma_unmap_page);
@@ -246,7 +249,7 @@ void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,if (addr)__dma_sync (addr, sg->length, direction); } -plat_unmap_dma_mem (sg->dma_address); +plat_unmap_dma_mem (dev, sg->dma_address); } }
@@ -272,6 +275,7 @@ void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, {BUG_ON (direction ==DMA_NONE ); +plat_extra_sync_for_device (dev);if (!plat_device_is_coherent (dev)) {unsigned long addr;
@@ -302,6 +306,7 @@ void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, {BUG_ON (direction ==DMA_NONE ); +plat_extra_sync_for_device (dev);if (!plat_device_is_coherent (dev)) {unsigned long addr;
@@ -348,22 +353,14 @@ EXPORT_SYMBOL(dma_sync_sg_for_device);int dma_mapping_error (struct device *dev,dma_addr_t dma_addr) { -return 0 ; +return plat_dma_mapping_error (dev, dma_addr); }EXPORT_SYMBOL (dma_mapping_error);int dma_supported (struct device *dev,u64 mask) { -/* -* we fall back to GFP_DMA when the mask isn't all 1s, -* so we can't guarantee allocations that must be -* within a tighter range than GFP_DMA.. -*/ -if (mask <DMA_BIT_MASK (24 )) -return 0 ; - -return 1 ; +return plat_dma_supported (dev, mask); }EXPORT_SYMBOL (dma_supported);
@@ -380,6 +377,7 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size, {BUG_ON (direction ==DMA_NONE ); +plat_extra_sync_for_device (dev);if (!plat_device_is_coherent (dev))__dma_sync ((unsigned long )vaddr, size, direction); }
Signature · 1 line
1.5.6.5
PATCH 26/26 MIPS: Add Cavium OCTEON to arch/mips/Kconfig
In reply to David Daney--- arch/mips/Kconfig | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 63 insertions(+), 2 deletions(-)
arch/mips/Kconfig +63 -2
@@ -595,6 +595,46 @@ config WR_PPMC This enables support for the Wind River MIPS32 4KC PPMC evaluation board, which is based on GT64120 bridge chip. +config CAVIUM_OCTEON_SIMULATOR + bool "Support for the Cavium Networks Octeon Simulator" + select CEVT_R4K + select CSRC_R4K + select 64BIT_PHYS_ADDR + select DMA_COHERENT + select SYS_SUPPORTS_64BIT_KERNEL + select SYS_SUPPORTS_BIG_ENDIAN + select SYS_SUPPORTS_HIGHMEM + select CPU_CAVIUM_OCTEON + help + The Octeon simulator is software performance model of the Cavium + Octeon Processor. It supports simulating Octeon processors on x86 + hardware. + +config CAVIUM_OCTEON_REFERENCE_BOARD + bool "Support for the Cavium Networks Octeon reference board" + select CEVT_R4K + select CSRC_R4K + select 64BIT_PHYS_ADDR + select DMA_COHERENT + select SYS_SUPPORTS_64BIT_KERNEL + select SYS_SUPPORTS_BIG_ENDIAN + select SYS_SUPPORTS_HIGHMEM + select SYS_HAS_EARLY_PRINTK + select CPU_CAVIUM_OCTEON + select SWAP_IO_SPACE + help + This option supports all of the Octeon reference boards from Cavium + Networks. It builds a kernel that dynamically determines the Octeon + CPU type and supports all known board reference implementations. + Some of the supported boards are: + EBT3000 + EBH3000 + EBH3100 + Thunder + Kodama + Hikari + Say Y here for most Octeon reference boards. + endchoice source "arch/mips/alchemy/Kconfig"
@@ -607,6 +647,7 @@ source "arch/mips/sgi-ip27/Kconfig" source "arch/mips/sibyte/Kconfig" source "arch/mips/txx9/Kconfig" source "arch/mips/vr41xx/Kconfig" +source "arch/mips/cavium-octeon/Kconfig" endmenu
@@ -835,6 +876,9 @@ config IRQ_GT641XX config IRQ_GIC bool +config IRQ_CPU_OCTEON + bool + config MIPS_BOARDS_GEN bool
@@ -924,7 +968,7 @@ config BOOT_ELF32 config MIPS_L1_CACHE_SHIFT int default "4" if MACH_DECSTATION || MIKROTIK_RB532 - default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM + default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM || CPU_CAVIUM_OCTEON default "4" if PMC_MSP4200_EVAL default "5"
@@ -1185,6 +1229,23 @@ config CPU_SB1 select CPU_SUPPORTS_HIGHMEM select WEAK_ORDERING +config CPU_CAVIUM_OCTEON + bool "Cavium Octeon processor" + select IRQ_CPU + select IRQ_CPU_OCTEON + select CPU_HAS_PREFETCH + select CPU_SUPPORTS_64BIT_KERNEL + select SYS_SUPPORTS_SMP + select NR_CPUS_DEFAULT_16 + select WEAK_ORDERING + select WEAK_REORDERING_BEYOND_LLSC + select CPU_SUPPORTS_HIGHMEM + help + The Cavium Octeon processor is a highly integrated chip containing + many ethernet hardware widgets for networking tasks. The processor + can have up to 16 Mips64v2 cores and 8 integrated gigabit ethernets. + Full details can be found at http://www.caviumnetworks.com. + endchoice config SYS_HAS_CPU_LOONGSON2
@@ -1285,7 +1346,7 @@ config CPU_MIPSR1 config CPU_MIPSR2 bool - default y if CPU_MIPS32_R2 || CPU_MIPS64_R2 + default y if CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_CAVIUM_OCTEON config SYS_SUPPORTS_32BIT_KERNEL bool
Signature · 1 line
1.5.6.5
PATCH 25/26 MIPS: Add defconfig for Cavium OCTEON.
In reply to David Daney--- arch/mips/configs/cavium-octeon_defconfig | 1143 +++++++++++++++++++++++++++++ 1 files changed, 1143 insertions(+), 0 deletions(-) create mode 100644 arch/mips/configs/cavium-octeon_defconfig
arch/mips/configs/cavium-octeon_defconfig new file +1143 -0
@@ -0,0 +1,1143 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.28-rc5 +# Tue Nov 18 12:52:14 2008 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_MACH_ALCHEMY is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BCM47XX is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_LEMOTE_FULONG is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MACH_EMMA is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_NXP_STB220 is not set +# CONFIG_NXP_STB225 is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP28 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SNI_RM is not set +# CONFIG_MACH_TX39XX is not set +# CONFIG_MACH_TX49XX is not set +# CONFIG_MIKROTIK_RB532 is not set +# CONFIG_WR_PPMC is not set +# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set +CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD=y +CONFIG_CAVIUM_OCTEON_SPECIFIC_OPTIONS=y +# CONFIG_CAVIUM_OCTEON_2ND_KERNEL is not set +CONFIG_CAVIUM_OCTEON_HW_FIX_UNALIGNED=y +CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2 +CONFIG_CAVIUM_OCTEON_LOCK_L2=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_EXCEPTION=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_LOW_LEVEL_INTERRUPT=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_INTERRUPT=y +CONFIG_CAVIUM_OCTEON_LOCK_L2_MEMCPY=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_CEVT_R4K=y +CONFIG_CSRC_R4K=y +CONFIG_DMA_COHERENT=y +# CONFIG_EARLY_PRINTK is not set +CONFIG_SYS_HAS_EARLY_PRINTK=y +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_NO_IOPORT is not set +CONFIG_CPU_BIG_ENDIAN=y +# CONFIG_CPU_LITTLE_ENDIAN is not set +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_IRQ_CPU=y +CONFIG_IRQ_CPU_OCTEON=y +CONFIG_SWAP_IO_SPACE=y +CONFIG_MIPS_L1_CACHE_SHIFT=7 + +# +# CPU selection +# +# CONFIG_CPU_LOONGSON2 is not set +# CONFIG_CPU_MIPS32_R1 is not set +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R5500 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_CPU_CAVIUM_OCTEON=y +CONFIG_WEAK_ORDERING=y +CONFIG_WEAK_REORDERING_BEYOND_LLSC=y +CONFIG_CPU_MIPSR2=y +CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y + +# +# Kernel type +# +# CONFIG_32BIT is not set +CONFIG_64BIT=y +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_MIPS_MT_SMP is not set +# CONFIG_MIPS_MT_SMTC is not set +CONFIG_64BIT_PHYS_ADDR=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_IRQ_PER_CPU=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_SYS_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +# CONFIG_FLATMEM_MANUAL is not set +# CONFIG_DISCONTIGMEM_MANUAL is not set +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_RESOURCES_64BIT=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +CONFIG_UNEVICTABLE_LRU=y +CONFIG_SMP=y +CONFIG_SYS_SUPPORTS_SMP=y +CONFIG_NR_CPUS_DEFAULT_16=y +CONFIG_NR_CPUS=16 +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +# CONFIG_HZ_48 is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_128 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_256 is not set +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_1024 is not set +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_HZ=250 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +# CONFIG_PREEMPT_RCU is not set +# CONFIG_KEXEC is not set +CONFIG_SECCOMP=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +CONFIG_GROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_RT_GROUP_SCHED is not set +CONFIG_USER_SCHED=y +# CONFIG_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_RELAY=y +# CONFIG_NAMESPACES is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_COMPAT_BRK=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set +CONFIG_HAVE_OPROFILE=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set +CONFIG_BLOCK_COMPAT=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_CLASSIC_RCU=y +# CONFIG_PROBE_INITRD_HEADER is not set +# CONFIG_FREEZER is not set + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_MMU=y +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_HAVE_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_MIPS32_COMPAT=y +CONFIG_COMPAT=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_MIPS32_O32=y +CONFIG_MIPS32_N32=y +CONFIG_BINFMT_ELF32=y + +# +# Power management options +# +# CONFIG_PM is not set +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +# CONFIG_INET_LRO is not set +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETLABEL is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +# CONFIG_NETFILTER_NETLINK_QUEUE is not set +# CONFIG_NETFILTER_NETLINK_LOG is not set +# CONFIG_NF_CONNTRACK is not set +# CONFIG_NETFILTER_XTABLES is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +# CONFIG_NF_DEFRAG_IPV4 is not set +# CONFIG_IP_NF_QUEUE is not set +# CONFIG_IP_NF_IPTABLES is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +# CONFIG_NET_SCH_CBQ is not set +# CONFIG_NET_SCH_HTB is not set +# CONFIG_NET_SCH_HFSC is not set +# CONFIG_NET_SCH_PRIO is not set +# CONFIG_NET_SCH_MULTIQ is not set +# CONFIG_NET_SCH_RED is not set +# CONFIG_NET_SCH_SFQ is not set +# CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_SCH_TBF is not set +# CONFIG_NET_SCH_GRED is not set +# CONFIG_NET_SCH_DSMARK is not set +# CONFIG_NET_SCH_NETEM is not set + +# +# Classification +# +# CONFIG_NET_CLS_BASIC is not set +# CONFIG_NET_CLS_TCINDEX is not set +# CONFIG_NET_CLS_ROUTE4 is not set +# CONFIG_NET_CLS_FW is not set +# CONFIG_NET_CLS_U32 is not set +# CONFIG_NET_CLS_RSVP is not set +# CONFIG_NET_CLS_RSVP6 is not set +# CONFIG_NET_CLS_FLOW is not set +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_SCH_FIFO=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +# CONFIG_PHONET is not set +CONFIG_FIB_RULES=y +# CONFIG_WIRELESS is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_CFI_INTELEXT is not set +CONFIG_MTD_CFI_AMDSTD=y +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0x8000000 +CONFIG_MTD_PHYSMAP_LEN=0x0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=2 +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_NAND is not set +# CONFIG_MTD_ONENAND is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_HD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_C2PORT is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_AX88796 is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +CONFIG_NETDEV_1000=y +CONFIG_NETDEV_10000=y + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +# CONFIG_WLAN_80211 is not set +# CONFIG_IWLWIFI_LEDS is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +CONFIG_NETCONSOLE=y +# CONFIG_NETCONSOLE_DYNAMIC is not set +CONFIG_NETPOLL=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_DEVKMEM=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=m +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_SIMTEC is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_DS1682 is not set +# CONFIG_AT24 is not set +CONFIG_SENSORS_EEPROM=m +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_PCF8575 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_SPI is not set +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7473 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_HWMON_DEBUG_CHIP is not set +CONFIG_THERMAL=y +# CONFIG_THERMAL_HWMON is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_REGULATOR is not set + +# +# Multimedia devices +# + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +# CONFIG_FB is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_SOUND is not set +CONFIG_USB_SUPPORT=y +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set + +# +# Enable Host or Gadget support to see Inventra options +# + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; +# +# CONFIG_USB_GADGET is not set +# CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_UIO is not set +# CONFIG_STAGING is not set +CONFIG_STAGING_EXCLUDE_BUILD=y + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_FILE_LOCKING=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_DNOTIFY=y +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +# CONFIG_SUNRPC_REGISTER_V4 is not set +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=2048 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_SPINLOCK=y +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_FAULT_INJECTION is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y + +# +# Tracers +# +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_CONTEXT_SWITCH_TRACER is not set +# CONFIG_BOOT_TRACER is not set +# CONFIG_DYNAMIC_PRINTK_DEBUG is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_CMDLINE="" +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_RUNTIME_DEBUG is not set + +# +# Security options +# +# CONFIG_KEYS is not set +CONFIG_SECURITY=y +# CONFIG_SECURITYFS is not set +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0 +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_FIPS is not set +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_HW=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y
Signature · 1 line
1.5.6.5
Re: [PATCH 20/26] 8250: Serial driver changes to support future Cavium OCTEON serial patches.
In reply to David DaneyQuoted 10 lines · On Tue, 18 Nov 2008 14:24:14 -0800 David Daney <[email protected]>…
In order to use Cavium OCTEON specific serial i/o drivers, we first patch the 8250 driver to use replaceable I/O functions. Compatible I/O functions are added for existing iotypeS.
An added benefit of this change is that it makes it easy to factor some of the existing special cases out to board/SOC specific support code.
The alternative is to load up 8250.c with a bunch of OCTEON specific iotype code and bug work-arounds.
Neither are pretty but this looks the better option I agree. Only niggle is the use of "_fn" - Linux generally doesn't put types into variable names.
Re: [PATCH 23/26] Serial: UART driver changes for Cavium OCTEON.
In reply to David Daneydrivers/serial/8250.c static irqreturn_t serial8250_interrupt(int irq, void *dev_id) · line 1569
Quoted 5 lines
drivers/serial/8250.c +5
-0+if ((up->bugs &UART_BUG_OCTEON_IIR ) && (iir &0xf ) ==7 ) { +/* Busy interrupt */ +serial_in (up,UART_OCTEON_USR ); + iir =serial_in (up,UART_IIR ); + }
Could this not be hidden in the register read method for the octeon and thus kept out of core code ?
Re: [PATCH 21/26] Serial: Allow port type to be specified when calling serial8250_register_port.
In reply to a message not in the archiveQuoted 8 lines · Alan Cox
Quoted 3 lines · On Tue, 18 Nov 2008 14:24:15 -0800 David Daney <[email protected]>…
Add flag value
UPF_FIXED_TYPEwhich specifies that the UART type is known and should not be probed. For this case the UARTs properties are just copied out of theuart_configentry.Looks fine to me
Re-adding the lists...
Does that mean I an add Acked-by you to this patch?
David Daney
Re: [PATCH 01/26] MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon/executive and asm/octeon.
In reply to David DaneyQuoted 4 lines
arch/mips/cavium-octeon/executive/Makefile new file +4
-0+# +# Makefile for the Cavium Octeon specific kernel interface routines +# under Linux. +#
arch/mips/cavium-octeon/executive/Makefile line 14
Quoted 10 lines
arch/mips/cavium-octeon/executive/Makefile new file +10
-0+# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2005-2008 Cavium Networks +# + + +source:=$(srctree)/arch/mips/include/asm/octeon +EXTRA_CFLAGS += -I$(source) -I$(source)/config
Just use the proper
#include <asm/octeon/*.h>
or
#include <asm/octeon/config/*.h>
include statements instead.
arch/mips/cavium-octeon/executive/Makefile line 20
Quoted 6 lines
arch/mips/cavium-octeon/executive/Makefile new file +6
-0+ +executive-files := cvmx-bootmem.o +executive-files += cvmx-l2c.o +executive-files += cvmx-sysinfo.o +executive-files += octeon-model.o +obj-y := $(executive-files)
This shoud be:
obj-y += cvmx-bootmem.o cvmx-l2c.o cvmx-sysinfo.o octeon-model.o
arch/mips/cavium-octeon/executive/Makefile line 23
Quoted 2 lines
arch/mips/cavium-octeon/executive/Makefile new file +2
-0+executive-obj-files := $(executive-files:%=$(obj)/%) +executive-src-files := $(executive-obj-files:%.o=%.c)
And these aren't needed at all.
Quoted 6 lines
+/**
+ * @file
+ * Simple allocate only memory allocator. Used to allocate memory at application
+ * start time.
+ *
+ */
This is not a proper kerneldoc comment, so please remove the /** comment start that would confuse the kernel-doc tool, and the @file thingy.
arch/mips/cavium-octeon/executive/cvmx-bootmem.c line 44
Quoted 5 lines
arch/mips/cavium-octeon/executive/cvmx-bootmem.c new file +5
-0+#undef MAX +#define MAX (a, b) (((a) > (b)) ? (a) : (b)) + +#undef MIN +#define MIN (a, b) (((a) < (b)) ? (a) : (b))
Please use the kernel min/max/min_t/max_t helpers.
Quoted 1 line
+#define
ALIGN_ADDR_UP(addr, align)(((addr) + (~(align))) & (align))
Please use __ALIGN_MASK from kernel.h
arch/mips/cavium-octeon/executive/cvmx-bootmem.c line 125
Quoted 2 lines
arch/mips/cavium-octeon/executive/cvmx-bootmem.c new file +2
-0+return cvmx_bootmem_alloc_named_range (size, address, + address + size,0 , name);
No space before the ( please. Did you run these patches through checkpath.pl at all? It should have complained about a few of those things.
arch/mips/cavium-octeon/executive/cvmx-bootmem.c line 352
Quoted 1 line
arch/mips/cavium-octeon/executive/cvmx-bootmem.c new file +1
-0+/* adjust prev ptr or head to remove this entry from list */
Please make sur all lines are under 80 characters. Again, checkpatch would have caught this.
Review
Quoted 1 line
(quoted diff) +1
-0+ cvmx_spinlock_unlock((cvmx_spinlock_t *) &(cvmx_bootmem_desc->lock));
This could just be:
cvmx_spinlock_unlock((cvmx_spinlock_t *) &cvmx_bootmem_desc->lock);
But given that you case it all the time, and mostly use the CVMX_BOOTMEM_FLAG_NO_LOCKING flag around it a proper helper that hides the details from the callers would be even better.
arch/mips/cavium-octeon/executive/cvmx-bootmem.c line 924
Quoted 9 lines
arch/mips/cavium-octeon/executive/cvmx-bootmem.c new file +9
-0+void cvmx_bootmem_lock (void ) +{ +cvmx_spinlock_lock ((cvmx_spinlock_t *) &(cvmx_bootmem_desc->lock)); +} + +void cvmx_bootmem_unlock (void ) +{ +cvmx_spinlock_unlock ((cvmx_spinlock_t *) &(cvmx_bootmem_desc->lock)); +}
Well, there already are some helpers, just not used..
Quoted 1 line
+typedef union {
No typedefs for structures please. Again, please run your patches through checkpatch.pl
arch/mips/cavium-octeon/executive/cvmx-l2c.c line 695
Quoted 12 lines
arch/mips/cavium-octeon/executive/cvmx-l2c.c new file +12
-0+if (OCTEON_IS_MODEL (OCTEON_CN56XX ) || +OCTEON_IS_MODEL (OCTEON_CN52XX ) || +OCTEON_IS_MODEL (OCTEON_CN58XX ) || +OCTEON_IS_MODEL (OCTEON_CN50XX ) ||OCTEON_IS_MODEL (OCTEON_CN38XX )) + l2_assoc =8 ; +else if (OCTEON_IS_MODEL (OCTEON_CN31XX ) || +OCTEON_IS_MODEL (OCTEON_CN30XX )) + l2_assoc =4 ; +else { +cvmx_dprintf ("Unsupported OCTEON Model in %s\n" , __FUNCTION__); + l2_assoc =8 ; + }
This would be much better with a switch on the mode, eh?
Quoted 12 lines
+/**
+ * This function is used in non-simple executive environments (such as
+ * Linux kernel, u-boot, etc.) to configure the minimal fields that
+ * are required to use simple executive files directly.
+ *
+ * Locking (if required) must be handled outside of this
+ * function
+ *
+ * @phy_mem_desc_ptr:+ * Pointer to global physical memory descriptor + * (bootmem descriptor) @board_type: Octeon board + * type enumeration
Quoted 8 lines
+ *
+ * @board_rev_major:
+ * Board major revision
+ * @board_rev_minor:
+ * Board minor revision
+ * @cpu_clock_hz:
+ * CPU clock freqency in hertz
+ *
Again, not proper kerneldoc comments. Please make sure the kerne-doc script doesn't barf up on your code.
Quoted 10 lines
+ */
arch/mips/cavium-octeon/executive/cvmx-sysinfo.c new file +9
-0+int cvmx_sysinfo_minimal_initialize (void *phy_mem_desc_ptr, +uint16_t board_type, +uint8_t board_rev_major, +uint8_t board_rev_minor, +uint32_t cpu_clock_hz) +{ + +/* The sysinfo structure was already initialized */ +if (state.sysinfo.board_type)
arch/mips/cavium-octeon/executive/cvmx-sysinfo.c line 115
Quoted 10 lines
arch/mips/cavium-octeon/executive/cvmx-sysinfo.c new file +10
-0+return 0 ; + +memset (&(state.sysinfo),0x0 ,sizeof (state.sysinfo)); + state.sysinfo.phy_mem_desc_ptr = phy_mem_desc_ptr; + state.sysinfo.board_type = board_type; + state.sysinfo.board_rev_major = board_rev_major; + state.sysinfo.board_rev_minor = board_rev_minor; + state.sysinfo.cpu_clock_hz = cpu_clock_hz; + +return 1 ;
Why isn't this just merged into the (AFAICS) only caller?
arch/mips/cavium-octeon/executive/octeon-model.c line 55
Quoted 5 lines
arch/mips/cavium-octeon/executive/octeon-model.c new file +5
-0+const char *octeon_model_get_string (uint32_t chip_id) +{ +static char buffer[32 ]; +return octeon_model_get_string_buffer (chip_id, buffer); +}
This doesn't seem like a particularly useful helper. Better keep a buffer in every potential caller instead of adding latent concurrency problems.
arch/mips/include/asm/octeon/cvmx-asm.h line 53
Quoted 13 lines
arch/mips/include/asm/octeon/cvmx-asm.h new file +13
-0+#define CVMX_BREAK asm volatile ("break") +#define CVMX_SYNC asm volatile ("sync" : : :"memory") +/* String version of SYNCW macro for using in inline asm constructs */ +#define CVMX_SYNCW_STR "syncw\nsyncw\n" +#ifdef __OCTEON__ + +/* Deprecated, will be removed in future release */ +#define CVMX_SYNCIO asm volatile ("nop") + +#define CVMX_SYNCIOBDMA asm volatile ("synciobdma" : : :"memory") + +/* Deprecated, will be removed in future release */ +#define CVMX_SYNCIOALL asm volatile ("nop")
So what exactly does this buy over adding the asm statements inline?
arch/mips/include/asm/octeon/cvmx-asm.h line 333
Quoted 3 lines
arch/mips/include/asm/octeon/cvmx-asm.h new file +3
-0+#define CVMX_MT_AES_ENC_CBC0 (val) asm volatile ("dmtc2 %[rt],0x0108" : : [rt] "d" (val)) +#define CVMX_MT_AES_ENC_CBC1 (val) asm volatile ("dmtc2 %[rt],0x3109" : : [rt] "d" (val)) +#define CVMX_MT_AES_ENC0 (val) asm volatile ("dmtc2 %[rt],0x010a" : : [rt] "d" (val))
Lots of this stuff doesn't seem to be used at all..
arch/mips/include/asm/octeon/cvmx-bootinfo.h line 51
Quoted 9 lines
arch/mips/include/asm/octeon/cvmx-bootinfo.h new file +9
-0+#if (CVMX_BOOTINFO_MAJ_VER ==1 ) +#define CVMX_BOOTINFO_OCTEON_SERIAL_LEN 20 +/* This structure is populated by the bootloader. For binary +** compatibility the only changes that should be made are +** adding members to the end of the structure, and the minor +** version should be incremented at that time. +** If an incompatible change is made, the major version +** must be incremented, and the minor version should be reset +** to 0.
If this is populated by the bootloader you need to support all versions in one build at runtime.
Quoted 1 line
+typedef struct {
No typedefs again, please. But checkpatch.pl will catch this.
Quoted 4 lines
+/**
+ * Allocate a block of memory from the free list that was passed
+ * to the application by the bootloader, and assign it a name in the
+ * global named block table. (part of thecvmx_bootmem_descriptor_tstructure)
Quoted 8 lines
+ * Named blocks can later be freed.
+ *
+ * @size: Size in bytes of block to allocate
+ * @alignment: Alignment required - must be power of 2
+ * @name: name of block - must be less thanCVMX_BOOTMEM_NAME_LENbytes
+ *
+ * Returns pointer to block of memory, NULL on error
+ */
Please make these proper kernel-doc comments and move them to the implementation where the kernel-doc script expects them.
arch/mips/include/asm/octeon/cvmx-l2c.h line 41
Quoted 4 lines
arch/mips/include/asm/octeon/cvmx-l2c.h new file +4
-0+#define CVMX_L2_ASSOC cvmx_l2c_get_num_assoc()/* Deprecated macro, use function */ +#define CVMX_L2_SET_BITS cvmx_l2c_get_set_bits()/* Deprecated macro, use function */ +#define CVMX_L2_SETS cvmx_l2c_get_num_sets()/* Deprecated macro, use function */ +
So kill the bloody macros.
arch/mips/include/asm/octeon/cvmx-platform.h line 49
Quoted 11 lines
arch/mips/include/asm/octeon/cvmx-platform.h new file +11
-0+/* This file defines macros for use in determining the current +building environment. It defines a single CVMX_BUILD_FOR_* +macro representing the target of the build. The current +possibilities are: +CVMX_BUILD_FOR_UBOOT +CVMX_BUILD_FOR_LINUX_KERNEL +CVMX_BUILD_FOR_LINUX_USER +CVMX_BUILD_FOR_LINUX_HOST +CVMX_BUILD_FOR_VXWORKS +CVMX_BUILD_FOR_STANDALONE */ +/* We are in the Linux kernel on Octeon */
So kill all this junk..
arch/mips/include/asm/octeon/cvmx-platform.h line 54
Quoted 4 lines
arch/mips/include/asm/octeon/cvmx-platform.h new file +4
-0+#include <linux/kernel.h> +#include <linux/string.h> +#include <linux/types.h> +#include <stdarg.h>
And move these into the files that need them.
Quoted 6 lines
+/**
+ * @file
+ *
+ * Implementation of spinlocks.
+ *
+ */
Well, magic hw/hypervisor/whatever shared spinlocks. That shoud be mentioned for sure..
arch/mips/include/asm/octeon/cvmx-warn.h line 38
Quoted 2 lines
arch/mips/include/asm/octeon/cvmx-warn.h new file +2
-0+#define cvmx_warn (format, ...) pr_warning(format, ##__VA_ARGS__) +#define cvmx_warn_if (expression, format, ...) if (expression) cvmx_warn(format, ##__VA_ARGS__)
Just opencode these two, please.
arch/mips/include/asm/octeon/cvmx.h line 135
Quoted 9 lines
+ *
__builtin_expectGCC operation to control branch
+ * probabilities for a conditional. For example, an "if"
+ * statement in the code that will almost always be
+ * executed should be written as "if (cvmx_likely(...))".
+ * If the "else" section of an if statement is more
+ * probable, use "if (cvmx_unlikey(...))".
+ */arch/mips/include/asm/octeon/cvmx.h new file +2
-0+#define cvmx_likely (x) __builtin_expect(!!(x), 1) +#define cvmx_unlikely (x) __builtin_expect(!!(x), 0)
Please use the native ones.
arch/mips/include/asm/octeon/cvmx.h line 185
Quoted 4 lines
arch/mips/include/asm/octeon/cvmx.h new file +4
-0+#ifndef TRUE +#define FALSE 0 +#define TRUE (!(FALSE)) +#endif
Please use the proper C99 bool types as the rst of the kernel.
Quoted 1 line
+/* These macros for used by 32 bit applications */
WTF
Quoted 3 lines
+ * Convert a memory pointer (void*) into a hardware compatable
+ * memory address (uint64_t). Octeon hardware widgets don't
+ * understand logical addresses.
Should be done using the normal mm helpers..
Please review all these headers for unused junk that crept in from previous embedded projects. And please also apply all the suggestions to other code in case it's up to similar "quality" standards.
And remember, checkpath.pl and the kernel-doc script are your friends..