diff mbox series

[2/3] power: reset: at91-poweroff: add support for SAM9X60

Message ID 1550143407-26109-3-git-send-email-claudiu.beznea@microchip.com (mailing list archive)
State Not Applicable, archived
Headers show
Series add support for SAM9X60's shutdown controller | expand

Commit Message

Claudiu Beznea Feb. 14, 2019, 11:24 a.m. UTC
From: Claudiu Beznea <claudiu.beznea@microchip.com>

Add support for SAM9X60 shutdown controller.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/power/reset/at91-sama5d2_shdwc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Nicolas Ferre Feb. 18, 2019, 10:59 a.m. UTC | #1
On 14/02/2019 at 12:24, Claudiu Beznea - M18063 wrote:
> From: Claudiu Beznea <claudiu.beznea@microchip.com>
> 
> Add support for SAM9X60 shutdown controller.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

> ---
>   drivers/power/reset/at91-sama5d2_shdwc.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
> index 0747e0cdf350..e341cc5c0ea6 100644
> --- a/drivers/power/reset/at91-sama5d2_shdwc.c
> +++ b/drivers/power/reset/at91-sama5d2_shdwc.c
> @@ -246,12 +246,23 @@ static const struct shdwc_config sama5d2_shdwc_config = {
>   	.sr_rtcwk_shift = 5,
>   	.sr_rttwk_shift = SHDW_CFG_NOT_USED,
>   };
> +
> +static const struct shdwc_config sam9x60_shdwc_config = {
> +	.wkup_pin_input = 0,
> +	.mr_rtcwk_shift = 17,
> +	.mr_rttwk_shift = 16,
> +	.sr_rtcwk_shift = 5,
> +	.sr_rttwk_shift = 4,
>   };
>   
>   static const struct of_device_id at91_shdwc_of_match[] = {
>   	{
>   		.compatible = "atmel,sama5d2-shdwc",
>   		.data = &sama5d2_shdwc_config,
> +	},
> +	{
> +		.compatible = "microchip,sam9x60-shdwc",
> +		.data = &sam9x60_shdwc_config,
>   	}, {
>   		/*sentinel*/
>   	}
>
diff mbox series

Patch

diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
index 0747e0cdf350..e341cc5c0ea6 100644
--- a/drivers/power/reset/at91-sama5d2_shdwc.c
+++ b/drivers/power/reset/at91-sama5d2_shdwc.c
@@ -246,12 +246,23 @@  static const struct shdwc_config sama5d2_shdwc_config = {
 	.sr_rtcwk_shift = 5,
 	.sr_rttwk_shift = SHDW_CFG_NOT_USED,
 };
+
+static const struct shdwc_config sam9x60_shdwc_config = {
+	.wkup_pin_input = 0,
+	.mr_rtcwk_shift = 17,
+	.mr_rttwk_shift = 16,
+	.sr_rtcwk_shift = 5,
+	.sr_rttwk_shift = 4,
 };
 
 static const struct of_device_id at91_shdwc_of_match[] = {
 	{
 		.compatible = "atmel,sama5d2-shdwc",
 		.data = &sama5d2_shdwc_config,
+	},
+	{
+		.compatible = "microchip,sam9x60-shdwc",
+		.data = &sam9x60_shdwc_config,
 	}, {
 		/*sentinel*/
 	}