All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Lauss <manuel.lauss@googlemail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Florian Fainelli <florian@openwrt.org>,
	Wolfgang Grandegger <wg@grandegger.com>,
	Manuel Lauss <manuel.lauss@googlemail.com>
Subject: [PATCH 1/9] MIPS: DB1200: Set Config[OD] for improved stability.
Date: Sun,  8 May 2011 10:42:12 +0200	[thread overview]
Message-ID: <1304844140-3259-2-git-send-email-manuel.lauss@googlemail.com> (raw)
In-Reply-To: <1304844140-3259-1-git-send-email-manuel.lauss@googlemail.com>

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>
---
Resend of a patch I submitted earlier.
V2: fix up issues pointed out by 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 4a89800..1dac4f2 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.5.rc3

  reply	other threads:[~2011-05-08  8:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-08  8:42 [RFC PATCH 0/9] Misc. Alchemy updates Manuel Lauss
2011-05-08  8:42 ` Manuel Lauss [this message]
2011-05-10 15:01   ` [PATCH 1/9] MIPS: DB1200: Set Config[OD] for improved stability Ralf Baechle
2011-05-08  8:42 ` [PATCH 2/9] MIPS: Alchemy: update inlinable GPIO API Manuel Lauss
2011-05-10 15:01   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 3/9] MIPS: Alchemy: irq code and constant cleanup Manuel Lauss
2011-05-10 15:01   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 4/9] MIPS: Alchemy: convert irq.c to syscore_ops Manuel Lauss
2011-05-10 15:01   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 5/9] MIPS: Alchemy: convert dbdma.c " Manuel Lauss
2011-05-10 15:01   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 6/9] MIPS: Alchemy: rewrite UART setup and constants Manuel Lauss
2011-05-10 15:01   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 7/9] MIPS: Alchemy: rewrite ethernet platform setup Manuel Lauss
2011-05-10 15:02   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 8/9] MIPS: Alchemy: cleanup DMA addresses Manuel Lauss
2011-05-10 15:02   ` Ralf Baechle
2011-05-08  8:42 ` [PATCH 9/9] MIPS: Alchemy: clean up GPIO registers and accessors Manuel Lauss
2011-05-10 15:02   ` Ralf Baechle
2011-05-10 19:07     ` Manuel Lauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304844140-3259-2-git-send-email-manuel.lauss@googlemail.com \
    --to=manuel.lauss@googlemail.com \
    --cc=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.