]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Remove old copy of IAP and LCPIAP code.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sat, 1 Oct 2011 12:22:33 +0000 (14:22 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sat, 1 Oct 2011 12:22:33 +0000 (14:22 +0200)
The common version for ARM devices located in
  arch/arm/generic/libs/iap_kvpbv
directory is used now.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
embedded/arch/arm/mach-lpc21xx/libs/iap/iap_kvpb.c [deleted file]
embedded/arch/arm/mach-lpc21xx/libs/iap/lpciap_kvpb.h [deleted file]

diff --git a/embedded/arch/arm/mach-lpc21xx/libs/iap/iap_kvpb.c b/embedded/arch/arm/mach-lpc21xx/libs/iap/iap_kvpb.c
deleted file mode 100644 (file)
index 268ec9e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <string.h>
-#include <keyvalpb.h>
-#include <lpciap.h>
-
-unsigned long lpciap_buff[ISP_RAM2FLASH_BLOCK_SIZE/4];
-char *lpciap_addr_base=NULL;
-
-#define ISP_RAM2FLASH_BLOCK_SIZE_MASK (ISP_RAM2FLASH_BLOCK_SIZE-1)
-
-int lpcisp_kvpb_erase(struct kvpb_block *store, void *base,int size)
-{
-  return lpcisp_erase(base, size);
-}
-
-int lpcisp_kvpb_flush(struct kvpb_block *store) 
-{
-  if (lpciap_addr_base==NULL) return -1;
-  lpcisp_write(lpciap_addr_base,lpciap_buff,ISP_RAM2FLASH_BLOCK_SIZE);
-  lpciap_addr_base=NULL;
-  return 0;
-}
-
-int lpcisp_kvpb_copy(struct kvpb_block *store,void *des, const void *src, int len)
-{
-  char *addr_base,*addr_src=(char*)src;
-  int cp_len;
-
-  while(len) {
-    addr_base=(char*)((unsigned long)des&~ISP_RAM2FLASH_BLOCK_SIZE_MASK);
-    cp_len=ISP_RAM2FLASH_BLOCK_SIZE-((unsigned long)des&ISP_RAM2FLASH_BLOCK_SIZE_MASK);
-    if (len<cp_len) cp_len=len;
-    if (lpciap_addr_base) {
-      if (lpciap_addr_base!=addr_base) {
-        lpcisp_kvpb_flush(store);
-        memcpy(lpciap_buff,addr_base,ISP_RAM2FLASH_BLOCK_SIZE);
-        lpciap_addr_base=addr_base;
-      }
-    } else {
-      memcpy(lpciap_buff,addr_base,ISP_RAM2FLASH_BLOCK_SIZE);
-      lpciap_addr_base=addr_base;
-    }
-    memcpy((char*)lpciap_buff+((unsigned long)des&ISP_RAM2FLASH_BLOCK_SIZE_MASK),addr_src,cp_len);
-    des=(char*)des+cp_len;
-    addr_src+=cp_len;
-    len-=cp_len;
-    if (((unsigned long)des&ISP_RAM2FLASH_BLOCK_SIZE_MASK)==0x00) 
-      lpcisp_kvpb_flush(store);
-  }
-  return 1;
-}
diff --git a/embedded/arch/arm/mach-lpc21xx/libs/iap/lpciap_kvpb.h b/embedded/arch/arm/mach-lpc21xx/libs/iap/lpciap_kvpb.h
deleted file mode 100644 (file)
index 3057ab9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _LPCIAP_KVPB_H
-#define _LPCIAP_KVPB_H
-
-#include <system_def.h>
-
-extern unsigned long lpciap_buff[ISP_RAM2FLASH_BLOCK_SIZE/4];
-
-int lpcisp_kvpb_erase(struct kvpb_block *store, void *base,int size);
-int lpcisp_kvpb_flush(struct kvpb_block *store); 
-int lpcisp_kvpb_copy(struct kvpb_block *store,void *des, const void *src, int len);
-
-#endif  /* _LPCIAP_KVPB_ */