beagle bsp: RTC support for BBB

This commit is contained in:
ragunath
2015-05-28 14:41:37 +02:00
committed by Ben Gras
parent 92422be16c
commit d55d7a067f
5 changed files with 309 additions and 0 deletions
+3
View File
@@ -114,6 +114,9 @@ libbsp_a_SOURCES += ../../shared/console.c \
# I2C
libbsp_a_SOURCES += misc/i2c.c
#RTC
libbsp_a_SOURCES += rtc.c
libbsp_a_SOURCES += ../../shared/tod.c
# Clock
libbsp_a_SOURCES += clock.c
libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
+3
View File
@@ -30,6 +30,9 @@ RTEMS_BSPOPTS_HELP([CONSOLE_BAUD],[initial baud for console UART])
RTEMS_BSPOPTS_SET([CONSOLE_POLLED],[*],[0])
RTEMS_BSPOPTS_HELP([CONSOLE_POLLED],[polled console i/o (e.g. to run testsuite)])
RTEMS_BSPOPTS_SET([BBB_DEBUG],[beaglebone*],[0])
RTEMS_BSPOPTS_HELP([BBB_DEBUG],[Enable BBB debug])
RTEMS_BSP_CLEANUP_OPTIONS(0, 0)
RTEMS_BSP_LINKCMDS
File diff suppressed because it is too large Load Diff
@@ -280,3 +280,23 @@
/* Command posted status */
#define AM335X_WDT_WSPR 0x48
/* Activate/deactivate sequence */
/* RTC registers */
#define AM335X_RTC_BASE 0x44E3E000
#define AM335X_RTC_SECS 0x0
#define AM335X_RTC_MINS 0x4
#define AM335X_RTC_HOURS 0x8
#define AM335X_RTC_DAYS 0xc
#define AM335X_RTC_MONTHS 0x10
#define AM335X_RTC_YEARS 0x14
#define AM335X_RTC_WEEKS 0x18
#define AM335X_RTC_CTRL_REG 0x40
#define AM335X_RTC_STATUS_REG 0x44
#define AM335X_RTC_REV_REG 0x74
#define AM335X_RTC_SYSCONFIG 0x78
#define AM335X_RTC_KICK0 0x6c
#define AM335X_RTC_KICK1 0x70
#define AM335X_RTC_OSC_CLOCK 0x54
#define AM335X_RTC_KICK0_KEY 0x83E70B13
#define AM335X_RTC_KICK1_KEY 0x95A4F1E0
@@ -288,6 +288,12 @@
#define CLKSEL_TIMER7_CLK_SEL_SEL3 (0x2 << 0) /* Select CLK_32KHZ clock */
#define CLKSEL_TIMER7_CLK_SEL_SEL4 (0x3 << 0) /* Reserved */
/*RTC CLOCK BASE & Registers*/
#define CM_RTC_BASE 0x44E00800
#define CM_RTC_RTC_CLKCTRL 0x0
#define CM_RTC_CLKSTCTRL 0x4
#define OMAP3_CLKSEL_GPT1 (1 << 0)
#define OMAP3_CLKSEL_GPT10 (1 << 6)
#define OMAP3_CLKSEL_GPT11 (1 << 7)