LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: how to run iptables-1.2.9 at Kernel 2.4.25
From: Wolfgang Denk @ 2005-08-15  9:15 UTC (permalink / raw)
  To: 徐小威; +Cc: linuxppc-embedded
In-Reply-To: <1124094153.13556.3.camel@banana>

In message <1124094153.13556.3.camel@banana> you wrote:
> 
>     I got some problem at compiler iptables 1.2.9 at my 2.4.25 Linux,
> anybody know how to solve it?

Please provide a correct subject. It seems your problem is  not  with
running but with building iptables, right?

> PS:I used eldk 3.1.1 and 2.4.25 kernel at my custom MPC852T board.
> 
> extensions/libipt_ULOG.c: In function `init':
> extensions/libipt_ULOG.c:58: error: `NFLOG_DEFAULT_NLGROUP' undeclared
...
> extensions/libipt_ULOG.c:59: error: `NFLOG_DEFAULT_QTHRESHOLD'
...

Seems you misconfigured it. Check your Makefiles.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
To program is to be.

^ permalink raw reply

* how to run iptables-1.2.9  at Kernel 2.4.25
From: 徐小威 @ 2005-08-15  8:22 UTC (permalink / raw)
  To: linuxppc-embedded

Hi all:

    I got some problem at compiler iptables 1.2.9 at my 2.4.25 Linux,
anybody know how to solve it?

PS:I used eldk 3.1.1 and 2.4.25 kernel at my custom MPC852T board.

extensions/libipt_ULOG.c: In function `init':
extensions/libipt_ULOG.c:58: error: `NFLOG_DEFAULT_NLGROUP' undeclared
(first use in this function)
extensions/libipt_ULOG.c:58: error: (Each undeclared identifier is
reported only once
extensions/libipt_ULOG.c:58: error: for each function it appears in.)
extensions/libipt_ULOG.c:59: error: `NFLOG_DEFAULT_QTHRESHOLD'
undeclared (first use in this function)
extensions/libipt_ULOG.c: In function `save':
extensions/libipt_ULOG.c:158: error: `NFLOG_DEFAULT_NLGROUP' undeclared
(first use in this function)
extensions/libipt_ULOG.c:165: error: `NFLOG_DEFAULT_QTHRESHOLD'
undeclared (first use in this function)
make: *** [extensions/libipt_ULOG.o] Error 1

^ permalink raw reply

* RE: 8xx: i2c-algo-8xx - fixed timeout detection and transmission errors
From: Joakim Tjernlund @ 2005-08-15  8:08 UTC (permalink / raw)
  To: cajus.hahn, linuxppc-embedded
In-Reply-To: <OF22BDEDEA.B9A60886-ONC125705E.001F8E2A-C125705E.0020E27E@de.abb.com>

> 
> Hi Jocke,
> 
> I changed the force_reinit() to
> 
> // Disable interrupts.
> i2c->i2c_i2cmr = 0;
> i2c->i2c_i2cer = 0xff;
> // Clear enable
> i2c->i2c_i2mod &= ~1;
> // Reset internal state
> iip->iic_rstate = 0;
> iip->iic_tstate = 0;
> 
> This seems to work and is less code than my old force_reinit().
> On the other hand: This kind of CPM timeout will only occur on heavy I2C
> bus conflicts. They should not appear at all. The code will not be executed
> if a slave device does not answer! The original driver is from the year
> 2001 and nobody has mentioned problems of this kind before. Without
> detailed knowledge of the CPM internals I feel much safer using my old
> force_reinit(), which does a complete re-init.

Good, however I think we should try to it simple, the code that is, and avoid
unneded bloat. I would like to see the shorter version in the kernel.

 Jocke

^ permalink raw reply

* 8xx: i2c-algo-8xx - fixed timeout detection and transmission errors
From: cajus.hahn @ 2005-08-15  5:59 UTC (permalink / raw)
  To: linuxppc-embedded





Hi Jocke,

I changed the force_reinit() to

// Disable interrupts.
i2c->i2c_i2cmr = 0;
i2c->i2c_i2cer = 0xff;
// Clear enable
i2c->i2c_i2mod &= ~1;
// Reset internal state
iip->iic_rstate = 0;
iip->iic_tstate = 0;

This seems to work and is less code than my old force_reinit().
On the other hand: This kind of CPM timeout will only occur on heavy I2C
bus conflicts. They should not appear at all. The code will not be executed
if a slave device does not answer! The original driver is from the year
2001 and nobody has mentioned problems of this kind before. Without
detailed knowledge of the CPM internals I feel much safer using my old
force_reinit(), which does a complete re-init.

Cajus

^ permalink raw reply

* low latency/preempt patch for denx linuxppc_2_4_devel
From: Dmytro Bablinyuk @ 2005-08-15  4:54 UTC (permalink / raw)
  To: linuxppc-embedded

I hope this is the right place to ask. My apologise if it's wrong.
I am using linuxppc_2_4_devel from denx.de (2.4.25 PPC oriented patched 
kernel) and looking at the code I didn't find any low latency/preempt 
patches (well this is still a 2.4.x kernel, so no problem) so I went to 
the internet and found 2.4.25-low-latency.patch.gz (that is fails to 
apply at one file anyway) but I couldn't find preemptible patch for this 
version of kernel.
I found preempt-kernel-rml-2.4.23-pre5-1.patch and 
preempt-kernel-rml-2.4.26-pre5-1.patch which are pretty close but not 
exactly for the same version.

Is anybody using linux_2_4_devel from denx.de for 'soft' real-time 
embedded targets?

Thank you

Dmytro

^ permalink raw reply

* error when loading shared library
From: Maziah Mat @ Mohamad @ 2005-08-15  3:36 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

Hi,
 
I working with MPC8560ADS development which loaded with the ppc-linux glibc -3.3.2.
 
When running the software, faced error which state error while loading shared libraries:/lib/libdb.so.3.. 
 
Could you please advise, where is the good link to download the required shared libraries that working for ppc-linux.
 
Thanks!!!
 
maziah
 
 
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[-- Attachment #2: Type: text/html, Size: 1778 bytes --]

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Shawn Jin @ 2005-08-14 18:53 UTC (permalink / raw)
  To: Arthur Othieno; +Cc: ppcembed
In-Reply-To: <20050814163616.GA2726@mars>

>   http://lwn.net/Articles/132804/

This is what exactly I want. Thanks for the URL.

-Shawn.

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Shawn Jin @ 2005-08-14 18:16 UTC (permalink / raw)
  To: Shawn Jin, ppcembed
In-Reply-To: <20050814042556.GB23952@gate.ebshome.net>

> > The problem is that read*()/write*() are misused in some places, e.g.,
> > serial drivers such as serial8250. The serial_in() and serial_out()
> > call read*() and write*() respectively. So what's your recommendation
> > in such a case?
>=20
> Why do you think this is a problem? Why do you think they are
> misused? Please explain.

IMHO, serial_in() and serial_out() should be able to handle all the
possilbilities. But the current implementation cannot achieve this by
simply calling read*() and write*() in the case that UART control
registers are 32-bit or 16-bit wide and can only be acessed in 32/16
bits in some big endian systems. As Matt pointed out before, read*()
and write*() are designed for PCI access only.

Regards,
-Shawn.

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Arthur Othieno @ 2005-08-14 16:36 UTC (permalink / raw)
  To: Shawn Jin; +Cc: ppcembed
In-Reply-To: <c3d0340b0508132056651e8c97@mail.gmail.com>

On Sat, Aug 13, 2005 at 08:56:50PM -0700, Shawn Jin wrote:
> > read*()/write*() are accessors for PCI and PCI only.  PCI is little
> 
> If read*()/write*() are designed for PCI access only as you claimed,
> that explains why they call in/out_leXX() funcitons.
> 
> The problem is that read*()/write*() are misused in some places, e.g.,
> serial drivers such as serial8250. The serial_in() and serial_out()
> call read*() and write*() respectively. So what's your recommendation
> in such a case?
 
See here for the gory details:

  http://lwn.net/Articles/102232/
  http://lwn.net/Articles/132804/

	Arthur

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Matt Porter @ 2005-08-14 16:14 UTC (permalink / raw)
  To: Shawn Jin; +Cc: ppcembed
In-Reply-To: <c3d0340b0508132056651e8c97@mail.gmail.com>

On Sat, Aug 13, 2005 at 08:56:50PM -0700, Shawn Jin wrote:
> > read*()/write*() are accessors for PCI and PCI only.  PCI is little
> 
> If read*()/write*() are designed for PCI access only as you claimed,
> that explains why they call in/out_leXX() funcitons.
> 
> The problem is that read*()/write*() are misused in some places, e.g.,
> serial drivers such as serial8250. The serial_in() and serial_out()
> call read*() and write*() respectively. So what's your recommendation
> in such a case?

Keep misusing them. There's no generic accessors for memory mapped
I/O.  People just started using them in generic drivers because they
are convenient. I use the the __raw_read*() for non byte swapped access
(or in/outbe32() depending on my memory barrier requirements.

Also, portions of the 8250 serial driver using readl/writel are
assuming that the serial port in on PCI or other little endian bus.
readb/writeb usage doesn't matter in that driver.

-Matt

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Eugene Surovegin @ 2005-08-14  4:25 UTC (permalink / raw)
  To: Shawn Jin; +Cc: ppcembed
In-Reply-To: <c3d0340b0508132056651e8c97@mail.gmail.com>

On Sat, Aug 13, 2005 at 08:56:50PM -0700, Shawn Jin wrote:
> > read*()/write*() are accessors for PCI and PCI only.  PCI is little
> 
> If read*()/write*() are designed for PCI access only as you claimed,
> that explains why they call in/out_leXX() funcitons.
> 
> The problem is that read*()/write*() are misused in some places, e.g.,
> serial drivers such as serial8250. The serial_in() and serial_out()
> call read*() and write*() respectively. So what's your recommendation
> in such a case?

Why do you think this is a problem? Why do you think they are 
misused? Please explain. 

FYI, there _are_ serial PCI cards.

-- 
Eugene

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Shawn Jin @ 2005-08-14  3:56 UTC (permalink / raw)
  To: Matt Porter; +Cc: ppcembed
In-Reply-To: <20050812203335.K30033@cox.net>

> read*()/write*() are accessors for PCI and PCI only.  PCI is little

If read*()/write*() are designed for PCI access only as you claimed,
that explains why they call in/out_leXX() funcitons.

The problem is that read*()/write*() are misused in some places, e.g.,
serial drivers such as serial8250. The serial_in() and serial_out()
call read*() and write*() respectively. So what's your recommendation
in such a case?

Regards,
-Shawn.

^ permalink raw reply

* Re: [PATCH] add field to struct ocp_func_emac_data for platform-specific unsupported PHY features
From: Eugene Surovegin @ 2005-08-13 19:35 UTC (permalink / raw)
  To: Wade Farnsworth, Matt Porter, linuxppc-embedded
In-Reply-To: <20050813193220.GA19431@gate.ebshome.net>

On Sat, Aug 13, 2005 at 12:32:21PM -0700, Eugene Surovegin wrote:
> On Thu, Aug 11, 2005 at 01:42:07PM -0700, Wade Farnsworth wrote:
> 
> [snip]
> 
> > diff -upr linux-2.6/include/asm-ppc/ibm_ocp.h linux-2.6-dev/include/asm-ppc/ibm_ocp.h
> > --- linux-2.6/include/asm-ppc/ibm_ocp.h	2005-08-11 13:30:02.000000000 -0700
> > +++ linux-2.6-dev/include/asm-ppc/ibm_ocp.h	2005-08-11 13:12:34.000000000 -0700
> > @@ -67,6 +67,7 @@ struct ocp_func_emac_data {
> >  	int	phy_mode;	/* PHY type or configurable mode */
> >  	u8	mac_addr[6];	/* EMAC mac address */
> >  	u32	phy_map;	/* EMAC phy map */
> > +	u32	phy_feat_exc;	/* Excluded PHY features */
> >  };
> >  
> >  /* Sysfs support */
> 
> Please, update OCP_SYSFS_EMAC_DATA() macro as well.

Also, I just noticed, Matt suggested different name for this member 
two e-mails ago :)

-- 
Eugene

^ permalink raw reply

* Re: [PATCH] add field to struct ocp_func_emac_data for platform-specific unsupported PHY features
From: Eugene Surovegin @ 2005-08-13 19:32 UTC (permalink / raw)
  To: Wade Farnsworth; +Cc: linuxppc-embedded
In-Reply-To: <1123792927.27880.34.camel@rhino.az.mvista.com>

On Thu, Aug 11, 2005 at 01:42:07PM -0700, Wade Farnsworth wrote:

[snip]

> diff -upr linux-2.6/include/asm-ppc/ibm_ocp.h linux-2.6-dev/include/asm-ppc/ibm_ocp.h
> --- linux-2.6/include/asm-ppc/ibm_ocp.h	2005-08-11 13:30:02.000000000 -0700
> +++ linux-2.6-dev/include/asm-ppc/ibm_ocp.h	2005-08-11 13:12:34.000000000 -0700
> @@ -67,6 +67,7 @@ struct ocp_func_emac_data {
>  	int	phy_mode;	/* PHY type or configurable mode */
>  	u8	mac_addr[6];	/* EMAC mac address */
>  	u32	phy_map;	/* EMAC phy map */
> +	u32	phy_feat_exc;	/* Excluded PHY features */
>  };
>  
>  /* Sysfs support */

Please, update OCP_SYSFS_EMAC_DATA() macro as well.

-- 
Eugene

^ permalink raw reply

* 8xx: i2c-algo-8xx - fixed timeout detection and transmission errors
From: Joakim Tjernlund @ 2005-08-13 15:13 UTC (permalink / raw)
  To: linuxppc-embedded

> My description seems to be a little misleading.
> WITHOUT the force_reinit() my SPI driver reports transmission errors if the
> I2C bus has longer disturbances.
> WITH the force_reinit() my SPI driver works fine.
> This sounds like the I2C allocates a new buffer for every timed-out
> transmision. If all I2C buffers are full, the SPI buffers get overwritten
> !?
> I did not really trace back the problem, this is only my suspicion.
> Because the  force_reinit() resets all the buffer pointer to their init
> values the problem with the SPI does not occur.
> 
> Cajus

I think the problem is that the CPM is still waiting on the SCL long after the timeout has happen.
A complete reinit will reset the I2C part of the CPM.

I think you should be able to get away with less, maybe it will enough to disable
I2C (i2c->i2c_i2mod &= ~1) and/or clear internal state (iip->iic_rstate   = 0; iip->iic_tstate   = 0;)
after a timeout?

 Jocke

^ permalink raw reply

* Re: writel(), readl() in <asm-ppc/io.h>
From: Matt Porter @ 2005-08-13  3:33 UTC (permalink / raw)
  To: Shawn Jin; +Cc: ppcembed
In-Reply-To: <c3d0340b0508121811e7b6fc2@mail.gmail.com>

On Fri, Aug 12, 2005 at 06:11:14PM -0700, Shawn Jin wrote:
> Hi,
> 
> In <asm-ppc/io.h>, writew(), readw(), writel(), and readl() are
> defined to little endian access for all platforms unless either
> CONFIG_APUS or CONFIG_8260_PCI9 is defined.
> 
> Why? Aren't they correct in big endian systems, are they? Maybe I miss
> something here.

I'm not sure what your qustion is but I'll take a stab at an answer. :)

read*()/write*() are accessors for PCI and PCI only.  PCI is little
endian. PPC is big endian.  All platforms must byte swap on access
to PCI memory space except in special cases.  The two exceptions
must byte swap in hardware. Looks like it is due to errata in the
8260 PCI bridge case. APUS is probably byte swapping in hardware
because APUS is simply odd.

-Matt

^ permalink raw reply

* writel(), readl() in <asm-ppc/io.h>
From: Shawn Jin @ 2005-08-13  1:11 UTC (permalink / raw)
  To: ppcembed

Hi,

In <asm-ppc/io.h>, writew(), readw(), writel(), and readl() are
defined to little endian access for all platforms unless either
CONFIG_APUS or CONFIG_8260_PCI9 is defined.

Why? Aren't they correct in big endian systems, are they? Maybe I miss
something here.

Regards,
-Shawn.

^ permalink raw reply

* Multiple I2C busses on PPC405
From: Tolunay Orkun @ 2005-08-12 22:37 UTC (permalink / raw)
  To: linuxppc-embedded

I have a working embedded linux on Cogent CSB472 board (PPC405GP) 
currently based on off 2.4.31. We are already using the I2C bus on 
PowerPC using hardware I2C driver (IBM IIC I2C Interface) at Fast 
(400khz) mode.

We need to add support for yet another (slow) I2C bus with PPC405 being 
the master and I'm looking at implementing bit bang interface using GPIO 
pins.

What is the best way to get this going? I am looking at modifying the 
bit bang driver (PPC_405_I2C_Algorithm?) for the I/O pins I'll use. 
Anyone has done something similar. I appreciate all the advice I can get.

Best Regards,
Tolunay

^ permalink raw reply

* Re: What's wrong with the serial port?
From: Shawn Jin @ 2005-08-12 21:38 UTC (permalink / raw)
  To: ppcembed
In-Reply-To: <c3d0340b05081214282adeda4c@mail.gmail.com>

> Has the serial port enabled interrupt so far at this stage?

Don't bother. I found the answer. console_init() is before
local_irq_enable(). So no interrupt is enabled before
local_irq_enable().

-Shawn.

^ permalink raw reply

* Re: What's wrong with the serial port?
From: Shawn Jin @ 2005-08-12 21:28 UTC (permalink / raw)
  To: ppcembed
In-Reply-To: <20050811231710.GB5796@gate.ebshome.net>

On 8/11/05, Eugene Surovegin <ebs@ebshome.net> wrote:
> On Thu, Aug 11, 2005 at 04:14:54PM -0700, Eugene Surovegin wrote:
> > > MMU:exit
> > > setup_arch: enter
> > > setup_arch: bootmem
> > > arch: exit
> > > ??????
> >
> > Try disabling early text debugging (all that "MMU:..." stuff).
> >
>=20
> Also, make sure you pass correct "console=3D..." line to the kernel
> (with correct device name and baud rate).

After early text debugging is disabled and the correct "console=3DttyS0,
115200" option is passed to kernel, the problem still exists. Also I'm
sure the divisor set to UART is also correct because they are the same
values when U-Boot sets up the port.

Has the serial port enabled interrupt so far at this stage?

Thanks,
-Shawn.

^ permalink raw reply

* Re: [PATCH] identify_ppc_sys_by_name_and_id function implementation final
From: Kumar Gala @ 2005-08-12 19:48 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: linuxppc-embedded list
In-Reply-To: <42FCCEA4.2030409@ru.mvista.com>

On Aug 12, 2005, at 11:30 AM, Vitaly Bordug wrote:

> Kumar Gala wrote:
>
>> Can you do a sizeof instead?
>>
>> #define num_ele sizeof(ppc_sys_specs[])/sizeof(struct ppc_sys_spec)
>>
>> Something like matchted[num_ele] ??
>>
>>
>
> That's what the first I tried actually :)
> gcc is not happy with it:
>
> arch/ppc/syslib/ppc_sys.c: In function `find_chip_by_name_and_id':
> arch/ppc/syslib/ppc_sys.c:54: error: parse error before ']' token
>
> and if I remove [] from the ppc_sys_specs, it outputs:
>
> arch/ppc/syslib/ppc_sys.c: In function `find_chip_by_name_and_id':
> arch/ppc/syslib/ppc_sys.c:54: error: invalid application of  
> `sizeof' to
> incomplete type `({anonymous})'
>
> So I cannot use sizeof this case, I think...

Realized the same thing.  I'm thinking that your original method is  
the best solution to just do this on the stack.  In general the  
number or processors (array size) is going to be less than 100.  So  
at most this array is going to end up being 100 bytes on the stack.   
I dont think that's a big deal at the point we are calling this.

- kumar

^ permalink raw reply

* [PATCH] ppc32: Cleaned up global namespace of Book-E watchdog variables
From: Kumar Gala @ 2005-08-12 19:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linuxppc-embedded

Renamed global variables used to convey if the watchdog is enabled and
periodicity of the timer and moved the declarations into a header for these
variables

Signed-off-by: Matt McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>

---
commit 9aa56fc06c3b2cbd116fa42c3fee5f227c3ff27c
tree 331dbfbfda8463f584578ad788411cb0aabcd746
parent d6dee08c314c1952921adc99e8f5ff6c332341ef
author Kumar K. Gala <kumar.gala@freescale.com> Fri, 12 Aug 2005 14:39:28 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Fri, 12 Aug 2005 14:39:28 -0500

 arch/ppc/kernel/setup.c           |    8 ++------
 drivers/char/watchdog/Kconfig     |    3 +++
 drivers/char/watchdog/booke_wdt.c |   23 ++++++++++++-----------
 include/asm-ppc/system.h          |    4 ++++
 4 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -619,10 +619,8 @@ machine_init(unsigned long r3, unsigned 
 /* Checks wdt=x and wdt_period=xx command-line option */
 int __init early_parse_wdt(char *p)
 {
-	extern u32 wdt_enable;
-
 	if (p && strncmp(p, "0", 1) != 0)
-	       wdt_enable = 1;
+	       booke_wdt_enabled = 1;
 
 	return 0;
 }
@@ -630,10 +628,8 @@ early_param("wdt", early_parse_wdt);
 
 int __init early_parse_wdt_period (char *p)
 {
-	extern u32 wdt_period;
-
 	if (p)
-		wdt_period = simple_strtoul(p, NULL, 0);
+		booke_wdt_period = simple_strtoul(p, NULL, 0);
 
 	return 0;
 }
diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig
--- a/drivers/char/watchdog/Kconfig
+++ b/drivers/char/watchdog/Kconfig
@@ -349,6 +349,9 @@ config 8xx_WDT
 config BOOKE_WDT
 	tristate "PowerPC Book-E Watchdog Timer"
 	depends on WATCHDOG && (BOOKE || 4xx)
+	---help---
+	  Please see Documentation/watchdog/watchdog-api.txt for
+	  more information.
 
 # MIPS Architecture
 
diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c
--- a/drivers/char/watchdog/booke_wdt.c
+++ b/drivers/char/watchdog/booke_wdt.c
@@ -23,6 +23,7 @@
 
 #include <asm/reg_booke.h>
 #include <asm/uaccess.h>
+#include <asm/system.h>
 
 /* If the kernel parameter wdt_enable=1, the watchdog will be enabled at boot.
  * Also, the wdt_period sets the watchdog timer period timeout.
@@ -38,8 +39,8 @@
 #define WDT_PERIOD_DEFAULT 4	/* Refer to the PPC40x and PPC4xx manuals */
 #endif				/* for timing information */
 
-u32 wdt_enable = 0;
-u32 wdt_period = WDT_PERIOD_DEFAULT;
+u32 booke_wdt_enabled = 0;
+u32 booke_wdt_period = WDT_PERIOD_DEFAULT;
 
 #ifdef	CONFIG_FSL_BOOKE
 #define WDTP(x)		((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15))
@@ -55,7 +56,7 @@ static __inline__ void booke_wdt_enable(
 	u32 val;
 
 	val = mfspr(SPRN_TCR);
-	val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(wdt_period));
+	val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period));
 
 	mtspr(SPRN_TCR, val);
 }
@@ -108,12 +109,12 @@ static int booke_wdt_ioctl (struct inode
 		booke_wdt_ping();
 		return 0;
 	case WDIOC_SETTIMEOUT:
-		if (get_user(wdt_period, (u32 *) arg))
+		if (get_user(booke_wdt_period, (u32 *) arg))
 			return -EFAULT;
-		mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(wdt_period));
+		mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period));
 		return 0;
 	case WDIOC_GETTIMEOUT:
-		return put_user(wdt_period, (u32 *) arg);
+		return put_user(booke_wdt_period, (u32 *) arg);
 	case WDIOC_SETOPTIONS:
 		if (get_user(tmp, (u32 *) arg))
 			return -EINVAL;
@@ -134,11 +135,11 @@ static int booke_wdt_ioctl (struct inode
  */
 static int booke_wdt_open (struct inode *inode, struct file *file)
 {
-	if (wdt_enable == 0) {
-		wdt_enable = 1;
+	if (booke_wdt_enabled == 0) {
+		booke_wdt_enabled = 1;
 		booke_wdt_enable();
 		printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
-				wdt_period);
+				booke_wdt_period);
 	}
 
 	return 0;
@@ -180,9 +181,9 @@ static int __init booke_wdt_init(void)
 		return ret;
 	}
 
-	if (wdt_enable == 1) {
+	if (booke_wdt_enabled == 1) {
 		printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
-				wdt_period);
+				booke_wdt_period);
 		booke_wdt_enable();
 	}
 
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
--- a/include/asm-ppc/system.h
+++ b/include/asm-ppc/system.h
@@ -87,6 +87,10 @@ extern void cacheable_memzero(void *p, u
 extern int do_page_fault(struct pt_regs *, unsigned long, unsigned long);
 extern void bad_page_fault(struct pt_regs *, unsigned long, int);
 extern void die(const char *, struct pt_regs *, long);
+#ifdef CONFIG_BOOKE_WDT
+extern u32 booke_wdt_enabled;
+extern u32 booke_wdt_period;
+#endif /* CONFIG_BOOKE_WDT */
 
 struct device_node;
 extern void note_scsi_host(struct device_node *, void *);

^ permalink raw reply

* [PATCH] cpm_uart: Fix 2nd serial port on MPC8560 ADS
From: Kumar Gala @ 2005-08-12 16:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: tie-fei.zang, linux-kernel, linuxppc-embedded

The 2nd serial port on the MPC8560 ADS was not being configured correctly
and thus could not be used as a console.  Updated the defconfig for the
board to configure the proper SCC channel for the 2nd serial port.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>

---
commit 51a75dcea8fe0407f06467de36e258616cda68f9
tree 6adc8ec04a037f64f77e8f17669dec8532557d08
parent 468e916c3b742602a0a10fa12dab015531cd4843
author Kumar K. Gala <kumar.gala@freescale.com> Fri, 12 Aug 2005 11:24:12 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Fri, 12 Aug 2005 11:24:12 -0500

 arch/ppc/configs/mpc8560_ads_defconfig  |  273 ++++++++++++++++++-------------
 drivers/serial/cpm_uart/cpm_uart_cpm2.c |    9 +
 2 files changed, 171 insertions(+), 111 deletions(-)

diff --git a/arch/ppc/configs/mpc8560_ads_defconfig b/arch/ppc/configs/mpc8560_ads_defconfig
--- a/arch/ppc/configs/mpc8560_ads_defconfig
+++ b/arch/ppc/configs/mpc8560_ads_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11-rc1
-# Thu Jan 20 01:24:56 2005
+# Linux kernel version: 2.6.13-rc6
+# Thu Aug 11 18:14:45 2005
 #
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
@@ -11,6 +11,7 @@ CONFIG_HAVE_DEC_LOCK=y
 CONFIG_PPC=y
 CONFIG_PPC32=y
 CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 
 #
 # Code maturity level options
@@ -18,6 +19,7 @@ CONFIG_GENERIC_NVRAM=y
 CONFIG_EXPERIMENTAL=y
 CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
 # General setup
@@ -29,12 +31,14 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_HOTPLUG is not set
 CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 CONFIG_EMBEDDED=y
 # CONFIG_KALLSYMS is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 # CONFIG_EPOLL is not set
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -44,6 +48,7 @@ CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
 # CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
 
 #
 # Loadable module support
@@ -59,12 +64,16 @@ CONFIG_CC_ALIGN_JUMPS=0
 # CONFIG_POWER3 is not set
 # CONFIG_POWER4 is not set
 # CONFIG_8xx is not set
+# CONFIG_E200 is not set
 CONFIG_E500=y
 CONFIG_BOOKE=y
 CONFIG_FSL_BOOKE=y
+# CONFIG_PHYS_64BIT is not set
 CONFIG_SPE=y
 CONFIG_MATH_EMULATION=y
+# CONFIG_KEXEC is not set
 # CONFIG_CPU_FREQ is not set
+# CONFIG_PM is not set
 CONFIG_85xx=y
 CONFIG_PPC_INDIRECT_PCI_BE=y
 
@@ -72,9 +81,11 @@ CONFIG_PPC_INDIRECT_PCI_BE=y
 # Freescale 85xx options
 #
 # CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8548_CDS is not set
 # CONFIG_MPC8555_CDS is not set
 CONFIG_MPC8560_ADS=y
 # CONFIG_SBC8560 is not set
+# CONFIG_STX_GP3 is not set
 CONFIG_MPC8560=y
 
 #
@@ -83,11 +94,25 @@ CONFIG_MPC8560=y
 CONFIG_CPM2=y
 # CONFIG_PC_KEYBOARD is not set
 # CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
 # CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_CMDLINE_BOOL is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
 
 #
 # Bus options
@@ -103,10 +128,6 @@ CONFIG_PCI_NAMES=y
 # CONFIG_PCCARD is not set
 
 #
-# PC-card bridges
-#
-
-#
 # Advanced setup
 #
 # CONFIG_ADVANCED_OPTIONS is not set
@@ -121,6 +142,69 @@ CONFIG_TASK_SIZE=0x80000000
 CONFIG_BOOT_LOAD=0x00800000
 
 #
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+
+#
 # Device Drivers
 #
 
@@ -193,6 +277,7 @@ CONFIG_IOSCHED_CFQ=y
 #
 # Fusion MPT device support
 #
+# CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -209,71 +294,8 @@ CONFIG_IOSCHED_CFQ=y
 #
 
 #
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
+# Network device support
 #
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -311,8 +333,10 @@ CONFIG_MII=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SKGE is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
 CONFIG_GFAR_NAPI=y
 
@@ -342,6 +366,8 @@ CONFIG_GFAR_NAPI=y
 # CONFIG_SLIP is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
 # ISDN subsystem
@@ -368,14 +394,6 @@ CONFIG_INPUT=y
 # CONFIG_INPUT_EVBUG is not set
 
 #
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-# CONFIG_SERIO is not set
-# CONFIG_SERIO_I8042 is not set
-
-#
 # Input Device Drivers
 #
 # CONFIG_INPUT_KEYBOARD is not set
@@ -385,6 +403,12 @@ CONFIG_SOUND_GAMEPORT=y
 # CONFIG_INPUT_MISC is not set
 
 #
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
 # Character devices
 #
 # CONFIG_VT is not set
@@ -403,11 +427,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_CPM=y
 CONFIG_SERIAL_CPM_CONSOLE=y
 CONFIG_SERIAL_CPM_SCC1=y
-# CONFIG_SERIAL_CPM_SCC2 is not set
+CONFIG_SERIAL_CPM_SCC2=y
 # CONFIG_SERIAL_CPM_SCC3 is not set
-CONFIG_SERIAL_CPM_SCC4=y
+# CONFIG_SERIAL_CPM_SCC4 is not set
 # CONFIG_SERIAL_CPM_SMC1 is not set
 # CONFIG_SERIAL_CPM_SMC2 is not set
+# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -436,6 +461,11 @@ CONFIG_GEN_RTC=y
 # CONFIG_RAW_DRIVER is not set
 
 #
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
 # I2C support
 #
 CONFIG_I2C=y
@@ -458,11 +488,11 @@ CONFIG_I2C_CHARDEV=y
 # CONFIG_I2C_AMD8111 is not set
 # CONFIG_I2C_I801 is not set
 # CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_ISA is not set
 CONFIG_I2C_MPC=y
 # CONFIG_I2C_NFORCE2 is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_PROSAVAGE is not set
 # CONFIG_I2C_SAVAGE4 is not set
 # CONFIG_SCx200_ACB is not set
@@ -473,19 +503,46 @@ CONFIG_I2C_MPC=y
 # CONFIG_I2C_VIAPRO is not set
 # CONFIG_I2C_VOODOO3 is not set
 # CONFIG_I2C_PCA_ISA is not set
+# CONFIG_I2C_SENSOR is not set
 
 #
-# Hardware Sensors Chip support
+# Miscellaneous I2C Chip support
 #
-# CONFIG_I2C_SENSOR is not set
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_M41T00 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
 # CONFIG_SENSORS_ADM1021 is not set
 # CONFIG_SENSORS_ADM1025 is not set
 # CONFIG_SENSORS_ADM1026 is not set
 # CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
 # CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
 # CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_IT87 is not set
 # CONFIG_SENSORS_LM63 is not set
 # CONFIG_SENSORS_LM75 is not set
@@ -496,31 +553,18 @@ CONFIG_I2C_MPC=y
 # CONFIG_SENSORS_LM85 is not set
 # CONFIG_SENSORS_LM87 is not set
 # CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
-
-#
-# Other I2C Chip support
-#
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
 # Misc devices
@@ -540,7 +584,6 @@ CONFIG_I2C_MPC=y
 # Graphics support
 #
 # CONFIG_FB is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -550,13 +593,9 @@ CONFIG_I2C_MPC=y
 #
 # USB support
 #
-# CONFIG_USB is not set
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
-#
+# CONFIG_USB is not set
 
 #
 # USB Gadget Support
@@ -574,10 +613,15 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 # CONFIG_INFINIBAND is not set
 
 #
+# SN Devices
+#
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 # CONFIG_EXT3_FS_POSIX_ACL is not set
@@ -587,9 +631,15 @@ CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+
+#
+# XFS support
+#
 # CONFIG_XFS_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
 # CONFIG_QUOTA is not set
 CONFIG_DNOTIFY=y
 # CONFIG_AUTOFS_FS is not set
@@ -614,7 +664,6 @@ CONFIG_DNOTIFY=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
 # CONFIG_TMPFS_XATTR is not set
@@ -648,7 +697,7 @@ CONFIG_NFS_FS=y
 # CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
-# CONFIG_EXPORTFS is not set
+CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -700,7 +749,9 @@ CONFIG_CRC32=y
 #
 # Kernel hacking
 #
+# CONFIG_PRINTK_TIME is not set
 # CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_KGDB_CONSOLE is not set
 
 #
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -142,12 +142,21 @@ void scc2_lineif(struct uart_cpm_port *p
 	 * be supported in a sane fashion.
 	 */
 #ifndef CONFIG_STX_GP3
+#ifdef CONFIG_MPC8560_ADS
+	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
+	io->iop_ppard |= 0x00000018;
+	io->iop_psord &= ~0x00000008;	/* Rx */
+	io->iop_psord &= ~0x00000010;	/* Tx */
+	io->iop_pdird &= ~0x00000008;	/* Rx */
+	io->iop_pdird |= 0x00000010;	/* Tx */
+#else
 	volatile iop_cpm2_t *io = &cpm2_immr->im_ioport;
 	io->iop_pparb |= 0x008b0000;
 	io->iop_pdirb |= 0x00880000;
 	io->iop_psorb |= 0x00880000;
 	io->iop_pdirb &= ~0x00030000;
 	io->iop_psorb &= ~0x00030000;
+#endif
 #endif
 	cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff;
 	cpm2_immr->im_cpmux.cmx_scr |= 0x00090000;

^ permalink raw reply

* Re: [PATCH] identify_ppc_sys_by_name_and_id function implementation final
From: Vitaly Bordug @ 2005-08-12 16:30 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-embedded list
In-Reply-To: <12EA7634-C020-4B0A-BCF0-80B11E4E55D2@freescale.com>

Kumar Gala wrote:
> Can you do a sizeof instead?
> 
> #define num_ele sizeof(ppc_sys_specs[])/sizeof(struct ppc_sys_spec)
> 
> Something like matchted[num_ele] ??
> 

That's what the first I tried actually :)
gcc is not happy with it:

arch/ppc/syslib/ppc_sys.c: In function `find_chip_by_name_and_id':
arch/ppc/syslib/ppc_sys.c:54: error: parse error before ']' token

