TI:OMAP: [PATCH 5/7] Add DSS driver for OMAP3

From cf8fa28973de7609d27146730d9e019b7c919b51 Mon Sep 17 00:00:00 2001

Khasim Syed Mohammed wrote:

From cf8fa28973de7609d27146730d9e019b7c919b51 Mon Sep 17 00:00:00 2001
From: Syed Mohammed Khasim <khasim@ti.com>
Date: Tue, 12 Jan 2010 23:57:28 +0530
Subject: [PATCH] Add DSS driver for OMAP3

Supports dynamic panel configuration
Supports dynamic tv standard selection
Adds support for DSS register access through generic APIs

Incorporated DSS register access using structures.

Previous discussions are here
http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html

Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
---
drivers/video/Makefile | 1 +
drivers/video/omap3_dss.c | 130 ++++++++++++++++++++++++++++
include/asm-arm/arch-omap3/dss.h | 173 ++++++++++++++++++++++++++++++++++++++
3 files changed, 304 insertions(+), 0 deletions(-)
create mode 100644 drivers/video/omap3_dss.c
create mode 100644 include/asm-arm/arch-omap3/dss.h

diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index bb6b5a0..cb15dc2 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_SED156X) += sed156x.o
COBJS-$(CONFIG_VIDEO_SM501) += sm501.o
COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o
COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o
+COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o

Alphabetical order

COBJS-y += videomodes.o

COBJS := $(COBJS-y)
diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c
new file mode 100644
index 0000000..69c705a
--- /dev/null
+++ b/drivers/video/omap3_dss.c
@@ -0,0 +1,130 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <khasim@ti.com>
+ *
+ * Referred to Linux DSS driver files for OMAP3
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation's version 2 of
+ * the License.

This needs an - or later -
http://www.denx.de/wiki/U-Boot/Patches
Similar problem below.

+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *

<snip>

+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+

+#include <common.h>
new file mode 100644
index 0000000..e5e3b0d
--- /dev/null
+++ b/include/asm-arm/arch-omap3/dss.h
@@ -0,0 +1,173 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <khasim@ti.com>
+ *
+ * Referred to Linux DSS driver files for OMAP3
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation's version 2 of
+ * the License.

Similar license
- or later -

