]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i.MX6: define struct pwm_regs and PWMCR_* defines
authorHeiko Schocher <hs@denx.de>
Fri, 18 Jul 2014 04:07:18 +0000 (06:07 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 23 Jul 2014 10:25:41 +0000 (12:25 +0200)
add defines for pwm modul found on imx6.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/include/asm/arch-mx6/imx-regs.h

index 59b17dbc2cbb908e6878fcf64f4cc8c79d2c7d6f..6c0a0d98dd319a0e915f020d6c5b172e1be33504 100644 (file)
@@ -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__ */