LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* I2S driver
From: Angelo @ 2008-03-04 10:26 UTC (permalink / raw)
  To: Linuxppc-embedded

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


Angelo wrote:
> Timur wrote:
>>I wrote an ASoC driver for the MPC8610, which also has 
>>an I2S interface.  You can find it in sound/soc/fsl.
> 
> in my kernel version (2.6.22) there isn't any folder named
> fsl in sound/soc/

> Timur wrote:
> It's in 2.6.25.


The main problem is that in the feature of MPC8610 you can find:
  Two synchronous serial interface (SSI) controllers for I2S or AC97   
  audio     inputs/outputs

while in MPC5200b's feature there's only:
  I2S (up to three)
However the main difference features:
MPC5200B: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC5200B&nodeId=0162468rH3bTdG0898
MPC8610:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8610

What do you think on this difference?




       
---------------------------------

---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail

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

^ permalink raw reply

* Xilinx git tree, LLTemac driver
From: Magnus Hjorth @ 2008-03-04  9:57 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: git

Hi,

I'm trying to compile the Linux kernel from the Xilinx git tree
(linux-2.6-xlnx) and am having some trouble with the LLTemac driver, =
having
to do with MAC address settings.=20

There seems to be two routines getting the MAC address in different =
ways.
The xtenet_probe function tries to access an extern bd_t __res, the type
bd_t doesn't exist in the powerpc tree which causes the compilation to =
fail.
Then there is the xtenet_of_probe function which uses =
of_get_mac_address.

What confuses me is that both the regular and the OF driver is =
registered in
the xtenet_init function, I would have expected it to be either/or.=20

Can I expect under the powerpc arch and supplying a .dts file, that the
xtenet_probe function will never be called?=20

Best regards,
Magnus


--

Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30  V=E4stra Fr=F6lunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se

^ permalink raw reply

* Re: [PATCH 11/17] Add memory mapping driver to RapidIO.
From: Stephen Rothwell @ 2008-03-04 10:37 UTC (permalink / raw)
  To: Zhang Wei; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1204648202-5495-11-git-send-email-wei.zhang@freescale.com>

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

On Wed,  5 Mar 2008 00:29:56 +0800 Zhang Wei <wei.zhang@freescale.com> wrote:
>
> +	if (!(rmem->virt = dma_alloc_coherent(NULL, rmem->size,
> +				&rmem->iores.start, GFP_KERNEL))) {

Please separate assignments from tests.

> +	if ((ret = rio_space_claim(rmem))) {

Again.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [BUG] 2.6.25-rc3-mm1 kernel panic while bootup on powerpc ()
From: Kamalesh Babulal @ 2008-03-04 13:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20080304011928.e8c82c0c.akpm@linux-foundation.org>

Hi Andrew,

The 2.6.25-rc3-mm1 kernel panics while bootup on power box. The machine booted up
without the panic on the third attempt, but badness call trace were seen while running
tests

1) The kernel panic on first attempt

Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc00000000000cb2c
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=128 NUMA pSeries
Modules linked in:
NIP: c00000000000cb2c LR: c00000000000caf8 CTR: 0000000000000226
REGS: c00000000068f360 TRAP: 0300   Not tainted  (2.6.25-rc3-mm1-autotest)
MSR: 8000000000001032 <ME,IR,DR>  CR: 28000024  XER: 20000001
DAR: 0000000000000000, DSISR: 0000000040000000
TASK = c0000000005c8590[0] 'swapper' THREAD: c00000000068c000 CPU: 0
GPR00: c00000000068f5e0 c00000000068f5e0 c00000000068e690 0000000000000000 
GPR04: 00000000000035e0 000000000087264e c000000008011280 c000000000594000 
GPR08: c0000000005c9300 0000000000000000 c000000000591090 c00000000068c000 
GPR12: 8000000000009032 c0000000005c9300 0000000000000000 0000000000000000 
GPR16: 0000000000000000 0000000000000000 0000000000008000 0000000000000000 
GPR20: 0000000000000000 0000000000000000 000000000000007f 0000000000018000 
GPR24: 0000000000000001 0000000000000080 0000000000000018 0000000000000000 
GPR28: 0000000000000c00 c000000000588988 c000000000639be8 c000000008001c00 
NIP [c00000000000cb2c] .do_IRQ+0x74/0x1c4
LR [c00000000000caf8] .do_IRQ+0x40/0x1c4
Call Trace:
[c00000000068f5e0] [c00000000000caf8] .do_IRQ+0x40/0x1c4 (unreliable)
[c00000000068f680] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
--- Exception: 501 at .memset+0x70/0xfc
    LR = .__alloc_bootmem_core+0x39c/0x3dc
[c00000000068f970] [c00000000068fa10] init_thread_union+0x3a10/0x4000 (unreliable)
[c00000000068fa30] [c00000000057237c] .__alloc_bootmem_node+0x38/0x8c
[c00000000068fad0] [c0000000003c477c] .zone_wait_table_init+0x74/0x108
[c00000000068fb60] [c0000000003d9058] .init_currently_empty_zone+0x40/0x11c
[c00000000068fc00] [c0000000003d94c8] .free_area_init_node+0x394/0x3fc
[c00000000068fcf0] [c00000000057314c] .free_area_init_nodes+0x2d8/0x364
[c00000000068fd90] [c00000000056682c] .paging_init+0x40/0x58
[c00000000068fe40] [c00000000055ba34] .setup_arch+0x20c/0x240
[c00000000068fee0] [c000000000552690] .start_kernel+0xdc/0x414
[c00000000068ff90] [c000000000008594] .start_here_common+0x54/0xc0
Instruction dump:
7c200b78 780404a0 2ba408ff 41bd001c e87e80a8 3884ff00 48058d21 60000000 
480054cd 60000000 e93e80b0 e92900b8 <e8090000> f8410028 e9690010 e8490008 

2) The kernel panic on second attempt

Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc00000000000cb2c
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=128 NUMA pSeries
Modules linked in:
NIP: c00000000000cb2c LR: c00000000000caf8 CTR: 0000000000014a99
REGS: c00000000068f410 TRAP: 0300   Not tainted  (2.6.25-rc3-mm1-autotest)
MSR: 8000000000001032 <ME,IR,DR>  CR: 28000044  XER: 00000001
DAR: 0000000000000000, DSISR: 0000000040000000
TASK = c0000000005c8590[0] 'swapper' THREAD: c00000000068c000 CPU: 0
GPR00: c00000000068f690 c00000000068f690 c00000000068e690 0000000000000000 
GPR04: 0000000000003690 0000000000537672 c000000001ad59c0 c000000000594000 
GPR08: c0000000005c9300 0000000000000000 c000000000591090 c00000000068c000 
GPR12: 8000000000009032 c0000000005c9300 0000000000000000 0000000000000000 
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR20: 0000000000230000 0000000000000000 0000000000ffffff 0000000001000000 
GPR24: 0000000000001000 0000000001000000 0000000000001000 0000000000000000 
GPR28: 0000000000000000 c0000000005889c8 c000000000639be8 c000000001000000 
NIP [c00000000000cb2c] .do_IRQ+0x74/0x1c4
LR [c00000000000caf8] .do_IRQ+0x40/0x1c4
Call Trace:
[c00000000068f690] [c00000000000caf8] .do_IRQ+0x40/0x1c4 (unreliable)
[c00000000068f730] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
--- Exception: 501 at .memset+0x80/0xfc
    LR = .__alloc_bootmem_core+0x39c/0x3dc
[c00000000068fa20] [c000000000641a78] sysctl_pernet_ops+0x108e0/0x1d6e0 (unreliable)
[c00000000068fae0] [c00000000057237c] .__alloc_bootmem_node+0x38/0x8c
[c00000000068fb80] [c0000000003c48dc] .__earlyonly_bootmem_alloc+0x24/0x3c
[c00000000068fc00] [c0000000003d885c] .vmemmap_populate+0x7c/0xf4
[c00000000068fc90] [c0000000003d9b6c] .sparse_mem_map_populate+0x38/0x64
[c00000000068fd10] [c000000000573ec4] .sparse_early_mem_map_alloc+0x54/0x98
[c00000000068fda0] [c000000000573f70] .sparse_init+0x68/0x148
[c00000000068fe40] [c00000000055b9ec] .setup_arch+0x1c4/0x240
[c00000000068fee0] [c000000000552690] .start_kernel+0xdc/0x414
[c00000000068ff90] [c000000000008594] .start_here_common+0x54/0xc0
Instruction dump:
7c200b78 780404a0 2ba408ff 41bd001c e87e80a8 3884ff00 48058d21 60000000 
480054cd 60000000 e93e80b0 e92900b8 <e8090000> f8410028 e9690010 e8490008 

3) Third attempt kernel booted up but had the following call trace 264 times while running
test

Badness at include/linux/gfp.h:110
NIP: c0000000000b4ff0 LR: c0000000000b4fa0 CTR: c00000000019cdb4
REGS: c000000009edf250 TRAP: 0700   Not tainted  (2.6.25-rc3-mm1-autotest)
MSR: 8000000000029032 <EE,ME,IR,DR>  CR: 22024042  XER: 20000003
TASK = c000000009062140[548] 'kjournald' THREAD: c000000009edc000 CPU: 0
NIP [c0000000000b4ff0] .get_page_from_freelist+0x29c/0x898
LR [c0000000000b4fa0] .get_page_from_freelist+0x24c/0x898
Call Trace:
[c000000009edf5f0] [c0000000000b56e4] .__alloc_pages_internal+0xf8/0x470
[c000000009edf6e0] [c0000000000e0458] .kmem_getpages+0x8c/0x194
[c000000009edf770] [c0000000000e1050] .fallback_alloc+0x194/0x254
[c000000009edf820] [c0000000000e14b0] .kmem_cache_alloc+0xd8/0x144
[c000000009edf8c0] [c0000000001fe0f8] .radix_tree_preload+0x50/0xd4
[c000000009edf960] [c0000000000ad048] .add_to_page_cache+0x38/0x12c
[c000000009edfa00] [c0000000000ad158] .add_to_page_cache_lru+0x1c/0x4c
[c000000009edfa90] [c0000000000add58] .find_or_create_page+0x60/0xa8
[c000000009edfb30] [c00000000011e478] .__getblk+0x140/0x310
[c000000009edfc00] [c0000000001b78c4] .journal_get_descriptor_buffer+0x44/0xd8
[c000000009edfca0] [c0000000001b236c] .journal_commit_transaction+0x948/0x1590
[c000000009edfe00] [c0000000001b585c] .kjournald+0xf4/0x2ac
[c000000009edff00] [c00000000007ff4c] .kthread+0x84/0xd0
[c000000009edff90] [c000000000028900] .kernel_thread+0x4c/0x68
Instruction dump:
7dc57378 48009575 60000000 2fa30000 419e0490 56c902d8 3c000018 7dd907b4 
7ad2c7e2 7f890000 7c000026 5400fffe <0b000000> e93e8128 3b000000 80090000 
-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

^ permalink raw reply

* RE: I2S driver
From: Pedro Luis D. L. @ 2008-03-04 13:23 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <766668.28874.qm@web23115.mail.ird.yahoo.com>


Ok, here down is the code I told you.
A few considerations before:
 - As I told you, it is very bad commented, sorry. I'm still working on it.
 - It's is not an alsa driver, but it copies data to the PSC working as SPI=
 mode (it is not I2S but you only need to change the PSC configuration).
 - Its purpose is to establish a dma task to copy the data from a buffer to=
 the PSC, where I had attached a Digital to Analog Converter that into soun=
d through a speaker.
 - Data alignment is imposed by DAC requirements.
 - Clock configuration is fixed to 44.1 Khz, so audio data must be sampled =
using that frequency. Data must be also mono (only one converter attached).
 - This module is part of a mayor project to stream audio data through ethe=
rnet, so it provides a function to copy audio data to audio buffers. If the=
re's no data to copy, it copies a null buffer to keep silence.
 - What can you find useful in this code? Configuration steps to establish =
DMA Tasks and PSC configuration.
 - After the module I send you also the code from another module that estab=
lishes PSC as I2S configuration. Clocks where adjusted to send the audio da=
ta also at 44.1 Khz as fine tunned as possible due to communication require=
ments of the attached DAC in that hardware.

And finally, here is the code:

/**************************************************************************=
*
 *   Copyright (C) 2007 by Pedro L. Dom=EDnguez                            =
  *
 *   pedro.dominguez@aed-engineering.com                                   =
*
 *                                                                         =
*
 *   This program is free software; you can redistribute it and/or modify  =
*
 *   it under the terms of the GNU General Public License as published by  =
*
 *   the Free Software Foundation; either version 2 of the License, or     =
*
 *   (at your option) any later version.                                   =
*
 *                                                                         =
*
 *   This program is distributed in the hope that it will be useful,       =
*
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        =
*
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         =
*
 *   GNU General Public License for more details.                          =
*
 *                                                                         =
*
 *   You should have received a copy of the GNU General Public License     =
*
 *   along with this program; if not, write to the                         =
*
 *   Free Software Foundation, Inc.,                                       =
*
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             =
*
 *                                                                         =
*
 *   History                                                               =
*
 *     Original Version by Bernhard Kuhn              *
 *            for 2.6.16 kernel                                            =
*
 **************************************************************************=
*/

#define SPI_DBG

#ifdef SPI_DBG
#define DBG(x...) printk("(debug) " x)
#else
#define DBG(x...)
#endif

#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
#include=20
// #include=20

#define BPF             2      // bytes per frame
#define SLOTS           2
#define SAMPLESIZE      (BPF*SLOTS)
#define FPP             1024   // bytes per copy period=20
#define PERIODS         8      // periods
#define PERIODSIZE      (SAMPLESIZE/2*FPP)
#define BUFSIZE         (SAMPLESIZE*FPP*PERIODS)
#define FPP_HW          128
//512    // 10 ms
#define PERIODS_HW      8      // periods
#define PERIODSIZE_HW   (SAMPLESIZE*FPP_HW)

