Commit 54c49016 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arc-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC updates from Vineet Gupta:

 - unaligned access support for HS cores

 - Removed extra memory barrier around spinlock code

 - HSDK platform updates: enable dmac, reset

 - some more boot logging updates

 - misc minor fixes

* tag 'arc-5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  arch: arc: Kconfig: pedantic formatting
  ARCv2: spinlock: remove the extra smp_mb before lock, after unlock
  ARC: unaligned: relax the check for gcc supporting -mno-unaligned-access
  ARC: boot log: cut down on verbosity
  ARCv2: boot log: refurbish HS core/release identification
  arc: hsdk_defconfig: Enable CONFIG_BLK_DEV_RAM
  ARC: u-boot args: check that magic number is correct
  ARC: perf: bpok condition only exists for ARCompact
  ARCv2: Add explcit unaligned access support (and ability to disable too)
  ARCv2: lib: introduce memcpy optimized for unaligned access
  ARC: [plat-hsdk]: Enable AXI DW DMAC support
  ARC: [plat-hsdk]: Add reset controller handle to manage USB reset
  ARC: DTB: [scripted] fix node name and address spelling
parents babf09c3 9a18b5a4
...@@ -144,11 +144,11 @@ config ARC_CPU_770 ...@@ -144,11 +144,11 @@ config ARC_CPU_770
Support for ARC770 core introduced with Rel 4.10 (Summer 2011) Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
This core has a bunch of cool new features: This core has a bunch of cool new features:
-MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4) -MMU-v3: Variable Page Sz (4k, 8k, 16k), bigger J-TLB (128x4)
Shared Address Spaces (for sharing TLB entries in MMU) Shared Address Spaces (for sharing TLB entries in MMU)
-Caches: New Prog Model, Region Flush -Caches: New Prog Model, Region Flush
-Insns: endian swap, load-locked/store-conditional, time-stamp-ctr -Insns: endian swap, load-locked/store-conditional, time-stamp-ctr
endif #ISA_ARCOMPACT endif #ISA_ARCOMPACT
config ARC_CPU_HS config ARC_CPU_HS
bool "ARC-HS" bool "ARC-HS"
...@@ -198,7 +198,7 @@ config ARC_SMP_HALT_ON_RESET ...@@ -198,7 +198,7 @@ config ARC_SMP_HALT_ON_RESET
at designated entry point. For other case, all jump to common at designated entry point. For other case, all jump to common
entry point and spin wait for Master's signal. entry point and spin wait for Master's signal.
endif #SMP endif #SMP
config ARC_MCIP config ARC_MCIP
bool "ARConnect Multicore IP (MCIP) Support " bool "ARConnect Multicore IP (MCIP) Support "
...@@ -249,7 +249,7 @@ config ARC_CACHE_VIPT_ALIASING ...@@ -249,7 +249,7 @@ config ARC_CACHE_VIPT_ALIASING
bool "Support VIPT Aliasing D$" bool "Support VIPT Aliasing D$"
depends on ARC_HAS_DCACHE && ISA_ARCOMPACT depends on ARC_HAS_DCACHE && ISA_ARCOMPACT
endif #ARC_CACHE endif #ARC_CACHE
config ARC_HAS_ICCM config ARC_HAS_ICCM
bool "Use ICCM" bool "Use ICCM"
...@@ -370,7 +370,7 @@ config ARC_FPU_SAVE_RESTORE ...@@ -370,7 +370,7 @@ config ARC_FPU_SAVE_RESTORE
based on actual usage of FPU by a task. Thus our implemn does based on actual usage of FPU by a task. Thus our implemn does
this for all tasks in system. this for all tasks in system.
endif #ISA_ARCOMPACT endif #ISA_ARCOMPACT
config ARC_CANT_LLSC config ARC_CANT_LLSC
def_bool n def_bool n
...@@ -386,6 +386,15 @@ config ARC_HAS_SWAPE ...@@ -386,6 +386,15 @@ config ARC_HAS_SWAPE
if ISA_ARCV2 if ISA_ARCV2
config ARC_USE_UNALIGNED_MEM_ACCESS
bool "Enable unaligned access in HW"
default y
select HAVE_EFFICIENT_UNALIGNED_ACCESS
help
The ARC HS architecture supports unaligned memory access
which is disabled by default. Enable unaligned access in
hardware and use software to use it
config ARC_HAS_LL64 config ARC_HAS_LL64
bool "Insn: 64bit LDD/STD" bool "Insn: 64bit LDD/STD"
help help
...@@ -414,7 +423,7 @@ config ARC_IRQ_NO_AUTOSAVE ...@@ -414,7 +423,7 @@ config ARC_IRQ_NO_AUTOSAVE
This is programmable and can be optionally disabled in which case This is programmable and can be optionally disabled in which case
software INTERRUPT_PROLOGUE/EPILGUE do the needed work software INTERRUPT_PROLOGUE/EPILGUE do the needed work
endif # ISA_ARCV2 endif # ISA_ARCV2
endmenu # "ARC CPU Configuration" endmenu # "ARC CPU Configuration"
......
...@@ -28,6 +28,12 @@ cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape ...@@ -28,6 +28,12 @@ cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape
ifdef CONFIG_ISA_ARCV2 ifdef CONFIG_ISA_ARCV2
ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
cflags-y += -munaligned-access
else
cflags-y += -mno-unaligned-access
endif
ifndef CONFIG_ARC_HAS_LL64 ifndef CONFIG_ARC_HAS_LL64
cflags-y += -mno-ll64 cflags-y += -mno-ll64
endif endif
......
...@@ -38,7 +38,7 @@ ahb_clk: clkdiv_ahb { ...@@ -38,7 +38,7 @@ ahb_clk: clkdiv_ahb {
clock-div = <6>; clock-div = <6>;
}; };
iomux: iomux@FF10601c { iomux: iomux@ff10601c {
/* Port 1 */ /* Port 1 */
pctl_tsin_s0: pctl-tsin-s0 { /* Serial TS-in 0 */ pctl_tsin_s0: pctl-tsin-s0 { /* Serial TS-in 0 */
abilis,function = "mis0"; abilis,function = "mis0";
...@@ -162,182 +162,182 @@ pctl_gpio_i: pctl-gpio-i { ...@@ -162,182 +162,182 @@ pctl_gpio_i: pctl-gpio-i {
}; };
}; };
gpioa: gpio@FF140000 { gpioa: gpio@ff140000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF140000 0x1000>; reg = <0xff140000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioa"; gpio-ranges-group-names = "gpioa";
}; };
gpiob: gpio@FF141000 { gpiob: gpio@ff141000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF141000 0x1000>; reg = <0xff141000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiob"; gpio-ranges-group-names = "gpiob";
}; };
gpioc: gpio@FF142000 { gpioc: gpio@ff142000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF142000 0x1000>; reg = <0xff142000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioc"; gpio-ranges-group-names = "gpioc";
}; };
gpiod: gpio@FF143000 { gpiod: gpio@ff143000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF143000 0x1000>; reg = <0xff143000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiod"; gpio-ranges-group-names = "gpiod";
}; };
gpioe: gpio@FF144000 { gpioe: gpio@ff144000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF144000 0x1000>; reg = <0xff144000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioe"; gpio-ranges-group-names = "gpioe";
}; };
gpiof: gpio@FF145000 { gpiof: gpio@ff145000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF145000 0x1000>; reg = <0xff145000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiof"; gpio-ranges-group-names = "gpiof";
}; };
gpiog: gpio@FF146000 { gpiog: gpio@ff146000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF146000 0x1000>; reg = <0xff146000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiog"; gpio-ranges-group-names = "gpiog";
}; };
gpioh: gpio@FF147000 { gpioh: gpio@ff147000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF147000 0x1000>; reg = <0xff147000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioh"; gpio-ranges-group-names = "gpioh";
}; };
gpioi: gpio@FF148000 { gpioi: gpio@ff148000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF148000 0x1000>; reg = <0xff148000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <12>; abilis,ngpio = <12>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioi"; gpio-ranges-group-names = "gpioi";
}; };
gpioj: gpio@FF149000 { gpioj: gpio@ff149000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF149000 0x1000>; reg = <0xff149000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <32>; abilis,ngpio = <32>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioj"; gpio-ranges-group-names = "gpioj";
}; };
gpiok: gpio@FF14a000 { gpiok: gpio@ff14a000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14A000 0x1000>; reg = <0xff14a000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <22>; abilis,ngpio = <22>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiok"; gpio-ranges-group-names = "gpiok";
}; };
gpiol: gpio@FF14b000 { gpiol: gpio@ff14b000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14B000 0x1000>; reg = <0xff14b000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <4>; abilis,ngpio = <4>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiol"; gpio-ranges-group-names = "gpiol";
}; };
gpiom: gpio@FF14c000 { gpiom: gpio@ff14c000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14C000 0x1000>; reg = <0xff14c000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <4>; abilis,ngpio = <4>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiom"; gpio-ranges-group-names = "gpiom";
}; };
gpion: gpio@FF14d000 { gpion: gpio@ff14d000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14D000 0x1000>; reg = <0xff14d000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <5>; abilis,ngpio = <5>;
......
...@@ -37,27 +37,27 @@ memory { ...@@ -37,27 +37,27 @@ memory {
}; };
soc100 { soc100 {
uart@FF100000 { uart@ff100000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pctl_uart0>; pinctrl-0 = <&pctl_uart0>;
}; };
ethernet@FE100000 { ethernet@fe100000 {
phy-mode = "rgmii"; phy-mode = "rgmii";
}; };
i2c0: i2c@FF120000 { i2c0: i2c@ff120000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c1: i2c@FF121000 { i2c1: i2c@ff121000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c2: i2c@FF122000 { i2c2: i2c@ff122000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c3: i2c@FF123000 { i2c3: i2c@ff123000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c4: i2c@FF124000 { i2c4: i2c@ff124000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
......
...@@ -38,7 +38,7 @@ ahb_clk: clkdiv_ahb { ...@@ -38,7 +38,7 @@ ahb_clk: clkdiv_ahb {
clock-div = <6>; clock-div = <6>;
}; };
iomux: iomux@FF10601c { iomux: iomux@ff10601c {
/* Port 1 */ /* Port 1 */
pctl_tsin_s0: pctl-tsin-s0 { /* Serial TS-in 0 */ pctl_tsin_s0: pctl-tsin-s0 { /* Serial TS-in 0 */
abilis,function = "mis0"; abilis,function = "mis0";
...@@ -171,182 +171,182 @@ pctl_gpio_i: pctl-gpio-i { ...@@ -171,182 +171,182 @@ pctl_gpio_i: pctl-gpio-i {
}; };
}; };
gpioa: gpio@FF140000 { gpioa: gpio@ff140000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF140000 0x1000>; reg = <0xff140000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioa"; gpio-ranges-group-names = "gpioa";
}; };
gpiob: gpio@FF141000 { gpiob: gpio@ff141000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF141000 0x1000>; reg = <0xff141000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiob"; gpio-ranges-group-names = "gpiob";
}; };
gpioc: gpio@FF142000 { gpioc: gpio@ff142000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF142000 0x1000>; reg = <0xff142000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioc"; gpio-ranges-group-names = "gpioc";
}; };
gpiod: gpio@FF143000 { gpiod: gpio@ff143000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF143000 0x1000>; reg = <0xff143000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiod"; gpio-ranges-group-names = "gpiod";
}; };
gpioe: gpio@FF144000 { gpioe: gpio@ff144000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF144000 0x1000>; reg = <0xff144000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioe"; gpio-ranges-group-names = "gpioe";
}; };
gpiof: gpio@FF145000 { gpiof: gpio@ff145000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF145000 0x1000>; reg = <0xff145000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiof"; gpio-ranges-group-names = "gpiof";
}; };
gpiog: gpio@FF146000 { gpiog: gpio@ff146000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF146000 0x1000>; reg = <0xff146000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <3>; abilis,ngpio = <3>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiog"; gpio-ranges-group-names = "gpiog";
}; };
gpioh: gpio@FF147000 { gpioh: gpio@ff147000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF147000 0x1000>; reg = <0xff147000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <2>; abilis,ngpio = <2>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioh"; gpio-ranges-group-names = "gpioh";
}; };
gpioi: gpio@FF148000 { gpioi: gpio@ff148000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF148000 0x1000>; reg = <0xff148000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <12>; abilis,ngpio = <12>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioi"; gpio-ranges-group-names = "gpioi";
}; };
gpioj: gpio@FF149000 { gpioj: gpio@ff149000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF149000 0x1000>; reg = <0xff149000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <32>; abilis,ngpio = <32>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpioj"; gpio-ranges-group-names = "gpioj";
}; };
gpiok: gpio@FF14a000 { gpiok: gpio@ff14a000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14A000 0x1000>; reg = <0xff14a000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <22>; abilis,ngpio = <22>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiok"; gpio-ranges-group-names = "gpiok";
}; };
gpiol: gpio@FF14b000 { gpiol: gpio@ff14b000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14B000 0x1000>; reg = <0xff14b000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <4>; abilis,ngpio = <4>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiol"; gpio-ranges-group-names = "gpiol";
}; };
gpiom: gpio@FF14c000 { gpiom: gpio@ff14c000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14C000 0x1000>; reg = <0xff14c000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <4>; abilis,ngpio = <4>;
gpio-ranges = <&iomux 0 0 0>; gpio-ranges = <&iomux 0 0 0>;
gpio-ranges-group-names = "gpiom"; gpio-ranges-group-names = "gpiom";
}; };
gpion: gpio@FF14d000 { gpion: gpio@ff14d000 {
compatible = "abilis,tb10x-gpio"; compatible = "abilis,tb10x-gpio";
interrupt-controller; interrupt-controller;
#interrupt-cells = <1>; #interrupt-cells = <1>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <27 2>; interrupts = <27 2>;
reg = <0xFF14D000 0x1000>; reg = <0xff14d000 0x1000>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
abilis,ngpio = <5>; abilis,ngpio = <5>;
......
...@@ -37,27 +37,27 @@ memory { ...@@ -37,27 +37,27 @@ memory {
}; };
soc100 { soc100 {
uart@FF100000 { uart@ff100000 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pctl_uart0>; pinctrl-0 = <&pctl_uart0>;
}; };
ethernet@FE100000 { ethernet@fe100000 {
phy-mode = "rgmii"; phy-mode = "rgmii";
}; };
i2c0: i2c@FF120000 { i2c0: i2c@ff120000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c1: i2c@FF121000 { i2c1: i2c@ff121000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c2: i2c@FF122000 { i2c2: i2c@ff122000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c3: i2c@FF123000 { i2c3: i2c@ff123000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
i2c4: i2c@FF124000 { i2c4: i2c@ff124000 {
i2c-sda-hold-time-ns = <432>; i2c-sda-hold-time-ns = <432>;
}; };
......
...@@ -54,7 +54,7 @@ soc100 { ...@@ -54,7 +54,7 @@ soc100 {
#size-cells = <1>; #size-cells = <1>;
device_type = "soc"; device_type = "soc";
ranges = <0xfe000000 0xfe000000 0x02000000 ranges = <0xfe000000 0xfe000000 0x02000000
0x000F0000 0x000F0000 0x00010000>; 0x000f0000 0x000f0000 0x00010000>;
compatible = "abilis,tb10x", "simple-bus"; compatible = "abilis,tb10x", "simple-bus";
pll0: oscillator { pll0: oscillator {
...@@ -75,10 +75,10 @@ ahb_clk: clkdiv_ahb { ...@@ -75,10 +75,10 @@ ahb_clk: clkdiv_ahb {
clock-output-names = "ahb_clk"; clock-output-names = "ahb_clk";
}; };
iomux: iomux@FF10601c { iomux: iomux@ff10601c {
compatible = "abilis,tb10x-iomux"; compatible = "abilis,tb10x-iomux";
#gpio-range-cells = <3>; #gpio-range-cells = <3>;
reg = <0xFF10601c 0x4>; reg = <0xff10601c 0x4>;
}; };
intc: interrupt-controller { intc: interrupt-controller {
...@@ -88,7 +88,7 @@ intc: interrupt-controller { ...@@ -88,7 +88,7 @@ intc: interrupt-controller {
}; };
tb10x_ictl: pic@fe002000 { tb10x_ictl: pic@fe002000 {
compatible = "abilis,tb10x-ictl"; compatible = "abilis,tb10x-ictl";
reg = <0xFE002000 0x20>; reg = <0xfe002000 0x20>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
...@@ -96,27 +96,27 @@ tb10x_ictl: pic@fe002000 { ...@@ -96,27 +96,27 @@ tb10x_ictl: pic@fe002000 {
20 21 22 23 24 25 26 27 28 29 30 31>; 20 21 22 23 24 25 26 27 28 29 30 31>;
}; };
uart@FF100000 { uart@ff100000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0xFF100000 0x100>; reg = <0xff100000 0x100>;
clock-frequency = <166666666>; clock-frequency = <166666666>;
interrupts = <25 8>; interrupts = <25 8>;
reg-shift = <2>; reg-shift = <2>;
reg-io-width = <4>; reg-io-width = <4>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
}; };
ethernet@FE100000 { ethernet@fe100000 {
compatible = "snps,dwmac-3.70a","snps,dwmac"; compatible = "snps,dwmac-3.70a","snps,dwmac";
reg = <0xFE100000 0x1058>; reg = <0xfe100000 0x1058>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <6 8>; interrupts = <6 8>;
interrupt-names = "macirq"; interrupt-names = "macirq";
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
clock-names = "stmmaceth"; clock-names = "stmmaceth";
}; };
dma@FE000000 { dma@fe000000 {
compatible = "snps,dma-spear1340"; compatible = "snps,dma-spear1340";
reg = <0xFE000000 0x400>; reg = <0xfe000000 0x400>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <14 8>; interrupts = <14 8>;
dma-channels = <6>; dma-channels = <6>;
...@@ -132,70 +132,70 @@ dma@FE000000 { ...@@ -132,70 +132,70 @@ dma@FE000000 {
multi-block = <1 1 1 1 1 1>; multi-block = <1 1 1 1 1 1>;
}; };
i2c0: i2c@FF120000 { i2c0: i2c@ff120000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
reg = <0xFF120000 0x1000>; reg = <0xff120000 0x1000>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <12 8>; interrupts = <12 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
}; };
i2c1: i2c@FF121000 { i2c1: i2c@ff121000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
reg = <0xFF121000 0x1000>; reg = <0xff121000 0x1000>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <12 8>; interrupts = <12 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
}; };
i2c2: i2c@FF122000 { i2c2: i2c@ff122000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
reg = <0xFF122000 0x1000>; reg = <0xff122000 0x1000>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <12 8>; interrupts = <12 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
}; };
i2c3: i2c@FF123000 { i2c3: i2c@ff123000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
reg = <0xFF123000 0x1000>; reg = <0xff123000 0x1000>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <12 8>; interrupts = <12 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
}; };
i2c4: i2c@FF124000 { i2c4: i2c@ff124000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
reg = <0xFF124000 0x1000>; reg = <0xff124000 0x1000>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <12 8>; interrupts = <12 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
}; };
spi0: spi@0xFE010000 { spi0: spi@fe010000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cell-index = <0>; cell-index = <0>;
compatible = "abilis,tb100-spi"; compatible = "abilis,tb100-spi";
num-cs = <1>; num-cs = <1>;
reg = <0xFE010000 0x20>; reg = <0xfe010000 0x20>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <26 8>; interrupts = <26 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
}; };
spi1: spi@0xFE011000 { spi1: spi@fe011000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cell-index = <1>; cell-index = <1>;
compatible = "abilis,tb100-spi"; compatible = "abilis,tb100-spi";
num-cs = <2>; num-cs = <2>;
reg = <0xFE011000 0x20>; reg = <0xfe011000 0x20>;
interrupt-parent = <&tb10x_ictl>; interrupt-parent = <&tb10x_ictl>;
interrupts = <10 8>; interrupts = <10 8>;
clocks = <&ahb_clk>; clocks = <&ahb_clk>;
...@@ -226,23 +226,23 @@ tb10x_stream_proc: tb10x-stream-proc { ...@@ -226,23 +226,23 @@ tb10x_stream_proc: tb10x-stream-proc {
interrupts = <20 2>, <19 2>; interrupts = <20 2>, <19 2>;
interrupt-names = "cmd_irq", "event_irq"; interrupt-names = "cmd_irq", "event_irq";
}; };
tb10x_mdsc0: tb10x-mdscr@FF300000 { tb10x_mdsc0: tb10x-mdscr@ff300000 {
compatible = "abilis,tb100-mdscr"; compatible = "abilis,tb100-mdscr";
reg = <0xFF300000 0x7000>; reg = <0xff300000 0x7000>;
tb100-mdscr-manage-tsin; tb100-mdscr-manage-tsin;
}; };
tb10x_mscr0: tb10x-mdscr@FF307000 { tb10x_mscr0: tb10x-mdscr@ff307000 {
compatible = "abilis,tb100-mdscr"; compatible = "abilis,tb100-mdscr";
reg = <0xFF307000 0x7000>; reg = <0xff307000 0x7000>;
}; };
tb10x_scr0: tb10x-mdscr@ff30e000 { tb10x_scr0: tb10x-mdscr@ff30e000 {
compatible = "abilis,tb100-mdscr"; compatible = "abilis,tb100-mdscr";
reg = <0xFF30e000 0x4000>; reg = <0xff30e000 0x4000>;
tb100-mdscr-manage-tsin; tb100-mdscr-manage-tsin;
}; };
tb10x_scr1: tb10x-mdscr@ff312000 { tb10x_scr1: tb10x-mdscr@ff312000 {
compatible = "abilis,tb100-mdscr"; compatible = "abilis,tb100-mdscr";
reg = <0xFF312000 0x4000>; reg = <0xff312000 0x4000>;
tb100-mdscr-manage-tsin; tb100-mdscr-manage-tsin;
}; };
tb10x_wfb: tb10x-wfb@ff319000 { tb10x_wfb: tb10x-wfb@ff319000 {
......
...@@ -41,7 +41,7 @@ core_intc: arc700-intc@cpu { ...@@ -41,7 +41,7 @@ core_intc: arc700-intc@cpu {
* this GPIO block ORs all interrupts on CPU card (creg,..) * this GPIO block ORs all interrupts on CPU card (creg,..)
* to uplink only 1 IRQ to ARC core intc * to uplink only 1 IRQ to ARC core intc
*/ */
dw-apb-gpio@0x2000 { dw-apb-gpio@2000 {
compatible = "snps,dw-apb-gpio"; compatible = "snps,dw-apb-gpio";
reg = < 0x2000 0x80 >; reg = < 0x2000 0x80 >;
#address-cells = <1>; #address-cells = <1>;
...@@ -60,7 +60,7 @@ ictl_intc: gpio-controller@0 { ...@@ -60,7 +60,7 @@ ictl_intc: gpio-controller@0 {
}; };
}; };
debug_uart: dw-apb-uart@0x5000 { debug_uart: dw-apb-uart@5000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x5000 0x100>; reg = <0x5000 0x100>;
clock-frequency = <33333000>; clock-frequency = <33333000>;
...@@ -88,7 +88,7 @@ arcpct0: pct { ...@@ -88,7 +88,7 @@ arcpct0: pct {
* avoid duplicating the MB dtsi file given that IRQ from * avoid duplicating the MB dtsi file given that IRQ from
* this intc to cpu intc are different for axs101 and axs103 * this intc to cpu intc are different for axs101 and axs103
*/ */
mb_intc: dw-apb-ictl@0xe0012000 { mb_intc: dw-apb-ictl@e0012000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dw-apb-ictl"; compatible = "snps,dw-apb-ictl";
reg = < 0x0 0xe0012000 0x0 0x200 >; reg = < 0x0 0xe0012000 0x0 0x200 >;
......
...@@ -55,7 +55,7 @@ core_intc: archs-intc@cpu { ...@@ -55,7 +55,7 @@ core_intc: archs-intc@cpu {
* this GPIO block ORs all interrupts on CPU card (creg,..) * this GPIO block ORs all interrupts on CPU card (creg,..)
* to uplink only 1 IRQ to ARC core intc * to uplink only 1 IRQ to ARC core intc
*/ */
dw-apb-gpio@0x2000 { dw-apb-gpio@2000 {
compatible = "snps,dw-apb-gpio"; compatible = "snps,dw-apb-gpio";
reg = < 0x2000 0x80 >; reg = < 0x2000 0x80 >;
#address-cells = <1>; #address-cells = <1>;
...@@ -74,7 +74,7 @@ ictl_intc: gpio-controller@0 { ...@@ -74,7 +74,7 @@ ictl_intc: gpio-controller@0 {
}; };
}; };
debug_uart: dw-apb-uart@0x5000 { debug_uart: dw-apb-uart@5000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x5000 0x100>; reg = <0x5000 0x100>;
clock-frequency = <33333000>; clock-frequency = <33333000>;
...@@ -102,19 +102,19 @@ arcpct0: pct { ...@@ -102,19 +102,19 @@ arcpct0: pct {
* external DMA buffer located outside of IOC aperture. * external DMA buffer located outside of IOC aperture.
*/ */
axs10x_mb { axs10x_mb {
ethernet@0x18000 { ethernet@18000 {
dma-coherent; dma-coherent;
}; };
ehci@0x40000 { ehci@40000 {
dma-coherent; dma-coherent;
}; };
ohci@0x60000 { ohci@60000 {
dma-coherent; dma-coherent;
}; };
mmc@0x15000 { mmc@15000 {
dma-coherent; dma-coherent;
}; };
}; };
...@@ -132,7 +132,7 @@ mmc@0x15000 { ...@@ -132,7 +132,7 @@ mmc@0x15000 {
* avoid duplicating the MB dtsi file given that IRQ from * avoid duplicating the MB dtsi file given that IRQ from
* this intc to cpu intc are different for axs101 and axs103 * this intc to cpu intc are different for axs101 and axs103
*/ */
mb_intc: dw-apb-ictl@0xe0012000 { mb_intc: dw-apb-ictl@e0012000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dw-apb-ictl"; compatible = "snps,dw-apb-ictl";
reg = < 0x0 0xe0012000 0x0 0x200 >; reg = < 0x0 0xe0012000 0x0 0x200 >;
...@@ -153,7 +153,7 @@ reserved-memory { ...@@ -153,7 +153,7 @@ reserved-memory {
#size-cells = <2>; #size-cells = <2>;
ranges; ranges;
/* /*
* Move frame buffer out of IOC aperture (0x8z-0xAz). * Move frame buffer out of IOC aperture (0x8z-0xaz).
*/ */
frame_buffer: frame_buffer@be000000 { frame_buffer: frame_buffer@be000000 {
compatible = "shared-dma-pool"; compatible = "shared-dma-pool";
......
...@@ -62,7 +62,7 @@ idu_intc: idu-interrupt-controller { ...@@ -62,7 +62,7 @@ idu_intc: idu-interrupt-controller {
* this GPIO block ORs all interrupts on CPU card (creg,..) * this GPIO block ORs all interrupts on CPU card (creg,..)
* to uplink only 1 IRQ to ARC core intc * to uplink only 1 IRQ to ARC core intc
*/ */
dw-apb-gpio@0x2000 { dw-apb-gpio@2000 {
compatible = "snps,dw-apb-gpio"; compatible = "snps,dw-apb-gpio";
reg = < 0x2000 0x80 >; reg = < 0x2000 0x80 >;
#address-cells = <1>; #address-cells = <1>;
...@@ -81,7 +81,7 @@ ictl_intc: gpio-controller@0 { ...@@ -81,7 +81,7 @@ ictl_intc: gpio-controller@0 {
}; };
}; };
debug_uart: dw-apb-uart@0x5000 { debug_uart: dw-apb-uart@5000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x5000 0x100>; reg = <0x5000 0x100>;
clock-frequency = <33333000>; clock-frequency = <33333000>;
...@@ -109,19 +109,19 @@ arcpct0: pct { ...@@ -109,19 +109,19 @@ arcpct0: pct {
* external DMA buffer located outside of IOC aperture. * external DMA buffer located outside of IOC aperture.
*/ */
axs10x_mb { axs10x_mb {
ethernet@0x18000 { ethernet@18000 {
dma-coherent; dma-coherent;
}; };
ehci@0x40000 { ehci@40000 {
dma-coherent; dma-coherent;
}; };
ohci@0x60000 { ohci@60000 {
dma-coherent; dma-coherent;
}; };
mmc@0x15000 { mmc@15000 {
dma-coherent; dma-coherent;
}; };
}; };
...@@ -138,7 +138,7 @@ mmc@0x15000 { ...@@ -138,7 +138,7 @@ mmc@0x15000 {
* avoid duplicating the MB dtsi file given that IRQ from * avoid duplicating the MB dtsi file given that IRQ from
* this intc to cpu intc are different for axs101 and axs103 * this intc to cpu intc are different for axs101 and axs103
*/ */
mb_intc: dw-apb-ictl@0xe0012000 { mb_intc: dw-apb-ictl@e0012000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dw-apb-ictl"; compatible = "snps,dw-apb-ictl";
reg = < 0x0 0xe0012000 0x0 0x200 >; reg = < 0x0 0xe0012000 0x0 0x200 >;
...@@ -159,7 +159,7 @@ reserved-memory { ...@@ -159,7 +159,7 @@ reserved-memory {
#size-cells = <2>; #size-cells = <2>;
ranges; ranges;
/* /*
* Move frame buffer out of IOC aperture (0x8z-0xAz). * Move frame buffer out of IOC aperture (0x8z-0xaz).
*/ */
frame_buffer: frame_buffer@be000000 { frame_buffer: frame_buffer@be000000 {
compatible = "shared-dma-pool"; compatible = "shared-dma-pool";
......
...@@ -72,7 +72,7 @@ pguclk: pguclk { ...@@ -72,7 +72,7 @@ pguclk: pguclk {
}; };
}; };
gmac: ethernet@0x18000 { gmac: ethernet@18000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dwmac"; compatible = "snps,dwmac";
reg = < 0x18000 0x2000 >; reg = < 0x18000 0x2000 >;
...@@ -88,13 +88,13 @@ gmac: ethernet@0x18000 { ...@@ -88,13 +88,13 @@ gmac: ethernet@0x18000 {
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */ mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
}; };
ehci@0x40000 { ehci@40000 {
compatible = "generic-ehci"; compatible = "generic-ehci";
reg = < 0x40000 0x100 >; reg = < 0x40000 0x100 >;
interrupts = < 8 >; interrupts = < 8 >;
}; };
ohci@0x60000 { ohci@60000 {
compatible = "generic-ohci"; compatible = "generic-ohci";
reg = < 0x60000 0x100 >; reg = < 0x60000 0x100 >;
interrupts = < 8 >; interrupts = < 8 >;
...@@ -118,7 +118,7 @@ ohci@0x60000 { ...@@ -118,7 +118,7 @@ ohci@0x60000 {
* dw_mci_pltfm_prepare_command() is used in generic platform * dw_mci_pltfm_prepare_command() is used in generic platform
* code. * code.
*/ */
mmc@0x15000 { mmc@15000 {
compatible = "altr,socfpga-dw-mshc"; compatible = "altr,socfpga-dw-mshc";
reg = < 0x15000 0x400 >; reg = < 0x15000 0x400 >;
fifo-depth = < 16 >; fifo-depth = < 16 >;
...@@ -129,7 +129,7 @@ mmc@0x15000 { ...@@ -129,7 +129,7 @@ mmc@0x15000 {
bus-width = < 4 >; bus-width = < 4 >;
}; };
uart@0x20000 { uart@20000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x20000 0x100>; reg = <0x20000 0x100>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
...@@ -139,7 +139,7 @@ uart@0x20000 { ...@@ -139,7 +139,7 @@ uart@0x20000 {
reg-io-width = <4>; reg-io-width = <4>;
}; };
uart@0x21000 { uart@21000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x21000 0x100>; reg = <0x21000 0x100>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
...@@ -150,7 +150,7 @@ uart@0x21000 { ...@@ -150,7 +150,7 @@ uart@0x21000 {
}; };
/* UART muxed with USB data port (ttyS3) */ /* UART muxed with USB data port (ttyS3) */
uart@0x22000 { uart@22000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x22000 0x100>; reg = <0x22000 0x100>;
clock-frequency = <33333333>; clock-frequency = <33333333>;
...@@ -160,7 +160,7 @@ uart@0x22000 { ...@@ -160,7 +160,7 @@ uart@0x22000 {
reg-io-width = <4>; reg-io-width = <4>;
}; };
i2c@0x1d000 { i2c@1d000 {
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
reg = <0x1d000 0x100>; reg = <0x1d000 0x100>;
clock-frequency = <400000>; clock-frequency = <400000>;
...@@ -177,7 +177,7 @@ i2s: i2s@1e000 { ...@@ -177,7 +177,7 @@ i2s: i2s@1e000 {
#sound-dai-cells = <0>; #sound-dai-cells = <0>;
}; };
i2c@0x1f000 { i2c@1f000 {
compatible = "snps,designware-i2c"; compatible = "snps,designware-i2c";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
...@@ -218,13 +218,13 @@ adv7511_output: endpoint { ...@@ -218,13 +218,13 @@ adv7511_output: endpoint {
}; };
}; };
eeprom@0x54{ eeprom@54{
compatible = "atmel,24c01"; compatible = "atmel,24c01";
reg = <0x54>; reg = <0x54>;
pagesize = <0x8>; pagesize = <0x8>;
}; };
eeprom@0x57{ eeprom@57{
compatible = "atmel,24c04"; compatible = "atmel,24c04";
reg = <0x57>; reg = <0x57>;
pagesize = <0x8>; pagesize = <0x8>;
......
...@@ -110,12 +110,12 @@ soc { ...@@ -110,12 +110,12 @@ soc {
cgu_rst: reset-controller@8a0 { cgu_rst: reset-controller@8a0 {
compatible = "snps,hsdk-reset"; compatible = "snps,hsdk-reset";
#reset-cells = <1>; #reset-cells = <1>;
reg = <0x8A0 0x4>, <0xFF0 0x4>; reg = <0x8a0 0x4>, <0xff0 0x4>;
}; };
core_clk: core-clk@0 { core_clk: core-clk@0 {
compatible = "snps,hsdk-core-pll-clock"; compatible = "snps,hsdk-core-pll-clock";
reg = <0x00 0x10>, <0x14B8 0x4>; reg = <0x00 0x10>, <0x14b8 0x4>;
#clock-cells = <0>; #clock-cells = <0>;
clocks = <&input_clk>; clocks = <&input_clk>;
...@@ -167,6 +167,18 @@ mmcclk_biu: mmcclk-biu { ...@@ -167,6 +167,18 @@ mmcclk_biu: mmcclk-biu {
#clock-cells = <0>; #clock-cells = <0>;
}; };
dmac_core_clk: dmac-core-clk {
compatible = "fixed-clock";
clock-frequency = <400000000>;
#clock-cells = <0>;
};
dmac_cfg_clk: dmac-gpu-cfg-clk {
compatible = "fixed-clock";
clock-frequency = <200000000>;
#clock-cells = <0>;
};
gmac: ethernet@8000 { gmac: ethernet@8000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dwmac"; compatible = "snps,dwmac";
...@@ -200,6 +212,7 @@ ohci@60000 { ...@@ -200,6 +212,7 @@ ohci@60000 {
compatible = "snps,hsdk-v1.0-ohci", "generic-ohci"; compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
reg = <0x60000 0x100>; reg = <0x60000 0x100>;
interrupts = <15>; interrupts = <15>;
resets = <&cgu_rst HSDK_USB_RESET>;
dma-coherent; dma-coherent;
}; };
...@@ -207,6 +220,7 @@ ehci@40000 { ...@@ -207,6 +220,7 @@ ehci@40000 {
compatible = "snps,hsdk-v1.0-ehci", "generic-ehci"; compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
reg = <0x40000 0x100>; reg = <0x40000 0x100>;
interrupts = <15>; interrupts = <15>;
resets = <&cgu_rst HSDK_USB_RESET>;
dma-coherent; dma-coherent;
}; };
...@@ -237,6 +251,21 @@ gpio_port_a: gpio-controller@0 { ...@@ -237,6 +251,21 @@ gpio_port_a: gpio-controller@0 {
reg = <0>; reg = <0>;
}; };
}; };
dmac: dmac@80000 {
compatible = "snps,axi-dma-1.01a";
reg = <0x80000 0x400>;
interrupts = <27>;
clocks = <&dmac_core_clk>, <&dmac_cfg_clk>;
clock-names = "core-clk", "cfgr-clk";
dma-channels = <4>;
snps,dma-masters = <2>;
snps,data-width = <3>;
snps,block-size = <4096 4096 4096 4096>;
snps,priority = <0 1 2 3>;
snps,axi-max-burst-len = <16>;
};
}; };
memory@80000000 { memory@80000000 {
......
...@@ -36,7 +36,7 @@ core_intc: archs-intc@cpu { ...@@ -36,7 +36,7 @@ core_intc: archs-intc@cpu {
#interrupt-cells = <1>; #interrupt-cells = <1>;
}; };
debug_uart: dw-apb-uart@0x5000 { debug_uart: dw-apb-uart@5000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x5000 0x100>; reg = <0x5000 0x100>;
clock-frequency = <2403200>; clock-frequency = <2403200>;
...@@ -49,7 +49,7 @@ debug_uart: dw-apb-uart@0x5000 { ...@@ -49,7 +49,7 @@ debug_uart: dw-apb-uart@0x5000 {
}; };
mb_intc: dw-apb-ictl@0xe0012000 { mb_intc: dw-apb-ictl@e0012000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dw-apb-ictl"; compatible = "snps,dw-apb-ictl";
reg = < 0xe0012000 0x200 >; reg = < 0xe0012000 0x200 >;
......
...@@ -44,7 +44,7 @@ idu_intc: idu-interrupt-controller { ...@@ -44,7 +44,7 @@ idu_intc: idu-interrupt-controller {
#interrupt-cells = <1>; #interrupt-cells = <1>;
}; };
debug_uart: dw-apb-uart@0x5000 { debug_uart: dw-apb-uart@5000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x5000 0x100>; reg = <0x5000 0x100>;
clock-frequency = <2403200>; clock-frequency = <2403200>;
...@@ -57,7 +57,7 @@ debug_uart: dw-apb-uart@0x5000 { ...@@ -57,7 +57,7 @@ debug_uart: dw-apb-uart@0x5000 {
}; };
mb_intc: dw-apb-ictl@0xe0012000 { mb_intc: dw-apb-ictl@e0012000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dw-apb-ictl"; compatible = "snps,dw-apb-ictl";
reg = < 0xe0012000 0x200 >; reg = < 0xe0012000 0x200 >;
......
...@@ -36,7 +36,7 @@ pguclk: pguclk { ...@@ -36,7 +36,7 @@ pguclk: pguclk {
}; };
}; };
ethernet@0x18000 { ethernet@18000 {
#interrupt-cells = <1>; #interrupt-cells = <1>;
compatible = "snps,dwmac"; compatible = "snps,dwmac";
reg = < 0x18000 0x2000 >; reg = < 0x18000 0x2000 >;
...@@ -49,13 +49,13 @@ ethernet@0x18000 { ...@@ -49,13 +49,13 @@ ethernet@0x18000 {
clock-names = "stmmaceth"; clock-names = "stmmaceth";
}; };
ehci@0x40000 { ehci@40000 {
compatible = "generic-ehci"; compatible = "generic-ehci";
reg = < 0x40000 0x100 >; reg = < 0x40000 0x100 >;
interrupts = < 8 >; interrupts = < 8 >;
}; };
uart@0x20000 { uart@20000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x20000 0x100>; reg = <0x20000 0x100>;
clock-frequency = <2403200>; clock-frequency = <2403200>;
...@@ -65,7 +65,7 @@ uart@0x20000 { ...@@ -65,7 +65,7 @@ uart@0x20000 {
reg-io-width = <4>; reg-io-width = <4>;
}; };
uart@0x21000 { uart@21000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x21000 0x100>; reg = <0x21000 0x100>;
clock-frequency = <2403200>; clock-frequency = <2403200>;
...@@ -75,7 +75,7 @@ uart@0x21000 { ...@@ -75,7 +75,7 @@ uart@0x21000 {
reg-io-width = <4>; reg-io-width = <4>;
}; };
uart@0x22000 { uart@22000 {
compatible = "snps,dw-apb-uart"; compatible = "snps,dw-apb-uart";
reg = <0x22000 0x100>; reg = <0x22000 0x100>;
clock-frequency = <2403200>; clock-frequency = <2403200>;
...@@ -101,7 +101,7 @@ ps2: ps2@e0017400 { ...@@ -101,7 +101,7 @@ ps2: ps2@e0017400 {
interrupt-names = "arc_ps2_irq"; interrupt-names = "arc_ps2_irq";
}; };
mmc@0x15000 { mmc@15000 {
compatible = "snps,dw-mshc"; compatible = "snps,dw-mshc";
reg = <0x15000 0x400>; reg = <0x15000 0x400>;
fifo-depth = <1024>; fifo-depth = <1024>;
...@@ -117,11 +117,11 @@ mmc@0x15000 { ...@@ -117,11 +117,11 @@ mmc@0x15000 {
* Embedded Vision subsystem UIO mappings; only relevant for EV VDK * Embedded Vision subsystem UIO mappings; only relevant for EV VDK
* *
* This node is intentionally put outside of MB above becase * This node is intentionally put outside of MB above becase
* it maps areas outside of MB's 0xEz-0xFz. * it maps areas outside of MB's 0xez-0xfz.
*/ */
uio_ev: uio@0xD0000000 { uio_ev: uio@d0000000 {
compatible = "generic-uio"; compatible = "generic-uio";
reg = <0xD0000000 0x2000 0xD1000000 0x2000 0x90000000 0x10000000 0xC0000000 0x10000000>; reg = <0xd0000000 0x2000 0xd1000000 0x2000 0x90000000 0x10000000 0xc0000000 0x10000000>;
reg-names = "ev_gsa", "ev_ctrl", "ev_shared_mem", "ev_code_mem"; reg-names = "ev_gsa", "ev_ctrl", "ev_shared_mem", "ev_code_mem";
interrupt-parent = <&mb_intc>; interrupt-parent = <&mb_intc>;
interrupts = <23>; interrupts = <23>;
......
...@@ -8,6 +8,7 @@ CONFIG_NAMESPACES=y ...@@ -8,6 +8,7 @@ CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set # CONFIG_UTS_NS is not set
# CONFIG_PID_NS is not set # CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_EMBEDDED=y CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set # CONFIG_VM_EVENT_COUNTERS is not set
......
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
#define ECR_V_DTLB_MISS 0x05 #define ECR_V_DTLB_MISS 0x05
#define ECR_V_PROTV 0x06 #define ECR_V_PROTV 0x06
#define ECR_V_TRAP 0x09 #define ECR_V_TRAP 0x09
#define ECR_V_MISALIGN 0x0d
#endif #endif
/* DTLB Miss and Protection Violation Cause Codes */ /* DTLB Miss and Protection Violation Cause Codes */
...@@ -167,14 +168,6 @@ struct bcr_mpy { ...@@ -167,14 +168,6 @@ struct bcr_mpy {
#endif #endif
}; };
struct bcr_extn_xymem {
#ifdef CONFIG_CPU_BIG_ENDIAN
unsigned int ram_org:2, num_banks:4, bank_sz:4, ver:8;
#else
unsigned int ver:8, bank_sz:4, num_banks:4, ram_org:2;
#endif
};
struct bcr_iccm_arcompact { struct bcr_iccm_arcompact {
#ifdef CONFIG_CPU_BIG_ENDIAN #ifdef CONFIG_CPU_BIG_ENDIAN
unsigned int base:16, pad:5, sz:3, ver:8; unsigned int base:16, pad:5, sz:3, ver:8;
...@@ -312,7 +305,7 @@ struct cpuinfo_arc { ...@@ -312,7 +305,7 @@ struct cpuinfo_arc {
struct cpuinfo_arc_bpu bpu; struct cpuinfo_arc_bpu bpu;
struct bcr_identity core; struct bcr_identity core;
struct bcr_isa_arcv2 isa; struct bcr_isa_arcv2 isa;
const char *details, *name; const char *release, *name;
unsigned int vec_base; unsigned int vec_base;
struct cpuinfo_arc_ccm iccm, dccm; struct cpuinfo_arc_ccm iccm, dccm;
struct { struct {
...@@ -322,7 +315,6 @@ struct cpuinfo_arc { ...@@ -322,7 +315,6 @@ struct cpuinfo_arc {
timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4; timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
} extn; } extn;
struct bcr_mpy extn_mpy; struct bcr_mpy extn_mpy;
struct bcr_extn_xymem extn_xymem;
}; };
extern struct cpuinfo_arc cpuinfo_arc700[]; extern struct cpuinfo_arc cpuinfo_arc700[];
......
...@@ -44,7 +44,13 @@ ...@@ -44,7 +44,13 @@
#define ARCV2_IRQ_DEF_PRIO 1 #define ARCV2_IRQ_DEF_PRIO 1
/* seed value for status register */ /* seed value for status register */
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | STATUS_AD_MASK | \ #ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
#define __AD_ENB STATUS_AD_MASK
#else
#define __AD_ENB 0
#endif
#define ISA_INIT_STATUS_BITS (STATUS_IE_MASK | __AD_ENB | \
(ARCV2_IRQ_DEF_PRIO << 1)) (ARCV2_IRQ_DEF_PRIO << 1))
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
......
...@@ -105,10 +105,10 @@ static const char * const arc_pmu_ev_hw_map[] = { ...@@ -105,10 +105,10 @@ static const char * const arc_pmu_ev_hw_map[] = {
[PERF_COUNT_HW_INSTRUCTIONS] = "iall", [PERF_COUNT_HW_INSTRUCTIONS] = "iall",
/* All jump instructions that are taken */ /* All jump instructions that are taken */
[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmptak", [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmptak",
[PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */
#ifdef CONFIG_ISA_ARCV2 #ifdef CONFIG_ISA_ARCV2
[PERF_COUNT_HW_BRANCH_MISSES] = "bpmp", [PERF_COUNT_HW_BRANCH_MISSES] = "bpmp",
#else #else
[PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */
[PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */ [PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */
#endif #endif
[PERF_COUNT_ARC_LDC] = "imemrdc", /* Instr: mem read cached */ [PERF_COUNT_ARC_LDC] = "imemrdc", /* Instr: mem read cached */
......
...@@ -21,8 +21,6 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) ...@@ -21,8 +21,6 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
{ {
unsigned int val; unsigned int val;
smp_mb();
__asm__ __volatile__( __asm__ __volatile__(
"1: llock %[val], [%[slock]] \n" "1: llock %[val], [%[slock]] \n"
" breq %[val], %[LOCKED], 1b \n" /* spin while LOCKED */ " breq %[val], %[LOCKED], 1b \n" /* spin while LOCKED */
...@@ -34,6 +32,14 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) ...@@ -34,6 +32,14 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
[LOCKED] "r" (__ARCH_SPIN_LOCK_LOCKED__) [LOCKED] "r" (__ARCH_SPIN_LOCK_LOCKED__)
: "memory", "cc"); : "memory", "cc");
/*
* ACQUIRE barrier to ensure load/store after taking the lock
* don't "bleed-up" out of the critical section (leak-in is allowed)
* http://www.spinics.net/lists/kernel/msg2010409.html
*
* ARCv2 only has load-load, store-store and all-all barrier
* thus need the full all-all barrier
*/
smp_mb(); smp_mb();
} }
...@@ -42,8 +48,6 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) ...@@ -42,8 +48,6 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
{ {
unsigned int val, got_it = 0; unsigned int val, got_it = 0;
smp_mb();
__asm__ __volatile__( __asm__ __volatile__(
"1: llock %[val], [%[slock]] \n" "1: llock %[val], [%[slock]] \n"
" breq %[val], %[LOCKED], 4f \n" /* already LOCKED, just bail */ " breq %[val], %[LOCKED], 4f \n" /* already LOCKED, just bail */
...@@ -67,9 +71,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock) ...@@ -67,9 +71,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
{ {
smp_mb(); smp_mb();
lock->slock = __ARCH_SPIN_LOCK_UNLOCKED__; WRITE_ONCE(lock->slock, __ARCH_SPIN_LOCK_UNLOCKED__);
smp_mb();
} }
/* /*
...@@ -81,8 +83,6 @@ static inline void arch_read_lock(arch_rwlock_t *rw) ...@@ -81,8 +83,6 @@ static inline void arch_read_lock(arch_rwlock_t *rw)
{ {
unsigned int val; unsigned int val;
smp_mb();
/* /*
* zero means writer holds the lock exclusively, deny Reader. * zero means writer holds the lock exclusively, deny Reader.
* Otherwise grant lock to first/subseq reader * Otherwise grant lock to first/subseq reader
...@@ -113,8 +113,6 @@ static inline int arch_read_trylock(arch_rwlock_t *rw) ...@@ -113,8 +113,6 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)
{ {
unsigned int val, got_it = 0; unsigned int val, got_it = 0;
smp_mb();
__asm__ __volatile__( __asm__ __volatile__(
"1: llock %[val], [%[rwlock]] \n" "1: llock %[val], [%[rwlock]] \n"
" brls %[val], %[WR_LOCKED], 4f\n" /* <= 0: already write locked, bail */ " brls %[val], %[WR_LOCKED], 4f\n" /* <= 0: already write locked, bail */
...@@ -140,8 +138,6 @@ static inline void arch_write_lock(arch_rwlock_t *rw) ...@@ -140,8 +138,6 @@ static inline void arch_write_lock(arch_rwlock_t *rw)
{ {
unsigned int val; unsigned int val;
smp_mb();
/* /*
* If reader(s) hold lock (lock < __ARCH_RW_LOCK_UNLOCKED__), * If reader(s) hold lock (lock < __ARCH_RW_LOCK_UNLOCKED__),
* deny writer. Otherwise if unlocked grant to writer * deny writer. Otherwise if unlocked grant to writer
...@@ -175,8 +171,6 @@ static inline int arch_write_trylock(arch_rwlock_t *rw) ...@@ -175,8 +171,6 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)
{ {
unsigned int val, got_it = 0; unsigned int val, got_it = 0;
smp_mb();
__asm__ __volatile__( __asm__ __volatile__(
"1: llock %[val], [%[rwlock]] \n" "1: llock %[val], [%[rwlock]] \n"
" brne %[val], %[UNLOCKED], 4f \n" /* !UNLOCKED, bail */ " brne %[val], %[UNLOCKED], 4f \n" /* !UNLOCKED, bail */
...@@ -217,17 +211,13 @@ static inline void arch_read_unlock(arch_rwlock_t *rw) ...@@ -217,17 +211,13 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
: [val] "=&r" (val) : [val] "=&r" (val)
: [rwlock] "r" (&(rw->counter)) : [rwlock] "r" (&(rw->counter))
: "memory", "cc"); : "memory", "cc");
smp_mb();
} }
static inline void arch_write_unlock(arch_rwlock_t *rw) static inline void arch_write_unlock(arch_rwlock_t *rw)
{ {
smp_mb(); smp_mb();
rw->counter = __ARCH_RW_LOCK_UNLOCKED__; WRITE_ONCE(rw->counter, __ARCH_RW_LOCK_UNLOCKED__);
smp_mb();
} }
#else /* !CONFIG_ARC_HAS_LLSC */ #else /* !CONFIG_ARC_HAS_LLSC */
...@@ -237,10 +227,9 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) ...@@ -237,10 +227,9 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
unsigned int val = __ARCH_SPIN_LOCK_LOCKED__; unsigned int val = __ARCH_SPIN_LOCK_LOCKED__;
/* /*
* This smp_mb() is technically superfluous, we only need the one * Per lkmm, smp_mb() is only required after _lock (and before_unlock)
* after the lock for providing the ACQUIRE semantics. * for ACQ and REL semantics respectively. However EX based spinlocks
* However doing the "right" thing was regressing hackbench * need the extra smp_mb to workaround a hardware quirk.
* so keeping this, pending further investigation
*/ */
smp_mb(); smp_mb();
...@@ -257,14 +246,6 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) ...@@ -257,14 +246,6 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
#endif #endif
: "memory"); : "memory");
/*
* ACQUIRE barrier to ensure load/store after taking the lock
* don't "bleed-up" out of the critical section (leak-in is allowed)
* http://www.spinics.net/lists/kernel/msg2010409.html
*
* ARCv2 only has load-load, store-store and all-all barrier
* thus need the full all-all barrier
*/
smp_mb(); smp_mb();
} }
...@@ -309,8 +290,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock) ...@@ -309,8 +290,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
: "memory"); : "memory");
/* /*
* superfluous, but keeping for now - see pairing version in * see pairing version/comment in arch_spin_lock above
* arch_spin_lock above
*/ */
smp_mb(); smp_mb();
} }
...@@ -344,7 +324,6 @@ static inline int arch_read_trylock(arch_rwlock_t *rw) ...@@ -344,7 +324,6 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)
arch_spin_unlock(&(rw->lock_mutex)); arch_spin_unlock(&(rw->lock_mutex));
local_irq_restore(flags); local_irq_restore(flags);
smp_mb();
return ret; return ret;
} }
......
...@@ -54,7 +54,12 @@ ...@@ -54,7 +54,12 @@
; gcc 7.3.1 (ARC GNU 2018.03) onwards generates unaligned access ; gcc 7.3.1 (ARC GNU 2018.03) onwards generates unaligned access
; by default ; by default
lr r5, [status32] lr r5, [status32]
#ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
bset r5, r5, STATUS_AD_BIT bset r5, r5, STATUS_AD_BIT
#else
; Although disabled at reset, bootloader might have enabled it
bclr r5, r5, STATUS_AD_BIT
#endif
kflag r5 kflag r5
#endif #endif
.endm .endm
...@@ -106,6 +111,7 @@ ENTRY(stext) ...@@ -106,6 +111,7 @@ ENTRY(stext)
; r2 = pointer to uboot provided cmdline or external DTB in mem ; r2 = pointer to uboot provided cmdline or external DTB in mem
; These are handled later in handle_uboot_args() ; These are handled later in handle_uboot_args()
st r0, [@uboot_tag] st r0, [@uboot_tag]
st r1, [@uboot_magic]
st r2, [@uboot_arg] st r2, [@uboot_arg]
; setup "current" tsk and optionally cache it in dedicated r25 ; setup "current" tsk and optionally cache it in dedicated r25
......
...@@ -95,7 +95,7 @@ void arc_init_IRQ(void) ...@@ -95,7 +95,7 @@ void arc_init_IRQ(void)
/* setup status32, don't enable intr yet as kernel doesn't want */ /* setup status32, don't enable intr yet as kernel doesn't want */
tmp = read_aux_reg(ARC_REG_STATUS32); tmp = read_aux_reg(ARC_REG_STATUS32);
tmp |= STATUS_AD_MASK | (ARCV2_IRQ_DEF_PRIO << 1); tmp |= ARCV2_IRQ_DEF_PRIO << 1;
tmp &= ~STATUS_IE_MASK; tmp &= ~STATUS_IE_MASK;
asm volatile("kflag %0 \n"::"r"(tmp)); asm volatile("kflag %0 \n"::"r"(tmp));
} }
......
...@@ -36,6 +36,7 @@ unsigned int intr_to_DE_cnt; ...@@ -36,6 +36,7 @@ unsigned int intr_to_DE_cnt;
/* Part of U-boot ABI: see head.S */ /* Part of U-boot ABI: see head.S */
int __initdata uboot_tag; int __initdata uboot_tag;
int __initdata uboot_magic;
char __initdata *uboot_arg; char __initdata *uboot_arg;
const struct machine_desc *machine_desc; const struct machine_desc *machine_desc;
...@@ -44,29 +45,24 @@ struct task_struct *_current_task[NR_CPUS]; /* For stack switching */ ...@@ -44,29 +45,24 @@ struct task_struct *_current_task[NR_CPUS]; /* For stack switching */
struct cpuinfo_arc cpuinfo_arc700[NR_CPUS]; struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
static const struct id_to_str arc_cpu_rel[] = { static const struct id_to_str arc_legacy_rel[] = {
/* ID.ARCVER, Release */
#ifdef CONFIG_ISA_ARCOMPACT #ifdef CONFIG_ISA_ARCOMPACT
{ 0x34, "R4.10"}, { 0x34, "R4.10"},
{ 0x35, "R4.11"}, { 0x35, "R4.11"},
#else #else
{ 0x51, "R2.0" }, { 0x51, "R2.0" },
{ 0x52, "R2.1" }, { 0x52, "R2.1" },
{ 0x53, "R3.0" }, { 0x53, "R3.0" },
{ 0x54, "R3.10a" },
#endif #endif
{ 0x00, NULL } { 0x00, NULL }
}; };
static const struct id_to_str arc_cpu_nm[] = { static const struct id_to_str arc_cpu_rel[] = {
#ifdef CONFIG_ISA_ARCOMPACT /* UARCH.MAJOR, Release */
{ 0x20, "ARC 600" }, { 0, "R3.10a"},
{ 0x30, "ARC 770" }, /* 750 identified seperately */ { 1, "R3.50a"},
#else { 0xFF, NULL }
{ 0x40, "ARC EM" },
{ 0x50, "ARC HS38" },
{ 0x54, "ARC HS48" },
#endif
{ 0x00, "Unknown" }
}; };
static void read_decode_ccm_bcr(struct cpuinfo_arc *cpu) static void read_decode_ccm_bcr(struct cpuinfo_arc *cpu)
...@@ -116,31 +112,72 @@ static void read_decode_ccm_bcr(struct cpuinfo_arc *cpu) ...@@ -116,31 +112,72 @@ static void read_decode_ccm_bcr(struct cpuinfo_arc *cpu)
} }
} }
static void decode_arc_core(struct cpuinfo_arc *cpu)
{
struct bcr_uarch_build_arcv2 uarch;
const struct id_to_str *tbl;
/*
* Up until (including) the first core4 release (0x54) things were
* simple: AUX IDENTITY.ARCVER was sufficient to identify arc family
* and release: 0x50 to 0x53 was HS38, 0x54 was HS48 (dual issue)
*/
if (cpu->core.family < 0x54) { /* includes arc700 */
for (tbl = &arc_legacy_rel[0]; tbl->id != 0; tbl++) {
if (cpu->core.family == tbl->id) {
cpu->release = tbl->str;
break;
}
}
if (is_isa_arcompact())
cpu->name = "ARC700";
else if (tbl->str)
cpu->name = "HS38";
else
cpu->name = cpu->release = "Unknown";
return;
}
/*
* However the subsequent HS release (same 0x54) allow HS38 or HS48
* configurations and encode this info in a different BCR.
* The BCR was introduced in 0x54 so can't be read unconditionally.
*/
READ_BCR(ARC_REG_MICRO_ARCH_BCR, uarch);
if (uarch.prod == 4) {
cpu->name = "HS48";
cpu->extn.dual = 1;
} else {
cpu->name = "HS38";
}
for (tbl = &arc_cpu_rel[0]; tbl->id != 0xFF; tbl++) {
if (uarch.maj == tbl->id) {
cpu->release = tbl->str;
break;
}
}
}
static void read_arc_build_cfg_regs(void) static void read_arc_build_cfg_regs(void)
{ {
struct bcr_timer timer; struct bcr_timer timer;
struct bcr_generic bcr; struct bcr_generic bcr;
struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
const struct id_to_str *tbl;
struct bcr_isa_arcv2 isa; struct bcr_isa_arcv2 isa;
struct bcr_actionpoint ap; struct bcr_actionpoint ap;
FIX_PTR(cpu); FIX_PTR(cpu);
READ_BCR(AUX_IDENTITY, cpu->core); READ_BCR(AUX_IDENTITY, cpu->core);
decode_arc_core(cpu);
for (tbl = &arc_cpu_rel[0]; tbl->id != 0; tbl++) {
if (cpu->core.family == tbl->id) {
cpu->details = tbl->str;
break;
}
}
for (tbl = &arc_cpu_nm[0]; tbl->id != 0; tbl++) {
if ((cpu->core.family & 0xF4) == tbl->id)
break;
}
cpu->name = tbl->str;
READ_BCR(ARC_REG_TIMERS_BCR, timer); READ_BCR(ARC_REG_TIMERS_BCR, timer);
cpu->extn.timer0 = timer.t0; cpu->extn.timer0 = timer.t0;
...@@ -151,16 +188,6 @@ static void read_arc_build_cfg_regs(void) ...@@ -151,16 +188,6 @@ static void read_arc_build_cfg_regs(void)
READ_BCR(ARC_REG_MUL_BCR, cpu->extn_mpy); READ_BCR(ARC_REG_MUL_BCR, cpu->extn_mpy);
cpu->extn.norm = read_aux_reg(ARC_REG_NORM_BCR) > 1 ? 1 : 0; /* 2,3 */
cpu->extn.barrel = read_aux_reg(ARC_REG_BARREL_BCR) > 1 ? 1 : 0; /* 2,3 */
cpu->extn.swap = read_aux_reg(ARC_REG_SWAP_BCR) ? 1 : 0; /* 1,3 */
cpu->extn.crc = read_aux_reg(ARC_REG_CRC_BCR) ? 1 : 0;
cpu->extn.minmax = read_aux_reg(ARC_REG_MIXMAX_BCR) > 1 ? 1 : 0; /* 2 */
cpu->extn.swape = (cpu->core.family >= 0x34) ? 1 :
IS_ENABLED(CONFIG_ARC_HAS_SWAPE);
READ_BCR(ARC_REG_XY_MEM_BCR, cpu->extn_xymem);
/* Read CCM BCRs for boot reporting even if not enabled in Kconfig */ /* Read CCM BCRs for boot reporting even if not enabled in Kconfig */
read_decode_ccm_bcr(cpu); read_decode_ccm_bcr(cpu);
...@@ -198,30 +225,12 @@ static void read_arc_build_cfg_regs(void) ...@@ -198,30 +225,12 @@ static void read_arc_build_cfg_regs(void)
cpu->bpu.num_pred = 2048 << bpu.pte; cpu->bpu.num_pred = 2048 << bpu.pte;
cpu->bpu.ret_stk = 4 << bpu.rse; cpu->bpu.ret_stk = 4 << bpu.rse;
if (cpu->core.family >= 0x54) { /* if dual issue hardware, is it enabled ? */
if (cpu->extn.dual) {
struct bcr_uarch_build_arcv2 uarch; unsigned int exec_ctrl;
/*
* The first 0x54 core (uarch maj:min 0:1 or 0:2) was
* dual issue only (HS4x). But next uarch rev (1:0)
* allows it be configured for single issue (HS3x)
* Ensure we fiddle with dual issue only on HS4x
*/
READ_BCR(ARC_REG_MICRO_ARCH_BCR, uarch);
if (uarch.prod == 4) {
unsigned int exec_ctrl;
/* dual issue hardware always present */
cpu->extn.dual = 1;
READ_BCR(AUX_EXEC_CTRL, exec_ctrl);
/* dual issue hardware enabled ? */ READ_BCR(AUX_EXEC_CTRL, exec_ctrl);
cpu->extn.dual_enb = !(exec_ctrl & 1); cpu->extn.dual_enb = !(exec_ctrl & 1);
}
} }
} }
...@@ -263,7 +272,8 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len) ...@@ -263,7 +272,8 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
{ {
struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id]; struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id];
struct bcr_identity *core = &cpu->core; struct bcr_identity *core = &cpu->core;
int i, n = 0, ua = 0; char mpy_opt[16];
int n = 0;
FIX_PTR(cpu); FIX_PTR(cpu);
...@@ -272,7 +282,7 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len) ...@@ -272,7 +282,7 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
core->family, core->cpu_id, core->chip_id); core->family, core->cpu_id, core->chip_id);
n += scnprintf(buf + n, len - n, "processor [%d]\t: %s %s (%s ISA) %s%s%s\n", n += scnprintf(buf + n, len - n, "processor [%d]\t: %s %s (%s ISA) %s%s%s\n",
cpu_id, cpu->name, cpu->details, cpu_id, cpu->name, cpu->release,
is_isa_arcompact() ? "ARCompact" : "ARCv2", is_isa_arcompact() ? "ARCompact" : "ARCv2",
IS_AVAIL1(cpu->isa.be, "[Big-Endian]"), IS_AVAIL1(cpu->isa.be, "[Big-Endian]"),
IS_AVAIL3(cpu->extn.dual, cpu->extn.dual_enb, " Dual-Issue ")); IS_AVAIL3(cpu->extn.dual, cpu->extn.dual_enb, " Dual-Issue "));
...@@ -283,61 +293,50 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len) ...@@ -283,61 +293,50 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT), IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT),
IS_AVAIL2(cpu->extn.gfrc, "GFRC [SMP 64-bit] ", CONFIG_ARC_TIMERS_64BIT)); IS_AVAIL2(cpu->extn.gfrc, "GFRC [SMP 64-bit] ", CONFIG_ARC_TIMERS_64BIT));
#ifdef __ARC_UNALIGNED__
ua = 1;
#endif
n += i = scnprintf(buf + n, len - n, "%s%s%s%s%s%s",
IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC),
IS_AVAIL2(cpu->isa.ldd, "ll64 ", CONFIG_ARC_HAS_LL64),
IS_AVAIL1(cpu->isa.unalign, "unalign "), IS_USED_RUN(ua));
if (i)
n += scnprintf(buf + n, len - n, "\n\t\t: ");
if (cpu->extn_mpy.ver) { if (cpu->extn_mpy.ver) {
if (cpu->extn_mpy.ver <= 0x2) { /* ARCompact */ if (is_isa_arcompact()) {
n += scnprintf(buf + n, len - n, "mpy "); scnprintf(mpy_opt, 16, "mpy");
} else { } else {
int opt = 2; /* stock MPY/MPYH */ int opt = 2; /* stock MPY/MPYH */
if (cpu->extn_mpy.dsp) /* OPT 7-9 */ if (cpu->extn_mpy.dsp) /* OPT 7-9 */
opt = cpu->extn_mpy.dsp + 6; opt = cpu->extn_mpy.dsp + 6;
n += scnprintf(buf + n, len - n, "mpy[opt %d] ", opt); scnprintf(mpy_opt, 16, "mpy[opt %d] ", opt);
} }
} }
n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s%s%s\n", n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s%s%s\n",
IS_AVAIL1(cpu->isa.div_rem, "div_rem "), IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC),
IS_AVAIL1(cpu->extn.norm, "norm "), IS_AVAIL2(cpu->isa.ldd, "ll64 ", CONFIG_ARC_HAS_LL64),
IS_AVAIL1(cpu->extn.barrel, "barrel-shift "), IS_AVAIL2(cpu->isa.unalign, "unalign ", CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS),
IS_AVAIL1(cpu->extn.swap, "swap "), IS_AVAIL1(cpu->extn_mpy.ver, mpy_opt),
IS_AVAIL1(cpu->extn.minmax, "minmax "), IS_AVAIL1(cpu->isa.div_rem, "div_rem "));
IS_AVAIL1(cpu->extn.crc, "crc "),
IS_AVAIL2(cpu->extn.swape, "swape", CONFIG_ARC_HAS_SWAPE)); if (cpu->bpu.ver) {
if (cpu->bpu.ver)
n += scnprintf(buf + n, len - n, n += scnprintf(buf + n, len - n,
"BPU\t\t: %s%s match, cache:%d, Predict Table:%d Return stk: %d", "BPU\t\t: %s%s match, cache:%d, Predict Table:%d Return stk: %d",
IS_AVAIL1(cpu->bpu.full, "full"), IS_AVAIL1(cpu->bpu.full, "full"),
IS_AVAIL1(!cpu->bpu.full, "partial"), IS_AVAIL1(!cpu->bpu.full, "partial"),
cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk); cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk);
if (is_isa_arcv2()) { if (is_isa_arcv2()) {
struct bcr_lpb lpb; struct bcr_lpb lpb;
READ_BCR(ARC_REG_LPB_BUILD, lpb); READ_BCR(ARC_REG_LPB_BUILD, lpb);
if (lpb.ver) { if (lpb.ver) {
unsigned int ctl; unsigned int ctl;
ctl = read_aux_reg(ARC_REG_LPB_CTRL); ctl = read_aux_reg(ARC_REG_LPB_CTRL);
n += scnprintf(buf + n, len - n, " Loop Buffer:%d %s", n += scnprintf(buf + n, len - n, " Loop Buffer:%d %s",
lpb.entries, lpb.entries,
IS_DISABLED_RUN(!ctl)); IS_DISABLED_RUN(!ctl));
}
} }
n += scnprintf(buf + n, len - n, "\n");
} }
n += scnprintf(buf + n, len - n, "\n");
return buf; return buf;
} }
...@@ -390,11 +389,6 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len) ...@@ -390,11 +389,6 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
} }
} }
n += scnprintf(buf + n, len - n, "OS ABI [v%d]\t: %s\n",
EF_ARC_OSABI_CURRENT >> 8,
EF_ARC_OSABI_CURRENT == EF_ARC_OSABI_V3 ?
"no-legacy-syscalls" : "64-bit data any register aligned");
return buf; return buf;
} }
...@@ -497,6 +491,8 @@ static inline bool uboot_arg_invalid(unsigned long addr) ...@@ -497,6 +491,8 @@ static inline bool uboot_arg_invalid(unsigned long addr)
#define UBOOT_TAG_NONE 0 #define UBOOT_TAG_NONE 0
#define UBOOT_TAG_CMDLINE 1 #define UBOOT_TAG_CMDLINE 1
#define UBOOT_TAG_DTB 2 #define UBOOT_TAG_DTB 2
/* We always pass 0 as magic from U-boot */
#define UBOOT_MAGIC_VALUE 0
void __init handle_uboot_args(void) void __init handle_uboot_args(void)
{ {
...@@ -511,6 +507,11 @@ void __init handle_uboot_args(void) ...@@ -511,6 +507,11 @@ void __init handle_uboot_args(void)
goto ignore_uboot_args; goto ignore_uboot_args;
} }
if (uboot_magic != UBOOT_MAGIC_VALUE) {
pr_warn(IGNORE_ARGS "non zero uboot magic\n");
goto ignore_uboot_args;
}
if (uboot_tag != UBOOT_TAG_NONE && if (uboot_tag != UBOOT_TAG_NONE &&
uboot_arg_invalid((unsigned long)uboot_arg)) { uboot_arg_invalid((unsigned long)uboot_arg)) {
pr_warn(IGNORE_ARGS "invalid uboot arg: '%px'\n", uboot_arg); pr_warn(IGNORE_ARGS "invalid uboot arg: '%px'\n", uboot_arg);
......
...@@ -145,7 +145,8 @@ static void show_ecr_verbose(struct pt_regs *regs) ...@@ -145,7 +145,8 @@ static void show_ecr_verbose(struct pt_regs *regs)
} else if (vec == ECR_V_PROTV) { } else if (vec == ECR_V_PROTV) {
if (cause_code == ECR_C_PROTV_INST_FETCH) if (cause_code == ECR_C_PROTV_INST_FETCH)
pr_cont("Execute from Non-exec Page\n"); pr_cont("Execute from Non-exec Page\n");
else if (cause_code == ECR_C_PROTV_MISALIG_DATA) else if (cause_code == ECR_C_PROTV_MISALIG_DATA &&
IS_ENABLED(CONFIG_ISA_ARCOMPACT))
pr_cont("Misaligned r/w from 0x%08lx\n", address); pr_cont("Misaligned r/w from 0x%08lx\n", address);
else else
pr_cont("%s access not allowed on page\n", pr_cont("%s access not allowed on page\n",
...@@ -161,6 +162,8 @@ static void show_ecr_verbose(struct pt_regs *regs) ...@@ -161,6 +162,8 @@ static void show_ecr_verbose(struct pt_regs *regs)
pr_cont("Bus Error from Data Mem\n"); pr_cont("Bus Error from Data Mem\n");
else else
pr_cont("Bus Error, check PRM\n"); pr_cont("Bus Error, check PRM\n");
} else if (vec == ECR_V_MISALIGN) {
pr_cont("Misaligned r/w from 0x%08lx\n", address);
#endif #endif
} else if (vec == ECR_V_TRAP) { } else if (vec == ECR_V_TRAP) {
if (regs->ecr_param == 5) if (regs->ecr_param == 5)
......
...@@ -8,4 +8,10 @@ ...@@ -8,4 +8,10 @@
lib-y := strchr-700.o strcpy-700.o strlen.o memcmp.o lib-y := strchr-700.o strcpy-700.o strlen.o memcmp.o
lib-$(CONFIG_ISA_ARCOMPACT) += memcpy-700.o memset.o strcmp.o lib-$(CONFIG_ISA_ARCOMPACT) += memcpy-700.o memset.o strcmp.o
lib-$(CONFIG_ISA_ARCV2) += memcpy-archs.o memset-archs.o strcmp-archs.o lib-$(CONFIG_ISA_ARCV2) += memset-archs.o strcmp-archs.o
ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
lib-$(CONFIG_ISA_ARCV2) +=memcpy-archs-unaligned.o
else
lib-$(CONFIG_ISA_ARCV2) +=memcpy-archs.o
endif
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* ARCv2 memcpy implementation optimized for unaligned memory access using.
*
* Copyright (C) 2019 Synopsys
* Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
*/
#include <linux/linkage.h>
#ifdef CONFIG_ARC_HAS_LL64
# define LOADX(DST,RX) ldd.ab DST, [RX, 8]
# define STOREX(SRC,RX) std.ab SRC, [RX, 8]
# define ZOLSHFT 5
# define ZOLAND 0x1F
#else
# define LOADX(DST,RX) ld.ab DST, [RX, 4]
# define STOREX(SRC,RX) st.ab SRC, [RX, 4]
# define ZOLSHFT 4
# define ZOLAND 0xF
#endif
ENTRY_CFI(memcpy)
mov r3, r0 ; don;t clobber ret val
lsr.f lp_count, r2, ZOLSHFT
lpnz @.Lcopy32_64bytes
;; LOOP START
LOADX (r6, r1)
LOADX (r8, r1)
LOADX (r10, r1)
LOADX (r4, r1)
STOREX (r6, r3)
STOREX (r8, r3)
STOREX (r10, r3)
STOREX (r4, r3)
.Lcopy32_64bytes:
and.f lp_count, r2, ZOLAND ;Last remaining 31 bytes
lpnz @.Lcopyremainingbytes
;; LOOP START
ldb.ab r5, [r1, 1]
stb.ab r5, [r3, 1]
.Lcopyremainingbytes:
j [blink]
END_CFI(memcpy)
...@@ -26,8 +26,8 @@ config EZNPS_MTM_EXT ...@@ -26,8 +26,8 @@ config EZNPS_MTM_EXT
help help
Here we add new hierarchy for CPUs topology. Here we add new hierarchy for CPUs topology.
We got: We got:
Core Core
Thread Thread
At the new thread level each CPU represent one HW thread. At the new thread level each CPU represent one HW thread.
At highest hierarchy each core contain 16 threads, At highest hierarchy each core contain 16 threads,
any of them seem like CPU from Linux point of view. any of them seem like CPU from Linux point of view.
...@@ -35,10 +35,10 @@ config EZNPS_MTM_EXT ...@@ -35,10 +35,10 @@ config EZNPS_MTM_EXT
core and HW scheduler round robin between them. core and HW scheduler round robin between them.
config EZNPS_MEM_ERROR_ALIGN config EZNPS_MEM_ERROR_ALIGN
bool "ARC-EZchip Memory error as an exception" bool "ARC-EZchip Memory error as an exception"
depends on EZNPS_MTM_EXT depends on EZNPS_MTM_EXT
default n default n
help help
On the real chip of the NPS, user memory errors are handled On the real chip of the NPS, user memory errors are handled
as a machine check exception, which is fatal, whereas on as a machine check exception, which is fatal, whereas on
simulator platform for NPS, is handled as a Level 2 interrupt simulator platform for NPS, is handled as a Level 2 interrupt
......
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