Skip to content

Commit

Permalink
Merge tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/greentime/linux

Pull nds32 architecture support from Greentime Hu:
 "This contains the core nds32 Linux port (including interrupt
  controller driver and timer driver), which has been through seven
  rounds of review on mailing list.

  It is able to boot to shell and passes most LTP-2017 testsuites in
  nds32 AE3XX platform:

    Total Tests: 1901
    Total Skipped Tests: 618
    Total Failures: 78"

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

* tag 'nds32-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux: (44 commits)
  nds32: To use the generic dump_stack()
  nds32: fix building failed if using elf toolchain.
  nios2: add ioremap_nocache declaration before include asm-generic/io.h.
  nds32: fix building failed if using older version gcc.
  dt-bindings: timer: Add andestech atcpit100 timer binding doc
  clocksource/drivers/atcpit100: VDSO support
  clocksource/drivers/atcpit100: Add andestech atcpit100 timer
  net: faraday add nds32 support.
  irqchip: Andestech Internal Vector Interrupt Controller driver
  dt-bindings: interrupt-controller: Andestech Internal Vector Interrupt Controller
  dt-bindings: nds32 SoC Bindings
  dt-bindings: nds32 L2 cache controller Bindings
  dt-bindings: nds32 CPU Bindings
  MAINTAINERS: Add nds32
  nds32: Build infrastructure
  nds32: defconfig
  nds32: Miscellaneous header files
  nds32: Device tree support
  nds32: Generic timers support
  nds32: Loadable modules
  ...
  • Loading branch information
Linus Torvalds committed Apr 3, 2018
2 parents 17e3cd2 + 6fc61ee commit c9297d2
Show file tree
Hide file tree
Showing 130 changed files with 11,864 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* Andestech Internal Vector Interrupt Controller

The Internal Vector Interrupt Controller (IVIC) is a basic interrupt controller
suitable for a simpler SoC platform not requiring a more sophisticated and
bigger External Vector Interrupt Controller.


Main node required properties:

- compatible : should at least contain "andestech,ativic32".
- interrupt-controller : Identifies the node as an interrupt controller
- #interrupt-cells: 1 cells and refer to interrupt-controller/interrupts

Examples:
intc: interrupt-controller {
compatible = "andestech,ativic32";
#interrupt-cells = <1>;
interrupt-controller;
};
40 changes: 40 additions & 0 deletions Documentation/devicetree/bindings/nds32/andestech-boards
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Andestech(nds32) AE3XX Platform
-----------------------------------------------------------------------------
The AE3XX prototype demonstrates the AE3XX example platform on the FPGA. It
is composed of one Andestech(nds32) processor and AE3XX.

Required properties (in root node):
- compatible = "andestech,ae3xx";

Example:
/dts-v1/;
/ {
compatible = "andestech,ae3xx";
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
};

Andestech(nds32) AG101P Platform
-----------------------------------------------------------------------------
AG101P is a generic SoC Platform IP that works with any of Andestech(nds32)
processors to provide a cost-effective and high performance solution for
majority of embedded systems in variety of application domains. Users may
simply attach their IP on one of the system buses together with certain glue
logics to complete a SoC solution for a specific application. With
comprehensive simulation and design environments, users may evaluate the
system performance of their applications and track bugs of their designs
efficiently. The optional hardware development platform further provides real
system environment for early prototyping and software/hardware co-development.

Required properties (in root node):
compatible = "andestech,ag101p";

Example:
/dts-v1/;
/ {
compatible = "andestech,ag101p";
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
};
28 changes: 28 additions & 0 deletions Documentation/devicetree/bindings/nds32/atl2c.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
* Andestech L2 cache Controller

The level-2 cache controller plays an important role in reducing memory latency
for high performance systems, such as thoese designs with AndesCore processors.
Level-2 cache controller in general enhances overall system performance
signigicantly and the system power consumption might be reduced as well by
reducing DRAM accesses.

This binding specifies what properties must be available in the device tree
representation of an Andestech L2 cache controller.

Required properties:
- compatible:
Usage: required
Value type: <string>
Definition: "andestech,atl2c"
- reg : Physical base address and size of cache controller's memory mapped
- cache-unified : Specifies the cache is a unified cache.
- cache-level : Should be set to 2 for a level 2 cache.

* Example

cache-controller@e0500000 {
compatible = "andestech,atl2c";
reg = <0xe0500000 0x1000>;
cache-unified;
cache-level = <2>;
};
38 changes: 38 additions & 0 deletions Documentation/devicetree/bindings/nds32/cpus.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
* Andestech Processor Binding

This binding specifies what properties must be available in the device tree
representation of a Andestech Processor Core, which is the root node in the
tree.

Required properties:

- compatible:
Usage: required
Value type: <string>
Definition: Should be "andestech,<core_name>", "andestech,nds32v3" as fallback.
Must contain "andestech,nds32v3" as the most generic value, in addition to
one of the following identifiers for a particular CPU core:
"andestech,n13"
"andestech,n15"
"andestech,d15"
"andestech,n10"
"andestech,d10"
- device_type
Usage: required
Value type: <string>
Definition: must be "cpu"
- reg: Contains CPU index.
- clock-frequency: Contains the clock frequency for CPU, in Hz.

* Examples

/ {
cpus {
cpu@0 {
device_type = "cpu";
compatible = "andestech,n13", "andestech,nds32v3";
reg = <0x0>;
clock-frequency = <60000000>
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Andestech ATCPIT100 timer
------------------------------------------------------------------
ATCPIT100 is a generic IP block from Andes Technology, embedded in
Andestech AE3XX platforms and other designs.

This timer is a set of compact multi-function timers, which can be
used as pulse width modulators (PWM) as well as simple timers.

It supports up to 4 PIT channels. Each PIT channel is a
multi-function timer and provide the following usage scenarios:
One 32-bit timer
Two 16-bit timers
Four 8-bit timers
One 16-bit PWM
One 16-bit timer and one 8-bit PWM
Two 8-bit timer and one 8-bit PWM

Required properties:
- compatible : Should be "andestech,atcpit100"
- reg : Address and length of the register set
- interrupts : Reference to the timer interrupt
- clocks : a clock to provide the tick rate for "andestech,atcpit100"
- clock-names : should be "PCLK" for the peripheral clock source.

Examples:

timer0: timer@f0400000 {
compatible = "andestech,atcpit100";
reg = <0xf0400000 0x1000>;
interrupts = <2>;
clocks = <&apb>;
clock-names = "PCLK";
};
11 changes: 11 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,17 @@ X: drivers/iio/*/adjd*
F: drivers/staging/iio/*/ad*
F: drivers/staging/iio/trigger/iio-trig-bfin-timer.c

ANDES ARCHITECTURE
M: Greentime Hu <green.hu@gmail.com>
M: Vincent Chen <deanbo422@gmail.com>
T: git https://github.com/andestech/linux.git
S: Supported
F: arch/nds32/
F: Documentation/devicetree/bindings/interrupt-controller/andestech,ativic32.txt
F: Documentation/devicetree/bindings/nds32/
K: nds32
N: nds32

ANDROID CONFIG FRAGMENTS
M: Rob Herring <robh@kernel.org>
S: Supported
Expand Down
103 changes: 103 additions & 0 deletions arch/nds32/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#

config NDS32
def_bool y
select ARCH_WANT_FRAME_POINTERS if FTRACE
select CLKSRC_MMIO
select CLONE_BACKWARDS
select COMMON_CLK
select GENERIC_ATOMIC64
select GENERIC_CPU_DEVICES
select GENERIC_CLOCKEVENTS
select GENERIC_IRQ_CHIP
select GENERIC_IRQ_SHOW
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HAVE_ARCH_TRACEHOOK
select HAVE_DEBUG_KMEMLEAK
select HAVE_MEMBLOCK
select HAVE_REGS_AND_STACK_ACCESS_API
select IRQ_DOMAIN
select LOCKDEP_SUPPORT
select MODULES_USE_ELF_RELA
select OF
select OF_EARLY_FLATTREE
select NO_BOOTMEM
select NO_IOPORT_MAP
select RTC_LIB
select THREAD_INFO_IN_TASK
help
Andes(nds32) Linux support.

config GENERIC_CALIBRATE_DELAY
def_bool y

config GENERIC_CSUM
def_bool y

config GENERIC_HWEIGHT
def_bool y

config GENERIC_LOCKBREAK
def_bool y
depends on PREEMPT

config RWSEM_GENERIC_SPINLOCK
def_bool y

config TRACE_IRQFLAGS_SUPPORT
def_bool y

config STACKTRACE_SUPPORT
def_bool y

config FIX_EARLYCON_MEM
def_bool y

config PGTABLE_LEVELS
default 2

source "init/Kconfig"

menu "System Type"
source "arch/nds32/Kconfig.cpu"
config NR_CPUS
int
default 1

config MMU
def_bool y

config NDS32_BUILTIN_DTB
string "Builtin DTB"
default ""
help
User can use it to specify the dts of the SoC
endmenu

menu "Kernel Features"
source "kernel/Kconfig.preempt"
source "mm/Kconfig"
source "kernel/Kconfig.hz"
endmenu

menu "Executable file formats"
source "fs/Kconfig.binfmt"
endmenu

source "net/Kconfig"
source "drivers/Kconfig"
source "fs/Kconfig"

menu "Kernel hacking"
source "lib/Kconfig.debug"
endmenu

source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"
Loading

0 comments on commit c9297d2

Please sign in to comment.