and if I remove [] from the ppc_sys_specs, it outputs:

arch/ppc/syslib/ppc_sys.c: In function `find_chip_by_name_and_id':
arch/ppc/syslib/ppc_sys.c:54: error: invalid application of `sizeof' to 
incomplete type `({anonymous})'

So I cannot use sizeof this case, I think...
> - kumar
> 
> On Aug 12, 2005, at 10:37 AM, Vitaly Bordug wrote:
> 
>> Marcelo Tosatti wrote:
>>
>>> On Thu, Aug 11, 2005 at 07:25:20PM +0400, Vitaly Bordug wrote:
>>>
>>>
>>>> Marcelo Tosatti wrote:
>>>>
>>>>
>>>>> On Wed, Aug 10, 2005 at 02:16:57PM -0500, Kumar Gala wrote:
>>>>>
>>>>>
>>>>>
>>>>>> +static int __init find_chip_by_name_and_id(char *name, u32 id)
>>>>>> +{
>>>>>> +    int ret = -1;
>>>>>> +    unsigned int i = 0;
>>>>>> +    unsigned int j = 0;
>>>>>> +    unsigned int dups = 0;
>>>>>> +
>>>>>> +    unsigned int matched[count_sys_specs()];
>>>>>>
>>>>>> Is is legit in the kernel to use dynamically sized array?
>>>>>>
>>>>>
>>>>>
>>>>> kmalloc() is certainly safer - why not use it?
>>>>>
>>>>
>>>> Practically , version with kmalloc works, but  setup_arch and  thus 
>>>> this
>>>> function is called before mem_init, so I just wonder if kmalloc can
>>>> handle this case. On the other hand, I don't like to deal with
>>>> alloc_bootmem() if mem_init_done!=1 and kmalloc otherwise (like ocp
>>>> does) just for the temporary buffer.
>>>>
>>>> But it's the only _right_ way (or I 've missed something) - sure  I'll
>>>> follow it.
>>>>
>>>
>>>
>>> I dont see any problem with dynamic array usage on the kernel  (maybe 
>>> someone
>>> else has good argumentation against it).
>>>
>>> Just that you have a 4kb stack. Does count_sys_specs() have an  
>>> appropriate
>>> maximum?
>>>
>>>
>>>
>> Yes it does, but there is no define for it. The ppc_sys_specs array
>> should always end at the "default match" - element with name field set
>> to "" and value=0 (without it every existing ppc_sys identify will  fall
>> into infinite loop). This array is defined in syslib/<board>_sys.c end
>> is finite of course. Its size depends on amount of supported boards.
>>
>> So, if the dynamic array is ok with conditions, it will be great.
>> But now I'm inclined to implement the same using kmalloc/alloc_bootmem
>> to prevent flame when it will proceed. BTW, will free_bootmem properly
>> release the memory allocated by alloc_bootmem()? I haven't encountered
>> examples of this so far...
>>
>>
>> -- 
>> Sincerely,
>> Vitaly
>>
> 
> 


-- 
Sincerely,
Vitaly

^ permalink raw reply

* Re: [PATCH] identify_ppc_sys_by_name_and_id function implementation final
From: Kumar Gala @ 2005-08-12 16:18 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: linuxppc-embedded list
In-Reply-To: <42FCC234.8070008@ru.mvista.com>

Can you do a sizeof instead?

#define num_ele sizeof(ppc_sys_specs[])/sizeof(struct ppc_sys_spec)

Something like matchted[num_ele] ??

- kumar

On Aug 12, 2005, at 10:37 AM, Vitaly Bordug wrote:

> Marcelo Tosatti wrote:
>
>> On Thu, Aug 11, 2005 at 07:25:20PM +0400, Vitaly Bordug wrote:
>>
>>
>>> Marcelo Tosatti wrote:
>>>
>>>
>>>> On Wed, Aug 10, 2005 at 02:16:57PM -0500, Kumar Gala wrote:
>>>>
>>>>
>>>>
>>>>> +static int __init find_chip_by_name_and_id(char *name, u32 id)
>>>>> +{
>>>>> +    int ret = -1;
>>>>> +    unsigned int i = 0;
>>>>> +    unsigned int j = 0;
>>>>> +    unsigned int dups = 0;
>>>>> +
>>>>> +    unsigned int matched[count_sys_specs()];
>>>>>
>>>>> Is is legit in the kernel to use dynamically sized array?
>>>>>
>>>>
>>>>
>>>> kmalloc() is certainly safer - why not use it?
>>>>
>>>
>>> Practically , version with kmalloc works, but  setup_arch and  
>>> thus this
>>> function is called before mem_init, so I just wonder if kmalloc can
>>> handle this case. On the other hand, I don't like to deal with
>>> alloc_bootmem() if mem_init_done!=1 and kmalloc otherwise (like ocp
>>> does) just for the temporary buffer.
>>>
>>> But it's the only _right_ way (or I 've missed something) - sure  
>>> I'll
>>> follow it.
>>>
>>
>>
>> I dont see any problem with dynamic array usage on the kernel  
>> (maybe someone
>> else has good argumentation against it).
>>
>> Just that you have a 4kb stack. Does count_sys_specs() have an  
>> appropriate
>> maximum?
>>
>>
>>
> Yes it does, but there is no define for it. The ppc_sys_specs array
> should always end at the "default match" - element with name field set
> to "" and value=0 (without it every existing ppc_sys identify will  
> fall
> into infinite loop). This array is defined in syslib/<board>_sys.c end
> is finite of course. Its size depends on amount of supported boards.
>
> So, if the dynamic array is ok with conditions, it will be great.
> But now I'm inclined to implement the same using kmalloc/alloc_bootmem
> to prevent flame when it will proceed. BTW, will free_bootmem properly
> release the memory allocated by alloc_bootmem()? I haven't encountered
> examples of this so far...
>
>
> -- 
> Sincerely,
> Vitaly
>

^ permalink raw reply


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