Merge 4.19.224 into android-4.19-stable
Linux 4.19.224
* net: fix use-after-free in tw_timer_handler
net/ipv4/af_inet.c
Input: spaceball - fix parsing of movement data packets
Input: appletouch - initialize work before device registration
scsi: vmw_pvscsi: Set residual data length conditionally
* binder: fix async_free_space accounting for empty parcels
drivers/android/binder_alloc.c
usb: mtu3: set interval of FS intr and isoc endpoint
* usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear.
drivers/usb/gadget/function/f_fs.c
* xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set.
drivers/usb/host/xhci-pci.c
* uapi: fix linux/nfc.h userspace compilation errors
include/uapi/linux/nfc.h
* nfc: uapi: use kernel size_t to fix user-space builds
include/uapi/linux/nfc.h
* i2c: validate user data in compat ioctl
drivers/i2c/i2c-dev.c
fsl/fman: Fix missing put_device() call in fman_port_probe
selftests/net: udpgso_bench_tx: fix dst ip argument
net/mlx5e: Fix wrong features assignment in case of error
NFC: st21nfca: Fix memory leak in device probe and remove
net: usb: pegasus: Do not drop long Ethernet frames
* sctp: use call_rcu to free endpoint
include/net/sctp/sctp.h
include/net/sctp/structs.h
net/sctp/diag.c
net/sctp/endpointola.c
net/sctp/socket.c
selftests: Calculate udpgso segment count without header adjustment
* udp: using datalen to cap ipv6 udp max gso segments
net/ipv6/udp.c
scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()
* selinux: initialize proto variable in selinux_ip_postroute_compat()
security/selinux/hooks.c
recordmcount.pl: fix typo in s390 mcount regex
platform/x86: apple-gmux: use resource_size() with res
Input: i8042 - enable deferred probe quirk for ASUS UM325UA
Input: i8042 - add deferred probe support
* tee: handle lookup of shm with reference count 0
include/linux/tee_drv.h
* HID: asus: Add depends on USB_HID to HID_ASUS Kconfig option
drivers/hid/Kconfig
Merge 4.19.223 into android-4.19-stable
Linux 4.19.223
phonet/pep: refuse to enable an unbound pipe
hamradio: improve the incomplete fix to avoid NPD
hamradio: defer ax25 kfree after unregister_netdev
ax25: NPD bug when detaching AX25 device
hwmon: (lm90) Do not report 'busy' status bit as alarm
KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state
* usb: gadget: u_ether: fix race in setting MAC address in setup phase
drivers/usb/gadget/function/u_ether.c
* f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()
fs/f2fs/xattr.c
ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling
pinctrl: stm32: consider the GPIO offset to expose all the GPIO lines
x86/pkey: Fix undefined behaviour with PKRU_WD_BIT
parisc: Correct completer in lws start
ipmi: fix initialization when workqueue allocation fails
ipmi: bail out if init_srcu_struct fails
Input: atmel_mxt_ts - fix double free in mxt_read_info_block
ALSA: drivers: opl3: Fix incorrect use of vp->state
* ALSA: jack: Check the return value of kstrdup()
sound/core/jack.c
hwmon: (lm90) Fix usage of CONFIG2 register in detect function
sfc: falcon: Check null pointer of rx_queue->page_ring
drivers: net: smc911x: Check for error irq
fjes: Check for error irq
* bonding: fix ad_actor_system option setting to default
drivers/net/bonding/bond_options.c
ipmi: Fix UAF when uninstall ipmi_si and ipmi_msghandler module
* net: skip virtio_net_hdr_set_proto if protocol already set
include/linux/virtio_net.h
* net: accept UFOv6 packages in virtio_net_hdr_to_skb
include/linux/virtio_net.h
qlcnic: potential dereference null pointer of rx_queue->page_ring
* netfilter: fix regression in looped (broad|multi)cast's MAC handling
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
spi: change clk_disable_unprepare to clk_unprepare
arm64: dts: allwinner: orangepi-zero-plus: fix PHY mode
HID: holtek: fix mouse probing
block, bfq: fix use after free in bfq_bfqq_expire
block, bfq: fix queue removal from weights tree
block, bfq: fix decrement of num_active_groups
block, bfq: fix asymmetric scenarios detection
block, bfq: improve asymmetric scenarios detection
net: usb: lan78xx: add Allied Telesis AT29M2-AF
* Revert "ARM: 8800/1: use choice for kernel unwinders"
lib/Kconfig.debug
Merge 4.19.222 into android-4.19-stable
Linux 4.19.222
xen/netback: don't queue unlimited number of packages
xen/netback: fix rx queue stall detection
xen/console: harden hvc_xen against event channel storms
xen/netfront: harden netfront against event channel storms
xen/blkfront: harden blkfront against event channel storms
scsi: scsi_debug: Sanity check block descriptor length in resp_mode_select()
* ovl: fix warning in ovl_create_real()
fs/overlayfs/dir.c
fs/overlayfs/overlayfs.h
fs/overlayfs/super.c
* fuse: annotate lock in fuse_reverse_inval_entry()
fs/fuse/dir.c
media: mxl111sf: change mutex_init() location
ARM: dts: imx6ull-pinfunc: Fix CSI_DATA07__ESAI_TX0 pad name
firmware: arm_scpi: Fix string overflow in SCPI genpd driver
* Input: touchscreen - avoid bitwise vs logical OR warning
drivers/input/touchscreen/of_touchscreen.c
* ARM: 8800/1: use choice for kernel unwinders
lib/Kconfig.debug
mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO
ARM: 8805/2: remove unneeded naked function usage
net: lan78xx: Avoid unnecessary self assignment
mac80211: validate extended element ID is present
net: systemport: Add global locking for descriptor lifecycle
drm/amdgpu: correct register access for RLC_JUMP_TABLE_RESTORE
libata: if T_LENGTH is zero, dma direction should be DMA_NONE
* timekeeping: Really make sure wall_to_monotonic isn't positive
kernel/time/timekeeping.c
USB: serial: option: add Telit FN990 compositions
USB: serial: cp210x: fix CP2105 GPIO registration
* PCI/MSI: Mask MSI-X vectors only on success
drivers/pci/msi.c
* PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
drivers/pci/msi.c
* USB: NO_LPM quirk Lenovo USB-C to Ethernet Adapher(RTL8153-04)
drivers/usb/core/quirks.c
* USB: gadget: bRequestType is a bitfield, not a enum
drivers/usb/gadget/composite.c
* sit: do not call ipip6_dev_free() from sit_init_net()
net/ipv6/sit.c
* net/packet: rx_owner_map depends on pg_vec
net/packet/af_packet.c
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
ixgbe: set X550 MDIO speed before talking to PHY
igbvf: fix double free in `igbvf_probe`
igb: Fix removal of unicast MAC filters of VFs
soc/tegra: fuse: Fix bitwise vs. logical OR warning
rds: memory leak in __rds_conn_create()
dmaengine: st_fdma: fix MODULE_ALIAS
sch_cake: do not call cake_destroy() from cake_init()
ARM: socfpga: dts: fix qspi node compatible
mac80211: track only QoS data frames for admission control
x86/sme: Explicitly map new EFI memmap table as encrypted
* x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol
arch/Kconfig
nfsd: fix use-after-free due to delegation race
* audit: improve robustness of the audit queue handling
kernel/audit.c
dm btree remove: fix use after free in rebalance_children()
recordmcount.pl: look for jgnop instruction as well as bcrl on s390
mac80211: send ADDBA requests using the tid/queue of the aggregation session
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
tracing: Fix a kmemleak false positive in tracing_map
* net: netlink: af_netlink: Prevent empty skb by adding a check on len.
net/netlink/af_netlink.c
i2c: rk3x: Handle a spurious start completion interrupt flag
parisc/agp: Annotate parisc agp init functions with __init
net/mlx4_en: Update reported link modes for 1/10G
drm/msm/dsi: set default num_data_lanes
nfc: fix segfault in nfc_genl_dump_devices_done
* stable: clamp SUBLEVEL in 4.19
Makefile
* FROMGIT: USB: gadget: bRequestType is a bitfield, not a enum
drivers/usb/gadget/composite.c
* ANDROID: GKI: abi workaround for 4.19.221
include/net/sch_generic.h
Merge 4.19.221 into android-4.19-stable
Linux 4.19.221
* net: sched: make function qdisc_free_cb() static
net/sched/sch_generic.c
* net_sched: fix a crash in tc_new_tfilter()
net/sched/cls_api.c
irqchip: nvic: Fix offset for Interrupt Priority Offsets
* irqchip/irq-gic-v3-its.c: Force synchronisation when issuing INVALL
drivers/irqchip/irq-gic-v3-its.c
irqchip/armada-370-xp: Fix support for Multi-MSI interrupts
irqchip/armada-370-xp: Fix return value of armada_370_xp_msi_alloc()
iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove
iio: adc: axp20x_adc: fix charging current reporting on AXP22x
iio: at91-sama5d2: Fix incorrect sign extension
iio: dln2: Check return value of devm_iio_trigger_register()
iio: dln2-adc: Fix lockdep complaint
iio: itg3200: Call iio_trigger_notify_done() on error
iio: kxsd9: Don't return error code in trigger handler
iio: ltr501: Don't return error code in trigger handler
iio: mma8452: Fix trigger reference couting
iio: stk3310: Don't return error code in interrupt handler
iio: trigger: stm32-timer: fix MODULE_ALIAS
iio: trigger: Fix reference counting
* xhci: avoid race between disable slot command and host runtime suspend
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
* usb: core: config: using bit mask instead of individual bits
drivers/usb/core/config.c
* xhci: Remove CONFIG_USB_DEFAULT_PERSIST to prevent xHCI from runtime suspending
drivers/usb/host/xhci.c
* usb: core: config: fix validation of wMaxPacketValue entries
drivers/usb/core/config.c
* USB: gadget: zero allocate endpoint 0 buffers
drivers/usb/gadget/composite.c
* USB: gadget: detect too-big endpoint 0 requests
drivers/usb/gadget/composite.c
net/qla3xxx: fix an error code in ql_adapter_up()
* net, neigh: clear whole pneigh_entry at alloc time
net/core/neighbour.c
net: fec: only clear interrupt of handling queue in fec_enet_rx_queue()
net: altera: set a couple error code in probe()
* net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero
drivers/net/usb/cdc_ncm.c
tools build: Remove needless libpython-version feature check that breaks test-all fast path
mtd: rawnand: fsmc: Take instruction delay into account
i40e: Fix pre-set max number of queues for VF
ASoC: qdsp6: q6routing: Fix return value from msm_routing_put_audio_mixer
qede: validate non LSO skb length
* block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2)
block/ioprio.c
* tracefs: Set all files to the same group ownership as the mount option
fs/tracefs/inode.c
* aio: fix use-after-free due to missing POLLFREE handling
fs/aio.c
include/uapi/asm-generic/poll.h
* aio: keep poll requests on waitqueue until completed
fs/aio.c
* signalfd: use wake_up_pollfree()
fs/signalfd.c
* binder: use wake_up_pollfree()
drivers/android/binder.c
* wait: add wake_up_pollfree()
include/linux/wait.h
kernel/sched/wait.c
libata: add horkage for ASMedia 1092
can: m_can: Disable and ignore ELO interrupt
can: pch_can: pch_can_rx_normal: fix use after free
* clk: qcom: regmap-mux: fix parent clock lookup
drivers/clk/qcom/clk-regmap-mux.c
drivers/clk/qcom/common.c
drivers/clk/qcom/common.h
* tracefs: Have new files inherit the ownership of their parent
fs/tracefs/inode.c
ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*()
ALSA: pcm: oss: Limit the period size to 16MB
ALSA: pcm: oss: Fix negative period/buffer sizes
* ALSA: ctl: Fix copy of updated id with element read/write
sound/core/control_compat.c
* mm: bdi: initialize bdi_min_ratio when bdi is unregistered
mm/backing-dev.c
IB/hfi1: Correct guard on eager buffer deallocation
* udp: using datalen to cap max gso segments
net/ipv4/udp.c
seg6: fix the iif in the IPv6 socket control block
nfp: Fix memory leak in nfp_cpp_area_cache_add()
* bonding: make tx_rebalance_counter an atomic
drivers/net/bonding/bond_alb.c
include/net/bond_alb.h
ice: ignore dropped packets during init
* bpf: Fix the off-by-two error in range markings
kernel/bpf/verifier.c
nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
* net: sched: use Qdisc rcu API instead of relying on rtnl lock
net/sched/cls_api.c
* net: sched: add helper function to take reference to Qdisc
include/net/sch_generic.h
* net: sched: extend Qdisc with rcu
include/linux/rtnetlink.h
include/net/pkt_sched.h
include/net/sch_generic.h
net/sched/sch_api.c
net/sched/sch_generic.c
* net: sched: rename qdisc_destroy() to qdisc_put()
include/net/sch_generic.h
net/sched/sch_api.c
net/sched/sch_fifo.c
net/sched/sch_generic.c
net/sched/sch_htb.c
net/sched/sch_mq.c
net/sched/sch_multiq.c
net/sched/sch_netem.c
net/sched/sch_prio.c
net/sched/sch_tbf.c
* net: core: netlink: add helper refcount dec and lock function
include/linux/rtnetlink.h
net/core/rtnetlink.c
can: sja1000: fix use after free in ems_pcmcia_add_card()
can: kvaser_usb: get CAN clock frequency from device
HID: check for valid USB device for many HID drivers
HID: wacom: fix problems when device is not a valid USB device
* HID: add USB_HID dependancy on some USB HID drivers
drivers/hid/Kconfig
* HID: add USB_HID dependancy to hid-chicony
drivers/hid/Kconfig
* HID: add USB_HID dependancy to hid-prodikeys
drivers/hid/Kconfig
* HID: add hid_is_usb() function to make it simpler for USB detection
include/linux/hid.h
* HID: google: add eel USB id
drivers/hid/hid-ids.h
* UPSTREAM: USB: gadget: zero allocate endpoint 0 buffers
drivers/usb/gadget/composite.c
* UPSTREAM: USB: gadget: detect too-big endpoint 0 requests
drivers/usb/gadget/composite.c
Bug: 213962841
Change-Id: I08d2895cf1620064924ed5be29cb38d7bf18e7b3
Signed-off-by: Lucas Wei <lucaswei@google.com>
101 lines
2.7 KiB
C
101 lines
2.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2014, 2017-2018, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __QCOM_CLK_COMMON_H__
|
|
#define __QCOM_CLK_COMMON_H__
|
|
|
|
#include <linux/reset-controller.h>
|
|
|
|
struct platform_device;
|
|
struct regmap_config;
|
|
struct clk_regmap;
|
|
struct qcom_reset_map;
|
|
struct regmap;
|
|
struct freq_tbl;
|
|
struct clk_hw;
|
|
|
|
#define PLL_LOCK_COUNT_SHIFT 8
|
|
#define PLL_LOCK_COUNT_MASK 0x3f
|
|
#define PLL_BIAS_COUNT_SHIFT 14
|
|
#define PLL_BIAS_COUNT_MASK 0x3f
|
|
#define PLL_VOTE_FSM_ENA BIT(20)
|
|
#define PLL_VOTE_FSM_RESET BIT(21)
|
|
|
|
struct qcom_cc_desc {
|
|
const struct regmap_config *config;
|
|
struct clk_regmap **clks;
|
|
struct clk_hw **hwclks;
|
|
size_t num_clks;
|
|
size_t num_hwclks;
|
|
const struct qcom_reset_map *resets;
|
|
size_t num_resets;
|
|
struct gdsc **gdscs;
|
|
size_t num_gdscs;
|
|
};
|
|
|
|
/**
|
|
* struct parent_map - map table for source select configuration values
|
|
* @src: source
|
|
* @cfg: configuration value
|
|
*/
|
|
struct parent_map {
|
|
u8 src;
|
|
u8 cfg;
|
|
};
|
|
|
|
struct clk_dummy {
|
|
struct clk_hw hw;
|
|
struct reset_controller_dev reset;
|
|
unsigned long rrate;
|
|
};
|
|
|
|
extern const struct freq_tbl *qcom_find_freq(const struct freq_tbl *f,
|
|
unsigned long rate);
|
|
extern const struct freq_tbl *qcom_find_freq_floor(const struct freq_tbl *f,
|
|
unsigned long rate);
|
|
extern void
|
|
qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count);
|
|
extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map,
|
|
u8 src);
|
|
extern int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map,
|
|
u8 cfg);
|
|
|
|
extern int qcom_cc_register_board_clk(struct device *dev, const char *path,
|
|
const char *name, unsigned long rate);
|
|
extern int qcom_cc_register_sleep_clk(struct device *dev);
|
|
|
|
extern struct regmap *qcom_cc_map(struct platform_device *pdev,
|
|
const struct qcom_cc_desc *desc);
|
|
extern int qcom_cc_really_probe(struct platform_device *pdev,
|
|
const struct qcom_cc_desc *desc,
|
|
struct regmap *regmap);
|
|
extern int qcom_cc_probe(struct platform_device *pdev,
|
|
const struct qcom_cc_desc *desc);
|
|
extern const struct clk_ops clk_dummy_ops;
|
|
|
|
extern void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f);
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
#define WARN_CLK(core, name, cond, fmt, ...) do { \
|
|
clk_debug_print_hw(core, NULL); \
|
|
WARN(cond, "%s: " fmt, name, ##__VA_ARGS__); \
|
|
} while (0)
|
|
#else
|
|
#define WARN_CLK(core, name, cond, fmt, ...) do { \
|
|
WARN(cond, "%s: " fmt, name, ##__VA_ARGS__); \
|
|
} while (0)
|
|
#endif
|
|
|
|
#define clock_debug_output(m, c, fmt, ...) \
|
|
do { \
|
|
if (m) \
|
|
seq_printf(m, fmt, ##__VA_ARGS__); \
|
|
else if (c) \
|
|
pr_alert(fmt, ##__VA_ARGS__); \
|
|
else \
|
|
pr_info(fmt, ##__VA_ARGS__); \
|
|
} while (0)
|
|
#endif
|