]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
arc: get rid of running_on_hw
authorAlexey Brodkin <abrodkin@synopsys.com>
Sat, 20 Feb 2016 08:30:19 +0000 (11:30 +0300)
committerAlexey Brodkin <abrodkin@synopsys.com>
Mon, 11 Apr 2016 17:20:30 +0000 (10:20 -0700)
ISS is obsolete now and nSIM is used for simulation instead.
In its turn nSIM properly handles baud-rate settings so get rid
of now useless check.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
arch/arc/include/asm/global_data.h
arch/arc/lib/cpu.c
drivers/serial/serial_arc.c

index d644e805863935e833f28395d2ff98566f294077..e25b966feb19e6a341d459703131dd6b22033bd4 100644 (file)
@@ -9,7 +9,6 @@
 
 /* Architecture-specific global data */
 struct arch_global_data {
-       int running_on_hw;
 };
 
 #include <asm-generic/global_data.h>
index 4e4dd74db3d7e1ef9734ae95b28ba607150c8f6d..d1f10abb6850b803cdf84eb7c6b1f1a1b4e1fd99 100644 (file)
@@ -14,12 +14,6 @@ int arch_cpu_init(void)
 {
        timer_init();
 
-/* In simulation (ISS) "CHIPID" and "ARCNUM" are all "ff" */
-       if ((read_aux_reg(ARC_AUX_IDENTITY) & 0xffffff00) == 0xffffff00)
-               gd->arch.running_on_hw = 0;
-       else
-               gd->arch.running_on_hw = 1;
-
        gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
        gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 
index 6292eb136b0d86590d7508d6b26260afe41bfbca..326a536a26ad47801b40eee9b44a7f04ce084641 100644 (file)
@@ -42,23 +42,7 @@ static int arc_serial_setbrg(struct udevice *dev, int baudrate)
        int arc_console_baud = gd->cpu_clk / (baudrate * 4) - 1;
 
        writeb(arc_console_baud & 0xff, &regs->baudl);
-
-#ifdef CONFIG_ARC
-       /*
-        * UART ISS(Instruction Set simulator) emulation has a subtle bug:
-        * A existing value of Baudh = 0 is used as a indication to startup
-        * it's internal state machine.
-        * Thus if baudh is set to 0, 2 times, it chokes.
-        * This happens with BAUD=115200 and the formaula above
-        * Until that is fixed, when running on ISS, we will set baudh to !0
-        */
-       if (gd->arch.running_on_hw)
-               writeb((arc_console_baud & 0xff00) >> 8, &regs->baudh);
-       else
-               writeb(1, &regs->baudh);
-#else
        writeb((arc_console_baud & 0xff00) >> 8, &regs->baudh);
-#endif
 
        return 0;
 }