LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] fsl-diu-fb: Update Freescale DIU driver to use page_alloc_exact()
From: Andrew Morton @ 2008-06-30 20:24 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, linux-fbdev-devel, linux-kernel
In-Reply-To: <1214325853-26150-1-git-send-email-timur@freescale.com>

On Tue, 24 Jun 2008 11:44:13 -0500
Timur Tabi <timur@freescale.com> wrote:

> Update the Freescale DIU driver to use page_alloc_exact() to allocate a
> DMA buffer.  This also eliminates the rheap-based memory allocator.  We
> can do this now because commit 6ccf61f9 allows us to allocate 8MB physically-
> contiguous memory blocks.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> 
> My other patch, "Add alloc_pages_exact() and free_pages_exact()", must be
> applied first, otherwise drivers/video/fsl-diu-fb.c will not compile.
> 
>  drivers/video/fsl-diu-fb.c |   59 +++++++++++++++----------------------------
>  1 files changed, 21 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index 0a27853..d15d265 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -279,58 +279,41 @@ static struct diu_hw dr = {
>  
>  static struct diu_pool pool;
>  
> -/*	To allocate memory for framebuffer. First try __get_free_pages(). If it
> - *	fails, try rh_alloc. The reason is __get_free_pages() cannot allocate
> - *	very large memory (more than 4MB). We don't want to allocate all memory
> - *	in rheap since small memory allocation/deallocation will fragment the
> - *	rheap and make the furture large allocation fail.
> +/**
> + * fsl_diu_alloc - allocate memory for the DIU
> + * @size: number of bytes to allocate
> + * @param: returned physical address of memory
> + *
> + * This function allocates a physically-contiguous block of memory.
>   */
> -
> -void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys)
> +static void *fsl_diu_alloc(size_t size, phys_addr_t *phys)
>  {
>  	void *virt;
>  
> -	pr_debug("size=%lu\n", size);
> +	pr_debug("size=%u\n", size);

Nope, this will generate warnings on some architectures.

The way to print a size_t is with %zu or %zd.  I guess the latter is for
ssize_t.


> -	virt = (void *)__get_free_pages(GFP_DMA | __GFP_ZERO, get_order(size));
> +	virt = alloc_pages_exact(size, GFP_DMA | __GFP_ZERO);
>  	if (virt) {
>  		*phys = virt_to_phys(virt);
> -		pr_debug("virt %p, phys=%llx\n", virt, (uint64_t) *phys);
> -		return virt;
> -	}
> -	if (!diu_ops.diu_mem) {
> -		printk(KERN_INFO "%s: no diu_mem."
> -			" To reserve more memory, put 'diufb=15M' "
> -			"in the command line\n", __func__);
> -		return NULL;
> -	}
> -
> -	virt = (void *)rh_alloc(&diu_ops.diu_rh_info, size, "DIU");
> -	if (virt) {
> -		*phys = virt_to_bus(virt);
> -		memset(virt, 0, size);
> +		pr_debug("virt=%p, phys=%llx\n", virt, (uint64_t) *phys);

This is also incorrect.  We cannot pass u64 or uint64_t into printk at
all.  We do not know what type the architectures uses to implement
them.  It should be cast to a known type.  In this case `unsigned long
long'.

^ permalink raw reply

* PREEMPT_RT fixes
From: Scott Wood @ 2008-06-30 19:59 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org list

Kumar, could you apply these patches for 2.6.27?

http://patchwork.ozlabs.org/linuxppc/patch?id=18584
http://patchwork.ozlabs.org/linuxppc/patch?id=18587

-Scott

^ permalink raw reply

* RE: [PATCH] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: John Linn @ 2008-06-30 20:00 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, dmitry.torokhov, linux-input, Sadanand Mutyala
In-Reply-To: <20080630171628.GF17916@secretlab.ca>

Thanks Grant.  Sounds like there's a few things that not everyone does
the same based on comments from others.

In general, all pretty easy changes that in general make sense.

Thanks,
John

>On Mon, Jun 30, 2008 at 07:24:48AM -0700, John Linn wrote:
>> Added a new driver for Xilinx XPS PS2 IP. This driver is
>> a flat driver to better match the Linux driver pattern.
>> =

>> Signed-off-by: Sadanand <sadanan@xilinx.com>
>> Signed-off-by: John Linn <john.linn@xilinx.com>
>
>I don't know much about the serio conventions, but I can make some
>general comments...
>
>from MAINTAINERS:
>
>INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
>P:	Dmitry Torokhov
>M:	dmitry.torokhov@gmail.com
>M:	dtor@mail.ru
>L:	linux-input@vger.kernel.org
>T:	git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
>S:	Maintained
>
>You need to cc: the linux-input mailing list and Dimitry when you post
>the next version of this driver.
>

Makes sense, gotta get into the habit of that.

>> ---
>>  drivers/input/serio/Kconfig      |    5 +
>>  drivers/input/serio/Makefile     |    1 +
>>  drivers/input/serio/xilinx_ps2.c |  464
++++++++++++++++++++++++++++++++++++++
>>  drivers/input/serio/xilinx_ps2.h |   97 ++++++++
>>  4 files changed, 567 insertions(+), 0 deletions(-)
>>  create mode 100644 drivers/input/serio/xilinx_ps2.c
>>  create mode 100644 drivers/input/serio/xilinx_ps2.h
>> =

>> diff --git a/drivers/input/serio/Kconfig
b/drivers/input/serio/Kconfig
>> index ec4b661..0e62b39 100644
>> --- a/drivers/input/serio/Kconfig
>> +++ b/drivers/input/serio/Kconfig
>> @@ -190,4 +190,9 @@ config SERIO_RAW
>>  	  To compile this driver as a module, choose M here: the
>>  	  module will be called serio_raw.
>>  =

>> +config SERIO_XILINX_XPS_PS2
>> +	tristate "Xilinx XPS PS/2 Controller Support"
>> +	help
>> +	  This driver supports XPS PS/2 IP from Xilinx EDK.
>> +
>
>Consider moving this block to somewhere in the middle of the file to
>reduce the possibility of merge conflicts.
>

Sounds like this is not needed by Dmitry, but maybe it's a better habit
to get into.

>>  endif
>> diff --git a/drivers/input/serio/Makefile
b/drivers/input/serio/Makefile
>> index 38b8868..9b6c813 100644
>> --- a/drivers/input/serio/Makefile
>> +++ b/drivers/input/serio/Makefile
>> @@ -21,3 +21,4 @@ obj-$(CONFIG_SERIO_PCIPS2)	+=3D pcips2.o
>>  obj-$(CONFIG_SERIO_MACEPS2)	+=3D maceps2.o
>>  obj-$(CONFIG_SERIO_LIBPS2)	+=3D libps2.o
>>  obj-$(CONFIG_SERIO_RAW)		+=3D serio_raw.o
>> +obj-$(CONFIG_SERIO_XILINX_XPS_PS2)	+=3D xilinx_ps2.o
>
>Ditto.
>> diff --git a/drivers/input/serio/xilinx_ps2.c
b/drivers/input/serio/xilinx_ps2.c
>> new file mode 100644
>> index 0000000..670d47f
>> --- /dev/null
>> +++ b/drivers/input/serio/xilinx_ps2.c
>> @@ -0,0 +1,464 @@
>> +/*
>> + * xilinx_ps2.c
>
>Don't put the .c filename in the header block.

OK.

>
>> + *
>> + * Xilinx PS/2 driver to interface PS/2 component to Linux
>> + *
>> + * Author: MontaVista Software, Inc.
>> + *	   source@mvista.com
>
>Is this true anymore?
>

Not clear to me since we derived the code from an existing driver. Can
be removed.

>> + *
>> + * (c) 2005 MontaVista Software, Inc.
>> + * (c) 2008 Xilinx Inc.
>> + *
>> + * 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.
>> + *
>> + * 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.,
>> + * 675 Mass Ave, Cambridge, MA 02139, USA.
>
>These two paragraphs are redundant.  Being in the Linux source tree
>implies that it is GPL licensed.  You can remove them.
>

Sounds like there's not consistency as Dmitry said it can be left. Fine
either way.
What is the best habit to get into that will satisfy the majority of the
crowd?

>> + */
>> +
>> +
>> +#include <linux/module.h>
>> +#include <linux/serio.h>
>> +#include <linux/interrupt.h>
>> +#include <linux/errno.h>
>> +#include <linux/init.h>
>> +#include <linux/list.h>
>> +#include <asm/io.h>
>> +
>> +#ifdef CONFIG_OF		/* For open firmware */
>> + #include <linux/of_device.h>
>> + #include <linux/of_platform.h>
>> +#endif /* CONFIG_OF */
>
>This is a given for mainline since arch/ppc will not exist in 2.6.27
>

Agreed, we'll remove.

>> +
>> +#include "xilinx_ps2.h"
>
>This header can simple be rolled into this .c file because the driver
no
>longer has multiple .c files.
>

Agreed.

>
>> +#define DRIVER_DESCRIPTION	"Xilinx XPS PS/2 driver"
>> +#define XPS2_NAME_DESC		"Xilinx XPS PS/2 Port #%d"
>> +#define XPS2_PHYS_DESC		"xilinxps2/serio%d"
>
>These strings are only used in 1 place each, no need to use a #define
>

Agreed.

>> +
>> +
>> +static DECLARE_MUTEX(cfg_sem);
>
>This mutex should be part of the driver private data structure
>

OK. I assume just trying to keep all the driver private data together.

>> +
>> +/*********************/
>> +/* Interrupt handler */
>> +/*********************/
>> +static irqreturn_t xps2_interrupt(int irq, void *dev_id)
>> +{
>> +	struct xps2data *drvdata =3D (struct xps2data *)dev_id;
>> +	u32 intr_sr;
>> +	u32 ier;
>> +	u8 c;
>> +	u8 retval;
>> +
>> +	/* Get the PS/2 interrupts and clear them */
>> +	intr_sr =3D in_be32(drvdata->base_address + XPS2_IPISR_OFFSET);
>> +	out_be32(drvdata->base_address + XPS2_IPISR_OFFSET, intr_sr);
>> +
>> +	/* Check which interrupt is active */
>> +	if (intr_sr & XPS2_IPIXR_RX_OVF) {
>> +		printk(KERN_ERR "%s: receive overrun error\n",
>> +			drvdata->serio.name);
>> +	}
>> +
>> +	if (intr_sr & XPS2_IPIXR_RX_ERR) {
>> +		drvdata->dfl |=3D SERIO_PARITY;
>> +	}
>> +
>> +	if (intr_sr & (XPS2_IPIXR_TX_NOACK | XPS2_IPIXR_WDT_TOUT)) {
>> +		drvdata->dfl |=3D SERIO_TIMEOUT;
>> +	}
>> +
>> +	if (intr_sr & XPS2_IPIXR_RX_FULL) {
>> +		retval =3D xps2_recv(drvdata, &drvdata->rxb);
>> +
>> +		/* Error, if 1 byte is not received */
>> +		if (retval !=3D 1) {
>> +			printk(KERN_ERR
>> +				"%s: wrong rcvd byte count (%d)\n",
>> +				drvdata->serio.name, retval);
>> +		}
>> +		c =3D drvdata->rxb;
>> +		serio_interrupt(&drvdata->serio, c, drvdata->dfl);
>> +		drvdata->dfl =3D 0;
>> +	}
>> +
>> +	if (intr_sr & XPS2_IPIXR_TX_ACK) {
>> +
>> +		/* Disable the TX interrupts after the transmission is
>> +		 * complete */
>> +		ier =3D in_be32(drvdata->base_address +
XPS2_IPIER_OFFSET);
>> +		ier &=3D (~(XPS2_IPIXR_TX_ACK & XPS2_IPIXR_ALL ));
>> +		out_be32(drvdata->base_address + XPS2_IPIER_OFFSET,
ier);
>> +		drvdata->dfl =3D 0;
>> +	}
>> +
>> +	return IRQ_HANDLED;
>> +}
>> +
>> +/*******************/
>> +/* serio callbacks */
>> +/*******************/
>> +
>> +/*
>> + * sxps2_write() sends a byte out through the PS/2 interface.
>> + *
>> + * The sole purpose of drvdata->tx_end is to prevent the driver
>> + * from locking up in the do {} while; loop when nothing is
connected
>> + * to the given PS/2 port. That's why we do not try to recover
>> + * from the transmission failure.
>> + * drvdata->tx_end needs not to be initialized to some "far in the
>> + * future" value, as the very first attempt to xps2_send() a byte
>> + * is always successful, and drvdata->tx_end will be set to a proper
>> + * value at that moment - before the 1st use in the comparison.
>> + */
>
>Good comment block.
>
>nitpick: can you reformat the comment blocks to be in kerneldoc format?
>That will allow the automatic document generation tools to parse it.
>
>see: Documentation/kernel-doc-nano-HOWTO.txt

Sounds like it won't matter according to Dmitry, =

but maybe it's a good habit to get into anyway.

>
>> +static int sxps2_write(struct serio *pserio, unsigned char c)
>> +{
>> +	struct xps2data *drvdata =3D pserio->port_data;
>> +	unsigned long flags;
>> +	int retval;
>> +
>> +	do {
>> +		spin_lock_irqsave(&drvdata->lock, flags);
>> +		retval =3D xps2_send(drvdata, &c);
>> +		spin_unlock_irqrestore(&drvdata->lock, flags);
>> +
>> +		if (retval =3D=3D 1) {
>> +			drvdata->tx_end =3D jiffies + HZ;
>> +			return 0;	/* success */
>> +		}
>> +	} while (!time_after(jiffies, drvdata->tx_end));
>> +
>> +	return 1;			/* transmission is frozen */
>> +}
>> +
>> +/*
>> + * sxps2_open() is called when a port is open by the higher layer.
>> + */
>> +static int sxps2_open(struct serio *pserio)
>> +{
>> +	struct xps2data *drvdata =3D pserio->port_data;
>> +	int retval;
>> +
>> +	retval =3D request_irq(drvdata->irq, &xps2_interrupt, 0,
>> +				DRIVER_NAME, drvdata);
>> +	if (retval) {
>> +		printk(KERN_ERR
>> +			"%s: Couldn't allocate interrupt %d\n",
>> +			drvdata->serio.name, drvdata->irq);
>> +		return retval;
>> +	}
>> +
>> +	/* start reception by enabling the interrupts */
>> +	out_be32(drvdata->base_address + XPS2_GIER_OFFSET,
XPS2_GIER_GIE_MASK);
>> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET,
XPS2_IPIXR_RX_ALL);
>> +	(void)xps2_recv(drvdata, &drvdata->rxb);
>> +
>> +	return 0;		/* success */
>> +}
>> +
>> +/*
>> + * sxps2_close() frees the interrupt.
>> + */
>> +static void sxps2_close(struct serio *pserio)
>> +{
>> +	struct xps2data *drvdata =3D pserio->port_data;
>> +
>> +	/* Disable the PS2 interrupts */
>> +	out_be32(drvdata->base_address + XPS2_GIER_OFFSET, 0x00);
>> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, 0x00);
>> +	free_irq(drvdata->irq, drvdata);
>> +}
>> +
>> +/*************************/
>> +/* XPS PS/2 driver calls */
>> +/*************************/
>> +
>> +/*
>> + * xps2_initialize() initializes the Xilinx PS/2 device.
>> + */
>> +static int xps2_initialize(struct xps2data *drvdata)
>> +{
>> +	/* Disable all the interrupts just in case */
>> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, 0);
>> +
>> +	/* Reset the PS2 device and abort any current transaction, to
make sure
>> +	 * we have the PS2 in a good state */
>> +	out_be32(drvdata->base_address + XPS2_SRST_OFFSET,
XPS2_SRST_RESET);
>> +
>> +	return 0;
>> +}
>> +
>> +/*
>> + * xps2_send() sends the specified byte of data to the PS/2 port in
interrupt
>> + * mode.
>> + */
>> +static u8 xps2_send(struct xps2data *drvdata, u8 *byte)
>> +{
>> +	u32 sr;
>> +	u32 ier;
>> +	u8 retval =3D 0;
>> +
>> +	/* Enter a critical region by disabling the PS/2 transmit
interrupts to
>> +	 * allow this call to stop a previous operation that may be
interrupt
>> +	 * driven. Only stop the transmit interrupt since this critical
region
>> +	 * is not really exited in the normal manner */
>> +	ier =3D in_be32(drvdata->base_address + XPS2_IPIER_OFFSET);
>> +	ier &=3D (~(XPS2_IPIXR_TX_ALL & XPS2_IPIXR_ALL ));
>> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, ier);
>> +
>> +	/* If the PS/2 transmitter is empty send a byte of data */
>> +	sr =3D in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
>> +	if ((sr & XPS2_STATUS_TX_FULL) =3D=3D 0) {
>> +		out_be32(drvdata->base_address + XPS2_TX_DATA_OFFSET,
*byte);
>> +		retval =3D 1;
>> +	}
>> +
>> +	/* Enable the TX interrupts to track the status of the
transmission */
>> +	ier =3D in_be32(drvdata->base_address + XPS2_IPIER_OFFSET);
>> +	ier |=3D ((XPS2_IPIXR_TX_ALL | XPS2_IPIXR_WDT_TOUT ));
>> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, ier);
>> +
>> +	return retval;		/* no. of bytes sent */
>> +}
>> +
>> +/*
>> + * xps2_recv() will attempt to receive a byte of data from the PS/2
port.
>> + */
>> +static u8 xps2_recv(struct xps2data *drvdata, u8 *byte)
>> +{
>> +	u32 sr;
>> +	u8 retval =3D 0;
>> +
>> +	/* If there is data available in the PS/2 receiver, read it */
>> +	sr =3D in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
>> +	if (sr & XPS2_STATUS_RX_FULL) {
>> +		*byte =3D in_be32(drvdata->base_address +
XPS2_RX_DATA_OFFSET);
>> +		retval =3D 1;
>> +	}
>> +
>> +	return retval;		/* no. of bytes received */
>> +}
>
>Since xps2_recv() and xps2_send() are used by the sxps2_* routines and
>by the irq handler, they should be moved to about them in this file.
>

OK, keeping them close makes maintenance easier I guess.

>> +
>> +/******************************/
>> +/* The platform device driver */
>> +/******************************/
>You can drop the platform driver bindings for inclusion in mainline.
>

OK.

><snip>
>
>> +static struct device_driver xps2_driver =3D {
>> +	.name =3D DRIVER_NAME,
>> +	.bus =3D &platform_bus_type,
>> +	.probe =3D xps2_probe,
>> +	.remove =3D xps2_remove
>> +};
>
>This is platform bus stuff that will disappear anyway, but I'm going to
>make a comment here regardless.  When registering a platform bus device
>driver, you should use 'struct platform_driver' instead of 'struct
>device_driver', and it should be registered with
>platform_driver_register().
>

OK.

>> new file mode 100644
>> index 0000000..4db73ca
>> --- /dev/null
>> +++ b/drivers/input/serio/xilinx_ps2.h
>> @@ -0,0 +1,97 @@
>>
+/**********************************************************************
*******
>> + *
>> + *     Author: Xilinx, Inc.
>> + *
>> + *     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.
>> + *
>> + *     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
>> + *     AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS
AND
>> + *     SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN,
CODE,
>> + *     OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS
FEATURE,
>> + *     APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
>> + *     THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF
INFRINGEMENT,
>> + *     AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY
REQUIRE
>> + *     FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
>> + *     WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
>> + *     IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES
OR
>> + *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS
OF
>> + *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS
>> + *     FOR A PARTICULAR PURPOSE.
>
>Please drop this.
>

OK.

><snip>
>> +
>> +static u8 xps2_send(struct xps2data *drvdata, u8 *buffer_ptr);
>> +static u8 xps2_recv(struct xps2data *drvdata, u8 *buffer_ptr);
>> +static int xps2_initialize(struct xps2data *drvdata);
>> +static int xps2_setup(struct device *dev, int id, struct resource
*regs_res,
>> +		      struct resource *irq_res);
>
>These can be removed by reorganizing the .c file so that callees are
>always above the caller.
>
>Nice driver.
>
>Cheers,
>g.
>

This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

^ permalink raw reply

* Re: [PATCH v2] powerpc: Add dma nodes to 83xx, 85xx and 86xx boards
From: Scott Wood @ 2008-06-30 19:55 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org list, Timur Tabi
In-Reply-To: <D70C5CB6-5066-4AD3-9367-879AF39FB8E1@kernel.crashing.org>

Kumar Gala wrote:
> I believe this comes into play when we have more than one DMA controller 
> and sometimes there are special uses like on 8610.

Maybe, though I'd just use a phandle to express that (unless you need to 
program the number that you're using, rather than just use a specific one).

Could you add cell-index to the individual channels, though (you have it 
in some dts files, and not others)?

-Scott

^ permalink raw reply

* RE: [PATCH] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: John Linn @ 2008-06-30 19:41 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linuxppc-dev, Sadanand Mutyala
In-Reply-To: <87y74ndlsf.fsf@macbook.be.48ers.dk>

Thanks Peter, those make sense.  We'll incorporate those comments.

-----Original Message-----
From: Peter Korsgaard [mailto:jacmet@gmail.com] On Behalf Of Peter
Korsgaard
Sent: Monday, June 30, 2008 8:45 AM
To: John Linn
Cc: linuxppc-dev@ozlabs.org; Sadanand Mutyala
Subject: Re: [PATCH] powerpc: Xilinx: PS2: Added new XPS PS2 driver

>>>>> "John" =3D=3D John Linn <john.linn@xilinx.com> writes:

> > Added a new driver for Xilinx XPS PS2 IP. This driver is
> > a flat driver to better match the Linux driver pattern.
>
>This should probably go to the linux-input@ list as well.

Agreed, done.

>
> > Signed-off-by: Sadanand <sadanan@xilinx.com>
> > Signed-off-by: John Linn <john.linn@xilinx.com>
> > ---
> >  drivers/input/serio/Kconfig      |    5 +
> >  drivers/input/serio/Makefile     |    1 +
> >  drivers/input/serio/xilinx_ps2.c |  464
++++++++++++++++++++++++++++++++++++++
> >  drivers/input/serio/xilinx_ps2.h |   97 ++++++++
> >  4 files changed, 567 insertions(+), 0 deletions(-)
> >  create mode 100644 drivers/input/serio/xilinx_ps2.c
> >  create mode 100644 drivers/input/serio/xilinx_ps2.h
>
> > diff --git a/drivers/input/serio/Kconfig
b/drivers/input/serio/Kconfig
> > index ec4b661..0e62b39 100644
> > --- a/drivers/input/serio/Kconfig
> > +++ b/drivers/input/serio/Kconfig
> > @@ -190,4 +190,9 @@ config SERIO_RAW
> >  	  To compile this driver as a module, choose M here: the
> >  	  module will be called serio_raw.
> =

> > +config SERIO_XILINX_XPS_PS2
> > +	tristate "Xilinx XPS PS/2 Controller Support"
> > +	help
> > +	  This driver supports XPS PS/2 IP from Xilinx EDK.
> > +
> >  endif
> > diff --git a/drivers/input/serio/Makefile
b/drivers/input/serio/Makefile
> > index 38b8868..9b6c813 100644
> > --- a/drivers/input/serio/Makefile
> > +++ b/drivers/input/serio/Makefile
> > @@ -21,3 +21,4 @@ obj-$(CONFIG_SERIO_PCIPS2)	+=3D pcips2.o
> >  obj-$(CONFIG_SERIO_MACEPS2)	+=3D maceps2.o
> >  obj-$(CONFIG_SERIO_LIBPS2)	+=3D libps2.o
> >  obj-$(CONFIG_SERIO_RAW)		+=3D serio_raw.o
> > +obj-$(CONFIG_SERIO_XILINX_XPS_PS2)	+=3D xilinx_ps2.o
> > diff --git a/drivers/input/serio/xilinx_ps2.c
b/drivers/input/serio/xilinx_ps2.c
> > new file mode 100644
> > index 0000000..670d47f
> > --- /dev/null
> > +++ b/drivers/input/serio/xilinx_ps2.c
> > @@ -0,0 +1,464 @@
> > +/*
> > + * xilinx_ps2.c
> > + *
> > + * Xilinx PS/2 driver to interface PS/2 component to Linux
> > + *
> > + * Author: MontaVista Software, Inc.
> > + *	   source@mvista.com
> > + *
> > + * (c) 2005 MontaVista Software, Inc.
> > + * (c) 2008 Xilinx Inc.
> > + *
>
>Is the montavista stuff still valid?
>

We derived the driver from MontaVista code is the reason we left it in.
Since a significant part of the code was derived, I think we defaulted
to leave it in.

> > + * 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.
> > + *
> > + * 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.,
> > + * 675 Mass Ave, Cambridge, MA 02139, USA.
> > + */
> > +
> > +
> > +#include <linux/module.h>
> > +#include <linux/serio.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/errno.h>
> > +#include <linux/init.h>
> > +#include <linux/list.h>
> > +#include <asm/io.h>
>
>linux/io.h please.
>

Done in v2.

> > +
> > +#ifdef CONFIG_OF		/* For open firmware */
>
>Why support !CONFIG_OF? =

>

Agreed, we just got in the habit.

> > + #include <linux/of_device.h>
> > + #include <linux/of_platform.h>
> > +#endif /* CONFIG_OF */
> > +
> > +#include "xilinx_ps2.h"
>
>Why the seperate header? You're the only user of it, right?
>

That's true, can be incorporated into the c file.

> > +
> > +#define DRIVER_NAME		"xilinx_ps2"
> > +#define DRIVER_DESCRIPTION	"Xilinx XPS PS/2 driver"
> > +
> > +#define XPS2_NAME_DESC		"Xilinx XPS PS/2 Port #%d"
> > +#define XPS2_PHYS_DESC		"xilinxps2/serio%d"
>
>Why have defines to stuff only used once?
>

Agreed, out of habit.

>...
>
> > +
> > +/******************************/
> > +/* The platform device driver */
> > +/******************************/
> > +
> > +static int xps2_probe(struct device *dev)
>
>__devinit please.
>

Agreed.

> > +{
> > +	struct platform_device *pdev =3D to_platform_device(dev);
> > +
> > +	struct resource *irq_res =3D NULL;	/* Interrupt resources
*/
> > +	struct resource *regs_res =3D NULL;	/* IO mem resources */
> > +
> > +	if (!dev) {
> > +		dev_err(dev, "Probe called with NULL param\n");
> > +		return -EINVAL;
> > +	}
> > +
> > +	/* Find irq number, map the control registers in */
> > +	irq_res =3D platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> > +	regs_res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	return xps2_setup(dev, pdev->id, regs_res, irq_res);
> > +}
>
>...
>
> > +
> > +/*
> > + * xps2_remove() dissociates the driver with the Xilinx PS/2
device.
> > + */
> > +static int xps2_remove(struct device *dev)
>
>__devexit please.
>

Agreed.

> > +{
> > +	struct xps2data *drvdata;
> > +
> > +	if (!dev)
> > +		return -EINVAL;
> > +
> > +	drvdata =3D (struct xps2data *)dev_get_drvdata(dev);
> > +
> > +	serio_unregister_port(&drvdata->serio);
> > +
> > +	iounmap(drvdata->base_address);
> > +
> > +	release_mem_region(drvdata->phys_addr, drvdata->remap_size);
> > +
> > +	kfree(drvdata);
> > +	dev_set_drvdata(dev, NULL);
> > +
> > +	return 0;		/* success */
> > +}
> > +
> > +static struct device_driver xps2_driver =3D {
>
>Please use a real struct platform_driver instead.
>

Agreed, this will go away I think.

> > +	.name =3D DRIVER_NAME,
> > +	.bus =3D &platform_bus_type,
> > +	.probe =3D xps2_probe,
> > +	.remove =3D xps2_remove
> > +};
> > +
>
-- =

Bye, Peter Korsgaard



This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

^ permalink raw reply

* Re: [RFC] 4xx hardware watchpoint support
From: Luis Machado @ 2008-06-30 19:16 UTC (permalink / raw)
  To: Paul Mackerras, Josh Boyer; +Cc: ppc-dev
In-Reply-To: <1213992894.6635.41.camel@gargoyle>

Hi guys,

Did anyone have a chance to go over this patch? Looking forward to
receive feedbacks on it.

Thanks!

Regards,
Luis

On Fri, 2008-06-20 at 17:14 -0300, Luis Machado wrote:
> On Thu, 2008-05-22 at 13:51 +1000, Paul Mackerras wrote:
> > Luis Machado writes:
> > 
> > > This is a patch that has been sitting idle for quite some time. I
> > > decided to move it further because it is something useful. It was
> > > originally written by Michel Darneille, based off of 2.6.16.
> > > 
> > > The original patch, though, was not compatible with the current DABR
> > > logic. DABR's are used to implement hardware watchpoint support for
> > > ppc64 processors (i.e. 970, Power5 etc). 4xx's have a different
> > > debugging register layout and needs to be handled differently (they two
> > > registers: DAC and DBCR0).
> > 
> > Yes, they are different, but they do essentially the same thing, so I
> > think we should try and unify the handling of the two.  Maybe you
> > could rename set_dabr() to set_hw_watchpoint() or something and make
> > it set DABR on 64-bit and "classic" 32-bit processors, and DAC on
> > 4xx/Book E processors.
> > 
> > Likewise, I don't think we need both a "dabr" field and a "dac" field
> > in the thread_struct - one should do.  Rename "dabr" to something else
> > if you feel that the "dabr" name is too ppc64-specific.  And I don't
> > think we need both __debugger_dabr_match and __debugger_dac_match.
> > 
> > > 5) This is something i'm worried about for future features. We currently
> > > have a way to support only Hardware Watchpoints, but not Hardware
> > > Breakpoints (on 64-bit processors that have a IABR register or 32-bit
> > > processors carrying the IAC register). Looking at the code, we don't
> > > differentiate a watchpoint from a breakpoint request. A ptrace call has
> > > currently 3 arguments: REQUEST, ADDR and DATA. We use REQUEST and DATA
> > > to set a hardware watchpoint. Maybe we could use the ADDR parameter to
> > > set a hardware breakpoint? Or use it to tell the kernel whether we want
> > > a hardware watchpoint or hardware breakpoint and then pass the address
> > > of the instruction/data through the DATA parameter? What do you think?
> > 
> > I would think there would be a different REQUEST value to mean "set a
> > hardware breakpoint".  Roland McGrath (cc'd) might be able to tell us
> > what other architectures do.
> > 
> > Paul.
> 
> Paul,
> 
> Follows a re-worked patch that unifies the handling of hardware
> watchpoint structures for DABR-based and DAC-based processors.
> 
> The flow is exactly the same for DABR-based processors.
> 
> As for the DAC-based code, i've eliminated the "dac" field from the
> thread structure, since now we use the "dabr" field to represent DAC1 of
> the DAC-based processors. As a consequence, i removed all the
> occurrences of "dac" throughout the code, using "dabr" in those cases.
> 
> The function "set_dabr" sets the correct register (DABR OR DAC) for each
> specific processor now, instead of only setting the value for DABR-based
> processors.
> 
> "do_dac" was merged with "do_dabr" as they were mostly equivalent pieces
> of code. I've moved "do_dabr" to "arch/powerpc/kernel/process.c" so it
> is visible for DAC-based code as well.
> 
> Tested on a Taishan 440GX with success.
> 
> Is it OK to leave it as "dabr" for both DABR and DAC? What do you think
> of the patch overall?
> 
> Thanks,
> 
> Best regards,
> Luis
> 
> 
> Index: linux-2.6.25-oldpatch/arch/powerpc/kernel/process.c
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/arch/powerpc/kernel/process.c	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/arch/powerpc/kernel/process.c	2008-06-20 02:51:16.000000000 -0700
> @@ -241,6 +241,35 @@
>  }
>  #endif /* CONFIG_SMP */
> 
> +void do_dabr(struct pt_regs *regs, unsigned long address,
> +		    unsigned long error_code)
> +{
> +	siginfo_t info;
> +
> +#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
> +	if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
> +			11, SIGSEGV) == NOTIFY_STOP)
> +		return;
> +
> +	if (debugger_dabr_match(regs))
> +		return;
> +#else
> +        /* Clear the DAC and struct entries.  One shot trigger.  */
> +        mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | DBSR_DAC1W
> +                                                        | DBCR0_IDM));
> +#endif
> +
> +	/* Clear the DABR */
> +	set_dabr(0);
> +
> +	/* Deliver the signal to userspace */
> +	info.si_signo = SIGTRAP;
> +	info.si_errno = 0;
> +	info.si_code = TRAP_HWBKPT;
> +	info.si_addr = (void __user *)address;
> +	force_sig_info(SIGTRAP, &info, current);
> +}
> +
>  static DEFINE_PER_CPU(unsigned long, current_dabr);
> 
>  int set_dabr(unsigned long dabr)
> @@ -256,6 +285,11 @@
>  #if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
>  	mtspr(SPRN_DABR, dabr);
>  #endif
> +
> +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> +	mtspr(SPRN_DAC1, dabr);
> +#endif
> +
>  	return 0;
>  }
> 
> @@ -330,6 +364,12 @@
>  	if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
>  		set_dabr(new->thread.dabr);
> 
> +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> +	/* If new thread DAC (HW breakpoint) is the same then leave it.  */
> +	if (new->thread.dabr)
> +		set_dabr(new->thread.dabr);
> +#endif
> +
>  	new_thread = &new->thread;
>  	old_thread = &current->thread;
> 
> @@ -518,6 +558,10 @@
>  	if (current->thread.dabr) {
>  		current->thread.dabr = 0;
>  		set_dabr(0);
> +
> +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> +		current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W);
> +#endif
>  	}
>  }
> 
> Index: linux-2.6.25-oldpatch/arch/powerpc/kernel/ptrace.c
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/arch/powerpc/kernel/ptrace.c	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/arch/powerpc/kernel/ptrace.c	2008-06-20 05:10:59.000000000 -0700
> @@ -616,7 +616,7 @@
> 
>  	if (regs != NULL) {
>  #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> -		task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC;
> +		task->thread.dbcr0 |= DBCR0_IDM | DBCR0_IC;
>  		regs->msr |= MSR_DE;
>  #else
>  		regs->msr |= MSR_SE;
> @@ -629,9 +629,16 @@
>  {
>  	struct pt_regs *regs = task->thread.regs;
> 
> +
> +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> +	/* If DAC then do not single step, skip.  */
> +	if (task->thread.dabr)
> +		return;
> +#endif
> +
>  	if (regs != NULL) {
>  #if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> -		task->thread.dbcr0 = 0;
> +		task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_IDM);
>  		regs->msr &= ~MSR_DE;
>  #else
>  		regs->msr &= ~MSR_SE;
> @@ -640,22 +647,79 @@
>  	clear_tsk_thread_flag(task, TIF_SINGLESTEP);
>  }
> 
> -static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
> +static int ptrace_get_debugreg(struct task_struct *task, unsigned long data)
> +{
> +	int ret;
> +
> +	ret = put_user(task->thread.dabr,
> +			(unsigned long __user *)data);
> +	return ret;
> +}
> +
> +int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
>  			       unsigned long data)
>  {
> -	/* We only support one DABR and no IABRS at the moment */
> +	/* For ppc64 we support one DABR and no IABR's at the moment (ppc64).
> +	   For embedded processors we support one DAC and no IAC's
> +	   at the moment.  */
>  	if (addr > 0)
>  		return -EINVAL;
> 
> -	/* The bottom 3 bits are flags */
>  	if ((data & ~0x7UL) >= TASK_SIZE)
>  		return -EIO;
> 
> -	/* Ensure translation is on */
> +#ifdef CONFIG_PPC64
> +
> +	/* For processors using DABR (i.e. 970), the bottom 3 bits are flags.
> +	   It was assumed, on previous implementations, that 3 bits were
> +	   passed together with the data address, fitting the design of the
> +	   DABR register, as follows:
> +
> +	   bit 0: Read flag
> +	   bit 1: Write flag
> +	   bit 2: Breakpoint translation
> +
> +	   Thus, we use them here as so.  */
> +
> +	/* Ensure breakpoint translation bit is set.  */
>  	if (data && !(data & DABR_TRANSLATION))
>  		return -EIO;
> 
> +	/* Move contents to the DABR register.  */
>  	task->thread.dabr = data;
> +
> +#endif
> +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> +
> +	/* As described above, we assume 3 bits are passed with the data
> +	   address, so mask them so we can set the DAC register with the
> +	   correct address.  */
> +	/* DAC's hold the whole address without any mode flags.  */
> +	task->thread.dabr = data & ~0x3UL;
> +
> +	if (task->thread.dabr == 0) {
> +		task->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W | DBCR0_IDM);
> +		task->thread.regs->msr &= ~MSR_DE;
> +		return 0;
> +	}
> +
> +        /* Read or Write bits must be set.  */
> +
> +        if (!(data & 0x3UL))
> +                return -EINVAL;
> +
> +	/* Set the Internal Debugging flag (IDM bit 1) for the DBCR0
> +	   register.  */
> +	task->thread.dbcr0 = DBCR0_IDM;
> +
> +	/* Check for write and read flags and set DBCR0 accordingly.  */
> +	if (data & 0x1UL)
> +		task->thread.dbcr0 |= DBSR_DAC1R;
> +	if (data & 0x2UL)
> +		task->thread.dbcr0 |= DBSR_DAC1W;
> +
> +	task->thread.regs->msr |= MSR_DE;
> +#endif
>  	return 0;
>  }
> 
> Index: linux-2.6.25-oldpatch/arch/powerpc/kernel/signal.c
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/arch/powerpc/kernel/signal.c	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/arch/powerpc/kernel/signal.c	2008-06-20 02:51:16.000000000 -0700
> @@ -144,8 +144,12 @@
>  	 * user space. The DABR will have been cleared if it
>  	 * triggered inside the kernel.
>  	 */
> -	if (current->thread.dabr)
> +	if (current->thread.dabr) {
>  		set_dabr(current->thread.dabr);
> +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> +		mtspr(SPRN_DBCR0, current->thread.dbcr0);
> +#endif
> +	}
> 
>  	if (is32) {
>          	if (ka.sa.sa_flags & SA_SIGINFO)
> Index: linux-2.6.25-oldpatch/arch/powerpc/kernel/traps.c
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/arch/powerpc/kernel/traps.c	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/arch/powerpc/kernel/traps.c	2008-06-20 02:54:37.000000000 -0700
> @@ -1045,6 +1045,21 @@
>  				return;
>  		}
>  		_exception(SIGTRAP, regs, TRAP_TRACE, 0);
> +	} else if (debug_status & (DBSR_DAC1R | DBSR_DAC1W)) {
> +		regs->msr &= ~MSR_DE;
> +	        printk("\nWatchpoint Triggered\n");
> +		if (user_mode(regs)) {
> +			current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W |
> +								DBCR0_IDM);
> +		} else {
> +			/* Disable DAC interupts.  */
> +			mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R |
> +							DBSR_DAC1W | DBCR0_IDM));
> +			/* Clear the DAC event.  */
> +			mtspr(SPRN_DBSR, (DBSR_DAC1R | DBSR_DAC1W));
> +		}
> +		/* Setup and send the trap to the handler.  */
> +		do_dabr(regs, mfspr(SPRN_DAC1), debug_status);
>  	}
>  }
>  #endif /* CONFIG_4xx || CONFIG_BOOKE */
> Index: linux-2.6.25-oldpatch/arch/powerpc/kernel/entry_32.S
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/arch/powerpc/kernel/entry_32.S	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/arch/powerpc/kernel/entry_32.S	2008-06-20 02:51:16.000000000 -0700
> @@ -112,7 +112,7 @@
>  	/* Check to see if the dbcr0 register is set up to debug.  Use the
>  	   internal debug mode bit to do this. */
>  	lwz	r12,THREAD_DBCR0(r12)
> -	andis.	r12,r12,DBCR0_IDM@h
> +	andis.	r12,r12,(DBCR0_IDM  | DBSR_DAC1R | DBSR_DAC1W)@h
>  	beq+	3f
>  	/* From user and task is ptraced - load up global dbcr0 */
>  	li	r12,-1			/* clear all pending debug events */
> @@ -248,7 +248,7 @@
>  	/* If the process has its own DBCR0 value, load it up.  The internal
>  	   debug mode bit tells us that dbcr0 should be loaded. */
>  	lwz	r0,THREAD+THREAD_DBCR0(r2)
> -	andis.	r10,r0,DBCR0_IDM@h
> +	andis.	r10,r0,(DBCR0_IDM  | DBSR_DAC1R | DBSR_DAC1W)@h
>  	bnel-	load_dbcr0
>  #endif
>  #ifdef CONFIG_44x
> @@ -676,7 +676,7 @@
>  	/* Check whether this process has its own DBCR0 value.  The internal
>  	   debug mode bit tells us that dbcr0 should be loaded. */
>  	lwz	r0,THREAD+THREAD_DBCR0(r2)
> -	andis.	r10,r0,DBCR0_IDM@h
> +	andis.	r10,r0,(DBCR0_IDM  | DBSR_DAC1R | DBSR_DAC1W)@h
>  	bnel-	load_dbcr0
>  #endif
> 
> Index: linux-2.6.25-oldpatch/arch/powerpc/mm/fault.c
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/arch/powerpc/mm/fault.c	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/arch/powerpc/mm/fault.c	2008-06-20 02:51:16.000000000 -0700
> @@ -100,31 +100,6 @@
>  	return 0;
>  }
> 
> -#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
> -static void do_dabr(struct pt_regs *regs, unsigned long address,
> -		    unsigned long error_code)
> -{
> -	siginfo_t info;
> -
> -	if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
> -			11, SIGSEGV) == NOTIFY_STOP)
> -		return;
> -
> -	if (debugger_dabr_match(regs))
> -		return;
> -
> -	/* Clear the DABR */
> -	set_dabr(0);
> -
> -	/* Deliver the signal to userspace */
> -	info.si_signo = SIGTRAP;
> -	info.si_errno = 0;
> -	info.si_code = TRAP_HWBKPT;
> -	info.si_addr = (void __user *)address;
> -	force_sig_info(SIGTRAP, &info, current);
> -}
> -#endif /* !(CONFIG_4xx || CONFIG_BOOKE)*/
> -
>  /*
>   * For 600- and 800-family processors, the error_code parameter is DSISR
>   * for a data fault, SRR1 for an instruction fault. For 400-family processors
> Index: linux-2.6.25-oldpatch/include/asm-powerpc/system.h
> ===================================================================
> --- linux-2.6.25-oldpatch.orig/include/asm-powerpc/system.h	2008-06-20 02:48:19.000000000 -0700
> +++ linux-2.6.25-oldpatch/include/asm-powerpc/system.h	2008-06-20 02:51:16.000000000 -0700
> @@ -103,6 +103,8 @@
>  #endif
> 
>  extern int set_dabr(unsigned long dabr);
> +extern void do_dabr(struct pt_regs *regs, unsigned long address,
> +                    unsigned long error_code);
>  extern void print_backtrace(unsigned long *);
>  extern void show_regs(struct pt_regs * regs);
>  extern void flush_instruction_cache(void);
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: MPC83xx ipic problem
From: Scott Wood @ 2008-06-30 19:03 UTC (permalink / raw)
  To: André Schwarz; +Cc: linux-ppc list
In-Reply-To: <4868FCE9.1060103@matrix-vision.de>

André Schwarz wrote:
> There are two external PCI devices connected (FPGA + miniPCI socket).
> The FPGA is working fine and uses IRQ0 for its PCI_INTA line.
> 
> As soon there's a miniPCI module present and the driver loaded (actually 
> an ath5k WiFi module) the system complains after a while :
> 
> irq 48: nobody cared
> handlers: .... location of the FPGA irq handler
> Disabling IRQ #48
> 
> -> This is weird since the FPGA isn't working at all and IRQ0 is *not* 
> asserted !

Are you *sure* that IRQ0 isn't asserted?  The IPIC seems to think it is.

> Of course the miniPCI irq is routed to a different pin on the CPU 
> (IRQ1).

Perhaps the board wiring is incorrect?

> interrupt-map = <0x5800 0 0 1 &ipic 0x30 0x8      -> FPGA @ IRQ0
>                  0x6000 0 0 1 &ipic 0x11 0x8      -> miniPCI INTA @ IRQ1
>                  0x6000 0 0 2 &ipic 0x11 0x8>;    -> miniPCI INTB @ IRQ1
> 
> Is it legal to use a single irq pin twice ?

Yes.

-Scott

^ permalink raw reply

* Re: [PATCH 1/2] Convert i2c-mpc from a platform driver into a of_platform driver, V3
From: Scott Wood @ 2008-06-30 18:54 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Linuxppc-dev, i2c
In-Reply-To: <20080630183413.4614.8840.stgit@terra>

On Mon, Jun 30, 2008 at 02:34:13PM -0400, Jon Smirl wrote:
> +		result = request_irq(i2c->irq, mpc_i2c_isr,
> +							IRQF_SHARED, "i2c-mpc", i2c);

That's a rather excessive indentation of the continuation line -- it
looks like it was aligned using 4-character tabs.  It's best to use
spaces for alignment (after using tabs to reach the indentation level),
especially if you're using a non-standard tab size.

>  static int __init fsl_i2c_init(void)
>  {
> -	return platform_driver_register(&fsl_i2c_driver);
> +	int rv;
> +
> +	rv = of_register_platform_driver(&mpc_i2c_driver);
> +	if (rv)
> +		printk(KERN_ERR DRV_NAME 
> +		" of_register_platform_driver failed (%i)\n", rv);

Please align the continuation line with the first parameter.

-Scott

^ permalink raw reply

* Re: [PATCH] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: Grant Likely @ 2008-06-30 18:53 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linuxppc-dev, linux-input, John Linn, Sadanand
In-Reply-To: <20080630135531.ZZRA012@mailhub.coreip.homeip.net>

On Mon, Jun 30, 2008 at 02:10:23PM -0400, Dmitry Torokhov wrote:
> Hi Grant, John,
> 
> On Mon, Jun 30, 2008 at 11:16:28AM -0600, Grant Likely wrote:
> > On Mon, Jun 30, 2008 at 07:24:48AM -0700, John Linn wrote:
<snip>
> > > +/*
> > > + * sxps2_write() sends a byte out through the PS/2 interface.
> > > + *
> > > + * The sole purpose of drvdata->tx_end is to prevent the driver
> > > + * from locking up in the do {} while; loop when nothing is connected
> > > + * to the given PS/2 port. That's why we do not try to recover
> > > + * from the transmission failure.
> > > + * drvdata->tx_end needs not to be initialized to some "far in the
> > > + * future" value, as the very first attempt to xps2_send() a byte
> > > + * is always successful, and drvdata->tx_end will be set to a proper
> > > + * value at that moment - before the 1st use in the comparison.
> > > + */
> > 
> > Good comment block.
> > 
> > nitpick: can you reformat the comment blocks to be in kerneldoc format?
> > That will allow the automatic document generation tools to parse it.
> > 
> > see: Documentation/kernel-doc-nano-HOWTO.txt
> 
> This is an internal function so its not going to be exposed in
> kerneldoc though.

Just to complete this discussion, quoting from kernel-doc-nano-HOWTO.txt:

  "We also recommend providing kernel-doc formatted documentation
  for private (file "static") routines, for consistency of kernel
  source code layout.  But this is lower priority and at the
  discretion of the MAINTAINER of that kernel source file."

but it's just a nitpick, and I'll say nothing more about it.

g.

^ permalink raw reply

* [PATCH] DMA Engine: fix error path(s) in fsl-dma driver
From: Sebastian Siewior @ 2008-06-30 18:18 UTC (permalink / raw)
  To: Li Yang; +Cc: Zhang Wei, linux-kernel, linuxppc-embedded

of_fsl_dma_probe:
 - kfree(NULL) doesn't hurt but dereferencing the pointer in iounmap does
 - also, the irq can be freed

of_fsl_dma_chan_probe:
- iounmap(NULL) resolved in vunmap() what which in turn is able to handle NULL
  pointer but dereferencing still doesn't work
- don't clean up not yet allocated ressources, like list_del before list_add

fsl_dma_self_test:
- call fsl_dma_free_chan_resources() if the first dma trans didn't complete

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
---
 drivers/dma/fsldma.c |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 054eabf..d36098c 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -842,7 +842,7 @@ static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan)
 	if (fsl_dma_is_complete(chan, cookie, NULL, NULL) != DMA_SUCCESS) {
 		dev_err(fsl_chan->dev, "selftest: Time out!\n");
 		err = -ENODEV;
-		goto out;
+		goto free_resources;
 	}
 
 	/* Test free and re-alloc channel resources */
@@ -927,8 +927,7 @@ static int __devinit of_fsl_dma_chan_probe(struct of_device *dev,
 	if (!new_fsl_chan) {
 		dev_err(&dev->dev, "No free memory for allocating "
 				"dma channels!\n");
-		err = -ENOMEM;
-		goto err;
+		return -ENOMEM;
 	}
 
 	/* get dma channel register base */
@@ -936,7 +935,7 @@ static int __devinit of_fsl_dma_chan_probe(struct of_device *dev,
 	if (err) {
 		dev_err(&dev->dev, "Can't get %s property 'reg'\n",
 				dev->node->full_name);
-		goto err;
+		goto err_free_mem;
 	}
 
 	new_fsl_chan->feature = *(u32 *)match->data;
@@ -953,12 +952,17 @@ static int __devinit of_fsl_dma_chan_probe(struct of_device *dev,
 	new_fsl_chan->reg_base = ioremap(new_fsl_chan->reg.start,
 			new_fsl_chan->reg.end - new_fsl_chan->reg.start + 1);
 
+	if (!new_fsl_chan->reg_base) {
+		err = -ENOMEM;
+		goto err_free_mem;
+	}
+
 	new_fsl_chan->id = ((new_fsl_chan->reg.start - 0x100) & 0xfff) >> 7;
 	if (new_fsl_chan->id > FSL_DMA_MAX_CHANS_PER_DEVICE) {
 		dev_err(&dev->dev, "There is no %d channel!\n",
 				new_fsl_chan->id);
 		err = -EINVAL;
-		goto err;
+		goto err_unnmap;
 	}
 	fdev->chan[new_fsl_chan->id] = new_fsl_chan;
 	tasklet_init(&new_fsl_chan->tasklet, dma_do_tasklet,
@@ -997,23 +1001,28 @@ static int __devinit of_fsl_dma_chan_probe(struct of_device *dev,
 		if (err) {
 			dev_err(&dev->dev, "DMA channel %s request_irq error "
 				"with return %d\n", dev->node->full_name, err);
-			goto err;
+			goto err_remove_list;
 		}
 	}
 
 	err = fsl_dma_self_test(new_fsl_chan);
 	if (err)
-		goto err;
+		goto err_test;
 
 	dev_info(&dev->dev, "#%d (%s), irq %d\n", new_fsl_chan->id,
 				match->compatible, new_fsl_chan->irq);
-
 	return 0;
-err:
+
+err_test:
 	dma_halt(new_fsl_chan);
-	iounmap(new_fsl_chan->reg_base);
-	free_irq(new_fsl_chan->irq, new_fsl_chan);
+	if (new_fsl_chan->irq != NO_IRQ)
+		free_irq(new_fsl_chan->irq, new_fsl_chan);
+err_remove_list:
 	list_del(&new_fsl_chan->common.device_node);
+	fdev->common.chancnt--;
+err_unnmap:
+	iounmap(new_fsl_chan->reg_base);
+err_free_mem:
 	kfree(new_fsl_chan);
 	return err;
 }
@@ -1054,8 +1063,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
 	fdev = kzalloc(sizeof(struct fsl_dma_device), GFP_KERNEL);
 	if (!fdev) {
 		dev_err(&dev->dev, "No enough memory for 'priv'\n");
-		err = -ENOMEM;
-		goto err;
+		return -ENOMEM;
 	}
 	fdev->dev = &dev->dev;
 	INIT_LIST_HEAD(&fdev->common.channels);
@@ -1091,7 +1099,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
 		if (err) {
 			dev_err(&dev->dev, "DMA device request_irq error "
 				"with return %d\n", err);
-			goto err;
+			goto err_remove_irq;
 		}
 	}
 
@@ -1101,6 +1109,8 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
 	dma_async_device_register(&fdev->common);
 	return 0;
 
+err_remove_irq:
+	free_irq(irq, &fsl_dma_do_interrupt);
 err:
 	iounmap(fdev->reg_base);
 	kfree(fdev);
-- 
1.5.5.2

^ permalink raw reply related

* Re: [POWERPC] mpc7448hpc2.dts: remove chosen node from dts
From: Scott Wood @ 2008-06-30 18:45 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, chunbo.luo
In-Reply-To: <34080997e6c29d809a38331f88caf3cf@kernel.crashing.org>

Segher Boessenkool wrote:
>> Modern versions of u-boot create a chosen node automatically.  So if
>> we set the chosen node in the dts file, there will be 2 chosen nodes
>> passed in to the kernel,
> 
> That's a bug in uboot, then:

Yes, and it was fixed a while ago.

-Scott

^ permalink raw reply

* [PATCH 2/2] Add the of_find_i2c_device_by_node function, V3
From: Jon Smirl @ 2008-06-30 18:34 UTC (permalink / raw)
  To: i2c, Linuxppc-dev
In-Reply-To: <20080630183413.4614.8840.stgit@terra>

Add the of_find_i2c_device_by_node function. This allows you to follow a reference in the device to an i2c device node and then locate the linux device instantiated by the device tree. Example use, an i2s codec controlled by i2c.
---

 drivers/i2c/i2c-core.c |    2 +-
 drivers/of/of_i2c.c    |   37 ++++++++++++++++++++++++++-----------
 include/linux/i2c.h    |    3 +++
 include/linux/of_i2c.h |    2 ++
 4 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index d0175f4..e3abe1b 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -208,7 +208,7 @@ static struct device_attribute i2c_dev_attrs[] = {
 	{ },
 };
 
-static struct bus_type i2c_bus_type = {
+struct bus_type i2c_bus_type = {
 	.name		= "i2c",
 	.dev_attrs	= i2c_dev_attrs,
 	.match		= i2c_device_match,
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 715a444..ca69a16 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -75,7 +75,7 @@ static int of_find_i2c_driver(struct device_node *node,
 void of_register_i2c_devices(struct i2c_adapter *adap,
 			     struct device_node *adap_node)
 {
-	void *result;
+	struct i2c_client *i2c_dev;
 	struct device_node *node;
 
 	for_each_child_of_node(adap_node, node) {
@@ -90,29 +90,44 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 			continue;
 		}
 
-		info.irq = irq_of_parse_and_map(node, 0);
-		if (info.irq == NO_IRQ)
-			info.irq = -1;
-
-		if (of_find_i2c_driver(node, &info) < 0) {
-			irq_dispose_mapping(info.irq);
+		if (of_find_i2c_driver(node, &info) < 0)
 			continue;
-		}
 
+		info.irq = irq_of_parse_and_map(node, 0);
 		info.addr = *addr;
 
-		request_module(info.type);
+		request_module("%s", info.type);
 
-		result = i2c_new_device(adap, &info);
-		if (result == NULL) {
+		i2c_dev = i2c_new_device(adap, &info);
+		if (i2c_dev == NULL) {
 			printk(KERN_ERR
 			       "of-i2c: Failed to load driver for %s\n",
 			       info.type);
 			irq_dispose_mapping(info.irq);
 			continue;
 		}
+		
+		i2c_dev->dev.archdata.of_node = of_node_get(node);
 	}
 }
 EXPORT_SYMBOL(of_register_i2c_devices);
 
+static int of_dev_node_match(struct device *dev, void *data)
+{
+        return dev->archdata.of_node == data;
+}
+
+struct i2c_client *of_find_i2c_device_by_node(struct device_node *node)
+{
+	struct device *dev;
+	
+	dev = bus_find_device(&i2c_bus_type, NULL, node, 
+					 of_dev_node_match);
+	if (!dev)
+		return NULL;
+		
+	return to_i2c_client(dev);
+}
+EXPORT_SYMBOL(of_find_i2c_device_by_node);
+
 MODULE_LICENSE("GPL");
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index fb9af6a..186b22d 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -92,6 +92,9 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
 extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
 					  u8 command, u8 length,
 					  const u8 *values);
+					  
+/* Base of the i2c bus */
+extern struct bus_type i2c_bus_type; 
 
 /*
  * A driver is capable of handling one or more physical devices present on
diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h
index bd2a870..17d5897 100644
--- a/include/linux/of_i2c.h
+++ b/include/linux/of_i2c.h
@@ -16,5 +16,7 @@
 
 void of_register_i2c_devices(struct i2c_adapter *adap,
 			     struct device_node *adap_node);
+struct i2c_client *of_find_i2c_device_by_node(struct device_node *node);
+			     
 
 #endif /* __LINUX_OF_I2C_H */

^ permalink raw reply related

* [PATCH 1/2] Convert i2c-mpc from a platform driver into a of_platform driver, V3
From: Jon Smirl @ 2008-06-30 18:34 UTC (permalink / raw)
  To: i2c, Linuxppc-dev

Convert i2c-mpc to an of_platform driver. Utilize the code in drivers/of-i2c.c to make i2c modules dynamically loadable by the device tree.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
---

 arch/powerpc/sysdev/fsl_soc.c |  122 -----------------------------------------
 drivers/i2c/busses/i2c-mpc.c  |  104 ++++++++++++++++++++---------------
 2 files changed, 60 insertions(+), 166 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3a7054e..ebcec73 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -414,128 +414,6 @@ err:
 
 arch_initcall(gfar_of_init);
 
-#ifdef CONFIG_I2C_BOARDINFO
-#include <linux/i2c.h>
-struct i2c_driver_device {
-	char	*of_device;
-	char	*i2c_type;
-};
-
-static struct i2c_driver_device i2c_devices[] __initdata = {
-	{"ricoh,rs5c372a", "rs5c372a"},
-	{"ricoh,rs5c372b", "rs5c372b"},
-	{"ricoh,rv5c386",  "rv5c386"},
-	{"ricoh,rv5c387a", "rv5c387a"},
-	{"dallas,ds1307",  "ds1307"},
-	{"dallas,ds1337",  "ds1337"},
-	{"dallas,ds1338",  "ds1338"},
-	{"dallas,ds1339",  "ds1339"},
-	{"dallas,ds1340",  "ds1340"},
-	{"stm,m41t00",     "m41t00"},
-	{"dallas,ds1374",  "rtc-ds1374"},
-};
-
-static int __init of_find_i2c_driver(struct device_node *node,
-				     struct i2c_board_info *info)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) {
-		if (!of_device_is_compatible(node, i2c_devices[i].of_device))
-			continue;
-		if (strlcpy(info->type, i2c_devices[i].i2c_type,
-			    I2C_NAME_SIZE) >= I2C_NAME_SIZE)
-			return -ENOMEM;
-		return 0;
-	}
-	return -ENODEV;
-}
-
-static void __init of_register_i2c_devices(struct device_node *adap_node,
-					   int bus_num)
-{
-	struct device_node *node = NULL;
-
-	while ((node = of_get_next_child(adap_node, node))) {
-		struct i2c_board_info info = {};
-		const u32 *addr;
-		int len;
-
-		addr = of_get_property(node, "reg", &len);
-		if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) {
-			printk(KERN_WARNING "fsl_soc.c: invalid i2c device entry\n");
-			continue;
-		}
-
-		info.irq = irq_of_parse_and_map(node, 0);
-		if (info.irq == NO_IRQ)
-			info.irq = -1;
-
-		if (of_find_i2c_driver(node, &info) < 0)
-			continue;
-
-		info.addr = *addr;
-
-		i2c_register_board_info(bus_num, &info, 1);
-	}
-}
-
-static int __init fsl_i2c_of_init(void)
-{
-	struct device_node *np;
-	unsigned int i = 0;
-	struct platform_device *i2c_dev;
-	int ret;
-
-	for_each_compatible_node(np, NULL, "fsl-i2c") {
-		struct resource r[2];
-		struct fsl_i2c_platform_data i2c_data;
-		const unsigned char *flags = NULL;
-
-		memset(&r, 0, sizeof(r));
-		memset(&i2c_data, 0, sizeof(i2c_data));
-
-		ret = of_address_to_resource(np, 0, &r[0]);
-		if (ret)
-			goto err;
-
-		of_irq_to_resource(np, 0, &r[1]);
-
-		i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2);
-		if (IS_ERR(i2c_dev)) {
-			ret = PTR_ERR(i2c_dev);
-			goto err;
-		}
-
-		i2c_data.device_flags = 0;
-		flags = of_get_property(np, "dfsrr", NULL);
-		if (flags)
-			i2c_data.device_flags |= FSL_I2C_DEV_SEPARATE_DFSRR;
-
-		flags = of_get_property(np, "fsl5200-clocking", NULL);
-		if (flags)
-			i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200;
-
-		ret =
-		    platform_device_add_data(i2c_dev, &i2c_data,
-					     sizeof(struct
-						    fsl_i2c_platform_data));
-		if (ret)
-			goto unreg;
-
-		of_register_i2c_devices(np, i++);
-	}
-
-	return 0;
-
-unreg:
-	platform_device_unregister(i2c_dev);
-err:
-	return ret;
-}
-
-arch_initcall(fsl_i2c_of_init);
-#endif
 
 #ifdef CONFIG_PPC_83xx
 static int __init mpc83xx_wdt_init(void)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index a076129..36bea49 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -17,7 +17,8 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/init.h>
-#include <linux/platform_device.h>
+#include <linux/of_platform.h>
+#include <linux/of_i2c.h>
 
 #include <asm/io.h>
 #include <linux/fsl_devices.h>
@@ -25,13 +26,13 @@
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 
-#define MPC_I2C_ADDR  0x00
+#define DRV_NAME "mpc-i2c"
+
 #define MPC_I2C_FDR 	0x04
 #define MPC_I2C_CR	0x08
 #define MPC_I2C_SR	0x0c
 #define MPC_I2C_DR	0x10
 #define MPC_I2C_DFSRR 0x14
-#define MPC_I2C_REGION 0x20
 
 #define CCR_MEN  0x80
 #define CCR_MIEN 0x40
@@ -315,102 +316,117 @@ static struct i2c_adapter mpc_ops = {
 	.timeout = 1,
 };
 
-static int fsl_i2c_probe(struct platform_device *pdev)
+static int __devinit fsl_i2c_probe(struct of_device *op, const struct of_device_id *match)
 {
 	int result = 0;
 	struct mpc_i2c *i2c;
-	struct fsl_i2c_platform_data *pdata;
-	struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data;
 
 	i2c = kzalloc(sizeof(*i2c), GFP_KERNEL);
 	if (!i2c)
 		return -ENOMEM;
 
-	i2c->irq = platform_get_irq(pdev, 0);
-	if (i2c->irq < 0)
-		i2c->irq = NO_IRQ; /* Use polling */
+	if (of_get_property(op->node, "dfsrr", NULL))
+		i2c->flags |= FSL_I2C_DEV_SEPARATE_DFSRR;
 
-	i2c->flags = pdata->device_flags;
-	init_waitqueue_head(&i2c->queue);
+	if (of_device_is_compatible(op->node, "fsl,mpc5200-i2c") ||
+			of_device_is_compatible(op->node, "mpc5200-i2c"))
+		i2c->flags |= FSL_I2C_DEV_CLOCK_5200;
 
-	i2c->base = ioremap((phys_addr_t)r->start, MPC_I2C_REGION);
+	init_waitqueue_head(&i2c->queue);
 
+	i2c->base = of_iomap(op->node, 0);
 	if (!i2c->base) {
 		printk(KERN_ERR "i2c-mpc - failed to map controller\n");
 		result = -ENOMEM;
 		goto fail_map;
 	}
 
-	if (i2c->irq != NO_IRQ)
-		if ((result = request_irq(i2c->irq, mpc_i2c_isr,
-					  IRQF_SHARED, "i2c-mpc", i2c)) < 0) {
-			printk(KERN_ERR
-			       "i2c-mpc - failed to attach interrupt\n");
-			goto fail_irq;
+	i2c->irq = irq_of_parse_and_map(op->node, 0);
+	if (i2c->irq != NO_IRQ) { /* i2c->irq = NO_IRQ implies polling */
+		result = request_irq(i2c->irq, mpc_i2c_isr,
+							IRQF_SHARED, "i2c-mpc", i2c);
+		if (result < 0) {
+			printk(KERN_ERR "i2c-mpc - failed to attach interrupt\n");
+			goto fail_request;
 		}
-
+	}
+	
 	mpc_i2c_setclock(i2c);
-	platform_set_drvdata(pdev, i2c);
+
+	dev_set_drvdata(&op->dev, i2c);
 
 	i2c->adap = mpc_ops;
-	i2c->adap.nr = pdev->id;
 	i2c_set_adapdata(&i2c->adap, i2c);
-	i2c->adap.dev.parent = &pdev->dev;
-	if ((result = i2c_add_numbered_adapter(&i2c->adap)) < 0) {
+	i2c->adap.dev.parent = &op->dev;
+
+	result = i2c_add_adapter(&i2c->adap);
+	if (result < 0) {
 		printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
 		goto fail_add;
 	}
+	of_register_i2c_devices(&i2c->adap, op->node);
 
 	return result;
 
-      fail_add:
-	if (i2c->irq != NO_IRQ)
-		free_irq(i2c->irq, i2c);
-      fail_irq:
-	iounmap(i2c->base);
-      fail_map:
+ fail_add:
+	dev_set_drvdata(&op->dev, NULL);
+	free_irq(i2c->irq, i2c);
+ fail_request:
+	irq_dispose_mapping(i2c->irq);
+ 	iounmap(i2c->base);
+ fail_map:
 	kfree(i2c);
 	return result;
 };
 
-static int fsl_i2c_remove(struct platform_device *pdev)
+static int __devexit fsl_i2c_remove(struct of_device *op)
 {
-	struct mpc_i2c *i2c = platform_get_drvdata(pdev);
+	struct mpc_i2c *i2c = dev_get_drvdata(&op->dev);
 
 	i2c_del_adapter(&i2c->adap);
-	platform_set_drvdata(pdev, NULL);
+	dev_set_drvdata(&op->dev, NULL);
 
 	if (i2c->irq != NO_IRQ)
 		free_irq(i2c->irq, i2c);
 
+	irq_dispose_mapping(i2c->irq);
 	iounmap(i2c->base);
 	kfree(i2c);
 	return 0;
 };
 
-/* work with hotplug and coldplug */
-MODULE_ALIAS("platform:fsl-i2c");
+static const struct of_device_id mpc_i2c_of_match[] = {
+	{.compatible = "fsl-i2c",},
+	{},
+};
+MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
+
 
 /* Structure for a device driver */
-static struct platform_driver fsl_i2c_driver = {
-	.probe = fsl_i2c_probe,
-	.remove = fsl_i2c_remove,
-	.driver	= {
-		.owner = THIS_MODULE,
-		.name = "fsl-i2c",
+static struct of_platform_driver mpc_i2c_driver = {
+	.match_table	= mpc_i2c_of_match,
+	.probe		= fsl_i2c_probe,
+	.remove		= __devexit_p(fsl_i2c_remove),
+	.driver		= {
+		.owner	= THIS_MODULE,
+		.name	= DRV_NAME,
 	},
 };
 
 static int __init fsl_i2c_init(void)
 {
-	return platform_driver_register(&fsl_i2c_driver);
+	int rv;
+
+	rv = of_register_platform_driver(&mpc_i2c_driver);
+	if (rv)
+		printk(KERN_ERR DRV_NAME 
+		" of_register_platform_driver failed (%i)\n", rv);
+	return rv;
 }
 
 static void __exit fsl_i2c_exit(void)
 {
-	platform_driver_unregister(&fsl_i2c_driver);
+	of_unregister_platform_driver(&mpc_i2c_driver);
 }
 
 module_init(fsl_i2c_init);

^ permalink raw reply related

* [BUILD-FAILURE] linux-next: Tree for June 30 - powerpc - build failure at arch_add_memory()
From: Kamalesh Babulal @ 2008-06-30 18:25 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-kbuild, LKML, linuxppc-dev, linux-next, Sam Ravnborg
In-Reply-To: <20080701001656.e156585c.sfr@canb.auug.org.au>

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

Hi Stephen,

next-20080630 kernel build fails on powerpc, with randconfig

  CC      arch/powerpc/mm/mem.o
arch/powerpc/mm/mem.c: In function ‘arch_add_memory’:
arch/powerpc/mm/mem.c:130: error: implicit declaration of function ‘create_section_mapping’
make[1]: *** [arch/powerpc/mm/mem.o] Error 1
make: *** [arch/powerpc/mm] Error 2


-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

[-- Attachment #2: config-next20080630-powerpc-randconfig --]
[-- Type: text/plain, Size: 35437 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.26-rc8-next-20080630
# Mon Jun 30 13:21:18 2008
#
CONFIG_PPC64=y

#
# Processor support
#
CONFIG_POWER4_ONLY=y
CONFIG_POWER4=y
# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_MM_SLICES=y
# CONFIG_VIRT_CPU_ACCOUNTING is not set
# CONFIG_SMP is not set
CONFIG_64BIT=y
CONFIG_WORD_SIZE=64
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=y
CONFIG_IRQ_PER_CPU=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_ARCH_HAS_ILOG2_U64=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_ARCH_NO_VIRT_TO_BUS=y
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_COMPAT=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_DEFAULT_UIMAGE is not set
# CONFIG_PPC_DCR_NATIVE is not set
# CONFIG_PPC_DCR_MMIO is not set
# CONFIG_PPC_OF_PLATFORM_PCI is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
# CONFIG_EXPERIMENTAL is not set
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
# CONFIG_SWAP is not set
# CONFIG_SYSVIPC is not set
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
# CONFIG_TASK_IO_ACCOUNTING is not set
CONFIG_AUDIT=y
# CONFIG_AUDITSYSCALL is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CGROUPS is not set
CONFIG_RELAY=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_EMBEDDED=y
# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_HOTPLUG is not set
# CONFIG_PRINTK is not set
# CONFIG_BUG is not set
# CONFIG_ELF_CORE is not set
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_BASE_FULL is not set
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
# CONFIG_SIGNALFD is not set
# CONFIG_TIMERFD is not set
# CONFIG_EVENTFD is not set
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
CONFIG_MARKERS=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
# CONFIG_HAVE_DMA_ATTRS is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=1
# CONFIG_MODULES is not set
CONFIG_BLOCK=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
# CONFIG_IOSCHED_DEADLINE is not set
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED="noop"
CONFIG_CLASSIC_RCU=y

#
# Platform support
#
CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_PPC_82xx is not set
# CONFIG_PPC_83xx is not set
# CONFIG_PPC_86xx is not set
CONFIG_PPC_PSERIES=y
# CONFIG_PPC_SPLPAR is not set
CONFIG_EEH=y
# CONFIG_LPARCFG is not set
CONFIG_PPC_PSERIES_DEBUG=y
# CONFIG_PPC_ISERIES is not set
# CONFIG_PPC_MPC512x is not set
# CONFIG_PPC_MPC5121 is not set
# CONFIG_PPC_PMAC is not set
# CONFIG_PPC_MAPLE is not set
# CONFIG_PPC_PASEMI is not set
CONFIG_PPC_PS3=y

#
# PS3 Platform Options
#
CONFIG_PS3_ADVANCED=y
CONFIG_PS3_HTAB_SIZE=20
CONFIG_PS3_VUART=y
CONFIG_PS3_PS3AV=y
CONFIG_PS3_SYS_MANAGER=y
# CONFIG_PS3_DISK is not set
# CONFIG_PS3_ROM is not set
# CONFIG_PS3_FLASH is not set
# CONFIG_PS3_LPM is not set
CONFIG_PPC_CELL=y
# CONFIG_PPC_CELL_NATIVE is not set
# CONFIG_PPC_IBM_CELL_BLADE is not set
# CONFIG_PPC_CELLEB is not set

#
# Cell Broadband Engine options
#
CONFIG_SPU_FS=y
CONFIG_SPU_FS_64K_LS=y
# CONFIG_SPU_TRACE is not set
CONFIG_SPU_BASE=y
# CONFIG_PQ2ADS is not set
CONFIG_PPC_NATIVE=y
CONFIG_UDBG_RTAS_CONSOLE=y
CONFIG_XICS=y
# CONFIG_IPIC is not set
CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set
CONFIG_PPC_I8259=y
# CONFIG_U3_DART is not set
CONFIG_PPC_RTAS=y
CONFIG_RTAS_ERROR_LOGGING=y
# CONFIG_RTAS_PROC is not set
# CONFIG_MMIO_NVRAM is not set
CONFIG_IBMVIO=y
CONFIG_IBMEBUS=y
# 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=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
# CONFIG_CPU_FREQ_STAT is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#
# CPU Frequency drivers
#
# CONFIG_FSL_ULI1575 is not set

#
# Kernel options
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
# CONFIG_SCHED_HRTICK is not set
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
# CONFIG_IOMMU_VMERGE is not set
CONFIG_IOMMU_HELPER=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_HAS_WALK_MEMORY=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
# CONFIG_NUMA is not set
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=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=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_ARCH_MEMORY_PROBE=y
CONFIG_PPC_HAS_HASH_64K=y
# CONFIG_PPC_64K_PAGES is not set
CONFIG_FORCE_MAX_ZONEORDER=13
# CONFIG_CMDLINE_BOOL is not set
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_ISA_DMA_API=y

#
# Bus options
#
CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
# CONFIG_PPC_INDIRECT_PCI is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_SYSCALL=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_HAS_RAPIDIO is not set
CONFIG_PAGE_OFFSET=0xc000000000000000
CONFIG_KERNEL_START=0xc000000000000000
CONFIG_PHYSICAL_START=0x00000000

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
# CONFIG_PACKET is not set
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=y
CONFIG_NET_KEY=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_SYN_COOKIES is not set
CONFIG_INET_AH=y
CONFIG_INET_ESP=y
CONFIG_INET_IPCOMP=y
CONFIG_INET_XFRM_TUNNEL=y
CONFIG_INET_TUNNEL=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
CONFIG_INET_XFRM_MODE_TUNNEL=y
# CONFIG_INET_XFRM_MODE_BEET is not set
CONFIG_INET_LRO=y
# CONFIG_INET_DIAG is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_IP_VS is not set
CONFIG_IPV6=y
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
CONFIG_INET6_IPCOMP=y
CONFIG_INET6_XFRM_TUNNEL=y
CONFIG_INET6_TUNNEL=y
CONFIG_INET6_XFRM_MODE_TRANSPORT=y
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
CONFIG_IPV6_SIT=y
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=y
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_NETFILTER_ADVANCED is not set

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_LOG=y
# CONFIG_NF_CONNTRACK is not set
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
CONFIG_NETFILTER_XT_MATCH_MARK=y
# CONFIG_NETFILTER_XT_MATCH_POLICY is not set

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_MANGLE=y

#
# IPv6: Netfilter Configuration
#
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
# CONFIG_IP6_NF_FILTER is not set
# CONFIG_IP6_NF_MANGLE is not set
CONFIG_ATM=y
# CONFIG_ATM_CLIP is not set
# CONFIG_ATM_LANE is not set
CONFIG_ATM_BR2684=y
CONFIG_ATM_BR2684_IPFILTER=y
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
CONFIG_DECNET=y
CONFIG_LLC=y
CONFIG_LLC2=y
# CONFIG_IPX is not set
CONFIG_ATALK=y
CONFIG_DEV_APPLETALK=y
CONFIG_IPDDP=y
# CONFIG_IPDDP_ENCAP is not set
# CONFIG_IPDDP_DECAP is not set
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
# CONFIG_NET_SCH_CBQ is not set
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_ATM=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFQ=y
# CONFIG_NET_SCH_TEQL is not set
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_DSMARK=y
# CONFIG_NET_SCH_NETEM is not set
CONFIG_NET_SCH_INGRESS=y

#
# Classification
#
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
CONFIG_NET_CLS_TCINDEX=y
# CONFIG_NET_CLS_ROUTE4 is not set
# CONFIG_NET_CLS_FW is not set
CONFIG_NET_CLS_U32=y
# CONFIG_CLS_U32_PERF is not set
CONFIG_CLS_U32_MARK=y
# CONFIG_NET_CLS_RSVP is not set
CONFIG_NET_CLS_RSVP6=y
CONFIG_NET_CLS_FLOW=y
# CONFIG_NET_EMATCH is not set
CONFIG_NET_CLS_ACT=y
# CONFIG_NET_ACT_POLICE is not set
CONFIG_NET_ACT_GACT=y
# CONFIG_GACT_PROB is not set
CONFIG_NET_ACT_MIRRED=y
CONFIG_NET_ACT_IPT=y
# CONFIG_NET_ACT_NAT is not set
CONFIG_NET_ACT_PEDIT=y
# CONFIG_NET_ACT_SIMP is not set
CONFIG_NET_CLS_IND=y
CONFIG_NET_SCH_FIFO=y

#
# Network testing
#
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
CONFIG_BT=y
# CONFIG_BT_L2CAP is not set
# CONFIG_BT_SCO is not set

#
# Bluetooth device drivers
#
# CONFIG_BT_HCIUART is not set
# CONFIG_BT_HCIVHCI is not set

#
# Wireless
#
CONFIG_CFG80211=y
# CONFIG_NL80211 is not set
CONFIG_WIRELESS_EXT=y
CONFIG_MAC80211=y

#
# QoS/HT support disabled
#

#
# QoS/HT support needs CONFIG_NETDEVICES_MULTIQUEUE
#

#
# Rate control algorithm selection
#
CONFIG_MAC80211_RC_DEFAULT_PID=y
# CONFIG_MAC80211_RC_DEFAULT_NONE is not set

#
# Selecting 'y' for an algorithm will
#

#
# build the algorithm into mac80211.
#
CONFIG_MAC80211_RC_DEFAULT="pid"
CONFIG_MAC80211_RC_PID=y
# CONFIG_MAC80211_LEDS is not set
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
# CONFIG_MAC80211_DEBUG is not set
CONFIG_IEEE80211=y
# CONFIG_IEEE80211_DEBUG is not set
CONFIG_IEEE80211_CRYPT_WEP=y
# CONFIG_IEEE80211_CRYPT_CCMP is not set
# CONFIG_IEEE80211_CRYPT_TKIP is not set
# CONFIG_RFKILL is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
CONFIG_DEBUG_DEVRES=y
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=0
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_OF_PARTS is not set
CONFIG_MTD_AR7_PARTS=y

#
# User Modules And Translation Layers
#
# CONFIG_MTD_CHAR is not set
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_FTL=y
# CONFIG_NFTL is not set
CONFIG_INFTL=y
CONFIG_RFD_FTL=y
# CONFIG_SSFDC is not set
CONFIG_MTD_OOPS=y

#
# 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=y
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
CONFIG_MTD_ABSENT=y

#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_PHYSMAP_OF is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_INTEL_VR_NOR is not set
# CONFIG_MTD_PLATRAM is not set

#
# Self-contained MTD device drivers
#
CONFIG_MTD_PMC551=y
# CONFIG_MTD_PMC551_BUGFIX is not set
# CONFIG_MTD_PMC551_DEBUG is not set
CONFIG_MTD_SLRAM=y
# 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=y
CONFIG_MTD_DOC2001=y
CONFIG_MTD_DOC2001PLUS=y
CONFIG_MTD_DOCPROBE=y
CONFIG_MTD_DOCECC=y
CONFIG_MTD_DOCPROBE_ADVANCED=y
CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
# CONFIG_MTD_DOCPROBE_HIGH is not set
# CONFIG_MTD_DOCPROBE_55AA is not set
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_VERIFY_WRITE=y
CONFIG_MTD_NAND_ECC_SMC=y
# CONFIG_MTD_NAND_MUSEUM_IDS is not set
CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_CAFE is not set
CONFIG_MTD_NAND_NANDSIM=y
# CONFIG_MTD_NAND_PLATFORM is not set
CONFIG_MTD_NAND_FSL_ELBC=y
# CONFIG_MTD_ONENAND is not set

#
# UBI - Unsorted block images
#
# CONFIG_MTD_UBI is not set
CONFIG_OF_DEVICE=y
CONFIG_OF_I2C=y
CONFIG_PARPORT=y
# CONFIG_PARPORT_PC is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
CONFIG_PARPORT_1284=y
# CONFIG_BLK_DEV is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_RAID_ATTRS=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_NETLINK=y

#
# SCSI support type (disk, tape, CD-ROM)
#
# CONFIG_BLK_DEV_SD is not set
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=y
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_SCSI_DH=y
CONFIG_SCSI_DH_RDAC=y
# CONFIG_SCSI_DH_HP_SW is not set
# CONFIG_SCSI_DH_EMC is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
CONFIG_FUSION=y
# CONFIG_FUSION_SPI is not set
CONFIG_FUSION_FC=y
# CONFIG_FUSION_SAS is not set
CONFIG_FUSION_MAX_SGE=128
CONFIG_FUSION_CTL=y
# CONFIG_FUSION_LOGGING is not set

#
# IEEE 1394 (FireWire) support
#

#
# A new alternative FireWire stack is available with EXPERIMENTAL=y
#
CONFIG_IEEE1394=y
CONFIG_IEEE1394_OHCI1394=y
CONFIG_IEEE1394_PCILYNX=y
CONFIG_IEEE1394_SBP2=y
# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
CONFIG_IEEE1394_RAWIO=y
CONFIG_IEEE1394_VIDEO1394=y
# CONFIG_IEEE1394_DV1394 is not set
CONFIG_IEEE1394_VERBOSEDEBUG=y
# CONFIG_I2O is not set
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_WINDFARM=y
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
CONFIG_IFB=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_VETH is not set
CONFIG_ARCNET=y
CONFIG_ARCNET_1201=y
CONFIG_ARCNET_1051=y
# CONFIG_ARCNET_RAW is not set
# CONFIG_ARCNET_CAP is not set
# CONFIG_ARCNET_COM90xx is not set
# CONFIG_ARCNET_COM90xxIO is not set
# CONFIG_ARCNET_RIM_I is not set
# CONFIG_ARCNET_COM20020 is not set
CONFIG_PHYLIB=y

#
# MII PHY device drivers
#
CONFIG_MARVELL_PHY=y
CONFIG_DAVICOM_PHY=y
CONFIG_QSEMI_PHY=y
# CONFIG_LXT_PHY is not set
CONFIG_CICADA_PHY=y
# CONFIG_VITESSE_PHY is not set
CONFIG_SMSC_PHY=y
# CONFIG_BROADCOM_PHY is not set
CONFIG_ICPLUS_PHY=y
# CONFIG_REALTEK_PHY is not set
# CONFIG_FIXED_PHY is not set
CONFIG_MDIO_BITBANG=y
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
CONFIG_CASSINI=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_TULIP is not set
CONFIG_HP100=y
# CONFIG_IBMVETH is not set
# 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_NET_PCI is not set
# CONFIG_B44 is not set
# CONFIG_NET_POCKET is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
CONFIG_DL2K=y
CONFIG_E1000=y
CONFIG_E1000_NAPI=y
CONFIG_E1000_DISABLE_PACKET_SPLIT=y
CONFIG_E1000E=y
# CONFIG_IGB is not set
# CONFIG_NS83820 is not set
CONFIG_HAMACHI=y
CONFIG_R8169=y
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
CONFIG_VIA_VELOCITY=y
CONFIG_TIGON3=y
# CONFIG_BNX2 is not set
CONFIG_GELIC_NET=y
# CONFIG_GELIC_WIRELESS is not set
CONFIG_QLA3XXX=y
CONFIG_NETDEV_10000=y
CONFIG_CHELSIO_T1=y
CONFIG_CHELSIO_T1_1G=y
CONFIG_CHELSIO_T1_NAPI=y
# CONFIG_CHELSIO_T3 is not set
CONFIG_IXGBE=y
# CONFIG_IXGB is not set
CONFIG_S2IO=y
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
CONFIG_NIU=y
CONFIG_MLX4_CORE=y
CONFIG_MLX4_DEBUG=y
CONFIG_TEHUTI=y
# CONFIG_BNX2X is not set
CONFIG_SFC=y
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
CONFIG_WLAN_80211=y
# CONFIG_IPW2100 is not set
CONFIG_IPW2200=y
# CONFIG_IPW2200_MONITOR is not set
CONFIG_IPW2200_DEBUG=y
CONFIG_LIBERTAS=y
CONFIG_LIBERTAS_DEBUG=y
CONFIG_AIRO=y
# CONFIG_HERMES is not set
# CONFIG_ATMEL is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_IWLWIFI_LEDS is not set
# CONFIG_HOSTAP is not set
CONFIG_B43=y
CONFIG_B43_PCI_AUTOSELECT=y
CONFIG_B43_PCICORE_AUTOSELECT=y
CONFIG_B43_PIO=y
CONFIG_B43_DEBUG=y
CONFIG_B43_FORCE_PIO=y
# CONFIG_B43LEGACY is not set
CONFIG_WAN=y
# CONFIG_HDLC is not set
# CONFIG_DLCI is not set
# CONFIG_ATM_DRIVERS is not set
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
# CONFIG_SKFP is not set
CONFIG_PLIP=y
CONFIG_PPP=y
CONFIG_PPP_FILTER=y
# CONFIG_PPP_ASYNC is not set
# CONFIG_PPP_SYNC_TTY is not set
# CONFIG_PPP_DEFLATE is not set
# CONFIG_PPP_BSDCOMP is not set
# CONFIG_PPPOATM is not set
CONFIG_SLIP=y
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLHC=y
CONFIG_SLIP_SMART=y
# CONFIG_SLIP_MODE_SLIP6 is not set
# CONFIG_NET_FC is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
CONFIG_ISDN=y
CONFIG_ISDN_I4L=y
CONFIG_ISDN_PPP=y
CONFIG_ISDN_PPP_VJ=y
# CONFIG_ISDN_MPP is not set
CONFIG_IPPP_FILTER=y
CONFIG_ISDN_PPP_BSDCOMP=y
# CONFIG_ISDN_AUDIO is not set

#
# ISDN feature submodules
#
CONFIG_ISDN_DRV_LOOP=y
# CONFIG_ISDN_DIVERSION is not set

#
# ISDN4Linux hardware drivers
#

#
# Passive cards
#
# CONFIG_ISDN_DRV_HISAX is not set

#
# Active cards
#
CONFIG_ISDN_DRV_GIGASET=y
# CONFIG_GIGASET_M101 is not set
# CONFIG_GIGASET_DEBUG is not set
CONFIG_GIGASET_UNDOCREQ=y
# CONFIG_ISDN_CAPI 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=y
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_EVBUG=y

#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
CONFIG_INPUT_MOUSE=y
# CONFIG_MOUSE_PS2 is not set
CONFIG_MOUSE_SERIAL=y
# CONFIG_MOUSE_VSXXXAA is not set
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_ANALOG=y
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
CONFIG_JOYSTICK_COBRA=y
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
CONFIG_JOYSTICK_GUILLEMOT=y
CONFIG_JOYSTICK_INTERACT=y
# CONFIG_JOYSTICK_SIDEWINDER is not set
CONFIG_JOYSTICK_TMDC=y
CONFIG_JOYSTICK_IFORCE=y
# CONFIG_JOYSTICK_IFORCE_232 is not set
CONFIG_JOYSTICK_WARRIOR=y
# CONFIG_JOYSTICK_MAGELLAN is not set
CONFIG_JOYSTICK_SPACEORB=y
CONFIG_JOYSTICK_SPACEBALL=y
# CONFIG_JOYSTICK_STINGER is not set
CONFIG_JOYSTICK_TWIDJOY=y
CONFIG_JOYSTICK_ZHENHUA=y
# CONFIG_JOYSTICK_DB9 is not set
CONFIG_JOYSTICK_GAMECON=y
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
CONFIG_INPUT_TABLET=y
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
CONFIG_TOUCHSCREEN_GUNZE=y
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
CONFIG_TOUCHSCREEN_MK712=y
CONFIG_TOUCHSCREEN_PENMOUNT=y
CONFIG_TOUCHSCREEN_TOUCHRIGHT=y
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_UCB1400 is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=y
CONFIG_INPUT_UINPUT=y

#
# Hardware I/O ports
#
CONFIG_SERIO=y
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
# CONFIG_SERIO_LIBPS2 is not set
CONFIG_SERIO_RAW=y
CONFIG_GAMEPORT=y
# CONFIG_GAMEPORT_NS558 is not set
CONFIG_GAMEPORT_L4=y
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_FM801 is not set

#
# Character devices
#
# CONFIG_VT is not set
CONFIG_DEVKMEM=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_PCI is not set
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_ICOM is not set
CONFIG_SERIAL_JSM=y
CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_UNIX98_PTYS is not set
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=y
# CONFIG_LP_CONSOLE is not set
CONFIG_PPDEV=y
# CONFIG_HVC_CONSOLE is not set
# CONFIG_HVC_RTAS is not set
CONFIG_HVCS=y
CONFIG_IPMI_HANDLER=y
CONFIG_IPMI_PANIC_EVENT=y
# CONFIG_IPMI_PANIC_STRING is not set
# CONFIG_IPMI_DEVICE_INTERFACE is not set
CONFIG_IPMI_SI=y
# CONFIG_IPMI_WATCHDOG is not set
# CONFIG_IPMI_POWEROFF is not set
CONFIG_HW_RANDOM=y
CONFIG_R3964=y
CONFIG_APPLICOM=y
# CONFIG_RAW_DRIVER is not set
CONFIG_HANGCHECK_TIMER=y
CONFIG_DEVPORT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_ALGOPCA=y

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
CONFIG_I2C_ALI1535=y
CONFIG_I2C_ALI15X3=y
# CONFIG_I2C_AMD756 is not set
CONFIG_I2C_AMD8111=y
CONFIG_I2C_I801=y
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
CONFIG_I2C_SIS630=y
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIAPRO is not set

#
# Embebbed system I2C host controller drivers
#

#
# External I2C/SMBus adapter drivers
#
CONFIG_I2C_PARPORT=y
CONFIG_I2C_PARPORT_LIGHT=y

#
# Graphics adapter I2C/DDC channel drivers
#
# CONFIG_I2C_VOODOO3 is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_ISCH is not set
CONFIG_I2C_PCA_PLATFORM=y
CONFIG_I2C_SIMTEC=y

#
# Miscellaneous I2C Chip support
#
CONFIG_PCF8575=y
CONFIG_I2C_DEBUG_CORE=y
CONFIG_I2C_DEBUG_ALGO=y
CONFIG_I2C_DEBUG_BUS=y
CONFIG_I2C_DEBUG_CHIP=y
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#

#
# SPI Protocol Masters
#
CONFIG_W1=y
CONFIG_W1_CON=y

#
# 1-wire Bus Masters
#
# CONFIG_W1_MASTER_MATROX is not set

#
# 1-wire Slaves
#
CONFIG_W1_SLAVE_THERM=y
CONFIG_W1_SLAVE_SMEM=y
# CONFIG_W1_SLAVE_DS2433 is not set
CONFIG_W1_SLAVE_DS2760=y
CONFIG_POWER_SUPPLY=y
CONFIG_POWER_SUPPLY_DEBUG=y
# CONFIG_PDA_POWER is not set
CONFIG_BATTERY_DS2760=y
# CONFIG_HWMON is not set
# CONFIG_THERMAL is not set
# CONFIG_THERMAL_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y

#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=y
CONFIG_WATCHDOG_RTAS=y

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
CONFIG_WDTPCI=y
# CONFIG_WDT_501_PCI is not set

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
CONFIG_SSB=y
CONFIG_SSB_SPROM=y
CONFIG_SSB_BLOCKIO=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
CONFIG_SSB_B43_PCI_BRIDGE=y
CONFIG_SSB_SILENT=y
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_DRIVER_PCICORE=y

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set

#
# Multimedia devices
#

#
# Multimedia core support
#
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2_COMMON=y
# CONFIG_VIDEO_ALLOW_V4L1 is not set
CONFIG_VIDEO_V4L1_COMPAT=y
# CONFIG_DVB_CORE is not set
CONFIG_VIDEO_MEDIA=y

#
# Multimedia drivers
#
CONFIG_MEDIA_TUNER=y
# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
CONFIG_MEDIA_TUNER_SIMPLE=y
CONFIG_MEDIA_TUNER_TDA8290=y
CONFIG_MEDIA_TUNER_TDA9887=y
CONFIG_MEDIA_TUNER_TEA5761=y
CONFIG_MEDIA_TUNER_TEA5767=y
CONFIG_MEDIA_TUNER_MT20XX=y
CONFIG_VIDEO_V4L2=y
# CONFIG_VIDEO_CAPTURE_DRIVERS is not set
CONFIG_RADIO_ADAPTERS=y
CONFIG_RADIO_GEMTEK_PCI=y
CONFIG_RADIO_MAXIRADIO=y
# CONFIG_RADIO_MAESTRO is not set
CONFIG_DAB=y

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_DRM=y
CONFIG_DRM_TDFX=y
CONFIG_DRM_R128=y
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
CONFIG_DRM_VIA=y
# CONFIG_DRM_SAVAGE is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=y
# CONFIG_FB is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_CORGI is not set

#
# Display device support
#
CONFIG_DISPLAY_SUPPORT=y

#
# Display hardware drivers
#
# 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 is not set
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_UWB=y
CONFIG_UWB_WLP=y
# CONFIG_MMC is not set
CONFIG_MEMSTICK=y
CONFIG_MEMSTICK_DEBUG=y

#
# MemoryStick drivers
#
# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
# CONFIG_MSPRO_BLOCK is not set

#
# MemoryStick Host Controller Drivers
#
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#

#
# LED Triggers
#
# CONFIG_LEDS_TRIGGERS is not set
# CONFIG_ACCESSIBILITY is not set
CONFIG_INFINIBAND=y
CONFIG_INFINIBAND_USER_MAD=y
# CONFIG_INFINIBAND_USER_ACCESS is not set
CONFIG_INFINIBAND_ADDR_TRANS=y
CONFIG_INFINIBAND_MTHCA=y
CONFIG_INFINIBAND_MTHCA_DEBUG=y
CONFIG_INFINIBAND_IPATH=y
# CONFIG_INFINIBAND_EHCA is not set
CONFIG_INFINIBAND_AMSO1100=y
CONFIG_INFINIBAND_AMSO1100_DEBUG=y
CONFIG_MLX4_INFINIBAND=y
CONFIG_INFINIBAND_NES=y
CONFIG_INFINIBAND_NES_DEBUG=y
CONFIG_INFINIBAND_IPOIB=y
CONFIG_INFINIBAND_IPOIB_DEBUG=y
CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
# CONFIG_INFINIBAND_SRP is not set
# CONFIG_INFINIBAND_ISER is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

#
# RTC interfaces
#
# CONFIG_RTC_INTF_DEV is not set
CONFIG_RTC_DRV_TEST=y

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
CONFIG_RTC_DRV_DS1672=y
CONFIG_RTC_DRV_MAX6900=y
CONFIG_RTC_DRV_RS5C372=y
# CONFIG_RTC_DRV_ISL1208 is not set
CONFIG_RTC_DRV_X1205=y
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_S35390A is not set
CONFIG_RTC_DRV_FM3130=y

#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_R9701 is not set
CONFIG_RTC_DRV_RS5C348=y

#
# Platform RTC drivers
#
# CONFIG_RTC_DRV_CMOS is not set
CONFIG_RTC_DRV_DS1511=y
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
CONFIG_RTC_DRV_M48T59=y
# CONFIG_RTC_DRV_V3020 is not set

#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_PPC=y
# CONFIG_DMADEVICES is not set
CONFIG_AUXDISPLAY=y
# CONFIG_UIO is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
CONFIG_EXT2_FS_XIP=y
CONFIG_FS_XIP=y
# CONFIG_EXT3_FS is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY is not set
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=y
# 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_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
# CONFIG_PROC_FS is not set
# CONFIG_SYSFS is not set
# CONFIG_TMPFS is not set
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y

#
# Miscellaneous filesystems
#
# CONFIG_HFSPLUS_FS is not set
# CONFIG_JFFS2_FS is not set
CONFIG_CRAMFS=y
# CONFIG_VXFS_FS is not set
CONFIG_MINIX_FS=y
CONFIG_HPFS_FS=y
CONFIG_QNX4FS_FS=y
CONFIG_ROMFS_FS=y
# CONFIG_SYSV_FS is not set
CONFIG_UFS_FS=y
CONFIG_UFS_DEBUG=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFSD is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SMB_FS=y
CONFIG_SMB_NLS_DEFAULT=y
CONFIG_SMB_NLS_REMOTE="cp437"
CONFIG_CIFS=y
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
CONFIG_CIFS_DEBUG2=y
CONFIG_NCP_FS=y
CONFIG_NCPFS_PACKET_SIGNING=y
# CONFIG_NCPFS_IOCTL_LOCKING is not set
CONFIG_NCPFS_STRONG=y
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
CONFIG_NCPFS_SMALLDOS=y
# CONFIG_NCPFS_NLS is not set
CONFIG_NCPFS_EXTRAS=y
# CONFIG_CODA_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
CONFIG_NLS_CODEPAGE_737=y
CONFIG_NLS_CODEPAGE_775=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_CODEPAGE_852=y
# CONFIG_NLS_CODEPAGE_855 is not set
CONFIG_NLS_CODEPAGE_857=y
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
CONFIG_NLS_CODEPAGE_862=y
CONFIG_NLS_CODEPAGE_863=y
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
CONFIG_NLS_CODEPAGE_866=y
# CONFIG_NLS_CODEPAGE_869 is not set
CONFIG_NLS_CODEPAGE_936=y
CONFIG_NLS_CODEPAGE_950=y
CONFIG_NLS_CODEPAGE_932=y
CONFIG_NLS_CODEPAGE_949=y
CONFIG_NLS_CODEPAGE_874=y
# CONFIG_NLS_ISO8859_8 is not set
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_CODEPAGE_1251=y
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
CONFIG_NLS_ISO8859_6=y
CONFIG_NLS_ISO8859_7=y
# CONFIG_NLS_ISO8859_9 is not set
CONFIG_NLS_ISO8859_13=y
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
CONFIG_NLS_KOI8_U=y
# CONFIG_NLS_UTF8 is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_GENERIC_FIND_FIRST_BIT is not set
CONFIG_CRC_CCITT=y
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_HAVE_LMB=y

#
# Kernel hacking
#
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
CONFIG_HEADERS_CHECK=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
# CONFIG_DETECT_SOFTLOCKUP is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
CONFIG_LOCK_STAT=y
CONFIG_DEBUG_LOCKDEP=y
CONFIG_TRACE_IRQFLAGS=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_SG=y
CONFIG_FRAME_POINTER=y
# CONFIG_FAULT_INJECTION is not set
CONFIG_HAVE_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_TRACING=y
# CONFIG_FTRACE is not set
CONFIG_IRQSOFF_TRACER=y
# CONFIG_SCHED_TRACER is not set
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_FTRACE_SELFTEST=y
CONFIG_FTRACE_STARTUP_TEST=y
CONFIG_SAMPLES=y
CONFIG_SAMPLE_KOBJECT=y
CONFIG_KERNEL_TESTS=y
CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
# CONFIG_RCU_TORTURE_TEST is not set
CONFIG_RT_MUTEX_TESTER=y
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
CONFIG_DEBUG_PAGEALLOC=y
# CONFIG_HCALL_STATS is not set
CONFIG_DEBUGGER=y
CONFIG_XMON=y
CONFIG_XMON_DEFAULT=y
# CONFIG_XMON_DISASSEMBLY is not set
# CONFIG_IRQSTACKS is not set
CONFIG_VIRQ_DEBUG=y
CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y
# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
# CONFIG_PPC_EARLY_DEBUG_G5 is not set
# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE=y
# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
# CONFIG_PPC_EARLY_DEBUG_44x is not set
# CONFIG_PPC_EARLY_DEBUG_40x is not set
# CONFIG_PPC_EARLY_DEBUG_CPM is not set

#
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
CONFIG_KEYS_COMPAT=y
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_NULL=y
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_AUTHENC=y

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
CONFIG_CRYPTO_SEQIV=y

#
# Block modes
#
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_PCBC is not set

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y

#
# Digest
#
# CONFIG_CRYPTO_CRC32C is not set
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
CONFIG_CRYPTO_RMD128=y
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_RMD256=y
CONFIG_CRYPTO_RMD320=y
CONFIG_CRYPTO_SHA1=y
# CONFIG_CRYPTO_SHA256 is not set
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_TGR192=y
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANUBIS is not set
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=y
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SEED=y
# CONFIG_CRYPTO_SERPENT is not set
CONFIG_CRYPTO_TEA=y
# CONFIG_CRYPTO_TWOFISH is not set

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_HW is not set
# CONFIG_PPC_CLOCK is not set
# CONFIG_VIRTUALIZATION is not set

^ permalink raw reply

* Re: [PATCH v2] powerpc/bootwrapper: Add documentation of boot wrapper targets
From: Grant Likely @ 2008-06-30 18:25 UTC (permalink / raw)
  To: Anatolij Gustschin; +Cc: linuxppc-dev, paulus, john.linn
In-Reply-To: <48691BA2.3050001@denx.de>

On Mon, Jun 30, 2008 at 07:45:06PM +0200, Anatolij Gustschin wrote:
> Grant Likely wrote:
> > From: Grant Likely <grant.likely@secretlab.ca>
> > 
> > There have been many questions on and off the mailing list about how
> > exactly the bootwrapper is used for embedded targets.  Add some
> > documentation and help text to try and clarify the system.
> > 
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> 
> <snip>
> 
> typo, s/firmare/firmware/
> typo, s/U-Book/U-Boot/
> typo, s/independant/independent/

Good catches; thanks!

g.

^ permalink raw reply

* Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: Dmitry Torokhov @ 2008-06-30 18:21 UTC (permalink / raw)
  To: John Linn; +Cc: linuxppc-dev, Sadanand, linux-input
In-Reply-To: <20080630153824.ED3D319B0075@mail96-wa4.bigfish.com>

On Mon, Jun 30, 2008 at 08:38:21AM -0700, John Linn wrote:
> +	spin_lock_init(&drvdata->lock);
> +	dev_set_drvdata(dev, (void *)drvdata);

No need to cast to void *.

> +
> +	if (!regs_res || !irq_res) {
> +		dev_err(dev, "IO resource(s) not found\n");
> +		retval = -EFAULT;
> +		goto failed1;
> +	}
> +
> +	drvdata->irq = irq_res->start;
> +	remap_size = regs_res->end - regs_res->start + 1;
> +	if (!request_mem_region(regs_res->start, remap_size, DRIVER_NAME)) {
> +
> +		dev_err(dev, "Couldn't lock memory region at 0x%08X\n",
> +			(unsigned int)regs_res->start);
> +		retval = -EBUSY;
> +		goto failed1;
> +	}
> +
> +	/* Fill in configuration data and add them to the list */
> +	drvdata->phys_addr = regs_res->start;
> +	drvdata->remap_size = remap_size;
> +	drvdata->base_address = ioremap(regs_res->start, remap_size);
> +	if (drvdata->base_address == NULL) {
> +
> +		dev_err(dev, "Couldn't ioremap memory at 0x%08X\n",
> +			(unsigned int)regs_res->start);
> +		retval = -EFAULT;
> +		goto failed2;
> +	}
> +
> +	/* Initialize the PS/2 interface */
> +	down(&cfg_sem);
> +	if (xps2_initialize(drvdata)) {
> +		up(&cfg_sem);
> +		dev_err(dev, "Could not initialize device\n");
> +		retval = -ENODEV;
> +		goto failed3;
> +	}
> +	up(&cfg_sem);

Do you need a counting semaphore here?

> +
> +	dev_info(dev, "Xilinx PS2 at 0x%08X mapped to 0x%08X, irq=%d\n",
> +		drvdata->phys_addr, (u32)drvdata->base_address, drvdata->irq);
> +
> +	drvdata->serio.id.type = SERIO_8042;
> +	drvdata->serio.write = sxps2_write;
> +	drvdata->serio.open = sxps2_open;
> +	drvdata->serio.close = sxps2_close;
> +	drvdata->serio.port_data = drvdata;
> +	drvdata->serio.dev.parent = dev;
> +	snprintf(drvdata->serio.name, sizeof(drvdata->serio.name),
> +		 XPS2_NAME_DESC, id);
> +	snprintf(drvdata->serio.phys, sizeof(drvdata->serio.phys),
> +		 XPS2_PHYS_DESC, id);

I bet if you make a temp variable for drvdata->serio the code size wil
shrink a tiny bit.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH v2] update crypto node definition and device tree instances
From: Kim Phillips @ 2008-06-30 18:14 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev
In-Reply-To: <e590624fb4ff66d787a2fa3c44e00cbc@kernel.crashing.org>

On Mon, 30 Jun 2008 18:55:34 +0200
Segher Boessenkool <segher@kernel.crashing.org> wrote:

> >> Also, these made-up names make you do more work: you'll need to
> >
> > who said they were made up?
> 
> I did.  These names do not refer to some physical part you can buy.

right, they refer to devices in multiple physical parts you can buy.
Part-you-can-buy documentation clearly indicates the SEC version in
that part, in the form "SEC X.Y", i.e, it's not something made up
that's not already in freescale documentation.

> >> write up a binding for them, explaining exactly what a 1.0 device
> >> etc. is (or at least point to documentation for it).  If you use
> >> a name that refers to some device that people can easily google
> >> for documentation, you can skip this (well, you might need to
> >> write a binding anyway; but at least you won't have to explain
> >> what the device _is_).
> >
> > documentation is available in the usual places, and it specifically
> > points out which SEC version it references.
> 
> I can't find a manual online for "freescale sec"; googling
> for "freescale sec-1.0" finds a manual for the PowerQUICC I;
> is that the right one?  I don't know, so the binding needs
> to explain it to me.

the binding shouldn't be responsible for google's shortcomings (that
hit is correct, btw).

> Going from SoC name -> SEC version is easy, but the other way around
> not so.
> 
> Anyway, minor stuff.

sounds like you're pointing out a lack of "SEC versions guide"
documentation of Freescale..

> > Plus, as I mentioned
> > before, a lot of the differences between the SEC versions are miniscule
> > feature bits scattered across the programming model.
> 
> I don't see how this is relevant, sorry.
> 
I'm under the impression that listing the differences (assuming they're
easily obtainable) would lead to unnecessary b-w-of bloat.

> >> Using actual model names also reduces the namespace pollution
> >> (hopefully Freescale will not create some other MPC8272 device
> >> ever, so "fsl,mpc8272-whatever" will never be a nice name to
> >> use for any other device; OTOH, it's likely that Freescale will
> >> create some other device called "SEC" (there are only so many
> >> TLAs, after all), so "fsl,sec-n.m" isn't as future-proof.
> >
> > I doubt that; the SEC has been around for about a decade now and that
> > hasn't happened.
> 
> You'll have to admit a three-letter acronym is a bigger namespace
> squatter than a nice long name is.  But it's your namespace, I don't
> care.
> 
> i tried googling for "freescale sec" to find any other devices called
> SEC, but that didn't work out.  What is "insider trading"?  ;-)

I don't know what google does; I'd search freescale documentation
directly.

Kim

^ permalink raw reply

* Re: [PATCH] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: Dmitry Torokhov @ 2008-06-30 18:10 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, linux-input, John Linn, Sadanand
In-Reply-To: <20080630171628.GF17916@secretlab.ca>

Hi Grant, John,

On Mon, Jun 30, 2008 at 11:16:28AM -0600, Grant Likely wrote:
> On Mon, Jun 30, 2008 at 07:24:48AM -0700, John Linn wrote:
> > +config SERIO_XILINX_XPS_PS2
> > +	tristate "Xilinx XPS PS/2 Controller Support"
> > +	help
> > +	  This driver supports XPS PS/2 IP from Xilinx EDK.
> > +
> 
> Consider moving this block to somewhere in the middle of the file to
> reduce the possibility of merge conflicts.
> 

I can take care of that, no worries.

> > + *
> > + * (c) 2005 MontaVista Software, Inc.
> > + * (c) 2008 Xilinx Inc.
> > + *
> > + * 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.
> > + *
> > + * 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.,
> > + * 675 Mass Ave, Cambridge, MA 02139, USA.
> 
> These two paragraphs are redundant.  Being in the Linux source tree
> implies that it is GPL licensed.  You can remove them.
> 

I prefer having the statement in right in the code actually. While
being the in kernel implies that the code is GPLv2 compatible it could
be dual-licensed or GPLv2 only. This removes any doubt as to what
license is used on this particular piece of code.

> > + */
> > +
> > +
> > +#include <linux/module.h>
> > +#include <linux/serio.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/errno.h>
> > +#include <linux/init.h>
> > +#include <linux/list.h>
> > +#include <asm/io.h>
> > +
> > +#ifdef CONFIG_OF		/* For open firmware */
> > + #include <linux/of_device.h>
> > + #include <linux/of_platform.h>
> > +#endif /* CONFIG_OF */
> 
> This is a given for mainline since arch/ppc will not exist in 2.6.27
> 
> > +
> > +#include "xilinx_ps2.h"
> 
> This header can simple be rolled into this .c file because the driver no
> longer has multiple .c files.
> 
> 
> > +#define DRIVER_DESCRIPTION	"Xilinx XPS PS/2 driver"
> > +#define XPS2_NAME_DESC		"Xilinx XPS PS/2 Port #%d"
> > +#define XPS2_PHYS_DESC		"xilinxps2/serio%d"
> 
> These strings are only used in 1 place each, no need to use a #define
> 
> > +
> > +
> > +static DECLARE_MUTEX(cfg_sem);
> 
> This mutex should be part of the driver private data structure
> 
> > +
> > +/*********************/
> > +/* Interrupt handler */
> > +/*********************/
> > +static irqreturn_t xps2_interrupt(int irq, void *dev_id)
> > +{
> > +	struct xps2data *drvdata = (struct xps2data *)dev_id;
> > +	u32 intr_sr;
> > +	u32 ier;
> > +	u8 c;
> > +	u8 retval;
> > +
> > +	/* Get the PS/2 interrupts and clear them */
> > +	intr_sr = in_be32(drvdata->base_address + XPS2_IPISR_OFFSET);
> > +	out_be32(drvdata->base_address + XPS2_IPISR_OFFSET, intr_sr);
> > +
> > +	/* Check which interrupt is active */
> > +	if (intr_sr & XPS2_IPIXR_RX_OVF) {
> > +		printk(KERN_ERR "%s: receive overrun error\n",
> > +			drvdata->serio.name);
> > +	}
> > +
> > +	if (intr_sr & XPS2_IPIXR_RX_ERR) {
> > +		drvdata->dfl |= SERIO_PARITY;
> > +	}
> > +
> > +	if (intr_sr & (XPS2_IPIXR_TX_NOACK | XPS2_IPIXR_WDT_TOUT)) {
> > +		drvdata->dfl |= SERIO_TIMEOUT;
> > +	}
> > +
> > +	if (intr_sr & XPS2_IPIXR_RX_FULL) {
> > +		retval = xps2_recv(drvdata, &drvdata->rxb);
> > +
> > +		/* Error, if 1 byte is not received */
> > +		if (retval != 1) {
> > +			printk(KERN_ERR
> > +				"%s: wrong rcvd byte count (%d)\n",
> > +				drvdata->serio.name, retval);

Don't you want to bail out here? Otherwise you will feed garbage to
serio_interrupt() I think.

> > +		}
> > +		c = drvdata->rxb;
> > +		serio_interrupt(&drvdata->serio, c, drvdata->dfl);
> > +		drvdata->dfl = 0;
> > +	}
> > +
> > +	if (intr_sr & XPS2_IPIXR_TX_ACK) {
> > +
> > +		/* Disable the TX interrupts after the transmission is
> > +		 * complete */
> > +		ier = in_be32(drvdata->base_address + XPS2_IPIER_OFFSET);
> > +		ier &= (~(XPS2_IPIXR_TX_ACK & XPS2_IPIXR_ALL ));
> > +		out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, ier);
> > +		drvdata->dfl = 0;
> > +	}
> > +
> > +	return IRQ_HANDLED;
> > +}
> > +
> > +/*******************/
> > +/* serio callbacks */
> > +/*******************/
> > +
> > +/*
> > + * sxps2_write() sends a byte out through the PS/2 interface.
> > + *
> > + * The sole purpose of drvdata->tx_end is to prevent the driver
> > + * from locking up in the do {} while; loop when nothing is connected
> > + * to the given PS/2 port. That's why we do not try to recover
> > + * from the transmission failure.
> > + * drvdata->tx_end needs not to be initialized to some "far in the
> > + * future" value, as the very first attempt to xps2_send() a byte
> > + * is always successful, and drvdata->tx_end will be set to a proper
> > + * value at that moment - before the 1st use in the comparison.
> > + */
> 
> Good comment block.
> 
> nitpick: can you reformat the comment blocks to be in kerneldoc format?
> That will allow the automatic document generation tools to parse it.
> 
> see: Documentation/kernel-doc-nano-HOWTO.txt

This is an internal function so its not going to be exposed in
kerneldoc though.

> 
> > +static int sxps2_write(struct serio *pserio, unsigned char c)
> > +{
> > +	struct xps2data *drvdata = pserio->port_data;
> > +	unsigned long flags;
> > +	int retval;
> > +
> > +	do {
> > +		spin_lock_irqsave(&drvdata->lock, flags);
> > +		retval = xps2_send(drvdata, &c);
> > +		spin_unlock_irqrestore(&drvdata->lock, flags);
> > +
> > +		if (retval == 1) {
> > +			drvdata->tx_end = jiffies + HZ;
> > +			return 0;	/* success */
> > +		}
> > +	} while (!time_after(jiffies, drvdata->tx_end));

The logic escapes me... Let's say you send a byte and time when
jiffies were 10000 and now it is time 20000 and we try to send another
byte. Our first attempt fails and with time fence 11000 (HZ=1000) we
bail out of sxps2_write() after the very first unsiccessful attempt.
Is this what you intended?

> > +
> > +	return 1;			/* transmission is frozen */

It is better to return a negative on error, even if you don't report
actual -EXXXX error code.

-- 
Dmitry

^ permalink raw reply

* RE: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: John Linn @ 2008-06-30 17:59 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: linuxppc-dev, Sadanand Mutyala, linux-input
In-Reply-To: <877ic6dcyj.fsf@macbook.be.48ers.dk>

Ahh... sorry about that Peter, didn't ignore your comments on purpose. =


Just got on a tangent about sending it to the other mailing list and
forgot to look on down.

I'll review them.

-- John

-----Original Message-----
From: Peter Korsgaard [mailto:jacmet@gmail.com] On Behalf Of Peter
Korsgaard
Sent: Monday, June 30, 2008 11:56 AM
To: John Linn
Cc: linuxppc-dev@ozlabs.org; linux-input@vger.kernel.org; Sadanand
Mutyala
Subject: Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver

>>>>> "John" =3D=3D John Linn <john.linn@xilinx.com> writes:

 John> Added a new driver for Xilinx XPS PS2 IP. This driver is
 John> a flat driver to better match the Linux driver pattern.

 John> Signed-off-by: Sadanand <sadanan@xilinx.com>
 John> Signed-off-by: John Linn <john.linn@xilinx.com>
 John> ---

 John> V2

 John> Changes from v1:

 John> Ran the scripts/checkpatch.pl on the patch as I should have done
 John> before sending it (thanks to Stephen).

What about my comments?

-- =

Bye, Peter Korsgaard


This email and any attachments are intended for the sole use of the named r=
ecipient(s) and contain(s) confidential information that may be proprietary=
, privileged or copyrighted under applicable law. If you are not the intend=
ed recipient, do not read, copy, or forward this email message or any attac=
hments. Delete this email message and any attachments immediately.

^ permalink raw reply

* Re: [PATCH] [V2] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: Peter Korsgaard @ 2008-06-30 17:55 UTC (permalink / raw)
  To: John Linn; +Cc: linuxppc-dev, Sadanand, linux-input
In-Reply-To: <20080630153824.ED3D319B0075@mail96-wa4.bigfish.com>

>>>>> "John" == John Linn <john.linn@xilinx.com> writes:

 John> Added a new driver for Xilinx XPS PS2 IP. This driver is
 John> a flat driver to better match the Linux driver pattern.

 John> Signed-off-by: Sadanand <sadanan@xilinx.com>
 John> Signed-off-by: John Linn <john.linn@xilinx.com>
 John> ---

 John> V2

 John> Changes from v1:

 John> Ran the scripts/checkpatch.pl on the patch as I should have done
 John> before sending it (thanks to Stephen).

What about my comments?

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* MPC8313 GPIO
From: Van Dessel Ivan @ 2008-06-30 17:41 UTC (permalink / raw)
  To: linuxppc-embedded

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

I want to write and read from the GPIO pins, but I can't find any documentation if there is a driver already
written anyone have any online help or know where to find the documentation or some quick help to get me going 
thanks

-Ivan




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

^ permalink raw reply

* Re: [PATCH v2] powerpc/bootwrapper: Add documentation of boot wrapper targets
From: Anatolij Gustschin @ 2008-06-30 17:45 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, paulus, john.linn
In-Reply-To: <20080628050407.6067.90225.stgit@trillian.secretlab.ca>

Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
> 
> There have been many questions on and off the mailing list about how
> exactly the bootwrapper is used for embedded targets.  Add some
> documentation and help text to try and clarify the system.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

<snip>

> diff --git a/Documentation/powerpc/bootwrapper.txt b/Documentation/powerpc/bootwrapper.txt
> new file mode 100644
> index 0000000..a03d73c
> --- /dev/null
> +++ b/Documentation/powerpc/bootwrapper.txt
> @@ -0,0 +1,141 @@
> +The PowerPC boot wrapper
> +------------------------
> +Copyright (C) Secret Lab Technologies Ltd.
> +
> +PowerPC image targets compresses and wraps the kernel image (vmlinux) with
> +a boot wrapper to make it usable by the system firmware.  There is no
> +standard PowerPC firmware interface, so the boot wrapper is designed to
> +be adaptable for each kind of image that needs to be built.
> +
> +The boot wrapper can be found in the arch/powerpc/boot/ directory.  The
> +Makefile in that directory has targets for all the available image types.
> +The different image types are used to support all of the various firmware
> +interfaces found on PowerPC platforms.  OpenFirmware is the most commonly
> +used firmare type on general purpose PowerPC systems from Apple, IBM and

typo, s/firmare/firmware/

<snip>

> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index b7d4c4c..754c7eb 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -169,12 +169,25 @@ bootwrapper_install %.dtb:
>  	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
>  
>  define archhelp
> -  @echo '* zImage          - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
> +  @echo '* zImage          - Build default images selected by kernel config'
> +  @echo '  zImage.*        - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
> +  @echo '  uImage          - U-Book native image format'

typo, s/U-Book/U-Boot/

> +  @echo '  cuImage.<dt>    - Backwards compatible U-Boot image for older'
> +  @echo '                    versions which do not support device trees'
> +  @echo '  dtbImage.<dt>   - zImage with an embedded device tree blob'
> +  @echo '  simpleImage.<dt> - Firmware independant image.'

typo, s/independant/independent/

Cheers,
Anatolij

^ permalink raw reply

* Re: [PATCH] powerpc: Xilinx: PS2: Added new XPS PS2 driver
From: Grant Likely @ 2008-06-30 17:16 UTC (permalink / raw)
  To: John Linn; +Cc: linuxppc-dev, dmitry.torokhov, linux-input, Sadanand
In-Reply-To: <20080630142451.516A41D1006C@mail57-sin.bigfish.com>

On Mon, Jun 30, 2008 at 07:24:48AM -0700, John Linn wrote:
> Added a new driver for Xilinx XPS PS2 IP. This driver is
> a flat driver to better match the Linux driver pattern.
> 
> Signed-off-by: Sadanand <sadanan@xilinx.com>
> Signed-off-by: John Linn <john.linn@xilinx.com>

I don't know much about the serio conventions, but I can make some
general comments...

from MAINTAINERS:

INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
P:	Dmitry Torokhov
M:	dmitry.torokhov@gmail.com
M:	dtor@mail.ru
L:	linux-input@vger.kernel.org
T:	git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
S:	Maintained

You need to cc: the linux-input mailing list and Dimitry when you post
the next version of this driver.

> ---
>  drivers/input/serio/Kconfig      |    5 +
>  drivers/input/serio/Makefile     |    1 +
>  drivers/input/serio/xilinx_ps2.c |  464 ++++++++++++++++++++++++++++++++++++++
>  drivers/input/serio/xilinx_ps2.h |   97 ++++++++
>  4 files changed, 567 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/input/serio/xilinx_ps2.c
>  create mode 100644 drivers/input/serio/xilinx_ps2.h
> 
> diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
> index ec4b661..0e62b39 100644
> --- a/drivers/input/serio/Kconfig
> +++ b/drivers/input/serio/Kconfig
> @@ -190,4 +190,9 @@ config SERIO_RAW
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called serio_raw.
>  
> +config SERIO_XILINX_XPS_PS2
> +	tristate "Xilinx XPS PS/2 Controller Support"
> +	help
> +	  This driver supports XPS PS/2 IP from Xilinx EDK.
> +

Consider moving this block to somewhere in the middle of the file to
reduce the possibility of merge conflicts.

>  endif
> diff --git a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile
> index 38b8868..9b6c813 100644
> --- a/drivers/input/serio/Makefile
> +++ b/drivers/input/serio/Makefile
> @@ -21,3 +21,4 @@ obj-$(CONFIG_SERIO_PCIPS2)	+= pcips2.o
>  obj-$(CONFIG_SERIO_MACEPS2)	+= maceps2.o
>  obj-$(CONFIG_SERIO_LIBPS2)	+= libps2.o
>  obj-$(CONFIG_SERIO_RAW)		+= serio_raw.o
> +obj-$(CONFIG_SERIO_XILINX_XPS_PS2)	+= xilinx_ps2.o

Ditto.
> diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
> new file mode 100644
> index 0000000..670d47f
> --- /dev/null
> +++ b/drivers/input/serio/xilinx_ps2.c
> @@ -0,0 +1,464 @@
> +/*
> + * xilinx_ps2.c

Don't put the .c filename in the header block.

> + *
> + * Xilinx PS/2 driver to interface PS/2 component to Linux
> + *
> + * Author: MontaVista Software, Inc.
> + *	   source@mvista.com

Is this true anymore?

> + *
> + * (c) 2005 MontaVista Software, Inc.
> + * (c) 2008 Xilinx Inc.
> + *
> + * 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.
> + *
> + * 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.,
> + * 675 Mass Ave, Cambridge, MA 02139, USA.

These two paragraphs are redundant.  Being in the Linux source tree
implies that it is GPL licensed.  You can remove them.

> + */
> +
> +
> +#include <linux/module.h>
> +#include <linux/serio.h>
> +#include <linux/interrupt.h>
> +#include <linux/errno.h>
> +#include <linux/init.h>
> +#include <linux/list.h>
> +#include <asm/io.h>
> +
> +#ifdef CONFIG_OF		/* For open firmware */
> + #include <linux/of_device.h>
> + #include <linux/of_platform.h>
> +#endif /* CONFIG_OF */

This is a given for mainline since arch/ppc will not exist in 2.6.27

> +
> +#include "xilinx_ps2.h"

This header can simple be rolled into this .c file because the driver no
longer has multiple .c files.


> +#define DRIVER_DESCRIPTION	"Xilinx XPS PS/2 driver"
> +#define XPS2_NAME_DESC		"Xilinx XPS PS/2 Port #%d"
> +#define XPS2_PHYS_DESC		"xilinxps2/serio%d"

These strings are only used in 1 place each, no need to use a #define

> +
> +
> +static DECLARE_MUTEX(cfg_sem);

This mutex should be part of the driver private data structure

> +
> +/*********************/
> +/* Interrupt handler */
> +/*********************/
> +static irqreturn_t xps2_interrupt(int irq, void *dev_id)
> +{
> +	struct xps2data *drvdata = (struct xps2data *)dev_id;
> +	u32 intr_sr;
> +	u32 ier;
> +	u8 c;
> +	u8 retval;
> +
> +	/* Get the PS/2 interrupts and clear them */
> +	intr_sr = in_be32(drvdata->base_address + XPS2_IPISR_OFFSET);
> +	out_be32(drvdata->base_address + XPS2_IPISR_OFFSET, intr_sr);
> +
> +	/* Check which interrupt is active */
> +	if (intr_sr & XPS2_IPIXR_RX_OVF) {
> +		printk(KERN_ERR "%s: receive overrun error\n",
> +			drvdata->serio.name);
> +	}
> +
> +	if (intr_sr & XPS2_IPIXR_RX_ERR) {
> +		drvdata->dfl |= SERIO_PARITY;
> +	}
> +
> +	if (intr_sr & (XPS2_IPIXR_TX_NOACK | XPS2_IPIXR_WDT_TOUT)) {
> +		drvdata->dfl |= SERIO_TIMEOUT;
> +	}
> +
> +	if (intr_sr & XPS2_IPIXR_RX_FULL) {
> +		retval = xps2_recv(drvdata, &drvdata->rxb);
> +
> +		/* Error, if 1 byte is not received */
> +		if (retval != 1) {
> +			printk(KERN_ERR
> +				"%s: wrong rcvd byte count (%d)\n",
> +				drvdata->serio.name, retval);
> +		}
> +		c = drvdata->rxb;
> +		serio_interrupt(&drvdata->serio, c, drvdata->dfl);
> +		drvdata->dfl = 0;
> +	}
> +
> +	if (intr_sr & XPS2_IPIXR_TX_ACK) {
> +
> +		/* Disable the TX interrupts after the transmission is
> +		 * complete */
> +		ier = in_be32(drvdata->base_address + XPS2_IPIER_OFFSET);
> +		ier &= (~(XPS2_IPIXR_TX_ACK & XPS2_IPIXR_ALL ));
> +		out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, ier);
> +		drvdata->dfl = 0;
> +	}
> +
> +	return IRQ_HANDLED;
> +}
> +
> +/*******************/
> +/* serio callbacks */
> +/*******************/
> +
> +/*
> + * sxps2_write() sends a byte out through the PS/2 interface.
> + *
> + * The sole purpose of drvdata->tx_end is to prevent the driver
> + * from locking up in the do {} while; loop when nothing is connected
> + * to the given PS/2 port. That's why we do not try to recover
> + * from the transmission failure.
> + * drvdata->tx_end needs not to be initialized to some "far in the
> + * future" value, as the very first attempt to xps2_send() a byte
> + * is always successful, and drvdata->tx_end will be set to a proper
> + * value at that moment - before the 1st use in the comparison.
> + */

Good comment block.

nitpick: can you reformat the comment blocks to be in kerneldoc format?
That will allow the automatic document generation tools to parse it.

see: Documentation/kernel-doc-nano-HOWTO.txt

> +static int sxps2_write(struct serio *pserio, unsigned char c)
> +{
> +	struct xps2data *drvdata = pserio->port_data;
> +	unsigned long flags;
> +	int retval;
> +
> +	do {
> +		spin_lock_irqsave(&drvdata->lock, flags);
> +		retval = xps2_send(drvdata, &c);
> +		spin_unlock_irqrestore(&drvdata->lock, flags);
> +
> +		if (retval == 1) {
> +			drvdata->tx_end = jiffies + HZ;
> +			return 0;	/* success */
> +		}
> +	} while (!time_after(jiffies, drvdata->tx_end));
> +
> +	return 1;			/* transmission is frozen */
> +}
> +
> +/*
> + * sxps2_open() is called when a port is open by the higher layer.
> + */
> +static int sxps2_open(struct serio *pserio)
> +{
> +	struct xps2data *drvdata = pserio->port_data;
> +	int retval;
> +
> +	retval = request_irq(drvdata->irq, &xps2_interrupt, 0,
> +				DRIVER_NAME, drvdata);
> +	if (retval) {
> +		printk(KERN_ERR
> +			"%s: Couldn't allocate interrupt %d\n",
> +			drvdata->serio.name, drvdata->irq);
> +		return retval;
> +	}
> +
> +	/* start reception by enabling the interrupts */
> +	out_be32(drvdata->base_address + XPS2_GIER_OFFSET, XPS2_GIER_GIE_MASK);
> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, XPS2_IPIXR_RX_ALL);
> +	(void)xps2_recv(drvdata, &drvdata->rxb);
> +
> +	return 0;		/* success */
> +}
> +
> +/*
> + * sxps2_close() frees the interrupt.
> + */
> +static void sxps2_close(struct serio *pserio)
> +{
> +	struct xps2data *drvdata = pserio->port_data;
> +
> +	/* Disable the PS2 interrupts */
> +	out_be32(drvdata->base_address + XPS2_GIER_OFFSET, 0x00);
> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, 0x00);
> +	free_irq(drvdata->irq, drvdata);
> +}
> +
> +/*************************/
> +/* XPS PS/2 driver calls */
> +/*************************/
> +
> +/*
> + * xps2_initialize() initializes the Xilinx PS/2 device.
> + */
> +static int xps2_initialize(struct xps2data *drvdata)
> +{
> +	/* Disable all the interrupts just in case */
> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, 0);
> +
> +	/* Reset the PS2 device and abort any current transaction, to make sure
> +	 * we have the PS2 in a good state */
> +	out_be32(drvdata->base_address + XPS2_SRST_OFFSET, XPS2_SRST_RESET);
> +
> +	return 0;
> +}
> +
> +/*
> + * xps2_send() sends the specified byte of data to the PS/2 port in interrupt
> + * mode.
> + */
> +static u8 xps2_send(struct xps2data *drvdata, u8 *byte)
> +{
> +	u32 sr;
> +	u32 ier;
> +	u8 retval = 0;
> +
> +	/* Enter a critical region by disabling the PS/2 transmit interrupts to
> +	 * allow this call to stop a previous operation that may be interrupt
> +	 * driven. Only stop the transmit interrupt since this critical region
> +	 * is not really exited in the normal manner */
> +	ier = in_be32(drvdata->base_address + XPS2_IPIER_OFFSET);
> +	ier &= (~(XPS2_IPIXR_TX_ALL & XPS2_IPIXR_ALL ));
> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, ier);
> +
> +	/* If the PS/2 transmitter is empty send a byte of data */
> +	sr = in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
> +	if ((sr & XPS2_STATUS_TX_FULL) == 0) {
> +		out_be32(drvdata->base_address + XPS2_TX_DATA_OFFSET, *byte);
> +		retval = 1;
> +	}
> +
> +	/* Enable the TX interrupts to track the status of the transmission */
> +	ier = in_be32(drvdata->base_address + XPS2_IPIER_OFFSET);
> +	ier |= ((XPS2_IPIXR_TX_ALL | XPS2_IPIXR_WDT_TOUT ));
> +	out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, ier);
> +
> +	return retval;		/* no. of bytes sent */
> +}
> +
> +/*
> + * xps2_recv() will attempt to receive a byte of data from the PS/2 port.
> + */
> +static u8 xps2_recv(struct xps2data *drvdata, u8 *byte)
> +{
> +	u32 sr;
> +	u8 retval = 0;
> +
> +	/* If there is data available in the PS/2 receiver, read it */
> +	sr = in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
> +	if (sr & XPS2_STATUS_RX_FULL) {
> +		*byte = in_be32(drvdata->base_address + XPS2_RX_DATA_OFFSET);
> +		retval = 1;
> +	}
> +
> +	return retval;		/* no. of bytes received */
> +}

Since xps2_recv() and xps2_send() are used by the sxps2_* routines and
by the irq handler, they should be moved to about them in this file.

> +
> +/******************************/
> +/* The platform device driver */
> +/******************************/
You can drop the platform driver bindings for inclusion in mainline.

<snip>

> +static struct device_driver xps2_driver = {
> +	.name = DRIVER_NAME,
> +	.bus = &platform_bus_type,
> +	.probe = xps2_probe,
> +	.remove = xps2_remove
> +};

This is platform bus stuff that will disappear anyway, but I'm going to
make a comment here regardless.  When registering a platform bus device
driver, you should use 'struct platform_driver' instead of 'struct
device_driver', and it should be registered with
platform_driver_register().

> new file mode 100644
> index 0000000..4db73ca
> --- /dev/null
> +++ b/drivers/input/serio/xilinx_ps2.h
> @@ -0,0 +1,97 @@
> +/*****************************************************************************
> + *
> + *     Author: Xilinx, Inc.
> + *
> + *     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.
> + *
> + *     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
> + *     AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
> + *     SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
> + *     OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
> + *     APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
> + *     THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
> + *     AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
> + *     FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
> + *     WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
> + *     IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
> + *     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
> + *     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> + *     FOR A PARTICULAR PURPOSE.

Please drop this.

<snip>
> +
> +static u8 xps2_send(struct xps2data *drvdata, u8 *buffer_ptr);
> +static u8 xps2_recv(struct xps2data *drvdata, u8 *buffer_ptr);
> +static int xps2_initialize(struct xps2data *drvdata);
> +static int xps2_setup(struct device *dev, int id, struct resource *regs_res,
> +		      struct resource *irq_res);

These can be removed by reorganizing the .c file so that callees are
always above the caller.

Nice driver.

Cheers,
g.

^ permalink raw reply

* Re: MPC83xx ipic problem
From: André Schwarz @ 2008-06-30 17:14 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Scott Wood, linux-ppc list
In-Reply-To: <7dd3673e01cb808007902b12a63d0399@kernel.crashing.org>

Segher,

actually I'm the hardware designer ... :-) .... having trouble with=20
software.

The outputs are open-drain and can be connected (wired-or) together.
Otherwise "shared irq" wouldn't be possible that easy.


cheers,
Andr=E9




Segher Boessenkool wrote:
>> interrupt-map =3D <0x5800 0 0 1 &ipic 0x30 0x8      -> FPGA @ IRQ0
>>                  0x6000 0 0 1 &ipic 0x11 0x8      -> miniPCI INTA @ IR=
Q1
>>                  0x6000 0 0 2 &ipic 0x11 0x8>;    -> miniPCI INTB @ IR=
Q1
>>
>> Is it legal to use a single irq pin twice ?
>
> The device tree simply describes the hardware; if the hardware
> connects both INTXs to the same IPIC interrupt pin, then it is
> correct.  You'll have to ask a hardware designer whether it is
> okay to just tie the two lines together; I believe it is, for
> PCI, but you better ask someone who really knows :-)
>
>
> Segher
>


MATRIX VISION GmbH, Talstra=DFe 16, DE-71570 Oppenweiler  - Registergeric=
ht: Amtsgericht Stuttgart, HRB 271090
Gesch=E4ftsf=FChrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

^ permalink raw reply

* Re: [PATCH v2] update crypto node definition and device tree instances
From: Segher Boessenkool @ 2008-06-30 16:55 UTC (permalink / raw)
  To: Kim Phillips; +Cc: linuxppc-dev
In-Reply-To: <20080630110410.7ee097ed.kim.phillips@freescale.com>

>> Also, these made-up names make you do more work: you'll need to
>
> who said they were made up?

I did.  These names do not refer to some physical part you can buy.

>> write up a binding for them, explaining exactly what a 1.0 device
>> etc. is (or at least point to documentation for it).  If you use
>> a name that refers to some device that people can easily google
>> for documentation, you can skip this (well, you might need to
>> write a binding anyway; but at least you won't have to explain
>> what the device _is_).
>
> documentation is available in the usual places, and it specifically
> points out which SEC version it references.

I can't find a manual online for "freescale sec"; googling
for "freescale sec-1.0" finds a manual for the PowerQUICC I;
is that the right one?  I don't know, so the binding needs
to explain it to me.

Going from SoC name -> SEC version is easy, but the other way around
not so.

Anyway, minor stuff.

> Plus, as I mentioned
> before, a lot of the differences between the SEC versions are miniscule
> feature bits scattered across the programming model.

I don't see how this is relevant, sorry.

>> Using actual model names also reduces the namespace pollution
>> (hopefully Freescale will not create some other MPC8272 device
>> ever, so "fsl,mpc8272-whatever" will never be a nice name to
>> use for any other device; OTOH, it's likely that Freescale will
>> create some other device called "SEC" (there are only so many
>> TLAs, after all), so "fsl,sec-n.m" isn't as future-proof.
>
> I doubt that; the SEC has been around for about a decade now and that
> hasn't happened.

You'll have to admit a three-letter acronym is a bigger namespace
squatter than a nice long name is.  But it's your namespace, I don't
care.

i tried googling for "freescale sec" to find any other devices called
SEC, but that didn't work out.  What is "insider trading"?  ;-)


Segher

^ 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