Skip to contentSkip to conversation

BeagleBoard updates rebased on u-boot-ti and debugged

PATCH New Jason Kridner 5 participants 39 messages Apr 20, 2011 – Aug 4, 2011

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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
#1 lore raw

PATCH 1/1 BeagleBoard: add xM rev C to ID table

---
 board/ti/beagle/beagle.c |   10 ++++++++++
 board/ti/beagle/beagle.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)
board/ti/beagle/beagle.c +10 -0
index 4e194a2..52a7f93 100644
@@ -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();
board/ti/beagle/beagle.h +1 -0
index a7401b1..04247cd 100644
@@ -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
Signature · 1 line
1.5.6.4
#2 lore raw

PATCH 1/1 BeagleBoard: fixed typo in typecast

Without this patch, you should get a warning.

---
 board/ti/beagle/beagle.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
board/ti/beagle/beagle.c +1 -1
index 52a7f93..c0cab9e 100644
@@ -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);
Signature · 1 line
1.5.6.4
#3 lore raw

PATCH 1/1 Corrected LED name match finding

This avoids some extraneous Usage printouts.

---
 common/cmd_led.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
common/cmd_led.c +3 -2
index f1e8a62..988157b 100644
@@ -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);
 	}
 
Signature · 1 line
1.5.6.4
#4 lore raw

PATCH 1/1 BeagleBoard: fix LED 0/1 in driver

Fixed USR0/USR1 to be LED 0/1 respectively

---
 board/ti/beagle/led.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
board/ti/beagle/led.c +2 -2
index df26552..fe80e19 100644
@@ -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)
Signature · 1 line
1.5.6.4
#5 lore raw

PATCH 1/1 led: added cmd_led to Makefile

Addition of cmd_led into the Makefile wasn't included in the patch applied to u-boot-ti.

---
 common/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
common/Makefile +1 -0
index 4555716..1aaa5fa 100644
@@ -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
Signature · 1 line
1.5.6.4
#6 lore raw

PATCH 1/1 led: correct off/on locations in structure

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

---
 common/cmd_led.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_led.c +2 -2
index 988157b..ad0fd0f 100644
@@ -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;
Signature · 1 line
1.5.6.4
#7 lore raw

PATCH 1/1 led: remove trailing whitespace

Required to meet style requirements.

---
 common/cmd_led.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_led.c +1 -1
index ad0fd0f..90cf043 100644
@@ -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) {
Signature · 1 line
1.5.6.4
#8 lore raw

PATCH 1/1 led: loop through all leds

'led all on|off' requires this patch.

---
 common/cmd_led.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
common/cmd_led.c +0 -1
index 90cf043..ab85dc6 100644
@@ -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;
 		}
 	}
 
Signature · 1 line
1.5.6.4
#9 lore raw

PATCH 1/1 led: fixup help/usage

Placed a description inside the right field without usage information and eliminated redundant usage information.

---
 common/cmd_led.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
common/cmd_led.c +3 -3
index ab85dc6..848d38d 100644
@@ -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)"
 );
Signature · 1 line
1.5.6.4
#10 lore raw

PATCH 1/1 BeagleBoard: Pin mux initialization glitch fix

From: Bob Feretich <[email protected]>

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.

---
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(-)
board/ti/beagle/beagle.c +6 -6
index c0cab9e..7768901 100644
@@ -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;
Signature · 1 line
1.5.6.4
#11 lore raw

PATCH 1/1 BeagleBoard: config: Switch default console from ttyS2 to ttyO2

From: Alexander Holler <[email protected]>

Linux kernels >= 2.6.36 are using ttyOn instead ttySn for the serials on OMAPs.

---
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(-)
include/configs/omap3_beagle.h +1 -1
index 5191d14..b4cbb06 100644
@@ -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 at 60\0" \
Signature · 1 line
1.5.6.4
#12 lore raw

PATCH 1/1 BeagleBoard: config: Remove omapfb.debug=y from Beagle and Overo env settings

From: Steve Sakoman <[email protected]>

The kernel DSS2 code is mature now, and keeping this setting hurts performance

(cherry picked from commit 0588da9057fddb5f6a6a04aedd7e0a79eb39e9e5)