#define FIFOSIZE	512
#define RX_GRAN		4
#define TX_GRAN		4
#define	RX_ALARM	0x120
#define	TX_ALARM	FIFOSIZE - (TX_GRAN * 4) - 208

#define DELAY_TIME_SLOT 0x20000000
#define GEN_CLK_INT 0x00800000
#define MULTIWD_ENABLE 0x00400000
#define CLK_POL_RISING 0x00200000

#define PROCFS_NAME	"MPC52xx_SPI"
#define MCLKEN_DIV 0x8001
#define DRV_NAME "mpc52xx-psc-spi"
#define PROCFS_MAX_SIZE		1024
#define BUF_FRAMES 300

/* MBAR position */
#define MPC52xx_MBAR		0xf0000000	/* Phys address */
#define MPC52xx_MBAR_VIRT	0xf0000000	/* Virt address */
#define MPC52xx_MBAR_SIZE	0x00010000

#define MPC52xx_PA(x)		((phys_addr_t)(MPC52xx_MBAR + (x)))
#define MPC52xx_VA(x)		((void __iomem *)(MPC52xx_MBAR_VIRT + (x)))

/* Registers zone offset/size  */
#define MPC52xx_MMAP_CTL_OFFSET		0x0000
#define MPC52xx_MMAP_CTL_SIZE		0x068
#define MPC52xx_SDRAM_OFFSET		0x0100
#define MPC52xx_SDRAM_SIZE		0x010
#define MPC52xx_CDM_OFFSET		0x0200
#define MPC52xx_CDM_SIZE		0x038
#define MPC52xx_INTR_OFFSET		0x0500
#define MPC52xx_INTR_SIZE		0x04c
#define MPC52xx_GPTx_OFFSET(x)		(0x0600 + ((x)<<buffer.va =3D kmalloc(PERIO=
DSIZE_HW, GFP_DMA);
	FirstNodeFree->buffer.pa =3D virt_to_phys((void *)FirstNodeFree->buffer.va=
);
	node =3D FirstNodeFree;

	for (i=3D1;inext =3D (Node *)kmalloc(sizeof(Node), GFP_KERNEL);=09
		node->next->buffer.va =3D kmalloc(PERIODSIZE_HW, GFP_DMA);
		node->next->buffer.pa =3D virt_to_phys((void *)node->next->buffer.va);
		node =3D node->next;
	}
	LastNodeFree =3D node;
	LastNodeFree->next=3DNULL;
	DBG("SPI_buffers_init()\n");
	// prepare reception buffer=09
	SPI_rx_bufs.va =3D kmalloc(BUFSIZE, GFP_DMA);

	SPI_rx_bufs.pa =3D virt_to_phys((void *)SPI_rx_bufs.va);

	// prepare silence buffer
	SPI_tx_silence.va =3D kmalloc(BUFSIZE, GFP_DMA);

	SPI_tx_silence.pa =3D virt_to_phys((void *)SPI_tx_silence.va);

	memset(SPI_tx_silence.va,0,BUFSIZE);

	return 0;
}

int snd_SPI_pcm_trigger(struct snd_pcm_substream *substream, int cmd) {
#ifdef SND_I2S_DEBUG
	printk("snd_SPI_pcm_trigger\n");
#endif
	switch (cmd) {
		case SNDRV_PCM_TRIGGER_START:
		case SNDRV_PCM_TRIGGER_RESUME:
#ifdef SND_I2S_DEBUG
			printk("START\n");
#endif
			snd_SPI_substream=3Dsubstream;
			snd_SPImgt_started=3D2;
			snd_SPImgt_running=3D1;

			break;
		case SNDRV_PCM_TRIGGER_STOP:
		case SNDRV_PCM_TRIGGER_SUSPEND:
#ifdef SND_I2S_DEBUG
			printk("STOP\n");
#endif
			snd_SPImgt_running=3D0;
			break;

		case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
			printk("  PAUSE_PUSH\n");
			break;
		case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
			printk("  PAUSE_RELEASE\n");
			break;
		default:
			return -EINVAL;
	}
	return 0;
};

EXPORT_SYMBOL(snd_SPI_pcm_trigger);


static irqreturn_t SPI_rx_irq(int irq, void *dev_id) {
	// no need for TaskIntClear(rxtask), OS masks and acks IRQ

	struct mpc52xx_spi_priv *priv =3D dev_id;

	spin_lock(&priv->dma_lock);
	while (bcom_buffer_done(rx_bcom)) {
		struct bcom_gen_bd *bd;
		bcom_retrieve_buffer(rx_bcom, NULL, NULL);
		/* Submit a new one */
		bd =3D (struct bcom_gen_bd *) bcom_prepare_next_buffer(rx_bcom);
		bd->status =3D 512;
		bd->buf_pa =3D SPI_rx_bufs.pa;
	=09
		bcom_submit_next_buffer(rx_bcom, NULL);
		bcom_enable(rx_bcom);
	}
	spin_unlock(&priv->dma_lock);
	return IRQ_HANDLED;
};

static irqreturn_t SPI_tx_irq(int irq, void *dev_id) {
	// no need for TaskIntClear(txtask), OS masks and acks IRQ
	struct mpc52xx_spi_priv *priv =3D dev_id;
	struct bcom_gen_bd *bd;

	Node *node;

	if(psc->mpc52xx_psc_status&0x1800) {

		printk("PSC Reset\n");
		psc->command =3D MPC52xx_PSC_RST_RX;
		psc->command =3D MPC52xx_PSC_RST_TX;
		psc->command =3D MPC52xx_PSC_SEL_MODE_REG_1;
		psc->command =3D MPC52xx_PSC_RST_ERR_STAT;
		psc->command =3D MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE;
	};
=09
	spin_lock(&priv->dma_lock);
=09
	for(;;)
	{
		if(!bcom_buffer_done(tx_bcom)) {
			break;
		}
		bcom_retrieve_buffer(tx_bcom, NULL, NULL);
		/* Submit a new one */
		bd =3D (struct bcom_gen_bd *) bcom_prepare_next_buffer(tx_bcom);

		if (snd_SPImgt_running)
		{
			if((FirstNode =3D=3D NULL)) {
				bd->status =3D PERIODSIZE_HW;
				bd->buf_pa =3D SPI_tx_silence.pa;
				bcom_submit_next_buffer(tx_bcom, NULL);
			=09
				if(hook_per_elap !=3D NULL) {
					hook_per_elap(SPI_pos, SPI_play);
				}
			}=20
			else
			{
				node=3DFirstNode;
				FirstNode=3Dnode->next;
				if(FirstNode=3D=3DNULL)LastNode=3DNULL;
				bd->status =3D PERIODSIZE_HW;
				bd->buf_pa =3D (void *)(((u32)node->buffer.pa));
				bcom_submit_next_buffer(tx_bcom, NULL);
				node->next=3DNULL;
				if(LastNodeFree!=3DNULL)
					LastNodeFree->next=3Dnode;
				LastNodeFree=3Dnode;				=09
				if(FirstNodeFree=3D=3DNULL)FirstNodeFree=3DLastNodeFree;
				nodecounter--;
			}
			dmablockcounter++;

		} else {
			bd->status =3D PERIODSIZE_HW;
			bd->buf_pa =3D SPI_tx_silence.pa;
			bcom_submit_next_buffer(tx_bcom, NULL);

		}
		bcom_enable(tx_bcom);

	}
	spin_unlock(&priv->dma_lock);

	return IRQ_HANDLED;
};

typedef struct {
	unsigned short l;
	unsigned short r;
} sample_t;

static int frame=3D0;
static Node *nodebuild;
static int counter =3D0;
static int *ptr=3DNULL;

int snd_SPI_pcm_copy(struct snd_pcm_substream *substream,
		int voice,
		snd_pcm_uframes_t pos,
		void *src,
		snd_pcm_uframes_t count) {

	snd_pcm_uframes_t i;
// 	sample_t* data =3D (sample_t*) src;
	UInteger32 *data =3D (UInteger32 *) src;

	int cnt=3Dcount;
// 	unsigned short aux;

//   	printk("1.cnt %d, frame %d\n",cnt, frame);=20
	while (cnt> 0)
	{
		counter++;
		if(counter =3D=3D 1000){

// 			printk("Frames: %d\n",nodecounter);
			counter=3D0;

		}
		if(ptr=3D=3DNULL)
		{=20

			if(FirstNodeFree !=3D NULL)
			{
				nodebuild =3D FirstNodeFree;
				FirstNodeFree =3D FirstNodeFree->next;
				if(FirstNodeFree=3D=3DNULL)LastNodeFree=3DNULL;	=09
			}
			else
			{		=09
				nodebuild =3D (Node *)kmalloc(sizeof(Node), GFP_KERNEL);=09
				nodebuild->buffer.va =3D kmalloc(PERIODSIZE_HW, GFP_DMA);
				nodebuild->buffer.pa =3D virt_to_phys((void *)nodebuild->buffer.va);
				nodebuild->next=3DNULL;
// 				printk("Getting more Frames buffers, num of nodes %d\n",nodecounter)=
;
			}		=09
			ptr=3D(int *)nodebuild->buffer.va;
			frame=3D0;=09
		}
//   		printk("2.cnt %d, frame %d\n",cnt, frame);=20
		if(cnt>=3D (FPP_HW -frame))
		{

			for(i=3D0;il);
// 				printk(" 0x%04x ",data->r);=09
//Big Endian
// 				aux=3D((data->l>>8)&0xff)+((data->l << 8)&0xff00);
// 				*(ptr+(i*SLOTS)+(frame*SLOTS)) =3D (aux<r>>8)&0xff)+((data->r << 8)&=
0xff00);
// 				*(ptr+(i*SLOTS)+(frame*SLOTS)+1) =3D (aux<l<r<next=3DNULL;
			if(LastNode !=3D NULL) LastNode->next =3D nodebuild;
			if(FirstNode =3D=3D NULL) FirstNode =3D nodebuild;
			LastNode =3D nodebuild;
			nodecounter++;
//   			printk("3.cnt %d, frame %d\n",cnt, frame);=20
		}
		else
		{
			for(i=3D0;il);
// 				printk("%04x ",data->r);
//Big Endian
// 				aux=3D((data->l>>8)&0xff)+((data->l << 8)&0xff00);
// 				*(ptr+(i*SLOTS)+(frame*SLOTS)) =3D (aux<r>>8)&0xff)+((data->r << 8)&=
0xff00);
// 				*(ptr+(i*SLOTS)+(frame*SLOTS)+1) =3D (aux<l<r<tfdata =3D 0xF0010000;=
 		 // Power-down [Table 1, MAX5712 Datasheet]=09

	gpio->port_config |=3D PORT_CONFIG_PSC1;

	cdm->clk_enables |=3D PSC1_CLK_EN;

	cdm->mclken_div_psc1 	=3D 0x8010;

	rx_fifo =3D MPC52xx_PA(MPC52xx_PSCx_OFFSET(psc_num))+0x60;
	tx_fifo =3D MPC52xx_PA(MPC52xx_PSCx_OFFSET(psc_num))+0x80;


	spin_lock_init(&priv->dma_lock);

// 	printk("Before Tasks init\n");

	rx_bcom =3D bcom_gen_bd_rx_init(2, (phys_addr_t)rx_fifo, initiator_rx, BCO=
M_IPR_PSC1_RX, 512);

	tx_bcom =3D bcom_gen_bd_tx_init(8, (phys_addr_t)tx_fifo, initiator_tx, BCO=
M_IPR_PSC1_TX);


	r_irq =3D bcom_get_task_irq(rx_bcom);
	t_irq =3D bcom_get_task_irq(tx_bcom);

	printk("r_irq %d 0x%08x t_irq %d 0x%08x, r_tasknum %d, t_tasknum %d\n", r_=
irq, r_irq, t_irq, t_irq, rx_bcom->tasknum, tx_bcom->tasknum);
	psc->command =3D (MPC52xx_PSC_TX_DISABLE | MPC52xx_PSC_RX_DISABLE);
	psc->command =3D MPC52xx_PSC_RST_RX;
	psc->command =3D MPC52xx_PSC_RST_TX;
	psc->command =3D MPC52xx_PSC_RST_ERR_STAT;

	psc->op1 =3D 0x03;
	udelay(10);
	psc->op0 =3D 0x02;
	udelay(50);
=09
	SICR =3D 0x0F90E000;
=09
	psc->command 	=3D 0x0A;
	psc->sicr	=3D SICR;
	psc->ctur	=3D 0x03;
	psc->ctlr	=3D 0x34;
	psc->ccr	=3D 0x070F0000;

	psc->rfalarm	=3D RX_ALARM;	=09
	psc->tfalarm	=3D TX_ALARM;	=09
	psc->rfcntl	=3D RX_GRAN;	=09
	psc->tfcntl	=3D TX_GRAN;	=09
	psc->isr_imr.isr	=3D 0x00;
	psc->isr_imr.imr	=3D 0x00;=09
	psc->mode	=3D 0x00;			/* set RX interrupt to RxRDY */
	psc->command =3D (MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE);

	psc->tfdata =3D 0xF0010000; 	// Power-down [Table 1, MAX5712 Datasheet]
	udelay(100);=09

	psc->tfdata =3D 0xF0000000; 	// Wake-up [Table 1, MAX5712 Datasheet]	=09

	udelay(100);
=09
// 	printk("Before request_irq's\n");
	if (request_irq(r_irq, &SPI_rx_irq, /*IRQF_DISABLED*/0, "SPI rx dma", priv=
)) {
		printk(KERN_ERR "SPI: SDMA rx irq allocation failed\n");
		return;
	}=20
	if (request_irq(t_irq, &SPI_tx_irq, /*IRQF_DISABLED*/0, "SPI tx dma", priv=
)) {
		printk(KERN_ERR "SPI: SDMA tx irq allocation failed\n");
		return;
	}=20

	bcom_gen_bd_tx_reset(tx_bcom);
	bcom_gen_bd_rx_reset(rx_bcom);

// 	printk("Before submitting a buffer\n");
	spin_lock(&priv->dma_lock);
	while (!bcom_queue_full(tx_bcom)) {
		struct bcom_gen_bd *bd;

		/* Submit a new one */
		bd =3D (struct bcom_gen_bd *) bcom_prepare_next_buffer(tx_bcom);
		bd->status =3D PERIODSIZE_HW;
		bd->buf_pa =3D SPI_tx_silence.pa;
		bcom_submit_next_buffer(tx_bcom, NULL);;
	}
	spin_unlock(&priv->dma_lock);

	bd =3D bcom_prepare_next_buffer(rx_bcom);

	bd->status =3D 512;
	bd->data[0] =3D SPI_rx_bufs.pa;

	bcom_submit_next_buffer(rx_bcom, (void *)SPI_rx_bufs.pa);

	psc->command =3D MPC52xx_PSC_RST_RX;
	psc->command =3D MPC52xx_PSC_RST_TX;
	psc->command =3D MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE;


	bcom_enable(tx_bcom);
	bcom_enable(rx_bcom);

	kt_timeup   =3D timeval_to_ktime(tclockup);
	kt_timedown =3D timeval_to_ktime(tclockdown);
	hrtimer_init(&start_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);=09
	start_timer.function =3D timer_funct;
// 	printk("Before exit in Setup_SPI()\n");
}

void register_period_elapsed(void (*funcptr)()) {
/*	printk("Function registered\n");*/
	hook_per_elap =3D funcptr;
};

void register_hook_frames_rcv(UInteger32 (*funcptr)()) {
/*	printk("Function registered\n");*/
	hook_frames_rcv =3D funcptr;
	hrtimer_start(&start_timer, kt_timeup, HRTIMER_MODE_REL);
};

int snd_SPI_pcm_prepare(struct snd_pcm_substream * substream) {
#ifdef SND_I2S_DEBUG
	snd_pcm_runtime_t *runtime =3D substream->runtime;
	printk("snd_I2Smgt_pcm_prepare\n");
	printk("  runtime->buffer_size=3D%i\n",(int)runtime->buffer_size);
	printk("  runtime->period_size=3D%i\n",(int)runtime->period_size);
	printk("  runtime->periods=3D%i\n",(int)runtime->periods);
#endif
	SPI_play =3D SPI_pos =3D 0;
	return 0;
};

EXPORT_SYMBOL(register_period_elapsed);
EXPORT_SYMBOL(register_hook_frames_rcv);
EXPORT_SYMBOL(snd_SPI_pcm_prepare);


int SPIspeaker_init(void) {

	SPI_buffers_init();
	SPI_setup();
	return 0;
}

void SPIspeaker_exit(void) {

	/* Freeing buffer SPIspeaker */
	if (SPI_rx_bufs.va) {
	kfree(SPI_rx_bufs.va);
	}
	if (SPI_tx_silence.va) {
	kfree(SPI_tx_silence.va);
	}
}

module_init(SPIspeaker_init);
module_exit(SPIspeaker_exit);

MODULE_DESCRIPTION("MPC52xx SPI");
MODULE_AUTHOR("Pedro Dom=EDnguez,,,, (pedro.dominguez@aed-engineering.com)"=
);
MODULE_LICENSE("GPL");

-----------------------------
As I told you, here is the configuration routine for the I2S module. Please=
, notice that this module whas built to work on the old 2.6.16 kernel and o=
ld dma driver:

static int I2S_setup(void) {

	int i;
// 	u32 val32;
	// CDM
	struct mpc52xx_cdm __iomem *cdm;
//=20
// 	/* GPIO Modification */
	struct mpc52xx_gpio __iomem *gpio;

// 	/* END GPIO Modification */
//=20
	cdm =3D ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
	gpio =3D ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE);
//=20
	switch(psc_num) {
		case 1:
			initiator_tx =3D SDMA_INITIATOR_PSC1_TX;
			initiator_rx =3D SDMA_INITIATOR_PSC1_RX;
			break;
		case 2:
			initiator_tx =3D SDMA_INITIATOR_PSC2_TX;
			initiator_rx =3D SDMA_INITIATOR_PSC2_RX;
			break;
		default:
			panic("snd-I2Smgt.o: invalid value for psc_num (%i)\n",psc_num);
			break;
	};

	/* 528MHz/(0x1f+1)=3D16.5 MHz */
	cdm->mclken_div_psc2 =3D 0x8001; // Mhz MCLK ( Khz * )
	psc->command =3D (MPC52xx_PSC_TX_DISABLE | MPC52xx_PSC_RX_DISABLE);
	/* PSC2 CODEC with Master Clock */
	gpio->port_config |=3D 0x70;
	/* PSC2 clock enable */
	cdm->clk_enables |=3D 0x40;

	// PSC reset
	psc->command =3D MPC52xx_PSC_RST_RX;
	psc->command =3D MPC52xx_PSC_RST_TX;
 	psc->command =3D MPC52xx_PSC_SEL_MODE_REG_1;
 	psc->command =3D MPC52xx_PSC_RST_ERR_STAT;


	// PSC setup I2S
	psc->mode =3D 0;
	psc->rfalarm =3D RX_ALARM;
 	psc->tfalarm =3D TX_ALARM;
	psc->rfcntl =3D RX_GRAN;
 	psc->tfcntl =3D TX_GRAN;
	psc->mpc52xx_psc_imr =3D 0x0000;

	psc->sicr =3D 0x0FE00000;
	psc->ctur =3D 0x1f; //Frame length 0x17

	psc->ccr =3D 0x3f5D; //LRCK  KHz, BitCLK  MHz  0x3f05!

// 	psc->sicr |=3D /* DELAY_TIME_SLOT |*/ MULTIWD_ENABLE | CLK_POL_RISING;
// =09
// 	psc->sicr |=3D GEN_CLK_INT;

	psc->command =3D MPC52xx_PSC_RST_RX;
	psc->command =3D MPC52xx_PSC_RST_TX;
	psc->command =3D MPC52xx_PSC_SEL_MODE_REG_1;
	psc->command =3D MPC52xx_PSC_RST_ERR_STAT;
//=20
// 	// setup the sdma tasks
	tx_sdma =3D sdma_alloc(PERIODS_HW+1);
	rx_sdma =3D sdma_alloc(PERIODS_HW+1);

	if (!tx_sdma || !rx_sdma) {
		printk("sdma_alloc failed\n");
		return -ENOMEM;
	}
//=20
// 	sdma_gen_bd_rx_init(rx_sdma, (phys_addr_t)&(psc->rfdata), PERIODSIZE_HW=
, initiator_rx, 6);
	sdma_gen_bd_rx_init(0, rx_sdma, (phys_addr_t)&(psc->rfdata), initiator_rx,=
 6, PERIODSIZE_HW);
// 	sdma_gen_bd_tx_init(tx_sdma, (phys_addr_t)&(psc->tfdata), PERIODSIZE_HW=
, initiator_tx, 6);
	sdma_gen_bd_tx_init(0, tx_sdma, (phys_addr_t)&(psc->tfdata), initiator_tx,=
 6);

	printk("txtask is %d rxtask is %d\n", tx_sdma->tasknum, rx_sdma->tasknum);
//=20
	// prepare the ring buffers
	for(i=3D0;itasknum %d\n", sdma_irq(rx_sdma), MPC52xx_SDMA_IRQ_BASE + rx_sd=
ma->tasknum);
	if (request_irq(sdma_irq(rx_sdma), I2S_rx_irq, 0, "SPI rx dma", NULL)) {
		printk(KERN_ERR "SPI: SDMA rx irq allocation failed\n");
		return -EINVAL;
	} else printk("SPI: SDA rx irq allocation succeded\n");
	if (request_irq(sdma_irq(tx_sdma), I2S_tx_irq, 0, "SPI tx dma", NULL)) {
		printk(KERN_ERR "SPI: SDMA tx irq allocation failed\n");
		return -EINVAL;
	} else printk("SPI: SDA tx irq allocation succeded\n");
=09
//=20
// 	// clear any pending interrupts
	sdma_clear_irq(tx_sdma);
	sdma_clear_irq(rx_sdma);
//=20
	printk("Before activating the tasks\n");
// 	// activate the tasks
// 	sdma_enable(tx_sdma);
// 	sdma_enable(rx_sdma);
//=20
// 	printk("about to enable SPI psc\n");
	udelay(100);
//=20
// 	// enable transmitter and receiver
	psc->command =3D MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE;
// //	psc->command =3D MPC52xx_PSC_TX_ENABLE;
//=20
//=20
// // 	I2S_print(__FUNCTION__);
//=20
// // 	pcm1680_read();
// //         pcm1680_configure(44100);
// // 	pcm1680_read();

	return 0;
};



>=20
> Angelo wrote:
>> Timur wrote:
>>>I wrote an ASoC driver for the MPC8610, which also has
>>>an I2S interface.  You can find it in sound/soc/fsl.
>>
>> in my kernel version (2.6.22) there isn't any folder named
>> fsl in sound/soc/
>=20
>> Timur wrote:
>> It's in 2.6.25.
>=20
>=20
> The main problem is that in the feature of MPC8610 you can find:
>   Two synchronous serial interface (SSI) controllers for I2S or AC97
>   audio inputs/outputs
> while in MPC5200b's feature there's only:
>   I2S (up to three)
> However the main difference features:
> MPC5200B: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=
=3DMPC5200B&nodeId=3D0162468rH3bTdG0898
> MPC8610:
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=3DMPC8610
>=20
> What do you think on this difference?
>=20
>=20
>=20
> ________________________________
> ________________________________
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail

_________________________________________________________________
Tecnolog=EDa, moda, motor, viajes,=85suscr=EDbete a nuestros boletines para=
 estar siempre a la =FAltima
http://newsletters.msn.com/hm/maintenanceeses.asp?L=3DES&C=3DES&P=3DWCMaint=
enance&Brand=3DWL&RU=3Dhttp%3a%2f%2fmail.live.com=

^ permalink raw reply

* RE: Xilinx git tree, LLTemac driver
From: John Linn @ 2008-03-04 14:21 UTC (permalink / raw)
  To: Magnus Hjorth, linuxppc-embedded; +Cc: git
In-Reply-To: <000f01c87dde$30ee1460$92ca3d20$@se>

Hi Magnus,

I just applied the change to the git tree for getting the mac address =
from the board data and it looks like I should have taken into account =
the powerpc arch also as I was building and testing ppc arch.

It looks like #ifndef needs to be added around the use of the __res for =
copying the mac address from the board data so that it doesn't do that =
in the powerpc arch.

#ifndef CONFIG_OF
	memcpy(ndev->dev_addr, ((bd_t *) &__res)->bi_enetaddr, 6);
	memcpy(pdata->mac_addr, ((bd_t *) &__res)->bi_enetaddr, 6);
#endif

The #ifndef may also be needed around the extern for __res.

I'll test these changes.

Thanks,
John

-----Original Message-----
From: Magnus Hjorth [mailto:mh@omnisys.se]=20
Sent: Tuesday, March 04, 2008 2:58 AM
To: linuxppc-embedded@ozlabs.org
Cc: git
Subject: Xilinx git tree, LLTemac driver

Hi,

I'm trying to compile the Linux kernel from the Xilinx git tree
(linux-2.6-xlnx) and am having some trouble with the LLTemac driver, =
having
to do with MAC address settings.=20

There seems to be two routines getting the MAC address in different =
ways.
The xtenet_probe function tries to access an extern bd_t __res, the type
bd_t doesn't exist in the powerpc tree which causes the compilation to =
fail.
Then there is the xtenet_of_probe function which uses =
of_get_mac_address.

What confuses me is that both the regular and the OF driver is =
registered in
the xtenet_init function, I would have expected it to be either/or.=20

Can I expect under the powerpc arch and supplying a .dts file, that the
xtenet_probe function will never be called?=20

Best regards,
Magnus


--

Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30  V=E4stra Fr=F6lunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se

^ permalink raw reply

* RE: locking problem in sata_sil24?
From: Rune Torgersen @ 2008-03-04 14:39 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev, linux-ide
In-Reply-To: <DCEAAC0833DD314AB0B58112AD99B93B0410A524@ismail.innsys.innovsys.com>

linuxppc-dev-bounces+runet=3Dinnovsys.com@ozlabs.org wrote:
> Now I get an "inconsistent locking state", but I need help in
> trying to
> fiure out what I should look for.

I did figure out htat lockdep only complains about inonsistent locking
state when PREEMPT_RT paches are applied.
Now I just need some help interpreting this output so I can find what
lock and why it is inconsitent.
I _really_ want to run the rt patches...

>=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
> [ INFO: inconsistent lock state ]
> [ 2.6.24-rt1 #12
> ---------------------------------
> inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
> swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
>  (&host->lock){+-..}, at: [<c01c8e14>] sil24_interrupt+0x68/0x53c
> {hardirq-on-W} state was registered at:
>   [<c0047724>] __lock_acquire+0x494/0xc04
>   [<c0047ee8>] lock_acquire+0x54/0x78
>   [<c025c8f0>] rt_spin_lock+0x34/0x54
>   [<c01b45ac>] ata_dev_init+0x38/0x88
>   [<c01b467c>] ata_link_init+0x80/0xa4
>   [<c01b4840>] ata_port_alloc+0x1a0/0x1bc
>   [<c01b48f4>] ata_host_alloc+0x98/0xf8
>   [<c01b4974>] ata_host_alloc_pinfo+0x20/0x104
>   [<c01c83b4>] sil24_init_one+0x128/0x390
>   [<c01802f0>] pci_device_probe+0x70/0xa8
>   [<c0197d10>] driver_probe_device+0x104/0x1ac
>   [<c0197e0c>] __driver_attach+0x54/0x8c
>   [<c0197030>] bus_for_each_dev+0x58/0xa0
>   [<c0197adc>] driver_attach+0x2c/0x44
>   [<c0197778>] bus_add_driver+0xb4/0x1b8
>   [<c01980b8>] driver_register+0x7c/0x114
>   [<c01803bc>] __pci_register_driver+0x60/0x78
>   [<c031e620>] sil24_init+0x2c/0x44
>   [<c030a2c8>] kernel_init+0xdc/0x334
>   [<c0010408>] kernel_thread+0x44/0x60
> irq event stamp: 16174
> hardirqs last  enabled at (16173): [<c0046d18>]
> trace_hardirqs_on+0x1c/0x34
> hardirqs last disabled at (16174): [<c0045554>]
> trace_hardirqs_off+0x1c/0x34
> softirqs last  enabled at (0): [<00000000>] 0x0
> softirqs last disabled at (0): [<00000000>] 0x0
>=20
> other info that might help us debug this:
> no locks held by swapper/0.
>=20
> stack backtrace:
> Call Trace:
> [c0357ca0] [c0008474] show_stack+0x54/0x18c (unreliable)
> [c0357cd0] [c00085cc] dump_stack+0x20/0x38
> [c0357ce0] [c00460a0] print_usage_bug+0x130/0x14c
> [c0357d10] [c0046674] mark_lock+0xf0/0x4ec
> [c0357d30] [c004769c] __lock_acquire+0x40c/0xc04
> [c0357d80] [c0047ee8] lock_acquire+0x54/0x78
> [c0357da0] [c025c8f0] rt_spin_lock+0x34/0x54
> [c0357dc0] [c01c8e14] sil24_interrupt+0x68/0x53c
> [c0357e00] [c00529e0] handle_IRQ_event+0x6c/0x114
> [c0357e30] [c0052bcc] __do_IRQ+0x144/0x1c4
> [c0357e50] [c0017d88] apmax_int_irq_demux+0x90/0xb8
> [c0357e70] [c00063f0] do_IRQ+0x6c/0xb0
> [c0357e80] [c0010cfc] ret_from_except+0x0/0x28
> --- Exception: 501 at check_critical_timing+0x184/0x190
>     LR =3D check_critical_timing+0x15c/0x190
> [c0357f80] [c00519a4] touch_critical_timing+0x5c/0xb0
> [c0357fa0] [c00096c4] cpu_idle+0xe4/0x124
> [c0357fb0] [c0003bcc] rest_init+0x78/0xac
> [c0357fc0] [c030ab9c] start_kernel+0x2c4/0x2dc
> [c0357ff0] [00003438] 0x3438


> ------------[ cut here ]------------
> kernel BUG at kernel/rtmutex.c:692!
> Oops: Exception in kernel mode, sig: 5 [#1]
> PREEMPT Innovative Systems ApMax
> Modules linked in:
> NIP: c025c340 LR: c025c318 CTR: c01c8dac
> REGS: ef859ad0 TRAP: 0700   Not tainted  (2.6.24-rt1)
> MSR: 00021032 <ME,IR,DR>  CR: 28004042  XER: 20000000
> TASK =3D ef852090[8] 'softirq-block/0' THREAD: ef858000
> GPR00: 00000001 ef859b80 ef852090 00000000 00000000 00000000 00000000
> 00000002 GPR08: 00000001 ef852090 ef852090 ef859b80 00000000 ffffffff
> 0fffd000 00000028 GPR16: 00800564 00800000 00000000 007fff00 00000000
> 00000001 ef8bc000 ef3ac2f0 GPR24: 00000011 00000000 00000000 ef3f77e0
> ef858000 00001032 ef3ac2f0 ef859b80 NIP [c025c340]
> rt_spin_lock_slowlock+0x7c/0x1c0=20
> LR [c025c318] rt_spin_lock_slowlock+0x54/0x1c0
> Call Trace:
> [ef859b80] [c025c318] rt_spin_lock_slowlock+0x54/0x1c0 (unreliable)
> [ef859be0] [c025c78c] __rt_spin_lock+0x80/0x98
> [ef859bf0] [c025c8f8] rt_spin_lock+0x3c/0x54
> [ef859c10] [c01c8e14] sil24_interrupt+0x68/0x53c
> [ef859c50] [c00529e0] handle_IRQ_event+0x6c/0x114
> [ef859c80] [c0052bcc] __do_IRQ+0x144/0x1c4
> [ef859ca0] [c0017d88] apmax_int_irq_demux+0x90/0xb8
> [ef859cc0] [c00063f0] do_IRQ+0x6c/0xb0
> [ef859cd0] [c0010cfc] ret_from_except+0x0/0x28
> --- Exception: 501 at ata_qc_issue+0x140/0x684
>     LR =3D ata_scsi_translate+0x138/0x184
> [ef859d90] [ef385960] 0xef385960 (unreliable)
> [ef859dd0] [c01bd7a0] ata_scsi_translate+0x138/0x184
> [ef859e00] [c01c0d0c] ata_scsi_queuecmd+0x210/0x240
> [ef859e20] [c01a46d4] scsi_dispatch_cmd+0x1d0/0x240
> [ef859e40] [c01aaecc] scsi_request_fn+0x274/0x340
> [ef859e60] [c0160b9c] blk_run_queue+0x68/0xac
> [ef859e80] [c01a8ee0] scsi_run_queue+0x1cc/0x1e4
> [ef859eb0] [c01a9678] scsi_next_command+0x3c/0x5c
> [ef859ed0] [c01a987c] scsi_end_request+0xd4/0xf4
> [ef859ef0] [c01a9c30] scsi_io_completion+0xf4/0x320
> [ef859f30] [c01a3f78] scsi_finish_command+0x94/0xac
> [ef859f50] [c01aa5d4] scsi_softirq_done+0xd4/0xec
> [ef859f70] [c015c83c] blk_done_softirq+0x8c/0xbc
> [ef859f90] [c0026008] ksoftirqd+0x168/0x27c
> [ef859fd0] [c00386d0] kthread+0x50/0x90
> [ef859ff0] [c0010408] kernel_thread+0x44/0x60
> Instruction dump:
> 7fc3f378 4bdefce9 2f830000 41be0010 7fc3f378 7fa4eb78 48000140
> 801e002c 5400003a 7c001278 7c000034 5400d97e <0f000000> 38000004
> 901f0008 801f0008 Kernel panic - not syncing: Fatal exception in
> interrupt=20
> Call Trace:
> [ef8598f0] [c0008474] show_stack+0x54/0x18c (unreliable)
> [ef859920] [c00085cc] dump_stack+0x20/0x38
> [ef859930] [c001f198] panic+0x94/0x178
> [ef859980] [c000e4d0] die+0x178/0x184
> [ef8599a0] [c000e6d8] _exception+0x5c/0x17c
> [ef859a90] [c000eadc] program_check_exception+0x154/0x504
> [ef859ac0] [c0010cb0] ret_from_except_full+0x0/0x4c
> --- Exception: 700 at rt_spin_lock_slowlock+0x7c/0x1c0
>     LR =3D rt_spin_lock_slowlock+0x54/0x1c0
> [ef859be0] [c025c78c] __rt_spin_lock+0x80/0x98
> [ef859bf0] [c025c8f8] rt_spin_lock+0x3c/0x54
> [ef859c10] [c01c8e14] sil24_interrupt+0x68/0x53c
> [ef859c50] [c00529e0] handle_IRQ_event+0x6c/0x114
> [ef859c80] [c0052bcc] __do_IRQ+0x144/0x1c4
> [ef859ca0] [c0017d88] apmax_int_irq_demux+0x90/0xb8
> [ef859cc0] [c00063f0] do_IRQ+0x6c/0xb0
> [ef859cd0] [c0010cfc] ret_from_except+0x0/0x28
> --- Exception: 501 at ata_qc_issue+0x140/0x684
>     LR =3D ata_scsi_translate+0x138/0x184
> [ef859d90] [ef385960] 0xef385960 (unreliable)
> [ef859dd0] [c01bd7a0] ata_scsi_translate+0x138/0x184
> [ef859e00] [c01c0d0c] ata_scsi_queuecmd+0x210/0x240
> [ef859e20] [c01a46d4] scsi_dispatch_cmd+0x1d0/0x240
> [ef859e40] [c01aaecc] scsi_request_fn+0x274/0x340
> [ef859e60] [c0160b9c] blk_run_queue+0x68/0xac
> [ef859e80] [c01a8ee0] scsi_run_queue+0x1cc/0x1e4
> [ef859eb0] [c01a9678] scsi_next_command+0x3c/0x5c
> [ef859ed0] [c01a987c] scsi_end_request+0xd4/0xf4
> [ef859ef0] [c01a9c30] scsi_io_completion+0xf4/0x320
> [ef859f30] [c01a3f78] scsi_finish_command+0x94/0xac
> [ef859f50] [c01aa5d4] scsi_softirq_done+0xd4/0xec
> [ef859f70] [c015c83c] blk_done_softirq+0x8c/0xbc
> [ef859f90] [c0026008] ksoftirqd+0x168/0x27c
> [ef859fd0] [c00386d0] kthread+0x50/0x90
> [ef859ff0] [c0010408] kernel_thread+0x44/0x60
> Rebooting in 180 seconds..
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [BUG] 2.6.25-rc3-mm1 kernel panic while bootup on powerpc ()
From: Michael Neuling @ 2008-03-04 14:40 UTC (permalink / raw)
  To: Kamalesh Babulal; +Cc: linuxppc-dev, Andrew Morton, linux-kernel
In-Reply-To: <47CD4AB3.3080409@linux.vnet.ibm.com>

In message <47CD4AB3.3080409@linux.vnet.ibm.com> you wrote:
> Hi Andrew,
> 
> The 2.6.25-rc3-mm1 kernel panics while bootup on power box. The machine boote
d up
> without the panic on the third attempt, but badness call trace were seen whil
e running
> tests
> 
> 1) The kernel panic on first attempt
> 
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc00000000000cb2c
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=128 NUMA pSeries
> Modules linked in:
> NIP: c00000000000cb2c LR: c00000000000caf8 CTR: 0000000000000226
> REGS: c00000000068f360 TRAP: 0300   Not tainted  (2.6.25-rc3-mm1-autotest)
> MSR: 8000000000001032 <ME,IR,DR>  CR: 28000024  XER: 20000001
> DAR: 0000000000000000, DSISR: 0000000040000000
> TASK = c0000000005c8590[0] 'swapper' THREAD: c00000000068c000 CPU: 0
> GPR00: c00000000068f5e0 c00000000068f5e0 c00000000068e690 0000000000000000 
> GPR04: 00000000000035e0 000000000087264e c000000008011280 c000000000594000 
> GPR08: c0000000005c9300 0000000000000000 c000000000591090 c00000000068c000 
> GPR12: 8000000000009032 c0000000005c9300 0000000000000000 0000000000000000 
> GPR16: 0000000000000000 0000000000000000 0000000000008000 0000000000000000 
> GPR20: 0000000000000000 0000000000000000 000000000000007f 0000000000018000 
> GPR24: 0000000000000001 0000000000000080 0000000000000018 0000000000000000 
> GPR28: 0000000000000c00 c000000000588988 c000000000639be8 c000000008001c00 
> NIP [c00000000000cb2c] .do_IRQ+0x74/0x1c4
> LR [c00000000000caf8] .do_IRQ+0x40/0x1c4
> Call Trace:
> [c00000000068f5e0] [c00000000000caf8] .do_IRQ+0x40/0x1c4 (unreliable)
> [c00000000068f680] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
> --- Exception: 501 at .memset+0x70/0xfc
>     LR = .__alloc_bootmem_core+0x39c/0x3dc
> [c00000000068f970] [c00000000068fa10] init_thread_union+0x3a10/0x4000 (unreli
able)
> [c00000000068fa30] [c00000000057237c] .__alloc_bootmem_node+0x38/0x8c
> [c00000000068fad0] [c0000000003c477c] .zone_wait_table_init+0x74/0x108
> [c00000000068fb60] [c0000000003d9058] .init_currently_empty_zone+0x40/0x11c
> [c00000000068fc00] [c0000000003d94c8] .free_area_init_node+0x394/0x3fc
> [c00000000068fcf0] [c00000000057314c] .free_area_init_nodes+0x2d8/0x364
> [c00000000068fd90] [c00000000056682c] .paging_init+0x40/0x58
> [c00000000068fe40] [c00000000055ba34] .setup_arch+0x20c/0x240
> [c00000000068fee0] [c000000000552690] .start_kernel+0xdc/0x414
> [c00000000068ff90] [c000000000008594] .start_here_common+0x54/0xc0
> Instruction dump:
> 7c200b78 780404a0 2ba408ff 41bd001c e87e80a8 3884ff00 48058d21 60000000 
> 480054cd 60000000 e93e80b0 e92900b8 <e8090000> f8410028 e9690010 e8490008 

I'm not getting a crash but I am getting this:

   start_kernel(): bug: interrupts were enabled *very* early, fixing it

...and you're getting a null pointer access here (in do_IRQ):

	irq = ppc_md.get_irq();

Are we somehow enabling interrupts before we've setup ppc_md.get_irq?

Mikey

> 
> 2) The kernel panic on second attempt
> 
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc00000000000cb2c
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=128 NUMA pSeries
> Modules linked in:
> NIP: c00000000000cb2c LR: c00000000000caf8 CTR: 0000000000014a99
> REGS: c00000000068f410 TRAP: 0300   Not tainted  (2.6.25-rc3-mm1-autotest)
> MSR: 8000000000001032 <ME,IR,DR>  CR: 28000044  XER: 00000001
> DAR: 0000000000000000, DSISR: 0000000040000000
> TASK = c0000000005c8590[0] 'swapper' THREAD: c00000000068c000 CPU: 0
> GPR00: c00000000068f690 c00000000068f690 c00000000068e690 0000000000000000 
> GPR04: 0000000000003690 0000000000537672 c000000001ad59c0 c000000000594000 
> GPR08: c0000000005c9300 0000000000000000 c000000000591090 c00000000068c000 
> GPR12: 8000000000009032 c0000000005c9300 0000000000000000 0000000000000000 
> GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
> GPR20: 0000000000230000 0000000000000000 0000000000ffffff 0000000001000000 
> GPR24: 0000000000001000 0000000001000000 0000000000001000 0000000000000000 
> GPR28: 0000000000000000 c0000000005889c8 c000000000639be8 c000000001000000 
> NIP [c00000000000cb2c] .do_IRQ+0x74/0x1c4
> LR [c00000000000caf8] .do_IRQ+0x40/0x1c4
> Call Trace:
> [c00000000068f690] [c00000000000caf8] .do_IRQ+0x40/0x1c4 (unreliable)
> [c00000000068f730] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
> --- Exception: 501 at .memset+0x80/0xfc
>     LR = .__alloc_bootmem_core+0x39c/0x3dc
> [c00000000068fa20] [c000000000641a78] sysctl_pernet_ops+0x108e0/0x1d6e0 (unre
liable)
> [c00000000068fae0] [c00000000057237c] .__alloc_bootmem_node+0x38/0x8c
> [c00000000068fb80] [c0000000003c48dc] .__earlyonly_bootmem_alloc+0x24/0x3c
> [c00000000068fc00] [c0000000003d885c] .vmemmap_populate+0x7c/0xf4
> [c00000000068fc90] [c0000000003d9b6c] .sparse_mem_map_populate+0x38/0x64
> [c00000000068fd10] [c000000000573ec4] .sparse_early_mem_map_alloc+0x54/0x98
> [c00000000068fda0] [c000000000573f70] .sparse_init+0x68/0x148
> [c00000000068fe40] [c00000000055b9ec] .setup_arch+0x1c4/0x240
> [c00000000068fee0] [c000000000552690] .start_kernel+0xdc/0x414
> [c00000000068ff90] [c000000000008594] .start_here_common+0x54/0xc0
> Instruction dump:
> 7c200b78 780404a0 2ba408ff 41bd001c e87e80a8 3884ff00 48058d21 60000000 
> 480054cd 60000000 e93e80b0 e92900b8 <e8090000> f8410028 e9690010 e8490008 
> 
> 3) Third attempt kernel booted up but had the following call trace 264 times 
while running
> test
> 
> Badness at include/linux/gfp.h:110
> NIP: c0000000000b4ff0 LR: c0000000000b4fa0 CTR: c00000000019cdb4
> REGS: c000000009edf250 TRAP: 0700   Not tainted  (2.6.25-rc3-mm1-autotest)
> MSR: 8000000000029032 <EE,ME,IR,DR>  CR: 22024042  XER: 20000003
> TASK = c000000009062140[548] 'kjournald' THREAD: c000000009edc000 CPU: 0
> NIP [c0000000000b4ff0] .get_page_from_freelist+0x29c/0x898
> LR [c0000000000b4fa0] .get_page_from_freelist+0x24c/0x898
> Call Trace:
> [c000000009edf5f0] [c0000000000b56e4] .__alloc_pages_internal+0xf8/0x470
> [c000000009edf6e0] [c0000000000e0458] .kmem_getpages+0x8c/0x194
> [c000000009edf770] [c0000000000e1050] .fallback_alloc+0x194/0x254
> [c000000009edf820] [c0000000000e14b0] .kmem_cache_alloc+0xd8/0x144
> [c000000009edf8c0] [c0000000001fe0f8] .radix_tree_preload+0x50/0xd4
> [c000000009edf960] [c0000000000ad048] .add_to_page_cache+0x38/0x12c
> [c000000009edfa00] [c0000000000ad158] .add_to_page_cache_lru+0x1c/0x4c
> [c000000009edfa90] [c0000000000add58] .find_or_create_page+0x60/0xa8
> [c000000009edfb30] [c00000000011e478] .__getblk+0x140/0x310
> [c000000009edfc00] [c0000000001b78c4] .journal_get_descriptor_buffer+0x44/0xd
8
> [c000000009edfca0] [c0000000001b236c] .journal_commit_transaction+0x948/0x159
0
> [c000000009edfe00] [c0000000001b585c] .kjournald+0xf4/0x2ac
> [c000000009edff00] [c00000000007ff4c] .kthread+0x84/0xd0
> [c000000009edff90] [c000000000028900] .kernel_thread+0x4c/0x68
> Instruction dump:
> 7dc57378 48009575 60000000 2fa30000 419e0490 56c902d8 3c000018 7dd907b4 
> 7ad2c7e2 7f890000 7c000026 5400fffe <0b000000> e93e8128 3b000000 80090000 
> -- 
> Thanks & Regards,
> Kamalesh Babulal,
> Linux Technology Center,
> IBM, ISTL.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 

