diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-08-22 16:16:26 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-08-22 16:16:26 +0200 |
commit | 2a1325206da5381292c2b268e248702c523cc927 (patch) | |
tree | 45d684a865eab51b0711d07782b1d8e8ae9d9932 /common/fdt_decode.c | |
parent | 2f2f858faddd3cce54f7c64bc8fc8b596c1ddfaf (diff) |
Initial Toradex Colibri T20 L4T R15 support.T20_LinuxImageV2.0Alpha1_20120808
Diffstat (limited to 'common/fdt_decode.c')
-rw-r--r-- | common/fdt_decode.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/common/fdt_decode.c b/common/fdt_decode.c index 4f1eb59b2ca..afa070f2d6b 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) |