linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] mxc: Add support for the imx51 3-stack board
Date: Wed, 2 Jun 2010 19:23:34 +0200	[thread overview]
Message-ID: <20100602172334.GS26820@pengutronix.de> (raw)
In-Reply-To: <002e01cb025f$b3daf110$9b00a8c0@wuef10f27ebed8>

On Wed, Jun 02, 2010 at 10:27:03PM +0800, jason wang wrote:
> 
> 
> > Hi Jason,
> > 
> > On Tue, Jun 01, 2010 at 11:10:41PM +0800, Jason Wang wrote:
> >> 3-stack is a reference board from Freescale for their i.MX51 SoC.
> >> 
> >> Add board definition, Kconfig and Makefile to enable Freescale 3-stack
> >> board.
> > 
> > The debug board code looks the same like in mach-mx31_3ds.c. Does
> > anybody know how similar the different debug boards for the 3ds boards
> > are? ATM we only have the mx31_3ds with debug board support in the
> > kernel. This could be the moment to go for a arch/arm/plat-mxc/3ds-debugboard.c
> > 
> Besides mx31_3ds and mx51_3ds, the mx31_ads and mx27_ads also have the similar CPLD expanding device.
> They have similar functions but different CPLD image version. That is to say, except base_addr and parent_irq_pin,
> the CPLD implemented device controller(like uart and interrupt controller) will be a little bit different.
> I think the software for this part could be moved to a common file like plat-mxc/mxc-debugboard.c
> 
> Because this is a big action, it will affect some exsiting platforms. How about leave this work to next
> action?
> 
> Thanks,
> Jason.
> > Several other comments inline.
> > 
> Except following 1 comment, all others will be addressed in V2.
> 
> <snip>
> >> 
> >> Boot tested on a i.MX51 3-stack Rev2.0 board
> >> + __raw_writew(0xFFFF, brd_io + INTR_RESET_REG);
> >> + __raw_writew(0, brd_io + INTR_RESET_REG);
> >> + __raw_writew(0x1F, brd_io + INTR_MASK_REG);
> >> + for (i = MXC_BOARD_IRQ_START;
> >> +      i < (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS); i++) {
> > 
> > MXC_BOARD_IRQS is the maximum number of interrupts available for the
> > board. What you need here instead is the number of interrupts the expio
> > actually has.
> > 
> It seems MXC_BOARD_IRQS is the number of CPLD expanding irq(or debugboard expanding irq).

Not exactly. See mach/irqs.h:

/*
 * The next 16 interrupts are for board specific purposes.  Since
 * the kernel can only run on one machine at a time, we can re-use
 * these.  If you need more, increase MXC_BOARD_IRQS, but keep it
 * within sensible limits.
 */
#define MXC_BOARD_IRQ_START     (MXC_INTERNAL_IRQS + MXC_GPIO_IRQS)

#ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
#define MXC_BOARD_IRQS  80
#else
#define MXC_BOARD_IRQS  16
#endif


Remember that we can compile the kernel for more than one board at a
time. So if MACH_MX31ADS_WM1133_EV1 is compiled in we will have 60 board
irqs. Ok, you will hardly compile a kernel for mx31ads and mx51, but
there could well come a mx51 board with more irqs in which case your
expio handler goes nuts.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2010-06-02 17:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 15:10 [PATCH 0/3]Add i.MX51 3-stack board support Jason Wang
2010-06-01 15:10 ` [PATCH 1/3] mxc: Add support for the imx51 3-stack board Jason Wang
2010-06-01 15:10   ` [PATCH 2/3] mxc/iomux: add GPIO bank offset for iomux v3 platforms Jason Wang
2010-06-01 15:10     ` [PATCH 3/3] mx51/clock: add keypad clock definition and registration Jason Wang
2010-06-01 15:56       ` Fabio Estevam
2010-06-02 13:55         ` jason wang
2010-06-02  7:43       ` Sascha Hauer
2010-06-02 14:28         ` [PATCH 3/3] mx51/clock: add keypad clock definition andregistration jason wang
2010-06-02  8:00       ` [PATCH 3/3] mx51/clock: add keypad clock definition and registration Amit Kucheria
2010-06-02 14:29         ` jason wang
2010-06-01 15:35   ` [PATCH 1/3] mxc: Add support for the imx51 3-stack board Fabio Estevam
2010-06-02 13:53     ` jason wang
2010-06-02  7:36   ` Sascha Hauer
2010-06-02 13:08     ` Rob Herring
2010-06-02 14:27     ` jason wang
2010-06-02 17:23       ` Sascha Hauer [this message]
2010-06-03  0:01         ` jason
2010-06-02  8:38   ` Amit Kucheria
2010-06-02  8:52     ` Sascha Hauer
2010-06-02 14:36     ` jason wang

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=20100602172334.GS26820@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).