Subject: Re: ppc_sys.c with platform device model or create opb bus?

From: Matt Porter <[email-masked]>
Date: Sat, 23 Jul 2005 07:48:42 -0700

On Sun, Jul 17, 2005 at 03:26:21PM +0900, Yasushi SHOJI wrote:
> Hi all,
> 
> I've been reading some posts regarding to the transition of OCP to
> platform device mode while searching for a good way to implement a
> device driver for our fpga base platform. And now I have one question
> regarding to ppc_sys.c
> 
>   should I use ppc_sys_*() for platform like fpga?
> 
> since I'm working on FPGA base platform, ppc_sys_spec seems to be too
> static. that is, IMHO, having static array of device list isn't ideal
> for a dynamic system like fpga.
> 
> I feel that the ppc_sys_spec is for SoC, which doesn't dynamically
> change the peripherals it has.  otoh, fpga based platform can have
> arbitrary number of devices if you configured so.
> 
> I usually implement a device with PLB or OPB.  for those bus, should I
> use platform device model or create new buses for each?

Use the platform model.  When you run into a case that can't be
handled properly then the platform model should be expanded to handle
it. If you instantiate a "platform device" by configuring the FPGA
from userspace then that's a hotplug event.  The platform model
should be extended to handle hotplug for these kind of cases since
they are pretty common.

-Matt