^ permalink raw reply

* [PATCH 0/4] Add Emerson KSI8560 board support
From: Alexandr Smirnov @ 2008-03-04 16:23 UTC (permalink / raw)
  To: linuxppc-dev

Hi Paul,

I've added short description for this board as header for the base support patch. 
Hope this is enough, board diagram is available at Emerson website. Let me know
more information needed.

Thanks,
Alexandr.

^ permalink raw reply

* Re: [PATCH] [POWERPC] (testers ?) Fix sleep on some powerbooks
From: Wolfgang Pfeiffer @ 2008-03-04 16:15 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Gaudenz Steinlin, debian-powerpc, linuxppc-dev
In-Reply-To: <20080303062831.6BD8EDDED8@ozlabs.org>


[-- Attachment #1.1: Type: text/plain, Size: 3260 bytes --]

Hi Ben, Gaudenz - Hi All

On Mon, Mar 03 2008, at 17:27 +1100, Benjamin Herrenschmidt wrote:
> The PMU backlight code would kick in during sleep/resume even on
> machines that use a different backlight method. This appears to
> break sleep on my PowerBook, though I can't test that patch at
> the moment as the machine died while I was bisecting.
> 
> So if anybody around has one of those latest revision PowerPC
> PowerBooks, the one just before they went to Intel, 

yes, I think so:

$ cat /proc/cpuinfo 
processor       : 0
cpu             : 7447A, altivec supported
clock           : 1666.666000MHz
revision        : 0.5 (pvr 8003 0105)
bogomips        : 33.15
timebase        : 8320000
platform        : PowerMac
machine         : PowerBook5,8
motherboard     : PowerBook5,8 MacRISC3 Power Macintosh 
detected as     : 287 (PowerBook G4 15")
pmac flags      : 00000019
L2 cache        : 512K unified
pmac-generation : NewWorld


> and have a
> problem with suspend/resume, please test this and let me know
> if it helps.

It helps. Thanks a lot .. :) ... 

After installing the kernel with your patch, and booting to it, I
successfully ran the machine into sleep mode, several times: On a
console, after booting, and with no-one logged in. On a
KDE-Login-screen, with root logged in on a console. And just a few
minutes ago in a fully working KDE/KDM X environment.

Pressing the power button on this machine put the system to sleep, and
it resumed when pressing the same button again ... 

I uploaded this fresh kernel .deb, patched with your code, up to
rapidshare: 
http://rapidshare.com/files/96992135/linux-image-2.6.25-rc3-g7704a8b-with-ben.s-pmu-patch_2008.02.29_powerpc.deb.html

md5sum for the file above is 7a7613e0c52e179acf7caacaa3890901

Please note - my favorite part - this kernel does not have an initrd
image included .. :)

I attach my /etc/modules file, just in case ...

For those not familiar to rapidshare procedures: Just choose something
like "Free" on the page above, wait a few secs, then chose an
appropriate server near you, and type in the code you see in the image.

I don't have my own web space for binaries like this, so sorry if this
is a little annoying ...

For those not subscribed to linuxppc-dev@ozlabs.org:
Here's Ben's original email, with the patch:
http://patchwork.ozlabs.org/linuxppc/patch?order=state&id=17107

Thanks again for your work, Ben  .... :)

Last, but certainly not least: Thanks Gaudenz, for pointing me to
"git bisect", for your response as a whole to the Debian powerpc list
... :) 

My public key can be found with the 'keyserver' URL in the signature ..

Best Regards

> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
>  drivers/macintosh/via-pmu-backlight.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> --- linux-work.orig/drivers/macintosh/via-pmu-backlight.c	2008-03-03 17:24:44.000000000 +1100
> +++ linux-work/drivers/macintosh/via-pmu-backlight.c	2008-03-03 17:25:12.000000000 +1100
> @@ -17,7 +17,7 @@
>  
>  [ ... ]


-- 
Wolfgang 

http://heelsbroke.blogspot.com/
http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on

[-- Attachment #1.2: /etc/modules --]
[-- Type: text/plain, Size: 453 bytes --]

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

apm_emu
ide-cd
#ide-disk
#ide-generic
sbp2
i2c-powermac
#snd-powermac

#snd-aoa:
#soundbus
#i2sbus
#snd-aoa
#snd-aoa-fabric-layout
#snd-aoa-codec-onyx
# End snd-aoa

cpufreq_performance
cpufreq_powersave
cpufreq_ondemand
sr_mod
therm_adt746x limit_adjust=-3

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 481 bytes --]

^ permalink raw reply

* [PATCH 1/4] Emerson KSI8560 base support
From: Alexandr Smirnov @ 2008-03-04 16:33 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20080304162322.GA19634@ru.mvista.com>


The KSI8560 is a single compact, mid-, or full-size Advanced Mezzanine Card
(AdvancedMC™) based on the Freescale™ Semiconductor MPC8560 PowerQUICC III™
microprocessor. This product will serve in data and signaling applications such
as signaling gateways (SGW) and softswitch signaling interface cards.

The board has altera maxii CPLD, that is used to obtain and manage board
configuration. Also there are two SCC UART serial consoles and FCC ethernet,
that is routed to the front panel, while other ethernet controlers (TSEC's) are
routed to the backplane.

Signed-off-by: Alexandr Smirnov <asmirnov@ru.mvista.com>

 arch/powerpc/platforms/85xx/Kconfig   |    7
 arch/powerpc/platforms/85xx/Makefile  |    1
 arch/powerpc/platforms/85xx/ksi8560.c |  257 ++++++++++++++++++++++++++++++++++
 3 files changed, 265 insertions(+)

diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 7e76ddb..28bc6e5 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -46,6 +46,13 @@ config MPC85xx_DS
 	help
 	  This option enables support for the MPC85xx DS (MPC8544 DS) board
 
+config KSI8560
+        bool "Emerson KSI8560"
+        select PPC_CPM_NEW_BINDING
+        select DEFAULT_UIMAGE
+        help
+          This option enables support for the Emerson KSI8560 board
+
 config STX_GP3
 	bool "Silicon Turnkey Express GP3"
 	help
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index cb7af4e..6cea185 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -10,3 +10,4 @@ obj-$(CONFIG_STX_GP3)	  += stx_gp3.o
 obj-$(CONFIG_TQM85xx)	  += tqm85xx.o
 obj-$(CONFIG_SBC8560)     += sbc8560.o
 obj-$(CONFIG_SBC8548)     += sbc8548.o
+obj-$(CONFIG_KSI8560)	  += ksi8560.o
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c
new file mode 100644
index 0000000..b3b8194
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/ksi8560.c
@@ -0,0 +1,257 @@
+/*
+ * Board setup routines for the Emerson KSI8560
+ *
+ * Author: Alexandr Smirnov <asmirnov@ru.mvista.com>
+ *
+ * Based on mpc85xx_ads.c maintained by Kumar Gala
+ *
+ * 2008 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ */
+
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/of_platform.h>
+
+#include <asm/system.h>
+#include <asm/time.h>
+#include <asm/machdep.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpic.h>
+#include <mm/mmu_decl.h>
+#include <asm/udbg.h>
+#include <asm/prom.h>
+
+#include <sysdev/fsl_soc.h>
+#include <sysdev/fsl_pci.h>
+
+#include <asm/cpm2.h>
+#include <sysdev/cpm2_pic.h>
+
+
+#define KSI8560_CPLD_HVR		0x04 /* Hardware Version Register */
+#define KSI8560_CPLD_PVR		0x08 /* PLD Version Register */
+#define KSI8560_CPLD_RCR1		0x30 /* Reset Command Register 1 */
+
+#define KSI8560_CPLD_RCR1_CPUHR		0x80 /* CPU Hard Reset */
+
+static void __iomem *cpld_base = NULL;
+
+static void machine_restart(char *cmd)
+{
+	if (cpld_base)
+		out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR);
+	else
+		printk(KERN_ERR "Can't find CPLD base, hang forever\n");
+
+	for (;;);
+}
+
+static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
+{
+	int cascade_irq;
+
+	while ((cascade_irq = cpm2_get_irq()) >= 0)
+		generic_handle_irq(cascade_irq);
+
+	desc->chip->eoi(irq);
+}
+
+static void __init ksi8560_pic_init(void)
+{
+	struct mpic *mpic;
+	struct resource r;
+	struct device_node *np;
+#ifdef CONFIG_CPM2
+	int irq;
+#endif
+
+	np = of_find_node_by_type(NULL, "open-pic");
+
+	if (np == NULL) {
+		printk(KERN_ERR "Could not find open-pic node\n");
+		return;
+	}
+
+	if (of_address_to_resource(np, 0, &r)) {
+		printk(KERN_ERR "Could not map mpic register space\n");
+		of_node_put(np);
+		return;
+	}
+
+	mpic = mpic_alloc(np, r.start,
+			MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
+			0, 256, " OpenPIC  ");
+	BUG_ON(mpic == NULL);
+	of_node_put(np);
+
+	mpic_init(mpic);
+
+#ifdef CONFIG_CPM2
+	/* Setup CPM2 PIC */
+	np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
+	if (np == NULL) {
+		printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
+		return;
+	}
+	irq = irq_of_parse_and_map(np, 0);
+
+	cpm2_pic_init(np);
+	of_node_put(np);
+	set_irq_chained_handler(irq, cpm2_cascade);
+
+	setup_irq(0, NULL);
+#endif
+}
+
+#ifdef CONFIG_CPM2
+/*
+ * Setup I/O ports
+ */
+struct cpm_pin {
+	int port, pin, flags;
+};
+
+static struct cpm_pin __initdata ksi8560_pins[] = {
+	/* SCC1 */
+	{3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
+	{3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+	/* SCC2 */
+	{3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+	/* FCC1 */
+	{0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+	{0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
+	{0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
+	{0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
+	{0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
+	{0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
+	{0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
+	{0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
+	{2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK9 */
+	{2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK10 */
+
+};
+
+static void __init init_ioports(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(ksi8560_pins); i++) {
+		struct cpm_pin *pin = &ksi8560_pins[i];
+		cpm2_set_pin(pin->port, pin->pin, pin->flags);
+	}
+
+	cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
+	cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX);
+	cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_RX);
+	cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX);
+}
+#endif
+
+/*
+ * Setup the architecture
+ */
+static void __init ksi8560_setup_arch(void)
+{
+	struct device_node *cpld;
+
+	cpld = of_find_compatible_node(NULL, NULL, "altera,maxii");
+	if (cpld)
+		cpld_base = of_iomap(cpld, 0);
+	else
+		printk(KERN_ERR "Can't find CPLD in device tree\n");
+
+	if (ppc_md.progress)
+		ppc_md.progress("ksi8560_setup_arch()", 0);
+
+#ifdef CONFIG_CPM2
+	cpm2_reset();
+	init_ioports();
+#endif
+}
+
+static void ksi8560_show_cpuinfo(struct seq_file *m)
+{
+	uint pvid, svid, phid1;
+	uint memsize = total_memory;
+
+	pvid = mfspr(SPRN_PVR);
+	svid = mfspr(SPRN_SVR);
+
+	seq_printf(m, "Vendor\t\t: Emerson Network Power\n");
+	seq_printf(m, "Board\t\t: KSI8560\n");
+
+	if (cpld_base) {
+		seq_printf(m, "Hardware rev\t: %d\n",
+					in_8(cpld_base + KSI8560_CPLD_HVR));
+		seq_printf(m, "CPLD rev\t: %d\n",
+					in_8(cpld_base + KSI8560_CPLD_PVR));
+	} else
+		seq_printf(m, "Unknown Hardware and CPLD revs\n");
+
+	seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
+	seq_printf(m, "SVR\t\t: 0x%x\n", svid);
+
+	/* Display cpu Pll setting */
+	phid1 = mfspr(SPRN_HID1);
+	seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
+
+	/* Display the amount of memory */
+	seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
+}
+
+static struct of_device_id __initdata of_bus_ids[] = {
+	{ .type = "soc", },
+	{ .name = "cpm", },
+	{ .name = "localbus", },
+	{},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+	of_platform_bus_probe(NULL, of_bus_ids, NULL);
+
+	return 0;
+}
+machine_device_initcall(ksi8560, declare_of_platform_devices);
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init ksi8560_probe(void)
+{
+	unsigned long root = of_get_flat_dt_root();
+
+	return of_flat_dt_is_compatible(root, "emerson,KSI8560");
+}
+
+define_machine(ksi8560) {
+	.name			= "KSI8560",
+	.probe			= ksi8560_probe,
+	.setup_arch		= ksi8560_setup_arch,
+	.init_IRQ		= ksi8560_pic_init,
+	.show_cpuinfo		= ksi8560_show_cpuinfo,
+	.get_irq		= mpic_get_irq,
+	.restart		= machine_restart,
+	.calibrate_decr		= generic_calibrate_decr,
+};

^ permalink raw reply related

* [PATCH 2/4] Emerson KSI8560 bootwrapper
From: Alexandr Smirnov @ 2008-03-04 16:34 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20080304162322.GA19634@ru.mvista.com>

Add boot wrapper for Emerson KSI8560 board.

Signed-off-by: Alexandr Smirnov <asmirnov@ru.mvista.com>

 arch/powerpc/boot/Makefile |    1 +
 arch/powerpc/boot/wrapper  |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index e3993a6..f43dd6e 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -255,6 +255,7 @@ image-$(CONFIG_TQM8555)			+= cuImage.tqm8555
 image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
 image-$(CONFIG_SBC8548)			+= cuImage.tqm8548
 image-$(CONFIG_SBC8560)			+= cuImage.tqm8560
+image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
 
 # Board ports in arch/powerpc/platform/embedded6xx/Kconfig
 image-$(CONFIG_STORCENTER)		+= cuImage.storcenter
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index c317815..6655a90 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -174,7 +174,7 @@ cuboot*)
     *-mpc83*)
         platformo=$object/cuboot-83xx.o
         ;;
-    *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555*)
+    *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555*|*-ksi8560*)
         platformo=$object/cuboot-85xx-cpm2.o
         ;;
     *-mpc85*)

^ permalink raw reply related

* [PATCH 3/4] Emerson KSI8560 device tree
From: Alexandr Smirnov @ 2008-03-04 16:35 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20080304162322.GA19634@ru.mvista.com>

Add device tree file for Emerson KSI8560 board.

Signed-off-by: Alexandr Smirnov <asmirnov@ru.mvista.com>

 arch/powerpc/boot/dts/ksi8560.dts |  267 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 267 insertions(+)

diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts
new file mode 100644
index 0000000..3956432
--- /dev/null
+++ b/arch/powerpc/boot/dts/ksi8560.dts
@@ -0,0 +1,267 @@
+/*
+ * Device Tree Source for Emerson KSI8560
+ *
+ * Author: Alexandr Smirnov <asmirnov@ru.mvista.com>
+ *
+ * Based on mpc8560ads.dts
+ *
+ * 2008 (c) MontaVista, Software, Inc.  This file is licensed under
+ * the terms of the GNU General Public License version 2.  This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ */
+
+/dts-v1/;
+
+/ {
+	model = "KSI8560";
+	compatible = "emerson,KSI8560";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		ethernet0 = &enet0;
+		ethernet1 = &enet1;
+		ethernet2 = &enet2;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		PowerPC,8560@0 {
+			device_type = "cpu";
+			reg = <0>;
+			d-cache-line-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;		/* L1, 32K */
+			i-cache-size = <0x8000>;		/* L1, 32K */
+			timebase-frequency = <0>;		/* From U-boot */
+			bus-frequency = <0>;			/* From U-boot */
+			clock-frequency = <0>;			/* From U-boot */
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;			/* Fixed by bootwrapper */
+	};
+
+	soc@fdf00000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		device_type = "soc";
+		ranges = <0x00000000 0xfdf00000 0x00100000>;
+		bus-frequency = <0>;				/* Fixed by bootwrapper */
+
+		memory-controller@2000 {
+			compatible = "fsl,8540-memory-controller";
+			reg = <0x2000 0x1000>;
+			interrupt-parent = <&MPIC>;
+			interrupts = <0x12 0x2>;
+		};
+
+		l2-cache-controller@20000 {
+			compatible = "fsl,8540-l2-cache-controller";
+			reg = <0x20000 0x1000>;
+			cache-line-size = <0x20>;		/* 32 bytes */
+			cache-size = <0x40000>;			/* L2, 256K */
+			interrupt-parent = <&MPIC>;
+			interrupts = <0x10 0x2>;
+		};
+
+		i2c@3000 {
+			compatible = "fsl-i2c";
+			reg = <0x3000 0x100>;
+			interrupts = <0x2b 0x2>;
+			interrupt-parent = <&MPIC>;
+			dfsrr;
+		};
+
+		mdio@24520 {					/* For TSECs */
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "fsl,gianfar-mdio";
+			reg = <0x24520 0x20>;
+
+			PHY1: ethernet-phy@1 {
+				interrupt-parent = <&MPIC>;
+				reg = <0x1>;
+				device_type = "ethernet-phy";
+			};
+
+			PHY2: ethernet-phy@2 {
+				interrupt-parent = <&MPIC>;
+				reg = <0x2>;
+				device_type = "ethernet-phy";
+			};
+		};
+
+		enet0: ethernet@24000 {
+			linux,network-index = <0>;
+			device_type = "network";
+			model = "TSEC";
+			compatible = "gianfar";
+			reg = <0x24000 0x1000>;
+			/* Mac address filled in by bootwrapper */
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
+			interrupt-parent = <&MPIC>;
+			phy-handle = <&PHY1>;
+		};
+
+		enet1: ethernet@25000 {
+			linux,network-index = <1>;
+			device_type = "network";
+			model = "TSEC";
+			compatible = "gianfar";
+			reg = <0x25000 0x1000>;
+			/* Mac address filled in by bootwrapper */
+			local-mac-address = [ 00 00 00 00 00 00 ];
+			interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
+			interrupt-parent = <&MPIC>;
+			phy-handle = <&PHY2>;
+		};
+
+		MPIC: pic@40000 {
+			#address-cells = <0>;
+			#interrupt-cells = <2>;
+			interrupt-controller;
+			reg = <0x40000 0x40000>;
+			device_type = "open-pic";
+		};
+
+		cpm@919c0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,mpc8560-cpm", "fsl,cpm2";
+			reg = <0x919c0 0x30>;
+			ranges;
+
+			muram@80000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0x0 0x80000 0x10000>;
+
+				data@0 {
+					compatible = "fsl,cpm-muram-data";
+					reg = <0x0 0x4000 0x9000 0x2000>;
+				};
+			};
+
+			brg@919f0 {
+				compatible = "fsl,mpc8560-brg",
+					     "fsl,cpm2-brg",
+					     "fsl,cpm-brg";
+				reg = <0x919f0 0x10 0x915f0 0x10>;
+				clock-frequency = <165000000>;	/* 166MHz */
+			};
+
+			CPMPIC: pic@90c00 {
+				#address-cells = <0>;
+				#interrupt-cells = <2>;
+				interrupt-controller;
+				interrupts = <0x2e 0x2>;
+				interrupt-parent = <&MPIC>;
+				reg = <0x90c00 0x80>;
+				compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
+			};
+
+			serial@91a00 {
+				device_type = "serial";
+				compatible = "fsl,mpc8560-scc-uart",
+					     "fsl,cpm2-scc-uart";
+				reg = <0x91a00 0x20 0x88000 0x100>;
+				fsl,cpm-brg = <1>;
+				fsl,cpm-command = <0x800000>;
+				current-speed = <0x1c200>;
+				interrupts = <0x28 0x8>;
+				interrupt-parent = <&CPMPIC>;
+			};
+
+			serial@91a20 {
+				device_type = "serial";
+				compatible = "fsl,mpc8560-scc-uart",
+					     "fsl,cpm2-scc-uart";
+				reg = <0x91a20 0x20 0x88100 0x100>;
+				fsl,cpm-brg = <2>;
+				fsl,cpm-command = <0x4a00000>;
+				current-speed = <0x1c200>;
+				interrupts = <0x29 0x8>;
+				interrupt-parent = <&CPMPIC>;
+			};
+
+			mdio@90d00 {				/* For FCCs */
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "fsl,cpm2-mdio-bitbang";
+				reg = <0x90d00 0x14>;
+				fsl,mdio-pin = <24>;
+				fsl,mdc-pin = <25>;
+
+				PHY0: ethernet-phy@0 {
+					interrupt-parent = <&MPIC>;
+					reg = <0x0>;
+					device_type = "ethernet-phy";
+				};
+			};
+
+			enet2: ethernet@91300 {
+				linux,network-index = <2>;
+				device_type = "network";
+				compatible = "fsl,mpc8560-fcc-enet",
+					     "fsl,cpm2-fcc-enet";
+				reg = <0x91300 0x20 0x88400 0x100 0x91390 0x1>;
+				/* Mac address filled in by bootwrapper */
+				local-mac-address = [ 00 00 00 00 00 00 ];
+				fsl,cpm-command = <0x12000300>;
+				interrupts = <0x20 0x8>;
+				interrupt-parent = <&CPMPIC>;
+				phy-handle = <&PHY0>;
+			};
+		};
+	};
+
+	localbus@fdf05000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8560-localbus";
+		reg = <0xfdf05000 0x68>;
+
+		ranges = <0x0 0x0 0xe0000000 0x00800000
+			  0x4 0x0 0xe8080000 0x00080000>;
+
+		flash@0,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "jedec-flash";
+			reg = <0x0 0x0 0x800000>;
+			bank-width = <0x2>;
+
+			partition@0 {
+				label = "Primary Kernel";
+				reg = <0x0 0x180000>;
+			};
+			partition@180000 {
+				label = "Primary Filesystem";
+				reg = <0x180000 0x580000>;
+			};
+			partition@700000 {
+				label = "Monitor";
+				reg = <0x300000 0x100000>;
+				read-only;
+			};
+		};
+
+		cpld@4,0 {
+			compatible = "altera,maxii";
+			reg = <0x4 0x0 0x80000>;
+		};
+	};
+
+
+	chosen {
+		linux,stdout-path = "/soc/cpm/serial@91a00";
+	};
+};

^ permalink raw reply related

* [PATCH 4/4] Emerson KSI8560 default config
From: Alexandr Smirnov @ 2008-03-04 16:36 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20080304162322.GA19634@ru.mvista.com>

Add default config for Emerson KSI8560 board.

Signed-off-by: Alexandr Smirnov <asmirnov@ru.mvista.com>

 arch/powerpc/configs/ksi8560_defconfig |  899 +++++++++++++++++++++++++++++++++
 1 file changed, 899 insertions(+)

