[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Multiple Peripheral Instances with uClinux-auto platform



Quoting John Williams <jwilliams@itee.uq.edu.au>:
> Hi Paul,
>
> Paul Hartke wrote:
> > How does the uClinux-auto platform support multiple peripheral
> instances of
> > the same type?
>
> The will be described by kernel config parameters named thusly:
>
> CONFIG_XILINX_core_type_n_param_name
>
> where n goes from 0 to CONFIG_XILINX_/core_type/_NUM_INSTANCES-1, and
> param_name is expanded across all parameters defined for the core, in
> its MPD file.
>
> What is not so clearly defined is the relative ordering of the various
> instances and how that will be reflected in the kernel parameter
> numbering.  I haven't looked deeply into it, but I think the ordering of
> the DRIVER blocks in the MSS file determines the order in which they are
> enumerated in the MLD/TCL, and thus in the kernel parameterisation
> scheme.  This would be easy to test, and certainly needs to be clarified.

I think it is MSS ordering but that is not guaranteed to be consistent
across EDK versions but just a result of the current build mechanisms. 
Perhaps registering  all the instances with a per instance ioctl call which
returns the text string CONFIG_XILINX_core_name_n_INSTANCE.  That way a user
application could query each one of the instances to determine which one it
wants to use.

> > I have a system with three opb_gpio peripherals but the address ranges
> for
> > the second two peripherals are incorrectly being set in the uclinux
> kernel.
> >  I think that is because xgpio_g.c in the uclinux source tree only has
> one
> > peripheral enumerated so the kernel is reading off the end of the array
> > during initialization.
>
> Yes, that's exactly correct.  I have a trivial fix sitting in my tree
> here that I haven't pushed to CVS yet - it just expands that definition
> block in the gpio_g.c to support more than just one instance.

What exactly expands gpio_g.c: the edk mld/tcl or something as a result of
"make menuconfig"?  Let me know when you push it out or if you want someone
to try it out.

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/