* [PATCH] Fix board type in db1x00
@ 2005-11-22 22:15 Jordan Crouse
2005-11-22 22:31 ` Dan Malek
0 siblings, 1 reply; 11+ messages in thread
From: Jordan Crouse @ 2005-11-22 22:15 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
Ok, one more one more from Sergei Shtylyov - add all the board types
serviced by db1x00/init.c:
ALCHEMY: Select correct machine type in db1x00
---
arch/mips/au1000/db1x00/init.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/arch/mips/au1000/db1x00/init.c b/arch/mips/au1000/db1x00/init.c
index 4b9d5e4..41e0522 100644
--- a/arch/mips/au1000/db1x00/init.c
+++ b/arch/mips/au1000/db1x00/init.c
@@ -61,7 +61,17 @@ void __init prom_init(void)
prom_envp = (char **) fw_arg2;
mips_machgroup = MACH_GROUP_ALCHEMY;
- mips_machtype = MACH_DB1000; /* set the platform # */
+
+ /* Set the platform # */
+#if defined (CONFIG_MIPS_DB1550)
+ mips_machtype = MACH_DB1550;
+#elif defined (CONFIG_MIPS_DB1500)
+ mips_machtype = MACH_DB1500;
+#elif defined (CONFIG_MIPS_DB1100)
+ mips_machtype = MACH_DB1100;
+#else
+ mips_machtype = MACH_DB1000;
+#endif
prom_init_cmdline();
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix board type in db1x00
2005-11-22 22:15 [PATCH] Fix board type in db1x00 Jordan Crouse
@ 2005-11-22 22:31 ` Dan Malek
2005-11-23 0:15 ` Jordan Crouse
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Dan Malek @ 2005-11-22 22:31 UTC (permalink / raw)
To: Jordan Crouse; +Cc: linux-mips, ralf
On Nov 22, 2005, at 5:15 PM, Jordan Crouse wrote:
> + /* Set the platform # */
> +#if defined (CONFIG_MIPS_DB1550)
> + mips_machtype = MACH_DB1550;
> +#elif defined (CONFIG_MIPS_DB1500)
> + mips_machtype = MACH_DB1500;
> +#elif defined (CONFIG_MIPS_DB1100)
> + mips_machtype = MACH_DB1100;
> +#else
> + mips_machtype = MACH_DB1000;
> +#endif
Can't we just do something like
#define MACH_ALCHEMY_TYPE xxxxx
in the include files and not have this mess in the
actual code? Then, all we have to do here is:
mips_machtype = MACH_ALCHEMY_TYPE;
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fix board type in db1x00
2005-11-22 22:31 ` Dan Malek
@ 2005-11-23 0:15 ` Jordan Crouse
2005-11-23 0:24 ` Dan Malek
2005-11-23 6:31 ` [PATCH] " Matej Kupljen
2005-11-29 16:51 ` Ralf Baechle
2 siblings, 1 reply; 11+ messages in thread
From: Jordan Crouse @ 2005-11-23 0:15 UTC (permalink / raw)
To: Dan Malek; +Cc: linux-mips, ralf
On 22/11/05 17:31 -0500, Dan Malek wrote:
>
> On Nov 22, 2005, at 5:15 PM, Jordan Crouse wrote:
>
> >+ /* Set the platform # */
> >+#if defined (CONFIG_MIPS_DB1550)
> >+ mips_machtype = MACH_DB1550;
> >+#elif defined (CONFIG_MIPS_DB1500)
> >+ mips_machtype = MACH_DB1500;
> >+#elif defined (CONFIG_MIPS_DB1100)
> >+ mips_machtype = MACH_DB1100;
> >+#else
> >+ mips_machtype = MACH_DB1000;
> >+#endif
>
> Can't we just do something like
> #define MACH_ALCHEMY_TYPE xxxxx
>
> in the include files and not have this mess in the
> actual code? Then, all we have to do here is:
>
> mips_machtype = MACH_ALCHEMY_TYPE;
The problem with db1x00 in particular is that its sort of a
catch all for all the Alchemy boards that don't have a proper home
of their own, so there really isn't a DB1000/DB1100/DB1500/DB1550
header file. That means either the mess goes in here or it goes
in asm-mips/mach-db1x00/db1x00.h, and I think I rather prefer it to
be in the .c file, just so one doesn't have to chase down the
MACH_ALCHEMY_TYPE define.
Jordan
--
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fix board type in db1x00
2005-11-23 0:15 ` Jordan Crouse
@ 2005-11-23 0:24 ` Dan Malek
2005-11-23 1:18 ` Jordan Crouse
0 siblings, 1 reply; 11+ messages in thread
From: Dan Malek @ 2005-11-23 0:24 UTC (permalink / raw)
To: Jordan Crouse; +Cc: linux-mips, ralf
On Nov 22, 2005, at 7:15 PM, Jordan Crouse wrote:
> .... That means either the mess goes in here or it goes
> in asm-mips/mach-db1x00/db1x00.h,
You are already doing this for other things, like the BCSR
differences with the db1550. Why not put it all on one place?
You could even generate out of the Kconfig process and
not need it in any file. :-) The problem is if you propagate
stuff like this "... because there isn't an include file ..." others
will also take that attitude. Someone has to start the
process. For something as generic as these boards, the
next one should simply be an include file update, not the
need to edit various source files as is necessary today.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fix board type in db1x00
2005-11-23 0:24 ` Dan Malek
@ 2005-11-23 1:18 ` Jordan Crouse
0 siblings, 0 replies; 11+ messages in thread
From: Jordan Crouse @ 2005-11-23 1:18 UTC (permalink / raw)
To: Dan Malek; +Cc: linux-mips, ralf
On 22/11/05 19:24 -0500, Dan Malek wrote:
>
> On Nov 22, 2005, at 7:15 PM, Jordan Crouse wrote:
>
> >.... That means either the mess goes in here or it goes
> >in asm-mips/mach-db1x00/db1x00.h,
>
> You are already doing this for other things, like the BCSR
> differences with the db1550. Why not put it all on one place?
> You could even generate out of the Kconfig process and
> not need it in any file. :-) The problem is if you propagate
> stuff like this "... because there isn't an include file ..." others
> will also take that attitude. Someone has to start the
> process. For something as generic as these boards, the
> next one should simply be an include file update, not the
> need to edit various source files as is necessary today.
I'll buy into the general idea, but I'll defer to Ralf to see if
he wants us to start inflicting this on the tree, or if he would
just prefer to let sleeping dogs lay. One one hand, its nice to
clean things up, but on the other hand, we're not making any more
DB boards :( so its doubtful the ugliness will grow much further then
this.
Thanks for your comments,
Jordan
--
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix board type in db1x00
2005-11-22 22:31 ` Dan Malek
2005-11-23 0:15 ` Jordan Crouse
@ 2005-11-23 6:31 ` Matej Kupljen
2005-11-23 14:39 ` Dan Malek
2005-11-29 16:51 ` Ralf Baechle
2 siblings, 1 reply; 11+ messages in thread
From: Matej Kupljen @ 2005-11-23 6:31 UTC (permalink / raw)
To: Dan Malek; +Cc: Jordan Crouse, linux-mips, ralf
Hi
> > + /* Set the platform # */
> > +#if defined (CONFIG_MIPS_DB1550)
> > + mips_machtype = MACH_DB1550;
> > +#elif defined (CONFIG_MIPS_DB1500)
> > + mips_machtype = MACH_DB1500;
> > +#elif defined (CONFIG_MIPS_DB1100)
> > + mips_machtype = MACH_DB1100;
> > +#else
> > + mips_machtype = MACH_DB1000;
> > +#endif
>
> Can't we just do something like
> #define MACH_ALCHEMY_TYPE xxxxx
>
> in the include files and not have this mess in the
> actual code? Then, all we have to do here is:
>
> mips_machtype = MACH_ALCHEMY_TYPE;
I prefer Dan's suggestion, if it counts.
And please, don't forget about DB1200 board also.
I already sent some minor patches, but they didn't
get in :(
BR,
Matej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix board type in db1x00
2005-11-23 6:31 ` [PATCH] " Matej Kupljen
@ 2005-11-23 14:39 ` Dan Malek
0 siblings, 0 replies; 11+ messages in thread
From: Dan Malek @ 2005-11-23 14:39 UTC (permalink / raw)
To: Matej Kupljen; +Cc: Jordan Crouse, linux-mips, ralf
On Nov 23, 2005, at 1:31 AM, Matej Kupljen wrote:
> And please, don't forget about DB1200 board also.
> I already sent some minor patches, but they didn't
> get in :(
They didn't get lost. Pete and I knew there would
be things coming from AMD, there are several
other patches that have been posted. We just
need to merge it all together.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix board type in db1x00
2005-11-22 22:31 ` Dan Malek
2005-11-23 0:15 ` Jordan Crouse
2005-11-23 6:31 ` [PATCH] " Matej Kupljen
@ 2005-11-29 16:51 ` Ralf Baechle
2005-11-30 8:35 ` Matej Kupljen
2 siblings, 1 reply; 11+ messages in thread
From: Ralf Baechle @ 2005-11-29 16:51 UTC (permalink / raw)
To: Dan Malek; +Cc: Jordan Crouse, linux-mips
On Tue, Nov 22, 2005 at 05:31:20PM -0500, Dan Malek wrote:
> On Nov 22, 2005, at 5:15 PM, Jordan Crouse wrote:
>
> >+ /* Set the platform # */
> >+#if defined (CONFIG_MIPS_DB1550)
> >+ mips_machtype = MACH_DB1550;
> >+#elif defined (CONFIG_MIPS_DB1500)
> >+ mips_machtype = MACH_DB1500;
> >+#elif defined (CONFIG_MIPS_DB1100)
> >+ mips_machtype = MACH_DB1100;
> >+#else
> >+ mips_machtype = MACH_DB1000;
> >+#endif
>
> Can't we just do something like
> #define MACH_ALCHEMY_TYPE xxxxx
>
> in the include files and not have this mess in the
> actual code? Then, all we have to do here is:
>
> mips_machtype = MACH_ALCHEMY_TYPE;
But we don't have a nice space for this in header files either right now.
So I'll apply this one but if you come up with something better I'll
certainly appreciate it.
Ralf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix board type in db1x00
2005-11-29 16:51 ` Ralf Baechle
@ 2005-11-30 8:35 ` Matej Kupljen
2005-11-30 11:23 ` Ralf Baechle
2005-11-30 15:29 ` Jordan Crouse
0 siblings, 2 replies; 11+ messages in thread
From: Matej Kupljen @ 2005-11-30 8:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Hi
> But we don't have a nice space for this in header files either right now.
> So I'll apply this one but if you come up with something better I'll
> certainly appreciate it.
You forgot DBAU1200.
BR,
Matej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix board type in db1x00
2005-11-30 8:35 ` Matej Kupljen
@ 2005-11-30 11:23 ` Ralf Baechle
2005-11-30 15:29 ` Jordan Crouse
1 sibling, 0 replies; 11+ messages in thread
From: Ralf Baechle @ 2005-11-30 11:23 UTC (permalink / raw)
To: Matej Kupljen; +Cc: linux-mips
On Wed, Nov 30, 2005 at 09:35:27AM +0100, Matej Kupljen wrote:
> > But we don't have a nice space for this in header files either right now.
> > So I'll apply this one but if you come up with something better I'll
> > certainly appreciate it.
>
> You forgot DBAU1200.
Was not part of the patch posted. Can you cook up a patch?
Ralf
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Fix board type in db1x00
2005-11-30 8:35 ` Matej Kupljen
2005-11-30 11:23 ` Ralf Baechle
@ 2005-11-30 15:29 ` Jordan Crouse
1 sibling, 0 replies; 11+ messages in thread
From: Jordan Crouse @ 2005-11-30 15:29 UTC (permalink / raw)
To: Matej Kupljen; +Cc: Ralf Baechle, linux-mips
> You forgot DBAU1200.
Nope. PB1200 and DB1200 boards do not compile au1000/db1x00/init.c they use
au1000/pb1200/init.c instead, and said file already has the correct machine
type.
Jordan
--
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-11-30 15:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 22:15 [PATCH] Fix board type in db1x00 Jordan Crouse
2005-11-22 22:31 ` Dan Malek
2005-11-23 0:15 ` Jordan Crouse
2005-11-23 0:24 ` Dan Malek
2005-11-23 1:18 ` Jordan Crouse
2005-11-23 6:31 ` [PATCH] " Matej Kupljen
2005-11-23 14:39 ` Dan Malek
2005-11-29 16:51 ` Ralf Baechle
2005-11-30 8:35 ` Matej Kupljen
2005-11-30 11:23 ` Ralf Baechle
2005-11-30 15:29 ` Jordan Crouse
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.