diff --git a/arch/powerpc/configs/ksi8560_defconfig b/arch/powerpc/configs/ksi8560_defconfig
new file mode 100644
index 0000000..2d0debc
--- /dev/null
+++ b/arch/powerpc/configs/ksi8560_defconfig
@@ -0,0 +1,899 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Mon Feb 11 16:25:19 2008
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+CONFIG_PPC_85xx=y
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_E200 is not set
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+CONFIG_FSL_EMB_PERFMON=y
+# CONFIG_PHYS_64BIT is not set
+CONFIG_SPE=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFAULT_UIMAGE=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_KPROBES=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_MODULES is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_PREEMPT_RCU is not set
+
+#
+# Platform support
+#
+# CONFIG_PPC_MPC512x is not set
+# CONFIG_PPC_MPC5121 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_MPC85xx=y
+# CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8560_ADS is not set
+# CONFIG_MPC85xx_CDS is not set
+# CONFIG_MPC85xx_MDS is not set
+# CONFIG_MPC85xx_DS is not set
+CONFIG_KSI8560=y
+# CONFIG_STX_GP3 is not set
+# CONFIG_TQM8540 is not set
+# CONFIG_TQM8541 is not set
+# CONFIG_TQM8555 is not set
+# CONFIG_TQM8560 is not set
+# CONFIG_SBC8548 is not set
+# CONFIG_SBC8560 is not set
+# CONFIG_IPIC is not set
+CONFIG_MPIC=y
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+CONFIG_CPM2=y
+CONFIG_PPC_CPM_NEW_BINDING=y
+# CONFIG_FSL_ULI1575 is not set
+CONFIG_CPM=y
+
+#
+# Kernel options
+#
+CONFIG_HIGHMEM=y
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+# CONFIG_SCHED_HRTICK is not set
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_RCU_TRACE=y
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_MATH_EMULATION=y
+# CONFIG_IOMMU_HELPER is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+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_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_PROC_DEVICETREE is not set
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+# CONFIG_SECCOMP is not set
+CONFIG_WANT_DEVICE_TREE=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_FSL_SOC=y
+# CONFIG_PCI is not set
+# CONFIG_PCI_DOMAINS is not set
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# 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_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC 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_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+CONFIG_OF_DEVICE=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_IDEDISK is not set
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_MACINTOSH_DRIVERS is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=y
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_FIXED_PHY is not set
+CONFIG_MDIO_BITBANG=y
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_FS_ENET=y
+# CONFIG_FS_ENET_HAS_SCC is not set
+CONFIG_FS_ENET_HAS_FCC=y
+CONFIG_FS_ENET_MDIO_FCC=y
+CONFIG_NETDEV_1000=y
+# CONFIG_E1000E_ENABLED is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# 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
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+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_SCC3 is not set
+# CONFIG_SERIAL_CPM_SCC4 is not set
+# CONFIG_SERIAL_CPM_SMC1 is not set
+# CONFIG_SERIAL_CPM_SMC2 is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# 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
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUGGER is not set
+# CONFIG_KGDB_CONSOLE is not set
+# CONFIG_VIRQ_DEBUG is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_PPC_EARLY_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_SEQIV is not set
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+# CONFIG_PPC_CLOCK is not set
+CONFIG_PPC_LIB_RHEAP=y

^ permalink raw reply related

* RE: Xilinx git tree, LLTemac driver
From: Stephen Neuendorffer @ 2008-03-04 16:24 UTC (permalink / raw)
  To: Magnus Hjorth, linuxppc-embedded; +Cc: git
In-Reply-To: <000f01c87dde$30ee1460$92ca3d20$@se>

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


Magnus,

The change that broke the lltemac driver was very recent, you should be able to check out a slightly earlier version to avoid the problem.

We've been following the migration pattern where drivers advertise platform devices *and* of devices.  In ARCH=ppc, only platform devices will ever get created and bound to the driver.  In ARCH=powerpc, only of devices will get created and bound.

Note that the ARCH=powerpc support is very new (and as evidenced by the bug you found, it hasn't been tested as much)...
If you have successes (or more failures), we'd appreciate hearing about them.

Steve

-----Original Message-----
From: Magnus Hjorth [mailto:mh@omnisys.se]
Sent: Tue 3/4/2008 1:57 AM
To: linuxppc-embedded@ozlabs.org
Cc: git
Subject: Xilinx git tree, LLTemac driver
 
Hi,

I'm trying to compile the Linux kernel from the Xilinx git tree
(linux-2.6-xlnx) and am having some trouble with the LLTemac driver, having
to do with MAC address settings. 

There seems to be two routines getting the MAC address in different ways.
The xtenet_probe function tries to access an extern bd_t __res, the type
bd_t doesn't exist in the powerpc tree which causes the compilation to fail.
Then there is the xtenet_of_probe function which uses of_get_mac_address.

What confuses me is that both the regular and the OF driver is registered in
the xtenet_init function, I would have expected it to be either/or. 

Can I expect under the powerpc arch and supplying a .dts file, that the
xtenet_probe function will never be called? 

Best regards,
Magnus


--

Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30  Västra Frölunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se



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

^ permalink raw reply

* Re: V4L2: __ucmpdi2 undefined on ppc
From: David Woodhouse @ 2008-03-04 16:37 UTC (permalink / raw)
  To: Segher Boessenkool
  Cc: paulus, henrik.sorensen, Stephane Marchesin, linuxppc-dev
In-Reply-To: <15d7ac5a7542b05fb9b9abb5d4c7a22d@kernel.crashing.org>


On Sun, 2008-03-02 at 22:53 +0100, Segher Boessenkool wrote:
> Every occurrence of r7 here is wrong (and some of the r6).

Can you elucidate?

>   Is there any reason to do this in assembler code at all?

Is there any particular reason not to?

-- 
dwmw2

^ permalink raw reply

* RE: I2S driver
From: Angelo @ 2008-03-04 16:38 UTC (permalink / raw)
  To: Pedro Luis D. L.; +Cc: Linuxppc-embedded
In-Reply-To: <BLU106-W3340DC3BF1A9FD27E9FCD3CA100@phx.gbl>

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

Pedro wrote:
 Ok, here down is the code I told you.
A few considerations before:
 - As I told you, it is very bad commented, sorry. I'm still working on it.
 - It's is not an alsa driver, but it copies data to the PSC working as SPI mode (it is not I2S but you only need to change the PSC configuration).
 - Its purpose is to establish a dma task to copy the data from a buffer to the PSC, where I had attached a Digital to Analog Converter that into sound through a speaker.
 - Data alignment is imposed by DAC requirements.
 - Clock configuration is fixed to 44.1 Khz, so audio data must be sampled using that frequency. Data must be also mono (only one converter attached).
 - This module is part of a mayor project to stream audio data through ethernet, so it provides a function to copy audio data to audio buffers. If there's no data to copy, it copies a null buffer to keep silence.
 - What can you find useful in this code? Configuration steps to establish DMA Tasks and PSC configuration.
 - After the module I send you also the code from another module that establishes PSC as I2S configuration. Clocks where adjusted to send the audio data also at 44.1 Khz as fine tunned as possible due to communication requirements of the attached DAC in that hardware.

And finally, here is the code:

#define SPI_DBG

#ifdef SPI_DBG
#define DBG(x...) printk("(debug) " x)
#else
#define DBG(x...)
#endif

#include 
#include 
#include 
#include 
#include 
#include 
.....
 Thanks for code.
 But why i can't see library?
 
 >After the module I send you also the code from another module that >establishes PSC as I2S configuration. Clocks where adjusted to send >the audio data also at 44.1 Khz as fine tunned as possible due to >communication requirements of the attached DAC in that hardware.
 You'll send me another code?
 
 And what about my file lite5200b.dts?
 I must enable some like this?
         // PSC3 in CODEC mode example
         //i2s@2400 {        // PSC3
         //    device_type = "sound";
         //    compatible = "mpc5200b-psc-i2s";//not 5200 compatible
         //    cell-index = <2>;
         //    reg = <2400 100>;
         //    interrupts = <2 3 0>;
         //    interrupt-parent = <&mpc5200_pic>;
         //};


       
---------------------------------
L'email della prossima generazione? Puoi averla con la Nuova Yahoo! Mail

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

^ permalink raw reply

* Re: V4L2: __ucmpdi2 undefined on ppc
From: Scott Wood @ 2008-03-04 16:58 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Stephane Marchesin, henrik.sorensen, paulus, linuxppc-dev
In-Reply-To: <1204648648.3891.439.camel@pmac.infradead.org>

On Tue, Mar 04, 2008 at 04:37:28PM +0000, David Woodhouse wrote:
> 
> On Sun, 2008-03-02 at 22:53 +0100, Segher Boessenkool wrote:
> > Every occurrence of r7 here is wrong (and some of the r6).
> 
> Can you elucidate?

They were being used as condition registers rather than GPRs.

> >   Is there any reason to do this in assembler code at all?
> 
> Is there any particular reason not to?

Same reason most of the rest of the kernel is in C rather than assembly.

Of course, a better question is why we don't just link libgcc...

-Scott

^ permalink raw reply

* Re: ELDK on 64-bit host
From: Detlev Zundel @ 2008-03-04 17:00 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <Pine.LNX.4.64.0802201807340.7503@pc-213-140-179-32.aina.net>

Hi Kalle,

> On Wed, 20 Feb 2008, Ben Warren wrote:
>
>> On Wed, Feb 20, 2008 at 10:03 AM, Kalle Pokki <kalle.pokki@eke.fi> wrote:
>> > Hi,
>> >
>> >  I tried to copy the ELDK 4.0 installation I had to a new Core 2 Quad
>> >  machine running 64-bit Ubuntu 7.10, but the new machine refuses to
>> >  execute the cross compiler. Has anyone succeeded in running ELDK in
>> >  this kind of environment?
>> >
>> Yes (at least with 64-bit Debian on a single core Xeon), but you need
>> a special library on the host.  I think it's call 'ia32-libs'.  It
>> should be available via aptitude.
>
> Thanks, that was indeed the correct library to install. Now it works just 
> fine.
>
> I'm a bit surprised there wasn't really any useful search results from 
> Google with obvious keywords. I was already about to install the 32-bit 
> version of Ubuntu to get the compiler working again. But then, perhaps 
> installing this library was obvious to everyone else :)

We added an FAQ entry[1] to our DULG documentation.  And just as a
reminder, there is also an ELDK mailing list for such questions[2].

Cheers
  Detlev

[1] http://www.denx.de/wiki/DULG/ELDKUsageIn64BitEnvironment
[2] http://lists.denx.de/mailman/listinfo/eldk

-- 
Paul Simon sang "Fifty Ways to Lose Your Lover", because quite
frankly, "A Million Ways to Tell a Developer He Is a D*ckhead"
doesn't scan nearly as well.  But I'm sure he thought about it.
                            -- linux/Documentation/ManagementStyle
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

^ permalink raw reply

* Re: [BUG] 2.6.25-rc3-mm1 kernel panic while bootup on powerpc ()
From: Andrew Morton @ 2008-03-04 18:33 UTC (permalink / raw)
  To: Michael Neuling
  Cc: Matthew Wilcox, linuxppc-dev, linux-kernel, Kamalesh Babulal
In-Reply-To: <20778.1204641656@neuling.org>

On Tue, 04 Mar 2008 15:40:56 +0100 Michael Neuling <mikey@neuling.org> wrote:

