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

This brings in some fixes and some patches currently maintained out-of-tree for the BeagleBoard. It seems for some things, some old code got applied, so I've given updates here. I've broken up the patches into small bits to be accepted/rejected on the hopes of trying to get as much in as possible.
The USB patches placed in u-boot-ti aren't working for me, but this brings in some known required patches.
Alexander Holler (1): BeagleBoard: config: Switch default console from ttyS2 to ttyO2
Bob Feretich (1): BeagleBoard: Pin mux initialization glitch fix
Jason Kridner (24): BeagleBoard: add xM rev C to ID table BeagleBoard: Fixed typo in typecast Corrected LED name match finding avoiding extraneous Usage printouts BeagleBoard: fix LED 0/1 in driver led: added cmd_led to Makefile led: correct off/on locations in structure led: remove trailing whitespace led: loop through all leds led: fixup help/usage BeagleBoard: config: reduce BOOTDELAY to 3 BeagleBoard: config: change default resolution to VGA BeagleBoard: config: don't suck in blank line BeagleBoard: config: make mtest run BeagleBoard: config: increase command-line functionality BeagleBoard: config: load kernel via MMC ext2 BeagleBoard: config: add optargs/buddy/camera BeagleBoard: config: add ramboot BeagleBoard: Added userbutton command BeagleBoard: config: use the USERBUTTON command video: DSS makefile update BeagleBoard: config: enable DSS BeagleBoard: Configure DVI/S-video USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor TWL4030/BeagleBoard: Added hub power enable
Steve Sakoman (1): BeagleBoard: config: Remove omapfb.debug=y from Beagle and Overo env settings
Syed Mohammed Khasim (1): OMAP3: Add DSS driver for OMAP3
arch/arm/include/asm/arch-omap3/dss.h | 173 +++++++++++++++++++++++++++++++++ board/ti/beagle/beagle.c | 119 +++++++++++++++++++++-- board/ti/beagle/beagle.h | 87 +++++++++++++++++ board/ti/beagle/led.c | 4 +- common/Makefile | 1 + common/cmd_led.c | 18 ++-- drivers/misc/twl4030_led.c | 6 +- drivers/usb/host/ehci.h | 4 +- drivers/video/Makefile | 2 + drivers/video/omap3_dss.c | 130 +++++++++++++++++++++++++ include/configs/omap3_beagle.h | 63 +++++++++--- include/configs/omap3_overo.h | 2 - include/twl4030.h | 1 + 13 files changed, 572 insertions(+), 38 deletions(-) create mode 100644 arch/arm/include/asm/arch-omap3/dss.h create mode 100644 drivers/video/omap3_dss.c

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- board/ti/beagle/beagle.c | 10 ++++++++++ board/ti/beagle/beagle.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 4e194a2..52a7f93 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -216,6 +216,16 @@ int misc_init_r(void) TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, TWL4030_PM_RECEIVER_DEV_GRP_P1); break; + case REVISION_XM_C: + printf("Beagle xM Rev C\n"); + setenv("beaglerev", "xMC"); + MUX_BEAGLE_XM(); + /* Set VAUX2 to 1.8V for EHCI PHY */ + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, + TWL4030_PM_RECEIVER_VAUX2_VSEL_18, + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, + TWL4030_PM_RECEIVER_DEV_GRP_P1); + break; default: printf("Beagle unknown 0x%02x\n", get_board_revision()); MUX_BEAGLE_XM(); diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h index a7401b1..04247cd 100644 --- a/board/ti/beagle/beagle.h +++ b/board/ti/beagle/beagle.h @@ -39,6 +39,7 @@ const omap3_sysinfo sysinfo = { #define REVISION_C4 0x5 #define REVISION_XM_A 0x0 #define REVISION_XM_B 0x1 +#define REVISION_XM_C 0x2
/* * IEN - Input Enable

Without this patch, you should get a warning.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- board/ti/beagle/beagle.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 52a7f93..c0cab9e 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -171,7 +171,7 @@ int misc_init_r(void) { struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; - struct control_prog_io *prog_io_base = (struct gpio *)OMAP34XX_CTRL_BASE; + struct control_prog_io *prog_io_base = (struct control_prog_io *)OMAP34XX_CTRL_BASE;
/* Enable i2c2 pullup resisters */ writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1);

