From: Christoph Fritz <chf.fritz@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] pwm: imx: increase support up to PWM8 for i.MX6SX
Date: Tue, 22 Nov 2016 12:01:28 +0100 [thread overview]
Message-ID: <20161122110128.GB15909@lovely> (raw)
In-Reply-To: <2aa22e43-49e8-73ab-0709-3a0a699a3e91@denx.de>
This patch increases supported PWMs from previously PWM4 now up to PWM8
if i.MX6SX is in use.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
drivers/pwm/pwm-imx-util.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-imx-util.c b/drivers/pwm/pwm-imx-util.c
index 285564a..534dd8e 100644
--- a/drivers/pwm/pwm-imx-util.c
+++ b/drivers/pwm/pwm-imx-util.c
@@ -15,7 +15,7 @@
#include <div64.h>
#include <asm/arch/imx-regs.h>
-/* pwm_id from 0..3 */
+/* pwm_id from 0..7 */
struct pwm_regs *pwm_id_to_reg(int pwm_id)
{
switch (pwm_id) {
@@ -27,6 +27,16 @@ struct pwm_regs *pwm_id_to_reg(int pwm_id)
return (struct pwm_regs *)PWM3_BASE_ADDR;
case 3:
return (struct pwm_regs *)PWM4_BASE_ADDR;
+#ifdef CONFIG_MX6SX
+ case 4:
+ return (struct pwm_regs *)PWM5_BASE_ADDR;
+ case 5:
+ return (struct pwm_regs *)PWM6_BASE_ADDR;
+ case 6:
+ return (struct pwm_regs *)PWM7_BASE_ADDR;
+ case 7:
+ return (struct pwm_regs *)PWM8_BASE_ADDR;
+#endif
default:
printf("unknown pwm_id: %d\n", pwm_id);
break;
--
2.1.4
next prev parent reply other threads:[~2016-11-22 11:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 17:01 [U-Boot] [PATCH] pwm: imx: increase support up to PWM8 Christoph Fritz
2016-10-17 7:21 ` Stefano Babic
2016-10-17 7:24 ` Stefano Babic
2016-11-22 11:01 ` Christoph Fritz [this message]
2016-11-29 16:19 ` [U-Boot] [PATCH v2] pwm: imx: increase support up to PWM8 for i.MX6SX 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=20161122110128.GB15909@lovely \
--to=chf.fritz@googlemail.com \
--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 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.