---
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(-)
include/configs/omap3_beagle.h +0 -2
index b4cbb06..8af2f7a 100644
@@ -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" \
include/configs/omap3_overo.h +0 -2
index 1b3d439..06a28f6 100644
@@ -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" \
Signature · 1 line
1.5.6.4
#13 lore raw

PATCH 1/1 BeagleBoard: config: reduce BOOTDELAY to 3

---
 include/configs/omap3_beagle.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/omap3_beagle.h +1 -1
index 8af2f7a..06c1ce3 100644
@@ -203,7 +203,7 @@
 							/* partition */
 
 /* Environment information */
-#define CONFIG_BOOTDELAY		10
+#define CONFIG_BOOTDELAY		3
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
Signature · 1 line
1.5.6.4
#14 lore raw

PATCH 1/1 BeagleBoard: config: change default resolution to VGA

---
 include/configs/omap3_beagle.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/omap3_beagle.h +1 -1
index 06c1ce3..9ee1664 100644
@@ -211,7 +211,7 @@
 	"console=ttyO2,115200n8\0" \
 	"mpurate=auto\0" \
 	"vram=12M\0" \
-	"dvimode=1024x768MR-16 at 60\0" \
+	"dvimode=640x480MR-16 at 60\0" \
 	"defaultdisplay=dvi\0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
Signature · 1 line
1.5.6.4
#15 lore raw

PATCH 1/1 BeagleBoard: config: don't suck in blank line

To prevent a blank line from being critical.

---
 include/configs/omap3_beagle.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/omap3_beagle.h +1 -1
index 9ee1664..ade6225 100644
@@ -258,7 +258,7 @@
 			"run mmcboot;" \
 		"fi;" \
 	"fi;" \
-	"run nandboot;" \
+	"run nandboot;"
 
 #define CONFIG_AUTO_COMPLETE		1
 /*
Signature · 1 line
1.5.6.4
#16 lore raw

PATCH 1/1 BeagleBoard: config: make mtest run

---
 include/configs/omap3_beagle.h |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
include/configs/omap3_beagle.h +5 -4
index ade6225..17d4356 100644
@@ -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 */
Signature · 1 line
1.5.6.4
#17 lore raw

PATCH 1/1 BeagleBoard: config: increase command-line functionality

---
 include/configs/omap3_beagle.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
include/configs/omap3_beagle.h +3 -2
index 17d4356..49bfaa4 100644
@@ -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)
 
Signature · 1 line
1.5.6.4
#18 lore raw

PATCH 1/1 BeagleBoard: config: load kernel via MMC ext2

---
 include/configs/omap3_beagle.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/configs/omap3_beagle.h +2 -1
index 49bfaa4..e2f7dd0 100644
@@ -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" \
Signature · 1 line
1.5.6.4
#19 lore raw

PATCH 1/1 BeagleBoard: config: add optargs/buddy/camera

---
 include/configs/omap3_beagle.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
include/configs/omap3_beagle.h +9 -0
index e2f7dd0..71e41f8 100644
@@ -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 at 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} " \
Signature · 1 line
1.5.6.4
#20 lore raw

PATCH 1/1 BeagleBoard: config: add ramboot

---
 include/configs/omap3_beagle.h |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)
include/configs/omap3_beagle.h +18 -1
index 71e41f8..c29baf5 100644
@@ -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 " \
Signature · 1 line
1.5.6.4
#21 lore raw

PATCH v2 1/1 BeagleBoard: Added userbutton command

Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072
Author: Greg Turner <[email protected]>
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)

---
 board/ti/beagle/beagle.c |   56 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)
board/ti/beagle/beagle.c +56 -0
index 7768901..2e27aef 100644
@@ -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",
+	""
+);
Signature · 1 line
1.5.6.4
#22 lore raw

PATCH 1/1 BeagleBoard: config: use the USERBUTTON command

---
 include/configs/omap3_beagle.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
include/configs/omap3_beagle.h +6 -1
index c29baf5..a946b0e 100644
@@ -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 " \
Signature · 1 line
1.5.6.4
#23 lore raw

PATCH 1/1 video: DSS makefile update

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

---
 drivers/video/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/video/Makefile +2 -0
