From: Marek Belisko <marek@goldelico.com>
To: tony@atomide.com, linux@arm.linux.org.uk, tomi.valkeinen@ti.com,
plagnioj@jcrosoft.com
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
neilb@suse.de, hns@goldelico.com,
Marek Belisko <marek@goldelico.com>
Subject: [PATCH 1/3] arm: omap2: Export devconf1 bypass and acbias.
Date: Mon, 14 Oct 2013 23:02:33 +0200 [thread overview]
Message-ID: <1381784555-18344-2-git-send-email-marek@goldelico.com> (raw)
In-Reply-To: <1381784555-18344-1-git-send-email-marek@goldelico.com>
devconf1 reg access is localized only in mach-omap2 and we need to export
updating of devconf1 from omapdss venc driver (bypass and acbias bits).
Add simple api call which update only necessary bits.
Signed-off-by: Marek Belisko <marek@goldelico.com>
---
arch/arm/mach-omap2/Makefile | 2 ++
arch/arm/mach-omap2/control.h | 2 ++
arch/arm/mach-omap2/omap3-tvout.c | 36 ++++++++++++++++++++++++++++++++++++
include/linux/omap-tvout.h | 14 ++++++++++++++
4 files changed, 54 insertions(+)
create mode 100644 arch/arm/mach-omap2/omap3-tvout.c
create mode 100644 include/linux/omap-tvout.h
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index afb457c..15e0f28 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -306,3 +306,5 @@ emac-$(CONFIG_TI_DAVINCI_EMAC) := am35xx-emac.o
obj-y += $(emac-m) $(emac-y)
obj-y += common-board-devices.o twl-common.o dss-common.o
+
+obj-$(CONFIG_ARCH_OMAP3) += omap3-tvout.o
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index f7d7c2e..65277f1 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -279,6 +279,8 @@
/* CONTROL_DEVCONF1 bits */
#define OMAP243X_MMC1_ACTIVE_OVERWRITE (1 << 31)
+#define OMAP2_TVOUTBYPASS (1 << 18)
+#define OMAP2_TVACEN (1 << 11)
#define OMAP2_MMCSDIO2ADPCLKISEL (1 << 6) /* MMC2 loop back clock */
#define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */
#define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */
diff --git a/arch/arm/mach-omap2/omap3-tvout.c b/arch/arm/mach-omap2/omap3-tvout.c
new file mode 100644
index 0000000..eaed225
--- /dev/null
+++ b/arch/arm/mach-omap2/omap3-tvout.c
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/arm/mach-omap2/omap3-tvout.c
+ *
+ * Copyright (C) 2013 Golden Delicious Computers
+ * Author: Marek Belisko <marek@goldelico.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/omap-tvout.h>
+
+#include "soc.h"
+#include "control.h"
+
+void update_bypass_acbias(bool bypass, bool acbias)
+{
+#ifdef CONFIG_ARCH_OMAP3
+ int val = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
+
+ if (bypass)
+ val |= OMAP2_TVOUTBYPASS;
+ else
+ val &= ~OMAP2_TVOUTBYPASS;
+
+ if (acbias)
+ val |= OMAP2_TVACEN;
+ else
+ val &= ~OMAP2_TVACEN;
+
+ omap_ctrl_writel(val, OMAP343X_CONTROL_DEVCONF1);
+#endif
+}
+
diff --git a/include/linux/omap-tvout.h b/include/linux/omap-tvout.h
new file mode 100644
index 0000000..25f676d
--- /dev/null
+++ b/include/linux/omap-tvout.h
@@ -0,0 +1,14 @@
+/*
+ * OMAP TV-out support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __LINUX_OMAP_TVOUT_H
+#define __LINUX_OMAP_TVOUT_H
+
+extern void update_bypass_acbias(bool bypass, bool acbias);
+
+#endif
+
--
1.8.1.2
next prev parent reply other threads:[~2013-10-14 21:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 21:02 [PATCH 0/3] omapdss: venc: Add support for " Marek Belisko
2013-10-14 21:02 ` Marek Belisko [this message]
2013-11-11 16:49 ` [PATCH 1/3] arm: omap2: Export devconf1 " Tony Lindgren
2013-11-11 22:00 ` Belisko Marek
2013-11-11 23:31 ` Tony Lindgren
2013-12-10 22:11 ` Belisko Marek
2013-12-10 22:46 ` Tony Lindgren
2013-12-12 8:31 ` Belisko Marek
2013-12-12 19:19 ` Tony Lindgren
2013-11-11 22:20 ` Belisko Marek
2013-11-11 23:34 ` Tony Lindgren
2013-10-14 21:02 ` [PATCH 2/3] video: venc: Add new callback and handling for bypass and acbias setup Marek Belisko
2013-10-14 21:02 ` [PATCH 3/3] omapdss: Add OPA362 analog video amplifier driver Marek Belisko
2013-11-05 7:24 ` [PATCH 0/3] omapdss: venc: Add support for bypass and acbias Belisko Marek
2013-11-11 13:29 ` Tomi Valkeinen
2013-11-11 13:57 ` Dr. H. Nikolaus Schaller
2013-11-11 14:13 ` Tomi Valkeinen
2013-11-11 14:30 ` Dr. H. Nikolaus Schaller
2013-11-11 16:54 ` Tony Lindgren
2013-11-18 13:29 ` Tomi Valkeinen
2013-11-18 14:00 ` Dr. H. Nikolaus Schaller
2013-11-11 14:39 ` Dr. H. Nikolaus Schaller
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=1381784555-18344-2-git-send-email-marek@goldelico.com \
--to=marek@goldelico.com \
--cc=hns@goldelico.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=neilb@suse.de \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
--cc=tony@atomide.com \
/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
all inboxes | Powered by JetHome®