mirror of
https://github.com/torvalds/linux.git
synced 2026-05-13 00:28:54 +02:00
firmware: tegra: Changes for v7.1-rc1
This introduces a new API for the BPMP to be pass along a specifier from DT when getting a reference from a phandle. This is used to reference specific instances of the PCI controller on Tegra264. The ABI header for BPMP is updated to the latest version and BPMP APIs now use the more intuitive ENODEV instead of the non SUSV4 ENOTSUPP error code for stub implementations. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmnI8uEACgkQ3SOs138+ s6G6MBAAhn72KSsuPWimww9QwCxbscyJzw65Kg3nWdeK+XUyKMhO7KiRMUUPtiHu qc7BrwtLk4w8rT9+2VP7v47N2I4MVpLdewb2e0mqMWpUygC7oHxHeF/RYfjgRaKX srGgQmzdBgiQQe2x0FZdSfTvVumKvTYJE9QkwPCjfmaQh740K4BZyRgMTYJrk6Nd qw/vnVEuEU1Wxg3cyronVnt2V2xkp8BOPgEgYNK6yGanE6NfmETWFKb+aXTU4ZpY Ou5lz4sr3ssqS+rOdTAfwL8eOiUW8CrGwLVXBb5PesWCzydpcYtni5cvAZmPx+u7 f0/Z3Kxz+h64or2T5HQajQR+lCDYMapnonJKnUzCWNpBjXDlsuJ2MwVqkPIfFjcG D1JrfGoulFcmxFdskJFYptcT1izImCqYnqMO/5we6/EoOOenJpx+3iEWy76NRsHX zymq3z8nlt6WO3/GgKKcPEjaD6WoSpJJFC66DfADsUuXSiAoiFD7WFmTnOt1ZBrt xwUxJKmEbw6Z+MC2ZPNSG4gnHIty43+dCXYWfCNTljaO+I5Jsq+ZjQvWcQksa4MH A2J5/6A2mgaaxV6IG2tX3GFcJYB/7qjoSmxtvcKAMOEPcNu3EaWu9AFKKGycMbkc Ne5qvq0kLkPn47MLFWaF7wYSEeFAk6MNeHCQ7lm8rBF99oeYcGg= =MQCc -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnO2+EACgkQmmx57+YA GNlw9w//aV5hws4ODqH8LOpo2tOPcVXUurLbnZGULQiy30HmbUK2TKjU1P1aKVLE CmXS7XQUJi4vv8afNypUkU0ehouxRnVJY5eMKcLJsnq1pQydbjWjwWn18hx3+NPK R0jb0WFmrxPQ40jqY+1vMdbulAGLoqQjKGY7Vd+mOaFjJtaPw8+iFDsgtCSOLWlk G+BwOHSZMFaMHPLJ+ufwc/++MY/0ml8LIdbPfz4uaYGCsj6PkO1OMpaW5T7WUqQ1 zy6YnYuZNoL+VbeQGcrYTBXaQyu0Frk0314dz05O2hFpnL+0k2im5j0tp/+rQZyv PlpEkk2jFLQXJ8zTdVdWfF138uiV0X3wNdppuYBGe97MohY+b1n9Cb7kM9jHD6kn meqs5bzwaj7Oz/J/AjopG0xfRxiCSHRSsB/1hq49IbSktWv5FMDFc7LPjgL1YyPy kDYJDMxpZi/dotAbS0zNWBF3bPeBSmc9q0sPiEMdQHSwb3l0HCMp3JOWAf0vo6Qa asCHLgbb6UXQOZ5fJytRqNmEsbS6+DczlagM0h97dt1WHRNUjzmPgDtnuRScE2Ep B9uD5EOe+N9Z+1DF9DlMzgMC9n7nMjlQKQZyg9GNMX9pUNRVyKlBMUm59jKo5UOm 4odcE2L0tZQYyxS73/zBinFwm0vsKHHriR4ehsOzsmln5DWbJL0= =+Y40 -----END PGP SIGNATURE----- Merge tag 'tegra-for-7.1-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers firmware: tegra: Changes for v7.1-rc1 This introduces a new API for the BPMP to be pass along a specifier from DT when getting a reference from a phandle. This is used to reference specific instances of the PCI controller on Tegra264. The ABI header for BPMP is updated to the latest version and BPMP APIs now use the more intuitive ENODEV instead of the non SUSV4 ENOTSUPP error code for stub implementations. * tag 'tegra-for-7.1-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: bpmp: Use ENODEV instead of ENOTSUPP firmware: tegra: bpmp: Add tegra_bpmp_get_with_id() function soc/tegra: Update BPMP ABI header firmware: tegra: bpmp: Rename Tegra239 to Tegra238 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
f1aa30a4b2
|
|
@ -32,6 +32,40 @@ channel_to_ops(struct tegra_bpmp_channel *channel)
|
|||
return bpmp->soc->ops;
|
||||
}
|
||||
|
||||
struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int *id)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct of_phandle_args args;
|
||||
struct tegra_bpmp *bpmp;
|
||||
int err;
|
||||
|
||||
err = __of_parse_phandle_with_args(dev->of_node, "nvidia,bpmp", NULL,
|
||||
1, 0, &args);
|
||||
if (err < 0)
|
||||
return ERR_PTR(err);
|
||||
|
||||
pdev = of_find_device_by_node(args.np);
|
||||
if (!pdev) {
|
||||
bpmp = ERR_PTR(-ENODEV);
|
||||
goto put;
|
||||
}
|
||||
|
||||
bpmp = platform_get_drvdata(pdev);
|
||||
if (!bpmp) {
|
||||
bpmp = ERR_PTR(-EPROBE_DEFER);
|
||||
put_device(&pdev->dev);
|
||||
goto put;
|
||||
}
|
||||
|
||||
if (id)
|
||||
*id = args.args[0];
|
||||
|
||||
put:
|
||||
of_node_put(args.np);
|
||||
return bpmp;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_bpmp_get_with_id);
|
||||
|
||||
struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -127,6 +127,7 @@ struct tegra_bpmp_message {
|
|||
|
||||
#if IS_ENABLED(CONFIG_TEGRA_BPMP)
|
||||
struct tegra_bpmp *tegra_bpmp_get(struct device *dev);
|
||||
struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev, unsigned int *id);
|
||||
void tegra_bpmp_put(struct tegra_bpmp *bpmp);
|
||||
int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
|
||||
struct tegra_bpmp_message *msg);
|
||||
|
|
@ -143,21 +144,31 @@ bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp, unsigned int mrq);
|
|||
#else
|
||||
static inline struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
static inline struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev,
|
||||
unsigned int *id)
|
||||
{
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
static inline void tegra_bpmp_put(struct tegra_bpmp *bpmp)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
|
||||
struct tegra_bpmp_message *msg)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
|
||||
struct tegra_bpmp_message *msg)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel,
|
||||
int code, const void *data,
|
||||
size_t size)
|
||||
|
|
@ -169,8 +180,9 @@ static inline int tegra_bpmp_request_mrq(struct tegra_bpmp *bpmp,
|
|||
tegra_bpmp_mrq_handler_t handler,
|
||||
void *data)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline void tegra_bpmp_free_mrq(struct tegra_bpmp *bpmp,
|
||||
unsigned int mrq, void *data)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user