public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger•com>
To: Grant Likely <grant.likely@secretlab•ca>
Cc: Sergei Poselenov <sposelenov@emcraft•com>,
	devicetree-discuss@ozlabs•org, Ilya Yanok <yanok@emcraft•com>,
	Dmitry Rakhchev <rda@emcraft•com>,
	linuxppc-dev@ozlabs•org, Anatolij Gustschin <agust@denx•de>
Subject: Re: [PATCH 3/8] powerpc/85xx: Add support for the "socrates" board (MPC8544).
Date: Tue, 31 Mar 2009 21:20:27 +0200	[thread overview]
Message-ID: <49D26CFB.3070502@grandegger.com> (raw)
In-Reply-To: <fa686aa40903310857w57b9d020i71d56f33ede4e875@mail.gmail.com>

Hi Grant,

Grant Likely wrote:
> On Tue, Mar 31, 2009 at 6:37 AM, Wolfgang Grandegger <wg@grandegger•com> wrote:
>> Supported are Ethernet, serial console, I2C, I2C-based RTC and
>> temperature sensors, NOR and NAND flash, PCI, USB, CAN and Lime
>> display controller.
>>
>> The multiplexing of FPGA interrupts onto PowerPC interrupt lines is
>> supported through our own fpga_pic interrupt controller driver.
>>
>> For example the SJA1000 controller is level low sensitive connected to
>> fpga_pic line 2 and is routed to the second (of three) irq lines to
>> the CPU:
>>
>>    can@3,100 {
>>            compatible = "philips,sja1000";
>>            reg = <3 0x100 0x80>;
>>            interrupts = <2 2>;
>>            interrupts = <2 8 1>;   // number, type, routing
>>            interrupt-parent = <&fpga_pic>;
>>    };
>>
>> Signed-off-by: Sergei Poselenov <sposelenov@emcraft•com>
>> Signed-off-by: Yuri Tikhonov <yur@emcraft•com>
>> Signed-off-by: Ilya Yanok <yanok@emcraft•com>
>> Signed-off-by: Wolfgang Grandegger <wg@grandegger•com>
>> Signed-off-by: Anatolij Gustschin <agust@denx•de>
>> Signed-off-by: Dmitry Rakhchev <rda@emcraft•com>
>> ---
>>  arch/powerpc/boot/dts/socrates.dts              |  338 +++++
>>  arch/powerpc/configs/85xx/socrates_defconfig    | 1410 ++++++++++++++++++++++++
> 
> I always ask this question: Do you really need a board specific
> defconfig file?  We are multiplatform now.
> 
>>  arch/powerpc/platforms/85xx/Kconfig             |    6
>>  arch/powerpc/platforms/85xx/Makefile            |    1
>>  arch/powerpc/platforms/85xx/socrates.c          |  133 ++
>>  arch/powerpc/platforms/85xx/socrates_fpga_pic.c |  327 +++++
>>  arch/powerpc/platforms/85xx/socrates_fpga_pic.h |   16
> 
> socrates_fpga_pic is only ever going to be used by socrates.c.  I'd
> roll the two socrates.c files into one and eliminate the header file.
> 
>> Index: linux-2.6/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
>> ===================================================================
>> --- /dev/null
>> +++ linux-2.6/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
> [...]
>> +struct socrates_fpga_irq_info {
>> +       unsigned int irq_line;
>> +       int type;
>> +};
>> +
>> +/*
>> + * Interrupt routing and type table
>> + *
>> + * IRQ_TYPE_NONE means the interrupt type is configurable,
>> + * otherwise it's fixed to the specified value.
>> + */
>> +static struct socrates_fpga_irq_info fpga_irqs[SOCRATES_FPGA_NUM_IRQS] = {
>> +       [0] = {0, IRQ_TYPE_NONE},
>> +       [1] = {0, IRQ_TYPE_LEVEL_HIGH},
>> +       [2] = {0, IRQ_TYPE_LEVEL_LOW},
>> +       [3] = {0, IRQ_TYPE_NONE},
>> +       [4] = {0, IRQ_TYPE_NONE},
>> +       [5] = {0, IRQ_TYPE_NONE},
>> +       [6] = {0, IRQ_TYPE_NONE},
>> +       [7] = {0, IRQ_TYPE_NONE},
>> +       [8] = {0, IRQ_TYPE_LEVEL_HIGH},
>> +};
> 
> It is good practice to use named elements in initializers: {.type =
> IRQ_TYPE_LEVEL_HIGH},
> 
> Static variables are initialized to zero.  Everything that is 0 can be
> dropped from this initializer (lines 0 and 3-7, and the irq_line
> field).

Right, missed that.

This is one of the patches I sent accidentally. I think Kumar already
applied it to his tree.

Sorry for the noise.

Wolfgang.

  reply	other threads:[~2009-03-31 19:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 12:37 [PATCH 0/8] powerpc: i2c-mpc: make I2C bus speed configurable Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 1/8] [PATCH 3/4] powerpc/85xx: Move gianfar mdio nodes under the Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 2/8] [PATCH 01/28] RTC: Add support for RX8025 chip Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 3/8] powerpc/85xx: Add support for the "socrates" board (MPC8544) Wolfgang Grandegger
2009-03-31 15:57   ` Grant Likely
2009-03-31 19:20     ` Wolfgang Grandegger [this message]
2009-03-31 12:37 ` [PATCH 4/8] powerpc: i2c-mpc: preserve I2C clocking Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 5/8] powerpc: i2c-mpc: make I2C bus speed configurable Wolfgang Grandegger
2009-03-31 15:41   ` Grant Likely
2009-04-01  7:51     ` Wolfgang Grandegger
2009-04-01 13:30       ` Grant Likely
2009-04-01 13:41         ` Wolfgang Grandegger
2009-04-01 13:55           ` Wolfgang Grandegger
2009-04-01 13:55           ` Grant Likely
2009-04-02  6:55             ` Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 6/8] --- arch/powerpc/boot/dts/socrates.dts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Wolfgang Grandegger
2009-03-31 23:04   ` David Gibson
2009-04-01  7:31     ` Wolfgang Grandegger
2009-04-01 11:09       ` David Gibson
2009-04-01 11:59         ` Wolfgang Grandegger
2009-04-01 23:57           ` David Gibson
2009-04-01 12:30         ` Anton Vorontsov
2009-04-01 23:58           ` David Gibson
2009-03-31 12:37 ` [PATCH 7/8] Re: [PATCH 1/2] NAND: Add support for oob size 128 Wolfgang Grandegger
2009-03-31 12:37 ` [PATCH 8/8] NAND: Add support for NAND on the Socrates board Wolfgang Grandegger
2009-03-31 12:49 ` [PATCH 0/8] powerpc: i2c-mpc: make I2C bus speed configurable Wolfgang Grandegger
2009-03-31 16:23   ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D26CFB.3070502@grandegger.com \
    --to=wg@grandegger$(echo .)com \
    --cc=agust@denx$(echo .)de \
    --cc=devicetree-discuss@ozlabs$(echo .)org \
    --cc=grant.likely@secretlab$(echo .)ca \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=rda@emcraft$(echo .)com \
    --cc=sposelenov@emcraft$(echo .)com \
    --cc=yanok@emcraft$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox