[PATCH] BeagleBoard updates rebased on u-boot-ti and debugged

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>

Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072
    Author: Greg Turner <gregturner@ti.com>

    New u-boot command for status of USER button on BeagleBoard-xM

         Modified bootcmd to check the staus at boot time and set
   filename of the boot script.

* Moved to a BeagleBoard specific file.
* Removed changes to default boot command from adding userbutton
  command.
* Made to handle pre-xM boards.
* Flipped polarity of the return value to avoid confusion. Success (0)
  is when the button is pressed. Failure (1) is when the button is NOT
  pressed.
* Used latest revision getting function.
* Used latest macros for board revision.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>

Adding the OMAP3 DSS video driver to the Makefile. The patch applied to
u-boot-ti didn't include this for some reason.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>

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: Jason Kridner <jkridner@beagleboard.org>

Based on patches from Syed Mohammed Khasim (khasim@ti.com).

Configures the output of the BeagleBoard DVI to be orange.
Configures the output of the BeagleBoard S-Video to be a colorbar.

Remove __attribute__ ((packed)) to prevent byte access to soc
registers in some gcc versions.

Having patches to enable ehci for the BeagleBoard lying around for
several month, this one was the show-stopper.

Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for
finding the problem.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>

This is an attempt to get the EHCI port working on the BeagleBoard-xM,
but it is not working for me. It hangs when I do 'usb start'.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>

Hi Jason,

Although the initialization should probably be done with names, the
existing implementation has these structures filled in the opposite
order.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
---
common/cmd_led.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_led.c b/common/cmd_led.c
index 988157b..ad0fd0f 100644
--- a/common/cmd_led.c
+++ b/common/cmd_led.c
@@ -34,8 +34,8 @@
struct led_tbl_s {
   char *string; /* String for use in the command */
   led_id_t mask; /* Mask used for calling __led_set() */
- void (*on)(void); /* Optional fucntion for turning LED on */
- void (*off)(void); /* Optional fucntion for turning LED on */
+ void (*off)(void); /* Optional function for turning LED on */

This is a good time to also fix the comment...

+ void (*on)(void); /* Optional function for turning LED on */
};

typedef struct led_tbl_s led_tbl_t;

When sending patch series, it is a good practice to number them.
git format-patch -n does the job for you.

Based on patches from Syed Mohammed Khasim (khasim@ti.com).

Configures the output of the BeagleBoard DVI to be orange.
Configures the output of the BeagleBoard S-Video to be a colorbar.
---
Updates for this version
* Rebased on u-boot-ti.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
---
board/ti/beagle/beagle.c | 24 +++++++++++++
board/ti/beagle/beagle.h | 86 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 110 insertions(+), 0 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 2e27aef..69fe162 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -165,6 +165,28 @@ unsigned int get_expansion_id(void)
}

/*
+ * Configure DSS to display background color on DVID
+ * Configure VENC to display color bar on S-Video
+ */
+void display_init(void)

Probably, static void display_init(void) would be better...
or even beagle_display_init... so no name space collision will occur ever...

Remove __attribute__ ((packed)) to prevent byte access to soc
registers in some gcc versions.

Having patches to enable ehci for the BeagleBoard lying around for
several month, this one was the show-stopper.

Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for
finding the problem.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
Cc: Alexander Holler <holler@ahsoftware.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
---
Changes for v2:
* Original and v2 were provided by Alexander Holler.
* v1 was http://patchwork.ozlabs.org/patch/89358/
* v2 was [U-Boot] USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor. - Patchwork

Changes for v3:
* Switched to align(4), rather than remove the attribute, per suggestion
  from Alexander.

Also fixing the commit message would help
as the change log won't be available after the patch applied.

applied to u-boot-video/master after fixing the commit
description to include SoB lines. Thanks!

Anatolij

Dear Jason Kridner,

From: Syed Mohammed Khasim <khasim@ti.com>

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

Incorporated DSS register access using structures.

I apologize for the late review...

...

--- /dev/null
+++ b/arch/arm/include/asm/arch-omap3/dss.h
@@ -0,0 +1,173 @@

...

+ * Referred to Linux DSS driver files for OMAP3

Sorry, but we need exact attribution. Please see bullet # 4 at
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign

+ * 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.

...

Sorry, but we need GPL v2+ (i. e. the "or any later version" clause)
[ibidem, bullet # 3]

...

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

...

+ * Referred to Linux DSS driver files for OMAP3

See above.

+ * 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.

See above.

Can you please provide proper attribution, and try to get the
licensing fixed?

Best regards,

Wolfgang Denk

Dear Jason, dear Syed Mohammed,

...

+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <khasim@ti.com>
+ *
+ * Referred to Linux DSS driver files for OMAP3

...

On second look it appears as if you removed existing Copyright
entries from the code. Please NEVER do that!!!

Best regards,

Wolfgang Denk

Dear Jason Kridner,

From: Syed Mohammed Khasim <khasim@ti.com>

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

Incorporated DSS register access using structures.

I apologize for the late review...

...

--- /dev/null
+++ b/arch/arm/include/asm/arch-omap3/dss.h
@@ -0,0 +1,173 @@

...

+ * Referred to Linux DSS driver files for OMAP3

Sorry, but we need exact attribution. Please see bullet # 4 at
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign

k.

+ * 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.

...

Sorry, but we need GPL v2+ (i. e. the "or any later version" clause)
[ibidem, bullet # 3]

k

...

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

...

+ * Referred to Linux DSS driver files for OMAP3

See above.

+ * 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.

See above.

Can you please provide proper attribution, and try to get the
licensing fixed?

Joel, since there seems to be some interest in this patch, can you
perform the clean-up on this one and submit it (tested in isolation to
the other patches being cleaned-up for upstreaming)? Perhaps it is
wrong for me to assume you'll have he next free minute?