[PATCH 1/4] sbc8560: add basic support for Wind River SBC8560 as powerpc

Stephen Rothwell sfr at canb.auug.org.au
Fri Dec 21 10:14:25 EST 2007


Hi Paul,

Just a couple of comments.

On Thu, 20 Dec 2007 09:54:29 -0500 Paul Gortmaker <paul.gortmaker at windriver.com> wrote:
>
> +++ b/arch/powerpc/platforms/85xx/sbc8560.c
> +static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
> +{
> +	int cascade_irq;
> +
> +	while ((cascade_irq = cpm2_get_irq()) >= 0) {
> +		generic_handle_irq(cascade_irq);
> +	}

The braces are unnecessary.

> +static void __init sbc8560_pic_init(void)
> +{
> +	struct mpic *mpic;
> +	struct resource r;
> +	struct device_node *np = NULL;
> +#ifdef CONFIG_CPM2
> +	int irq;
> +#endif
> +
> +	np = of_find_node_by_type(np, "open-pic");
> +
> +	if (np == NULL) {

We often say "if (!np)" and leave out the blank line above.

> +	if(of_address_to_resource(np, 0, &r)) {
          ^
Put a space here.

> +#ifdef CONFIG_CPM2
> +	/* Setup CPM2 PIC */
> +	np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
> +	if (np == NULL) {
> +		printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
> +		return;
> +	}
> +	irq = irq_of_parse_and_map(np, 0);
> +
> +	cpm2_pic_init(np);

Need an of_node_pit(np) - cpm2_pic_init() does its own of_node_get.

> +static struct cpm_pin sbc8560_pins[] = {

const?

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071221/97666f24/attachment.pgp>


More information about the Linuxppc-dev mailing list