Skip to content

Commit 0c6c887

Browse files
committed
Merge tag 'for-linus' of git://github.com/openrisc/linux
Pull OpenRISC updates from Stafford Horne: - New drivers and OpenRISC support for the LiteX platform - A bug fix to support userspace gdb debugging - Fixes one compile issue with blk-iocost * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: add local64.h to fix blk-iocost build openrisc: fix trap for debugger breakpoint signalling openrisc: add support for LiteX drivers/tty/serial: add LiteUART driver dt-bindings: serial: document LiteUART bindings drivers/soc/litex: add LiteX SoC Controller driver dt-bindings: soc: document LiteX SoC Controller bindings dt-bindings: vendor: add vendor prefix for LiteX
2 parents 8a5be36 + d8398bf commit 0c6c887

17 files changed

Lines changed: 903 additions & 3 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/serial/litex,liteuart.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: LiteUART serial controller
9+
10+
maintainers:
11+
- Karol Gugala <kgugala@antmicro.com>
12+
- Mateusz Holenko <mholenko@antmicro.com>
13+
14+
description: |
15+
LiteUART serial controller is a part of the LiteX FPGA SoC builder. It supports
16+
multiple CPU architectures, currently including e.g. OpenRISC and RISC-V.
17+
18+
properties:
19+
compatible:
20+
const: litex,liteuart
21+
22+
reg:
23+
maxItems: 1
24+
25+
interrupts:
26+
maxItems: 1
27+
28+
required:
29+
- compatible
30+
- reg
31+
32+
examples:
33+
- |
34+
uart0: serial@e0001800 {
35+
compatible = "litex,liteuart";
36+
reg = <0xe0001800 0x100>;
37+
interrupts = <2>;
38+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
# Copyright 2020 Antmicro <www.antmicro.com>
3+
%YAML 1.2
4+
---
5+
$id: "http://devicetree.org/schemas/soc/litex/litex,soc-controller.yaml#"
6+
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7+
8+
title: LiteX SoC Controller driver
9+
10+
description: |
11+
This is the SoC Controller driver for the LiteX SoC Builder.
12+
Its purpose is to verify LiteX CSR (Control&Status Register) access
13+
operations and provide functions for other drivers to read/write CSRs
14+
and to check if those accessors are ready to be used.
15+
16+
maintainers:
17+
- Karol Gugala <kgugala@antmicro.com>
18+
- Mateusz Holenko <mholenko@antmicro.com>
19+
20+
properties:
21+
compatible:
22+
const: litex,soc-controller
23+
24+
reg:
25+
maxItems: 1
26+
27+
required:
28+
- compatible
29+
- reg
30+
31+
examples:
32+
- |
33+
soc_ctrl0: soc-controller@f0000000 {
34+
compatible = "litex,soc-controller";
35+
reg = <0xf0000000 0xc>;
36+
status = "okay";
37+
};
38+
39+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ patternProperties:
621621
description: Linux-specific binding
622622
"^linx,.*":
623623
description: Linx Technologies
624+
"^litex,.*":
625+
description: LiteX SoC builder
624626
"^lltc,.*":
625627
description: Linear Technology Corporation
626628
"^logicpd,.*":

MAINTAINERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10264,6 +10264,16 @@ L: kunit-dev@googlegroups.com
1026410264
S: Maintained
1026510265
F: lib/list-test.c
1026610266

10267+
LITEX PLATFORM
10268+
M: Karol Gugala <kgugala@antmicro.com>
10269+
M: Mateusz Holenko <mholenko@antmicro.com>
10270+
S: Maintained
10271+
F: Documentation/devicetree/bindings/*/litex,*.yaml
10272+
F: arch/openrisc/boot/dts/or1klitex.dts
10273+
F: drivers/soc/litex/litex_soc_ctrl.c
10274+
F: drivers/tty/serial/liteuart.c
10275+
F: include/linux/litex.h
10276+
1026710277
LIVE PATCHING
1026810278
M: Josh Poimboeuf <jpoimboe@redhat.com>
1026910279
M: Jiri Kosina <jikos@kernel.org>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* LiteX-based System on Chip
4+
*
5+
* Copyright (C) 2019 Antmicro <www.antmicro.com>
6+
*/
7+
8+
/dts-v1/;
9+
/ {
10+
compatible = "opencores,or1ksim";
11+
#address-cells = <1>;
12+
#size-cells = <1>;
13+
interrupt-parent = <&pic>;
14+
15+
aliases {
16+
serial0 = &serial0;
17+
};
18+
19+
chosen {
20+
bootargs = "console=liteuart";
21+
};
22+
23+
memory@0 {
24+
device_type = "memory";
25+
reg = <0x00000000 0x10000000>;
26+
};
27+
28+
cpus {
29+
#address-cells = <1>;
30+
#size-cells = <0>;
31+
cpu@0 {
32+
compatible = "opencores,or1200-rtlsvn481";
33+
reg = <0>;
34+
clock-frequency = <100000000>;
35+
};
36+
};
37+
38+
pic: pic {
39+
compatible = "opencores,or1k-pic";
40+
#interrupt-cells = <1>;
41+
interrupt-controller;
42+
};
43+
44+
serial0: serial@e0002000 {
45+
device_type = "serial";
46+
compatible = "litex,liteuart";
47+
reg = <0xe0002000 0x100>;
48+
};
49+
50+
soc_ctrl0: soc_controller@e0000000 {
51+
compatible = "litex,soc-controller";
52+
reg = <0xe0000000 0xc>;
53+
status = "okay";
54+
};
55+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CONFIG_BLK_DEV_INITRD=y
2+
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
3+
CONFIG_BUG_ON_DATA_CORRUPTION=y
4+
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
5+
CONFIG_DEVTMPFS=y
6+
CONFIG_DEVTMPFS_MOUNT=y
7+
CONFIG_EMBEDDED=y
8+
CONFIG_HZ_100=y
9+
CONFIG_INITRAMFS_SOURCE="openrisc-rootfs.cpio.gz"
10+
CONFIG_OF_OVERLAY=y
11+
CONFIG_OPENRISC_BUILTIN_DTB="or1klitex"
12+
CONFIG_PANIC_ON_OOPS=y
13+
CONFIG_PRINTK_TIME=y
14+
CONFIG_LITEX_SOC_CONTROLLER=y
15+
CONFIG_SERIAL_LITEUART=y
16+
CONFIG_SERIAL_LITEUART_CONSOLE=y
17+
CONFIG_SOFTLOCKUP_DETECTOR=y
18+
CONFIG_TTY_PRINTK=y

arch/openrisc/include/asm/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
generic-y += extable.h
33
generic-y += kvm_para.h
4+
generic-y += local64.h
45
generic-y += mcs_spinlock.h
56
generic-y += qspinlock_types.h
67
generic-y += qspinlock.h

arch/openrisc/kernel/traps.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ void __init trap_init(void)
238238

239239
asmlinkage void do_trap(struct pt_regs *regs, unsigned long address)
240240
{
241-
force_sig_fault(SIGTRAP, TRAP_TRACE, (void __user *)address);
242-
243-
regs->pc += 4;
241+
force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->pc);
244242
}
245243

246244
asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address)

drivers/soc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ source "drivers/soc/bcm/Kconfig"
99
source "drivers/soc/fsl/Kconfig"
1010
source "drivers/soc/imx/Kconfig"
1111
source "drivers/soc/ixp4xx/Kconfig"
12+
source "drivers/soc/litex/Kconfig"
1213
source "drivers/soc/mediatek/Kconfig"
1314
source "drivers/soc/qcom/Kconfig"
1415
source "drivers/soc/renesas/Kconfig"

drivers/soc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_GEMINI) += gemini/
1414
obj-y += imx/
1515
obj-$(CONFIG_ARCH_IXP4XX) += ixp4xx/
1616
obj-$(CONFIG_SOC_XWAY) += lantiq/
17+
obj-$(CONFIG_LITEX_SOC_CONTROLLER) += litex/
1718
obj-y += mediatek/
1819
obj-y += amlogic/
1920
obj-y += qcom/

0 commit comments

Comments
 (0)