All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] nios2: Add support for EPCS16 and EPCS64 configuration devices.
@ 2010-03-21 19:39 Scott McNutt
  0 siblings, 0 replies; only message in thread
From: Scott McNutt @ 2010-03-21 19:39 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
---
 cpu/nios2/epcs.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/cpu/nios2/epcs.c b/cpu/nios2/epcs.c
index 483b249..a2e3fe3 100644
--- a/cpu/nios2/epcs.c
+++ b/cpu/nios2/epcs.c
@@ -207,6 +207,8 @@ static void epcs_status_wr (unsigned char status)
 static struct epcs_devinfo_t devinfo[] = {
 	{ "EPCS1 ", 0x10, 17, 4, 15, 8, 0x0c },
 	{ "EPCS4 ", 0x12, 19, 8, 16, 8, 0x1c },
+	{ "EPCS16", 0x14, 21, 32, 16, 8, 0x1c },
+	{ "EPCS64", 0x16, 23,128, 16, 8, 0x1c },
 	{ 0, 0, 0, 0, 0, 0 }
 };
 
@@ -501,15 +503,17 @@ void do_epcs_info (struct epcs_devinfo_t *dev, int argc, char *argv[])
 	}
 
 	/* Sector info */
-	for (i=0; i<dev->num_sects; i++) {
+	for (i=0; (i < dev->num_sects) && (argc > 1); i++) {
 		erased = epcs_sect_erased (i, &tmp, dev);
-		printf ("     %d: %06x ",
+		if ((i & 0x03) == 0) printf ("\n");
+		printf ("%4d: %07x ",
 			i, i*(1<<dev->sz_sect) );
 		if (erased)
-			printf ("erased\n");
+			printf ("E ");
 		else
-			printf ("data @ 0x%06x\n", tmp);
+			printf ("  ");
 	}
+	printf ("\n");
 
 	return;
 }
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-21 19:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-21 19:39 [U-Boot] [PATCH] nios2: Add support for EPCS16 and EPCS64 configuration devices Scott McNutt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.