index 2c53a6f..6baa7ca 100644
@@ -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)
Signature · 1 line
1.5.6.4
#24 lore raw

PATCH v3 1/1 OMAP3: Add DSS driver for OMAP3

From: Syed Mohammed Khasim <[email protected]>

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 at 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

---
 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
arch/arm/include/asm/arch-omap3/dss.h new file +173 -0
new file mode 100644
index 0000000..e5e3b0d
@@ -0,0 +1,173 @@
+/*
+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <[email protected]>
+ *
+ * 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 */
drivers/video/omap3_dss.c new file +130 -0

130 lines not on this page · raw message

Signature · 1 line
1.5.6.4
#25 lore raw

PATCH 1/1 BeagleBoard: config: enable DSS

---
 include/configs/omap3_beagle.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/omap3_beagle.h +1 -0
index a946b0e..6ece0fa 100644
@@ -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	*/
Signature · 1 line
1.5.6.4
#26 lore raw

PATCH 1/1 BeagleBoard: Configure DVI/S-video

Based on patches from Syed Mohammed Khasim (khasim at 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.

---
 board/ti/beagle/beagle.c |   24 +++++++++++++
 board/ti/beagle/beagle.h |   86 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 0 deletions(-)
board/ti/beagle/beagle.c +24 -0
index 2e27aef..69fe162 100644
@@ -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;
 }
board/ti/beagle/beagle.h +86 -0

96 lines not on this page · raw message

Signature · 1 line
1.5.6.4
#27 lore raw

PATCH v3 1/1 USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor

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 <[email protected]> for finding the problem.

Cc Alexander Holler <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
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(-)
drivers/usb/host/ehci.h +2 -2
index 945ab64..3d0ad0c 100644
@@ -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 */
Signature · 1 line
1.5.6.4
#28 lore raw

PATCH 1/1 TWL4030/BeagleBoard: Added hub power enable

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'.

---
 board/ti/beagle/beagle.c   |   15 +++++++++++++++
 drivers/misc/twl4030_led.c |    6 +++++-
 include/twl4030.h          |    1 +
 3 files changed, 21 insertions(+), 1 deletions(-)
board/ti/beagle/beagle.c +15 -0
index 69fe162..4a778b8 100644
@@ -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);
drivers/misc/twl4030_led.c +5 -1
index 33cea11..8a02e8b 100644
@@ -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);
-
 }
include/twl4030.h +1 -0
index 930c285..60d6d2b 100644
@@ -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
Signature · 1 line
1.5.6.4
#29 lore raw

PATCH v3 1/1 USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor

In reply to Jason Kridner
Quoted 18 lines · Jason Kridner

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 <[email protected]> for finding the problem.

Cc Alexander Holler <[email protected]>
Cc Sandeep Paulraj <[email protected]>

---
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/

Quoted 3 lines

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.

Quoted 26 lines
---
 drivers/usb/host/ehci.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci.h +2 -2
index 945ab64..3d0ad0c 100644
@@ -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 */
Signature · 2 lines
Regards,
Igor.
#30 lore raw

PATCH 1/1 BeagleBoard: Configure DVI/S-video

In reply to Jason Kridner
Quoted 19 lines · Jason Kridner

