Index: trunk/softs/tsar_boot/src/boot_elf_loader.c
===================================================================
--- trunk/softs/tsar_boot/src/boot_elf_loader.c	(revision 413)
+++ trunk/softs/tsar_boot/src/boot_elf_loader.c	(revision 415)
@@ -109,5 +109,5 @@
         if (init_state != init_state_debug)
         {
-            boot_puts("init_state = ");
+            boot_puts("\ninit_state = ");
             boot_puts(init_state_str[init_state]);
             boot_puts("\n");
@@ -189,17 +189,20 @@
                         {
 #if (BOOT_DEBUG == 1)
-                            boot_puts("found a loadable segment:\n");
-                            boot_puts("- type   : "); boot_putx(elf_pht_ptr[pseg].p_type);    boot_puts("\n");
-                            boot_puts("- offset : "); boot_putx(elf_pht_ptr[pseg].p_offset);  boot_puts("\n");
-                            boot_puts("- vaddr  : "); boot_putx(elf_pht_ptr[pseg].p_vaddr);   boot_puts("\n");
-                            boot_puts("- paddr  : "); boot_putx(elf_pht_ptr[pseg].p_paddr);   boot_puts("\n");
-                            boot_puts("- filesz : "); boot_putx(elf_pht_ptr[pseg].p_filesz);  boot_puts("\n");
-                            boot_puts("- memsz  : "); boot_putx(elf_pht_ptr[pseg].p_memsz);   boot_puts("\n");
-                            boot_puts("- flags  : "); boot_putx(elf_pht_ptr[pseg].p_flags);   boot_puts("\n");
-                            boot_puts("- align  : "); boot_putx(elf_pht_ptr[pseg].p_align);   boot_puts("\n");
+                            boot_puts("found a loadable segment:");
+                            boot_puts("\n- type   : "); boot_putx(elf_pht_ptr[pseg].p_type);
+                            boot_puts("\n- offset : "); boot_putx(elf_pht_ptr[pseg].p_offset);
+                            boot_puts("\n- vaddr  : "); boot_putx(elf_pht_ptr[pseg].p_vaddr);
+                            boot_puts("\n- paddr  : "); boot_putx(elf_pht_ptr[pseg].p_paddr);
+                            boot_puts("\n- filesz : "); boot_putx(elf_pht_ptr[pseg].p_filesz);
+                            boot_puts("\n- memsz  : "); boot_putx(elf_pht_ptr[pseg].p_memsz);
+                            boot_puts("\n- flags  : "); boot_putx(elf_pht_ptr[pseg].p_flags);
+                            boot_puts("\n- align  : "); boot_putx(elf_pht_ptr[pseg].p_align);
 #endif
                             if (elf_pht_ptr[pseg].p_offset < offset)
                             {
-                                /* case where the segment to load includes the elf and program headers */
+                                /* 
+                                 * Case where the segment to load includes the elf
+                                 * and program headers 
+                                 * */
                                 nb_rest = elf_pht_ptr[pseg].p_filesz - offset;
                                 init_state = ELF_SEGMENT_STATE;
@@ -207,5 +210,7 @@
                             else
                             {
-                                /* segment to load is further away in memory */
+                                /* 
+                                 * Segment to load is further away in ELF file
+                                 * */
                                 nb_rest = elf_pht_ptr[pseg].p_offset - offset;
                                 init_state = ELF_OFFSET_STATE;
@@ -230,5 +235,6 @@
 
             /**
-             * Go to the offset of the first not null program segment in the ELF file
+             * Go to the offset of the first not null program segment in the
+             * ELF file
              */
             case ELF_OFFSET_STATE:
Index: trunk/softs/tsar_boot/src/spi.c
===================================================================
--- trunk/softs/tsar_boot/src/spi.c	(revision 413)
+++ trunk/softs/tsar_boot/src/spi.c	(revision 415)
@@ -92,4 +92,5 @@
 
     _spi_wait_if_busy(spi);
+
     /* switch to 128 bits words */
     spi_ctrl0 = ioread32(&spi->ctrl);
@@ -99,30 +100,37 @@
     /* read data */
     for (i = 0; i + 3 < count / 4; i += 4) {
-	iowrite32(&spi->rx_tx[0], 0xffffffff);
-	iowrite32(&spi->rx_tx[1], 0xffffffff);
-	iowrite32(&spi->rx_tx[2], 0xffffffff);
-	iowrite32(&spi->rx_tx[3], 0xffffffff);
-	iowrite32(&spi->ctrl,  spi_ctrl | SPI_CTRL_GO_BSY);
+        iowrite32(&spi->rx_tx[0], 0xffffffff);
+        iowrite32(&spi->rx_tx[1], 0xffffffff);
+        iowrite32(&spi->rx_tx[2], 0xffffffff);
+        iowrite32(&spi->rx_tx[3], 0xffffffff);
+        iowrite32(&spi->ctrl,  spi_ctrl | SPI_CTRL_GO_BSY);
+
         _spi_wait_if_busy(spi);
-	*data = bswap32(ioread32(&spi->rx_tx[3]));
-	data++;
-	*data = bswap32(ioread32(&spi->rx_tx[2]));
-	data++;
-	*data = bswap32(ioread32(&spi->rx_tx[1]));
-	data++;
-	*data = bswap32(ioread32(&spi->rx_tx[0]));
-	data++;
+        
+        *data = bswap32(ioread32(&spi->rx_tx[3]));
+        data++;
+        *data = bswap32(ioread32(&spi->rx_tx[2]));
+        data++;
+        *data = bswap32(ioread32(&spi->rx_tx[1]));
+        data++;
+        *data = bswap32(ioread32(&spi->rx_tx[0]));
+        data++;
     }
+
     /* switch back to original word size */
     iowrite32(&spi->ctrl, spi_ctrl0);
+
     /* read missing bits */
     data8 = (void *)data;
     i = i * 4;
-    for (; i < count; i++) {
-	iowrite32(&spi->rx_tx[0], 0xffffffff);
-	iowrite32(&spi->ctrl,  spi_ctrl0 | SPI_CTRL_GO_BSY);
-	_spi_wait_if_busy(spi);
-	*data8 = spi_get_rx(spi, 0);
-	data8++;
+    for (; i < count; i++)
+    {
+        iowrite32(&spi->rx_tx[0], 0xffffffff);
+        iowrite32(&spi->ctrl,  spi_ctrl0 | SPI_CTRL_GO_BSY);
+    
+        _spi_wait_if_busy(spi);
+    
+        *data8 = spi_get_rx(spi, 0);
+        data8++;
     }
     return;
@@ -145,9 +153,9 @@
 void spi_dev_config (
     struct spi_dev * spi,
-    int spi_freq     	,
+    int spi_freq        ,
     int sys_freq        ,
-    int char_len		,
-    int tx_edge			,
-    int rx_edge			)
+    int char_len        ,
+    int tx_edge         ,
+    int rx_edge         )
 {
     unsigned int spi_ctrl = ioread32(&spi->ctrl);
