Merge keystone/mirror-android12-5.10 into keystone/android12-5.10-keystone-qcom-dev
* keystone/mirror-android12-5.10: ANDROID: qcom: Add qdisc related symbols ANDROID: scsi: ufs: add complete init vendor hook ANDROID: Update the ABI representation ANDROID: scsi: ufs: Rename struct ufs_hba_with_hpb into ufs_hba_add_info FROMLIST: scsi: ufs: Fix task management completion ANDROID: GKI: rockchip: Enable symbols for LED hardbeat ANDROID: GKI: rockchip: Enable symbols for phy ANDROID: GKI: rockchip: Enable symbols for pwm_bl ANDROID: GKI: rockchip: Enable symbol for act8865 ANDROID: GKI: rockchip: Enable symbols for adc-keys ANDROID: GKI: rockchip: Enable symbols for scsi ch ANDROID: GKI: rockchip: Enable symbols for cpufreq governor ANDROID: GKI: rockchip: Enable symbols for mmc driver ANDROID: GKI: rockchip: Enable symbol for cw2015_battery ANDROID: GKI: rockchip: Enable symbols for iio ANDROID: GKI: rockchip: Enable symbol for nvme ANDROID: GKI: rockchip: Enable symbol for ov5695 ANDROID: GKI: rockchip: Enable symbol for panel-simple ANDROID: GKI: rockchip: Enable symbols for rtc-rk808 Signed-off-by: Daniel Norman <danielnorman@google.com> Bug: 185809932 Bug: 194515348 Bug: 200291871 Bug: 201660525 Change-Id: I70c327e4c138e8990d7ab851c2245d41d329af91
This commit is contained in:
commit
69d9560893
File diff suppressed because it is too large
Load Diff
@ -1284,6 +1284,7 @@
|
||||
of_root
|
||||
of_thermal_get_ntrips
|
||||
of_thermal_get_trip_points
|
||||
of_thermal_is_trip_valid
|
||||
of_translate_address
|
||||
of_usb_host_tpl_support
|
||||
page_endio
|
||||
@ -1931,6 +1932,7 @@
|
||||
__traceiter_android_rvh_typec_tcpci_chk_contaminant
|
||||
__traceiter_android_rvh_typec_tcpci_get_vbus
|
||||
__traceiter_android_rvh_uclamp_eff_get
|
||||
__traceiter_android_rvh_ufs_complete_init
|
||||
__traceiter_android_rvh_ufs_reprogram_all_keys
|
||||
__traceiter_android_rvh_util_est_update
|
||||
__traceiter_android_vh_arch_set_freq_scale
|
||||
@ -2008,6 +2010,7 @@
|
||||
__tracepoint_android_rvh_typec_tcpci_chk_contaminant
|
||||
__tracepoint_android_rvh_typec_tcpci_get_vbus
|
||||
__tracepoint_android_rvh_uclamp_eff_get
|
||||
__tracepoint_android_rvh_ufs_complete_init
|
||||
__tracepoint_android_rvh_ufs_reprogram_all_keys
|
||||
__tracepoint_android_rvh_util_est_update
|
||||
__tracepoint_android_vh_arch_set_freq_scale
|
||||
|
@ -1960,6 +1960,7 @@
|
||||
register_kretprobe
|
||||
register_memory_notifier
|
||||
register_module_notifier
|
||||
register_qdisc
|
||||
register_netdev
|
||||
register_netdevice
|
||||
register_netdevice_notifier
|
||||
@ -2814,6 +2815,7 @@
|
||||
unregister_oom_notifier
|
||||
unregister_pernet_device
|
||||
unregister_pm_notifier
|
||||
unregister_qdisc
|
||||
unregister_reboot_notifier
|
||||
unregister_restart_handler
|
||||
unregister_rpmsg_driver
|
||||
|
@ -252,6 +252,9 @@
|
||||
kvmalloc_node
|
||||
led_classdev_register_ext
|
||||
led_classdev_unregister
|
||||
led_set_brightness_nosleep
|
||||
led_trigger_register
|
||||
led_trigger_unregister
|
||||
__list_add_valid
|
||||
__list_del_entry_valid
|
||||
__log_post_read_mmio
|
||||
@ -301,6 +304,7 @@
|
||||
of_property_read_u32_index
|
||||
of_property_read_variable_u32_array
|
||||
of_regulator_match
|
||||
of_usb_get_dr_mode_by_phy
|
||||
__page_pinner_migration_failed
|
||||
panic_notifier_list
|
||||
param_ops_bool
|
||||
@ -336,6 +340,7 @@
|
||||
put_disk
|
||||
__put_page
|
||||
__put_task_struct
|
||||
pwm_adjust_config
|
||||
pwm_apply_state
|
||||
queue_delayed_work_on
|
||||
queue_work_on
|
||||
@ -468,10 +473,15 @@
|
||||
wakeup_source_add
|
||||
__warn_printk
|
||||
|
||||
# required by act8865-regulator.ko
|
||||
regulator_set_pull_down_regmap
|
||||
|
||||
# required by adc-keys.ko
|
||||
devm_iio_channel_get
|
||||
iio_get_channel_type
|
||||
iio_read_channel_processed
|
||||
input_set_poll_interval
|
||||
input_setup_polling
|
||||
|
||||
# required by aes-ce-ccm.ko
|
||||
ce_aes_expandkey
|
||||
@ -482,6 +492,7 @@
|
||||
scsi_device_lookup
|
||||
__scsi_execute
|
||||
scsi_print_sense_hdr
|
||||
scsi_register_driver
|
||||
|
||||
# required by clk-pwm.ko
|
||||
of_clk_add_hw_provider
|
||||
@ -529,19 +540,30 @@
|
||||
|
||||
# required by cpufreq_ondemand.ko
|
||||
cpufreq_cpu_get_raw
|
||||
cpufreq_dbs_governor_exit
|
||||
cpufreq_dbs_governor_init
|
||||
cpufreq_dbs_governor_limits
|
||||
cpufreq_dbs_governor_start
|
||||
cpufreq_dbs_governor_stop
|
||||
cpufreq_table_index_unsorted
|
||||
cpus_read_lock
|
||||
cpus_read_unlock
|
||||
dbs_update
|
||||
get_cpu_idle_time_us
|
||||
gov_update_cpu_data
|
||||
store_sampling_rate
|
||||
|
||||
# required by cw2015_battery.ko
|
||||
device_property_read_u8_array
|
||||
power_supply_am_i_supplied
|
||||
power_supply_get_battery_info
|
||||
power_supply_put_battery_info
|
||||
regmap_raw_read
|
||||
regmap_raw_write
|
||||
|
||||
# required by dw_mmc-rockchip.ko
|
||||
clk_get_phase
|
||||
clk_set_phase
|
||||
mmc_send_tuning
|
||||
|
||||
# required by dw_mmc.ko
|
||||
@ -653,6 +675,8 @@
|
||||
bitmap_free
|
||||
bitmap_zalloc
|
||||
iio_channel_get_all
|
||||
iio_channel_release_all
|
||||
iio_update_buffers
|
||||
|
||||
# required by industrialio-triggered-buffer.ko
|
||||
iio_alloc_pollfunc
|
||||
@ -677,6 +701,7 @@
|
||||
|
||||
# required by ledtrig-heartbeat.ko
|
||||
atomic_notifier_chain_unregister
|
||||
avenrun
|
||||
|
||||
# required by lzo-rle.ko
|
||||
lzorle1x_1_compress
|
||||
@ -813,6 +838,7 @@
|
||||
pci_save_state
|
||||
pci_select_bars
|
||||
pci_set_master
|
||||
pci_sriov_configure_simple
|
||||
pci_unregister_driver
|
||||
pm_suspend_global_flags
|
||||
sg_init_table
|
||||
@ -853,6 +879,7 @@
|
||||
pm_runtime_get_if_active
|
||||
strscpy
|
||||
__v4l2_ctrl_modify_range
|
||||
v4l2_ctrl_new_int_menu
|
||||
|
||||
# required by panel-simple.ko
|
||||
drm_bus_flags_from_videomode
|
||||
@ -877,15 +904,19 @@
|
||||
of_drm_get_panel_orientation
|
||||
of_find_i2c_adapter_by_node
|
||||
of_get_display_timing
|
||||
of_get_drm_display_mode
|
||||
of_parse_phandle
|
||||
videomode_from_timing
|
||||
|
||||
# required by phy-rockchip-inno-dsidphy.ko
|
||||
devm_platform_ioremap_resource_byname
|
||||
phy_mipi_dphy_config_validate
|
||||
platform_get_resource_byname
|
||||
|
||||
# required by phy-rockchip-inno-usb2.ko
|
||||
devm_extcon_register_notifier
|
||||
extcon_set_state
|
||||
extcon_sync
|
||||
wakeup_source_remove
|
||||
|
||||
# required by phy-rockchip-typec.ko
|
||||
@ -997,6 +1028,8 @@
|
||||
thermal_zone_device_update
|
||||
|
||||
# required by rtc-rk808.ko
|
||||
_bcd2bin
|
||||
_bin2bcd
|
||||
devm_rtc_allocate_device
|
||||
__rtc_register_device
|
||||
rtc_time64_to_tm
|
||||
@ -1007,7 +1040,9 @@
|
||||
devm_clk_bulk_get_optional
|
||||
dma_get_required_mask
|
||||
sdhci_add_host
|
||||
sdhci_adma_write_desc
|
||||
sdhci_get_property
|
||||
sdhci_pltfm_clk_get_max_clock
|
||||
sdhci_pltfm_free
|
||||
sdhci_pltfm_init
|
||||
sdhci_remove_host
|
||||
@ -1015,6 +1050,7 @@
|
||||
sdhci_reset
|
||||
sdhci_resume_host
|
||||
sdhci_set_bus_width
|
||||
sdhci_set_clock
|
||||
sdhci_suspend_host
|
||||
|
||||
# required by sg.ko
|
||||
|
@ -214,6 +214,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_filemap_fault_cache_page);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_enable_thermal_genl_check);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_pm_notify_suspend);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_fill_prdt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ufs_complete_init);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ufs_reprogram_all_keys);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_prepare_command);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_update_sysfs);
|
||||
|
25
drivers/scsi/ufs/ufshcd-add-info.h
Normal file
25
drivers/scsi/ufs/ufshcd-add-info.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#ifndef _UFSHCD_ADD_INFO_H_
|
||||
#define _UFSHCD_ADD_INFO_H_
|
||||
|
||||
/*
|
||||
* Compared to the upstream equivalent, @hpb_dev has been moved from struct
|
||||
* ufs_hba into struct ufs_hba_add_info to satisfy the Android ABI checks.
|
||||
* Do NOT use this data structure in any out-of-tree driver since it is not
|
||||
* covered by the GKI.
|
||||
*/
|
||||
struct ufs_hba_add_info {
|
||||
struct ufs_hba hba;
|
||||
struct request **tmf_rqs;
|
||||
#ifdef CONFIG_SCSI_UFS_HPB
|
||||
struct ufshpb_dev_info hpb_dev;
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline struct ufs_hba_add_info *ufs_hba_add_info(struct ufs_hba *hba)
|
||||
{
|
||||
return container_of(hba, struct ufs_hba_add_info, hba);
|
||||
}
|
||||
|
||||
#endif /* _UFSHCD_ADD_INFO_H_ */
|
@ -17,6 +17,7 @@
|
||||
#include <linux/blk-pm.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include "ufshcd.h"
|
||||
#include "ufshcd-add-info.h"
|
||||
#include "ufs_quirks.h"
|
||||
#include "unipro.h"
|
||||
#include "ufs-sysfs.h"
|
||||
@ -6362,27 +6363,6 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba, u32 intr_status)
|
||||
return retval;
|
||||
}
|
||||
|
||||
struct ctm_info {
|
||||
struct ufs_hba *hba;
|
||||
unsigned long pending;
|
||||
unsigned int ncpl;
|
||||
};
|
||||
|
||||
static bool ufshcd_compl_tm(struct request *req, void *priv, bool reserved)
|
||||
{
|
||||
struct ctm_info *const ci = priv;
|
||||
struct completion *c;
|
||||
|
||||
WARN_ON_ONCE(reserved);
|
||||
if (test_bit(req->tag, &ci->pending))
|
||||
return true;
|
||||
ci->ncpl++;
|
||||
c = req->end_io_data;
|
||||
if (c)
|
||||
complete(c);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ufshcd_tmc_handler - handle task management function completion
|
||||
* @hba: per adapter instance
|
||||
@ -6393,18 +6373,25 @@ static bool ufshcd_compl_tm(struct request *req, void *priv, bool reserved)
|
||||
*/
|
||||
static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct request_queue *q = hba->tmf_queue;
|
||||
struct ctm_info ci = {
|
||||
.hba = hba,
|
||||
};
|
||||
struct request **tmf_rqs = ufs_hba_add_info(hba)->tmf_rqs;
|
||||
unsigned long flags, pending, issued;
|
||||
irqreturn_t ret = IRQ_NONE;
|
||||
int tag;
|
||||
|
||||
pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL);
|
||||
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
ci.pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL);
|
||||
blk_mq_tagset_busy_iter(q->tag_set, ufshcd_compl_tm, &ci);
|
||||
issued = hba->outstanding_tasks & ~pending;
|
||||
for_each_set_bit(tag, &issued, hba->nutmrs) {
|
||||
struct request *req = tmf_rqs[tag];
|
||||
struct completion *c = req->end_io_data;
|
||||
|
||||
complete(c);
|
||||
ret = IRQ_HANDLED;
|
||||
}
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
|
||||
return ci.ncpl ? IRQ_HANDLED : IRQ_NONE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -6509,6 +6496,7 @@ static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)
|
||||
static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
|
||||
struct utp_task_req_desc *treq, u8 tm_function)
|
||||
{
|
||||
struct request **tmf_rqs = ufs_hba_add_info(hba)->tmf_rqs;
|
||||
struct request_queue *q = hba->tmf_queue;
|
||||
struct Scsi_Host *host = hba->host;
|
||||
DECLARE_COMPLETION_ONSTACK(wait);
|
||||
@ -6527,9 +6515,9 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
|
||||
ufshcd_hold(hba, false);
|
||||
|
||||
spin_lock_irqsave(host->host_lock, flags);
|
||||
blk_mq_start_request(req);
|
||||
|
||||
task_tag = req->tag;
|
||||
tmf_rqs[req->tag] = req;
|
||||
treq->req_header.dword_0 |= cpu_to_be32(task_tag);
|
||||
|
||||
memcpy(hba->utmrdl_base_addr + task_tag, treq, sizeof(*treq));
|
||||
@ -6573,6 +6561,7 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
|
||||
}
|
||||
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
tmf_rqs[req->tag] = NULL;
|
||||
__clear_bit(task_tag, &hba->outstanding_tasks);
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
|
||||
@ -8041,6 +8030,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba, bool async)
|
||||
ufshcd_auto_hibern8_enable(hba);
|
||||
|
||||
ufshpb_reset(hba);
|
||||
|
||||
trace_android_rvh_ufs_complete_init(hba);
|
||||
out:
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
if (ret)
|
||||
@ -9322,7 +9313,7 @@ int ufshcd_alloc_host(struct device *dev, struct ufs_hba **hba_handle)
|
||||
}
|
||||
|
||||
host = scsi_host_alloc(&ufshcd_driver_template,
|
||||
sizeof(struct ufs_hba_with_hpb));
|
||||
sizeof(struct ufs_hba_add_info));
|
||||
if (!host) {
|
||||
dev_err(dev, "scsi_host_alloc failed\n");
|
||||
err = -ENOMEM;
|
||||
@ -9363,6 +9354,7 @@ static const struct blk_mq_ops ufshcd_tmf_ops = {
|
||||
*/
|
||||
int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
|
||||
{
|
||||
struct request ***tmf_rqs = &ufs_hba_add_info(hba)->tmf_rqs;
|
||||
int err;
|
||||
struct Scsi_Host *host = hba->host;
|
||||
struct device *dev = hba->dev;
|
||||
@ -9500,6 +9492,12 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
|
||||
err = PTR_ERR(hba->tmf_queue);
|
||||
goto free_tmf_tag_set;
|
||||
}
|
||||
*tmf_rqs = devm_kcalloc(hba->dev, hba->nutmrs, sizeof(**tmf_rqs),
|
||||
GFP_KERNEL);
|
||||
if (!*tmf_rqs) {
|
||||
err = -ENOMEM;
|
||||
goto free_tmf_queue;
|
||||
}
|
||||
|
||||
/* Reset the attached device */
|
||||
ufshcd_vops_device_reset(hba);
|
||||
|
@ -843,6 +843,12 @@ struct ufs_hba {
|
||||
|
||||
struct blk_mq_tag_set tmf_tag_set;
|
||||
struct request_queue *tmf_queue;
|
||||
#if 0
|
||||
/*
|
||||
* This has been moved into struct ufs_hba_add_info because of the GKI.
|
||||
*/
|
||||
struct request **tmf_rqs;
|
||||
#endif
|
||||
|
||||
struct uic_command *active_uic_cmd;
|
||||
struct mutex uic_cmd_mutex;
|
||||
@ -913,7 +919,7 @@ struct ufs_hba {
|
||||
struct delayed_work rpm_dev_flush_recheck_work;
|
||||
|
||||
#if 0
|
||||
/* This has been moved into struct ufs_hba_with_hpb. */
|
||||
/* This has been moved into struct ufs_hba_add_info. */
|
||||
struct ufshpb_dev_info ufshpb_dev;
|
||||
#endif
|
||||
|
||||
@ -935,17 +941,6 @@ struct ufs_hba {
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
|
||||
/*
|
||||
* Compared to the upstream equivalent, @hpb_dev has been moved from struct
|
||||
* ufs_hba into struct ufs_hba_with_hpb to satisfy the Android ABI checks.
|
||||
*/
|
||||
struct ufs_hba_with_hpb {
|
||||
struct ufs_hba hba;
|
||||
#ifdef CONFIG_SCSI_UFS_HPB
|
||||
struct ufshpb_dev_info hpb_dev;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Returns true if clocks can be gated. Otherwise false */
|
||||
static inline bool ufshcd_is_clkgating_allowed(struct ufs_hba *hba)
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <linux/async.h>
|
||||
|
||||
#include "ufshcd.h"
|
||||
#include "ufshcd-add-info.h"
|
||||
#include "ufshpb.h"
|
||||
#include "../sd.h"
|
||||
|
||||
@ -37,7 +38,7 @@ static void ufshpb_update_active_info(struct ufshpb_lu *hpb, int rgn_idx,
|
||||
|
||||
static inline struct ufshpb_dev_info *ufs_hba_to_hpb(struct ufs_hba *hba)
|
||||
{
|
||||
return &container_of(hba, struct ufs_hba_with_hpb, hba)->hpb_dev;
|
||||
return &ufs_hba_add_info(hba)->hpb_dev;
|
||||
}
|
||||
|
||||
bool ufshpb_is_allowed(struct ufs_hba *hba)
|
||||
|
@ -19,6 +19,10 @@ DECLARE_HOOK(android_vh_ufs_fill_prdt,
|
||||
unsigned int segments, int *err),
|
||||
TP_ARGS(hba, lrbp, segments, err));
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_ufs_complete_init,
|
||||
TP_PROTO(struct ufs_hba *hba),
|
||||
TP_ARGS(hba), 1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_ufs_reprogram_all_keys,
|
||||
TP_PROTO(struct ufs_hba *hba, int *err),
|
||||
TP_ARGS(hba, err), 1);
|
||||
|
Loading…
Reference in New Issue
Block a user