[U-Boot] [PATCH v5] gpio: dwapb_gpio: Add reset ctrl to driver
Marek Vasut
marex at denx.de
Tue Sep 4 07:42:29 UTC 2018
On 09/04/2018 09:40 AM, Ley Foon Tan wrote:
> On Tue, Sep 4, 2018 at 3:36 PM Marek Vasut <marex at denx.de> wrote:
>>
>> On 09/04/2018 08:04 AM, Ley Foon Tan wrote:
>>> Add code to reset all reset signals as in gpio DT node. A reset property
>>> is an optional feature, so only print out a warning and do not fail if a
>>> reset property is not present.
>>>
>>> If a reset property is discovered, then use it to deassert, thus
>>> bringing the IP out of reset.
>>>
>>> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
>>
>> Acked-by: Marek Vasut <marex at denx.de>
>>
>>> ---
>>> v5:
>>> - Move dev_warn() when return error.
>>>
>>> v4:
>>> - Add struct gpio_dwapb_priv
>>>
>>> v3:
>>> - Add .remove function.
>>> - Add error handling when return non-zero from reset_get_bulk().
>>>
>>> v2:
>>> - Move reset to probe() function.
>>> ---
>>> drivers/gpio/dwapb_gpio.c | 51 +++++++++++++++++++++++++++++++++++++++++++-
>>> 1 files changed, 49 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
>>> index 7cf2d47..0f6574d 100644
>>> --- a/drivers/gpio/dwapb_gpio.c
>>> +++ b/drivers/gpio/dwapb_gpio.c
>>> @@ -15,6 +15,7 @@
>>> #include <dm/lists.h>
>>> #include <dm/root.h>
>>> #include <errno.h>
>>> +#include <reset.h>
>>>
>>> DECLARE_GLOBAL_DATA_PTR;
>>>
>>> @@ -29,6 +30,10 @@ DECLARE_GLOBAL_DATA_PTR;
>>> #define GPIO_PORTA_EOI 0x4c
>>> #define GPIO_EXT_PORT(p) (0x50 + (p) * 4)
>>>
>>> +struct gpio_dwapb_priv {
>>> + struct reset_ctl_bulk resets;
>>> +};
>>> +
>>> struct gpio_dwapb_platdata {
>>> const char *name;
>>> int bank;
>>> @@ -99,13 +104,42 @@ static const struct dm_gpio_ops gpio_dwapb_ops = {
>>> .get_function = dwapb_gpio_get_function,
>>> };
>>
>> ^ Am I missing some patch ? I don't have this stuff in my tree and it
>> causes fuzz/failure while applying this patch.
> You need apply this patch first: https://patchwork.ozlabs.org/patch/958108/
Applied both to socfpga/next, thanks!
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list