This avoids some extraneous Usage printouts.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- common/cmd_led.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/cmd_led.c b/common/cmd_led.c index f1e8a62..988157b 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -83,7 +83,7 @@ int str_onoff (char *var)
int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - int state, i; + int state, i, match = 0;
/* Validate arguments */ if ((argc != 3)) { @@ -98,6 +98,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) for (i = 0; led_commands[i].string; i++) { if ((strcmp("all", argv[1]) == 0) || (strcmp(led_commands[i].string, argv[1]) == 0)) { + match = 1; if (led_commands[i].on) { if (state) { led_commands[i].on(); @@ -112,7 +113,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) }
/* If we ran out of matches, print Usage */ - if (!led_commands[i].string && !(strcmp("all", argv[1]) == 0)) { + if (!match) { return cmd_usage(cmdtp); }

Fixed USR0/USR1 to be LED 0/1 respectively
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- board/ti/beagle/led.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c index df26552..fe80e19 100644 --- a/board/ti/beagle/led.c +++ b/board/ti/beagle/led.c @@ -27,8 +27,8 @@ static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
/* GPIO pins for the LEDs */ -#define BEAGLE_LED_USR0 149 -#define BEAGLE_LED_USR1 150 +#define BEAGLE_LED_USR0 150 +#define BEAGLE_LED_USR1 149
#ifdef STATUS_LED_GREEN void green_LED_off (void)

Addition of cmd_led into the Makefile wasn't included in the patch applied to u-boot-ti.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- common/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/common/Makefile b/common/Makefile index 4555716..1aaa5fa 100644 --- a/common/Makefile +++ b/common/Makefile @@ -106,6 +106,7 @@ COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o COBJS-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o +COBJS-$(CONFIG_CMD_LED) += cmd_led.o COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o COBJS-y += cmd_load.o COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o

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 */ + void (*on)(void); /* Optional function for turning LED on */ };
typedef struct led_tbl_s led_tbl_t;

Required to meet style requirements.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- common/cmd_led.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_led.c b/common/cmd_led.c index ad0fd0f..90cf043 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -96,7 +96,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) }
for (i = 0; led_commands[i].string; i++) { - if ((strcmp("all", argv[1]) == 0) || + if ((strcmp("all", argv[1]) == 0) || (strcmp(led_commands[i].string, argv[1]) == 0)) { match = 1; if (led_commands[i].on) {

'led all on|off' requires this patch.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- common/cmd_led.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/common/cmd_led.c b/common/cmd_led.c index 90cf043..ab85dc6 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -108,7 +108,6 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } else { __led_set(led_commands[i].mask, state); } - break; } }

Placed a description inside the right field without usage information and eliminated redundant usage information.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- common/cmd_led.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/cmd_led.c b/common/cmd_led.c index ab85dc6..848d38d 100644 --- a/common/cmd_led.c +++ b/common/cmd_led.c @@ -121,7 +121,8 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
U_BOOT_CMD( led, 3, 1, do_led, - "led\t- [" + "set or clear leds", + "[" #ifdef CONFIG_BOARD_SPECIFIC_LED #ifdef STATUS_LED_BIT "0|" @@ -148,6 +149,5 @@ U_BOOT_CMD( #ifdef STATUS_LED_BLUE "blue|" #endif - "all] [on|off]\n", - "led [led_name] [on|off] sets or clears led(s)\n" + "all] [on|off] sets or clears led(s)" );

From: Bob Feretich bob.feretich@rafresearch.com
The below patch reverses the order of two segments in the board file. Output pins need to have their values initialized, before they are exposed to the logic outside the chip.
Signed-off-by: Bob Feretich bob.feretich@rafresearch.com Cc: Wolfgang Denk wd@denx.de Signed-off-by: Jason Kridner jkridner@beagleboard.org --- This patch isn't updated, it is just represented for inclusion on top of u-boot-ti. --- board/ti/beagle/beagle.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index c0cab9e..7768901 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -311,17 +311,17 @@ int misc_init_r(void) twl4030_power_init(); twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
- /* Configure GPIOs to output */ - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); - writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | - GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); - - /* Set GPIOs */ + /* Set GPIO states before they are made outputs */ writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, &gpio6_base->setdataout); writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
+ /* Configure GPIOs to output */ + writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); + writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | + GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); + dieid_num_r();
return 0;

From: Alexander Holler holler@ahsoftware.de
Linux kernels >= 2.6.36 are using ttyOn instead ttySn for the serials on OMAPs.
Signed-off-by: Alexander Holler holler@ahsoftware.de Signed-off-by: Jason Kridner jkridner@beagleboard.org --- This patch isn't updated, it is just represented for inclusion on top of u-boot-ti. --- include/configs/omap3_beagle.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 5191d14..b4cbb06 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -208,7 +208,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ "usbtty=cdc_acm\0" \ - "console=ttyS2,115200n8\0" \ + "console=ttyO2,115200n8\0" \ "mpurate=auto\0" \ "vram=12M\0" \ "dvimode=1024x768MR-16@60\0" \

From: Steve Sakoman steve@sakoman.com
The kernel DSS2 code is mature now, and keeping this setting hurts performance
Signed-off-by: Steve Sakoman steve@sakoman.com (cherry picked from commit 0588da9057fddb5f6a6a04aedd7e0a79eb39e9e5) Signed-off-by: Jason Kridner jkridner@beagleboard.org --- This patch is only rebased and is just being represented for inclusion on top of u-boot-ti. --- include/configs/omap3_beagle.h | 2 -- include/configs/omap3_overo.h | 2 -- 2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index b4cbb06..8af2f7a 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -222,7 +222,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ "omapdss.def_disp=${defaultdisplay} " \ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ @@ -230,7 +229,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 1b3d439..06a28f6 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -169,7 +169,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ "omapdss.def_disp=${defaultdisplay} " \ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ @@ -177,7 +176,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 8af2f7a..06c1ce3 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -203,7 +203,7 @@ /* partition */
/* Environment information */ -#define CONFIG_BOOTDELAY 10 +#define CONFIG_BOOTDELAY 3
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 06c1ce3..9ee1664 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -211,7 +211,7 @@ "console=ttyO2,115200n8\0" \ "mpurate=auto\0" \ "vram=12M\0" \ - "dvimode=1024x768MR-16@60\0" \ + "dvimode=640x480MR-16@60\0" \ "defaultdisplay=dvi\0" \ "mmcdev=0\0" \ "mmcroot=/dev/mmcblk0p2 rw\0" \

