mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
MMC core:
- Avoid bitfield RMW for claim/retune flags MMC host: - dw_mmc-rockchip: Fix runtime PM support for internal phase support - mmci: Fix device_node reference leak in of_get_dml_pipe_index() - sdhci-brcmstb: Use correct register offset for V1 pin_sel restore -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmmhyS4XHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnhaA/+IzAHwVL1DGwZNbO/5cO84rkL vx7Hnzt0CMbwkBlEdFFXUDt1/ESSWNQk2e7ydNCElwBIz0PdBp5hlMIyumksx1D0 sQibqz4kNywtAAVtFcgemKb8BVdf7bdwVD+5sGnFhHmX8+GyTjlTd9Qj/Yt7bgcA ywWfl+w45rR0bypGsfMJVQ3l2pslwiXTyo0K4TUJiZkCtpwu9hzSfFShGM2ipYFX HiSTGV240MvxYteuqgVJIFdQmEje1NczGjRS6s6BIvt7zwKcfJgJACpue6ZJu3Ra vy9NFnNXCQ2C1LFtr0MjjrdWBowed6/HJJoxCgfcmdxbnqYqZWMfDGrOtH6xP8HQ xGHJJF5BA3EvvyfBg5hgUKVvQ80yRnIYUJ52Tzwcm0U9gcHe1tu1rxRYwNPUpLBS L/smXIvt0j/WVPEjKO+I1TXB1XMqJFSh88vAut7UXbCtJZN9YBP/aRqXJSVc5gs/ LKNWrNr1qymusvPagnlMnYGOdJKQbBNKYeN7oyEwyN/oW/JF6JGVuWctvJQuigVz xDw2g7cnI/CMh+gAQumd1H23Rnwy+kL16Ld9z27ih4PB54Vq7VlTxbpJCdREDxU6 y8c3C09AKOjMfOPXwqnJ/2HH+y4IpYW9WykuaKJFRKekx87irKuc8BOC5cGwXL8H WXZbxqLrQM9GkPXiu+w= =zG3/ -----END PGP SIGNATURE----- Merge tag 'mmc-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Avoid bitfield RMW for claim/retune flags MMC host: - dw_mmc-rockchip: Fix runtime PM support for internal phase support - mmci: Fix device_node reference leak in of_get_dml_pipe_index() - sdhci-brcmstb: Use correct register offset for V1 pin_sel restore" * tag 'mmc-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: Avoid bitfield RMW for claim/retune flags mmc: sdhci-brcmstb: use correct register offset for V1 pin_sel restore mmc: dw_mmc-rockchip: Fix runtime PM support for internal phase support mmc: mmci: Fix device_node reference leak in of_get_dml_pipe_index()
This commit is contained in:
commit
962336b9ff
|
|
@ -36,6 +36,8 @@ struct dw_mci_rockchip_priv_data {
|
|||
int default_sample_phase;
|
||||
int num_phases;
|
||||
bool internal_phase;
|
||||
int sample_phase;
|
||||
int drv_phase;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -573,9 +575,43 @@ static void dw_mci_rockchip_remove(struct platform_device *pdev)
|
|||
dw_mci_pltfm_remove(pdev);
|
||||
}
|
||||
|
||||
static int dw_mci_rockchip_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct dw_mci *host = platform_get_drvdata(pdev);
|
||||
struct dw_mci_rockchip_priv_data *priv = host->priv;
|
||||
|
||||
if (priv->internal_phase) {
|
||||
priv->sample_phase = rockchip_mmc_get_phase(host, true);
|
||||
priv->drv_phase = rockchip_mmc_get_phase(host, false);
|
||||
}
|
||||
|
||||
return dw_mci_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int dw_mci_rockchip_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct dw_mci *host = platform_get_drvdata(pdev);
|
||||
struct dw_mci_rockchip_priv_data *priv = host->priv;
|
||||
int ret;
|
||||
|
||||
ret = dw_mci_runtime_resume(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (priv->internal_phase) {
|
||||
rockchip_mmc_set_phase(host, true, priv->sample_phase);
|
||||
rockchip_mmc_set_phase(host, false, priv->drv_phase);
|
||||
mci_writel(host, MISC_CON, MEM_CLK_AUTOGATE_ENABLE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
|
||||
SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
|
||||
RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL)
|
||||
RUNTIME_PM_OPS(dw_mci_rockchip_runtime_suspend, dw_mci_rockchip_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static struct platform_driver dw_mci_rockchip_pltfm_driver = {
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ static int of_get_dml_pipe_index(struct device_node *np, const char *name)
|
|||
&dma_spec))
|
||||
return -ENODEV;
|
||||
|
||||
of_node_put(dma_spec.np);
|
||||
if (dma_spec.args_count)
|
||||
return dma_spec.args[0];
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ static void sdhci_brcmstb_restore_regs(struct mmc_host *mmc, enum cfg_core_ver v
|
|||
writel(sr->boot_main_ctl, priv->boot_regs + SDIO_BOOT_MAIN_CTL);
|
||||
|
||||
if (ver == SDIO_CFG_CORE_V1) {
|
||||
writel(sr->sd_pin_sel, cr + SDIO_CFG_SD_PIN_SEL);
|
||||
writel(sr->sd_pin_sel, cr + SDIO_CFG_V1_SD_PIN_SEL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -486,14 +486,12 @@ struct mmc_host {
|
|||
|
||||
struct mmc_ios ios; /* current io bus settings */
|
||||
|
||||
bool claimed; /* host exclusively claimed */
|
||||
|
||||
/* group bitfields together to minimize padding */
|
||||
unsigned int use_spi_crc:1;
|
||||
unsigned int claimed:1; /* host exclusively claimed */
|
||||
unsigned int doing_init_tune:1; /* initial tuning in progress */
|
||||
unsigned int can_retune:1; /* re-tuning can be used */
|
||||
unsigned int doing_retune:1; /* re-tuning in progress */
|
||||
unsigned int retune_now:1; /* do re-tuning at next req */
|
||||
unsigned int retune_paused:1; /* re-tuning is temporarily disabled */
|
||||
unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */
|
||||
unsigned int can_dma_map_merge:1; /* merging can be used */
|
||||
unsigned int vqmmc_enabled:1; /* vqmmc regulator is enabled */
|
||||
|
|
@ -508,6 +506,9 @@ struct mmc_host {
|
|||
int rescan_disable; /* disable card detection */
|
||||
int rescan_entered; /* used with nonremovable devices */
|
||||
|
||||
bool can_retune; /* re-tuning can be used */
|
||||
bool retune_now; /* do re-tuning at next req */
|
||||
bool retune_paused; /* re-tuning is temporarily disabled */
|
||||
int need_retune; /* re-tuning is needed */
|
||||
int hold_retune; /* hold off re-tuning */
|
||||
unsigned int retune_period; /* re-tuning period in secs */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user