linux-mips
[Top] [All Lists]

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

To: Linux-MIPS <linux-mips@linux-mips.org>
Subject: [PATCH V2] MIPS/DB1200: Set Config[OD] for improved stability.
From: Manuel Lauss <manuel.lauss@googlemail.com>
Date: Fri, 11 Feb 2011 10:02:46 +0100
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=dxnb/N0tDC5L3m2KQ2yzHHZAuHWyLbZO4cbJzaQJZmc=; b=Y0V97I+tM7K/+dOLJR5i5avIlz40DXXcQmHFcZS9pOUsgtW66cuhqX3NYFpH24JMOq oFn+ZPSpuEqRsTiBCKZTkdDBse1xLojnwyw0wJLMSuX+pqo8RJX03j5i8STc3zWE/ZIt tj02SJvZqZUm+8ZqBoqR062cNq/r9KqYDM/nM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=Gzbq+uxVsi/aRTDNrK9eLlMsWiqYzCqWDvBawkV2SbKyIxajmVTGDIRXKFYlBSGiQM 4VcfY5Ed6cYD1rZP5GbCNIQaae9HPiUevtkaAV4kZZ3+9iUD8r9BTq9dYLIzZCBBAEIm drgDAd06CLZQNkPdh4RYCGHGWBLrxkYf7juh0=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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>
---
v2: improvements and fixes, thanks to Sergei Shtylyov.

 arch/mips/alchemy/common/setup.c           |    4 ++--
 arch/mips/alchemy/devboards/db1200/setup.c |    7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c
index 561e5da..1b887c8 100644
--- a/arch/mips/alchemy/common/setup.c
+++ b/arch/mips/alchemy/common/setup.c
@@ -52,8 +52,6 @@ void __init plat_mem_setup(void)
        /* this is faster than wasting cycles trying to approximate it */
        preset_lpj = (est_freq >> 1) / HZ;
 
-       board_setup();  /* board specific setup */
-
        if (au1xxx_cpu_needs_config_od())
                /* Various early Au1xx0 errata corrected by this */
                set_c0_config(1 << 19); /* Set Config[OD] */
@@ -61,6 +59,8 @@ void __init plat_mem_setup(void)
                /* Clear to obtain best system bus performance */
                clear_c0_config(1 << 19); /* Clear Config[OD] */
 
+       board_setup();  /* board specific setup */
+
        /* IO/MEM resources. */
        set_io_port_base(0);
        ioport_resource.start = IOPORT_RESOURCE_START;
diff --git a/arch/mips/alchemy/devboards/db1200/setup.c 
b/arch/mips/alchemy/devboards/db1200/setup.c
index 8876195..be788c8 100644
--- a/arch/mips/alchemy/devboards/db1200/setup.c
+++ b/arch/mips/alchemy/devboards/db1200/setup.c
@@ -23,6 +23,13 @@ void __init board_setup(void)
        unsigned long freq0, clksrc, div, pfc;
        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,
                  DB1200_BCSR_PHYS_ADDR + DB1200_BCSR_HEXLED_OFS);
 
-- 
1.7.4


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH V2] MIPS/DB1200: Set Config[OD] for improved stability., Manuel Lauss <=