diff options
author | John Klug <john.klug@multitech.com> | 2020-09-10 18:19:13 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2020-09-10 18:19:13 -0500 |
commit | 9953ef6e5374c95352e6a65f2df2eac5567594cf (patch) | |
tree | 04a927f12a94ff9d5a91f532c5d83bff404850dc /recipes-bsp/at91bootstrap/at91bootstrap-3.8.12/0003-disable-rtc-interrupts.patch | |
parent | de2f3d5bcacade38c7dfe1d48352e9e8df7978c2 (diff) | |
download | meta-multitech-atmel-9953ef6e5374c95352e6a65f2df2eac5567594cf.tar.gz meta-multitech-atmel-9953ef6e5374c95352e6a65f2df2eac5567594cf.tar.bz2 meta-multitech-atmel-9953ef6e5374c95352e6a65f2df2eac5567594cf.zip |
Add changes for mtcap2/mtcdtip2
Diffstat (limited to 'recipes-bsp/at91bootstrap/at91bootstrap-3.8.12/0003-disable-rtc-interrupts.patch')
-rw-r--r-- | recipes-bsp/at91bootstrap/at91bootstrap-3.8.12/0003-disable-rtc-interrupts.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes-bsp/at91bootstrap/at91bootstrap-3.8.12/0003-disable-rtc-interrupts.patch b/recipes-bsp/at91bootstrap/at91bootstrap-3.8.12/0003-disable-rtc-interrupts.patch new file mode 100644 index 0000000..d262972 --- /dev/null +++ b/recipes-bsp/at91bootstrap/at91bootstrap-3.8.12/0003-disable-rtc-interrupts.patch @@ -0,0 +1,32 @@ +diff -Naru orig/board/at91sam9x5ek/at91sam9x5ek.c new/board/at91sam9x5ek/at91sam9x5ek.c +--- orig/board/at91sam9x5ek/at91sam9x5ek.c 2018-01-04 18:06:52.533763774 -0600 ++++ new/board/at91sam9x5ek/at91sam9x5ek.c 2018-01-04 18:32:57.905717432 -0600 +@@ -44,6 +44,18 @@ + #include "at91sam9x5ek.h" + #include "board_hw_info.h" + ++#define RTC_SCCR 0x1C ++#define RTC_IDR 0x24 ++ ++static void at91_disable_rtc(void) ++{ ++ /* disable all RTC interrupts and clear status register. ++ * Prevents possible Linux lockup due to unexpected RTC interrupt ++ */ ++ writel(0xFF, RTC_IDR + AT91C_BASE_RTC); ++ writel(0xFF, RTC_SCCR + AT91C_BASE_RTC); ++} ++ + static void at91_dbgu_hw_init(void) + { + /* Configure DBGU pins */ +@@ -161,6 +173,9 @@ + #ifdef CONFIG_HW_INIT + void hw_init(void) + { ++ /* 1st chance to disable RTC */ ++ at91_disable_rtc(); ++ + /* Disable watchdog */ + at91_disable_wdt(); + |