* [PATCH] power: domain: apple: Restore reset ops that return 0
@ 2022-04-26 17:14 Mark Kettenis
2022-04-26 18:04 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2022-04-26 17:14 UTC (permalink / raw)
To: u-boot; +Cc: marex, patrick.delaunay, sjg, Mark Kettenis
These were removed inadvertently in commit 20874a60722b.
Fixes a crash on Apple M1 systems.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
---
drivers/power/domain/apple-pmgr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/power/domain/apple-pmgr.c b/drivers/power/domain/apple-pmgr.c
index 402c5b1fd1..88eafd0468 100644
--- a/drivers/power/domain/apple-pmgr.c
+++ b/drivers/power/domain/apple-pmgr.c
@@ -42,6 +42,16 @@ static int apple_reset_of_xlate(struct reset_ctl *reset_ctl,
return 0;
}
+static int apple_reset_request(struct reset_ctl *reset_ctl)
+{
+ return 0;
+}
+
+static int apple_reset_free(struct reset_ctl *reset_ctl)
+{
+ return 0;
+}
+
static int apple_reset_assert(struct reset_ctl *reset_ctl)
{
struct apple_pmgr_priv *priv = dev_get_priv(reset_ctl->dev->parent);
@@ -70,6 +80,8 @@ static int apple_reset_deassert(struct reset_ctl *reset_ctl)
struct reset_ops apple_reset_ops = {
.of_xlate = apple_reset_of_xlate,
+ .request = apple_reset_request,
+ .rfree = apple_reset_free,
.rst_assert = apple_reset_assert,
.rst_deassert = apple_reset_deassert,
};
--
2.35.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] power: domain: apple: Restore reset ops that return 0
2022-04-26 17:14 [PATCH] power: domain: apple: Restore reset ops that return 0 Mark Kettenis
@ 2022-04-26 18:04 ` Marek Vasut
2022-04-26 18:21 ` Mark Kettenis
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2022-04-26 18:04 UTC (permalink / raw)
To: Mark Kettenis, u-boot; +Cc: patrick.delaunay, sjg
On 4/26/22 19:14, Mark Kettenis wrote:
> These were removed inadvertently in commit 20874a60722b.
> Fixes a crash on Apple M1 systems.
The drivers/power/domain/power-domain-uclass.c should handle empty
implementation of request/rfree callback in exactly the commit you
reference above.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: domain: apple: Restore reset ops that return 0
2022-04-26 18:04 ` Marek Vasut
@ 2022-04-26 18:21 ` Mark Kettenis
2022-04-26 19:01 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2022-04-26 18:21 UTC (permalink / raw)
To: Marek Vasut; +Cc: kettenis, u-boot, patrick.delaunay, sjg
> Date: Tue, 26 Apr 2022 20:04:19 +0200
> From: Marek Vasut <marex@denx.de>
>
> On 4/26/22 19:14, Mark Kettenis wrote:
> > These were removed inadvertently in commit 20874a60722b.
> > Fixes a crash on Apple M1 systems.
>
> The drivers/power/domain/power-domain-uclass.c should handle empty
> implementation of request/rfree callback in exactly the commit you
> reference above.
Yes, but drivers/reset/reset-uclass.c doesn't and you also removed the
request/rfree callbacks for that part of the apple_pmgr driver.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: domain: apple: Restore reset ops that return 0
2022-04-26 18:21 ` Mark Kettenis
@ 2022-04-26 19:01 ` Marek Vasut
2022-04-26 20:54 ` Mark Kettenis
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2022-04-26 19:01 UTC (permalink / raw)
To: Mark Kettenis; +Cc: kettenis, u-boot, patrick.delaunay, sjg
On 4/26/22 20:21, Mark Kettenis wrote:
>> Date: Tue, 26 Apr 2022 20:04:19 +0200
>> From: Marek Vasut <marex@denx.de>
>>
>> On 4/26/22 19:14, Mark Kettenis wrote:
>>> These were removed inadvertently in commit 20874a60722b.
>>> Fixes a crash on Apple M1 systems.
>>
>> The drivers/power/domain/power-domain-uclass.c should handle empty
>> implementation of request/rfree callback in exactly the commit you
>> reference above.
>
> Yes, but drivers/reset/reset-uclass.c doesn't and you also removed the
> request/rfree callbacks for that part of the apple_pmgr driver.
Ah, sigh. Would it rather make sense to change the reset uclass ?
It would reduce the amount of empty callbacks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: domain: apple: Restore reset ops that return 0
2022-04-26 19:01 ` Marek Vasut
@ 2022-04-26 20:54 ` Mark Kettenis
2022-04-26 21:44 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Mark Kettenis @ 2022-04-26 20:54 UTC (permalink / raw)
To: Marek Vasut; +Cc: kettenis, u-boot, patrick.delaunay, sjg
> Date: Tue, 26 Apr 2022 21:01:01 +0200
> From: Marek Vasut <marex@denx.de>
>
> On 4/26/22 20:21, Mark Kettenis wrote:
> >> Date: Tue, 26 Apr 2022 20:04:19 +0200
> >> From: Marek Vasut <marex@denx.de>
> >>
> >> On 4/26/22 19:14, Mark Kettenis wrote:
> >>> These were removed inadvertently in commit 20874a60722b.
> >>> Fixes a crash on Apple M1 systems.
> >>
> >> The drivers/power/domain/power-domain-uclass.c should handle empty
> >> implementation of request/rfree callback in exactly the commit you
> >> reference above.
> >
> > Yes, but drivers/reset/reset-uclass.c doesn't and you also removed the
> > request/rfree callbacks for that part of the apple_pmgr driver.
>
> Ah, sigh. Would it rather make sense to change the reset uclass ?
> It would reduce the amount of empty callbacks.
Maybe. But that should probably done as a single sweep like you did
for the power domains. Let's fix this crash first.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: domain: apple: Restore reset ops that return 0
2022-04-26 20:54 ` Mark Kettenis
@ 2022-04-26 21:44 ` Marek Vasut
0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2022-04-26 21:44 UTC (permalink / raw)
To: Mark Kettenis; +Cc: kettenis, u-boot, patrick.delaunay, sjg
On 4/26/22 22:54, Mark Kettenis wrote:
>> Date: Tue, 26 Apr 2022 21:01:01 +0200
>> From: Marek Vasut <marex@denx.de>
>>
>> On 4/26/22 20:21, Mark Kettenis wrote:
>>>> Date: Tue, 26 Apr 2022 20:04:19 +0200
>>>> From: Marek Vasut <marex@denx.de>
>>>>
>>>> On 4/26/22 19:14, Mark Kettenis wrote:
>>>>> These were removed inadvertently in commit 20874a60722b.
>>>>> Fixes a crash on Apple M1 systems.
>>>>
>>>> The drivers/power/domain/power-domain-uclass.c should handle empty
>>>> implementation of request/rfree callback in exactly the commit you
>>>> reference above.
>>>
>>> Yes, but drivers/reset/reset-uclass.c doesn't and you also removed the
>>> request/rfree callbacks for that part of the apple_pmgr driver.
>>
>> Ah, sigh. Would it rather make sense to change the reset uclass ?
>> It would reduce the amount of empty callbacks.
>
> Maybe. But that should probably done as a single sweep like you did
> for the power domains. Let's fix this crash first.
Try:
[PATCH] reset: Return 0 if ops unimplemented and remove empty functions
If this patch gets applied first, then please make sure it is also
un-applied once the above is applied, so we don't grow useless empty
functions again.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-26 21:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 17:14 [PATCH] power: domain: apple: Restore reset ops that return 0 Mark Kettenis
2022-04-26 18:04 ` Marek Vasut
2022-04-26 18:21 ` Mark Kettenis
2022-04-26 19:01 ` Marek Vasut
2022-04-26 20:54 ` Mark Kettenis
2022-04-26 21:44 ` Marek Vasut
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.