From: Heiko Schocher Date: Fri, 18 Jul 2014 04:07:18 +0000 (+0200) Subject: i.MX6: define struct pwm_regs and PWMCR_* defines X-Git-Tag: v2014.10-rc2~52^2~37 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aafe4020c1d0c0f989b68f839d66ffc66df6ab9e;p=u-boot i.MX6: define struct pwm_regs and PWMCR_* defines add defines for pwm modul found on imx6. Signed-off-by: Heiko Schocher Cc: Stefano Babic --- diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index 59b17dbc2c..6c0a0d98dd 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__ */