diff options
author | Hannes Petermaier <oe5hpm@oevsv.at> | 2015-04-08 07:38:34 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-04-23 08:52:26 -0400 |
commit | d79c138c75ba7c4920a4a505d7f7888d9cd7ad89 (patch) | |
tree | 6912b25db965f5ab5038c6f57d267223ea23d327 /board/BuR/common | |
parent | 47c14227b85eb93fedfa59497326ae0bba0fb407 (diff) |
board/BuR/tseries: reactivate NAND-board
The NAND-version has been become a bit orphan.
Now we need to reactivate it, so bring necessary things:
- loading devicetree
- switch control signal to correct pins
- setup pinmux
- default-environment
up to date.
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Diffstat (limited to 'board/BuR/common')
-rw-r--r-- | board/BuR/common/common.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index e85064a6774..23a98e4fdff 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -33,6 +33,7 @@ #endif #include "bur_common.h" #include "../../../drivers/video/am335x-fb.h" +#include <nand.h> static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; @@ -159,17 +160,22 @@ int load_lcdtiming(struct am335x_lcdpanel *panel) #ifdef CONFIG_USE_FDT static int load_devicetree(void) { - char *dtbname = getenv("dtb"); - char *dtbdev = getenv("dtbdev"); - char *dtppart = getenv("dtbpart"); - u32 dtbaddr = getenv_ulong("dtbaddr", 16, 0UL); int rc; loff_t dtbsize; + u32 dtbaddr = getenv_ulong("dtbaddr", 16, 0UL); if (dtbaddr == 0) { printf("%s: don't have a valid <dtbaddr> in env!\n", __func__); return -1; } +#ifdef CONFIG_NAND + dtbsize = 0x20000; + rc = nand_read_skip_bad(&nand_info[0], 0x40000, (size_t *)&dtbsize, + NULL, 0x20000, (u_char *)dtbaddr); +#else + char *dtbname = getenv("dtb"); + char *dtbdev = getenv("dtbdev"); + char *dtppart = getenv("dtbpart"); if (!dtbdev || !dtbdev || !dtbname) { printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__); return -1; @@ -180,6 +186,7 @@ static int load_devicetree(void) return -1; } rc = fs_read(dtbname, (u32)dtbaddr, 0, 0, &dtbsize); +#endif if (rc == 0) { gd->fdt_blob = (void *)dtbaddr; gd->fdt_size = dtbsize; |