Skip to contentSkip to conversation

drivers/video/am335x-fb: Add possibility to wait for stable power/picture

PATCH In review Hannes Petermaier 4 participants 50 messages Feb 3, 2015 – Mar 16, 2015

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

PATCH v2 1/24 drivers/video/am335x-fb: Add possibility to wait for stable power/picture

Often on boards exists a circuit which switches power on/off to LCD display. Due to the need of limiting the in-rush current the output voltage from this circuit rises "slowly", so it is necessary to wait a bit (VCC ramp up time) before starting output on LCD-pins.
This time is specified in <n> ms within the panel-settings, called "pup_delay"

Further some LCDs need a couple of frames to stabilize the image on it. We have now the possibility to wait some time after starting output on LCD. This time is also specified in <n> ms within panel-settings, called "pon_delay"

---
Changes for V2: None

---
 drivers/video/am335x-fb.c |   13 ++++++++-----
 drivers/video/am335x-fb.h |    9 +++++++--
 2 files changed, 15 insertions(+), 7 deletions(-)
drivers/video/am335x-fb.c +8 -5
index ab98941..6f95649 100644
@@ -127,6 +127,12 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
 	memset((void *)gd->fb_base, 0, 0x20);
 	*(unsigned int *)gd->fb_base = 0x4000;
 
+	/* turn ON display through powercontrol function if accessible */
+	if (0 != panel->panel_power_ctrl)
+		panel->panel_power_ctrl(1);
+
+	debug("am335x-fb: wait for stable power ...\n");
+	mdelay(panel->pup_delay);
 	lcdhw->clkc_enable = LCD_CORECLKEN | LCD_LIDDCLKEN | LCD_DMACLKEN;
 	lcdhw->raster_ctrl = 0;
 	lcdhw->ctrl = LCD_CLK_DIVISOR(panel->pxl_clk_div) | LCD_RASTER_MODE;
@@ -159,11 +165,8 @@ int am335xfb_init(struct am335x_lcdpanel *panel)
 
 	gd->fb_base += 0x20;	/* point fb behind palette */
 
-	/* turn ON display through powercontrol function if accessible */
-	if (0 != panel->panel_power_ctrl) {
-		mdelay(panel->pon_delay);
-		panel->panel_power_ctrl(1);
-	}
+	debug("am335x-fb: waiting picture to be stable.\n.");
+	mdelay(panel->pon_delay);
 
 	return 0;
 }
drivers/video/am335x-fb.h +7 -2
index 8a0b131..7f799d1 100644
@@ -55,9 +55,14 @@ struct am335x_lcdpanel {
 	unsigned int	vsw;		/* Vertical Sync Pulse Width */
 	unsigned int	pxl_clk_div;	/* Pixel clock divider*/
 	unsigned int	pol;		/* polarity of sync, clock signals */
+	unsigned int	pup_delay;	/*
+					 * time in ms after power on to
+					 * initialization of lcd-controller
+					 * (VCC ramp up time)
+					 */
 	unsigned int	pon_delay;	/*
-					 * time in ms for turning on lcd after
-					 * initializing lcd-controller
+					 * time in ms after initialization of
+					 * lcd-controller (pic stabilization)
 					 */
 	void (*panel_power_ctrl)(int);	/* fp for power on/off display */
 };
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 2/24 common/lcd: Add command for setting cursor within lcd-console

Sometimes we do not want redirect u-boot's console to screen but anyway we want write out some status information out of a u-boot script to the display.

To define the specific position of the string to be written, we have to set the cursor with "setcurs" before writing.

---
Changes for V2:
- more understandable commit-message
- moved code from lcd.c into lcd_console.c

---
 common/lcd_console.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
common/lcd_console.c +21 -0
index 74c388a..5363232 100644
@@ -209,3 +209,24 @@ void lcd_printf(const char *fmt, ...)
 
 	lcd_puts(buf);
 }
+
+static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
+			    char *const argv[])
+{
+	unsigned int col, row;
+
+	if (argc != 3)
+		return CMD_RET_USAGE;
+
+	col = simple_strtoul(argv[1], NULL, 10);
+	row = simple_strtoul(argv[2], NULL, 10);
+	lcd_position_cursor(col, row);
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	setcurs, 3,	1,	do_lcd_setcursor,
+	"set cursor position within screen",
+	"    <col> <row> in character"
+);
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v2 2/24 common/lcd: Add command for setting cursor within lcd-console

Quoted 7 lines · Hannes Petermaier

Sometimes we do not want redirect u-boot's console to screen but anyway we want write out some status information out of a u-boot script to the display.

To define the specific position of the string to be written, we have to set the cursor with "setcurs" before writing.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/19bc57b2/attachment.sig>
#3 lore raw

PATCH v2 3/24 common/lcd: Add command for writing to lcd-display

In reply to Hannes Petermaier

Sometimes we do not want redirect u-boot's console to screen but anyway we want write out some status information out of a u-boot script to the display.

So we cannot use the normal "echo ....", instead we write explicitly using "lcdputs ..." for writing to the actual cursor position on LCD.

---
Changes for v2:
- better understandable commit-message
- rename "puts" into "lcdputs"
- move code from lcd.c to lcd_console.c

---
 common/lcd_console.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
common/lcd_console.c +18 -0
index 5363232..8bf83b9 100644
@@ -225,8 +225,26 @@ static int do_lcd_setcursor(cmd_tbl_t *cmdtp, int flag, int argc,
 	return 0;
 }
 
+static int do_lcd_puts(cmd_tbl_t *cmdtp, int flag, int argc,
+		       char *const argv[])
+{
+	if (argc != 2)
+		return CMD_RET_USAGE;
+
+	lcd_puts(argv[1]);
+
+	return 0;
+}
+
 U_BOOT_CMD(
 	setcurs, 3,	1,	do_lcd_setcursor,
 	"set cursor position within screen",
 	"    <col> <row> in character"
 );
+
+U_BOOT_CMD(
+	lcdputs, 2,	1,	do_lcd_puts,
+	"print string on lcd-framebuffer",
+	"    <string>"
+);
+
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH v2 3/24 common/lcd: Add command for writing to lcd-display

Quoted 7 lines · Hannes Petermaier

Sometimes we do not want redirect u-boot's console to screen but anyway we want write out some status information out of a u-boot script to the display.

So we cannot use the normal "echo ....", instead we write explicitly using "lcdputs ..." for writing to the actual cursor position on LCD.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/9b94f0a5/attachment.sig>
#5 lore raw

PATCH v2 4/24 board/BuR/common: Take usage of am335x LCD-Display

In reply to Hannes Petermaier

From now we use the am335x lcd driver and setup a display with displaying a summary screen to the lcd.
Values are taken from environment and or devicetree blob.

---
Changes for V2: None

---
 board/BuR/common/bur_common.h |    4 +
 board/BuR/common/common.c     |  417 ++++++++++++++++++++++++++++++++++++++++-
 board/BuR/tseries/board.c     |   52 +++--
 include/configs/tseries.h     |    8 +
 include/power/tps65217.h      |    1 +
 5 files changed, 463 insertions(+), 19 deletions(-)
board/BuR/common/bur_common.h +4 -0
index 15225b0..39afbba 100644
@@ -12,6 +12,10 @@
 #ifndef _BUR_COMMON_H_
 #define _BUR_COMMON_H_
 
+#include <../../../drivers/video/am335x-fb.h>
+
+int load_lcdtiming(struct am335x_lcdpanel *panel);
+void br_summaryscreen(void);
 void blink(u32 blinks, u32 intervall, u32 pin);
 void pmicsetup(u32 mpupll);
 void enable_uart0_pin_mux(void);
board/BuR/common/common.c +416 -1

445 lines not on this page · raw message

board/BuR/tseries/board.c +34 -18

78 lines not on this page · raw message

include/configs/tseries.h +8 -0
index 9a62070..9ad294f 100644
@@ -14,6 +14,12 @@
 
 #include <configs/bur_am335x_common.h>
 /* ------------------------------------------------------------------------- */
+#define CONFIG_AM335X_LCD
+#define CONFIG_LCD
+#define CONFIG_LCD_NOSTDOUT
+#define CONFIG_SYS_WHITE_ON_BLACK
+#define LCD_BPP				LCD_COLOR32
+
 /* Clock Defines */
 #define V_OSCK				26000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
@@ -22,6 +28,8 @@
 
 /* Support both device trees and ATAGs. */
 #define CONFIG_OF_LIBFDT
+#define CONFIG_USE_FDT			/* use fdt within board code */
+#define CONFIG_OF_BOARD_SETUP
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
include/power/tps65217.h +1 -0
index 297c4cb..93cbe36 100644
@@ -73,6 +73,7 @@ enum {
 #define TPS65217_LDO_VOLTAGE_OUT_1_8		0x06
 #define TPS65217_LDO_VOLTAGE_OUT_3_3		0x1F
 
+#define TPS65217_PWR_OFF			0x80
 #define TPS65217_PWR_SRC_USB_BITMASK		0x4
 #define TPS65217_PWR_SRC_AC_BITMASK		0x8
 
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH v2 4/24 board/BuR/common: Take usage of am335x LCD-Display

Quoted 5 lines · Hannes Petermaier
Quoted 1 line

From now we use the am335x lcd driver and setup a display with displaying

a summary screen to the lcd.
Values are taken from environment and or devicetree blob.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/79c4bf40/attachment.sig>
#7 lore raw

PATCH v2 5/24 board/BuR/common: try to setup cpsw mac-address from the devicetree

In reply to Hannes Petermaier

since we have a dtb blob programmed on the board we try to setup the cpsw interface with the programmed mac.
If this method fails, we fall back to the device-fuses.

---
Changes for V2: None

---
 board/BuR/common/common.c |   25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)
board/BuR/common/common.c +15 -10
index 7d0e05c..18e1520 100644
@@ -591,9 +591,9 @@ static struct cpsw_platform_data cpsw_data = {
 int board_eth_init(bd_t *bis)
 {
 	int rv = 0;
-	uint8_t mac_addr[6];
+	char mac_addr[6];
+	const char *mac = 0;
 	uint32_t mac_hi, mac_lo;
-
 	/* try reading mac address from efuse */
 	mac_lo = readl(&cdev->macid0l);
 	mac_hi = readl(&cdev->macid0h);
@@ -607,14 +607,19 @@ int board_eth_init(bd_t *bis)
 #if (defined(CONFIG_DRIVER_TI_CPSW) && !defined(CONFIG_SPL_BUILD)) || \
 	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
 	if (!getenv("ethaddr")) {
-		printf("<ethaddr> not set. Validating first E-fuse MAC ... ");
-
-		if (is_valid_ether_addr(mac_addr)) {
-			printf("using: %02X:%02X:%02X:%02X:%02X:%02X.\n",
-			       mac_addr[0], mac_addr[1], mac_addr[2],
-			       mac_addr[3], mac_addr[4], mac_addr[5]
-				);
-			eth_setenv_enetaddr("ethaddr", mac_addr);
+		#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USE_FDT)
+		printf("<ethaddr> not set. trying DTB ... ");
+		mac = dtbmacaddr(0);
+		#endif
+		if (!mac) {
+			printf("<ethaddr> not set. validating E-fuse MAC ... ");
+			if (is_valid_ether_addr((const u8 *)mac_addr))
+				mac = (const char *)mac_addr;
+		}
+
+		if (mac) {
+			printf("using: %pM on ", mac);
+			eth_setenv_enetaddr("ethaddr", (const u8 *)mac);
 		}
 	}
 	writel(MII_MODE_ENABLE, &cdev->miisel);
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH v2 5/24 board/BuR/common: try to setup cpsw mac-address from the devicetree

Quoted 5 lines · Hannes Petermaier

since we have a dtb blob programmed on the board we try to setup the cpsw interface with the programmed mac.
If this method fails, we fall back to the device-fuses.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/372c5abf/attachment.sig>
#9 lore raw

PATCH v2 6/24 board/BuR/tseries: Enable HW-Watchdog

In reply to Hannes Petermaier

---
Changes for V2: None

---
 board/BuR/tseries/board.c |    4 ++++
 include/configs/tseries.h |    3 +++
 2 files changed, 7 insertions(+)
board/BuR/tseries/board.c +4 -0
index 66747eb..a1c6887 100644
@@ -28,6 +28,7 @@
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
 #include <lcd.h>
+#include <watchdog.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -144,6 +145,9 @@ void sdram_init(void)
 /* Basic board specific setup.  Pinmux has been handled already. */
 int board_init(void)
 {
+#if defined(CONFIG_HW_WATCHDOG)
+	hw_watchdog_init();
+#endif
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 #ifdef CONFIG_NAND
 	gpmc_init();
include/configs/tseries.h +3 -0
index 9ad294f..368f588 100644
@@ -20,6 +20,9 @@
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define LCD_BPP				LCD_COLOR32
 
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_OMAP_WATCHDOG
+#define CONFIG_SPL_WATCHDOG_SUPPORT
 /* Clock Defines */
 #define V_OSCK				26000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH v2 6/24 board/BuR/tseries: Enable HW-Watchdog

Quoted 1 line · Hannes Petermaier

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/8e4e3c14/attachment.sig>
#11 lore raw

PATCH v2 7/24 board/BuR/tseries: Enable U-Boot BOOTCOUNT feature

In reply to Hannes Petermaier

---
Changes for V2: None

---
 include/configs/tseries.h |    4 ++++
 1 file changed, 4 insertions(+)
include/configs/tseries.h +4 -0
index 368f588..7fd0a00 100644
@@ -23,6 +23,10 @@
 #define CONFIG_HW_WATCHDOG
 #define CONFIG_OMAP_WATCHDOG
 #define CONFIG_SPL_WATCHDOG_SUPPORT
+/* Bootcount using the RTC block */
+#define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
+#define CONFIG_BOOTCOUNT_LIMIT
+#define CONFIG_BOOTCOUNT_AM33XX
 /* Clock Defines */
 #define V_OSCK				26000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
Signature · 1 line
1.7.10.4
#12 lore raw

PATCH v2 7/24 board/BuR/tseries: Enable U-Boot BOOTCOUNT feature

Quoted 1 line · Hannes Petermaier

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/31a524f2/attachment.sig>
#13 lore raw

PATCH v2 8/24 board/BuR/tseries: Enable EXT4 support

In reply to Hannes Petermaier

---
Changes for V2: None

---
 include/configs/tseries.h |    4 ++++
 1 file changed, 4 insertions(+)
include/configs/tseries.h +4 -0
index 7fd0a00..986db3f 100644
@@ -275,6 +275,10 @@
 #define CONFIG_DOS_PARTITION
 #define CONFIG_CMD_FAT
 #define CONFIG_FAT_WRITE
+#define CONFIG_FS_EXT4
+#define CONFIG_EXT4_WRITE
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
 #define CONFIG_CMD_FS_GENERIC
 #endif /* CONFIG_MMC, ... */
 
Signature · 1 line
1.7.10.4
#14 lore raw

PATCH v2 8/24 board/BuR/tseries: Enable EXT4 support

Quoted 1 line · Hannes Petermaier

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/ad03d0a0/attachment.sig>
#15 lore raw

PATCH v2 9/24 board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput

In reply to Hannes Petermaier

From now we use this pin for the Brightness regulation from LED-Backlight.

---
Changes for V2: None

---
 board/BuR/tseries/mux.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
board/BuR/tseries/mux.c +3 -3
index 0ba25ee..36ee04c 100644
@@ -131,9 +131,9 @@ static struct module_pin_mux gpIOs[] = {
 	{OFFSET(spi0_cs1),  (MODE(7) | PULLUDEN | PULLUP_EN | RXACTIVE)},
 	/* TIMER5   (MMC0_DAT3) - TIMER5 (Buzzer) */
 	{OFFSET(mmc0_dat3), (MODE(3) | PULLUDEN | RXACTIVE)},
-	/* TIMER6   (MMC0_DAT2) - PWM_BACK_3V3, later used as MODE3 for PWM */
-	{OFFSET(mmc0_dat2), (MODE(7) | PULLUDEN | RXACTIVE)},
-	/* GPIO2_27 (MMC0_DAT1)	 - MII_nNAND */
+	/* TIMER6   (MMC0_DAT2) - PWM_BACK_3V3 */
+	{OFFSET(mmc0_dat2), (MODE(3) | PULLUDEN | RXACTIVE)},
+	/* GPIO2_28 (MMC0_DAT1)	 - MII_nNAND */
 	{OFFSET(mmc0_dat1), (MODE(7) | PULLUDEN | RXACTIVE)},
 	/* GPIO2_29 (MMC0_DAT0)	 - NAND_1n0 */
 	{OFFSET(mmc0_dat0), (MODE(7) | PULLUDEN | RXACTIVE)},
Signature · 1 line
1.7.10.4
#16 lore raw

PATCH v2 9/24 board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput

Quoted 3 lines · Hannes Petermaier
Quoted 1 line

From now we use this pin for the Brightness regulation from LED-Backlight.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/be80c8ed/attachment.sig>
#17 lore raw

PATCH v2 10/24 board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO

In reply to Hannes Petermaier

On boards were we have no NAND-flash soldered, we want to use those free pins as regular gpio.

---
Changes for V2: None

---
 board/BuR/tseries/mux.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
board/BuR/tseries/mux.c +8 -1
index 36ee04c..330429a 100644
@@ -168,7 +168,14 @@ static struct module_pin_mux gpIOs[] = {
 	{OFFSET(mcasp0_axr0),  (MODE(7) | PULLUDDIS) },
 	/* GPIO3_17 (MCASP0_AHCLKR) - ETH2_LEDY */
 	{OFFSET(mcasp0_ahclkr), (MODE(7) | PULLUDDIS) },
-
+#ifndef CONFIG_NAND
+	/* GPIO2_3 - NAND_OE */
+	{OFFSET(gpmc_oen_ren), (MODE(7) | PULLDOWN_EN | RXACTIVE)},
+	/* GPIO2_4 - NAND_WEN */
+	{OFFSET(gpmc_wen), (MODE(7) | PULLDOWN_EN | RXACTIVE)},
+	/* GPIO2_5 - NAND_BE_CLE */
+	{OFFSET(gpmc_be0n_cle), (MODE(7) | PULLDOWN_EN | RXACTIVE)},
+#endif
 	{-1},
 };
 
Signature · 1 line
1.7.10.4
#18 lore raw

PATCH v2 10/24 board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO

Quoted 4 lines · Hannes Petermaier

On boards were we have no NAND-flash soldered, we want to use those free pins as regular gpio.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/c4634300/attachment.sig>
#19 lore raw

PATCH v2 11/24 board/BuR/tseries: Chg Pinmux - enable UART1 pins

In reply to Hannes Petermaier

---
Changes for V2: None

---
 board/BuR/tseries/mux.c |    8 ++++++++
 1 file changed, 8 insertions(+)
board/BuR/tseries/mux.c +8 -0
index 330429a..2c87a63 100644
@@ -25,6 +25,13 @@ static struct module_pin_mux uart0_pin_mux[] = {
 	{OFFSET(uart0_txd), (MODE(0) | PULLUDEN)},
 	{-1},
 };
+static struct module_pin_mux uart1_pin_mux[] = {
+	/* UART0_RXD */
+	{OFFSET(uart1_rxd), (MODE(0) | PULLUDEN | PULLUP_EN | RXACTIVE)},
+	/* UART0_TXD */
+	{OFFSET(uart1_txd), (MODE(0) | PULLUDEN)},
+	{-1},
+};
 #ifdef CONFIG_MMC
 static struct module_pin_mux mmc1_pin_mux[] = {
 	{OFFSET(gpmc_ad7), (MODE(1) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT7 */
@@ -236,5 +243,6 @@ void enable_board_pin_mux(void)
 #endif
 	configure_module_pin_mux(spi0_pin_mux);
 	configure_module_pin_mux(lcd_pin_mux);
+	configure_module_pin_mux(uart1_pin_mux);
 	configure_module_pin_mux(gpIOs);
 }
Signature · 1 line
1.7.10.4
#20 lore raw

PATCH v2 11/24 board/BuR/tseries: Chg Pinmux - enable UART1 pins

Quoted 1 line · Hannes Petermaier

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/80e3433a/attachment.sig>
#21 lore raw

PATCH v2 12/24 board/BuR/common: Introduce Network Console and common environment for it

In reply to Hannes Petermaier

It is often necessary to "break in" into boards bootloader commandline if something fails or even for development purposes some parameters have to be changed.

So we enable u-boot's CONFIG_NETCONSOLE feature.
We also modify Networksettings to apply with this new use-case.

---
Changes for V2: None

---
 include/configs/bur_am335x_common.h |   23 +++++++++++++++++++++--
 include/configs/tseries.h           |   33 ++++-----------------------------
 2 files changed, 25 insertions(+), 31 deletions(-)
include/configs/bur_am335x_common.h +21 -2
index e9d5d01..d7ea1c9 100644
@@ -12,6 +12,23 @@
 #ifndef __BUR_AM335X_COMMON_H__
 #define __BUR_AM335X_COMMON_H__
 /* ------------------------------------------------------------------------- */
+#define BUR_COMMON_ENV \
+"defaultip=192.168.60.253\0" \
+"defaultsip=192.168.60.254\0" \
+"netconsole=echo switching to network console ...; " \
+"if dhcp; then " \
+"setenv ncip ${serverip}; else " \
+"setenv ncip 192.168.60.254; " \
+"setenv serverip 192.168.60.254; " \
+"setenv gatewayip 192.168.60.254; " \
+"setenv ipaddr 192.168.60.1; " \
+"fi;" \
+"setenv netdisplay0 '" \
+"setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr};" \
+"setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;'" \
+"run netdisplay0; " \
+"setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_AM33XX
@@ -47,7 +64,7 @@
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_NET_RETRY_COUNT		4
+#define CONFIG_NET_RETRY_COUNT		2
 #define CONFIG_CMD_PING
 #define CONFIG_DRIVER_TI_CPSW		/* Driver for IP block */
 #define CONFIG_MII			/* Required in net/eth.c */
@@ -57,7 +74,9 @@
 #define CONFIG_SPL_NET_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT		/* used for a fetching MAC-Address */
 #define CONFIG_SPL_NET_VCI_STRING	"AM335x U-Boot SPL"
-
+/* Network console */
+#define CONFIG_NETCONSOLE			1
+#define CONFIG_BOOTP_MAY_FAIL		/* if we don't have DHCP environment */
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
  * area between 0x402F0400 and 0x4030B800 as a download area and
include/configs/tseries.h +4 -29
index 986db3f..8e073e0 100644
@@ -125,35 +125,10 @@
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"autoload=0\0" \
-	"loadaddr=0x80200000\0" \
-	"bootfile=zImage\0" \
-	"console=ttyO0,115200n8\0" \
-	"optargs=\0" \
-	"rootpath=/tftpboot/tseries/rootfs-small\0" \
-	"nfsopts=nolock\0" \
-	"netargs=setenv bootargs console=${console} " \
-		"${optargs} " \
-		"root=/dev/nfs " \
-		"nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
-		"ip=dhcp\0" \
-	"netboot=echo Booting from network ...; " \
-		"setenv autoload no; " \
-		"dhcp; " \
-		"tftp ${loadaddr} ${bootfile}; " \
-		"run netargs; " \
-		"bootm ${loadaddr}\0" \
-	"usbupdate=echo Updating UBOOT from USB-Stick ...; " \
-		"usb start; " \
-		"fatload usb 0 0x80000000 updateubootusb.img; " \
-		"source;\0" \
-	"netupdate=echo Updating UBOOT from Network (TFTP) ...; " \
-		"setenv autoload 0; " \
-		"dhcp;" \
-		"tftp 0x80000000 updateUBOOT.img;" \
-		"source;\0" \
-	NANDARGS \
-	MMCARGS
+BUR_COMMON_ENV \
+"autoload=0\0" \
+NANDARGS \
+MMCARGS
 #endif /* !CONFIG_SPL_BUILD*/
 
 #define CONFIG_BOOTCOMMAND \
Signature · 1 line
1.7.10.4
#22 lore raw

PATCH v2 12/24 board/BuR/common: Introduce Network Console and common environment for it

Quoted 8 lines · Hannes Petermaier

It is often necessary to "break in" into boards bootloader commandline if something fails or even for development purposes some parameters have to be changed.

So we enable u-boot's CONFIG_NETCONSOLE feature.
We also modify Networksettings to apply with this new use-case.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/c53a8ea9/attachment.sig>
#23 lore raw

[U-Boot] Commit 7ae47f6b causes a warning

In reply to Hannes Petermaier

Hello Hannes,

Quoted 12 lines · Hannes Petermaier
include/configs/bur_am335x_common.h +4 -0
index e9d5d01..d7ea1c9 100644
@@ -12,6 +12,23 @@
 #ifndef __BUR_AM335X_COMMON_H__
 #define __BUR_AM335X_COMMON_H__
 /* ------------------------------------------------------------------------- */
+#define BUR_COMMON_ENV \
+"defaultip=192.168.60.253\0" \
+"defaultsip=192.168.60.254\0" \
+"netconsole=echo switching to network console ...; " \

include/configs/bur_am335x_common.h line 28

Quoted 10 lines
include/configs/bur_am335x_common.h +10 -0
+"if dhcp; then " \
+"setenv ncip ${serverip}; else " \
+"setenv ncip 192.168.60.254; " \
+"setenv serverip 192.168.60.254; " \
+"setenv gatewayip 192.168.60.254; " \
+"setenv ipaddr 192.168.60.1; " \
+"fi;" \
+"setenv netdisplay0 '" \
+"setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr};" \
+"setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;'" \

This line contains a '\;' sequence which gcc warns against:

cc1: warning: unknown escape sequence: '\;' [enabled by default]

Could you post a fix?

Amicalement,

Signature · 1 line
Albert.
#24 lore raw

[U-Boot] Commit 7ae47f6b causes a warning

Quoted 1 line

Hello Hannes,

Hi Albert,
many thanks - i will fix this, probably on wednesday and send a patch.

best regards,
Hannes

Quoted 5 lines

Review

Quoted 1 line · Hannes Petermaier
(quoted diff) +0 -0

b/include/configs/bur_am335x_common.h

Quoted 7 lines

include/configs/bur_am335x_common.h line 14

Quoted 7 lines

index e9d5d01..d7ea1c9 100644

include/configs/bur_am335x_common.h +0 -0
@@ -12,6 +12,23 @@
 #ifndef __BUR_AM335X_COMMON_H__
 #define __BUR_AM335X_COMMON_H__
 /* 

-------------------------------------------------------------------------
*/

Quoted 21 lines
Quoted 4 lines
include/configs/bur_am335x_common.h +4 -0
+#define BUR_COMMON_ENV \
+"defaultip=192.168.60.253\0" \
+"defaultsip=192.168.60.254\0" \
+"netconsole=echo switching to network console ...; " \

include/configs/bur_am335x_common.h line 28

Quoted 10 lines
include/configs/bur_am335x_common.h +10 -0
+"if dhcp; then " \
+"setenv ncip ${serverip}; else " \
+"setenv ncip 192.168.60.254; " \
+"setenv serverip 192.168.60.254; " \
+"setenv gatewayip 192.168.60.254; " \
+"setenv ipaddr 192.168.60.1; " \
+"fi;" \
+"setenv netdisplay0 '" \
+"setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr};" \
+"setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;'" \

This line contains a '\;' sequence which gcc warns against:

cc1: warning: unknown escape sequence: '\;' [enabled by default]

Could you post a fix?

#25 lore raw

PATCH v2 13/24 board/BuR/common: Enable CONFIG_CMD_TIME

In reply to Hannes Petermaier

time measurement of u-boot commands is needed very often during development. We add this feature until development is completed. Maybe forever :)

---
Changes for V2: None

---
 include/configs/bur_am335x_common.h |    1 +
 1 file changed, 1 insertion(+)
include/configs/bur_am335x_common.h +1 -0
index d7ea1c9..cd15c6c 100644
@@ -29,6 +29,7 @@
 "run netdisplay0; " \
 "setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
 
+#define CONFIG_CMD_TIME
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_AM33XX
Signature · 1 line
1.7.10.4
#26 lore raw

PATCH v2 13/24 board/BuR/common: Enable CONFIG_CMD_TIME

Quoted 4 lines · Hannes Petermaier

time measurement of u-boot commands is needed very often during development. We add this feature until development is completed. Maybe forever :)

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/528c7222/attachment.sig>
#27 lore raw

PATCH v2 14/24 board/BuR/common: Add support for displaying BMP on LCD

In reply to Hannes Petermaier

Customer wants to display some logo very quickly after power on, so we support from now loading a compressed bmp.gz to the screen.

---
Changes for V2: None

---
 include/configs/bur_am335x_common.h |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
include/configs/bur_am335x_common.h +8 -1
index cd15c6c..29c1567 100644
@@ -30,6 +30,13 @@
 "setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
 
 #define CONFIG_CMD_TIME
+#define CONFIG_VIDEO_BMP_GZIP
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(1366*767*4)
+#define CONFIG_CMD_UNZIP
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_24BMP
+#define CONFIG_BMP_32BPP
+
 #define CONFIG_SYS_GENERIC_BOARD
 
 #define CONFIG_AM33XX
@@ -130,7 +137,7 @@
  * we are on so we do not need to rely on the command prompt.  We set a
  * console baudrate of 115200 and use the default baud rate table.
  */
-#define CONFIG_SYS_MALLOC_LEN		(1024 << 10)
+#define CONFIG_SYS_MALLOC_LEN		(5120 << 10)
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT		"U-Boot (BuR V2.0)# "
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
Signature · 1 line
1.7.10.4
#28 lore raw

PATCH v2 14/24 board/BuR/common: Add support for displaying BMP on LCD

Quoted 4 lines · Hannes Petermaier

Customer wants to display some logo very quickly after power on, so we support from now loading a compressed bmp.gz to the screen.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/c00821ad/attachment.sig>
#29 lore raw

PATCH v2 15/24 board/BuR/tseries: Rework default-environment settings.

In reply to Hannes Petermaier

Due to several changes of the boot-process we've redesigned the default- environment settings completly.

---
Changes for V2: None

---
 include/configs/tseries.h |   71 +++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 66 insertions(+), 5 deletions(-)
include/configs/tseries.h +66 -5
index 8e073e0..a6c7d5f 100644
@@ -94,8 +94,8 @@
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x80000
 #endif /* CONFIG_NAND */
 
-/* Always 128 KiB env size */
-#define CONFIG_ENV_SIZE			(128 << 10)
+/* Always 64 KiB env size */
+#define CONFIG_ENV_SIZE			(64 << 10)
 
 #ifdef CONFIG_NAND
 #define NANDARGS \
@@ -118,7 +118,32 @@
 
 #ifdef CONFIG_MMC
 #define MMCARGS \
-	"silent=1\0"
+"dtbdev=mmc\0" \
+"dtbpart=0:1\0" \
+"logo0=ext4load mmc 0:3 ${loadaddr} /PPTLogo.bmp.gz && " \
+	"bmp display ${loadaddr} 0 0\0" \
+"logo1=ext4load mmc 0:1 ${loadaddr} /PPTLogo.bmp.gz && " \
+	"bmp display ${loadaddr} 0 0\0" \
+"mmcroot0=setenv bootargs ${optargs} console=${console}\0" \
+"mmcroot1=setenv bootargs ${optargs} console=${console} root=/dev/mmcblk0p2 " \
+	"rootfstype=ext4\0" \
+"mmcboot0=echo booting Updatesystem from mmc (ext4-fs) ...; " \
+	"ext4load mmc 0:1 ${loadaddr} /${kernel}; " \
+	"ext4load mmc 0:1 ${ramaddr} /${ramdisk}; " \
+	"run mmcroot0; bootz ${loadaddr} ${ramaddr} ${dtbaddr};\0" \
+"mmcboot1=echo booting PPT-OS from mmc (ext4-fs) ...; " \
+	"ext4load mmc 0:2 ${loadaddr} /boot/${kernel}; " \
+	"run mmcroot1; bootz ${loadaddr} - ${dtbaddr};\0" \
+"defboot=run logo0 || run logo1; " \
+	"ext4load mmc 0:2 ${loadaddr} /boot/PPTImage.md5 && run mmcboot1; " \
+	"ext4load mmc 0:1 ${dtbaddr} /$dtb && run mmcboot0; " \
+	"run ramboot; run usbupdate;\0" \
+"bootlimit=1\0" \
+"altbootcmd=run logo0 || run logo1; " \
+	"run mmcboot0;\0" \
+"upduboot=dhcp; " \
+	"tftp ${loadaddr} MLO && mmc write ${loadaddr} 100 100; " \
+	"tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 400;\0"
 #else
 #define MMCARGS ""
 #endif /* CONFIG_MMC */
@@ -126,14 +151,50 @@
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
 BUR_COMMON_ENV \
+"verify=no\0" \
 "autoload=0\0" \
+"dtb=bur-ppt-ts30.dtb\0" \
+"dtbaddr=0x80100000\0" \
+"loadaddr=0x80200000\0" \
+"ramaddr=0x80A00000\0" \
+"kernel=zImage\0" \
+"ramdisk=rootfs.cpio.uboot\0" \
+"console=ttyO0,115200n8\0" \
+"optargs=consoleblank=0 quiet lpj=1191936 panic=2\0" \
+"nfsroot=/tftpboot/tseries/rootfs-small\0" \
+"nfsopts=nolock\0" \
+"ramargs=setenv bootargs ${optargs} console=${console} root=/dev/ram0\0" \
+"netargs=setenv bootargs console=${console} " \
+	"${optargs} " \
+	"root=/dev/nfs " \
+	"nfsroot=${serverip}:${nfsroot},${nfsopts} rw " \
+	"ip=dhcp\0" \
+"netboot=echo Booting from network ...; " \
+	"dhcp; " \
+	"tftp ${loadaddr} ${kernel}; " \
+	"tftp ${dtbaddr} ${dtb}; " \
+	"run netargs; " \
+	"bootz ${loadaddr} - ${dtbaddr}\0" \
+"ramboot=echo Booting from network into RAM ...; "\
+	"if dhcp; then; " \
+	"tftp ${loadaddr} ${kernel}; " \
+	"tftp ${ramaddr} ${ramdisk}; " \
+	"if ext4load ${dtbdev} ${dtbpart} ${dtbaddr} /${dtb}; " \
+	"then; else tftp ${dtbaddr} ${dtb}; fi;" \
+	"run mmcroot0; " \
+	"bootz ${loadaddr} ${ramaddr} ${dtbaddr}; fi;\0" \
+"usbupdate=echo Updating UBOOT from USB-Stick ...; " \
+	"usb start && fatload usb 0 0x80000000 updateubootusb.img && source\0" \
+"netupdate=echo Updating UBOOT from Network (TFTP) ...; " \
+	"setenv autoload 0; " \
+	"dhcp && tftp 0x80000000 updateUBOOT.img && source;\0" \
 NANDARGS \
 MMCARGS
 #endif /* !CONFIG_SPL_BUILD*/
 
 #define CONFIG_BOOTCOMMAND \
-	"run mmcboot1;"
-#define CONFIG_BOOTDELAY		1 /* TODO: f?r release auf 0 setzen */
+	"run defboot;"
+#define CONFIG_BOOTDELAY		0
 
 #ifdef CONFIG_NAND
 /*
Signature · 1 line
1.7.10.4
#30 lore raw

PATCH v2 15/24 board/BuR/tseries: Rework default-environment settings.

Quoted 4 lines · Hannes Petermaier

Due to several changes of the boot-process we've redesigned the default- environment settings completly.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/0dee7778/attachment.sig>
#31 lore raw

PATCH v2 16/24 board/BuR/tseries: cosmetic changes

In reply to Hannes Petermaier

remove unnary '#define ETHLED_ORANGE (96+16) /* GPIO3_16 */'

---
Changes for V2: None

---
 board/BuR/tseries/board.c |    2 --
 1 file changed, 2 deletions(-)
board/BuR/tseries/board.c +0 -2
index a1c6887..9402aa4 100644
@@ -34,10 +34,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 /* --------------------------------------------------------------------------*/
 /* -- defines for GPIO -- */
-#define	ETHLED_ORANGE	(96+16)	/* GPIO3_16 */
 #define	REPSWITCH	(0+20)	/* GPIO0_20 */
 
-
 #if defined(CONFIG_SPL_BUILD)
 /* TODO: check ram-timing ! */
 static const struct ddr_data ddr3_data = {
Signature · 1 line
1.7.10.4
#32 lore raw

PATCH v2 16/24 board/BuR/tseries: cosmetic changes

Quoted 3 lines · Hannes Petermaier

remove unnary '#define ETHLED_ORANGE (96+16) /* GPIO3_16 */'

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/534e2a0d/attachment.sig>
#33 lore raw

PATCH v2 17/24 board/BuR/kwb: switch to board HW-Rev3

In reply to Hannes Petermaier

The board has been redesigned, therefore we need from now other I/O Pins to mux and handle.

Older boards aren't supported from now anymore.

---
Changes for V2: None

---
 board/BuR/kwb/board.c |   92 ++++++++++++++++++++++++++++++-------------------
 board/BuR/kwb/mux.c   |   51 +++++++++++++--------------
 include/configs/kwb.h |    9 +++--
 3 files changed, 89 insertions(+), 63 deletions(-)
board/BuR/kwb/board.c +56 -36
index 804765a..30900bc 100644
@@ -26,14 +26,13 @@
 #include <i2c.h>
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
+#include <lcd.h>
 
 /* -------------------------------------------------------------------------*/
 /* -- defines for used GPIO Hardware -- */
-#define KEY						(0+4)
-#define LCD_PWR						(0+5)
-#define PUSH_KEY					(0+31)
-#define USB2SD_NRST					(32+29)
-#define USB2SD_PWR					(96+13)
+#define ESC_KEY					(0+19)
+#define LCD_PWR					(0+5)
+#define PUSH_KEY				(0+31)
 /* -------------------------------------------------------------------------*/
 /* -- PSOC Resetcontroller Register defines -- */
 
@@ -46,6 +45,7 @@
 
 /* -- defines for RSTCTRL_CTRLREG  -- */
 #define	RSTCTRL_FORCE_PWR_NEN			0x0404
+#define	RSTCTRL_CAN_STB				0x4040
 
 #if defined(CONFIG_SPL_BUILD)
 /* TODO: check ram-timing ! */
@@ -107,10 +107,13 @@ void am33xx_spl_board_init(void)
 		&cmper->epwmss0clkctrl,
 		&cmper->epwmss1clkctrl,
 		&cmper->epwmss2clkctrl,
+		&cmper->lcdclkctrl,
+		&cmper->lcdcclkstctrl,
 		0
 	};
 	do_enable_clocks(clk_domains, clk_modules_kwbspecific, 1);
-
+	/* setup LCD-Pixel Clock */
+	writel(0x2, CM_DPLL + 0x34);
 	/* power-OFF LCD-Display */
 	gpio_direction_output(LCD_PWR, 0);
 
@@ -121,7 +124,7 @@ void am33xx_spl_board_init(void)
 	/* power-ON  3V3 via Resetcontroller */
 	oldspeed = i2c_get_bus_speed();
 	if (i2c_set_bus_speed(CONFIG_SYS_OMAP24_I2C_SPEED_PSOC) >= 0) {
-		buf = RSTCTRL_FORCE_PWR_NEN;
+		buf = RSTCTRL_FORCE_PWR_NEN | RSTCTRL_CAN_STB;
 		i2c_write(RSTCTRL_ADDR, RSTCTRL_CTRLREG, 1,
 			  (uint8_t *)&buf, sizeof(buf));
 		i2c_set_bus_speed(oldspeed);
@@ -129,15 +132,6 @@ void am33xx_spl_board_init(void)
 		puts("ERROR: i2c_set_bus_speed failed! (turn on PWR_nEN)\n");
 	}
 
-#if defined(CONFIG_AM335X_USB0)
-	/* power on USB2SD Controller */
-	gpio_direction_output(USB2SD_PWR, 1);
-	mdelay(1);
-	/* give a reset Pulse to USB2SD Controller */
-	gpio_direction_output(USB2SD_NRST, 0);
-	mdelay(1);
-	gpio_set_value(USB2SD_NRST, 1);
-#endif
 	pmicsetup(0);
 }
 
@@ -166,7 +160,6 @@ int board_init(void)
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
-	const unsigned int ton  = 250;
 	const unsigned int toff = 1000;
 	unsigned int cnt  = 3;
 	unsigned short buf = 0xAAAA;
@@ -175,50 +168,77 @@ int board_late_init(void)
 	tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
 			   TPS65217_WLEDCTRL2, 0x32, 0xFF); /* 50% dimlevel */
 
-	if (gpio_get_value(KEY)) {
+	if (gpio_get_value(ESC_KEY)) {
 		do {
-			/* turn on light */
-			tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
-					   TPS65217_WLEDCTRL1, 0x09, 0xFF);
-			mdelay(ton);
-			/* turn off light */
-			tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
-					   TPS65217_WLEDCTRL1, 0x01, 0xFF);
+			lcd_position_cursor(1, 8);
+			switch (cnt) {
+			case 3:
+				lcd_puts(
+				"release ESC-KEY to enter SERVICE-mode.");
+				break;
+			case 2:
+				lcd_puts(
+				"release ESC-KEY to enter DIAGNOSE-mode.");
+				break;
+			case 1:
+				lcd_puts(
+				"release ESC-KEY to enter BOOT-mode.    ");
+				break;
+			}
 			mdelay(toff);
 			cnt--;
-			if (!gpio_get_value(KEY) &&
+			if (!gpio_get_value(ESC_KEY) &&
+			    gpio_get_value(PUSH_KEY) && 2 == cnt) {
+				lcd_position_cursor(1, 8);
+				lcd_puts(
+				"switching to network-console ...       ");
+				setenv("bootcmd", "run netconsole");
+				cnt = 4;
+				break;
+			} else if (!gpio_get_value(ESC_KEY) &&
 			    gpio_get_value(PUSH_KEY) && 1 == cnt) {
-				puts("updating from USB ...\n");
+				lcd_position_cursor(1, 8);
+				lcd_puts(
+				"updating U-BOOT from USB ...           ");
 				setenv("bootcmd", "run usbupdate");
+				cnt = 4;
 				break;
-			} else if (!gpio_get_value(KEY)) {
+			} else if ((!gpio_get_value(ESC_KEY) &&
+				    gpio_get_value(PUSH_KEY) && cnt == 0) ||
+				    (gpio_get_value(ESC_KEY) &&
+				    gpio_get_value(PUSH_KEY) && cnt == 0)) {
+				lcd_position_cursor(1, 8);
+				lcd_puts(
+				"starting script from network ...      ");
+				setenv("bootcmd", "run netscript");
+				cnt = 4;
+				break;
+			} else if (!gpio_get_value(ESC_KEY)) {
 				break;
 			}
 		} while (cnt);
 	}
 
+	lcd_position_cursor(1, 8);
 	switch (cnt) {
 	case 0:
-		puts("3 blinks ... entering BOOT mode.\n");
+		lcd_puts("entering BOOT-mode.                    ");
+		setenv("bootcmd", "run defaultAR");
 		buf = 0x0000;
 		break;
 	case 1:
-		puts("2 blinks ... entering DIAGNOSE mode.\n");
+		lcd_puts("entering DIAGNOSE-mode.                ");
 		buf = 0x0F0F;
 		break;
 	case 2:
-		puts("1 blinks ... entering SERVICE mode.\n");
+		lcd_puts("entering SERVICE mode.                 ");
 		buf = 0xB4B4;
 		break;
 	case 3:
-		puts("0 blinks ... entering RUN mode.\n");
+		lcd_puts("loading OS...                          ");
 		buf = 0x0404;
 		break;
 	}
-	mdelay(ton);
-	/* turn on light */
-	tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
-			   TPS65217_WLEDCTRL1, 0x09, 0xFF);
 	/* write bootinfo into scratchregister of resetcontroller */
 	oldspeed = i2c_get_bus_speed();
 	if (i2c_set_bus_speed(CONFIG_SYS_OMAP24_I2C_SPEED_PSOC) >= 0) {
board/BuR/kwb/mux.c +26 -25

93 lines not on this page · raw message

include/configs/kwb.h +7 -2
index 29b263f..2c59fbd 100644
@@ -14,6 +14,11 @@
 
 #include <configs/bur_am335x_common.h>
 /* ------------------------------------------------------------------------- */
+#define CONFIG_AM335X_LCD
+#define CONFIG_LCD
+#define CONFIG_LCD_NOSTDOUT
+#define CONFIG_SYS_WHITE_ON_BLACK
+#define LCD_BPP				LCD_COLOR32
 /* Clock Defines */
 #define V_OSCK				26000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
@@ -87,8 +92,6 @@
 #undef	CONFIG_BOOTM_NETBSD
 #undef	CONFIG_BOOTM_PLAN9
 #undef	CONFIG_BOOTM_RTEMS
-#undef	CONFIG_GZIP
-#undef	CONFIG_ZLIB
 
 /* USB configuration */
 #define CONFIG_USB_MUSB_DSPS
@@ -100,6 +103,8 @@
 #define CONFIG_MUSB_HOST
 #define CONFIG_AM335X_USB0
 #define CONFIG_AM335X_USB0_MODE	MUSB_HOST
+#define CONFIG_AM335X_USB1
+#define CONFIG_AM335X_USB1_MODE	MUSB_HOST
 
 #ifdef CONFIG_MUSB_HOST
 #define CONFIG_CMD_USB
Signature · 1 line
1.7.10.4
#34 lore raw

PATCH v2 17/24 board/BuR/kwb: switch to board HW-Rev3

Quoted 6 lines · Hannes Petermaier

The board has been redesigned, therefore we need from now other I/O Pins to mux and handle.

Older boards aren't supported from now anymore.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/87f74067/attachment.sig>
#35 lore raw

PATCH v2 18/24 board/BuR/kwb: Support booting Linux

In reply to Hannes Petermaier

For series testing purpose we need to boot some linux, therefore we enable the needed features

- bootz
- devicetree

---
Changes for V2: None

---
 include/configs/kwb.h |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
include/configs/kwb.h +8 -1
index 2c59fbd..7989f4b 100644
@@ -88,10 +88,17 @@
 #define CONFIG_BOOTDELAY		1 /* TODO: f?r release auf 0 setzen */
 
 /* undefine command which we not need here */
-#undef	CONFIG_BOOTM_LINUX
 #undef	CONFIG_BOOTM_NETBSD
 #undef	CONFIG_BOOTM_PLAN9
 #undef	CONFIG_BOOTM_RTEMS
+#undef CONFIG_CMD_CRC32
+
+/* Support both device trees and ATAGs. */
+#define CONFIG_OF_LIBFDT
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_INITRD_TAG
+#define CONFIG_CMD_BOOTZ
 
 /* USB configuration */
 #define CONFIG_USB_MUSB_DSPS
Signature · 1 line
1.7.10.4
#36 lore raw

PATCH v2 18/24 board/BuR/kwb: Support booting Linux

Quoted 7 lines · Hannes Petermaier

For series testing purpose we need to boot some linux, therefore we enable the needed features

- bootz
- devicetree

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/d5f9b2d3/attachment.sig>
#37 lore raw

PATCH v2 19/24 board/BuR/kwb: Redesign default-environment

In reply to Hannes Petermaier

Due to several changes in the boot-process we do a complete redesign of the default environment.

---
Changes for V2: None

---
 include/configs/kwb.h |   81 +++++++++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 36 deletions(-)
include/configs/kwb.h +45 -36
index 7989f4b..dd30df2 100644
@@ -43,49 +43,58 @@
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS		0x200 /* 256 KB */
 #define CONFIG_SPL_MMC_SUPPORT
 
-#undef CONFIG_SPL_OS_BOOT
-#ifdef CONFIG_SPL_OS_BOOT
-#define CONFIG_SYS_SPL_ARGS_ADDR		0x80F80000
-
-/* RAW SD card / eMMC */
-#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x900	/* address 0x120000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x80	/* address 0x10000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	0x80	/* 64KiB */
-
-#endif /* CONFIG_SPL_OS_BOOT */
-
-/* Always 128 KiB env size */
-#define CONFIG_ENV_SIZE			(128 << 10)
+/* Always 64 KiB env size */
+#define CONFIG_ENV_SIZE			(64 << 10)
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"autoload=0\0" \
-	"loadaddr=0x80100000\0" \
-	"bootfile=arimg\0" \
-	"usbboot=echo Booting from USB-Stick ...; " \
-		"usb start; " \
-		"fatload usb 0 ${loadaddr} ${bootfile}; " \
-		"usb stop; " \
-		"go ${loadaddr};\0" \
-	"netboot=echo Booting from network ...; " \
-		"setenv autoload 0; " \
-		"dhcp; " \
-		"tftp ${loadaddr} arimg; " \
-		"go ${loadaddr}\0" \
-	"usbupdate=echo Updating UBOOT from USB-Stick ...; " \
-		"usb start; " \
-		"fatload usb 0 0x80000000 updateubootusb.img; " \
-		"source;\0" \
-	"netupdate=echo Updating UBOOT from Network (TFTP) ...; " \
-		"setenv autoload 0; " \
-		"dhcp;" \
-		"tftp 0x80000000 updateUBOOT.img;" \
-		"source;\0"
+BUR_COMMON_ENV \
+"vx_romfsbase=0x800E0000\0" \
+"vx_romfssize=0x20000\0" \
+"vx_memtop=0x8FBEF000\0" \
+"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
+"autoload=0\0" \
+"loadaddr=0x80100000\0" \
+"logoaddr=0x82000000\0" \
+"defaultARlen=0x8000\0" \
+"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
+"defaultAR=run loadromfs; run loaddefaultAR; go ${loadaddr}\0" \
+"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
+	"bmp display ${logoaddr} 0 0\0" \
+"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
+	"bmp display ${logoaddr} 0 0\0" \
+"mmcboot=echo booting AR from eMMC-flash ...; "\
+	"run logo0 || run logo1; " \
+	"run loadromfs; " \
+	"fatload mmc 0:1 ${loadaddr} arimg && go ${loadaddr}; " \
+	"run defaultAR;\0" \
+"netboot=echo booting AR from network ...; " \
+	"run loadromfs; " \
+	"tftp ${loadaddr} arimg && go ${loadaddr}; " \
+	"puts 'networkboot failed!';\0" \
+"usbupdate=echo updating u-boot from usb ...; " \
+	"usb start; " \
+	"fatload usb 0 0x80000000 updateubootusb.img && source; " \
+	"puts 'usbupdate failed!'\0" \
+"netscript=echo running script from network (tftp) ...; " \
+	"tftp 0x80000000 netscript.img && source; " \
+	"puts 'netscript load failed!'\0" \
+"netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
+	"tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
+"netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
+	"if tftp 0x80100000 arimg.bin; " \
+	"then mmc write 0x80100000 800 ${defaultARlen}; " \
+	"else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
+"netupdateROMFS=echo updating romfs from network (tftp) ...; " \
+	"if tftp 0x80100000 romfs.bin; " \
+	"then mmc write 0x80100000 700 100; " \
+	"else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
+
 #endif /* !CONFIG_SPL_BUILD*/
 
 #define CONFIG_BOOTCOMMAND \
 	"run usbupdate;"
-#define CONFIG_BOOTDELAY		1 /* TODO: f?r release auf 0 setzen */
+#define CONFIG_BOOTDELAY		0
 
 /* undefine command which we not need here */
 #undef	CONFIG_BOOTM_NETBSD
Signature · 1 line
1.7.10.4
#38 lore raw

PATCH v2 19/24 board/BuR/kwb: Redesign default-environment

Quoted 4 lines · Hannes Petermaier

Due to several changes in the boot-process we do a complete redesign of the default environment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/de9273ab/attachment.sig>
#39 lore raw

PATCH v2 20/24 board/BuR/kwb: Form a bootline for vxWorks

In reply to Hannes Petermaier

vxWorks needs several parameters which are set by the bootloader und his environment. So we form a vxWorks bootline and pass the result to vxWorks on a predefined address.

---
Changes for V2: None

---
 board/BuR/kwb/board.c |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
board/BuR/kwb/board.c +30 -0
index 30900bc..455f472 100644
@@ -47,6 +47,12 @@
 #define	RSTCTRL_FORCE_PWR_NEN			0x0404
 #define	RSTCTRL_CAN_STB				0x4040
 
+#define VXWORKS_BOOTLINE			0x80001100
+#define DEFAULT_BOOTLINE	"cpsw(0,0):pme/vxWorks"
+#define VXWORKS_USER		"u=vxWorksFTP pw=vxWorks tn=vxtarget"
+
+DECLARE_GLOBAL_DATA_PTR;
+
 #if defined(CONFIG_SPL_BUILD)
 /* TODO: check ram-timing ! */
 static const struct ddr_data ddr3_data = {
@@ -248,6 +254,30 @@ int board_late_init(void)
 	} else {
 		puts("ERROR: i2c_set_bus_speed failed! (scratchregister)\n");
 	}
+	/* setup vxworks bootline */
+	char *vxworksbootline = (char *)VXWORKS_BOOTLINE;
+
+	/* setup default IP, in case if there is nothing in environment */
+	if (!getenv("ipaddr")) {
+		setenv("ipaddr", "192.168.60.1");
+		setenv("netmask", "255.255.255.0");
+		setenv("serverip", "192.168.60.254");
+		setenv("gatewayip", "192.168.60.254");
+		puts("net: had no IP! made default setup.\n");
+	}
+
+	sprintf(vxworksbootline,
+		"%s h=%s e=%s:%s g=%s %s o=0x%08x;0x%08x;0x%08x;0x%08x",
+		DEFAULT_BOOTLINE,
+		getenv("serverip"),
+		getenv("ipaddr"), getenv("netmask"),
+		getenv("gatewayip"),
+		VXWORKS_USER,
+		(unsigned int) gd->fb_base-0x20,
+		(u32)getenv_ulong("vx_memtop", 16, gd->fb_base-0x20),
+		(u32)getenv_ulong("vx_romfsbase", 16, 0),
+		(u32)getenv_ulong("vx_romfssize", 16, 0));
+
 	/*
 	 * reset VBAR registers to its reset location, VxWorks 6.9.3.2 does
 	 * expect that vectors are there, original u-boot moves them to _start
Signature · 1 line
1.7.10.4
#40 lore raw

PATCH v2 20/24 board/BuR/kwb: Form a bootline for vxWorks

Quoted 5 lines · Hannes Petermaier

vxWorks needs several parameters which are set by the bootloader und his environment. So we form a vxWorks bootline and pass the result to vxWorks on a predefined address.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/c1089468/attachment.sig>
#41 lore raw

PATCH v2 21/24 board/BuR/kwb: Support modify bootcmd through reset-controller

In reply to Hannes Petermaier

For some cases it is necessary to modify temporaly the bootcommand. This can be done by writing into the Scratchregister a specific value:

* 0xCC - modify bootcmd "run netboot"
* 0xCD - modify bootcmd "run netscript"
* 0xCE - modify bootcmd "run mmcboot"

the environment in flash is NOT overwritten.

---
Changes for V2: None

---
 board/BuR/kwb/board.c |   30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
board/BuR/kwb/board.c +28 -2
index 455f472..892311e 100644
@@ -169,10 +169,18 @@ int board_late_init(void)
 	const unsigned int toff = 1000;
 	unsigned int cnt  = 3;
 	unsigned short buf = 0xAAAA;
+	unsigned char scratchreg = 0;
 	unsigned int oldspeed;
 
-	tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
-			   TPS65217_WLEDCTRL2, 0x32, 0xFF); /* 50% dimlevel */
+	/* try to read out some boot-instruction from resetcontroller */
+	oldspeed = i2c_get_bus_speed();
+	if (i2c_set_bus_speed(CONFIG_SYS_OMAP24_I2C_SPEED_PSOC) >= 0) {
+		i2c_read(RSTCTRL_ADDR, RSTCTRL_SCRATCHREG, 1,
+			 &scratchreg, sizeof(scratchreg));
+		i2c_set_bus_speed(oldspeed);
+	} else {
+		puts("ERROR: i2c_set_bus_speed failed! (scratchregister)\n");
+	}
 
 	if (gpio_get_value(ESC_KEY)) {
 		do {
@@ -223,6 +231,24 @@ int board_late_init(void)
 				break;
 			}
 		} while (cnt);
+	} else if (scratchreg == 0xCC) {
+		lcd_position_cursor(1, 8);
+		lcd_puts(
+		"starting vxworks from network ...      ");
+		setenv("bootcmd", "run netboot");
+		cnt = 4;
+	} else if (scratchreg == 0xCD) {
+		lcd_position_cursor(1, 8);
+		lcd_puts(
+		"starting script from network ...      ");
+		setenv("bootcmd", "run netscript");
+		cnt = 4;
+	} else if (scratchreg == 0xCE) {
+		lcd_position_cursor(1, 8);
+		lcd_puts(
+		"starting AR from eMMC ...             ");
+		setenv("bootcmd", "run mmcboot");
+		cnt = 4;
 	}
 
 	lcd_position_cursor(1, 8);
Signature · 1 line
1.7.10.4
#42 lore raw

PATCH v2 21/24 board/BuR/kwb: Support modify bootcmd through reset-controller

Quoted 10 lines · Hannes Petermaier

For some cases it is necessary to modify temporaly the bootcommand. This can be done by writing into the Scratchregister a specific value:

* 0xCC - modify bootcmd "run netboot"
* 0xCD - modify bootcmd "run netscript"
* 0xCE - modify bootcmd "run mmcboot"

the environment in flash is NOT overwritten.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/f0d514c0/attachment.sig>
#43 lore raw

PATCH v2 22/24 intern: disable lcd-stdout

In reply to Hannes Petermaier

on B&R boards we want not redirect console to screen.

---
Changes for V2: None

---
 README       |    7 +++++++
 common/lcd.c |   10 ++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)
README +7 -0
index fefa71c..8f9865c 100644
@@ -1959,6 +1959,13 @@ CBFS (Coreboot Filesystem) support
 		Normally display is black on white background; define
 		CONFIG_SYS_WHITE_ON_BLACK to get it inverted.
 
+		CONFIG_LCD_NOSTDOUT
+		Normally 'stdout' is redirected to LCD-screen after
+		initialization. Define CONFIG_LCD_NOSTDOUT to avoid this.
+		Useful in case where only lcd_puts(...), lcd_printf(...)
+		functions of the framework are used and 'normal' u-boot
+		console remains e.g. on serial-line.
+
 		CONFIG_LCD_ALIGNMENT
 
 		Normally the LCD is page-aligned (typically 4KB). If this is
common/lcd.c +6 -4
index cc34b8a..3ed6d20 100644
@@ -194,12 +194,11 @@ __weak int lcd_get_size(int *line_length)
 
 int drv_lcd_init(void)
 {
-	struct stdio_dev lcddev;
-	int rc;
-
 	lcd_base = map_sysmem(gd->fb_base, 0);
-
 	lcd_init(lcd_base);		/* LCD initialization */
+#ifndef CONFIG_LCD_NOSTDOUT
+	struct stdio_dev lcddev;
+	int rc;
 
 	/* Device initialization */
 	memset(&lcddev, 0, sizeof(lcddev));
@@ -213,6 +212,9 @@ int drv_lcd_init(void)
 	rc = stdio_register(&lcddev);
 
 	return (rc == 0) ? 1 : rc;
+#else
+	return 0;
+#endif
 }
 
 /*----------------------------------------------------------------------*/
Signature · 1 line
1.7.10.4
#44 lore raw

PATCH v2 22/24 intern: disable lcd-stdout

Hi all,

please ignore this "internal" patch.
This is was an accident.

best regards,
Hannes

From:   Hannes Petermaier <[email protected]>
To:     u-boot at lists.denx.de
Date:   03.02.2015 13:26
Subject:        [U-Boot] [PATCH v2 22/24] intern: disable lcd-stdout
Sent by:        "U-Boot" <[email protected]>

on B&R boards we want not redirect console to screen.

---
Changes for V2: None

---
 README       |    7 +++++++
 common/lcd.c |   10 ++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)
README +0 -0
index fefa71c..8f9865c 100644
@@ -1959,6 +1959,13 @@ CBFS (Coreboot Filesystem) support
                                 Normally display is black on white 

background; define
CONFIG_SYS_WHITE_ON_BLACK to get it
inverted.

+ CONFIG_LCD_NOSTDOUT
+ Normally 'stdout' is redirected to
LCD-screen after
+ initialization. Define
CONFIG_LCD_NOSTDOUT to avoid this.
+ Useful in case where only lcd_puts(...),
lcd_printf(...)
+ functions of the framework are used and
'normal' u-boot
+ console remains e.g. on serial-line.
+
CONFIG_LCD_ALIGNMENT

Normally the LCD is page-aligned
(typically 4KB). If this is

common/lcd.c +0 -4
index cc34b8a..3ed6d20 100644
@@ -194,12 +194,11 @@ __weak int lcd_get_size(int *line_length)
 
 int drv_lcd_init(void)
 {
-                struct stdio_dev lcddev;
-                int rc;
-
                 lcd_base = map_sysmem(gd->fb_base, 0);
-
                 lcd_init(lcd_base);                             /* LCD 

initialization */
+#ifndef CONFIG_LCD_NOSTDOUT
+ struct stdio_dev lcddev;
+ int rc;

                 /* Device initialization */
                 memset(&lcddev, 0, sizeof(lcddev));
@@ -213,6 +212,9 @@ int drv_lcd_init(void)
                 rc = stdio_register(&lcddev);
 
                 return (rc == 0) ? 1 : rc;

+#else
+ return 0;
+#endif
}

/*----------------------------------------------------------------------*/

Signature · 6 lines
1.7.10.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
#45 lore raw

PATCH v2 23/24 intern: Add specific offset do FAT-Filesystem

In reply to Hannes Petermaier

on vxWorks targets the filesystem with its MBR starts from a higher offset in the emmc flash for limiting space which is accesible by the user.

---
Changes for V2: None

---
 board/BuR/kwb/board.c |    6 ++++++
 disk/part_dos.c       |   11 ++++++++---
 drivers/mmc/mmc.c     |    8 ++++++++
 fs/fat/fat.c          |    5 +++--
 fs/fat/fat_write.c    |    7 ++++---
 include/part.h        |   10 +++++++++-
 6 files changed, 38 insertions(+), 9 deletions(-)
board/BuR/kwb/board.c +6 -0
index 892311e..8578c06 100644
@@ -27,6 +27,7 @@
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
 #include <lcd.h>
+#include <mmc.h>
 
 /* -------------------------------------------------------------------------*/
 /* -- defines for used GPIO Hardware -- */
@@ -162,6 +163,11 @@ int board_init(void)
 	gpmc_init();
 	return 0;
 }
+void board_mmc_geometry(struct mmc *mmc)
+{
+	mmc->block_dev.lba_fs = mmc->block_dev.lba - 0x2A8000;
+	mmc->block_dev.lba_offset = 0x2A8000;
+}
 
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
disk/part_dos.c +8 -3
index cf1a36e..9c34107 100644
@@ -89,7 +89,8 @@ int test_part_dos (block_dev_desc_t *dev_desc)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
 
-	if (dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 1)
+	if (dev_desc->block_read(dev_desc->dev, dev_desc->lba_offset, 1,
+				 (ulong *)buffer) != 1)
 		return -1;
 
 	if (test_block_type(buffer) != DOS_MBR)
@@ -108,7 +109,9 @@ static void print_partition_extended(block_dev_desc_t *dev_desc,
 	dos_partition_t *pt;
 	int i;
 
-	if (dev_desc->block_read(dev_desc->dev, ext_part_sector, 1, (ulong *) buffer) != 1) {
+	if (dev_desc->block_read(dev_desc->dev,
+				 ext_part_sector + dev_desc->lba_offset, 1,
+				 (ulong *)buffer) != 1) {
 		printf ("** Can't read partition table on %d:%d **\n",
 			dev_desc->dev, ext_part_sector);
 		return;
@@ -172,7 +175,9 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part
 	int i;
 	int dos_type;
 
-	if (dev_desc->block_read (dev_desc->dev, ext_part_sector, 1, (ulong *) buffer) != 1) {
+	if (dev_desc->block_read(dev_desc->dev,
+				 ext_part_sector + dev_desc->lba_offset, 1,
+				 (ulong *)buffer) != 1) {
 		printf ("** Can't read partition table on %d:%d **\n",
 			dev_desc->dev, ext_part_sector);
 		return -1;
drivers/mmc/mmc.c +8 -0
index b8039cd..52e8cf5 100644
@@ -531,6 +531,12 @@ static int mmc_change_freq(struct mmc *mmc)
 	return 0;
 }
 
+void __weak board_mmc_geometry(struct mmc *mmc)
+{
+	mmc->block_dev.lba_fs = mmc->block_dev.lba;
+	mmc->block_dev.lba_offset = 0;
+}
+
 static int mmc_set_capacity(struct mmc *mmc, int part_num)
 {
 	switch (part_num) {
@@ -556,6 +562,8 @@ static int mmc_set_capacity(struct mmc *mmc, int part_num)
 
 	mmc->block_dev.lba = lldiv(mmc->capacity, mmc->read_bl_len);
 
+	board_mmc_geometry(mmc);
+
 	return 0;
 }
 
fs/fat/fat.c +3 -2
index bccc3e3..46f7da6 100644
@@ -49,7 +49,8 @@ static int disk_read(__u32 block, __u32 nr_blocks, void *buf)
 		return -1;
 
 	return cur_dev->block_read(cur_dev->dev,
-			cur_part_info.start + block, nr_blocks, buf);
+			cur_part_info.start + block + cur_dev->lba_offset,
+			nr_blocks, buf);
 }
 
 int fat_set_blk_dev(block_dev_desc_t *dev_desc, disk_partition_t *info)
@@ -97,7 +98,7 @@ int fat_register_device(block_dev_desc_t *dev_desc, int part_no)
 		}
 
 		info.start = 0;
-		info.size = dev_desc->lba;
+		info.size = dev_desc->lba_fs;
 		info.blksz = dev_desc->blksz;
 		info.name[0] = 0;
 		info.type[0] = 0;
fs/fat/fat_write.c +4 -3
index 98b88ad..7ed656e 100644
@@ -33,14 +33,15 @@ static int disk_write(__u32 block, __u32 nr_blocks, void *buf)
 	if (!cur_dev || !cur_dev->block_write)
 		return -1;
 
-	if (cur_part_info.start + block + nr_blocks >
-		cur_part_info.start + total_sector) {
+	if (cur_part_info.start + block + nr_blocks + cur_dev->lba_offset >
+		cur_part_info.start + total_sector + cur_dev->lba_offset) {
 		printf("error: overflow occurs\n");
 		return -1;
 	}
 
 	return cur_dev->block_write(cur_dev->dev,
-			cur_part_info.start + block, nr_blocks,	buf);
+			cur_part_info.start + block + cur_dev->lba_offset,
+			nr_blocks, buf);
 }
 
 /*
include/part.h +9 -1
index 8ea9b30..1f80c35 100644
@@ -21,7 +21,15 @@ typedef struct block_dev_desc {
 #ifdef CONFIG_LBA48
 	unsigned char	lba48;		/* device can use 48bit addr (ATA/ATAPI v7) */
 #endif
-	lbaint_t	lba;		/* number of blocks */
+	lbaint_t	lba_offset;	/*
+					 * offset from which file-systems
+					 * do their work
+					 */
+	lbaint_t	lba_fs;		/*
+					 * number of blocks available to the
+					 * file-system
+					 */
+	lbaint_t	lba;		/* total number of blocks-available */
 	unsigned long	blksz;		/* block size */
 	int		log2blksz;	/* for convenience: log2(blksz) */
 	char		vendor [40+1];	/* IDE model, SCSI Vendor */
Signature · 1 line
1.7.10.4
#46 lore raw

PATCH v2 23/24 intern: Add specific offset do FAT-Filesystem

Hi all,

please ignore this "internal" patch.
This is was an accident.

best regards,
Hannes

"U-Boot" <[email protected]> schrieb am 03.02.2015 13:22:45:

Quoted 4 lines

From: Hannes Petermaier <[email protected]>
To: u-boot at lists.denx.de
Date: 03.02.2015 13:27
Subject: [U-Boot] [PATCH v2 23/24] intern: Add specific offset do

FAT-Filesystem

Quoted 3 lines

Sent by: "U-Boot" <[email protected]>

on vxWorks targets the filesystem with its MBR starts from a higher

offset in

Quoted 20 lines

the emmc flash for limiting space which is accesible by the user.

---
Changes for V2: None

---
 board/BuR/kwb/board.c |    6 ++++++
 disk/part_dos.c       |   11 ++++++++---
 drivers/mmc/mmc.c     |    8 ++++++++
 fs/fat/fat.c          |    5 +++--
 fs/fat/fat_write.c    |    7 ++++---
 include/part.h        |   10 +++++++++-
 6 files changed, 38 insertions(+), 9 deletions(-)
board/BuR/kwb/board.c +0 -0
index 892311e..8578c06 100644

board/BuR/kwb/board.c line 32

Quoted 6 lines
board/BuR/kwb/board.c +1 -0
@@ -27,6 +27,7 @@
 #include <power/tps65217.h>
 #include "../common/bur_common.h"
 #include <lcd.h>
+#include <mmc.h>
 
 /* 

-------------------------------------------------------------------------*/

Quoted 18 lines
board/BuR/kwb/board.c +5 -0
 /* -- defines for used GPIO Hardware -- */
@@ -162,6 +163,11 @@ int board_init(void)
    gpmc_init();
    return 0;
 }
+void board_mmc_geometry(struct mmc *mmc)
+{
+   mmc->block_dev.lba_fs = mmc->block_dev.lba - 0x2A8000;
+   mmc->block_dev.lba_offset = 0x2A8000;
+}
 
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
disk/part_dos.c +0 -0
index cf1a36e..9c34107 100644

disk/part_dos.c int test_part_dos (block_dev_desc_t *dev_desc) · line 92

Quoted 4 lines
disk/part_dos.c +0 -1
@@ -89,7 +89,8 @@ int test_part_dos (block_dev_desc_t *dev_desc)
 {
    ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
 
-   if (dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 

1)

disk/part_dos.c static void

Quoted 6 lines
disk/part_dos.c +2 -0
+   if (dev_desc->block_read(dev_desc->dev, dev_desc->lba_offset, 1,
+             (ulong *)buffer) != 1)
       return -1;
 
    if (test_block_type(buffer) != DOS_MBR)
@@ -108,7 +109,9 @@ static void 

print_partition_extended(block_dev_desc_t *dev_desc,

disk/part_dos.c static void print_partition_extended(block_dev_desc_t *dev_desc,

Quoted 4 lines
disk/part_dos.c +0 -1
    dos_partition_t *pt;
    int i;
 
-   if (dev_desc->block_read(dev_desc->dev, ext_part_sector, 1, (ulong 

*)

disk/part_dos.c static int get_partition_info_extended

Quoted 8 lines
disk/part_dos.c +3 -0
 buffer) != 1) {
+   if (dev_desc->block_read(dev_desc->dev,
+             ext_part_sector + dev_desc->lba_offset, 1,
+             (ulong *)buffer) != 1) {
       printf ("** Can't read partition table on %d:%d **\n",
          dev_desc->dev, ext_part_sector);
       return;
disk/part_dos.c +0 -0
@@ -172,7 +175,9 @@ static int get_partition_info_extended 

(block_dev_desc_t

disk/part_dos.c static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part

Quoted 5 lines
disk/part_dos.c +0 -1
 *dev_desc, int ext_part
    int i;
    int dos_type;
 
-   if (dev_desc->block_read (dev_desc->dev, ext_part_sector, 1, (ulong 

*)

drivers/mmc/mmc.c static int mmc_set_capacity(struct mmc *mmc, int

Quoted 25 lines
disk/part_dos.c +3 -0
 buffer) != 1) {
+   if (dev_desc->block_read(dev_desc->dev,
+             ext_part_sector + dev_desc->lba_offset, 1,
+             (ulong *)buffer) != 1) {
       printf ("** Can't read partition table on %d:%d **\n",
          dev_desc->dev, ext_part_sector);
       return -1;
drivers/mmc/mmc.c +6 -0
index b8039cd..52e8cf5 100644
@@ -531,6 +531,12 @@ static int mmc_change_freq(struct mmc *mmc)
    return 0;
 }
 
+void __weak board_mmc_geometry(struct mmc *mmc)
+{
+   mmc->block_dev.lba_fs = mmc->block_dev.lba;
+   mmc->block_dev.lba_offset = 0;
+}
+
 static int mmc_set_capacity(struct mmc *mmc, int part_num)
 {
    switch (part_num) {
@@ -556,6 +562,8 @@ static int mmc_set_capacity(struct mmc *mmc, int 

part_num)

fs/fat/fat.c static int disk_read(__u32 block, __u32 nr_blocks,

Quoted 13 lines
drivers/mmc/mmc.c +2 -0
    mmc->block_dev.lba = lldiv(mmc->capacity, mmc->read_bl_len);
 
+   board_mmc_geometry(mmc);
+
    return 0;
 }
 
fs/fat/fat.c +0 -0
index bccc3e3..46f7da6 100644
@@ -49,7 +49,8 @@ static int disk_read(__u32 block, __u32 nr_blocks, 

void *buf)

fs/fat/fat.c int fat_register_device(block_dev_desc_t *dev_desc,

Quoted 10 lines
fs/fat/fat.c +2 -1
       return -1;
 
    return cur_dev->block_read(cur_dev->dev,
-         cur_part_info.start + block, nr_blocks, buf);
+         cur_part_info.start + block + cur_dev->lba_offset,
+         nr_blocks, buf);
 }
 
 int fat_set_blk_dev(block_dev_desc_t *dev_desc, disk_partition_t *info)
@@ -97,7 +98,7 @@ int fat_register_device(block_dev_desc_t *dev_desc, 

int part_no)

fs/fat/fat_write.c static int disk_write(__u32 block, __u32 nr_blocks,

Quoted 13 lines
fs/fat/fat.c +1 -1
       }
 
       info.start = 0;
-      info.size = dev_desc->lba;
+      info.size = dev_desc->lba_fs;
       info.blksz = dev_desc->blksz;
       info.name[0] = 0;
       info.type[0] = 0;
fs/fat/fat_write.c +0 -0
index 98b88ad..7ed656e 100644
@@ -33,14 +33,15 @@ static int disk_write(__u32 block, __u32 nr_blocks, 

void *buf)

Quoted 23 lines
fs/fat/fat_write.c +4 -3
    if (!cur_dev || !cur_dev->block_write)
       return -1;
 
-   if (cur_part_info.start + block + nr_blocks >
-      cur_part_info.start + total_sector) {
+   if (cur_part_info.start + block + nr_blocks + cur_dev->lba_offset >
+      cur_part_info.start + total_sector + cur_dev->lba_offset) {
       printf("error: overflow occurs\n");
       return -1;
    }
 
    return cur_dev->block_write(cur_dev->dev,
-         cur_part_info.start + block, nr_blocks,   buf);
+         cur_part_info.start + block + cur_dev->lba_offset,
+         nr_blocks, buf);
 }
 
 /*
include/part.h +0 -0
index 8ea9b30..1f80c35 100644

include/part.h typedef struct block_dev_desc { · line 22

Quoted 2 lines
include/part.h +0 -0
@@ -21,7 +21,15 @@ typedef struct block_dev_desc {
 #ifdef CONFIG_LBA48
    unsigned char   lba48;      /* device can use 48bit addr (ATA/ATAPI 

v7) */

Quoted 21 lines
include/part.h +9 -1
 #endif
-   lbaint_t   lba;      /* number of blocks */
+   lbaint_t   lba_offset;   /*
+                * offset from which file-systems
+                * do their work
+                */
+   lbaint_t   lba_fs;      /*
+                * number of blocks available to the
+                * file-system
+                */
+   lbaint_t   lba;      /* total number of blocks-available */
    unsigned long   blksz;      /* block size */
    int      log2blksz;   /* for convenience: log2(blksz) */
    char      vendor [40+1];   /* IDE model, SCSI Vendor */
Signature · 6 lines
1.7.10.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
#47 lore raw

PATCH v2 24/24 intern: Add copy scripts and target specific helpers

In reply to Hannes Petermaier

cpy
===
copies relevant files to TFTP server and packs them into a ZIP which can be checked in for series production in SAP.

bur/scripts
===========
target specific helper scripts

---
Changes for V2: None

---
 bur-scripts/.gitignore                |    3 ++
 bur-scripts/kwb/addUSBfiles.sh        |    5 +++
 bur-scripts/kwb/dispScripts.sh        |    4 ++
 bur-scripts/kwb/setdisp_43kwb         |   32 +++++++++++++
 bur-scripts/kwb/updateUBOOTusb        |    7 +++
 bur-scripts/kwb/updateUBOOTusb.sh     |    2 +
 bur-scripts/netscript                 |    4 ++
 bur-scripts/netscript.sh              |    5 +++
 bur-scripts/netscript.txt             |    6 +++
 bur-scripts/tseries/addUSBfiles.sh    |    5 +++
 bur-scripts/tseries/updateUBOOTusb    |    4 ++
 bur-scripts/tseries/updateUBOOTusb.sh |    2 +
 cpy                                   |   79 +++++++++++++++++++++++++++++++++
 13 files changed, 158 insertions(+)
 create mode 100644 bur-scripts/.gitignore
 create mode 100755 bur-scripts/kwb/addUSBfiles.sh
 create mode 100755 bur-scripts/kwb/dispScripts.sh
 create mode 100644 bur-scripts/kwb/setdisp_43kwb
 create mode 100644 bur-scripts/kwb/updateUBOOTusb
 create mode 100755 bur-scripts/kwb/updateUBOOTusb.sh
 create mode 100644 bur-scripts/netscript
 create mode 100755 bur-scripts/netscript.sh
 create mode 100644 bur-scripts/netscript.txt
 create mode 100755 bur-scripts/tseries/addUSBfiles.sh
 create mode 100644 bur-scripts/tseries/updateUBOOTusb
 create mode 100755 bur-scripts/tseries/updateUBOOTusb.sh
 create mode 100755 cpy
bur-scripts/.gitignore new file +3 -0
new file mode 100644
index 0000000..ca70038
@@ -0,0 +1,3 @@
+addon/*
+*.img
+
bur-scripts/kwb/addUSBfiles.sh new file +5 -0
new file mode 100755
index 0000000..7555420
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "copy MLO -> bur/scripts/addon/kwb/MLO.update"
+cp ../../MLO ../addon/kwb/MLO.update
+echo "copy u-boot.img -> bur/scripts/addon/kwb/u-boot.img"
+cp ../../u-boot.img ../addon/kwb/u-boot.img.update
bur-scripts/kwb/dispScripts.sh new file +4 -0
new file mode 100755
index 0000000..55cc1d4
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -d setdisp_43kwb setdisp_43kwb.img
+cp setdisp*.img /tftpboot/tseries
+
bur-scripts/kwb/setdisp_43kwb new file +32 -0
new file mode 100644
index 0000000..210f0a8
@@ -0,0 +1,32 @@
+setenv ds1_hactive 480
+setenv ds1_vactive 272
+setenv ds1_bpp 32
+setenv ds1_hfp 8
+setenv ds1_hbp 43
+setenv ds1_hsw 2
+setenv ds1_vfp 4
+setenv ds1_vbp 2
+setenv ds1_vsw 10
+setenv ds1_pxlclkdiv 21
+setenv ds1_pol 0x2300000
+setenv ds1_pupdelay 10
+setenv ds1_tondelay 10
+setenv ds1_pwr 0x00000045
+setenv ds1_bright_drv 0
+setenv ds1_bright 50
+
+setenv br_blversion V2.0
+setenv br_orderno "not programmed"
+setenv br_serial "not programmed"
+setenv br_mac1
+setenv br_mac2
+
+setenv dnsip
+setenv gatewayip
+setenv ipaddr
+setenv serverip
+setenv fileaddr
+setenv filesize
+setenv bootfile
+
+saveenv
bur-scripts/kwb/updateUBOOTusb new file +7 -0
new file mode 100644
index 0000000..9edaa26
@@ -0,0 +1,7 @@
+fatload usb 0 0x80100000 bur-ppt-ts30.dtb
+fatload usb 0 0x80200000 zImage
+fatload usb 0 0x80A00000 rootfs.cpio.uboot
+setenv bootargs "consoleblank=0 quiet lpj=1191936 panic=2 console=ttyO0,115200n8 burbootmode=pme"
+setenv bootcmd "env default -a; setenv bootcmd run netboot; saveenv; reset"
+saveenv
+bootz 0x80200000 0x80A00000 0x80100000;
bur-scripts/kwb/updateUBOOTusb.sh new file +2 -0
new file mode 100755
index 0000000..1fe3b64
@@ -0,0 +1,2 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -n "ubootUpdateUSB" -d updateUBOOTusb updateUBOOTusb.img
bur-scripts/netscript new file +4 -0
new file mode 100644
index 0000000..7bfa8dd
@@ -0,0 +1,4 @@
+tftp 0x80000000 setdisp_43kwb.img && source 0x80000000
+reset
+
+
bur-scripts/netscript.sh new file +5 -0
new file mode 100755
index 0000000..33cbc18
@@ -0,0 +1,5 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -d setdisp_common -d netscript.txt netscript.img
+cp netscript.img /tftpboot/tseries/
+
+
bur-scripts/netscript.txt new file +6 -0
new file mode 100644
index 0000000..537f4e2
@@ -0,0 +1,6 @@
+tftp 0x80100000 MLO && mmc write 0x80100000 100 100
+tftp 0x80100000 u-boot.img && mmc write 0x80100000 300 400
+setenv bootcmd "run netboot"
+saveenv
+reset
+
bur-scripts/tseries/addUSBfiles.sh new file +5 -0
new file mode 100755
index 0000000..ec13b7e
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "copy MLO -> bur/scripts/addon/tseries/MLO.update"
+cp ../../MLO ../addon/tseries/MLO.update
+echo "copy u-boot.img -> bur/scripts/addon/tseries/u-boot.img"
+cp ../../u-boot.img ../addon/tseries/u-boot.img.update
bur-scripts/tseries/updateUBOOTusb new file +4 -0
new file mode 100644
index 0000000..17364ce
@@ -0,0 +1,4 @@
+fatload usb 0 ${dtbaddr} bur-ppt-ts30.dtb
+fatload usb 0 ${loadaddr} zImage
+fatload usb 0 ${ramaddr} rootfs.cpio.uboot
+run mmcroot0; bootz ${loadaddr} ${ramaddr} ${dtbaddr};
bur-scripts/tseries/updateUBOOTusb.sh new file +2 -0
new file mode 100755
index 0000000..1fe3b64
@@ -0,0 +1,2 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -n "ubootUpdateUSB" -d updateUBOOTusb updateUBOOTusb.img
cpy new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#48 lore raw

PATCH v2 24/24 intern: Add copy scripts and target specific helpers

Hi all,

please ignore this "internal" patch.
This is was an accident.

best regards,
Hannes

"U-Boot" <[email protected]> schrieb am 03.02.2015 13:22:46:

Quoted 4 lines

From: Hannes Petermaier <[email protected]>
To: u-boot at lists.denx.de
Date: 03.02.2015 13:27
Subject: [U-Boot] [PATCH v2 24/24] intern: Add copy scripts and target

specific helpers

Quoted 5 lines

Sent by: "U-Boot" <[email protected]>

cpy
===
copies relevant files to TFTP server and packs them into a ZIP which can

be

Quoted 10 lines

checked in for series production in SAP.

bur/scripts
===========
target specific helper scripts

---
Changes for V2: None

Quoted 14 lines
---
 bur-scripts/.gitignore                |    3 ++
 bur-scripts/kwb/addUSBfiles.sh        |    5 +++
 bur-scripts/kwb/dispScripts.sh        |    4 ++
 bur-scripts/kwb/setdisp_43kwb         |   32 +++++++++++++
 bur-scripts/kwb/updateUBOOTusb        |    7 +++
 bur-scripts/kwb/updateUBOOTusb.sh     |    2 +
 bur-scripts/netscript                 |    4 ++
 bur-scripts/netscript.sh              |    5 +++
 bur-scripts/netscript.txt             |    6 +++
 bur-scripts/tseries/addUSBfiles.sh    |    5 +++
 bur-scripts/tseries/updateUBOOTusb    |    4 ++
 bur-scripts/tseries/updateUBOOTusb.sh |    2 +
 cpy                                   |   79 

+++++++++++++++++++++++++++++++++

Review

Quoted 25 lines
 13 files changed, 158 insertions(+)
 create mode 100644 bur-scripts/.gitignore
 create mode 100755 bur-scripts/kwb/addUSBfiles.sh
 create mode 100755 bur-scripts/kwb/dispScripts.sh
 create mode 100644 bur-scripts/kwb/setdisp_43kwb
 create mode 100644 bur-scripts/kwb/updateUBOOTusb
 create mode 100755 bur-scripts/kwb/updateUBOOTusb.sh
 create mode 100644 bur-scripts/netscript
 create mode 100755 bur-scripts/netscript.sh
 create mode 100644 bur-scripts/netscript.txt
 create mode 100755 bur-scripts/tseries/addUSBfiles.sh
 create mode 100644 bur-scripts/tseries/updateUBOOTusb
 create mode 100755 bur-scripts/tseries/updateUBOOTusb.sh
 create mode 100755 cpy
bur-scripts/.gitignore new file +3 -0
new file mode 100644
index 0000000..ca70038
@@ -0,0 +1,3 @@
+addon/*
+*.img
+
(quoted diff) +0 -0

b/bur-scripts/kwb/addUSBfiles.sh

Review

Quoted 11 lines

new file mode 100755
index 0000000..7555420

bur-scripts/kwb/addUSBfiles.sh new file +5 -0
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "copy MLO -> bur/scripts/addon/kwb/MLO.update"
+cp ../../MLO ../addon/kwb/MLO.update
+echo "copy u-boot.img -> bur/scripts/addon/kwb/u-boot.img"
+cp ../../u-boot.img ../addon/kwb/u-boot.img.update
(quoted diff) +0 -0

b/bur-scripts/kwb/dispScripts.sh

Review

Quoted 10 lines

new file mode 100755
index 0000000..55cc1d4

bur-scripts/kwb/dispScripts.sh new file +4 -0
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -d setdisp_43kwb setdisp_43kwb.img
+cp setdisp*.img /tftpboot/tseries
+
(quoted diff) +0 -0

b/bur-scripts/kwb/setdisp_43kwb

Review

Quoted 38 lines

new file mode 100644
index 0000000..210f0a8

bur-scripts/kwb/setdisp_43kwb new file +32 -0
@@ -0,0 +1,32 @@
+setenv ds1_hactive 480
+setenv ds1_vactive 272
+setenv ds1_bpp 32
+setenv ds1_hfp 8
+setenv ds1_hbp 43
+setenv ds1_hsw 2
+setenv ds1_vfp 4
+setenv ds1_vbp 2
+setenv ds1_vsw 10
+setenv ds1_pxlclkdiv 21
+setenv ds1_pol 0x2300000
+setenv ds1_pupdelay 10
+setenv ds1_tondelay 10
+setenv ds1_pwr 0x00000045
+setenv ds1_bright_drv 0
+setenv ds1_bright 50
+
+setenv br_blversion V2.0
+setenv br_orderno "not programmed"
+setenv br_serial "not programmed"
+setenv br_mac1
+setenv br_mac2
+
+setenv dnsip
+setenv gatewayip
+setenv ipaddr
+setenv serverip
+setenv fileaddr
+setenv filesize
+setenv bootfile
+
+saveenv
(quoted diff) +0 -0

b/bur-scripts/kwb/updateUBOOTusb

bur-scripts/kwb/updateUBOOTusb line 4

Quoted 9 lines

new file mode 100644
index 0000000..9edaa26

bur-scripts/kwb/updateUBOOTusb new file +4 -0
@@ -0,0 +1,7 @@
+fatload usb 0 0x80100000 bur-ppt-ts30.dtb
+fatload usb 0 0x80200000 zImage
+fatload usb 0 0x80A00000 rootfs.cpio.uboot
+setenv bootargs "consoleblank=0 quiet lpj=1191936 panic=2 

console=ttyO0,

Quoted 2 lines

115200n8 burbootmode=pme"
+setenv bootcmd "env default -a; setenv bootcmd run netboot; saveenv;

reset"

Review

Quoted 3 lines
bur-scripts/kwb/updateUBOOTusb new file +2 -0
+saveenv
+bootz 0x80200000 0x80A00000 0x80100000;
(quoted diff) +0 -0

b/bur-scripts/kwb/updateUBOOTusb.sh

Quoted 24 lines

new file mode 100755
index 0000000..1fe3b64

bur-scripts/kwb/updateUBOOTusb.sh new file +2 -0
@@ -0,0 +1,2 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -n "ubootUpdateUSB" -d updateUBOOTusb 

updateUBOOTusb.img

bur-scripts/netscript new file +4 -0
new file mode 100644
index 0000000..7bfa8dd
@@ -0,0 +1,4 @@
+tftp 0x80000000 setdisp_43kwb.img && source 0x80000000
+reset
+
+
bur-scripts/netscript.sh new file +0 -0
new file mode 100755
index 0000000..33cbc18

bur-scripts/netscript.sh line 2

Quoted 2 lines
bur-scripts/netscript.sh new file +2 -0
@@ -0,0 +1,5 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -d setdisp_common -d netscript.txt 

netscript.img

Review

Quoted 16 lines
bur-scripts/netscript.sh new file +3 -0
+cp netscript.img /tftpboot/tseries/
+
+
bur-scripts/netscript.txt new file +6 -0
new file mode 100644
index 0000000..537f4e2
@@ -0,0 +1,6 @@
+tftp 0x80100000 MLO && mmc write 0x80100000 100 100
+tftp 0x80100000 u-boot.img && mmc write 0x80100000 300 400
+setenv bootcmd "run netboot"
+saveenv
+reset
+
(quoted diff) +0 -0

b/bur-scripts/tseries/addUSBfiles.sh

Review

Quoted 11 lines

new file mode 100755
index 0000000..ec13b7e

bur-scripts/tseries/addUSBfiles.sh new file +5 -0
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "copy MLO -> bur/scripts/addon/tseries/MLO.update"
+cp ../../MLO ../addon/tseries/MLO.update
+echo "copy u-boot.img -> bur/scripts/addon/tseries/u-boot.img"
+cp ../../u-boot.img ../addon/tseries/u-boot.img.update
(quoted diff) +0 -0

b/bur-scripts/tseries/updateUBOOTusb

Review

Quoted 10 lines

new file mode 100644
index 0000000..17364ce

bur-scripts/tseries/updateUBOOTusb new file +4 -0
@@ -0,0 +1,4 @@
+fatload usb 0 ${dtbaddr} bur-ppt-ts30.dtb
+fatload usb 0 ${loadaddr} zImage
+fatload usb 0 ${ramaddr} rootfs.cpio.uboot
+run mmcroot0; bootz ${loadaddr} ${ramaddr} ${dtbaddr};
(quoted diff) +0 -0

b/bur-scripts/tseries/

Quoted 36 lines

updateUBOOTusb.sh
new file mode 100755
index 0000000..1fe3b64

bur-scripts/tseries/updateUBOOTusb.sh new file +2 -0
@@ -0,0 +1,2 @@
+#!/bin/sh
+mkimage -A ARM -T script -C none -n "ubootUpdateUSB" -d updateUBOOTusb 

updateUBOOTusb.img

cpy new file +21 -0
new file mode 100755
index 0000000..735e6cc
@@ -0,0 +1,79 @@
+#!/bin/bash
+SRCDIR=.
+DESTDIR=~/work/exchange/u-boot-current/
+TFTPDIR=/tftpboot/tseries/
+
+COMMITID=`git describe --dirty | cut -d "-" -f 4-`
+if [ "$COMMITID" == "" ]; then
+   COMMITID=`git describe --dirty | cut -d "-" -f 3-`
+fi
+
+BRANCH=`git branch | grep "*" | cut -d " " -f 2`
+DATUM=`date +%Y%m%d`
+
+if [ -z $1 ]; then
+  echo "require target argument!"
+  exit 1
+fi
+
+if [ -d ./bur-scripts/$1 ]; then
+   pushd ./bur-scripts/$1 >/dev/null
+   echo "generating BuR U-Boot ($1) scripts ..."

cpy line 31

Quoted 10 lines
cpy new file +10 -0
+   for i in `ls *.sh`; do
+       echo "running $i .."
+       ./$i 2>&1 >/dev/null
+   done
+   popd >/dev/null
+else
+   echo "no target specific scripts ($1)"
+fi
+
+FLIST='MLO.byteswap MLO u-boot.img spl/u-boot-spl.bin bur-scripts/*.img 

bur-

Quoted 56 lines

scripts/*.bin'

cpy new file +48 -0
+FLIST=`echo $FLIST " bur-scripts/addon/"$1"/*"`
+
+addScriptFiles() {
+   SCRIPTS=`ls bur-scripts/$1/*.img  bur-scripts/$1/*.bin 2>/dev/null`
+   for i in $SCRIPTS; do
+      FLIST="$FLIST $i"
+   done
+}
+
+procFile() {
+   if [ -f $SRCDIR/$1 ]; then
+      cp $SRCDIR/$1 $DST
+   elif [ -f $DST/$1 ]; then
+      rm $DST/$1
+   fi
+}
+
+addScriptFiles $1
+
+# Files in Ausgabeordner synchronisieren
+DST=$DESTDIR
+for i in $FLIST; do
+   procFile $i
+done
+
+# Files in Ausgabeordner synchronisieren
+DST=$TFTPDIR
+for i in $FLIST; do
+   procFile $i
+done
+
+# ZIP zur Verteilung in Ausgabeordner erstellen
+[ -f $DESTDIR/u-boot-$1.zip ] && rm $DESTDIR/u-boot-$1.zip
+echo "U-Boot Version: $COMMITID" > readme-uboot-$1.txt
+zip -j -D $DESTDIR/u-boot-$1.zip $FLIST readme-uboot-$1.txt
+rm readme-uboot-$1.txt
+
+if [ "$1" == "tseries" ]; then
+   ZIPNAME="6PPT30_UBOOT_V0000"_"$DATUM.zip"
+   echo "creating $ZIPNAME for SAP-Checkin ..."
+   [ -r $DESTDIR/$ZIPNAME ] && rm $DESTDIR/$ZIPNAME
+   zip -j -D -q $DESTDIR/$ZIPNAME $DESTDIR/u-boot-$1.zip
+elif [ "$1" == "kwb" ]; then
+   ZIPNAME="KWB_UBOOT_V0000"_"$DATUM.zip"
+   echo "creating $ZIPNAME for SAP-Checkin ..."
+   [ -r $DESTDIR/$ZIPNAME ] && rm $DESTDIR/$ZIPNAME
+   zip -j -D -q $DESTDIR/$ZIPNAME $DESTDIR/u-boot-$1.zip
+fi
Signature · 6 lines
1.7.10.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
#49 lore raw

PATCH v2 1/24 drivers/video/am335x-fb: Add possibility to wait for stable power/picture

In reply to Hannes Petermaier
Quoted 11 lines · Hannes Petermaier

Often on boards exists a circuit which switches power on/off to LCD display. Due to the need of limiting the in-rush current the output voltage from this circuit rises "slowly", so it is necessary to wait a bit (VCC ramp up time) before starting output on LCD-pins.
This time is specified in <n> ms within the panel-settings, called "pup_delay"

Further some LCDs need a couple of frames to stabilize the image on it. We have now the possibility to wait some time after starting output on LCD. This time is also specified in <n> ms within panel-settings, called "pon_delay"

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/c7c75868/attachment.sig>