summaryrefslogtreecommitdiff
path: root/board/freescale/common/epdc_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/common/epdc_setup.c')
-rw-r--r--board/freescale/common/epdc_setup.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/board/freescale/common/epdc_setup.c b/board/freescale/common/epdc_setup.c
index 30622b8..8ca3595 100644
--- a/board/freescale/common/epdc_setup.c
+++ b/board/freescale/common/epdc_setup.c
@@ -22,6 +22,42 @@ __weak int check_mmc_autodetect(void)
return 0;
}
+int board_setup_waveform_file(ulong waveform_buf)
+{
+ char *fs_argv[5];
+ char addr[17];
+ ulong file_len, mmc_dev;
+
+ if (!check_mmc_autodetect())
+ mmc_dev = getenv_ulong("mmcdev", 10, 0);
+ else
+ mmc_dev = mmc_get_env_devno();
+
+ sprintf(addr, "%lx", waveform_buf);
+
+ fs_argv[0] = "fatload";
+ fs_argv[1] = "mmc";
+ fs_argv[2] = simple_itoa(mmc_dev);
+ fs_argv[3] = addr;
+ fs_argv[4] = getenv("epdc_waveform");
+
+ if (!fs_argv[4])
+ fs_argv[4] = "epdc_splash.bin";
+
+ if (do_fat_fsload(NULL, 0, 5, fs_argv)) {
+ printf("File %s not found on MMC Device %lu!\n", fs_argv[4], mmc_dev);
+ return -1;
+ }
+
+ file_len = getenv_hex("filesize", 0);
+ if (!file_len)
+ return -1;
+
+ flush_cache(waveform_buf, file_len);
+
+ return 0;
+}
+
int board_setup_logo_file(void *display_buf)
{
int logo_width, logo_height;