* mpc5200b custom board upstreamable? @ 2008-04-24 15:12 Sascha Hauer 2008-04-24 15:13 ` Grant Likely 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2008-04-24 15:12 UTC (permalink / raw) To: linuxppc-dev Hi all, I had the intention to push the code for a custom mpc5200b board (freely available, no internal project) upstream. After cleaning up the code I realized that actually no board specific code is left and our board is well handled by the mpc5200_simple_platform machine. The only issue is that the machine only matches things like "schindler,cm5200", there's no generic entry. Would it be possible to add a "generic-mpc52xx" entry to this list? Another question: are defconfig and dts files for custom boards acceptable for upstream? Sascha -- Pengutronix e.K. - Linux Solutions for Science and Industry ----------------------------------------------------------- Kontakt-Informationen finden Sie im Header dieser Mail oder auf der Webseite -> http://www.pengutronix.de/impressum/ <- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mpc5200b custom board upstreamable? 2008-04-24 15:12 mpc5200b custom board upstreamable? Sascha Hauer @ 2008-04-24 15:13 ` Grant Likely 2008-04-24 15:53 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Grant Likely @ 2008-04-24 15:13 UTC (permalink / raw) To: Sascha Hauer; +Cc: linuxppc-dev On Thu, Apr 24, 2008 at 9:12 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > Hi all, > > I had the intention to push the code for a custom mpc5200b board (freely > available, no internal project) upstream. After cleaning up the code I > realized that actually no board specific code is left and our board is > well handled by the mpc5200_simple_platform machine. > > The only issue is that the machine only matches things like > "schindler,cm5200", there's no generic entry. Would it be possible to > add a "generic-mpc52xx" entry to this list? I'm being cautious about this for the time being. I'd like to have a generic match mechanism, but I don't want to do something that isn't easy to recover from if it turns out to be brain dead. For now, just add your board name to the explicit match list. > > Another question: are defconfig and dts files for custom boards acceptable > for upstream? Yes, in the arch/powerpc/configs/52xx/ directory. Cheers, g -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mpc5200b custom board upstreamable? 2008-04-24 15:13 ` Grant Likely @ 2008-04-24 15:53 ` Sascha Hauer 2008-04-24 16:07 ` Grant Likely 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2008-04-24 15:53 UTC (permalink / raw) To: Grant Likely; +Cc: linuxppc-dev On Thu, Apr 24, 2008 at 09:13:45AM -0600, Grant Likely wrote: > On Thu, Apr 24, 2008 at 9:12 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > > > Hi all, > > > > I had the intention to push the code for a custom mpc5200b board (freely > > available, no internal project) upstream. After cleaning up the code I > > realized that actually no board specific code is left and our board is > > well handled by the mpc5200_simple_platform machine. > > > > The only issue is that the machine only matches things like > > "schindler,cm5200", there's no generic entry. Would it be possible to > > add a "generic-mpc52xx" entry to this list? > > I'm being cautious about this for the time being. I'd like to have a > generic match mechanism, but I don't want to do something that isn't > easy to recover from if it turns out to be brain dead. For now, just > add your board name to the explicit match list. The board is called "generic". No, just kidding ;) > > > > > Another question: are defconfig and dts files for custom boards acceptable > > for upstream? > > Yes, in the arch/powerpc/configs/52xx/ directory. ok Sascha -- Pengutronix e.K. - Linux Solutions for Science and Industry ----------------------------------------------------------- Kontakt-Informationen finden Sie im Header dieser Mail oder auf der Webseite -> http://www.pengutronix.de/impressum/ <- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mpc5200b custom board upstreamable? 2008-04-24 15:53 ` Sascha Hauer @ 2008-04-24 16:07 ` Grant Likely 2008-04-24 16:28 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Grant Likely @ 2008-04-24 16:07 UTC (permalink / raw) To: Sascha Hauer; +Cc: Scott Wood, linuxppc-dev On Thu, Apr 24, 2008 at 9:53 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > On Thu, Apr 24, 2008 at 09:13:45AM -0600, Grant Likely wrote: > > On Thu, Apr 24, 2008 at 9:12 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > > > > > Hi all, > > > > > > I had the intention to push the code for a custom mpc5200b board (freely > > > available, no internal project) upstream. After cleaning up the code I > > > realized that actually no board specific code is left and our board is > > > well handled by the mpc5200_simple_platform machine. > > > > > > The only issue is that the machine only matches things like > > > "schindler,cm5200", there's no generic entry. Would it be possible to > > > add a "generic-mpc52xx" entry to this list? > > > > I'm being cautious about this for the time being. I'd like to have a > > generic match mechanism, but I don't want to do something that isn't > > easy to recover from if it turns out to be brain dead. For now, just > > add your board name to the explicit match list. > > The board is called "generic". No, just kidding ;) /me slaps Sascha Seriously though; I do intend to fix this, but I don't think adding a generic entry to the compatible list is the right way to do it. For example, what would "mpc5200-generic" really mean anyway? Convention for usage of 'compatible' would indicate that it means the *entire board* is compatible (obviously not true). The use-case you're talking about is simply "the board uses a 5200 and firmware is sane". On the other hand, I may just be overthinking things and compatible is the most appropriate place to specify that the board is a mpc5200 based board. (please feel free to argue with my; my opinion can probably be swayed... attaching promises of beer to your argument is probably an effective strategy) This is an issue that probably affects the other embedded platforms too, so it would be nice to agree on a common method of handling it. Regardless, whatever method is chosen, it is also important that it is always possible for board specific fixups to override the generic behavior. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mpc5200b custom board upstreamable? 2008-04-24 16:07 ` Grant Likely @ 2008-04-24 16:28 ` Sascha Hauer 2008-04-25 0:58 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2008-04-24 16:28 UTC (permalink / raw) To: Grant Likely; +Cc: Scott Wood, linuxppc-dev On Thu, Apr 24, 2008 at 10:07:20AM -0600, Grant Likely wrote: > On Thu, Apr 24, 2008 at 9:53 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > On Thu, Apr 24, 2008 at 09:13:45AM -0600, Grant Likely wrote: > > > On Thu, Apr 24, 2008 at 9:12 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > > > > > > > Hi all, > > > > > > > > I had the intention to push the code for a custom mpc5200b board (freely > > > > available, no internal project) upstream. After cleaning up the code I > > > > realized that actually no board specific code is left and our board is > > > > well handled by the mpc5200_simple_platform machine. > > > > > > > > The only issue is that the machine only matches things like > > > > "schindler,cm5200", there's no generic entry. Would it be possible to > > > > add a "generic-mpc52xx" entry to this list? > > > > > > I'm being cautious about this for the time being. I'd like to have a > > > generic match mechanism, but I don't want to do something that isn't > > > easy to recover from if it turns out to be brain dead. For now, just > > > add your board name to the explicit match list. > > > > The board is called "generic". No, just kidding ;) > > /me slaps Sascha > > Seriously though; I do intend to fix this, but I don't think adding a > generic entry to the compatible list is the right way to do it. For > example, what would "mpc5200-generic" really mean anyway? Convention > for usage of 'compatible' would indicate that it means the *entire > board* is compatible (obviously not true). The use-case you're > talking about is simply "the board uses a 5200 and firmware is sane". > On the other hand, I may just be overthinking things and compatible is > the most appropriate place to specify that the board is a mpc5200 > based board. (please feel free to argue with my; my opinion can > probably be swayed... attaching promises of beer to your argument is > probably an effective strategy) At the moment my compatible entry looks like this: compatible = "phytec,pcm030","generic-mpc52xx"; What I think would be nice is that "phytec,pcm030" support is used when available and "generic-mpc52xx" as a fallback. We do not have any platform specific hacks at the moment, but we may have later. Having "phytec,pcm030" in the simple machine would prevent us from doing so. > > This is an issue that probably affects the other embedded platforms > too, so it would be nice to agree on a common method of handling it. > > Regardless, whatever method is chosen, it is also important that it is > always possible for board specific fixups to override the generic > behavior. agreed Sascha -- Pengutronix e.K. - Linux Solutions for Science and Industry ----------------------------------------------------------- Kontakt-Informationen finden Sie im Header dieser Mail oder auf der Webseite -> http://www.pengutronix.de/impressum/ <- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mpc5200b custom board upstreamable? 2008-04-24 16:28 ` Sascha Hauer @ 2008-04-25 0:58 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 6+ messages in thread From: Benjamin Herrenschmidt @ 2008-04-25 0:58 UTC (permalink / raw) To: Sascha Hauer; +Cc: Scott Wood, linuxppc-dev On Thu, 2008-04-24 at 18:28 +0200, Sascha Hauer wrote: > > At the moment my compatible entry looks like this: > > compatible = "phytec,pcm030","generic-mpc52xx"; > > What I think would be nice is that "phytec,pcm030" support is used > when available and "generic-mpc52xx" as a fallback. We do not have any > platform specific hacks at the moment, but we may have later. Having > "phytec,pcm030" in the simple machine would prevent us from doing so. No, please avoid that 'generic' stuff for now, for all the good reasons Grant gave. It might be nice but we aren't there yet. It's trivial to add phytec,pcm030 to the list we support and use that for now. If you do a rev tomorrow that is still compatible and in fact is very close to the pcm030 programmatically and call it pcm035, then you could do something like compatible = "phytec,pcm035", "phytec,pcm030". But don't toy with "generic" things, they sound like good ideas but they ultimately come back and bite us. Cheers, Ben. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-25 0:59 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-04-24 15:12 mpc5200b custom board upstreamable? Sascha Hauer 2008-04-24 15:13 ` Grant Likely 2008-04-24 15:53 ` Sascha Hauer 2008-04-24 16:07 ` Grant Likely 2008-04-24 16:28 ` Sascha Hauer 2008-04-25 0:58 ` Benjamin Herrenschmidt
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).