All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sysreset: Add support for gpio-restart
@ 2018-07-13  9:15 Michal Simek
  2018-07-13 12:58 ` Dr. Philipp Tomsich
  2018-07-16  5:20 ` Simon Glass
  0 siblings, 2 replies; 6+ messages in thread
From: Michal Simek @ 2018-07-13  9:15 UTC (permalink / raw)
  To: u-boot

The Linux kernel has binding for gpio-restart node.
This patch is adding basic support without supporting any optional
properties.
This driver was tested on Microblaze system where gpio is connected to
SoC reset logic.
Output value is handled via gpios cells values.

In gpio_reboot_request() set_value is writing 1 because
dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
...
	if (desc->flags & GPIOD_ACTIVE_LOW)
		value = !value;
...

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/sysreset/Kconfig         |  6 ++++
 drivers/sysreset/Makefile        |  1 +
 drivers/sysreset/sysreset_gpio.c | 59 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 drivers/sysreset/sysreset_gpio.c

diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
index a6d48e8a662c..1e228b97443a 100644
--- a/drivers/sysreset/Kconfig
+++ b/drivers/sysreset/Kconfig
@@ -15,6 +15,12 @@ config SYSRESET
 
 if SYSRESET
 
+config SYSRESET_GPIO
+	bool "Enable support for GPIO restart driver"
+	select GPIO
+	help
+	  Restart support via GPIO pin connected reset logic.
+
 config SYSRESET_PSCI
 	bool "Enable support for PSCI System Reset"
 	depends on ARM_PSCI_FW
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
index 0da58a1cf6ad..ca533cfefaad 100644
--- a/drivers/sysreset/Makefile
+++ b/drivers/sysreset/Makefile
@@ -3,6 +3,7 @@
 # (C) Copyright 2016 Cadence Design Systems Inc.
 
 obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
+obj-$(CONFIG_SYSRESET_GPIO) += sysreset_gpio.o
 obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
 obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
 obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
new file mode 100644
index 000000000000..4c1c1510f285
--- /dev/null
+++ b/drivers/sysreset/sysreset_gpio.c
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2018 Xilinx, Inc. - Michal Simek
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <sysreset.h>
+#include <asm/gpio.h>
+
+struct gpio_reboot_priv {
+	struct gpio_desc gpio;
+};
+
+static int gpio_reboot_request(struct udevice *dev, enum sysreset_t type)
+{
+	struct gpio_reboot_priv *priv = dev_get_priv(dev);
+
+	/*
+	 * When debug log is enabled please make sure that chars won't end up
+	 * in output fifo. Or you can append udelay(); to get enough time
+	 * to HW to emit output fifo.
+	 */
+	debug("GPIO restart\n");
+
+	/* 1 is just setting value - based on gpio->flags 0 or 1 is written */
+	return dm_gpio_set_value(&priv->gpio, 1);
+}
+
+static struct sysreset_ops gpio_reboot_ops = {
+	.request = gpio_reboot_request,
+};
+
+int gpio_reboot_probe(struct udevice *dev)
+{
+	struct gpio_reboot_priv *priv = dev_get_priv(dev);
+
+	/*
+	 * Linux kernel DT binding contain others optional properties
+	 * which are not supported now
+	 */
+
+	return gpio_request_by_name(dev, "gpios", 0, &priv->gpio, GPIOD_IS_OUT);
+}
+
+static const struct udevice_id led_gpio_ids[] = {
+	{ .compatible = "gpio-restart" },
+	{ }
+};
+
+U_BOOT_DRIVER(gpio_reboot) = {
+	.id = UCLASS_SYSRESET,
+	.name = "gpio_restart",
+	.of_match = led_gpio_ids,
+	.ops = &gpio_reboot_ops,
+	.priv_auto_alloc_size = sizeof(struct gpio_reboot_priv),
+	.probe = gpio_reboot_probe,
+};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] sysreset: Add support for gpio-restart
  2018-07-13  9:15 [U-Boot] [PATCH] sysreset: Add support for gpio-restart Michal Simek
@ 2018-07-13 12:58 ` Dr. Philipp Tomsich
  2018-07-16  5:20 ` Simon Glass
  1 sibling, 0 replies; 6+ messages in thread
From: Dr. Philipp Tomsich @ 2018-07-13 12:58 UTC (permalink / raw)
  To: u-boot


> On 13 Jul 2018, at 11:15, Michal Simek <michal.simek@xilinx.com> wrote:
> 
> The Linux kernel has binding for gpio-restart node.
> This patch is adding basic support without supporting any optional
> properties.

Nice. This may also give us an opportunity to streamline some of the reset
logic (and the FDT-interface to the ATF) on our RK3399-Q7 board.

> This driver was tested on Microblaze system where gpio is connected to
> SoC reset logic.
> Output value is handled via gpios cells values.
> 
> In gpio_reboot_request() set_value is writing 1 because
> dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
> ...
> 	if (desc->flags & GPIOD_ACTIVE_LOW)
> 		value = !value;
> ...
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] sysreset: Add support for gpio-restart
  2018-07-13  9:15 [U-Boot] [PATCH] sysreset: Add support for gpio-restart Michal Simek
  2018-07-13 12:58 ` Dr. Philipp Tomsich
@ 2018-07-16  5:20 ` Simon Glass
  2018-07-16  5:31   ` Michal Simek
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Glass @ 2018-07-16  5:20 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On 13 July 2018 at 03:15, Michal Simek <michal.simek@xilinx.com> wrote:
> The Linux kernel has binding for gpio-restart node.
> This patch is adding basic support without supporting any optional
> properties.
> This driver was tested on Microblaze system where gpio is connected to
> SoC reset logic.
> Output value is handled via gpios cells values.
>
> In gpio_reboot_request() set_value is writing 1 because
> dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
> ...
>         if (desc->flags & GPIOD_ACTIVE_LOW)
>                 value = !value;
> ...
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  drivers/sysreset/Kconfig         |  6 ++++
>  drivers/sysreset/Makefile        |  1 +
>  drivers/sysreset/sysreset_gpio.c | 59 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 66 insertions(+)
>  create mode 100644 drivers/sysreset/sysreset_gpio.c

Reviewed-by: Simon Glass <sjg@chromium.org>

But please see below.

>
> diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
> index a6d48e8a662c..1e228b97443a 100644
> --- a/drivers/sysreset/Kconfig
> +++ b/drivers/sysreset/Kconfig
> @@ -15,6 +15,12 @@ config SYSRESET
>
>  if SYSRESET
>
> +config SYSRESET_GPIO
> +       bool "Enable support for GPIO restart driver"
> +       select GPIO
> +       help
> +         Restart support via GPIO pin connected reset logic.

What does this mean? Please expand this to explain what it means.

Also, what is the difference between restart and reset? If there is no
difference please use the word 'reset'. If there is a difference,
please explain it here.

> +
>  config SYSRESET_PSCI
>         bool "Enable support for PSCI System Reset"
>         depends on ARM_PSCI_FW
> diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
> index 0da58a1cf6ad..ca533cfefaad 100644
> --- a/drivers/sysreset/Makefile
> +++ b/drivers/sysreset/Makefile
> @@ -3,6 +3,7 @@
>  # (C) Copyright 2016 Cadence Design Systems Inc.
>
>  obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
> +obj-$(CONFIG_SYSRESET_GPIO) += sysreset_gpio.o
>  obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
>  obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
>  obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
> diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
> new file mode 100644
> index 000000000000..4c1c1510f285
> --- /dev/null
> +++ b/drivers/sysreset/sysreset_gpio.c
> @@ -0,0 +1,59 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2018 Xilinx, Inc. - Michal Simek
> + */
> +
> +#include <common.h>
> +#include <dm.h>
> +#include <errno.h>
> +#include <sysreset.h>
> +#include <asm/gpio.h>
> +
> +struct gpio_reboot_priv {
> +       struct gpio_desc gpio;
> +};
> +
> +static int gpio_reboot_request(struct udevice *dev, enum sysreset_t type)
> +{
> +       struct gpio_reboot_priv *priv = dev_get_priv(dev);
> +
> +       /*
> +        * When debug log is enabled please make sure that chars won't end up
> +        * in output fifo. Or you can append udelay(); to get enough time
> +        * to HW to emit output fifo.
> +        */
> +       debug("GPIO restart\n");
> +
> +       /* 1 is just setting value - based on gpio->flags 0 or 1 is written */

Do you mean that it respects polarity (active high/low)? If so, it
might be less confusing to state that.

> +       return dm_gpio_set_value(&priv->gpio, 1);
> +}
> +
> +static struct sysreset_ops gpio_reboot_ops = {
> +       .request = gpio_reboot_request,
> +};
> +
> +int gpio_reboot_probe(struct udevice *dev)
> +{
> +       struct gpio_reboot_priv *priv = dev_get_priv(dev);
> +
> +       /*
> +        * Linux kernel DT binding contain others optional properties
> +        * which are not supported now
> +        */
> +
> +       return gpio_request_by_name(dev, "gpios", 0, &priv->gpio, GPIOD_IS_OUT);
> +}
> +
> +static const struct udevice_id led_gpio_ids[] = {
> +       { .compatible = "gpio-restart" },
> +       { }
> +};
> +
> +U_BOOT_DRIVER(gpio_reboot) = {
> +       .id = UCLASS_SYSRESET,
> +       .name = "gpio_restart",
> +       .of_match = led_gpio_ids,
> +       .ops = &gpio_reboot_ops,
> +       .priv_auto_alloc_size = sizeof(struct gpio_reboot_priv),
> +       .probe = gpio_reboot_probe,
> +};
> --
> 1.9.1
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] sysreset: Add support for gpio-restart
  2018-07-16  5:20 ` Simon Glass
@ 2018-07-16  5:31   ` Michal Simek
  2018-07-17  3:45     ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Simek @ 2018-07-16  5:31 UTC (permalink / raw)
  To: u-boot

On 16.7.2018 07:20, Simon Glass wrote:
> Hi Michal,
> 
> On 13 July 2018 at 03:15, Michal Simek <michal.simek@xilinx.com> wrote:
>> The Linux kernel has binding for gpio-restart node.
>> This patch is adding basic support without supporting any optional
>> properties.
>> This driver was tested on Microblaze system where gpio is connected to
>> SoC reset logic.
>> Output value is handled via gpios cells values.
>>
>> In gpio_reboot_request() set_value is writing 1 because
>> dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
>> ...
>>         if (desc->flags & GPIOD_ACTIVE_LOW)
>>                 value = !value;
>> ...
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>>  drivers/sysreset/Kconfig         |  6 ++++
>>  drivers/sysreset/Makefile        |  1 +
>>  drivers/sysreset/sysreset_gpio.c | 59 ++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 66 insertions(+)
>>  create mode 100644 drivers/sysreset/sysreset_gpio.c
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> But please see below.
> 
>>
>> diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
>> index a6d48e8a662c..1e228b97443a 100644
>> --- a/drivers/sysreset/Kconfig
>> +++ b/drivers/sysreset/Kconfig
>> @@ -15,6 +15,12 @@ config SYSRESET
>>
>>  if SYSRESET
>>
>> +config SYSRESET_GPIO
>> +       bool "Enable support for GPIO restart driver"
>> +       select GPIO
>> +       help
>> +         Restart support via GPIO pin connected reset logic.
> 
> What does this mean? Please expand this to explain what it means.
> 
> Also, what is the difference between restart and reset? If there is no
> difference please use the word 'reset'. If there is a difference,
> please explain it here.

I have taken restart name because this is what it is written Linux kernel.

Based on this explanation:
https://kb.netgear.com/1001/Defining-Terms-Power-Cycle-Boot-Reboot-Restart-Reset-and-Hard-Reset

"Unlike a reset which changes something, a restart means to turn
something on, possibly without changing settings. When upgrading
firmware or software you are often asked to restart. A restart would be
probably be used if there were a major change to functionality, while a
reset often just changes settings of existing functionality."


>> +
>>  config SYSRESET_PSCI
>>         bool "Enable support for PSCI System Reset"
>>         depends on ARM_PSCI_FW
>> diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
>> index 0da58a1cf6ad..ca533cfefaad 100644
>> --- a/drivers/sysreset/Makefile
>> +++ b/drivers/sysreset/Makefile
>> @@ -3,6 +3,7 @@
>>  # (C) Copyright 2016 Cadence Design Systems Inc.
>>
>>  obj-$(CONFIG_SYSRESET) += sysreset-uclass.o
>> +obj-$(CONFIG_SYSRESET_GPIO) += sysreset_gpio.o
>>  obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
>>  obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o
>>  obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o
>> diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
>> new file mode 100644
>> index 000000000000..4c1c1510f285
>> --- /dev/null
>> +++ b/drivers/sysreset/sysreset_gpio.c
>> @@ -0,0 +1,59 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (C) 2018 Xilinx, Inc. - Michal Simek
>> + */
>> +
>> +#include <common.h>
>> +#include <dm.h>
>> +#include <errno.h>
>> +#include <sysreset.h>
>> +#include <asm/gpio.h>
>> +
>> +struct gpio_reboot_priv {
>> +       struct gpio_desc gpio;
>> +};
>> +
>> +static int gpio_reboot_request(struct udevice *dev, enum sysreset_t type)
>> +{
>> +       struct gpio_reboot_priv *priv = dev_get_priv(dev);
>> +
>> +       /*
>> +        * When debug log is enabled please make sure that chars won't end up
>> +        * in output fifo. Or you can append udelay(); to get enough time
>> +        * to HW to emit output fifo.
>> +        */
>> +       debug("GPIO restart\n");
>> +
>> +       /* 1 is just setting value - based on gpio->flags 0 or 1 is written */
> 
> Do you mean that it respects polarity (active high/low)? If so, it
> might be less confusing to state that.

ok - will update.

> 
>> +       return dm_gpio_set_value(&priv->gpio, 1);
>> +}
>> +
>> +static struct sysreset_ops gpio_reboot_ops = {
>> +       .request = gpio_reboot_request,
>> +};
>> +
>> +int gpio_reboot_probe(struct udevice *dev)
>> +{
>> +       struct gpio_reboot_priv *priv = dev_get_priv(dev);
>> +
>> +       /*
>> +        * Linux kernel DT binding contain others optional properties
>> +        * which are not supported now
>> +        */
>> +
>> +       return gpio_request_by_name(dev, "gpios", 0, &priv->gpio, GPIOD_IS_OUT);
>> +}
>> +
>> +static const struct udevice_id led_gpio_ids[] = {
>> +       { .compatible = "gpio-restart" },
>> +       { }
>> +};
>> +
>> +U_BOOT_DRIVER(gpio_reboot) = {
>> +       .id = UCLASS_SYSRESET,
>> +       .name = "gpio_restart",
>> +       .of_match = led_gpio_ids,
>> +       .ops = &gpio_reboot_ops,
>> +       .priv_auto_alloc_size = sizeof(struct gpio_reboot_priv),
>> +       .probe = gpio_reboot_probe,
>> +};
>> --
>> 1.9.1
>>
> 

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] sysreset: Add support for gpio-restart
  2018-07-16  5:31   ` Michal Simek
@ 2018-07-17  3:45     ` Simon Glass
  2018-07-17 13:00       ` Michal Simek
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2018-07-17  3:45 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On 15 July 2018 at 23:31, Michal Simek <michal.simek@xilinx.com> wrote:
> On 16.7.2018 07:20, Simon Glass wrote:
>> Hi Michal,
>>
>> On 13 July 2018 at 03:15, Michal Simek <michal.simek@xilinx.com> wrote:
>>> The Linux kernel has binding for gpio-restart node.
>>> This patch is adding basic support without supporting any optional
>>> properties.
>>> This driver was tested on Microblaze system where gpio is connected to
>>> SoC reset logic.
>>> Output value is handled via gpios cells values.
>>>
>>> In gpio_reboot_request() set_value is writing 1 because
>>> dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
>>> ...
>>>         if (desc->flags & GPIOD_ACTIVE_LOW)
>>>                 value = !value;
>>> ...
>>>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> ---
>>>
>>>  drivers/sysreset/Kconfig         |  6 ++++
>>>  drivers/sysreset/Makefile        |  1 +
>>>  drivers/sysreset/sysreset_gpio.c | 59 ++++++++++++++++++++++++++++++++++++++++
>>>  3 files changed, 66 insertions(+)
>>>  create mode 100644 drivers/sysreset/sysreset_gpio.c
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>> But please see below.
>>
>>>
>>> diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
>>> index a6d48e8a662c..1e228b97443a 100644
>>> --- a/drivers/sysreset/Kconfig
>>> +++ b/drivers/sysreset/Kconfig
>>> @@ -15,6 +15,12 @@ config SYSRESET
>>>
>>>  if SYSRESET
>>>
>>> +config SYSRESET_GPIO
>>> +       bool "Enable support for GPIO restart driver"
>>> +       select GPIO
>>> +       help
>>> +         Restart support via GPIO pin connected reset logic.
>>
>> What does this mean? Please expand this to explain what it means.
>>
>> Also, what is the difference between restart and reset? If there is no
>> difference please use the word 'reset'. If there is a difference,
>> please explain it here.
>
> I have taken restart name because this is what it is written Linux kernel.
>
> Based on this explanation:
> https://kb.netgear.com/1001/Defining-Terms-Power-Cycle-Boot-Reboot-Restart-Reset-and-Hard-Reset
>
> "Unlike a reset which changes something, a restart means to turn
> something on, possibly without changing settings. When upgrading
> firmware or software you are often asked to restart. A restart would be
> probably be used if there were a major change to functionality, while a
> reset often just changes settings of existing functionality."
>

