summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/timrot-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 18:03:10 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 18:21:49 +0200
commit852a82b90a5b718538642ebcffa25a168c98b329 (patch)
tree2c22fa31dd714526fe79ebbe7e5c8b5c129b2102 /firmware/target/arm/imx233/timrot-imx233.h
parent96b1d02b057164d4e521d7e9aa50ee5e1223008a (diff)
downloadrockbox-852a82b90a5b718538642ebcffa25a168c98b329.tar.gz
rockbox-852a82b90a5b718538642ebcffa25a168c98b329.tar.bz2
rockbox-852a82b90a5b718538642ebcffa25a168c98b329.zip
imx233: rewrite timrot using new register headers
Change-Id: Ia6dc7ac7e1fdf471a518111f5593bd96bc3acfac
Diffstat (limited to 'firmware/target/arm/imx233/timrot-imx233.h')
-rw-r--r--firmware/target/arm/imx233/timrot-imx233.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/firmware/target/arm/imx233/timrot-imx233.h b/firmware/target/arm/imx233/timrot-imx233.h
index c79023da51..f7a7bc3f8d 100644
--- a/firmware/target/arm/imx233/timrot-imx233.h
+++ b/firmware/target/arm/imx233/timrot-imx233.h
@@ -24,30 +24,7 @@
#include "system.h"
#include "cpu.h"
-#define HW_TIMROT_BASE 0x80068000
-
-#define HW_TIMROT_ROTCTRL (*(volatile uint32_t *)(HW_TIMROT_BASE + 0x0))
-
-#define HW_TIMROT_ROTCOUNT (*(volatile uint32_t *)(HW_TIMROT_BASE + 0x10))
-
-#define HW_TIMROT_TIMCTRL(i) (*(volatile uint32_t *)(HW_TIMROT_BASE + 0x20 + (i) * 0x20))
-#define HW_TIMROT_TIMCTRL__IRQ (1 << 15)
-#define HW_TIMROT_TIMCTRL__IRQ_EN (1 << 14)
-#define HW_TIMROT_TIMCTRL__POLARITY (1 << 8)
-#define HW_TIMROT_TIMCTRL__UPDATE (1 << 7)
-#define HW_TIMROT_TIMCTRL__RELOAD (1 << 6)
-#define HW_TIMROT_TIMCTRL__PRESCALE_1 (0 << 4)
-#define HW_TIMROT_TIMCTRL__PRESCALE_2 (1 << 4)
-#define HW_TIMROT_TIMCTRL__PRESCALE_4 (2 << 4)
-#define HW_TIMROT_TIMCTRL__PRESCALE_8 (3 << 4)
-#define HW_TIMROT_TIMCTRL__SELECT_NEVER_TICK 0
-#define HW_TIMROT_TIMCTRL__SELECT_32KHZ_XTAL 8
-#define HW_TIMROT_TIMCTRL__SELECT_8KHZ_XTAL 9
-#define HW_TIMROT_TIMCTRL__SELECT_4KHZ_XTAL 10
-#define HW_TIMROT_TIMCTRL__SELECT_1KHZ_XTAL 11
-#define HW_TIMROT_TIMCTRL__SELECT_TICK_ALWAYS 12
-
-#define HW_TIMROT_TIMCOUNT(i) (*(volatile uint32_t *)(HW_TIMROT_BASE + 0x30 + (i) * 0x20))
+#include "regs/regs-timrot.h"
typedef void (*imx233_timer_fn_t)(void);