summaryrefslogtreecommitdiff
path: root/common/fdt_decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/fdt_decode.c')
-rw-r--r--common/fdt_decode.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/common/fdt_decode.c b/common/fdt_decode.c
index 4f1eb59b2c..afa070f2d6 100644
--- a/common/fdt_decode.c
+++ b/common/fdt_decode.c
@@ -28,6 +28,10 @@
/* we need a generic GPIO interface here */
#include <asm/arch/gpio.h>
+#include <asm/sizes.h>
+#include <asm/global_data.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* Here are the type we know about. One day we might allow drivers to
* register. For now we just put them here. The COMPAT macro allows us to
@@ -533,8 +537,14 @@ int fdt_decode_lcd(const void *blob, struct fdt_lcd *config)
config->width == -1 || config->height == -1 ||
!config->pwfm || !config->disp)
return -FDT_ERR_MISSING;
- config->frame_buffer = get_addr(blob, node, "frame-buffer");
-
+ if(gd->ram_size == SZ_256M)
+ {
+ config->frame_buffer = get_addr(blob, node, "frame-buffer_256");
+ }
+ else
+ {
+ config->frame_buffer = get_addr(blob, node, "frame-buffer_512");
+ }
err |= fdt_decode_gpio(blob, node, "backlight-enable",
&config->backlight_en);
err |= fdt_decode_gpio(blob, node, "lvds-shutdown",
@@ -708,6 +718,11 @@ int fdt_decode_nand(const void *blob, int node, struct fdt_nand *config)
if (err < 0)
return err;
+ err = get_int_array(blob, node, "nv-partitions", config->nv_partitions,
+ FDT_NAND_PARTOFFSET_COUNT);
+ if (err < 0)
+ return err;
+
/* Now look up the controller and decode that */
node = lookup_phandle(blob, node, "controller");
if (node < 0)