[U-Boot] [PATCH v3 2/4] sysreset: socfpga: gen5: add sysreset driver

Marek Vasut marex at denx.de
Thu May 9 19:53:49 UTC 2019


On 5/9/19 8:08 PM, Simon Goldschmidt wrote:
> This adds a UCLASS_SYSRESET sysreset driver for socfgpa gen5.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> ---
> 
> Changes in v3:
> - moved socfpga gen5 sysreset driver to extra patch
> 
> Changes in v2: None

[...]

> +static int socfpga_sysreset_request(struct udevice *dev,
> +				    enum sysreset_t type)
> +{
> +	struct socfpga_sysreset_data *data = dev_get_priv(dev);
> +
> +	switch (type) {
> +	case SYSRESET_WARM:
> +		writel(1 << RSTMGR_CTRL_SWWARMRSTREQ_LSB,
> +		       &data->rstmgr_base->ctrl);
> +		break;
> +	case SYSRESET_COLD:
> +		writel(1 << RSTMGR_CTRL_SWCOLDRSTREQ_LSB,

BIT(RSTMGR...LSB)

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list