public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520
@ 2007-12-18  9:57 Nobuhiro Iwamatsu
  2007-12-25 22:04 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2007-12-18  9:57 UTC (permalink / raw)
  To: linux-pcmcia; +Cc: iwamatsu, linux-sh, linux-kernel

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.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 drivers/pcmcia/Kconfig  |    5 +++++
 drivers/pcmcia/ti113x.h |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 519b4ff..3d80888 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -134,6 +134,11 @@ config YENTA_ENE_TUNE
 	bool "Auto-tune EnE bridges for CB cards" if EMBEDDED
 	depends on YENTA_TI && CARDBUS
 
+config YENTA_TI_P2CCLK
+	default n
+	bool "Clock generated by internal oscillator" if EMBEDDED
+	depends on YENTA_TI && CARDBUS
+
 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);
 
-- 
1.5.3.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520
  2007-12-18  9:57 [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520 Nobuhiro Iwamatsu
@ 2007-12-25 22:04 ` Andrew Morton
  2008-01-12  1:04   ` Nobuhiro Iwamatsu
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2007-12-25 22:04 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu; +Cc: linux-pcmcia, linux-sh, linux-kernel

On Tue, 18 Dec 2007 18:57:24 +0900 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520
  2007-12-25 22:04 ` Andrew Morton
@ 2008-01-12  1:04   ` Nobuhiro Iwamatsu
  2008-01-12  1:33     ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-01-12  1:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-pcmcia, linux-sh, linux-kernel

2007/12/26, Andrew Morton <akpm@linux-foundation.org>:
> On Tue, 18 Dec 2007 18:57:24 +0900 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 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.

regards,
 Nobuhiro

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520
  2008-01-12  1:04   ` Nobuhiro Iwamatsu
@ 2008-01-12  1:33     ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2008-01-12  1:33 UTC (permalink / raw)
  To: Nobuhiro Iwamatsu; +Cc: linux-pcmcia, linux-sh, linux-kernel

On Sat, 12 Jan 2008 10:04:11 +0900
"Nobuhiro Iwamatsu" <iwamatsu@nigauri.org> wrote:

> 2007/12/26, Andrew Morton <akpm@linux-foundation.org>:
> > On Tue, 18 Dec 2007 18:57:24 +0900 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-12  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18  9:57 [PATCH] pcmcia: Add support P2CCLK bit enabler for TI PC1520 Nobuhiro Iwamatsu
2007-12-25 22:04 ` Andrew Morton
2008-01-12  1:04   ` Nobuhiro Iwamatsu
2008-01-12  1:33     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox