Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Manuel 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: Ralf Baechle <ralf@linux-mips.org>

authored by

Manuel Lauss and committed by
Ralf Baechle
05911280 8b659a39

+9 -2
+2 -2
arch/mips/alchemy/common/setup.c
··· 52 52 /* this is faster than wasting cycles trying to approximate it */ 53 53 preset_lpj = (est_freq >> 1) / HZ; 54 54 55 - board_setup(); /* board specific setup */ 56 - 57 55 if (au1xxx_cpu_needs_config_od()) 58 56 /* Various early Au1xx0 errata corrected by this */ 59 57 set_c0_config(1 << 19); /* Set Config[OD] */ 60 58 else 61 59 /* Clear to obtain best system bus performance */ 62 60 clear_c0_config(1 << 19); /* Clear Config[OD] */ 61 + 62 + board_setup(); /* board specific setup */ 63 63 64 64 /* IO/MEM resources. */ 65 65 set_io_port_base(0);
+7
arch/mips/alchemy/devboards/db1200/setup.c
··· 23 23 unsigned long freq0, clksrc, div, pfc; 24 24 unsigned short whoami; 25 25 26 + /* Set Config[OD] (disable overlapping bus transaction): 27 + * This gets rid of a _lot_ of spurious interrupts (especially 28 + * wrt. IDE); but incurs ~10% performance hit in some 29 + * cpu-bound applications. 30 + */ 31 + set_c0_config(1 << 19); 32 + 26 33 bcsr_init(DB1200_BCSR_PHYS_ADDR, 27 34 DB1200_BCSR_PHYS_ADDR + DB1200_BCSR_HEXLED_OFS); 28 35