Perhaps this corresponds to warm and cold reset? I'm not sure. But I
don't know of a board which supports resetting without changing
anything. At the least the CPU is put back into a start where it can
start at its reset vector.

This really doesn't make any sense to me. I think we should stick with
'reset' to avoid confusion. By all means add some notes to the uclass
header file about what it should mean. We already have enum
sysreset_t, so you could define 'restart' there, perhaps?

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] sysreset: Add support for gpio-restart
  2018-07-17  3:45     ` Simon Glass
@ 2018-07-17 13:00       ` Michal Simek
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Simek @ 2018-07-17 13:00 UTC (permalink / raw)
  To: u-boot

On 17.7.2018 05:45, Simon Glass wrote:
> Hi Michal,
> 
> On 15 July 2018 at 23:31, Michal Simek <michal.simek@xilinx.com> wrote:
>> On 16.7.2018 07:20, Simon Glass wrote:
>>> Hi Michal,
>>>
>>> On 13 July 2018 at 03:15, Michal Simek <michal.simek@xilinx.com> wrote:
>>>> The Linux kernel has binding for gpio-restart node.
>>>> This patch is adding basic support without supporting any optional
>>>> properties.
>>>> This driver was tested on Microblaze system where gpio is connected to
>>>> SoC reset logic.
>>>> Output value is handled via gpios cells values.
>>>>
>>>> In gpio_reboot_request() set_value is writing 1 because
>>>> dm_gpio_set_value() is capable to changing it when it is ACTIVE_LOW.
>>>> ...
>>>>         if (desc->flags & GPIOD_ACTIVE_LOW)
>>>>                 value = !value;
>>>> ...
>>>>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> ---
>>>>
>>>>  drivers/sysreset/Kconfig         |  6 ++++
>>>>  drivers/sysreset/Makefile        |  1 +
>>>>  drivers/sysreset/sysreset_gpio.c | 59 ++++++++++++++++++++++++++++++++++++++++
>>>>  3 files changed, 66 insertions(+)
>>>>  create mode 100644 drivers/sysreset/sysreset_gpio.c
>>>
>>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>>
>>> But please see below.
>>>
>>>>
>>>> diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
>>>> index a6d48e8a662c..1e228b97443a 100644
>>>> --- a/drivers/sysreset/Kconfig
>>>> +++ b/drivers/sysreset/Kconfig
>>>> @@ -15,6 +15,12 @@ config SYSRESET
>>>>
>>>>  if SYSRESET
>>>>
>>>> +config SYSRESET_GPIO
>>>> +       bool "Enable support for GPIO restart driver"
>>>> +       select GPIO
>>>> +       help
>>>> +         Restart support via GPIO pin connected reset logic.
>>>
>>> What does this mean? Please expand this to explain what it means.
>>>
>>> Also, what is the difference between restart and reset? If there is no
>>> difference please use the word 'reset'. If there is a difference,
>>> please explain it here.
>>
>> I have taken restart name because this is what it is written Linux kernel.
>>
>> Based on this explanation:
>> https://kb.netgear.com/1001/Defining-Terms-Power-Cycle-Boot-Reboot-Restart-Reset-and-Hard-Reset
>>
>> "Unlike a reset which changes something, a restart means to turn
>> something on, possibly without changing settings. When upgrading
>> firmware or software you are often asked to restart. A restart would be
>> probably be used if there were a major change to functionality, while a
>> reset often just changes settings of existing functionality."
>>
> 
> Perhaps this corresponds to warm and cold reset? I'm not sure. But I
> don't know of a board which supports resetting without changing
> anything. At the least the CPU is put back into a start where it can
> start at its reset vector.
> 
> This really doesn't make any sense to me. I think we should stick with
> 'reset' to avoid confusion. By all means add some notes to the uclass
> header file about what it should mean. We already have enum
> sysreset_t, so you could define 'restart' there, perhaps?

I have sent v2 with reset. TBH adding restart to enum will just cause
another confusion when we don't know what's the exact difference.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-17 13:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13  9:15 [U-Boot] [PATCH] sysreset: Add support for gpio-restart Michal Simek
2018-07-13 12:58 ` Dr. Philipp Tomsich
2018-07-16  5:20 ` Simon Glass
2018-07-16  5:31   ` Michal Simek
2018-07-17  3:45     ` Simon Glass
2018-07-17 13:00       ` Michal Simek

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.