]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/eNET/eNET.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
[karo-tx-uboot.git] / board / eNET / eNET.c
index 8e11acf615af8c5f89e4fd208400770ac1b4c651..429fe1b4ff3f6c8886a4f257f88d9e30903c389c 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 #include <net.h>
 #include <netdev.h>
 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#undef SC520_CDP_DEBUG
-
-#ifdef SC520_CDP_DEBUG
-#define        PRINTF(fmt,args...)     printf (fmt ,##args)
-#else
-#define PRINTF(fmt,args...)
-#endif
-
 unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
 
 static void enet_timer_isr(void);
@@ -170,12 +162,6 @@ int board_early_init_r(void)
        return 0;
 }
 
-int dram_init(void)
-{
-       init_sc520_dram();
-       return 0;
-}
-
 void show_boot_progress(int val)
 {
        uchar led_mask;
@@ -199,22 +185,23 @@ int last_stage_init(void)
 
        outb(0x00, LED_LATCH_ADDRESS);
 
-       register_timer_isr (enet_timer_isr);
+       register_timer_isr(enet_timer_isr);
 
        printf("Serck Controls eNET\n");
 
        return 0;
 }
 
-ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info)
+ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
 {
        if (banknum == 0) {     /* non-CFI boot flash */
                info->portwidth = FLASH_CFI_8BIT;
                info->chipwidth = FLASH_CFI_BY8;
                info->interface = FLASH_CFI_X8;
                return 1;
-       } else
+       } else {
                return 0;
+       }
 }
 
 int board_eth_init(bd_t *bis)
@@ -236,7 +223,7 @@ void setup_pcat_compatibility()
         *  active low polarity on PIC interrupt pins,
         *  active high polarity on all other irq pins
         */
-       writew(0x0000,&sc520_mmcr->intpinpol);
+       writew(0x0000, &sc520_mmcr->intpinpol);
 
        /*
         * PIT 0 -> IRQ0
@@ -265,7 +252,7 @@ void setup_pcat_compatibility()
 
 void enet_timer_isr(void)
 {
-       static long enet_ticks = 0;
+       static long enet_ticks;
 
        enet_ticks++;
 
@@ -294,9 +281,9 @@ void hw_watchdog_reset(void)
 
 void enet_toggle_run_led(void)
 {
-       unsigned char leds_state= inb(LED_LATCH_ADDRESS);
+       unsigned char leds_state = inb(LED_LATCH_ADDRESS);
        if (leds_state & LED_RUN_BITMASK)
-               outb(leds_state &LED_RUN_BITMASK, LED_LATCH_ADDRESS);
+               outb(leds_state & ~LED_RUN_BITMASK, LED_LATCH_ADDRESS);
        else
                outb(leds_state | LED_RUN_BITMASK, LED_LATCH_ADDRESS);
 }