Merge 4.14.168 into android-4.14
Changes in 4.14.168
xfs: Sanity check flags of Q_XQUOTARM call
mfd: intel-lpss: Add default I2C device properties for Gemini Lake
powerpc/archrandom: fix arch_get_random_seed_int()
tipc: fix wrong timeout input for tipc_wait_for_cond()
mt7601u: fix bbp version check in mt7601u_wait_bbp_ready
crypto: sun4i-ss - fix big endian issues
drm/sti: do not remove the drm_bridge that was never added
drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
ALSA: hda: fix unused variable warning
apparmor: don't try to replace stale label in ptrace access check
PCI: iproc: Remove PAXC slot check to allow VF support
drm/hisilicon: hibmc: Don't overwrite fb helper surface depth
IB/rxe: replace kvfree with vfree
IB/hfi1: Add mtu check for operational data VLs
ALSA: usb-audio: update quirk for B&W PX to remove microphone
staging: comedi: ni_mio_common: protect register write overflow
pwm: lpss: Release runtime-pm reference from the driver's remove callback
drm/sun4i: hdmi: Fix double flag assignation
mlxsw: reg: QEEC: Add minimum shaper fields
NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
pcrypt: use format specifier in kobject_add
exportfs: fix 'passing zero to ERR_PTR()' warning
drm/dp_mst: Skip validating ports during destruction, just ref
net: phy: Fix not to call phy_resume() if PHY is not attached
IB/rxe: Fix incorrect cache cleanup in error flow
staging: bcm2835-camera: Abort probe if there is no camera
switchtec: Remove immediate status check after submitting MRPC command
pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
pinctrl: sh-pfc: sh7734: Add missing IPSR11 field
pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations
pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
vxlan: changelink: Fix handling of default remotes
Input: nomadik-ske-keypad - fix a loop timeout test
clk: highbank: fix refcount leak in hb_clk_init()
clk: qoriq: fix refcount leak in clockgen_init()
clk: socfpga: fix refcount leak
clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
clk: imx6q: fix refcount leak in imx6q_clocks_init()
clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
clk: imx7d: fix refcount leak in imx7d_clocks_init()
clk: vf610: fix refcount leak in vf610_clocks_init()
clk: armada-370: fix refcount leak in a370_clk_init()
clk: kirkwood: fix refcount leak in kirkwood_clk_init()
clk: armada-xp: fix refcount leak in axp_clk_init()
clk: mv98dx3236: fix refcount leak in mv98dx3236_clk_init()
clk: dove: fix refcount leak in dove_clk_init()
MIPS: BCM63XX: drop unused and broken DSP platform device
IB/usnic: Fix out of bounds index check in query pkey
RDMA/ocrdma: Fix out of bounds index check in query pkey
RDMA/qedr: Fix out of bounds index check in query pkey
drm/shmob: Fix return value check in shmob_drm_probe
arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD
spi: cadence: Correct initialisation of runtime PM
RDMA/iw_cxgb4: Fix the unchecked ep dereference
drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump()
media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL
kbuild: mark prepare0 as PHONY to fix external module build
crypto: brcm - Fix some set-but-not-used warning
crypto: tgr192 - fix unaligned memory access
ASoC: imx-sgtl5000: put of nodes if finding codec fails
IB/iser: Pass the correct number of entries for dma mapped SGL
rtc: cmos: ignore bogus century byte
spi/topcliff_pch: Fix potential NULL dereference on allocation error
clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it
iwlwifi: mvm: avoid possible access out of array.
net/mlx5: Take lock with IRQs disabled to avoid deadlock
iwlwifi: mvm: fix A-MPDU reference assignment
tty: ipwireless: Fix potential NULL pointer dereference
driver: uio: fix possible memory leak in __uio_register_device
driver: uio: fix possible use-after-free in __uio_register_device
crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
driver core: Do not resume suppliers under device_links_write_lock()
ARM: dts: lpc32xx: add required clocks property to keypad device node
ARM: dts: lpc32xx: reparent keypad controller to SIC1
ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller variant
ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller clocks property
ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage
iwlwifi: mvm: fix RSS config command
staging: most: cdev: add missing check for cdev_add failure
rtc: ds1672: fix unintended sign extension
thermal: mediatek: fix register index error
net: phy: fixed_phy: Fix fixed_phy not checking GPIO
rtc: ds1307: rx8130: Fix alarm handling
rtc: 88pm860x: fix unintended sign extension
rtc: 88pm80x: fix unintended sign extension
rtc: pm8xxx: fix unintended sign extension
fbdev: chipsfb: remove set but not used variable 'size'
iw_cxgb4: use tos when importing the endpoint
iw_cxgb4: use tos when finding ipv6 routes
drm/etnaviv: potential NULL dereference
pinctrl: sh-pfc: emev2: Add missing pinmux functions
pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group
pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
PCI: endpoint: functions: Use memcpy_fromio()/memcpy_toio()
usb: phy: twl6030-usb: fix possible use-after-free on remove
block: don't use bio->bi_vcnt to figure out segment number
keys: Timestamp new keys
vfio_pci: Enable memory accesses before calling pci_map_rom
hwmon: (pmbus/tps53679) Fix driver info initialization in probe routine
KVM: PPC: Release all hardware TCE tables attached to a group
staging: r8822be: check kzalloc return or bail
dmaengine: mv_xor: Use correct device for DMA API
cdc-wdm: pass return value of recover_from_urb_loss
regulator: pv88060: Fix array out-of-bounds access
regulator: pv88080: Fix array out-of-bounds access
regulator: pv88090: Fix array out-of-bounds access
net: dsa: qca8k: Enable delay for RGMII_ID mode
drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON
drm/nouveau/pmu: don't print reply values if exec is false
ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of()
fs/nfs: Fix nfs_parse_devname to not modify it's argument
staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx
powerpc/64s: Fix logic when handling unknown CPU features
NFS: Fix a soft lockup in the delegation recovery code
clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable
clocksource/drivers/exynos_mct: Fix error path in timer resources initialization
platform/x86: wmi: fix potential null pointer dereference
NFS/pnfs: Bulk destroy of layouts needs to be safe w.r.t. umount
mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe
ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
ARM: 8848/1: virt: Align GIC version check with arm64 counterpart
regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA
netfilter: nft_set_hash: fix lookups with fixed size hash on big endian
NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE()
net: aquantia: fixed instack structure overflow
powerpc/mm: Check secondary hash page table
nios2: ksyms: Add missing symbol exports
x86/mm: Remove unused variable 'cpu'
scsi: megaraid_sas: reduce module load time
drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen()
xen, cpu_hotplug: Prevent an out of bounds access
net: sh_eth: fix a missing check of of_get_phy_mode
regulator: lp87565: Fix missing register for LP87565_BUCK_0
media: ivtv: update *pos correctly in ivtv_read_pos()
media: cx18: update *pos correctly in cx18_read_pos()
media: wl128x: Fix an error code in fm_download_firmware()
media: cx23885: check allocation return
regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB
jfs: fix bogus variable self-initialization
tipc: tipc clang warning
m68k: mac: Fix VIA timer counter accesses
arm64: dts: allwinner: a64: Add missing PIO clocks
ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
media: davinci-isif: avoid uninitialized variable use
media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
spi: tegra114: clear packed bit for unpacked mode
spi: tegra114: fix for unpacked mode transfers
spi: tegra114: terminate dma and reset on transfer timeout
spi: tegra114: flush fifos
spi: tegra114: configure dma burst size to fifo trig level
soc/fsl/qe: Fix an error code in qe_pin_request()
spi: bcm2835aux: fix driver to not allow 65535 (=-1) cs-gpios
ehea: Fix a copy-paste err in ehea_init_port_res
scsi: qla2xxx: Unregister chrdev if module initialization fails
scsi: target/core: Fix a race condition in the LUN lookup code
ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
net: hns3: fix for vport->bw_limit overflow problem
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses
platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer
tipc: set sysctl_tipc_rmem and named_timeout right range
selftests/ipc: Fix msgque compiler warnings
powerpc: vdso: Make vdso32 installation conditional in vdso_install
ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect
media: ov2659: fix unbalanced mutex_lock/unlock
6lowpan: Off by one handling ->nexthdr
dmaengine: axi-dmac: Don't check the number of frames for alignment
ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()
NFS: Don't interrupt file writeout due to fatal errors
irqchip/gic-v3-its: fix some definitions of inner cacheability attributes
scsi: qla2xxx: Fix a format specifier
scsi: qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory
packet: in recvmsg msg_name return at least sizeof sockaddr_ll
ASoC: fix valid stream condition
usb: gadget: fsl: fix link error against usb-gadget module
dwc2: gadget: Fix completed transfer size calculation in DDMA
IB/mlx5: Add missing XRC options to QP optional params mask
iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU
net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry
net: ena: fix: Free napi resources when ena_up() fails
net: ena: fix incorrect test of supported hash function
net: ena: fix ena_com_fill_hash_function() implementation
dmaengine: tegra210-adma: restore channel status
mmc: core: fix possible use after free of host
lightnvm: pblk: fix lock order in pblk_rb_tear_down_check
afs: Fix the afs.cell and afs.volume xattr handlers
vfio/mdev: Avoid release parent reference during error path
vfio/mdev: Fix aborting mdev child device removal if one fails
l2tp: Fix possible NULL pointer dereference
media: omap_vout: potential buffer overflow in vidioc_dqbuf()
media: davinci/vpbe: array underflow in vpbe_enum_outputs()
platform/x86: alienware-wmi: printing the wrong error code
crypto: caam - fix caam_dump_sg that iterates through scatterlist
netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule
pwm: meson: Consider 128 a valid pre-divider
pwm: meson: Don't disable PWM when setting duty repeatedly
ARM: riscpc: fix lack of keyboard interrupts after irq conversion
kdb: do a sanity check on the cpu in kdb_per_cpu()
backlight: lm3630a: Return 0 on success in update_status functions
thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power
EDAC/mc: Fix edac_mc_find() in case no device is found
ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT
dmaengine: tegra210-adma: Fix crash during probe
arm64: dts: meson: libretech-cc: set eMMC as removable
RDMA/qedr: Fix incorrect device rate.
spi: spi-fsl-spi: call spi_finalize_current_message() at the end
crypto: ccp - fix AES CFB error exposed by new test vectors
crypto: ccp - Fix 3DES complaint from ccp-crypto module
serial: stm32: fix rx error handling
serial: stm32: fix transmit_chars when tx is stopped
serial: stm32: Add support of TC bit status check
serial: stm32: fix wakeup source initialization
misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa
iommu: Use right function to get group for device
signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig
inet: frags: call inet_frags_fini() after unregister_pernet_subsys()
netvsc: unshare skb in VF rx handler
cpufreq: brcmstb-avs-cpufreq: Fix initial command check
cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency
media: vivid: fix incorrect assignment operation when setting video mode
mpls: fix warning with multi-label encap
iommu/vt-d: Duplicate iommu_resv_region objects per device list
qed: iWARP - Use READ_ONCE and smp_store_release to access ep->state
powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild
powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration
drm/msm/mdp5: Fix mdp5_cfg_init error return
net: netem: fix backlog accounting for corrupted GSO frames
net/af_iucv: always register net_device notifier
ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs
rtc: pcf8563: Fix interrupt trigger method
rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
drm/msm/a3xx: remove TPL1 regs from snapshot
perf/ioctl: Add check for the sample_period value
dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width"
clk: qcom: Fix -Wunused-const-variable
nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing
bnxt_en: Fix ethtool selftest crash under error conditions.
iommu/amd: Make iommu_disable safer
mfd: intel-lpss: Release IDA resources
rxrpc: Fix uninitialized error code in rxrpc_send_data_packet()
devres: allow const resource arguments
RDMA/hns: Fixs hw access invalid dma memory error
net: pasemi: fix an use-after-free in pasemi_mac_phy_init()
scsi: libfc: fix null pointer dereference on a null lport
clk: sunxi-ng: v3s: add the missing PLL_DDR1
PM: sleep: Fix possible overflow in pm_system_cancel_wakeup()
libertas_tf: Use correct channel range in lbtf_geo_init
qed: reduce maximum stack frame size
usb: host: xhci-hub: fix extra endianness conversion
mic: avoid statically declaring a 'struct device'.
x86/kgbd: Use NMI_VECTOR not APIC_DM_NMI
crypto: ccp - Reduce maximum stack usage
ALSA: aoa: onyx: always initialize register read value
tipc: reduce risk of wakeup queue starvation
ARM: dts: stm32: add missing vdda-supply to adc on stm32h743i-eval
net/mlx5: Fix mlx5_ifc_query_lag_out_bits
cifs: fix rmmod regression in cifs.ko caused by force_sig changes
crypto: caam - free resources in case caam_rng registration failed
ext4: set error return correctly when ext4_htree_store_dirent fails
ASoC: es8328: Fix copy-paste error in es8328_right_line_controls
ASoC: cs4349: Use PM ops 'cs4349_runtime_pm'
ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls
net/rds: Add a few missing rds_stat_names entries
bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails
signal: Allow cifs and drbd to receive their terminating signals
ASoC: sun4i-i2s: RX and TX counter registers are swapped
dmaengine: dw: platform: Switch to acpi_dma_controller_register()
mac80211: minstrel_ht: fix per-group max throughput rate initialization
media: atmel: atmel-isi: fix timeout value for stop streaming
rtc: pcf2127: bugfix: read rtc disables watchdog
mips: avoid explicit UB in assignment of mips_io_port_base
iommu/mediatek: Fix iova_to_phys PA start for 4GB mode
ahci: Do not export local variable ahci_em_messages
Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()"
hwmon: (lm75) Fix write operations for negative temperatures
power: supply: Init device wakeup after device_add()
x86, perf: Fix the dependency of the x86 insn decoder selftest
staging: greybus: light: fix a couple double frees
irqdomain: Add the missing assignment of domain->fwnode for named fwnode
bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA
iio: dac: ad5380: fix incorrect assignment to val
ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init
tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs
net: sonic: return NETDEV_TX_OK if failed to map buffer
scsi: fnic: fix msix interrupt allocation
Btrfs: fix hang when loading existing inode cache off disk
Btrfs: fix inode cache waiters hanging on failure to start caching thread
Btrfs: fix inode cache waiters hanging on path allocation failure
btrfs: use correct count in btrfs_file_write_iter()
ixgbe: sync the first fragment unconditionally
hwmon: (shtc1) fix shtc1 and shtw1 id mask
net: sonic: replace dev_kfree_skb in sonic_send_packet
pinctrl: iproc-gpio: Fix incorrect pinconf configurations
ath10k: adjust skb length in ath10k_sdio_mbox_rx_packet
RDMA/cma: Fix false error message
net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names'
iommu/amd: Wait for completion of IOTLB flush in attach_device
net: aquantia: Fix aq_vec_isr_legacy() return value
net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()
net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe()
net: stmmac: dwmac-meson8b: Fix signedness bug in probe
net: axienet: fix a signedness bug in probe
of: mdio: Fix a signedness bug in of_phy_get_and_connect()
net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()
nvme: retain split access workaround for capability reads
net: stmmac: gmac4+: Not all Unicast addresses may be available
mac80211: accept deauth frames in IBSS mode
llc: fix another potential sk_buff leak in llc_ui_sendmsg()
llc: fix sk_buff refcounting in llc_conn_state_process()
net: stmmac: fix length of PTP clock's name string
act_mirred: Fix mirred_init_module error handling
net: avoid possible false sharing in sk_leave_memory_pressure()
net: add {READ|WRITE}_ONCE() annotations on ->rskq_accept_head
tcp: annotate lockless access to tcp_memory_pressure
drm/msm/dsi: Implement reset correctly
dmaengine: imx-sdma: fix size check for sdma script_number
net: netem: fix error path for corrupted GSO frames
net: netem: correct the parent's backlog when corrupted packet was dropped
net: qca_spi: Move reset_count to struct qcaspi
afs: Fix large file support
MIPS: Loongson: Fix return value of loongson_hwmon_init
hv_netvsc: flag software created hash value
net: neigh: use long type to store jiffies delta
packet: fix data-race in fanout_flow_is_huge()
mmc: sdio: fix wl1251 vendor id
mmc: core: fix wl1251 sdio quirks
affs: fix a memory leak in affs_remount
dmaengine: ti: edma: fix missed failure handling
drm/radeon: fix bad DMA from INTERRUPT_CNTL2
arm64: dts: juno: Fix UART frequency
IB/iser: Fix dma_nents type definition
serial: stm32: fix clearing interrupt error flags
m68k: Call timer_interrupt() with interrupts disabled
Linux 4.14.168
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3eeaa348e8e99998356d27c99d06dcb38e48e7d5
This commit is contained in:
6
Makefile
6
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 167
|
||||
SUBLEVEL = 168
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
@@ -1080,6 +1080,7 @@ ifdef CONFIG_STACK_VALIDATION
|
||||
endif
|
||||
endif
|
||||
|
||||
PHONY += prepare0
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||
@@ -1174,8 +1175,7 @@ include/config/kernel.release: include/config/auto.conf FORCE
|
||||
# archprepare is used in arch Makefiles and when processed asm symlink,
|
||||
# version.h and scripts_basic is processed / created.
|
||||
|
||||
# Listed in dependency order
|
||||
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
|
||||
PHONY += prepare archprepare prepare1 prepare2 prepare3
|
||||
|
||||
# prepare3 is used to check if we are building in a separate output directory,
|
||||
# and if so do:
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
sd_reg: regulator@2 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "sd_reg";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
gpio = <&gpio 5 5 0>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
@@ -139,11 +139,11 @@
|
||||
};
|
||||
|
||||
clcd: clcd@31040000 {
|
||||
compatible = "arm,pl110", "arm,primecell";
|
||||
compatible = "arm,pl111", "arm,primecell";
|
||||
reg = <0x31040000 0x1000>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk LPC32XX_CLK_LCD>;
|
||||
clock-names = "apb_pclk";
|
||||
clocks = <&clk LPC32XX_CLK_LCD>, <&clk LPC32XX_CLK_LCD>;
|
||||
clock-names = "clcdclk", "apb_pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -462,7 +462,9 @@
|
||||
key: key@40050000 {
|
||||
compatible = "nxp,lpc3220-key";
|
||||
reg = <0x40050000 0x1000>;
|
||||
interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk LPC32XX_CLK_KEY>;
|
||||
interrupt-parent = <&sic1>;
|
||||
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
};
|
||||
|
||||
&enet0 {
|
||||
tbi-handle = <&tbi1>;
|
||||
tbi-handle = <&tbi0>;
|
||||
phy-handle = <&sgmii_phy2>;
|
||||
phy-connection-type = "sgmii";
|
||||
status = "okay";
|
||||
@@ -222,6 +222,13 @@
|
||||
sgmii_phy2: ethernet-phy@2 {
|
||||
reg = <0x2>;
|
||||
};
|
||||
tbi0: tbi-phy@1f {
|
||||
reg = <0x1f>;
|
||||
device_type = "tbi-phy";
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
tbi1: tbi-phy@1f {
|
||||
reg = <0x1f>;
|
||||
device_type = "tbi-phy";
|
||||
|
||||
@@ -562,13 +562,22 @@
|
||||
};
|
||||
|
||||
mdio0: mdio@2d24000 {
|
||||
compatible = "gianfar";
|
||||
compatible = "fsl,etsec2-mdio";
|
||||
device_type = "mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x0 0x2d24000 0x0 0x4000>;
|
||||
};
|
||||
|
||||
mdio1: mdio@2d64000 {
|
||||
compatible = "fsl,etsec2-mdio";
|
||||
device_type = "mdio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x0 0x2d64000 0x0 0x4000>,
|
||||
<0x0 0x2d50030 0x0 0x4>;
|
||||
};
|
||||
|
||||
ptp_clock@2d10e00 {
|
||||
compatible = "fsl,etsec-ptp";
|
||||
reg = <0x0 0x2d10e00 0x0 0xb0>;
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
};
|
||||
|
||||
&adc_12 {
|
||||
vdda-supply = <&vdda>;
|
||||
vref-supply = <&vdda>;
|
||||
status = "okay";
|
||||
adc1: adc@0 {
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
|
||||
clocks = <&rtc 1>;
|
||||
clock-names = "ext_clock";
|
||||
};
|
||||
|
||||
sound_spdif {
|
||||
@@ -128,6 +130,8 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins_a>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
vqmmc-supply = <®_vcc3v3>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
@@ -379,7 +379,7 @@ static int __init nocache_trampoline(unsigned long _arg)
|
||||
unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
|
||||
phys_reset_t phys_reset;
|
||||
|
||||
mcpm_set_entry_vector(cpu, cluster, cpu_resume);
|
||||
mcpm_set_entry_vector(cpu, cluster, cpu_resume_no_hyp);
|
||||
setup_mm_for_reboot();
|
||||
|
||||
__mcpm_cpu_going_down(cpu, cluster);
|
||||
|
||||
@@ -10,6 +10,7 @@ struct sleep_save_sp {
|
||||
};
|
||||
|
||||
extern void cpu_resume(void);
|
||||
extern void cpu_resume_no_hyp(void);
|
||||
extern void cpu_resume_arm(void);
|
||||
extern int cpu_suspend(unsigned long, int (*)(unsigned long));
|
||||
|
||||
|
||||
@@ -180,8 +180,8 @@ ARM_BE8(orr r7, r7, #(1 << 25)) @ HSCTLR.EE
|
||||
@ Check whether GICv3 system registers are available
|
||||
mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1
|
||||
ubfx r7, r7, #28, #4
|
||||
cmp r7, #1
|
||||
bne 2f
|
||||
teq r7, #0
|
||||
beq 2f
|
||||
|
||||
@ Enable system register accesses
|
||||
mrc p15, 4, r7, c12, c9, 5 @ ICC_HSRE
|
||||
|
||||
@@ -120,6 +120,14 @@ ENDPROC(cpu_resume_after_mmu)
|
||||
.text
|
||||
.align
|
||||
|
||||
#ifdef CONFIG_MCPM
|
||||
.arm
|
||||
THUMB( .thumb )
|
||||
ENTRY(cpu_resume_no_hyp)
|
||||
ARM_BE8(setend be) @ ensure we are in BE mode
|
||||
b no_hyp
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
.arm
|
||||
ENTRY(cpu_resume_arm)
|
||||
@@ -135,6 +143,7 @@ ARM_BE8(setend be) @ ensure we are in BE mode
|
||||
bl __hyp_stub_install_secondary
|
||||
#endif
|
||||
safe_svcmode_maskall r1
|
||||
no_hyp:
|
||||
mov r1, #0
|
||||
ALT_SMP(mrc p15, 0, r0, c0, c0, 5)
|
||||
ALT_UP_B(1f)
|
||||
@@ -163,6 +172,9 @@ ENDPROC(cpu_resume)
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
ENDPROC(cpu_resume_arm)
|
||||
#endif
|
||||
#ifdef CONFIG_MCPM
|
||||
ENDPROC(cpu_resume_no_hyp)
|
||||
#endif
|
||||
|
||||
.align 2
|
||||
|
||||
@@ -2530,7 +2530,7 @@ static void _setup_iclk_autoidle(struct omap_hwmod *oh)
|
||||
*/
|
||||
static int _setup_reset(struct omap_hwmod *oh)
|
||||
{
|
||||
int r;
|
||||
int r = 0;
|
||||
|
||||
if (oh->_state != _HWMOD_STATE_INITIALIZED)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -118,7 +118,7 @@ extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
|
||||
|
||||
void __init rpc_init_irq(void)
|
||||
{
|
||||
unsigned int irq, clr, set = 0;
|
||||
unsigned int irq, clr, set;
|
||||
|
||||
iomd_writeb(0, IOMD_IRQMASKA);
|
||||
iomd_writeb(0, IOMD_IRQMASKB);
|
||||
@@ -130,6 +130,7 @@ void __init rpc_init_irq(void)
|
||||
|
||||
for (irq = 0; irq < NR_IRQS; irq++) {
|
||||
clr = IRQ_NOREQUEST;
|
||||
set = 0;
|
||||
|
||||
if (irq <= 6 || (irq >= 9 && irq <= 15))
|
||||
clr |= IRQ_NOPROBE;
|
||||
|
||||
@@ -230,18 +230,12 @@ static int pxa_ssp_probe(struct platform_device *pdev)
|
||||
|
||||
static int pxa_ssp_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
struct ssp_device *ssp;
|
||||
|
||||
ssp = platform_get_drvdata(pdev);
|
||||
if (ssp == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
|
||||
clk_put(ssp->clk);
|
||||
|
||||
mutex_lock(&ssp_lock);
|
||||
list_del(&ssp->node);
|
||||
mutex_unlock(&ssp_lock);
|
||||
|
||||
@@ -274,7 +274,8 @@
|
||||
interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu 58>;
|
||||
clocks = <&ccu 58>, <&osc24M>, <&rtc 0>;
|
||||
clock-names = "apb", "hosc", "losc";
|
||||
gpio-controller;
|
||||
#gpio-cells = <3>;
|
||||
interrupt-controller;
|
||||
|
||||
@@ -226,7 +226,6 @@
|
||||
cap-mmc-highspeed;
|
||||
mmc-ddr-3_3v;
|
||||
max-frequency = <50000000>;
|
||||
non-removable;
|
||||
disable-wp;
|
||||
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
*/
|
||||
/ {
|
||||
/* SoC fixed clocks */
|
||||
soc_uartclk: refclk7273800hz {
|
||||
soc_uartclk: refclk7372800hz {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <7273800>;
|
||||
clock-frequency = <7372800>;
|
||||
clock-output-names = "juno:uartclk";
|
||||
};
|
||||
|
||||
|
||||
@@ -458,6 +458,8 @@
|
||||
l11 {
|
||||
regulator-min-microvolt = <1750000>;
|
||||
regulator-max-microvolt = <3337000>;
|
||||
regulator-allow-set-load;
|
||||
regulator-system-load = <200000>;
|
||||
};
|
||||
|
||||
l12 {
|
||||
|
||||
@@ -88,10 +88,19 @@ static irqreturn_t cia_handler(int irq, void *dev_id)
|
||||
struct ciabase *base = dev_id;
|
||||
int mach_irq;
|
||||
unsigned char ints;
|
||||
unsigned long flags;
|
||||
|
||||
/* Interrupts get disabled while the timer irq flag is cleared and
|
||||
* the timer interrupt serviced.
|
||||
*/
|
||||
mach_irq = base->cia_irq;
|
||||
local_irq_save(flags);
|
||||
ints = cia_set_irq(base, CIA_ICR_ALL);
|
||||
amiga_custom.intreq = base->int_mask;
|
||||
if (ints & 1)
|
||||
generic_handle_irq(mach_irq);
|
||||
local_irq_restore(flags);
|
||||
mach_irq++, ints >>= 1;
|
||||
for (; ints; mach_irq++, ints >>= 1) {
|
||||
if (ints & 1)
|
||||
generic_handle_irq(mach_irq);
|
||||
|
||||
@@ -142,7 +142,7 @@ struct mfptimerbase {
|
||||
.name = "MFP Timer D"
|
||||
};
|
||||
|
||||
static irqreturn_t mfptimer_handler(int irq, void *dev_id)
|
||||
static irqreturn_t mfp_timer_d_handler(int irq, void *dev_id)
|
||||
{
|
||||
struct mfptimerbase *base = dev_id;
|
||||
int mach_irq;
|
||||
@@ -344,7 +344,7 @@ void __init atari_init_IRQ(void)
|
||||
st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 0xf0) | 0x6;
|
||||
|
||||
/* request timer D dispatch handler */
|
||||
if (request_irq(IRQ_MFP_TIMD, mfptimer_handler, IRQF_SHARED,
|
||||
if (request_irq(IRQ_MFP_TIMD, mfp_timer_d_handler, IRQF_SHARED,
|
||||
stmfp_base.name, &stmfp_base))
|
||||
pr_err("Couldn't register %s interrupt\n", stmfp_base.name);
|
||||
|
||||
|
||||
@@ -24,6 +24,18 @@
|
||||
DEFINE_SPINLOCK(rtc_lock);
|
||||
EXPORT_SYMBOL_GPL(rtc_lock);
|
||||
|
||||
static irqreturn_t mfp_timer_c_handler(int irq, void *dev_id)
|
||||
{
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void __init
|
||||
atari_sched_init(irq_handler_t timer_routine)
|
||||
{
|
||||
@@ -32,7 +44,8 @@ atari_sched_init(irq_handler_t timer_routine)
|
||||
/* start timer C, div = 1:100 */
|
||||
st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60;
|
||||
/* install interrupt service routine for MFP Timer C */
|
||||
if (request_irq(IRQ_MFP_TIMC, timer_routine, 0, "timer", timer_routine))
|
||||
if (request_irq(IRQ_MFP_TIMC, mfp_timer_c_handler, 0, "timer",
|
||||
timer_routine))
|
||||
pr_err("Couldn't register timer interrupt\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,6 @@ extern int bvme6000_set_clock_mmss (unsigned long);
|
||||
extern void bvme6000_reset (void);
|
||||
void bvme6000_set_vectors (void);
|
||||
|
||||
/* Save tick handler routine pointer, will point to xtime_update() in
|
||||
* kernel/timer/timekeeping.c, called via bvme6000_process_int() */
|
||||
|
||||
static irq_handler_t tick_handler;
|
||||
|
||||
|
||||
int __init bvme6000_parse_bootinfo(const struct bi_record *bi)
|
||||
{
|
||||
@@ -159,12 +154,18 @@ irqreturn_t bvme6000_abort_int (int irq, void *dev_id)
|
||||
|
||||
static irqreturn_t bvme6000_timer_int (int irq, void *dev_id)
|
||||
{
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
|
||||
unsigned char msr = rtc->msr & 0xc0;
|
||||
unsigned char msr;
|
||||
|
||||
local_irq_save(flags);
|
||||
msr = rtc->msr & 0xc0;
|
||||
rtc->msr = msr | 0x20; /* Ack the interrupt */
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
return tick_handler(irq, dev_id);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -183,9 +184,8 @@ void bvme6000_sched_init (irq_handler_t timer_routine)
|
||||
|
||||
rtc->msr = 0; /* Ensure timer registers accessible */
|
||||
|
||||
tick_handler = timer_routine;
|
||||
if (request_irq(BVME_IRQ_RTC, bvme6000_timer_int, 0,
|
||||
"timer", bvme6000_timer_int))
|
||||
if (request_irq(BVME_IRQ_RTC, bvme6000_timer_int, 0, "timer",
|
||||
timer_routine))
|
||||
panic ("Couldn't register timer int");
|
||||
|
||||
rtc->t1cr_omr = 0x04; /* Mode 2, ext clk */
|
||||
|
||||
@@ -38,13 +38,19 @@
|
||||
|
||||
static irqreturn_t hp300_tick(int irq, void *dev_id)
|
||||
{
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
unsigned long tmp;
|
||||
irq_handler_t vector = dev_id;
|
||||
|
||||
local_irq_save(flags);
|
||||
in_8(CLOCKBASE + CLKSR);
|
||||
asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE));
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
/* Turn off the network and SCSI leds */
|
||||
blinken_leds(0, 0xe0);
|
||||
return vector(irq, NULL);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
u32 hp300_gettimeoffset(void)
|
||||
|
||||
@@ -54,16 +54,6 @@ static __u8 rbv_clear;
|
||||
|
||||
static int gIER,gIFR,gBufA,gBufB;
|
||||
|
||||
/*
|
||||
* Timer defs.
|
||||
*/
|
||||
|
||||
#define TICK_SIZE 10000
|
||||
#define MAC_CLOCK_TICK (783300/HZ) /* ticks per HZ */
|
||||
#define MAC_CLOCK_LOW (MAC_CLOCK_TICK&0xFF)
|
||||
#define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8)
|
||||
|
||||
|
||||
/*
|
||||
* On Macs with a genuine VIA chip there is no way to mask an individual slot
|
||||
* interrupt. This limitation also seems to apply to VIA clone logic cores in
|
||||
@@ -278,22 +268,6 @@ void __init via_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the 100 Hz clock
|
||||
*/
|
||||
|
||||
void __init via_init_clock(irq_handler_t func)
|
||||
{
|
||||
via1[vACR] |= 0x40;
|
||||
via1[vT1LL] = MAC_CLOCK_LOW;
|
||||
via1[vT1LH] = MAC_CLOCK_HIGH;
|
||||
via1[vT1CL] = MAC_CLOCK_LOW;
|
||||
via1[vT1CH] = MAC_CLOCK_HIGH;
|
||||
|
||||
if (request_irq(IRQ_MAC_TIMER_1, func, 0, "timer", func))
|
||||
pr_err("Couldn't register %s interrupt\n", "timer");
|
||||
}
|
||||
|
||||
/*
|
||||
* Debugging dump, used in various places to see what's going on.
|
||||
*/
|
||||
@@ -321,29 +295,6 @@ void via_debug_dump(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This is always executed with interrupts disabled.
|
||||
*
|
||||
* TBI: get time offset between scheduling timer ticks
|
||||
*/
|
||||
|
||||
u32 mac_gettimeoffset(void)
|
||||
{
|
||||
unsigned long ticks, offset = 0;
|
||||
|
||||
/* read VIA1 timer 2 current value */
|
||||
ticks = via1[vT1CL] | (via1[vT1CH] << 8);
|
||||
/* The probability of underflow is less than 2% */
|
||||
if (ticks > MAC_CLOCK_TICK - MAC_CLOCK_TICK / 50)
|
||||
/* Check for pending timer interrupt in VIA1 IFR */
|
||||
if (via1[vIFR] & 0x40) offset = TICK_SIZE;
|
||||
|
||||
ticks = MAC_CLOCK_TICK - ticks;
|
||||
ticks = ticks * 10000L / MAC_CLOCK_TICK;
|
||||
|
||||
return (ticks + offset) * 1000;
|
||||
}
|
||||
|
||||
/*
|
||||
* Flush the L2 cache on Macs that have it by flipping
|
||||
* the system into 24-bit mode for an instant.
|
||||
@@ -447,6 +398,8 @@ void via_nubus_irq_shutdown(int irq)
|
||||
* via6522.c :-), disable/pending masks added.
|
||||
*/
|
||||
|
||||
#define VIA_TIMER_1_INT BIT(6)
|
||||
|
||||
void via1_irq(struct irq_desc *desc)
|
||||
{
|
||||
int irq_num;
|
||||
@@ -456,6 +409,21 @@ void via1_irq(struct irq_desc *desc)
|
||||
if (!events)
|
||||
return;
|
||||
|
||||
irq_num = IRQ_MAC_TIMER_1;
|
||||
irq_bit = VIA_TIMER_1_INT;
|
||||
if (events & irq_bit) {
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
via1[vIFR] = irq_bit;
|
||||
generic_handle_irq(irq_num);
|
||||
local_irq_restore(flags);
|
||||
|
||||
events &= ~irq_bit;
|
||||
if (!events)
|
||||
return;
|
||||
}
|
||||
|
||||
irq_num = VIA1_SOURCE_BASE;
|
||||
irq_bit = 1;
|
||||
do {
|
||||
@@ -612,3 +580,56 @@ int via2_scsi_drq_pending(void)
|
||||
return via2[gIFR] & (1 << IRQ_IDX(IRQ_MAC_SCSIDRQ));
|
||||
}
|
||||
EXPORT_SYMBOL(via2_scsi_drq_pending);
|
||||
|
||||
/* timer and clock source */
|
||||
|
||||
#define VIA_CLOCK_FREQ 783360 /* VIA "phase 2" clock in Hz */
|
||||
#define VIA_TIMER_INTERVAL (1000000 / HZ) /* microseconds per jiffy */
|
||||
#define VIA_TIMER_CYCLES (VIA_CLOCK_FREQ / HZ) /* clock cycles per jiffy */
|
||||
|
||||
#define VIA_TC (VIA_TIMER_CYCLES - 2) /* including 0 and -1 */
|
||||
#define VIA_TC_LOW (VIA_TC & 0xFF)
|
||||
#define VIA_TC_HIGH (VIA_TC >> 8)
|
||||
|
||||
void __init via_init_clock(irq_handler_t timer_routine)
|
||||
{
|
||||
if (request_irq(IRQ_MAC_TIMER_1, timer_routine, 0, "timer", NULL)) {
|
||||
pr_err("Couldn't register %s interrupt\n", "timer");
|
||||
return;
|
||||
}
|
||||
|
||||
via1[vT1LL] = VIA_TC_LOW;
|
||||
via1[vT1LH] = VIA_TC_HIGH;
|
||||
via1[vT1CL] = VIA_TC_LOW;
|
||||
via1[vT1CH] = VIA_TC_HIGH;
|
||||
via1[vACR] |= 0x40;
|
||||
}
|
||||
|
||||
u32 mac_gettimeoffset(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
u8 count_high;
|
||||
u16 count, offset = 0;
|
||||
|
||||
/*
|
||||
* Timer counter wrap-around is detected with the timer interrupt flag
|
||||
* but reading the counter low byte (vT1CL) would reset the flag.
|
||||
* Also, accessing both counter registers is essentially a data race.
|
||||
* These problems are avoided by ignoring the low byte. Clock accuracy
|
||||
* is 256 times worse (error can reach 0.327 ms) but CPU overhead is
|
||||
* reduced by avoiding slow VIA register accesses.
|
||||
*/
|
||||
|
||||
local_irq_save(flags);
|
||||
count_high = via1[vT1CH];
|
||||
if (count_high == 0xFF)
|
||||
count_high = 0;
|
||||
if (count_high > 0 && (via1[vIFR] & VIA_TIMER_1_INT))
|
||||
offset = VIA_TIMER_CYCLES;
|
||||
local_irq_restore(flags);
|
||||
|
||||
count = count_high << 8;
|
||||
count = VIA_TIMER_CYCLES - count + offset;
|
||||
|
||||
return ((count * VIA_TIMER_INTERVAL) / VIA_TIMER_CYCLES) * 1000;
|
||||
}
|
||||
|
||||
@@ -46,11 +46,6 @@ extern void mvme147_reset (void);
|
||||
|
||||
static int bcd2int (unsigned char b);
|
||||
|
||||
/* Save tick handler routine pointer, will point to xtime_update() in
|
||||
* kernel/time/timekeeping.c, called via mvme147_process_int() */
|
||||
|
||||
irq_handler_t tick_handler;
|
||||
|
||||
|
||||
int __init mvme147_parse_bootinfo(const struct bi_record *bi)
|
||||
{
|
||||
@@ -106,16 +101,23 @@ void __init config_mvme147(void)
|
||||
|
||||
static irqreturn_t mvme147_timer_int (int irq, void *dev_id)
|
||||
{
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
m147_pcc->t1_int_cntrl = PCC_TIMER_INT_CLR;
|
||||
m147_pcc->t1_int_cntrl = PCC_INT_ENAB|PCC_LEVEL_TIMER1;
|
||||
return tick_handler(irq, dev_id);
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
void mvme147_sched_init (irq_handler_t timer_routine)
|
||||
{
|
||||
tick_handler = timer_routine;
|
||||
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1", NULL))
|
||||
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1",
|
||||
timer_routine))
|
||||
pr_err("Couldn't register timer interrupt\n");
|
||||
|
||||
/* Init the clock with a value */
|
||||
|
||||
@@ -51,11 +51,6 @@ extern void mvme16x_reset (void);
|
||||
|
||||
int bcd2int (unsigned char b);
|
||||
|
||||
/* Save tick handler routine pointer, will point to xtime_update() in
|
||||
* kernel/time/timekeeping.c, called via mvme16x_process_int() */
|
||||
|
||||
static irq_handler_t tick_handler;
|
||||
|
||||
|
||||
unsigned short mvme16x_config;
|
||||
EXPORT_SYMBOL(mvme16x_config);
|
||||
@@ -354,8 +349,15 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
|
||||
|
||||
static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
|
||||
{
|
||||
*(volatile unsigned char *)0xfff4201b |= 8;
|
||||
return tick_handler(irq, dev_id);
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
*(volatile unsigned char *)0xfff4201b |= 8;
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void mvme16x_sched_init (irq_handler_t timer_routine)
|
||||
@@ -363,14 +365,13 @@ void mvme16x_sched_init (irq_handler_t timer_routine)
|
||||
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
|
||||
int irq;
|
||||
|
||||
tick_handler = timer_routine;
|
||||
/* Using PCCchip2 or MC2 chip tick timer 1 */
|
||||
*(volatile unsigned long *)0xfff42008 = 0;
|
||||
*(volatile unsigned long *)0xfff42004 = 10000; /* 10ms */
|
||||
*(volatile unsigned char *)0xfff42017 |= 3;
|
||||
*(volatile unsigned char *)0xfff4201b = 0x16;
|
||||
if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, 0,
|
||||
"timer", mvme16x_timer_int))
|
||||
if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, 0, "timer",
|
||||
timer_routine))
|
||||
panic ("Couldn't register timer int");
|
||||
|
||||
if (brdno == 0x0162 || brdno == 0x172)
|
||||
|
||||
@@ -127,10 +127,10 @@ void q40_mksound(unsigned int hz, unsigned int ticks)
|
||||
sound_ticks = ticks << 1;
|
||||
}
|
||||
|
||||
static irq_handler_t q40_timer_routine;
|
||||
|
||||
static irqreturn_t q40_timer_int (int irq, void * dev)
|
||||
static irqreturn_t q40_timer_int(int irq, void *dev_id)
|
||||
{
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
|
||||
ql_ticks = ql_ticks ? 0 : 1;
|
||||
if (sound_ticks) {
|
||||
unsigned char sval=(sound_ticks & 1) ? 128-SVOL : 128+SVOL;
|
||||
@@ -139,8 +139,13 @@ static irqreturn_t q40_timer_int (int irq, void * dev)
|
||||
*DAC_RIGHT=sval;
|
||||
}
|
||||
|
||||
if (!ql_ticks)
|
||||
q40_timer_routine(irq, dev);
|
||||
if (!ql_ticks) {
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -148,11 +153,9 @@ void q40_sched_init (irq_handler_t timer_routine)
|
||||
{
|
||||
int timer_irq;
|
||||
|
||||
q40_timer_routine = timer_routine;
|
||||
timer_irq = Q40_IRQ_FRAME;
|
||||
|
||||
if (request_irq(timer_irq, q40_timer_int, 0,
|
||||
"timer", q40_timer_int))
|
||||
if (request_irq(timer_irq, q40_timer_int, 0, "timer", timer_routine))
|
||||
panic("Couldn't register timer int");
|
||||
|
||||
master_outb(-1, FRAME_CLEAR_REG);
|
||||
|
||||
@@ -61,8 +61,10 @@ static irqreturn_t sun3_int7(int irq, void *dev_id)
|
||||
|
||||
static irqreturn_t sun3_int5(int irq, void *dev_id)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int cnt;
|
||||
|
||||
local_irq_save(flags);
|
||||
#ifdef CONFIG_SUN3
|
||||
intersil_clear();
|
||||
#endif
|
||||
@@ -76,6 +78,7 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)
|
||||
cnt = kstat_irqs_cpu(irq, 0);
|
||||
if (!(cnt % 20))
|
||||
sun3_leds(led_pattern[cnt % 160 / 20]);
|
||||
local_irq_restore(flags);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,15 +78,19 @@ u32 sun3x_gettimeoffset(void)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void sun3x_timer_tick(int irq, void *dev_id, struct pt_regs *regs)
|
||||
static irqreturn_t sun3x_timer_tick(int irq, void *dev_id)
|
||||
{
|
||||
void (*vector)(int, void *, struct pt_regs *) = dev_id;
|
||||
irq_handler_t timer_routine = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
/* Clear the pending interrupt - pulse the enable line low */
|
||||
disable_irq(5);
|
||||
enable_irq(5);
|
||||
local_irq_save(flags);
|
||||
/* Clear the pending interrupt - pulse the enable line low */
|
||||
disable_irq(5);
|
||||
enable_irq(5);
|
||||
timer_routine(0, NULL);
|
||||
local_irq_restore(flags);
|
||||
|
||||
vector(irq, NULL, regs);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
|
||||
setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
|
||||
dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
|
||||
dev-wdt.o dev-usb-usbd.o
|
||||
setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
|
||||
dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \
|
||||
dev-usb-usbd.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-y += boards/
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <bcm63xx_nvram.h>
|
||||
#include <bcm63xx_dev_pci.h>
|
||||
#include <bcm63xx_dev_enet.h>
|
||||
#include <bcm63xx_dev_dsp.h>
|
||||
#include <bcm63xx_dev_flash.h>
|
||||
#include <bcm63xx_dev_hsspi.h>
|
||||
#include <bcm63xx_dev_pcmcia.h>
|
||||
@@ -289,14 +288,6 @@ static struct board_info __initdata board_96348gw_10 = {
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
|
||||
.has_dsp = 1,
|
||||
.dsp = {
|
||||
.gpio_rst = 6,
|
||||
.gpio_int = 34,
|
||||
.cs = 2,
|
||||
.ext_irq = 2,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
@@ -401,14 +392,6 @@ static struct board_info __initdata board_96348gw = {
|
||||
|
||||
.has_ohci0 = 1,
|
||||
|
||||
.has_dsp = 1,
|
||||
.dsp = {
|
||||
.gpio_rst = 6,
|
||||
.gpio_int = 34,
|
||||
.ext_irq = 2,
|
||||
.cs = 2,
|
||||
},
|
||||
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
@@ -898,9 +881,6 @@ int __init board_register_devices(void)
|
||||
if (board.has_usbd)
|
||||
bcm63xx_usbd_register(&board.usbd);
|
||||
|
||||
if (board.has_dsp)
|
||||
bcm63xx_dsp_register(&board.dsp);
|
||||
|
||||
/* Generate MAC address for WLAN and register our SPROM,
|
||||
* do this after registering enet devices
|
||||
*/
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Broadcom BCM63xx VoIP DSP registration
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <bcm63xx_cpu.h>
|
||||
#include <bcm63xx_dev_dsp.h>
|
||||
#include <bcm63xx_regs.h>
|
||||
#include <bcm63xx_io.h>
|
||||
|
||||
static struct resource voip_dsp_resources[] = {
|
||||
{
|
||||
.start = -1, /* filled at runtime */
|
||||
.end = -1, /* filled at runtime */
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = -1, /* filled at runtime */
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device bcm63xx_voip_dsp_device = {
|
||||
.name = "bcm63xx-voip-dsp",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(voip_dsp_resources),
|
||||
.resource = voip_dsp_resources,
|
||||
};
|
||||
|
||||
int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd)
|
||||
{
|
||||
struct bcm63xx_dsp_platform_data *dpd;
|
||||
u32 val;
|
||||
|
||||
/* Get the memory window */
|
||||
val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1));
|
||||
val &= MPI_CSBASE_BASE_MASK;
|
||||
voip_dsp_resources[0].start = val;
|
||||
voip_dsp_resources[0].end = val + 0xFFFFFFF;
|
||||
voip_dsp_resources[1].start = pd->ext_irq;
|
||||
|
||||
/* copy given platform data */
|
||||
dpd = bcm63xx_voip_dsp_device.dev.platform_data;
|
||||
memcpy(dpd, pd, sizeof (*pd));
|
||||
|
||||
return platform_device_register(&bcm63xx_voip_dsp_device);
|
||||
}
|
||||
@@ -60,21 +60,11 @@
|
||||
* instruction, so the lower 16 bits must be zero. Should be true on
|
||||
* on any sane architecture; generic code does not use this assumption.
|
||||
*/
|
||||
extern const unsigned long mips_io_port_base;
|
||||
extern unsigned long mips_io_port_base;
|
||||
|
||||
/*
|
||||
* Gcc will generate code to load the value of mips_io_port_base after each
|
||||
* function call which may be fairly wasteful in some cases. So we don't
|
||||
* play quite by the book. We tell gcc mips_io_port_base is a long variable
|
||||
* which solves the code generation issue. Now we need to violate the
|
||||
* aliasing rules a little to make initialization possible and finally we
|
||||
* will need the barrier() to fight side effects of the aliasing chat.
|
||||
* This trickery will eventually collapse under gcc's optimizer. Oh well.
|
||||
*/
|
||||
static inline void set_io_port_base(unsigned long base)
|
||||
{
|
||||
* (unsigned long *) &mips_io_port_base = base;
|
||||
barrier();
|
||||
mips_io_port_base = base;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __BCM63XX_DSP_H
|
||||
#define __BCM63XX_DSP_H
|
||||
|
||||
struct bcm63xx_dsp_platform_data {
|
||||
unsigned gpio_rst;
|
||||
unsigned gpio_int;
|
||||
unsigned cs;
|
||||
unsigned ext_irq;
|
||||
};
|
||||
|
||||
int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd);
|
||||
|
||||
#endif /* __BCM63XX_DSP_H */
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <linux/leds.h>
|
||||
#include <bcm63xx_dev_enet.h>
|
||||
#include <bcm63xx_dev_usb_usbd.h>
|
||||
#include <bcm63xx_dev_dsp.h>
|
||||
|
||||
/*
|
||||
* flash mapping
|
||||
@@ -31,7 +30,6 @@ struct board_info {
|
||||
unsigned int has_ohci0:1;
|
||||
unsigned int has_ehci0:1;
|
||||
unsigned int has_usbd:1;
|
||||
unsigned int has_dsp:1;
|
||||
unsigned int has_uart0:1;
|
||||
unsigned int has_uart1:1;
|
||||
|
||||
@@ -43,9 +41,6 @@ struct board_info {
|
||||
/* USB config */
|
||||
struct bcm63xx_usbd_platform_data usbd;
|
||||
|
||||
/* DSP config */
|
||||
struct bcm63xx_dsp_platform_data dsp;
|
||||
|
||||
/* GPIO LEDs */
|
||||
struct gpio_led leds[5];
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
|
||||
* mips_io_port_base is the begin of the address space to which x86 style
|
||||
* I/O ports are mapped.
|
||||
*/
|
||||
const unsigned long mips_io_port_base = -1;
|
||||
unsigned long mips_io_port_base = -1;
|
||||
EXPORT_SYMBOL(mips_io_port_base);
|
||||
|
||||
static struct resource code_resource = { .name = "Kernel code", };
|
||||
|
||||
@@ -9,12 +9,20 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
/* string functions */
|
||||
|
||||
EXPORT_SYMBOL(memcpy);
|
||||
EXPORT_SYMBOL(memset);
|
||||
EXPORT_SYMBOL(memmove);
|
||||
|
||||
/* memory management */
|
||||
|
||||
EXPORT_SYMBOL(empty_zero_page);
|
||||
EXPORT_SYMBOL(flush_icache_range);
|
||||
|
||||
/*
|
||||
* libgcc functions - functions that are used internally by the
|
||||
* compiler... (prototypes are not correct though, but that
|
||||
@@ -31,3 +39,7 @@ DECLARE_EXPORT(__udivsi3);
|
||||
DECLARE_EXPORT(__umoddi3);
|
||||
DECLARE_EXPORT(__umodsi3);
|
||||
DECLARE_EXPORT(__muldi3);
|
||||
DECLARE_EXPORT(__ucmpdi2);
|
||||
DECLARE_EXPORT(__lshrdi3);
|
||||
DECLARE_EXPORT(__ashldi3);
|
||||
DECLARE_EXPORT(__ashrdi3);
|
||||
|
||||
@@ -385,7 +385,9 @@ vdso_install:
|
||||
ifeq ($(CONFIG_PPC64),y)
|
||||
$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
|
||||
endif
|
||||
ifdef CONFIG_VDSO32
|
||||
$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@
|
||||
endif
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
@@ -28,7 +28,7 @@ static inline int arch_get_random_seed_int(unsigned int *v)
|
||||
unsigned long val;
|
||||
int rc;
|
||||
|
||||
rc = arch_get_random_long(&val);
|
||||
rc = arch_get_random_seed_long(&val);
|
||||
if (rc)
|
||||
*v = val;
|
||||
|
||||
|
||||
@@ -865,4 +865,25 @@ void cacheinfo_cpu_offline(unsigned int cpu_id)
|
||||
if (cache)
|
||||
cache_cpu_clear(cache, cpu_id);
|
||||
}
|
||||
|
||||
void cacheinfo_teardown(void)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
lockdep_assert_cpus_held();
|
||||
|
||||
for_each_online_cpu(cpu)
|
||||
cacheinfo_cpu_offline(cpu);
|
||||
}
|
||||
|
||||
void cacheinfo_rebuild(void)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
lockdep_assert_cpus_held();
|
||||
|
||||
for_each_online_cpu(cpu)
|
||||
cacheinfo_cpu_online(cpu);
|
||||
}
|
||||
|
||||
#endif /* (CONFIG_PPC_PSERIES && CONFIG_SUSPEND) || CONFIG_HOTPLUG_CPU */
|
||||
|
||||
@@ -6,4 +6,8 @@
|
||||
extern void cacheinfo_cpu_online(unsigned int cpu_id);
|
||||
extern void cacheinfo_cpu_offline(unsigned int cpu_id);
|
||||
|
||||
/* Allow migration/suspend to tear down and rebuild the hierarchy. */
|
||||
extern void cacheinfo_teardown(void);
|
||||
extern void cacheinfo_rebuild(void);
|
||||
|
||||
#endif /* _PPC_CACHEINFO_H */
|
||||
|
||||
@@ -705,8 +705,10 @@ static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f)
|
||||
m = &dt_cpu_feature_match_table[i];
|
||||
if (!strcmp(f->name, m->name)) {
|
||||
known = true;
|
||||
if (m->enable(f))
|
||||
if (m->enable(f)) {
|
||||
cur_cpu_spec->cpu_features |= m->cpu_ftr_bit_mask;
|
||||
break;
|
||||
}
|
||||
|
||||
pr_info("not enabling: %s (disabled or unsupported by kernel)\n",
|
||||
f->name);
|
||||
@@ -714,17 +716,12 @@ static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f)
|
||||
}
|
||||
}
|
||||
|
||||
if (!known && enable_unknown) {
|
||||
if (!feat_try_enable_unknown(f)) {
|
||||
pr_info("not enabling: %s (unknown and unsupported by kernel)\n",
|
||||
f->name);
|
||||
return false;
|
||||
}
|
||||
if (!known && (!enable_unknown || !feat_try_enable_unknown(f))) {
|
||||
pr_info("not enabling: %s (unknown and unsupported by kernel)\n",
|
||||
f->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m->cpu_ftr_bit_mask)
|
||||
cur_cpu_spec->cpu_features |= m->cpu_ftr_bit_mask;
|
||||
|
||||
if (known)
|
||||
pr_debug("enabling: %s\n", f->name);
|
||||
else
|
||||
|
||||
@@ -134,7 +134,6 @@ extern void kvm_spapr_tce_release_iommu_group(struct kvm *kvm,
|
||||
continue;
|
||||
|
||||
kref_put(&stit->kref, kvm_spapr_tce_liobn_put);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ static unsigned long hpte_find(struct pg_state *st, unsigned long ea, int psize)
|
||||
|
||||
/* Look in secondary table */
|
||||
if (slot == -1)
|
||||
slot = base_hpte_find(ea, psize, true, &v, &r);
|
||||
slot = base_hpte_find(ea, psize, false, &v, &r);
|
||||
|
||||
/* No entry found */
|
||||
if (slot == -1)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/rtas.h>
|
||||
#include "pseries.h"
|
||||
#include "../../kernel/cacheinfo.h"
|
||||
|
||||
static struct kobject *mobility_kobj;
|
||||
|
||||
@@ -359,11 +360,20 @@ void post_mobility_fixup(void)
|
||||
*/
|
||||
cpus_read_lock();
|
||||
|
||||
/*
|
||||
* It's common for the destination firmware to replace cache
|
||||
* nodes. Release all of the cacheinfo hierarchy's references
|
||||
* before updating the device tree.
|
||||
*/
|
||||
cacheinfo_teardown();
|
||||
|
||||
rc = pseries_devicetree_update(MIGRATION_SCOPE);
|
||||
if (rc)
|
||||
printk(KERN_ERR "Post-mobility device tree update "
|
||||
"failed: %d\n", rc);
|
||||
|
||||
cacheinfo_rebuild();
|
||||
|
||||
cpus_read_unlock();
|
||||
|
||||
/* Possibly switch to a new RFI flush type */
|
||||
|
||||
@@ -189,7 +189,7 @@ config HAVE_MMIOTRACE_SUPPORT
|
||||
|
||||
config X86_DECODER_SELFTEST
|
||||
bool "x86 instruction decoder selftest"
|
||||
depends on DEBUG_KERNEL && KPROBES
|
||||
depends on DEBUG_KERNEL && INSTRUCTION_DECODER
|
||||
depends on !COMPILE_TEST
|
||||
---help---
|
||||
Perform x86 instruction decoder selftests at build time.
|
||||
|
||||
@@ -438,7 +438,7 @@ static void kgdb_disable_hw_debug(struct pt_regs *regs)
|
||||
*/
|
||||
void kgdb_roundup_cpus(unsigned long flags)
|
||||
{
|
||||
apic->send_IPI_allbutself(APIC_DM_NMI);
|
||||
apic->send_IPI_allbutself(NMI_VECTOR);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -651,9 +651,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
|
||||
* that UV should be updated so that smp_call_function_many(),
|
||||
* etc, are optimal on UV.
|
||||
*/
|
||||
unsigned int cpu;
|
||||
|
||||
cpu = smp_processor_id();
|
||||
cpumask = uv_flush_tlb_others(cpumask, info);
|
||||
if (cpumask)
|
||||
smp_call_function_many(cpumask, flush_tlb_func_remote,
|
||||
|
||||
@@ -299,13 +299,7 @@ void blk_recalc_rq_segments(struct request *rq)
|
||||
|
||||
void blk_recount_segments(struct request_queue *q, struct bio *bio)
|
||||
{
|
||||
unsigned short seg_cnt;
|
||||
|
||||
/* estimate segment number by bi_vcnt for non-cloned bio */
|
||||
if (bio_flagged(bio, BIO_CLONED))
|
||||
seg_cnt = bio_segments(bio);
|
||||
else
|
||||
seg_cnt = bio->bi_vcnt;
|
||||
unsigned short seg_cnt = bio_segments(bio);
|
||||
|
||||
if (test_bit(QUEUE_FLAG_NO_SG_MERGE, &q->queue_flags) &&
|
||||
(seg_cnt < queue_max_segments(q)))
|
||||
|
||||
@@ -394,7 +394,7 @@ static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name)
|
||||
int ret;
|
||||
|
||||
pinst->kobj.kset = pcrypt_kset;
|
||||
ret = kobject_add(&pinst->kobj, NULL, name);
|
||||
ret = kobject_add(&pinst->kobj, NULL, "%s", name);
|
||||
if (!ret)
|
||||
kobject_uevent(&pinst->kobj, KOBJ_ADD);
|
||||
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define TGR192_DIGEST_SIZE 24
|
||||
#define TGR160_DIGEST_SIZE 20
|
||||
@@ -468,10 +469,9 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data)
|
||||
u64 a, b, c, aa, bb, cc;
|
||||
u64 x[8];
|
||||
int i;
|
||||
const __le64 *ptr = (const __le64 *)data;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
x[i] = le64_to_cpu(ptr[i]);
|
||||
x[i] = get_unaligned_le64(data + i * sizeof(__le64));
|
||||
|
||||
/* save */
|
||||
a = aa = tctx->a;
|
||||
|
||||
@@ -191,7 +191,6 @@ struct ata_port_operations ahci_pmp_retry_srst_ops = {
|
||||
EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
|
||||
|
||||
static bool ahci_em_messages __read_mostly = true;
|
||||
EXPORT_SYMBOL_GPL(ahci_em_messages);
|
||||
module_param(ahci_em_messages, bool, 0444);
|
||||
/* add other LED protocol types when they become supported */
|
||||
MODULE_PARM_DESC(ahci_em_messages,
|
||||
|
||||
@@ -180,11 +180,20 @@ struct device_link *device_link_add(struct device *consumer,
|
||||
struct device *supplier, u32 flags)
|
||||
{
|
||||
struct device_link *link;
|
||||
bool rpm_put_supplier = false;
|
||||
|
||||
if (!consumer || !supplier ||
|
||||
((flags & DL_FLAG_STATELESS) && (flags & DL_FLAG_AUTOREMOVE)))
|
||||
return NULL;
|
||||
|
||||
if (flags & DL_FLAG_PM_RUNTIME && flags & DL_FLAG_RPM_ACTIVE) {
|
||||
if (pm_runtime_get_sync(supplier) < 0) {
|
||||
pm_runtime_put_noidle(supplier);
|
||||
return NULL;
|
||||
}
|
||||
rpm_put_supplier = true;
|
||||
}
|
||||
|
||||
device_links_write_lock();
|
||||
device_pm_lock();
|
||||
|
||||
@@ -209,13 +218,8 @@ struct device_link *device_link_add(struct device *consumer,
|
||||
|
||||
if (flags & DL_FLAG_PM_RUNTIME) {
|
||||
if (flags & DL_FLAG_RPM_ACTIVE) {
|
||||
if (pm_runtime_get_sync(supplier) < 0) {
|
||||
pm_runtime_put_noidle(supplier);
|
||||
kfree(link);
|
||||
link = NULL;
|
||||
goto out;
|
||||
}
|
||||
link->rpm_active = true;
|
||||
rpm_put_supplier = false;
|
||||
}
|
||||
pm_runtime_new_link(consumer);
|
||||
/*
|
||||
@@ -286,6 +290,10 @@ struct device_link *device_link_add(struct device *consumer,
|
||||
out:
|
||||
device_pm_unlock();
|
||||
device_links_write_unlock();
|
||||
|
||||
if (rpm_put_supplier)
|
||||
pm_runtime_put(supplier);
|
||||
|
||||
return link;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(device_link_add);
|
||||
|
||||
@@ -953,7 +953,7 @@ EXPORT_SYMBOL_GPL(pm_system_wakeup);
|
||||
|
||||
void pm_system_cancel_wakeup(void)
|
||||
{
|
||||
atomic_dec(&pm_abort_suspend);
|
||||
atomic_dec_if_positive(&pm_abort_suspend);
|
||||
}
|
||||
|
||||
void pm_wakeup_clear(bool reset)
|
||||
|
||||
@@ -78,7 +78,7 @@ static u16 bcma_pcie_mdio_read(struct bcma_drv_pci *pc, u16 device, u8 address)
|
||||
v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD);
|
||||
}
|
||||
|
||||
v = BCMA_CORE_PCI_MDIODATA_START;
|
||||
v |= BCMA_CORE_PCI_MDIODATA_START;
|
||||
v |= BCMA_CORE_PCI_MDIODATA_READ;
|
||||
v |= BCMA_CORE_PCI_MDIODATA_TA;
|
||||
|
||||
@@ -121,7 +121,7 @@ static void bcma_pcie_mdio_write(struct bcma_drv_pci *pc, u16 device,
|
||||
v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD);
|
||||
}
|
||||
|
||||
v = BCMA_CORE_PCI_MDIODATA_START;
|
||||
v |= BCMA_CORE_PCI_MDIODATA_START;
|
||||
v |= BCMA_CORE_PCI_MDIODATA_WRITE;
|
||||
v |= BCMA_CORE_PCI_MDIODATA_TA;
|
||||
v |= data;
|
||||
|
||||
@@ -334,6 +334,8 @@ static int drbd_thread_setup(void *arg)
|
||||
thi->name[0],
|
||||
resource->name);
|
||||
|
||||
allow_kernel_signal(DRBD_SIGKILL);
|
||||
allow_kernel_signal(SIGXCPU);
|
||||
restart:
|
||||
retval = thi->function(thi);
|
||||
|
||||
|
||||
@@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
|
||||
/* Map system registers */
|
||||
srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
|
||||
hb_clk->reg = of_iomap(srnp, 0);
|
||||
of_node_put(srnp);
|
||||
BUG_ON(!hb_clk->reg);
|
||||
hb_clk->reg += reg;
|
||||
|
||||
|
||||
@@ -1382,6 +1382,7 @@ static void __init clockgen_init(struct device_node *np)
|
||||
pr_err("%s: Couldn't map %pOF regs\n", __func__,
|
||||
guts);
|
||||
}
|
||||
of_node_put(guts);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -431,6 +431,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
|
||||
anatop_base = base = of_iomap(np, 0);
|
||||
WARN_ON(!base);
|
||||
of_node_put(np);
|
||||
|
||||
/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */
|
||||
if (clk_on_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) {
|
||||
|
||||
@@ -164,6 +164,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop");
|
||||
base = of_iomap(np, 0);
|
||||
WARN_ON(!base);
|
||||
of_node_put(np);
|
||||
|
||||
clks[IMX6SX_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
|
||||
clks[IMX6SX_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
|
||||
|
||||
@@ -416,6 +416,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx7d-anatop");
|
||||
base = of_iomap(np, 0);
|
||||
WARN_ON(!base);
|
||||
of_node_put(np);
|
||||
|
||||
clks[IMX7D_PLL_ARM_MAIN_SRC] = imx_clk_mux("pll_arm_main_src", base + 0x60, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
|
||||
clks[IMX7D_PLL_DRAM_MAIN_SRC] = imx_clk_mux("pll_dram_main_src", base + 0x70, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
|
||||
|
||||
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop");
|
||||
anatop_base = of_iomap(np, 0);
|
||||
BUG_ON(!anatop_base);
|
||||
of_node_put(np);
|
||||
|
||||
np = ccm_node;
|
||||
ccm_base = of_iomap(np, 0);
|
||||
|
||||
@@ -177,8 +177,10 @@ static void __init a370_clk_init(struct device_node *np)
|
||||
|
||||
mvebu_coreclk_setup(np, &a370_coreclks);
|
||||
|
||||
if (cgnp)
|
||||
if (cgnp) {
|
||||
mvebu_clk_gating_setup(cgnp, a370_gating_desc);
|
||||
of_node_put(cgnp);
|
||||
}
|
||||
}
|
||||
CLK_OF_DECLARE(a370_clk, "marvell,armada-370-core-clock", a370_clk_init);
|
||||
|
||||
|
||||
@@ -228,7 +228,9 @@ static void __init axp_clk_init(struct device_node *np)
|
||||
|
||||
mvebu_coreclk_setup(np, &axp_coreclks);
|
||||
|
||||
if (cgnp)
|
||||
if (cgnp) {
|
||||
mvebu_clk_gating_setup(cgnp, axp_gating_desc);
|
||||
of_node_put(cgnp);
|
||||
}
|
||||
}
|
||||
CLK_OF_DECLARE(axp_clk, "marvell,armada-xp-core-clock", axp_clk_init);
|
||||
|
||||
@@ -190,10 +190,14 @@ static void __init dove_clk_init(struct device_node *np)
|
||||
|
||||
mvebu_coreclk_setup(np, &dove_coreclks);
|
||||
|
||||
if (ddnp)
|
||||
if (ddnp) {
|
||||
dove_divider_clk_init(ddnp);
|
||||
of_node_put(ddnp);
|
||||
}
|
||||
|
||||
if (cgnp)
|
||||
if (cgnp) {
|
||||
mvebu_clk_gating_setup(cgnp, dove_gating_desc);
|
||||
of_node_put(cgnp);
|
||||
}
|
||||
}
|
||||
CLK_OF_DECLARE(dove_clk, "marvell,dove-core-clock", dove_clk_init);
|
||||
|
||||
@@ -333,6 +333,8 @@ static void __init kirkwood_clk_init(struct device_node *np)
|
||||
if (cgnp) {
|
||||
mvebu_clk_gating_setup(cgnp, kirkwood_gating_desc);
|
||||
kirkwood_clk_muxing_setup(cgnp, kirkwood_mux_desc);
|
||||
|
||||
of_node_put(cgnp);
|
||||
}
|
||||
}
|
||||
CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
|
||||
|
||||
@@ -174,7 +174,9 @@ static void __init mv98dx3236_clk_init(struct device_node *np)
|
||||
|
||||
mvebu_coreclk_setup(np, &mv98dx3236_core_clocks);
|
||||
|
||||
if (cgnp)
|
||||
if (cgnp) {
|
||||
mvebu_clk_gating_setup(cgnp, mv98dx3236_gating_desc);
|
||||
of_node_put(cgnp);
|
||||
}
|
||||
}
|
||||
CLK_OF_DECLARE(mv98dx3236_clk, "marvell,mv98dx3236-core-clock", mv98dx3236_clk_init);
|
||||
|
||||
@@ -140,22 +140,6 @@ static const char * const gcc_xo_gpll0_gpll4_gpll0_early_div[] = {
|
||||
"gpll0_early_div"
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0, 1 },
|
||||
{ P_GPLL2, 2 },
|
||||
{ P_GPLL3, 3 },
|
||||
{ P_GPLL0_EARLY_DIV, 6 }
|
||||
};
|
||||
|
||||
static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = {
|
||||
"xo",
|
||||
"gpll0",
|
||||
"gpll2",
|
||||
"gpll3",
|
||||
"gpll0_early_div"
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div_map[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0, 1 },
|
||||
@@ -194,26 +178,6 @@ static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll2_early_gpll0_early
|
||||
"gpll0_early_div"
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = {
|
||||
{ P_XO, 0 },
|
||||
{ P_GPLL0, 1 },
|
||||
{ P_GPLL2, 2 },
|
||||
{ P_GPLL3, 3 },
|
||||
{ P_GPLL1, 4 },
|
||||
{ P_GPLL4, 5 },
|
||||
{ P_GPLL0_EARLY_DIV, 6 }
|
||||
};
|
||||
|
||||
static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = {
|
||||
"xo",
|
||||
"gpll0",
|
||||
"gpll2",
|
||||
"gpll3",
|
||||
"gpll1",
|
||||
"gpll4",
|
||||
"gpll0_early_div"
|
||||
};
|
||||
|
||||
static struct clk_fixed_factor xo = {
|
||||
.mult = 1,
|
||||
.div = 1,
|
||||
|
||||
@@ -1240,6 +1240,7 @@ static unsigned long __init exynos4_get_xom(void)
|
||||
xom = readl(chipid_base + 8);
|
||||
|
||||
iounmap(chipid_base);
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
return xom;
|
||||
|
||||
@@ -95,6 +95,7 @@ static struct clk * __init __socfpga_pll_init(struct device_node *node,
|
||||
|
||||
clkmgr_np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
|
||||
clk_mgr_a10_base_addr = of_iomap(clkmgr_np, 0);
|
||||
of_node_put(clkmgr_np);
|
||||
BUG_ON(!clk_mgr_a10_base_addr);
|
||||
pll_clk->hw.reg = clk_mgr_a10_base_addr + reg;
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node,
|
||||
|
||||
clkmgr_np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
|
||||
clk_mgr_base_addr = of_iomap(clkmgr_np, 0);
|
||||
of_node_put(clkmgr_np);
|
||||
BUG_ON(!clk_mgr_base_addr);
|
||||
pll_clk->hw.reg = clk_mgr_base_addr + reg;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_mipi_clk, "pll-mipi",
|
||||
8, 4, /* N */
|
||||
4, 2, /* K */
|
||||
0, 4, /* M */
|
||||
BIT(31), /* gate */
|
||||
BIT(31) | BIT(23) | BIT(22), /* gate */
|
||||
BIT(28), /* lock */
|
||||
CLK_SET_RATE_UNGATE);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_ve_clk, "pll-ve",
|
||||
BIT(28), /* lock */
|
||||
0);
|
||||
|
||||
static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_ddr_clk, "pll-ddr",
|
||||
static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_ddr0_clk, "pll-ddr0",
|
||||
"osc24M", 0x020,
|
||||
8, 5, /* N */
|
||||
4, 2, /* K */
|
||||
@@ -123,6 +123,14 @@ static SUNXI_CCU_NK_WITH_GATE_LOCK_POSTDIV(pll_periph1_clk, "pll-periph1",
|
||||
2, /* post-div */
|
||||
0);
|
||||
|
||||
static SUNXI_CCU_NM_WITH_GATE_LOCK(pll_ddr1_clk, "pll-ddr1",
|
||||
"osc24M", 0x04c,
|
||||
8, 7, /* N */
|
||||
0, 2, /* M */
|
||||
BIT(31), /* gate */
|
||||
BIT(28), /* lock */
|
||||
0);
|
||||
|
||||
static const char * const cpu_parents[] = { "osc32k", "osc24M",
|
||||
"pll-cpu", "pll-cpu" };
|
||||
static SUNXI_CCU_MUX(cpu_clk, "cpu", cpu_parents,
|
||||
@@ -310,7 +318,8 @@ static SUNXI_CCU_GATE(usb_phy0_clk, "usb-phy0", "osc24M",
|
||||
static SUNXI_CCU_GATE(usb_ohci0_clk, "usb-ohci0", "osc24M",
|
||||
0x0cc, BIT(16), 0);
|
||||
|
||||
static const char * const dram_parents[] = { "pll-ddr", "pll-periph0-2x" };
|
||||
static const char * const dram_parents[] = { "pll-ddr0", "pll-ddr1",
|
||||
"pll-periph0-2x" };
|
||||
static SUNXI_CCU_M_WITH_MUX(dram_clk, "dram", dram_parents,
|
||||
0x0f4, 0, 4, 20, 2, CLK_IS_CRITICAL);
|
||||
|
||||
@@ -369,10 +378,11 @@ static struct ccu_common *sun8i_v3s_ccu_clks[] = {
|
||||
&pll_audio_base_clk.common,
|
||||
&pll_video_clk.common,
|
||||
&pll_ve_clk.common,
|
||||
&pll_ddr_clk.common,
|
||||
&pll_ddr0_clk.common,
|
||||
&pll_periph0_clk.common,
|
||||
&pll_isp_clk.common,
|
||||
&pll_periph1_clk.common,
|
||||
&pll_ddr1_clk.common,
|
||||
&cpu_clk.common,
|
||||
&axi_clk.common,
|
||||
&ahb1_clk.common,
|
||||
@@ -457,11 +467,12 @@ static struct clk_hw_onecell_data sun8i_v3s_hw_clks = {
|
||||
[CLK_PLL_AUDIO_8X] = &pll_audio_8x_clk.hw,
|
||||
[CLK_PLL_VIDEO] = &pll_video_clk.common.hw,
|
||||
[CLK_PLL_VE] = &pll_ve_clk.common.hw,
|
||||
[CLK_PLL_DDR] = &pll_ddr_clk.common.hw,
|
||||
[CLK_PLL_DDR0] = &pll_ddr0_clk.common.hw,
|
||||
[CLK_PLL_PERIPH0] = &pll_periph0_clk.common.hw,
|
||||
[CLK_PLL_PERIPH0_2X] = &pll_periph0_2x_clk.hw,
|
||||
[CLK_PLL_ISP] = &pll_isp_clk.common.hw,
|
||||
[CLK_PLL_PERIPH1] = &pll_periph1_clk.common.hw,
|
||||
[CLK_PLL_DDR1] = &pll_ddr1_clk.common.hw,
|
||||
[CLK_CPU] = &cpu_clk.common.hw,
|
||||
[CLK_AXI] = &axi_clk.common.hw,
|
||||
[CLK_AHB1] = &ahb1_clk.common.hw,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define CLK_PLL_AUDIO_8X 5
|
||||
#define CLK_PLL_VIDEO 6
|
||||
#define CLK_PLL_VE 7
|
||||
#define CLK_PLL_DDR 8
|
||||
#define CLK_PLL_DDR0 8
|
||||
#define CLK_PLL_PERIPH0 9
|
||||
#define CLK_PLL_PERIPH0_2X 10
|
||||
#define CLK_PLL_ISP 11
|
||||
@@ -58,6 +58,8 @@
|
||||
|
||||
/* And the GPU module clock is exported */
|
||||
|
||||
#define CLK_NUMBER (CLK_MIPI_CSI + 1)
|
||||
#define CLK_PLL_DDR1 74
|
||||
|
||||
#define CLK_NUMBER (CLK_PLL_DDR1 + 1)
|
||||
|
||||
#endif /* _CCU_SUN8I_H3_H_ */
|
||||
|
||||
@@ -563,7 +563,19 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem *
|
||||
return 0;
|
||||
|
||||
out_irq:
|
||||
free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
|
||||
if (mct_int_type == MCT_INT_PPI) {
|
||||
free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
|
||||
} else {
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct mct_clock_event_device *pcpu_mevt =
|
||||
per_cpu_ptr(&percpu_mct_tick, cpu);
|
||||
|
||||
if (pcpu_mevt->evt.irq != -1) {
|
||||
free_irq(pcpu_mevt->evt.irq, pcpu_mevt);
|
||||
pcpu_mevt->evt.irq = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -202,6 +202,11 @@ static int __init sun5i_setup_clocksource(struct device_node *node,
|
||||
}
|
||||
|
||||
rate = clk_get_rate(clk);
|
||||
if (!rate) {
|
||||
pr_err("Couldn't get parent clock rate\n");
|
||||
ret = -EINVAL;
|
||||
goto err_disable_clk;
|
||||
}
|
||||
|
||||
cs->timer.base = base;
|
||||
cs->timer.clk = clk;
|
||||
@@ -275,6 +280,11 @@ static int __init sun5i_setup_clockevent(struct device_node *node, void __iomem
|
||||
}
|
||||
|
||||
rate = clk_get_rate(clk);
|
||||
if (!rate) {
|
||||
pr_err("Couldn't get parent clock rate\n");
|
||||
ret = -EINVAL;
|
||||
goto err_disable_clk;
|
||||
}
|
||||
|
||||
ce->timer.base = base;
|
||||
ce->timer.ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
|
||||
|
||||
@@ -468,12 +468,12 @@ static int brcm_avs_set_pstate(struct private_data *priv, unsigned int pstate)
|
||||
return __issue_avs_command(priv, AVS_CMD_SET_PSTATE, true, args);
|
||||
}
|
||||
|
||||
static unsigned long brcm_avs_get_voltage(void __iomem *base)
|
||||
static u32 brcm_avs_get_voltage(void __iomem *base)
|
||||
{
|
||||
return readl(base + AVS_MBOX_VOLTAGE1);
|
||||
}
|
||||
|
||||
static unsigned long brcm_avs_get_frequency(void __iomem *base)
|
||||
static u32 brcm_avs_get_frequency(void __iomem *base)
|
||||
{
|
||||
return readl(base + AVS_MBOX_FREQUENCY) * 1000; /* in kHz */
|
||||
}
|
||||
@@ -762,8 +762,8 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
|
||||
rc = brcm_avs_get_pmap(priv, NULL);
|
||||
magic = readl(priv->base + AVS_MBOX_MAGIC);
|
||||
|
||||
return (magic == AVS_FIRMWARE_MAGIC) && (rc != -ENOTSUPP) &&
|
||||
(rc != -EINVAL);
|
||||
return (magic == AVS_FIRMWARE_MAGIC) && ((rc != -ENOTSUPP) ||
|
||||
(rc != -EINVAL));
|
||||
}
|
||||
|
||||
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
|
||||
@@ -973,14 +973,14 @@ static ssize_t show_brcm_avs_voltage(struct cpufreq_policy *policy, char *buf)
|
||||
{
|
||||
struct private_data *priv = policy->driver_data;
|
||||
|
||||
return sprintf(buf, "0x%08lx\n", brcm_avs_get_voltage(priv->base));
|
||||
return sprintf(buf, "0x%08x\n", brcm_avs_get_voltage(priv->base));
|
||||
}
|
||||
|
||||
static ssize_t show_brcm_avs_frequency(struct cpufreq_policy *policy, char *buf)
|
||||
{
|
||||
struct private_data *priv = policy->driver_data;
|
||||
|
||||
return sprintf(buf, "0x%08lx\n", brcm_avs_get_frequency(priv->base));
|
||||
return sprintf(buf, "0x%08x\n", brcm_avs_get_frequency(priv->base));
|
||||
}
|
||||
|
||||
cpufreq_freq_attr_ro(brcm_avs_pstate);
|
||||
|
||||
@@ -26,9 +26,9 @@ void ppc4xx_trng_probe(struct crypto4xx_core_device *core_dev);
|
||||
void ppc4xx_trng_remove(struct crypto4xx_core_device *core_dev);
|
||||
#else
|
||||
static inline void ppc4xx_trng_probe(
|
||||
struct crypto4xx_device *dev __maybe_unused) { }
|
||||
struct crypto4xx_core_device *dev __maybe_unused) { }
|
||||
static inline void ppc4xx_trng_remove(
|
||||
struct crypto4xx_device *dev __maybe_unused) { }
|
||||
struct crypto4xx_core_device *dev __maybe_unused) { }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -718,7 +718,7 @@ static int handle_ahash_req(struct iproc_reqctx_s *rctx)
|
||||
*/
|
||||
unsigned int new_data_len;
|
||||
|
||||
unsigned int chunk_start = 0;
|
||||
unsigned int __maybe_unused chunk_start = 0;
|
||||
u32 db_size; /* Length of data field, incl gcm and hash padding */
|
||||
int pad_len = 0; /* total pad len, including gcm, hash, stat padding */
|
||||
u32 data_pad_len = 0; /* length of GCM/CCM padding */
|
||||
@@ -1676,8 +1676,6 @@ static void spu_rx_callback(struct mbox_client *cl, void *msg)
|
||||
struct spu_hw *spu = &iproc_priv.spu;
|
||||
struct brcm_message *mssg = msg;
|
||||
struct iproc_reqctx_s *rctx;
|
||||
struct iproc_ctx_s *ctx;
|
||||
struct crypto_async_request *areq;
|
||||
int err = 0;
|
||||
|
||||
rctx = mssg->ctx;
|
||||
@@ -1687,8 +1685,6 @@ static void spu_rx_callback(struct mbox_client *cl, void *msg)
|
||||
err = -EFAULT;
|
||||
goto cb_finish;
|
||||
}
|
||||
areq = rctx->parent;
|
||||
ctx = rctx->ctx;
|
||||
|
||||
/* process the SPU status */
|
||||
err = spu->spu_status_process(rctx->msg_buf.rx_stat);
|
||||
|
||||
@@ -353,7 +353,10 @@ static int __init caam_rng_init(void)
|
||||
goto free_rng_ctx;
|
||||
|
||||
dev_info(dev, "registering rng-caam\n");
|
||||
return hwrng_register(&caam_rng);
|
||||
|
||||
err = hwrng_register(&caam_rng);
|
||||
if (!err)
|
||||
return err;
|
||||
|
||||
free_rng_ctx:
|
||||
kfree(rng_ctx);
|
||||
|
||||
@@ -22,7 +22,7 @@ void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
|
||||
size_t len;
|
||||
void *buf;
|
||||
|
||||
for (it = sg; it && tlen > 0 ; it = sg_next(sg)) {
|
||||
for (it = sg; it && tlen > 0 ; it = sg_next(it)) {
|
||||
/*
|
||||
* make sure the scatterlist's page
|
||||
* has a valid virtual memory mapping
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* AMD Cryptographic Coprocessor (CCP) AES crypto API support
|
||||
*
|
||||
* Copyright (C) 2013,2016 Advanced Micro Devices, Inc.
|
||||
* Copyright (C) 2013-2019 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Author: Tom Lendacky <thomas.lendacky@amd.com>
|
||||
*
|
||||
@@ -79,8 +80,7 @@ static int ccp_aes_crypt(struct ablkcipher_request *req, bool encrypt)
|
||||
return -EINVAL;
|
||||
|
||||
if (((ctx->u.aes.mode == CCP_AES_MODE_ECB) ||
|
||||
(ctx->u.aes.mode == CCP_AES_MODE_CBC) ||
|
||||
(ctx->u.aes.mode == CCP_AES_MODE_CFB)) &&
|
||||
(ctx->u.aes.mode == CCP_AES_MODE_CBC)) &&
|
||||
(req->nbytes & (AES_BLOCK_SIZE - 1)))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -291,7 +291,7 @@ static struct ccp_aes_def aes_algs[] = {
|
||||
.version = CCP_VERSION(3, 0),
|
||||
.name = "cfb(aes)",
|
||||
.driver_name = "cfb-aes-ccp",
|
||||
.blocksize = AES_BLOCK_SIZE,
|
||||
.blocksize = 1,
|
||||
.ivsize = AES_BLOCK_SIZE,
|
||||
.alg_defaults = &ccp_aes_defaults,
|
||||
},
|
||||
|
||||
@@ -458,8 +458,8 @@ static int ccp_copy_from_sb(struct ccp_cmd_queue *cmd_q,
|
||||
return ccp_copy_to_from_sb(cmd_q, wa, jobid, sb, byte_swap, true);
|
||||
}
|
||||
|
||||
static int ccp_run_aes_cmac_cmd(struct ccp_cmd_queue *cmd_q,
|
||||
struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_aes_cmac_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_aes_engine *aes = &cmd->u.aes;
|
||||
struct ccp_dm_workarea key, ctx;
|
||||
@@ -614,8 +614,8 @@ e_key:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q,
|
||||
struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_aes_engine *aes = &cmd->u.aes;
|
||||
struct ccp_dm_workarea key, ctx, final_wa, tag;
|
||||
@@ -897,7 +897,8 @@ e_key:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_aes_engine *aes = &cmd->u.aes;
|
||||
struct ccp_dm_workarea key, ctx;
|
||||
@@ -907,12 +908,6 @@ static int ccp_run_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
bool in_place = false;
|
||||
int ret;
|
||||
|
||||
if (aes->mode == CCP_AES_MODE_CMAC)
|
||||
return ccp_run_aes_cmac_cmd(cmd_q, cmd);
|
||||
|
||||
if (aes->mode == CCP_AES_MODE_GCM)
|
||||
return ccp_run_aes_gcm_cmd(cmd_q, cmd);
|
||||
|
||||
if (!((aes->key_len == AES_KEYSIZE_128) ||
|
||||
(aes->key_len == AES_KEYSIZE_192) ||
|
||||
(aes->key_len == AES_KEYSIZE_256)))
|
||||
@@ -1080,8 +1075,8 @@ e_key:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_xts_aes_cmd(struct ccp_cmd_queue *cmd_q,
|
||||
struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_xts_aes_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_xts_aes_engine *xts = &cmd->u.xts;
|
||||
struct ccp_dm_workarea key, ctx;
|
||||
@@ -1280,7 +1275,8 @@ e_key:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_des3_engine *des3 = &cmd->u.des3;
|
||||
|
||||
@@ -1293,6 +1289,9 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
int ret;
|
||||
|
||||
/* Error checks */
|
||||
if (cmd_q->ccp->vdata->version < CCP_VERSION(5, 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (!cmd_q->ccp->vdata->perform->des3)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1375,8 +1374,6 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
* passthru option to convert from big endian to little endian.
|
||||
*/
|
||||
if (des3->mode != CCP_DES3_MODE_ECB) {
|
||||
u32 load_mode;
|
||||
|
||||
op.sb_ctx = cmd_q->sb_ctx;
|
||||
|
||||
ret = ccp_init_dm_workarea(&ctx, cmd_q,
|
||||
@@ -1392,12 +1389,8 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
if (ret)
|
||||
goto e_ctx;
|
||||
|
||||
if (cmd_q->ccp->vdata->version == CCP_VERSION(3, 0))
|
||||
load_mode = CCP_PASSTHRU_BYTESWAP_NOOP;
|
||||
else
|
||||
load_mode = CCP_PASSTHRU_BYTESWAP_256BIT;
|
||||
ret = ccp_copy_to_sb(cmd_q, &ctx, op.jobid, op.sb_ctx,
|
||||
load_mode);
|
||||
CCP_PASSTHRU_BYTESWAP_256BIT);
|
||||
if (ret) {
|
||||
cmd->engine_error = cmd_q->cmd_error;
|
||||
goto e_ctx;
|
||||
@@ -1459,10 +1452,6 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
}
|
||||
|
||||
/* ...but we only need the last DES3_EDE_BLOCK_SIZE bytes */
|
||||
if (cmd_q->ccp->vdata->version == CCP_VERSION(3, 0))
|
||||
dm_offset = CCP_SB_BYTES - des3->iv_len;
|
||||
else
|
||||
dm_offset = 0;
|
||||
ccp_get_dm_area(&ctx, dm_offset, des3->iv, 0,
|
||||
DES3_EDE_BLOCK_SIZE);
|
||||
}
|
||||
@@ -1483,7 +1472,8 @@ e_key:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_sha_engine *sha = &cmd->u.sha;
|
||||
struct ccp_dm_workarea ctx;
|
||||
@@ -1827,7 +1817,8 @@ e_ctx:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_rsa_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_rsa_engine *rsa = &cmd->u.rsa;
|
||||
struct ccp_dm_workarea exp, src, dst;
|
||||
@@ -1958,8 +1949,8 @@ e_sb:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q,
|
||||
struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_passthru_engine *pt = &cmd->u.passthru;
|
||||
struct ccp_dm_workarea mask;
|
||||
@@ -2090,7 +2081,8 @@ e_mask:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_passthru_nomap_cmd(struct ccp_cmd_queue *cmd_q,
|
||||
static noinline_for_stack int
|
||||
ccp_run_passthru_nomap_cmd(struct ccp_cmd_queue *cmd_q,
|
||||
struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_passthru_nomap_engine *pt = &cmd->u.passthru_nomap;
|
||||
@@ -2431,7 +2423,8 @@ e_src:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccp_run_ecc_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
static noinline_for_stack int
|
||||
ccp_run_ecc_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
{
|
||||
struct ccp_ecc_engine *ecc = &cmd->u.ecc;
|
||||
|
||||
@@ -2468,7 +2461,17 @@ int ccp_run_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
|
||||
|
||||
switch (cmd->engine) {
|
||||
case CCP_ENGINE_AES:
|
||||
ret = ccp_run_aes_cmd(cmd_q, cmd);
|
||||
switch (cmd->u.aes.mode) {
|
||||
case CCP_AES_MODE_CMAC:
|
||||
ret = ccp_run_aes_cmac_cmd(cmd_q, cmd);
|
||||
break;
|
||||
case CCP_AES_MODE_GCM:
|
||||
ret = ccp_run_aes_gcm_cmd(cmd_q, cmd);
|
||||
break;
|
||||
default:
|
||||
ret = ccp_run_aes_cmd(cmd_q, cmd);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case CCP_ENGINE_XTS_AES_128:
|
||||
ret = ccp_run_xts_aes_cmd(cmd_q, cmd);
|
||||
|
||||
@@ -179,7 +179,7 @@ static int sun4i_hash(struct ahash_request *areq)
|
||||
*/
|
||||
unsigned int i = 0, end, fill, min_fill, nwait, nbw = 0, j = 0, todo;
|
||||
unsigned int in_i = 0;
|
||||
u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, wb = 0, v, ivmode = 0;
|
||||
u32 spaces, rx_cnt = SS_RX_DEFAULT, bf[32] = {0}, v, ivmode = 0;
|
||||
struct sun4i_req_ctx *op = ahash_request_ctx(areq);
|
||||
struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq);
|
||||
struct sun4i_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm);
|
||||
@@ -188,6 +188,7 @@ static int sun4i_hash(struct ahash_request *areq)
|
||||
struct sg_mapping_iter mi;
|
||||
int in_r, err = 0;
|
||||
size_t copied = 0;
|
||||
__le32 wb = 0;
|
||||
|
||||
dev_dbg(ss->dev, "%s %s bc=%llu len=%u mode=%x wl=%u h0=%0x",
|
||||
__func__, crypto_tfm_alg_name(areq->base.tfm),
|
||||
@@ -399,7 +400,7 @@ hash_final:
|
||||
|
||||
nbw = op->len - 4 * nwait;
|
||||
if (nbw) {
|
||||
wb = *(u32 *)(op->buf + nwait * 4);
|
||||
wb = cpu_to_le32(*(u32 *)(op->buf + nwait * 4));
|
||||
wb &= GENMASK((nbw * 8) - 1, 0);
|
||||
|
||||
op->byte_count += nbw;
|
||||
@@ -408,7 +409,7 @@ hash_final:
|
||||
|
||||
/* write the remaining bytes of the nbw buffer */
|
||||
wb |= ((1 << 7) << (nbw * 8));
|
||||
bf[j++] = wb;
|
||||
bf[j++] = le32_to_cpu(wb);
|
||||
|
||||
/*
|
||||
* number of space to pad to obtain 64o minus 8(size) minus 4 (final 1)
|
||||
@@ -427,13 +428,13 @@ hash_final:
|
||||
|
||||
/* write the length of data */
|
||||
if (op->mode == SS_OP_SHA1) {
|
||||
__be64 bits = cpu_to_be64(op->byte_count << 3);
|
||||
bf[j++] = lower_32_bits(bits);
|
||||
bf[j++] = upper_32_bits(bits);
|
||||
__be64 *bits = (__be64 *)&bf[j];
|
||||
*bits = cpu_to_be64(op->byte_count << 3);
|
||||
j += 2;
|
||||
} else {
|
||||
__le64 bits = op->byte_count << 3;
|
||||
bf[j++] = lower_32_bits(bits);
|
||||
bf[j++] = upper_32_bits(bits);
|
||||
__le64 *bits = (__le64 *)&bf[j];
|
||||
*bits = cpu_to_le64(op->byte_count << 3);
|
||||
j += 2;
|
||||
}
|
||||
writesl(ss->base + SS_RXFIFO, bf, j);
|
||||
|
||||
@@ -475,7 +476,7 @@ hash_final:
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 4; i++) {
|
||||
v = readl(ss->base + SS_MD0 + i * 4);
|
||||
v = cpu_to_le32(readl(ss->base + SS_MD0 + i * 4));
|
||||
memcpy(areq->result + i * 4, &v, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ static struct dma_async_tx_descriptor *axi_dmac_prep_interleaved(
|
||||
|
||||
if (chan->hw_2d) {
|
||||
if (!axi_dmac_check_len(chan, xt->sgl[0].size) ||
|
||||
!axi_dmac_check_len(chan, xt->numf))
|
||||
xt->numf == 0)
|
||||
return NULL;
|
||||
if (xt->sgl[0].size + dst_icg > chan->max_length ||
|
||||
xt->sgl[0].size + src_icg > chan->max_length)
|
||||
|
||||
@@ -87,13 +87,20 @@ static void dw_dma_acpi_controller_register(struct dw_dma *dw)
|
||||
dma_cap_set(DMA_SLAVE, info->dma_cap);
|
||||
info->filter_fn = dw_dma_acpi_filter;
|
||||
|
||||
ret = devm_acpi_dma_controller_register(dev, acpi_dma_simple_xlate,
|
||||
info);
|
||||
ret = acpi_dma_controller_register(dev, acpi_dma_simple_xlate, info);
|
||||
if (ret)
|
||||
dev_err(dev, "could not register acpi_dma_controller\n");
|
||||
}
|
||||
|
||||
static void dw_dma_acpi_controller_free(struct dw_dma *dw)
|
||||
{
|
||||
struct device *dev = dw->dma.dev;
|
||||
|
||||
acpi_dma_controller_free(dev);
|
||||
}
|
||||
#else /* !CONFIG_ACPI */
|
||||
static inline void dw_dma_acpi_controller_register(struct dw_dma *dw) {}
|
||||
static inline void dw_dma_acpi_controller_free(struct dw_dma *dw) {}
|
||||
#endif /* !CONFIG_ACPI */
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
@@ -249,6 +256,9 @@ static int dw_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct dw_dma_chip *chip = platform_get_drvdata(pdev);
|
||||
|
||||
if (ACPI_HANDLE(&pdev->dev))
|
||||
dw_dma_acpi_controller_free(chip->dw);
|
||||
|
||||
if (pdev->dev.of_node)
|
||||
of_dma_controller_free(pdev->dev.of_node);
|
||||
|
||||
|
||||
@@ -2340,8 +2340,10 @@ static int edma_probe(struct platform_device *pdev)
|
||||
|
||||
ecc->tc_list = devm_kcalloc(dev, ecc->num_tc,
|
||||
sizeof(*ecc->tc_list), GFP_KERNEL);
|
||||
if (!ecc->tc_list)
|
||||
return -ENOMEM;
|
||||
if (!ecc->tc_list) {
|
||||
ret = -ENOMEM;
|
||||
goto err_reg1;
|
||||
}
|
||||
|
||||
for (i = 0;; i++) {
|
||||
ret = of_parse_phandle_with_fixed_args(node, "ti,tptcs",
|
||||
|
||||
@@ -64,10 +64,10 @@ static void hsu_dma_chan_start(struct hsu_dma_chan *hsuc)
|
||||
|
||||
if (hsuc->direction == DMA_MEM_TO_DEV) {
|
||||
bsr = config->dst_maxburst;
|
||||
mtsr = config->src_addr_width;
|
||||
mtsr = config->dst_addr_width;
|
||||
} else if (hsuc->direction == DMA_DEV_TO_MEM) {
|
||||
bsr = config->src_maxburst;
|
||||
mtsr = config->dst_addr_width;
|
||||
mtsr = config->src_addr_width;
|
||||
}
|
||||
|
||||
hsu_chan_disable(hsuc);
|
||||
|
||||
@@ -1441,6 +1441,14 @@ static void sdma_add_scripts(struct sdma_engine *sdma,
|
||||
if (!sdma->script_number)
|
||||
sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1;
|
||||
|
||||
if (sdma->script_number > sizeof(struct sdma_script_start_addrs)
|
||||
/ sizeof(s32)) {
|
||||
dev_err(sdma->dev,
|
||||
"SDMA script number %d not match with firmware.\n",
|
||||
sdma->script_number);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < sdma->script_number; i++)
|
||||
if (addr_arr[i] > 0)
|
||||
saddr_arr[i] = addr_arr[i];
|
||||
|
||||
@@ -1059,6 +1059,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
||||
mv_chan->op_in_desc = XOR_MODE_IN_DESC;
|
||||
|
||||
dma_dev = &mv_chan->dmadev;
|
||||
dma_dev->dev = &pdev->dev;
|
||||
mv_chan->xordev = xordev;
|
||||
|
||||
/*
|
||||
@@ -1091,7 +1092,6 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
||||
dma_dev->device_free_chan_resources = mv_xor_free_chan_resources;
|
||||
dma_dev->device_tx_status = mv_xor_status;
|
||||
dma_dev->device_issue_pending = mv_xor_issue_pending;
|
||||
dma_dev->dev = &pdev->dev;
|
||||
|
||||
/* set prep routines based on capability */
|
||||
if (dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask))
|
||||
|
||||
@@ -98,6 +98,7 @@ struct tegra_adma_chan_regs {
|
||||
unsigned int src_addr;
|
||||
unsigned int trg_addr;
|
||||
unsigned int fifo_ctrl;
|
||||
unsigned int cmd;
|
||||
unsigned int tc;
|
||||
};
|
||||
|
||||
@@ -127,6 +128,7 @@ struct tegra_adma_chan {
|
||||
enum dma_transfer_direction sreq_dir;
|
||||
unsigned int sreq_index;
|
||||
bool sreq_reserved;
|
||||
struct tegra_adma_chan_regs ch_regs;
|
||||
|
||||
/* Transfer count and position info */
|
||||
unsigned int tx_buf_count;
|
||||
@@ -635,8 +637,30 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec,
|
||||
static int tegra_adma_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct tegra_adma *tdma = dev_get_drvdata(dev);
|
||||
struct tegra_adma_chan_regs *ch_reg;
|
||||
struct tegra_adma_chan *tdc;
|
||||
int i;
|
||||
|
||||
tdma->global_cmd = tdma_read(tdma, ADMA_GLOBAL_CMD);
|
||||
if (!tdma->global_cmd)
|
||||
goto clk_disable;
|
||||
|
||||
for (i = 0; i < tdma->nr_channels; i++) {
|
||||
tdc = &tdma->channels[i];
|
||||
ch_reg = &tdc->ch_regs;
|
||||
ch_reg->cmd = tdma_ch_read(tdc, ADMA_CH_CMD);
|
||||
/* skip if channel is not active */
|
||||
if (!ch_reg->cmd)
|
||||
continue;
|
||||
ch_reg->tc = tdma_ch_read(tdc, ADMA_CH_TC);
|
||||
ch_reg->src_addr = tdma_ch_read(tdc, ADMA_CH_LOWER_SRC_ADDR);
|
||||
ch_reg->trg_addr = tdma_ch_read(tdc, ADMA_CH_LOWER_TRG_ADDR);
|
||||
ch_reg->ctrl = tdma_ch_read(tdc, ADMA_CH_CTRL);
|
||||
ch_reg->fifo_ctrl = tdma_ch_read(tdc, ADMA_CH_FIFO_CTRL);
|
||||
ch_reg->config = tdma_ch_read(tdc, ADMA_CH_CONFIG);
|
||||
}
|
||||
|
||||
clk_disable:
|
||||
clk_disable_unprepare(tdma->ahub_clk);
|
||||
|
||||
return 0;
|
||||
@@ -645,7 +669,9 @@ static int tegra_adma_runtime_suspend(struct device *dev)
|
||||
static int tegra_adma_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct tegra_adma *tdma = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
struct tegra_adma_chan_regs *ch_reg;
|
||||
struct tegra_adma_chan *tdc;
|
||||
int ret, i;
|
||||
|
||||
ret = clk_prepare_enable(tdma->ahub_clk);
|
||||
if (ret) {
|
||||
@@ -654,6 +680,24 @@ static int tegra_adma_runtime_resume(struct device *dev)
|
||||
}
|
||||
tdma_write(tdma, ADMA_GLOBAL_CMD, tdma->global_cmd);
|
||||
|
||||
if (!tdma->global_cmd)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < tdma->nr_channels; i++) {
|
||||
tdc = &tdma->channels[i];
|
||||
ch_reg = &tdc->ch_regs;
|
||||
/* skip if channel was not active earlier */
|
||||
if (!ch_reg->cmd)
|
||||
continue;
|
||||
tdma_ch_write(tdc, ADMA_CH_TC, ch_reg->tc);
|
||||
tdma_ch_write(tdc, ADMA_CH_LOWER_SRC_ADDR, ch_reg->src_addr);
|
||||
tdma_ch_write(tdc, ADMA_CH_LOWER_TRG_ADDR, ch_reg->trg_addr);
|
||||
tdma_ch_write(tdc, ADMA_CH_CTRL, ch_reg->ctrl);
|
||||
tdma_ch_write(tdc, ADMA_CH_FIFO_CTRL, ch_reg->fifo_ctrl);
|
||||
tdma_ch_write(tdc, ADMA_CH_CONFIG, ch_reg->config);
|
||||
tdma_ch_write(tdc, ADMA_CH_CMD, ch_reg->cmd);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -700,16 +744,6 @@ static int tegra_adma_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(tdma->ahub_clk);
|
||||
}
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
goto rpm_disable;
|
||||
|
||||
ret = tegra_adma_init(tdma);
|
||||
if (ret)
|
||||
goto rpm_put;
|
||||
|
||||
INIT_LIST_HEAD(&tdma->dma_dev.channels);
|
||||
for (i = 0; i < tdma->nr_channels; i++) {
|
||||
struct tegra_adma_chan *tdc = &tdma->channels[i];
|
||||
@@ -727,6 +761,16 @@ static int tegra_adma_probe(struct platform_device *pdev)
|
||||
tdc->tdma = tdma;
|
||||
}
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
goto rpm_disable;
|
||||
|
||||
ret = tegra_adma_init(tdma);
|
||||
if (ret)
|
||||
goto rpm_put;
|
||||
|
||||
dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask);
|
||||
dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask);
|
||||
dma_cap_set(DMA_CYCLIC, tdma->dma_dev.cap_mask);
|
||||
@@ -768,13 +812,13 @@ static int tegra_adma_probe(struct platform_device *pdev)
|
||||
|
||||
dma_remove:
|
||||
dma_async_device_unregister(&tdma->dma_dev);
|
||||
irq_dispose:
|
||||
while (--i >= 0)
|
||||
irq_dispose_mapping(tdma->channels[i].irq);
|
||||
rpm_put:
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
rpm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
irq_dispose:
|
||||
while (--i >= 0)
|
||||
irq_dispose_mapping(tdma->channels[i].irq);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -680,22 +680,18 @@ static int del_mc_from_global_list(struct mem_ctl_info *mci)
|
||||
|
||||
struct mem_ctl_info *edac_mc_find(int idx)
|
||||
{
|
||||
struct mem_ctl_info *mci = NULL;
|
||||
struct mem_ctl_info *mci;
|
||||
struct list_head *item;
|
||||
|
||||
mutex_lock(&mem_ctls_mutex);
|
||||
|
||||
list_for_each(item, &mc_devices) {
|
||||
mci = list_entry(item, struct mem_ctl_info, link);
|
||||
|
||||
if (mci->mc_idx >= idx) {
|
||||
if (mci->mc_idx == idx) {
|
||||
goto unlock;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (mci->mc_idx == idx)
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
mci = NULL;
|
||||
unlock:
|
||||
mutex_unlock(&mem_ctls_mutex);
|
||||
return mci;
|
||||
|
||||
@@ -982,9 +982,20 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_
|
||||
static struct drm_dp_mst_port *drm_dp_get_validated_port_ref(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port)
|
||||
{
|
||||
struct drm_dp_mst_port *rport = NULL;
|
||||
|
||||
mutex_lock(&mgr->lock);
|
||||
if (mgr->mst_primary)
|
||||
rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary, port);
|
||||
/*
|
||||
* Port may or may not be 'valid' but we don't care about that when
|
||||
* destroying the port and we are guaranteed that the port pointer
|
||||
* will be valid until we've finished
|
||||
*/
|
||||
if (current_work() == &mgr->destroy_connector_work) {
|
||||
kref_get(&port->kref);
|
||||
rport = port;
|
||||
} else if (mgr->mst_primary) {
|
||||
rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary,
|
||||
port);
|
||||
}
|
||||
mutex_unlock(&mgr->lock);
|
||||
return rport;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu)
|
||||
mutex_lock(&obj->lock);
|
||||
pages = etnaviv_gem_get_pages(obj);
|
||||
mutex_unlock(&obj->lock);
|
||||
if (pages) {
|
||||
if (!IS_ERR(pages)) {
|
||||
int j;
|
||||
|
||||
iter.hdr->data[0] = bomap - bomap_start;
|
||||
|
||||
@@ -26,7 +26,7 @@ struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj)
|
||||
int npages = obj->size >> PAGE_SHIFT;
|
||||
|
||||
if (WARN_ON(!etnaviv_obj->pages)) /* should have already pinned! */
|
||||
return NULL;
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return drm_prime_pages_to_sg(etnaviv_obj->pages, npages);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
|
||||
DRM_DEBUG_DRIVER("surface width(%d), height(%d) and bpp(%d)\n",
|
||||
sizes->surface_width, sizes->surface_height,
|
||||
sizes->surface_bpp);
|
||||
sizes->surface_depth = 32;
|
||||
|
||||
bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8);
|
||||
|
||||
|
||||
@@ -394,19 +394,17 @@ static const unsigned int a3xx_registers[] = {
|
||||
0x2200, 0x2212, 0x2214, 0x2217, 0x221a, 0x221a, 0x2240, 0x227e,
|
||||
0x2280, 0x228b, 0x22c0, 0x22c0, 0x22c4, 0x22ce, 0x22d0, 0x22d8,
|
||||
0x22df, 0x22e6, 0x22e8, 0x22e9, 0x22ec, 0x22ec, 0x22f0, 0x22f7,
|
||||
0x22ff, 0x22ff, 0x2340, 0x2343, 0x2348, 0x2349, 0x2350, 0x2356,
|
||||
0x2360, 0x2360, 0x2440, 0x2440, 0x2444, 0x2444, 0x2448, 0x244d,
|
||||
0x2468, 0x2469, 0x246c, 0x246d, 0x2470, 0x2470, 0x2472, 0x2472,
|
||||
0x2474, 0x2475, 0x2479, 0x247a, 0x24c0, 0x24d3, 0x24e4, 0x24ef,
|
||||
0x2500, 0x2509, 0x250c, 0x250c, 0x250e, 0x250e, 0x2510, 0x2511,
|
||||
0x2514, 0x2515, 0x25e4, 0x25e4, 0x25ea, 0x25ea, 0x25ec, 0x25ed,
|
||||
0x25f0, 0x25f0, 0x2600, 0x2612, 0x2614, 0x2617, 0x261a, 0x261a,
|
||||
0x2640, 0x267e, 0x2680, 0x268b, 0x26c0, 0x26c0, 0x26c4, 0x26ce,
|
||||
0x26d0, 0x26d8, 0x26df, 0x26e6, 0x26e8, 0x26e9, 0x26ec, 0x26ec,
|
||||
0x26f0, 0x26f7, 0x26ff, 0x26ff, 0x2740, 0x2743, 0x2748, 0x2749,
|
||||
0x2750, 0x2756, 0x2760, 0x2760, 0x300c, 0x300e, 0x301c, 0x301d,
|
||||
0x302a, 0x302a, 0x302c, 0x302d, 0x3030, 0x3031, 0x3034, 0x3036,
|
||||
0x303c, 0x303c, 0x305e, 0x305f,
|
||||
0x22ff, 0x22ff, 0x2340, 0x2343, 0x2440, 0x2440, 0x2444, 0x2444,
|
||||
0x2448, 0x244d, 0x2468, 0x2469, 0x246c, 0x246d, 0x2470, 0x2470,
|
||||
0x2472, 0x2472, 0x2474, 0x2475, 0x2479, 0x247a, 0x24c0, 0x24d3,
|
||||
0x24e4, 0x24ef, 0x2500, 0x2509, 0x250c, 0x250c, 0x250e, 0x250e,
|
||||
0x2510, 0x2511, 0x2514, 0x2515, 0x25e4, 0x25e4, 0x25ea, 0x25ea,
|
||||
0x25ec, 0x25ed, 0x25f0, 0x25f0, 0x2600, 0x2612, 0x2614, 0x2617,
|
||||
0x261a, 0x261a, 0x2640, 0x267e, 0x2680, 0x268b, 0x26c0, 0x26c0,
|
||||
0x26c4, 0x26ce, 0x26d0, 0x26d8, 0x26df, 0x26e6, 0x26e8, 0x26e9,
|
||||
0x26ec, 0x26ec, 0x26f0, 0x26f7, 0x26ff, 0x26ff, 0x2740, 0x2743,
|
||||
0x300c, 0x300e, 0x301c, 0x301d, 0x302a, 0x302a, 0x302c, 0x302d,
|
||||
0x3030, 0x3031, 0x3034, 0x3036, 0x303c, 0x303c, 0x305e, 0x305f,
|
||||
~0 /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "dsi_cfg.h"
|
||||
#include "msm_kms.h"
|
||||
|
||||
#define DSI_RESET_TOGGLE_DELAY_MS 20
|
||||
|
||||
static int dsi_get_version(const void __iomem *base, u32 *major, u32 *minor)
|
||||
{
|
||||
u32 ver;
|
||||
@@ -906,7 +908,7 @@ static void dsi_sw_reset(struct msm_dsi_host *msm_host)
|
||||
wmb(); /* clocks need to be enabled before reset */
|
||||
|
||||
dsi_write(msm_host, REG_DSI_RESET, 1);
|
||||
wmb(); /* make sure reset happen */
|
||||
msleep(DSI_RESET_TOGGLE_DELAY_MS); /* make sure reset happen */
|
||||
dsi_write(msm_host, REG_DSI_RESET, 0);
|
||||
}
|
||||
|
||||
@@ -1288,7 +1290,7 @@ static void dsi_sw_reset_restore(struct msm_dsi_host *msm_host)
|
||||
|
||||
/* dsi controller can only be reset while clocks are running */
|
||||
dsi_write(msm_host, REG_DSI_RESET, 1);
|
||||
wmb(); /* make sure reset happen */
|
||||
msleep(DSI_RESET_TOGGLE_DELAY_MS); /* make sure reset happen */
|
||||
dsi_write(msm_host, REG_DSI_RESET, 0);
|
||||
wmb(); /* controller out of reset */
|
||||
dsi_write(msm_host, REG_DSI_CTRL, data0);
|
||||
|
||||
@@ -635,7 +635,7 @@ fail:
|
||||
if (cfg_handler)
|
||||
mdp5_cfg_destroy(cfg_handler);
|
||||
|
||||
return NULL;
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
static struct mdp5_cfg_platform *mdp5_get_config(struct platform_device *dev)
|
||||
|
||||
@@ -87,7 +87,7 @@ nvkm_gddr3_calc(struct nvkm_ram *ram)
|
||||
WR = (ram->next->bios.timing[2] & 0x007f0000) >> 16;
|
||||
/* XXX: Get these values from the VBIOS instead */
|
||||
DLL = !(ram->mr[1] & 0x1);
|
||||
RON = !(ram->mr[1] & 0x300) >> 8;
|
||||
RON = !((ram->mr[1] & 0x300) >> 8);
|
||||
break;
|
||||
default:
|
||||
return -ENOSYS;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user