[PATCH] firmware: tegra: set drvdata earlier

2017-08-17 Thread Timo Alho
Subdevices of bpmp, such as bpmp-i2c, require the bpmp device's drvdata to be set during their probe. Currently this is not always the case. Fix this by calling platform_set_drvdata() earlier during bpmp's probe. Signed-off-by: Timo Alho <ta...@nvidia.com> --- drivers/firmware/tegra/bpmp

[PATCH] mmc: tegra: suppress errors when probe is deferred

2017-08-17 Thread Timo Alho
-by: Timo Alho <ta...@nvidia.com> --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index f668a6f..cdde9ff 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host

[PATCH] firmware: tegra: add BPMP debugfs support

2017-08-22 Thread Timo Alho
e and data to firmware via DRAM. Signed-off-by: Timo Alho <ta...@nvidia.com> --- drivers/firmware/tegra/Makefile | 4 +- drivers/firmware/tegra/bpmp.c | 2 + drivers/firmware/tegra/bpmp_debugfs.c | 446 ++ include/soc/tegra/bpmp.h |

[PATCH V2] firmware: tegra: add BPMP debugfs support

2017-10-03 Thread Timo Alho
e and data to firmware via DRAM. Signed-off-by: Timo Alho <ta...@nvidia.com> --- Changes in v2: - Address Jonathan's review feedback * restructure error printing and what error codes passed to higher layers * don't use IS_ERR_OR_NULL() * avoid overwriting last-character of filename in

[PATCH 2/4] clk: tegra: check BPMP response return code

2017-09-07 Thread Timo Alho
out when the clock id is unused. Signed-off-by: Timo Alho <ta...@nvidia.com> --- drivers/clk/tegra/clk-bpmp.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c index 638ace6..a896692 100644 --- a/d

[PATCH 1/4] firmware: tegra: propagate error code to caller

2017-09-07 Thread Timo Alho
this code and does not pass it to caller. Fix this by adding an extra struct member to tegra_bpmp_message and populate that with return code. Signed-off-by: Timo Alho <ta...@nvidia.com> --- drivers/firmware/tegra/bpmp.c | 22 -- include/soc/tegra/bpmp.h | 1 + 2

[PATCH 0/4] firmware: tegra: add checks for BPMP error return code

2017-09-07 Thread Timo Alho
, Timo Timo Alho (4): firmware: tegra: propagate error code to caller clk: tegra: check BPMP response return code reset: tegra: check BPMP response return code soc/tegra: bpmp: check BPMP response return code drivers/clk/tegra/clk-bpmp.c | 15 ++- drivers/firmware/tegra

[PATCH 4/4] soc/tegra: bpmp: check BPMP response return code

2017-09-07 Thread Timo Alho
Add checks for return code in BPMP response message. Signed-off-by: Timo Alho <ta...@nvidia.com> --- drivers/soc/tegra/powergate-bpmp.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/soc/tegra/powergate-bpmp.c b/drivers/soc/tegra/powergate-

[PATCH 3/4] reset: tegra: check BPMP response return code

2017-09-07 Thread Timo Alho
Add checks for return code in BPMP response message. Signed-off-by: Timo Alho <ta...@nvidia.com> --- drivers/reset/tegra/reset-bpmp.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/reset/tegra/reset-bpmp.c b/drivers/reset/tegra/reset-bpmp.c index 5

Re: [PATCH 2/4] clk: tegra: check BPMP response return code

2017-10-02 Thread Timo Alho
On 29.09.2017 17:53, Jonathan Hunter wrote: On 29/09/17 14:46, Timo Alho wrote: Hi Jon, On 21.09.2017 14:21, Jonathan Hunter wrote: On 07/09/17 10:31, Timo Alho wrote: Check return code in BPMP response message(s). The typical error case is when clock operation is attempted with invalid

Re: [PATCH] firmware: tegra: add BPMP debugfs support

