Index: apps/debug_menu.c =================================================================== --- apps/debug_menu.c (revision 24174) +++ apps/debug_menu.c (working copy) @@ -116,6 +116,7 @@ #ifdef IPOD_NANO2G #include "pmu-target.h" +#include "nand-target.h" #endif #ifdef HAVE_USBSTACK @@ -2030,6 +2031,36 @@ } #endif /* !SIMULATOR */ +#ifdef IPOD_NANO2G +static int nandinfo_callback(int btn, struct gui_synclist *lists) +{ + const struct nand_device_info_type *ndi = NULL; + int i; + + simplelist_set_line_count(0); + (void)btn; (void)lists; + for(i=0;i<4;i++) + { + ndi = nand_get_device_type(i); + if(ndi == NULL) + continue; + simplelist_addline(SIMPLELIST_ADD_LINE, "Bank %d",i); + simplelist_addline(SIMPLELIST_ADD_LINE, " Type: 0x%x",ndi->id); + } + return btn; +} + +static bool dbg_nand_info(void) +{ + struct simplelist_info info; + simplelist_info_init(&info, "NAND Info", 8, NULL); + info.action_callback = nandinfo_callback; + info.hide_selection = true; + info.scroll_all = true; + return simplelist_show_list(&info); +} +#endif + #ifdef HAVE_DIRCACHE static int dircache_callback(int btn, struct gui_synclist *lists) { @@ -2604,6 +2635,9 @@ #ifndef SIMULATOR { "View partitions", dbg_partitions }, #endif +#ifdef IPOD_NANO2G + { "View NAND info", dbg_nand_info }, +#endif #ifndef SIMULATOR { "View disk info", dbg_disk_info }, #if (CONFIG_STORAGE & STORAGE_ATA)