Commit 05911280 authored by Manuel Lauss's avatar Manuel Lauss Committed by Ralf Baechle

MIPS: DB1200: Set Config[OD] for improved stability.

Setting Config[OD] gets rid of a _LOT_ of spurious CPLD interrupts,
but also decreases overall performance a bit.
Signed-off-by: default avatarManuel Lauss <manuel.lauss@googlemail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Patchwork: https://patchwork.linux-mips.org/patch/2347/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 8b659a39
...@@ -52,8 +52,6 @@ void __init plat_mem_setup(void) ...@@ -52,8 +52,6 @@ void __init plat_mem_setup(void)
/* this is faster than wasting cycles trying to approximate it */ /* this is faster than wasting cycles trying to approximate it */
preset_lpj = (est_freq >> 1) / HZ; preset_lpj = (est_freq >> 1) / HZ;
board_setup(); /* board specific setup */
if (au1xxx_cpu_needs_config_od()) if (au1xxx_cpu_needs_config_od())
/* Various early Au1xx0 errata corrected by this */ /* Various early Au1xx0 errata corrected by this */
set_c0_config(1 << 19); /* Set Config[OD] */ set_c0_config(1 << 19); /* Set Config[OD] */
...@@ -61,6 +59,8 @@ void __init plat_mem_setup(void) ...@@ -61,6 +59,8 @@ void __init plat_mem_setup(void)
/* Clear to obtain best system bus performance */ /* Clear to obtain best system bus performance */
clear_c0_config(1 << 19); /* Clear Config[OD] */ clear_c0_config(1 << 19); /* Clear Config[OD] */
board_setup(); /* board specific setup */
/* IO/MEM resources. */ /* IO/MEM resources. */
set_io_port_base(0); set_io_port_base(0);
ioport_resource.start = IOPORT_RESOURCE_START; ioport_resource.start = IOPORT_RESOURCE_START;
......
...@@ -23,6 +23,13 @@ void __init board_setup(void) ...@@ -23,6 +23,13 @@ void __init board_setup(void)
unsigned long freq0, clksrc, div, pfc; unsigned long freq0, clksrc, div, pfc;
unsigned short whoami; unsigned short whoami;
/* Set Config[OD] (disable overlapping bus transaction):
* This gets rid of a _lot_ of spurious interrupts (especially
* wrt. IDE); but incurs ~10% performance hit in some
* cpu-bound applications.
*/
set_c0_config(1 << 19);
bcsr_init(DB1200_BCSR_PHYS_ADDR, bcsr_init(DB1200_BCSR_PHYS_ADDR,
DB1200_BCSR_PHYS_ADDR + DB1200_BCSR_HEXLED_OFS); DB1200_BCSR_PHYS_ADDR + DB1200_BCSR_HEXLED_OFS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment