]> rtime.felk.cvut.cz Git - sysless.git/blobdiff - arch/h8300/generic/libs/boot/boot_fn.c
h8300: Make bloader work with ELF toolchain
[sysless.git] / arch / h8300 / generic / libs / boot / boot_fn.c
index 3127f98072811541cef7602086ec2410353edc88..f46f3af4352b5aa2deef1d5daad1dbfa987d00a9 100644 (file)
@@ -55,16 +55,6 @@ void wdg_clear()
 
 #define TO_TEXT __attribute__ ((section (".text")))
 
-#define PIC_ADR(_ptr,_var) \
-       { \
-         __asm__ ( \
-           "bsr 1f\n" \
-           "1:\tmov.l @sp+,%0\n" \
-           "\tadd.l %1-1b,%0\n" \
-           : "=r" (_ptr) : "i" (&(_var)) : "cc" \
-         ); \
-       }
-
 static const unsigned long
   flash_blocks[] TO_TEXT =
        {0x00000,0x01000,0x02000,0x03000,0x04000,0x05000,0x06000,0x07000,
@@ -110,7 +100,7 @@ int FlAdr2Blk(unsigned long adr)
 {
   int bl=0;
   unsigned long *blocks;
-  PIC_ADR(blocks,flash_blocks[0]);
+  blocks = &flash_blocks[0];
 
   if(adr<blocks[0]) return -1;
   while(blocks[bl+1]){
@@ -125,7 +115,7 @@ int FlTest(int bl)
 {
   __u16 *p, *pe;
   unsigned long *blocks;
-  PIC_ADR(blocks,flash_blocks[0]);
+  blocks = &flash_blocks[0];
   
   if(bl>=flash_block_count) return -2;
   if(bl<0) return -2;