+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef DSS_H
+#define DSS_H
+
+/*
+ * DSS Base Registers
+ */
+#define OMAP3_DSS_BASE 0x48050040
+#define OMAP3_DISPC_BASE 0x48050440
+#define OMAP3_VENC_BASE 0x48050C00
+
+/* DSS Registers */
+struct dss_regs {
+ u32 control; /* 0x40 */

Add a comment to explain why base starts at 0x40
could also be handled with changing code
OMAP3_DSS_BASE 0x48050000
struct dss_regs {
u8 reserved_1[0x40];
..

+ u32 sdi_control; /* 0x44 */
+ u32 pll_control; /* 0x48 */
+};
+
+/* DISPC Registers */
+struct dispc_regs {

similar

+ u32 control; /* 0x40 */

Tom

Khasim Syed Mohammed wrote:

From cf8fa28973de7609d27146730d9e019b7c919b51 Mon Sep 17 00:00:00 2001
From: Syed Mohammed Khasim <khasim@ti.com>
Date: Tue, 12 Jan 2010 23:57:28 +0530
Subject: [PATCH] Add DSS driver for OMAP3

Supports dynamic panel configuration
Supports dynamic tv standard selection
Adds support for DSS register access through generic APIs

Incorporated DSS register access using structures.

Previous discussions are here
http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html

Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
---
drivers/video/Makefile | 1 +
drivers/video/omap3_dss.c | 130 ++++++++++++++++++++++++++++
include/asm-arm/arch-omap3/dss.h | 173
++++++++++++++++++++++++++++++++++++++
3 files changed, 304 insertions(+), 0 deletions(-)
create mode 100644 drivers/video/omap3_dss.c
create mode 100644 include/asm-arm/arch-omap3/dss.h

diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index bb6b5a0..cb15dc2 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_SED156X) += sed156x.o
COBJS-$(CONFIG_VIDEO_SM501) += sm501.o
COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o
COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o
+COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o

Alphabetical order

Sure

COBJS-y += videomodes.o

COBJS := $(COBJS-y)
diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c
new file mode 100644
index 0000000..69c705a
--- /dev/null
+++ b/drivers/video/omap3_dss.c
@@ -0,0 +1,130 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <khasim@ti.com>
+ *
+ * Referred to Linux DSS driver files for OMAP3
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation's version 2 of
+ * the License.

This needs an - or later -
http://www.denx.de/wiki/U-Boot/Patches
Similar problem below.

+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *

<snip>

Sure

+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+

+#include <common.h>
new file mode 100644
index 0000000..e5e3b0d
--- /dev/null
+++ b/include/asm-arm/arch-omap3/dss.h
@@ -0,0 +1,173 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <khasim@ti.com>
+ *
+ * Referred to Linux DSS driver files for OMAP3
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation's version 2 of
+ * the License.

Similar license
- or later -

Sure

+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef DSS_H
+#define DSS_H
+
+/*
+ * DSS Base Registers
+ */
+#define OMAP3_DSS_BASE 0x48050040
+#define OMAP3_DISPC_BASE 0x48050440
+#define OMAP3_VENC_BASE 0x48050C00
+
+/* DSS Registers */
+struct dss_regs {
+ u32 control; /* 0x40 */

Add a comment to explain why base starts at 0x40
could also be handled with changing code
OMAP3_DSS_BASE 0x48050000
struct dss_regs {
u8 reserved_1[0x40];
..

may be,.. let me try.

+ u32 sdi_control; /* 0x44 */
+ u32 pll_control; /* 0x48 */
+};
+
+/* DISPC Registers */
+struct dispc_regs {

similar

ok

+ u32 control; /* 0x40 */

Tom

Thanks for very detailed review. Mainly Licensing.

Regards,
Khasim

Khasim Syed Mohammed wrote:

Khasim Syed Mohammed wrote:

From cf8fa28973de7609d27146730d9e019b7c919b51 Mon Sep 17 00:00:00 2001
From: Syed Mohammed Khasim <khasim@ti.com>
Date: Tue, 12 Jan 2010 23:57:28 +0530
Subject: [PATCH] Add DSS driver for OMAP3

Supports dynamic panel configuration
Supports dynamic tv standard selection
Adds support for DSS register access through generic APIs

Incorporated DSS register access using structures.

Previous discussions are here
http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html

Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
---
drivers/video/Makefile | 1 +
drivers/video/omap3_dss.c | 130 ++++++++++++++++++++++++++++
include/asm-arm/arch-omap3/dss.h | 173
++++++++++++++++++++++++++++++++++++++
3 files changed, 304 insertions(+), 0 deletions(-)
create mode 100644 drivers/video/omap3_dss.c
create mode 100644 include/asm-arm/arch-omap3/dss.h

<snip>

+/*
+ * DSS Base Registers
+ */
+#define OMAP3_DSS_BASE 0x48050040
+#define OMAP3_DISPC_BASE 0x48050440
+#define OMAP3_VENC_BASE 0x48050C00
+
+/* DSS Registers */
+struct dss_regs {
+ u32 control; /* 0x40 */

Add a comment to explain why base starts at 0x40
could also be handled with changing code
OMAP3_DSS_BASE 0x48050000
struct dss_regs {
u8 reserved_1[0x40];
..

may be,.. let me try.

This can just be fixed by a simple comment like
/* Note : 0x40 is offset from OMAP3_DSS_BASE */
This helps avoid people wondering why 0x40 and not 0x0

+ u32 sdi_control; /* 0x44 */
+ u32 pll_control; /* 0x48 */
+};
+
+/* DISPC Registers */
+struct dispc_regs {

similar

ok

+ u32 control; /* 0x40 */

Tom

Thanks for very detailed review. Mainly Licensing.

Yes.

Regards,
Khasim

Tom

What is the status of this patch. Was an updated one ever submitted?

What is the status of this patch. Was an updated one ever submitted?

To the best of my knowledge multiple revisions were sent to the list but there were outstanding comments against the last set as well.

IIRC Tom had some comments