linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/1] ARM: imx5x: clean up ARCH_MX5X
Date: Wed, 2 Mar 2011 17:33:26 +0100	[thread overview]
Message-ID: <20110302163326.GG22310@pengutronix.de> (raw)
In-Reply-To: <20110302160605.GA2994@richard-laptop>

On Thu, Mar 03, 2011 at 12:06:05AM +0800, Richard Zhao wrote:
> Hi Uwe,
> 
> Thanks for your detailed explanation!
> On Wed, Mar 02, 2011 at 12:25:59PM +0100, Uwe Kleine-K?nig wrote:
> > Hello Richard,
> > 
> > On Wed, Mar 02, 2011 at 11:28:46AM +0800, Richard Zhao wrote:
> > > Remove legacy support of ARCH_MX5X. Move to SOC_SOC_IMX5X.
> > > 
> > > My understanding is ARCH_MX5 selects Kconfig in arch/arm/mach-mx5,
> > > and every board can be selected/unselected, and SOC_XXX be selected
> > > by the board config. MACH_XXXX/SOC_XXXX then select those HAVE_XXXX.
> > My intended goal with these ARCH_MX.., MACH_MX.. and SOC_IMX.. symbols is:
> > 
> >  - ARCH_MX.. should be only a helper to group all machines together that
> >    can be built in a single image. In the far future it hopefully dies
> >    because we can compile everything together. These IMHO should not be
> >    used in Makefiles or source files at all as the grouping can change
> >    over time. I'm not sure the name ARCH_MX.. is that good. Didn't think
> >    about a better naming scheme, so if you have suggestions don't
> >    hesitate to tell them.
> Would it make sense to go straight forward? 
> ARCH_MX.. for SoC series. eg. ARCH_MX1/2/3/5. It groups SoCs.
This doesn't work. Where do you want to put i.MX25? Conceptually the
easy groups are { i.MX21, i.MX27 } and { i.MX25, i.MX31, i.MX35 }
because these share PHYS_OFFSETs. And note that i.MX31 has a different
iomuxer than i.MX25 and i.MX35. As soon as we have support for runtime
PHYS_OFFSET the remaining groups are:

	ARMv4 + ARMv5 vs. ARMv6 + ARMv7

(I think) which doesn't match the ARCH_MX1/2/3/5 approach anymore.

> SOC_IMX.. for single SoC. eg. SOC_IMX31/35/50/51/53. It groups Machines.
> MACH_.. for single machine. eg. MACH_MX51_BABBAGE.
> 
> They can be used in Makefiles to help include source files, but idealy not be
> used in source files. For multi-soc in single image, it's more easy to select
> build targets. It can also help transit to single image step by step.
Here I'd prefer things like:

	config SOC_IMX21
		bool
		select IMX_HAVE_IOMUX_V1

	obj-$(IMX_HAVE_IOMUX_V1) += tralala.o

> >  - MACH_MX.. actually are misnomers becauce they clash with the name
> >    space of the machine db. So they should be substituted by SOC_IMX...
> >    (maybe a few by ARCH_MX..)  (affected: MACH_MX21 and MACH_MX27)
> >  - SOC_IMX.. are used to differentiate between SoCs.
> > 
> > So a goal is to review all ARCH_MX.. and MACH_MX.. used in .c and .h
> > files and try to use the SOC_IMX variables instead.
> > Here I consider important that SOC_IMX... is really only used with
> > having multi-SoC-kernels in mind. So you can consider ARCH_MX and
> > MACH_MX as todo-markers for that (and this is the main difference IMHO).
> > E.g. the Makefile.boots are such a place that are not multi-soc capable
> > yet as is the selection of PHYS_OFFSET. I'd like to keep them marked
> > somehow.
> The ToDO markers might label itself as markers, Or it cause many people
> confused.
I don't know what you mean here.

> And are you sure we won't need ARCH_MX.. in the final single image solution?
> IMHO, single image needs to select what targetis it builds for too. The ARCH_MX..
> works as categories and help reduce image size. 
Again, I don't understand you here.

> > I don't know if it's sensible to coordinate this effort, it mainly
> > depends on how many people are willing to help. I'll start with ARCH_MX2
> > and MACH_MX2[17] next.
> > 
> > A bit orthogonal to this issue is to clean up mach-mx3 and mach-mx5 to
> > allow them to be merged into mach-imx. I didn't look at all on mxc91231,
> > yet.
> > 
> > Comments and patches are welcome. If you want to help and don't know
> > where to start, here are a few hints:
> > 
> >  - git grep -E 'M?AR?CH_MX' drivers
> >  - convert arch/arm/mach-mx[35]/devices.c to dynamically allocation
> > 
> > Richard, having said that, some of your changes look OK, while I'm not
> > completely happy with the others.
> It seems only PHYS_OFFSET are not ok?
and Makefile.boot

>                                       Maybe the p2v patch can help?
Indeed.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-03-02 16:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02  3:28 [RFC PATCH 1/1] ARM: imx5x: clean up ARCH_MX5X Richard Zhao
2011-03-02  9:54 ` Shawn Guo
2011-03-02 11:25 ` Uwe Kleine-König
2011-03-02 16:06   ` Richard Zhao
2011-03-02 16:33     ` Uwe Kleine-König [this message]
2011-03-03  6:17       ` Richard Zhao
2011-03-02 17:23   ` [PATCH] ARM: imx: move selection between i.MX21 and i.MX27 to CPU family choice Uwe Kleine-König
2011-03-03  5:26     ` Richard Zhao
2011-03-03 10:02       ` Uwe Kleine-König
2011-03-03 12:11     ` Sascha Hauer
2011-03-03 16:25       ` Uwe Kleine-König
2011-03-03 18:00         ` Sascha Hauer
2011-03-03 20:10           ` Uwe Kleine-König
2011-03-04  8:19             ` Sascha Hauer
2011-03-04 10:11               ` Uwe Kleine-König
2011-03-04 21:20               ` Uwe Kleine-König
2011-03-04 22:28               ` Uwe Kleine-König

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=20110302163326.GG22310@pengutronix.de \
    --to=u.kleine-koenig@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).