From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pcmcia: Add disable_clkrun option
Date: Mon, 22 Nov 2004 19:28:34 +0900 [thread overview]
Message-ID: <87brdqxjn1.fsf@devron.myhome.or.jp> (raw)
Hi,
I received report that transmission of Realtek 8139 doesn't work. The
cause of this problem was CLKRUN protocols of laptop's TI 12xx CardBus
bridge.
And I remember that this problem had happened on Thinkpad before. In
the case, problem seems solved by similar workaround of sound/oss/cs46xx.c.
This patch adds "disable_clkrun" option as workaround of problem to
yenta_socket.
Please apply.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
drivers/pcmcia/ti113x.h | 11 ++++++++---
drivers/pcmcia/yenta_socket.c | 2 ++
2 files changed, 10 insertions(+), 3 deletions(-)
diff -puN drivers/pcmcia/ti113x.h~pcmcia-clkrun-disable drivers/pcmcia/ti113x.h
--- linux-2.6.10-rc2/drivers/pcmcia/ti113x.h~pcmcia-clkrun-disable 2004-11-21 15:49:44.000000000 +0900
+++ linux-2.6.10-rc2-hirofumi/drivers/pcmcia/ti113x.h 2004-11-21 15:49:44.000000000 +0900
@@ -592,15 +592,20 @@ out:
static int ti12xx_override(struct yenta_socket *socket)
{
- u32 val;
+ u32 val, val_orig;
/* make sure that memory burst is active */
- val = config_readl(socket, TI113X_SYSTEM_CONTROL);
+ val_orig = val = config_readl(socket, TI113X_SYSTEM_CONTROL);
+ if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) {
+ printk(KERN_INFO "Yenta: Disabling CLKRUN feature\n");
+ val |= TI113X_SCR_KEEPCLK;
+ }
if (!(val & TI122X_SCR_MRBURSTUP)) {
printk(KERN_INFO "Yenta: Enabling burst memory read transactions\n");
val |= TI122X_SCR_MRBURSTUP;
- config_writel(socket, TI113X_SYSTEM_CONTROL, val);
}
+ if (val_orig != val)
+ config_writel(socket, TI113X_SYSTEM_CONTROL, val);
/*
* for EnE bridges only: clear testbit TLTEnable. this makes the
diff -puN drivers/pcmcia/yenta_socket.c~pcmcia-clkrun-disable drivers/pcmcia/yenta_socket.c
--- linux-2.6.10-rc2/drivers/pcmcia/yenta_socket.c~pcmcia-clkrun-disable 2004-11-21 15:49:44.000000000 +0900
+++ linux-2.6.10-rc2-hirofumi/drivers/pcmcia/yenta_socket.c 2004-11-22 18:56:20.000000000 +0900
@@ -28,6 +28,8 @@
#include "yenta_socket.h"
#include "i82365.h"
+static int disable_clkrun;
+module_param(disable_clkrun, bool, 0444);
#if 0
#define debug(x,args...) printk(KERN_DEBUG "%s: " x, __func__ , ##args)
_
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next reply other threads:[~2004-11-22 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 10:28 OGAWA Hirofumi [this message]
2004-11-22 22:24 ` Andrew Morton
2004-11-23 2:23 ` OGAWA Hirofumi
2004-11-23 3:47 ` OGAWA Hirofumi
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=87brdqxjn1.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®