* Adding machine types to the kernel tree...
@ 2005-03-03 11:46 Jakob Viketoft
2005-03-03 18:50 ` Andrew May
0 siblings, 1 reply; 7+ messages in thread
From: Jakob Viketoft @ 2005-03-03 11:46 UTC (permalink / raw)
To: Linux PPC Embedded list
Hi!
Are there any certain policys or religious issues about adding machine
types to the (ppc40x) kernel tree, and who's responsible for kicking
stuff like this up the main tree?
Specifically, I would like to replace the PowerPC405 support for the
Xilinx ML 300 (development board) with generic Xilinx Virtex-II Pro and
Virtex4 support (FPGAs). In my opinion, the end target isn't the
development boards, but the custom configuration it all will run on in
the end, and so things would benefit from a more general support. Do
anyone have any insightful views/opinions on this or comments of any kind?
Clearly, there seem to be some demand for this lately according to
traffic on the list...
Cheers!
/Jakob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Adding machine types to the kernel tree...
2005-03-03 11:46 Adding machine types to the kernel tree Jakob Viketoft
@ 2005-03-03 18:50 ` Andrew May
2005-03-07 10:07 ` Jakob Viketoft
0 siblings, 1 reply; 7+ messages in thread
From: Andrew May @ 2005-03-03 18:50 UTC (permalink / raw)
To: Jakob Viketoft; +Cc: Linux PPC Embedded list
On Thu, 2005-03-03 at 12:46 +0100, Jakob Viketoft wrote:
> Hi!
>
> Are there any certain policys or religious issues about adding machine
> types to the (ppc40x) kernel tree, and who's responsible for kicking
> stuff like this up the main tree?
Well I don't know about that, but what really makes it hard for me to
work on things is that I only have a few custom boards to test on.
So any time I make changes that could make things more general I can't
test to make sure I don't break a vanilla eval board.
> Specifically, I would like to replace the PowerPC405 support for the
> Xilinx ML 300 (development board) with generic Xilinx Virtex-II Pro and
> Virtex4 support (FPGAs). In my opinion, the end target isn't the
> development boards, but the custom configuration it all will run on in
> the end, and so things would benefit from a more general support. Do
> anyone have any insightful views/opinions on this or comments of any kind?
I think a huge first step would be to banish xparameters.h from all the
kernel code.
Our HW guys just seem to do the strangest things without checking.
So I have 2 spins of a board with 2 Virtex-II pro's each.
The 2 spins have a small refrence clock change and the 2 CPU's have
different IRQ mappings.
There is no way I wanted to build 4 kernels to handle these.
I don't have the code with me, but the basic thing I did was fixup
the compiled in arrays like rs_table in the board_io_mapping.
So the quick way to start tracking things down may be to just
replace all the constants in xparmaters.h with function calls
that got the info from the boot loader if possible.
You will get plenty of compile errors for the arrays, but then
just this type of code needs to be fixed up to setup the arrary
at run time rather than just get the pointer to it at run time.
=========================================
XEmac_Config *
XEmac_GetConfig(int Instance)
{
if (Instance < 0 || Instance >= XPAR_XEMAC_NUM_INSTANCES) {
return NULL;
}
return &XEmac_ConfigTable[Instance];
}
============================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Adding machine types to the kernel tree...
2005-03-03 18:50 ` Andrew May
@ 2005-03-07 10:07 ` Jakob Viketoft
2005-03-07 12:27 ` Matt Porter
2005-03-07 17:38 ` Kumar Gala
0 siblings, 2 replies; 7+ messages in thread
From: Jakob Viketoft @ 2005-03-07 10:07 UTC (permalink / raw)
To: acmay; +Cc: Linux PPC Embedded list
Thanks for the comments!
Andrew May wrote:
> I think a huge first step would be to banish xparameters.h from all the
> kernel code.
> Our HW guys just seem to do the strangest things without checking.
> So I have 2 spins of a board with 2 Virtex-II pro's each.
> The 2 spins have a small refrence clock change and the 2 CPU's have
> different IRQ mappings.
I understand that there is numerous resentment against having this file
in the kernel and I've been thinking of a solution without it. One such
path would be serving the kernel with a OCP list of the devices used,
but I'm unsure about the current status of OCP. Is this The Right Way to
do it, or are OCP likely to be abandoned further along the 2.6 road?
Matt (Porter), I've seen that you've "ported" this to the 2.6 kernel,
what do you say?
> There is no way I wanted to build 4 kernels to handle these.
> I don't have the code with me, but the basic thing I did was fixup
> the compiled in arrays like rs_table in the board_io_mapping.
>
> So the quick way to start tracking things down may be to just
> replace all the constants in xparmaters.h with function calls
> that got the info from the boot loader if possible.
> You will get plenty of compile errors for the arrays, but then
> just this type of code needs to be fixed up to setup the arrary
> at run time rather than just get the pointer to it at run time.
The question is, do you want to have a bootloader (as U-boot) on a small
embedded system? In the FPGA case, you might need something that puts
the bitstream in the right place, but I'm not quite sure it would
constitute a bootloader. Maybe just having a static OCP list at a
certain location in flash and let the little bitstream prog send the
pointer to it as a kernel parameter at startup?
Reactions appreciated!
Cheers!
/Jakob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Adding machine types to the kernel tree...
2005-03-07 10:07 ` Jakob Viketoft
@ 2005-03-07 12:27 ` Matt Porter
2005-03-08 18:01 ` Debian User
2005-03-07 17:38 ` Kumar Gala
1 sibling, 1 reply; 7+ messages in thread
From: Matt Porter @ 2005-03-07 12:27 UTC (permalink / raw)
To: Jakob Viketoft; +Cc: Linux PPC Embedded list
On Mon, Mar 07, 2005 at 11:07:58AM +0100, Jakob Viketoft wrote:
> Thanks for the comments!
>
> Andrew May wrote:
> > I think a huge first step would be to banish xparameters.h from all the
> > kernel code.
> > Our HW guys just seem to do the strangest things without checking.
> > So I have 2 spins of a board with 2 Virtex-II pro's each.
> > The 2 spins have a small refrence clock change and the 2 CPU's have
> > different IRQ mappings.
>
> I understand that there is numerous resentment against having this file
> in the kernel and I've been thinking of a solution without it. One such
> path would be serving the kernel with a OCP list of the devices used,
> but I'm unsure about the current status of OCP. Is this The Right Way to
> do it, or are OCP likely to be abandoned further along the 2.6 road?
>
> Matt (Porter), I've seen that you've "ported" this to the 2.6 kernel,
> what do you say?
Don't tie anything permanently to OCP. :) Eventually, 4xx will convert
to platform devices like other similar SoC type subarches in ppc32 have
already done. The only reason it hasn't been done yet is that there
are some other higher priority things on my plate at the moment.
That said, anything you do with OCP additions maps right into
platform_data in the platform device world.
However, it seems you are talking about passing information to
the kernel from some bootrom or full featured firmware. That is
a separate issue from how information is passed from the arch-code
into drivers (this is what OCP and platform devices accomplish).
For now, you could define a birec type for xparameters and
standardize around passing the info in that. In the future,
birecs should be replaced by the "flattened OF device tree" method
that has been discussed here a bit (I know Jon Masters is lurking
around here, maybe with some code).
> > There is no way I wanted to build 4 kernels to handle these.
> > I don't have the code with me, but the basic thing I did was fixup
> > the compiled in arrays like rs_table in the board_io_mapping.
> >
> > So the quick way to start tracking things down may be to just
> > replace all the constants in xparmaters.h with function calls
> > that got the info from the boot loader if possible.
> > You will get plenty of compile errors for the arrays, but then
> > just this type of code needs to be fixed up to setup the arrary
> > at run time rather than just get the pointer to it at run time.
>
> The question is, do you want to have a bootloader (as U-boot) on a small
> embedded system? In the FPGA case, you might need something that puts
> the bitstream in the right place, but I'm not quite sure it would
> constitute a bootloader. Maybe just having a static OCP list at a
> certain location in flash and let the little bitstream prog send the
> pointer to it as a kernel parameter at startup?
Even the smallest bootloader rom could put the xparameters.h info in
a location and point to it using the standard birec method when
transferring control to the kernel.
I belive this would give Andrew the kind of flexibility he would like.
We've even talked about moving (in many cases at least) the SoC device
descriptions for other PPC SoCs out of the kernel so they are passed in
via birecs or the future flattened OF device tree.
-Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Adding machine types to the kernel tree...
2005-03-07 10:07 ` Jakob Viketoft
2005-03-07 12:27 ` Matt Porter
@ 2005-03-07 17:38 ` Kumar Gala
1 sibling, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2005-03-07 17:38 UTC (permalink / raw)
To: Jakob Viketoft; +Cc: Linux PPC Embedded list
On Mar 7, 2005, at 4:07 AM, Jakob Viketoft wrote:
> Thanks for the comments!
>
> Andrew May wrote:
> > I think a huge first step would be to banish xparameters.h from all
> the
> > kernel code.
> > Our HW guys just seem to do the strangest things without checking.
> > So I have 2 spins of a board with 2 Virtex-II pro's each.
> > The 2 spins have a small refrence clock change and the 2 CPU's have
> > different IRQ mappings.
>
> I understand that there is numerous resentment against having this file
> in the kernel and I've been thinking of a solution without it. One such
> path would be serving the kernel with a OCP list of the devices used,
> but I'm unsure about the current status of OCP. Is this The Right Way
> to
> do it, or are OCP likely to be abandoned further along the 2.6 road?
If you are talking about 2.6, dont use OCP. Use the driver model and
platform devices. You can take a look at the arch/ppc/syslib/ppc_sys.c
and arch/ppc/platforms/85xx for examples.
- kumar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Adding machine types to the kernel tree...
2005-03-07 12:27 ` Matt Porter
@ 2005-03-08 18:01 ` Debian User
2005-03-14 9:43 ` Jakob Viketoft
0 siblings, 1 reply; 7+ messages in thread
From: Debian User @ 2005-03-08 18:01 UTC (permalink / raw)
To: Matt Porter; +Cc: Linux PPC Embedded list, Jakob Viketoft
On Mon, Mar 07, 2005 at 05:27:32AM -0700, Matt Porter wrote:
> On Mon, Mar 07, 2005 at 11:07:58AM +0100, Jakob Viketoft wrote:
> > Thanks for the comments!
> >
> > Andrew May wrote:
> > > I think a huge first step would be to banish xparameters.h from all the
> > > kernel code.
....
> >
> > I understand that there is numerous resentment against having this file
> > in the kernel and I've been thinking of a solution without it. One such
> > path would be serving the kernel with a OCP list of the devices used,
> > but I'm unsure about the current status of OCP. Is this The Right Way to
> > do it, or are OCP likely to be abandoned further along the 2.6 road?
Not so much resentment, as a realization that xparamters.h is where all
the work is going to flow from.
> > Matt (Porter), I've seen that you've "ported" this to the 2.6 kernel,
> > what do you say?
>
> Don't tie anything permanently to OCP. :) Eventually, 4xx will convert
> to platform devices like other similar SoC type subarches in ppc32 have
> already done. The only reason it hasn't been done yet is that there
> are some other higher priority things on my plate at the moment.
I am still working with an old 2_4_devel kernel myself.
The something better is comming has always held me back from working
on things as well.
Even now OCP is being dropped for platform devices.
And birecs is being dropped for OF.
The kernel I am working with is a step behind both of those.
> However, it seems you are talking about passing information to
> the kernel from some bootrom or full featured firmware. That is
> a separate issue from how information is passed from the arch-code
> into drivers (this is what OCP and platform devices accomplish).
> For now, you could define a birec type for xparameters and
> standardize around passing the info in that. In the future,
> birecs should be replaced by the "flattened OF device tree" method
> that has been discussed here a bit (I know Jon Masters is lurking
> around here, maybe with some code).
A simple fucntion that would take the xparameters.h and create the
birecs/OF data would be a nice way to go.
I would think the func could run on the host to generate a binary
blob that could be attached to the kernel or dropped in flash, for
simple bootloaders.
For a better bootloader it could run the func itself on the target
and put the data in ram, and then fixup the data if needed.
> Even the smallest bootloader rom could put the xparameters.h info in
> a location and point to it using the standard birec method when
> transferring control to the kernel.
I am a U-boot person myself, but I think there will be a higher number
of users that just stick with the standard loader providied by the vendor
and do the wrapper thing in the kernel.
> I belive this would give Andrew the kind of flexibility he would like.
Yes, I think it would.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Adding machine types to the kernel tree...
2005-03-08 18:01 ` Debian User
@ 2005-03-14 9:43 ` Jakob Viketoft
0 siblings, 0 replies; 7+ messages in thread
From: Jakob Viketoft @ 2005-03-14 9:43 UTC (permalink / raw)
To: Debian User; +Cc: Linux PPC Embedded list
Sorry for the delay in answer, but I've been off sick most of last week.
Anyway, I've contacted Jon Masters off the list about the OF device tree
approach and hopefully there will be something coming of this soon enough.
Cheers!
/Jakob
Debian User wrote:
> On Mon, Mar 07, 2005 at 05:27:32AM -0700, Matt Porter wrote:
>
>>On Mon, Mar 07, 2005 at 11:07:58AM +0100, Jakob Viketoft wrote:
>>
>>>Thanks for the comments!
>>>
>>>Andrew May wrote:
>>>
>>>>I think a huge first step would be to banish xparameters.h from all the
>>>>kernel code.
>
> ....
>
>>>I understand that there is numerous resentment against having this file
>>>in the kernel and I've been thinking of a solution without it. One such
>>>path would be serving the kernel with a OCP list of the devices used,
>>>but I'm unsure about the current status of OCP. Is this The Right Way to
>>>do it, or are OCP likely to be abandoned further along the 2.6 road?
>
>
> Not so much resentment, as a realization that xparamters.h is where all
> the work is going to flow from.
>
>
>>>Matt (Porter), I've seen that you've "ported" this to the 2.6 kernel,
>>>what do you say?
>>
>>Don't tie anything permanently to OCP. :) Eventually, 4xx will convert
>>to platform devices like other similar SoC type subarches in ppc32 have
>>already done. The only reason it hasn't been done yet is that there
>>are some other higher priority things on my plate at the moment.
>
>
> I am still working with an old 2_4_devel kernel myself.
> The something better is comming has always held me back from working
> on things as well.
>
> Even now OCP is being dropped for platform devices.
> And birecs is being dropped for OF.
> The kernel I am working with is a step behind both of those.
>
>
>>However, it seems you are talking about passing information to
>>the kernel from some bootrom or full featured firmware. That is
>>a separate issue from how information is passed from the arch-code
>>into drivers (this is what OCP and platform devices accomplish).
>>For now, you could define a birec type for xparameters and
>>standardize around passing the info in that. In the future,
>>birecs should be replaced by the "flattened OF device tree" method
>>that has been discussed here a bit (I know Jon Masters is lurking
>>around here, maybe with some code).
>
>
> A simple fucntion that would take the xparameters.h and create the
> birecs/OF data would be a nice way to go.
> I would think the func could run on the host to generate a binary
> blob that could be attached to the kernel or dropped in flash, for
> simple bootloaders.
> For a better bootloader it could run the func itself on the target
> and put the data in ram, and then fixup the data if needed.
>
>
>>Even the smallest bootloader rom could put the xparameters.h info in
>>a location and point to it using the standard birec method when
>>transferring control to the kernel.
>
>
> I am a U-boot person myself, but I think there will be a higher number
> of users that just stick with the standard loader providied by the vendor
> and do the wrapper thing in the kernel.
>
>
>>I belive this would give Andrew the kind of flexibility he would like.
>
>
> Yes, I think it would.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-03-14 10:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-03 11:46 Adding machine types to the kernel tree Jakob Viketoft
2005-03-03 18:50 ` Andrew May
2005-03-07 10:07 ` Jakob Viketoft
2005-03-07 12:27 ` Matt Porter
2005-03-08 18:01 ` Debian User
2005-03-14 9:43 ` Jakob Viketoft
2005-03-07 17:38 ` Kumar Gala
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).