All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: SPEAr600: Add device-tree support to SPEAr600 boards
Date: Wed, 21 Mar 2012 14:42:50 +0000	[thread overview]
Message-ID: <201203211442.50683.arnd@arndb.de> (raw)
In-Reply-To: <CAOh2x=mtjvitkhz=BXOZPAaKZ2i3QQuKrYA3HcHNERHhF5xFoA@mail.gmail.com>

On Wednesday 21 March 2012, viresh kumar wrote:
> On Wed, Mar 21, 2012 at 7:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Wednesday 21 March 2012, viresh kumar wrote:
> >> - Pinmux: I would remove our padmux and use pinmux, but what about its
> >> DT support.
> >>   I know stephen had few patches for it, but don't know there
> >> progress. I don't want to
> >>   do stuff twice. First add support for it in board and the *.dts files.
> >
> > AFAICT, the pinmux DT binding should be ready for v3.5, I don't think it
> > made it into v3.4.
> 
> So, i can add stuff in board file for pinmux for now?

Probably yes. It depends on the scale though: if you add more code than
what is needed to convert to the pinctrl framework, we might decide that
it's not worth it.

Note that moving to the pinctrl subsystem can be done independent from
doing the device tree conversion, and it does not depend on the
pinctrl dt binding even if you already have DT support.

> > I've looked at this earlier today out of curiosity and found:
> >
> > clock.c: almost identical, can be easily merged, or both copies
> >         kept around during transition.
> 
> Would make it very confusing if we merge these two. Some clock
> structures are same, but others are not. Mostly differences are in the
> macros (or bit positions in registers), rather than hierarchy. So, i would
> like to keep them separate. But still have a look again to see if they can
> really be merged.

Ok, I see.

> > misc_regs.h: can be merged into clock.c
> 
> it has more than clock stuff. it is used in pinmux and some other places too,
> that may not be in mainline for now.

Right, I was only looking at the stuff that is actually being used in mainline.
However I think this file should not be needed at all -- any contents that
are specific to one driver can just live in that driver, and stuff that is
shared across multiple drivers generally looks like it is also shared between
3xx and 6xx.

> > Once you have taken care of these, files, you can enable building 3xx
> > and 6xx together, and move the contents of mach-spear3xx, mach-spear6xx
> > and plat-spear into one directory.
> 
> plat-spear would be required for 13xx too. So, merging 3xx and 6xx only would
> be possible.

There is not all that much that can be shared here:

* clock.c would go into drivers/clk/ for spear13xx and possibly for the others
  too.
* padmux.c would go into drivers/pinctrl
* time.c would go into drivers/clocksource
* shirq.c is potentially shared, but we've discussed in the past about
  creating a new drivers/irqchip where this can live.
* restart.c is very small, there is no harm in duplicating this.
* The header files will have to go elsewhere, too, as we move towards
  have a single multiplatform zImage.

> > Ok, excellent. Note that there is no requirement to do it all in the order
> > you line out above. You can always get support for new stuff into the
> > existing platform without cleaning up all of it right away, as long as you
> > have a good balance between cleanups and new functionality.
> 
> Ya. I just wanted to get some hands on experience with this new stuff, before
> touching 13xx.

Good idea. As Stefan has shown, it's not really all that hard to get a lot
done for the older platforms, and spear13xx will likely be much harder
because of the increased hardware complexity.

> > In particular, you don't have to start using pinctrl and the common clk
> > immediately for spear3xx, although you might find that it helps you.
> 
> But, can i update padmux and clock framework of SPEAr platform? Because
> without the latest code for both padmux and clock, other code for SPEAr
> might not be that effective or usable.

Yes, you can do updates in there that are logical and keep the current
basic structure or improve it. I would only object if you do a more or
less complete rewrite of those files but don't use the common infrastructure
in the process.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: viresh kumar <viresh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Viresh Kumar <viresh.kumar-qxv4g6HH51o@public.gmane.org>,
	Stefan Roese <sr-ynQEQJNshbs@public.gmane.org>,
	spear-devel <spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org>,
	"devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org"
	<devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] ARM: SPEAr600: Add device-tree support to SPEAr600 boards
Date: Wed, 21 Mar 2012 14:42:50 +0000	[thread overview]
Message-ID: <201203211442.50683.arnd@arndb.de> (raw)
In-Reply-To: <CAOh2x=mtjvitkhz=BXOZPAaKZ2i3QQuKrYA3HcHNERHhF5xFoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Wednesday 21 March 2012, viresh kumar wrote:
> On Wed, Mar 21, 2012 at 7:34 PM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> > On Wednesday 21 March 2012, viresh kumar wrote:
> >> - Pinmux: I would remove our padmux and use pinmux, but what about its
> >> DT support.
> >>   I know stephen had few patches for it, but don't know there
> >> progress. I don't want to
> >>   do stuff twice. First add support for it in board and the *.dts files.
> >
> > AFAICT, the pinmux DT binding should be ready for v3.5, I don't think it
> > made it into v3.4.
> 
> So, i can add stuff in board file for pinmux for now?

Probably yes. It depends on the scale though: if you add more code than
what is needed to convert to the pinctrl framework, we might decide that
it's not worth it.

Note that moving to the pinctrl subsystem can be done independent from
doing the device tree conversion, and it does not depend on the
pinctrl dt binding even if you already have DT support.

> > I've looked at this earlier today out of curiosity and found:
> >
> > clock.c: almost identical, can be easily merged, or both copies
> >         kept around during transition.
> 
> Would make it very confusing if we merge these two. Some clock
> structures are same, but others are not. Mostly differences are in the
> macros (or bit positions in registers), rather than hierarchy. So, i would
> like to keep them separate. But still have a look again to see if they can
> really be merged.

Ok, I see.

> > misc_regs.h: can be merged into clock.c
> 
> it has more than clock stuff. it is used in pinmux and some other places too,
> that may not be in mainline for now.

Right, I was only looking at the stuff that is actually being used in mainline.
However I think this file should not be needed at all -- any contents that
are specific to one driver can just live in that driver, and stuff that is
shared across multiple drivers generally looks like it is also shared between
3xx and 6xx.

> > Once you have taken care of these, files, you can enable building 3xx
> > and 6xx together, and move the contents of mach-spear3xx, mach-spear6xx
> > and plat-spear into one directory.
> 
> plat-spear would be required for 13xx too. So, merging 3xx and 6xx only would
> be possible.

There is not all that much that can be shared here:

* clock.c would go into drivers/clk/ for spear13xx and possibly for the others
  too.
* padmux.c would go into drivers/pinctrl
* time.c would go into drivers/clocksource
* shirq.c is potentially shared, but we've discussed in the past about
  creating a new drivers/irqchip where this can live.
* restart.c is very small, there is no harm in duplicating this.
* The header files will have to go elsewhere, too, as we move towards
  have a single multiplatform zImage.

> > Ok, excellent. Note that there is no requirement to do it all in the order
> > you line out above. You can always get support for new stuff into the
> > existing platform without cleaning up all of it right away, as long as you
> > have a good balance between cleanups and new functionality.
> 
> Ya. I just wanted to get some hands on experience with this new stuff, before
> touching 13xx.

Good idea. As Stefan has shown, it's not really all that hard to get a lot
done for the older platforms, and spear13xx will likely be much harder
because of the increased hardware complexity.

> > In particular, you don't have to start using pinctrl and the common clk
> > immediately for spear3xx, although you might find that it helps you.
> 
> But, can i update padmux and clock framework of SPEAr platform? Because
> without the latest code for both padmux and clock, other code for SPEAr
> might not be that effective or usable.

Yes, you can do updates in there that are logical and keep the current
basic structure or improve it. I would only object if you do a more or
less complete rewrite of those files but don't use the common infrastructure
in the process.

	Arnd

  reply	other threads:[~2012-03-21 14:42 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 14:47 [PATCH] ARM: SPEAr600: Add device-tree support to SPEAr600 boards Stefan Roese
2012-03-13 14:47 ` Stefan Roese
2012-03-13 16:44 ` Arnd Bergmann
2012-03-13 16:44   ` Arnd Bergmann
2012-03-14  7:08   ` Viresh Kumar
2012-03-14  7:08     ` Viresh Kumar
2012-03-14  9:58     ` Arnd Bergmann
2012-03-14  9:58       ` Arnd Bergmann
2012-03-14 10:02       ` Viresh Kumar
2012-03-14 10:02         ` Viresh Kumar
2012-03-14  7:40   ` Stefan Roese
2012-03-14  7:40     ` Stefan Roese
2012-03-14  9:48     ` Arnd Bergmann
2012-03-14  9:48       ` Arnd Bergmann
2012-03-14 10:36       ` Stefan Roese
2012-03-14 10:36         ` Stefan Roese
2012-03-14 13:27         ` Arnd Bergmann
2012-03-14 13:27           ` Arnd Bergmann
2012-03-14 13:43           ` Stefan Roese
2012-03-14 13:43             ` Stefan Roese
2012-03-14 14:09             ` Arnd Bergmann
2012-03-14 14:09               ` Arnd Bergmann
2012-03-14 13:44           ` Rob Herring
2012-03-14 13:44             ` Rob Herring
2012-03-14  7:05 ` Viresh Kumar
2012-03-14  7:05   ` Viresh Kumar
2012-03-14  7:20   ` Stefan Roese
2012-03-14  7:20     ` Stefan Roese
2012-03-15  8:48   ` Stefan Roese
2012-03-15  8:48     ` Stefan Roese
2012-03-15  9:00     ` Viresh Kumar
2012-03-15  9:00       ` Viresh Kumar
2012-03-15 10:38       ` Stefan Roese
2012-03-15 10:38         ` Stefan Roese
2012-03-15 10:40         ` Viresh Kumar
2012-03-15 10:40           ` Viresh Kumar
2012-03-15 13:39         ` Arnd Bergmann
2012-03-15 13:39           ` Arnd Bergmann
2012-03-21 11:32           ` Viresh Kumar
2012-03-21 11:32             ` Viresh Kumar
2012-03-21 12:36             ` Arnd Bergmann
2012-03-21 12:36               ` Arnd Bergmann
2012-03-21 13:28               ` viresh kumar
2012-03-21 13:28                 ` viresh kumar
2012-03-21 14:04                 ` Arnd Bergmann
2012-03-21 14:04                   ` Arnd Bergmann
2012-03-21 14:18                   ` viresh kumar
2012-03-21 14:18                     ` viresh kumar
2012-03-21 14:42                     ` Arnd Bergmann [this message]
2012-03-21 14:42                       ` Arnd Bergmann
2012-03-21 18:26                   ` Arnd Bergmann
2012-03-21 18:26                     ` Arnd Bergmann
2012-03-22  0:45                     ` viresh kumar
2012-03-22  0:45                       ` viresh kumar
2012-03-22  8:10                       ` Arnd Bergmann
2012-03-22  8:10                         ` Arnd Bergmann
     [not found]                         ` <201203220810.00628.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-22  8:51                           ` viresh kumar
     [not found]               ` <201203211236.37891.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-22 13:46                 ` viresh kumar
2012-03-22 14:20                   ` Arnd Bergmann
2012-03-22 14:20                     ` Arnd Bergmann
     [not found]                     ` <201203221420.10127.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-22 14:53                       ` viresh kumar
2012-03-27 10:27                     ` Viresh Kumar
2012-03-27 10:27                       ` Viresh Kumar
2012-03-27 11:15                       ` Arnd Bergmann
2012-03-27 11:15                         ` Arnd Bergmann
2012-03-27 11:27                         ` Viresh Kumar
2012-03-27 11:27                           ` Viresh Kumar
2012-03-27 11:45                           ` Viresh Kumar
2012-03-27 11:45                             ` Viresh Kumar
2012-03-27 11:59                           ` Arnd Bergmann
2012-03-27 11:59                             ` Arnd Bergmann
     [not found]                             ` <201203271159.35306.arnd-r2nGTMty4D4@public.gmane.org>
2012-03-27 13:44                               ` viresh kumar
2012-03-27 13:59                                 ` Arnd Bergmann
2012-03-27 13:59                                   ` Arnd Bergmann
2012-03-28  5:03                                   ` Viresh Kumar
2012-03-28  5:03                                     ` Viresh Kumar
2012-03-28  8:13                                     ` Arnd Bergmann
2012-03-28  8:13                                       ` Arnd Bergmann
2012-03-14  8:48 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14  8:48   ` Jean-Christophe PLAGNIOL-VILLARD

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=201203211442.50683.arnd@arndb.de \
    --to=arnd@arndb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.