mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <trent.piepho@synapse.com>
To: barebox@lists.infradead.org
Cc: Trent Piepho <trent.piepho@synapse.com>
Subject: [PATCH 3/4] ARM: am335x: Enable TSC/ADC clock
Date: Wed,  9 Sep 2020 12:36:49 -0700	[thread overview]
Message-ID: <20200909193650.347646-3-trent.piepho@synapse.com> (raw)
In-Reply-To: <20200909193650.347646-1-trent.piepho@synapse.com>

Now that there is a Barebox driver for the ADC, enable the clock to the
TSC/ADC block.

This machine doesn't use common clock framework clocks in Barebox, and
instead enables any clock that might get used.  Enalbing the clock could
be made conditional based on enabling the driver, but none of the other
clocks do this.

Signed-off-by: Trent Piepho <trent.piepho@synapse.com>
---
 arch/arm/mach-omap/am33xx_clock.c              | 4 ++++
 arch/arm/mach-omap/include/mach/am33xx-clock.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/mach-omap/am33xx_clock.c b/arch/arm/mach-omap/am33xx_clock.c
index 0a4903827..8fa2c70aa 100644
--- a/arch/arm/mach-omap/am33xx_clock.c
+++ b/arch/arm/mach-omap/am33xx_clock.c
@@ -165,6 +165,10 @@ void am33xx_enable_per_clocks(void)
 	__raw_writel(PRCM_MOD_EN, CM_PER_USB0_CLKCTRL);
 	while ((__raw_readl(CM_PER_USB0_CLKCTRL) & 0x30000) != 0x0);
 
+	/* TSC & ADC */
+	__raw_writel(PRCM_MOD_EN, CM_WKUP_ADC_TSC_CLKCTRL);
+	while (__raw_readl(CM_WKUP_ADC_TSC_CLKCTRL) != PRCM_MOD_EN);
+
 	clkdcoldo = __raw_readl(CM_CLKDCOLDO_DPLL_PER);
 	clkdcoldo = clkdcoldo | 0x100;
 	__raw_writel(clkdcoldo, CM_CLKDCOLDO_DPLL_PER);
diff --git a/arch/arm/mach-omap/include/mach/am33xx-clock.h b/arch/arm/mach-omap/include/mach/am33xx-clock.h
index 284d5f8cf..e71ecbcd2 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-clock.h
+++ b/arch/arm/mach-omap/include/mach/am33xx-clock.h
@@ -138,6 +138,7 @@
 #define CM_PER_I2C1_CLKCTRL             (CM_PER + 0x48) /* I2C1 */
 #define CM_PER_I2C2_CLKCTRL             (CM_PER + 0x44) /* I2C2 */
 #define CM_WKUP_GPIO0_CLKCTRL           (CM_WKUP + 0x8) /* GPIO0 */
+#define CM_WKUP_ADC_TSC_CLKCTRL         (CM_WKUP + 0xbc)/* TSCADC */
 
 #define CM_PER_MMC0_CLKCTRL             (CM_PER + 0x3C)
 #define CM_PER_MMC1_CLKCTRL             (CM_PER + 0xF4)
-- 
2.25.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-09-09 19:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 19:36 [PATCH 1/4] aiodev: Name channels with device instance name Trent Piepho
2020-09-09 19:36 ` [PATCH 2/4] aiodev: am335x_adc: Driver for ADC on TI AM335x SoCs Trent Piepho
2020-09-09 19:36 ` Trent Piepho [this message]
2020-09-09 19:36 ` [PATCH 4/4] ARM: beaglebone: Enable ADC Trent Piepho
2020-09-10  8:44 ` [PATCH 1/4] aiodev: Name channels with device instance name Ahmad Fatoum
2020-09-11 17:50   ` Trent Piepho
2020-09-14 10:45     ` Ahmad Fatoum
2020-09-15 12:58 ` Sascha Hauer

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=20200909193650.347646-3-trent.piepho@synapse.com \
    --to=trent.piepho@synapse.com \
    --cc=barebox@lists.infradead.org \
    /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