To prevent a blank line from being critical.
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 9ee1664..ade6225 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -258,7 +258,7 @@ "run mmcboot;" \ "fi;" \ "fi;" \ - "run nandboot;" \ + "run nandboot;"
#define CONFIG_AUTO_COMPLETE 1 /*

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index ade6225..17d4356 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -276,10 +276,11 @@ /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
-#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */ - /* works on */ -#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ - 0x01F00000) /* 31MB */ +#define CONFIG_SYS_ALT_MEMTEST 1 +#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */ + /* defaults */ +#define CONFIG_SYS_MEMTEST_END (0x87FFFFFF) /* 128MB */ +#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */
#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */ /* load address */

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 17d4356..49bfaa4 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -157,6 +157,7 @@ #define CONFIG_USB_STORAGE /* USB storage support */ #define CONFIG_CMD_NAND /* NAND support */ #define CONFIG_CMD_LED /* LED support */ +#define CONFIG_CMD_SETEXPR /* Evaluate expressions */
#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ @@ -268,11 +269,11 @@ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "OMAP3 beagleboard.org # " -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ +#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 49bfaa4..e2f7dd0 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -236,7 +236,8 @@ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index e2f7dd0..71e41f8 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -211,6 +211,9 @@ "usbtty=cdc_acm\0" \ "console=ttyO2,115200n8\0" \ "mpurate=auto\0" \ + "buddy=none "\ + "optargs=\0" \ + "camera=lbcm3m1\0" \ "vram=12M\0" \ "dvimode=640x480MR-16@60\0" \ "defaultdisplay=dvi\0" \ @@ -220,14 +223,20 @@ "nandroot=/dev/mtdblock4 rw\0" \ "nandrootfstype=jffs2\0" \ "mmcargs=setenv bootargs console=${console} " \ + "${optargs} " \ "mpurate=${mpurate} " \ + "buddy=${buddy} "\ + "camera=${camera} "\ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ "omapdss.def_disp=${defaultdisplay} " \ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ "nandargs=setenv bootargs console=${console} " \ + "${optargs} " \ "mpurate=${mpurate} " \ + "buddy=${buddy} "\ + "camera=${camera} "\ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ "omapdss.def_disp=${defaultdisplay} " \

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 71e41f8..c29baf5 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -207,7 +207,8 @@ #define CONFIG_BOOTDELAY 3
#define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x82000000\0" \ + "loadaddr=0x80200000\0" \ + "rdaddr=0x81000000\0" \ "usbtty=cdc_acm\0" \ "console=ttyO2,115200n8\0" \ "mpurate=auto\0" \ @@ -222,6 +223,8 @@ "mmcrootfstype=ext3 rootwait\0" \ "nandroot=/dev/mtdblock4 rw\0" \ "nandrootfstype=jffs2\0" \ + "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M\0" \ + "ramrootfstype=ext2\0" \ "mmcargs=setenv bootargs console=${console} " \ "${optargs} " \ "mpurate=${mpurate} " \ @@ -242,6 +245,17 @@ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ + "ramargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "mpurate=${mpurate} " \ + "buddy=${buddy} "\ + "camera=${camera} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ + "root=${ramroot} " \ + "rootfstype=${ramrootfstype}\0" \ + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ @@ -254,6 +268,9 @@ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ "bootm ${loadaddr}\0" \ + "ramboot=echo Booting from ramdisk ...; " \ + "run ramargs; " \ + "bootm ${loadaddr}\0" \
#define CONFIG_BOOTCOMMAND \ "if mmc rescan ${mmcdev}; then " \

Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072 Author: Greg Turner gregturner@ti.com Date: Tue May 25 09:19:06 2010 -0500
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. -- v2 update: * Added xM-C revision definition (optional, since it was default)
Signed-off-by: Jason Kridner jkridner@beagleboard.org --- board/ti/beagle/beagle.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 7768901..2e27aef 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -50,6 +50,7 @@ extern struct ehci_hccr *hccr; extern volatile struct ehci_hcor *hcor; #endif #include "beagle.h" +#include <command.h>
#define pr_debug(fmt, args...) debug(fmt, ##args)
@@ -440,3 +441,58 @@ int ehci_hcd_init(void) }
#endif /* CONFIG_USB_EHCI */ + +/* + * This command returns the status of the user button on beagle xM + * Input - none + * Returns - 1 if button is held down + * 0 if button is not held down + */ +int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int button = 0; + int gpio; + + /* + * pass address parameter as argv[0] (aka command name), + * and all remaining args + */ + switch (get_board_revision()) { + case REVISION_AXBX: + case REVISION_CX: + case REVISION_C4: + gpio = 7; + break; + case REVISION_XM_A: + case REVISION_XM_B: + case REVISION_XM_C: + default: + gpio = 4; + break; + } + omap_request_gpio(gpio); + omap_set_gpio_direction(gpio, 1); + printf("The user button is currently "); + if(omap_get_gpio_datain(gpio)) + { + button = 1; + printf("PRESSED.\n"); + } + else + { + button = 0; + printf("NOT pressed.\n"); + } + + omap_free_gpio(gpio); + + return !button; +} + +/* -------------------------------------------------------------------- */ + +U_BOOT_CMD( + userbutton, CONFIG_SYS_MAXARGS, 1, do_userbutton, + "Return the status of the BeagleBoard USER button", + "" +);

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index c29baf5..a946b0e 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -256,7 +256,8 @@ "root=${ramroot} " \ "rootfstype=${ramrootfstype}\0" \ "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ + "bootenv=uEnv.txt\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ @@ -274,8 +275,12 @@
#define CONFIG_BOOTCOMMAND \ "if mmc rescan ${mmcdev}; then " \ + "if userbutton; then " \ + "setenv bootenv user.txt;" \ + "fi;" \ "echo SD/MMC found on device ${mmcdev};" \ "if run loadbootenv; then " \ + "echo Loaded environment from ${bootenv};" \ "run importbootenv;" \ "fi;" \ "if test -n $uenvcmd; then " \

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 --- drivers/video/Makefile | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 2c53a6f..6baa7ca 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -41,6 +41,8 @@ COBJS-$(CONFIG_SED156X) += sed156x.o COBJS-$(CONFIG_VIDEO_SM501) += sm501.o COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o +COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o +COBJS-y += videomodes.o
COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)

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.
Previous discussions are here http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html --- v2 updates: * Enable panel output for BeagleBoard * BeagleBoard: Update DVI-D orange screen frequencies for xM
v3 updates: * Remove non-platform (OMAP3) updates
Signed-off-by: Syed Mohammed Khasim khasim@ti.com Signed-off-by: Jason Kridner jkridner@beagleboard.org --- arch/arm/include/asm/arch-omap3/dss.h | 173 +++++++++++++++++++++++++++++++++ drivers/video/omap3_dss.c | 130 +++++++++++++++++++++++++ 2 files changed, 303 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-omap3/dss.h create mode 100644 drivers/video/omap3_dss.c
diff --git a/arch/arm/include/asm/arch-omap3/dss.h b/arch/arm/include/asm/arch-omap3/dss.h new file mode 100644 index 0000000..e5e3b0d --- /dev/null +++ b/arch/arm/include/asm/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. + * + * 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 */ + u32 sdi_control; /* 0x44 */ + u32 pll_control; /* 0x48 */ +}; + +/* DISPC Registers */ +struct dispc_regs { + u32 control; /* 0x40 */ + u32 config; /* 0x44 */ + u32 reserve_2; /* 0x48 */ + u32 default_color0; /* 0x4C */ + u32 default_color1; /* 0x50 */ + u32 trans_color0; /* 0x54 */ + u32 trans_color1; /* 0x58 */ + u32 line_status; /* 0x5C */ + u32 line_number; /* 0x60 */ + u32 timing_h; /* 0x64 */ + u32 timing_v; /* 0x68 */ + u32 pol_freq; /* 0x6C */ + u32 divisor; /* 0x70 */ + u32 global_alpha; /* 0x74 */ + u32 size_dig; /* 0x78 */ + u32 size_lcd; /* 0x7C */ +}; + +/* VENC Registers */ +struct venc_regs { + u32 rev_id; /* 0x00 */ + u32 status; /* 0x04 */ + u32 f_control; /* 0x08 */ + u32 reserve_1; /* 0x0C */ + u32 vidout_ctrl; /* 0x10 */ + u32 sync_ctrl; /* 0x14 */ + u32 reserve_2; /* 0x18 */ + u32 llen; /* 0x1C */ + u32 flens; /* 0x20 */ + u32 hfltr_ctrl; /* 0x24 */ + u32 cc_carr_wss_carr; /* 0x28 */ + u32 c_phase; /* 0x2C */ + u32 gain_u; /* 0x30 */ + u32 gain_v; /* 0x34 */ + u32 gain_y; /* 0x38 */ + u32 black_level; /* 0x3C */ + u32 blank_level; /* 0x40 */ + u32 x_color; /* 0x44 */ + u32 m_control; /* 0x48 */ + u32 bstamp_wss_data; /* 0x4C */ + u32 s_carr; /* 0x50 */ + u32 line21; /* 0x54 */ + u32 ln_sel; /* 0x58 */ + u32 l21__wc_ctl; /* 0x5C */ + u32 htrigger_vtrigger; /* 0x60 */ + u32 savid__eavid; /* 0x64 */ + u32 flen__fal; /* 0x68 */ + u32 lal__phase_reset; /* 0x6C */ + u32 hs_int_start_stop_x; /* 0x70 */ + u32 hs_ext_start_stop_x; /* 0x74 */ + u32 vs_int_start_x; /* 0x78 */ + u32 vs_int_stop_x__vs_int_start_y; /* 0x7C */ + u32 vs_int_stop_y__vs_ext_start_x; /* 0x80 */ + u32 vs_ext_stop_x__vs_ext_start_y; /* 0x84 */ + u32 vs_ext_stop_y; /* 0x88 */ + u32 reserve_3; /* 0x8C */ + u32 avid_start_stop_x; /* 0x90 */ + u32 avid_start_stop_y; /* 0x94 */ + u32 reserve_4; /* 0x98 */ + u32 reserve_5; /* 0x9C */ + u32 fid_int_start_x__fid_int_start_y; /* 0xA0 */ + u32 fid_int_offset_y__fid_ext_start_x; /* 0xA4 */ + u32 fid_ext_start_y__fid_ext_offset_y; /* 0xA8 */ + u32 reserve_6; /* 0xAC */ + u32 tvdetgp_int_start_stop_x; /* 0xB0 */ + u32 tvdetgp_int_start_stop_y; /* 0xB4 */ + u32 gen_ctrl; /* 0xB8 */ + u32 reserve_7; /* 0xBC */ + u32 reserve_8; /* 0xC0 */ + u32 output_control; /* 0xC4 */ + u32 dac_b__dac_c; /* 0xC8 */ + u32 height_width; /* 0xCC */ +}; + +/* Few Register Offsets */ +#define FRAME_MODE_SHIFT 1 +#define TFTSTN_SHIFT 3 +#define DATALINES_SHIFT 8 + +/* Enabling Display controller */ +#define LCD_ENABLE 1 +#define DIG_ENABLE (1 << 1) +#define GO_LCD (1 << 5) +#define GO_DIG (1 << 6) +#define GP_OUT0 (1 << 15) +#define GP_OUT1 (1 << 16) + +#define DISPC_ENABLE (LCD_ENABLE | \ + DIG_ENABLE | \ + GO_LCD | \ + GO_DIG | \ + GP_OUT0| \ + GP_OUT1) + +/* Configure VENC DSS Params */ +#define VENC_CLK_ENABLE (1 << 3) +#define DAC_DEMEN (1 << 4) +#define DAC_POWERDN (1 << 5) +#define VENC_OUT_SEL (1 << 6) +#define DIG_LPP_SHIFT 16 +#define VENC_DSS_CONFIG (VENC_CLK_ENABLE | \ + DAC_DEMEN | \ + DAC_POWERDN | \ + VENC_OUT_SEL) +/* + * Panel Configuration + */ +struct panel_config { + u32 timing_h; + u32 timing_v; + u32 pol_freq; + u32 divisor; + u32 lcd_size; + u32 panel_type; + u32 data_lines; + u32 load_mode; + u32 panel_color; +}; + +/* + * Generic DSS Functions + */ +void omap3_dss_venc_config(const struct venc_regs *venc_cfg, + u32 height, u32 width); +void omap3_dss_panel_config(const struct panel_config *panel_cfg); +void omap3_dss_enable(void); + +#endif /* DSS_H */ 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 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 + */ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/dss.h> + +/* + * Configure VENC for a given Mode (NTSC / PAL) + */ +void omap3_dss_venc_config(const struct venc_regs *venc_cfg, + u32 height, u32 width) +{ + struct venc_regs *venc = (struct venc_regs *) OMAP3_VENC_BASE; + struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE; + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; + + writel(venc_cfg->status, &venc->status); + writel(venc_cfg->f_control, &venc->f_control); + writel(venc_cfg->vidout_ctrl, &venc->vidout_ctrl); + writel(venc_cfg->sync_ctrl, &venc->sync_ctrl); + writel(venc_cfg->llen, &venc->llen); + writel(venc_cfg->flens, &venc->flens); + writel(venc_cfg->hfltr_ctrl, &venc->hfltr_ctrl); + writel(venc_cfg->cc_carr_wss_carr, &venc->cc_carr_wss_carr); + writel(venc_cfg->c_phase, &venc->c_phase); + writel(venc_cfg->gain_u, &venc->gain_u); + writel(venc_cfg->gain_v, &venc->gain_v); + writel(venc_cfg->gain_y, &venc->gain_y); + writel(venc_cfg->black_level, &venc->black_level); + writel(venc_cfg->blank_level, &venc->blank_level); + writel(venc_cfg->x_color, &venc->x_color); + writel(venc_cfg->m_control, &venc->m_control); + writel(venc_cfg->bstamp_wss_data, &venc->bstamp_wss_data); + writel(venc_cfg->s_carr, &venc->s_carr); + writel(venc_cfg->line21, &venc->line21); + writel(venc_cfg->ln_sel, &venc->ln_sel); + writel(venc_cfg->l21__wc_ctl, &venc->l21__wc_ctl); + writel(venc_cfg->htrigger_vtrigger, &venc->htrigger_vtrigger); + writel(venc_cfg->savid__eavid, &venc->savid__eavid); + writel(venc_cfg->flen__fal, &venc->flen__fal); + writel(venc_cfg->lal__phase_reset, &venc->lal__phase_reset); + writel(venc_cfg->hs_int_start_stop_x, + &venc->hs_int_start_stop_x); + writel(venc_cfg->hs_ext_start_stop_x, + &venc->hs_ext_start_stop_x); + writel(venc_cfg->vs_int_start_x, &venc->vs_int_start_x); + writel(venc_cfg->vs_int_stop_x__vs_int_start_y, + &venc->vs_int_stop_x__vs_int_start_y); + writel(venc_cfg->vs_int_stop_y__vs_ext_start_x, + &venc->vs_int_stop_y__vs_ext_start_x); + writel(venc_cfg->vs_ext_stop_x__vs_ext_start_y, + &venc->vs_ext_stop_x__vs_ext_start_y); + writel(venc_cfg->vs_ext_stop_y, &venc->vs_ext_stop_y); + writel(venc_cfg->avid_start_stop_x, &venc->avid_start_stop_x); + writel(venc_cfg->avid_start_stop_y, &venc->avid_start_stop_y); + writel(venc_cfg->fid_int_start_x__fid_int_start_y, + &venc->fid_int_start_x__fid_int_start_y); + writel(venc_cfg->fid_int_offset_y__fid_ext_start_x, + &venc->fid_int_offset_y__fid_ext_start_x); + writel(venc_cfg->fid_ext_start_y__fid_ext_offset_y, + &venc->fid_ext_start_y__fid_ext_offset_y); + writel(venc_cfg->tvdetgp_int_start_stop_x, + &venc->tvdetgp_int_start_stop_x); + writel(venc_cfg->tvdetgp_int_start_stop_y, + &venc->tvdetgp_int_start_stop_y); + writel(venc_cfg->gen_ctrl, &venc->gen_ctrl); + writel(venc_cfg->output_control, &venc->output_control); + writel(venc_cfg->dac_b__dac_c, &venc->dac_b__dac_c); + + /* Configure DSS for VENC Settings */ + writel(VENC_DSS_CONFIG, &dss->control); + + /* Configure height and width for Digital out */ + writel(((height << DIG_LPP_SHIFT) | width), &dispc->size_dig); +} + +/* + * Configure Panel Specific Parameters + */ +void omap3_dss_panel_config(const struct panel_config *panel_cfg) +{ + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; + + writel(panel_cfg->timing_h, &dispc->timing_h); + writel(panel_cfg->timing_v, &dispc->timing_v); + writel(panel_cfg->pol_freq, &dispc->pol_freq); + writel(panel_cfg->divisor, &dispc->divisor); + writel(panel_cfg->lcd_size, &dispc->size_lcd); + writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config); + writel(((panel_cfg->panel_type << TFTSTN_SHIFT) | + (panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control); + writel(panel_cfg->panel_color, &dispc->default_color0); +} + +/* + * Enable LCD and DIGITAL OUT in DSS + */ +void omap3_dss_enable(void) +{ + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; + u32 l = 0; + + l = readl(&dispc->control); + l |= DISPC_ENABLE; + writel(l, &dispc->control); +}

Signed-off-by: Jason Kridner jkridner@beagleboard.org --- include/configs/omap3_beagle.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index a946b0e..6ece0fa 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -158,6 +158,7 @@ #define CONFIG_CMD_NAND /* NAND support */ #define CONFIG_CMD_LED /* LED support */ #define CONFIG_CMD_SETEXPR /* Evaluate expressions */ +#define CONFIG_VIDEO_OMAP3 /* DSS Support */
#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */

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) +{ + omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH); + switch (get_board_revision()) { + case REVISION_AXBX: + case REVISION_CX: + case REVISION_C4: + omap3_dss_panel_config(&dvid_cfg); + break; + case REVISION_XM_A: + case REVISION_XM_B: + case REVISION_XM_C: + default: + omap3_dss_panel_config(&dvid_cfg_xm); + break; + } +} + +/* * Routine: misc_init_r * Description: Configure board specific parts */ @@ -311,6 +333,7 @@ int misc_init_r(void)
twl4030_power_init(); twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + display_init();
/* Set GPIO states before they are made outputs */ writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, @@ -324,6 +347,7 @@ int misc_init_r(void) GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
dieid_num_r(); + omap3_dss_enable();
return 0; } diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h index 04247cd..18bfaa8 100644 --- a/board/ti/beagle/beagle.h +++ b/board/ti/beagle/beagle.h @@ -23,6 +23,8 @@ #ifndef _BEAGLE_H_ #define _BEAGLE_H_
+#include <asm/arch/dss.h> + const omap3_sysinfo sysinfo = { DDR_STACKED, "OMAP3 Beagle board", @@ -472,4 +474,88 @@ const omap3_sysinfo sysinfo = { MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/
+/* + * Display Configuration + */ + +#define DVI_BEAGLE_ORANGE_COL 0x00FF8000 +#define VENC_HEIGHT 0x00ef +#define VENC_WIDTH 0x027f + +/* + * Configure VENC in DSS for Beagle to generate Color Bar + * + * Kindly refer to OMAP TRM for definition of these values. + */ +static const struct venc_regs venc_config_std_tv = { + .status = 0x0000001B, + .f_control = 0x00000040, + .vidout_ctrl = 0x00000000, + .sync_ctrl = 0x00008000, + .llen = 0x00008359, + .flens = 0x0000020C, + .hfltr_ctrl = 0x00000000, + .cc_carr_wss_carr = 0x043F2631, + .c_phase = 0x00000024, + .gain_u = 0x00000130, + .gain_v = 0x00000198, + .gain_y = 0x000001C0, + .black_level = 0x0000006A, + .blank_level = 0x0000005C, + .x_color = 0x00000000, + .m_control = 0x00000001, + .bstamp_wss_data = 0x0000003F, + .s_carr = 0x21F07C1F, + .line21 = 0x00000000, + .ln_sel = 0x00000015, + .l21__wc_ctl = 0x00001400, + .htrigger_vtrigger = 0x00000000, + .savid__eavid = 0x069300F4, + .flen__fal = 0x0016020C, + .lal__phase_reset = 0x00060107, + .hs_int_start_stop_x = 0x008D034E, + .hs_ext_start_stop_x = 0x000F0359, + .vs_int_start_x = 0x01A00000, + .vs_int_stop_x__vs_int_start_y = 0x020501A0, + .vs_int_stop_y__vs_ext_start_x = 0x01AC0024, + .vs_ext_stop_x__vs_ext_start_y = 0x020D01AC, + .vs_ext_stop_y = 0x00000006, + .avid_start_stop_x = 0x03480079, + .avid_start_stop_y = 0x02040024, + .fid_int_start_x__fid_int_start_y = 0x0001008A, + .fid_int_offset_y__fid_ext_start_x = 0x01AC0106, + .fid_ext_start_y__fid_ext_offset_y = 0x01060006, + .tvdetgp_int_start_stop_x = 0x00140001, + .tvdetgp_int_start_stop_y = 0x00010001, + .gen_ctrl = 0x00FF0000, + .output_control = 0x0000000D, + .dac_b__dac_c = 0x00000000 +}; + +/* + * Configure Timings for DVI D + */ +static const struct panel_config dvid_cfg = { + .timing_h = 0x0ff03f31, /* Horizantal timing */ + .timing_v = 0x01400504, /* Vertical timing */ + .pol_freq = 0x00007028, /* Pol Freq */ + .divisor = 0x00010006, /* 72Mhz Pixel Clock */ + .lcd_size = 0x02ff03ff, /* 1024x768 */ + .panel_type = 0x01, /* TFT */ + .data_lines = 0x03, /* 24 Bit RGB */ + .load_mode = 0x02, /* Frame Mode */ + .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ +}; + +static const struct panel_config dvid_cfg_xm = { + .timing_h = 0x1a4024c9, /* Horizantal timing */ + .timing_v = 0x02c00509, /* Vertical timing */ + .pol_freq = 0x00007028, /* Pol Freq */ + .divisor = 0x00010001, /* 96MHz Pixel Clock */ + .lcd_size = 0x02ff03ff, /* 1024x768 */ + .panel_type = 0x01, /* TFT */ + .data_lines = 0x03, /* 24 Bit RGB */ + .load_mode = 0x02, /* Frame Mode */ + .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ +}; #endif

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 http://patchwork.ozlabs.org/patch/89362/
Changes for v3: * Switched to align(4), rather than remove the attribute, per suggestion from Alexander. --- drivers/usb/host/ehci.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 945ab64..3d0ad0c 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -55,7 +55,7 @@ struct ehci_hccr { #define HCS_N_PORTS(p) (((p) >> 0) & 0xf) uint32_t cr_hccparams; uint8_t cr_hcsp_portrt[8]; -} __attribute__ ((packed)); +} __attribute__ ((packed, aligned(4)));
struct ehci_hcor { uint32_t or_usbcmd; @@ -85,7 +85,7 @@ struct ehci_hcor { #define FLAG_CF (1 << 0) /* true: we'll support "high speed" */ uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS]; uint32_t or_systune; -} __attribute__ ((packed)); +} __attribute__ ((packed, aligned(4)));
#define USBMODE 0x68 /* USB Device mode */ #define USBMODE_SDIS (1 << 3) /* Stream disable */

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 --- board/ti/beagle/beagle.c | 15 +++++++++++++++ drivers/misc/twl4030_led.c | 6 +++++- include/twl4030.h | 1 + 3 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 69fe162..4a778b8 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -400,6 +400,21 @@ int ehci_hcd_init(void) { pr_debug("Initializing OMAP3 ECHI\n");
+ /* Enable power to the USB hub */ + switch (get_board_revision()) { + case REVISION_XM_A: + case REVISION_XM_B: + twl4030_led_set(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + break; + case REVISION_AXBX: + case REVISION_CX: + case REVISION_C4: + case REVISION_XM_C: + default: + twl4030_led_set(TWL4030_LED_LEDEN_LEDBON); + break; + } + /* Put the PHY in RESET */ omap_request_gpio(GPIO_PHY_RESET); omap_set_gpio_direction(GPIO_PHY_RESET, 0); diff --git a/drivers/misc/twl4030_led.c b/drivers/misc/twl4030_led.c index 33cea11..8a02e8b 100644 --- a/drivers/misc/twl4030_led.c +++ b/drivers/misc/twl4030_led.c @@ -42,7 +42,11 @@ void twl4030_led_init(unsigned char ledon_mask) if (ledon_mask & TWL4030_LED_LEDEN_LEDBON) ledon_mask |= TWL4030_LED_LEDEN_LEDBPWM;
+ twl4030_led_set(ledon_mask); +} + +void twl4030_led_set(unsigned char ledon_mask) +{ twl4030_i2c_write_u8(TWL4030_CHIP_LED, ledon_mask, TWL4030_LED_LEDEN); - } diff --git a/include/twl4030.h b/include/twl4030.h index 930c285..60d6d2b 100644 --- a/include/twl4030.h +++ b/include/twl4030.h @@ -523,6 +523,7 @@ void twl4030_power_mmc_init(void); * LED */ void twl4030_led_init(unsigned char ledon_mask); +void twl4030_led_set(unsigned char ledon_mask);
/* * USB

On 04/21/11 02:52, Jason Kridner wrote:
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 http://patchwork.ozlabs.org/patch/89362/
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.
drivers/usb/host/ehci.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 945ab64..3d0ad0c 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -55,7 +55,7 @@ struct ehci_hccr { #define HCS_N_PORTS(p) (((p) >> 0) & 0xf) uint32_t cr_hccparams; uint8_t cr_hcsp_portrt[8]; -} __attribute__ ((packed)); +} __attribute__ ((packed, aligned(4)));
struct ehci_hcor { uint32_t or_usbcmd; @@ -85,7 +85,7 @@ struct ehci_hcor { #define FLAG_CF (1 << 0) /* true: we'll support "high speed" */ uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS]; uint32_t or_systune; -} __attribute__ ((packed)); +} __attribute__ ((packed, aligned(4)));
#define USBMODE 0x68 /* USB Device mode */ #define USBMODE_SDIS (1 << 3) /* Stream disable */

On 04/21/11 02:52, Jason Kridner wrote:
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...
+{
- omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH);
- switch (get_board_revision()) {
- case REVISION_AXBX:
- case REVISION_CX:
- case REVISION_C4:
omap3_dss_panel_config(&dvid_cfg);
break;
- case REVISION_XM_A:
- case REVISION_XM_B:
- case REVISION_XM_C:
- default:
omap3_dss_panel_config(&dvid_cfg_xm);
break;
- }
+}
+/*
- Routine: misc_init_r
- Description: Configure board specific parts
*/ @@ -311,6 +333,7 @@ int misc_init_r(void)
twl4030_power_init(); twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
display_init();
/* Set GPIO states before they are made outputs */ writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,
@@ -324,6 +347,7 @@ int misc_init_r(void) GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
dieid_num_r();
omap3_dss_enable();
return 0;
} diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h index 04247cd..18bfaa8 100644 --- a/board/ti/beagle/beagle.h +++ b/board/ti/beagle/beagle.h @@ -23,6 +23,8 @@ #ifndef _BEAGLE_H_ #define _BEAGLE_H_
+#include <asm/arch/dss.h>
const omap3_sysinfo sysinfo = { DDR_STACKED, "OMAP3 Beagle board", @@ -472,4 +474,88 @@ const omap3_sysinfo sysinfo = { MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/
+/*
- Display Configuration
- */
+#define DVI_BEAGLE_ORANGE_COL 0x00FF8000 +#define VENC_HEIGHT 0x00ef +#define VENC_WIDTH 0x027f
+/*
- Configure VENC in DSS for Beagle to generate Color Bar
- Kindly refer to OMAP TRM for definition of these values.
- */
+static const struct venc_regs venc_config_std_tv = {
- .status = 0x0000001B,
- .f_control = 0x00000040,
- .vidout_ctrl = 0x00000000,
- .sync_ctrl = 0x00008000,
- .llen = 0x00008359,
- .flens = 0x0000020C,
- .hfltr_ctrl = 0x00000000,
- .cc_carr_wss_carr = 0x043F2631,
- .c_phase = 0x00000024,
- .gain_u = 0x00000130,
- .gain_v = 0x00000198,
- .gain_y = 0x000001C0,
- .black_level = 0x0000006A,
- .blank_level = 0x0000005C,
- .x_color = 0x00000000,
- .m_control = 0x00000001,
- .bstamp_wss_data = 0x0000003F,
- .s_carr = 0x21F07C1F,
- .line21 = 0x00000000,
- .ln_sel = 0x00000015,
- .l21__wc_ctl = 0x00001400,
- .htrigger_vtrigger = 0x00000000,
- .savid__eavid = 0x069300F4,
- .flen__fal = 0x0016020C,
- .lal__phase_reset = 0x00060107,
- .hs_int_start_stop_x = 0x008D034E,
- .hs_ext_start_stop_x = 0x000F0359,
- .vs_int_start_x = 0x01A00000,
- .vs_int_stop_x__vs_int_start_y = 0x020501A0,
- .vs_int_stop_y__vs_ext_start_x = 0x01AC0024,
- .vs_ext_stop_x__vs_ext_start_y = 0x020D01AC,
- .vs_ext_stop_y = 0x00000006,
- .avid_start_stop_x = 0x03480079,
- .avid_start_stop_y = 0x02040024,
- .fid_int_start_x__fid_int_start_y = 0x0001008A,
- .fid_int_offset_y__fid_ext_start_x = 0x01AC0106,
- .fid_ext_start_y__fid_ext_offset_y = 0x01060006,
- .tvdetgp_int_start_stop_x = 0x00140001,
- .tvdetgp_int_start_stop_y = 0x00010001,
- .gen_ctrl = 0x00FF0000,
- .output_control = 0x0000000D,
- .dac_b__dac_c = 0x00000000
+};
+/*
- Configure Timings for DVI D
- */
+static const struct panel_config dvid_cfg = {
- .timing_h = 0x0ff03f31, /* Horizantal timing */
- .timing_v = 0x01400504, /* Vertical timing */
- .pol_freq = 0x00007028, /* Pol Freq */
- .divisor = 0x00010006, /* 72Mhz Pixel Clock */
- .lcd_size = 0x02ff03ff, /* 1024x768 */
- .panel_type = 0x01, /* TFT */
- .data_lines = 0x03, /* 24 Bit RGB */
- .load_mode = 0x02, /* Frame Mode */
- .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */
+};
+static const struct panel_config dvid_cfg_xm = {
- .timing_h = 0x1a4024c9, /* Horizantal timing */
- .timing_v = 0x02c00509, /* Vertical timing */
- .pol_freq = 0x00007028, /* Pol Freq */
- .divisor = 0x00010001, /* 96MHz Pixel Clock */
- .lcd_size = 0x02ff03ff, /* 1024x768 */
- .panel_type = 0x01, /* TFT */
- .data_lines = 0x03, /* 24 Bit RGB */
- .load_mode = 0x02, /* Frame Mode */
- .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */
+}; #endif

On Wed, 20 Apr 2011 18:52:48 -0500 Jason Kridner jkridner@beagleboard.org wrote:
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.
Previous discussions are here http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html
v2 updates:
- Enable panel output for BeagleBoard
- BeagleBoard: Update DVI-D orange screen frequencies for xM
v3 updates:
- Remove non-platform (OMAP3) updates
Signed-off-by: Syed Mohammed Khasim khasim@ti.com Signed-off-by: Jason Kridner jkridner@beagleboard.org
arch/arm/include/asm/arch-omap3/dss.h | 173 +++++++++++++++++++++++++++++++++ drivers/video/omap3_dss.c | 130 +++++++++++++++++++++++++ 2 files changed, 303 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-omap3/dss.h create mode 100644 drivers/video/omap3_dss.c
applied to u-boot-video/master after fixing the commit description to include SoB lines. Thanks!
Anatolij

Dear Jason Kridner,
In message 1303343572-19972-25-git-send-email-jkridner@beagleboard.org you wrote:
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

On Thu, Aug 4, 2011 at 4:54 PM, Wolfgang Denk wd@denx.de wrote:
Dear Jason Kridner,
In message 1303343572-19972-25-git-send-email-jkridner@beagleboard.org you wrote:
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?
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de The only perfect science is hind-sight.

Dear Jason, dear Syed Mohammed,
In message 1303343572-19972-25-git-send-email-jkridner@beagleboard.org you wrote: ...
- (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

From: 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 Signed-off-by: Anatolij Gustschin agust@denx.de --- replaces patch "video: DSS makefile update" to - drop unconditional include of videomode.o since it is wrong - sort in alphabetical order - fix the commit message
drivers/video/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 086dc05..402f517 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -36,6 +36,7 @@ COBJS-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o COBJS-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o COBJS-$(CONFIG_VIDEO_MX5) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o +COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o COBJS-$(CONFIG_VIDEO_SED13806) += sed13806.o COBJS-$(CONFIG_SED156X) += sed156x.o COBJS-$(CONFIG_VIDEO_SM501) += sm501.o

On Mon, 4 Jul 2011 23:51:27 +0200 Anatolij Gustschin agust@denx.de wrote:
From: 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 Signed-off-by: Anatolij Gustschin agust@denx.de
replaces patch "video: DSS makefile update" to
- drop unconditional include of videomode.o since it is wrong
- sort in alphabetical order
- fix the commit message
drivers/video/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
applied to u-boot-video/master.
Anatolij

Hi Jason,
On 04/21/11 02:52, Jason Kridner wrote:
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.

On 21.04.2011 01:52, Jason Kridner wrote:
Without this patch, you should get a warning.
Signed-off-by: Jason Kridnerjkridner@beagleboard.org
board/ti/beagle/beagle.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 52a7f93..c0cab9e 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -171,7 +171,7 @@ int misc_init_r(void) { struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
- struct control_prog_io *prog_io_base = (struct gpio *)OMAP34XX_CTRL_BASE;
struct control_prog_io *prog_io_base = (struct control_prog_io *)OMAP34XX_CTRL_BASE;
/* Enable i2c2 pullup resisters */ writel(~(PRG_I2C2_PULLUPRESX),&prog_io_base->io1);
Acked-by: Dirk Behme dirk.behme@de.bosch.com
This should be applied to fix the mainline compiler warning
beagle.c: In function 'misc_init_r': beagle.c:174: warning: initialization from incompatible pointer type
introduced by commit d4e53f063dd25e071444b87303573e7440deeb89 ("OMAP3: BeagleBoard: Enable pullups on i2c2.").
Thanks
Dirk
participants (5)
-
Anatolij Gustschin
-
Dirk Behme
-
Igor Grinberg
-
Jason Kridner
-
Wolfgang Denk