Based on patches from Syed Mohammed Khasim (khasim at 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.

---
 board/ti/beagle/beagle.c |   24 +++++++++++++
 board/ti/beagle/beagle.h |   86 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 0 deletions(-)
board/ti/beagle/beagle.c +0 -0
index 2e27aef..69fe162 100644

board/ti/beagle/beagle.c unsigned int get_expansion_id(void) · line 171

Quoted 7 lines
board/ti/beagle/beagle.c +4 -0
@@ -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...

Quoted 139 lines
board/ti/beagle/beagle.c +20 -0
+{
+	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;
 }
board/ti/beagle/beagle.h +86 -0
index 04247cd..18bfaa8 100644
@@ -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
Signature · 2 lines
Regards,
Igor.
#31 lore raw

PATCH v3 1/1 OMAP3: Add DSS driver for OMAP3

In reply to Jason Kridner
Quoted 18 lines · On Wed, 20 Apr 2011 18:52:48 -0500 Jason Kridner <[email protected]>…

From: Syed Mohammed Khasim <[email protected]>

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 at 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

Quoted 8 lines
---
 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

#32 lore raw

PATCH v3 1/1 OMAP3: Add DSS driver for OMAP3

In reply to Jason Kridner

Dear Jason Kridner,

Quoted 7 lines · In message <[email protected]> you…

From: Syed Mohammed Khasim <[email protected]>

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

...

Quoted 3 lines
arch/arm/include/asm/arch-omap3/dss.h new file +0 -0
@@ -0,0 +1,173 @@

...

Quoted 1 line

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

Quoted 7 lines

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

...

Quoted 5 lines
drivers/video/omap3_dss.c new file +0 -0
new file mode 100644
index 0000000..69c705a

...

Quoted 1 line

+ * Referred to Linux DSS driver files for OMAP3

See above.

Quoted 4 lines

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

Signature · 4 lines
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 at denx.de
The only perfect science is hind-sight.
#33 lore raw

PATCH v3 1/1 OMAP3: Add DSS driver for OMAP3

Quoted 14 lines · Wolfgang Denk

Dear Jason Kridner,

Quoted 7 lines · In message <[email protected]> you…

From: Syed Mohammed Khasim <[email protected]>

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

...

Quoted 8 lines
Quoted 3 lines
arch/arm/include/asm/arch-omap3/dss.h new file +0 -0
@@ -0,0 +1,173 @@

...

Quoted 1 line

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

Quoted 8 lines
Quoted 8 lines

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

Quoted 4 lines

...

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

k

Quoted 17 lines

...

Quoted 5 lines
drivers/video/omap3_dss.c new file +0 -0
new file mode 100644
index 0000000..69c705a

...

Quoted 1 line

+ * Referred to Linux DSS driver files for OMAP3

See above.

Quoted 4 lines

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

Quoted 4 lines

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?

Quoted 12 lines

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 at denx.de The only perfect science is hind-sight.

#34 lore raw

PATCH v3 1/1 OMAP3: Add DSS driver for OMAP3

In reply to Jason Kridner

Dear Jason, dear Syed Mohammed,

In message <[email protected]> you wrote:
...

Quoted 5 lines

+ * (C) Copyright 2010
+ * Texas Instruments, <www.ti.com>
+ * Syed Mohammed Khasim <[email protected]>
+ *
+ * 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

Signature · 5 lines
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 at denx.de
The amount of time between slipping on the peel and  landing  on  the
pavement is precisely 1 bananosecond.
#35 lore raw

PATCH 1/1 video: update Makefile to include OMAP3 DSS driver

In reply to Jason Kridner

From: Jason Kridner <[email protected]>

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

---
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(-)
drivers/video/Makefile +1 -0
index 086dc05..402f517 100644
@@ -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
Signature · 1 line
1.7.1
#36 lore raw

PATCH 1/1 video: update Makefile to include OMAP3 DSS driver

Quoted 7 lines · On Mon, 4 Jul 2011 23:51:27 +0200 Anatolij Gustschin <[email protected]> wrote:

From: Jason Kridner <[email protected]>

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

Quoted 8 lines

---
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

#37 lore raw

PATCH 1/1 led: correct off/on locations in structure

In reply to Jason Kridner

Hi Jason,

Quoted 14 lines · Jason Kridner

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

---
 common/cmd_led.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_led.c +0 -0
index 988157b..ad0fd0f 100644

common/cmd_led.c line 37

Quoted 6 lines
common/cmd_led.c +1 -2
@@ -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...

common/cmd_led.c line 41

Quoted 4 lines
common/cmd_led.c +1 -0
+	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.

Signature · 2 lines
Regards,
Igor.
#38 lore raw

PATCH 1/1 BeagleBoard: fixed typo in typecast

In reply to Jason Kridner
Quoted 12 lines · Jason Kridner

Without this patch, you should get a warning.

---
  board/ti/beagle/beagle.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
board/ti/beagle/beagle.c +0 -0
index 52a7f93..c0cab9e 100644

board/ti/beagle/beagle.c int misc_init_r(void) · line 177

Quoted 8 lines
board/ti/beagle/beagle.c +1 -1
@@ -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 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