> In message <47CD4AB3.3080409@linux.vnet.ibm.com> you wrote:
> > Hi Andrew,
> > 
> > The 2.6.25-rc3-mm1 kernel panics while bootup on power box. The machine boote
> d up
> > without the panic on the third attempt, but badness call trace were seen whil
> e running
> > tests
> > 
> > 1) The kernel panic on first attempt
> > 
> > Unable to handle kernel paging request for data at address 0x00000000
> > Faulting instruction address: 0xc00000000000cb2c
> > Oops: Kernel access of bad area, sig: 11 [#1]
> > SMP NR_CPUS=128 NUMA pSeries
> > Modules linked in:
> > NIP: c00000000000cb2c LR: c00000000000caf8 CTR: 0000000000000226
> > REGS: c00000000068f360 TRAP: 0300   Not tainted  (2.6.25-rc3-mm1-autotest)
> > MSR: 8000000000001032 <ME,IR,DR>  CR: 28000024  XER: 20000001
> > DAR: 0000000000000000, DSISR: 0000000040000000
> > TASK = c0000000005c8590[0] 'swapper' THREAD: c00000000068c000 CPU: 0
> > GPR00: c00000000068f5e0 c00000000068f5e0 c00000000068e690 0000000000000000 
> > GPR04: 00000000000035e0 000000000087264e c000000008011280 c000000000594000 
> > GPR08: c0000000005c9300 0000000000000000 c000000000591090 c00000000068c000 
> > GPR12: 8000000000009032 c0000000005c9300 0000000000000000 0000000000000000 
> > GPR16: 0000000000000000 0000000000000000 0000000000008000 0000000000000000 
> > GPR20: 0000000000000000 0000000000000000 000000000000007f 0000000000018000 
> > GPR24: 0000000000000001 0000000000000080 0000000000000018 0000000000000000 
> > GPR28: 0000000000000c00 c000000000588988 c000000000639be8 c000000008001c00 
> > NIP [c00000000000cb2c] .do_IRQ+0x74/0x1c4
> > LR [c00000000000caf8] .do_IRQ+0x40/0x1c4
> > Call Trace:
> > [c00000000068f5e0] [c00000000000caf8] .do_IRQ+0x40/0x1c4 (unreliable)
> > [c00000000068f680] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
> > --- Exception: 501 at .memset+0x70/0xfc
> >     LR = .__alloc_bootmem_core+0x39c/0x3dc
> > [c00000000068f970] [c00000000068fa10] init_thread_union+0x3a10/0x4000 (unreli
> able)
> > [c00000000068fa30] [c00000000057237c] .__alloc_bootmem_node+0x38/0x8c
> > [c00000000068fad0] [c0000000003c477c] .zone_wait_table_init+0x74/0x108
> > [c00000000068fb60] [c0000000003d9058] .init_currently_empty_zone+0x40/0x11c
> > [c00000000068fc00] [c0000000003d94c8] .free_area_init_node+0x394/0x3fc
> > [c00000000068fcf0] [c00000000057314c] .free_area_init_nodes+0x2d8/0x364
> > [c00000000068fd90] [c00000000056682c] .paging_init+0x40/0x58
> > [c00000000068fe40] [c00000000055ba34] .setup_arch+0x20c/0x240
> > [c00000000068fee0] [c000000000552690] .start_kernel+0xdc/0x414
> > [c00000000068ff90] [c000000000008594] .start_here_common+0x54/0xc0
> > Instruction dump:
> > 7c200b78 780404a0 2ba408ff 41bd001c e87e80a8 3884ff00 48058d21 60000000 
> > 480054cd 60000000 e93e80b0 e92900b8 <e8090000> f8410028 e9690010 e8490008 
> 
> I'm not getting a crash but I am getting this:
> 
>    start_kernel(): bug: interrupts were enabled *very* early, fixing it
> 
> ...and you're getting a null pointer access here (in do_IRQ):
> 
> 	irq = ppc_md.get_irq();
> 
> Are we somehow enabling interrupts before we've setup ppc_md.get_irq?
> 

Yes, we are - it's the semaphore rewrite which is doing this in
start_kernel().  It's being discussed.

Enabling interrupts too early on powerpc was discovered to be fatal on
powerpc years ago.  It looks like that remains the case.

^ permalink raw reply

* Re: [BUG] 2.6.25-rc3-mm1 kernel panic while bootup on powerpc ()
From: Andrew Morton @ 2008-03-04 18:36 UTC (permalink / raw)
  To: Kamalesh Babulal
  Cc: linuxppc-dev, Mel Gorman, linux-kernel, linux-mm, Pekka Enberg
In-Reply-To: <47CD4AB3.3080409@linux.vnet.ibm.com>

On Tue, 04 Mar 2008 18:42:19 +0530 Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> wrote:

> 3) Third attempt kernel booted up but had the following call trace 264 times while running
> test
> 
> Badness at include/linux/gfp.h:110
> NIP: c0000000000b4ff0 LR: c0000000000b4fa0 CTR: c00000000019cdb4
> REGS: c000000009edf250 TRAP: 0700   Not tainted  (2.6.25-rc3-mm1-autotest)
> MSR: 8000000000029032 <EE,ME,IR,DR>  CR: 22024042  XER: 20000003
> TASK = c000000009062140[548] 'kjournald' THREAD: c000000009edc000 CPU: 0
> NIP [c0000000000b4ff0] .get_page_from_freelist+0x29c/0x898
> LR [c0000000000b4fa0] .get_page_from_freelist+0x24c/0x898
> Call Trace:
> [c000000009edf5f0] [c0000000000b56e4] .__alloc_pages_internal+0xf8/0x470
> [c000000009edf6e0] [c0000000000e0458] .kmem_getpages+0x8c/0x194
> [c000000009edf770] [c0000000000e1050] .fallback_alloc+0x194/0x254
> [c000000009edf820] [c0000000000e14b0] .kmem_cache_alloc+0xd8/0x144
> [c000000009edf8c0] [c0000000001fe0f8] .radix_tree_preload+0x50/0xd4
> [c000000009edf960] [c0000000000ad048] .add_to_page_cache+0x38/0x12c
> [c000000009edfa00] [c0000000000ad158] .add_to_page_cache_lru+0x1c/0x4c
> [c000000009edfa90] [c0000000000add58] .find_or_create_page+0x60/0xa8
> [c000000009edfb30] [c00000000011e478] .__getblk+0x140/0x310
> [c000000009edfc00] [c0000000001b78c4] .journal_get_descriptor_buffer+0x44/0xd8
> [c000000009edfca0] [c0000000001b236c] .journal_commit_transaction+0x948/0x1590
> [c000000009edfe00] [c0000000001b585c] .kjournald+0xf4/0x2ac
> [c000000009edff00] [c00000000007ff4c] .kthread+0x84/0xd0
> [c000000009edff90] [c000000000028900] .kernel_thread+0x4c/0x68
> Instruction dump:
> 7dc57378 48009575 60000000 2fa30000 419e0490 56c902d8 3c000018 7dd907b4 
> 7ad2c7e2 7f890000 7c000026 5400fffe <0b000000> e93e8128 3b000000 80090000 

/* Convert GFP flags to their corresponding migrate type */
static inline int allocflags_to_migratetype(gfp_t gfp_flags)
{
        WARN_ON((gfp_flags & GFP_MOVABLE_MASK) == GFP_MOVABLE_MASK);

Mel, Pekka: would you have some head-scratching time for this one please?

^ permalink raw reply

* Re: [BUG] 2.6.25-rc3-mm1 kernel panic while bootup on powerpc ()
From: Pekka Enberg @ 2008-03-04 18:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linuxppc-dev, Mel Gorman, linux-kernel, Kamalesh Babulal,
	linux-mm
In-Reply-To: <20080304103636.3e7b8fdd.akpm@linux-foundation.org>

On Tue, 04 Mar 2008 18:42:19 +0530 Kamalesh Babulal
<kamalesh@linux.vnet.ibm.com> wrote:
>  > 3) Third attempt kernel booted up but had the following call trace 264 times while running
>  > test
>  >
>  > Badness at include/linux/gfp.h:110
>  > NIP: c0000000000b4ff0 LR: c0000000000b4fa0 CTR: c00000000019cdb4
>  > REGS: c000000009edf250 TRAP: 0700   Not tainted  (2.6.25-rc3-mm1-autotest)
>  > MSR: 8000000000029032 <EE,ME,IR,DR>  CR: 22024042  XER: 20000003
>  > TASK = c000000009062140[548] 'kjournald' THREAD: c000000009edc000 CPU: 0
>  > NIP [c0000000000b4ff0] .get_page_from_freelist+0x29c/0x898
>  > LR [c0000000000b4fa0] .get_page_from_freelist+0x24c/0x898
>  > Call Trace:
>  > [c000000009edf5f0] [c0000000000b56e4] .__alloc_pages_internal+0xf8/0x470
>  > [c000000009edf6e0] [c0000000000e0458] .kmem_getpages+0x8c/0x194
>  > [c000000009edf770] [c0000000000e1050] .fallback_alloc+0x194/0x254
>  > [c000000009edf820] [c0000000000e14b0] .kmem_cache_alloc+0xd8/0x144
>  > [c000000009edf8c0] [c0000000001fe0f8] .radix_tree_preload+0x50/0xd4
>  > [c000000009edf960] [c0000000000ad048] .add_to_page_cache+0x38/0x12c
>  > [c000000009edfa00] [c0000000000ad158] .add_to_page_cache_lru+0x1c/0x4c
>  > [c000000009edfa90] [c0000000000add58] .find_or_create_page+0x60/0xa8
>  > [c000000009edfb30] [c00000000011e478] .__getblk+0x140/0x310
>  > [c000000009edfc00] [c0000000001b78c4] .journal_get_descriptor_buffer+0x44/0xd8
>  > [c000000009edfca0] [c0000000001b236c] .journal_commit_transaction+0x948/0x1590
>  > [c000000009edfe00] [c0000000001b585c] .kjournald+0xf4/0x2ac
>  > [c000000009edff00] [c00000000007ff4c] .kthread+0x84/0xd0
>  > [c000000009edff90] [c000000000028900] .kernel_thread+0x4c/0x68
>  > Instruction dump:
>  > 7dc57378 48009575 60000000 2fa30000 419e0490 56c902d8 3c000018 7dd907b4
>  > 7ad2c7e2 7f890000 7c000026 5400fffe <0b000000> e93e8128 3b000000 80090000

On Tue, Mar 4, 2008 at 8:36 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>  /* Convert GFP flags to their corresponding migrate type */
>  static inline int allocflags_to_migratetype(gfp_t gfp_flags)
>  {
>         WARN_ON((gfp_flags & GFP_MOVABLE_MASK) == GFP_MOVABLE_MASK);
>
>  Mel, Pekka: would you have some head-scratching time for this one please?

Sure. Just to double-check, this is with SLAB, right? Do you see this with SLUB?

^ permalink raw reply

* [patch 00/16] PCI: consolidate several pcibios_enable_resources() implementations, v3
From: Bjorn Helgaas @ 2008-03-04 18:56 UTC (permalink / raw)
  To: linux-pci, linux-arch
  Cc: Chris Zankel, Grant Grundler, linux-parisc, Matthew Wilcox,
	Kyle McMartin, linuxppc-dev, Paul Mackerras, linux-arm-kernel,
	Russell King

This series replaces most of the arch-specific pcibios_enable_resources()
implementations with a single generic pci_enable_resources().

I think this is ready for -mm, but of course, I'm still interested in
any other comments.

Changes between v2 and v3:
    
    - Renamed the generic version to pci_enable_resources(), to keep
      pcibios_* names for arch-specific code (suggested by Kyle, thanks).

    - I reorganized this series into a single PCI patch that adds the new
      generic version, followed by a bunch of patches that individually
      convert each arch over to use it.

Bjorn

-- 

^ permalink raw reply

* [patch 02/16] alpha: use generic pci_enable_resources()
From: Bjorn Helgaas @ 2008-03-04 18:56 UTC (permalink / raw)
  To: linux-pci, linux-arch
  Cc: Chris Zankel, Grant Grundler, linux-parisc, Matthew Wilcox,
	Kyle McMartin, linuxppc-dev, Paul Mackerras, linux-arm-kernel,
	Russell King
In-Reply-To: <20080304185646.864917286@ldl.fc.hp.com>

Use the generic pci_enable_resources() instead of the arch-specific code.

Unlike this arch-specific code, the generic version:
    - skips resources unless requested in "mask"
    - skips ROM resources unless IORESOURCE_ROM_ENABLE is set
    - checks for resource collisions with "!r->parent"

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work8/arch/alpha/kernel/pci.c
===================================================================
--- work8.orig/arch/alpha/kernel/pci.c	2008-03-04 09:58:07.000000000 -0700
+++ work8/arch/alpha/kernel/pci.c	2008-03-04 09:58:54.000000000 -0700
@@ -372,28 +372,7 @@
 int
 pcibios_enable_device(struct pci_dev *dev, int mask)
 {
-	u16 cmd, oldcmd;
-	int i;
-
-	pci_read_config_word(dev, PCI_COMMAND, &cmd);
-	oldcmd = cmd;
-
-	for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-		struct resource *res = &dev->resource[i];
-
-		if (res->flags & IORESOURCE_IO)
-			cmd |= PCI_COMMAND_IO;
-		else if (res->flags & IORESOURCE_MEM)
-			cmd |= PCI_COMMAND_MEMORY;
-	}
-
-	if (cmd != oldcmd) {
-		printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
-		       pci_name(dev), cmd);
-		/* Enable the appropriate bits in the PCI command register.  */
-		pci_write_config_word(dev, PCI_COMMAND, cmd);
-	}
-	return 0;
+	return pci_enable_resources(dev, mask);
 }
 
 /*

-- 

^ permalink raw reply

* [patch 01/16] PCI: add generic pci_enable_resources()
From: Bjorn Helgaas @ 2008-03-04 18:56 UTC (permalink / raw)
  To: linux-pci, linux-arch
  Cc: Chris Zankel, Grant Grundler, linux-parisc, Matthew Wilcox,
	Kyle McMartin, linuxppc-dev, Paul Mackerras, linux-arm-kernel,
	Russell King
In-Reply-To: <20080304185646.864917286@ldl.fc.hp.com>

Each architecture has its own pcibios_enable_resources() implementation.
These differ in many minor ways that have nothing to do with actual
architectural differences.  Follow-on patches will make most arches
use this generic version instead.

This version is based on powerpc, which seemed most up-to-date.  The only
functional difference from the x86 version is that this uses "!r->parent"
to check for resource collisions instead of "!r->start && r->end".

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work8/drivers/pci/setup-res.c
===================================================================
--- work8.orig/drivers/pci/setup-res.c	2008-03-04 09:56:53.000000000 -0700
+++ work8/drivers/pci/setup-res.c	2008-03-04 09:56:56.000000000 -0700
@@ -263,3 +263,46 @@
 		}
 	}
 }
+
+int pci_enable_resources(struct pci_dev *dev, int mask)
+{
+	u16 cmd, old_cmd;
+	int i;
+	struct resource *r;
+
+	pci_read_config_word(dev, PCI_COMMAND, &cmd);
+	old_cmd = cmd;
+
+	for (i = 0; i < PCI_NUM_RESOURCES; i++) {
+		if (!(mask & (1 << i)))
+			continue;
+
+		r = &dev->resource[i];
+
+		if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
+			continue;
+		if ((i == PCI_ROM_RESOURCE) &&
+				(!(r->flags & IORESOURCE_ROM_ENABLE)))
+			continue;
+
+		if (!r->parent) {
+			dev_err(&dev->dev, "device not available because of "
+				"BAR %d [%llx:%llx] collisions\n", i,
+				(unsigned long long) r->start,
+				(unsigned long long) r->end);
+			return -EINVAL;
+		}
+
+		if (r->flags & IORESOURCE_IO)
+			cmd |= PCI_COMMAND_IO;
+		if (r->flags & IORESOURCE_MEM)
+			cmd |= PCI_COMMAND_MEMORY;
+	}
+
+	if (cmd != old_cmd) {
+		dev_info(&dev->dev, "enabling device (%04x -> %04x)\n",
+			 old_cmd, cmd);
+		pci_write_config_word(dev, PCI_COMMAND, cmd);
+	}
+	return 0;
+}
Index: work8/include/linux/pci.h
===================================================================
--- work8.orig/include/linux/pci.h	2008-03-04 09:56:45.000000000 -0700
+++ work8/include/linux/pci.h	2008-03-04 09:56:56.000000000 -0700
@@ -616,6 +616,7 @@
 void pci_assign_unassigned_resources(void);
 void pdev_enable_device(struct pci_dev *);
 void pdev_sort_resources(struct pci_dev *, struct resource_list *);
+int pci_enable_resources(struct pci_dev *, int mask);
 void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
 		    int (*)(struct pci_dev *, u8, u8));
 #define HAVE_PCI_REQ_REGIONS	2

-- 

^ 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