soc/tegra: Changes for v5.1-rc1

This contains a couple of miscellaneous fixes for minor issues and a
 largish rework of the PMC driver to make it work on systems where the
 PMC has been locked down and can only be accessed from secure firmware.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlxdmF8THHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zodlTD/44v+tiZRB+6P6XafKvwBEruq1INqab
 5vTj7OOhmL2WPonruTUaze6bWqpV84gaqorVfR8JYvWL6nT+JGVvEnQwBTgwMqlL
 PYmPc93PlvieBJMQGmKjLYypLWFfaihjIkdAgosVKkFhHcP4SqKBhtq1Gs+1nFaC
 6uWdz+9S+ad/JPiYnoBHC6DoeXBDM8izpRLlsqPPAZkfzAcH7vTXbKoXN+VOeB/l
 wvD5wlG90LwcoSoFlQsBEcEdklBGPO90ItJFJiqnjrHsxoHVzYSRfdy72/hXuTsp
 5p/L5OWjcMG9DP5cF0HbmWetqEgTOLoRseyXuZZN3O3XHdkj37IRXEbSugHI5pi4
 Oybm01TPvhyprNXjCDM6vxf3f0mlh3sPoHXRyM8KJuMkg5vb1L43Vs9BYCkKUMaO
 I/nR5EUXb3R5/PvumL6LEiZVvjtpPWXL4swmbRbKoKd2K9kgFxGoYYbbbdDVZNim
 KWGbo9LWL2BHMXi0exN+8XWE3lpdKQJWlWADpXhbZltEcq6oJCWqPe9glrAXl877
 jd552NrRL9wiZikI+iwWpIMEkX4DLdxlZLw5r5kjInqsyo6H/N9kpRZMvDVo3VIi
 d1o0gc2Y1wJbhkE1TXSYhZG9nbqKFPvT7V5aBbI6rYdNA3AgxwY4Rq65Ex0a3KGV
 WFWxanWAqhn9Vw==
 =C9+u
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.1-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers

soc/tegra: Changes for v5.1-rc1

This contains a couple of miscellaneous fixes for minor issues and a
largish rework of the PMC driver to make it work on systems where the
PMC has been locked down and can only be accessed from secure firmware.

* tag 'tegra-for-5.1-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Support systems where PMC is marked secure
  soc/tegra: pmc: Explicitly initialize all fields
  soc/tegra: pmc: Make alignment consistent
  soc/tegra: pmc: Pass struct tegra_pmc * where possible
  soc/tegra: pmc: Make tegra_powergate_is_powered() a local function
  soc/tegra: pmc: Add missing kerneldoc
  soc/tegra: pmc: Sort includes alphabetically
  soc/tegra: pmc: Use TEGRA186_ prefix for GPIO names
  soc/tegra: fuse: Fix typo in tegra210_init_speedo_data
  soc/tegra: fuse: Fix illegal free of IO base address

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2019-02-15 17:24:05 +01:00
commit a21c3f1795
4 changed files with 298 additions and 146 deletions

View File

@ -137,13 +137,17 @@ static int tegra_fuse_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fuse->phys = res->start;
fuse->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(fuse->base))
return PTR_ERR(fuse->base);
if (IS_ERR(fuse->base)) {
err = PTR_ERR(fuse->base);
fuse->base = base;
return err;
}
fuse->clk = devm_clk_get(&pdev->dev, "fuse");
if (IS_ERR(fuse->clk)) {
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
PTR_ERR(fuse->clk));
fuse->base = base;
return PTR_ERR(fuse->clk);
}
@ -152,8 +156,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)
if (fuse->soc->probe) {
err = fuse->soc->probe(fuse);
if (err < 0)
if (err < 0) {
fuse->base = base;
return err;
}
}
if (tegra_fuse_create_sysfs(&pdev->dev, fuse->soc->info->size,

View File

@ -131,7 +131,7 @@ void __init tegra210_init_speedo_data(struct tegra_sku_info *sku_info)
soc_speedo[0] = tegra_fuse_read_early(FUSE_SOC_SPEEDO_0);
soc_speedo[1] = tegra_fuse_read_early(FUSE_SOC_SPEEDO_1);
soc_speedo[2] = tegra_fuse_read_early(FUSE_CPU_SPEEDO_2);
soc_speedo[2] = tegra_fuse_read_early(FUSE_SOC_SPEEDO_2);
cpu_iddq = tegra_fuse_read_early(FUSE_CPU_IDDQ) * 4;
soc_iddq = tegra_fuse_read_early(FUSE_SOC_IDDQ) * 4;

File diff suppressed because it is too large Load Diff

View File

@ -161,7 +161,6 @@ enum tegra_io_pad {
#define TEGRA_IO_RAIL_LVDS TEGRA_IO_PAD_LVDS
#ifdef CONFIG_SOC_TEGRA_PMC
int tegra_powergate_is_powered(unsigned int id);
int tegra_powergate_power_on(unsigned int id);
int tegra_powergate_power_off(unsigned int id);
int tegra_powergate_remove_clamping(unsigned int id);
@ -182,11 +181,6 @@ void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
#else
static inline int tegra_powergate_is_powered(unsigned int id)
{
return -ENOSYS;
}
static inline int tegra_powergate_power_on(unsigned int id)
{
return -ENOSYS;