2017-10-02 Thread Timo Alho
On 29.09.2017 17:58, Jonathan Hunter wrote: +static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf, + struct dentry *parent, uint32_t depth) Do we need to use uint32_t here? +{ +    int err; +    uint32_t d, t; And here? It's part of the BPMP ABI

Re: [PATCH] firmware: tegra: add BPMP debugfs support

2017-09-29 Thread Timo Alho
Jon, Thanks for reviewing this! On 21.09.2017 14:10, Jonathan Hunter wrote: --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -824,6 +824,8 @@ static int tegra_bpmp_probe(struct platform_device *pdev) if (err < 0) goto free_mrq; +

Re: [PATCH 2/4] clk: tegra: check BPMP response return code

2017-09-29 Thread Timo Alho
Hi Jon, On 21.09.2017 14:21, Jonathan Hunter wrote: On 07/09/17 10:31, Timo Alho wrote: Check return code in BPMP response message(s). The typical error case is when clock operation is attempted with invalid clock identifier. Also remove error print from call to clk_get_info

Re: [PATCH V2] firmware: tegra: add BPMP debugfs support

2017-10-03 Thread Timo Alho
Jon, thanks for reviewing On 03.10.2017 13:55, Jonathan Hunter wrote: +static int create_debugfs_mirror(struct tegra_bpmp *bpmp, void *buf, +size_t bufsize, struct dentry *root) +{ + struct seqbuf seqbuf; + int err; + + bpmp->debugfs_mirror =

Re: [PATCH] firmware: tegra-bpmp: mark PM function as __maybe_unused

2018-10-04 Thread Timo Alho
On 03.10.2018 11:26, Jonathan Hunter wrote: On 02/10/18 22:21, Arnd Bergmann wrote: The newly added tegra_bpmp_resume function is unused when CONFIG_PM is disabled: drivers/firmware/tegra/bpmp.c:847:12: error: 'tegra_bpmp_resume' defined but not used [-Werror=unused-function] static int

[PATCH] firmware: tegra: set drvdata earlier

2017-08-17 Thread Timo Alho
Subdevices of bpmp, such as bpmp-i2c, require the bpmp device's drvdata to be set during their probe. Currently this is not always the case. Fix this by calling platform_set_drvdata() earlier during bpmp's probe. Signed-off-by: Timo Alho --- drivers/firmware/tegra/bpmp.c | 4 ++-- 1 file

[PATCH] mmc: tegra: suppress errors when probe is deferred

2017-08-17 Thread Timo Alho
-by: Timo Alho --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index f668a6f..cdde9ff 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -501,8

[PATCH V2] firmware: tegra: add BPMP debugfs support

2017-10-03 Thread Timo Alho
e and data to firmware via DRAM. Signed-off-by: Timo Alho --- Changes in v2: - Address Jonathan's review feedback * restructure error printing and what error codes passed to higher layers * don't use IS_ERR_OR_NULL() * avoid overwriting last-character of filename in one corner case (n

Re: [PATCH V2] firmware: tegra: add BPMP debugfs support

2017-10-03 Thread Timo Alho
Jon, thanks for reviewing On 03.10.2017 13:55, Jonathan Hunter wrote: +static int create_debugfs_mirror(struct tegra_bpmp *bpmp, void *buf, +size_t bufsize, struct dentry *root) +{ + struct seqbuf seqbuf; + int err; + + bpmp->debugfs_mirror =

Re: [PATCH] firmware: tegra: add BPMP debugfs support

2017-09-29 Thread Timo Alho
Jon, Thanks for reviewing this! On 21.09.2017 14:10, Jonathan Hunter wrote: --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -824,6 +824,8 @@ static int tegra_bpmp_probe(struct platform_device *pdev) if (err < 0) goto free_mrq; +

Re: [PATCH 2/4] clk: tegra: check BPMP response return code

2017-09-29 Thread Timo Alho
Hi Jon, On 21.09.2017 14:21, Jonathan Hunter wrote: On 07/09/17 10:31, Timo Alho wrote: Check return code in BPMP response message(s). The typical error case is when clock operation is attempted with invalid clock identifier. Also remove error print from call to clk_get_info

Re: [PATCH] firmware: tegra: add BPMP debugfs support

2017-10-02 Thread Timo Alho
On 29.09.2017 17:58, Jonathan Hunter wrote: +static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf, + struct dentry *parent, uint32_t depth) Do we need to use uint32_t here? +{ +    int err; +    uint32_t d, t; And here? It's part of the BPMP ABI

Re: [PATCH 2/4] clk: tegra: check BPMP response return code

2017-10-02 Thread Timo Alho
On 29.09.2017 17:53, Jonathan Hunter wrote: On 29/09/17 14:46, Timo Alho wrote: Hi Jon, On 21.09.2017 14:21, Jonathan Hunter wrote: On 07/09/17 10:31, Timo Alho wrote: Check return code in BPMP response message(s). The typical error case is when clock operation is attempted with invalid

[PATCH 0/4] firmware: tegra: add checks for BPMP error return code

2017-09-07 Thread Timo Alho
, Timo Timo Alho (4): firmware: tegra: propagate error code to caller clk: tegra: check BPMP response return code reset: tegra: check BPMP response return code soc/tegra: bpmp: check BPMP response return code drivers/clk/tegra/clk-bpmp.c | 15 ++- drivers/firmware/tegra

[PATCH 4/4] soc/tegra: bpmp: check BPMP response return code

2017-09-07 Thread Timo Alho
Add checks for return code in BPMP response message. Signed-off-by: Timo Alho --- drivers/soc/tegra/powergate-bpmp.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/soc/tegra/powergate-bpmp.c b/drivers/soc/tegra/powergate-bpmp.c index 8fc3560

[PATCH 2/4] clk: tegra: check BPMP response return code

2017-09-07 Thread Timo Alho
out when the clock id is unused. Signed-off-by: Timo Alho --- drivers/clk/tegra/clk-bpmp.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/clk/tegra/clk-bpmp.c b/drivers/clk/tegra/clk-bpmp.c index 638ace6..a896692 100644 --- a/drivers/clk/tegra/clk

[PATCH 1/4] firmware: tegra: propagate error code to caller

2017-09-07 Thread Timo Alho
this code and does not pass it to caller. Fix this by adding an extra struct member to tegra_bpmp_message and populate that with return code. Signed-off-by: Timo Alho --- drivers/firmware/tegra/bpmp.c | 22 -- include/soc/tegra/bpmp.h | 1 + 2 files changed, 17

[PATCH 3/4] reset: tegra: check BPMP response return code

2017-09-07 Thread Timo Alho
Add checks for return code in BPMP response message. Signed-off-by: Timo Alho --- drivers/reset/tegra/reset-bpmp.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/reset/tegra/reset-bpmp.c b/drivers/reset/tegra/reset-bpmp.c index 5daf2ee..fac2db6 100644

[PATCH] firmware: tegra: add BPMP debugfs support

2017-08-22 Thread Timo Alho
e and data to firmware via DRAM. Signed-off-by: Timo Alho --- drivers/firmware/tegra/Makefile | 4 +- drivers/firmware/tegra/bpmp.c | 2 + drivers/firmware/tegra/bpmp_debugfs.c | 446 ++ include/soc/tegra/bpmp.h | 14 ++ 4 files ch

Re: [PATCH] firmware: tegra-bpmp: mark PM function as __maybe_unused

2018-10-04 Thread Timo Alho
On 03.10.2018 11:26, Jonathan Hunter wrote: On 02/10/18 22:21, Arnd Bergmann wrote: The newly added tegra_bpmp_resume function is unused when CONFIG_PM is disabled: drivers/firmware/tegra/bpmp.c:847:12: error: 'tegra_bpmp_resume' defined but not used [-Werror=unused-function] static int

Re: [RFC PATCH v2 6/7] i2c: tegra-bpmp: convert to use new atomic callbacks

2019-03-04 Thread Timo Alho
hm tegra_bpmp_i2c_algo = { .master_xfer = tegra_bpmp_i2c_xfer, + .master_xfer_atomic = tegra_bpmp_i2c_xfer_atomic, .functionality = tegra_bpmp_i2c_func, }; Looks good to me. Reviewed-by: Timo Alho