public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/6] i.MX6: define struct pwm_regs and PWMCR_* defines
Date: Wed, 16 Jul 2014 10:51:32 +0200	[thread overview]
Message-ID: <1405500696-32597-3-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1405500696-32597-1-git-send-email-hs@denx.de>

add defines for pwm modul found on imx6.

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

---
- changes for v2:
  - new

 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

  parent reply	other threads:[~2014-07-16  8:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  8:51 [U-Boot] [PATCH v3 0/6] arm, imx6: add aristainetos board support Heiko Schocher
2014-07-16  8:51 ` [U-Boot] [PATCH v3 1/6] imx6: add gpr2 usb_otg_id iomux select control define Heiko Schocher
2014-07-16  8:51 ` Heiko Schocher [this message]
2014-07-16  8:51 ` [U-Boot] [PATCH v3 3/6] pwm, imx6: add support for pwm modul on imx6 Heiko Schocher
2014-07-16  9:14   ` Stefano Babic
2014-07-16  9:21     ` Heiko Schocher
2014-07-16  9:44     ` Wolfgang Denk
2014-07-16  8:51 ` [U-Boot] [PATCH v3 4/6] i.MX6: add enable_spi_clk() Heiko Schocher
2014-07-16  8:51 ` [U-Boot] [PATCH v3 5/6] spi: add config option to enable the WP pin function on st micron flashes Heiko Schocher
2014-07-16  8:51 ` [U-Boot] [PATCH v3 6/6] arm, imx6: add aristainetos board Heiko Schocher
2014-07-16  9:20   ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405500696-32597-3-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox