Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763609AbYALBdn (ORCPT ); Fri, 11 Jan 2008 20:33:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763158AbYALBde (ORCPT ); Fri, 11 Jan 2008 20:33:34 -0500 Received: from smtp2.linux-foundation.org ([207.189.120.14]:39051 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762427AbYALBdd (ORCPT ); Fri, 11 Jan 2008 20:33:33 -0500 Date: Fri, 11 Jan 2008 17:33:07 -0800 From: Andrew Morton To: "Nobuhiro Iwamatsu" Cc: linux-pcmcia@lists.infradead.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520 Message-Id: <20080111173307.21eb8dfc.akpm@linux-foundation.org> In-Reply-To: <29ab51dc0801111704i3accfa05v24cece3cdbdf992b@mail.gmail.com> References: <20071218185724.a9ba0cae.iwamatsu@nigauri.org> <20071225140419.9d2d80db.akpm@linux-foundation.org> <29ab51dc0801111704i3accfa05v24cece3cdbdf992b@mail.gmail.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3272 Lines: 79 On Sat, 12 Jan 2008 10:04:11 +0900 "Nobuhiro Iwamatsu" wrote: > 2007/12/26, Andrew Morton : > > On Tue, 18 Dec 2007 18:57:24 +0900 Nobuhiro Iwamatsu wrote: > > > > > There is a device that doesn't work when P2CCLK's bit of TI PC1520 was disable. > > > This patch supports P2CCLK bit enabler for TI PC1520. > > > > > > ... > > > > > > config YENTA_TOSHIBA > > > default y > > > bool "Special initialization for Toshiba ToPIC bridges" if EMBEDDED > > > diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h > > > index d29657b..ea749e8 100644 > > > --- a/drivers/pcmcia/ti113x.h > > > +++ b/drivers/pcmcia/ti113x.h > > > @@ -59,6 +59,7 @@ > > > #define TI122X_SCR_SER_STEP 0xc0000000 > > > #define TI122X_SCR_INTRTIE 0x20000000 > > > #define TIXX21_SCR_TIEALL 0x10000000 > > > +#define TI122X_SCR_P2CCLK 0x08000000 > > > #define TI122X_SCR_CBRSVD 0x00400000 > > > #define TI122X_SCR_MRBURSTDN 0x00008000 > > > #define TI122X_SCR_MRBURSTUP 0x00004000 > > > @@ -822,6 +823,13 @@ static int ti12xx_override(struct yenta_socket *socket) > > > printk(KERN_INFO "Yenta: Enabling burst memory read transactions\n"); > > > val |= TI122X_SCR_MRBURSTUP; > > > } > > > + > > > +#ifdef CONFIG_YENTA_TI_P2CCLK > > > + if ( !(val & TI122X_SCR_P2CCLK)) { > > > + printk(KERN_INFO "Yenta: Clock generated by internal oscillator\n"); > > > + val |= TI122X_SCR_P2CCLK; > > > + } > > > +#endif > > > if (val_orig != val) > > > config_writel(socket, TI113X_SYSTEM_CONTROL, val); > > > > It would be much better if we cold do this without the config option: just > > detect the appropriate device and make it work. > > This bit is enable for PC in BIOS. > However, I think that I want to control even by the kernel in > building in because it is a boot loader situation. > > I think that this will not be able to be done by automatic. > > Please apply this patch. > What does the TI122X_SCR_P2CCLK bit do? The printk which you're adding is ambiguous. Does it mean that the clock is already generated by the internal oscillator, or that it is not, and that the kernel is now arranging for it to be generated by the internal oscillator? What did the BIOS actually do? Did it enable an external oscillator when the motherboard doesn't actually connect an oscillator to the external-oscillator pin? Or what? So. Please generally tell us (completely) what the problem is, and how this patch attempts to fix it. Please also fully explain why we cannot fix this problem without resorting to a config option, because avoiding the config option is highly desirable. Please bear in mind that this part of the kernel is effectively unmaintained, so poor ignorant people like me need to try to look after it so I need to be carefully educated about what's going on. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/