summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-07-18 06:07:18 +0200
committerStefano Babic <sbabic@denx.de>2014-07-23 12:25:41 +0200
commitaafe4020c1d0c0f989b68f839d66ffc66df6ab9e (patch)
treec16fadf7ed543a957d43bdd253563f70a125eff7
parent4a4d3a7db71a632c1ad65ef6d5f3661edd8a68d9 (diff)
downloadu-boot-imx-aafe4020c1d0c0f989b68f839d66ffc66df6ab9e.zip
u-boot-imx-aafe4020c1d0c0f989b68f839d66ffc66df6ab9e.tar.gz
u-boot-imx-aafe4020c1d0c0f989b68f839d66ffc66df6ab9e.tar.bz2
i.MX6: define struct pwm_regs and PWMCR_* defines
add defines for pwm modul found on imx6. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Stefano Babic <sbabic@denx.de>
-rw-r--r--arch/arm/include/asm/arch-mx6/imx-regs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 59b17db..6c0a0d9 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -777,5 +777,21 @@ struct wdog_regs {
u16 wmcr; /* Miscellaneous Control */
};
+#define PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4)
+#define PWMCR_DOZEEN (1 << 24)
+#define PWMCR_WAITEN (1 << 23)
+#define PWMCR_DBGEN (1 << 22)
+#define PWMCR_CLKSRC_IPG_HIGH (2 << 16)
+#define PWMCR_CLKSRC_IPG (1 << 16)
+#define PWMCR_EN (1 << 0)
+
+struct pwm_regs {
+ u32 cr;
+ u32 sr;
+ u32 ir;
+ u32 sar;
+ u32 pr;
+ u32 cnr;
+};
#endif /* __ASSEMBLER__*/
#endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */