changeset 96:57b8dbb029c2

fc-loadtool: GTA0x flash support
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 01 Sep 2013 04:18:32 +0000
parents 336f5cc96810
children a2e793f6b8c4
files loadtools/Makefile loadtools/ltflash.c loadtools/scripts/gta02.config
diffstat 3 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/loadtools/Makefile	Sun Sep 01 03:42:11 2013 +0000
+++ b/loadtools/Makefile	Sun Sep 01 04:18:32 2013 +0000
@@ -2,7 +2,8 @@
 CFLAGS=	-O2
 PROGS=	fc-iram fc-loadtool fc-xram
 LASRC=	../target-utils/loadagent
-SCRIPTS=scripts/pirelli.config scripts/pirelli.init
+SCRIPTS=scripts/gta02.config scripts/k5a3281.init scripts/pirelli.config \
+	scripts/pirelli.init
 INSTBIN=/usr/local/bin
 INSTSCR=/usr/local/share/freecalypso
 EXTRA_OBJ=
--- a/loadtools/ltflash.c	Sun Sep 01 03:42:11 2013 +0000
+++ b/loadtools/ltflash.c	Sun Sep 01 04:18:32 2013 +0000
@@ -11,6 +11,19 @@
 #include <stdlib.h>
 #include "flash.h"
 
+/* K5A32xx device description */
+
+static struct flash_region_desc k5a32xx_topboot_regions[] = {
+	/* 4 MiB total, 64 KiB sectors except for the boot block of 8x 8 KiB */
+	{0x10000, 63},
+	{0x2000, 8},
+	{0, 0}		/* array terminator */
+};
+
+static struct flash_bank_desc k5a32xx_topboot_bankdesc = {
+	k5a32xx_topboot_regions, 0xFFF00000
+};
+
 /* S{29,71}PL129N device description */
 
 static struct flash_region_desc pl129n_ce1_regions[] = {
@@ -35,6 +48,7 @@
 /* list of supported flash devices */
 
 struct flash_device_desc flash_device_list[] = {
+	{"k5a32xx_t", &k5a32xx_topboot_bankdesc, 1},
 	{"pl129n", pl129n_banks, 2},
 	{0, 0, 0}	/* array terminator */
 };
--- a/loadtools/scripts/gta02.config	Sun Sep 01 03:42:11 2013 +0000
+++ b/loadtools/scripts/gta02.config	Sun Sep 01 04:18:32 2013 +0000
@@ -13,3 +13,6 @@
 
 # Configure memory timings with loadagent commands
 init-script k5a3281.init
+
+# Flash type and chip select base address (full access mapping)
+flash k5a32xx_t 0x03000000