All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: Add register defines for am33xx ePWM registers
@ 2016-09-16 10:21 tomas.melin at vaisala.com
  2016-09-16 11:16 ` Tom Rini
  2016-10-08 17:06 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: tomas.melin at vaisala.com @ 2016-09-16 10:21 UTC (permalink / raw)
  To: u-boot

Register definitions needed for configuring the
ePWM module.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
---
 arch/arm/include/asm/arch-am33xx/cpu.h             | 36 ++++++++++++++++++++++
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |  1 +
 2 files changed, 37 insertions(+)

diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h
index 05752ce..ec8381e 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -541,6 +541,8 @@ struct pwmss_regs {
 };
 #define ECAP_CLK_EN		BIT(0)
 #define ECAP_CLK_STOP_REQ	BIT(1)
+#define EPWM_CLK_EN		BIT(8)
+#define EPWM_CLK_STOP_REQ	BIT(9)
 
 struct pwmss_ecap_regs {
 	unsigned int tsctr;
@@ -554,6 +556,40 @@ struct pwmss_ecap_regs {
 	unsigned short ecctl2;
 };
 
+struct pwmss_epwm_regs {
+	unsigned short tbctl;
+	unsigned short tbsts;
+	unsigned short tbphshr;
+	unsigned short tbphs;
+	unsigned short tbcnt;
+	unsigned short tbprd;
+	unsigned short res1;
+	unsigned short cmpctl;
+	unsigned short cmpahr;
+	unsigned short cmpa;
+	unsigned short cmpb;
+	unsigned short aqctla;
+	unsigned short aqctlb;
+	unsigned short aqsfrc;
+	unsigned short aqcsfrc;
+	unsigned short dbctl;
+	unsigned short dbred;
+	unsigned short dbfed;
+	unsigned short tzsel;
+	unsigned short tzctl;
+	unsigned short tzflg;
+	unsigned short tzclr;
+	unsigned short tzfrc;
+	unsigned short etsel;
+	unsigned short etps;
+	unsigned short etflg;
+	unsigned short etclr;
+	unsigned short etfrc;
+	unsigned short pcctl;
+	unsigned int res2[66];
+	unsigned short hrcnfg;
+};
+
 /* Capture Control register 2 */
 #define ECTRL2_SYNCOSEL_MASK	(0x03 << 6)
 #define ECTRL2_MDSL_ECAP	BIT(9)
diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
index e4231c8..e6d9de4 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
@@ -64,5 +64,6 @@
 /* PWMSS */
 #define PWMSS0_BASE			0x48300000
 #define AM33XX_ECAP0_BASE		0x48300100
+#define AM33XX_EPWM_BASE		0x48300200
 
 #endif /* __AM33XX_HARDWARE_AM33XX_H */
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM: Add register defines for am33xx ePWM registers
  2016-09-16 10:21 [U-Boot] [PATCH] ARM: Add register defines for am33xx ePWM registers tomas.melin at vaisala.com
@ 2016-09-16 11:16 ` Tom Rini
  2016-09-16 11:37   ` tomas.melin at vaisala.com
  2016-10-08 17:06 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2016-09-16 11:16 UTC (permalink / raw)
  To: u-boot

On Fri, Sep 16, 2016 at 10:21:39AM +0000, tomas.melin at vaisala.com wrote:

> Register definitions needed for configuring the
> ePWM module.
> 
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
> ---
>  arch/arm/include/asm/arch-am33xx/cpu.h             | 36 ++++++++++++++++++++++
>  arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |  1 +

OK, but what's the user for this in U-Boot?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160916/4778a894/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM: Add register defines for am33xx ePWM registers
  2016-09-16 11:16 ` Tom Rini
@ 2016-09-16 11:37   ` tomas.melin at vaisala.com
  0 siblings, 0 replies; 4+ messages in thread
From: tomas.melin at vaisala.com @ 2016-09-16 11:37 UTC (permalink / raw)
  To: u-boot

On 09/16/2016 02:16 PM, Tom Rini wrote:

> On Fri, Sep 16, 2016 at 10:21:39AM +0000, tomas.melin at vaisala.com wrote:
>
>> Register definitions needed for configuring the
>> ePWM module.
>>
>> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
>> ---
>>  arch/arm/include/asm/arch-am33xx/cpu.h             | 36 ++++++++++++++++++++++
>>  arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |  1 +
> OK, but what's the user for this in U-Boot?  Thanks!
>
They are currently used in our boards, so it would help to have them defined upstream. Also it would help anyone else using the ePWM subsystem. And since they define hardware registers atleast for completeness it wouldnt harm to have them readily available.

Tomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] ARM: Add register defines for am33xx ePWM registers
  2016-09-16 10:21 [U-Boot] [PATCH] ARM: Add register defines for am33xx ePWM registers tomas.melin at vaisala.com
  2016-09-16 11:16 ` Tom Rini
@ 2016-10-08 17:06 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-10-08 17:06 UTC (permalink / raw)
  To: u-boot

On Fri, Sep 16, 2016 at 10:21:39AM +0000, tomas.melin at vaisala.com wrote:

> Register definitions needed for configuring the
> ePWM module.
> 
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161008/35ea8cdb/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-08 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 10:21 [U-Boot] [PATCH] ARM: Add register defines for am33xx ePWM registers tomas.melin at vaisala.com
2016-09-16 11:16 ` Tom Rini
2016-09-16 11:37   ` tomas.melin at vaisala.com
2016-10-08 17:06 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.