diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 13f23fd..e85064a 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -39,7 +39,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_USE_FDT
-  #define FDTPROP(a, b, c) fdt_getprop_u32_default((void *)a, b, c, ~0UL)
+  #define FDTPROP(b, c) fdt_getprop_u32_default(gd->fdt_blob, b, c, ~0UL)
   #define PATHTIM "/panel/display-timings/default"
   #define PATHINF "/panel/panel-info"
 #endif
@@ -50,51 +50,50 @@
 {
 	struct am335x_lcdpanel pnltmp;
 #ifdef CONFIG_USE_FDT
-	u32 dtbaddr = getenv_ulong("dtbaddr", 16, ~0UL);
 	u32 dtbprop;
 
-	if (dtbaddr == ~0UL) {
-		puts("load_lcdtiming: failed to get 'dtbaddr' from env!\n");
+	if (gd->fdt_blob == NULL) {
+		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
 		return -1;
 	}
 	memcpy(&pnltmp, (void *)panel, sizeof(struct am335x_lcdpanel));
 
-	pnltmp.hactive = FDTPROP(dtbaddr, PATHTIM, "hactive");
-	pnltmp.vactive = FDTPROP(dtbaddr, PATHTIM, "vactive");
-	pnltmp.bpp = FDTPROP(dtbaddr, PATHINF, "bpp");
-	pnltmp.hfp = FDTPROP(dtbaddr, PATHTIM, "hfront-porch");
-	pnltmp.hbp = FDTPROP(dtbaddr, PATHTIM, "hback-porch");
-	pnltmp.hsw = FDTPROP(dtbaddr, PATHTIM, "hsync-len");
-	pnltmp.vfp = FDTPROP(dtbaddr, PATHTIM, "vfront-porch");
-	pnltmp.vbp = FDTPROP(dtbaddr, PATHTIM, "vback-porch");
-	pnltmp.vsw = FDTPROP(dtbaddr, PATHTIM, "vsync-len");
-	pnltmp.pup_delay = FDTPROP(dtbaddr, PATHTIM, "pupdelay");
-	pnltmp.pon_delay = FDTPROP(dtbaddr, PATHTIM, "pondelay");
+	pnltmp.hactive = FDTPROP(PATHTIM, "hactive");
+	pnltmp.vactive = FDTPROP(PATHTIM, "vactive");
+	pnltmp.bpp = FDTPROP(PATHINF, "bpp");
+	pnltmp.hfp = FDTPROP(PATHTIM, "hfront-porch");
+	pnltmp.hbp = FDTPROP(PATHTIM, "hback-porch");
+	pnltmp.hsw = FDTPROP(PATHTIM, "hsync-len");
+	pnltmp.vfp = FDTPROP(PATHTIM, "vfront-porch");
+	pnltmp.vbp = FDTPROP(PATHTIM, "vback-porch");
+	pnltmp.vsw = FDTPROP(PATHTIM, "vsync-len");
+	pnltmp.pup_delay = FDTPROP(PATHTIM, "pupdelay");
+	pnltmp.pon_delay = FDTPROP(PATHTIM, "pondelay");
 
 	/* calc. proper clk-divisor */
-	dtbprop = FDTPROP(dtbaddr, PATHTIM, "clock-frequency");
+	dtbprop = FDTPROP(PATHTIM, "clock-frequency");
 	if (dtbprop != ~0UL)
 		pnltmp.pxl_clk_div = 192000000 / dtbprop;
 	else
 		pnltmp.pxl_clk_div = ~0UL;
 
 	/* check polarity of control-signals */
-	dtbprop = FDTPROP(dtbaddr, PATHTIM, "hsync-active");
+	dtbprop = FDTPROP(PATHTIM, "hsync-active");
 	if (dtbprop == 0)
 		pnltmp.pol |= HSYNC_INVERT;
-	dtbprop = FDTPROP(dtbaddr, PATHTIM, "vsync-active");
+	dtbprop = FDTPROP(PATHTIM, "vsync-active");
 	if (dtbprop == 0)
 		pnltmp.pol |= VSYNC_INVERT;
-	dtbprop = FDTPROP(dtbaddr, PATHINF, "sync-ctrl");
+	dtbprop = FDTPROP(PATHINF, "sync-ctrl");
 	if (dtbprop == 1)
 		pnltmp.pol |= HSVS_CONTROL;
-	dtbprop = FDTPROP(dtbaddr, PATHINF, "sync-edge");
+	dtbprop = FDTPROP(PATHINF, "sync-edge");
 	if (dtbprop == 1)
 		pnltmp.pol |= HSVS_RISEFALL;
-	dtbprop = FDTPROP(dtbaddr, PATHTIM, "pixelclk-active");
+	dtbprop = FDTPROP(PATHTIM, "pixelclk-active");
 	if (dtbprop == 0)
 		pnltmp.pol |= PXCLK_INVERT;
-	dtbprop = FDTPROP(dtbaddr, PATHTIM, "de-active");
+	dtbprop = FDTPROP(PATHTIM, "de-active");
 	if (dtbprop == 0)
 		pnltmp.pol |= DE_INVERT;
 #else
@@ -163,11 +162,16 @@
 	char *dtbname = getenv("dtb");
 	char *dtbdev = getenv("dtbdev");
 	char *dtppart = getenv("dtbpart");
-	u32 dtbaddr = getenv_ulong("dtbaddr", 16, ~0UL);
+	u32 dtbaddr = getenv_ulong("dtbaddr", 16, 0UL);
+	int rc;
 	loff_t dtbsize;
 
-	if (!dtbdev || !dtbdev) {
-		puts("load_devicetree: <dtbdev>/<dtbpart> missing.\n");
+	if (dtbaddr == 0) {
+		printf("%s: don't have a valid <dtbaddr> in env!\n", __func__);
+		return -1;
+	}
+	if (!dtbdev || !dtbdev || !dtbname) {
+		printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__);
 		return -1;
 	}
 
@@ -175,18 +179,16 @@
 		puts("load_devicetree: set_blk_dev failed.\n");
 		return -1;
 	}
-	if (dtbname && dtbaddr != ~0UL) {
-		if (fs_read(dtbname, dtbaddr, 0, 0, &dtbsize) == 0) {
-			gd->fdt_blob = (void *)dtbaddr;
-			gd->fdt_size = dtbsize;
-			debug("loaded %d bytes of dtb onto 0x%08x\n",
-			      (u32)dtbsize, dtbaddr);
-			return dtbsize;
-		}
-		puts("load_devicetree: load dtb failed,file does not exist!\n");
+	rc = fs_read(dtbname, (u32)dtbaddr, 0, 0, &dtbsize);
+	if (rc == 0) {
+		gd->fdt_blob = (void *)dtbaddr;
+		gd->fdt_size = dtbsize;
+		debug("loaded %d bytes of dtb onto 0x%08x\n",
+		      (u32)dtbsize, (u32)gd->fdt_blob);
+		return dtbsize;
 	}
 
-	puts("load_devicetree: <dtb>/<dtbaddr> missing!\n");
+	printf("%s: load dtb failed!\n", __func__);
 	return -1;
 }
 
@@ -196,26 +198,25 @@
 	char enet[16];
 	const char *mac;
 	const char *path;
-	u32 dtbaddr = getenv_ulong("dtbaddr", 16, ~0UL);
 
-	if (dtbaddr == ~0UL) {
-		puts("dtbmacaddr: failed to get 'dtbaddr' from env!\n");
+	if (gd->fdt_blob == NULL) {
+		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
 		return NULL;
 	}
 
-	node = fdt_path_offset((void *)dtbaddr, "/aliases");
+	node = fdt_path_offset(gd->fdt_blob, "/aliases");
 	if (node < 0)
 		return NULL;
 
 	sprintf(enet, "ethernet%d", ifno);
-	path = fdt_getprop((void *)dtbaddr, node, enet, NULL);
+	path = fdt_getprop(gd->fdt_blob, node, enet, NULL);
 	if (!path) {
 		printf("no alias for %s\n", enet);
 		return NULL;
 	}
 
-	node = fdt_path_offset((void *)dtbaddr, path);
-	mac = fdt_getprop((void *)dtbaddr, node, "mac-address", &len);
+	node = fdt_path_offset(gd->fdt_blob, path);
+	mac = fdt_getprop(gd->fdt_blob, node, "mac-address", &len);
 	if (mac && is_valid_ethaddr((u8 *)mac))
 		return mac;
 
@@ -226,15 +227,14 @@
 				       char *name,
 				       char *suffix)
 {
-	u32 dtbaddr = getenv_ulong("dtbaddr", 16, ~0UL);
 	char buf[32] = { 0 };
 	const char *nodep = buf;
 	char *mac = 0;
 	int nodeoffset;
 	int len;
 
-	if (dtbaddr == ~0UL) {
-		puts("br_summaryscreen: failed to get 'dtbaddr' from env!\n");
+	if (gd->fdt_blob == NULL) {
+		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
 		return;
 	}
 
@@ -247,13 +247,13 @@
 		if (mac)
 			sprintf(buf, "%pM", mac);
 	} else {
-		nodeoffset = fdt_path_offset((void *)dtbaddr,
+		nodeoffset = fdt_path_offset(gd->fdt_blob,
 					     "/factory-settings");
 		if (nodeoffset < 0) {
 			puts("no 'factory-settings' in dtb!\n");
 			return;
 		}
-		nodep = fdt_getprop((void *)dtbaddr, nodeoffset, name, &len);
+		nodep = fdt_getprop(gd->fdt_blob, nodeoffset, name, &len);
 	}
 	if (nodep && strlen(nodep) > 1)
 		lcd_printf("%s %s %s", prefix, nodep, suffix);
@@ -318,13 +318,11 @@
 {
 	u32 pin, swval, i;
 #ifdef CONFIG_USE_FDT
-	u32 dtbaddr = getenv_ulong("dtbaddr", 16, ~0UL);
-
-	if (dtbaddr == ~0UL) {
-		puts("lcdpower: failed to get 'dtbaddr' from env!\n");
+	if (gd->fdt_blob == NULL) {
+		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
 		return;
 	}
-	pin = FDTPROP(dtbaddr, PATHINF, "pwrpin");
+	pin = FDTPROP(PATHINF, "pwrpin");
 #else
 	pin = getenv_ulong("ds1_pwr", 16, ~0UL);
 #endif
@@ -385,15 +383,13 @@
 void lcd_enable(void)
 {
 #ifdef CONFIG_USE_FDT
-	u32 dtbaddr = getenv_ulong("dtbaddr", 16, ~0UL);
-
-	if (dtbaddr == ~0UL) {
-		puts("lcdpower: failed to get 'dtbaddr' from env!\n");
+	if (gd->fdt_blob == NULL) {
+		printf("%s: don't have a valid gd->fdt_blob!\n", __func__);
 		return;
 	}
-	unsigned int driver = FDTPROP(dtbaddr, PATHINF, "brightdrv");
-	unsigned int bright = FDTPROP(dtbaddr, PATHINF, "brightdef");
-	unsigned int pwmfrq = FDTPROP(dtbaddr, PATHINF, "brightfdim");
+	unsigned int driver = FDTPROP(PATHINF, "brightdrv");
+	unsigned int bright = FDTPROP(PATHINF, "brightdef");
+	unsigned int pwmfrq = FDTPROP(PATHINF, "brightfdim");
 #else
 	unsigned int driver = getenv_ulong("ds1_bright_drv", 16, 0UL);
 	unsigned int bright = getenv_ulong("ds1_bright_def", 10, 50);
