Merge 5.10.138 into android12-5.10-lts
Changes in 5.10.138 ALSA: info: Fix llseek return value when using callback ALSA: hda/realtek: Add quirk for Clevo NS50PU, NS70PU x86/mm: Use proper mask when setting PUD mapping rds: add missing barrier to release_refill ata: libata-eh: Add missing command name mmc: pxamci: Fix another error handling path in pxamci_probe() mmc: pxamci: Fix an error handling path in pxamci_probe() mmc: meson-gx: Fix an error handling path in meson_mmc_probe() btrfs: fix lost error handling when looking up extended ref on log replay tracing: Have filter accept "common_cpu" to be consistent ALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II can: ems_usb: fix clang's -Wunaligned-access warning apparmor: fix quiet_denied for file rules apparmor: fix absroot causing audited secids to begin with = apparmor: Fix failed mount permission check error message apparmor: fix aa_label_asxprint return check apparmor: fix setting unconfined mode on a loaded profile apparmor: fix overlapping attachment computation apparmor: fix reference count leak in aa_pivotroot() apparmor: Fix memleak in aa_simple_write_to_buffer() Documentation: ACPI: EINJ: Fix obsolete example NFSv4.1: Don't decrease the value of seq_nr_highest_sent NFSv4.1: Handle NFS4ERR_DELAY replies to OP_SEQUENCE correctly NFSv4: Fix races in the legacy idmapper upcall NFSv4.1: RECLAIM_COMPLETE must handle EACCES NFSv4/pnfs: Fix a use-after-free bug in open bpf: Acquire map uref in .init_seq_private for array map iterator bpf: Acquire map uref in .init_seq_private for hash map iterator bpf: Acquire map uref in .init_seq_private for sock local storage map iterator bpf: Acquire map uref in .init_seq_private for sock{map,hash} iterator bpf: Check the validity of max_rdwr_access for sock local storage map iterator can: mcp251x: Fix race condition on receive interrupt net: atlantic: fix aq_vec index out of range error sunrpc: fix expiry of auth creds SUNRPC: Reinitialise the backchannel request buffers before reuse virtio_net: fix memory leak inside XPD_TX with mergeable devlink: Fix use-after-free after a failed reload net: bgmac: Fix a BUG triggered by wrong bytes_compl pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed pinctrl: sunxi: Add I/O bias setting for H6 R-PIO pinctrl: qcom: sm8250: Fix PDC map ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool geneve: do not use RT_TOS for IPv6 flowlabel ipv6: do not use RT_TOS for IPv6 flowlabel plip: avoid rcu debug splat vsock: Fix memory leak in vsock_connect() vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout() dt-bindings: arm: qcom: fix MSM8916 MTP compatibles dt-bindings: clock: qcom,gcc-msm8996: add more GCC clock sources ceph: use correct index when encoding client supported features tools/vm/slabinfo: use alphabetic order when two values are equal ceph: don't leak snap_rwsem in handle_cap_grant kbuild: dummy-tools: avoid tmpdir leak in dummy gcc tools build: Switch to new openssl API for test-libcrypto NTB: ntb_tool: uninitialized heap data in tool_fn_write() nfp: ethtool: fix the display error of `ethtool -m DEVNAME` xen/xenbus: fix return type in xenbus_file_read() atm: idt77252: fix use-after-free bugs caused by tst_timer geneve: fix TOS inheriting for ipv4 perf probe: Fix an error handling path in 'parse_perf_probe_command()' dpaa2-eth: trace the allocated address instead of page struct nios2: page fault et.al. are *not* restartable syscalls... nios2: don't leave NULLs in sys_call_table[] nios2: traced syscall does need to check the syscall number nios2: fix syscall restart checks nios2: restarts apply only to the first sigframe we build... nios2: add force_successful_syscall_return() iavf: Fix adminq error handling ASoC: tas2770: Set correct FSYNC polarity ASoC: tas2770: Allow mono streams ASoC: tas2770: Drop conflicting set_bias_level power setting ASoC: tas2770: Fix handling of mute/unmute netfilter: nf_tables: really skip inactive sets when allocating name netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag netfilter: nf_tables: check NFT_SET_CONCAT flag if field_count is specified powerpc/pci: Fix get_phb_number() locking spi: meson-spicc: add local pow2 clock ops to preserve rate between messages net: dsa: mv88e6060: prevent crash on an unused port net: moxa: pass pdev instead of ndev to DMA functions net: dsa: microchip: ksz9477: fix fdb_dump last invalid entry net: dsa: felix: fix ethtool 256-511 and 512-1023 TX packet counters net: genl: fix error path memory leak in policy dumping net: dsa: sja1105: fix buffer overflow in sja1105_setup_devlink_regions() ice: Ignore EEXIST when setting promisc mode i2c: imx: Make sure to unregister adapter on remove() regulator: pca9450: Remove restrictions for regulator-name i40e: Fix to stop tx_timeout recovery if GLOBR fails fec: Fix timer capture timing in `fec_ptp_enable_pps()` stmmac: intel: Add a missing clk_disable_unprepare() call in intel_eth_pci_remove() igb: Add lock to avoid data race kbuild: fix the modules order between drivers and libs gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file locking/atomic: Make test_and_*_bit() ordered on failure ASoC: SOF: intel: move sof_intel_dsp_desc() forward drm/meson: Fix refcount bugs in meson_vpu_has_available_connectors() audit: log nftables configuration change events once per table netfilter: nftables: add helper function to set the base sequence number netfilter: add helper function to set up the nfnetlink header and use it drm/sun4i: dsi: Prevent underflow when computing packet sizes PCI: Add ACS quirk for Broadcom BCM5750x NICs platform/chrome: cros_ec_proto: don't show MKBP version if unsupported usb: cdns3 fix use-after-free at workaround 2 usb: gadget: uvc: call uvc uvcg_warn on completed status instead of uvcg_info irqchip/tegra: Fix overflow implicit truncation warnings drm/meson: Fix overflow implicit truncation warnings clk: ti: Stop using legacy clkctrl names for omap4 and 5 usb: host: ohci-ppc-of: Fix refcount leak bug usb: renesas: Fix refcount leak bug usb: dwc2: gadget: remove D+ pull-up while no vbus with usb-role-switch vboxguest: Do not use devm for irq clk: qcom: ipq8074: dont disable gcc_sleep_clk_src uacce: Handle parent device removal or parent driver module rmmod zram: do not lookup algorithm in backends table clk: qcom: clk-alpha-pll: fix clk_trion_pll_configure description scsi: lpfc: Prevent buffer overflow crashes in debugfs with malformed user input gadgetfs: ep_io - wait until IRQ finishes pinctrl: intel: Check against matching data instead of ACPI companion cxl: Fix a memory leak in an error handling path PCI/ACPI: Guard ARM64-specific mcfg_quirks um: add "noreboot" command line option for PANIC_TIMEOUT=-1 setups RDMA/rxe: Limit the number of calls to each tasklet csky/kprobe: reclaim insn_slot on kprobe unregistration selftests/kprobe: Do not test for GRP/ without event failures dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed md: Notify sysfs sync_completed in md_reap_sync_thread() nvmet-tcp: fix lockdep complaint on nvmet_tcp_wq flush during queue teardown drivers:md:fix a potential use-after-free bug ext4: avoid remove directory when directory is corrupted ext4: avoid resizing to a partial cluster size lib/list_debug.c: Detect uninitialized lists tty: serial: Fix refcount leak bug in ucc_uart.c vfio: Clear the caps->buf to NULL after free mips: cavium-octeon: Fix missing of_node_put() in octeon2_usb_clocks_start modules: Ensure natural alignment for .altinstructions and __bug_table sections riscv: mmap with PROT_WRITE but no PROT_READ is invalid RISC-V: Add fast call path of crash_kexec() watchdog: export lockup_detector_reconfigure powerpc/32: Don't always pass -mcpu=powerpc to the compiler ALSA: core: Add async signal helpers ALSA: timer: Use deferred fasync helper ALSA: control: Use deferred fasync helper f2fs: fix to avoid use f2fs_bug_on() in f2fs_new_node_page() f2fs: fix to do sanity check on segment type in build_sit_entries() smb3: check xattr value length earlier powerpc/64: Init jump labels before parse_early_param() video: fbdev: i740fb: Check the argument of i740_calc_vclk() MIPS: tlbex: Explicitly compare _PAGE_NO_EXEC against 0 netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect() netfilter: nf_tables: fix audit memory leak in nf_tables_commit tracing/probes: Have kprobes and uprobes use $COMM too can: j1939: j1939_sk_queue_activate_next_locked(): replace WARN_ON_ONCE with netdev_warn_once() can: j1939: j1939_session_destroy(): fix memory leak of skbs PCI/ERR: Retain status from error notification qrtr: Convert qrtr_ports from IDR to XArray bpf: Fix KASAN use-after-free Read in compute_effective_progs tee: fix memory leak in tee_shm_register() Linux 5.10.138 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I5983f3534b158edccd87bc7a7fe41ca07836d3eb
This commit is contained in:
commit
5597d5439f
@ -59,7 +59,7 @@ Like with atomic_t, the rule of thumb is:
|
||||
- RMW operations that have a return value are fully ordered.
|
||||
|
||||
- RMW operations that are conditional are unordered on FAILURE,
|
||||
otherwise the above rules apply. In the case of test_and_{}_bit() operations,
|
||||
otherwise the above rules apply. In the case of test_and_set_bit_lock(),
|
||||
if the bit in memory is unchanged by the operation then it is deemed to have
|
||||
failed.
|
||||
|
||||
|
@ -123,8 +123,8 @@ properties:
|
||||
- const: qcom,msm8974
|
||||
|
||||
- items:
|
||||
- const: qcom,msm8916-mtp/1
|
||||
- const: qcom,msm8916-mtp
|
||||
- const: qcom,msm8916-mtp/1
|
||||
- const: qcom,msm8916
|
||||
|
||||
- items:
|
||||
|
@ -22,16 +22,32 @@ properties:
|
||||
const: qcom,gcc-msm8996
|
||||
|
||||
clocks:
|
||||
minItems: 3
|
||||
items:
|
||||
- description: XO source
|
||||
- description: Second XO source
|
||||
- description: Sleep clock source
|
||||
- description: PCIe 0 PIPE clock (optional)
|
||||
- description: PCIe 1 PIPE clock (optional)
|
||||
- description: PCIe 2 PIPE clock (optional)
|
||||
- description: USB3 PIPE clock (optional)
|
||||
- description: UFS RX symbol 0 clock (optional)
|
||||
- description: UFS RX symbol 1 clock (optional)
|
||||
- description: UFS TX symbol 0 clock (optional)
|
||||
|
||||
clock-names:
|
||||
minItems: 3
|
||||
items:
|
||||
- const: cxo
|
||||
- const: cxo2
|
||||
- const: sleep_clk
|
||||
- const: pcie_0_pipe_clk_src
|
||||
- const: pcie_1_pipe_clk_src
|
||||
- const: pcie_2_pipe_clk_src
|
||||
- const: usb3_phy_pipe_clk_src
|
||||
- const: ufs_rx_symbol_0_clk_src
|
||||
- const: ufs_rx_symbol_1_clk_src
|
||||
- const: ufs_tx_symbol_0_clk_src
|
||||
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
@ -47,12 +47,6 @@ properties:
|
||||
description:
|
||||
Properties for single LDO regulator.
|
||||
|
||||
properties:
|
||||
regulator-name:
|
||||
pattern: "^LDO[1-5]$"
|
||||
description:
|
||||
should be "LDO1", ..., "LDO5"
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
"^BUCK[1-6]$":
|
||||
@ -62,11 +56,6 @@ properties:
|
||||
Properties for single BUCK regulator.
|
||||
|
||||
properties:
|
||||
regulator-name:
|
||||
pattern: "^BUCK[1-6]$"
|
||||
description:
|
||||
should be "BUCK1", ..., "BUCK6"
|
||||
|
||||
nxp,dvs-run-voltage:
|
||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
||||
minimum: 600000
|
||||
|
@ -168,7 +168,7 @@ An error injection example::
|
||||
0x00000008 Memory Correctable
|
||||
0x00000010 Memory Uncorrectable non-fatal
|
||||
# echo 0x12345000 > param1 # Set memory address for injection
|
||||
# echo $((-1 << 12)) > param2 # Mask 0xfffffffffffff000 - anywhere in this page
|
||||
# echo 0xfffffffffffff000 > param2 # Mask - anywhere in this page
|
||||
# echo 0x8 > error_type # Choose correctable memory error
|
||||
# echo 1 > error_inject # Inject now
|
||||
|
||||
|
8
Makefile
8
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 137
|
||||
SUBLEVEL = 138
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
@ -1231,13 +1231,11 @@ vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
|
||||
$(patsubst %/,%,$(filter %/, $(core-) \
|
||||
$(drivers-) $(libs-))))
|
||||
|
||||
subdir-modorder := $(addsuffix modules.order,$(filter %/, \
|
||||
$(core-y) $(core-m) $(libs-y) $(libs-m) \
|
||||
$(drivers-y) $(drivers-m)))
|
||||
|
||||
build-dirs := $(vmlinux-dirs)
|
||||
clean-dirs := $(vmlinux-alldirs)
|
||||
|
||||
subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
|
||||
|
||||
# Externally visible symbols (used by link-vmlinux.sh)
|
||||
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
|
||||
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))
|
||||
|
@ -124,6 +124,10 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p)
|
||||
|
||||
void __kprobes arch_remove_kprobe(struct kprobe *p)
|
||||
{
|
||||
if (p->ainsn.api.insn) {
|
||||
free_insn_slot(p->ainsn.api.insn, 0);
|
||||
p->ainsn.api.insn = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
|
||||
|
@ -86,11 +86,12 @@ static void octeon2_usb_clocks_start(struct device *dev)
|
||||
"refclk-frequency", &clock_rate);
|
||||
if (i) {
|
||||
dev_err(dev, "No UCTL \"refclk-frequency\"\n");
|
||||
of_node_put(uctl_node);
|
||||
goto exit;
|
||||
}
|
||||
i = of_property_read_string(uctl_node,
|
||||
"refclk-type", &clock_type);
|
||||
|
||||
of_node_put(uctl_node);
|
||||
if (!i && strcmp("crystal", clock_type) == 0)
|
||||
is_crystal_clock = true;
|
||||
}
|
||||
|
@ -633,7 +633,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p,
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpu_has_rixi && !!_PAGE_NO_EXEC) {
|
||||
if (cpu_has_rixi && _PAGE_NO_EXEC != 0) {
|
||||
if (fill_includes_sw_bits) {
|
||||
UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL));
|
||||
} else {
|
||||
@ -2572,7 +2572,7 @@ static void check_pabits(void)
|
||||
unsigned long entry;
|
||||
unsigned pabits, fillbits;
|
||||
|
||||
if (!cpu_has_rixi || !_PAGE_NO_EXEC) {
|
||||
if (!cpu_has_rixi || _PAGE_NO_EXEC == 0) {
|
||||
/*
|
||||
* We'll only be making use of the fact that we can rotate bits
|
||||
* into the fill if the CPU supports RIXI, so don't bother
|
||||
|
@ -50,7 +50,8 @@
|
||||
stw r13, PT_R13(sp)
|
||||
stw r14, PT_R14(sp)
|
||||
stw r15, PT_R15(sp)
|
||||
stw r2, PT_ORIG_R2(sp)
|
||||
movi r24, -1
|
||||
stw r24, PT_ORIG_R2(sp)
|
||||
stw r7, PT_ORIG_R7(sp)
|
||||
|
||||
stw ra, PT_RA(sp)
|
||||
|
@ -74,6 +74,8 @@ extern void show_regs(struct pt_regs *);
|
||||
((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE)\
|
||||
- 1)
|
||||
|
||||
#define force_successful_syscall_return() (current_pt_regs()->orig_r2 = -1)
|
||||
|
||||
int do_syscall_trace_enter(void);
|
||||
void do_syscall_trace_exit(void);
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
@ -185,6 +185,7 @@ ENTRY(handle_system_call)
|
||||
ldw r5, PT_R5(sp)
|
||||
|
||||
local_restart:
|
||||
stw r2, PT_ORIG_R2(sp)
|
||||
/* Check that the requested system call is within limits */
|
||||
movui r1, __NR_syscalls
|
||||
bgeu r2, r1, ret_invsyscall
|
||||
@ -192,7 +193,6 @@ local_restart:
|
||||
movhi r11, %hiadj(sys_call_table)
|
||||
add r1, r1, r11
|
||||
ldw r1, %lo(sys_call_table)(r1)
|
||||
beq r1, r0, ret_invsyscall
|
||||
|
||||
/* Check if we are being traced */
|
||||
GET_THREAD_INFO r11
|
||||
@ -213,6 +213,9 @@ local_restart:
|
||||
translate_rc_and_ret:
|
||||
movi r1, 0
|
||||
bge r2, zero, 3f
|
||||
ldw r1, PT_ORIG_R2(sp)
|
||||
addi r1, r1, 1
|
||||
beq r1, zero, 3f
|
||||
sub r2, zero, r2
|
||||
movi r1, 1
|
||||
3:
|
||||
@ -255,9 +258,9 @@ traced_system_call:
|
||||
ldw r6, PT_R6(sp)
|
||||
ldw r7, PT_R7(sp)
|
||||
|
||||
/* Fetch the syscall function, we don't need to check the boundaries
|
||||
* since this is already done.
|
||||
*/
|
||||
/* Fetch the syscall function. */
|
||||
movui r1, __NR_syscalls
|
||||
bgeu r2, r1, traced_invsyscall
|
||||
slli r1, r2, 2
|
||||
movhi r11,%hiadj(sys_call_table)
|
||||
add r1, r1, r11
|
||||
@ -276,6 +279,9 @@ traced_system_call:
|
||||
translate_rc_and_ret2:
|
||||
movi r1, 0
|
||||
bge r2, zero, 4f
|
||||
ldw r1, PT_ORIG_R2(sp)
|
||||
addi r1, r1, 1
|
||||
beq r1, zero, 4f
|
||||
sub r2, zero, r2
|
||||
movi r1, 1
|
||||
4:
|
||||
@ -287,6 +293,11 @@ end_translate_rc_and_ret2:
|
||||
RESTORE_SWITCH_STACK
|
||||
br ret_from_exception
|
||||
|
||||
/* If the syscall number was invalid return ENOSYS */
|
||||
traced_invsyscall:
|
||||
movi r2, -ENOSYS
|
||||
br translate_rc_and_ret2
|
||||
|
||||
Luser_return:
|
||||
GET_THREAD_INFO r11 /* get thread_info pointer */
|
||||
ldw r10, TI_FLAGS(r11) /* get thread_info->flags */
|
||||
@ -336,9 +347,6 @@ external_interrupt:
|
||||
/* skip if no interrupt is pending */
|
||||
beq r12, r0, ret_from_interrupt
|
||||
|
||||
movi r24, -1
|
||||
stw r24, PT_ORIG_R2(sp)
|
||||
|
||||
/*
|
||||
* Process an external hardware interrupt.
|
||||
*/
|
||||
|
@ -242,7 +242,7 @@ static int do_signal(struct pt_regs *regs)
|
||||
/*
|
||||
* If we were from a system call, check for system call restarting...
|
||||
*/
|
||||
if (regs->orig_r2 >= 0) {
|
||||
if (regs->orig_r2 >= 0 && regs->r1) {
|
||||
continue_addr = regs->ea;
|
||||
restart_addr = continue_addr - 4;
|
||||
retval = regs->r2;
|
||||
@ -264,6 +264,7 @@ static int do_signal(struct pt_regs *regs)
|
||||
regs->ea = restart_addr;
|
||||
break;
|
||||
}
|
||||
regs->orig_r2 = -1;
|
||||
}
|
||||
|
||||
if (get_signal(&ksig)) {
|
||||
|
@ -13,5 +13,6 @@
|
||||
#define __SYSCALL(nr, call) [nr] = (call),
|
||||
|
||||
void *sys_call_table[__NR_syscalls] = {
|
||||
[0 ... __NR_syscalls-1] = sys_ni_syscall,
|
||||
#include <asm/unistd.h>
|
||||
};
|
||||
|
@ -17,23 +17,6 @@ HAS_BIARCH := $(call cc-option-yn, -m32)
|
||||
# Set default 32 bits cross compilers for vdso and boot wrapper
|
||||
CROSS32_COMPILE ?=
|
||||
|
||||
ifeq ($(HAS_BIARCH),y)
|
||||
ifeq ($(CROSS32_COMPILE),)
|
||||
ifdef CONFIG_PPC32
|
||||
# These options will be overridden by any -mcpu option that the CPU
|
||||
# or platform code sets later on the command line, but they are needed
|
||||
# to set a sane 32-bit cpu target for the 64-bit cross compiler which
|
||||
# may default to the wrong ISA.
|
||||
KBUILD_CFLAGS += -mcpu=powerpc
|
||||
KBUILD_AFLAGS += -mcpu=powerpc
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PPC_BOOK3S_32
|
||||
KBUILD_CFLAGS += -mcpu=powerpc
|
||||
endif
|
||||
|
||||
# If we're on a ppc/ppc64/ppc64le machine use that defconfig, otherwise just use
|
||||
# ppc64_defconfig because we have nothing better to go on.
|
||||
uname := $(shell uname -m)
|
||||
@ -190,6 +173,7 @@ endif
|
||||
endif
|
||||
|
||||
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
|
||||
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
|
||||
|
||||
# Altivec option not allowed with e500mc64 in GCC.
|
||||
ifdef CONFIG_ALTIVEC
|
||||
@ -200,14 +184,6 @@ endif
|
||||
CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
|
||||
CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
|
||||
|
||||
ifdef CONFIG_PPC32
|
||||
ifdef CONFIG_PPC_E500MC
|
||||
CFLAGS-y += $(call cc-option,-mcpu=e500mc,-mcpu=powerpc)
|
||||
else
|
||||
CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc)
|
||||
endif
|
||||
endif
|
||||
|
||||
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
|
||||
|
||||
KBUILD_CPPFLAGS += -I $(srctree)/arch/$(ARCH) $(asinstr)
|
||||
|
@ -66,10 +66,6 @@ void set_pci_dma_ops(const struct dma_map_ops *dma_ops)
|
||||
pci_dma_ops = dma_ops;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function should run under locking protection, specifically
|
||||
* hose_spinlock.
|
||||
*/
|
||||
static int get_phb_number(struct device_node *dn)
|
||||
{
|
||||
int ret, phb_id = -1;
|
||||
@ -106,15 +102,20 @@ static int get_phb_number(struct device_node *dn)
|
||||
if (!ret)
|
||||
phb_id = (int)(prop & (MAX_PHBS - 1));
|
||||
|
||||
spin_lock(&hose_spinlock);
|
||||
|
||||
/* We need to be sure to not use the same PHB number twice. */
|
||||
if ((phb_id >= 0) && !test_and_set_bit(phb_id, phb_bitmap))
|
||||
return phb_id;
|
||||
goto out_unlock;
|
||||
|
||||
/* If everything fails then fallback to dynamic PHB numbering. */
|
||||
phb_id = find_first_zero_bit(phb_bitmap, MAX_PHBS);
|
||||
BUG_ON(phb_id >= MAX_PHBS);
|
||||
set_bit(phb_id, phb_bitmap);
|
||||
|
||||
out_unlock:
|
||||
spin_unlock(&hose_spinlock);
|
||||
|
||||
return phb_id;
|
||||
}
|
||||
|
||||
@ -125,10 +126,13 @@ struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
|
||||
phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
|
||||
if (phb == NULL)
|
||||
return NULL;
|
||||
spin_lock(&hose_spinlock);
|
||||
|
||||
phb->global_number = get_phb_number(dev);
|
||||
|
||||
spin_lock(&hose_spinlock);
|
||||
list_add_tail(&phb->list_node, &hose_list);
|
||||
spin_unlock(&hose_spinlock);
|
||||
|
||||
phb->dn = dev;
|
||||
phb->is_dynamic = slab_is_available();
|
||||
#ifdef CONFIG_PPC64
|
||||
|
@ -750,6 +750,13 @@ void __init early_init_devtree(void *params)
|
||||
of_scan_flat_dt(early_init_dt_scan_root, NULL);
|
||||
of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
|
||||
|
||||
/*
|
||||
* As generic code authors expect to be able to use static keys
|
||||
* in early_param() handlers, we initialize the static keys just
|
||||
* before parsing early params (it's fine to call jump_label_init()
|
||||
* more than once).
|
||||
*/
|
||||
jump_label_init();
|
||||
parse_early_param();
|
||||
|
||||
/* make sure we've parsed cmdline for mem= before this */
|
||||
|
@ -119,9 +119,9 @@ config GENERIC_CPU
|
||||
depends on PPC64 && CPU_LITTLE_ENDIAN
|
||||
select ARCH_HAS_FAST_MULTIPLIER
|
||||
|
||||
config GENERIC_CPU
|
||||
config POWERPC_CPU
|
||||
bool "Generic 32 bits powerpc"
|
||||
depends on PPC32 && !PPC_8xx
|
||||
depends on PPC32 && !PPC_8xx && !PPC_85xx
|
||||
|
||||
config CELL_CPU
|
||||
bool "Cell Broadband Engine"
|
||||
@ -175,11 +175,23 @@ config G4_CPU
|
||||
depends on PPC_BOOK3S_32
|
||||
select ALTIVEC
|
||||
|
||||
config E500_CPU
|
||||
bool "e500 (8540)"
|
||||
depends on PPC_85xx && !PPC_E500MC
|
||||
|
||||
config E500MC_CPU
|
||||
bool "e500mc"
|
||||
depends on PPC_85xx && PPC_E500MC
|
||||
|
||||
config TOOLCHAIN_DEFAULT_CPU
|
||||
bool "Rely on the toolchain's implicit default CPU"
|
||||
depends on PPC32
|
||||
|
||||
endchoice
|
||||
|
||||
config TARGET_CPU_BOOL
|
||||
bool
|
||||
default !GENERIC_CPU
|
||||
default !GENERIC_CPU && !TOOLCHAIN_DEFAULT_CPU
|
||||
|
||||
config TARGET_CPU
|
||||
string
|
||||
@ -194,6 +206,9 @@ config TARGET_CPU
|
||||
default "e300c2" if E300C2_CPU
|
||||
default "e300c3" if E300C3_CPU
|
||||
default "G4" if G4_CPU
|
||||
default "8540" if E500_CPU
|
||||
default "e500mc" if E500MC_CPU
|
||||
default "powerpc" if POWERPC_CPU
|
||||
|
||||
config PPC_BOOK3S
|
||||
def_bool y
|
||||
|
@ -18,9 +18,8 @@ static long riscv_sys_mmap(unsigned long addr, unsigned long len,
|
||||
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
|
||||
return -EINVAL;
|
||||
|
||||
if ((prot & PROT_WRITE) && (prot & PROT_EXEC))
|
||||
if (unlikely(!(prot & PROT_READ)))
|
||||
return -EINVAL;
|
||||
if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ)))
|
||||
return -EINVAL;
|
||||
|
||||
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
|
||||
offset >> (PAGE_SHIFT - page_shift_offset));
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kexec.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/ptrace.h>
|
||||
@ -43,6 +44,9 @@ void die(struct pt_regs *regs, const char *str)
|
||||
|
||||
ret = notify_die(DIE_OOPS, str, regs, 0, regs->cause, SIGSEGV);
|
||||
|
||||
if (regs && kexec_should_crash(current))
|
||||
crash_kexec(regs);
|
||||
|
||||
bust_spinlocks(0);
|
||||
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
||||
spin_unlock_irq(&die_lock);
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
@ -644,10 +645,24 @@ void halt_skas(void)
|
||||
UML_LONGJMP(&initial_jmpbuf, INIT_JMP_HALT);
|
||||
}
|
||||
|
||||
static bool noreboot;
|
||||
|
||||
static int __init noreboot_cmd_param(char *str, int *add)
|
||||
{
|
||||
noreboot = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
__uml_setup("noreboot", noreboot_cmd_param,
|
||||
"noreboot\n"
|
||||
" Rather than rebooting, exit always, akin to QEMU's -no-reboot option.\n"
|
||||
" This is useful if you're using CONFIG_PANIC_TIMEOUT in order to catch\n"
|
||||
" crashes in CI\n");
|
||||
|
||||
void reboot_skas(void)
|
||||
{
|
||||
block_signals_trace();
|
||||
UML_LONGJMP(&initial_jmpbuf, INIT_JMP_REBOOT);
|
||||
UML_LONGJMP(&initial_jmpbuf, noreboot ? INIT_JMP_HALT : INIT_JMP_REBOOT);
|
||||
}
|
||||
|
||||
void __switch_mm(struct mm_id *mm_idp)
|
||||
|
@ -645,7 +645,7 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
|
||||
pages++;
|
||||
spin_lock(&init_mm.page_table_lock);
|
||||
|
||||
prot = __pgprot(pgprot_val(prot) | __PAGE_KERNEL_LARGE);
|
||||
prot = __pgprot(pgprot_val(prot) | _PAGE_PSE);
|
||||
|
||||
set_pte_init((pte_t *)pud,
|
||||
pfn_pte((paddr & PUD_MASK) >> PAGE_SHIFT,
|
||||
|
@ -41,6 +41,8 @@ struct mcfg_fixup {
|
||||
static struct mcfg_fixup mcfg_quirks[] = {
|
||||
/* { OEM_ID, OEM_TABLE_ID, REV, SEGMENT, BUS_RANGE, ops, cfgres }, */
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
|
||||
#define AL_ECAM(table_id, rev, seg, ops) \
|
||||
{ "AMAZON", table_id, rev, seg, MCFG_BUS_ANY, ops }
|
||||
|
||||
@ -162,6 +164,7 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
ALTRA_ECAM_QUIRK(1, 13),
|
||||
ALTRA_ECAM_QUIRK(1, 14),
|
||||
ALTRA_ECAM_QUIRK(1, 15),
|
||||
#endif /* ARM64 */
|
||||
};
|
||||
|
||||
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
|
@ -155,10 +155,10 @@ static bool acpi_nondev_subnode_ok(acpi_handle scope,
|
||||
return acpi_nondev_subnode_data_ok(handle, link, list, parent);
|
||||
}
|
||||
|
||||
static int acpi_add_nondev_subnodes(acpi_handle scope,
|
||||
const union acpi_object *links,
|
||||
struct list_head *list,
|
||||
struct fwnode_handle *parent)
|
||||
static bool acpi_add_nondev_subnodes(acpi_handle scope,
|
||||
const union acpi_object *links,
|
||||
struct list_head *list,
|
||||
struct fwnode_handle *parent)
|
||||
{
|
||||
bool ret = false;
|
||||
int i;
|
||||
|
@ -2131,6 +2131,7 @@ const char *ata_get_cmd_descript(u8 command)
|
||||
{ ATA_CMD_WRITE_QUEUED_FUA_EXT, "WRITE DMA QUEUED FUA EXT" },
|
||||
{ ATA_CMD_FPDMA_READ, "READ FPDMA QUEUED" },
|
||||
{ ATA_CMD_FPDMA_WRITE, "WRITE FPDMA QUEUED" },
|
||||
{ ATA_CMD_NCQ_NON_DATA, "NCQ NON-DATA" },
|
||||
{ ATA_CMD_FPDMA_SEND, "SEND FPDMA QUEUED" },
|
||||
{ ATA_CMD_FPDMA_RECV, "RECEIVE FPDMA QUEUED" },
|
||||
{ ATA_CMD_PIO_READ, "READ SECTOR(S)" },
|
||||
|
@ -3767,6 +3767,7 @@ static void __exit idt77252_exit(void)
|
||||
card = idt77252_chain;
|
||||
dev = card->atmdev;
|
||||
idt77252_chain = card->next;
|
||||
del_timer_sync(&card->tst_timer);
|
||||
|
||||
if (dev->phy->stop)
|
||||
dev->phy->stop(dev);
|
||||
|
@ -61,12 +61,6 @@ static int zcomp_strm_init(struct zcomp_strm *zstrm, struct zcomp *comp)
|
||||
|
||||
bool zcomp_available_algorithm(const char *comp)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = sysfs_match_string(backends, comp);
|
||||
if (i >= 0)
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Crypto does not ignore a trailing new line symbol,
|
||||
* so make sure you don't supply a string containing
|
||||
@ -215,6 +209,11 @@ struct zcomp *zcomp_create(const char *compress)
|
||||
struct zcomp *comp;
|
||||
int error;
|
||||
|
||||
/*
|
||||
* Crypto API will execute /sbin/modprobe if the compression module
|
||||
* is not loaded yet. We must do it here, otherwise we are about to
|
||||
* call /sbin/modprobe under CPU hot-plug lock.
|
||||
*/
|
||||
if (!zcomp_available_algorithm(compress))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
@ -1379,7 +1379,7 @@ const struct clk_ops clk_alpha_pll_postdiv_fabia_ops = {
|
||||
EXPORT_SYMBOL_GPL(clk_alpha_pll_postdiv_fabia_ops);
|
||||
|
||||
/**
|
||||
* clk_lucid_pll_configure - configure the lucid pll
|
||||
* clk_trion_pll_configure - configure the trion pll
|
||||
*
|
||||
* @pll: clk alpha pll
|
||||
* @regmap: register map
|
||||
|
@ -662,6 +662,7 @@ static struct clk_branch gcc_sleep_clk_src = {
|
||||
},
|
||||
.num_parents = 1,
|
||||
.ops = &clk_branch2_ops,
|
||||
.flags = CLK_IS_CRITICAL,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ static const struct omap_clkctrl_bit_data omap4_aess_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap4_func_dmic_abe_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0018:26",
|
||||
"abe-clkctrl:0018:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -76,7 +76,7 @@ static const struct omap_clkctrl_bit_data omap4_dmic_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap4_func_mcasp_abe_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0020:26",
|
||||
"abe-clkctrl:0020:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -89,7 +89,7 @@ static const struct omap_clkctrl_bit_data omap4_mcasp_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap4_func_mcbsp1_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0028:26",
|
||||
"abe-clkctrl:0028:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -102,7 +102,7 @@ static const struct omap_clkctrl_bit_data omap4_mcbsp1_bit_data[] __initconst =
|
||||
};
|
||||
|
||||
static const char * const omap4_func_mcbsp2_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0030:26",
|
||||
"abe-clkctrl:0030:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -115,7 +115,7 @@ static const struct omap_clkctrl_bit_data omap4_mcbsp2_bit_data[] __initconst =
|
||||
};
|
||||
|
||||
static const char * const omap4_func_mcbsp3_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0038:26",
|
||||
"abe-clkctrl:0038:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -183,18 +183,18 @@ static const struct omap_clkctrl_bit_data omap4_timer8_bit_data[] __initconst =
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap4_abe_clkctrl_regs[] __initconst = {
|
||||
{ OMAP4_L4_ABE_CLKCTRL, NULL, 0, "ocp_abe_iclk" },
|
||||
{ OMAP4_AESS_CLKCTRL, omap4_aess_bit_data, CLKF_SW_SUP, "abe_cm:clk:0008:24" },
|
||||
{ OMAP4_AESS_CLKCTRL, omap4_aess_bit_data, CLKF_SW_SUP, "abe-clkctrl:0008:24" },
|
||||
{ OMAP4_MCPDM_CLKCTRL, NULL, CLKF_SW_SUP, "pad_clks_ck" },
|
||||
{ OMAP4_DMIC_CLKCTRL, omap4_dmic_bit_data, CLKF_SW_SUP, "abe_cm:clk:0018:24" },
|
||||
{ OMAP4_MCASP_CLKCTRL, omap4_mcasp_bit_data, CLKF_SW_SUP, "abe_cm:clk:0020:24" },
|
||||
{ OMAP4_MCBSP1_CLKCTRL, omap4_mcbsp1_bit_data, CLKF_SW_SUP, "abe_cm:clk:0028:24" },
|
||||
{ OMAP4_MCBSP2_CLKCTRL, omap4_mcbsp2_bit_data, CLKF_SW_SUP, "abe_cm:clk:0030:24" },
|
||||
{ OMAP4_MCBSP3_CLKCTRL, omap4_mcbsp3_bit_data, CLKF_SW_SUP, "abe_cm:clk:0038:24" },
|
||||
{ OMAP4_SLIMBUS1_CLKCTRL, omap4_slimbus1_bit_data, CLKF_SW_SUP, "abe_cm:clk:0040:8" },
|
||||
{ OMAP4_TIMER5_CLKCTRL, omap4_timer5_bit_data, CLKF_SW_SUP, "abe_cm:clk:0048:24" },
|
||||
{ OMAP4_TIMER6_CLKCTRL, omap4_timer6_bit_data, CLKF_SW_SUP, "abe_cm:clk:0050:24" },
|
||||
{ OMAP4_TIMER7_CLKCTRL, omap4_timer7_bit_data, CLKF_SW_SUP, "abe_cm:clk:0058:24" },
|
||||
{ OMAP4_TIMER8_CLKCTRL, omap4_timer8_bit_data, CLKF_SW_SUP, "abe_cm:clk:0060:24" },
|
||||
{ OMAP4_DMIC_CLKCTRL, omap4_dmic_bit_data, CLKF_SW_SUP, "abe-clkctrl:0018:24" },
|
||||
{ OMAP4_MCASP_CLKCTRL, omap4_mcasp_bit_data, CLKF_SW_SUP, "abe-clkctrl:0020:24" },
|
||||
{ OMAP4_MCBSP1_CLKCTRL, omap4_mcbsp1_bit_data, CLKF_SW_SUP, "abe-clkctrl:0028:24" },
|
||||
{ OMAP4_MCBSP2_CLKCTRL, omap4_mcbsp2_bit_data, CLKF_SW_SUP, "abe-clkctrl:0030:24" },
|
||||
{ OMAP4_MCBSP3_CLKCTRL, omap4_mcbsp3_bit_data, CLKF_SW_SUP, "abe-clkctrl:0038:24" },
|
||||
{ OMAP4_SLIMBUS1_CLKCTRL, omap4_slimbus1_bit_data, CLKF_SW_SUP, "abe-clkctrl:0040:8" },
|
||||
{ OMAP4_TIMER5_CLKCTRL, omap4_timer5_bit_data, CLKF_SW_SUP, "abe-clkctrl:0048:24" },
|
||||
{ OMAP4_TIMER6_CLKCTRL, omap4_timer6_bit_data, CLKF_SW_SUP, "abe-clkctrl:0050:24" },
|
||||
{ OMAP4_TIMER7_CLKCTRL, omap4_timer7_bit_data, CLKF_SW_SUP, "abe-clkctrl:0058:24" },
|
||||
{ OMAP4_TIMER8_CLKCTRL, omap4_timer8_bit_data, CLKF_SW_SUP, "abe-clkctrl:0060:24" },
|
||||
{ OMAP4_WD_TIMER3_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
|
||||
{ 0 },
|
||||
};
|
||||
@ -287,7 +287,7 @@ static const struct omap_clkctrl_bit_data omap4_fdif_bit_data[] __initconst = {
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap4_iss_clkctrl_regs[] __initconst = {
|
||||
{ OMAP4_ISS_CLKCTRL, omap4_iss_bit_data, CLKF_SW_SUP, "ducati_clk_mux_ck" },
|
||||
{ OMAP4_FDIF_CLKCTRL, omap4_fdif_bit_data, CLKF_SW_SUP, "iss_cm:clk:0008:24" },
|
||||
{ OMAP4_FDIF_CLKCTRL, omap4_fdif_bit_data, CLKF_SW_SUP, "iss-clkctrl:0008:24" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -320,7 +320,7 @@ static const struct omap_clkctrl_bit_data omap4_dss_core_bit_data[] __initconst
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap4_l3_dss_clkctrl_regs[] __initconst = {
|
||||
{ OMAP4_DSS_CORE_CLKCTRL, omap4_dss_core_bit_data, CLKF_SW_SUP, "l3_dss_cm:clk:0000:8" },
|
||||
{ OMAP4_DSS_CORE_CLKCTRL, omap4_dss_core_bit_data, CLKF_SW_SUP, "l3-dss-clkctrl:0000:8" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -336,7 +336,7 @@ static const struct omap_clkctrl_bit_data omap4_gpu_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap4_l3_gfx_clkctrl_regs[] __initconst = {
|
||||
{ OMAP4_GPU_CLKCTRL, omap4_gpu_bit_data, CLKF_SW_SUP, "l3_gfx_cm:clk:0000:24" },
|
||||
{ OMAP4_GPU_CLKCTRL, omap4_gpu_bit_data, CLKF_SW_SUP, "l3-gfx-clkctrl:0000:24" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -372,12 +372,12 @@ static const struct omap_clkctrl_bit_data omap4_hsi_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap4_usb_host_hs_utmi_p1_clk_parents[] __initconst = {
|
||||
"l3_init_cm:clk:0038:24",
|
||||
"l3-init-clkctrl:0038:24",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const char * const omap4_usb_host_hs_utmi_p2_clk_parents[] __initconst = {
|
||||
"l3_init_cm:clk:0038:25",
|
||||
"l3-init-clkctrl:0038:25",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -418,7 +418,7 @@ static const struct omap_clkctrl_bit_data omap4_usb_host_hs_bit_data[] __initcon
|
||||
};
|
||||
|
||||
static const char * const omap4_usb_otg_hs_xclk_parents[] __initconst = {
|
||||
"l3_init_cm:clk:0040:24",
|
||||
"l3-init-clkctrl:0040:24",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -452,14 +452,14 @@ static const struct omap_clkctrl_bit_data omap4_ocp2scp_usb_phy_bit_data[] __ini
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap4_l3_init_clkctrl_regs[] __initconst = {
|
||||
{ OMAP4_MMC1_CLKCTRL, omap4_mmc1_bit_data, CLKF_SW_SUP, "l3_init_cm:clk:0008:24" },
|
||||
{ OMAP4_MMC2_CLKCTRL, omap4_mmc2_bit_data, CLKF_SW_SUP, "l3_init_cm:clk:0010:24" },
|
||||
{ OMAP4_HSI_CLKCTRL, omap4_hsi_bit_data, CLKF_HW_SUP, "l3_init_cm:clk:0018:24" },
|
||||
{ OMAP4_MMC1_CLKCTRL, omap4_mmc1_bit_data, CLKF_SW_SUP, "l3-init-clkctrl:0008:24" },
|
||||
{ OMAP4_MMC2_CLKCTRL, omap4_mmc2_bit_data, CLKF_SW_SUP, "l3-init-clkctrl:0010:24" },
|
||||
{ OMAP4_HSI_CLKCTRL, omap4_hsi_bit_data, CLKF_HW_SUP, "l3-init-clkctrl:0018:24" },
|
||||
{ OMAP4_USB_HOST_HS_CLKCTRL, omap4_usb_host_hs_bit_data, CLKF_SW_SUP, "init_60m_fclk" },
|
||||
{ OMAP4_USB_OTG_HS_CLKCTRL, omap4_usb_otg_hs_bit_data, CLKF_HW_SUP, "l3_div_ck" },
|
||||
{ OMAP4_USB_TLL_HS_CLKCTRL, omap4_usb_tll_hs_bit_data, CLKF_HW_SUP, "l4_div_ck" },
|
||||
{ OMAP4_USB_HOST_FS_CLKCTRL, NULL, CLKF_SW_SUP, "func_48mc_fclk" },
|
||||
{ OMAP4_OCP2SCP_USB_PHY_CLKCTRL, omap4_ocp2scp_usb_phy_bit_data, CLKF_HW_SUP, "l3_init_cm:clk:00c0:8" },
|
||||
{ OMAP4_OCP2SCP_USB_PHY_CLKCTRL, omap4_ocp2scp_usb_phy_bit_data, CLKF_HW_SUP, "l3-init-clkctrl:00c0:8" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -530,7 +530,7 @@ static const struct omap_clkctrl_bit_data omap4_gpio6_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap4_per_mcbsp4_gfclk_parents[] __initconst = {
|
||||
"l4_per_cm:clk:00c0:26",
|
||||
"l4-per-clkctrl:00c0:26",
|
||||
"pad_clks_ck",
|
||||
NULL,
|
||||
};
|
||||
@ -570,12 +570,12 @@ static const struct omap_clkctrl_bit_data omap4_slimbus2_bit_data[] __initconst
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap4_l4_per_clkctrl_regs[] __initconst = {
|
||||
{ OMAP4_TIMER10_CLKCTRL, omap4_timer10_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0008:24" },
|
||||
{ OMAP4_TIMER11_CLKCTRL, omap4_timer11_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0010:24" },
|
||||
{ OMAP4_TIMER2_CLKCTRL, omap4_timer2_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0018:24" },
|
||||
{ OMAP4_TIMER3_CLKCTRL, omap4_timer3_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0020:24" },
|
||||
{ OMAP4_TIMER4_CLKCTRL, omap4_timer4_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0028:24" },
|
||||
{ OMAP4_TIMER9_CLKCTRL, omap4_timer9_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0030:24" },
|
||||
{ OMAP4_TIMER10_CLKCTRL, omap4_timer10_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0008:24" },
|
||||
{ OMAP4_TIMER11_CLKCTRL, omap4_timer11_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0010:24" },
|
||||
{ OMAP4_TIMER2_CLKCTRL, omap4_timer2_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0018:24" },
|
||||
{ OMAP4_TIMER3_CLKCTRL, omap4_timer3_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0020:24" },
|
||||
{ OMAP4_TIMER4_CLKCTRL, omap4_timer4_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0028:24" },
|
||||
{ OMAP4_TIMER9_CLKCTRL, omap4_timer9_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0030:24" },
|
||||
{ OMAP4_ELM_CLKCTRL, NULL, 0, "l4_div_ck" },
|
||||
{ OMAP4_GPIO2_CLKCTRL, omap4_gpio2_bit_data, CLKF_HW_SUP, "l4_div_ck" },
|
||||
{ OMAP4_GPIO3_CLKCTRL, omap4_gpio3_bit_data, CLKF_HW_SUP, "l4_div_ck" },
|
||||
@ -588,14 +588,14 @@ static const struct omap_clkctrl_reg_data omap4_l4_per_clkctrl_regs[] __initcons
|
||||
{ OMAP4_I2C3_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
|
||||
{ OMAP4_I2C4_CLKCTRL, NULL, CLKF_SW_SUP, "func_96m_fclk" },
|
||||
{ OMAP4_L4_PER_CLKCTRL, NULL, 0, "l4_div_ck" },
|
||||
{ OMAP4_MCBSP4_CLKCTRL, omap4_mcbsp4_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:00c0:24" },
|
||||
{ OMAP4_MCBSP4_CLKCTRL, omap4_mcbsp4_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:00c0:24" },
|
||||
{ OMAP4_MCSPI1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_MCSPI2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_MCSPI3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_MCSPI4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_MMC3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_MMC4_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_SLIMBUS2_CLKCTRL, omap4_slimbus2_bit_data, CLKF_SW_SUP, "l4_per_cm:clk:0118:8" },
|
||||
{ OMAP4_SLIMBUS2_CLKCTRL, omap4_slimbus2_bit_data, CLKF_SW_SUP, "l4-per-clkctrl:0118:8" },
|
||||
{ OMAP4_UART1_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_UART2_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
{ OMAP4_UART3_CLKCTRL, NULL, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
@ -630,7 +630,7 @@ static const struct omap_clkctrl_reg_data omap4_l4_wkup_clkctrl_regs[] __initcon
|
||||
{ OMAP4_L4_WKUP_CLKCTRL, NULL, 0, "l4_wkup_clk_mux_ck" },
|
||||
{ OMAP4_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
|
||||
{ OMAP4_GPIO1_CLKCTRL, omap4_gpio1_bit_data, CLKF_HW_SUP, "l4_wkup_clk_mux_ck" },
|
||||
{ OMAP4_TIMER1_CLKCTRL, omap4_timer1_bit_data, CLKF_SW_SUP, "l4_wkup_cm:clk:0020:24" },
|
||||
{ OMAP4_TIMER1_CLKCTRL, omap4_timer1_bit_data, CLKF_SW_SUP, "l4-wkup-clkctrl:0020:24" },
|
||||
{ OMAP4_COUNTER_32K_CLKCTRL, NULL, 0, "sys_32k_ck" },
|
||||
{ OMAP4_KBD_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
|
||||
{ 0 },
|
||||
@ -644,7 +644,7 @@ static const char * const omap4_pmd_stm_clock_mux_ck_parents[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap4_trace_clk_div_div_ck_parents[] __initconst = {
|
||||
"emu_sys_cm:clk:0000:22",
|
||||
"emu-sys-clkctrl:0000:22",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -662,7 +662,7 @@ static const struct omap_clkctrl_div_data omap4_trace_clk_div_div_ck_data __init
|
||||
};
|
||||
|
||||
static const char * const omap4_stm_clk_div_ck_parents[] __initconst = {
|
||||
"emu_sys_cm:clk:0000:20",
|
||||
"emu-sys-clkctrl:0000:20",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -716,73 +716,73 @@ static struct ti_dt_clk omap44xx_clks[] = {
|
||||
* hwmod support. Once hwmod is removed, these can be removed
|
||||
* also.
|
||||
*/
|
||||
DT_CLK(NULL, "aess_fclk", "abe_cm:0008:24"),
|
||||
DT_CLK(NULL, "cm2_dm10_mux", "l4_per_cm:0008:24"),
|
||||
DT_CLK(NULL, "cm2_dm11_mux", "l4_per_cm:0010:24"),
|
||||
DT_CLK(NULL, "cm2_dm2_mux", "l4_per_cm:0018:24"),
|
||||
DT_CLK(NULL, "cm2_dm3_mux", "l4_per_cm:0020:24"),
|
||||
DT_CLK(NULL, "cm2_dm4_mux", "l4_per_cm:0028:24"),
|
||||
DT_CLK(NULL, "cm2_dm9_mux", "l4_per_cm:0030:24"),
|
||||
DT_CLK(NULL, "dmic_sync_mux_ck", "abe_cm:0018:26"),
|
||||
DT_CLK(NULL, "dmt1_clk_mux", "l4_wkup_cm:0020:24"),
|
||||
DT_CLK(NULL, "dss_48mhz_clk", "l3_dss_cm:0000:9"),
|
||||
DT_CLK(NULL, "dss_dss_clk", "l3_dss_cm:0000:8"),
|
||||
DT_CLK(NULL, "dss_sys_clk", "l3_dss_cm:0000:10"),
|
||||
DT_CLK(NULL, "dss_tv_clk", "l3_dss_cm:0000:11"),
|
||||
DT_CLK(NULL, "fdif_fck", "iss_cm:0008:24"),
|
||||
DT_CLK(NULL, "func_dmic_abe_gfclk", "abe_cm:0018:24"),
|
||||
DT_CLK(NULL, "func_mcasp_abe_gfclk", "abe_cm:0020:24"),
|
||||
DT_CLK(NULL, "func_mcbsp1_gfclk", "abe_cm:0028:24"),
|
||||
DT_CLK(NULL, "func_mcbsp2_gfclk", "abe_cm:0030:24"),
|
||||
DT_CLK(NULL, "func_mcbsp3_gfclk", "abe_cm:0038:24"),
|
||||
DT_CLK(NULL, "gpio1_dbclk", "l4_wkup_cm:0018:8"),
|
||||
DT_CLK(NULL, "gpio2_dbclk", "l4_per_cm:0040:8"),
|
||||
DT_CLK(NULL, "gpio3_dbclk", "l4_per_cm:0048:8"),
|
||||
DT_CLK(NULL, "gpio4_dbclk", "l4_per_cm:0050:8"),
|
||||
DT_CLK(NULL, "gpio5_dbclk", "l4_per_cm:0058:8"),
|
||||
DT_CLK(NULL, "gpio6_dbclk", "l4_per_cm:0060:8"),
|
||||
DT_CLK(NULL, "hsi_fck", "l3_init_cm:0018:24"),
|
||||
DT_CLK(NULL, "hsmmc1_fclk", "l3_init_cm:0008:24"),
|
||||
DT_CLK(NULL, "hsmmc2_fclk", "l3_init_cm:0010:24"),
|
||||
DT_CLK(NULL, "iss_ctrlclk", "iss_cm:0000:8"),
|
||||
DT_CLK(NULL, "mcasp_sync_mux_ck", "abe_cm:0020:26"),
|
||||
DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe_cm:0028:26"),
|
||||
DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe_cm:0030:26"),
|
||||
DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe_cm:0038:26"),
|
||||
DT_CLK(NULL, "mcbsp4_sync_mux_ck", "l4_per_cm:00c0:26"),
|
||||
DT_CLK(NULL, "ocp2scp_usb_phy_phy_48m", "l3_init_cm:00c0:8"),
|
||||
DT_CLK(NULL, "otg_60m_gfclk", "l3_init_cm:0040:24"),
|
||||
DT_CLK(NULL, "per_mcbsp4_gfclk", "l4_per_cm:00c0:24"),
|
||||
DT_CLK(NULL, "pmd_stm_clock_mux_ck", "emu_sys_cm:0000:20"),
|
||||
DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu_sys_cm:0000:22"),
|
||||
DT_CLK(NULL, "sgx_clk_mux", "l3_gfx_cm:0000:24"),
|
||||
DT_CLK(NULL, "slimbus1_fclk_0", "abe_cm:0040:8"),
|
||||
DT_CLK(NULL, "slimbus1_fclk_1", "abe_cm:0040:9"),
|
||||
DT_CLK(NULL, "slimbus1_fclk_2", "abe_cm:0040:10"),
|
||||
DT_CLK(NULL, "slimbus1_slimbus_clk", "abe_cm:0040:11"),
|
||||
DT_CLK(NULL, "slimbus2_fclk_0", "l4_per_cm:0118:8"),
|
||||
DT_CLK(NULL, "slimbus2_fclk_1", "l4_per_cm:0118:9"),
|
||||
DT_CLK(NULL, "slimbus2_slimbus_clk", "l4_per_cm:0118:10"),
|
||||
DT_CLK(NULL, "stm_clk_div_ck", "emu_sys_cm:0000:27"),
|
||||
DT_CLK(NULL, "timer5_sync_mux", "abe_cm:0048:24"),
|
||||
DT_CLK(NULL, "timer6_sync_mux", "abe_cm:0050:24"),
|
||||
DT_CLK(NULL, "timer7_sync_mux", "abe_cm:0058:24"),
|
||||
DT_CLK(NULL, "timer8_sync_mux", "abe_cm:0060:24"),
|
||||
DT_CLK(NULL, "trace_clk_div_div_ck", "emu_sys_cm:0000:24"),
|
||||
DT_CLK(NULL, "usb_host_hs_func48mclk", "l3_init_cm:0038:15"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3_init_cm:0038:13"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3_init_cm:0038:14"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3_init_cm:0038:11"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3_init_cm:0038:12"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3_init_cm:0038:8"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3_init_cm:0038:9"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3_init_cm:0038:10"),
|
||||
DT_CLK(NULL, "usb_otg_hs_xclk", "l3_init_cm:0040:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3_init_cm:0048:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3_init_cm:0048:9"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3_init_cm:0048:10"),
|
||||
DT_CLK(NULL, "utmi_p1_gfclk", "l3_init_cm:0038:24"),
|
||||
DT_CLK(NULL, "utmi_p2_gfclk", "l3_init_cm:0038:25"),
|
||||
DT_CLK(NULL, "aess_fclk", "abe-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "cm2_dm10_mux", "l4-per-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "cm2_dm11_mux", "l4-per-clkctrl:0010:24"),
|
||||
DT_CLK(NULL, "cm2_dm2_mux", "l4-per-clkctrl:0018:24"),
|
||||
DT_CLK(NULL, "cm2_dm3_mux", "l4-per-clkctrl:0020:24"),
|
||||
DT_CLK(NULL, "cm2_dm4_mux", "l4-per-clkctrl:0028:24"),
|
||||
DT_CLK(NULL, "cm2_dm9_mux", "l4-per-clkctrl:0030:24"),
|
||||
DT_CLK(NULL, "dmic_sync_mux_ck", "abe-clkctrl:0018:26"),
|
||||
DT_CLK(NULL, "dmt1_clk_mux", "l4-wkup-clkctrl:0020:24"),
|
||||
DT_CLK(NULL, "dss_48mhz_clk", "l3-dss-clkctrl:0000:9"),
|
||||
DT_CLK(NULL, "dss_dss_clk", "l3-dss-clkctrl:0000:8"),
|
||||
DT_CLK(NULL, "dss_sys_clk", "l3-dss-clkctrl:0000:10"),
|
||||
DT_CLK(NULL, "dss_tv_clk", "l3-dss-clkctrl:0000:11"),
|
||||
DT_CLK(NULL, "fdif_fck", "iss-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "func_dmic_abe_gfclk", "abe-clkctrl:0018:24"),
|
||||
DT_CLK(NULL, "func_mcasp_abe_gfclk", "abe-clkctrl:0020:24"),
|
||||
DT_CLK(NULL, "func_mcbsp1_gfclk", "abe-clkctrl:0028:24"),
|
||||
DT_CLK(NULL, "func_mcbsp2_gfclk", "abe-clkctrl:0030:24"),
|
||||
DT_CLK(NULL, "func_mcbsp3_gfclk", "abe-clkctrl:0038:24"),
|
||||
DT_CLK(NULL, "gpio1_dbclk", "l4-wkup-clkctrl:0018:8"),
|
||||
DT_CLK(NULL, "gpio2_dbclk", "l4-per-clkctrl:0040:8"),
|
||||
DT_CLK(NULL, "gpio3_dbclk", "l4-per-clkctrl:0048:8"),
|
||||
DT_CLK(NULL, "gpio4_dbclk", "l4-per-clkctrl:0050:8"),
|
||||
DT_CLK(NULL, "gpio5_dbclk", "l4-per-clkctrl:0058:8"),
|
||||
DT_CLK(NULL, "gpio6_dbclk", "l4-per-clkctrl:0060:8"),
|
||||
DT_CLK(NULL, "hsi_fck", "l3-init-clkctrl:0018:24"),
|
||||
DT_CLK(NULL, "hsmmc1_fclk", "l3-init-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "hsmmc2_fclk", "l3-init-clkctrl:0010:24"),
|
||||
DT_CLK(NULL, "iss_ctrlclk", "iss-clkctrl:0000:8"),
|
||||
DT_CLK(NULL, "mcasp_sync_mux_ck", "abe-clkctrl:0020:26"),
|
||||
DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
|
||||
DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
|
||||
DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
|
||||
DT_CLK(NULL, "mcbsp4_sync_mux_ck", "l4-per-clkctrl:00c0:26"),
|
||||
DT_CLK(NULL, "ocp2scp_usb_phy_phy_48m", "l3-init-clkctrl:00c0:8"),
|
||||
DT_CLK(NULL, "otg_60m_gfclk", "l3-init-clkctrl:0040:24"),
|
||||
DT_CLK(NULL, "per_mcbsp4_gfclk", "l4-per-clkctrl:00c0:24"),
|
||||
DT_CLK(NULL, "pmd_stm_clock_mux_ck", "emu-sys-clkctrl:0000:20"),
|
||||
DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu-sys-clkctrl:0000:22"),
|
||||
DT_CLK(NULL, "sgx_clk_mux", "l3-gfx-clkctrl:0000:24"),
|
||||
DT_CLK(NULL, "slimbus1_fclk_0", "abe-clkctrl:0040:8"),
|
||||
DT_CLK(NULL, "slimbus1_fclk_1", "abe-clkctrl:0040:9"),
|
||||
DT_CLK(NULL, "slimbus1_fclk_2", "abe-clkctrl:0040:10"),
|
||||
DT_CLK(NULL, "slimbus1_slimbus_clk", "abe-clkctrl:0040:11"),
|
||||
DT_CLK(NULL, "slimbus2_fclk_0", "l4-per-clkctrl:0118:8"),
|
||||
DT_CLK(NULL, "slimbus2_fclk_1", "l4-per-clkctrl:0118:9"),
|
||||
DT_CLK(NULL, "slimbus2_slimbus_clk", "l4-per-clkctrl:0118:10"),
|
||||
DT_CLK(NULL, "stm_clk_div_ck", "emu-sys-clkctrl:0000:27"),
|
||||
DT_CLK(NULL, "timer5_sync_mux", "abe-clkctrl:0048:24"),
|
||||
DT_CLK(NULL, "timer6_sync_mux", "abe-clkctrl:0050:24"),
|
||||
DT_CLK(NULL, "timer7_sync_mux", "abe-clkctrl:0058:24"),
|
||||
DT_CLK(NULL, "timer8_sync_mux", "abe-clkctrl:0060:24"),
|
||||
DT_CLK(NULL, "trace_clk_div_div_ck", "emu-sys-clkctrl:0000:24"),
|
||||
DT_CLK(NULL, "usb_host_hs_func48mclk", "l3-init-clkctrl:0038:15"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3-init-clkctrl:0038:13"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3-init-clkctrl:0038:14"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3-init-clkctrl:0038:11"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3-init-clkctrl:0038:12"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3-init-clkctrl:0038:8"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3-init-clkctrl:0038:9"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3_init-clkctrl:0038:10"),
|
||||
DT_CLK(NULL, "usb_otg_hs_xclk", "l3-init-clkctrl:0040:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3-init-clkctrl:0048:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3-init-clkctrl:0048:9"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3-init-clkctrl:0048:10"),
|
||||
DT_CLK(NULL, "utmi_p1_gfclk", "l3-init-clkctrl:0038:24"),
|
||||
DT_CLK(NULL, "utmi_p2_gfclk", "l3-init-clkctrl:0038:25"),
|
||||
{ .node_name = NULL },
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ static const struct omap_clkctrl_bit_data omap5_aess_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap5_dmic_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0018:26",
|
||||
"abe-clkctrl:0018:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -70,7 +70,7 @@ static const struct omap_clkctrl_bit_data omap5_dmic_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap5_mcbsp1_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0028:26",
|
||||
"abe-clkctrl:0028:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -83,7 +83,7 @@ static const struct omap_clkctrl_bit_data omap5_mcbsp1_bit_data[] __initconst =
|
||||
};
|
||||
|
||||
static const char * const omap5_mcbsp2_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0030:26",
|
||||
"abe-clkctrl:0030:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -96,7 +96,7 @@ static const struct omap_clkctrl_bit_data omap5_mcbsp2_bit_data[] __initconst =
|
||||
};
|
||||
|
||||
static const char * const omap5_mcbsp3_gfclk_parents[] __initconst = {
|
||||
"abe_cm:clk:0038:26",
|
||||
"abe-clkctrl:0038:26",
|
||||
"pad_clks_ck",
|
||||
"slimbus_clk",
|
||||
NULL,
|
||||
@ -136,16 +136,16 @@ static const struct omap_clkctrl_bit_data omap5_timer8_bit_data[] __initconst =
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap5_abe_clkctrl_regs[] __initconst = {
|
||||
{ OMAP5_L4_ABE_CLKCTRL, NULL, 0, "abe_iclk" },
|
||||
{ OMAP5_AESS_CLKCTRL, omap5_aess_bit_data, CLKF_SW_SUP, "abe_cm:clk:0008:24" },
|
||||
{ OMAP5_AESS_CLKCTRL, omap5_aess_bit_data, CLKF_SW_SUP, "abe-clkctrl:0008:24" },
|
||||
{ OMAP5_MCPDM_CLKCTRL, NULL, CLKF_SW_SUP, "pad_clks_ck" },
|
||||
{ OMAP5_DMIC_CLKCTRL, omap5_dmic_bit_data, CLKF_SW_SUP, "abe_cm:clk:0018:24" },
|
||||
{ OMAP5_MCBSP1_CLKCTRL, omap5_mcbsp1_bit_data, CLKF_SW_SUP, "abe_cm:clk:0028:24" },
|
||||
{ OMAP5_MCBSP2_CLKCTRL, omap5_mcbsp2_bit_data, CLKF_SW_SUP, "abe_cm:clk:0030:24" },
|
||||
{ OMAP5_MCBSP3_CLKCTRL, omap5_mcbsp3_bit_data, CLKF_SW_SUP, "abe_cm:clk:0038:24" },
|
||||
{ OMAP5_TIMER5_CLKCTRL, omap5_timer5_bit_data, CLKF_SW_SUP, "abe_cm:clk:0048:24" },
|
||||
{ OMAP5_TIMER6_CLKCTRL, omap5_timer6_bit_data, CLKF_SW_SUP, "abe_cm:clk:0050:24" },
|
||||
{ OMAP5_TIMER7_CLKCTRL, omap5_timer7_bit_data, CLKF_SW_SUP, "abe_cm:clk:0058:24" },
|
||||
{ OMAP5_TIMER8_CLKCTRL, omap5_timer8_bit_data, CLKF_SW_SUP, "abe_cm:clk:0060:24" },
|
||||
{ OMAP5_DMIC_CLKCTRL, omap5_dmic_bit_data, CLKF_SW_SUP, "abe-clkctrl:0018:24" },
|
||||
{ OMAP5_MCBSP1_CLKCTRL, omap5_mcbsp1_bit_data, CLKF_SW_SUP, "abe-clkctrl:0028:24" },
|
||||
{ OMAP5_MCBSP2_CLKCTRL, omap5_mcbsp2_bit_data, CLKF_SW_SUP, "abe-clkctrl:0030:24" },
|
||||
{ OMAP5_MCBSP3_CLKCTRL, omap5_mcbsp3_bit_data, CLKF_SW_SUP, "abe-clkctrl:0038:24" },
|
||||
{ OMAP5_TIMER5_CLKCTRL, omap5_timer5_bit_data, CLKF_SW_SUP, "abe-clkctrl:0048:24" },
|
||||
{ OMAP5_TIMER6_CLKCTRL, omap5_timer6_bit_data, CLKF_SW_SUP, "abe-clkctrl:0050:24" },
|
||||
{ OMAP5_TIMER7_CLKCTRL, omap5_timer7_bit_data, CLKF_SW_SUP, "abe-clkctrl:0058:24" },
|
||||
{ OMAP5_TIMER8_CLKCTRL, omap5_timer8_bit_data, CLKF_SW_SUP, "abe-clkctrl:0060:24" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -266,12 +266,12 @@ static const struct omap_clkctrl_bit_data omap5_gpio8_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap5_l4per_clkctrl_regs[] __initconst = {
|
||||
{ OMAP5_TIMER10_CLKCTRL, omap5_timer10_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0008:24" },
|
||||
{ OMAP5_TIMER11_CLKCTRL, omap5_timer11_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0010:24" },
|
||||
{ OMAP5_TIMER2_CLKCTRL, omap5_timer2_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0018:24" },
|
||||
{ OMAP5_TIMER3_CLKCTRL, omap5_timer3_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0020:24" },
|
||||
{ OMAP5_TIMER4_CLKCTRL, omap5_timer4_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0028:24" },
|
||||
{ OMAP5_TIMER9_CLKCTRL, omap5_timer9_bit_data, CLKF_SW_SUP, "l4per_cm:clk:0030:24" },
|
||||
{ OMAP5_TIMER10_CLKCTRL, omap5_timer10_bit_data, CLKF_SW_SUP, "l4per-clkctrl:0008:24" },
|
||||
{ OMAP5_TIMER11_CLKCTRL, omap5_timer11_bit_data, CLKF_SW_SUP, "l4per-clkctrl:0010:24" },
|
||||
{ OMAP5_TIMER2_CLKCTRL, omap5_timer2_bit_data, CLKF_SW_SUP, "l4per-clkctrl:0018:24" },
|
||||
{ OMAP5_TIMER3_CLKCTRL, omap5_timer3_bit_data, CLKF_SW_SUP, "l4per-clkctrl:0020:24" },
|
||||
{ OMAP5_TIMER4_CLKCTRL, omap5_timer4_bit_data, CLKF_SW_SUP, "l4per-clkctrl:0028:24" },
|
||||
{ OMAP5_TIMER9_CLKCTRL, omap5_timer9_bit_data, CLKF_SW_SUP, "l4per-clkctrl:0030:24" },
|
||||
{ OMAP5_GPIO2_CLKCTRL, omap5_gpio2_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
|
||||
{ OMAP5_GPIO3_CLKCTRL, omap5_gpio3_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
|
||||
{ OMAP5_GPIO4_CLKCTRL, omap5_gpio4_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
|
||||
@ -343,7 +343,7 @@ static const struct omap_clkctrl_bit_data omap5_dss_core_bit_data[] __initconst
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap5_dss_clkctrl_regs[] __initconst = {
|
||||
{ OMAP5_DSS_CORE_CLKCTRL, omap5_dss_core_bit_data, CLKF_SW_SUP, "dss_cm:clk:0000:8" },
|
||||
{ OMAP5_DSS_CORE_CLKCTRL, omap5_dss_core_bit_data, CLKF_SW_SUP, "dss-clkctrl:0000:8" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -376,7 +376,7 @@ static const struct omap_clkctrl_bit_data omap5_gpu_core_bit_data[] __initconst
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap5_gpu_clkctrl_regs[] __initconst = {
|
||||
{ OMAP5_GPU_CLKCTRL, omap5_gpu_core_bit_data, CLKF_SW_SUP, "gpu_cm:clk:0000:24" },
|
||||
{ OMAP5_GPU_CLKCTRL, omap5_gpu_core_bit_data, CLKF_SW_SUP, "gpu-clkctrl:0000:24" },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -387,7 +387,7 @@ static const char * const omap5_mmc1_fclk_mux_parents[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap5_mmc1_fclk_parents[] __initconst = {
|
||||
"l3init_cm:clk:0008:24",
|
||||
"l3init-clkctrl:0008:24",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -403,7 +403,7 @@ static const struct omap_clkctrl_bit_data omap5_mmc1_bit_data[] __initconst = {
|
||||
};
|
||||
|
||||
static const char * const omap5_mmc2_fclk_parents[] __initconst = {
|
||||
"l3init_cm:clk:0010:24",
|
||||
"l3init-clkctrl:0010:24",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -428,12 +428,12 @@ static const char * const omap5_usb_host_hs_hsic480m_p3_clk_parents[] __initcons
|
||||
};
|
||||
|
||||
static const char * const omap5_usb_host_hs_utmi_p1_clk_parents[] __initconst = {
|
||||
"l3init_cm:clk:0038:24",
|
||||
"l3init-clkctrl:0038:24",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const char * const omap5_usb_host_hs_utmi_p2_clk_parents[] __initconst = {
|
||||
"l3init_cm:clk:0038:25",
|
||||
"l3init-clkctrl:0038:25",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@ -492,8 +492,8 @@ static const struct omap_clkctrl_bit_data omap5_usb_otg_ss_bit_data[] __initcons
|
||||
};
|
||||
|
||||
static const struct omap_clkctrl_reg_data omap5_l3init_clkctrl_regs[] __initconst = {
|
||||
{ OMAP5_MMC1_CLKCTRL, omap5_mmc1_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0008:25" },
|
||||
{ OMAP5_MMC2_CLKCTRL, omap5_mmc2_bit_data, CLKF_SW_SUP, "l3init_cm:clk:0010:25" },
|
||||
{ OMAP5_MMC1_CLKCTRL, omap5_mmc1_bit_data, CLKF_SW_SUP, "l3init-clkctrl:0008:25" },
|
||||
{ OMAP5_MMC2_CLKCTRL, omap5_mmc2_bit_data, CLKF_SW_SUP, "l3init-clkctrl:0010:25" },
|
||||
{ OMAP5_USB_HOST_HS_CLKCTRL, omap5_usb_host_hs_bit_data, CLKF_SW_SUP, "l3init_60m_fclk" },
|
||||
{ OMAP5_USB_TLL_HS_CLKCTRL, omap5_usb_tll_hs_bit_data, CLKF_HW_SUP, "l4_root_clk_div" },
|
||||
{ OMAP5_SATA_CLKCTRL, omap5_sata_bit_data, CLKF_SW_SUP, "func_48m_fclk" },
|
||||
@ -517,7 +517,7 @@ static const struct omap_clkctrl_reg_data omap5_wkupaon_clkctrl_regs[] __initcon
|
||||
{ OMAP5_L4_WKUP_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" },
|
||||
{ OMAP5_WD_TIMER2_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
|
||||
{ OMAP5_GPIO1_CLKCTRL, omap5_gpio1_bit_data, CLKF_HW_SUP, "wkupaon_iclk_mux" },
|
||||
{ OMAP5_TIMER1_CLKCTRL, omap5_timer1_bit_data, CLKF_SW_SUP, "wkupaon_cm:clk:0020:24" },
|
||||
{ OMAP5_TIMER1_CLKCTRL, omap5_timer1_bit_data, CLKF_SW_SUP, "wkupaon-clkctrl:0020:24" },
|
||||
{ OMAP5_COUNTER_32K_CLKCTRL, NULL, 0, "wkupaon_iclk_mux" },
|
||||
{ OMAP5_KBD_CLKCTRL, NULL, CLKF_SW_SUP, "sys_32k_ck" },
|
||||
{ 0 },
|
||||
@ -547,58 +547,58 @@ const struct omap_clkctrl_data omap5_clkctrl_data[] __initconst = {
|
||||
static struct ti_dt_clk omap54xx_clks[] = {
|
||||
DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"),
|
||||
DT_CLK(NULL, "sys_clkin_ck", "sys_clkin"),
|
||||
DT_CLK(NULL, "dmic_gfclk", "abe_cm:0018:24"),
|
||||
DT_CLK(NULL, "dmic_sync_mux_ck", "abe_cm:0018:26"),
|
||||
DT_CLK(NULL, "dss_32khz_clk", "dss_cm:0000:11"),
|
||||
DT_CLK(NULL, "dss_48mhz_clk", "dss_cm:0000:9"),
|
||||
DT_CLK(NULL, "dss_dss_clk", "dss_cm:0000:8"),
|
||||
DT_CLK(NULL, "dss_sys_clk", "dss_cm:0000:10"),
|
||||
DT_CLK(NULL, "gpio1_dbclk", "wkupaon_cm:0018:8"),
|
||||
DT_CLK(NULL, "gpio2_dbclk", "l4per_cm:0040:8"),
|
||||
DT_CLK(NULL, "gpio3_dbclk", "l4per_cm:0048:8"),
|
||||
DT_CLK(NULL, "gpio4_dbclk", "l4per_cm:0050:8"),
|
||||
DT_CLK(NULL, "gpio5_dbclk", "l4per_cm:0058:8"),
|
||||
DT_CLK(NULL, "gpio6_dbclk", "l4per_cm:0060:8"),
|
||||
DT_CLK(NULL, "gpio7_dbclk", "l4per_cm:00f0:8"),
|
||||
DT_CLK(NULL, "gpio8_dbclk", "l4per_cm:00f8:8"),
|
||||
DT_CLK(NULL, "mcbsp1_gfclk", "abe_cm:0028:24"),
|
||||
DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe_cm:0028:26"),
|
||||
DT_CLK(NULL, "mcbsp2_gfclk", "abe_cm:0030:24"),
|
||||
DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe_cm:0030:26"),
|
||||
DT_CLK(NULL, "mcbsp3_gfclk", "abe_cm:0038:24"),
|
||||
DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe_cm:0038:26"),
|
||||
DT_CLK(NULL, "mmc1_32khz_clk", "l3init_cm:0008:8"),
|
||||
DT_CLK(NULL, "mmc1_fclk", "l3init_cm:0008:25"),
|
||||
DT_CLK(NULL, "mmc1_fclk_mux", "l3init_cm:0008:24"),
|
||||
DT_CLK(NULL, "mmc2_fclk", "l3init_cm:0010:25"),
|
||||
DT_CLK(NULL, "mmc2_fclk_mux", "l3init_cm:0010:24"),
|
||||
DT_CLK(NULL, "sata_ref_clk", "l3init_cm:0068:8"),
|
||||
DT_CLK(NULL, "timer10_gfclk_mux", "l4per_cm:0008:24"),
|
||||
DT_CLK(NULL, "timer11_gfclk_mux", "l4per_cm:0010:24"),
|
||||
DT_CLK(NULL, "timer1_gfclk_mux", "wkupaon_cm:0020:24"),
|
||||
DT_CLK(NULL, "timer2_gfclk_mux", "l4per_cm:0018:24"),
|
||||
DT_CLK(NULL, "timer3_gfclk_mux", "l4per_cm:0020:24"),
|
||||
DT_CLK(NULL, "timer4_gfclk_mux", "l4per_cm:0028:24"),
|
||||
DT_CLK(NULL, "timer5_gfclk_mux", "abe_cm:0048:24"),
|
||||
DT_CLK(NULL, "timer6_gfclk_mux", "abe_cm:0050:24"),
|
||||
DT_CLK(NULL, "timer7_gfclk_mux", "abe_cm:0058:24"),
|
||||
DT_CLK(NULL, "timer8_gfclk_mux", "abe_cm:0060:24"),
|
||||
DT_CLK(NULL, "timer9_gfclk_mux", "l4per_cm:0030:24"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3init_cm:0038:13"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3init_cm:0038:14"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p3_clk", "l3init_cm:0038:7"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3init_cm:0038:11"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3init_cm:0038:12"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p3_clk", "l3init_cm:0038:6"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3init_cm:0038:8"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3init_cm:0038:9"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3init_cm:0038:10"),
|
||||
DT_CLK(NULL, "usb_otg_ss_refclk960m", "l3init_cm:00d0:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3init_cm:0048:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3init_cm:0048:9"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3init_cm:0048:10"),
|
||||
DT_CLK(NULL, "utmi_p1_gfclk", "l3init_cm:0038:24"),
|
||||
DT_CLK(NULL, "utmi_p2_gfclk", "l3init_cm:0038:25"),
|
||||
DT_CLK(NULL, "dmic_gfclk", "abe-clkctrl:0018:24"),
|
||||
DT_CLK(NULL, "dmic_sync_mux_ck", "abe-clkctrl:0018:26"),
|
||||
DT_CLK(NULL, "dss_32khz_clk", "dss-clkctrl:0000:11"),
|
||||
DT_CLK(NULL, "dss_48mhz_clk", "dss-clkctrl:0000:9"),
|
||||
DT_CLK(NULL, "dss_dss_clk", "dss-clkctrl:0000:8"),
|
||||
DT_CLK(NULL, "dss_sys_clk", "dss-clkctrl:0000:10"),
|
||||
DT_CLK(NULL, "gpio1_dbclk", "wkupaon-clkctrl:0018:8"),
|
||||
DT_CLK(NULL, "gpio2_dbclk", "l4per-clkctrl:0040:8"),
|
||||
DT_CLK(NULL, "gpio3_dbclk", "l4per-clkctrl:0048:8"),
|
||||
DT_CLK(NULL, "gpio4_dbclk", "l4per-clkctrl:0050:8"),
|
||||
DT_CLK(NULL, "gpio5_dbclk", "l4per-clkctrl:0058:8"),
|
||||
DT_CLK(NULL, "gpio6_dbclk", "l4per-clkctrl:0060:8"),
|
||||
DT_CLK(NULL, "gpio7_dbclk", "l4per-clkctrl:00f0:8"),
|
||||
DT_CLK(NULL, "gpio8_dbclk", "l4per-clkctrl:00f8:8"),
|
||||
DT_CLK(NULL, "mcbsp1_gfclk", "abe-clkctrl:0028:24"),
|
||||
DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"),
|
||||
DT_CLK(NULL, "mcbsp2_gfclk", "abe-clkctrl:0030:24"),
|
||||
DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"),
|
||||
DT_CLK(NULL, "mcbsp3_gfclk", "abe-clkctrl:0038:24"),
|
||||
DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"),
|
||||
DT_CLK(NULL, "mmc1_32khz_clk", "l3init-clkctrl:0008:8"),
|
||||
DT_CLK(NULL, "mmc1_fclk", "l3init-clkctrl:0008:25"),
|
||||
DT_CLK(NULL, "mmc1_fclk_mux", "l3init-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "mmc2_fclk", "l3init-clkctrl:0010:25"),
|
||||
DT_CLK(NULL, "mmc2_fclk_mux", "l3init-clkctrl:0010:24"),
|
||||
DT_CLK(NULL, "sata_ref_clk", "l3init-clkctrl:0068:8"),
|
||||
DT_CLK(NULL, "timer10_gfclk_mux", "l4per-clkctrl:0008:24"),
|
||||
DT_CLK(NULL, "timer11_gfclk_mux", "l4per-clkctrl:0010:24"),
|
||||
DT_CLK(NULL, "timer1_gfclk_mux", "wkupaon-clkctrl:0020:24"),
|
||||
DT_CLK(NULL, "timer2_gfclk_mux", "l4per-clkctrl:0018:24"),
|
||||
DT_CLK(NULL, "timer3_gfclk_mux", "l4per-clkctrl:0020:24"),
|
||||
DT_CLK(NULL, "timer4_gfclk_mux", "l4per-clkctrl:0028:24"),
|
||||
DT_CLK(NULL, "timer5_gfclk_mux", "abe-clkctrl:0048:24"),
|
||||
DT_CLK(NULL, "timer6_gfclk_mux", "abe-clkctrl:0050:24"),
|
||||
DT_CLK(NULL, "timer7_gfclk_mux", "abe-clkctrl:0058:24"),
|
||||
DT_CLK(NULL, "timer8_gfclk_mux", "abe-clkctrl:0060:24"),
|
||||
DT_CLK(NULL, "timer9_gfclk_mux", "l4per-clkctrl:0030:24"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p1_clk", "l3init-clkctrl:0038:13"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p2_clk", "l3init-clkctrl:0038:14"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic480m_p3_clk", "l3init-clkctrl:0038:7"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p1_clk", "l3init-clkctrl:0038:11"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p2_clk", "l3init-clkctrl:0038:12"),
|
||||
DT_CLK(NULL, "usb_host_hs_hsic60m_p3_clk", "l3init-clkctrl:0038:6"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p1_clk", "l3init-clkctrl:0038:8"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p2_clk", "l3init-clkctrl:0038:9"),
|
||||
DT_CLK(NULL, "usb_host_hs_utmi_p3_clk", "l3init-clkctrl:0038:10"),
|
||||
DT_CLK(NULL, "usb_otg_ss_refclk960m", "l3init-clkctrl:00d0:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch0_clk", "l3init-clkctrl:0048:8"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch1_clk", "l3init-clkctrl:0048:9"),
|
||||
DT_CLK(NULL, "usb_tll_hs_usb_ch2_clk", "l3init-clkctrl:0048:10"),
|
||||
DT_CLK(NULL, "utmi_p1_gfclk", "l3init-clkctrl:0038:24"),
|
||||
DT_CLK(NULL, "utmi_p2_gfclk", "l3init-clkctrl:0038:25"),
|
||||
{ .node_name = NULL },
|
||||
};
|
||||
|
||||
|
@ -511,10 +511,6 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
|
||||
char *c;
|
||||
u16 soc_mask = 0;
|
||||
|
||||
if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) &&
|
||||
of_node_name_eq(node, "clk"))
|
||||
ti_clk_features.flags |= TI_CLK_CLKCTRL_COMPAT;
|
||||
|
||||
addrp = of_get_address(node, 0, NULL, NULL);
|
||||
addr = (u32)of_translate_address(node, addrp);
|
||||
|
||||
|
@ -1236,11 +1236,8 @@ static int sprd_dma_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct sprd_dma_dev *sdev = platform_get_drvdata(pdev);
|
||||
struct sprd_dma_chn *c, *cn;
|
||||
int ret;
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
/* explicitly free the irq */
|
||||
if (sdev->irq > 0)
|
||||
|
@ -116,8 +116,11 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
|
||||
for_each_endpoint_of_node(dev->of_node, ep) {
|
||||
/* If the endpoint node exists, consider it enabled */
|
||||
remote = of_graph_get_remote_port(ep);
|
||||
if (remote)
|
||||
if (remote) {
|
||||
of_node_put(remote);
|
||||
of_node_put(ep);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -469,17 +469,17 @@ void meson_viu_init(struct meson_drm *priv)
|
||||
priv->io_base + _REG(VD2_IF0_LUMA_FIFO_SIZE));
|
||||
|
||||
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
|
||||
writel_relaxed(VIU_OSD_BLEND_REORDER(0, 1) |
|
||||
VIU_OSD_BLEND_REORDER(1, 0) |
|
||||
VIU_OSD_BLEND_REORDER(2, 0) |
|
||||
VIU_OSD_BLEND_REORDER(3, 0) |
|
||||
VIU_OSD_BLEND_DIN_EN(1) |
|
||||
VIU_OSD_BLEND1_DIN3_BYPASS_TO_DOUT1 |
|
||||
VIU_OSD_BLEND1_DOUT_BYPASS_TO_BLEND2 |
|
||||
VIU_OSD_BLEND_DIN0_BYPASS_TO_DOUT0 |
|
||||
VIU_OSD_BLEND_BLEN2_PREMULT_EN(1) |
|
||||
VIU_OSD_BLEND_HOLD_LINES(4),
|
||||
priv->io_base + _REG(VIU_OSD_BLEND_CTRL));
|
||||
u32 val = (u32)VIU_OSD_BLEND_REORDER(0, 1) |
|
||||
(u32)VIU_OSD_BLEND_REORDER(1, 0) |
|
||||
(u32)VIU_OSD_BLEND_REORDER(2, 0) |
|
||||
(u32)VIU_OSD_BLEND_REORDER(3, 0) |
|
||||
(u32)VIU_OSD_BLEND_DIN_EN(1) |
|
||||
(u32)VIU_OSD_BLEND1_DIN3_BYPASS_TO_DOUT1 |
|
||||
(u32)VIU_OSD_BLEND1_DOUT_BYPASS_TO_BLEND2 |
|
||||
(u32)VIU_OSD_BLEND_DIN0_BYPASS_TO_DOUT0 |
|
||||
(u32)VIU_OSD_BLEND_BLEN2_PREMULT_EN(1) |
|
||||
(u32)VIU_OSD_BLEND_HOLD_LINES(4);
|
||||
writel_relaxed(val, priv->io_base + _REG(VIU_OSD_BLEND_CTRL));
|
||||
|
||||
writel_relaxed(OSD_BLEND_PATH_SEL_ENABLE,
|
||||
priv->io_base + _REG(OSD1_BLEND_SRC_CTRL));
|
||||
|
@ -531,7 +531,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct mipi_dsi_device *device = dsi->device;
|
||||
unsigned int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8;
|
||||
int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8;
|
||||
u16 hbp = 0, hfp = 0, hsa = 0, hblk = 0, vblk = 0;
|
||||
u32 basic_ctl = 0;
|
||||
size_t bytes;
|
||||
@ -555,7 +555,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
* (4 bytes). Its minimal size is therefore 10 bytes
|
||||
*/
|
||||
#define HSA_PACKET_OVERHEAD 10
|
||||
hsa = max((unsigned int)HSA_PACKET_OVERHEAD,
|
||||
hsa = max(HSA_PACKET_OVERHEAD,
|
||||
(mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
@ -564,7 +564,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
* therefore 6 bytes
|
||||
*/
|
||||
#define HBP_PACKET_OVERHEAD 6
|
||||
hbp = max((unsigned int)HBP_PACKET_OVERHEAD,
|
||||
hbp = max(HBP_PACKET_OVERHEAD,
|
||||
(mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
@ -574,7 +574,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
* 16 bytes
|
||||
*/
|
||||
#define HFP_PACKET_OVERHEAD 16
|
||||
hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
|
||||
hfp = max(HFP_PACKET_OVERHEAD,
|
||||
(mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
@ -583,7 +583,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
* bytes). Its minimal size is therefore 10 bytes.
|
||||
*/
|
||||
#define HBLK_PACKET_OVERHEAD 10
|
||||
hblk = max((unsigned int)HBLK_PACKET_OVERHEAD,
|
||||
hblk = max(HBLK_PACKET_OVERHEAD,
|
||||
(mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp -
|
||||
HBLK_PACKET_OVERHEAD);
|
||||
|
||||
|
@ -1280,9 +1280,7 @@ static int i2c_imx_remove(struct platform_device *pdev)
|
||||
struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev);
|
||||
int irq, ret;
|
||||
|
||||
ret = pm_runtime_resume_and_get(&pdev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
/* remove adapter */
|
||||
dev_dbg(&i2c_imx->adapter.dev, "adapter removed\n");
|
||||
@ -1291,17 +1289,21 @@ static int i2c_imx_remove(struct platform_device *pdev)
|
||||
if (i2c_imx->dma)
|
||||
i2c_imx_dma_free(i2c_imx);
|
||||
|
||||
/* setup chip registers to defaults */
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_IADR);
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_IFDR);
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_I2CR);
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_I2SR);
|
||||
if (ret == 0) {
|
||||
/* setup chip registers to defaults */
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_IADR);
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_IFDR);
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_I2CR);
|
||||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_I2SR);
|
||||
clk_disable(i2c_imx->clk);
|
||||
}
|
||||
|
||||
clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq >= 0)
|
||||
free_irq(irq, i2c_imx);
|
||||
clk_disable_unprepare(i2c_imx->clk);
|
||||
|
||||
clk_unprepare(i2c_imx->clk);
|
||||
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
@ -98,6 +98,12 @@ enum rxe_device_param {
|
||||
RXE_INFLIGHT_SKBS_PER_QP_HIGH = 64,
|
||||
RXE_INFLIGHT_SKBS_PER_QP_LOW = 16,
|
||||
|
||||
/* Max number of interations of each tasklet
|
||||
* before yielding the cpu to let other
|
||||
* work make progress
|
||||
*/
|
||||
RXE_MAX_ITERATIONS = 1024,
|
||||
|
||||
/* Delay before calling arbiter timer */
|
||||
RXE_NSEC_ARB_TIMER_DELAY = 200,
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
#include "rxe_task.h"
|
||||
#include "rxe.h"
|
||||
|
||||
int __rxe_do_task(struct rxe_task *task)
|
||||
|
||||
@ -34,6 +34,7 @@ void rxe_do_task(struct tasklet_struct *t)
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
struct rxe_task *task = from_tasklet(task, t, tasklet);
|
||||
unsigned int iterations = RXE_MAX_ITERATIONS;
|
||||
|
||||
spin_lock_irqsave(&task->state_lock, flags);
|
||||
switch (task->state) {
|
||||
@ -62,13 +63,20 @@ void rxe_do_task(struct tasklet_struct *t)
|
||||
spin_lock_irqsave(&task->state_lock, flags);
|
||||
switch (task->state) {
|
||||
case TASK_STATE_BUSY:
|
||||
if (ret)
|
||||
if (ret) {
|
||||
task->state = TASK_STATE_START;
|
||||
else
|
||||
} else if (iterations--) {
|
||||
cont = 1;
|
||||
} else {
|
||||
/* reschedule the tasklet and exit
|
||||
* the loop to give up the cpu
|
||||
*/
|
||||
tasklet_schedule(&task->tasklet);
|
||||
task->state = TASK_STATE_START;
|
||||
}
|
||||
break;
|
||||
|
||||
/* soneone tried to run the task since the last time we called
|
||||
/* someone tried to run the task since the last time we called
|
||||
* func, so we will call one more time regardless of the
|
||||
* return value
|
||||
*/
|
||||
|
@ -148,10 +148,10 @@ static int tegra_ictlr_suspend(void)
|
||||
lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS);
|
||||
|
||||
/* Disable COP interrupts */
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR);
|
||||
|
||||
/* Disable CPU interrupts */
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR);
|
||||
|
||||
/* Enable the wakeup sources of ictlr */
|
||||
writel_relaxed(lic->ictlr_wake_mask[i], ictlr + ICTLR_CPU_IER_SET);
|
||||
@ -172,12 +172,12 @@ static void tegra_ictlr_resume(void)
|
||||
|
||||
writel_relaxed(lic->cpu_iep[i],
|
||||
ictlr + ICTLR_CPU_IEP_CLASS);
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(lic->cpu_ier[i],
|
||||
ictlr + ICTLR_CPU_IER_SET);
|
||||
writel_relaxed(lic->cop_iep[i],
|
||||
ictlr + ICTLR_COP_IEP_CLASS);
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR);
|
||||
writel_relaxed(lic->cop_ier[i],
|
||||
ictlr + ICTLR_COP_IER_SET);
|
||||
}
|
||||
@ -312,7 +312,7 @@ static int __init tegra_ictlr_init(struct device_node *node,
|
||||
lic->base[i] = base;
|
||||
|
||||
/* Disable all interrupts */
|
||||
writel_relaxed(~0UL, base + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), base + ICTLR_CPU_IER_CLR);
|
||||
/* All interrupts target IRQ */
|
||||
writel_relaxed(0, base + ICTLR_CPU_IEP_CLASS);
|
||||
|
||||
|
@ -9424,6 +9424,7 @@ void md_reap_sync_thread(struct mddev *mddev)
|
||||
wake_up(&resync_wait);
|
||||
/* flag recovery needed just to double check */
|
||||
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
|
||||
sysfs_notify_dirent_safe(mddev->sysfs_completed);
|
||||
sysfs_notify_dirent_safe(mddev->sysfs_action);
|
||||
md_new_event(mddev);
|
||||
if (mddev->event_work.func)
|
||||
|
@ -2863,10 +2863,10 @@ static void raid5_end_write_request(struct bio *bi)
|
||||
if (!test_and_clear_bit(R5_DOUBLE_LOCKED, &sh->dev[i].flags))
|
||||
clear_bit(R5_LOCKED, &sh->dev[i].flags);
|
||||
set_bit(STRIPE_HANDLE, &sh->state);
|
||||
raid5_release_stripe(sh);
|
||||
|
||||
if (sh->batch_head && sh != sh->batch_head)
|
||||
raid5_release_stripe(sh->batch_head);
|
||||
raid5_release_stripe(sh);
|
||||
}
|
||||
|
||||
static void raid5_error(struct mddev *mddev, struct md_rdev *rdev)
|
||||
|
@ -349,6 +349,7 @@ int afu_allocate_irqs(struct cxl_context *ctx, u32 count)
|
||||
|
||||
out:
|
||||
cxl_ops->release_irq_ranges(&ctx->irqs, ctx->afu->adapter);
|
||||
bitmap_free(ctx->irq_bitmap);
|
||||
afu_irq_name_free(ctx);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -9,43 +9,38 @@
|
||||
|
||||
static struct class *uacce_class;
|
||||
static dev_t uacce_devt;
|
||||
static DEFINE_MUTEX(uacce_mutex);
|
||||
static DEFINE_XARRAY_ALLOC(uacce_xa);
|
||||
|
||||
/*
|
||||
* If the parent driver or the device disappears, the queue state is invalid and
|
||||
* ops are not usable anymore.
|
||||
*/
|
||||
static bool uacce_queue_is_valid(struct uacce_queue *q)
|
||||
{
|
||||
return q->state == UACCE_Q_INIT || q->state == UACCE_Q_STARTED;
|
||||
}
|
||||
|
||||
static int uacce_start_queue(struct uacce_queue *q)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&uacce_mutex);
|
||||
|
||||
if (q->state != UACCE_Q_INIT) {
|
||||
ret = -EINVAL;
|
||||
goto out_with_lock;
|
||||
}
|
||||
if (q->state != UACCE_Q_INIT)
|
||||
return -EINVAL;
|
||||
|
||||
if (q->uacce->ops->start_queue) {
|
||||
ret = q->uacce->ops->start_queue(q);
|
||||
if (ret < 0)
|
||||
goto out_with_lock;
|
||||
return ret;
|
||||
}
|
||||
|
||||
q->state = UACCE_Q_STARTED;
|
||||
|
||||
out_with_lock:
|
||||
mutex_unlock(&uacce_mutex);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uacce_put_queue(struct uacce_queue *q)
|
||||
{
|
||||
struct uacce_device *uacce = q->uacce;
|
||||
|
||||
mutex_lock(&uacce_mutex);
|
||||
|
||||
if (q->state == UACCE_Q_ZOMBIE)
|
||||
goto out;
|
||||
|
||||
if ((q->state == UACCE_Q_STARTED) && uacce->ops->stop_queue)
|
||||
uacce->ops->stop_queue(q);
|
||||
|
||||
@ -54,8 +49,6 @@ static int uacce_put_queue(struct uacce_queue *q)
|
||||
uacce->ops->put_queue(q);
|
||||
|
||||
q->state = UACCE_Q_ZOMBIE;
|
||||
out:
|
||||
mutex_unlock(&uacce_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -65,20 +58,36 @@ static long uacce_fops_unl_ioctl(struct file *filep,
|
||||
{
|
||||
struct uacce_queue *q = filep->private_data;
|
||||
struct uacce_device *uacce = q->uacce;
|
||||
long ret = -ENXIO;
|
||||
|
||||
/*
|
||||
* uacce->ops->ioctl() may take the mmap_lock when copying arg to/from
|
||||
* user. Avoid a circular lock dependency with uacce_fops_mmap(), which
|
||||
* gets called with mmap_lock held, by taking uacce->mutex instead of
|
||||
* q->mutex. Doing this in uacce_fops_mmap() is not possible because
|
||||
* uacce_fops_open() calls iommu_sva_bind_device(), which takes
|
||||
* mmap_lock, while holding uacce->mutex.
|
||||
*/
|
||||
mutex_lock(&uacce->mutex);
|
||||
if (!uacce_queue_is_valid(q))
|
||||
goto out_unlock;
|
||||
|
||||
switch (cmd) {
|
||||
case UACCE_CMD_START_Q:
|
||||
return uacce_start_queue(q);
|
||||
|
||||
ret = uacce_start_queue(q);
|
||||
break;
|
||||
case UACCE_CMD_PUT_Q:
|
||||
return uacce_put_queue(q);
|
||||
|
||||
ret = uacce_put_queue(q);
|
||||
break;
|
||||
default:
|
||||
if (!uacce->ops->ioctl)
|
||||
return -EINVAL;
|
||||
|
||||
return uacce->ops->ioctl(q, cmd, arg);
|
||||
if (uacce->ops->ioctl)
|
||||
ret = uacce->ops->ioctl(q, cmd, arg);
|
||||
else
|
||||
ret = -EINVAL;
|
||||
}
|
||||
out_unlock:
|
||||
mutex_unlock(&uacce->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
@ -136,6 +145,13 @@ static int uacce_fops_open(struct inode *inode, struct file *filep)
|
||||
if (!q)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_lock(&uacce->mutex);
|
||||
|
||||
if (!uacce->parent) {
|
||||
ret = -EINVAL;
|
||||
goto out_with_mem;
|
||||
}
|
||||
|
||||
ret = uacce_bind_queue(uacce, q);
|
||||
if (ret)
|
||||
goto out_with_mem;
|
||||
@ -152,10 +168,9 @@ static int uacce_fops_open(struct inode *inode, struct file *filep)
|
||||
filep->private_data = q;
|
||||
uacce->inode = inode;
|
||||
q->state = UACCE_Q_INIT;
|
||||
|
||||
mutex_lock(&uacce->queues_lock);
|
||||
mutex_init(&q->mutex);
|
||||
list_add(&q->list, &uacce->queues);
|
||||
mutex_unlock(&uacce->queues_lock);
|
||||
mutex_unlock(&uacce->mutex);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -163,18 +178,20 @@ static int uacce_fops_open(struct inode *inode, struct file *filep)
|
||||
uacce_unbind_queue(q);
|
||||
out_with_mem:
|
||||
kfree(q);
|
||||
mutex_unlock(&uacce->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int uacce_fops_release(struct inode *inode, struct file *filep)
|
||||
{
|
||||
struct uacce_queue *q = filep->private_data;
|
||||
struct uacce_device *uacce = q->uacce;
|
||||
|
||||
mutex_lock(&q->uacce->queues_lock);
|
||||
list_del(&q->list);
|
||||
mutex_unlock(&q->uacce->queues_lock);
|
||||
mutex_lock(&uacce->mutex);
|
||||
uacce_put_queue(q);
|
||||
uacce_unbind_queue(q);
|
||||
list_del(&q->list);
|
||||
mutex_unlock(&uacce->mutex);
|
||||
kfree(q);
|
||||
|
||||
return 0;
|
||||
@ -217,10 +234,9 @@ static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma)
|
||||
vma->vm_private_data = q;
|
||||
qfr->type = type;
|
||||
|
||||
mutex_lock(&uacce_mutex);
|
||||
|
||||
if (q->state != UACCE_Q_INIT && q->state != UACCE_Q_STARTED) {
|
||||
ret = -EINVAL;
|
||||
mutex_lock(&q->mutex);
|
||||
if (!uacce_queue_is_valid(q)) {
|
||||
ret = -ENXIO;
|
||||
goto out_with_lock;
|
||||
}
|
||||
|
||||
@ -259,12 +275,12 @@ static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma)
|
||||
}
|
||||
|
||||
q->qfrs[type] = qfr;
|
||||
mutex_unlock(&uacce_mutex);
|
||||
mutex_unlock(&q->mutex);
|
||||
|
||||
return ret;
|
||||
|
||||
out_with_lock:
|
||||
mutex_unlock(&uacce_mutex);
|
||||
mutex_unlock(&q->mutex);
|
||||
kfree(qfr);
|
||||
return ret;
|
||||
}
|
||||
@ -273,12 +289,20 @@ static __poll_t uacce_fops_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
struct uacce_queue *q = file->private_data;
|
||||
struct uacce_device *uacce = q->uacce;
|
||||
__poll_t ret = 0;
|
||||
|
||||
mutex_lock(&q->mutex);
|
||||
if (!uacce_queue_is_valid(q))
|
||||
goto out_unlock;
|
||||
|
||||
poll_wait(file, &q->wait, wait);
|
||||
if (uacce->ops->is_q_updated && uacce->ops->is_q_updated(q))
|
||||
return EPOLLIN | EPOLLRDNORM;
|
||||
|
||||
return 0;
|
||||
if (uacce->ops->is_q_updated && uacce->ops->is_q_updated(q))
|
||||
ret = EPOLLIN | EPOLLRDNORM;
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&q->mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct file_operations uacce_fops = {
|
||||
@ -431,7 +455,7 @@ struct uacce_device *uacce_alloc(struct device *parent,
|
||||
goto err_with_uacce;
|
||||
|
||||
INIT_LIST_HEAD(&uacce->queues);
|
||||
mutex_init(&uacce->queues_lock);
|
||||
mutex_init(&uacce->mutex);
|
||||
device_initialize(&uacce->dev);
|
||||
uacce->dev.devt = MKDEV(MAJOR(uacce_devt), uacce->dev_id);
|
||||
uacce->dev.class = uacce_class;
|
||||
@ -489,13 +513,23 @@ void uacce_remove(struct uacce_device *uacce)
|
||||
if (uacce->inode)
|
||||
unmap_mapping_range(uacce->inode->i_mapping, 0, 0, 1);
|
||||
|
||||
/*
|
||||
* uacce_fops_open() may be running concurrently, even after we remove
|
||||
* the cdev. Holding uacce->mutex ensures that open() does not obtain a
|
||||
* removed uacce device.
|
||||
*/
|
||||
mutex_lock(&uacce->mutex);
|
||||
/* ensure no open queue remains */
|
||||
mutex_lock(&uacce->queues_lock);
|
||||
list_for_each_entry_safe(q, next_q, &uacce->queues, list) {
|
||||
/*
|
||||
* Taking q->mutex ensures that fops do not use the defunct
|
||||
* uacce->ops after the queue is disabled.
|
||||
*/
|
||||
mutex_lock(&q->mutex);
|
||||
uacce_put_queue(q);
|
||||
mutex_unlock(&q->mutex);
|
||||
uacce_unbind_queue(q);
|
||||
}
|
||||
mutex_unlock(&uacce->queues_lock);
|
||||
|
||||
/* disable sva now since no opened queues */
|
||||
if (uacce->flags & UACCE_DEV_SVA)
|
||||
@ -504,6 +538,13 @@ void uacce_remove(struct uacce_device *uacce)
|
||||
if (uacce->cdev)
|
||||
cdev_device_del(uacce->cdev, &uacce->dev);
|
||||
xa_erase(&uacce_xa, uacce->dev_id);
|
||||
/*
|
||||
* uacce exists as long as there are open fds, but ops will be freed
|
||||
* now. Ensure that bugs cause NULL deref rather than use-after-free.
|
||||
*/
|
||||
uacce->ops = NULL;
|
||||
uacce->parent = NULL;
|
||||
mutex_unlock(&uacce->mutex);
|
||||
put_device(&uacce->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(uacce_remove);
|
||||
|
@ -1161,8 +1161,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
ret = device_reset_optional(&pdev->dev);
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
|
||||
if (ret) {
|
||||
dev_err_probe(&pdev->dev, ret, "device reset failed\n");
|
||||
goto free_host;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
host->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
|
@ -648,7 +648,7 @@ static int pxamci_probe(struct platform_device *pdev)
|
||||
|
||||
ret = pxamci_of_init(pdev, mmc);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
host = mmc_priv(mmc);
|
||||
host->mmc = mmc;
|
||||
@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_device *pdev)
|
||||
|
||||
ret = pxamci_init_ocr(host);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto out;
|
||||
|
||||
mmc->caps = 0;
|
||||
host->cmdat = 0;
|
||||
|
@ -1074,9 +1074,6 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||
|
||||
mcp251x_read_2regs(spi, CANINTF, &intf, &eflag);
|
||||
|
||||
/* mask out flags we don't care about */
|
||||
intf &= CANINTF_RX | CANINTF_TX | CANINTF_ERR;
|
||||
|
||||
/* receive buffer 0 */
|
||||
if (intf & CANINTF_RX0IF) {
|
||||
mcp251x_hw_rx(spi, 0);
|
||||
@ -1086,6 +1083,18 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||
if (mcp251x_is_2510(spi))
|
||||
mcp251x_write_bits(spi, CANINTF,
|
||||
CANINTF_RX0IF, 0x00);
|
||||
|
||||
/* check if buffer 1 is already known to be full, no need to re-read */
|
||||
if (!(intf & CANINTF_RX1IF)) {
|
||||
u8 intf1, eflag1;
|
||||
|
||||
/* intf needs to be read again to avoid a race condition */
|
||||
mcp251x_read_2regs(spi, CANINTF, &intf1, &eflag1);
|
||||
|
||||
/* combine flags from both operations for error handling */
|
||||
intf |= intf1;
|
||||
eflag |= eflag1;
|
||||
}
|
||||
}
|
||||
|
||||
/* receive buffer 1 */
|
||||
@ -1096,6 +1105,9 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||
clear_intf |= CANINTF_RX1IF;
|
||||
}
|
||||
|
||||
/* mask out flags we don't care about */
|
||||
intf &= CANINTF_RX | CANINTF_TX | CANINTF_ERR;
|
||||
|
||||
/* any error or tx interrupt we need to clear? */
|
||||
if (intf & (CANINTF_ERR | CANINTF_TX))
|
||||
clear_intf |= intf & (CANINTF_ERR | CANINTF_TX);
|
||||
|
@ -194,7 +194,7 @@ struct __packed ems_cpc_msg {
|
||||
__le32 ts_sec; /* timestamp in seconds */
|
||||
__le32 ts_nsec; /* timestamp in nano seconds */
|
||||
|
||||
union {
|
||||
union __packed {
|
||||
u8 generic[64];
|
||||
struct cpc_can_msg can_msg;
|
||||
struct cpc_can_params can_params;
|
||||
|
@ -762,6 +762,9 @@ static int ksz9477_port_fdb_dump(struct dsa_switch *ds, int port,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!(ksz_data & ALU_VALID))
|
||||
continue;
|
||||
|
||||
/* read ALU table */
|
||||
ksz9477_read_table(dev, alu_table);
|
||||
|
||||
|
@ -118,6 +118,9 @@ static int mv88e6060_setup_port(struct mv88e6060_priv *priv, int p)
|
||||
int addr = REG_PORT(p);
|
||||
int ret;
|
||||
|
||||
if (dsa_is_unused_port(priv->ds, p))
|
||||
return 0;
|
||||
|
||||
/* Do not force flow control, disable Ingress and Egress
|
||||
* Header tagging, disable VLAN tunneling, and set the port
|
||||
* state to Forwarding. Additionally, if this is the CPU
|
||||
|
@ -578,7 +578,8 @@ static const struct ocelot_stat_layout vsc9959_stats_layout[] = {
|
||||
{ .offset = 0x87, .name = "tx_frames_below_65_octets", },
|
||||
{ .offset = 0x88, .name = "tx_frames_65_to_127_octets", },
|
||||
{ .offset = 0x89, .name = "tx_frames_128_255_octets", },
|
||||
{ .offset = 0x8B, .name = "tx_frames_256_511_octets", },
|
||||
{ .offset = 0x8A, .name = "tx_frames_256_511_octets", },
|
||||
{ .offset = 0x8B, .name = "tx_frames_512_1023_octets", },
|
||||
{ .offset = 0x8C, .name = "tx_frames_1024_1526_octets", },
|
||||
{ .offset = 0x8D, .name = "tx_frames_over_1526_octets", },
|
||||
{ .offset = 0x8E, .name = "tx_yellow_prio_0", },
|
||||
|
@ -93,7 +93,7 @@ static int sja1105_setup_devlink_regions(struct dsa_switch *ds)
|
||||
|
||||
region = dsa_devlink_region_create(ds, ops, 1, size);
|
||||
if (IS_ERR(region)) {
|
||||
while (i-- >= 0)
|
||||
while (--i >= 0)
|
||||
dsa_devlink_region_destroy(priv->regions[i]);
|
||||
return PTR_ERR(region);
|
||||
}
|
||||
|
@ -265,12 +265,10 @@ static void aq_nic_service_timer_cb(struct timer_list *t)
|
||||
static void aq_nic_polling_timer_cb(struct timer_list *t)
|
||||
{
|
||||
struct aq_nic_s *self = from_timer(self, t, polling_timer);
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
unsigned int i = 0U;
|
||||
|
||||
for (i = 0U, aq_vec = self->aq_vec[0];
|
||||
self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
|
||||
aq_vec_isr(i, (void *)aq_vec);
|
||||
for (i = 0U; self->aq_vecs > i; ++i)
|
||||
aq_vec_isr(i, (void *)self->aq_vec[i]);
|
||||
|
||||
mod_timer(&self->polling_timer, jiffies +
|
||||
AQ_CFG_POLLING_TIMER_INTERVAL);
|
||||
@ -872,7 +870,6 @@ int aq_nic_get_regs_count(struct aq_nic_s *self)
|
||||
|
||||
u64 *aq_nic_get_stats(struct aq_nic_s *self, u64 *data)
|
||||
{
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
struct aq_stats_s *stats;
|
||||
unsigned int count = 0U;
|
||||
unsigned int i = 0U;
|
||||
@ -922,11 +919,11 @@ u64 *aq_nic_get_stats(struct aq_nic_s *self, u64 *data)
|
||||
data += i;
|
||||
|
||||
for (tc = 0U; tc < self->aq_nic_cfg.tcs; tc++) {
|
||||
for (i = 0U, aq_vec = self->aq_vec[0];
|
||||
aq_vec && self->aq_vecs > i;
|
||||
++i, aq_vec = self->aq_vec[i]) {
|
||||
for (i = 0U; self->aq_vecs > i; ++i) {
|
||||
if (!self->aq_vec[i])
|
||||
break;
|
||||
data += count;
|
||||
count = aq_vec_get_sw_stats(aq_vec, tc, data);
|
||||
count = aq_vec_get_sw_stats(self->aq_vec[i], tc, data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1240,7 +1237,6 @@ int aq_nic_set_loopback(struct aq_nic_s *self)
|
||||
|
||||
int aq_nic_stop(struct aq_nic_s *self)
|
||||
{
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
unsigned int i = 0U;
|
||||
|
||||
netif_tx_disable(self->ndev);
|
||||
@ -1258,9 +1254,8 @@ int aq_nic_stop(struct aq_nic_s *self)
|
||||
|
||||
aq_ptp_irq_free(self);
|
||||
|
||||
for (i = 0U, aq_vec = self->aq_vec[0];
|
||||
self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
|
||||
aq_vec_stop(aq_vec);
|
||||
for (i = 0U; self->aq_vecs > i; ++i)
|
||||
aq_vec_stop(self->aq_vec[i]);
|
||||
|
||||
aq_ptp_ring_stop(self);
|
||||
|
||||
|
@ -189,8 +189,8 @@ static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac,
|
||||
}
|
||||
|
||||
slot->skb = skb;
|
||||
ring->end += nr_frags + 1;
|
||||
netdev_sent_queue(net_dev, skb->len);
|
||||
ring->end += nr_frags + 1;
|
||||
|
||||
wmb();
|
||||
|
||||
|
@ -1349,8 +1349,8 @@ static int dpaa2_eth_add_bufs(struct dpaa2_eth_priv *priv,
|
||||
buf_array[i] = addr;
|
||||
|
||||
/* tracing point */
|
||||
trace_dpaa2_eth_buf_seed(priv->net_dev,
|
||||
page, DPAA2_ETH_RX_BUF_RAW_SIZE,
|
||||
trace_dpaa2_eth_buf_seed(priv->net_dev, page_address(page),
|
||||
DPAA2_ETH_RX_BUF_RAW_SIZE,
|
||||
addr, priv->rx_buf_size,
|
||||
bpid);
|
||||
}
|
||||
|
@ -136,11 +136,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
|
||||
* NSEC_PER_SEC - ts.tv_nsec. Add the remaining nanoseconds
|
||||
* to current timer would be next second.
|
||||
*/
|
||||
tempval = readl(fep->hwp + FEC_ATIME_CTRL);
|
||||
tempval |= FEC_T_CTRL_CAPTURE;
|
||||
writel(tempval, fep->hwp + FEC_ATIME_CTRL);
|
||||
|
||||
tempval = readl(fep->hwp + FEC_ATIME);
|
||||
tempval = fep->cc.read(&fep->cc);
|
||||
/* Convert the ptp local counter to 1588 timestamp */
|
||||
ns = timecounter_cyc2time(&fep->tc, tempval);
|
||||
ts = ns_to_timespec64(ns);
|
||||
|
@ -382,7 +382,9 @@ static void i40e_tx_timeout(struct net_device *netdev, unsigned int txqueue)
|
||||
set_bit(__I40E_GLOBAL_RESET_REQUESTED, pf->state);
|
||||
break;
|
||||
default:
|
||||
netdev_err(netdev, "tx_timeout recovery unsuccessful\n");
|
||||
netdev_err(netdev, "tx_timeout recovery unsuccessful, device is in non-recoverable state.\n");
|
||||
set_bit(__I40E_DOWN_REQUESTED, pf->state);
|
||||
set_bit(__I40E_VSI_DOWN_REQUESTED, vsi->state);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -324,6 +324,7 @@ static enum iavf_status iavf_config_arq_regs(struct iavf_hw *hw)
|
||||
static enum iavf_status iavf_init_asq(struct iavf_hw *hw)
|
||||
{
|
||||
enum iavf_status ret_code = 0;
|
||||
int i;
|
||||
|
||||
if (hw->aq.asq.count > 0) {
|
||||
/* queue already initialized */
|
||||
@ -354,12 +355,17 @@ static enum iavf_status iavf_init_asq(struct iavf_hw *hw)
|
||||
/* initialize base registers */
|
||||
ret_code = iavf_config_asq_regs(hw);
|
||||
if (ret_code)
|
||||
goto init_adminq_free_rings;
|
||||
goto init_free_asq_bufs;
|
||||
|
||||
/* success! */
|
||||
hw->aq.asq.count = hw->aq.num_asq_entries;
|
||||
goto init_adminq_exit;
|
||||
|
||||
init_free_asq_bufs:
|
||||
for (i = 0; i < hw->aq.num_asq_entries; i++)
|
||||
iavf_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]);
|
||||
iavf_free_virt_mem(hw, &hw->aq.asq.dma_head);
|
||||
|
||||
init_adminq_free_rings:
|
||||
iavf_free_adminq_asq(hw);
|
||||
|
||||
@ -383,6 +389,7 @@ static enum iavf_status iavf_init_asq(struct iavf_hw *hw)
|
||||
static enum iavf_status iavf_init_arq(struct iavf_hw *hw)
|
||||
{
|
||||
enum iavf_status ret_code = 0;
|
||||
int i;
|
||||
|
||||
if (hw->aq.arq.count > 0) {
|
||||
/* queue already initialized */
|
||||
@ -413,12 +420,16 @@ static enum iavf_status iavf_init_arq(struct iavf_hw *hw)
|
||||
/* initialize base registers */
|
||||
ret_code = iavf_config_arq_regs(hw);
|
||||
if (ret_code)
|
||||
goto init_adminq_free_rings;
|
||||
goto init_free_arq_bufs;
|
||||
|
||||
/* success! */
|
||||
hw->aq.arq.count = hw->aq.num_arq_entries;
|
||||
goto init_adminq_exit;
|
||||
|
||||
init_free_arq_bufs:
|
||||
for (i = 0; i < hw->aq.num_arq_entries; i++)
|
||||
iavf_free_dma_mem(hw, &hw->aq.arq.r.arq_bi[i]);
|
||||
iavf_free_virt_mem(hw, &hw->aq.arq.dma_head);
|
||||
init_adminq_free_rings:
|
||||
iavf_free_adminq_arq(hw);
|
||||
|
||||
|
@ -2590,7 +2590,7 @@ ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
|
||||
else
|
||||
status = ice_set_vsi_promisc(hw, vsi_handle,
|
||||
promisc_mask, vlan_id);
|
||||
if (status)
|
||||
if (status && status != -EEXIST)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -664,6 +664,8 @@ struct igb_adapter {
|
||||
struct igb_mac_addr *mac_table;
|
||||
struct vf_mac_filter vf_macs;
|
||||
struct vf_mac_filter *vf_mac_list;
|
||||
/* lock for VF resources */
|
||||
spinlock_t vfs_lock;
|
||||
};
|
||||
|
||||
/* flags controlling PTP/1588 function */
|
||||
|
@ -3638,6 +3638,7 @@ static int igb_disable_sriov(struct pci_dev *pdev)
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct igb_adapter *adapter = netdev_priv(netdev);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
unsigned long flags;
|
||||
|
||||
/* reclaim resources allocated to VFs */
|
||||
if (adapter->vf_data) {
|
||||
@ -3650,12 +3651,13 @@ static int igb_disable_sriov(struct pci_dev *pdev)
|
||||
pci_disable_sriov(pdev);
|
||||
msleep(500);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&adapter->vfs_lock, flags);
|
||||
kfree(adapter->vf_mac_list);
|
||||
adapter->vf_mac_list = NULL;
|
||||
kfree(adapter->vf_data);
|
||||
adapter->vf_data = NULL;
|
||||
adapter->vfs_allocated_count = 0;
|
||||
spin_unlock_irqrestore(&adapter->vfs_lock, flags);
|
||||
wr32(E1000_IOVCTL, E1000_IOVCTL_REUSE_VFQ);
|
||||
wrfl();
|
||||
msleep(100);
|
||||
@ -3815,7 +3817,9 @@ static void igb_remove(struct pci_dev *pdev)
|
||||
igb_release_hw_control(adapter);
|
||||
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
rtnl_lock();
|
||||
igb_disable_sriov(pdev);
|
||||
rtnl_unlock();
|
||||
#endif
|
||||
|
||||
unregister_netdev(netdev);
|
||||
@ -3975,6 +3979,9 @@ static int igb_sw_init(struct igb_adapter *adapter)
|
||||
|
||||
spin_lock_init(&adapter->nfc_lock);
|
||||
spin_lock_init(&adapter->stats64_lock);
|
||||
|
||||
/* init spinlock to avoid concurrency of VF resources */
|
||||
spin_lock_init(&adapter->vfs_lock);
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
switch (hw->mac.type) {
|
||||
case e1000_82576:
|
||||
@ -7852,8 +7859,10 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
|
||||
static void igb_msg_task(struct igb_adapter *adapter)
|
||||
{
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
unsigned long flags;
|
||||
u32 vf;
|
||||
|
||||
spin_lock_irqsave(&adapter->vfs_lock, flags);
|
||||
for (vf = 0; vf < adapter->vfs_allocated_count; vf++) {
|
||||
/* process any reset requests */
|
||||
if (!igb_check_for_rst(hw, vf))
|
||||
@ -7867,6 +7876,7 @@ static void igb_msg_task(struct igb_adapter *adapter)
|
||||
if (!igb_check_for_ack(hw, vf))
|
||||
igb_rcv_ack_from_vf(adapter, vf);
|
||||
}
|
||||
spin_unlock_irqrestore(&adapter->vfs_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ static void moxart_mac_free_memory(struct net_device *ndev)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < RX_DESC_NUM; i++)
|
||||
dma_unmap_single(&ndev->dev, priv->rx_mapping[i],
|
||||
dma_unmap_single(&priv->pdev->dev, priv->rx_mapping[i],
|
||||
priv->rx_buf_size, DMA_FROM_DEVICE);
|
||||
|
||||
if (priv->tx_desc_base)
|
||||
@ -147,11 +147,11 @@ static void moxart_mac_setup_desc_ring(struct net_device *ndev)
|
||||
desc + RX_REG_OFFSET_DESC1);
|
||||
|
||||
priv->rx_buf[i] = priv->rx_buf_base + priv->rx_buf_size * i;
|
||||
priv->rx_mapping[i] = dma_map_single(&ndev->dev,
|
||||
priv->rx_mapping[i] = dma_map_single(&priv->pdev->dev,
|
||||
priv->rx_buf[i],
|
||||
priv->rx_buf_size,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&ndev->dev, priv->rx_mapping[i]))
|
||||
if (dma_mapping_error(&priv->pdev->dev, priv->rx_mapping[i]))
|
||||
netdev_err(ndev, "DMA mapping error\n");
|
||||
|
||||
moxart_desc_write(priv->rx_mapping[i],
|
||||
@ -240,7 +240,7 @@ static int moxart_rx_poll(struct napi_struct *napi, int budget)
|
||||
if (len > RX_BUF_SIZE)
|
||||
len = RX_BUF_SIZE;
|
||||
|
||||
dma_sync_single_for_cpu(&ndev->dev,
|
||||
dma_sync_single_for_cpu(&priv->pdev->dev,
|
||||
priv->rx_mapping[rx_head],
|
||||
priv->rx_buf_size, DMA_FROM_DEVICE);
|
||||
skb = netdev_alloc_skb_ip_align(ndev, len);
|
||||
@ -294,7 +294,7 @@ static void moxart_tx_finished(struct net_device *ndev)
|
||||
unsigned int tx_tail = priv->tx_tail;
|
||||
|
||||
while (tx_tail != tx_head) {
|
||||
dma_unmap_single(&ndev->dev, priv->tx_mapping[tx_tail],
|
||||
dma_unmap_single(&priv->pdev->dev, priv->tx_mapping[tx_tail],
|
||||
priv->tx_len[tx_tail], DMA_TO_DEVICE);
|
||||
|
||||
ndev->stats.tx_packets++;
|
||||
@ -358,9 +358,9 @@ static netdev_tx_t moxart_mac_start_xmit(struct sk_buff *skb,
|
||||
|
||||
len = skb->len > TX_BUF_SIZE ? TX_BUF_SIZE : skb->len;
|
||||
|
||||
priv->tx_mapping[tx_head] = dma_map_single(&ndev->dev, skb->data,
|
||||
priv->tx_mapping[tx_head] = dma_map_single(&priv->pdev->dev, skb->data,
|
||||
len, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&ndev->dev, priv->tx_mapping[tx_head])) {
|
||||
if (dma_mapping_error(&priv->pdev->dev, priv->tx_mapping[tx_head])) {
|
||||
netdev_err(ndev, "DMA mapping error\n");
|
||||
goto out_unlock;
|
||||
}
|
||||
@ -379,7 +379,7 @@ static netdev_tx_t moxart_mac_start_xmit(struct sk_buff *skb,
|
||||
len = ETH_ZLEN;
|
||||
}
|
||||
|
||||
dma_sync_single_for_device(&ndev->dev, priv->tx_mapping[tx_head],
|
||||
dma_sync_single_for_device(&priv->pdev->dev, priv->tx_mapping[tx_head],
|
||||
priv->tx_buf_size, DMA_TO_DEVICE);
|
||||
|
||||
txdes1 = TX_DESC1_LTS | TX_DESC1_FTS | (len & TX_DESC1_BUF_SIZE_MASK);
|
||||
@ -494,7 +494,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
|
||||
priv->tx_buf_size = TX_BUF_SIZE;
|
||||
priv->rx_buf_size = RX_BUF_SIZE;
|
||||
|
||||
priv->tx_desc_base = dma_alloc_coherent(&pdev->dev, TX_REG_DESC_SIZE *
|
||||
priv->tx_desc_base = dma_alloc_coherent(p_dev, TX_REG_DESC_SIZE *
|
||||
TX_DESC_NUM, &priv->tx_base,
|
||||
GFP_DMA | GFP_KERNEL);
|
||||
if (!priv->tx_desc_base) {
|
||||
@ -502,7 +502,7 @@ static int moxart_mac_probe(struct platform_device *pdev)
|
||||
goto init_fail;
|
||||
}
|
||||
|
||||
priv->rx_desc_base = dma_alloc_coherent(&pdev->dev, RX_REG_DESC_SIZE *
|
||||
priv->rx_desc_base = dma_alloc_coherent(p_dev, RX_REG_DESC_SIZE *
|
||||
RX_DESC_NUM, &priv->rx_base,
|
||||
GFP_DMA | GFP_KERNEL);
|
||||
if (!priv->rx_desc_base) {
|
||||
|
@ -1225,6 +1225,8 @@ nfp_port_get_module_info(struct net_device *netdev,
|
||||
u8 data;
|
||||
|
||||
port = nfp_port_from_netdev(netdev);
|
||||
/* update port state to get latest interface */
|
||||
set_bit(NFP_PORT_CHANGED, &port->flags);
|
||||
eth_port = nfp_port_get_eth_port(port);
|
||||
if (!eth_port)
|
||||
return -EOPNOTSUPP;
|
||||
|
@ -669,6 +669,7 @@ static void intel_eth_pci_remove(struct pci_dev *pdev)
|
||||
|
||||
pci_free_irq_vectors(pdev);
|
||||
|
||||
clk_disable_unprepare(priv->plat->stmmac_clk);
|
||||
clk_unregister_fixed_rate(priv->plat->stmmac_clk);
|
||||
|
||||
pcim_iounmap_regions(pdev, BIT(0));
|
||||
|
@ -772,7 +772,8 @@ static struct rtable *geneve_get_v4_rt(struct sk_buff *skb,
|
||||
struct geneve_sock *gs4,
|
||||
struct flowi4 *fl4,
|
||||
const struct ip_tunnel_info *info,
|
||||
__be16 dport, __be16 sport)
|
||||
__be16 dport, __be16 sport,
|
||||
__u8 *full_tos)
|
||||
{
|
||||
bool use_cache = ip_tunnel_dst_cache_usable(skb, info);
|
||||
struct geneve_dev *geneve = netdev_priv(dev);
|
||||
@ -797,6 +798,8 @@ static struct rtable *geneve_get_v4_rt(struct sk_buff *skb,
|
||||
use_cache = false;
|
||||
}
|
||||
fl4->flowi4_tos = RT_TOS(tos);
|
||||
if (full_tos)
|
||||
*full_tos = tos;
|
||||
|
||||
dst_cache = (struct dst_cache *)&info->dst_cache;
|
||||
if (use_cache) {
|
||||
@ -850,8 +853,7 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb,
|
||||
use_cache = false;
|
||||
}
|
||||
|
||||
fl6->flowlabel = ip6_make_flowinfo(RT_TOS(prio),
|
||||
info->key.label);
|
||||
fl6->flowlabel = ip6_make_flowinfo(prio, info->key.label);
|
||||
dst_cache = (struct dst_cache *)&info->dst_cache;
|
||||
if (use_cache) {
|
||||
dst = dst_cache_get_ip6(dst_cache, &fl6->saddr);
|
||||
@ -885,6 +887,7 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
||||
const struct ip_tunnel_key *key = &info->key;
|
||||
struct rtable *rt;
|
||||
struct flowi4 fl4;
|
||||
__u8 full_tos;
|
||||
__u8 tos, ttl;
|
||||
__be16 df = 0;
|
||||
__be16 sport;
|
||||
@ -895,7 +898,7 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info,
|
||||
geneve->cfg.info.key.tp_dst, sport);
|
||||
geneve->cfg.info.key.tp_dst, sport, &full_tos);
|
||||
if (IS_ERR(rt))
|
||||
return PTR_ERR(rt);
|
||||
|
||||
@ -939,7 +942,7 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;
|
||||
} else {
|
||||
tos = ip_tunnel_ecn_encap(fl4.flowi4_tos, ip_hdr(skb), skb);
|
||||
tos = ip_tunnel_ecn_encap(full_tos, ip_hdr(skb), skb);
|
||||
if (geneve->cfg.ttl_inherit)
|
||||
ttl = ip_tunnel_get_ttl(ip_hdr(skb), skb);
|
||||
else
|
||||
@ -1121,7 +1124,7 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
|
||||
1, USHRT_MAX, true);
|
||||
|
||||
rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info,
|
||||
geneve->cfg.info.key.tp_dst, sport);
|
||||
geneve->cfg.info.key.tp_dst, sport, NULL);
|
||||
if (IS_ERR(rt))
|
||||
return PTR_ERR(rt);
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ plip_open(struct net_device *dev)
|
||||
/* Any address will do - we take the first. We already
|
||||
have the first two bytes filled with 0xfc, from
|
||||
plip_init_dev(). */
|
||||
const struct in_ifaddr *ifa = rcu_dereference(in_dev->ifa_list);
|
||||
const struct in_ifaddr *ifa = rtnl_dereference(in_dev->ifa_list);
|
||||
if (ifa != NULL) {
|
||||
memcpy(dev->dev_addr+2, &ifa->ifa_local, 4);
|
||||
}
|
||||
|
@ -968,8 +968,11 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
|
||||
case XDP_TX:
|
||||
stats->xdp_tx++;
|
||||
xdpf = xdp_convert_buff_to_frame(&xdp);
|
||||
if (unlikely(!xdpf))
|
||||
if (unlikely(!xdpf)) {
|
||||
if (unlikely(xdp_page != page))
|
||||
put_page(xdp_page);
|
||||
goto err_xdp;
|
||||
}
|
||||
err = virtnet_xdp_xmit(dev, 1, &xdpf, 0);
|
||||
if (unlikely(err < 0)) {
|
||||
trace_xdp_exception(vi->dev, xdp_prog, act);
|
||||
|
@ -367,14 +367,16 @@ static ssize_t tool_fn_write(struct tool_ctx *tc,
|
||||
u64 bits;
|
||||
int n;
|
||||
|
||||
if (*offp)
|
||||
return 0;
|
||||
|
||||
buf = kmalloc(size + 1, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = simple_write_to_buffer(buf, size, offp, ubuf, size);
|
||||
if (ret < 0) {
|
||||
if (copy_from_user(buf, ubuf, size)) {
|
||||
kfree(buf);
|
||||
return ret;
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
buf[size] = 0;
|
||||
|
@ -1802,7 +1802,8 @@ static int __init nvmet_tcp_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
nvmet_tcp_wq = alloc_workqueue("nvmet_tcp_wq", WQ_HIGHPRI, 0);
|
||||
nvmet_tcp_wq = alloc_workqueue("nvmet_tcp_wq",
|
||||
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
|
||||
if (!nvmet_tcp_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -196,8 +196,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev,
|
||||
pci_dbg(bridge, "broadcast error_detected message\n");
|
||||
if (state == pci_channel_io_frozen) {
|
||||
pci_walk_bridge(bridge, report_frozen_detected, &status);
|
||||
status = reset_subordinates(bridge);
|
||||
if (status != PCI_ERS_RESULT_RECOVERED) {
|
||||
if (reset_subordinates(bridge) != PCI_ERS_RESULT_RECOVERED) {
|
||||
pci_warn(bridge, "subordinate device reset failed\n");
|
||||
goto failed;
|
||||
}
|
||||
|
@ -4897,6 +4897,9 @@ static const struct pci_dev_acs_enabled {
|
||||
{ PCI_VENDOR_ID_AMPERE, 0xE00C, pci_quirk_xgene_acs },
|
||||
/* Broadcom multi-function device */
|
||||
{ PCI_VENDOR_ID_BROADCOM, 0x16D7, pci_quirk_mf_endpoint_acs },
|
||||
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
|
||||
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
|
||||
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
|
||||
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
|
||||
/* Amazon Annapurna Labs */
|
||||
{ PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
|
||||
|
@ -1571,16 +1571,14 @@ EXPORT_SYMBOL_GPL(intel_pinctrl_probe_by_uid);
|
||||
|
||||
const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_device *pdev)
|
||||
{
|
||||
const struct intel_pinctrl_soc_data * const *table;
|
||||
const struct intel_pinctrl_soc_data *data = NULL;
|
||||
const struct intel_pinctrl_soc_data **table;
|
||||
struct acpi_device *adev;
|
||||
unsigned int i;
|
||||
|
||||
adev = ACPI_COMPANION(&pdev->dev);
|
||||
if (adev) {
|
||||
const void *match = device_get_match_data(&pdev->dev);
|
||||
table = device_get_match_data(&pdev->dev);
|
||||
if (table) {
|
||||
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
|
||||
unsigned int i;
|
||||
|
||||
table = (const struct intel_pinctrl_soc_data **)match;
|
||||
for (i = 0; table[i]; i++) {
|
||||
if (!strcmp(adev->pnp.unique_id, table[i]->uid)) {
|
||||
data = table[i];
|
||||
@ -1594,7 +1592,7 @@ const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_
|
||||
if (!id)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
table = (const struct intel_pinctrl_soc_data **)id->driver_data;
|
||||
table = (const struct intel_pinctrl_soc_data * const *)id->driver_data;
|
||||
data = table[pdev->id];
|
||||
}
|
||||
|
||||
|
@ -1421,8 +1421,10 @@ static int nmk_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
|
||||
|
||||
has_config = nmk_pinctrl_dt_get_config(np, &configs);
|
||||
np_config = of_parse_phandle(np, "ste,config", 0);
|
||||
if (np_config)
|
||||
if (np_config) {
|
||||
has_config |= nmk_pinctrl_dt_get_config(np_config, &configs);
|
||||
of_node_put(np_config);
|
||||
}
|
||||
if (has_config) {
|
||||
const char *gpio_name;
|
||||
const char *pin;
|
||||
|
@ -844,8 +844,8 @@ static const struct msm_pingroup msm8916_groups[] = {
|
||||
PINGROUP(28, pwr_modem_enabled_a, NA, NA, NA, NA, NA, qdss_tracedata_b, NA, atest_combodac),
|
||||
PINGROUP(29, cci_i2c, NA, NA, NA, NA, NA, qdss_tracedata_b, NA, atest_combodac),
|
||||
PINGROUP(30, cci_i2c, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_b),
|
||||
PINGROUP(31, cci_timer0, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(32, cci_timer1, NA, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(31, cci_timer0, flash_strobe, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(32, cci_timer1, flash_strobe, NA, NA, NA, NA, NA, NA, NA),
|
||||
PINGROUP(33, cci_async, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_b),
|
||||
PINGROUP(34, pwr_nav_enabled_a, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_b),
|
||||
PINGROUP(35, pwr_crypto_enabled_a, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_b),
|
||||
|
@ -1316,7 +1316,7 @@ static const struct msm_pingroup sm8250_groups[] = {
|
||||
static const struct msm_gpio_wakeirq_map sm8250_pdc_map[] = {
|
||||
{ 0, 79 }, { 1, 84 }, { 2, 80 }, { 3, 82 }, { 4, 107 }, { 7, 43 },
|
||||
{ 11, 42 }, { 14, 44 }, { 15, 52 }, { 19, 67 }, { 23, 68 }, { 24, 105 },
|
||||
{ 27, 92 }, { 28, 106 }, { 31, 69 }, { 35, 70 }, { 39, 37 },
|
||||
{ 27, 92 }, { 28, 106 }, { 31, 69 }, { 35, 70 }, { 39, 73 },
|
||||
{ 40, 108 }, { 43, 71 }, { 45, 72 }, { 47, 83 }, { 51, 74 }, { 55, 77 },
|
||||
{ 59, 78 }, { 63, 75 }, { 64, 81 }, { 65, 87 }, { 66, 88 }, { 67, 89 },
|
||||
{ 68, 54 }, { 70, 85 }, { 77, 46 }, { 80, 90 }, { 81, 91 }, { 83, 97 },
|
||||
|
@ -105,6 +105,7 @@ static const struct sunxi_pinctrl_desc sun50i_h6_r_pinctrl_data = {
|
||||
.npins = ARRAY_SIZE(sun50i_h6_r_pins),
|
||||
.pin_base = PL_BASE,
|
||||
.irq_banks = 2,
|
||||
.io_bias_cfg_variant = BIAS_VOLTAGE_PIO_POW_MODE_SEL,
|
||||
};
|
||||
|
||||
static int sun50i_h6_r_pinctrl_probe(struct platform_device *pdev)
|
||||
|
@ -624,7 +624,7 @@ static int sunxi_pinctrl_set_io_bias_cfg(struct sunxi_pinctrl *pctl,
|
||||
unsigned pin,
|
||||
struct regulator *supply)
|
||||
{
|
||||
unsigned short bank = pin / PINS_PER_BANK;
|
||||
unsigned short bank;
|
||||
unsigned long flags;
|
||||
u32 val, reg;
|
||||
int uV;
|
||||
@ -640,6 +640,9 @@ static int sunxi_pinctrl_set_io_bias_cfg(struct sunxi_pinctrl *pctl,
|
||||
if (uV == 0)
|
||||
return 0;
|
||||
|
||||
pin -= pctl->desc->pin_base;
|
||||
bank = pin / PINS_PER_BANK;
|
||||
|
||||
switch (pctl->desc->io_bias_cfg_variant) {
|
||||
case BIAS_VOLTAGE_GRP_CONFIG:
|
||||
/*
|
||||
@ -657,8 +660,6 @@ static int sunxi_pinctrl_set_io_bias_cfg(struct sunxi_pinctrl *pctl,
|
||||
else
|
||||
val = 0xD; /* 3.3V */
|
||||
|
||||
pin -= pctl->desc->pin_base;
|
||||
|
||||
reg = readl(pctl->membase + sunxi_grp_config_reg(pin));
|
||||
reg &= ~IO_BIAS_MASK;
|
||||
writel(reg | val, pctl->membase + sunxi_grp_config_reg(pin));
|
||||
|
@ -507,13 +507,13 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev)
|
||||
ret = cros_ec_get_host_command_version_mask(ec_dev,
|
||||
EC_CMD_GET_NEXT_EVENT,
|
||||
&ver_mask);
|
||||
if (ret < 0 || ver_mask == 0)
|
||||
if (ret < 0 || ver_mask == 0) {
|
||||
ec_dev->mkbp_event_supported = 0;
|
||||
else
|
||||
} else {
|
||||
ec_dev->mkbp_event_supported = fls(ver_mask);
|
||||
|
||||
dev_dbg(ec_dev->dev, "MKBP support version %u\n",
|
||||
ec_dev->mkbp_event_supported - 1);
|
||||
dev_dbg(ec_dev->dev, "MKBP support version %u\n", ec_dev->mkbp_event_supported - 1);
|
||||
}
|
||||
|
||||
/* Probe if host sleep v1 is supported for S0ix failure detection. */
|
||||
ret = cros_ec_get_host_command_version_mask(ec_dev,
|
||||
|
@ -2609,8 +2609,8 @@ lpfc_debugfs_multixripools_write(struct file *file, const char __user *buf,
|
||||
struct lpfc_sli4_hdw_queue *qp;
|
||||
struct lpfc_multixri_pool *multixri_pool;
|
||||
|
||||
if (nbytes > 64)
|
||||
nbytes = 64;
|
||||
if (nbytes > sizeof(mybuf) - 1)
|
||||
nbytes = sizeof(mybuf) - 1;
|
||||
|
||||
memset(mybuf, 0, sizeof(mybuf));
|
||||
|
||||
@ -2690,8 +2690,8 @@ lpfc_debugfs_nvmestat_write(struct file *file, const char __user *buf,
|
||||
if (!phba->targetport)
|
||||
return -ENXIO;
|
||||
|
||||
if (nbytes > 64)
|
||||
nbytes = 64;
|
||||
if (nbytes > sizeof(mybuf) - 1)
|
||||
nbytes = sizeof(mybuf) - 1;
|
||||
|
||||
memset(mybuf, 0, sizeof(mybuf));
|
||||
|
||||
@ -2828,8 +2828,8 @@ lpfc_debugfs_ioktime_write(struct file *file, const char __user *buf,
|
||||
char mybuf[64];
|
||||
char *pbuf;
|
||||
|
||||
if (nbytes > 64)
|
||||
nbytes = 64;
|
||||
if (nbytes > sizeof(mybuf) - 1)
|
||||
nbytes = sizeof(mybuf) - 1;
|
||||
|
||||
memset(mybuf, 0, sizeof(mybuf));
|
||||
|
||||
@ -2956,8 +2956,8 @@ lpfc_debugfs_nvmeio_trc_write(struct file *file, const char __user *buf,
|
||||
char mybuf[64];
|
||||
char *pbuf;
|
||||
|
||||
if (nbytes > 63)
|
||||
nbytes = 63;
|
||||
if (nbytes > sizeof(mybuf) - 1)
|
||||
nbytes = sizeof(mybuf) - 1;
|
||||
|
||||
memset(mybuf, 0, sizeof(mybuf));
|
||||
|
||||
@ -3062,8 +3062,8 @@ lpfc_debugfs_hdwqstat_write(struct file *file, const char __user *buf,
|
||||
char *pbuf;
|
||||
int i;
|
||||
|
||||
if (nbytes > 64)
|
||||
nbytes = 64;
|
||||
if (nbytes > sizeof(mybuf) - 1)
|
||||
nbytes = sizeof(mybuf) - 1;
|
||||
|
||||
memset(mybuf, 0, sizeof(mybuf));
|
||||
|
||||
|
@ -156,6 +156,7 @@ struct meson_spicc_device {
|
||||
void __iomem *base;
|
||||
struct clk *core;
|
||||
struct clk *pclk;
|
||||
struct clk_divider pow2_div;
|
||||
struct clk *clk;
|
||||
struct spi_message *message;
|
||||
struct spi_transfer *xfer;
|
||||
@ -168,6 +169,8 @@ struct meson_spicc_device {
|
||||
unsigned long xfer_remain;
|
||||
};
|
||||
|
||||
#define pow2_clk_to_spicc(_div) container_of(_div, struct meson_spicc_device, pow2_div)
|
||||
|
||||
static void meson_spicc_oen_enable(struct meson_spicc_device *spicc)
|
||||
{
|
||||
u32 conf;
|
||||
@ -421,7 +424,7 @@ static int meson_spicc_prepare_message(struct spi_master *master,
|
||||
{
|
||||
struct meson_spicc_device *spicc = spi_master_get_devdata(master);
|
||||
struct spi_device *spi = message->spi;
|
||||
u32 conf = 0;
|
||||
u32 conf = readl_relaxed(spicc->base + SPICC_CONREG) & SPICC_DATARATE_MASK;
|
||||
|
||||
/* Store current message */
|
||||
spicc->message = message;
|
||||
@ -458,8 +461,6 @@ static int meson_spicc_prepare_message(struct spi_master *master,
|
||||
/* Select CS */
|
||||
conf |= FIELD_PREP(SPICC_CS_MASK, spi->chip_select);
|
||||
|
||||
/* Default Clock rate core/4 */
|
||||
|
||||
/* Default 8bit word */
|
||||
conf |= FIELD_PREP(SPICC_BITLENGTH_MASK, 8 - 1);
|
||||
|
||||
@ -476,12 +477,16 @@ static int meson_spicc_prepare_message(struct spi_master *master,
|
||||
static int meson_spicc_unprepare_transfer(struct spi_master *master)
|
||||
{
|
||||
struct meson_spicc_device *spicc = spi_master_get_devdata(master);
|
||||
u32 conf = readl_relaxed(spicc->base + SPICC_CONREG) & SPICC_DATARATE_MASK;
|
||||
|
||||
/* Disable all IRQs */
|
||||
writel(0, spicc->base + SPICC_INTREG);
|
||||
|
||||
device_reset_optional(&spicc->pdev->dev);
|
||||
|
||||
/* Set default configuration, keeping datarate field */
|
||||
writel_relaxed(conf, spicc->base + SPICC_CONREG);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -518,14 +523,60 @@ static void meson_spicc_cleanup(struct spi_device *spi)
|
||||
* Clk path for G12A series:
|
||||
* pclk -> pow2 fixed div -> pow2 div -> mux -> out
|
||||
* pclk -> enh fixed div -> enh div -> mux -> out
|
||||
*
|
||||
* The pow2 divider is tied to the controller HW state, and the
|
||||
* divider is only valid when the controller is initialized.
|
||||
*
|
||||
* A set of clock ops is added to make sure we don't read/set this
|
||||
* clock rate while the controller is in an unknown state.
|
||||
*/
|
||||
|
||||
static int meson_spicc_clk_init(struct meson_spicc_device *spicc)
|
||||
static unsigned long meson_spicc_pow2_recalc_rate(struct clk_hw *hw,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
struct clk_divider *divider = to_clk_divider(hw);
|
||||
struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider);
|
||||
|
||||
if (!spicc->master->cur_msg || !spicc->master->busy)
|
||||
return 0;
|
||||
|
||||
return clk_divider_ops.recalc_rate(hw, parent_rate);
|
||||
}
|
||||
|
||||
static int meson_spicc_pow2_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct clk_divider *divider = to_clk_divider(hw);
|
||||
struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider);
|
||||
|
||||
if (!spicc->master->cur_msg || !spicc->master->busy)
|
||||
return -EINVAL;
|
||||
|
||||
return clk_divider_ops.determine_rate(hw, req);
|
||||
}
|
||||
|
||||
static int meson_spicc_pow2_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
struct clk_divider *divider = to_clk_divider(hw);
|
||||
struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider);
|
||||
|
||||
if (!spicc->master->cur_msg || !spicc->master->busy)
|
||||
return -EINVAL;
|
||||
|
||||
return clk_divider_ops.set_rate(hw, rate, parent_rate);
|
||||
}
|
||||
|
||||
const struct clk_ops meson_spicc_pow2_clk_ops = {
|
||||
.recalc_rate = meson_spicc_pow2_recalc_rate,
|
||||
.determine_rate = meson_spicc_pow2_determine_rate,
|
||||
.set_rate = meson_spicc_pow2_set_rate,
|
||||
};
|
||||
|
||||
static int meson_spicc_pow2_clk_init(struct meson_spicc_device *spicc)
|
||||
{
|
||||
struct device *dev = &spicc->pdev->dev;
|
||||
struct clk_fixed_factor *pow2_fixed_div, *enh_fixed_div;
|
||||
struct clk_divider *pow2_div, *enh_div;
|
||||
struct clk_mux *mux;
|
||||
struct clk_fixed_factor *pow2_fixed_div;
|
||||
struct clk_init_data init;
|
||||
struct clk *clk;
|
||||
struct clk_parent_data parent_data[2];
|
||||
@ -560,31 +611,45 @@ static int meson_spicc_clk_init(struct meson_spicc_device *spicc)
|
||||
if (WARN_ON(IS_ERR(clk)))
|
||||
return PTR_ERR(clk);
|
||||
|
||||
pow2_div = devm_kzalloc(dev, sizeof(*pow2_div), GFP_KERNEL);
|
||||
if (!pow2_div)
|
||||
return -ENOMEM;
|
||||
|
||||
snprintf(name, sizeof(name), "%s#pow2_div", dev_name(dev));
|
||||
init.name = name;
|
||||
init.ops = &clk_divider_ops;
|
||||
init.flags = CLK_SET_RATE_PARENT;
|
||||
init.ops = &meson_spicc_pow2_clk_ops;
|
||||
/*
|
||||
* Set NOCACHE here to make sure we read the actual HW value
|
||||
* since we reset the HW after each transfer.
|
||||
*/
|
||||
init.flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE;
|
||||
parent_data[0].hw = &pow2_fixed_div->hw;
|
||||
init.num_parents = 1;
|
||||
|
||||
pow2_div->shift = 16,
|
||||
pow2_div->width = 3,
|
||||
pow2_div->flags = CLK_DIVIDER_POWER_OF_TWO,
|
||||
pow2_div->reg = spicc->base + SPICC_CONREG;
|
||||
pow2_div->hw.init = &init;
|
||||
spicc->pow2_div.shift = 16,
|
||||
spicc->pow2_div.width = 3,
|
||||
spicc->pow2_div.flags = CLK_DIVIDER_POWER_OF_TWO,
|
||||
spicc->pow2_div.reg = spicc->base + SPICC_CONREG;
|
||||
spicc->pow2_div.hw.init = &init;
|
||||
|
||||
clk = devm_clk_register(dev, &pow2_div->hw);
|
||||
if (WARN_ON(IS_ERR(clk)))
|
||||
return PTR_ERR(clk);
|
||||
spicc->clk = devm_clk_register(dev, &spicc->pow2_div.hw);
|
||||
if (WARN_ON(IS_ERR(spicc->clk)))
|
||||
return PTR_ERR(spicc->clk);
|
||||
|
||||
if (!spicc->data->has_enhance_clk_div) {
|
||||
spicc->clk = clk;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int meson_spicc_enh_clk_init(struct meson_spicc_device *spicc)
|
||||
{
|
||||
struct device *dev = &spicc->pdev->dev;
|
||||
struct clk_fixed_factor *enh_fixed_div;
|
||||
struct clk_divider *enh_div;
|
||||
struct clk_mux *mux;
|
||||
struct clk_init_data init;
|
||||
struct clk *clk;
|
||||
struct clk_parent_data parent_data[2];
|
||||
char name[64];
|
||||
|
||||
memset(&init, 0, sizeof(init));
|
||||
memset(&parent_data, 0, sizeof(parent_data));
|
||||
|
||||
init.parent_data = parent_data;
|
||||
|
||||
/* algorithm for enh div: rate = freq / 2 / (N + 1) */
|
||||
|
||||
@ -637,7 +702,7 @@ static int meson_spicc_clk_init(struct meson_spicc_device *spicc)
|
||||
snprintf(name, sizeof(name), "%s#sel", dev_name(dev));
|
||||
init.name = name;
|
||||
init.ops = &clk_mux_ops;
|
||||
parent_data[0].hw = &pow2_div->hw;
|
||||
parent_data[0].hw = &spicc->pow2_div.hw;
|
||||
parent_data[1].hw = &enh_div->hw;
|
||||
init.num_parents = 2;
|
||||
init.flags = CLK_SET_RATE_PARENT;
|
||||
@ -754,12 +819,20 @@ static int meson_spicc_probe(struct platform_device *pdev)
|
||||
|
||||
meson_spicc_oen_enable(spicc);
|
||||
|
||||
ret = meson_spicc_clk_init(spicc);
|
||||
ret = meson_spicc_pow2_clk_init(spicc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "clock registration failed\n");
|
||||
dev_err(&pdev->dev, "pow2 clock registration failed\n");
|
||||
goto out_clk;
|
||||
}
|
||||
|
||||
if (spicc->data->has_enhance_clk_div) {
|
||||
ret = meson_spicc_enh_clk_init(spicc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "clock registration failed\n");
|
||||
goto out_clk;
|
||||
}
|
||||
}
|
||||
|
||||
ret = devm_spi_register_master(&pdev->dev, master);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "spi master registration failed\n");
|
||||
|
@ -334,6 +334,9 @@ tee_ioctl_shm_register(struct tee_context *ctx,
|
||||
if (data.flags)
|
||||
return -EINVAL;
|
||||
|
||||
if (!access_ok((void __user *)(unsigned long)data.addr, data.length))
|
||||
return -EFAULT;
|
||||
|
||||
shm = tee_shm_register(ctx, data.addr, data.length,
|
||||
TEE_SHM_DMA_BUF | TEE_SHM_USER_MAPPED);
|
||||
if (IS_ERR(shm))
|
||||
|
@ -222,9 +222,6 @@ struct tee_shm *tee_shm_register(struct tee_context *ctx, unsigned long addr,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!access_ok((void __user *)addr, length))
|
||||
return ERR_PTR(-EFAULT);
|
||||
|
||||
mutex_lock(&teedev->mutex);
|
||||
shm->id = idr_alloc(&teedev->idr, shm, 1, 0, GFP_KERNEL);
|
||||
mutex_unlock(&teedev->mutex);
|
||||
|
@ -1137,6 +1137,8 @@ static unsigned int soc_info(unsigned int *rev_h, unsigned int *rev_l)
|
||||
/* No compatible property, so try the name. */
|
||||
soc_string = np->name;
|
||||
|
||||
of_node_put(np);
|
||||
|
||||
/* Extract the SOC number from the "PowerPC," string */
|
||||
if ((sscanf(soc_string, "PowerPC,%u", &soc) != 1) || !soc)
|
||||
return 0;
|
||||
|
@ -655,9 +655,9 @@ static void cdns3_wa2_remove_old_request(struct cdns3_endpoint *priv_ep)
|
||||
trace_cdns3_wa2(priv_ep, "removes eldest request");
|
||||
|
||||
kfree(priv_req->request.buf);
|
||||
list_del_init(&priv_req->list);
|
||||
cdns3_gadget_ep_free_request(&priv_ep->endpoint,
|
||||
&priv_req->request);
|
||||
list_del_init(&priv_req->list);
|
||||
--priv_ep->wa2_counter;
|
||||
|
||||
if (!chain)
|
||||
|
@ -3593,7 +3593,8 @@ void dwc2_hsotg_core_disconnect(struct dwc2_hsotg *hsotg)
|
||||
void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
/* remove the soft-disconnect and let's go */
|
||||
dwc2_clear_bit(hsotg, DCTL, DCTL_SFTDISCON);
|
||||
if (!hsotg->role_sw || (dwc2_readl(hsotg, GOTGCTL) & GOTGCTL_BSESVLD))
|
||||
dwc2_clear_bit(hsotg, DCTL, DCTL_SFTDISCON);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +164,7 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
break;
|
||||
|
||||
default:
|
||||
uvcg_info(&video->uvc->func,
|
||||
uvcg_warn(&video->uvc->func,
|
||||
"VS request completed with status %d.\n",
|
||||
req->status);
|
||||
uvcg_queue_cancel(queue, 0);
|
||||
|
@ -362,6 +362,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
|
||||
spin_unlock_irq (&epdata->dev->lock);
|
||||
|
||||
DBG (epdata->dev, "endpoint gone\n");
|
||||
wait_for_completion(&done);
|
||||
epdata->status = -ENODEV;
|
||||
}
|
||||
}
|
||||
|
@ -169,6 +169,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
|
||||
release_mem_region(res.start, 0x4);
|
||||
} else
|
||||
pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
irq_dispose_mapping(irq);
|
||||
|
@ -23,6 +23,10 @@ static int usbhs_rza1_hardware_init(struct platform_device *pdev)
|
||||
extal_clk = of_find_node_by_name(NULL, "extal");
|
||||
of_property_read_u32(usb_x1_clk, "clock-frequency", &freq_usb);
|
||||
of_property_read_u32(extal_clk, "clock-frequency", &freq_extal);
|
||||
|
||||
of_node_put(usb_x1_clk);
|
||||
of_node_put(extal_clk);
|
||||
|
||||
if (freq_usb == 0) {
|
||||
if (freq_extal == 12000000) {
|
||||
/* Select 12MHz XTAL */
|
||||
|
@ -1783,6 +1783,7 @@ struct vfio_info_cap_header *vfio_info_cap_add(struct vfio_info_cap *caps,
|
||||
buf = krealloc(caps->buf, caps->size + size, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
kfree(caps->buf);
|
||||
caps->buf = NULL;
|
||||
caps->size = 0;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,
|
||||
u32 xres, right, hslen, left, xtotal;
|
||||
u32 yres, lower, vslen, upper, ytotal;
|
||||
u32 vxres, xoffset, vyres, yoffset;
|
||||
u32 bpp, base, dacspeed24, mem;
|
||||
u32 bpp, base, dacspeed24, mem, freq;
|
||||
u8 r7;
|
||||
int i;
|
||||
|
||||
@ -643,7 +643,12 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,
|
||||
par->atc[VGA_ATC_OVERSCAN] = 0;
|
||||
|
||||
/* Calculate VCLK that most closely matches the requested dot clock */
|
||||
i740_calc_vclk((((u32)1e9) / var->pixclock) * (u32)(1e3), par);
|
||||
freq = (((u32)1e9) / var->pixclock) * (u32)(1e3);
|
||||
if (freq < I740_RFREQ_FIX) {
|
||||
fb_dbg(info, "invalid pixclock\n");
|
||||
freq = I740_RFREQ_FIX;
|
||||
}
|
||||
i740_calc_vclk(freq, par);
|
||||
|
||||
/* Since we program the clocks ourselves, always use VCLK2. */
|
||||
par->misc |= 0x0C;
|
||||
|
@ -356,8 +356,8 @@ static int vbg_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
|
||||
goto err_vbg_core_exit;
|
||||
}
|
||||
|
||||
ret = devm_request_irq(dev, pci->irq, vbg_core_isr, IRQF_SHARED,
|
||||
DEVICE_NAME, gdev);
|
||||
ret = request_irq(pci->irq, vbg_core_isr, IRQF_SHARED, DEVICE_NAME,
|
||||
gdev);
|
||||
if (ret) {
|
||||
vbg_err("vboxguest: Error requesting irq: %d\n", ret);
|
||||
goto err_vbg_core_exit;
|
||||
@ -367,7 +367,7 @@ static int vbg_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
|
||||
if (ret) {
|
||||
vbg_err("vboxguest: Error misc_register %s failed: %d\n",
|
||||
DEVICE_NAME, ret);
|
||||
goto err_vbg_core_exit;
|
||||
goto err_free_irq;
|
||||
}
|
||||
|
||||
ret = misc_register(&gdev->misc_device_user);
|
||||
@ -403,6 +403,8 @@ static int vbg_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
|
||||
misc_deregister(&gdev->misc_device_user);
|
||||
err_unregister_misc_device:
|
||||
misc_deregister(&gdev->misc_device);
|
||||
err_free_irq:
|
||||
free_irq(pci->irq, gdev);
|
||||
err_vbg_core_exit:
|
||||
vbg_core_exit(gdev);
|
||||
err_disable_pcidev:
|
||||
@ -419,6 +421,7 @@ static void vbg_pci_remove(struct pci_dev *pci)
|
||||
vbg_gdev = NULL;
|
||||
mutex_unlock(&vbg_gdev_mutex);
|
||||
|
||||
free_irq(pci->irq, gdev);
|
||||
device_remove_file(gdev->dev, &dev_attr_host_features);
|
||||
device_remove_file(gdev->dev, &dev_attr_host_version);
|
||||
misc_deregister(&gdev->misc_device_user);
|
||||
|
@ -128,7 +128,7 @@ static ssize_t xenbus_file_read(struct file *filp,
|
||||
{
|
||||
struct xenbus_file_priv *u = filp->private_data;
|
||||
struct read_buffer *rb;
|
||||
unsigned i;
|
||||
ssize_t i;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&u->reply_mutex);
|
||||
@ -148,7 +148,7 @@ static ssize_t xenbus_file_read(struct file *filp,
|
||||
rb = list_entry(u->read_buffers.next, struct read_buffer, list);
|
||||
i = 0;
|
||||
while (i < len) {
|
||||
unsigned sz = min((unsigned)len - i, rb->len - rb->cons);
|
||||
size_t sz = min_t(size_t, len - i, rb->len - rb->cons);
|
||||
|
||||
ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz);
|
||||
|
||||
|
@ -1075,7 +1075,9 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
|
||||
extref = btrfs_lookup_inode_extref(NULL, root, path, name, namelen,
|
||||
inode_objectid, parent_objectid, 0,
|
||||
0);
|
||||
if (!IS_ERR_OR_NULL(extref)) {
|
||||
if (IS_ERR(extref)) {
|
||||
return PTR_ERR(extref);
|
||||
} else if (extref) {
|
||||
u32 item_size;
|
||||
u32 cur_offset = 0;
|
||||
unsigned long base;
|
||||
|
@ -3501,24 +3501,23 @@ static void handle_cap_grant(struct inode *inode,
|
||||
fill_inline = true;
|
||||
}
|
||||
|
||||
if (ci->i_auth_cap == cap &&
|
||||
le32_to_cpu(grant->op) == CEPH_CAP_OP_IMPORT) {
|
||||
if (newcaps & ~extra_info->issued)
|
||||
wake = true;
|
||||
if (le32_to_cpu(grant->op) == CEPH_CAP_OP_IMPORT) {
|
||||
if (ci->i_auth_cap == cap) {
|
||||
if (newcaps & ~extra_info->issued)
|
||||
wake = true;
|
||||
|
||||
if (ci->i_requested_max_size > max_size ||
|
||||
!(le32_to_cpu(grant->wanted) & CEPH_CAP_ANY_FILE_WR)) {
|
||||
/* re-request max_size if necessary */
|
||||
ci->i_requested_max_size = 0;
|
||||
wake = true;
|
||||
if (ci->i_requested_max_size > max_size ||
|
||||
!(le32_to_cpu(grant->wanted) & CEPH_CAP_ANY_FILE_WR)) {
|
||||
/* re-request max_size if necessary */
|
||||
ci->i_requested_max_size = 0;
|
||||
wake = true;
|
||||
}
|
||||
|
||||
ceph_kick_flushing_inode_caps(session, ci);
|
||||
}
|
||||
|
||||
ceph_kick_flushing_inode_caps(session, ci);
|
||||
spin_unlock(&ci->i_ceph_lock);
|
||||
up_read(&session->s_mdsc->snap_rwsem);
|
||||
} else {
|
||||
spin_unlock(&ci->i_ceph_lock);
|
||||
}
|
||||
spin_unlock(&ci->i_ceph_lock);
|
||||
|
||||
if (fill_inline)
|
||||
ceph_fill_inline_data(inode, NULL, extra_info->inline_data,
|
||||
|
@ -1184,14 +1184,17 @@ static int encode_supported_features(void **p, void *end)
|
||||
if (count > 0) {
|
||||
size_t i;
|
||||
size_t size = FEATURE_BYTES(count);
|
||||
unsigned long bit;
|
||||
|
||||
if (WARN_ON_ONCE(*p + 4 + size > end))
|
||||
return -ERANGE;
|
||||
|
||||
ceph_encode_32(p, size);
|
||||
memset(*p, 0, size);
|
||||
for (i = 0; i < count; i++)
|
||||
((unsigned char*)(*p))[i / 8] |= BIT(feature_bits[i] % 8);
|
||||
for (i = 0; i < count; i++) {
|
||||
bit = feature_bits[i];
|
||||
((unsigned char *)(*p))[bit / 8] |= BIT(bit % 8);
|
||||
}
|
||||
*p += size;
|
||||
} else {
|
||||
if (WARN_ON_ONCE(*p + 4 > end))
|
||||
|
@ -33,10 +33,6 @@ enum ceph_feature_type {
|
||||
CEPHFS_FEATURE_MAX = CEPHFS_FEATURE_METRIC_COLLECT,
|
||||
};
|
||||
|
||||
/*
|
||||
* This will always have the highest feature bit value
|
||||
* as the last element of the array.
|
||||
*/
|
||||
#define CEPHFS_FEATURES_CLIENT_SUPPORTED { \
|
||||
0, 1, 2, 3, 4, 5, 6, 7, \
|
||||
CEPHFS_FEATURE_MIMIC, \
|
||||
@ -45,8 +41,6 @@ enum ceph_feature_type {
|
||||
CEPHFS_FEATURE_MULTI_RECONNECT, \
|
||||
CEPHFS_FEATURE_DELEG_INO, \
|
||||
CEPHFS_FEATURE_METRIC_COLLECT, \
|
||||
\
|
||||
CEPHFS_FEATURE_MAX, \
|
||||
}
|
||||
#define CEPHFS_FEATURES_CLIENT_REQUIRED {}
|
||||
|
||||
|
@ -1000,9 +1000,7 @@ move_smb2_ea_to_cifs(char *dst, size_t dst_size,
|
||||
size_t name_len, value_len, user_name_len;
|
||||
|
||||
while (src_size > 0) {
|
||||
name = &src->ea_data[0];
|
||||
name_len = (size_t)src->ea_name_length;
|
||||
value = &src->ea_data[src->ea_name_length + 1];
|
||||
value_len = (size_t)le16_to_cpu(src->ea_value_length);
|
||||
|
||||
if (name_len == 0)
|
||||
@ -1014,6 +1012,9 @@ move_smb2_ea_to_cifs(char *dst, size_t dst_size,
|
||||
goto out;
|
||||
}
|
||||
|
||||
name = &src->ea_data[0];
|
||||
value = &src->ea_data[src->ea_name_length + 1];
|
||||
|
||||
if (ea_name) {
|
||||
if (ea_name_len == name_len &&
|
||||
memcmp(ea_name, name, name_len) == 0) {
|
||||
|
@ -3058,11 +3058,8 @@ bool ext4_empty_dir(struct inode *inode)
|
||||
de = (struct ext4_dir_entry_2 *) (bh->b_data +
|
||||
(offset & (sb->s_blocksize - 1)));
|
||||
if (ext4_check_dir_entry(inode, NULL, de, bh,
|
||||
bh->b_data, bh->b_size, 0, offset)) {
|
||||
offset = (offset | (sb->s_blocksize - 1)) + 1;
|
||||
continue;
|
||||
}
|
||||
if (le32_to_cpu(de->inode)) {
|
||||
bh->b_data, bh->b_size, 0, offset) ||
|
||||
le32_to_cpu(de->inode)) {
|
||||
brelse(bh);
|
||||
return false;
|
||||
}
|
||||
|
@ -1957,6 +1957,16 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)
|
||||
}
|
||||
brelse(bh);
|
||||
|
||||
/*
|
||||
* For bigalloc, trim the requested size to the nearest cluster
|
||||
* boundary to avoid creating an unusable filesystem. We do this
|
||||
* silently, instead of returning an error, to avoid breaking
|
||||
* callers that blindly resize the filesystem to the full size of
|
||||
* the underlying block device.
|
||||
*/
|
||||
if (ext4_has_feature_bigalloc(sb))
|
||||
n_blocks_count &= ~((1 << EXT4_CLUSTER_BITS(sb)) - 1);
|
||||
|
||||
retry:
|
||||
o_blocks_count = ext4_blocks_count(es);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user