Commit bfaf2450 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for MIPS for Linux 4.1.  Most
  noteworthy:

   - Add more Octeon-optimized crypto functions
   - Octeon crypto preemption and locking fixes
   - Little endian support for Octeon
   - Use correct CSR to soft reset Octeons
   - Support LEDs on the Octeon-based DSR-1000N
   - Fix PCI interrupt mapping for the Octeon-based DSR-1000N
   - Mark prom_free_prom_memory() as __init for a number of systems
   - Support for Imagination's Pistachio SOC.  This includes arch and
     CLK bits.  I'd like to merge pinctrl bits later
   - Improve parallelism of csum_partial for certain pipelines
   - Organize DTB files in subdirs like other architectures
   - Implement read_sched_clock for all MIPS platforms other than
     Octeon
   - Massive series of 38 fixes and cleanups for the FPU emulator /
     kernel
   - Further FPU remulator work to support new features.  This sits on a
     separate branch which also has been pulled into the 4.1 KVM branch
   - Clean up and fixes for the SEAD3 eval board; remove unused file
   - Various updates for Netlogic platforms
   - A number of small updates for Loongson 3 platforms
   - Increase the memory limit for ATH79 platforms to 256MB
   - A fair number of fixes and updates for BCM47xx platforms
   - Finish the implementation of XPA support
   - MIPS FDC support.  No, not floppy controller but Fast Debug Channel :)
   - Detect the R16000 used in SGI legacy platforms
   - Fix Kconfig dependencies for the SSB bus support"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (265 commits)
  MIPS: Makefile: Fix MIPS ASE detection code
  MIPS: asm: elf: Set O32 default FPU flags
  MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G
  MIPS: Kconfig: Disable SMP/CPS for 64-bit
  MIPS: Hibernate: flush TLB entries earlier
  MIPS: smp-cps: cpu_set FPU mask if FPU present
  MIPS: lose_fpu(): Disable FPU when MSA enabled
  MIPS: ralink: add missing symbol for RALINK_ILL_ACC
  MIPS: ralink: Fix bad config symbol in PCI makefile.
  SSB: fix Kconfig dependencies
  MIPS: Malta: Detect and fix bad memsize values
  Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores."
  MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard.
  MIPS: Fix cpu_has_mips_r2_exec_hazard.
  MIPS: kernel: entry.S: Set correct ISA level for mips_ihb
  MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case
  MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes
  MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter
  MIPS: unaligned: Fix regular load/store instruction emulation for EVA
  MIPS: unaligned: Surround load/store macros in do {} while statements
  ...
parents 96d928ed 3e20a26b
...@@ -95,8 +95,7 @@ since it doesn't need to allocate a table as large as the largest ...@@ -95,8 +95,7 @@ since it doesn't need to allocate a table as large as the largest
hwirq number. The disadvantage is that hwirq to IRQ number lookup is hwirq number. The disadvantage is that hwirq to IRQ number lookup is
dependent on how many entries are in the table. dependent on how many entries are in the table.
Very few drivers should need this mapping. At the moment, powerpc Very few drivers should need this mapping.
iseries is the only user.
==== No Map ===- ==== No Map ===-
irq_domain_add_nomap() irq_domain_add_nomap()
......
Imagination Technologies Pistachio SoC clock controllers
========================================================
Pistachio has four clock controllers (core clock, peripheral clock, peripheral
general control, and top general control) which are instantiated individually
from the device-tree.
External clocks:
----------------
There are three external inputs to the clock controllers which should be
defined with the following clock-output-names:
- "xtal": External 52Mhz oscillator (required)
- "audio_clk_in": Alternate audio reference clock (optional)
- "enet_clk_in": Alternate ethernet PHY clock (optional)
Core clock controller:
----------------------
The core clock controller generates clocks for the CPU, RPU (WiFi + BT
co-processor), audio, and several peripherals.
Required properties:
- compatible: Must be "img,pistachio-clk".
- reg: Must contain the base address and length of the core clock controller.
- #clock-cells: Must be 1. The single cell is the clock identifier.
See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
- clocks: Must contain an entry for each clock in clock-names.
- clock-names: Must include "xtal" (see "External clocks") and
"audio_clk_in_gate", "enet_clk_in_gate" which are generated by the
top-level general control.
Example:
clk_core: clock-controller@18144000 {
compatible = "img,pistachio-clk";
reg = <0x18144000 0x800>;
clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>,
<&cr_top EXT_CLK_ENET_IN>;
clock-names = "xtal", "audio_clk_in_gate", "enet_clk_in_gate";
#clock-cells = <1>;
};
Peripheral clock controller:
----------------------------
The peripheral clock controller generates clocks for the DDR, ROM, and other
peripherals. The peripheral system clock ("periph_sys") generated by the core
clock controller is the input clock to the peripheral clock controller.
Required properties:
- compatible: Must be "img,pistachio-periph-clk".
- reg: Must contain the base address and length of the peripheral clock
controller.
- #clock-cells: Must be 1. The single cell is the clock identifier.
See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
- clocks: Must contain an entry for each clock in clock-names.
- clock-names: Must include "periph_sys", the peripheral system clock generated
by the core clock controller.
Example:
clk_periph: clock-controller@18144800 {
compatible = "img,pistachio-clk-periph";
reg = <0x18144800 0x800>;
clocks = <&clk_core CLK_PERIPH_SYS>;
clock-names = "periph_sys";
#clock-cells = <1>;
};
Peripheral general control:
---------------------------
The peripheral general control block generates system interface clocks and
resets for various peripherals. It also contains miscellaneous peripheral
control registers. The system clock ("sys") generated by the peripheral clock
controller is the input clock to the system clock controller.
Required properties:
- compatible: Must include "img,pistachio-periph-cr" and "syscon".
- reg: Must contain the base address and length of the peripheral general
control registers.
- #clock-cells: Must be 1. The single cell is the clock identifier.
See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
- clocks: Must contain an entry for each clock in clock-names.
- clock-names: Must include "sys", the system clock generated by the peripheral
clock controller.
Example:
cr_periph: syscon@18144800 {
compatible = "img,pistachio-cr-periph", "syscon";
reg = <0x18148000 0x1000>;
clocks = <&clock_periph PERIPH_CLK_PERIPH_SYS>;
clock-names = "sys";
#clock-cells = <1>;
};
Top-level general control:
--------------------------
The top-level general control block contains miscellaneous control registers and
gates for the external clocks "audio_clk_in" and "enet_clk_in".
Required properties:
- compatible: Must include "img,pistachio-cr-top" and "syscon".
- reg: Must contain the base address and length of the top-level
control registers.
- clocks: Must contain an entry for each clock in clock-names.
- clock-names: Two optional clocks, "audio_clk_in" and "enet_clk_in" (see
"External clocks").
- #clock-cells: Must be 1. The single cell is the clock identifier.
See dt-bindings/clock/pistachio-clk.h for the list of valid identifiers.
Example:
cr_top: syscon@18144800 {
compatible = "img,pistachio-cr-top", "syscon";
reg = <0x18149000 0x200>;
clocks = <&audio_refclk>, <&ext_enet_in>;
clock-names = "audio_clk_in", "enet_clk_in";
#clock-cells = <1>;
};
Broadcom BCM3380-style Level 1 / Level 2 interrupt controller
This interrupt controller shows up in various forms on many BCM338x/BCM63xx
chipsets. It has the following properties:
- outputs a single interrupt signal to its interrupt controller parent
- contains one or more enable/status word pairs, which often appear at
different offsets in different blocks
- no atomic set/clear operations
Required properties:
- compatible: should be "brcm,bcm3380-l2-intc"
- reg: specifies one or more enable/status pairs, in the following format:
<enable_reg 0x4 status_reg 0x4>...
- interrupt-controller: identifies the node as an interrupt controller
- #interrupt-cells: specifies the number of cells needed to encode an interrupt
source, should be 1.
- interrupt-parent: specifies the phandle to the parent interrupt controller
this one is cascaded from
- interrupts: specifies the interrupt line in the interrupt-parent controller
node, valid values depend on the type of parent interrupt controller
Optional properties:
- brcm,irq-can-wake: if present, this means the L2 controller can be used as a
wakeup source for system suspend/resume.
Example:
irq0_intc: interrupt-controller@10000020 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x10000024 0x4 0x1000002c 0x4>,
<0x10000020 0x4 0x10000028 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>;
};
Broadcom BCM7038-style Level 1 interrupt controller
This block is a first level interrupt controller that is typically connected
directly to one of the HW INT lines on each CPU. Every BCM7xxx set-top chip
since BCM7038 has contained this hardware.
Key elements of the hardware design include:
- 64, 96, 128, or 160 incoming level IRQ lines
- Most onchip peripherals are wired directly to an L1 input
- A separate instance of the register set for each CPU, allowing individual
peripheral IRQs to be routed to any CPU
- Atomic mask/unmask operations
- No polarity/level/edge settings
- No FIFO or priority encoder logic; software is expected to read all
2-5 status words to determine which IRQs are pending
Required properties:
- compatible: should be "brcm,bcm7038-l1-intc"
- reg: specifies the base physical address and size of the registers;
the number of supported IRQs is inferred from the size argument
- interrupt-controller: identifies the node as an interrupt controller
- #interrupt-cells: specifies the number of cells needed to encode an interrupt
source, should be 1.
- interrupt-parent: specifies the phandle to the parent interrupt controller(s)
this one is cascaded from
- interrupts: specifies the interrupt line(s) in the interrupt-parent controller
node; valid values depend on the type of parent interrupt controller
If multiple reg ranges and interrupt-parent entries are present on an SMP
system, the driver will allow IRQ SMP affinity to be set up through the
/proc/irq/ interface. In the simplest possible configuration, only one
reg range and one interrupt-parent is needed.
Example:
periph_intc: periph_intc@1041a400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x1041a400 0x30 0x1041a600 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>, <3>;
};
...@@ -13,8 +13,7 @@ Such an interrupt controller has the following hardware design: ...@@ -13,8 +13,7 @@ Such an interrupt controller has the following hardware design:
or if they will output an interrupt signal at this 2nd level interrupt or if they will output an interrupt signal at this 2nd level interrupt
controller, in particular for UARTs controller, in particular for UARTs
- typically has one 32-bit enable word and one 32-bit status word, but on - has one 32-bit enable word and one 32-bit status word
some hardware may have more than one enable/status pair
- no atomic set/clear operations - no atomic set/clear operations
...@@ -53,9 +52,7 @@ The typical hardware layout for this controller is represented below: ...@@ -53,9 +52,7 @@ The typical hardware layout for this controller is represented below:
Required properties: Required properties:
- compatible: should be "brcm,bcm7120-l2-intc" - compatible: should be "brcm,bcm7120-l2-intc"
- reg: specifies the base physical address and size of the registers; - reg: specifies the base physical address and size of the registers
multiple pairs may be specified, with the first pair handling IRQ offsets
0..31 and the second pair handling 32..63
- interrupt-controller: identifies the node as an interrupt controller - interrupt-controller: identifies the node as an interrupt controller
- #interrupt-cells: specifies the number of cells needed to encode an interrupt - #interrupt-cells: specifies the number of cells needed to encode an interrupt
source, should be 1. source, should be 1.
...@@ -66,10 +63,7 @@ Required properties: ...@@ -66,10 +63,7 @@ Required properties:
- brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts
are wired to this 2nd level interrupt controller, and how they match their are wired to this 2nd level interrupt controller, and how they match their
respective interrupt parents. Should match exactly the number of interrupts respective interrupt parents. Should match exactly the number of interrupts
specified in the 'interrupts' property, multiplied by the number of specified in the 'interrupts' property.
enable/status register pairs implemented by this controller. For
multiple parent IRQs with multiple enable/status words, this looks like:
<irq0_w0 irq0_w1 irq1_w0 irq1_w1 ...>
Optional properties: Optional properties:
......
...@@ -27,8 +27,13 @@ Optional properties: ...@@ -27,8 +27,13 @@ Optional properties:
Required properties for timer sub-node: Required properties for timer sub-node:
- compatible : Should be "mti,gic-timer". - compatible : Should be "mti,gic-timer".
- interrupts : Interrupt for the GIC local timer. - interrupts : Interrupt for the GIC local timer.
Optional properties for timer sub-node:
- clocks : GIC timer operating clock.
- clock-frequency : Clock frequency at which the GIC timers operate. - clock-frequency : Clock frequency at which the GIC timers operate.
Note that one of clocks or clock-frequency must be specified.
Example: Example:
gic: interrupt-controller@1bdc0000 { gic: interrupt-controller@1bdc0000 {
......
* Interrupt Controller
Properties:
- compatible: "brcm,bcm3384-intc"
Compatibility with BCM3384 and possibly other BCM33xx/BCM63xx SoCs.
- reg: Address/length pairs for each mask/status register set. Length must
be 8. If multiple register sets are specified, the first set will
handle IRQ offsets 0..31, the second set 32..63, and so on.
- interrupt-controller: This is an interrupt controller.
- #interrupt-cells: Must be <1>. Just a simple IRQ offset; no level/edge
or polarity configuration is possible with this controller.
- interrupt-parent: This controller is cascaded from a MIPS CPU HW IRQ, or
from another INTC.
- interrupts: The IRQ on the parent controller.
Example:
periph_intc: periph_intc@14e00038 {
compatible = "brcm,bcm3384-intc";
/*
* IRQs 0..31: mask reg 0x14e00038, status reg 0x14e0003c
* IRQs 32..63: mask reg 0x14e00340, status reg 0x14e00344
*/
reg = <0x14e00038 0x8 0x14e00340 0x8>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <4>;
};
* Broadcom cable/DSL platforms
SoCs:
Required properties:
- compatible: "brcm,bcm3384", "brcm,bcm33843"
Boards:
Required properties:
- compatible: "brcm,bcm93384wvg"
* Broadcom cable/DSL/settop platforms
Required properties:
- compatible: "brcm,bcm3384", "brcm,bcm33843"
"brcm,bcm3384-viper", "brcm,bcm33843-viper"
"brcm,bcm6328", "brcm,bcm6368",
"brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360",
"brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425"
The experimental -viper variants are for running Linux on the 3384's
BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor.
Imagination Pistachio SoC
=========================
Required properties:
--------------------
- compatible: Must include "img,pistachio".
CPU nodes:
----------
A "cpus" node is required. Required properties:
- #address-cells: Must be 1.
- #size-cells: Must be 0.
A CPU sub-node is also required for at least CPU 0. Since the topology may
be probed via CPS, it is not necessary to specify secondary CPUs. Required
propertis:
- device_type: Must be "cpu".
- compatible: Must be "mti,interaptiv".
- reg: CPU number.
- clocks: Must include the CPU clock. See ../../clock/clock-bindings.txt for
details on clock bindings.
Example:
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu0: cpu@0 {
device_type = "cpu";
compatible = "mti,interaptiv";
reg = <0>;
clocks = <&clk_core CLK_MIPS>;
};
};
Boot protocol:
--------------
In accordance with the MIPS UHI specification[1], the bootloader must pass the
following arguments to the kernel:
- $a0: -2.
- $a1: KSEG0 address of the flattened device-tree blob.
[1] http://prplfoundation.org/wiki/MIPS_documentation
...@@ -15,6 +15,7 @@ Table of Contents ...@@ -15,6 +15,7 @@ Table of Contents
1) Entry point for arch/arm 1) Entry point for arch/arm
2) Entry point for arch/powerpc 2) Entry point for arch/powerpc
3) Entry point for arch/x86 3) Entry point for arch/x86
4) Entry point for arch/mips/bmips
II - The DT block format II - The DT block format
1) Header 1) Header
...@@ -288,6 +289,33 @@ it with special cases. ...@@ -288,6 +289,33 @@ it with special cases.
or initrd address. It simply holds information which can not be retrieved or initrd address. It simply holds information which can not be retrieved
otherwise like interrupt routing or a list of devices behind an I2C bus. otherwise like interrupt routing or a list of devices behind an I2C bus.
4) Entry point for arch/mips/bmips
----------------------------------
Some bootloaders only support a single entry point, at the start of the
kernel image. Other bootloaders will jump to the ELF start address.
Both schemes are supported; CONFIG_BOOT_RAW=y and CONFIG_NO_EXCEPT_FILL=y,
so the first instruction immediately jumps to kernel_entry().
Similar to the arch/arm case (b), a DT-aware bootloader is expected to
set up the following registers:
a0 : 0
a1 : 0xffffffff
a2 : Physical pointer to the device tree block (defined in chapter
II) in RAM. The device tree can be located anywhere in the first
512MB of the physical address space (0x00000000 - 0x1fffffff),
aligned on a 64 bit boundary.
Legacy bootloaders do not use this convention, and they do not pass in a
DT block. In this case, Linux will look for a builtin DTB, selected via
CONFIG_DT_*.
This convention is defined for 32-bit systems only, as there are not
currently any 64-bit BMIPS implementations.
II - The DT block format II - The DT block format
======================== ========================
......
...@@ -2317,7 +2317,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -2317,7 +2317,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
noexec32=off: disable non-executable mappings noexec32=off: disable non-executable mappings
read implies executable mappings read implies executable mappings
nofpu [SH] Disable hardware FPU at boot time. nofpu [MIPS,SH] Disable hardware FPU at boot time.
nofxsr [BUGS=X86-32] Disables x86 floating point extended nofxsr [BUGS=X86-32] Disables x86 floating point extended
register save and restore. The kernel will only save register save and restore. The kernel will only save
......
...@@ -4,9 +4,9 @@ platforms += alchemy ...@@ -4,9 +4,9 @@ platforms += alchemy
platforms += ar7 platforms += ar7
platforms += ath25 platforms += ath25
platforms += ath79 platforms += ath79
platforms += bcm3384
platforms += bcm47xx platforms += bcm47xx
platforms += bcm63xx platforms += bcm63xx
platforms += bmips
platforms += cavium-octeon platforms += cavium-octeon
platforms += cobalt platforms += cobalt
platforms += dec platforms += dec
...@@ -21,6 +21,7 @@ platforms += mti-malta ...@@ -21,6 +21,7 @@ platforms += mti-malta
platforms += mti-sead3 platforms += mti-sead3
platforms += netlogic platforms += netlogic
platforms += paravirt platforms += paravirt
platforms += pistachio
platforms += pmcs-msp71xx platforms += pmcs-msp71xx
platforms += pnx833x platforms += pnx833x
platforms += ralink platforms += ralink
......
...@@ -43,6 +43,7 @@ config MIPS ...@@ -43,6 +43,7 @@ config MIPS
select GENERIC_SMP_IDLE_THREAD select GENERIC_SMP_IDLE_THREAD
select BUILDTIME_EXTABLE_SORT select BUILDTIME_EXTABLE_SORT
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_SCHED_CLOCK if !CAVIUM_OCTEON_SOC
select GENERIC_CMOS_UPDATE select GENERIC_CMOS_UPDATE
select HAVE_MOD_ARCH_SPECIFIC select HAVE_MOD_ARCH_SPECIFIC
select VIRT_TO_BUS select VIRT_TO_BUS
...@@ -55,6 +56,8 @@ config MIPS ...@@ -55,6 +56,8 @@ config MIPS
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_BINFMT_ELF_STATE select ARCH_BINFMT_ELF_STATE
select SYSCTL_EXCEPTION_TRACE select SYSCTL_EXCEPTION_TRACE
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select HAVE_IRQ_TIME_ACCOUNTING
menu "Machine selection" menu "Machine selection"
...@@ -131,8 +134,8 @@ config ATH79 ...@@ -131,8 +134,8 @@ config ATH79
help help
Support for the Atheros AR71XX/AR724X/AR913X SoCs. Support for the Atheros AR71XX/AR724X/AR913X SoCs.
config BCM3384 config BMIPS_GENERIC
bool "Broadcom BCM3384 based boards" bool "Broadcom Generic BMIPS kernel"
select BOOT_RAW select BOOT_RAW
select NO_EXCEPT_FILL select NO_EXCEPT_FILL
select USE_OF select USE_OF
...@@ -140,22 +143,30 @@ config BCM3384 ...@@ -140,22 +143,30 @@ config BCM3384
select CSRC_R4K select CSRC_R4K
select SYNC_R4K select SYNC_R4K
select COMMON_CLK select COMMON_CLK
select DMA_NONCOHERENT select BCM7038_L1_IRQ
select BCM7120_L2_IRQ
select BRCMSTB_L2_IRQ
select IRQ_CPU select IRQ_CPU
select RAW_IRQ_ACCESSORS
select DMA_NONCOHERENT
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_HIGHMEM
select SYS_HAS_CPU_BMIPS32_3300
select SYS_HAS_CPU_BMIPS4350
select SYS_HAS_CPU_BMIPS4380
select SYS_HAS_CPU_BMIPS5000 select SYS_HAS_CPU_BMIPS5000
select SWAP_IO_SPACE select SWAP_IO_SPACE
select USB_EHCI_BIG_ENDIAN_DESC select USB_EHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
select USB_EHCI_BIG_ENDIAN_MMIO select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
select USB_OHCI_BIG_ENDIAN_DESC select USB_OHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
select USB_OHCI_BIG_ENDIAN_MMIO select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
help help
Support for BCM3384 based boards. BCM3384/BCM33843 is a cable modem Build a generic DT-based kernel image that boots on select
chipset with a Linux application processor that is often used to BCM33xx cable modem chips, BCM63xx DSL chips, and BCM7xxx set-top
provide Samba services, a CUPS print server, and/or advanced routing box chips. Note that CONFIG_CPU_BIG_ENDIAN/CONFIG_CPU_LITTLE_ENDIAN
features. must be set appropriately for your board.
config BCM47XX config BCM47XX
bool "Broadcom BCM47XX based boards" bool "Broadcom BCM47XX based boards"
...@@ -352,6 +363,33 @@ config MACH_LOONGSON1 ...@@ -352,6 +363,33 @@ config MACH_LOONGSON1
the ICT (Institute of Computing Technology) and the Chinese Academy the ICT (Institute of Computing Technology) and the Chinese Academy
of Sciences. of Sciences.
config MACH_PISTACHIO
bool "IMG Pistachio SoC based boards"
select ARCH_REQUIRE_GPIOLIB
select BOOT_ELF32
select BOOT_RAW
select CEVT_R4K
select CLKSRC_MIPS_GIC
select COMMON_CLK
select CSRC_R4K
select DMA_MAYBE_COHERENT
select IRQ_CPU
select LIBFDT
select MFD_SYSCON
select MIPS_CPU_SCACHE
select MIPS_GIC
select PINCTRL
select REGULATOR
select SYS_HAS_CPU_MIPS32_R2
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_MIPS_CPS
select SYS_SUPPORTS_MULTITHREADING
select SYS_SUPPORTS_ZBOOT
select USE_OF
help
This enables support for the IMG Pistachio SoC platform.
config MIPS_MALTA config MIPS_MALTA
bool "MIPS Malta board" bool "MIPS Malta board"
select ARCH_MAY_HAVE_PC_FDC select ARCH_MAY_HAVE_PC_FDC
...@@ -377,6 +415,7 @@ config MIPS_MALTA ...@@ -377,6 +415,7 @@ config MIPS_MALTA
select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_MIPS32_R2 select SYS_HAS_CPU_MIPS32_R2
select SYS_HAS_CPU_MIPS32_R3_5 select SYS_HAS_CPU_MIPS32_R3_5
select SYS_HAS_CPU_MIPS32_R5
select SYS_HAS_CPU_MIPS32_R6 select SYS_HAS_CPU_MIPS32_R6
select SYS_HAS_CPU_MIPS64_R1 select SYS_HAS_CPU_MIPS64_R1
select SYS_HAS_CPU_MIPS64_R2 select SYS_HAS_CPU_MIPS64_R2
...@@ -386,6 +425,7 @@ config MIPS_MALTA ...@@ -386,6 +425,7 @@ config MIPS_MALTA
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_HIGHMEM
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_MICROMIPS select SYS_SUPPORTS_MICROMIPS
select SYS_SUPPORTS_MIPS_CMP select SYS_SUPPORTS_MIPS_CMP
...@@ -779,7 +819,8 @@ config CAVIUM_OCTEON_SOC ...@@ -779,7 +819,8 @@ config CAVIUM_OCTEON_SOC
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select EDAC_SUPPORT select EDAC_SUPPORT
select SYS_SUPPORTS_HOTPLUG_CPU select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_HOTPLUG_CPU if CPU_BIG_ENDIAN
select SYS_HAS_EARLY_PRINTK select SYS_HAS_EARLY_PRINTK
select SYS_HAS_CPU_CAVIUM_OCTEON select SYS_HAS_CPU_CAVIUM_OCTEON
select SWAP_IO_SPACE select SWAP_IO_SPACE
...@@ -793,6 +834,7 @@ config CAVIUM_OCTEON_SOC ...@@ -793,6 +834,7 @@ config CAVIUM_OCTEON_SOC
select SYS_SUPPORTS_SMP select SYS_SUPPORTS_SMP
select NR_CPUS_DEFAULT_16 select NR_CPUS_DEFAULT_16
select BUILTIN_DTB select BUILTIN_DTB
select MTD_COMPLEX_MAPPINGS
help help
This option supports all of the Octeon reference boards from Cavium This option supports all of the Octeon reference boards from Cavium
Networks. It builds a kernel that dynamically determines the Octeon Networks. It builds a kernel that dynamically determines the Octeon
...@@ -887,6 +929,7 @@ source "arch/mips/ath25/Kconfig" ...@@ -887,6 +929,7 @@ source "arch/mips/ath25/Kconfig"
source "arch/mips/ath79/Kconfig" source "arch/mips/ath79/Kconfig"
source "arch/mips/bcm47xx/Kconfig" source "arch/mips/bcm47xx/Kconfig"
source "arch/mips/bcm63xx/Kconfig" source "arch/mips/bcm63xx/Kconfig"
source "arch/mips/bmips/Kconfig"
source "arch/mips/jazz/Kconfig" source "arch/mips/jazz/Kconfig"
source "arch/mips/jz4740/Kconfig" source "arch/mips/jz4740/Kconfig"
source "arch/mips/lantiq/Kconfig" source "arch/mips/lantiq/Kconfig"
...@@ -1202,10 +1245,10 @@ config MIPS_L1_CACHE_SHIFT_7 ...@@ -1202,10 +1245,10 @@ config MIPS_L1_CACHE_SHIFT_7
config MIPS_L1_CACHE_SHIFT config MIPS_L1_CACHE_SHIFT
int int
default "4" if MIPS_L1_CACHE_SHIFT_4
default "5" if MIPS_L1_CACHE_SHIFT_5
default "6" if MIPS_L1_CACHE_SHIFT_6
default "7" if MIPS_L1_CACHE_SHIFT_7 default "7" if MIPS_L1_CACHE_SHIFT_7
default "6" if MIPS_L1_CACHE_SHIFT_6
default "5" if MIPS_L1_CACHE_SHIFT_5
default "4" if MIPS_L1_CACHE_SHIFT_4
default "5" default "5"
config HAVE_STD_PC_SERIAL_PORT config HAVE_STD_PC_SERIAL_PORT
...@@ -1572,6 +1615,7 @@ config CPU_XLP ...@@ -1572,6 +1615,7 @@ config CPU_XLP
select WEAK_REORDERING_BEYOND_LLSC select WEAK_REORDERING_BEYOND_LLSC
select CPU_HAS_PREFETCH select CPU_HAS_PREFETCH
select CPU_MIPSR2 select CPU_MIPSR2
select CPU_SUPPORTS_HUGEPAGES
help help
Netlogic Microsystems XLP processors. Netlogic Microsystems XLP processors.
endchoice endchoice
...@@ -1596,6 +1640,33 @@ config CPU_MIPS32_3_5_EVA ...@@ -1596,6 +1640,33 @@ config CPU_MIPS32_3_5_EVA
One of its primary benefits is an increase in the maximum size One of its primary benefits is an increase in the maximum size
of lowmem (up to 3GB). If unsure, say 'N' here. of lowmem (up to 3GB). If unsure, say 'N' here.
config CPU_MIPS32_R5_FEATURES
bool "MIPS32 Release 5 Features"
depends on SYS_HAS_CPU_MIPS32_R5
depends on CPU_MIPS32_R2
help
Choose this option to build a kernel for release 2 or later of the
MIPS32 architecture including features from release 5 such as
support for Extended Physical Addressing (XPA).
config CPU_MIPS32_R5_XPA
bool "Extended Physical Addressing (XPA)"
depends on CPU_MIPS32_R5_FEATURES
depends on !EVA
depends on !PAGE_SIZE_4KB
depends on SYS_SUPPORTS_HIGHMEM
select XPA
select HIGHMEM
select ARCH_PHYS_ADDR_T_64BIT
default n
help
Choose this option if you want to enable the Extended Physical
Addressing (XPA) on your MIPS32 core (such as P5600 series). The
benefit is to increase physical addressing equal to or greater
than 40 bits. Note that this has the side effect of turning on
64-bit addressing which in turn makes the PTEs 64-bit in size.
If unsure, say 'N' here.
if CPU_LOONGSON2F if CPU_LOONGSON2F
config CPU_NOP_WORKAROUNDS config CPU_NOP_WORKAROUNDS
bool bool
...@@ -1699,6 +1770,9 @@ config SYS_HAS_CPU_MIPS32_R2 ...@@ -1699,6 +1770,9 @@ config SYS_HAS_CPU_MIPS32_R2
config SYS_HAS_CPU_MIPS32_R3_5 config SYS_HAS_CPU_MIPS32_R3_5
bool bool
config SYS_HAS_CPU_MIPS32_R5
bool
config SYS_HAS_CPU_MIPS32_R6 config SYS_HAS_CPU_MIPS32_R6
bool bool
...@@ -1836,6 +1910,9 @@ config CPU_MIPSR6 ...@@ -1836,6 +1910,9 @@ config CPU_MIPSR6
config EVA config EVA
bool bool
config XPA
bool
config SYS_SUPPORTS_32BIT_KERNEL config SYS_SUPPORTS_32BIT_KERNEL
bool bool
config SYS_SUPPORTS_64BIT_KERNEL config SYS_SUPPORTS_64BIT_KERNEL
...@@ -2072,7 +2149,7 @@ config MIPSR2_TO_R6_EMULATOR ...@@ -2072,7 +2149,7 @@ config MIPSR2_TO_R6_EMULATOR
help help
Choose this option if you want to run non-R6 MIPS userland code. Choose this option if you want to run non-R6 MIPS userland code.
Even if you say 'Y' here, the emulator will still be disabled by Even if you say 'Y' here, the emulator will still be disabled by
default. You can enable it using the 'mipsr2emul' kernel option. default. You can enable it using the 'mipsr2emu' kernel option.
The only reason this is a build-time option is to save ~14K from the The only reason this is a build-time option is to save ~14K from the
final kernel image. final kernel image.
comment "MIPS R2-to-R6 emulator is only available for UP kernels" comment "MIPS R2-to-R6 emulator is only available for UP kernels"
...@@ -2142,7 +2219,7 @@ config MIPS_CMP ...@@ -2142,7 +2219,7 @@ config MIPS_CMP
config MIPS_CPS config MIPS_CPS
bool "MIPS Coherent Processing System support" bool "MIPS Coherent Processing System support"
depends on SYS_SUPPORTS_MIPS_CPS depends on SYS_SUPPORTS_MIPS_CPS && !64BIT
select MIPS_CM select MIPS_CM
select MIPS_CPC select MIPS_CPC
select MIPS_CPS_PM if HOTPLUG_CPU select MIPS_CPS_PM if HOTPLUG_CPU
...@@ -2348,7 +2425,7 @@ config NODES_SHIFT ...@@ -2348,7 +2425,7 @@ config NODES_SHIFT
config HW_PERF_EVENTS config HW_PERF_EVENTS
bool "Enable hardware performance counter support for perf events" bool "Enable hardware performance counter support for perf events"
depends on PERF_EVENTS && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP) depends on PERF_EVENTS && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP || CPU_LOONGSON3)
default y default y
help help
Enable hardware performance counter support for perf events. If Enable hardware performance counter support for perf events. If
...@@ -2500,6 +2577,9 @@ config HZ ...@@ -2500,6 +2577,9 @@ config HZ
default 1000 if HZ_1000 default 1000 if HZ_1000
default 1024 if HZ_1024 default 1024 if HZ_1024
config SCHED_HRTICK
def_bool HIGH_RES_TIMERS
source "kernel/Kconfig.preempt" source "kernel/Kconfig.preempt"
config KEXEC config KEXEC
......
...@@ -197,11 +197,17 @@ endif ...@@ -197,11 +197,17 @@ endif
# Warning: the 64-bit MIPS architecture does not support the `smartmips' extension # Warning: the 64-bit MIPS architecture does not support the `smartmips' extension
# Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has # Pass -Wa,--no-warn to disable all assembler warnings until the kernel code has
# been fixed properly. # been fixed properly.
mips-cflags := "$(cflags-y)" mips-cflags := $(cflags-y)
cflags-$(CONFIG_CPU_HAS_SMARTMIPS) += $(call cc-option,$(mips-cflags),-msmartmips) -Wa,--no-warn ifeq ($(CONFIG_CPU_HAS_SMARTMIPS),y)
cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,$(mips-cflags),-mmicromips) smartmips-ase := $(call cc-option-yn,$(mips-cflags) -msmartmips)
cflags-$(smartmips-ase) += -msmartmips -Wa,--no-warn
endif
ifeq ($(CONFIG_CPU_MICROMIPS),y)
micromips-ase := $(call cc-option-yn,$(mips-cflags) -mmicromips)
cflags-$(micromips-ase) += -mmicromips
endif
ifeq ($(CONFIG_CPU_HAS_MSA),y) ifeq ($(CONFIG_CPU_HAS_MSA),y)
toolchain-msa := $(call cc-option-yn,-$(mips-cflags),mhard-float -mfp64 -Wa$(comma)-mmsa) toolchain-msa := $(call cc-option-yn,$(mips-cflags) -mhard-float -mfp64 -Wa$(comma)-mmsa)
cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA
endif endif
...@@ -365,7 +371,11 @@ core-$(CONFIG_BUILTIN_DTB) += arch/mips/boot/dts/ ...@@ -365,7 +371,11 @@ core-$(CONFIG_BUILTIN_DTB) += arch/mips/boot/dts/
PHONY += dtbs PHONY += dtbs
dtbs: scripts dtbs: scripts
$(Q)$(MAKE) $(build)=arch/mips/boot/dts dtbs $(Q)$(MAKE) $(build)=arch/mips/boot/dts
PHONY += dtbs_install
dtbs_install:
$(Q)$(MAKE) $(dtbinst)=arch/mips/boot/dts
archprepare: archprepare:
ifdef CONFIG_MIPS32_N32 ifdef CONFIG_MIPS32_N32
...@@ -407,6 +417,7 @@ define archhelp ...@@ -407,6 +417,7 @@ define archhelp
echo ' uImage.lzma - U-Boot image (lzma)' echo ' uImage.lzma - U-Boot image (lzma)'
echo ' uImage.lzo - U-Boot image (lzo)' echo ' uImage.lzo - U-Boot image (lzo)'
echo ' dtbs - Device-tree blobs for enabled boards' echo ' dtbs - Device-tree blobs for enabled boards'
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
echo echo
echo ' These will be default as appropriate for a configured platform.' echo ' These will be default as appropriate for a configured platform.'
endef endef
...@@ -307,10 +307,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) ...@@ -307,10 +307,7 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
} }
if (mac) { if (mac) {
if (sscanf(mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", if (!mac_pton(mac, dev_addr)) {
&dev_addr[0], &dev_addr[1],
&dev_addr[2], &dev_addr[3],
&dev_addr[4], &dev_addr[5]) != 6) {
pr_warn("cannot parse mac address, using random address\n"); pr_warn("cannot parse mac address, using random address\n");
eth_random_addr(dev_addr); eth_random_addr(dev_addr);
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/types.h> #include <linux/types.h>
#define ATH79_MEM_SIZE_MIN (2 * 1024 * 1024) #define ATH79_MEM_SIZE_MIN (2 * 1024 * 1024)
#define ATH79_MEM_SIZE_MAX (128 * 1024 * 1024) #define ATH79_MEM_SIZE_MAX (256 * 1024 * 1024)
void ath79_clocks_init(void); void ath79_clocks_init(void);
unsigned long ath79_get_sys_clk_rate(const char *id); unsigned long ath79_get_sys_clk_rate(const char *id);
......
#
# Broadcom BCM3384 boards
#
platform-$(CONFIG_BCM3384) += bcm3384/
cflags-$(CONFIG_BCM3384) += \
-I$(srctree)/arch/mips/include/asm/mach-bcm3384/
load-$(CONFIG_BCM3384) := 0xffffffff80010000
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
* Partially based on arch/mips/ralink/irq.c
*
* Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
* Copyright (C) 2013 John Crispin <blogic@openwrt.org>
* Copyright (C) 2014 Kevin Cernekee <cernekee@gmail.com>
*/
#include <linux/io.h>
#include <linux/bitops.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/irqdomain.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <asm/bmips.h>
#include <asm/irq_cpu.h>
#include <asm/mipsregs.h>
/* INTC register offsets */
#define INTC_REG_ENABLE 0x00
#define INTC_REG_STATUS 0x04
#define MAX_WORDS 2
#define IRQS_PER_WORD 32
struct bcm3384_intc {
int n_words;
void __iomem *reg[MAX_WORDS];
u32 enable[MAX_WORDS];
spinlock_t lock;
};
static void bcm3384_intc_irq_unmask(struct irq_data *d)
{
struct bcm3384_intc *priv = d->domain->host_data;
unsigned long flags;
int idx = d->hwirq / IRQS_PER_WORD;
int bit = d->hwirq % IRQS_PER_WORD;
spin_lock_irqsave(&priv->lock, flags);
priv->enable[idx] |= BIT(bit);
__raw_writel(priv->enable[idx], priv->reg[idx] + INTC_REG_ENABLE);
spin_unlock_irqrestore(&priv->lock, flags);
}
static void bcm3384_intc_irq_mask(struct irq_data *d)
{
struct bcm3384_intc *priv = d->domain->host_data;
unsigned long flags;
int idx = d->hwirq / IRQS_PER_WORD;
int bit = d->hwirq % IRQS_PER_WORD;
spin_lock_irqsave(&priv->lock, flags);
priv->enable[idx] &= ~BIT(bit);
__raw_writel(priv->enable[idx], priv->reg[idx] + INTC_REG_ENABLE);
spin_unlock_irqrestore(&priv->lock, flags);
}
static struct irq_chip bcm3384_intc_irq_chip = {
.name = "INTC",
.irq_unmask = bcm3384_intc_irq_unmask,
.irq_mask = bcm3384_intc_irq_mask,
.irq_mask_ack = bcm3384_intc_irq_mask,
};
unsigned int get_c0_compare_int(void)
{
return CP0_LEGACY_COMPARE_IRQ;
}
static void bcm3384_intc_irq_handler(unsigned int irq, struct irq_desc *desc)
{
struct irq_domain *domain = irq_get_handler_data(irq);
struct bcm3384_intc *priv = domain->host_data;
unsigned long flags;
unsigned int idx;
for (idx = 0; idx < priv->n_words; idx++) {
unsigned long pending;
int hwirq;
spin_lock_irqsave(&priv->lock, flags);
pending = __raw_readl(priv->reg[idx] + INTC_REG_STATUS) &
priv->enable[idx];
spin_unlock_irqrestore(&priv->lock, flags);
for_each_set_bit(hwirq, &pending, IRQS_PER_WORD) {
generic_handle_irq(irq_find_mapping(domain,
hwirq + idx * IRQS_PER_WORD));
}
}
}
asmlinkage void plat_irq_dispatch(void)
{
unsigned long pending =
(read_c0_status() & read_c0_cause() & ST0_IM) >> STATUSB_IP0;
int bit;
for_each_set_bit(bit, &pending, 8)
do_IRQ(MIPS_CPU_IRQ_BASE + bit);
}
static int intc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
{
irq_set_chip_and_handler(irq, &bcm3384_intc_irq_chip, handle_level_irq);
return 0;
}
static const struct irq_domain_ops irq_domain_ops = {
.xlate = irq_domain_xlate_onecell,
.map = intc_map,
};
static int __init ioremap_one_pair(struct bcm3384_intc *priv,
struct device_node *node,
int idx)
{
struct resource res;
if (of_address_to_resource(node, idx, &res))
return 0;
if (request_mem_region(res.start, resource_size(&res),
res.name) < 0)
pr_err("Failed to request INTC register region\n");
priv->reg[idx] = ioremap_nocache(res.start, resource_size(&res));
if (!priv->reg[idx])
panic("Failed to ioremap INTC register range");
/* start up with everything masked before we hook the parent IRQ */
__raw_writel(0, priv->reg[idx] + INTC_REG_ENABLE);
priv->enable[idx] = 0;
return IRQS_PER_WORD;
}
static int __init intc_of_init(struct device_node *node,
struct device_node *parent)
{
struct irq_domain *domain;
unsigned int parent_irq, n_irqs = 0;
struct bcm3384_intc *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv)
panic("Failed to allocate bcm3384_intc struct");
spin_lock_init(&priv->lock);
parent_irq = irq_of_parse_and_map(node, 0);
if (!parent_irq)
panic("Failed to get INTC IRQ");
n_irqs += ioremap_one_pair(priv, node, 0);
n_irqs += ioremap_one_pair(priv, node, 1);
if (!n_irqs)
panic("Failed to map INTC registers");
priv->n_words = n_irqs / IRQS_PER_WORD;
domain = irq_domain_add_linear(node, n_irqs, &irq_domain_ops, priv);
if (!domain)
panic("Failed to add irqdomain");
irq_set_chained_handler(parent_irq, bcm3384_intc_irq_handler);
irq_set_handler_data(parent_irq, domain);
return 0;
}
static struct of_device_id of_irq_ids[] __initdata = {
{ .compatible = "mti,cpu-interrupt-controller",
.data = mips_cpu_irq_of_init },
{ .compatible = "brcm,bcm3384-intc",
.data = intc_of_init },
{},
};
void __init arch_init_irq(void)
{
bmips_tp1_irqs = 0;
of_irq_init(of_irq_ids);
}
#ifndef LINUX_BCM47XX_PRIVATE_H_ #ifndef LINUX_BCM47XX_PRIVATE_H_
#define LINUX_BCM47XX_PRIVATE_H_ #define LINUX_BCM47XX_PRIVATE_H_
#ifndef pr_fmt
#define pr_fmt(fmt) "bcm47xx: " fmt
#endif
#include <linux/kernel.h> #include <linux/kernel.h>
/* prom.c */ /* prom.c */
......
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/string.h> #include <linux/string.h>
#include <bcm47xx.h>
#include <bcm47xx_board.h> #include <bcm47xx_board.h>
#include <bcm47xx_nvram.h>
struct bcm47xx_board_type { struct bcm47xx_board_type {
const enum bcm47xx_board board; const enum bcm47xx_board board;
...@@ -40,20 +40,6 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_model_name[] __initconst = { ...@@ -40,20 +40,6 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_model_name[] __initconst = {
{ {0}, NULL}, { {0}, NULL},
}; };
/* model_no */
static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_model_no[] __initconst = {
{{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "WL700"},
{ {0}, NULL},
};
/* machine_name */
static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_machine_name[] __initconst = {
{{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "WRTSL54GS"},
{ {0}, NULL},
};
/* hardware_version */ /* hardware_version */
static const static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initconst = { struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initconst = {
...@@ -165,9 +151,11 @@ static const ...@@ -165,9 +151,11 @@ static const
struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = {
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR3400_V3, "Netgear WNDR3400 V3"}, "U12H208T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"},
{{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"},
...@@ -202,6 +190,20 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst ...@@ -202,6 +190,20 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst
{ {0}, NULL}, { {0}, NULL},
}; };
/*
* Some devices don't use any common NVRAM entry for identification and they
* have only one model specific variable.
* They don't deserve own arrays, let's group them there using key-value array.
*/
static const
struct bcm47xx_board_type_list2 bcm47xx_board_list_key_value[] __initconst = {
{{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "model_no", "WL700"},
{{BCM47XX_BOARD_LINKSYS_WRT300N_V1, "Linksys WRT300N V1"}, "router_name", "WRT300N"},
{{BCM47XX_BOARD_LINKSYS_WRT600N_V11, "Linksys WRT600N V1.1"}, "Model_Name", "WRT600N"},
{{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "machine_name", "WRTSL54GS"},
{ {0}, NULL},
};
static const static const
struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = { struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = {
{BCM47XX_BOARD_UNKNOWN, "Unknown Board"}, {BCM47XX_BOARD_UNKNOWN, "Unknown Board"},
...@@ -225,20 +227,6 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void) ...@@ -225,20 +227,6 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
} }
} }
if (bcm47xx_nvram_getenv("model_no", buf1, sizeof(buf1)) >= 0) {
for (e1 = bcm47xx_board_list_model_no; e1->value1; e1++) {
if (strstarts(buf1, e1->value1))
return &e1->board;
}
}
if (bcm47xx_nvram_getenv("machine_name", buf1, sizeof(buf1)) >= 0) {
for (e1 = bcm47xx_board_list_machine_name; e1->value1; e1++) {
if (strstarts(buf1, e1->value1))
return &e1->board;
}
}
if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0) { if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0) {
for (e1 = bcm47xx_board_list_hardware_version; e1->value1; e1++) { for (e1 = bcm47xx_board_list_hardware_version; e1->value1; e1++) {
if (strstarts(buf1, e1->value1)) if (strstarts(buf1, e1->value1))
...@@ -247,8 +235,8 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void) ...@@ -247,8 +235,8 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
} }
if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 && if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 &&
bcm47xx_nvram_getenv("boardtype", buf2, sizeof(buf2)) >= 0) { bcm47xx_nvram_getenv("boardnum", buf2, sizeof(buf2)) >= 0) {
for (e2 = bcm47xx_board_list_boot_hw; e2->value1; e2++) { for (e2 = bcm47xx_board_list_hw_version_num; e2->value1; e2++) {
if (!strstarts(buf1, e2->value1) && if (!strstarts(buf1, e2->value1) &&
!strcmp(buf2, e2->value2)) !strcmp(buf2, e2->value2))
return &e2->board; return &e2->board;
...@@ -314,6 +302,14 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void) ...@@ -314,6 +302,14 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
return &e2->board; return &e2->board;
} }
} }
for (e2 = bcm47xx_board_list_key_value; e2->value1; e2++) {
if (bcm47xx_nvram_getenv(e2->value1, buf1, sizeof(buf1)) >= 0) {
if (!strcmp(buf1, e2->value2))
return &e2->board;
}
}
return bcm47xx_board_unknown; return bcm47xx_board_unknown;
} }
...@@ -330,9 +326,8 @@ void __init bcm47xx_board_detect(void) ...@@ -330,9 +326,8 @@ void __init bcm47xx_board_detect(void)
err = bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf)); err = bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf));
/* init of nvram failed, probably too early now */ /* init of nvram failed, probably too early now */
if (err == -ENXIO) { if (err == -ENXIO)
return; return;
}
board_detected = bcm47xx_board_get_nvram(); board_detected = bcm47xx_board_get_nvram();
bcm47xx_board.board = board_detected->board; bcm47xx_board.board = board_detected->board;
......
...@@ -251,6 +251,12 @@ bcm47xx_buttons_linksys_wrt160nv3[] __initconst = { ...@@ -251,6 +251,12 @@ bcm47xx_buttons_linksys_wrt160nv3[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART), BCM47XX_GPIO_KEY(6, KEY_RESTART),
}; };
static const struct gpio_keys_button
bcm47xx_buttons_linksys_wrt300n_v1[] __initconst = {
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
BCM47XX_GPIO_KEY(6, KEY_RESTART),
};
static const struct gpio_keys_button static const struct gpio_keys_button
bcm47xx_buttons_linksys_wrt300nv11[] __initconst = { bcm47xx_buttons_linksys_wrt300nv11[] __initconst = {
BCM47XX_GPIO_KEY(4, KEY_UNKNOWN), BCM47XX_GPIO_KEY(4, KEY_UNKNOWN),
...@@ -326,6 +332,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { ...@@ -326,6 +332,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
BCM47XX_GPIO_KEY(8, KEY_RFKILL), BCM47XX_GPIO_KEY(8, KEY_RFKILL),
}; };
static const struct gpio_keys_button
bcm47xx_buttons_netgear_wndr3400_v3[] __initconst = {
BCM47XX_GPIO_KEY(12, KEY_RESTART),
BCM47XX_GPIO_KEY(23, KEY_WPS_BUTTON),
};
static const struct gpio_keys_button static const struct gpio_keys_button
bcm47xx_buttons_netgear_wndr3700v3[] __initconst = { bcm47xx_buttons_netgear_wndr3700v3[] __initconst = {
BCM47XX_GPIO_KEY(2, KEY_RFKILL), BCM47XX_GPIO_KEY(2, KEY_RFKILL),
...@@ -516,6 +528,9 @@ int __init bcm47xx_buttons_register(void) ...@@ -516,6 +528,9 @@ int __init bcm47xx_buttons_register(void)
case BCM47XX_BOARD_LINKSYS_WRT160NV3: case BCM47XX_BOARD_LINKSYS_WRT160NV3:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3); err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3);
break; break;
case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300n_v1);
break;
case BCM47XX_BOARD_LINKSYS_WRT300NV11: case BCM47XX_BOARD_LINKSYS_WRT300NV11:
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11); err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11);
break; break;
...@@ -557,6 +572,9 @@ int __init bcm47xx_buttons_register(void) ...@@ -557,6 +572,9 @@ int __init bcm47xx_buttons_register(void)
case BCM47XX_BOARD_NETGEAR_WNDR3400V1: case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1); err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
break; break;
case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400_v3);
break;
case BCM47XX_BOARD_NETGEAR_WNDR3700V3: case BCM47XX_BOARD_NETGEAR_WNDR3700V3:
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3); err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3);
break; break;
......
...@@ -291,6 +291,13 @@ bcm47xx_leds_linksys_wrt160nv3[] __initconst = { ...@@ -291,6 +291,13 @@ bcm47xx_leds_linksys_wrt160nv3[] __initconst = {
BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), BCM47XX_GPIO_LED(4, "blue", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
}; };
static const struct gpio_led
bcm47xx_leds_linksys_wrt300n_v1[] __initconst = {
BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
BCM47XX_GPIO_LED(3, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED(5, "green", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
};
static const struct gpio_led static const struct gpio_led
bcm47xx_leds_linksys_wrt300nv11[] __initconst = { bcm47xx_leds_linksys_wrt300nv11[] __initconst = {
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON), BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
...@@ -585,6 +592,9 @@ void __init bcm47xx_leds_register(void) ...@@ -585,6 +592,9 @@ void __init bcm47xx_leds_register(void)
case BCM47XX_BOARD_LINKSYS_WRT160NV3: case BCM47XX_BOARD_LINKSYS_WRT160NV3:
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3); bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt160nv3);
break; break;
case BCM47XX_BOARD_LINKSYS_WRT300N_V1:
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300n_v1);
break;
case BCM47XX_BOARD_LINKSYS_WRT300NV11: case BCM47XX_BOARD_LINKSYS_WRT300NV11:
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11); bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11);
break; break;
......
...@@ -11,15 +11,18 @@ ...@@ -11,15 +11,18 @@
* option) any later version. * option) any later version.
*/ */
#include <linux/io.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <bcm47xx_nvram.h> #include <linux/bcm47xx_nvram.h>
#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ #define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */
#define NVRAM_SPACE 0x8000 #define NVRAM_SPACE 0x10000
#define NVRAM_MAX_GPIO_ENTRIES 32
#define NVRAM_MAX_GPIO_VALUE_LEN 30
#define FLASH_MIN 0x00020000 /* Minimum flash size */ #define FLASH_MIN 0x00020000 /* Minimum flash size */
...@@ -91,20 +94,18 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim) ...@@ -91,20 +94,18 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim)
return -ENXIO; return -ENXIO;
found: found:
if (header->len > size) if (header->len > size)
pr_err("The nvram size accoridng to the header seems to be bigger than the partition on flash\n"); pr_err("The nvram size accoridng to the header seems to be bigger than the partition on flash\n");
if (header->len > NVRAM_SPACE) if (header->len > NVRAM_SPACE)
pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
header->len, NVRAM_SPACE); header->len, NVRAM_SPACE);
src = (u32 *) header; src = (u32 *)header;
dst = (u32 *) nvram_buf; dst = (u32 *)nvram_buf;
for (i = 0; i < sizeof(struct nvram_header); i += 4) for (i = 0; i < sizeof(struct nvram_header); i += 4)
*dst++ = *src++; *dst++ = __raw_readl(src++);
for (; i < header->len && i < NVRAM_SPACE && i < size; i += 4) for (; i < header->len && i < NVRAM_SPACE && i < size; i += 4)
*dst++ = le32_to_cpu(*src++); *dst++ = readl(src++);
memset(dst, 0x0, NVRAM_SPACE - i);
return 0; return 0;
} }
...@@ -138,37 +139,28 @@ static int nvram_init(void) ...@@ -138,37 +139,28 @@ static int nvram_init(void)
struct mtd_info *mtd; struct mtd_info *mtd;
struct nvram_header header; struct nvram_header header;
size_t bytes_read; size_t bytes_read;
int err, i; int err;
mtd = get_mtd_device_nm("nvram"); mtd = get_mtd_device_nm("nvram");
if (IS_ERR(mtd)) if (IS_ERR(mtd))
return -ENODEV; return -ENODEV;
for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) { err = mtd_read(mtd, 0, sizeof(header), &bytes_read, (uint8_t *)&header);
loff_t from = mtd->size - nvram_sizes[i]; if (!err && header.magic == NVRAM_MAGIC) {
u8 *dst = (uint8_t *)nvram_buf;
size_t len = header.len;
if (from < 0) if (header.len > NVRAM_SPACE) {
continue; pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
header.len, NVRAM_SPACE);
err = mtd_read(mtd, from, sizeof(header), &bytes_read, len = NVRAM_SPACE;
(uint8_t *)&header); }
if (!err && header.magic == NVRAM_MAGIC) {
u8 *dst = (uint8_t *)nvram_buf;
size_t len = header.len;
if (header.len > NVRAM_SPACE) {
pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
header.len, NVRAM_SPACE);
len = NVRAM_SPACE;
}
err = mtd_read(mtd, from, len, &bytes_read, dst); err = mtd_read(mtd, 0, len, &bytes_read, dst);
if (err) if (err)
return err; return err;
memset(dst + bytes_read, 0x0, NVRAM_SPACE - bytes_read);
return 0; return 0;
}
} }
#endif #endif
...@@ -178,7 +170,7 @@ static int nvram_init(void) ...@@ -178,7 +170,7 @@ static int nvram_init(void)
int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len)
{ {
char *var, *value, *end, *eq; char *var, *value, *end, *eq;
int err; int data_left, err;
if (!name) if (!name)
return -EINVAL; return -EINVAL;
...@@ -192,16 +184,18 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) ...@@ -192,16 +184,18 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len)
/* Look for name=value and return value */ /* Look for name=value and return value */
var = &nvram_buf[sizeof(struct nvram_header)]; var = &nvram_buf[sizeof(struct nvram_header)];
end = nvram_buf + sizeof(nvram_buf) - 2; end = nvram_buf + sizeof(nvram_buf) - 2;
end[0] = end[1] = '\0'; end[0] = '\0';
end[1] = '\0';
for (; *var; var = value + strlen(value) + 1) { for (; *var; var = value + strlen(value) + 1) {
eq = strchr(var, '='); data_left = end - var;
eq = strnchr(var, data_left, '=');
if (!eq) if (!eq)
break; break;
value = eq + 1; value = eq + 1;
if ((eq - var) == strlen(name) && if (eq - var == strlen(name) &&
strncmp(var, name, (eq - var)) == 0) { strncmp(var, name, eq - var) == 0)
return snprintf(val, val_len, "%s", value); return snprintf(val, val_len, "%s", value);
}
} }
return -ENOENT; return -ENOENT;
} }
...@@ -210,10 +204,11 @@ EXPORT_SYMBOL(bcm47xx_nvram_getenv); ...@@ -210,10 +204,11 @@ EXPORT_SYMBOL(bcm47xx_nvram_getenv);
int bcm47xx_nvram_gpio_pin(const char *name) int bcm47xx_nvram_gpio_pin(const char *name)
{ {
int i, err; int i, err;
char nvram_var[10]; char nvram_var[] = "gpioXX";
char buf[30]; char buf[NVRAM_MAX_GPIO_VALUE_LEN];
for (i = 0; i < 32; i++) { /* TODO: Optimize it to don't call getenv so many times */
for (i = 0; i < NVRAM_MAX_GPIO_ENTRIES; i++) {
err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i); err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i);
if (err <= 0) if (err <= 0)
continue; continue;
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <bcm47xx.h> #include <bcm47xx.h>
#include <bcm47xx_board.h> #include <bcm47xx_board.h>
static char bcm47xx_system_type[20] = "Broadcom BCM47XX"; static char bcm47xx_system_type[20] = "Broadcom BCM47XX";
const char *get_system_type(void) const char *get_system_type(void)
...@@ -83,7 +82,7 @@ static __init void prom_init_mem(void) ...@@ -83,7 +82,7 @@ static __init void prom_init_mem(void)
/* Loop condition may be not enough, off may be over 1 MiB */ /* Loop condition may be not enough, off may be over 1 MiB */
if (off + mem >= max) { if (off + mem >= max) {
mem = max; mem = max;
printk(KERN_DEBUG "assume 128MB RAM\n"); pr_debug("Assume 128MB RAM\n");
break; break;
} }
if (!memcmp(prom_init, prom_init + mem, 32)) if (!memcmp(prom_init, prom_init + mem, 32))
......
...@@ -36,8 +36,8 @@ static int __init uart8250_init_ssb(void) ...@@ -36,8 +36,8 @@ static int __init uart8250_init_ssb(void)
struct plat_serial8250_port *p = &(uart8250_data[i]); struct plat_serial8250_port *p = &(uart8250_data[i]);
struct ssb_serial_port *ssb_port = &(mcore->serial_ports[i]); struct ssb_serial_port *ssb_port = &(mcore->serial_ports[i]);
p->mapbase = (unsigned int) ssb_port->regs; p->mapbase = (unsigned int)ssb_port->regs;
p->membase = (void *) ssb_port->regs; p->membase = (void *)ssb_port->regs;
p->irq = ssb_port->irq + 2; p->irq = ssb_port->irq + 2;
p->uartclk = ssb_port->baud_base; p->uartclk = ssb_port->baud_base;
p->regshift = ssb_port->reg_shift; p->regshift = ssb_port->reg_shift;
...@@ -62,8 +62,8 @@ static int __init uart8250_init_bcma(void) ...@@ -62,8 +62,8 @@ static int __init uart8250_init_bcma(void)
struct bcma_serial_port *bcma_port; struct bcma_serial_port *bcma_port;
bcma_port = &(cc->serial_ports[i]); bcma_port = &(cc->serial_ports[i]);
p->mapbase = (unsigned int) bcma_port->regs; p->mapbase = (unsigned int)bcma_port->regs;
p->membase = (void *) bcma_port->regs; p->membase = (void *)bcma_port->regs;
p->irq = bcma_port->irq; p->irq = bcma_port->irq;
p->uartclk = bcma_port->baud_base; p->uartclk = bcma_port->baud_base;
p->regshift = bcma_port->reg_shift; p->regshift = bcma_port->reg_shift;
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/time.h> #include <asm/time.h>
#include <bcm47xx.h> #include <bcm47xx.h>
#include <bcm47xx_nvram.h>
#include <bcm47xx_board.h> #include <bcm47xx_board.h>
union bcm47xx_bus bcm47xx_bus; union bcm47xx_bus bcm47xx_bus;
...@@ -53,7 +52,7 @@ EXPORT_SYMBOL(bcm47xx_bus_type); ...@@ -53,7 +52,7 @@ EXPORT_SYMBOL(bcm47xx_bus_type);
static void bcm47xx_machine_restart(char *command) static void bcm47xx_machine_restart(char *command)
{ {
printk(KERN_ALERT "Please stand by while rebooting the system...\n"); pr_alert("Please stand by while rebooting the system...\n");
local_irq_disable(); local_irq_disable();
/* Set the watchdog timer to reset immediately */ /* Set the watchdog timer to reset immediately */
switch (bcm47xx_bus_type) { switch (bcm47xx_bus_type) {
...@@ -108,7 +107,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, ...@@ -108,7 +107,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
char buf[20]; char buf[20];
/* Fill boardinfo structure */ /* Fill boardinfo structure */
memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo)); memset(&iv->boardinfo, 0 , sizeof(struct ssb_boardinfo));
bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL); bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL);
...@@ -127,7 +126,7 @@ static void __init bcm47xx_register_ssb(void) ...@@ -127,7 +126,7 @@ static void __init bcm47xx_register_ssb(void)
char buf[100]; char buf[100];
struct ssb_mipscore *mcore; struct ssb_mipscore *mcore;
err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE, err = ssb_bus_ssbbus_register(&bcm47xx_bus.ssb, SSB_ENUM_BASE,
bcm47xx_get_invariants); bcm47xx_get_invariants);
if (err) if (err)
panic("Failed to initialize SSB bus (err %d)", err); panic("Failed to initialize SSB bus (err %d)", err);
...@@ -137,7 +136,7 @@ static void __init bcm47xx_register_ssb(void) ...@@ -137,7 +136,7 @@ static void __init bcm47xx_register_ssb(void)
if (strstr(buf, "console=ttyS1")) { if (strstr(buf, "console=ttyS1")) {
struct ssb_serial_port port; struct ssb_serial_port port;
printk(KERN_DEBUG "Swapping serial ports!\n"); pr_debug("Swapping serial ports!\n");
/* swap serial ports */ /* swap serial ports */
memcpy(&port, &mcore->serial_ports[0], sizeof(port)); memcpy(&port, &mcore->serial_ports[0], sizeof(port));
memcpy(&mcore->serial_ports[0], &mcore->serial_ports[1], memcpy(&mcore->serial_ports[0], &mcore->serial_ports[1],
...@@ -169,7 +168,7 @@ void __init plat_mem_setup(void) ...@@ -169,7 +168,7 @@ void __init plat_mem_setup(void)
struct cpuinfo_mips *c = &current_cpu_data; struct cpuinfo_mips *c = &current_cpu_data;
if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K)) { if ((c->cputype == CPU_74K) || (c->cputype == CPU_1074K)) {
printk(KERN_INFO "bcm47xx: using bcma bus\n"); pr_info("Using bcma bus\n");
#ifdef CONFIG_BCM47XX_BCMA #ifdef CONFIG_BCM47XX_BCMA
bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
bcm47xx_sprom_register_fallbacks(); bcm47xx_sprom_register_fallbacks();
...@@ -180,7 +179,7 @@ void __init plat_mem_setup(void) ...@@ -180,7 +179,7 @@ void __init plat_mem_setup(void)
#endif #endif
#endif #endif
} else { } else {
printk(KERN_INFO "bcm47xx: using ssb bus\n"); pr_info("Using ssb bus\n");
#ifdef CONFIG_BCM47XX_SSB #ifdef CONFIG_BCM47XX_SSB
bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB; bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB;
bcm47xx_sprom_register_fallbacks(); bcm47xx_sprom_register_fallbacks();
......
This diff is collapsed.
...@@ -22,12 +22,10 @@ ...@@ -22,12 +22,10 @@
* 675 Mass Ave, Cambridge, MA 02139, USA. * 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/ssb/ssb.h> #include <linux/ssb/ssb.h>
#include <asm/time.h> #include <asm/time.h>
#include <bcm47xx.h> #include <bcm47xx.h>
#include <bcm47xx_nvram.h>
#include <bcm47xx_board.h> #include <bcm47xx_board.h>
void __init plat_time_init(void) void __init plat_time_init(void)
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <bcm63xx_cpu.h> #include <bcm63xx_cpu.h>
#include <bcm63xx_io.h> #include <bcm63xx_io.h>
#include <bcm63xx_regs.h> #include <bcm63xx_regs.h>
#include <bcm63xx_gpio.h>
void __init prom_init(void) void __init prom_init(void)
{ {
...@@ -53,9 +52,6 @@ void __init prom_init(void) ...@@ -53,9 +52,6 @@ void __init prom_init(void)
reg &= ~mask; reg &= ~mask;
bcm_perf_writel(reg, PERF_CKCTL_REG); bcm_perf_writel(reg, PERF_CKCTL_REG);
/* register gpiochip */
bcm63xx_gpio_init();
/* do low level board init */ /* do low level board init */
board_prom_init(); board_prom_init();
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <bcm63xx_cpu.h> #include <bcm63xx_cpu.h>
#include <bcm63xx_regs.h> #include <bcm63xx_regs.h>
#include <bcm63xx_io.h> #include <bcm63xx_io.h>
#include <bcm63xx_gpio.h>
void bcm63xx_machine_halt(void) void bcm63xx_machine_halt(void)
{ {
...@@ -160,6 +161,9 @@ void __init plat_mem_setup(void) ...@@ -160,6 +161,9 @@ void __init plat_mem_setup(void)
int __init bcm63xx_register_devices(void) int __init bcm63xx_register_devices(void)
{ {
/* register gpiochip */
bcm63xx_gpio_init();
return board_register_devices(); return board_register_devices();
} }
......
if BMIPS_GENERIC
choice
prompt "Built-in device tree"
help
Legacy bootloaders do not pass a DTB pointer to the kernel, so
if a "wrapper" is not being used, the kernel will need to include
a device tree that matches the target board.
The builtin DTB will only be used if the firmware does not supply
a valid DTB.
config DT_NONE
bool "None"
config DT_BCM93384WVG
bool "BCM93384WVG Zephyr CPU"
select BUILTIN_DTB
config DT_BCM93384WVG_VIPER
bool "BCM93384WVG Viper CPU (EXPERIMENTAL)"
select BUILTIN_DTB
config DT_BCM96368MVWG
bool "BCM96368MVWG"
select BUILTIN_DTB
config DT_BCM9EJTAGPRB
bool "BCM9EJTAGPRB"
select BUILTIN_DTB
config DT_BCM97125CBMB
bool "BCM97125CBMB"
select BUILTIN_DTB
config DT_BCM97346DBSMB
bool "BCM97346DBSMB"
select BUILTIN_DTB
config DT_BCM97358SVMB
bool "BCM97358SVMB"
select BUILTIN_DTB
config DT_BCM97360SVMB
bool "BCM97360SVMB"
select BUILTIN_DTB
config DT_BCM97362SVMB
bool "BCM97362SVMB"
select BUILTIN_DTB
config DT_BCM97420C
bool "BCM97420C"
select BUILTIN_DTB
config DT_BCM97425SVMB
bool "BCM97425SVMB"
select BUILTIN_DTB
endchoice
endif
#
# Broadcom Generic BMIPS kernel
#
platform-$(CONFIG_BMIPS_GENERIC) += bmips/
cflags-$(CONFIG_BMIPS_GENERIC) += \
-I$(srctree)/arch/mips/include/asm/mach-bmips/
load-$(CONFIG_BMIPS_GENERIC) := 0xffffffff80010000
...@@ -6,76 +6,112 @@ ...@@ -6,76 +6,112 @@
* Copyright (C) 2014 Kevin Cernekee <cernekee@gmail.com> * Copyright (C) 2014 Kevin Cernekee <cernekee@gmail.com>
*/ */
#define pr_fmt(fmt) "bmips-dma: " fmt
#include <linux/device.h> #include <linux/device.h>
#include <linux/dma-direction.h> #include <linux/dma-direction.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mm.h> #include <linux/io.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/pci.h> #include <linux/printk.h>
#include <linux/slab.h>
#include <linux/types.h> #include <linux/types.h>
#include <dma-coherence.h> #include <dma-coherence.h>
/* /*
* BCM3384 has configurable address translation windows which allow the * BCM338x has configurable address translation windows which allow the
* peripherals' DMA addresses to be different from the Zephyr-visible * peripherals' DMA addresses to be different from the Zephyr-visible
* physical addresses. e.g. usb_dma_addr = zephyr_pa ^ 0x08000000 * physical addresses. e.g. usb_dma_addr = zephyr_pa ^ 0x08000000
* *
* If our DT "memory" node has a "dma-xor-mask" property we will enable this * If the "brcm,ubus" node has a "dma-ranges" property we will enable this
* translation using the provided offset. * translation globally using the provided information. This implements a
* very limited subset of "dma-ranges" support and it will probably be
* replaced by a more generic version later.
*/ */
static u32 bcm3384_dma_xor_mask;
static u32 bcm3384_dma_xor_limit = 0xffffffff;
/* struct bmips_dma_range {
* PCI collapses the memory hole at 0x10000000 - 0x1fffffff. u32 child_addr;
* On systems with a dma-xor-mask, this range is guaranteed to live above u32 parent_addr;
* the dma-xor-limit. u32 size;
*/ };
#define BCM3384_MEM_HOLE_PA 0x10000000
#define BCM3384_MEM_HOLE_SIZE 0x10000000
static dma_addr_t bcm3384_phys_to_dma(struct device *dev, phys_addr_t pa) static struct bmips_dma_range *bmips_dma_ranges;
#define FLUSH_RAC 0x100
static dma_addr_t bmips_phys_to_dma(struct device *dev, phys_addr_t pa)
{ {
if (dev && dev_is_pci(dev) && struct bmips_dma_range *r;
pa >= (BCM3384_MEM_HOLE_PA + BCM3384_MEM_HOLE_SIZE))
return pa - BCM3384_MEM_HOLE_SIZE; for (r = bmips_dma_ranges; r && r->size; r++) {
if (pa <= bcm3384_dma_xor_limit) if (pa >= r->child_addr &&
return pa ^ bcm3384_dma_xor_mask; pa < (r->child_addr + r->size))
return pa - r->child_addr + r->parent_addr;
}
return pa; return pa;
} }
dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
{ {
return bcm3384_phys_to_dma(dev, virt_to_phys(addr)); return bmips_phys_to_dma(dev, virt_to_phys(addr));
} }
dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
{ {
return bcm3384_phys_to_dma(dev, page_to_phys(page)); return bmips_phys_to_dma(dev, page_to_phys(page));
} }
unsigned long plat_dma_addr_to_phys(struct device *dev, dma_addr_t dma_addr) unsigned long plat_dma_addr_to_phys(struct device *dev, dma_addr_t dma_addr)
{ {
if (dev && dev_is_pci(dev) && struct bmips_dma_range *r;
dma_addr >= BCM3384_MEM_HOLE_PA)
return dma_addr + BCM3384_MEM_HOLE_SIZE; for (r = bmips_dma_ranges; r && r->size; r++) {
if ((dma_addr ^ bcm3384_dma_xor_mask) <= bcm3384_dma_xor_limit) if (dma_addr >= r->parent_addr &&
return dma_addr ^ bcm3384_dma_xor_mask; dma_addr < (r->parent_addr + r->size))
return dma_addr - r->parent_addr + r->child_addr;
}
return dma_addr; return dma_addr;
} }
static int __init bcm3384_init_dma_xor(void) static int __init bmips_init_dma_ranges(void)
{ {
struct device_node *np = of_find_node_by_type(NULL, "memory"); struct device_node *np =
of_find_compatible_node(NULL, NULL, "brcm,ubus");
const __be32 *data;
struct bmips_dma_range *r;
int len;
if (!np) if (!np)
return 0; return 0;
of_property_read_u32(np, "dma-xor-mask", &bcm3384_dma_xor_mask); data = of_get_property(np, "dma-ranges", &len);
of_property_read_u32(np, "dma-xor-limit", &bcm3384_dma_xor_limit); if (!data)
goto out_good;
len /= sizeof(*data) * 3;
if (!len)
goto out_bad;
/* add a dummy (zero) entry at the end as a sentinel */
bmips_dma_ranges = kzalloc(sizeof(struct bmips_dma_range) * (len + 1),
GFP_KERNEL);
if (!bmips_dma_ranges)
goto out_bad;
for (r = bmips_dma_ranges; len; len--, r++) {
r->child_addr = be32_to_cpup(data++);
r->parent_addr = be32_to_cpup(data++);
r->size = be32_to_cpup(data++);
}
out_good:
of_node_put(np); of_node_put(np);
return 0; return 0;
out_bad:
pr_err("error parsing dma-ranges property\n");
of_node_put(np);
return -EINVAL;
} }
arch_initcall(bcm3384_init_dma_xor); arch_initcall(bmips_init_dma_ranges);
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
* Copyright (C) 2014 Broadcom Corporation
* Author: Kevin Cernekee <cernekee@gmail.com>
*/
#include <linux/of.h>
#include <linux/irqchip.h>
#include <asm/bmips.h>
#include <asm/irq.h>
#include <asm/irq_cpu.h>
#include <asm/time.h>
unsigned int get_c0_compare_int(void)
{
return CP0_LEGACY_COMPARE_IRQ;
}
void __init arch_init_irq(void)
{
struct device_node *dn;
/* Only the STB (bcm7038) controller supports SMP IRQ affinity */
dn = of_find_compatible_node(NULL, NULL, "brcm,bcm7038-l1-intc");
if (dn)
of_node_put(dn);
else
bmips_tp1_irqs = 0;
irqchip_init();
}
OF_DECLARE_2(irqchip, mips_cpu_intc, "mti,cpu-interrupt-controller",
mips_cpu_irq_of_init);
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/bitops.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
...@@ -18,9 +21,92 @@ ...@@ -18,9 +21,92 @@
#include <asm/addrspace.h> #include <asm/addrspace.h>
#include <asm/bmips.h> #include <asm/bmips.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <asm/cpu-type.h>
#include <asm/mipsregs.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/smp-ops.h> #include <asm/smp-ops.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/traps.h>
#define RELO_NORMAL_VEC BIT(18)
#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
#define BCM6328_TP1_DISABLED BIT(9)
static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000;
struct bmips_quirk {
const char *compatible;
void (*quirk_fn)(void);
};
static void kbase_setup(void)
{
__raw_writel(kbase | RELO_NORMAL_VEC,
BMIPS_GET_CBR() + BMIPS_RELO_VECTOR_CONTROL_1);
ebase = kbase;
}
static void bcm3384_viper_quirks(void)
{
/*
* Some experimental CM boxes are set up to let CM own the Viper TP0
* and let Linux own TP1. This requires moving the kernel
* load address to a non-conflicting region (e.g. via
* CONFIG_PHYSICAL_START) and supplying an alternate DTB.
* If we detect this condition, we need to move the MIPS exception
* vectors up to an area that we own.
*
* This is distinct from the OTHER special case mentioned in
* smp-bmips.c (boot on TP1, but enable SMP, then TP0 becomes our
* logical CPU#1). For the Viper TP1 case, SMP is off limits.
*
* Also note that many BMIPS435x CPUs do not have a
* BMIPS_RELO_VECTOR_CONTROL_1 register, so it isn't safe to just
* write VMLINUX_LOAD_ADDRESS into that register on every SoC.
*/
board_ebase_setup = &kbase_setup;
bmips_smp_enabled = 0;
}
static void bcm63xx_fixup_cpu1(void)
{
/*
* The bootloader has set up the CPU1 reset vector at
* 0xa000_0200.
* This conflicts with the special interrupt vector (IV).
* The bootloader has also set up CPU1 to respond to the wrong
* IPI interrupt.
* Here we will start up CPU1 in the background and ask it to
* reconfigure itself then go back to sleep.
*/
memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
__sync();
set_c0_cause(C_SW0);
cpumask_set_cpu(1, &bmips_booted_mask);
}
static void bcm6328_quirks(void)
{
/* Check CPU1 status in OTP (it is usually disabled) */
if (__raw_readl(REG_BCM6328_OTP) & BCM6328_TP1_DISABLED)
bmips_smp_enabled = 0;
else
bcm63xx_fixup_cpu1();
}
static void bcm6368_quirks(void)
{
bcm63xx_fixup_cpu1();
}
static const struct bmips_quirk bmips_quirk_list[] = {
{ "brcm,bcm3384-viper", &bcm3384_viper_quirks },
{ "brcm,bcm33843-viper", &bcm3384_viper_quirks },
{ "brcm,bcm6328", &bcm6328_quirks },
{ "brcm,bcm6368", &bcm6368_quirks },
{ },
};
void __init prom_init(void) void __init prom_init(void)
{ {
...@@ -33,7 +119,7 @@ void __init prom_free_prom_memory(void) ...@@ -33,7 +119,7 @@ void __init prom_free_prom_memory(void)
const char *get_system_type(void) const char *get_system_type(void)
{ {
return "BCM3384"; return "Generic BMIPS kernel";
} }
void __init plat_time_init(void) void __init plat_time_init(void)
...@@ -53,7 +139,8 @@ void __init plat_time_init(void) ...@@ -53,7 +139,8 @@ void __init plat_time_init(void)
void __init plat_mem_setup(void) void __init plat_mem_setup(void)
{ {
void *dtb = __dtb_start; void *dtb;
const struct bmips_quirk *q;
set_io_port_base(0); set_io_port_base(0);
ioport_resource.start = 0; ioport_resource.start = 0;
...@@ -62,10 +149,20 @@ void __init plat_mem_setup(void) ...@@ -62,10 +149,20 @@ void __init plat_mem_setup(void)
/* intended to somewhat resemble ARM; see Documentation/arm/Booting */ /* intended to somewhat resemble ARM; see Documentation/arm/Booting */
if (fw_arg0 == 0 && fw_arg1 == 0xffffffff) if (fw_arg0 == 0 && fw_arg1 == 0xffffffff)
dtb = phys_to_virt(fw_arg2); dtb = phys_to_virt(fw_arg2);
else if (__dtb_start != __dtb_end)
dtb = (void *)__dtb_start;
else
panic("no dtb found");
__dt_setup_arch(dtb); __dt_setup_arch(dtb);
strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
for (q = bmips_quirk_list; q->quirk_fn; q++) {
if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
q->compatible)) {
q->quirk_fn();
}
}
} }
void __init device_tree_init(void) void __init device_tree_init(void)
...@@ -83,7 +180,7 @@ void __init device_tree_init(void) ...@@ -83,7 +180,7 @@ void __init device_tree_init(void)
int __init plat_of_setup(void) int __init plat_of_setup(void)
{ {
return __dt_register_buses("brcm,bcm3384", "simple-bus"); return __dt_register_buses("simple-bus", NULL);
} }
arch_initcall(plat_of_setup); arch_initcall(plat_of_setup);
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
# Author: Wu Zhangjin <wuzhangjin@gmail.com> # Author: Wu Zhangjin <wuzhangjin@gmail.com>
# #
include $(srctree)/arch/mips/Kbuild.platforms
# set the default size of the mallocing area for decompressing # set the default size of the mallocing area for decompressing
BOOT_HEAP_SIZE := 0x400000 BOOT_HEAP_SIZE := 0x400000
...@@ -30,9 +32,10 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ ...@@ -30,9 +32,10 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
targets := head.o decompress.o string.o dbg.o uart-16550.o uart-alchemy.o targets := head.o decompress.o string.o dbg.o uart-16550.o uart-alchemy.o
# decompressor objects (linked with vmlinuz) # decompressor objects (linked with vmlinuz)
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/dbg.o vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
ifdef CONFIG_DEBUG_ZBOOT ifdef CONFIG_DEBUG_ZBOOT
vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
endif endif
...@@ -66,8 +69,8 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE ...@@ -66,8 +69,8 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
# Calculate the load address of the compressed kernel image # Calculate the load address of the compressed kernel image
hostprogs-y := calc_vmlinuz_load_addr hostprogs-y := calc_vmlinuz_load_addr
ifeq ($(CONFIG_MACH_JZ4740),y) ifneq ($(zload-y),)
VMLINUZ_LOAD_ADDRESS := 0x80600000 VMLINUZ_LOAD_ADDRESS := $(zload-y)
else else
VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
......
...@@ -28,8 +28,13 @@ unsigned long free_mem_end_ptr; ...@@ -28,8 +28,13 @@ unsigned long free_mem_end_ptr;
extern unsigned char __image_begin, __image_end; extern unsigned char __image_begin, __image_end;
/* debug interfaces */ /* debug interfaces */
#ifdef CONFIG_DEBUG_ZBOOT
extern void puts(const char *s); extern void puts(const char *s);
extern void puthex(unsigned long long val); extern void puthex(unsigned long long val);
#else
#define puts(s) do {} while (0)
#define puthex(val) do {} while (0)
#endif
void error(char *x) void error(char *x)
{ {
......
dtb-$(CONFIG_BCM3384) += bcm93384wvg.dtb dts-dirs += brcm
dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb dts-dirs += cavium-octeon
dtb-$(CONFIG_DT_EASY50712) += easy50712.dtb dts-dirs += lantiq
dtb-$(CONFIG_DT_XLP_EVP) += xlp_evp.dtb dts-dirs += mti
dtb-$(CONFIG_DT_XLP_SVP) += xlp_svp.dtb dts-dirs += netlogic
dtb-$(CONFIG_DT_XLP_FVP) += xlp_fvp.dtb dts-dirs += ralink
dtb-$(CONFIG_DT_XLP_GVP) += xlp_gvp.dtb
dtb-$(CONFIG_DTB_RT2880_EVAL) += rt2880_eval.dtb obj-y := $(addsuffix /, $(dts-dirs))
dtb-$(CONFIG_DTB_RT305X_EVAL) += rt3052_eval.dtb
dtb-$(CONFIG_DTB_RT3883_EVAL) += rt3883_eval.dtb always := $(dtb-y)
dtb-$(CONFIG_DTB_MT7620A_EVAL) += mt7620a_eval.dtb subdir-y := $(dts-dirs)
dtb-$(CONFIG_MIPS_SEAD3) += sead3.dtb clean-files := *.dtb *.dtb.S
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
targets += dtbs
targets += $(dtb-y)
dtbs: $(addprefix $(obj)/, $(dtb-y))
clean-files += *.dtb *.dtb.S
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm3384", "brcm,bcm33843";
cpus {
#address-cells = <1>;
#size-cells = <0>;
/* On BMIPS5000 this is 1/8th of the CPU core clock */
mips-hpt-frequency = <100000000>;
cpu@0 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <1>;
};
};
clocks {
#address-cells = <1>;
#size-cells = <0>;
periph_clk: periph_clk@0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <54000000>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc@0 {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
periph_intc: periph_intc@14e00038 {
compatible = "brcm,bcm3384-intc";
reg = <0x14e00038 0x8 0x14e00340 0x8>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <4>;
};
zmips_intc: zmips_intc@104b0060 {
compatible = "brcm,bcm3384-intc";
reg = <0x104b0060 0x8>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <29>;
};
iop_intc: iop_intc@14e00058 {
compatible = "brcm,bcm3384-intc";
reg = <0x14e00058 0x8>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <6>;
};
uart0: serial@14e00520 {
compatible = "brcm,bcm6345-uart";
reg = <0x14e00520 0x18>;
interrupt-parent = <&periph_intc>;
interrupts = <2>;
clocks = <&periph_clk>;
status = "disabled";
};
ehci0: usb@15400300 {
compatible = "brcm,bcm3384-ehci", "generic-ehci";
reg = <0x15400300 0x100>;
big-endian;
interrupt-parent = <&periph_intc>;
interrupts = <41>;
status = "disabled";
};
ohci0: usb@15400400 {
compatible = "brcm,bcm3384-ohci", "generic-ohci";
reg = <0x15400400 0x100>;
big-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <40>;
status = "disabled";
};
};
dtb-$(CONFIG_DT_BCM93384WVG) += bcm93384wvg.dtb
dtb-$(CONFIG_DT_BCM93384WVG_VIPER) += bcm93384wvg_viper.dtb
dtb-$(CONFIG_DT_BCM96368MVWG) += bcm96368mvwg.dtb
dtb-$(CONFIG_DT_BCM9EJTAGPRB) += bcm9ejtagprb.dtb
dtb-$(CONFIG_DT_BCM97125CBMB) += bcm97125cbmb.dtb
dtb-$(CONFIG_DT_BCM97346DBSMB) += bcm97346dbsmb.dtb
dtb-$(CONFIG_DT_BCM97358SVMB) += bcm97358svmb.dtb
dtb-$(CONFIG_DT_BCM97360SVMB) += bcm97360svmb.dtb
dtb-$(CONFIG_DT_BCM97362SVMB) += bcm97362svmb.dtb
dtb-$(CONFIG_DT_BCM97420C) += bcm97420c.dtb
dtb-$(CONFIG_DT_BCM97425SVMB) += bcm97425svmb.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm3384-viper", "brcm,bcm33843-viper";
memory@0 {
device_type = "memory";
/* Typical ranges. The bootloader should fill these in. */
reg = <0x06000000 0x02000000>,
<0x0e000000 0x02000000>;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
/* 1/2 of the CPU core clock (standard MIPS behavior) */
mips-hpt-frequency = <300000000>;
cpu@0 {
compatible = "brcm,bmips4350";
device_type = "cpu";
reg = <0>;
};
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
periph_clk: periph_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <54000000>;
};
};
aliases {
uart0 = &uart0;
};
ubus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,ubus", "simple-bus";
ranges;
/* No dma-ranges on Viper. */
periph_intc: periph_intc@14e00048 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x14e00048 0x4 0x14e0004c 0x4>,
<0x14e00350 0x4 0x14e00354 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <4>;
};
cmips_intc: cmips_intc@151f8048 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x151f8048 0x4 0x151f804c 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <30>;
brcm,int-map-mask = <0xffffffff>;
};
uart0: serial@14e00520 {
compatible = "brcm,bcm6345-uart";
reg = <0x14e00520 0x18>;
interrupt-parent = <&periph_intc>;
interrupts = <2>;
clocks = <&periph_clk>;
status = "disabled";
};
ehci0: usb@15400300 {
compatible = "brcm,bcm3384-ehci", "generic-ehci";
reg = <0x15400300 0x100>;
big-endian;
interrupt-parent = <&periph_intc>;
interrupts = <41>;
status = "disabled";
};
ohci0: usb@15400400 {
compatible = "brcm,bcm3384-ohci", "generic-ohci";
reg = <0x15400400 0x100>;
big-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <40>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm3384", "brcm,bcm33843";
memory@0 {
device_type = "memory";
/* Typical range. The bootloader should fill this in. */
reg = <0x0 0x08000000>;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
/* On BMIPS5000 this is 1/8th of the CPU core clock */
mips-hpt-frequency = <100000000>;
cpu@0 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <1>;
};
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
periph_clk: periph_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <54000000>;
};
};
aliases {
uart0 = &uart0;
};
ubus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,ubus", "simple-bus";
ranges;
dma-ranges = <0x00000000 0x08000000 0x08000000>,
<0x08000000 0x00000000 0x08000000>;
periph_intc: periph_intc@14e00038 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x14e00038 0x4 0x14e0003c 0x4>,
<0x14e00340 0x4 0x14e00344 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <4>;
};
zmips_intc: zmips_intc@104b0060 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x104b0060 0x4 0x104b0064 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <29>;
brcm,int-map-mask = <0xffffffff>;
};
iop_intc: iop_intc@14e00058 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x14e00058 0x4 0x14e0005c 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <6>;
brcm,int-map-mask = <0xffffffff>;
};
uart0: serial@14e00520 {
compatible = "brcm,bcm6345-uart";
reg = <0x14e00520 0x18>;
interrupt-parent = <&periph_intc>;
interrupts = <2>;
clocks = <&periph_clk>;
status = "disabled";
};
ehci0: usb@15400300 {
compatible = "brcm,bcm3384-ehci", "generic-ehci";
reg = <0x15400300 0x100>;
big-endian;
interrupt-parent = <&periph_intc>;
interrupts = <41>;
status = "disabled";
};
ohci0: usb@15400400 {
compatible = "brcm,bcm3384-ohci", "generic-ohci";
reg = <0x15400400 0x100>;
big-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <40>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm6328";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <160000000>;
cpu@0 {
compatible = "brcm,bmips4350";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips4350";
device_type = "cpu";
reg = <1>;
};
};
clocks {
periph_clk: periph_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <50000000>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
ubus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges;
periph_intc: periph_intc@10000020 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x10000024 0x4 0x1000002c 0x4>,
<0x10000020 0x4 0x10000028 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>;
};
uart0: serial@10000100 {
compatible = "brcm,bcm6345-uart";
reg = <0x10000100 0x18>;
interrupt-parent = <&periph_intc>;
interrupts = <28>;
clocks = <&periph_clk>;
status = "disabled";
};
timer: timer@10000040 {
compatible = "syscon";
reg = <0x10000040 0x2c>;
little-endian;
};
reboot {
compatible = "syscon-reboot";
regmap = <&timer>;
offset = <0x28>;
mask = <0x1>;
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm6368";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <200000000>;
cpu@0 {
compatible = "brcm,bmips4350";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips4350";
device_type = "cpu";
reg = <1>;
};
};
clocks {
periph_clk: periph_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <50000000>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
ubus {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges;
periph_intc: periph_intc@10000020 {
compatible = "brcm,bcm3380-l2-intc";
reg = <0x10000024 0x4 0x1000002c 0x4>,
<0x10000020 0x4 0x10000028 0x4>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>;
};
uart0: serial@10000100 {
compatible = "brcm,bcm6345-uart";
reg = <0x10000100 0x18>;
interrupt-parent = <&periph_intc>;
interrupts = <2>;
clocks = <&periph_clk>;
status = "disabled";
};
ehci0: usb@10001500 {
compatible = "brcm,bcm6368-ehci", "generic-ehci";
reg = <0x10001500 0x100>;
big-endian;
interrupt-parent = <&periph_intc>;
interrupts = <7>;
status = "disabled";
};
ohci0: usb@10001600 {
compatible = "brcm,bcm6368-ohci", "generic-ohci";
reg = <0x10001600 0x100>;
big-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <5>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7125";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <202500000>;
cpu@0 {
compatible = "brcm,bmips4380";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips4380";
device_type = "cpu";
reg = <1>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@441400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x441400 0x30>, <0x441600 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>, <3>;
};
sun_l2_intc: sun_l2_intc@401800 {
compatible = "brcm,l2-intc";
reg = <0x401800 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <23>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x2f7>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "pci_0",
"bsp_0", "rdc_0", "rptd_0",
"avd_0", "jtag_0";
};
upg_irq0_intc: upg_irq0_intc@406780 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406780 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <18>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7125-sun-top-ctrl", "syscon";
reg = <0x404000 0x60c>;
little-endian;
};
reboot {
compatible = "brcm,bcm7038-reboot";
syscon = <&sun_top_ctrl 0x8 0x14>;
};
uart0: serial@406b00 {
compatible = "ns16550a";
reg = <0x406b00 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <21>;
clocks = <&uart_clk>;
status = "disabled";
};
ehci0: usb@488300 {
compatible = "brcm,bcm7125-ehci", "generic-ehci";
reg = <0x488300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <60>;
status = "disabled";
};
ohci0: usb@488400 {
compatible = "brcm,bcm7125-ohci", "generic-ohci";
reg = <0x488400 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <61>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7346";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <163125000>;
cpu@0 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <1>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@411400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x411400 0x30>, <0x411600 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>, <3>;
};
sun_l2_intc: sun_l2_intc@403000 {
compatible = "brcm,l2-intc";
reg = <0x403000 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <51>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x673>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0",
"rdc_0", "raaga_0",
"jtag_0", "svd_0";
};
upg_irq0_intc: upg_irq0_intc@406780 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406780 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <59>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7346-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
compatible = "brcm,brcmstb-reboot";
syscon = <&sun_top_ctrl 0x304 0x308>;
};
uart0: serial@406900 {
compatible = "ns16550a";
reg = <0x406900 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <64>;
clocks = <&uart_clk>;
status = "disabled";
};
enet0: ethernet@430000 {
phy-mode = "internal";
phy-handle = <&phy1>;
mac-address = [ 00 10 18 36 23 1a ];
compatible = "brcm,genet-v2";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x430000 0x4c8c>;
interrupts = <24>, <25>;
interrupt-parent = <&periph_intc>;
status = "disabled";
mdio@e14 {
compatible = "brcm,genet-mdio-v2";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0xe14 0x8>;
phy1: ethernet-phy@1 {
max-speed = <100>;
reg = <0x1>;
compatible = "brcm,40nm-ephy",
"ethernet-phy-ieee802.3-c22";
};
};
};
ehci0: usb@480300 {
compatible = "brcm,bcm7346-ehci", "generic-ehci";
reg = <0x480300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <68>;
status = "disabled";
};
ohci0: usb@480400 {
compatible = "brcm,bcm7346-ohci", "generic-ohci";
reg = <0x480400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <70>;
status = "disabled";
};
ehci1: usb@480500 {
compatible = "brcm,bcm7346-ehci", "generic-ehci";
reg = <0x480500 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <69>;
status = "disabled";
};
ohci1: usb@480600 {
compatible = "brcm,bcm7346-ohci", "generic-ohci";
reg = <0x480600 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <71>;
status = "disabled";
};
ehci2: usb@490300 {
compatible = "brcm,bcm7346-ehci", "generic-ehci";
reg = <0x490300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <73>;
status = "disabled";
};
ohci2: usb@490400 {
compatible = "brcm,bcm7346-ohci", "generic-ohci";
reg = <0x490400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <75>;
status = "disabled";
};
ehci3: usb@490500 {
compatible = "brcm,bcm7346-ehci", "generic-ehci";
reg = <0x490500 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <74>;
status = "disabled";
};
ohci3: usb@490600 {
compatible = "brcm,bcm7346-ohci", "generic-ohci";
reg = <0x490600 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <76>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7358";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <375000000>;
cpu@0 {
compatible = "brcm,bmips3300";
device_type = "cpu";
reg = <0>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@411400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x411400 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>;
};
sun_l2_intc: sun_l2_intc@403000 {
compatible = "brcm,l2-intc";
reg = <0x403000 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <48>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x2f3>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0",
"rdc_0", "raaga_0",
"avd_0", "jtag_0";
};
upg_irq0_intc: upg_irq0_intc@406600 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406600 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <56>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7358-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
compatible = "brcm,brcmstb-reboot";
syscon = <&sun_top_ctrl 0x304 0x308>;
};
uart0: serial@406800 {
compatible = "ns16550a";
reg = <0x406800 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <61>;
clocks = <&uart_clk>;
status = "disabled";
};
enet0: ethernet@430000 {
phy-mode = "internal";
phy-handle = <&phy1>;
mac-address = [ 00 10 18 36 23 1a ];
compatible = "brcm,genet-v2";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x430000 0x4c8c>;
interrupts = <24>, <25>;
interrupt-parent = <&periph_intc>;
status = "disabled";
mdio@e14 {
compatible = "brcm,genet-mdio-v2";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0xe14 0x8>;
phy1: ethernet-phy@1 {
max-speed = <100>;
reg = <0x1>;
compatible = "brcm,40nm-ephy",
"ethernet-phy-ieee802.3-c22";
};
};
};
ehci0: usb@480300 {
compatible = "brcm,bcm7358-ehci", "generic-ehci";
reg = <0x480300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <65>;
status = "disabled";
};
ohci0: usb@480400 {
compatible = "brcm,bcm7358-ohci", "generic-ohci";
reg = <0x480400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <66>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7360";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <375000000>;
cpu@0 {
compatible = "brcm,bmips3300";
device_type = "cpu";
reg = <0>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@411400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x411400 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>;
};
sun_l2_intc: sun_l2_intc@403000 {
compatible = "brcm,l2-intc";
reg = <0x403000 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <48>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x2f3>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0",
"rdc_0", "raaga_0",
"avd_0", "jtag_0";
};
upg_irq0_intc: upg_irq0_intc@406600 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406600 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <56>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7360-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
compatible = "brcm,brcmstb-reboot";
syscon = <&sun_top_ctrl 0x304 0x308>;
};
uart0: serial@406800 {
compatible = "ns16550a";
reg = <0x406800 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <61>;
clocks = <&uart_clk>;
status = "disabled";
};
enet0: ethernet@430000 {
phy-mode = "internal";
phy-handle = <&phy1>;
mac-address = [ 00 10 18 36 23 1a ];
compatible = "brcm,genet-v2";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x430000 0x4c8c>;
interrupts = <24>, <25>;
interrupt-parent = <&periph_intc>;
status = "disabled";
mdio@e14 {
compatible = "brcm,genet-mdio-v2";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0xe14 0x8>;
phy1: ethernet-phy@1 {
max-speed = <100>;
reg = <0x1>;
compatible = "brcm,40nm-ephy",
"ethernet-phy-ieee802.3-c22";
};
};
};
ehci0: usb@480300 {
compatible = "brcm,bcm7360-ehci", "generic-ehci";
reg = <0x480300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <65>;
status = "disabled";
};
ohci0: usb@480400 {
compatible = "brcm,bcm7360-ohci", "generic-ohci";
reg = <0x480400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <66>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7362";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <375000000>;
cpu@0 {
compatible = "brcm,bmips4380";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips4380";
device_type = "cpu";
reg = <1>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@411400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x411400 0x30>, <0x411600 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>, <3>;
};
sun_l2_intc: sun_l2_intc@403000 {
compatible = "brcm,l2-intc";
reg = <0x403000 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <48>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x2f3>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0",
"rdc_0", "raaga_0",
"avd_0", "jtag_0";
};
upg_irq0_intc: upg_irq0_intc@406600 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406600 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <56>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7362-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
compatible = "brcm,brcmstb-reboot";
syscon = <&sun_top_ctrl 0x304 0x308>;
};
uart0: serial@406800 {
compatible = "ns16550a";
reg = <0x406800 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <61>;
clocks = <&uart_clk>;
status = "disabled";
};
enet0: ethernet@430000 {
phy-mode = "internal";
phy-handle = <&phy1>;
mac-address = [ 00 10 18 36 23 1a ];
compatible = "brcm,genet-v2";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x430000 0x4c8c>;
interrupts = <24>, <25>;
interrupt-parent = <&periph_intc>;
status = "disabled";
mdio@e14 {
compatible = "brcm,genet-mdio-v2";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0xe14 0x8>;
phy1: ethernet-phy@1 {
max-speed = <100>;
reg = <0x1>;
compatible = "brcm,40nm-ephy",
"ethernet-phy-ieee802.3-c22";
};
};
};
ehci0: usb@480300 {
compatible = "brcm,bcm7362-ehci", "generic-ehci";
reg = <0x480300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <65>;
status = "disabled";
};
ohci0: usb@480400 {
compatible = "brcm,bcm7362-ohci", "generic-ohci";
reg = <0x480400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <66>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7420";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <93750000>;
cpu@0 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <1>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@441400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x441400 0x30>, <0x441600 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>, <3>;
};
sun_l2_intc: sun_l2_intc@401800 {
compatible = "brcm,l2-intc";
reg = <0x401800 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <23>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x3ff>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "pci_0",
"pcie_0", "bsp_0", "rdc_0",
"rptd_0", "avd_0", "avd_1",
"jtag_0";
};
upg_irq0_intc: upg_irq0_intc@406780 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406780 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <18>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7420-sun-top-ctrl", "syscon";
reg = <0x404000 0x60c>;
little-endian;
};
reboot {
compatible = "brcm,bcm7038-reboot";
syscon = <&sun_top_ctrl 0x8 0x14>;
};
uart0: serial@406b00 {
compatible = "ns16550a";
reg = <0x406b00 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
interrupt-parent = <&periph_intc>;
interrupts = <21>;
clocks = <&uart_clk>;
status = "disabled";
};
enet0: ethernet@468000 {
phy-mode = "internal";
phy-handle = <&phy1>;
mac-address = [ 00 10 18 36 23 1a ];
compatible = "brcm,genet-v1";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0x468000 0x3c8c>;
interrupts = <69>, <79>;
interrupt-parent = <&periph_intc>;
status = "disabled";
mdio@e14 {
compatible = "brcm,genet-mdio-v1";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0xe14 0x8>;
phy1: ethernet-phy@1 {
max-speed = <100>;
reg = <0x1>;
compatible = "brcm,65nm-ephy",
"ethernet-phy-ieee802.3-c22";
};
};
};
ehci0: usb@488300 {
compatible = "brcm,bcm7420-ehci", "generic-ehci";
reg = <0x488300 0x100>;
interrupt-parent = <&periph_intc>;
interrupts = <60>;
status = "disabled";
};
ohci0: usb@488400 {
compatible = "brcm,bcm7420-ohci", "generic-ohci";
reg = <0x488400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <61>;
status = "disabled";
};
ehci1: usb@488500 {
compatible = "brcm,bcm7420-ehci", "generic-ehci";
reg = <0x488500 0x100>;
interrupt-parent = <&periph_intc>;
interrupts = <55>;
status = "disabled";
};
ohci1: usb@488600 {
compatible = "brcm,bcm7420-ohci", "generic-ohci";
reg = <0x488600 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <62>;
status = "disabled";
};
};
};
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "brcm,bcm7425";
cpus {
#address-cells = <1>;
#size-cells = <0>;
mips-hpt-frequency = <163125000>;
cpu@0 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <0>;
};
cpu@1 {
compatible = "brcm,bmips5000";
device_type = "cpu";
reg = <1>;
};
};
aliases {
uart0 = &uart0;
};
cpu_intc: cpu_intc {
#address-cells = <0>;
compatible = "mti,cpu-interrupt-controller";
interrupt-controller;
#interrupt-cells = <1>;
};
clocks {
uart_clk: uart_clk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <81000000>;
};
};
rdb {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0x10000000 0x01000000>;
periph_intc: periph_intc@41a400 {
compatible = "brcm,bcm7038-l1-intc";
reg = <0x41a400 0x30>, <0x41a600 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpu_intc>;
interrupts = <2>, <3>;
};
sun_l2_intc: sun_l2_intc@403000 {
compatible = "brcm,l2-intc";
reg = <0x403000 0x30>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <47>;
};
gisb-arb@400000 {
compatible = "brcm,bcm7400-gisb-arb";
reg = <0x400000 0xdc>;
native-endian;
interrupt-parent = <&sun_l2_intc>;
interrupts = <0>, <2>;
brcm,gisb-arb-master-mask = <0x177b>;
brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "pcie_0",
"bsp_0", "rdc_0",
"raaga_0", "avd_1",
"jtag_0", "svd_0",
"vice_0";
};
upg_irq0_intc: upg_irq0_intc@406780 {
compatible = "brcm,bcm7120-l2-intc";
reg = <0x406780 0x8>;
brcm,int-map-mask = <0x44>;
brcm,int-fwd-mask = <0x70000>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&periph_intc>;
interrupts = <55>;
};
sun_top_ctrl: syscon@404000 {
compatible = "brcm,bcm7425-sun-top-ctrl", "syscon";
reg = <0x404000 0x51c>;
little-endian;
};
reboot {
compatible = "brcm,brcmstb-reboot";
syscon = <&sun_top_ctrl 0x304 0x308>;
};
uart0: serial@406b00 {
compatible = "ns16550a";
reg = <0x406b00 0x20>;
reg-io-width = <0x4>;
reg-shift = <0x2>;
interrupt-parent = <&periph_intc>;
interrupts = <61>;
clocks = <&uart_clk>;
status = "disabled";
};
enet0: ethernet@b80000 {
phy-mode = "internal";
phy-handle = <&phy1>;
mac-address = [ 00 10 18 36 23 1a ];
compatible = "brcm,genet-v3";
#address-cells = <0x1>;
#size-cells = <0x1>;
reg = <0xb80000 0x11c88>;
interrupts = <17>, <18>;
interrupt-parent = <&periph_intc>;
status = "disabled";
mdio@e14 {
compatible = "brcm,genet-mdio-v3";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0xe14 0x8>;
phy1: ethernet-phy@1 {
max-speed = <100>;
reg = <0x1>;
compatible = "brcm,40nm-ephy",
"ethernet-phy-ieee802.3-c22";
};
};
};
ehci0: usb@480300 {
compatible = "brcm,bcm7425-ehci", "generic-ehci";
reg = <0x480300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <65>;
status = "disabled";
};
ohci0: usb@480400 {
compatible = "brcm,bcm7425-ohci", "generic-ohci";
reg = <0x480400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <67>;
status = "disabled";
};
ehci1: usb@480500 {
compatible = "brcm,bcm7425-ehci", "generic-ehci";
reg = <0x480500 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <66>;
status = "disabled";
};
ohci1: usb@480600 {
compatible = "brcm,bcm7425-ohci", "generic-ohci";
reg = <0x480600 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <68>;
status = "disabled";
};
ehci2: usb@490300 {
compatible = "brcm,bcm7425-ehci", "generic-ehci";
reg = <0x490300 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <70>;
status = "disabled";
};
ohci2: usb@490400 {
compatible = "brcm,bcm7425-ohci", "generic-ohci";
reg = <0x490400 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <72>;
status = "disabled";
};
ehci3: usb@490500 {
compatible = "brcm,bcm7425-ehci", "generic-ehci";
reg = <0x490500 0x100>;
native-endian;
interrupt-parent = <&periph_intc>;
interrupts = <71>;
status = "disabled";
};
ohci3: usb@490600 {
compatible = "brcm,bcm7425-ohci", "generic-ohci";
reg = <0x490600 0x100>;
native-endian;
no-big-frame-no;
interrupt-parent = <&periph_intc>;
interrupts = <73>;
status = "disabled";
};
};
};
/dts-v1/; /dts-v1/;
/include/ "bcm3384.dtsi" /include/ "bcm3384_zephyr.dtsi"
/ { / {
compatible = "brcm,bcm93384wvg", "brcm,bcm3384"; compatible = "brcm,bcm93384wvg", "brcm,bcm3384";
...@@ -10,13 +10,6 @@ chosen { ...@@ -10,13 +10,6 @@ chosen {
bootargs = "console=ttyS0,115200"; bootargs = "console=ttyS0,115200";
stdout-path = &uart0; stdout-path = &uart0;
}; };
memory@0 {
device_type = "memory";
reg = <0x0 0x04000000>;
dma-xor-mask = <0x08000000>;
dma-xor-limit = <0x0fffffff>;
};
}; };
&uart0 { &uart0 {
......
/dts-v1/;
/include/ "bcm3384_viper.dtsi"
/ {
compatible = "brcm,bcm93384wvg-viper", "brcm,bcm3384-viper";
model = "Broadcom BCM93384WVG-viper";
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
/dts-v1/;
/include/ "bcm6368.dtsi"
/ {
compatible = "brcm,bcm96368mvwg", "brcm,bcm6368";
model = "Broadcom BCM96368MVWG";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x04000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
/* FIXME: need to set up USB_CTRL registers first */
&ehci0 {
status = "disabled";
};
&ohci0 {
status = "disabled";
};
/dts-v1/;
/include/ "bcm7125.dtsi"
/ {
compatible = "brcm,bcm97125cbmb", "brcm,bcm7125";
model = "Broadcom BCM97125CBMB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
/* FIXME: USB is wonky; disable it for now */
&ehci0 {
status = "disabled";
};
&ohci0 {
status = "disabled";
};
/dts-v1/;
/include/ "bcm7346.dtsi"
/ {
compatible = "brcm,bcm97346dbsmb", "brcm,bcm7346";
model = "Broadcom BCM97346DBSMB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>, <0x20000000 0x30000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
&enet0 {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&ehci2 {
status = "okay";
};
&ohci2 {
status = "okay";
};
&ehci3 {
status = "okay";
};
&ohci3 {
status = "okay";
};
/dts-v1/;
/include/ "bcm7358.dtsi"
/ {
compatible = "brcm,bcm97358svmb", "brcm,bcm7358";
model = "Broadcom BCM97358SVMB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
&enet0 {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
/dts-v1/;
/include/ "bcm7360.dtsi"
/ {
compatible = "brcm,bcm97360svmb", "brcm,bcm7360";
model = "Broadcom BCM97360SVMB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
&enet0 {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
/dts-v1/;
/include/ "bcm7362.dtsi"
/ {
compatible = "brcm,bcm97362svmb", "brcm,bcm7362";
model = "Broadcom BCM97362SVMB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>, <0x20000000 0x30000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
&enet0 {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
/dts-v1/;
/include/ "bcm7420.dtsi"
/ {
compatible = "brcm,bcm97420c", "brcm,bcm7420";
model = "Broadcom BCM97420C";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>,
<0x20000000 0x30000000>,
<0x60000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
/* FIXME: MAC driver comes up but cannot attach to PHY */
&enet0 {
status = "disabled";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&ohci1 {
status = "okay";
};
/dts-v1/;
/include/ "bcm7425.dtsi"
/ {
compatible = "brcm,bcm97425svmb", "brcm,bcm7425";
model = "Broadcom BCM97425SVMB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>,
<0x20000000 0x30000000>,
<0x90000000 0x40000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
&enet0 {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&ehci2 {
status = "okay";
};
&ohci2 {
status = "okay";
};
&ehci3 {
status = "okay";
};
&ohci3 {
status = "okay";
};
/dts-v1/;
/include/ "bcm6328.dtsi"
/ {
compatible = "brcm,bcm9ejtagprb", "brcm,bcm6328";
model = "Broadcom BCM9EJTAGPRB";
memory@0 {
device_type = "memory";
reg = <0x00000000 0x08000000>;
};
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = &uart0;
};
};
&uart0 {
status = "okay";
};
dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
...@@ -587,4 +587,16 @@ aliases { ...@@ -587,4 +587,16 @@ aliases {
usbn = &usbn; usbn = &usbn;
led0 = &led0; led0 = &led0;
}; };
dsr1000n-leds {
compatible = "gpio-leds";
usb1 {
label = "usb1";
gpios = <&gpio 9 1>; /* Active low */
};
usb2 {
label = "usb2";
gpios = <&gpio 10 1>; /* Active low */
};
};
}; };
dtb-$(CONFIG_DT_EASY50712) += easy50712.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
dtb-$(CONFIG_MIPS_SEAD3) += sead3.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
dtb-$(CONFIG_DT_XLP_EVP) += xlp_evp.dtb
dtb-$(CONFIG_DT_XLP_SVP) += xlp_svp.dtb
dtb-$(CONFIG_DT_XLP_FVP) += xlp_fvp.dtb
dtb-$(CONFIG_DT_XLP_GVP) += xlp_gvp.dtb
dtb-$(CONFIG_DT_XLP_RVP) += xlp_rvp.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
/*
* XLP5XX Device Tree Source for RVP boards
*/
/dts-v1/;
/ {
model = "netlogic,XLP-RVP";
compatible = "netlogic,xlp";
#address-cells = <2>;
#size-cells = <2>;
soc {
#address-cells = <2>;
#size-cells = <1>;
compatible = "simple-bus";
ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG
1 0 0 0x16000000 0x02000000>; // GBU chipselects
serial0: serial@30000 {
device_type = "serial";
compatible = "ns16550";
reg = <0 0x112100 0xa00>;
reg-shift = <2>;
reg-io-width = <4>;
clock-frequency = <125000000>;
interrupt-parent = <&pic>;
interrupts = <17>;
};
pic: pic@110000 {
compatible = "netlogic,xlp-pic";
#address-cells = <0>;
#interrupt-cells = <1>;
reg = <0 0x110000 0x200>;
interrupt-controller;
};
nor_flash@1,0 {
compatible = "cfi-flash";
#address-cells = <1>;
#size-cells = <1>;
bank-width = <2>;
reg = <1 0 0x1000000>;
partition@0 {
label = "x-loader";
reg = <0x0 0x100000>; /* 1M */
read-only;
};
partition@100000 {
label = "u-boot";
reg = <0x100000 0x100000>; /* 1M */
};
partition@200000 {
label = "kernel";
reg = <0x200000 0x500000>; /* 5M */
};
partition@700000 {
label = "rootfs";
reg = <0x700000 0x800000>; /* 8M */
};
partition@f00000 {
label = "env";
reg = <0xf00000 0x100000>; /* 1M */
read-only;
};
};
};
chosen {
bootargs = "console=ttyS0,115200 rdinit=/sbin/init";
};
};
dtb-$(CONFIG_DTB_RT2880_EVAL) += rt2880_eval.dtb
dtb-$(CONFIG_DTB_RT305X_EVAL) += rt3052_eval.dtb
dtb-$(CONFIG_DTB_RT3883_EVAL) += rt3883_eval.dtb
dtb-$(CONFIG_DTB_MT7620A_EVAL) += mt7620a_eval.dtb
obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
# Force kbuild to make empty built-in.o if necessary
obj- += dummy.o
always := $(dtb-y)
clean-files := *.dtb *.dtb.S
...@@ -306,7 +306,7 @@ void __init plat_swiotlb_setup(void) ...@@ -306,7 +306,7 @@ void __init plat_swiotlb_setup(void)
swiotlbsize = 64 * (1<<20); swiotlbsize = 64 * (1<<20);
} }
#endif #endif
#ifdef CONFIG_USB_OCTEON_OHCI #ifdef CONFIG_USB_OHCI_HCD_PLATFORM
/* OCTEON II ohci is only 32-bit. */ /* OCTEON II ohci is only 32-bit. */
if (OCTEON_IS_OCTEON2() && max_addr >= 0x100000000ul) if (OCTEON_IS_OCTEON2() && max_addr >= 0x100000000ul)
swiotlbsize = 64 * (1<<20); swiotlbsize = 64 * (1<<20);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment