[U-Boot] [PATCH v4 2/6] i.MX6: define struct pwm_regs and PWMCR_* defines

Heiko Schocher hs at denx.de
Fri Jul 18 06:07:18 CEST 2014


add defines for pwm modul found on imx6.

Signed-off-by: Heiko Schocher <hs at denx.de>
Cc: Stefano Babic <sbabic at denx.de>

---
- changes for v2:
  - new
- changes for v3:
  none
- changes for v4:
  none

 arch/arm/include/asm/arch-mx6/imx-regs.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 7193118..2135051 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -669,5 +669,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__ */
-- 
1.8.3.1



More information about the U-Boot mailing list