mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Merge 5.15.38 into android14-5.15
Changes in 5.15.38
usb: mtu3: fix USB 3.0 dual-role-switch from device to host
USB: quirks: add a Realtek card reader
USB: quirks: add STRING quirk for VCOM device
USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS
USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader
USB: serial: option: add support for Cinterion MV32-WA/MV32-WB
USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions
usb: xhci: tegra:Fix PM usage reference leak of tegra_xusb_unpowergate_partitions
xhci: Enable runtime PM on second Alderlake controller
xhci: stop polling roothubs after shutdown
xhci: increase usb U3 -> U0 link resume timeout from 100ms to 500ms
iio: dac: ad5592r: Fix the missing return value.
iio: dac: ad5446: Fix read_raw not returning set value
iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on()
iio: imu: inv_icm42600: Fix I2C init possible nack
usb: misc: fix improper handling of refcount in uss720_probe()
usb: core: Don't hold the device lock while sleeping in do_proc_control()
usb: typec: ucsi: Fix reuse of completion structure
usb: typec: ucsi: Fix role swapping
usb: gadget: uvc: Fix crash when encoding data for usb request
usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
usb: dwc3: Try usb-role-switch first in dwc3_drd_init
usb: dwc3: core: Fix tx/rx threshold settings
usb: dwc3: core: Only handle soft-reset in DCTL
usb: dwc3: gadget: Return proper request status
usb: dwc3: pci: add support for the Intel Meteor Lake-P
usb: cdns3: Fix issue for clear halt endpoint
usb: phy: generic: Get the vbus supply
serial: imx: fix overrun interrupts in DMA mode
serial: amba-pl011: do not time out prematurely when draining tx fifo
serial: 8250: Also set sticky MCR bits in console restoration
serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device
arch_topology: Do not set llc_sibling if llc_id is invalid
ceph: fix possible NULL pointer dereference for req->r_session
bus: mhi: host: pci_generic: Add missing poweroff() PM callback
bus: mhi: host: pci_generic: Flush recovery worker during freeze
arm64: dts: imx8mm-venice: fix spi2 pin configuration
pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config
hex2bin: make the function hex_to_bin constant-time
hex2bin: fix access beyond string end
riscv: patch_text: Fixup last cpu should be master
x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests
iocost: don't reset the inuse weight of under-weighted debtors
virtio_net: fix wrong buf address calculation when using xdp
cpufreq: qcom-hw: fix the race between LMH worker and cpuhp
cpufreq: qcom-cpufreq-hw: Fix throttle frequency value on EPSS platforms
video: fbdev: udlfb: properly check endpoint type
arm64: dts: meson: remove CPU opps below 1GHz for G12B boards
arm64: dts: meson: remove CPU opps below 1GHz for SM1 boards
iio:imu:bmi160: disable regulator in error path
mtd: rawnand: fix ecc parameters for mt7622
xsk: Fix l2fwd for copy mode + busy poll combo
arm64: dts: imx8qm: Correct SCU clock controller's compatible property
USB: Fix xhci event ring dequeue pointer ERDP update issue
ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
arm64: dts: imx8mn: Fix SAI nodes
arm64: dts: meson-sm1-bananapi-m5: fix wrong GPIO pin labeling for CON1
phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe
phy: samsung: exynos5250-sata: fix missing device put in probe error paths
ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific
ARM: dts: dra7: Fix suspend warning for vpe powerdomain
phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks
ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
ARM: dts: at91: sama5d4_xplained: fix pinctrl phandle name
ARM: dts: at91: fix pinctrl phandles
phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probe
phy: ti: Add missing pm_runtime_disable() in serdes_am654_probe
interconnect: qcom: sdx55: Drop IP0 interconnects
ARM: dts: Fix mmc order for omap3-gta04
ARM: dts: am3517-evm: Fix misc pinmuxing
ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35
ipvs: correctly print the memory size of ip_vs_conn_tab
phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()
pinctrl: mediatek: moore: Fix build error
mtd: rawnand: Fix return value check of wait_for_completion_timeout
mtd: fix 'part' field data corruption in mtd_info
pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI
memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
net: dsa: Add missing of_node_put() in dsa_port_link_register_of
netfilter: nft_set_rbtree: overlap detection with element re-addition after deletion
bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook
pinctrl: rockchip: fix RK3308 pinmux bits
tcp: md5: incorrect tcp_header_len for incoming connections
pinctrl: stm32: Keep pinctrl block clock enabled when LEVEL IRQ requested
tcp: ensure to use the most recently sent skb when filling the rate sample
wireguard: device: check for metadata_dst with skb_valid_dst()
sctp: check asoc strreset_chunk in sctp_generate_reconf_event
ARM: dts: imx6ull-colibri: fix vqmmc regulator
arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock
pinctrl: pistachio: fix use of irq_of_parse_and_map()
cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe
net: hns3: clear inited state and stop client after failed to register netdev
net: hns3: modify the return code of hclge_get_ring_chain_from_mbx
net: hns3: add validity check for message data length
net: hns3: add return value for mailbox handling in PF
net/smc: sync err code when tcp connection was refused
ip_gre: Make o_seqno start from 0 in native mode
ip6_gre: Make o_seqno start from 0 in native mode
ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
tcp: make sure treq->af_specific is initialized
bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource()
cpufreq: qcom-cpufreq-hw: Clear dcvs interrupts
net: bcmgenet: hide status block before TX timestamping
net: phy: marvell10g: fix return value on error
net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr
drm/sun4i: Remove obsolete references to PHYS_OFFSET
net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK
io_uring: check reserved fields for send/sendmsg
io_uring: check reserved fields for recv/recvmsg
netfilter: conntrack: fix udp offload timeout sysctl
drm/amdkfd: Fix GWS queue count
drm/amd/display: Fix memory leak in dcn21_clock_source_create
tls: Skip tls_append_frag on zero copy size
bnx2x: fix napi API usage sequence
net: fec: add missing of_node_put() in fec_enet_init_stop_mode()
gfs2: Prevent endless loops in gfs2_file_buffered_write
gfs2: Minor retry logic cleanup
gfs2: Make sure not to return short direct writes
gfs2: No short reads or writes upon glock contention
perf arm-spe: Fix addresses of synthesized SPE events
ixgbe: ensure IPsec VF<->PF compatibility
Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits"
tcp: fix F-RTO may not work correctly when receiving DSACK
ASoC: Intel: soc-acpi: correct device endpoints for max98373
ASoC: wm8731: Disable the regulator when probing fails
ext4: fix bug_on in start_this_handle during umount filesystem
arch: xtensa: platforms: Fix deadlock in rs_close()
ksmbd: increment reference count of parent fp
ksmbd: set fixed sector size to FS_SECTOR_SIZE_INFORMATION
bonding: do not discard lowest hash bit for non layer3+4 hashing
x86: __memcpy_flushcache: fix wrong alignment if size > 2^32
cifs: destage any unwritten data to the server before calling copychunk_write
drivers: net: hippi: Fix deadlock in rr_close()
powerpc/perf: Fix 32bit compile
selftest/vm: verify mmap addr in mremap_test
selftest/vm: verify remap destination address in mremap_test
Revert "ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40"
zonefs: Fix management of open zones
zonefs: Clear inode information flags on inode creation
kasan: prevent cpu_quarantine corruption when CPU offline and cache shrink occur at same time
mtd: rawnand: qcom: fix memory corruption that causes panic
netfilter: Update ip6_route_me_harder to consider L3 domain
drm/i915: Check EDID for HDR static metadata when choosing blc
drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addresses
net: ethernet: stmmac: fix write to sgmii_adapter_base
ACPI: processor: idle: Avoid falling back to C3 type C-states
thermal: int340x: Fix attr.show callback prototype
btrfs: fix leaked plug after failure syncing log on zoned filesystems
ARM: dts: at91: sama7g5ek: enable pull-up on flexcom3 console lines
ARM: dts: imx8mm-venice-gw{71xx,72xx,73xx}: fix OTG controller OC mode
x86/cpu: Load microcode during restore_processor_state()
perf symbol: Pass is_kallsyms to symbols__fixup_end()
perf symbol: Update symbols__fixup_end()
tty: n_gsm: fix restart handling via CLD command
tty: n_gsm: fix decoupled mux resource
tty: n_gsm: fix mux cleanup after unregister tty device
tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2
tty: n_gsm: fix malformed counter for out of frame data
netfilter: nft_socket: only do sk lookups when indev is available
tty: n_gsm: fix insufficient txframe size
tty: n_gsm: fix wrong DLCI release order
tty: n_gsm: fix missing explicit ldisc flush
tty: n_gsm: fix wrong command retry handling
tty: n_gsm: fix wrong command frame length field encoding
tty: n_gsm: fix wrong signal octets encoding in MSC
tty: n_gsm: fix missing tty wakeup in convergence layer type 2
tty: n_gsm: fix reset fifo race condition
tty: n_gsm: fix incorrect UA handling
tty: n_gsm: fix software flow control handling
perf symbol: Remove arch__symbols__fixup_end()
eeprom: at25: Use DMA safe buffers
objtool: Fix code relocs vs weak symbols
objtool: Fix type of reloc::addend
powerpc/64: Add UADDR64 relocation support
Linux 5.15.38
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icb44a1f2d2d6f7b0f10ccc59521353c6ac836b5c
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 15
|
||||
SUBLEVEL = 37
|
||||
SUBLEVEL = 38
|
||||
EXTRAVERSION =
|
||||
NAME = Trick or Treat
|
||||
|
||||
|
||||
@@ -161,6 +161,8 @@
|
||||
|
||||
/* HS USB Host PHY on PORT 1 */
|
||||
hsusb1_phy: hsusb1_phy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_rst_pins>;
|
||||
compatible = "usb-nop-xceiv";
|
||||
reset-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; /* gpio_57 */
|
||||
#phy-cells = <0>;
|
||||
@@ -168,7 +170,9 @@
|
||||
};
|
||||
|
||||
&davinci_emac {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ðernet_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
@@ -193,6 +197,8 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins>;
|
||||
clock-frequency = <400000>;
|
||||
/* User DIP swithes [1:8] / User LEDS [1:2] */
|
||||
tca6416: gpio@21 {
|
||||
@@ -205,6 +211,8 @@
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c3_pins>;
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
|
||||
@@ -223,6 +231,8 @@
|
||||
};
|
||||
|
||||
&usbhshost {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_pins>;
|
||||
port1-mode = "ehci-phy";
|
||||
};
|
||||
|
||||
@@ -231,8 +241,35 @@
|
||||
};
|
||||
|
||||
&omap3_pmx_core {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_rst_pins>;
|
||||
|
||||
ethernet_pins: pinmux_ethernet_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21fe, PIN_INPUT | MUX_MODE0) /* rmii_mdio_data */
|
||||
OMAP3_CORE1_IOPAD(0x2200, MUX_MODE0) /* rmii_mdio_clk */
|
||||
OMAP3_CORE1_IOPAD(0x2202, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_rxd0 */
|
||||
OMAP3_CORE1_IOPAD(0x2204, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_rxd1 */
|
||||
OMAP3_CORE1_IOPAD(0x2206, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_crs_dv */
|
||||
OMAP3_CORE1_IOPAD(0x2208, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_rxer */
|
||||
OMAP3_CORE1_IOPAD(0x220a, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_txd0 */
|
||||
OMAP3_CORE1_IOPAD(0x220c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii_txd1 */
|
||||
OMAP3_CORE1_IOPAD(0x220e, PIN_OUTPUT_PULLDOWN |MUX_MODE0) /* rmii_txen */
|
||||
OMAP3_CORE1_IOPAD(0x2210, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii_50mhz_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c2_pins: pinmux_i2c2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c3_pins: pinmux_i2c3_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
leds_pins: pinmux_leds_pins {
|
||||
pinctrl-single,pins = <
|
||||
@@ -300,8 +337,6 @@
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb1_pins>;
|
||||
|
||||
hsusb1_pins: pinmux_hsusb1_pins {
|
||||
pinctrl-single,pins = <
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
clock-frequency = <400000>;
|
||||
|
||||
s35390a: s35390a@30 {
|
||||
@@ -179,6 +181,13 @@
|
||||
|
||||
&omap3_pmx_core {
|
||||
|
||||
i2c1_pins: pinmux_i2c1_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
|
||||
>;
|
||||
};
|
||||
|
||||
wl12xx_buffer_pins: pinmux_wl12xx_buffer_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x2156, PIN_OUTPUT | MUX_MODE4) /* mmc1_dat7.gpio_129 */
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
};
|
||||
|
||||
spi0: spi@f0004000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_spi0_cs>;
|
||||
pinctrl-names = "default", "cs";
|
||||
pinctrl-1 = <&pinctrl_spi0_cs>;
|
||||
cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -171,8 +171,8 @@
|
||||
};
|
||||
|
||||
spi1: spi@f8008000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_spi1_cs>;
|
||||
pinctrl-names = "default", "cs";
|
||||
pinctrl-1 = <&pinctrl_spi1_cs>;
|
||||
cs-gpios = <&pioC 25 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
};
|
||||
|
||||
spi1: spi@fc018000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_spi0_cs>;
|
||||
pinctrl-names = "default", "cs";
|
||||
pinctrl-1 = <&pinctrl_spi1_cs>;
|
||||
cs-gpios = <&pioB 21 0>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -140,7 +140,7 @@
|
||||
atmel,pins =
|
||||
<AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
|
||||
};
|
||||
pinctrl_spi0_cs: spi0_cs_default {
|
||||
pinctrl_spi1_cs: spi1_cs_default {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
pinctrl_flx3_default: flx3_default {
|
||||
pinmux = <PIN_PD16__FLEXCOM3_IO0>,
|
||||
<PIN_PD17__FLEXCOM3_IO1>;
|
||||
bias-disable;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
pinctrl_flx4_default: flx4_default {
|
||||
|
||||
@@ -219,6 +219,12 @@
|
||||
wm8731: wm8731@1b {
|
||||
compatible = "wm8731";
|
||||
reg = <0x1b>;
|
||||
|
||||
/* PCK0 at 12MHz */
|
||||
clocks = <&pmc PMC_TYPE_SYSTEM 8>;
|
||||
clock-names = "mclk";
|
||||
assigned-clocks = <&pmc PMC_TYPE_SYSTEM 8>;
|
||||
assigned-clock-rates = <12000000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4188,11 +4188,11 @@
|
||||
reg = <0x1d0010 0x4>;
|
||||
reg-names = "sysc";
|
||||
ti,sysc-midle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>;
|
||||
<SYSC_IDLE_NO>;
|
||||
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
|
||||
<SYSC_IDLE_NO>,
|
||||
<SYSC_IDLE_SMART>;
|
||||
power-domains = <&prm_vpe>;
|
||||
clocks = <&vpe_clkctrl DRA7_VPE_VPE_CLKCTRL 0>;
|
||||
clock-names = "fck";
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -286,6 +286,8 @@
|
||||
codec: sgtl5000@a {
|
||||
compatible = "fsl,sgtl5000";
|
||||
reg = <0x0a>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sgtl5000>;
|
||||
clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
VDDA-supply = <®_module_3v3_audio>;
|
||||
VDDIO-supply = <®_module_3v3>;
|
||||
@@ -516,8 +518,6 @@
|
||||
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
|
||||
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
|
||||
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
|
||||
/* SGTL5000 sys_mclk */
|
||||
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -810,6 +810,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_sgtl5000: sgtl5000grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_spdif: spdifgrp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
reg_sd1_vmmc: regulator-sd1-vmmc {
|
||||
compatible = "regulator-gpio";
|
||||
gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_snvs_reg_sd>;
|
||||
regulator-always-on;
|
||||
|
||||
@@ -11,3 +11,18 @@
|
||||
model = "LogicPD Zoom OMAP35xx SOM-LV Development Kit";
|
||||
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3430", "ti,omap3";
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,3 +11,18 @@
|
||||
model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
|
||||
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -265,21 +265,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
aliases {
|
||||
display0 = &lcd;
|
||||
display1 = &tv0;
|
||||
/delete-property/ mmc2;
|
||||
/delete-property/ mmc3;
|
||||
};
|
||||
|
||||
ldo_3v3: fixedregulator {
|
||||
|
||||
@@ -18,7 +18,6 @@ menuconfig ARCH_EXYNOS
|
||||
select EXYNOS_PMU
|
||||
select EXYNOS_SROM
|
||||
select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS
|
||||
select GPIOLIB
|
||||
select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_S3C2410_I2C if I2C
|
||||
|
||||
@@ -314,10 +314,12 @@ void __init omap_gic_of_init(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
|
||||
gic_dist_base_addr = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!gic_dist_base_addr);
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer");
|
||||
twd_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!twd_base);
|
||||
|
||||
skip_errata_init:
|
||||
|
||||
@@ -11,26 +11,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <761000>;
|
||||
@@ -71,26 +51,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <731000>;
|
||||
|
||||
@@ -11,26 +11,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <731000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <731000>;
|
||||
@@ -76,26 +56,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <667000000>;
|
||||
opp-microvolt = <751000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <771000>;
|
||||
|
||||
@@ -437,6 +437,7 @@
|
||||
"",
|
||||
"eMMC_RST#", /* BOOT_12 */
|
||||
"eMMC_DS", /* BOOT_13 */
|
||||
"", "",
|
||||
/* GPIOC */
|
||||
"SD_D0_B", /* GPIOC_0 */
|
||||
"SD_D1_B", /* GPIOC_1 */
|
||||
|
||||
@@ -95,26 +95,6 @@
|
||||
compatible = "operating-points-v2";
|
||||
opp-shared;
|
||||
|
||||
opp-100000000 {
|
||||
opp-hz = /bits/ 64 <100000000>;
|
||||
opp-microvolt = <730000>;
|
||||
};
|
||||
|
||||
opp-250000000 {
|
||||
opp-hz = /bits/ 64 <250000000>;
|
||||
opp-microvolt = <730000>;
|
||||
};
|
||||
|
||||
opp-500000000 {
|
||||
opp-hz = /bits/ 64 <500000000>;
|
||||
opp-microvolt = <730000>;
|
||||
};
|
||||
|
||||
opp-667000000 {
|
||||
opp-hz = /bits/ 64 <666666666>;
|
||||
opp-microvolt = <750000>;
|
||||
};
|
||||
|
||||
opp-1000000000 {
|
||||
opp-hz = /bits/ 64 <1000000000>;
|
||||
opp-microvolt = <770000>;
|
||||
|
||||
@@ -103,12 +103,14 @@
|
||||
|
||||
&usbotg1 {
|
||||
dr_mode = "otg";
|
||||
over-current-active-low;
|
||||
vbus-supply = <®_usb_otg1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg2 {
|
||||
dr_mode = "host";
|
||||
disable-over-current;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -166,7 +168,7 @@
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -139,12 +139,14 @@
|
||||
|
||||
&usbotg1 {
|
||||
dr_mode = "otg";
|
||||
over-current-active-low;
|
||||
vbus-supply = <®_usb_otg1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg2 {
|
||||
dr_mode = "host";
|
||||
disable-over-current;
|
||||
vbus-supply = <®_usb_otg2_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -231,7 +233,7 @@
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -166,12 +166,14 @@
|
||||
|
||||
&usbotg1 {
|
||||
dr_mode = "otg";
|
||||
over-current-active-low;
|
||||
vbus-supply = <®_usb_otg1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg2 {
|
||||
dr_mode = "host";
|
||||
disable-over-current;
|
||||
vbus-supply = <®_usb_otg2_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -280,7 +282,7 @@
|
||||
fsl,pins = <
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0xd6
|
||||
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0xd6
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -59,6 +59,10 @@
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
rohm,reset-snvs-powered;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clocks = <&osc_32k 0>;
|
||||
clock-output-names = "clk-32k-out";
|
||||
|
||||
regulators {
|
||||
buck1_reg: BUCK1 {
|
||||
regulator-name = "buck1";
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
ranges;
|
||||
|
||||
sai2: sai@30020000 {
|
||||
compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30020000 0x10000>;
|
||||
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI2_IPG>,
|
||||
@@ -277,7 +277,7 @@
|
||||
};
|
||||
|
||||
sai3: sai@30030000 {
|
||||
compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30030000 0x10000>;
|
||||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI3_IPG>,
|
||||
@@ -291,7 +291,7 @@
|
||||
};
|
||||
|
||||
sai5: sai@30050000 {
|
||||
compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30050000 0x10000>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI5_IPG>,
|
||||
@@ -307,7 +307,7 @@
|
||||
};
|
||||
|
||||
sai6: sai@30060000 {
|
||||
compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x30060000 0x10000>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI6_IPG>,
|
||||
@@ -364,7 +364,7 @@
|
||||
};
|
||||
|
||||
sai7: sai@300b0000 {
|
||||
compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
|
||||
compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai";
|
||||
reg = <0x300b0000 0x10000>;
|
||||
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk IMX8MN_CLK_SAI7_IPG>,
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
};
|
||||
|
||||
clk: clock-controller {
|
||||
compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
|
||||
compatible = "fsl,imx8qm-clk", "fsl,scu-clk";
|
||||
#clock-cells = <2>;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
#include <asm/ppc_asm.h>
|
||||
|
||||
RELA = 7
|
||||
RELACOUNT = 0x6ffffff9
|
||||
RELASZ = 8
|
||||
RELAENT = 9
|
||||
R_PPC64_RELATIVE = 22
|
||||
R_PPC64_UADDR64 = 43
|
||||
|
||||
/*
|
||||
* r3 = desired final address of kernel
|
||||
@@ -25,29 +27,38 @@ _GLOBAL(relocate)
|
||||
add r9,r9,r12 /* r9 has runtime addr of .rela.dyn section */
|
||||
ld r10,(p_st - 0b)(r12)
|
||||
add r10,r10,r12 /* r10 has runtime addr of _stext */
|
||||
ld r13,(p_sym - 0b)(r12)
|
||||
add r13,r13,r12 /* r13 has runtime addr of .dynsym */
|
||||
|
||||
/*
|
||||
* Scan the dynamic section for the RELA and RELACOUNT entries.
|
||||
* Scan the dynamic section for the RELA, RELASZ and RELAENT entries.
|
||||
*/
|
||||
li r7,0
|
||||
li r8,0
|
||||
1: ld r6,0(r11) /* get tag */
|
||||
.Ltags:
|
||||
ld r6,0(r11) /* get tag */
|
||||
cmpdi r6,0
|
||||
beq 4f /* end of list */
|
||||
beq .Lend_of_list /* end of list */
|
||||
cmpdi r6,RELA
|
||||
bne 2f
|
||||
ld r7,8(r11) /* get RELA pointer in r7 */
|
||||
b 3f
|
||||
2: addis r6,r6,(-RELACOUNT)@ha
|
||||
cmpdi r6,RELACOUNT@l
|
||||
b 4f
|
||||
2: cmpdi r6,RELASZ
|
||||
bne 3f
|
||||
ld r8,8(r11) /* get RELACOUNT value in r8 */
|
||||
3: addi r11,r11,16
|
||||
b 1b
|
||||
4: cmpdi r7,0 /* check we have both RELA and RELACOUNT */
|
||||
ld r8,8(r11) /* get RELASZ value in r8 */
|
||||
b 4f
|
||||
3: cmpdi r6,RELAENT
|
||||
bne 4f
|
||||
ld r12,8(r11) /* get RELAENT value in r12 */
|
||||
4: addi r11,r11,16
|
||||
b .Ltags
|
||||
.Lend_of_list:
|
||||
cmpdi r7,0 /* check we have RELA, RELASZ, RELAENT */
|
||||
cmpdi cr1,r8,0
|
||||
beq 6f
|
||||
beq cr1,6f
|
||||
beq .Lout
|
||||
beq cr1,.Lout
|
||||
cmpdi r12,0
|
||||
beq .Lout
|
||||
|
||||
/*
|
||||
* Work out linktime address of _stext and hence the
|
||||
@@ -62,23 +73,39 @@ _GLOBAL(relocate)
|
||||
|
||||
/*
|
||||
* Run through the list of relocations and process the
|
||||
* R_PPC64_RELATIVE ones.
|
||||
* R_PPC64_RELATIVE and R_PPC64_UADDR64 ones.
|
||||
*/
|
||||
divd r8,r8,r12 /* RELASZ / RELAENT */
|
||||
mtctr r8
|
||||
5: ld r0,8(9) /* ELF64_R_TYPE(reloc->r_info) */
|
||||
.Lrels: ld r0,8(r9) /* ELF64_R_TYPE(reloc->r_info) */
|
||||
cmpdi r0,R_PPC64_RELATIVE
|
||||
bne 6f
|
||||
bne .Luaddr64
|
||||
ld r6,0(r9) /* reloc->r_offset */
|
||||
ld r0,16(r9) /* reloc->r_addend */
|
||||
b .Lstore
|
||||
.Luaddr64:
|
||||
srdi r14,r0,32 /* ELF64_R_SYM(reloc->r_info) */
|
||||
clrldi r0,r0,32
|
||||
cmpdi r0,R_PPC64_UADDR64
|
||||
bne .Lnext
|
||||
ld r6,0(r9)
|
||||
ld r0,16(r9)
|
||||
mulli r14,r14,24 /* 24 == sizeof(elf64_sym) */
|
||||
add r14,r14,r13 /* elf64_sym[ELF64_R_SYM] */
|
||||
ld r14,8(r14)
|
||||
add r0,r0,r14
|
||||
.Lstore:
|
||||
add r0,r0,r3
|
||||
stdx r0,r7,r6
|
||||
addi r9,r9,24
|
||||
bdnz 5b
|
||||
|
||||
6: blr
|
||||
.Lnext:
|
||||
add r9,r9,r12
|
||||
bdnz .Lrels
|
||||
.Lout:
|
||||
blr
|
||||
|
||||
.balign 8
|
||||
p_dyn: .8byte __dynamic_start - 0b
|
||||
p_rela: .8byte __rela_dyn_start - 0b
|
||||
p_sym: .8byte __dynamic_symtab - 0b
|
||||
p_st: .8byte _stext - 0b
|
||||
|
||||
|
||||
@@ -275,9 +275,7 @@ SECTIONS
|
||||
. = ALIGN(8);
|
||||
.dynsym : AT(ADDR(.dynsym) - LOAD_OFFSET)
|
||||
{
|
||||
#ifdef CONFIG_PPC32
|
||||
__dynamic_symtab = .;
|
||||
#endif
|
||||
*(.dynsym)
|
||||
}
|
||||
.dynstr : AT(ADDR(.dynstr) - LOAD_OFFSET) { *(.dynstr) }
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
obj-y += callchain.o callchain_$(BITS).o perf_regs.o
|
||||
obj-$(CONFIG_COMPAT) += callchain_32.o
|
||||
|
||||
obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o bhrb.o
|
||||
obj-$(CONFIG_PPC_PERF_CTRS) += core-book3s.o
|
||||
obj64-$(CONFIG_PPC_PERF_CTRS) += ppc970-pmu.o power5-pmu.o \
|
||||
power5+-pmu.o power6-pmu.o power7-pmu.o \
|
||||
isa207-common.o power8-pmu.o power9-pmu.o \
|
||||
generic-compat-pmu.o power10-pmu.o
|
||||
generic-compat-pmu.o power10-pmu.o bhrb.o
|
||||
obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o
|
||||
|
||||
obj-$(CONFIG_PPC_POWERNV) += imc-pmu.o
|
||||
|
||||
@@ -39,6 +39,7 @@ $objdump -R "$vmlinux" |
|
||||
# R_PPC_NONE
|
||||
grep -F -w -v 'R_PPC64_RELATIVE
|
||||
R_PPC64_NONE
|
||||
R_PPC64_UADDR64
|
||||
R_PPC_ADDR16_LO
|
||||
R_PPC_ADDR16_HI
|
||||
R_PPC_ADDR16_HA
|
||||
@@ -54,9 +55,3 @@ fi
|
||||
num_bad=$(echo "$bad_relocs" | wc -l)
|
||||
echo "WARNING: $num_bad bad relocations"
|
||||
echo "$bad_relocs"
|
||||
|
||||
# If we see this type of relocation it's an idication that
|
||||
# we /may/ be using an old version of binutils.
|
||||
if echo "$bad_relocs" | grep -q -F -w R_PPC64_UADDR64; then
|
||||
echo "WARNING: You need at least binutils >= 2.19 to build a CONFIG_RELOCATABLE kernel"
|
||||
fi
|
||||
|
||||
@@ -104,7 +104,7 @@ static int patch_text_cb(void *data)
|
||||
struct patch_insn *patch = data;
|
||||
int ret = 0;
|
||||
|
||||
if (atomic_inc_return(&patch->cpu_count) == 1) {
|
||||
if (atomic_inc_return(&patch->cpu_count) == num_online_cpus()) {
|
||||
ret =
|
||||
patch_text_nosync(patch->addr, &patch->insn,
|
||||
GET_INSN_LENGTH(patch->insn));
|
||||
|
||||
@@ -132,10 +132,12 @@ extern void load_ucode_ap(void);
|
||||
void reload_early_microcode(void);
|
||||
extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
|
||||
extern bool initrd_gone;
|
||||
void microcode_bsp_resume(void);
|
||||
#else
|
||||
static inline void __init load_ucode_bsp(void) { }
|
||||
static inline void load_ucode_ap(void) { }
|
||||
static inline void reload_early_microcode(void) { }
|
||||
static inline void microcode_bsp_resume(void) { }
|
||||
static inline bool
|
||||
get_builtin_firmware(struct cpio_data *cd, const char *name) { return false; }
|
||||
#endif
|
||||
|
||||
@@ -775,9 +775,9 @@ static struct subsys_interface mc_cpu_interface = {
|
||||
};
|
||||
|
||||
/**
|
||||
* mc_bp_resume - Update boot CPU microcode during resume.
|
||||
* microcode_bsp_resume - Update boot CPU microcode during resume.
|
||||
*/
|
||||
static void mc_bp_resume(void)
|
||||
void microcode_bsp_resume(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
|
||||
@@ -789,7 +789,7 @@ static void mc_bp_resume(void)
|
||||
}
|
||||
|
||||
static struct syscore_ops mc_syscore_ops = {
|
||||
.resume = mc_bp_resume,
|
||||
.resume = microcode_bsp_resume,
|
||||
};
|
||||
|
||||
static int mc_cpu_starting(unsigned int cpu)
|
||||
|
||||
@@ -121,7 +121,7 @@ void __memcpy_flushcache(void *_dst, const void *_src, size_t size)
|
||||
|
||||
/* cache copy and flush to align dest */
|
||||
if (!IS_ALIGNED(dest, 8)) {
|
||||
unsigned len = min_t(unsigned, size, ALIGN(dest, 8) - dest);
|
||||
size_t len = min_t(size_t, size, ALIGN(dest, 8) - dest);
|
||||
|
||||
memcpy((void *) dest, (void *) source, len);
|
||||
clean_cache_range((void *) dest, len);
|
||||
|
||||
@@ -472,7 +472,6 @@ static __init void xen_setup_pci_msi(void)
|
||||
xen_msi_ops.setup_msi_irqs = xen_setup_msi_irqs;
|
||||
}
|
||||
xen_msi_ops.teardown_msi_irqs = xen_pv_teardown_msi_irqs;
|
||||
pci_msi_ignore_mask = 1;
|
||||
} else if (xen_hvm_domain()) {
|
||||
xen_msi_ops.setup_msi_irqs = xen_hvm_setup_msi_irqs;
|
||||
xen_msi_ops.teardown_msi_irqs = xen_teardown_msi_irqs;
|
||||
@@ -486,6 +485,11 @@ static __init void xen_setup_pci_msi(void)
|
||||
* in allocating the native domain and never use it.
|
||||
*/
|
||||
x86_init.irqs.create_pci_msi_domain = xen_create_pci_msi_domain;
|
||||
/*
|
||||
* With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely
|
||||
* controlled by the hypervisor.
|
||||
*/
|
||||
pci_msi_ignore_mask = 1;
|
||||
}
|
||||
|
||||
#else /* CONFIG_PCI_MSI */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/microcode.h>
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
__visible unsigned long saved_context_ebx;
|
||||
@@ -262,11 +263,18 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
|
||||
x86_platform.restore_sched_clock_state();
|
||||
mtrr_bp_restore();
|
||||
perf_restore_debug_store();
|
||||
msr_restore_context(ctxt);
|
||||
|
||||
c = &cpu_data(smp_processor_id());
|
||||
if (cpu_has(c, X86_FEATURE_MSR_IA32_FEAT_CTL))
|
||||
init_ia32_feat_ctl(c);
|
||||
|
||||
microcode_bsp_resume();
|
||||
|
||||
/*
|
||||
* This needs to happen after the microcode has been updated upon resume
|
||||
* because some of the MSRs are "emulated" in microcode.
|
||||
*/
|
||||
msr_restore_context(ctxt);
|
||||
}
|
||||
|
||||
/* Needed by apm.c */
|
||||
|
||||
@@ -36,24 +36,19 @@ static void rs_poll(struct timer_list *);
|
||||
static struct tty_driver *serial_driver;
|
||||
static struct tty_port serial_port;
|
||||
static DEFINE_TIMER(serial_timer, rs_poll);
|
||||
static DEFINE_SPINLOCK(timer_lock);
|
||||
|
||||
static int rs_open(struct tty_struct *tty, struct file * filp)
|
||||
{
|
||||
spin_lock_bh(&timer_lock);
|
||||
if (tty->count == 1)
|
||||
mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
|
||||
spin_unlock_bh(&timer_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rs_close(struct tty_struct *tty, struct file * filp)
|
||||
{
|
||||
spin_lock_bh(&timer_lock);
|
||||
if (tty->count == 1)
|
||||
del_timer_sync(&serial_timer);
|
||||
spin_unlock_bh(&timer_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,8 +68,6 @@ static void rs_poll(struct timer_list *unused)
|
||||
int rd = 1;
|
||||
unsigned char c;
|
||||
|
||||
spin_lock(&timer_lock);
|
||||
|
||||
while (simc_poll(0)) {
|
||||
rd = simc_read(0, &c, 1);
|
||||
if (rd <= 0)
|
||||
@@ -87,7 +80,6 @@ static void rs_poll(struct timer_list *unused)
|
||||
tty_flip_buffer_push(port);
|
||||
if (rd)
|
||||
mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
|
||||
spin_unlock(&timer_lock);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2322,7 +2322,17 @@ static void ioc_timer_fn(struct timer_list *timer)
|
||||
iocg->hweight_donating = hwa;
|
||||
iocg->hweight_after_donation = new_hwi;
|
||||
list_add(&iocg->surplus_list, &surpluses);
|
||||
} else {
|
||||
} else if (!iocg->abs_vdebt) {
|
||||
/*
|
||||
* @iocg doesn't have enough to donate. Reset
|
||||
* its inuse to active.
|
||||
*
|
||||
* Don't reset debtors as their inuse's are
|
||||
* owned by debt handling. This shouldn't affect
|
||||
* donation calculuation in any meaningful way
|
||||
* as @iocg doesn't have a meaningful amount of
|
||||
* share anyway.
|
||||
*/
|
||||
TRACE_IOCG_PATH(inuse_shortage, iocg, &now,
|
||||
iocg->inuse, iocg->active,
|
||||
iocg->hweight_inuse, new_hwi);
|
||||
|
||||
@@ -95,11 +95,6 @@ static const struct dmi_system_id processor_power_dmi_table[] = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")},
|
||||
(void *)1},
|
||||
/* T40 can not handle C3 idle state */
|
||||
{ set_max_cstate, "IBM ThinkPad T40", {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "23737CU")},
|
||||
(void *)2},
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -797,7 +792,8 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)
|
||||
if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 ||
|
||||
cx->type == ACPI_STATE_C3) {
|
||||
state->enter_dead = acpi_idle_play_dead;
|
||||
drv->safe_state_index = count;
|
||||
if (cx->type != ACPI_STATE_C3)
|
||||
drv->safe_state_index = count;
|
||||
}
|
||||
/*
|
||||
* Halt-induced C1 is not good for ->enter_s2idle, because it
|
||||
|
||||
@@ -617,7 +617,7 @@ void update_siblings_masks(unsigned int cpuid)
|
||||
for_each_online_cpu(cpu) {
|
||||
cpu_topo = &cpu_topology[cpu];
|
||||
|
||||
if (cpuid_topo->llc_id == cpu_topo->llc_id) {
|
||||
if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) {
|
||||
cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling);
|
||||
cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling);
|
||||
}
|
||||
|
||||
@@ -1020,6 +1020,7 @@ static int __maybe_unused mhi_pci_freeze(struct device *dev)
|
||||
* the intermediate restore kernel reinitializes MHI device with new
|
||||
* context.
|
||||
*/
|
||||
flush_work(&mhi_pdev->recovery_work);
|
||||
if (test_and_clear_bit(MHI_PCI_DEV_STARTED, &mhi_pdev->status)) {
|
||||
mhi_power_down(mhi_cntrl, true);
|
||||
mhi_unprepare_after_power_down(mhi_cntrl);
|
||||
@@ -1045,6 +1046,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = {
|
||||
.resume = mhi_pci_resume,
|
||||
.freeze = mhi_pci_freeze,
|
||||
.thaw = mhi_pci_restore,
|
||||
.poweroff = mhi_pci_freeze,
|
||||
.restore = mhi_pci_restore,
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -227,6 +227,8 @@ static struct sunxi_rsb_device *sunxi_rsb_device_create(struct sunxi_rsb *rsb,
|
||||
|
||||
dev_dbg(&rdev->dev, "device %s registered\n", dev_name(&rdev->dev));
|
||||
|
||||
return rdev;
|
||||
|
||||
err_device_add:
|
||||
put_device(&rdev->dev);
|
||||
|
||||
|
||||
@@ -3162,13 +3162,27 @@ static int sysc_check_disabled_devices(struct sysc *ddata)
|
||||
*/
|
||||
static int sysc_check_active_timer(struct sysc *ddata)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (ddata->cap->type != TI_SYSC_OMAP2_TIMER &&
|
||||
ddata->cap->type != TI_SYSC_OMAP4_TIMER)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Quirk for omap3 beagleboard revision A to B4 to use gpt12.
|
||||
* Revision C and later are fixed with commit 23885389dbbb ("ARM:
|
||||
* dts: Fix timer regression for beagleboard revision c"). This all
|
||||
* can be dropped if we stop supporting old beagleboard revisions
|
||||
* A to B4 at some point.
|
||||
*/
|
||||
if (sysc_soc->soc == SOC_3430)
|
||||
error = -ENXIO;
|
||||
else
|
||||
error = -EBUSY;
|
||||
|
||||
if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
|
||||
(ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
|
||||
return -ENXIO;
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -109,6 +109,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&data->lock);
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!r)
|
||||
return -EINVAL;
|
||||
/* one clock/reset pair per word */
|
||||
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
|
||||
data->membase = devm_ioremap_resource(&pdev->dev, r);
|
||||
|
||||
@@ -24,12 +24,16 @@
|
||||
#define CLK_HW_DIV 2
|
||||
#define LUT_TURBO_IND 1
|
||||
|
||||
#define GT_IRQ_STATUS BIT(2)
|
||||
|
||||
#define HZ_PER_KHZ 1000
|
||||
|
||||
struct qcom_cpufreq_soc_data {
|
||||
u32 reg_enable;
|
||||
u32 reg_domain_state;
|
||||
u32 reg_freq_lut;
|
||||
u32 reg_volt_lut;
|
||||
u32 reg_intr_clr;
|
||||
u32 reg_current_vote;
|
||||
u32 reg_perf_state;
|
||||
u8 lut_row_size;
|
||||
@@ -266,28 +270,31 @@ static void qcom_get_related_cpus(int index, struct cpumask *m)
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int qcom_lmh_get_throttle_freq(struct qcom_cpufreq_data *data)
|
||||
static unsigned long qcom_lmh_get_throttle_freq(struct qcom_cpufreq_data *data)
|
||||
{
|
||||
unsigned int val = readl_relaxed(data->base + data->soc_data->reg_current_vote);
|
||||
unsigned int lval;
|
||||
|
||||
return (val & 0x3FF) * 19200;
|
||||
if (data->soc_data->reg_current_vote)
|
||||
lval = readl_relaxed(data->base + data->soc_data->reg_current_vote) & 0x3ff;
|
||||
else
|
||||
lval = readl_relaxed(data->base + data->soc_data->reg_domain_state) & 0xff;
|
||||
|
||||
return lval * xo_rate;
|
||||
}
|
||||
|
||||
static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)
|
||||
{
|
||||
unsigned long max_capacity, capacity, freq_hz, throttled_freq;
|
||||
struct cpufreq_policy *policy = data->policy;
|
||||
int cpu = cpumask_first(policy->cpus);
|
||||
int cpu = cpumask_first(policy->related_cpus);
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
struct dev_pm_opp *opp;
|
||||
unsigned int freq;
|
||||
|
||||
/*
|
||||
* Get the h/w throttled frequency, normalize it using the
|
||||
* registered opp table and use it to calculate thermal pressure.
|
||||
*/
|
||||
freq = qcom_lmh_get_throttle_freq(data);
|
||||
freq_hz = freq * HZ_PER_KHZ;
|
||||
freq_hz = qcom_lmh_get_throttle_freq(data);
|
||||
|
||||
opp = dev_pm_opp_find_freq_floor(dev, &freq_hz);
|
||||
if (IS_ERR(opp) && PTR_ERR(opp) == -ERANGE)
|
||||
@@ -345,6 +352,10 @@ static irqreturn_t qcom_lmh_dcvs_handle_irq(int irq, void *data)
|
||||
disable_irq_nosync(c_data->throttle_irq);
|
||||
schedule_delayed_work(&c_data->throttle_work, 0);
|
||||
|
||||
if (c_data->soc_data->reg_intr_clr)
|
||||
writel_relaxed(GT_IRQ_STATUS,
|
||||
c_data->base + c_data->soc_data->reg_intr_clr);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -359,8 +370,10 @@ static const struct qcom_cpufreq_soc_data qcom_soc_data = {
|
||||
|
||||
static const struct qcom_cpufreq_soc_data epss_soc_data = {
|
||||
.reg_enable = 0x0,
|
||||
.reg_domain_state = 0x20,
|
||||
.reg_freq_lut = 0x100,
|
||||
.reg_volt_lut = 0x200,
|
||||
.reg_intr_clr = 0x308,
|
||||
.reg_perf_state = 0x320,
|
||||
.lut_row_size = 4,
|
||||
};
|
||||
|
||||
@@ -98,8 +98,10 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = sun50i_cpufreq_get_efuse(&speed);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
kfree(opp_tables);
|
||||
return ret;
|
||||
}
|
||||
|
||||
snprintf(name, MAX_NAME_LEN, "speed%d", speed);
|
||||
|
||||
|
||||
@@ -138,19 +138,33 @@ void program_sh_mem_settings(struct device_queue_manager *dqm,
|
||||
}
|
||||
|
||||
static void increment_queue_count(struct device_queue_manager *dqm,
|
||||
enum kfd_queue_type type)
|
||||
struct qcm_process_device *qpd,
|
||||
struct queue *q)
|
||||
{
|
||||
dqm->active_queue_count++;
|
||||
if (type == KFD_QUEUE_TYPE_COMPUTE || type == KFD_QUEUE_TYPE_DIQ)
|
||||
if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE ||
|
||||
q->properties.type == KFD_QUEUE_TYPE_DIQ)
|
||||
dqm->active_cp_queue_count++;
|
||||
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count++;
|
||||
qpd->mapped_gws_queue = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void decrement_queue_count(struct device_queue_manager *dqm,
|
||||
enum kfd_queue_type type)
|
||||
struct qcm_process_device *qpd,
|
||||
struct queue *q)
|
||||
{
|
||||
dqm->active_queue_count--;
|
||||
if (type == KFD_QUEUE_TYPE_COMPUTE || type == KFD_QUEUE_TYPE_DIQ)
|
||||
if (q->properties.type == KFD_QUEUE_TYPE_COMPUTE ||
|
||||
q->properties.type == KFD_QUEUE_TYPE_DIQ)
|
||||
dqm->active_cp_queue_count--;
|
||||
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
|
||||
static int allocate_doorbell(struct qcm_process_device *qpd, struct queue *q)
|
||||
@@ -390,7 +404,7 @@ add_queue_to_list:
|
||||
list_add(&q->list, &qpd->queues_list);
|
||||
qpd->queue_count++;
|
||||
if (q->properties.is_active)
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
increment_queue_count(dqm, qpd, q);
|
||||
|
||||
/*
|
||||
* Unconditionally increment this counter, regardless of the queue's
|
||||
@@ -515,13 +529,8 @@ static int destroy_queue_nocpsch_locked(struct device_queue_manager *dqm,
|
||||
deallocate_vmid(dqm, qpd, q);
|
||||
}
|
||||
qpd->queue_count--;
|
||||
if (q->properties.is_active) {
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
if (q->properties.is_active)
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -613,12 +622,11 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q)
|
||||
* dqm->active_queue_count to determine whether a new runlist must be
|
||||
* uploaded.
|
||||
*/
|
||||
if (q->properties.is_active && !prev_active)
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
else if (!q->properties.is_active && prev_active)
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
|
||||
if (q->gws && !q->properties.is_gws) {
|
||||
if (q->properties.is_active && !prev_active) {
|
||||
increment_queue_count(dqm, &pdd->qpd, q);
|
||||
} else if (!q->properties.is_active && prev_active) {
|
||||
decrement_queue_count(dqm, &pdd->qpd, q);
|
||||
} else if (q->gws && !q->properties.is_gws) {
|
||||
if (q->properties.is_active) {
|
||||
dqm->gws_queue_count++;
|
||||
pdd->qpd.mapped_gws_queue = true;
|
||||
@@ -680,11 +688,7 @@ static int evict_process_queues_nocpsch(struct device_queue_manager *dqm,
|
||||
mqd_mgr = dqm->mqd_mgrs[get_mqd_type_from_queue_type(
|
||||
q->properties.type)];
|
||||
q->properties.is_active = false;
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
|
||||
if (WARN_ONCE(!dqm->sched_running, "Evict when stopped\n"))
|
||||
continue;
|
||||
@@ -730,7 +734,7 @@ static int evict_process_queues_cpsch(struct device_queue_manager *dqm,
|
||||
continue;
|
||||
|
||||
q->properties.is_active = false;
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
}
|
||||
pdd->last_evict_timestamp = get_jiffies_64();
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
@@ -801,11 +805,7 @@ static int restore_process_queues_nocpsch(struct device_queue_manager *dqm,
|
||||
mqd_mgr = dqm->mqd_mgrs[get_mqd_type_from_queue_type(
|
||||
q->properties.type)];
|
||||
q->properties.is_active = true;
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count++;
|
||||
qpd->mapped_gws_queue = true;
|
||||
}
|
||||
increment_queue_count(dqm, qpd, q);
|
||||
|
||||
if (WARN_ONCE(!dqm->sched_running, "Restore when stopped\n"))
|
||||
continue;
|
||||
@@ -863,7 +863,7 @@ static int restore_process_queues_cpsch(struct device_queue_manager *dqm,
|
||||
continue;
|
||||
|
||||
q->properties.is_active = true;
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
increment_queue_count(dqm, &pdd->qpd, q);
|
||||
}
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
@@ -1265,7 +1265,7 @@ static int create_kernel_queue_cpsch(struct device_queue_manager *dqm,
|
||||
dqm->total_queue_count);
|
||||
|
||||
list_add(&kq->list, &qpd->priv_queue_list);
|
||||
increment_queue_count(dqm, kq->queue->properties.type);
|
||||
increment_queue_count(dqm, qpd, kq->queue);
|
||||
qpd->is_debug = true;
|
||||
execute_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
dqm_unlock(dqm);
|
||||
@@ -1279,7 +1279,7 @@ static void destroy_kernel_queue_cpsch(struct device_queue_manager *dqm,
|
||||
{
|
||||
dqm_lock(dqm);
|
||||
list_del(&kq->list);
|
||||
decrement_queue_count(dqm, kq->queue->properties.type);
|
||||
decrement_queue_count(dqm, qpd, kq->queue);
|
||||
qpd->is_debug = false;
|
||||
execute_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0);
|
||||
/*
|
||||
@@ -1346,7 +1346,7 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
|
||||
qpd->queue_count++;
|
||||
|
||||
if (q->properties.is_active) {
|
||||
increment_queue_count(dqm, q->properties.type);
|
||||
increment_queue_count(dqm, qpd, q);
|
||||
|
||||
execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
@@ -1548,15 +1548,11 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
|
||||
list_del(&q->list);
|
||||
qpd->queue_count--;
|
||||
if (q->properties.is_active) {
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
retval = execute_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
if (retval == -ETIME)
|
||||
qpd->reset_wavefronts = true;
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1747,7 +1743,7 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
|
||||
/* Clean all kernel queues */
|
||||
list_for_each_entry_safe(kq, kq_next, &qpd->priv_queue_list, list) {
|
||||
list_del(&kq->list);
|
||||
decrement_queue_count(dqm, kq->queue->properties.type);
|
||||
decrement_queue_count(dqm, qpd, kq->queue);
|
||||
qpd->is_debug = false;
|
||||
dqm->total_queue_count--;
|
||||
filter = KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES;
|
||||
@@ -1760,13 +1756,8 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
|
||||
else if (q->properties.type == KFD_QUEUE_TYPE_SDMA_XGMI)
|
||||
deallocate_sdma_queue(dqm, q);
|
||||
|
||||
if (q->properties.is_active) {
|
||||
decrement_queue_count(dqm, q->properties.type);
|
||||
if (q->properties.is_gws) {
|
||||
dqm->gws_queue_count--;
|
||||
qpd->mapped_gws_queue = false;
|
||||
}
|
||||
}
|
||||
if (q->properties.is_active)
|
||||
decrement_queue_count(dqm, qpd, q);
|
||||
|
||||
dqm->total_queue_count--;
|
||||
}
|
||||
|
||||
@@ -1428,6 +1428,7 @@ static struct clock_source *dcn21_clock_source_create(
|
||||
return &clk_src->base;
|
||||
}
|
||||
|
||||
kfree(clk_src);
|
||||
BREAK_TO_DEBUGGER();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,14 @@
|
||||
|
||||
#define INTEL_EDP_BRIGHTNESS_OPTIMIZATION_1 0x359
|
||||
|
||||
enum intel_dp_aux_backlight_modparam {
|
||||
INTEL_DP_AUX_BACKLIGHT_AUTO = -1,
|
||||
INTEL_DP_AUX_BACKLIGHT_OFF = 0,
|
||||
INTEL_DP_AUX_BACKLIGHT_ON = 1,
|
||||
INTEL_DP_AUX_BACKLIGHT_FORCE_VESA = 2,
|
||||
INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL = 3,
|
||||
};
|
||||
|
||||
/* Intel EDP backlight callbacks */
|
||||
static bool
|
||||
intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector)
|
||||
@@ -125,6 +133,24 @@ intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector)
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we don't have HDR static metadata there is no way to
|
||||
* runtime detect used range for nits based control. For now
|
||||
* do not use Intel proprietary eDP backlight control if we
|
||||
* don't have this data in panel EDID. In case we find panel
|
||||
* which supports only nits based control, but doesn't provide
|
||||
* HDR static metadata we need to start maintaining table of
|
||||
* ranges for such panels.
|
||||
*/
|
||||
if (i915->params.enable_dpcd_backlight != INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL &&
|
||||
!(connector->base.hdr_sink_metadata.hdmi_type1.metadata_type &
|
||||
BIT(HDMI_STATIC_METADATA_TYPE1))) {
|
||||
drm_info(&i915->drm,
|
||||
"Panel is missing HDR static metadata. Possible support for Intel HDR backlight interface is not used. If your backlight controls don't work try booting with i915.enable_dpcd_backlight=%d. needs this, please file a _new_ bug report on drm/i915, see " FDO_BUG_URL " for details.\n",
|
||||
INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL);
|
||||
return false;
|
||||
}
|
||||
|
||||
panel->backlight.edp.intel.sdr_uses_aux =
|
||||
tcon_cap[2] & INTEL_EDP_SDR_TCON_BRIGHTNESS_AUX_CAP;
|
||||
|
||||
@@ -373,14 +399,6 @@ static const struct intel_panel_bl_funcs intel_dp_vesa_bl_funcs = {
|
||||
.get = intel_dp_aux_vesa_get_backlight,
|
||||
};
|
||||
|
||||
enum intel_dp_aux_backlight_modparam {
|
||||
INTEL_DP_AUX_BACKLIGHT_AUTO = -1,
|
||||
INTEL_DP_AUX_BACKLIGHT_OFF = 0,
|
||||
INTEL_DP_AUX_BACKLIGHT_ON = 1,
|
||||
INTEL_DP_AUX_BACKLIGHT_FORCE_VESA = 2,
|
||||
INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL = 3,
|
||||
};
|
||||
|
||||
int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->base.dev;
|
||||
|
||||
@@ -7458,7 +7458,7 @@ enum {
|
||||
#define _SEL_FETCH_PLANE_BASE_6_A 0x70940
|
||||
#define _SEL_FETCH_PLANE_BASE_7_A 0x70960
|
||||
#define _SEL_FETCH_PLANE_BASE_CUR_A 0x70880
|
||||
#define _SEL_FETCH_PLANE_BASE_1_B 0x70990
|
||||
#define _SEL_FETCH_PLANE_BASE_1_B 0x71890
|
||||
|
||||
#define _SEL_FETCH_PLANE_BASE_A(plane) _PICK(plane, \
|
||||
_SEL_FETCH_PLANE_BASE_1_A, \
|
||||
|
||||
@@ -222,13 +222,11 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend,
|
||||
|
||||
/* Set the physical address of the buffer in memory */
|
||||
paddr = drm_fb_cma_get_gem_addr(fb, state, 0);
|
||||
paddr -= PHYS_OFFSET;
|
||||
DRM_DEBUG_DRIVER("Setting buffer #0 address to %pad\n", &paddr);
|
||||
regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR0_REG, paddr);
|
||||
|
||||
if (fb->format->num_planes > 1) {
|
||||
paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 2 : 1);
|
||||
paddr -= PHYS_OFFSET;
|
||||
DRM_DEBUG_DRIVER("Setting buffer #1 address to %pad\n", &paddr);
|
||||
regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR1_REG,
|
||||
paddr);
|
||||
@@ -236,7 +234,6 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend,
|
||||
|
||||
if (fb->format->num_planes > 2) {
|
||||
paddr = drm_fb_cma_get_gem_addr(fb, state, swap ? 1 : 2);
|
||||
paddr -= PHYS_OFFSET;
|
||||
DRM_DEBUG_DRIVER("Setting buffer #2 address to %pad\n", &paddr);
|
||||
regmap_write(frontend->regs, SUN4I_FRONTEND_BUF_ADDR2_REG,
|
||||
paddr);
|
||||
|
||||
@@ -178,7 +178,7 @@ static int ad5446_read_raw(struct iio_dev *indio_dev,
|
||||
|
||||
switch (m) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
*val = st->cached_val;
|
||||
*val = st->cached_val >> chan->scan_type.shift;
|
||||
return IIO_VAL_INT;
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
*val = st->vref_mv;
|
||||
|
||||
@@ -523,7 +523,7 @@ static int ad5592r_alloc_channels(struct iio_dev *iio_dev)
|
||||
if (!ret)
|
||||
st->channel_modes[reg] = tmp;
|
||||
|
||||
fwnode_property_read_u32(child, "adi,off-state", &tmp);
|
||||
ret = fwnode_property_read_u32(child, "adi,off-state", &tmp);
|
||||
if (!ret)
|
||||
st->channel_offstate[reg] = tmp;
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
|
||||
|
||||
ret = regmap_write(data->regmap, BMI160_REG_CMD, BMI160_CMD_SOFTRESET);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
|
||||
usleep_range(BMI160_SOFTRESET_USLEEP, BMI160_SOFTRESET_USLEEP + 1);
|
||||
|
||||
@@ -741,29 +741,37 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
|
||||
if (use_spi) {
|
||||
ret = regmap_read(data->regmap, BMI160_REG_DUMMY, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
}
|
||||
|
||||
ret = regmap_read(data->regmap, BMI160_REG_CHIP_ID, &val);
|
||||
if (ret) {
|
||||
dev_err(dev, "Error reading chip id\n");
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
}
|
||||
if (val != BMI160_CHIP_ID_VAL) {
|
||||
dev_err(dev, "Wrong chip id, got %x expected %x\n",
|
||||
val, BMI160_CHIP_ID_VAL);
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto disable_regulator;
|
||||
}
|
||||
|
||||
ret = bmi160_set_mode(data, BMI160_ACCEL, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_regulator;
|
||||
|
||||
ret = bmi160_set_mode(data, BMI160_GYRO, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto disable_accel;
|
||||
|
||||
return 0;
|
||||
|
||||
disable_accel:
|
||||
bmi160_set_mode(data, BMI160_ACCEL, false);
|
||||
|
||||
disable_regulator:
|
||||
regulator_bulk_disable(ARRAY_SIZE(data->supplies), data->supplies);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int bmi160_data_rdy_trigger_set_state(struct iio_trigger *trig,
|
||||
|
||||
@@ -18,12 +18,15 @@ static int inv_icm42600_i2c_bus_setup(struct inv_icm42600_state *st)
|
||||
unsigned int mask, val;
|
||||
int ret;
|
||||
|
||||
/* setup interface registers */
|
||||
ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6,
|
||||
INV_ICM42600_INTF_CONFIG6_MASK,
|
||||
INV_ICM42600_INTF_CONFIG6_I3C_EN);
|
||||
if (ret)
|
||||
return ret;
|
||||
/*
|
||||
* setup interface registers
|
||||
* This register write to REG_INTF_CONFIG6 enables a spike filter that
|
||||
* is impacting the line and can prevent the I2C ACK to be seen by the
|
||||
* controller. So we don't test the return value.
|
||||
*/
|
||||
regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG6,
|
||||
INV_ICM42600_INTF_CONFIG6_MASK,
|
||||
INV_ICM42600_INTF_CONFIG6_I3C_EN);
|
||||
|
||||
ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG4,
|
||||
INV_ICM42600_INTF_CONFIG4_I3C_BUS_ONLY, 0);
|
||||
|
||||
@@ -389,6 +389,7 @@ static int ak8975_power_on(const struct ak8975_data *data)
|
||||
if (ret) {
|
||||
dev_warn(&data->client->dev,
|
||||
"Failed to enable specified Vid supply\n");
|
||||
regulator_disable(data->vdd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "icc-rpmh.h"
|
||||
#include "sdx55.h"
|
||||
|
||||
DEFINE_QNODE(ipa_core_master, SDX55_MASTER_IPA_CORE, 1, 8, SDX55_SLAVE_IPA_CORE);
|
||||
DEFINE_QNODE(llcc_mc, SDX55_MASTER_LLCC, 4, 4, SDX55_SLAVE_EBI_CH0);
|
||||
DEFINE_QNODE(acm_tcu, SDX55_MASTER_TCU_0, 1, 8, SDX55_SLAVE_LLCC, SDX55_SLAVE_MEM_NOC_SNOC, SDX55_SLAVE_MEM_NOC_PCIE_SNOC);
|
||||
DEFINE_QNODE(qnm_snoc_gc, SDX55_MASTER_SNOC_GC_MEM_NOC, 1, 8, SDX55_SLAVE_LLCC);
|
||||
@@ -40,7 +39,6 @@ DEFINE_QNODE(xm_pcie, SDX55_MASTER_PCIE, 1, 8, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(xm_qdss_etr, SDX55_MASTER_QDSS_ETR, 1, 8, SDX55_SLAVE_SNOC_CFG, SDX55_SLAVE_EMAC_CFG, SDX55_SLAVE_USB3, SDX55_SLAVE_AOSS, SDX55_SLAVE_SPMI_FETCHER, SDX55_SLAVE_QDSS_CFG, SDX55_SLAVE_PDM, SDX55_SLAVE_SNOC_MEM_NOC_GC, SDX55_SLAVE_TCSR, SDX55_SLAVE_CNOC_DDRSS, SDX55_SLAVE_SPMI_VGI_COEX, SDX55_SLAVE_QPIC, SDX55_SLAVE_OCIMEM, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_USB3_PHY_CFG, SDX55_SLAVE_AOP, SDX55_SLAVE_BLSP_1, SDX55_SLAVE_SDCC_1, SDX55_SLAVE_CNOC_MSS, SDX55_SLAVE_PCIE_PARF, SDX55_SLAVE_ECC_CFG, SDX55_SLAVE_AUDIO, SDX55_SLAVE_AOSS, SDX55_SLAVE_PRNG, SDX55_SLAVE_CRYPTO_0_CFG, SDX55_SLAVE_TCU, SDX55_SLAVE_CLK_CTL, SDX55_SLAVE_IMEM_CFG);
|
||||
DEFINE_QNODE(xm_sdc1, SDX55_MASTER_SDCC_1, 1, 8, SDX55_SLAVE_AOSS, SDX55_SLAVE_IPA_CFG, SDX55_SLAVE_ANOC_SNOC, SDX55_SLAVE_AOP, SDX55_SLAVE_AUDIO);
|
||||
DEFINE_QNODE(xm_usb3, SDX55_MASTER_USB3, 1, 8, SDX55_SLAVE_ANOC_SNOC);
|
||||
DEFINE_QNODE(ipa_core_slave, SDX55_SLAVE_IPA_CORE, 1, 8);
|
||||
DEFINE_QNODE(ebi, SDX55_SLAVE_EBI_CH0, 1, 4);
|
||||
DEFINE_QNODE(qns_llcc, SDX55_SLAVE_LLCC, 1, 16, SDX55_SLAVE_EBI_CH0);
|
||||
DEFINE_QNODE(qns_memnoc_snoc, SDX55_SLAVE_MEM_NOC_SNOC, 1, 8, SDX55_MASTER_MEM_NOC_SNOC);
|
||||
@@ -82,7 +80,6 @@ DEFINE_QNODE(xs_sys_tcu_cfg, SDX55_SLAVE_TCU, 1, 8);
|
||||
DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
|
||||
DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
|
||||
DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
|
||||
DEFINE_QBCM(bcm_ip0, "IP0", false, &ipa_core_slave);
|
||||
DEFINE_QBCM(bcm_pn0, "PN0", false, &qhm_snoc_cfg);
|
||||
DEFINE_QBCM(bcm_sh3, "SH3", false, &xm_apps_rdwr);
|
||||
DEFINE_QBCM(bcm_sh4, "SH4", false, &qns_memnoc_snoc, &qns_sys_pcie);
|
||||
@@ -219,22 +216,6 @@ static const struct qcom_icc_desc sdx55_system_noc = {
|
||||
.num_bcms = ARRAY_SIZE(system_noc_bcms),
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm *ipa_virt_bcms[] = {
|
||||
&bcm_ip0,
|
||||
};
|
||||
|
||||
static struct qcom_icc_node *ipa_virt_nodes[] = {
|
||||
[MASTER_IPA_CORE] = &ipa_core_master,
|
||||
[SLAVE_IPA_CORE] = &ipa_core_slave,
|
||||
};
|
||||
|
||||
static const struct qcom_icc_desc sdx55_ipa_virt = {
|
||||
.nodes = ipa_virt_nodes,
|
||||
.num_nodes = ARRAY_SIZE(ipa_virt_nodes),
|
||||
.bcms = ipa_virt_bcms,
|
||||
.num_bcms = ARRAY_SIZE(ipa_virt_bcms),
|
||||
};
|
||||
|
||||
static const struct of_device_id qnoc_of_match[] = {
|
||||
{ .compatible = "qcom,sdx55-mc-virt",
|
||||
.data = &sdx55_mc_virt},
|
||||
@@ -242,8 +223,6 @@ static const struct of_device_id qnoc_of_match[] = {
|
||||
.data = &sdx55_mem_noc},
|
||||
{ .compatible = "qcom,sdx55-system-noc",
|
||||
.data = &sdx55_system_noc},
|
||||
{ .compatible = "qcom,sdx55-ipa-virt",
|
||||
.data = &sdx55_ipa_virt},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, qnoc_of_match);
|
||||
|
||||
@@ -162,25 +162,39 @@ static const struct regmap_access_table rpcif_volatile_table = {
|
||||
|
||||
|
||||
/*
|
||||
* Custom accessor functions to ensure SMRDR0 and SMWDR0 are always accessed
|
||||
* with proper width. Requires SMENR_SPIDE to be correctly set before!
|
||||
* Custom accessor functions to ensure SM[RW]DR[01] are always accessed with
|
||||
* proper width. Requires rpcif.xfer_size to be correctly set before!
|
||||
*/
|
||||
static int rpcif_reg_read(void *context, unsigned int reg, unsigned int *val)
|
||||
{
|
||||
struct rpcif *rpc = context;
|
||||
|
||||
if (reg == RPCIF_SMRDR0 || reg == RPCIF_SMWDR0) {
|
||||
u32 spide = readl(rpc->base + RPCIF_SMENR) & RPCIF_SMENR_SPIDE(0xF);
|
||||
|
||||
if (spide == 0x8) {
|
||||
switch (reg) {
|
||||
case RPCIF_SMRDR0:
|
||||
case RPCIF_SMWDR0:
|
||||
switch (rpc->xfer_size) {
|
||||
case 1:
|
||||
*val = readb(rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide == 0xC) {
|
||||
|
||||
case 2:
|
||||
*val = readw(rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide != 0xF) {
|
||||
|
||||
case 4:
|
||||
case 8:
|
||||
*val = readl(rpc->base + reg);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -EILSEQ;
|
||||
}
|
||||
|
||||
case RPCIF_SMRDR1:
|
||||
case RPCIF_SMWDR1:
|
||||
if (rpc->xfer_size != 8)
|
||||
return -EILSEQ;
|
||||
break;
|
||||
}
|
||||
|
||||
*val = readl(rpc->base + reg);
|
||||
@@ -192,18 +206,34 @@ static int rpcif_reg_write(void *context, unsigned int reg, unsigned int val)
|
||||
{
|
||||
struct rpcif *rpc = context;
|
||||
|
||||
if (reg == RPCIF_SMRDR0 || reg == RPCIF_SMWDR0) {
|
||||
u32 spide = readl(rpc->base + RPCIF_SMENR) & RPCIF_SMENR_SPIDE(0xF);
|
||||
|
||||
if (spide == 0x8) {
|
||||
switch (reg) {
|
||||
case RPCIF_SMWDR0:
|
||||
switch (rpc->xfer_size) {
|
||||
case 1:
|
||||
writeb(val, rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide == 0xC) {
|
||||
|
||||
case 2:
|
||||
writew(val, rpc->base + reg);
|
||||
return 0;
|
||||
} else if (spide != 0xF) {
|
||||
|
||||
case 4:
|
||||
case 8:
|
||||
writel(val, rpc->base + reg);
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -EILSEQ;
|
||||
}
|
||||
|
||||
case RPCIF_SMWDR1:
|
||||
if (rpc->xfer_size != 8)
|
||||
return -EILSEQ;
|
||||
break;
|
||||
|
||||
case RPCIF_SMRDR0:
|
||||
case RPCIF_SMRDR1:
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
writel(val, rpc->base + reg);
|
||||
@@ -442,6 +472,7 @@ int rpcif_manual_xfer(struct rpcif *rpc)
|
||||
|
||||
smenr |= RPCIF_SMENR_SPIDE(rpcif_bits_set(rpc, nbytes));
|
||||
regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
|
||||
rpc->xfer_size = nbytes;
|
||||
|
||||
memcpy(data, rpc->buffer + pos, nbytes);
|
||||
if (nbytes == 8) {
|
||||
@@ -506,6 +537,7 @@ int rpcif_manual_xfer(struct rpcif *rpc)
|
||||
regmap_write(rpc->regmap, RPCIF_SMENR, smenr);
|
||||
regmap_write(rpc->regmap, RPCIF_SMCR,
|
||||
rpc->smcr | RPCIF_SMCR_SPIE);
|
||||
rpc->xfer_size = nbytes;
|
||||
ret = wait_msg_xfer_end(rpc);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
*/
|
||||
|
||||
#define FM25_SN_LEN 8 /* serial number length */
|
||||
#define EE_MAXADDRLEN 3 /* 24 bit addresses, up to 2 MBytes */
|
||||
|
||||
struct at25_data {
|
||||
struct spi_device *spi;
|
||||
struct mutex lock;
|
||||
@@ -38,6 +40,7 @@ struct at25_data {
|
||||
struct nvmem_config nvmem_config;
|
||||
struct nvmem_device *nvmem;
|
||||
u8 sernum[FM25_SN_LEN];
|
||||
u8 command[EE_MAXADDRLEN + 1];
|
||||
};
|
||||
|
||||
#define AT25_WREN 0x06 /* latch the write enable */
|
||||
@@ -60,8 +63,6 @@ struct at25_data {
|
||||
|
||||
#define FM25_ID_LEN 9 /* ID length */
|
||||
|
||||
#define EE_MAXADDRLEN 3 /* 24 bit addresses, up to 2 MBytes */
|
||||
|
||||
/* Specs often allow 5 msec for a page write, sometimes 20 msec;
|
||||
* it's important to recover from write timeouts.
|
||||
*/
|
||||
@@ -76,7 +77,6 @@ static int at25_ee_read(void *priv, unsigned int offset,
|
||||
{
|
||||
struct at25_data *at25 = priv;
|
||||
char *buf = val;
|
||||
u8 command[EE_MAXADDRLEN + 1];
|
||||
u8 *cp;
|
||||
ssize_t status;
|
||||
struct spi_transfer t[2];
|
||||
@@ -90,12 +90,15 @@ static int at25_ee_read(void *priv, unsigned int offset,
|
||||
if (unlikely(!count))
|
||||
return -EINVAL;
|
||||
|
||||
cp = command;
|
||||
cp = at25->command;
|
||||
|
||||
instr = AT25_READ;
|
||||
if (at25->chip.flags & EE_INSTR_BIT3_IS_ADDR)
|
||||
if (offset >= (1U << (at25->addrlen * 8)))
|
||||
instr |= AT25_INSTR_BIT3;
|
||||
|
||||
mutex_lock(&at25->lock);
|
||||
|
||||
*cp++ = instr;
|
||||
|
||||
/* 8/16/24-bit address is written MSB first */
|
||||
@@ -114,7 +117,7 @@ static int at25_ee_read(void *priv, unsigned int offset,
|
||||
spi_message_init(&m);
|
||||
memset(t, 0, sizeof(t));
|
||||
|
||||
t[0].tx_buf = command;
|
||||
t[0].tx_buf = at25->command;
|
||||
t[0].len = at25->addrlen + 1;
|
||||
spi_message_add_tail(&t[0], &m);
|
||||
|
||||
@@ -122,8 +125,6 @@ static int at25_ee_read(void *priv, unsigned int offset,
|
||||
t[1].len = count;
|
||||
spi_message_add_tail(&t[1], &m);
|
||||
|
||||
mutex_lock(&at25->lock);
|
||||
|
||||
/* Read it all at once.
|
||||
*
|
||||
* REVISIT that's potentially a problem with large chips, if
|
||||
@@ -151,7 +152,7 @@ static int fm25_aux_read(struct at25_data *at25, u8 *buf, uint8_t command,
|
||||
spi_message_init(&m);
|
||||
memset(t, 0, sizeof(t));
|
||||
|
||||
t[0].tx_buf = &command;
|
||||
t[0].tx_buf = at25->command;
|
||||
t[0].len = 1;
|
||||
spi_message_add_tail(&t[0], &m);
|
||||
|
||||
@@ -161,6 +162,8 @@ static int fm25_aux_read(struct at25_data *at25, u8 *buf, uint8_t command,
|
||||
|
||||
mutex_lock(&at25->lock);
|
||||
|
||||
at25->command[0] = command;
|
||||
|
||||
status = spi_sync(at25->spi, &m);
|
||||
dev_dbg(&at25->spi->dev, "read %d aux bytes --> %d\n", len, status);
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
struct mtk_ecc_caps {
|
||||
u32 err_mask;
|
||||
u32 err_shift;
|
||||
const u8 *ecc_strength;
|
||||
const u32 *ecc_regs;
|
||||
u8 num_ecc_strength;
|
||||
@@ -76,7 +77,7 @@ static const u8 ecc_strength_mt2712[] = {
|
||||
};
|
||||
|
||||
static const u8 ecc_strength_mt7622[] = {
|
||||
4, 6, 8, 10, 12, 14, 16
|
||||
4, 6, 8, 10, 12
|
||||
};
|
||||
|
||||
enum mtk_ecc_regs {
|
||||
@@ -221,7 +222,7 @@ void mtk_ecc_get_stats(struct mtk_ecc *ecc, struct mtk_ecc_stats *stats,
|
||||
for (i = 0; i < sectors; i++) {
|
||||
offset = (i >> 2) << 2;
|
||||
err = readl(ecc->regs + ECC_DECENUM0 + offset);
|
||||
err = err >> ((i % 4) * 8);
|
||||
err = err >> ((i % 4) * ecc->caps->err_shift);
|
||||
err &= ecc->caps->err_mask;
|
||||
if (err == ecc->caps->err_mask) {
|
||||
/* uncorrectable errors */
|
||||
@@ -449,6 +450,7 @@ EXPORT_SYMBOL(mtk_ecc_get_parity_bits);
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
|
||||
.err_mask = 0x3f,
|
||||
.err_shift = 8,
|
||||
.ecc_strength = ecc_strength_mt2701,
|
||||
.ecc_regs = mt2701_ecc_regs,
|
||||
.num_ecc_strength = 20,
|
||||
@@ -459,6 +461,7 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
|
||||
.err_mask = 0x7f,
|
||||
.err_shift = 8,
|
||||
.ecc_strength = ecc_strength_mt2712,
|
||||
.ecc_regs = mt2712_ecc_regs,
|
||||
.num_ecc_strength = 23,
|
||||
@@ -468,10 +471,11 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
|
||||
};
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt7622 = {
|
||||
.err_mask = 0x3f,
|
||||
.err_mask = 0x1f,
|
||||
.err_shift = 5,
|
||||
.ecc_strength = ecc_strength_mt7622,
|
||||
.ecc_regs = mt7622_ecc_regs,
|
||||
.num_ecc_strength = 7,
|
||||
.num_ecc_strength = 5,
|
||||
.ecc_mode_shift = 4,
|
||||
.parity_bits = 13,
|
||||
.pg_irq_sel = 0,
|
||||
|
||||
@@ -2641,10 +2641,23 @@ static int qcom_nand_attach_chip(struct nand_chip *chip)
|
||||
ecc->engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST;
|
||||
|
||||
mtd_set_ooblayout(mtd, &qcom_nand_ooblayout_ops);
|
||||
/* Free the initially allocated BAM transaction for reading the ONFI params */
|
||||
if (nandc->props->is_bam)
|
||||
free_bam_transaction(nandc);
|
||||
|
||||
nandc->max_cwperpage = max_t(unsigned int, nandc->max_cwperpage,
|
||||
cwperpage);
|
||||
|
||||
/* Now allocate the BAM transaction based on updated max_cwperpage */
|
||||
if (nandc->props->is_bam) {
|
||||
nandc->bam_txn = alloc_bam_transaction(nandc);
|
||||
if (!nandc->bam_txn) {
|
||||
dev_err(nandc->dev,
|
||||
"failed to allocate bam transaction\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* DATA_UD_BYTES varies based on whether the read/write command protects
|
||||
* spare data with ECC too. We protect spare data by default, so we set
|
||||
@@ -2945,17 +2958,6 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (nandc->props->is_bam) {
|
||||
free_bam_transaction(nandc);
|
||||
nandc->bam_txn = alloc_bam_transaction(nandc);
|
||||
if (!nandc->bam_txn) {
|
||||
dev_err(nandc->dev,
|
||||
"failed to allocate bam transaction\n");
|
||||
nand_cleanup(chip);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
ret = mtd_device_parse_register(mtd, probes, NULL, NULL, 0);
|
||||
if (ret)
|
||||
nand_cleanup(chip);
|
||||
|
||||
@@ -384,7 +384,8 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,
|
||||
dma_addr_t dma_addr;
|
||||
dma_cookie_t cookie;
|
||||
uint32_t reg;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
unsigned long time_left;
|
||||
|
||||
if (dir == DMA_FROM_DEVICE) {
|
||||
chan = flctl->chan_fifo0_rx;
|
||||
@@ -425,13 +426,14 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret =
|
||||
time_left =
|
||||
wait_for_completion_timeout(&flctl->dma_complete,
|
||||
msecs_to_jiffies(3000));
|
||||
|
||||
if (ret <= 0) {
|
||||
if (time_left == 0) {
|
||||
dmaengine_terminate_all(chan);
|
||||
dev_err(&flctl->pdev->dev, "wait_for_completion_timeout\n");
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -441,7 +443,7 @@ out:
|
||||
|
||||
dma_unmap_single(chan->device->dev, dma_addr, len, dir);
|
||||
|
||||
/* ret > 0 is success */
|
||||
/* ret == 0 is success */
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -465,7 +467,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
|
||||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_rx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE) > 0)
|
||||
!flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE))
|
||||
goto convert; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
@@ -524,7 +526,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,
|
||||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_tx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE) > 0)
|
||||
!flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE))
|
||||
return; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
|
||||
@@ -3817,14 +3817,19 @@ static bool bond_flow_dissect(struct bonding *bond, struct sk_buff *skb, const v
|
||||
return true;
|
||||
}
|
||||
|
||||
static u32 bond_ip_hash(u32 hash, struct flow_keys *flow)
|
||||
static u32 bond_ip_hash(u32 hash, struct flow_keys *flow, int xmit_policy)
|
||||
{
|
||||
hash ^= (__force u32)flow_get_u32_dst(flow) ^
|
||||
(__force u32)flow_get_u32_src(flow);
|
||||
hash ^= (hash >> 16);
|
||||
hash ^= (hash >> 8);
|
||||
|
||||
/* discard lowest hash bit to deal with the common even ports pattern */
|
||||
return hash >> 1;
|
||||
if (xmit_policy == BOND_XMIT_POLICY_LAYER34 ||
|
||||
xmit_policy == BOND_XMIT_POLICY_ENCAP34)
|
||||
return hash >> 1;
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
/* Generate hash based on xmit policy. If @skb is given it is used to linearize
|
||||
@@ -3854,7 +3859,7 @@ static u32 __bond_xmit_hash(struct bonding *bond, struct sk_buff *skb, const voi
|
||||
memcpy(&hash, &flow.ports.ports, sizeof(hash));
|
||||
}
|
||||
|
||||
return bond_ip_hash(hash, &flow);
|
||||
return bond_ip_hash(hash, &flow, bond->params.xmit_policy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5012,7 +5017,7 @@ static u32 bond_sk_hash_l34(struct sock *sk)
|
||||
/* L4 */
|
||||
memcpy(&hash, &flow.ports.ports, sizeof(hash));
|
||||
/* L3 */
|
||||
return bond_ip_hash(hash, &flow);
|
||||
return bond_ip_hash(hash, &flow, BOND_XMIT_POLICY_LAYER34);
|
||||
}
|
||||
|
||||
static struct net_device *__bond_sk_get_lower_dev(struct bonding *bond,
|
||||
|
||||
@@ -1663,9 +1663,6 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port,
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_RMII:
|
||||
miicfg |= GSWIP_MII_CFG_MODE_RMIIM;
|
||||
|
||||
/* Configure the RMII clock as output: */
|
||||
miicfg |= GSWIP_MII_CFG_RMII_CLK;
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
|
||||
@@ -40,8 +40,9 @@ int mv88e6xxx_port_hidden_wait(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int bit = __bf_shf(MV88E6XXX_PORT_RESERVED_1A_BUSY);
|
||||
|
||||
return mv88e6xxx_wait_bit(chip, MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
|
||||
MV88E6XXX_PORT_RESERVED_1A, bit, 0);
|
||||
return mv88e6xxx_port_wait_bit(chip,
|
||||
MV88E6XXX_PORT_RESERVED_1A_CTRL_PORT,
|
||||
MV88E6XXX_PORT_RESERVED_1A, bit, 0);
|
||||
}
|
||||
|
||||
int mv88e6xxx_port_hidden_read(struct mv88e6xxx_chip *chip, int block, int port,
|
||||
|
||||
@@ -14158,10 +14158,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
|
||||
|
||||
/* Stop Tx */
|
||||
bnx2x_tx_disable(bp);
|
||||
/* Delete all NAPI objects */
|
||||
bnx2x_del_all_napi(bp);
|
||||
if (CNIC_LOADED(bp))
|
||||
bnx2x_del_all_napi_cnic(bp);
|
||||
netdev_reset_tc(bp->dev);
|
||||
|
||||
del_timer_sync(&bp->timer);
|
||||
@@ -14266,6 +14262,11 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
|
||||
bnx2x_drain_tx_queues(bp);
|
||||
bnx2x_send_unload_req(bp, UNLOAD_RECOVERY);
|
||||
bnx2x_netif_stop(bp, 1);
|
||||
bnx2x_del_all_napi(bp);
|
||||
|
||||
if (CNIC_LOADED(bp))
|
||||
bnx2x_del_all_napi_cnic(bp);
|
||||
|
||||
bnx2x_free_irq(bp);
|
||||
|
||||
/* Report UNLOAD_DONE to MCP */
|
||||
|
||||
@@ -1991,6 +1991,11 @@ static struct sk_buff *bcmgenet_add_tsb(struct net_device *dev,
|
||||
return skb;
|
||||
}
|
||||
|
||||
static void bcmgenet_hide_tsb(struct sk_buff *skb)
|
||||
{
|
||||
__skb_pull(skb, sizeof(struct status_64));
|
||||
}
|
||||
|
||||
static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct bcmgenet_priv *priv = netdev_priv(dev);
|
||||
@@ -2097,6 +2102,8 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
}
|
||||
|
||||
GENET_CB(skb)->last_cb = tx_cb_ptr;
|
||||
|
||||
bcmgenet_hide_tsb(skb);
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
/* Decrement total BD count and advance our write pointer */
|
||||
|
||||
@@ -3726,7 +3726,7 @@ static int fec_enet_init_stop_mode(struct fec_enet_private *fep,
|
||||
ARRAY_SIZE(out_val));
|
||||
if (ret) {
|
||||
dev_dbg(&fep->pdev->dev, "no stop mode property\n");
|
||||
return ret;
|
||||
goto out;
|
||||
}
|
||||
|
||||
fep->stop_gpr.gpr = syscon_node_to_regmap(gpr_np);
|
||||
|
||||
@@ -5092,6 +5092,13 @@ static void hns3_state_init(struct hnae3_handle *handle)
|
||||
set_bit(HNS3_NIC_STATE_RXD_ADV_LAYOUT_ENABLE, &priv->state);
|
||||
}
|
||||
|
||||
static void hns3_state_uninit(struct hnae3_handle *handle)
|
||||
{
|
||||
struct hns3_nic_priv *priv = handle->priv;
|
||||
|
||||
clear_bit(HNS3_NIC_STATE_INITED, &priv->state);
|
||||
}
|
||||
|
||||
static int hns3_client_init(struct hnae3_handle *handle)
|
||||
{
|
||||
struct pci_dev *pdev = handle->pdev;
|
||||
@@ -5209,7 +5216,9 @@ static int hns3_client_init(struct hnae3_handle *handle)
|
||||
return ret;
|
||||
|
||||
out_reg_netdev_fail:
|
||||
hns3_state_uninit(handle);
|
||||
hns3_dbg_uninit(handle);
|
||||
hns3_client_stop(handle);
|
||||
out_client_start:
|
||||
hns3_free_rx_cpu_rmap(netdev);
|
||||
hns3_nic_uninit_irq(priv);
|
||||
|
||||
@@ -93,6 +93,13 @@ static int hclge_send_mbx_msg(struct hclge_vport *vport, u8 *msg, u16 msg_len,
|
||||
enum hclge_cmd_status status;
|
||||
struct hclge_desc desc;
|
||||
|
||||
if (msg_len > HCLGE_MBX_MAX_MSG_SIZE) {
|
||||
dev_err(&hdev->pdev->dev,
|
||||
"msg data length(=%u) exceeds maximum(=%u)\n",
|
||||
msg_len, HCLGE_MBX_MAX_MSG_SIZE);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
resp_pf_to_vf = (struct hclge_mbx_pf_to_vf_cmd *)desc.data;
|
||||
|
||||
hclge_cmd_setup_basic_desc(&desc, HCLGEVF_OPC_MBX_PF_TO_VF, false);
|
||||
@@ -175,7 +182,7 @@ static int hclge_get_ring_chain_from_mbx(
|
||||
ring_num = req->msg.ring_num;
|
||||
|
||||
if (ring_num > HCLGE_MBX_MAX_RING_CHAIN_PARAM_NUM)
|
||||
return -ENOMEM;
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < ring_num; i++) {
|
||||
if (req->msg.param[i].tqp_index >= vport->nic.kinfo.rss_size) {
|
||||
@@ -586,9 +593,9 @@ static int hclge_set_vf_mtu(struct hclge_vport *vport,
|
||||
return hclge_set_vport_mtu(vport, mtu);
|
||||
}
|
||||
|
||||
static void hclge_get_queue_id_in_pf(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
static int hclge_get_queue_id_in_pf(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
{
|
||||
struct hnae3_handle *handle = &vport->nic;
|
||||
struct hclge_dev *hdev = vport->back;
|
||||
@@ -598,17 +605,18 @@ static void hclge_get_queue_id_in_pf(struct hclge_vport *vport,
|
||||
if (queue_id >= handle->kinfo.num_tqps) {
|
||||
dev_err(&hdev->pdev->dev, "Invalid queue id(%u) from VF %u\n",
|
||||
queue_id, mbx_req->mbx_src_vfid);
|
||||
return;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
qid_in_pf = hclge_covert_handle_qid_global(&vport->nic, queue_id);
|
||||
memcpy(resp_msg->data, &qid_in_pf, sizeof(qid_in_pf));
|
||||
resp_msg->len = sizeof(qid_in_pf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hclge_get_rss_key(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
static int hclge_get_rss_key(struct hclge_vport *vport,
|
||||
struct hclge_mbx_vf_to_pf_cmd *mbx_req,
|
||||
struct hclge_respond_to_vf_msg *resp_msg)
|
||||
{
|
||||
#define HCLGE_RSS_MBX_RESP_LEN 8
|
||||
struct hclge_dev *hdev = vport->back;
|
||||
@@ -624,13 +632,14 @@ static void hclge_get_rss_key(struct hclge_vport *vport,
|
||||
dev_warn(&hdev->pdev->dev,
|
||||
"failed to get the rss hash key, the index(%u) invalid !\n",
|
||||
index);
|
||||
return;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
memcpy(resp_msg->data,
|
||||
&hdev->vport[0].rss_hash_key[index * HCLGE_RSS_MBX_RESP_LEN],
|
||||
HCLGE_RSS_MBX_RESP_LEN);
|
||||
resp_msg->len = HCLGE_RSS_MBX_RESP_LEN;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hclge_link_fail_parse(struct hclge_dev *hdev, u8 link_fail_code)
|
||||
@@ -805,10 +814,10 @@ void hclge_mbx_handler(struct hclge_dev *hdev)
|
||||
"VF fail(%d) to set mtu\n", ret);
|
||||
break;
|
||||
case HCLGE_MBX_GET_QID_IN_PF:
|
||||
hclge_get_queue_id_in_pf(vport, req, &resp_msg);
|
||||
ret = hclge_get_queue_id_in_pf(vport, req, &resp_msg);
|
||||
break;
|
||||
case HCLGE_MBX_GET_RSS_KEY:
|
||||
hclge_get_rss_key(vport, req, &resp_msg);
|
||||
ret = hclge_get_rss_key(vport, req, &resp_msg);
|
||||
break;
|
||||
case HCLGE_MBX_GET_LINK_MODE:
|
||||
hclge_get_link_mode(vport, req);
|
||||
|
||||
@@ -2961,13 +2961,8 @@ static void ibmvnic_get_ringparam(struct net_device *netdev,
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
if (adapter->priv_flags & IBMVNIC_USE_SERVER_MAXES) {
|
||||
ring->rx_max_pending = adapter->max_rx_add_entries_per_subcrq;
|
||||
ring->tx_max_pending = adapter->max_tx_entries_per_subcrq;
|
||||
} else {
|
||||
ring->rx_max_pending = IBMVNIC_MAX_QUEUE_SZ;
|
||||
ring->tx_max_pending = IBMVNIC_MAX_QUEUE_SZ;
|
||||
}
|
||||
ring->rx_max_pending = adapter->max_rx_add_entries_per_subcrq;
|
||||
ring->tx_max_pending = adapter->max_tx_entries_per_subcrq;
|
||||
ring->rx_mini_max_pending = 0;
|
||||
ring->rx_jumbo_max_pending = 0;
|
||||
ring->rx_pending = adapter->req_rx_add_entries_per_subcrq;
|
||||
@@ -2980,23 +2975,21 @@ static int ibmvnic_set_ringparam(struct net_device *netdev,
|
||||
struct ethtool_ringparam *ring)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
int ret;
|
||||
|
||||
ret = 0;
|
||||
if (ring->rx_pending > adapter->max_rx_add_entries_per_subcrq ||
|
||||
ring->tx_pending > adapter->max_tx_entries_per_subcrq) {
|
||||
netdev_err(netdev, "Invalid request.\n");
|
||||
netdev_err(netdev, "Max tx buffers = %llu\n",
|
||||
adapter->max_rx_add_entries_per_subcrq);
|
||||
netdev_err(netdev, "Max rx buffers = %llu\n",
|
||||
adapter->max_tx_entries_per_subcrq);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
adapter->desired.rx_entries = ring->rx_pending;
|
||||
adapter->desired.tx_entries = ring->tx_pending;
|
||||
|
||||
ret = wait_for_reset(adapter);
|
||||
|
||||
if (!ret &&
|
||||
(adapter->req_rx_add_entries_per_subcrq != ring->rx_pending ||
|
||||
adapter->req_tx_entries_per_subcrq != ring->tx_pending))
|
||||
netdev_info(netdev,
|
||||
"Could not match full ringsize request. Requested: RX %d, TX %d; Allowed: RX %llu, TX %llu\n",
|
||||
ring->rx_pending, ring->tx_pending,
|
||||
adapter->req_rx_add_entries_per_subcrq,
|
||||
adapter->req_tx_entries_per_subcrq);
|
||||
return ret;
|
||||
return wait_for_reset(adapter);
|
||||
}
|
||||
|
||||
static void ibmvnic_get_channels(struct net_device *netdev,
|
||||
@@ -3004,14 +2997,8 @@ static void ibmvnic_get_channels(struct net_device *netdev,
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
if (adapter->priv_flags & IBMVNIC_USE_SERVER_MAXES) {
|
||||
channels->max_rx = adapter->max_rx_queues;
|
||||
channels->max_tx = adapter->max_tx_queues;
|
||||
} else {
|
||||
channels->max_rx = IBMVNIC_MAX_QUEUES;
|
||||
channels->max_tx = IBMVNIC_MAX_QUEUES;
|
||||
}
|
||||
|
||||
channels->max_rx = adapter->max_rx_queues;
|
||||
channels->max_tx = adapter->max_tx_queues;
|
||||
channels->max_other = 0;
|
||||
channels->max_combined = 0;
|
||||
channels->rx_count = adapter->req_rx_queues;
|
||||
@@ -3024,22 +3011,11 @@ static int ibmvnic_set_channels(struct net_device *netdev,
|
||||
struct ethtool_channels *channels)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
int ret;
|
||||
|
||||
ret = 0;
|
||||
adapter->desired.rx_queues = channels->rx_count;
|
||||
adapter->desired.tx_queues = channels->tx_count;
|
||||
|
||||
ret = wait_for_reset(adapter);
|
||||
|
||||
if (!ret &&
|
||||
(adapter->req_rx_queues != channels->rx_count ||
|
||||
adapter->req_tx_queues != channels->tx_count))
|
||||
netdev_info(netdev,
|
||||
"Could not match full channels request. Requested: RX %d, TX %d; Allowed: RX %llu, TX %llu\n",
|
||||
channels->rx_count, channels->tx_count,
|
||||
adapter->req_rx_queues, adapter->req_tx_queues);
|
||||
return ret;
|
||||
return wait_for_reset(adapter);
|
||||
}
|
||||
|
||||
static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
||||
@@ -3047,43 +3023,32 @@ static void ibmvnic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(dev);
|
||||
int i;
|
||||
|
||||
switch (stringset) {
|
||||
case ETH_SS_STATS:
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_stats);
|
||||
i++, data += ETH_GSTRING_LEN)
|
||||
memcpy(data, ibmvnic_stats[i].name, ETH_GSTRING_LEN);
|
||||
|
||||
for (i = 0; i < adapter->req_tx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN,
|
||||
"tx%d_dropped_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
|
||||
for (i = 0; i < adapter->req_rx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_interrupts", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
break;
|
||||
|
||||
case ETH_SS_PRIV_FLAGS:
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_priv_flags); i++)
|
||||
strcpy(data + i * ETH_GSTRING_LEN,
|
||||
ibmvnic_priv_flags[i]);
|
||||
break;
|
||||
default:
|
||||
if (stringset != ETH_SS_STATS)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++, data += ETH_GSTRING_LEN)
|
||||
memcpy(data, ibmvnic_stats[i].name, ETH_GSTRING_LEN);
|
||||
|
||||
for (i = 0; i < adapter->req_tx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "tx%d_dropped_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
|
||||
for (i = 0; i < adapter->req_rx_queues; i++) {
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_packets", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_bytes", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
|
||||
snprintf(data, ETH_GSTRING_LEN, "rx%d_interrupts", i);
|
||||
data += ETH_GSTRING_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3096,8 +3061,6 @@ static int ibmvnic_get_sset_count(struct net_device *dev, int sset)
|
||||
return ARRAY_SIZE(ibmvnic_stats) +
|
||||
adapter->req_tx_queues * NUM_TX_STATS +
|
||||
adapter->req_rx_queues * NUM_RX_STATS;
|
||||
case ETH_SS_PRIV_FLAGS:
|
||||
return ARRAY_SIZE(ibmvnic_priv_flags);
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -3150,26 +3113,6 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
static u32 ibmvnic_get_priv_flags(struct net_device *netdev)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
return adapter->priv_flags;
|
||||
}
|
||||
|
||||
static int ibmvnic_set_priv_flags(struct net_device *netdev, u32 flags)
|
||||
{
|
||||
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
|
||||
bool which_maxes = !!(flags & IBMVNIC_USE_SERVER_MAXES);
|
||||
|
||||
if (which_maxes)
|
||||
adapter->priv_flags |= IBMVNIC_USE_SERVER_MAXES;
|
||||
else
|
||||
adapter->priv_flags &= ~IBMVNIC_USE_SERVER_MAXES;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct ethtool_ops ibmvnic_ethtool_ops = {
|
||||
.get_drvinfo = ibmvnic_get_drvinfo,
|
||||
.get_msglevel = ibmvnic_get_msglevel,
|
||||
@@ -3183,8 +3126,6 @@ static const struct ethtool_ops ibmvnic_ethtool_ops = {
|
||||
.get_sset_count = ibmvnic_get_sset_count,
|
||||
.get_ethtool_stats = ibmvnic_get_ethtool_stats,
|
||||
.get_link_ksettings = ibmvnic_get_link_ksettings,
|
||||
.get_priv_flags = ibmvnic_get_priv_flags,
|
||||
.set_priv_flags = ibmvnic_set_priv_flags,
|
||||
};
|
||||
|
||||
/* Routines for managing CRQs/sCRQs */
|
||||
|
||||
@@ -43,11 +43,6 @@
|
||||
|
||||
#define IBMVNIC_RESET_DELAY 100
|
||||
|
||||
static const char ibmvnic_priv_flags[][ETH_GSTRING_LEN] = {
|
||||
#define IBMVNIC_USE_SERVER_MAXES 0x1
|
||||
"use-server-maxes"
|
||||
};
|
||||
|
||||
struct ibmvnic_login_buffer {
|
||||
__be32 len;
|
||||
__be32 version;
|
||||
@@ -885,7 +880,6 @@ struct ibmvnic_adapter {
|
||||
struct ibmvnic_control_ip_offload_buffer ip_offload_ctrl;
|
||||
dma_addr_t ip_offload_ctrl_tok;
|
||||
u32 msg_enable;
|
||||
u32 priv_flags;
|
||||
|
||||
/* Vital Product Data (VPD) */
|
||||
struct ibmvnic_vpd *vpd;
|
||||
|
||||
@@ -903,7 +903,8 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
|
||||
/* Tx IPsec offload doesn't seem to work on this
|
||||
* device, so block these requests for now.
|
||||
*/
|
||||
if (!(sam->flags & XFRM_OFFLOAD_INBOUND)) {
|
||||
sam->flags = sam->flags & ~XFRM_OFFLOAD_IPV6;
|
||||
if (sam->flags != XFRM_OFFLOAD_INBOUND) {
|
||||
err = -EOPNOTSUPP;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
@@ -65,8 +65,9 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)
|
||||
struct phy_device *phy_dev = ndev->phydev;
|
||||
u32 val;
|
||||
|
||||
writew(SGMII_ADAPTER_DISABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
if (sgmii_adapter_base)
|
||||
writew(SGMII_ADAPTER_DISABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
|
||||
if (splitter_base) {
|
||||
val = readl(splitter_base + EMAC_SPLITTER_CTRL_REG);
|
||||
@@ -88,10 +89,11 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)
|
||||
writel(val, splitter_base + EMAC_SPLITTER_CTRL_REG);
|
||||
}
|
||||
|
||||
writew(SGMII_ADAPTER_ENABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
if (phy_dev)
|
||||
if (phy_dev && sgmii_adapter_base) {
|
||||
writew(SGMII_ADAPTER_ENABLE,
|
||||
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
|
||||
tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed);
|
||||
}
|
||||
}
|
||||
|
||||
static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev)
|
||||
|
||||
@@ -1353,7 +1353,9 @@ static int rr_close(struct net_device *dev)
|
||||
|
||||
rrpriv->fw_running = 0;
|
||||
|
||||
spin_unlock_irqrestore(&rrpriv->lock, flags);
|
||||
del_timer_sync(&rrpriv->timer);
|
||||
spin_lock_irqsave(&rrpriv->lock, flags);
|
||||
|
||||
writel(0, ®s->TxPi);
|
||||
writel(0, ®s->IpRxPi);
|
||||
|
||||
@@ -789,7 +789,7 @@ static int mv3310_read_status_copper(struct phy_device *phydev)
|
||||
|
||||
cssr1 = phy_read_mmd(phydev, MDIO_MMD_PCS, MV_PCS_CSSR1);
|
||||
if (cssr1 < 0)
|
||||
return val;
|
||||
return cssr1;
|
||||
|
||||
/* If the link settings are not resolved, mark the link down */
|
||||
if (!(cssr1 & MV_PCS_CSSR1_RESOLVED)) {
|
||||
|
||||
@@ -965,6 +965,24 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
|
||||
* xdp.data_meta were adjusted
|
||||
*/
|
||||
len = xdp.data_end - xdp.data + vi->hdr_len + metasize;
|
||||
|
||||
/* recalculate headroom if xdp.data or xdp_data_meta
|
||||
* were adjusted, note that offset should always point
|
||||
* to the start of the reserved bytes for virtio_net
|
||||
* header which are followed by xdp.data, that means
|
||||
* that offset is equal to the headroom (when buf is
|
||||
* starting at the beginning of the page, otherwise
|
||||
* there is a base offset inside the page) but it's used
|
||||
* with a different starting point (buf start) than
|
||||
* xdp.data (buf start + vnet hdr size). If xdp.data or
|
||||
* data_meta were adjusted by the xdp prog then the
|
||||
* headroom size has changed and so has the offset, we
|
||||
* can use data_hard_start, which points at buf start +
|
||||
* vnet hdr size, to calculate the new headroom and use
|
||||
* it later to compute buf start in page_to_skb()
|
||||
*/
|
||||
headroom = xdp.data - xdp.data_hard_start - metasize;
|
||||
|
||||
/* We can only create skb based on xdp_page. */
|
||||
if (unlikely(xdp_page != page)) {
|
||||
rcu_read_unlock();
|
||||
@@ -972,7 +990,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
|
||||
head_skb = page_to_skb(vi, rq, xdp_page, offset,
|
||||
len, PAGE_SIZE, false,
|
||||
metasize,
|
||||
VIRTIO_XDP_HEADROOM);
|
||||
headroom);
|
||||
return head_skb;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/icmp.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <net/dst_metadata.h>
|
||||
#include <net/icmp.h>
|
||||
#include <net/rtnetlink.h>
|
||||
#include <net/ip_tunnels.h>
|
||||
@@ -152,7 +153,7 @@ static netdev_tx_t wg_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
goto err_peer;
|
||||
}
|
||||
|
||||
mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
||||
mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
||||
|
||||
__skb_queue_head_init(&packets);
|
||||
if (!skb_is_gso(skb)) {
|
||||
|
||||
@@ -414,19 +414,19 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)
|
||||
|
||||
ret = clk_prepare_enable(priv->clk_ref);
|
||||
if (ret)
|
||||
goto err_disable_clk_ref;
|
||||
return ret;
|
||||
|
||||
priv->reset = devm_reset_control_array_get_exclusive(dev);
|
||||
if (IS_ERR(priv->reset))
|
||||
return PTR_ERR(priv->reset);
|
||||
if (IS_ERR(priv->reset)) {
|
||||
ret = PTR_ERR(priv->reset);
|
||||
goto err_disable_clk_ref;
|
||||
}
|
||||
|
||||
priv->phy = devm_phy_create(dev, np, &phy_g12a_usb3_pcie_ops);
|
||||
if (IS_ERR(priv->phy)) {
|
||||
ret = PTR_ERR(priv->phy);
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(dev, "failed to create PHY\n");
|
||||
|
||||
return ret;
|
||||
dev_err_probe(dev, ret, "failed to create PHY\n");
|
||||
goto err_disable_clk_ref;
|
||||
}
|
||||
|
||||
phy_set_drvdata(priv->phy, priv);
|
||||
@@ -434,8 +434,12 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)
|
||||
|
||||
phy_provider = devm_of_phy_provider_register(dev,
|
||||
phy_g12a_usb3_pcie_xlate);
|
||||
if (IS_ERR(phy_provider)) {
|
||||
ret = PTR_ERR(phy_provider);
|
||||
goto err_disable_clk_ref;
|
||||
}
|
||||
|
||||
return PTR_ERR_OR_ZERO(phy_provider);
|
||||
return 0;
|
||||
|
||||
err_disable_clk_ref:
|
||||
clk_disable_unprepare(priv->clk_ref);
|
||||
|
||||
@@ -629,7 +629,8 @@ idle:
|
||||
cleanup:
|
||||
if (error < 0)
|
||||
phy_mdm6600_device_power_off(ddata);
|
||||
|
||||
pm_runtime_disable(ddata->dev);
|
||||
pm_runtime_dont_use_autosuspend(ddata->dev);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,6 +187,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
|
||||
sata_phy->client = of_find_i2c_device_by_node(node);
|
||||
of_node_put(node);
|
||||
if (!sata_phy->client)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
@@ -195,20 +196,21 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
|
||||
sata_phy->phyclk = devm_clk_get(dev, "sata_phyctrl");
|
||||
if (IS_ERR(sata_phy->phyclk)) {
|
||||
dev_err(dev, "failed to get clk for PHY\n");
|
||||
return PTR_ERR(sata_phy->phyclk);
|
||||
ret = PTR_ERR(sata_phy->phyclk);
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(sata_phy->phyclk);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to enable source clk\n");
|
||||
return ret;
|
||||
goto put_dev;
|
||||
}
|
||||
|
||||
sata_phy->phy = devm_phy_create(dev, NULL, &exynos_sata_phy_ops);
|
||||
if (IS_ERR(sata_phy->phy)) {
|
||||
clk_disable_unprepare(sata_phy->phyclk);
|
||||
dev_err(dev, "failed to create PHY\n");
|
||||
return PTR_ERR(sata_phy->phy);
|
||||
ret = PTR_ERR(sata_phy->phy);
|
||||
goto clk_disable;
|
||||
}
|
||||
|
||||
phy_set_drvdata(sata_phy->phy, sata_phy);
|
||||
@@ -216,11 +218,18 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
|
||||
phy_provider = devm_of_phy_provider_register(dev,
|
||||
of_phy_simple_xlate);
|
||||
if (IS_ERR(phy_provider)) {
|
||||
clk_disable_unprepare(sata_phy->phyclk);
|
||||
return PTR_ERR(phy_provider);
|
||||
ret = PTR_ERR(phy_provider);
|
||||
goto clk_disable;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
clk_disable:
|
||||
clk_disable_unprepare(sata_phy->phyclk);
|
||||
put_dev:
|
||||
put_device(&sata_phy->client->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct of_device_id exynos_sata_phy_of_match[] = {
|
||||
|
||||
@@ -838,7 +838,7 @@ static int serdes_am654_probe(struct platform_device *pdev)
|
||||
|
||||
clk_err:
|
||||
of_clk_del_provider(node);
|
||||
|
||||
pm_runtime_disable(dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
|
||||
return 0;
|
||||
|
||||
err1:
|
||||
clk_disable(phy->wkupclk);
|
||||
clk_disable_unprepare(phy->wkupclk);
|
||||
|
||||
err0:
|
||||
return ret;
|
||||
|
||||
@@ -30,6 +30,7 @@ config PINCTRL_MTK_MOORE
|
||||
select GENERIC_PINMUX_FUNCTIONS
|
||||
select GPIOLIB
|
||||
select OF_GPIO
|
||||
select EINT_MTK
|
||||
select PINCTRL_MTK_V2
|
||||
|
||||
config PINCTRL_MTK_PARIS
|
||||
|
||||
@@ -1374,10 +1374,10 @@ static int pistachio_gpio_register(struct pistachio_pinctrl *pctl)
|
||||
}
|
||||
|
||||
irq = irq_of_parse_and_map(child, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(pctl->dev, "No IRQ for bank %u: %d\n", i, irq);
|
||||
if (!irq) {
|
||||
dev_err(pctl->dev, "No IRQ for bank %u\n", i);
|
||||
of_node_put(child);
|
||||
ret = irq;
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -455,95 +455,110 @@ static struct rockchip_mux_recalced_data rk3128_mux_recalced_data[] = {
|
||||
|
||||
static struct rockchip_mux_recalced_data rk3308_mux_recalced_data[] = {
|
||||
{
|
||||
/* gpio1b6_sel */
|
||||
.num = 1,
|
||||
.pin = 14,
|
||||
.reg = 0x28,
|
||||
.bit = 12,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1b7_sel */
|
||||
.num = 1,
|
||||
.pin = 15,
|
||||
.reg = 0x2c,
|
||||
.bit = 0,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio1c2_sel */
|
||||
.num = 1,
|
||||
.pin = 18,
|
||||
.reg = 0x30,
|
||||
.bit = 4,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c3_sel */
|
||||
.num = 1,
|
||||
.pin = 19,
|
||||
.reg = 0x30,
|
||||
.bit = 8,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c4_sel */
|
||||
.num = 1,
|
||||
.pin = 20,
|
||||
.reg = 0x30,
|
||||
.bit = 12,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c5_sel */
|
||||
.num = 1,
|
||||
.pin = 21,
|
||||
.reg = 0x34,
|
||||
.bit = 0,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c6_sel */
|
||||
.num = 1,
|
||||
.pin = 22,
|
||||
.reg = 0x34,
|
||||
.bit = 4,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio1c7_sel */
|
||||
.num = 1,
|
||||
.pin = 23,
|
||||
.reg = 0x34,
|
||||
.bit = 8,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio3b4_sel */
|
||||
.num = 3,
|
||||
.pin = 12,
|
||||
.reg = 0x68,
|
||||
.bit = 8,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio3b5_sel */
|
||||
.num = 3,
|
||||
.pin = 13,
|
||||
.reg = 0x68,
|
||||
.bit = 12,
|
||||
.mask = 0xf
|
||||
}, {
|
||||
/* gpio2a2_sel */
|
||||
.num = 2,
|
||||
.pin = 2,
|
||||
.reg = 0x608,
|
||||
.bit = 0,
|
||||
.mask = 0x7
|
||||
.reg = 0x40,
|
||||
.bit = 4,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio2a3_sel */
|
||||
.num = 2,
|
||||
.pin = 3,
|
||||
.reg = 0x608,
|
||||
.bit = 4,
|
||||
.mask = 0x7
|
||||
.reg = 0x40,
|
||||
.bit = 6,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio2c0_sel */
|
||||
.num = 2,
|
||||
.pin = 16,
|
||||
.reg = 0x610,
|
||||
.bit = 8,
|
||||
.mask = 0x7
|
||||
.reg = 0x50,
|
||||
.bit = 0,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio3b2_sel */
|
||||
.num = 3,
|
||||
.pin = 10,
|
||||
.reg = 0x610,
|
||||
.bit = 0,
|
||||
.mask = 0x7
|
||||
.reg = 0x68,
|
||||
.bit = 4,
|
||||
.mask = 0x3
|
||||
}, {
|
||||
/* gpio3b3_sel */
|
||||
.num = 3,
|
||||
.pin = 11,
|
||||
.reg = 0x610,
|
||||
.bit = 4,
|
||||
.mask = 0x7
|
||||
.reg = 0x68,
|
||||
.bit = 6,
|
||||
.mask = 0x3
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
#
|
||||
config PINCTRL_SAMSUNG
|
||||
bool
|
||||
depends on OF_GPIO
|
||||
select GPIOLIB
|
||||
select PINMUX
|
||||
select PINCONF
|
||||
|
||||
config PINCTRL_EXYNOS
|
||||
bool "Pinctrl common driver part for Samsung Exynos SoCs"
|
||||
depends on OF_GPIO
|
||||
depends on ARCH_EXYNOS || ARCH_S5PV210 || COMPILE_TEST
|
||||
depends on ARCH_EXYNOS || ARCH_S5PV210 || (COMPILE_TEST && OF)
|
||||
select PINCTRL_SAMSUNG
|
||||
select PINCTRL_EXYNOS_ARM if ARM && (ARCH_EXYNOS || ARCH_S5PV210)
|
||||
select PINCTRL_EXYNOS_ARM64 if ARM64 && ARCH_EXYNOS
|
||||
@@ -26,12 +25,10 @@ config PINCTRL_EXYNOS_ARM64
|
||||
|
||||
config PINCTRL_S3C24XX
|
||||
bool "Samsung S3C24XX SoC pinctrl driver"
|
||||
depends on OF_GPIO
|
||||
depends on ARCH_S3C24XX || COMPILE_TEST
|
||||
depends on ARCH_S3C24XX || (COMPILE_TEST && OF)
|
||||
select PINCTRL_SAMSUNG
|
||||
|
||||
config PINCTRL_S3C64XX
|
||||
bool "Samsung S3C64XX SoC pinctrl driver"
|
||||
depends on OF_GPIO
|
||||
depends on ARCH_S3C64XX || COMPILE_TEST
|
||||
depends on ARCH_S3C64XX || (COMPILE_TEST && OF)
|
||||
select PINCTRL_SAMSUNG
|
||||
|
||||
@@ -225,6 +225,13 @@ static void stm32_gpio_free(struct gpio_chip *chip, unsigned offset)
|
||||
pinctrl_gpio_free(chip->base + offset);
|
||||
}
|
||||
|
||||
static int stm32_gpio_get_noclk(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
|
||||
return !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & BIT(offset));
|
||||
}
|
||||
|
||||
static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = gpiochip_get_data(chip);
|
||||
@@ -232,7 +239,7 @@ static int stm32_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
|
||||
clk_enable(bank->clk);
|
||||
|
||||
ret = !!(readl_relaxed(bank->base + STM32_GPIO_IDR) & BIT(offset));
|
||||
ret = stm32_gpio_get_noclk(chip, offset);
|
||||
|
||||
clk_disable(bank->clk);
|
||||
|
||||
@@ -311,8 +318,12 @@ static void stm32_gpio_irq_trigger(struct irq_data *d)
|
||||
struct stm32_gpio_bank *bank = d->domain->host_data;
|
||||
int level;
|
||||
|
||||
/* Do not access the GPIO if this is not LEVEL triggered IRQ. */
|
||||
if (!(bank->irq_type[d->hwirq] & IRQ_TYPE_LEVEL_MASK))
|
||||
return;
|
||||
|
||||
/* If level interrupt type then retrig */
|
||||
level = stm32_gpio_get(&bank->gpio_chip, d->hwirq);
|
||||
level = stm32_gpio_get_noclk(&bank->gpio_chip, d->hwirq);
|
||||
if ((level == 0 && bank->irq_type[d->hwirq] == IRQ_TYPE_LEVEL_LOW) ||
|
||||
(level == 1 && bank->irq_type[d->hwirq] == IRQ_TYPE_LEVEL_HIGH))
|
||||
irq_chip_retrigger_hierarchy(d);
|
||||
@@ -354,6 +365,7 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = irq_data->domain->host_data;
|
||||
struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
ret = stm32_gpio_direction_input(&bank->gpio_chip, irq_data->hwirq);
|
||||
@@ -367,6 +379,10 @@ static int stm32_gpio_irq_request_resources(struct irq_data *irq_data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
flags = irqd_get_trigger_type(irq_data);
|
||||
if (flags & IRQ_TYPE_LEVEL_MASK)
|
||||
clk_enable(bank->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -374,6 +390,9 @@ static void stm32_gpio_irq_release_resources(struct irq_data *irq_data)
|
||||
{
|
||||
struct stm32_gpio_bank *bank = irq_data->domain->host_data;
|
||||
|
||||
if (bank->irq_type[irq_data->hwirq] & IRQ_TYPE_LEVEL_MASK)
|
||||
clk_disable(bank->clk);
|
||||
|
||||
gpiochip_unlock_as_irq(&bank->gpio_chip, irq_data->hwirq);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *priv);
|
||||
struct odvp_attr {
|
||||
int odvp;
|
||||
struct int3400_thermal_priv *priv;
|
||||
struct kobj_attribute attr;
|
||||
struct device_attribute attr;
|
||||
};
|
||||
|
||||
static ssize_t data_vault_read(struct file *file, struct kobject *kobj,
|
||||
@@ -272,7 +272,7 @@ static int int3400_thermal_run_osc(acpi_handle handle,
|
||||
return result;
|
||||
}
|
||||
|
||||
static ssize_t odvp_show(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
static ssize_t odvp_show(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct odvp_attr *odvp_attr;
|
||||
|
||||
@@ -73,6 +73,8 @@ module_param(debug, int, 0600);
|
||||
*/
|
||||
#define MAX_MRU 1500
|
||||
#define MAX_MTU 1500
|
||||
/* SOF, ADDR, CTRL, LEN1, LEN2, ..., FCS, EOF */
|
||||
#define PROT_OVERHEAD 7
|
||||
#define GSM_NET_TX_TIMEOUT (HZ*10)
|
||||
|
||||
/*
|
||||
@@ -231,6 +233,7 @@ struct gsm_mux {
|
||||
int initiator; /* Did we initiate connection */
|
||||
bool dead; /* Has the mux been shut down */
|
||||
struct gsm_dlci *dlci[NUM_DLCI];
|
||||
int old_c_iflag; /* termios c_iflag value before attach */
|
||||
bool constipated; /* Asked by remote to shut up */
|
||||
|
||||
spinlock_t tx_lock;
|
||||
@@ -820,7 +823,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
|
||||
break;
|
||||
case 2: /* Unstructed with modem bits.
|
||||
Always one byte as we never send inline break data */
|
||||
*dp++ = gsm_encode_modem(dlci);
|
||||
*dp++ = (gsm_encode_modem(dlci) << 1) | EA;
|
||||
break;
|
||||
}
|
||||
WARN_ON(kfifo_out_locked(&dlci->fifo, dp , len, &dlci->lock) != len);
|
||||
@@ -1081,7 +1084,6 @@ static void gsm_control_modem(struct gsm_mux *gsm, const u8 *data, int clen)
|
||||
{
|
||||
unsigned int addr = 0;
|
||||
unsigned int modem = 0;
|
||||
unsigned int brk = 0;
|
||||
struct gsm_dlci *dlci;
|
||||
int len = clen;
|
||||
int slen;
|
||||
@@ -1111,17 +1113,8 @@ static void gsm_control_modem(struct gsm_mux *gsm, const u8 *data, int clen)
|
||||
return;
|
||||
}
|
||||
len--;
|
||||
if (len > 0) {
|
||||
while (gsm_read_ea(&brk, *dp++) == 0) {
|
||||
len--;
|
||||
if (len == 0)
|
||||
return;
|
||||
}
|
||||
modem <<= 7;
|
||||
modem |= (brk & 0x7f);
|
||||
}
|
||||
tty = tty_port_tty_get(&dlci->port);
|
||||
gsm_process_modem(tty, dlci, modem, slen);
|
||||
gsm_process_modem(tty, dlci, modem, slen - len);
|
||||
if (tty) {
|
||||
tty_wakeup(tty);
|
||||
tty_kref_put(tty);
|
||||
@@ -1300,11 +1293,12 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
|
||||
|
||||
static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
|
||||
{
|
||||
struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
|
||||
struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 2, gsm->ftype);
|
||||
if (msg == NULL)
|
||||
return;
|
||||
msg->data[0] = (ctrl->cmd << 1) | 2 | EA; /* command */
|
||||
memcpy(msg->data + 1, ctrl->data, ctrl->len);
|
||||
msg->data[0] = (ctrl->cmd << 1) | CR | EA; /* command */
|
||||
msg->data[1] = (ctrl->len << 1) | EA;
|
||||
memcpy(msg->data + 2, ctrl->data, ctrl->len);
|
||||
gsm_data_queue(gsm->dlci[0], msg);
|
||||
}
|
||||
|
||||
@@ -1327,7 +1321,6 @@ static void gsm_control_retransmit(struct timer_list *t)
|
||||
spin_lock_irqsave(&gsm->control_lock, flags);
|
||||
ctrl = gsm->pending_cmd;
|
||||
if (ctrl) {
|
||||
gsm->cretries--;
|
||||
if (gsm->cretries == 0) {
|
||||
gsm->pending_cmd = NULL;
|
||||
ctrl->error = -ETIMEDOUT;
|
||||
@@ -1336,6 +1329,7 @@ static void gsm_control_retransmit(struct timer_list *t)
|
||||
wake_up(&gsm->event);
|
||||
return;
|
||||
}
|
||||
gsm->cretries--;
|
||||
gsm_control_transmit(gsm, ctrl);
|
||||
mod_timer(&gsm->t2_timer, jiffies + gsm->t2 * HZ / 100);
|
||||
}
|
||||
@@ -1376,7 +1370,7 @@ retry:
|
||||
|
||||
/* If DLCI0 is in ADM mode skip retries, it won't respond */
|
||||
if (gsm->dlci[0]->mode == DLCI_MODE_ADM)
|
||||
gsm->cretries = 1;
|
||||
gsm->cretries = 0;
|
||||
else
|
||||
gsm->cretries = gsm->n2;
|
||||
|
||||
@@ -1424,13 +1418,17 @@ static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
|
||||
|
||||
static void gsm_dlci_close(struct gsm_dlci *dlci)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
del_timer(&dlci->t1);
|
||||
if (debug & 8)
|
||||
pr_debug("DLCI %d goes closed.\n", dlci->addr);
|
||||
dlci->state = DLCI_CLOSED;
|
||||
if (dlci->addr != 0) {
|
||||
tty_port_tty_hangup(&dlci->port, false);
|
||||
spin_lock_irqsave(&dlci->lock, flags);
|
||||
kfifo_reset(&dlci->fifo);
|
||||
spin_unlock_irqrestore(&dlci->lock, flags);
|
||||
/* Ensure that gsmtty_open() can return. */
|
||||
tty_port_set_initialized(&dlci->port, 0);
|
||||
wake_up_interruptible(&dlci->port.open_wait);
|
||||
@@ -1593,6 +1591,7 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, const u8 *data, int clen)
|
||||
tty = tty_port_tty_get(port);
|
||||
if (tty) {
|
||||
gsm_process_modem(tty, dlci, modem, slen);
|
||||
tty_wakeup(tty);
|
||||
tty_kref_put(tty);
|
||||
}
|
||||
fallthrough;
|
||||
@@ -1818,7 +1817,6 @@ static void gsm_queue(struct gsm_mux *gsm)
|
||||
gsm_response(gsm, address, UA);
|
||||
gsm_dlci_close(dlci);
|
||||
break;
|
||||
case UA:
|
||||
case UA|PF:
|
||||
if (cr == 0 || dlci == NULL)
|
||||
break;
|
||||
@@ -1962,6 +1960,16 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
|
||||
static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
{
|
||||
/* handle XON/XOFF */
|
||||
if ((c & ISO_IEC_646_MASK) == XON) {
|
||||
gsm->constipated = true;
|
||||
return;
|
||||
} else if ((c & ISO_IEC_646_MASK) == XOFF) {
|
||||
gsm->constipated = false;
|
||||
/* Kick the link in case it is idling */
|
||||
gsm_data_kick(gsm, NULL);
|
||||
return;
|
||||
}
|
||||
if (c == GSM1_SOF) {
|
||||
/* EOF is only valid in frame if we have got to the data state
|
||||
and received at least one byte (the FCS) */
|
||||
@@ -1976,7 +1984,8 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
|
||||
}
|
||||
/* Any partial frame was a runt so go back to start */
|
||||
if (gsm->state != GSM_START) {
|
||||
gsm->malformed++;
|
||||
if (gsm->state != GSM_SEARCH)
|
||||
gsm->malformed++;
|
||||
gsm->state = GSM_START;
|
||||
}
|
||||
/* A SOF in GSM_START means we are still reading idling or
|
||||
@@ -2048,74 +2057,43 @@ static void gsm_error(struct gsm_mux *gsm,
|
||||
gsm->io_error++;
|
||||
}
|
||||
|
||||
static int gsm_disconnect(struct gsm_mux *gsm)
|
||||
{
|
||||
struct gsm_dlci *dlci = gsm->dlci[0];
|
||||
struct gsm_control *gc;
|
||||
|
||||
if (!dlci)
|
||||
return 0;
|
||||
|
||||
/* In theory disconnecting DLCI 0 is sufficient but for some
|
||||
modems this is apparently not the case. */
|
||||
gc = gsm_control_send(gsm, CMD_CLD, NULL, 0);
|
||||
if (gc)
|
||||
gsm_control_wait(gsm, gc);
|
||||
|
||||
del_timer_sync(&gsm->t2_timer);
|
||||
/* Now we are sure T2 has stopped */
|
||||
|
||||
gsm_dlci_begin_close(dlci);
|
||||
wait_event_interruptible(gsm->event,
|
||||
dlci->state == DLCI_CLOSED);
|
||||
|
||||
if (signal_pending(current))
|
||||
return -EINTR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsm_cleanup_mux - generic GSM protocol cleanup
|
||||
* @gsm: our mux
|
||||
* @disc: disconnect link?
|
||||
*
|
||||
* Clean up the bits of the mux which are the same for all framing
|
||||
* protocols. Remove the mux from the mux table, stop all the timers
|
||||
* and then shut down each device hanging up the channels as we go.
|
||||
*/
|
||||
|
||||
static void gsm_cleanup_mux(struct gsm_mux *gsm)
|
||||
static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc)
|
||||
{
|
||||
int i;
|
||||
struct gsm_dlci *dlci = gsm->dlci[0];
|
||||
struct gsm_msg *txq, *ntxq;
|
||||
|
||||
gsm->dead = true;
|
||||
|
||||
spin_lock(&gsm_mux_lock);
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (gsm_mux[i] == gsm) {
|
||||
gsm_mux[i] = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gsm_mux_lock);
|
||||
/* open failed before registering => nothing to do */
|
||||
if (i == MAX_MUX)
|
||||
return;
|
||||
|
||||
del_timer_sync(&gsm->t2_timer);
|
||||
/* Now we are sure T2 has stopped */
|
||||
if (dlci)
|
||||
dlci->dead = true;
|
||||
|
||||
/* Free up any link layer users */
|
||||
mutex_lock(&gsm->mutex);
|
||||
for (i = 0; i < NUM_DLCI; i++)
|
||||
|
||||
if (dlci) {
|
||||
if (disc && dlci->state != DLCI_CLOSED) {
|
||||
gsm_dlci_begin_close(dlci);
|
||||
wait_event(gsm->event, dlci->state == DLCI_CLOSED);
|
||||
}
|
||||
dlci->dead = true;
|
||||
}
|
||||
|
||||
/* Finish outstanding timers, making sure they are done */
|
||||
del_timer_sync(&gsm->t2_timer);
|
||||
|
||||
/* Free up any link layer users and finally the control channel */
|
||||
for (i = NUM_DLCI - 1; i >= 0; i--)
|
||||
if (gsm->dlci[i])
|
||||
gsm_dlci_release(gsm->dlci[i]);
|
||||
mutex_unlock(&gsm->mutex);
|
||||
/* Now wipe the queues */
|
||||
tty_ldisc_flush(gsm->tty);
|
||||
list_for_each_entry_safe(txq, ntxq, &gsm->tx_list, list)
|
||||
kfree(txq);
|
||||
INIT_LIST_HEAD(&gsm->tx_list);
|
||||
@@ -2133,7 +2111,6 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
|
||||
static int gsm_activate_mux(struct gsm_mux *gsm)
|
||||
{
|
||||
struct gsm_dlci *dlci;
|
||||
int i = 0;
|
||||
|
||||
timer_setup(&gsm->t2_timer, gsm_control_retransmit, 0);
|
||||
init_waitqueue_head(&gsm->event);
|
||||
@@ -2145,18 +2122,6 @@ static int gsm_activate_mux(struct gsm_mux *gsm)
|
||||
else
|
||||
gsm->receive = gsm1_receive;
|
||||
|
||||
spin_lock(&gsm_mux_lock);
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (gsm_mux[i] == NULL) {
|
||||
gsm->num = i;
|
||||
gsm_mux[i] = gsm;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gsm_mux_lock);
|
||||
if (i == MAX_MUX)
|
||||
return -EBUSY;
|
||||
|
||||
dlci = gsm_dlci_alloc(gsm, 0);
|
||||
if (dlci == NULL)
|
||||
return -ENOMEM;
|
||||
@@ -2172,6 +2137,15 @@ static int gsm_activate_mux(struct gsm_mux *gsm)
|
||||
*/
|
||||
static void gsm_free_mux(struct gsm_mux *gsm)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (gsm == gsm_mux[i]) {
|
||||
gsm_mux[i] = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
mutex_destroy(&gsm->mutex);
|
||||
kfree(gsm->txframe);
|
||||
kfree(gsm->buf);
|
||||
kfree(gsm);
|
||||
@@ -2191,12 +2165,20 @@ static void gsm_free_muxr(struct kref *ref)
|
||||
|
||||
static inline void mux_get(struct gsm_mux *gsm)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&gsm_mux_lock, flags);
|
||||
kref_get(&gsm->ref);
|
||||
spin_unlock_irqrestore(&gsm_mux_lock, flags);
|
||||
}
|
||||
|
||||
static inline void mux_put(struct gsm_mux *gsm)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&gsm_mux_lock, flags);
|
||||
kref_put(&gsm->ref, gsm_free_muxr);
|
||||
spin_unlock_irqrestore(&gsm_mux_lock, flags);
|
||||
}
|
||||
|
||||
static inline unsigned int mux_num_to_base(struct gsm_mux *gsm)
|
||||
@@ -2217,6 +2199,7 @@ static inline unsigned int mux_line_to_num(unsigned int line)
|
||||
|
||||
static struct gsm_mux *gsm_alloc_mux(void)
|
||||
{
|
||||
int i;
|
||||
struct gsm_mux *gsm = kzalloc(sizeof(struct gsm_mux), GFP_KERNEL);
|
||||
if (gsm == NULL)
|
||||
return NULL;
|
||||
@@ -2225,7 +2208,7 @@ static struct gsm_mux *gsm_alloc_mux(void)
|
||||
kfree(gsm);
|
||||
return NULL;
|
||||
}
|
||||
gsm->txframe = kmalloc(2 * MAX_MRU + 2, GFP_KERNEL);
|
||||
gsm->txframe = kmalloc(2 * (MAX_MTU + PROT_OVERHEAD - 1), GFP_KERNEL);
|
||||
if (gsm->txframe == NULL) {
|
||||
kfree(gsm->buf);
|
||||
kfree(gsm);
|
||||
@@ -2246,6 +2229,26 @@ static struct gsm_mux *gsm_alloc_mux(void)
|
||||
gsm->mtu = 64;
|
||||
gsm->dead = true; /* Avoid early tty opens */
|
||||
|
||||
/* Store the instance to the mux array or abort if no space is
|
||||
* available.
|
||||
*/
|
||||
spin_lock(&gsm_mux_lock);
|
||||
for (i = 0; i < MAX_MUX; i++) {
|
||||
if (!gsm_mux[i]) {
|
||||
gsm_mux[i] = gsm;
|
||||
gsm->num = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock(&gsm_mux_lock);
|
||||
if (i == MAX_MUX) {
|
||||
mutex_destroy(&gsm->mutex);
|
||||
kfree(gsm->txframe);
|
||||
kfree(gsm->buf);
|
||||
kfree(gsm);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return gsm;
|
||||
}
|
||||
|
||||
@@ -2281,7 +2284,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
|
||||
/* Check the MRU/MTU range looks sane */
|
||||
if (c->mru > MAX_MRU || c->mtu > MAX_MTU || c->mru < 8 || c->mtu < 8)
|
||||
return -EINVAL;
|
||||
if (c->n2 < 3)
|
||||
if (c->n2 > 255)
|
||||
return -EINVAL;
|
||||
if (c->encapsulation > 1) /* Basic, advanced, no I */
|
||||
return -EINVAL;
|
||||
@@ -2312,19 +2315,11 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c)
|
||||
|
||||
/*
|
||||
* Close down what is needed, restart and initiate the new
|
||||
* configuration
|
||||
* configuration. On the first time there is no DLCI[0]
|
||||
* and closing or cleaning up is not necessary.
|
||||
*/
|
||||
|
||||
if (need_close || need_restart) {
|
||||
int ret;
|
||||
|
||||
ret = gsm_disconnect(gsm);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
if (need_restart)
|
||||
gsm_cleanup_mux(gsm);
|
||||
if (need_close || need_restart)
|
||||
gsm_cleanup_mux(gsm, true);
|
||||
|
||||
gsm->initiator = c->initiator;
|
||||
gsm->mru = c->mru;
|
||||
@@ -2393,6 +2388,9 @@ static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
|
||||
int ret, i;
|
||||
|
||||
gsm->tty = tty_kref_get(tty);
|
||||
/* Turn off tty XON/XOFF handling to handle it explicitly. */
|
||||
gsm->old_c_iflag = tty->termios.c_iflag;
|
||||
tty->termios.c_iflag &= (IXON | IXOFF);
|
||||
ret = gsm_activate_mux(gsm);
|
||||
if (ret != 0)
|
||||
tty_kref_put(gsm->tty);
|
||||
@@ -2433,7 +2431,8 @@ static void gsmld_detach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
|
||||
WARN_ON(tty != gsm->tty);
|
||||
for (i = 1; i < NUM_DLCI; i++)
|
||||
tty_unregister_device(gsm_tty_driver, base + i);
|
||||
gsm_cleanup_mux(gsm);
|
||||
/* Restore tty XON/XOFF handling. */
|
||||
gsm->tty->termios.c_iflag = gsm->old_c_iflag;
|
||||
tty_kref_put(gsm->tty);
|
||||
gsm->tty = NULL;
|
||||
}
|
||||
@@ -2498,6 +2497,12 @@ static void gsmld_close(struct tty_struct *tty)
|
||||
{
|
||||
struct gsm_mux *gsm = tty->disc_data;
|
||||
|
||||
/* The ldisc locks and closes the port before calling our close. This
|
||||
* means we have no way to do a proper disconnect. We will not bother
|
||||
* to do one.
|
||||
*/
|
||||
gsm_cleanup_mux(gsm, false);
|
||||
|
||||
gsmld_detach_gsm(tty, gsm);
|
||||
|
||||
gsmld_flush_buffer(tty);
|
||||
@@ -2536,7 +2541,7 @@ static int gsmld_open(struct tty_struct *tty)
|
||||
|
||||
ret = gsmld_attach_gsm(tty, gsm);
|
||||
if (ret != 0) {
|
||||
gsm_cleanup_mux(gsm);
|
||||
gsm_cleanup_mux(gsm, false);
|
||||
mux_put(gsm);
|
||||
}
|
||||
return ret;
|
||||
@@ -2895,19 +2900,19 @@ static struct tty_ldisc_ops tty_ldisc_packet = {
|
||||
|
||||
static int gsmtty_modem_update(struct gsm_dlci *dlci, u8 brk)
|
||||
{
|
||||
u8 modembits[5];
|
||||
u8 modembits[3];
|
||||
struct gsm_control *ctrl;
|
||||
int len = 2;
|
||||
|
||||
if (brk)
|
||||
modembits[0] = (dlci->addr << 2) | 2 | EA; /* DLCI, Valid, EA */
|
||||
if (!brk) {
|
||||
modembits[1] = (gsm_encode_modem(dlci) << 1) | EA;
|
||||
} else {
|
||||
modembits[1] = gsm_encode_modem(dlci) << 1;
|
||||
modembits[2] = (brk << 4) | 2 | EA; /* Length, Break, EA */
|
||||
len++;
|
||||
|
||||
modembits[0] = len << 1 | EA; /* Data bytes */
|
||||
modembits[1] = dlci->addr << 2 | 3; /* DLCI, EA, 1 */
|
||||
modembits[2] = gsm_encode_modem(dlci) << 1 | EA;
|
||||
if (brk)
|
||||
modembits[3] = brk << 4 | 2 | EA; /* Valid, EA */
|
||||
ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len + 1);
|
||||
}
|
||||
ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len);
|
||||
if (ctrl == NULL)
|
||||
return -ENOMEM;
|
||||
return gsm_control_wait(dlci->gsm, ctrl);
|
||||
@@ -3092,13 +3097,17 @@ static unsigned int gsmtty_chars_in_buffer(struct tty_struct *tty)
|
||||
static void gsmtty_flush_buffer(struct tty_struct *tty)
|
||||
{
|
||||
struct gsm_dlci *dlci = tty->driver_data;
|
||||
unsigned long flags;
|
||||
|
||||
if (dlci->state == DLCI_CLOSED)
|
||||
return;
|
||||
/* Caution needed: If we implement reliable transport classes
|
||||
then the data being transmitted can't simply be junked once
|
||||
it has first hit the stack. Until then we can just blow it
|
||||
away */
|
||||
spin_lock_irqsave(&dlci->lock, flags);
|
||||
kfifo_reset(&dlci->fifo);
|
||||
spin_unlock_irqrestore(&dlci->lock, flags);
|
||||
/* Need to unhook this DLCI from the transmit queue logic */
|
||||
}
|
||||
|
||||
|
||||
@@ -2940,7 +2940,7 @@ enum pci_board_num_t {
|
||||
pbn_panacom2,
|
||||
pbn_panacom4,
|
||||
pbn_plx_romulus,
|
||||
pbn_endrun_2_4000000,
|
||||
pbn_endrun_2_3906250,
|
||||
pbn_oxsemi,
|
||||
pbn_oxsemi_1_3906250,
|
||||
pbn_oxsemi_2_3906250,
|
||||
@@ -3472,10 +3472,10 @@ static struct pciserial_board pci_boards[] = {
|
||||
* signal now many ports are available
|
||||
* 2 port 952 Uart support
|
||||
*/
|
||||
[pbn_endrun_2_4000000] = {
|
||||
[pbn_endrun_2_3906250] = {
|
||||
.flags = FL_BASE0,
|
||||
.num_ports = 2,
|
||||
.base_baud = 4000000,
|
||||
.base_baud = 3906250,
|
||||
.uart_offset = 0x200,
|
||||
.first_offset = 0x1000,
|
||||
},
|
||||
@@ -4418,7 +4418,7 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
*/
|
||||
{ PCI_VENDOR_ID_ENDRUN, PCI_DEVICE_ID_ENDRUN_1588,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
pbn_endrun_2_4000000 },
|
||||
pbn_endrun_2_3906250 },
|
||||
/*
|
||||
* Quatech cards. These actually have configurable clocks but for
|
||||
* now we just use the default.
|
||||
|
||||
@@ -3340,7 +3340,7 @@ static void serial8250_console_restore(struct uart_8250_port *up)
|
||||
|
||||
serial8250_set_divisor(port, baud, quot, frac);
|
||||
serial_port_out(port, UART_LCR, up->lcr);
|
||||
serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS);
|
||||
serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1288,13 +1288,18 @@ static inline bool pl011_dma_rx_running(struct uart_amba_port *uap)
|
||||
|
||||
static void pl011_rs485_tx_stop(struct uart_amba_port *uap)
|
||||
{
|
||||
/*
|
||||
* To be on the safe side only time out after twice as many iterations
|
||||
* as fifo size.
|
||||
*/
|
||||
const int MAX_TX_DRAIN_ITERS = uap->port.fifosize * 2;
|
||||
struct uart_port *port = &uap->port;
|
||||
int i = 0;
|
||||
u32 cr;
|
||||
|
||||
/* Wait until hardware tx queue is empty */
|
||||
while (!pl011_tx_empty(port)) {
|
||||
if (i == port->fifosize) {
|
||||
if (i > MAX_TX_DRAIN_ITERS) {
|
||||
dev_warn(port->dev,
|
||||
"timeout while draining hardware tx queue\n");
|
||||
break;
|
||||
@@ -2099,7 +2104,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
* with the given baud rate. We use this as the poll interval when we
|
||||
* wait for the tx queue to empty.
|
||||
*/
|
||||
uap->rs485_tx_drain_interval = (bits * 1000 * 1000) / baud;
|
||||
uap->rs485_tx_drain_interval = DIV_ROUND_UP(bits * 1000 * 1000, baud);
|
||||
|
||||
pl011_setup_status_masks(port, termios);
|
||||
|
||||
|
||||
@@ -1438,7 +1438,7 @@ static int imx_uart_startup(struct uart_port *port)
|
||||
imx_uart_writel(sport, ucr1, UCR1);
|
||||
|
||||
ucr4 = imx_uart_readl(sport, UCR4) & ~(UCR4_OREN | UCR4_INVR);
|
||||
if (!sport->dma_is_enabled)
|
||||
if (!dma_is_inited)
|
||||
ucr4 |= UCR4_OREN;
|
||||
if (sport->inverted_rx)
|
||||
ucr4 |= UCR4_INVR;
|
||||
|
||||
@@ -2684,6 +2684,7 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
|
||||
struct usb_request *request;
|
||||
struct cdns3_request *priv_req;
|
||||
struct cdns3_trb *trb = NULL;
|
||||
struct cdns3_trb trb_tmp;
|
||||
int ret;
|
||||
int val;
|
||||
|
||||
@@ -2693,8 +2694,10 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
|
||||
if (request) {
|
||||
priv_req = to_cdns3_request(request);
|
||||
trb = priv_req->trb;
|
||||
if (trb)
|
||||
if (trb) {
|
||||
trb_tmp = *trb;
|
||||
trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE);
|
||||
}
|
||||
}
|
||||
|
||||
writel(EP_CMD_CSTALL | EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
|
||||
@@ -2709,7 +2712,7 @@ int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep)
|
||||
|
||||
if (request) {
|
||||
if (trb)
|
||||
trb->control = trb->control ^ cpu_to_le32(TRB_CYCLE);
|
||||
*trb = trb_tmp;
|
||||
|
||||
cdns3_rearm_transfer(priv_ep, 1);
|
||||
}
|
||||
|
||||
@@ -1197,12 +1197,16 @@ static int do_proc_control(struct usb_dev_state *ps,
|
||||
|
||||
usb_unlock_device(dev);
|
||||
i = usbfs_start_wait_urb(urb, tmo, &actlen);
|
||||
|
||||
/* Linger a bit, prior to the next control message. */
|
||||
if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG)
|
||||
msleep(200);
|
||||
usb_lock_device(dev);
|
||||
snoop_urb(dev, NULL, pipe, actlen, i, COMPLETE, tbuf, actlen);
|
||||
if (!i && actlen) {
|
||||
if (copy_to_user(ctrl->data, tbuf, actlen)) {
|
||||
ret = -EFAULT;
|
||||
goto recv_fault;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1219,6 +1223,10 @@ static int do_proc_control(struct usb_dev_state *ps,
|
||||
|
||||
usb_unlock_device(dev);
|
||||
i = usbfs_start_wait_urb(urb, tmo, &actlen);
|
||||
|
||||
/* Linger a bit, prior to the next control message. */
|
||||
if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG)
|
||||
msleep(200);
|
||||
usb_lock_device(dev);
|
||||
snoop_urb(dev, NULL, pipe, actlen, i, COMPLETE, NULL, 0);
|
||||
}
|
||||
@@ -1230,10 +1238,6 @@ static int do_proc_control(struct usb_dev_state *ps,
|
||||
}
|
||||
ret = (i < 0 ? i : actlen);
|
||||
|
||||
recv_fault:
|
||||
/* Linger a bit, prior to the next control message. */
|
||||
if (dev->quirks & USB_QUIRK_DELAY_CTRL_MSG)
|
||||
msleep(200);
|
||||
done:
|
||||
kfree(dr);
|
||||
usb_free_urb(urb);
|
||||
|
||||
@@ -404,6 +404,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
{ USB_DEVICE(0x0b05, 0x17e0), .driver_info =
|
||||
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
|
||||
|
||||
/* Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)*/
|
||||
{ USB_DEVICE(0x0bda, 0x0151), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
|
||||
|
||||
/* Realtek hub in Dell WD19 (Type-C) */
|
||||
{ USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
@@ -507,6 +510,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* DJI CineSSD */
|
||||
{ USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* VCOM device */
|
||||
{ USB_DEVICE(0x4296, 0x7570), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
|
||||
|
||||
/* INTEL VALUE SSD */
|
||||
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
|
||||
@@ -273,7 +273,8 @@ int dwc3_core_soft_reset(struct dwc3 *dwc)
|
||||
|
||||
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
||||
reg |= DWC3_DCTL_CSFTRST;
|
||||
dwc3_writel(dwc->regs, DWC3_DCTL, reg);
|
||||
reg &= ~DWC3_DCTL_RUN_STOP;
|
||||
dwc3_gadget_dctl_write_safe(dwc, reg);
|
||||
|
||||
/*
|
||||
* For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit
|
||||
@@ -1266,10 +1267,10 @@ static void dwc3_get_properties(struct dwc3 *dwc)
|
||||
u8 lpm_nyet_threshold;
|
||||
u8 tx_de_emphasis;
|
||||
u8 hird_threshold;
|
||||
u8 rx_thr_num_pkt_prd;
|
||||
u8 rx_max_burst_prd;
|
||||
u8 tx_thr_num_pkt_prd;
|
||||
u8 tx_max_burst_prd;
|
||||
u8 rx_thr_num_pkt_prd = 0;
|
||||
u8 rx_max_burst_prd = 0;
|
||||
u8 tx_thr_num_pkt_prd = 0;
|
||||
u8 tx_max_burst_prd = 0;
|
||||
u8 tx_fifo_resize_max_num;
|
||||
const char *usb_psy_name;
|
||||
int ret;
|
||||
|
||||
@@ -571,16 +571,15 @@ int dwc3_drd_init(struct dwc3 *dwc)
|
||||
{
|
||||
int ret, irq;
|
||||
|
||||
if (ROLE_SWITCH &&
|
||||
device_property_read_bool(dwc->dev, "usb-role-switch"))
|
||||
return dwc3_setup_role_switch(dwc);
|
||||
|
||||
dwc->edev = dwc3_get_extcon(dwc);
|
||||
if (IS_ERR(dwc->edev))
|
||||
return PTR_ERR(dwc->edev);
|
||||
|
||||
if (ROLE_SWITCH &&
|
||||
device_property_read_bool(dwc->dev, "usb-role-switch")) {
|
||||
ret = dwc3_setup_role_switch(dwc);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
} else if (dwc->edev) {
|
||||
if (dwc->edev) {
|
||||
dwc->edev_nb.notifier_call = dwc3_drd_notifier;
|
||||
ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST,
|
||||
&dwc->edev_nb);
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#define PCI_DEVICE_ID_INTEL_ADLM 0x54ee
|
||||
#define PCI_DEVICE_ID_INTEL_ADLS 0x7ae1
|
||||
#define PCI_DEVICE_ID_INTEL_RPLS 0x7a61
|
||||
#define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1
|
||||
#define PCI_DEVICE_ID_INTEL_MTL 0x7e7e
|
||||
#define PCI_DEVICE_ID_INTEL_TGL 0x9a15
|
||||
#define PCI_DEVICE_ID_AMD_MR 0x163a
|
||||
|
||||
@@ -421,6 +423,12 @@ static const struct pci_device_id dwc3_pci_id_table[] = {
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS),
|
||||
(kernel_ulong_t) &dwc3_pci_intel_swnode, },
|
||||
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTLP),
|
||||
(kernel_ulong_t) &dwc3_pci_intel_swnode, },
|
||||
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MTL),
|
||||
(kernel_ulong_t) &dwc3_pci_intel_swnode, },
|
||||
|
||||
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_TGL),
|
||||
(kernel_ulong_t) &dwc3_pci_intel_swnode, },
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user