[PATCH][v2] powerpc/85xx:Add BSC9131 RDB Support

Kumar Gala galak at kernel.crashing.org
Thu Mar 22 04:38:26 EST 2012


On Mar 21, 2012, at 12:29 PM, Kushwaha Prabhakar-B32579 wrote:

>> 
>> 
>> [snip]
>> 
> 
> ??
> Not getting you..

Just meant, I was removing parts of the patch in the email to reduce things.

> 
>>> diff --git a/arch/powerpc/platforms/85xx/bsc913x_rdb.c
>>> b/arch/powerpc/platforms/85xx/bsc913x_rdb.c
>>> new file mode 100644
>>> index 0000000..611c289
>>> --- /dev/null
>>> +++ b/arch/powerpc/platforms/85xx/bsc913x_rdb.c
>>> @@ -0,0 +1,95 @@
>>> +/*
>>> + * BSC913xRDB Board Setup
>>> + *
>>> + * Author: Priyanka Jain <Priyanka.Jain at freescale.com>
>>> + *
>>> + * Copyright 2011-2012 Freescale Semiconductor 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.
>>> + */
>>> +
>>> +#include <linux/of_platform.h>
>>> +#include <linux/pci.h>
>>> +#include <asm/mpic.h>
>>> +#include <sysdev/fsl_soc.h>
>>> +#include <asm/udbg.h>
>>> +
>>> +void __init bsc913x_rdb_pic_init(void) {
>>> +	struct mpic *mpic;
>>> +	struct resource r;
>>> +	struct device_node *np;
>>> +
>>> +	np = of_find_node_by_type(NULL, "open-pic");
>>> +	if (!np) {
>>> +		pr_err("bsc913x: Could not find open-pic node\n");
>>> +		return;
>>> +	}
>>> +
>>> +	if (of_address_to_resource(np, 0, &r)) {
>>> +		pr_err("bsc913x: Failed to map mpic register space\n");
>>> +		of_node_put(np);
>>> +		return;
>>> +	}
>>> +
>>> +	mpic = mpic_alloc(np, r.start, MPIC_WANTS_RESET |
>>> +	  MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU,
>>> +	  0, 256, " OpenPIC  ");
>>> +
>>> +	of_node_put(np);
>>> +
>>> +	if (!mpic)
>>> +		pr_err("bsc913x: Failed to allocate MPIC structure\n");
>>> +	else
>>> +		mpic_init(mpic);
>>> +}
>>> +
>> 
>> This code is still out of date w/other board ports.  Have you tried
>> building this against upstream??
>> 
> 
> I build with powerpc.git. 
> do you mean build with upstream code base ??
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> 

I mean if you use my 'next' branch of galak/powerpc.git and apply this patch, and enable it.  For example MPIC_BROKEN_FRR_NIRQS doesn't exist anymore

- k




More information about the devicetree-discuss mailing list