mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
soc/tegra: Changes for v7.2-rc1
These changes update some maintainer contact information, add a modern way of reading the chip information and cleanup/enhance some existing code. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmobyCUACgkQ3SOs138+ s6GPYg//dX92g9SuxAemSCQNpvJlVJ+bUY39aL4AD+94bvT9h9aXmTthJSmWiWq+ gh75d2meLanswoD8ziRnL4TKixI21TxzCCxHEBJ0rknIVDnXx5lU/6ihPgHvcUfm 43CZzrLad4O9EnifGxPdA1HLD/uyCl/iN2DB/3hjL03zQO/2694hFjJEV8CYDFeO Lwcbft9AvdjKDdRwIEXniBvIQSBvchYdQ1FUAoPAabpVKIPYvKjSdynXMfWrDuoI Lf0anSBP0RiRTPiaV2iSBaQ2i+IAMnyljPba4uJ6NcXaVO7o+Cjlv4eaTpxbrR3v NrK4zDXUSfT/1zdLThhzvQMI+3wW/Ni79P0hc676VFZW6SjdVuQWjkwlx1CFAvxr nIWNM/Y+ESakKl2sjmZVV9L4uoU6gMTe1jtZCYjcU6jB93cw6swCzJvyu8QDPfKE qEYAmSYEfDhTCy2rOn0PwotAfh33vcH+Q/G7KhMsT44vHBETMPI41DQtWpQizWqm Gerll7ugHSuk5D5GU1yRcZTSxbsgnPq2sYEjBFV5Px2daZ55/q5DTD7S2f7PD6Z7 XFijgYr3XdS73k1EpJUl2zkkXcIaErZF3wSAMn4c5wVFQuWipbP6ZJuwtzRzGdXw 5ywOp2coxfe36ks3/oP6GIybPiepsEPk1yYbYR4ssnOuO9EqAys= =d+5I -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmooFMgACgkQmmx57+YA GNlehhAAnDZM42f71/vVzCC0Ll/H365l9yCg5JtwgenvgpTBSgXmGNoYcMR9zadj qNa9lotrHjSf4Fh0+XKRTaiozddbRKOAykdaOXqvBQEqTR8tXYNAHWFnIb6lov6r 1shqs09kb6hm7p4hTo1D//fQI93OAxiOKdQkPVEjJKYoSFYaWAg5Wb3nj3D4gIh1 NLsyjcjvSTcOOEio/JPvHjNpi5/3s/urkmE7xpULagd+C0FnUL5q88pP4IcffMzi U4XnpMBfUVdVsrYZPgBXhN2g1ii33c8/kGaq8CKIyn+U8o4llHapmomXZm16ZXHj sc6idjXEbfzsbaXBHvtVIb+MdOIZ9AJ2Z3Y/PVkoC3h9Cki++44Ym1RGlb7lu4Hj MkdTx1j+hJImQcQval1XPnO89vt9SPcPZ9DHi6bqo2SEyXrXtum7IuAmVUpPFAl6 39yFkzjnnc/3plau2AmGN7+8aD6qwsauWzI160CryAc51xJIFa7Oyc6plRPdRZ3r ICNGoL6vGlntPvhPW4oNJ+yQ4SL2CN4PkN6MRPAJ2g9l8WuL0pojtaB+WKjbc9X7 DnbnJJUobz14yquxmBKah6waijUkv3RpguNgaDvv4yNjglJLHiG7mLCZLBxw1wo8 dr709LRGSG20cQjRl2j+wzI1iUXuJ4AZJ2UfnUyhreHrfQf6t5c= =zXJz -----END PGP SIGNATURE----- Merge tag 'tegra-for-7.2-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Changes for v7.2-rc1 These changes update some maintainer contact information, add a modern way of reading the chip information and cleanup/enhance some existing code. * tag 'tegra-for-7.2-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: Use ARM SMCCC to get chip ID, revision, and platform info soc/tegra: fuse: Register nvmem lookups at probe Documentation: ABI: Take over as contact for sysfs-driver-tegra-fuse MAINTAINERS: Move Peter De Schrijver to CREDITS bus: tegra-aconnect: Use dev_err_probe for probe error paths Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
aa75b5370d
10
CREDITS
10
CREDITS
|
|
@ -3668,7 +3668,17 @@ D: Macintosh IDE Driver
|
|||
|
||||
N: Peter De Schrijver
|
||||
E: stud11@cc4.kuleuven.ac.be
|
||||
E: p2@mind.be
|
||||
E: peter.de-schrijver@nokia.com
|
||||
E: pdeschrijver@nvidia.com
|
||||
E: p2@psychaos.be
|
||||
D: Apollo Domain workstations
|
||||
D: Ariadne and Hydra Amiga Ethernet drivers
|
||||
D: IBM PS/2, Microchannel, and Token Ring support
|
||||
D: Mitsumi CD-ROM driver patches March version
|
||||
D: TWL4030 power management and audio codec driver
|
||||
D: OMAP power management
|
||||
D: NVIDIA Tegra clock and BPMP drivers, among many other things
|
||||
S: Molenbaan 29
|
||||
S: B2240 Zandhoven
|
||||
S: Belgium
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
What: /sys/devices/*/<our-device>/fuse
|
||||
Date: February 2014
|
||||
Contact: Peter De Schrijver <pdeschrijver@nvidia.com>
|
||||
Contact: Thierry Reding <thierry.reding@kernel.org>
|
||||
Description: read-only access to the efuses on Tegra20, Tegra30, Tegra114
|
||||
and Tegra124 SoC's from NVIDIA. The efuses contain write once
|
||||
data programmed at the factory. The data is laid out in 32bit
|
||||
|
|
|
|||
|
|
@ -26229,7 +26229,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git
|
|||
N: [^a-z]tegra
|
||||
|
||||
TEGRA CLOCK DRIVER
|
||||
M: Peter De Schrijver <pdeschrijver@nvidia.com>
|
||||
M: Prashant Gaikwad <pgaikwad@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/clk/tegra/
|
||||
|
|
|
|||
|
|
@ -32,16 +32,14 @@ static int tegra_aconnect_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
aconnect->ape_clk = devm_clk_get(&pdev->dev, "ape");
|
||||
if (IS_ERR(aconnect->ape_clk)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve ape clock\n");
|
||||
return PTR_ERR(aconnect->ape_clk);
|
||||
}
|
||||
if (IS_ERR(aconnect->ape_clk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(aconnect->ape_clk),
|
||||
"can't retrieve ape clock\n");
|
||||
|
||||
aconnect->apb2ape_clk = devm_clk_get(&pdev->dev, "apb2ape");
|
||||
if (IS_ERR(aconnect->apb2ape_clk)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve apb2ape clock\n");
|
||||
return PTR_ERR(aconnect->apb2ape_clk);
|
||||
}
|
||||
if (IS_ERR(aconnect->apb2ape_clk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(aconnect->apb2ape_clk),
|
||||
"can't retrieve apb2ape clock\n");
|
||||
|
||||
dev_set_drvdata(&pdev->dev, aconnect);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
|
|
|||
|
|
@ -182,10 +182,6 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
fuse->soc->init(fuse);
|
||||
|
||||
err = tegra_fuse_add_lookups(fuse);
|
||||
if (err)
|
||||
return dev_err_probe(&pdev->dev, err, "failed to add FUSE lookups\n");
|
||||
}
|
||||
|
||||
fuse->clk = devm_clk_get_optional(&pdev->dev, "fuse");
|
||||
|
|
@ -231,6 +227,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
|||
return err;
|
||||
}
|
||||
|
||||
err = tegra_fuse_add_lookups(fuse);
|
||||
if (err)
|
||||
return dev_err_probe(&pdev->dev, err, "failed to add FUSE lookups\n");
|
||||
|
||||
fuse->rst = devm_reset_control_get_optional(&pdev->dev, "fuse");
|
||||
if (IS_ERR(fuse->rst))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(fuse->rst), "failed to get FUSE reset\n");
|
||||
|
|
@ -473,7 +473,7 @@ static int __init tegra_init_fuse(void)
|
|||
const struct of_device_id *match;
|
||||
struct device_node *np;
|
||||
struct resource regs;
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
tegra_init_apbmisc();
|
||||
|
||||
|
|
@ -566,10 +566,6 @@ static int __init tegra_init_fuse(void)
|
|||
|
||||
tegra_fuse_print_sku_info(&tegra_sku_info);
|
||||
|
||||
err = tegra_fuse_add_lookups(fuse);
|
||||
if (err)
|
||||
pr_err("failed to add FUSE lookups\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
early_initcall(tegra_init_fuse);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
|
|
@ -27,6 +28,11 @@
|
|||
#define PMC_STRAPPING_OPT_A_RAM_CODE_MASK_SHORT \
|
||||
(0x3 << PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT)
|
||||
|
||||
#define TEGRA_SMCCC_PLATFORM(x) (((x) >> 8) & 0xff)
|
||||
#define TEGRA_SMCCC_CHIP_ID(x) (((x) >> 4) & 0xff)
|
||||
#define TEGRA_SMCCC_MAJOR_REV(x) ((x) & 0xf)
|
||||
#define TEGRA_SMCCC_MINOR_REV(x) ((x) & 0xf)
|
||||
|
||||
static void __iomem *apbmisc_base;
|
||||
static bool long_ram_code;
|
||||
static u32 strapping;
|
||||
|
|
@ -34,28 +40,56 @@ static u32 chipid;
|
|||
|
||||
u32 tegra_read_chipid(void)
|
||||
{
|
||||
WARN(!chipid, "Tegra APB MISC not yet available\n");
|
||||
WARN(!apbmisc_base, "Tegra APB MISC not yet available\n");
|
||||
|
||||
if (!chipid)
|
||||
chipid = readl_relaxed(apbmisc_base + 4);
|
||||
|
||||
return chipid;
|
||||
}
|
||||
|
||||
u8 tegra_get_chip_id(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY)
|
||||
s32 soc_id = arm_smccc_get_soc_id_version();
|
||||
|
||||
if (soc_id >= 0)
|
||||
return TEGRA_SMCCC_CHIP_ID(soc_id);
|
||||
#endif
|
||||
return (tegra_read_chipid() >> 8) & 0xff;
|
||||
}
|
||||
|
||||
u8 tegra_get_major_rev(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY)
|
||||
s32 soc_id = arm_smccc_get_soc_id_version();
|
||||
|
||||
if (soc_id >= 0)
|
||||
return TEGRA_SMCCC_MAJOR_REV(soc_id);
|
||||
#endif
|
||||
return (tegra_read_chipid() >> 4) & 0xf;
|
||||
}
|
||||
|
||||
u8 tegra_get_minor_rev(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY)
|
||||
s32 revision = arm_smccc_get_soc_id_revision();
|
||||
|
||||
if (revision >= 0)
|
||||
return TEGRA_SMCCC_MINOR_REV(revision);
|
||||
#endif
|
||||
return (tegra_read_chipid() >> 16) & 0xf;
|
||||
|
||||
}
|
||||
|
||||
u8 tegra_get_platform(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY)
|
||||
s32 revision = arm_smccc_get_soc_id_revision();
|
||||
|
||||
if (revision >= 0)
|
||||
return TEGRA_SMCCC_PLATFORM(revision);
|
||||
#endif
|
||||
return (tegra_read_chipid() >> 20) & 0xf;
|
||||
}
|
||||
|
||||
|
|
@ -170,9 +204,7 @@ static void tegra_init_apbmisc_resources(struct resource *apbmisc,
|
|||
void __iomem *strapping_base;
|
||||
|
||||
apbmisc_base = ioremap(apbmisc->start, resource_size(apbmisc));
|
||||
if (apbmisc_base)
|
||||
chipid = readl_relaxed(apbmisc_base + 4);
|
||||
else
|
||||
if (!apbmisc_base)
|
||||
pr_err("failed to map APBMISC registers\n");
|
||||
|
||||
strapping_base = ioremap(straps->start, resource_size(straps));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user