mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "Merge android11-5.4.147+ (dc8c919) into msm-5.4"
This commit is contained in:
commit
4fd1eea424
765 changed files with 12713 additions and 6379 deletions
|
|
@ -45,14 +45,24 @@ how the user addresses are used by the kernel:
|
|||
|
||||
1. User addresses not accessed by the kernel but used for address space
|
||||
management (e.g. ``mprotect()``, ``madvise()``). The use of valid
|
||||
tagged pointers in this context is allowed with the exception of
|
||||
``brk()``, ``mmap()`` and the ``new_address`` argument to
|
||||
``mremap()`` as these have the potential to alias with existing
|
||||
user addresses.
|
||||
tagged pointers in this context is allowed with these exceptions:
|
||||
|
||||
NOTE: This behaviour changed in v5.6 and so some earlier kernels may
|
||||
incorrectly accept valid tagged pointers for the ``brk()``,
|
||||
``mmap()`` and ``mremap()`` system calls.
|
||||
- ``brk()``, ``mmap()`` and the ``new_address`` argument to
|
||||
``mremap()`` as these have the potential to alias with existing
|
||||
user addresses.
|
||||
|
||||
NOTE: This behaviour changed in v5.6 and so some earlier kernels may
|
||||
incorrectly accept valid tagged pointers for the ``brk()``,
|
||||
``mmap()`` and ``mremap()`` system calls.
|
||||
|
||||
- The ``range.start``, ``start`` and ``dst`` arguments to the
|
||||
``UFFDIO_*`` ``ioctl()``s used on a file descriptor obtained from
|
||||
``userfaultfd()``, as fault addresses subsequently obtained by reading
|
||||
the file descriptor will be untagged, which may otherwise confuse
|
||||
tag-unaware programs.
|
||||
|
||||
NOTE: This behaviour changed in v5.14 and so some earlier kernels may
|
||||
incorrectly accept valid tagged pointers for this system call.
|
||||
|
||||
2. User addresses accessed by the kernel (e.g. ``write()``). This ABI
|
||||
relaxation is disabled by default and the application thread needs to
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ Documentation written by Tom Zanussi
|
|||
with the event, in nanoseconds. May be
|
||||
modified by .usecs to have timestamps
|
||||
interpreted as microseconds.
|
||||
cpu int the cpu on which the event occurred.
|
||||
common_cpu int the cpu on which the event occurred.
|
||||
====================== ==== =======================================
|
||||
|
||||
Extended error information
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ Shadow pages contain the following information:
|
|||
shadow pages) so role.quadrant takes values in the range 0..3. Each
|
||||
quadrant maps 1GB virtual address space.
|
||||
role.access:
|
||||
Inherited guest access permissions in the form uwx. Note execute
|
||||
permission is positive, not negative.
|
||||
Inherited guest access permissions from the parent ptes in the form uwx.
|
||||
Note execute permission is positive, not negative.
|
||||
role.invalid:
|
||||
The page is invalid and should not be used. It is a root page that is
|
||||
currently pinned (by a cpu hardware register pointing to it); once it is
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 134
|
||||
SUBLEVEL = 147
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
LTS_5.4.134_2385b6cc59cf
|
||||
LTS_5.4.147_dc8c919ca616
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1384,6 +1384,7 @@
|
|||
sdhci_remove_host
|
||||
sdhci_reset
|
||||
sdhci_set_bus_width
|
||||
__sdhci_set_timeout
|
||||
|
||||
# required by smem.ko
|
||||
hwspin_lock_free
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
11
android/abi_gki_aarch64_fcnt
Normal file → Executable file
11
android/abi_gki_aarch64_fcnt
Normal file → Executable file
|
|
@ -4,7 +4,7 @@
|
|||
sync_blockdev
|
||||
read_cache_page
|
||||
blkdev_put
|
||||
blkdev_get_by_dev
|
||||
blkdev_get_by_path
|
||||
|
||||
# required by pt.ko
|
||||
input_mt_sync_frame
|
||||
|
|
@ -69,3 +69,12 @@
|
|||
|
||||
# required by chipone-ts.ko
|
||||
input_mt_sync_frame
|
||||
|
||||
# required by hardware_info.ko
|
||||
simple_strtoull
|
||||
|
||||
# required by spidev.ko
|
||||
stream_open
|
||||
|
||||
# required by sdhci-msm.ko
|
||||
mmc_gpio_set_cd_wake
|
||||
|
|
|
|||
|
|
@ -1975,6 +1975,7 @@
|
|||
regulator_unlock
|
||||
regulator_unregister_notifier
|
||||
regulatory_hint
|
||||
regulatory_set_wiphy_regd_sync_rtnl
|
||||
release_firmware
|
||||
release_sock
|
||||
regmap_mmio_detach_clk
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
regulator_set_voltage
|
||||
remove_proc_entry
|
||||
schedule_timeout
|
||||
sdio_writeb_readb
|
||||
seq_printf
|
||||
seq_read
|
||||
simple_open
|
||||
|
|
|
|||
|
|
@ -431,6 +431,7 @@
|
|||
devm_kmemdup
|
||||
devm_kstrdup
|
||||
devm_led_classdev_register_ext
|
||||
devm_mbox_controller_register
|
||||
devm_nvmem_cell_get
|
||||
devm_nvmem_device_get
|
||||
devm_nvmem_register
|
||||
|
|
@ -2119,6 +2120,7 @@
|
|||
scsi_unblock_requests
|
||||
sdev_prefix_printk
|
||||
__sdhci_add_host
|
||||
__sdhci_set_timeout
|
||||
sdhci_add_host
|
||||
sdhci_cleanup_host
|
||||
sdhci_cqe_disable
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ void
|
|||
smp_send_stop(void)
|
||||
{
|
||||
cpumask_t to_whom;
|
||||
cpumask_copy(&to_whom, cpu_possible_mask);
|
||||
cpumask_copy(&to_whom, cpu_online_mask);
|
||||
cpumask_clear_cpu(smp_processor_id(), &to_whom);
|
||||
#ifdef DEBUG_IPI_MSG
|
||||
if (hard_smp_processor_id() != boot_cpu_id)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ config ARC
|
|||
select GENERIC_SMP_IDLE_THREAD
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_COPY_THREAD_TLS
|
||||
select HAVE_DEBUG_STACKOVERFLOW
|
||||
select HAVE_FUTEX_CMPXCHG if FUTEX
|
||||
select HAVE_IOREMAP_PROT
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
int sys_clone_wrapper(int, int, int, int, int);
|
||||
int sys_clone3_wrapper(void *, size_t);
|
||||
int sys_cacheflush(uint32_t, uint32_t uint32_t);
|
||||
int sys_arc_settls(void *);
|
||||
int sys_arc_gettls(void);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#define __ARCH_WANT_SET_GET_RLIMIT
|
||||
#define __ARCH_WANT_SYS_EXECVE
|
||||
#define __ARCH_WANT_SYS_CLONE
|
||||
#define __ARCH_WANT_SYS_CLONE3
|
||||
#define __ARCH_WANT_SYS_VFORK
|
||||
#define __ARCH_WANT_SYS_FORK
|
||||
#define __ARCH_WANT_TIME32_SYSCALLS
|
||||
|
|
|
|||
|
|
@ -35,6 +35,18 @@ ENTRY(sys_clone_wrapper)
|
|||
b .Lret_from_system_call
|
||||
END(sys_clone_wrapper)
|
||||
|
||||
ENTRY(sys_clone3_wrapper)
|
||||
SAVE_CALLEE_SAVED_USER
|
||||
bl @sys_clone3
|
||||
DISCARD_CALLEE_SAVED_USER
|
||||
|
||||
GET_CURR_THR_INFO_FLAGS r10
|
||||
btst r10, TIF_SYSCALL_TRACE
|
||||
bnz tracesys_exit
|
||||
|
||||
b .Lret_from_system_call
|
||||
END(sys_clone3_wrapper)
|
||||
|
||||
ENTRY(ret_from_fork)
|
||||
; when the forked child comes here from the __switch_to function
|
||||
; r0 has the last task pointer.
|
||||
|
|
|
|||
|
|
@ -171,9 +171,8 @@ asmlinkage void ret_from_fork(void);
|
|||
* | user_r25 |
|
||||
* ------------------ <===== END of PAGE
|
||||
*/
|
||||
int copy_thread(unsigned long clone_flags,
|
||||
unsigned long usp, unsigned long kthread_arg,
|
||||
struct task_struct *p)
|
||||
int copy_thread_tls(unsigned long clone_flags, unsigned long usp,
|
||||
unsigned long kthread_arg, struct task_struct *p, unsigned long tls)
|
||||
{
|
||||
struct pt_regs *c_regs; /* child's pt_regs */
|
||||
unsigned long *childksp; /* to unwind out of __switch_to() */
|
||||
|
|
@ -231,7 +230,7 @@ int copy_thread(unsigned long clone_flags,
|
|||
* set task's userland tls data ptr from 4th arg
|
||||
* clone C-lib call is difft from clone sys-call
|
||||
*/
|
||||
task_thread_info(p)->thr_ptr = regs->r3;
|
||||
task_thread_info(p)->thr_ptr = tls;
|
||||
} else {
|
||||
/* Normal fork case: set parent's TLS ptr in child */
|
||||
task_thread_info(p)->thr_ptr =
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <asm/syscalls.h>
|
||||
|
||||
#define sys_clone sys_clone_wrapper
|
||||
#define sys_clone3 sys_clone3_wrapper
|
||||
|
||||
#undef __SYSCALL
|
||||
#define __SYSCALL(nr, call) [nr] = (call),
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ SECTIONS
|
|||
CPUIDLE_TEXT
|
||||
LOCK_TEXT
|
||||
KPROBES_TEXT
|
||||
IRQENTRY_TEXT
|
||||
SOFTIRQENTRY_TEXT
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -829,11 +829,14 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio5_target {
|
||||
ti,no-reset-on-init;
|
||||
};
|
||||
|
||||
&gpio5 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&display_mux_pins>;
|
||||
status = "okay";
|
||||
ti,no-reset-on-init;
|
||||
|
||||
p8 {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1611,7 +1611,7 @@
|
|||
compatible = "ti,am4372-d_can", "ti,am3352-d_can";
|
||||
reg = <0x0 0x2000>;
|
||||
clocks = <&dcan1_fck>;
|
||||
clock-name = "fck";
|
||||
clock-names = "fck";
|
||||
syscon-raminit = <&scm_conf 0x644 1>;
|
||||
interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
|
|
@ -2077,7 +2077,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
target-module@22000 { /* 0x48322000, ap 116 64.0 */
|
||||
gpio5_target: target-module@22000 { /* 0x48322000, ap 116 64.0 */
|
||||
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||
ti,hwmods = "gpio6";
|
||||
reg = <0x22000 0x4>,
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@
|
|||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
clock-frequency = <400000>;
|
||||
clock-frequency = <100000>;
|
||||
|
||||
tps65218: tps65218@24 {
|
||||
reg = <0x24>;
|
||||
|
|
|
|||
|
|
@ -611,12 +611,11 @@
|
|||
>;
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
status = "okay";
|
||||
&gpio3_target {
|
||||
ti,no-reset-on-init;
|
||||
};
|
||||
|
||||
&gpio2 {
|
||||
&gpio2_target {
|
||||
status = "okay";
|
||||
ti,no-reset-on-init;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -208,12 +208,12 @@
|
|||
};
|
||||
|
||||
pinctrl_hvi3c3_default: hvi3c3_default {
|
||||
function = "HVI3C3";
|
||||
function = "I3C3";
|
||||
groups = "HVI3C3";
|
||||
};
|
||||
|
||||
pinctrl_hvi3c4_default: hvi3c4_default {
|
||||
function = "HVI3C4";
|
||||
function = "I3C4";
|
||||
groups = "HVI3C4";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
nand: nand@18046000 {
|
||||
nand_controller: nand-controller@18046000 {
|
||||
compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
|
||||
reg = <0x18046000 0x600>, <0xf8105408 0x600>,
|
||||
<0x18046f00 0x20>;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
nand: nand@26000 {
|
||||
nand_controller: nand-controller@26000 {
|
||||
compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
|
||||
reg = <0x26000 0x600>,
|
||||
<0x11b408 0x600>,
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@
|
|||
dma-coherent;
|
||||
};
|
||||
|
||||
nand: nand@26000 {
|
||||
nand_controller: nand-controller@26000 {
|
||||
compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
|
||||
reg = <0x026000 0x600>,
|
||||
<0x11b408 0x600>,
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
nand: nand@2000 {
|
||||
nand_controller: nand-controller@2000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.0", "brcm,brcmnand";
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
&nand_controller {
|
||||
status = "okay";
|
||||
|
||||
nandcs@1 {
|
||||
nand@1 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <1>;
|
||||
nand-ecc-step-size = <512>;
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@
|
|||
reg-names = "aon-ctrl", "aon-sram";
|
||||
};
|
||||
|
||||
nand: nand@3e2800 {
|
||||
nand_controller: nand-controller@3e2800 {
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@1 {
|
||||
&nand_controller {
|
||||
nand@1 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@1 {
|
||||
&nand_controller {
|
||||
nand@1 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@1 {
|
||||
&nand_controller {
|
||||
nand@1 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
&nand_controller {
|
||||
status = "okay";
|
||||
|
||||
nandcs@0 {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-ecc-strength = <4>;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
nandcs@0 {
|
||||
&nand_controller {
|
||||
nand@0 {
|
||||
compatible = "brcm,nandcs";
|
||||
reg = <0>;
|
||||
nand-on-flash-bbt;
|
||||
|
|
|
|||
|
|
@ -1326,7 +1326,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
target-module@55000 { /* 0x48055000, ap 13 0e.0 */
|
||||
gpio2_target: target-module@55000 { /* 0x48055000, ap 13 0e.0 */
|
||||
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||
reg = <0x55000 0x4>,
|
||||
<0x55010 0x4>,
|
||||
|
|
@ -1359,7 +1359,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
target-module@57000 { /* 0x48057000, ap 15 06.0 */
|
||||
gpio3_target: target-module@57000 { /* 0x48057000, ap 15 06.0 */
|
||||
compatible = "ti,sysc-omap2", "ti,sysc";
|
||||
reg = <0x57000 0x4>,
|
||||
<0x57010 0x4>,
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
mdio0: ethernet-phy {
|
||||
mdio0: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
/* Uses MDC and MDIO */
|
||||
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
mdio0: ethernet-phy {
|
||||
mdio0: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
|
||||
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
mdio0: ethernet-phy {
|
||||
mdio0: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
|
||||
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
mdio0: ethernet-phy {
|
||||
mdio0: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
|
||||
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
mdio0: ethernet-phy {
|
||||
mdio0: mdio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
|
||||
<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@
|
|||
clock-names = "PCLK", "PCICLK";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pci_default_pins>;
|
||||
device_type = "pci";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
#interrupt-cells = <1>;
|
||||
|
|
|
|||
|
|
@ -388,13 +388,13 @@
|
|||
|
||||
pinctrl_power_button: powerbutgrp {
|
||||
fsl,pins = <
|
||||
MX53_PAD_SD2_DATA2__GPIO1_13 0x1e4
|
||||
MX53_PAD_SD2_DATA0__GPIO1_15 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_power_out: poweroutgrp {
|
||||
fsl,pins = <
|
||||
MX53_PAD_SD2_DATA0__GPIO1_15 0x1e4
|
||||
MX53_PAD_SD2_DATA2__GPIO1_13 0x1e4
|
||||
>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -315,8 +315,8 @@
|
|||
fsl,pins = <
|
||||
MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
|
||||
MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
|
||||
MX6QDL_PAD_EIM_D30__UART3_RTS_B 0x1b0b1
|
||||
MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1
|
||||
MX6QDL_PAD_EIM_D31__UART3_RTS_B 0x1b0b1
|
||||
MX6QDL_PAD_EIM_D30__UART3_CTS_B 0x1b0b1
|
||||
>;
|
||||
};
|
||||
|
||||
|
|
@ -403,6 +403,7 @@
|
|||
&uart3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart3>;
|
||||
uart-has-rtscts;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,13 @@
|
|||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
|
||||
phy-mode = "rgmii-id";
|
||||
phy-reset-duration = <2>;
|
||||
|
||||
/*
|
||||
* The PHY seems to require a long-enough reset duration to avoid
|
||||
* some rare issues where the PHY gets stuck in an inconsistent and
|
||||
* non-functional state at boot-up. 10ms proved to be fine .
|
||||
*/
|
||||
phy-reset-duration = <10>;
|
||||
phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
assigned-clock-rates = <0>, <198000000>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
max-frequency = <25000000>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
no-1-8-v;
|
||||
non-removable;
|
||||
|
|
|
|||
|
|
@ -241,8 +241,13 @@
|
|||
"pp2", "ppmmu2", "pp4", "ppmmu4",
|
||||
"pp5", "ppmmu5", "pp6", "ppmmu6";
|
||||
resets = <&reset RESET_MALI>;
|
||||
|
||||
clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>;
|
||||
clock-names = "bus", "core";
|
||||
|
||||
assigned-clocks = <&clkc CLKID_MALI>;
|
||||
assigned-clock-rates = <318750000>;
|
||||
|
||||
operating-points-v2 = <&gpu_opp_table>;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@
|
|||
regulator-min-microvolt = <860000>;
|
||||
regulator-max-microvolt = <1140000>;
|
||||
|
||||
vin-supply = <&vcc_5v>;
|
||||
pwm-supply = <&vcc_5v>;
|
||||
|
||||
pwms = <&pwm_cd 0 1148 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
regulator-min-microvolt = <860000>;
|
||||
regulator-max-microvolt = <1140000>;
|
||||
|
||||
vin-supply = <&vcc_5v>;
|
||||
pwm-supply = <&vcc_5v>;
|
||||
|
||||
pwms = <&pwm_cd 1 1148 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
regulator-min-microvolt = <860000>;
|
||||
regulator-max-microvolt = <1140000>;
|
||||
|
||||
pwm-supply = <&vcc_5v>;
|
||||
|
||||
pwms = <&pwm_cd 0 1148 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
||||
|
|
@ -84,7 +86,7 @@
|
|||
regulator-min-microvolt = <860000>;
|
||||
regulator-max-microvolt = <1140000>;
|
||||
|
||||
vin-supply = <&vcc_5v>;
|
||||
pwm-supply = <&vcc_5v>;
|
||||
|
||||
pwms = <&pwm_cd 1 1148 0>;
|
||||
pwm-dutycycle-range = <100 0>;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@
|
|||
regulator-min-microvolt = <860000>;
|
||||
regulator-max-microvolt = <1140000>;
|
||||
|
||||
vin-supply = <&p5v0>;
|
||||
pwm-supply = <&p5v0>;
|
||||
|
||||
pwms = <&pwm_cd 0 12218 0>;
|
||||
pwm-dutycycle-range = <91 0>;
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
regulator-min-microvolt = <860000>;
|
||||
regulator-max-microvolt = <1140000>;
|
||||
|
||||
vin-supply = <&p5v0>;
|
||||
pwm-supply = <&p5v0>;
|
||||
|
||||
pwms = <&pwm_cd 1 12218 0>;
|
||||
pwm-dutycycle-range = <91 0>;
|
||||
|
|
|
|||
|
|
@ -30,14 +30,6 @@
|
|||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vdds_1v8_main: fixedregulator-vdds_1v8_main {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdds_1v8_main";
|
||||
vin-supply = <&smps7_reg>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
vmmcsd_fixed: fixedregulator-mmcsd {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmcsd_fixed";
|
||||
|
|
@ -487,6 +479,7 @@
|
|||
regulator-boot-on;
|
||||
};
|
||||
|
||||
vdds_1v8_main:
|
||||
smps7_reg: smps7 {
|
||||
/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
|
||||
regulator-name = "smps7";
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
sleep {
|
||||
suspend {
|
||||
global_pwroff: global-pwroff {
|
||||
rockchip,pins = <2 RK_PA7 1 &pcfg_pull_none>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -761,7 +761,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pd_vio@RK3066_PD_VIO {
|
||||
power-domain@RK3066_PD_VIO {
|
||||
reg = <RK3066_PD_VIO>;
|
||||
clocks = <&cru ACLK_LCDC0>,
|
||||
<&cru ACLK_LCDC1>,
|
||||
|
|
@ -788,7 +788,7 @@
|
|||
<&qos_rga>;
|
||||
};
|
||||
|
||||
pd_video@RK3066_PD_VIDEO {
|
||||
power-domain@RK3066_PD_VIDEO {
|
||||
reg = <RK3066_PD_VIDEO>;
|
||||
clocks = <&cru ACLK_VDPU>,
|
||||
<&cru ACLK_VEPU>,
|
||||
|
|
@ -797,7 +797,7 @@
|
|||
pm_qos = <&qos_vpu>;
|
||||
};
|
||||
|
||||
pd_gpu@RK3066_PD_GPU {
|
||||
power-domain@RK3066_PD_GPU {
|
||||
reg = <RK3066_PD_GPU>;
|
||||
clocks = <&cru ACLK_GPU>;
|
||||
pm_qos = <&qos_gpu>;
|
||||
|
|
|
|||
|
|
@ -150,16 +150,16 @@
|
|||
compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
|
||||
reg = <0x2000e000 0x20>;
|
||||
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru SCLK_TIMER3>, <&cru PCLK_TIMER3>;
|
||||
clock-names = "timer", "pclk";
|
||||
clocks = <&cru PCLK_TIMER3>, <&cru SCLK_TIMER3>;
|
||||
clock-names = "pclk", "timer";
|
||||
};
|
||||
|
||||
timer6: timer@200380a0 {
|
||||
compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
|
||||
reg = <0x200380a0 0x20>;
|
||||
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru SCLK_TIMER6>, <&cru PCLK_TIMER0>;
|
||||
clock-names = "timer", "pclk";
|
||||
clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER6>;
|
||||
clock-names = "pclk", "timer";
|
||||
};
|
||||
|
||||
i2s0: i2s@1011a000 {
|
||||
|
|
@ -701,7 +701,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pd_vio@RK3188_PD_VIO {
|
||||
power-domain@RK3188_PD_VIO {
|
||||
reg = <RK3188_PD_VIO>;
|
||||
clocks = <&cru ACLK_LCDC0>,
|
||||
<&cru ACLK_LCDC1>,
|
||||
|
|
@ -723,7 +723,7 @@
|
|||
<&qos_rga>;
|
||||
};
|
||||
|
||||
pd_video@RK3188_PD_VIDEO {
|
||||
power-domain@RK3188_PD_VIDEO {
|
||||
reg = <RK3188_PD_VIDEO>;
|
||||
clocks = <&cru ACLK_VDPU>,
|
||||
<&cru ACLK_VEPU>,
|
||||
|
|
@ -732,7 +732,7 @@
|
|||
pm_qos = <&qos_vpu>;
|
||||
};
|
||||
|
||||
pd_gpu@RK3188_PD_GPU {
|
||||
power-domain@RK3188_PD_GPU {
|
||||
reg = <RK3188_PD_GPU>;
|
||||
clocks = <&cru ACLK_GPU>;
|
||||
pm_qos = <&qos_gpu>;
|
||||
|
|
|
|||
|
|
@ -570,10 +570,9 @@
|
|||
compatible = "rockchip,iommu";
|
||||
reg = <0x20020800 0x100>;
|
||||
interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "vpu_mmu";
|
||||
clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
|
||||
clock-names = "aclk", "iface";
|
||||
iommu-cells = <0>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
@ -581,10 +580,9 @@
|
|||
compatible = "rockchip,iommu";
|
||||
reg = <0x20030480 0x40>, <0x200304c0 0x40>;
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "vdec_mmu";
|
||||
clocks = <&cru ACLK_RKVDEC>, <&cru HCLK_RKVDEC>;
|
||||
clock-names = "aclk", "iface";
|
||||
iommu-cells = <0>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
@ -614,7 +612,6 @@
|
|||
compatible = "rockchip,iommu";
|
||||
reg = <0x20053f00 0x100>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "vop_mmu";
|
||||
clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
|
||||
clock-names = "aclk", "iface";
|
||||
#iommu-cells = <0>;
|
||||
|
|
@ -625,10 +622,9 @@
|
|||
compatible = "rockchip,iommu";
|
||||
reg = <0x20070800 0x100>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "iep_mmu";
|
||||
clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;
|
||||
clock-names = "aclk", "iface";
|
||||
iommu-cells = <0>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@
|
|||
flash0-supply = <&vcc_flash>;
|
||||
flash1-supply = <&vccio_pmu>;
|
||||
gpio30-supply = <&vccio_pmu>;
|
||||
gpio1830 = <&vcc_io>;
|
||||
gpio1830-supply = <&vcc_io>;
|
||||
lcdc-supply = <&vcc_io>;
|
||||
sdcard-supply = <&vccio_sd>;
|
||||
wifi-supply = <&vcc_18>;
|
||||
|
|
|
|||
|
|
@ -357,10 +357,10 @@
|
|||
audio-supply = <&vcc_18>;
|
||||
bb-supply = <&vcc_io>;
|
||||
dvp-supply = <&vcc_io>;
|
||||
flash0-suuply = <&vcc_18>;
|
||||
flash0-supply = <&vcc_18>;
|
||||
flash1-supply = <&vcc_lan>;
|
||||
gpio30-supply = <&vcc_io>;
|
||||
gpio1830 = <&vcc_io>;
|
||||
gpio1830-supply = <&vcc_io>;
|
||||
lcdc-supply = <&vcc_io>;
|
||||
sdcard-supply = <&vccio_sd>;
|
||||
wifi-supply = <&vcc_18>;
|
||||
|
|
|
|||
|
|
@ -238,8 +238,8 @@
|
|||
compatible = "rockchip,rk3288-timer";
|
||||
reg = <0x0 0xff810000 0x0 0x20>;
|
||||
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&xin24m>, <&cru PCLK_TIMER>;
|
||||
clock-names = "timer", "pclk";
|
||||
clocks = <&cru PCLK_TIMER>, <&xin24m>;
|
||||
clock-names = "pclk", "timer";
|
||||
};
|
||||
|
||||
display-subsystem {
|
||||
|
|
@ -771,7 +771,7 @@
|
|||
* *_HDMI HDMI
|
||||
* *_MIPI_* MIPI
|
||||
*/
|
||||
pd_vio@RK3288_PD_VIO {
|
||||
power-domain@RK3288_PD_VIO {
|
||||
reg = <RK3288_PD_VIO>;
|
||||
clocks = <&cru ACLK_IEP>,
|
||||
<&cru ACLK_ISP>,
|
||||
|
|
@ -813,7 +813,7 @@
|
|||
* Note: The following 3 are HEVC(H.265) clocks,
|
||||
* and on the ACLK_HEVC_NIU (NOC).
|
||||
*/
|
||||
pd_hevc@RK3288_PD_HEVC {
|
||||
power-domain@RK3288_PD_HEVC {
|
||||
reg = <RK3288_PD_HEVC>;
|
||||
clocks = <&cru ACLK_HEVC>,
|
||||
<&cru SCLK_HEVC_CABAC>,
|
||||
|
|
@ -827,7 +827,7 @@
|
|||
* (video endecoder & decoder) clocks that on the
|
||||
* ACLK_VCODEC_NIU and HCLK_VCODEC_NIU (NOC).
|
||||
*/
|
||||
pd_video@RK3288_PD_VIDEO {
|
||||
power-domain@RK3288_PD_VIDEO {
|
||||
reg = <RK3288_PD_VIDEO>;
|
||||
clocks = <&cru ACLK_VCODEC>,
|
||||
<&cru HCLK_VCODEC>;
|
||||
|
|
@ -838,7 +838,7 @@
|
|||
* Note: ACLK_GPU is the GPU clock,
|
||||
* and on the ACLK_GPU_NIU (NOC).
|
||||
*/
|
||||
pd_gpu@RK3288_PD_GPU {
|
||||
power-domain@RK3288_PD_GPU {
|
||||
reg = <RK3288_PD_GPU>;
|
||||
clocks = <&cru ACLK_GPU>;
|
||||
pm_qos = <&qos_gpu_r>,
|
||||
|
|
@ -1575,7 +1575,7 @@
|
|||
drive-strength = <12>;
|
||||
};
|
||||
|
||||
sleep {
|
||||
suspend {
|
||||
global_pwroff: global-pwroff {
|
||||
rockchip,pins = <0 RK_PA0 1 &pcfg_pull_none>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -755,14 +755,14 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
vica: intc@10140000 {
|
||||
vica: interrupt-controller@10140000 {
|
||||
compatible = "arm,versatile-vic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <0x10140000 0x20>;
|
||||
};
|
||||
|
||||
vicb: intc@10140020 {
|
||||
vicb: interrupt-controller@10140020 {
|
||||
compatible = "arm,versatile-vic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
|
|
|||
|
|
@ -112,17 +112,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
button@0 {
|
||||
button-0 {
|
||||
label = "Wake up";
|
||||
linux,code = <KEY_WAKEUP>;
|
||||
gpios = <&gpioa 0 0>;
|
||||
};
|
||||
button@1 {
|
||||
button-1 {
|
||||
label = "Tamper";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpioc 13 0>;
|
||||
|
|
|
|||
|
|
@ -81,12 +81,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
button@0 {
|
||||
button-0 {
|
||||
label = "Wake up";
|
||||
linux,code = <KEY_WAKEUP>;
|
||||
gpios = <&gpioc 13 0>;
|
||||
|
|
|
|||
|
|
@ -79,12 +79,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
button@0 {
|
||||
button-0 {
|
||||
label = "User";
|
||||
linux,code = <KEY_HOME>;
|
||||
gpios = <&gpioa 0 0>;
|
||||
|
|
|
|||
|
|
@ -283,8 +283,6 @@
|
|||
};
|
||||
|
||||
timers13: timers@40001c00 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40001C00 0x400>;
|
||||
clocks = <&rcc 0 STM32F4_APB1_CLOCK(TIM13)>;
|
||||
|
|
@ -299,8 +297,6 @@
|
|||
};
|
||||
|
||||
timers14: timers@40002000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40002000 0x400>;
|
||||
clocks = <&rcc 0 STM32F4_APB1_CLOCK(TIM14)>;
|
||||
|
|
@ -623,8 +619,6 @@
|
|||
};
|
||||
|
||||
timers10: timers@40014400 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40014400 0x400>;
|
||||
clocks = <&rcc 0 STM32F4_APB2_CLOCK(TIM10)>;
|
||||
|
|
@ -639,8 +633,6 @@
|
|||
};
|
||||
|
||||
timers11: timers@40014800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40014800 0x400>;
|
||||
clocks = <&rcc 0 STM32F4_APB2_CLOCK(TIM11)>;
|
||||
|
|
@ -696,7 +688,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
rcc: rcc@40023810 {
|
||||
rcc: rcc@40023800 {
|
||||
#reset-cells = <1>;
|
||||
#clock-cells = <2>;
|
||||
compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
|
||||
|
|
|
|||
|
|
@ -104,12 +104,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
button@0 {
|
||||
button-0 {
|
||||
label = "User";
|
||||
linux,code = <KEY_WAKEUP>;
|
||||
gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
|
||||
|
|
|
|||
|
|
@ -265,8 +265,6 @@
|
|||
};
|
||||
|
||||
timers13: timers@40001c00 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40001C00 0x400>;
|
||||
clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM13)>;
|
||||
|
|
@ -281,8 +279,6 @@
|
|||
};
|
||||
|
||||
timers14: timers@40002000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40002000 0x400>;
|
||||
clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM14)>;
|
||||
|
|
@ -366,9 +362,9 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c3: i2c@40005C00 {
|
||||
i2c3: i2c@40005c00 {
|
||||
compatible = "st,stm32f7-i2c";
|
||||
reg = <0x40005C00 0x400>;
|
||||
reg = <0x40005c00 0x400>;
|
||||
interrupts = <72>,
|
||||
<73>;
|
||||
resets = <&rcc STM32F7_APB1_RESET(I2C3)>;
|
||||
|
|
@ -533,8 +529,6 @@
|
|||
};
|
||||
|
||||
timers10: timers@40014400 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40014400 0x400>;
|
||||
clocks = <&rcc 0 STM32F7_APB2_CLOCK(TIM10)>;
|
||||
|
|
@ -549,8 +543,6 @@
|
|||
};
|
||||
|
||||
timers11: timers@40014800 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-timers";
|
||||
reg = <0x40014800 0x400>;
|
||||
clocks = <&rcc 0 STM32F7_APB2_CLOCK(TIM11)>;
|
||||
|
|
|
|||
|
|
@ -75,12 +75,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
button@0 {
|
||||
button-0 {
|
||||
label = "User";
|
||||
linux,code = <KEY_HOME>;
|
||||
gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
|
||||
|
|
|
|||
|
|
@ -438,8 +438,6 @@
|
|||
};
|
||||
|
||||
lptimer4: timer@58002c00 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-lptimer";
|
||||
reg = <0x58002c00 0x400>;
|
||||
clocks = <&rcc LPTIM4_CK>;
|
||||
|
|
@ -454,8 +452,6 @@
|
|||
};
|
||||
|
||||
lptimer5: timer@58003000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "st,stm32-lptimer";
|
||||
reg = <0x58003000 0x400>;
|
||||
clocks = <&rcc LPTIM5_CK>;
|
||||
|
|
|
|||
|
|
@ -1311,12 +1311,6 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
stmmac_axi_config_0: stmmac-axi-config {
|
||||
snps,wr_osr_lmt = <0x7>;
|
||||
snps,rd_osr_lmt = <0x7>;
|
||||
snps,blen = <0 0 0 0 16 8 4>;
|
||||
};
|
||||
|
||||
ethernet0: ethernet@5800a000 {
|
||||
compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
|
||||
reg = <0x5800a000 0x2000>;
|
||||
|
|
@ -1339,6 +1333,12 @@
|
|||
snps,axi-config = <&stmmac_axi_config_0>;
|
||||
snps,tso;
|
||||
status = "disabled";
|
||||
|
||||
stmmac_axi_config_0: stmmac-axi-config {
|
||||
snps,wr_osr_lmt = <0x7>;
|
||||
snps,rd_osr_lmt = <0x7>;
|
||||
snps,blen = <0 0 0 0 16 8 4>;
|
||||
};
|
||||
};
|
||||
|
||||
usbh_ohci: usbh-ohci@5800c000 {
|
||||
|
|
|
|||
|
|
@ -195,16 +195,15 @@
|
|||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
vic: intc@10140000 {
|
||||
vic: interrupt-controller@10140000 {
|
||||
compatible = "arm,versatile-vic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <0x10140000 0x1000>;
|
||||
clear-mask = <0xffffffff>;
|
||||
valid-mask = <0xffffffff>;
|
||||
};
|
||||
|
||||
sic: intc@10003000 {
|
||||
sic: interrupt-controller@10003000 {
|
||||
compatible = "arm,versatile-sic";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
amba {
|
||||
/* The Versatile PB is using more SIC IRQ lines than the AB */
|
||||
sic: intc@10003000 {
|
||||
sic: interrupt-controller@10003000 {
|
||||
clear-mask = <0xffffffff>;
|
||||
/*
|
||||
* Valid interrupt lines mask according to
|
||||
|
|
|
|||
|
|
@ -62,6 +62,25 @@ config CRYPTO_SHA512_ARM
|
|||
SHA-512 secure hash standard (DFIPS 180-2) implemented
|
||||
using optimized ARM assembler and NEON, when available.
|
||||
|
||||
config CRYPTO_BLAKE2S_ARM
|
||||
tristate "BLAKE2s digest algorithm (ARM)"
|
||||
select CRYPTO_ARCH_HAVE_LIB_BLAKE2S
|
||||
help
|
||||
BLAKE2s digest algorithm optimized with ARM scalar instructions. This
|
||||
is faster than the generic implementations of BLAKE2s and BLAKE2b, but
|
||||
slower than the NEON implementation of BLAKE2b. (There is no NEON
|
||||
implementation of BLAKE2s, since NEON doesn't really help with it.)
|
||||
|
||||
config CRYPTO_BLAKE2B_NEON
|
||||
tristate "BLAKE2b digest algorithm (ARM NEON)"
|
||||
depends on KERNEL_MODE_NEON
|
||||
select CRYPTO_BLAKE2B
|
||||
help
|
||||
BLAKE2b digest algorithm optimized with ARM NEON instructions.
|
||||
On ARM processors that have NEON support but not the ARMv8
|
||||
Crypto Extensions, typically this BLAKE2b implementation is
|
||||
much faster than SHA-2 and slightly faster than SHA-1.
|
||||
|
||||
config CRYPTO_AES_ARM
|
||||
tristate "Scalar AES cipher for ARM"
|
||||
select CRYPTO_ALGAPI
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
|
|||
obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
|
||||
obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
|
||||
obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
|
||||
obj-$(CONFIG_CRYPTO_BLAKE2S_ARM) += blake2s-arm.o
|
||||
obj-$(CONFIG_CRYPTO_BLAKE2B_NEON) += blake2b-neon.o
|
||||
obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o
|
||||
obj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o
|
||||
|
||||
|
|
@ -47,6 +49,8 @@ sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
|
|||
sha256-arm-y := sha256-core.o sha256_glue.o $(sha256-arm-neon-y)
|
||||
sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o
|
||||
sha512-arm-y := sha512-core.o sha512-glue.o $(sha512-arm-neon-y)
|
||||
blake2s-arm-y := blake2s-core.o blake2s-glue.o
|
||||
blake2b-neon-y := blake2b-neon-core.o blake2b-neon-glue.o
|
||||
sha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o
|
||||
sha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o
|
||||
aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o
|
||||
|
|
|
|||
347
arch/arm/crypto/blake2b-neon-core.S
Normal file
347
arch/arm/crypto/blake2b-neon-core.S
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* BLAKE2b digest algorithm, NEON accelerated
|
||||
*
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Author: Eric Biggers <ebiggers@google.com>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
.text
|
||||
.fpu neon
|
||||
|
||||
// The arguments to blake2b_compress_neon()
|
||||
STATE .req r0
|
||||
BLOCK .req r1
|
||||
NBLOCKS .req r2
|
||||
INC .req r3
|
||||
|
||||
// Pointers to the rotation tables
|
||||
ROR24_TABLE .req r4
|
||||
ROR16_TABLE .req r5
|
||||
|
||||
// The original stack pointer
|
||||
ORIG_SP .req r6
|
||||
|
||||
// NEON registers which contain the message words of the current block.
|
||||
// M_0-M_3 are occasionally used for other purposes too.
|
||||
M_0 .req d16
|
||||
M_1 .req d17
|
||||
M_2 .req d18
|
||||
M_3 .req d19
|
||||
M_4 .req d20
|
||||
M_5 .req d21
|
||||
M_6 .req d22
|
||||
M_7 .req d23
|
||||
M_8 .req d24
|
||||
M_9 .req d25
|
||||
M_10 .req d26
|
||||
M_11 .req d27
|
||||
M_12 .req d28
|
||||
M_13 .req d29
|
||||
M_14 .req d30
|
||||
M_15 .req d31
|
||||
|
||||
.align 4
|
||||
// Tables for computing ror64(x, 24) and ror64(x, 16) using the vtbl.8
|
||||
// instruction. This is the most efficient way to implement these
|
||||
// rotation amounts with NEON. (On Cortex-A53 it's the same speed as
|
||||
// vshr.u64 + vsli.u64, while on Cortex-A7 it's faster.)
|
||||
.Lror24_table:
|
||||
.byte 3, 4, 5, 6, 7, 0, 1, 2
|
||||
.Lror16_table:
|
||||
.byte 2, 3, 4, 5, 6, 7, 0, 1
|
||||
// The BLAKE2b initialization vector
|
||||
.Lblake2b_IV:
|
||||
.quad 0x6a09e667f3bcc908, 0xbb67ae8584caa73b
|
||||
.quad 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1
|
||||
.quad 0x510e527fade682d1, 0x9b05688c2b3e6c1f
|
||||
.quad 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179
|
||||
|
||||
// Execute one round of BLAKE2b by updating the state matrix v[0..15] in the
|
||||
// NEON registers q0-q7. The message block is in q8..q15 (M_0-M_15). The stack
|
||||
// pointer points to a 32-byte aligned buffer containing a copy of q8 and q9
|
||||
// (M_0-M_3), so that they can be reloaded if they are used as temporary
|
||||
// registers. The macro arguments s0-s15 give the order in which the message
|
||||
// words are used in this round. 'final' is 1 if this is the final round.
|
||||
.macro _blake2b_round s0, s1, s2, s3, s4, s5, s6, s7, \
|
||||
s8, s9, s10, s11, s12, s13, s14, s15, final=0
|
||||
|
||||
// Mix the columns:
|
||||
// (v[0], v[4], v[8], v[12]), (v[1], v[5], v[9], v[13]),
|
||||
// (v[2], v[6], v[10], v[14]), and (v[3], v[7], v[11], v[15]).
|
||||
|
||||
// a += b + m[blake2b_sigma[r][2*i + 0]];
|
||||
vadd.u64 q0, q0, q2
|
||||
vadd.u64 q1, q1, q3
|
||||
vadd.u64 d0, d0, M_\s0
|
||||
vadd.u64 d1, d1, M_\s2
|
||||
vadd.u64 d2, d2, M_\s4
|
||||
vadd.u64 d3, d3, M_\s6
|
||||
|
||||
// d = ror64(d ^ a, 32);
|
||||
veor q6, q6, q0
|
||||
veor q7, q7, q1
|
||||
vrev64.32 q6, q6
|
||||
vrev64.32 q7, q7
|
||||
|
||||
// c += d;
|
||||
vadd.u64 q4, q4, q6
|
||||
vadd.u64 q5, q5, q7
|
||||
|
||||
// b = ror64(b ^ c, 24);
|
||||
vld1.8 {M_0}, [ROR24_TABLE, :64]
|
||||
veor q2, q2, q4
|
||||
veor q3, q3, q5
|
||||
vtbl.8 d4, {d4}, M_0
|
||||
vtbl.8 d5, {d5}, M_0
|
||||
vtbl.8 d6, {d6}, M_0
|
||||
vtbl.8 d7, {d7}, M_0
|
||||
|
||||
// a += b + m[blake2b_sigma[r][2*i + 1]];
|
||||
//
|
||||
// M_0 got clobbered above, so we have to reload it if any of the four
|
||||
// message words this step needs happens to be M_0. Otherwise we don't
|
||||
// need to reload it here, as it will just get clobbered again below.
|
||||
.if \s1 == 0 || \s3 == 0 || \s5 == 0 || \s7 == 0
|
||||
vld1.8 {M_0}, [sp, :64]
|
||||
.endif
|
||||
vadd.u64 q0, q0, q2
|
||||
vadd.u64 q1, q1, q3
|
||||
vadd.u64 d0, d0, M_\s1
|
||||
vadd.u64 d1, d1, M_\s3
|
||||
vadd.u64 d2, d2, M_\s5
|
||||
vadd.u64 d3, d3, M_\s7
|
||||
|
||||
// d = ror64(d ^ a, 16);
|
||||
vld1.8 {M_0}, [ROR16_TABLE, :64]
|
||||
veor q6, q6, q0
|
||||
veor q7, q7, q1
|
||||
vtbl.8 d12, {d12}, M_0
|
||||
vtbl.8 d13, {d13}, M_0
|
||||
vtbl.8 d14, {d14}, M_0
|
||||
vtbl.8 d15, {d15}, M_0
|
||||
|
||||
// c += d;
|
||||
vadd.u64 q4, q4, q6
|
||||
vadd.u64 q5, q5, q7
|
||||
|
||||
// b = ror64(b ^ c, 63);
|
||||
//
|
||||
// This rotation amount isn't a multiple of 8, so it has to be
|
||||
// implemented using a pair of shifts, which requires temporary
|
||||
// registers. Use q8-q9 (M_0-M_3) for this, and reload them afterwards.
|
||||
veor q8, q2, q4
|
||||
veor q9, q3, q5
|
||||
vshr.u64 q2, q8, #63
|
||||
vshr.u64 q3, q9, #63
|
||||
vsli.u64 q2, q8, #1
|
||||
vsli.u64 q3, q9, #1
|
||||
vld1.8 {q8-q9}, [sp, :256]
|
||||
|
||||
// Mix the diagonals:
|
||||
// (v[0], v[5], v[10], v[15]), (v[1], v[6], v[11], v[12]),
|
||||
// (v[2], v[7], v[8], v[13]), and (v[3], v[4], v[9], v[14]).
|
||||
//
|
||||
// There are two possible ways to do this: use 'vext' instructions to
|
||||
// shift the rows of the matrix so that the diagonals become columns,
|
||||
// and undo it afterwards; or just use 64-bit operations on 'd'
|
||||
// registers instead of 128-bit operations on 'q' registers. We use the
|
||||
// latter approach, as it performs much better on Cortex-A7.
|
||||
|
||||
// a += b + m[blake2b_sigma[r][2*i + 0]];
|
||||
vadd.u64 d0, d0, d5
|
||||
vadd.u64 d1, d1, d6
|
||||
vadd.u64 d2, d2, d7
|
||||
vadd.u64 d3, d3, d4
|
||||
vadd.u64 d0, d0, M_\s8
|
||||
vadd.u64 d1, d1, M_\s10
|
||||
vadd.u64 d2, d2, M_\s12
|
||||
vadd.u64 d3, d3, M_\s14
|
||||
|
||||
// d = ror64(d ^ a, 32);
|
||||
veor d15, d15, d0
|
||||
veor d12, d12, d1
|
||||
veor d13, d13, d2
|
||||
veor d14, d14, d3
|
||||
vrev64.32 d15, d15
|
||||
vrev64.32 d12, d12
|
||||
vrev64.32 d13, d13
|
||||
vrev64.32 d14, d14
|
||||
|
||||
// c += d;
|
||||
vadd.u64 d10, d10, d15
|
||||
vadd.u64 d11, d11, d12
|
||||
vadd.u64 d8, d8, d13
|
||||
vadd.u64 d9, d9, d14
|
||||
|
||||
// b = ror64(b ^ c, 24);
|
||||
vld1.8 {M_0}, [ROR24_TABLE, :64]
|
||||
veor d5, d5, d10
|
||||
veor d6, d6, d11
|
||||
veor d7, d7, d8
|
||||
veor d4, d4, d9
|
||||
vtbl.8 d5, {d5}, M_0
|
||||
vtbl.8 d6, {d6}, M_0
|
||||
vtbl.8 d7, {d7}, M_0
|
||||
vtbl.8 d4, {d4}, M_0
|
||||
|
||||
// a += b + m[blake2b_sigma[r][2*i + 1]];
|
||||
.if \s9 == 0 || \s11 == 0 || \s13 == 0 || \s15 == 0
|
||||
vld1.8 {M_0}, [sp, :64]
|
||||
.endif
|
||||
vadd.u64 d0, d0, d5
|
||||
vadd.u64 d1, d1, d6
|
||||
vadd.u64 d2, d2, d7
|
||||
vadd.u64 d3, d3, d4
|
||||
vadd.u64 d0, d0, M_\s9
|
||||
vadd.u64 d1, d1, M_\s11
|
||||
vadd.u64 d2, d2, M_\s13
|
||||
vadd.u64 d3, d3, M_\s15
|
||||
|
||||
// d = ror64(d ^ a, 16);
|
||||
vld1.8 {M_0}, [ROR16_TABLE, :64]
|
||||
veor d15, d15, d0
|
||||
veor d12, d12, d1
|
||||
veor d13, d13, d2
|
||||
veor d14, d14, d3
|
||||
vtbl.8 d12, {d12}, M_0
|
||||
vtbl.8 d13, {d13}, M_0
|
||||
vtbl.8 d14, {d14}, M_0
|
||||
vtbl.8 d15, {d15}, M_0
|
||||
|
||||
// c += d;
|
||||
vadd.u64 d10, d10, d15
|
||||
vadd.u64 d11, d11, d12
|
||||
vadd.u64 d8, d8, d13
|
||||
vadd.u64 d9, d9, d14
|
||||
|
||||
// b = ror64(b ^ c, 63);
|
||||
veor d16, d4, d9
|
||||
veor d17, d5, d10
|
||||
veor d18, d6, d11
|
||||
veor d19, d7, d8
|
||||
vshr.u64 q2, q8, #63
|
||||
vshr.u64 q3, q9, #63
|
||||
vsli.u64 q2, q8, #1
|
||||
vsli.u64 q3, q9, #1
|
||||
// Reloading q8-q9 can be skipped on the final round.
|
||||
.if ! \final
|
||||
vld1.8 {q8-q9}, [sp, :256]
|
||||
.endif
|
||||
.endm
|
||||
|
||||
//
|
||||
// void blake2b_compress_neon(struct blake2b_state *state,
|
||||
// const u8 *block, size_t nblocks, u32 inc);
|
||||
//
|
||||
// Only the first three fields of struct blake2b_state are used:
|
||||
// u64 h[8]; (inout)
|
||||
// u64 t[2]; (inout)
|
||||
// u64 f[2]; (in)
|
||||
//
|
||||
.align 5
|
||||
ENTRY(blake2b_compress_neon)
|
||||
push {r4-r10}
|
||||
|
||||
// Allocate a 32-byte stack buffer that is 32-byte aligned.
|
||||
mov ORIG_SP, sp
|
||||
sub ip, sp, #32
|
||||
bic ip, ip, #31
|
||||
mov sp, ip
|
||||
|
||||
adr ROR24_TABLE, .Lror24_table
|
||||
adr ROR16_TABLE, .Lror16_table
|
||||
|
||||
mov ip, STATE
|
||||
vld1.64 {q0-q1}, [ip]! // Load h[0..3]
|
||||
vld1.64 {q2-q3}, [ip]! // Load h[4..7]
|
||||
.Lnext_block:
|
||||
adr r10, .Lblake2b_IV
|
||||
vld1.64 {q14-q15}, [ip] // Load t[0..1] and f[0..1]
|
||||
vld1.64 {q4-q5}, [r10]! // Load IV[0..3]
|
||||
vmov r7, r8, d28 // Copy t[0] to (r7, r8)
|
||||
vld1.64 {q6-q7}, [r10] // Load IV[4..7]
|
||||
adds r7, r7, INC // Increment counter
|
||||
bcs .Lslow_inc_ctr
|
||||
vmov.i32 d28[0], r7
|
||||
vst1.64 {d28}, [ip] // Update t[0]
|
||||
.Linc_ctr_done:
|
||||
|
||||
// Load the next message block and finish initializing the state matrix
|
||||
// 'v'. Fortunately, there are exactly enough NEON registers to fit the
|
||||
// entire state matrix in q0-q7 and the entire message block in q8-15.
|
||||
//
|
||||
// However, _blake2b_round also needs some extra registers for rotates,
|
||||
// so we have to spill some registers. It's better to spill the message
|
||||
// registers than the state registers, as the message doesn't change.
|
||||
// Therefore we store a copy of the first 32 bytes of the message block
|
||||
// (q8-q9) in an aligned buffer on the stack so that they can be
|
||||
// reloaded when needed. (We could just reload directly from the
|
||||
// message buffer, but it's faster to use aligned loads.)
|
||||
vld1.8 {q8-q9}, [BLOCK]!
|
||||
veor q6, q6, q14 // v[12..13] = IV[4..5] ^ t[0..1]
|
||||
vld1.8 {q10-q11}, [BLOCK]!
|
||||
veor q7, q7, q15 // v[14..15] = IV[6..7] ^ f[0..1]
|
||||
vld1.8 {q12-q13}, [BLOCK]!
|
||||
vst1.8 {q8-q9}, [sp, :256]
|
||||
mov ip, STATE
|
||||
vld1.8 {q14-q15}, [BLOCK]!
|
||||
|
||||
// Execute the rounds. Each round is provided the order in which it
|
||||
// needs to use the message words.
|
||||
_blake2b_round 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
||||
_blake2b_round 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3
|
||||
_blake2b_round 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4
|
||||
_blake2b_round 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8
|
||||
_blake2b_round 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13
|
||||
_blake2b_round 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9
|
||||
_blake2b_round 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11
|
||||
_blake2b_round 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10
|
||||
_blake2b_round 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5
|
||||
_blake2b_round 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0
|
||||
_blake2b_round 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
||||
_blake2b_round 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 \
|
||||
final=1
|
||||
|
||||
// Fold the final state matrix into the hash chaining value:
|
||||
//
|
||||
// for (i = 0; i < 8; i++)
|
||||
// h[i] ^= v[i] ^ v[i + 8];
|
||||
//
|
||||
vld1.64 {q8-q9}, [ip]! // Load old h[0..3]
|
||||
veor q0, q0, q4 // v[0..1] ^= v[8..9]
|
||||
veor q1, q1, q5 // v[2..3] ^= v[10..11]
|
||||
vld1.64 {q10-q11}, [ip] // Load old h[4..7]
|
||||
veor q2, q2, q6 // v[4..5] ^= v[12..13]
|
||||
veor q3, q3, q7 // v[6..7] ^= v[14..15]
|
||||
veor q0, q0, q8 // v[0..1] ^= h[0..1]
|
||||
veor q1, q1, q9 // v[2..3] ^= h[2..3]
|
||||
mov ip, STATE
|
||||
subs NBLOCKS, NBLOCKS, #1 // nblocks--
|
||||
vst1.64 {q0-q1}, [ip]! // Store new h[0..3]
|
||||
veor q2, q2, q10 // v[4..5] ^= h[4..5]
|
||||
veor q3, q3, q11 // v[6..7] ^= h[6..7]
|
||||
vst1.64 {q2-q3}, [ip]! // Store new h[4..7]
|
||||
|
||||
// Advance to the next block, if there is one.
|
||||
bne .Lnext_block // nblocks != 0?
|
||||
|
||||
mov sp, ORIG_SP
|
||||
pop {r4-r10}
|
||||
mov pc, lr
|
||||
|
||||
.Lslow_inc_ctr:
|
||||
// Handle the case where the counter overflowed its low 32 bits, by
|
||||
// carrying the overflow bit into the full 128-bit counter.
|
||||
vmov r9, r10, d29
|
||||
adcs r8, r8, #0
|
||||
adcs r9, r9, #0
|
||||
adc r10, r10, #0
|
||||
vmov d28, r7, r8
|
||||
vmov d29, r9, r10
|
||||
vst1.64 {q14}, [ip] // Update t[0] and t[1]
|
||||
b .Linc_ctr_done
|
||||
ENDPROC(blake2b_compress_neon)
|
||||
105
arch/arm/crypto/blake2b-neon-glue.c
Normal file
105
arch/arm/crypto/blake2b-neon-glue.c
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* BLAKE2b digest algorithm, NEON accelerated
|
||||
*
|
||||
* Copyright 2020 Google LLC
|
||||
*/
|
||||
|
||||
#include <crypto/internal/blake2b.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/internal/simd.h>
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <asm/neon.h>
|
||||
#include <asm/simd.h>
|
||||
|
||||
asmlinkage void blake2b_compress_neon(struct blake2b_state *state,
|
||||
const u8 *block, size_t nblocks, u32 inc);
|
||||
|
||||
static void blake2b_compress_arch(struct blake2b_state *state,
|
||||
const u8 *block, size_t nblocks, u32 inc)
|
||||
{
|
||||
if (!crypto_simd_usable()) {
|
||||
blake2b_compress_generic(state, block, nblocks, inc);
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
const size_t blocks = min_t(size_t, nblocks,
|
||||
SZ_4K / BLAKE2B_BLOCK_SIZE);
|
||||
|
||||
kernel_neon_begin();
|
||||
blake2b_compress_neon(state, block, blocks, inc);
|
||||
kernel_neon_end();
|
||||
|
||||
nblocks -= blocks;
|
||||
block += blocks * BLAKE2B_BLOCK_SIZE;
|
||||
} while (nblocks);
|
||||
}
|
||||
|
||||
static int crypto_blake2b_update_neon(struct shash_desc *desc,
|
||||
const u8 *in, unsigned int inlen)
|
||||
{
|
||||
return crypto_blake2b_update(desc, in, inlen, blake2b_compress_arch);
|
||||
}
|
||||
|
||||
static int crypto_blake2b_final_neon(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
return crypto_blake2b_final(desc, out, blake2b_compress_arch);
|
||||
}
|
||||
|
||||
#define BLAKE2B_ALG(name, driver_name, digest_size) \
|
||||
{ \
|
||||
.base.cra_name = name, \
|
||||
.base.cra_driver_name = driver_name, \
|
||||
.base.cra_priority = 200, \
|
||||
.base.cra_flags = CRYPTO_ALG_OPTIONAL_KEY, \
|
||||
.base.cra_blocksize = BLAKE2B_BLOCK_SIZE, \
|
||||
.base.cra_ctxsize = sizeof(struct blake2b_tfm_ctx), \
|
||||
.base.cra_module = THIS_MODULE, \
|
||||
.digestsize = digest_size, \
|
||||
.setkey = crypto_blake2b_setkey, \
|
||||
.init = crypto_blake2b_init, \
|
||||
.update = crypto_blake2b_update_neon, \
|
||||
.final = crypto_blake2b_final_neon, \
|
||||
.descsize = sizeof(struct blake2b_state), \
|
||||
}
|
||||
|
||||
static struct shash_alg blake2b_neon_algs[] = {
|
||||
BLAKE2B_ALG("blake2b-160", "blake2b-160-neon", BLAKE2B_160_HASH_SIZE),
|
||||
BLAKE2B_ALG("blake2b-256", "blake2b-256-neon", BLAKE2B_256_HASH_SIZE),
|
||||
BLAKE2B_ALG("blake2b-384", "blake2b-384-neon", BLAKE2B_384_HASH_SIZE),
|
||||
BLAKE2B_ALG("blake2b-512", "blake2b-512-neon", BLAKE2B_512_HASH_SIZE),
|
||||
};
|
||||
|
||||
static int __init blake2b_neon_mod_init(void)
|
||||
{
|
||||
if (!(elf_hwcap & HWCAP_NEON))
|
||||
return -ENODEV;
|
||||
|
||||
return crypto_register_shashes(blake2b_neon_algs,
|
||||
ARRAY_SIZE(blake2b_neon_algs));
|
||||
}
|
||||
|
||||
static void __exit blake2b_neon_mod_exit(void)
|
||||
{
|
||||
crypto_unregister_shashes(blake2b_neon_algs,
|
||||
ARRAY_SIZE(blake2b_neon_algs));
|
||||
}
|
||||
|
||||
module_init(blake2b_neon_mod_init);
|
||||
module_exit(blake2b_neon_mod_exit);
|
||||
|
||||
MODULE_DESCRIPTION("BLAKE2b digest algorithm, NEON accelerated");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Eric Biggers <ebiggers@google.com>");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-160");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-160-neon");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-256");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-256-neon");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-384");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-384-neon");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-512");
|
||||
MODULE_ALIAS_CRYPTO("blake2b-512-neon");
|
||||
306
arch/arm/crypto/blake2s-core.S
Normal file
306
arch/arm/crypto/blake2s-core.S
Normal file
|
|
@ -0,0 +1,306 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* BLAKE2s digest algorithm, ARM scalar implementation
|
||||
*
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* Author: Eric Biggers <ebiggers@google.com>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
|
||||
// Registers used to hold message words temporarily. There aren't
|
||||
// enough ARM registers to hold the whole message block, so we have to
|
||||
// load the words on-demand.
|
||||
M_0 .req r12
|
||||
M_1 .req r14
|
||||
|
||||
// The BLAKE2s initialization vector
|
||||
.Lblake2s_IV:
|
||||
.word 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A
|
||||
.word 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19
|
||||
|
||||
.macro __ldrd a, b, src, offset
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
ldrd \a, \b, [\src, #\offset]
|
||||
#else
|
||||
ldr \a, [\src, #\offset]
|
||||
ldr \b, [\src, #\offset + 4]
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro __strd a, b, dst, offset
|
||||
#if __LINUX_ARM_ARCH__ >= 6
|
||||
strd \a, \b, [\dst, #\offset]
|
||||
#else
|
||||
str \a, [\dst, #\offset]
|
||||
str \b, [\dst, #\offset + 4]
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro _le32_bswap a, tmp
|
||||
#ifdef __ARMEB__
|
||||
rev_l \a, \tmp
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro _le32_bswap_8x a, b, c, d, e, f, g, h, tmp
|
||||
_le32_bswap \a, \tmp
|
||||
_le32_bswap \b, \tmp
|
||||
_le32_bswap \c, \tmp
|
||||
_le32_bswap \d, \tmp
|
||||
_le32_bswap \e, \tmp
|
||||
_le32_bswap \f, \tmp
|
||||
_le32_bswap \g, \tmp
|
||||
_le32_bswap \h, \tmp
|
||||
.endm
|
||||
|
||||
// Execute a quarter-round of BLAKE2s by mixing two columns or two diagonals.
|
||||
// (a0, b0, c0, d0) and (a1, b1, c1, d1) give the registers containing the two
|
||||
// columns/diagonals. s0-s1 are the word offsets to the message words the first
|
||||
// column/diagonal needs, and likewise s2-s3 for the second column/diagonal.
|
||||
// M_0 and M_1 are free to use, and the message block can be found at sp + 32.
|
||||
//
|
||||
// Note that to save instructions, the rotations don't happen when the
|
||||
// pseudocode says they should, but rather they are delayed until the values are
|
||||
// used. See the comment above _blake2s_round().
|
||||
.macro _blake2s_quarterround a0, b0, c0, d0, a1, b1, c1, d1, s0, s1, s2, s3
|
||||
|
||||
ldr M_0, [sp, #32 + 4 * \s0]
|
||||
ldr M_1, [sp, #32 + 4 * \s2]
|
||||
|
||||
// a += b + m[blake2s_sigma[r][2*i + 0]];
|
||||
add \a0, \a0, \b0, ror #brot
|
||||
add \a1, \a1, \b1, ror #brot
|
||||
add \a0, \a0, M_0
|
||||
add \a1, \a1, M_1
|
||||
|
||||
// d = ror32(d ^ a, 16);
|
||||
eor \d0, \a0, \d0, ror #drot
|
||||
eor \d1, \a1, \d1, ror #drot
|
||||
|
||||
// c += d;
|
||||
add \c0, \c0, \d0, ror #16
|
||||
add \c1, \c1, \d1, ror #16
|
||||
|
||||
// b = ror32(b ^ c, 12);
|
||||
eor \b0, \c0, \b0, ror #brot
|
||||
eor \b1, \c1, \b1, ror #brot
|
||||
|
||||
ldr M_0, [sp, #32 + 4 * \s1]
|
||||
ldr M_1, [sp, #32 + 4 * \s3]
|
||||
|
||||
// a += b + m[blake2s_sigma[r][2*i + 1]];
|
||||
add \a0, \a0, \b0, ror #12
|
||||
add \a1, \a1, \b1, ror #12
|
||||
add \a0, \a0, M_0
|
||||
add \a1, \a1, M_1
|
||||
|
||||
// d = ror32(d ^ a, 8);
|
||||
eor \d0, \a0, \d0, ror#16
|
||||
eor \d1, \a1, \d1, ror#16
|
||||
|
||||
// c += d;
|
||||
add \c0, \c0, \d0, ror#8
|
||||
add \c1, \c1, \d1, ror#8
|
||||
|
||||
// b = ror32(b ^ c, 7);
|
||||
eor \b0, \c0, \b0, ror#12
|
||||
eor \b1, \c1, \b1, ror#12
|
||||
.endm
|
||||
|
||||
// Execute one round of BLAKE2s by updating the state matrix v[0..15]. v[0..9]
|
||||
// are in r0..r9. The stack pointer points to 8 bytes of scratch space for
|
||||
// spilling v[8..9], then to v[9..15], then to the message block. r10-r12 and
|
||||
// r14 are free to use. The macro arguments s0-s15 give the order in which the
|
||||
// message words are used in this round.
|
||||
//
|
||||
// All rotates are performed using the implicit rotate operand accepted by the
|
||||
// 'add' and 'eor' instructions. This is faster than using explicit rotate
|
||||
// instructions. To make this work, we allow the values in the second and last
|
||||
// rows of the BLAKE2s state matrix (rows 'b' and 'd') to temporarily have the
|
||||
// wrong rotation amount. The rotation amount is then fixed up just in time
|
||||
// when the values are used. 'brot' is the number of bits the values in row 'b'
|
||||
// need to be rotated right to arrive at the correct values, and 'drot'
|
||||
// similarly for row 'd'. (brot, drot) start out as (0, 0) but we make it such
|
||||
// that they end up as (7, 8) after every round.
|
||||
.macro _blake2s_round s0, s1, s2, s3, s4, s5, s6, s7, \
|
||||
s8, s9, s10, s11, s12, s13, s14, s15
|
||||
|
||||
// Mix first two columns:
|
||||
// (v[0], v[4], v[8], v[12]) and (v[1], v[5], v[9], v[13]).
|
||||
__ldrd r10, r11, sp, 16 // load v[12] and v[13]
|
||||
_blake2s_quarterround r0, r4, r8, r10, r1, r5, r9, r11, \
|
||||
\s0, \s1, \s2, \s3
|
||||
__strd r8, r9, sp, 0
|
||||
__strd r10, r11, sp, 16
|
||||
|
||||
// Mix second two columns:
|
||||
// (v[2], v[6], v[10], v[14]) and (v[3], v[7], v[11], v[15]).
|
||||
__ldrd r8, r9, sp, 8 // load v[10] and v[11]
|
||||
__ldrd r10, r11, sp, 24 // load v[14] and v[15]
|
||||
_blake2s_quarterround r2, r6, r8, r10, r3, r7, r9, r11, \
|
||||
\s4, \s5, \s6, \s7
|
||||
str r10, [sp, #24] // store v[14]
|
||||
// v[10], v[11], and v[15] are used below, so no need to store them yet.
|
||||
|
||||
.set brot, 7
|
||||
.set drot, 8
|
||||
|
||||
// Mix first two diagonals:
|
||||
// (v[0], v[5], v[10], v[15]) and (v[1], v[6], v[11], v[12]).
|
||||
ldr r10, [sp, #16] // load v[12]
|
||||
_blake2s_quarterround r0, r5, r8, r11, r1, r6, r9, r10, \
|
||||
\s8, \s9, \s10, \s11
|
||||
__strd r8, r9, sp, 8
|
||||
str r11, [sp, #28]
|
||||
str r10, [sp, #16]
|
||||
|
||||
// Mix second two diagonals:
|
||||
// (v[2], v[7], v[8], v[13]) and (v[3], v[4], v[9], v[14]).
|
||||
__ldrd r8, r9, sp, 0 // load v[8] and v[9]
|
||||
__ldrd r10, r11, sp, 20 // load v[13] and v[14]
|
||||
_blake2s_quarterround r2, r7, r8, r10, r3, r4, r9, r11, \
|
||||
\s12, \s13, \s14, \s15
|
||||
__strd r10, r11, sp, 20
|
||||
.endm
|
||||
|
||||
//
|
||||
// void blake2s_compress_arch(struct blake2s_state *state,
|
||||
// const u8 *block, size_t nblocks, u32 inc);
|
||||
//
|
||||
// Only the first three fields of struct blake2s_state are used:
|
||||
// u32 h[8]; (inout)
|
||||
// u32 t[2]; (inout)
|
||||
// u32 f[2]; (in)
|
||||
//
|
||||
.align 5
|
||||
ENTRY(blake2s_compress_arch)
|
||||
push {r0-r2,r4-r11,lr} // keep this an even number
|
||||
|
||||
.Lnext_block:
|
||||
// r0 is 'state'
|
||||
// r1 is 'block'
|
||||
// r3 is 'inc'
|
||||
|
||||
// Load and increment the counter t[0..1].
|
||||
__ldrd r10, r11, r0, 32
|
||||
adds r10, r10, r3
|
||||
adc r11, r11, #0
|
||||
__strd r10, r11, r0, 32
|
||||
|
||||
// _blake2s_round is very short on registers, so copy the message block
|
||||
// to the stack to save a register during the rounds. This also has the
|
||||
// advantage that misalignment only needs to be dealt with in one place.
|
||||
sub sp, sp, #64
|
||||
mov r12, sp
|
||||
tst r1, #3
|
||||
bne .Lcopy_block_misaligned
|
||||
ldmia r1!, {r2-r9}
|
||||
_le32_bswap_8x r2, r3, r4, r5, r6, r7, r8, r9, r14
|
||||
stmia r12!, {r2-r9}
|
||||
ldmia r1!, {r2-r9}
|
||||
_le32_bswap_8x r2, r3, r4, r5, r6, r7, r8, r9, r14
|
||||
stmia r12, {r2-r9}
|
||||
.Lcopy_block_done:
|
||||
str r1, [sp, #68] // Update message pointer
|
||||
|
||||
// Calculate v[8..15]. Push v[9..15] onto the stack, and leave space
|
||||
// for spilling v[8..9]. Leave v[8..9] in r8-r9.
|
||||
mov r14, r0 // r14 = state
|
||||
adr r12, .Lblake2s_IV
|
||||
ldmia r12!, {r8-r9} // load IV[0..1]
|
||||
__ldrd r0, r1, r14, 40 // load f[0..1]
|
||||
ldm r12, {r2-r7} // load IV[3..7]
|
||||
eor r4, r4, r10 // v[12] = IV[4] ^ t[0]
|
||||
eor r5, r5, r11 // v[13] = IV[5] ^ t[1]
|
||||
eor r6, r6, r0 // v[14] = IV[6] ^ f[0]
|
||||
eor r7, r7, r1 // v[15] = IV[7] ^ f[1]
|
||||
push {r2-r7} // push v[9..15]
|
||||
sub sp, sp, #8 // leave space for v[8..9]
|
||||
|
||||
// Load h[0..7] == v[0..7].
|
||||
ldm r14, {r0-r7}
|
||||
|
||||
// Execute the rounds. Each round is provided the order in which it
|
||||
// needs to use the message words.
|
||||
.set brot, 0
|
||||
.set drot, 0
|
||||
_blake2s_round 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
||||
_blake2s_round 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3
|
||||
_blake2s_round 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4
|
||||
_blake2s_round 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8
|
||||
_blake2s_round 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13
|
||||
_blake2s_round 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9
|
||||
_blake2s_round 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11
|
||||
_blake2s_round 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10
|
||||
_blake2s_round 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5
|
||||
_blake2s_round 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0
|
||||
|
||||
// Fold the final state matrix into the hash chaining value:
|
||||
//
|
||||
// for (i = 0; i < 8; i++)
|
||||
// h[i] ^= v[i] ^ v[i + 8];
|
||||
//
|
||||
ldr r14, [sp, #96] // r14 = &h[0]
|
||||
add sp, sp, #8 // v[8..9] are already loaded.
|
||||
pop {r10-r11} // load v[10..11]
|
||||
eor r0, r0, r8
|
||||
eor r1, r1, r9
|
||||
eor r2, r2, r10
|
||||
eor r3, r3, r11
|
||||
ldm r14, {r8-r11} // load h[0..3]
|
||||
eor r0, r0, r8
|
||||
eor r1, r1, r9
|
||||
eor r2, r2, r10
|
||||
eor r3, r3, r11
|
||||
stmia r14!, {r0-r3} // store new h[0..3]
|
||||
ldm r14, {r0-r3} // load old h[4..7]
|
||||
pop {r8-r11} // load v[12..15]
|
||||
eor r0, r0, r4, ror #brot
|
||||
eor r1, r1, r5, ror #brot
|
||||
eor r2, r2, r6, ror #brot
|
||||
eor r3, r3, r7, ror #brot
|
||||
eor r0, r0, r8, ror #drot
|
||||
eor r1, r1, r9, ror #drot
|
||||
eor r2, r2, r10, ror #drot
|
||||
eor r3, r3, r11, ror #drot
|
||||
add sp, sp, #64 // skip copy of message block
|
||||
stm r14, {r0-r3} // store new h[4..7]
|
||||
|
||||
// Advance to the next block, if there is one. Note that if there are
|
||||
// multiple blocks, then 'inc' (the counter increment amount) must be
|
||||
// 64. So we can simply set it to 64 without re-loading it.
|
||||
ldm sp, {r0, r1, r2} // load (state, block, nblocks)
|
||||
mov r3, #64 // set 'inc'
|
||||
subs r2, r2, #1 // nblocks--
|
||||
str r2, [sp, #8]
|
||||
bne .Lnext_block // nblocks != 0?
|
||||
|
||||
pop {r0-r2,r4-r11,pc}
|
||||
|
||||
// The next message block (pointed to by r1) isn't 4-byte aligned, so it
|
||||
// can't be loaded using ldmia. Copy it to the stack buffer (pointed to
|
||||
// by r12) using an alternative method. r2-r9 are free to use.
|
||||
.Lcopy_block_misaligned:
|
||||
mov r2, #64
|
||||
1:
|
||||
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
ldr r3, [r1], #4
|
||||
_le32_bswap r3, r4
|
||||
#else
|
||||
ldrb r3, [r1, #0]
|
||||
ldrb r4, [r1, #1]
|
||||
ldrb r5, [r1, #2]
|
||||
ldrb r6, [r1, #3]
|
||||
add r1, r1, #4
|
||||
orr r3, r3, r4, lsl #8
|
||||
orr r3, r3, r5, lsl #16
|
||||
orr r3, r3, r6, lsl #24
|
||||
#endif
|
||||
subs r2, r2, #4
|
||||
str r3, [r12], #4
|
||||
bne 1b
|
||||
b .Lcopy_block_done
|
||||
ENDPROC(blake2s_compress_arch)
|
||||
78
arch/arm/crypto/blake2s-glue.c
Normal file
78
arch/arm/crypto/blake2s-glue.c
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* BLAKE2s digest algorithm, ARM scalar implementation
|
||||
*
|
||||
* Copyright 2020 Google LLC
|
||||
*/
|
||||
|
||||
#include <crypto/internal/blake2s.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
/* defined in blake2s-core.S */
|
||||
EXPORT_SYMBOL(blake2s_compress_arch);
|
||||
|
||||
static int crypto_blake2s_update_arm(struct shash_desc *desc,
|
||||
const u8 *in, unsigned int inlen)
|
||||
{
|
||||
return crypto_blake2s_update(desc, in, inlen, blake2s_compress_arch);
|
||||
}
|
||||
|
||||
static int crypto_blake2s_final_arm(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
return crypto_blake2s_final(desc, out, blake2s_compress_arch);
|
||||
}
|
||||
|
||||
#define BLAKE2S_ALG(name, driver_name, digest_size) \
|
||||
{ \
|
||||
.base.cra_name = name, \
|
||||
.base.cra_driver_name = driver_name, \
|
||||
.base.cra_priority = 200, \
|
||||
.base.cra_flags = CRYPTO_ALG_OPTIONAL_KEY, \
|
||||
.base.cra_blocksize = BLAKE2S_BLOCK_SIZE, \
|
||||
.base.cra_ctxsize = sizeof(struct blake2s_tfm_ctx), \
|
||||
.base.cra_module = THIS_MODULE, \
|
||||
.digestsize = digest_size, \
|
||||
.setkey = crypto_blake2s_setkey, \
|
||||
.init = crypto_blake2s_init, \
|
||||
.update = crypto_blake2s_update_arm, \
|
||||
.final = crypto_blake2s_final_arm, \
|
||||
.descsize = sizeof(struct blake2s_state), \
|
||||
}
|
||||
|
||||
static struct shash_alg blake2s_arm_algs[] = {
|
||||
BLAKE2S_ALG("blake2s-128", "blake2s-128-arm", BLAKE2S_128_HASH_SIZE),
|
||||
BLAKE2S_ALG("blake2s-160", "blake2s-160-arm", BLAKE2S_160_HASH_SIZE),
|
||||
BLAKE2S_ALG("blake2s-224", "blake2s-224-arm", BLAKE2S_224_HASH_SIZE),
|
||||
BLAKE2S_ALG("blake2s-256", "blake2s-256-arm", BLAKE2S_256_HASH_SIZE),
|
||||
};
|
||||
|
||||
static int __init blake2s_arm_mod_init(void)
|
||||
{
|
||||
return IS_REACHABLE(CONFIG_CRYPTO_HASH) ?
|
||||
crypto_register_shashes(blake2s_arm_algs,
|
||||
ARRAY_SIZE(blake2s_arm_algs)) : 0;
|
||||
}
|
||||
|
||||
static void __exit blake2s_arm_mod_exit(void)
|
||||
{
|
||||
if (IS_REACHABLE(CONFIG_CRYPTO_HASH))
|
||||
crypto_unregister_shashes(blake2s_arm_algs,
|
||||
ARRAY_SIZE(blake2s_arm_algs));
|
||||
}
|
||||
|
||||
module_init(blake2s_arm_mod_init);
|
||||
module_exit(blake2s_arm_mod_exit);
|
||||
|
||||
MODULE_DESCRIPTION("BLAKE2s digest algorithm, ARM scalar implementation");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Eric Biggers <ebiggers@google.com>");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-128");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-128-arm");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-160");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-160-arm");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-224");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-224-arm");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-256");
|
||||
MODULE_ALIAS_CRYPTO("blake2s-256-arm");
|
||||
|
|
@ -17,10 +17,14 @@ CFLAGS_REMOVE_return_address.o = -pg
|
|||
# Object file lists.
|
||||
|
||||
obj-y := elf.o entry-common.o irq.o opcodes.o \
|
||||
process.o ptrace.o reboot.o return_address.o \
|
||||
process.o ptrace.o reboot.o \
|
||||
setup.o signal.o sigreturn_codes.o \
|
||||
stacktrace.o sys_arm.o time.o traps.o
|
||||
|
||||
ifneq ($(CONFIG_ARM_UNWIND),y)
|
||||
obj-$(CONFIG_FRAME_POINTER) += return_address.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_ATAGS) += atags_parse.o
|
||||
obj-$(CONFIG_ATAGS_PROC) += atags_proc.o
|
||||
obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
*/
|
||||
#include <linux/export.h>
|
||||
#include <linux/ftrace.h>
|
||||
|
||||
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <asm/stacktrace.h>
|
||||
|
|
@ -53,6 +51,4 @@ void *return_address(unsigned int level)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
|
||||
|
||||
EXPORT_SYMBOL_GPL(return_address);
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ struct mmdc_pmu {
|
|||
struct perf_event *mmdc_events[MMDC_NUM_COUNTERS];
|
||||
struct hlist_node node;
|
||||
struct fsl_mmdc_devtype_data *devtype_data;
|
||||
struct clk *mmdc_ipg_clk;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -462,11 +463,14 @@ static int imx_mmdc_remove(struct platform_device *pdev)
|
|||
|
||||
cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
|
||||
perf_pmu_unregister(&pmu_mmdc->pmu);
|
||||
iounmap(pmu_mmdc->mmdc_base);
|
||||
clk_disable_unprepare(pmu_mmdc->mmdc_ipg_clk);
|
||||
kfree(pmu_mmdc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_base)
|
||||
static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_base,
|
||||
struct clk *mmdc_ipg_clk)
|
||||
{
|
||||
struct mmdc_pmu *pmu_mmdc;
|
||||
char *name;
|
||||
|
|
@ -494,6 +498,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
|
|||
}
|
||||
|
||||
mmdc_num = mmdc_pmu_init(pmu_mmdc, mmdc_base, &pdev->dev);
|
||||
pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
|
||||
if (mmdc_num == 0)
|
||||
name = "mmdc";
|
||||
else
|
||||
|
|
@ -529,7 +534,7 @@ pmu_free:
|
|||
|
||||
#else
|
||||
#define imx_mmdc_remove NULL
|
||||
#define imx_mmdc_perf_init(pdev, mmdc_base) 0
|
||||
#define imx_mmdc_perf_init(pdev, mmdc_base, mmdc_ipg_clk) 0
|
||||
#endif
|
||||
|
||||
static int imx_mmdc_probe(struct platform_device *pdev)
|
||||
|
|
@ -567,7 +572,13 @@ static int imx_mmdc_probe(struct platform_device *pdev)
|
|||
val &= ~(1 << BP_MMDC_MAPSR_PSD);
|
||||
writel_relaxed(val, reg);
|
||||
|
||||
return imx_mmdc_perf_init(pdev, mmdc_base);
|
||||
err = imx_mmdc_perf_init(pdev, mmdc_base, mmdc_ipg_clk);
|
||||
if (err) {
|
||||
iounmap(mmdc_base);
|
||||
clk_disable_unprepare(mmdc_ipg_clk);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int imx_mmdc_get_ddr_type(void)
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@
|
|||
* ^
|
||||
* ^
|
||||
* imx53_suspend code
|
||||
* PM_INFO structure(imx53_suspend_info)
|
||||
* PM_INFO structure(imx5_cpu_suspend_info)
|
||||
* ======================== low address =======================
|
||||
*/
|
||||
|
||||
/* Offsets of members of struct imx53_suspend_info */
|
||||
/* Offsets of members of struct imx5_cpu_suspend_info */
|
||||
#define SUSPEND_INFO_MX53_M4IF_V_OFFSET 0x0
|
||||
#define SUSPEND_INFO_MX53_IOMUXC_V_OFFSET 0x4
|
||||
#define SUSPEND_INFO_MX53_IO_COUNT_OFFSET 0x8
|
||||
|
|
|
|||
|
|
@ -1602,6 +1602,9 @@ exit:
|
|||
rn = arm_bpf_get_reg32(src_lo, tmp2[1], ctx);
|
||||
emit_ldx_r(dst, rn, off, ctx, BPF_SIZE(code));
|
||||
break;
|
||||
/* speculation barrier */
|
||||
case BPF_ST | BPF_NOSPEC:
|
||||
break;
|
||||
/* ST: *(size *)(dst + off) = imm */
|
||||
case BPF_ST | BPF_MEM | BPF_W:
|
||||
case BPF_ST | BPF_MEM | BPF_H:
|
||||
|
|
|
|||
|
|
@ -537,13 +537,13 @@
|
|||
clocks {
|
||||
compatible = "arm,scpi-clocks";
|
||||
|
||||
scpi_dvfs: scpi-dvfs {
|
||||
scpi_dvfs: clocks-0 {
|
||||
compatible = "arm,scpi-dvfs-clocks";
|
||||
#clock-cells = <1>;
|
||||
clock-indices = <0>, <1>, <2>;
|
||||
clock-output-names = "atlclk", "aplclk","gpuclk";
|
||||
};
|
||||
scpi_clk: scpi-clk {
|
||||
scpi_clk: clocks-1 {
|
||||
compatible = "arm,scpi-variable-clocks";
|
||||
#clock-cells = <1>;
|
||||
clock-indices = <3>;
|
||||
|
|
@ -551,7 +551,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
scpi_devpd: scpi-power-domains {
|
||||
scpi_devpd: power-controller {
|
||||
compatible = "arm,scpi-power-domains";
|
||||
num-domains = <2>;
|
||||
#power-domain-cells = <1>;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
#address-cells = <0>;
|
||||
interrupt-controller;
|
||||
reg = <0x11001000 0x1000>,
|
||||
<0x11002000 0x1000>,
|
||||
<0x11002000 0x2000>,
|
||||
<0x11004000 0x2000>,
|
||||
<0x11006000 0x2000>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
sysclk: clock-sysclk {
|
||||
sysclk: sysclk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <100000000>;
|
||||
|
|
|
|||
|
|
@ -501,7 +501,6 @@
|
|||
clocks = <&clockgen 4 3>;
|
||||
clock-names = "dspi";
|
||||
spi-num-chipselects = <5>;
|
||||
bus-num = <0>;
|
||||
};
|
||||
|
||||
esdhc: esdhc@2140000 {
|
||||
|
|
|
|||
|
|
@ -1056,6 +1056,14 @@
|
|||
<&src IMX8MQ_RESET_PCIE_CTRL_APPS_EN>,
|
||||
<&src IMX8MQ_RESET_PCIE_CTRL_APPS_TURNOFF>;
|
||||
reset-names = "pciephy", "apps", "turnoff";
|
||||
assigned-clocks = <&clk IMX8MQ_CLK_PCIE1_CTRL>,
|
||||
<&clk IMX8MQ_CLK_PCIE1_PHY>,
|
||||
<&clk IMX8MQ_CLK_PCIE1_AUX>;
|
||||
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_250M>,
|
||||
<&clk IMX8MQ_SYS2_PLL_100M>,
|
||||
<&clk IMX8MQ_SYS1_PLL_80M>;
|
||||
assigned-clock-rates = <250000000>, <100000000>,
|
||||
<10000000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
@ -1085,6 +1093,14 @@
|
|||
<&src IMX8MQ_RESET_PCIE2_CTRL_APPS_EN>,
|
||||
<&src IMX8MQ_RESET_PCIE2_CTRL_APPS_TURNOFF>;
|
||||
reset-names = "pciephy", "apps", "turnoff";
|
||||
assigned-clocks = <&clk IMX8MQ_CLK_PCIE2_CTRL>,
|
||||
<&clk IMX8MQ_CLK_PCIE2_PHY>,
|
||||
<&clk IMX8MQ_CLK_PCIE2_AUX>;
|
||||
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_250M>,
|
||||
<&clk IMX8MQ_SYS2_PLL_100M>,
|
||||
<&clk IMX8MQ_SYS1_PLL_80M>;
|
||||
assigned-clock-rates = <250000000>, <100000000>,
|
||||
<10000000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -106,12 +106,19 @@
|
|||
/* enabled by U-Boot if SFP module is present */
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
firmware {
|
||||
armada-3700-rwtm {
|
||||
compatible = "marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
clock-frequency = <100000>;
|
||||
/delete-property/ mrvl,i2c-fast-mode;
|
||||
status = "okay";
|
||||
|
||||
rtc@6f {
|
||||
|
|
|
|||
|
|
@ -500,4 +500,12 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
firmware {
|
||||
armada-3700-rwtm {
|
||||
compatible = "marvell,armada-3700-rwtm-firmware";
|
||||
mboxes = <&rwtm 0>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,3 +30,7 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
&msmgpio {
|
||||
gpio-reserved-ranges = <85 4>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -277,10 +277,6 @@
|
|||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
|
||||
|
||||
/* Depends on LVDS */
|
||||
max-clock = <135000000>;
|
||||
min-vrefresh = <50>;
|
||||
|
||||
adi,input-depth = <8>;
|
||||
adi,input-colorspace = "rgb";
|
||||
adi,input-clock = "1x";
|
||||
|
|
|
|||
|
|
@ -213,20 +213,20 @@
|
|||
#size-cells = <0>;
|
||||
|
||||
/* These power domains are grouped by VD_LOGIC */
|
||||
pd_usb@PX30_PD_USB {
|
||||
power-domain@PX30_PD_USB {
|
||||
reg = <PX30_PD_USB>;
|
||||
clocks = <&cru HCLK_HOST>,
|
||||
<&cru HCLK_OTG>,
|
||||
<&cru SCLK_OTG_ADP>;
|
||||
pm_qos = <&qos_usb_host>, <&qos_usb_otg>;
|
||||
};
|
||||
pd_sdcard@PX30_PD_SDCARD {
|
||||
power-domain@PX30_PD_SDCARD {
|
||||
reg = <PX30_PD_SDCARD>;
|
||||
clocks = <&cru HCLK_SDMMC>,
|
||||
<&cru SCLK_SDMMC>;
|
||||
pm_qos = <&qos_sdmmc>;
|
||||
};
|
||||
pd_gmac@PX30_PD_GMAC {
|
||||
power-domain@PX30_PD_GMAC {
|
||||
reg = <PX30_PD_GMAC>;
|
||||
clocks = <&cru ACLK_GMAC>,
|
||||
<&cru PCLK_GMAC>,
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
<&cru SCLK_GMAC_RX_TX>;
|
||||
pm_qos = <&qos_gmac>;
|
||||
};
|
||||
pd_mmc_nand@PX30_PD_MMC_NAND {
|
||||
power-domain@PX30_PD_MMC_NAND {
|
||||
reg = <PX30_PD_MMC_NAND>;
|
||||
clocks = <&cru HCLK_NANDC>,
|
||||
<&cru HCLK_EMMC>,
|
||||
|
|
@ -247,14 +247,14 @@
|
|||
pm_qos = <&qos_emmc>, <&qos_nand>,
|
||||
<&qos_sdio>, <&qos_sfc>;
|
||||
};
|
||||
pd_vpu@PX30_PD_VPU {
|
||||
power-domain@PX30_PD_VPU {
|
||||
reg = <PX30_PD_VPU>;
|
||||
clocks = <&cru ACLK_VPU>,
|
||||
<&cru HCLK_VPU>,
|
||||
<&cru SCLK_CORE_VPU>;
|
||||
pm_qos = <&qos_vpu>, <&qos_vpu_r128>;
|
||||
};
|
||||
pd_vo@PX30_PD_VO {
|
||||
power-domain@PX30_PD_VO {
|
||||
reg = <PX30_PD_VO>;
|
||||
clocks = <&cru ACLK_RGA>,
|
||||
<&cru ACLK_VOPB>,
|
||||
|
|
@ -270,7 +270,7 @@
|
|||
pm_qos = <&qos_rga_rd>, <&qos_rga_wr>,
|
||||
<&qos_vop_m0>, <&qos_vop_m1>;
|
||||
};
|
||||
pd_vi@PX30_PD_VI {
|
||||
power-domain@PX30_PD_VI {
|
||||
reg = <PX30_PD_VI>;
|
||||
clocks = <&cru ACLK_CIF>,
|
||||
<&cru ACLK_ISP>,
|
||||
|
|
@ -281,7 +281,7 @@
|
|||
<&qos_isp_wr>, <&qos_isp_m1>,
|
||||
<&qos_vip>;
|
||||
};
|
||||
pd_gpu@PX30_PD_GPU {
|
||||
power-domain@PX30_PD_GPU {
|
||||
reg = <PX30_PD_GPU>;
|
||||
clocks = <&cru SCLK_GPU>;
|
||||
pm_qos = <&qos_gpu>;
|
||||
|
|
|
|||
|
|
@ -270,13 +270,13 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pd_hevc@RK3328_PD_HEVC {
|
||||
power-domain@RK3328_PD_HEVC {
|
||||
reg = <RK3328_PD_HEVC>;
|
||||
};
|
||||
pd_video@RK3328_PD_VIDEO {
|
||||
power-domain@RK3328_PD_VIDEO {
|
||||
reg = <RK3328_PD_VIDEO>;
|
||||
};
|
||||
pd_vpu@RK3328_PD_VPU {
|
||||
power-domain@RK3328_PD_VPU {
|
||||
reg = <RK3328_PD_VPU>;
|
||||
clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
|
||||
};
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue