All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org
Subject: Re: [RFC] [PATCH] Device Tree on ARM platform
Date: Thu, 28 May 2009 14:29:03 +0000 (UTC)	[thread overview]
Message-ID: <gvm73f$ub5$2@ger.gmane.org> (raw)
In-Reply-To: h4o0f6-k5o.ln1@woodchuck.wormnet.eu

Alexander Clouter wrote:

> In gmane.linux.kernel Grant Likely
> <grant.likely@secretlab.ca> wrote:
>> On Wed, May 27, 2009 at 12:56 PM, Alexander Clouter
>> <alex@digriz.org.uk> wrote:
>>> In gmane.linux.kernel Grant Likely
>>> <grant.likely@secretlab.ca> wrote:
>>>> On Wed, May 27, 2009 at 9:05 AM, Robert Schwebel
>>>>
>>>> [snipped]
>>>>
>>> Although I have no input of value here, I'm hoping I do not become the
>>> next posterchild for "pain++".
>>>
>>> I'm working through redo'ing the FPGA support in the TS-7800[1] into a
>>> new bus rather than just continuing the messy direction I have been
>>> going to date[2].
>>>
>>> My current approach is that the bus handles the 'hotplug'ing of the
>>> FPGA bitstream by unregistering all the devices and then when it's
>>> informed the new bitstream is ready it prods all the registered
>>> drivers if any devices need bringing up (obviously drivers can be
>>> modprobe'd as and when).
>>>
>>> The 'magic' is that the FPGA code has some special value[3] that what
>>> it is and the drivers (outside the platform code) have a list of FPGA
>>> magic values (with a mask) that they are willing to service.  The
>>> *bus* (platform code) is what installs the devices effectively and
>>> only does so if the loaded driver says it can drive a particular
>>> loaded bitstream (in the bus driver struct is a array of ID's it
>>> checks).
>>>
>>> Does this sound sane?  Is it an approach that could be ACKed one day?
>>> Currently the bit that might be considered sinful is there is for some
>>> of the drivers (rtc-m48t86, timeriomem-rng and plat_nand) the FPGA bus
>>> 'driver' is a light wrapper around the platform device driver.  This
>>> is so that the hooks still exist so the bus know what to load and
>>> unload as and when.
>> 
>> Personally, I'd not write a separate bus.  I'd write a platform driver
>> which turns around and registers more platform devices with the
>> original device as the parent in the _probe routine, and unregisters
>> them in _remove.  Should have the same affect with less complex code.
>> However, someone with more device-model-foo may have better advice.
>> 
> That's a thought, but this 'bus' does not just drive platform devices,
> there are other drivers that will live outside the scope.
> 
> I have a half completed GPIO expander for the 'factory' FPGA bitstream
> that could not be done as a platform device.  The GPIO pin's also
> multiplex as an ISA (PC/104) bus and chip select's a SPI bus too.
> 
> Another driver is a DMA engine provisioned by the factory bitstream too
> as well as AVR+ADC+watchdog system too.
> 
> What would make sense for this approach would be if it was to drive
> bit's from the opencores.org website.
> 
> Because there is a mix of platform devices and 'awkward' bit's, this is
> why I was thinking about a seperate bus.
> 
> Cheers for the suggestion, it's got me thinkingthat there still has to
> be a better way :)

When facing nearly the same problems with Toshiba Multi I/O chips,
we have created and used the special set of functions. You can check
the drivers/mfd/mfd-core.c and include/linux/mfd/core.h for details.

-- 
With best wishes
Dmitry


_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@ozlabs.org
https://ozlabs.org/mailman/listinfo/devicetree-discuss

  reply	other threads:[~2009-05-28 14:29 UTC|newest]

Thread overview: 277+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  7:08 [RFC] [PATCH] Device Tree on ARM platform Janboe Ye
2009-05-27 14:27 ` Grant Likely
2009-05-27 14:27   ` Grant Likely
2009-05-27 14:39   ` Timur Tabi
2009-05-27 15:05     ` Robert Schwebel
2009-05-27 15:05       ` Robert Schwebel
2009-05-27 15:39       ` Grant Likely
2009-05-27 15:39         ` Grant Likely
2009-05-27 16:20         ` Robert Schwebel
2009-05-27 16:20           ` Robert Schwebel
2009-05-27 20:35           ` Grant Likely
2009-05-27 20:35             ` Grant Likely
2009-05-27 23:48             ` Robert Schwebel
2009-05-27 23:48               ` Robert Schwebel
2009-05-27 23:52               ` David Miller
2009-05-27 23:52                 ` David Miller
2009-05-27 23:58               ` Scott Wood
2009-05-27 23:58                 ` Scott Wood
2009-05-28  0:02                 ` David Miller
2009-05-28  0:02                   ` David Miller
2009-05-28  0:07                 ` Robert Schwebel
2009-05-28  0:07                   ` Robert Schwebel
2009-05-28  0:15                   ` David Miller
2009-05-28  0:15                     ` David Miller
2009-05-28 10:37                     ` Mark Brown
2009-05-28 10:37                       ` Mark Brown
2009-05-28 22:32                       ` Grant Likely
2009-05-28 22:32                         ` Grant Likely
2009-05-29 12:34                         ` Mark Brown
2009-05-30  9:52                           ` Benjamin Herrenschmidt
2009-05-30  9:52                             ` Benjamin Herrenschmidt
2009-05-30 10:21                             ` Russell King - ARM Linux
2009-05-30 10:21                               ` Russell King - ARM Linux
2009-05-30 17:56                               ` Mark Brown
2009-05-30 17:56                                 ` Mark Brown
2009-06-02  7:57                               ` Holger Schurig
2009-06-02  9:48                                 ` Mark Brown
2009-06-02  9:48                                   ` Mark Brown
2009-05-28  2:57                   ` David Gibson
2009-05-28  2:57                     ` David Gibson
2009-05-28  3:36                     ` Grant Likely
2009-05-28  3:36                       ` Grant Likely
2009-05-28  3:29                   ` Grant Likely
2009-05-28  3:29                     ` Grant Likely
2009-05-28  9:51                     ` Wolfgang Denk
2009-05-28  9:59                       ` David Miller
2009-05-28  9:59                         ` David Miller
2009-05-28 10:13                       ` Robert Schwebel
2009-05-28 10:13                         ` Robert Schwebel
2009-05-28 13:33                         ` Jon Smirl
2009-05-28 13:33                           ` Jon Smirl
2009-05-28 13:42                           ` Robert Schwebel
2009-05-28 13:42                             ` Robert Schwebel
2009-05-28  9:38                   ` Wolfgang Denk
2009-05-28  3:21                 ` Grant Likely
2009-05-28  3:21                   ` Grant Likely
2009-05-28  3:16               ` Grant Likely
2009-05-28  3:16                 ` Grant Likely
2009-05-28  0:55           ` Stephen Neuendorffer
2009-05-28  0:55             ` Stephen Neuendorffer
2009-05-27 18:56         ` Alexander Clouter
2009-05-27 20:46           ` Grant Likely
2009-05-27 20:46             ` Grant Likely
2009-05-27 21:32             ` Alexander Clouter
2009-05-27 21:32               ` Alexander Clouter
2009-05-28 14:29               ` Dmitry Eremin-Solenikov [this message]
2009-05-27 15:41       ` Peter Korsgaard
2009-05-27 15:41         ` Peter Korsgaard
2009-05-27 16:23         ` Scott Wood
2009-05-27 16:23           ` Scott Wood
2009-05-27 17:56           ` Russell King
2009-05-27 17:56             ` Russell King
2009-05-27 19:08             ` Scott Wood
2009-05-27 19:08               ` Scott Wood
2009-05-27 19:13               ` Jon Smirl
2009-05-27 19:13                 ` Jon Smirl
2009-05-27 19:21                 ` Russell King - ARM Linux
2009-05-27 19:21                   ` Russell King - ARM Linux
2009-05-27 19:39                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 19:39                     ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:22                     ` Grant Likely
2009-05-27 20:22                       ` Grant Likely
2009-05-27 20:19                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:19                         ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:54                         ` Grant Likely
2009-05-27 20:54                           ` Grant Likely
2009-05-28  3:04                           ` David Gibson
2009-05-28  3:04                             ` David Gibson
2009-05-28  7:58                           ` Benjamin Herrenschmidt
2009-05-28  7:58                             ` Benjamin Herrenschmidt
2009-05-27 23:57                       ` Robert Schwebel
2009-05-27 23:57                         ` Robert Schwebel
2009-05-28  0:00                         ` David Miller
2009-05-28  0:00                           ` David Miller
2009-05-28  3:21                         ` Grant Likely
2009-05-28  3:21                           ` Grant Likely
2009-05-28  6:34                           ` Wolfram Sang
2009-05-28  6:34                             ` Wolfram Sang
2009-05-28  7:55                             ` Benjamin Herrenschmidt
2009-05-28  7:55                               ` Benjamin Herrenschmidt
2009-05-28 13:34                             ` Grant Likely
2009-05-28 13:34                               ` Grant Likely
2009-05-28  7:48                         ` Benjamin Herrenschmidt
2009-05-28  7:48                           ` Benjamin Herrenschmidt
2009-05-28 14:22                       ` Ben Dooks
2009-05-27 20:28                     ` David Miller
2009-05-27 20:28                       ` David Miller
2009-05-27 20:31                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:31                         ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-28  2:52                   ` David Gibson
2009-05-28  2:52                     ` David Gibson
2009-05-28  4:27                     ` David Miller
2009-05-28  4:27                       ` David Miller
2009-05-28  4:47                       ` David Gibson
2009-05-28  4:47                         ` David Gibson
2009-05-28  5:31                         ` David Miller
2009-05-28  5:31                           ` David Miller
2009-05-28  5:47                           ` David Gibson
2009-05-28  5:47                             ` David Gibson
2009-05-28  7:47                   ` Benjamin Herrenschmidt
2009-05-28  7:47                     ` Benjamin Herrenschmidt
2009-05-28 14:17                 ` Ben Dooks
2009-05-28 14:24                   ` Robert Schwebel
2009-05-28 14:47                   ` Grant Likely
2009-05-28 14:47                     ` Grant Likely
2009-05-27 19:29               ` Russell King
2009-05-27 19:29                 ` Russell King
2009-05-27 19:47                 ` Sergei Shtylyov
2009-05-27 19:53                 ` Scott Wood
2009-05-27 19:53                   ` Scott Wood
2009-05-27 19:54                   ` Timur Tabi
2009-05-27 19:54                     ` Timur Tabi
2009-05-27 20:25                     ` David Miller
2009-05-27 20:25                       ` David Miller
2009-05-27 20:27                       ` Timur Tabi
2009-05-27 20:27                         ` Timur Tabi
2009-05-27 20:55                         ` David Miller
2009-05-27 20:55                           ` David Miller
2009-05-27 23:26                           ` Robert Schwebel
2009-05-27 23:26                             ` Robert Schwebel
2009-05-27 20:35                       ` M. Warner Losh
2009-05-27 20:14                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:14                     ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:23                 ` David Miller
2009-05-27 20:23                   ` David Miller
     [not found]                   ` <20090527.132328.78091350.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-05-27 20:27                     ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:27                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-27 20:27                       ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]                       ` <20090527202701.GA16219-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
2009-05-27 20:48                         ` Josh Boyer
2009-05-27 20:48                           ` Josh Boyer
2009-05-27 20:48                           ` Josh Boyer
2009-05-27 20:56                         ` David Miller
2009-05-27 20:56                           ` David Miller
2009-05-27 20:56                           ` David Miller
2009-05-27 20:52                 ` Mark Brown
2009-05-27 20:52                   ` Mark Brown
2009-05-27 21:05                   ` Grant Likely
2009-05-27 21:05                     ` Grant Likely
2009-05-28  0:11                     ` Jon Smirl
2009-05-28  0:11                       ` Jon Smirl
2009-05-28 12:43                     ` Sascha Hauer
2009-05-28 12:43                       ` Sascha Hauer
2009-05-28 13:18                       ` Thomas Gleixner
2009-05-28 15:04                         ` Sascha Hauer
2009-05-28 15:04                           ` Sascha Hauer
2009-05-28 15:27                           ` Thomas Gleixner
2009-05-28 15:27                             ` Thomas Gleixner
2009-05-29  0:51                           ` Benjamin Herrenschmidt
2009-05-29  0:51                             ` Benjamin Herrenschmidt
2009-05-29  7:52                             ` Sascha Hauer
2009-05-29  7:52                               ` Sascha Hauer
2009-05-29  9:08                               ` Benjamin Herrenschmidt
2009-05-29  9:08                                 ` Benjamin Herrenschmidt
2009-05-31 10:52                             ` Russell King - ARM Linux
2009-05-31 10:52                               ` Russell King - ARM Linux
2009-05-28 14:31                       ` Grant Likely
2009-05-28 14:31                         ` Grant Likely
2009-05-28  3:25                   ` David Gibson
2009-05-28  3:25                     ` David Gibson
2009-05-28  8:10                 ` Benjamin Herrenschmidt
2009-05-28  8:10                   ` Benjamin Herrenschmidt
2009-05-28  7:38               ` Benjamin Herrenschmidt
2009-05-28  7:38                 ` Benjamin Herrenschmidt
2009-05-27 20:43             ` Grant Likely
2009-05-27 20:43               ` Grant Likely
2009-05-28  7:37             ` Benjamin Herrenschmidt
2009-05-28  7:37               ` Benjamin Herrenschmidt
2009-05-28  9:15               ` Russell King - ARM Linux
2009-05-28  9:15                 ` Russell King - ARM Linux
2009-05-28  9:57                 ` David Miller
2009-05-28  9:57                   ` David Miller
2009-05-28 10:11                   ` Benjamin Herrenschmidt
2009-05-28 10:11                     ` Benjamin Herrenschmidt
2009-05-28 10:33                     ` Robert Schwebel
2009-05-28 10:34                     ` Russell King - ARM Linux
2009-05-28 10:34                       ` Russell King - ARM Linux
2009-05-28 22:33                       ` Benjamin Herrenschmidt
2009-05-28 22:33                         ` Benjamin Herrenschmidt
2009-05-28 10:14                   ` Russell King - ARM Linux
2009-05-28 10:14                     ` Russell King - ARM Linux
2009-05-28 21:30                     ` David Miller
2009-05-28 21:30                       ` David Miller
2009-05-28 12:17                   ` Dmitry Eremin-Solenikov
2009-05-28 12:48                     ` David Gibson
2009-05-28 12:48                       ` David Gibson
2009-05-28 12:55                       ` David Gibson
2009-05-28 12:55                         ` David Gibson
2009-05-28 14:13                     ` Grant Likely
2009-05-28 14:13                       ` Grant Likely
2009-05-28 16:53                       ` Russell King - ARM Linux
2009-05-28 16:53                         ` Russell King - ARM Linux
2009-05-28 17:05                         ` Grant Likely
2009-05-28 18:46                         ` Alexander Clouter
2009-05-28 18:46                           ` Alexander Clouter
2009-05-28 22:21                       ` Benjamin Herrenschmidt
2009-05-28 22:21                         ` Benjamin Herrenschmidt
2009-05-29  1:39                         ` David Gibson
2009-05-29  1:39                           ` David Gibson
2009-05-29  1:59                           ` Mitch Bradley
2009-05-29  1:59                             ` Mitch Bradley
2009-05-29  3:52                             ` Benjamin Herrenschmidt
2009-05-29  3:52                               ` Benjamin Herrenschmidt
2009-05-29  4:11                               ` David Miller
2009-05-29  4:11                                 ` David Miller
2009-05-29  4:11                             ` David Miller
2009-05-29  4:11                               ` David Miller
2009-05-29  4:56                               ` Benjamin Herrenschmidt
2009-05-29  4:56                                 ` Benjamin Herrenschmidt
2009-05-29  5:11                                 ` David Miller
2009-05-29  5:11                                   ` David Miller
2009-05-28 10:00                 ` Benjamin Herrenschmidt
2009-05-28 10:00                   ` Benjamin Herrenschmidt
2009-05-28 11:44                 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-28 11:44                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-28 12:47                 ` Jon Smirl
2009-05-28 12:47                   ` Jon Smirl
2009-05-28 14:39                   ` Grant Likely
2009-05-28 14:39                     ` Grant Likely
2009-05-28 14:54                 ` Grant Likely
2009-05-28 14:54                   ` Grant Likely
2009-05-27 18:26           ` Peter Korsgaard
2009-05-27 16:32       ` Mark Brown
2009-05-27 18:50         ` Jon Smirl
2009-05-27 22:24           ` Mark Brown
2009-05-27 22:24             ` Mark Brown
2009-05-28  0:04             ` Jon Smirl
2009-05-28  0:04               ` Jon Smirl
2009-05-28 13:07               ` Mark Brown
2009-05-27 20:42         ` Grant Likely
2009-05-27 20:42           ` Grant Likely
2009-05-27 21:38           ` Mark Brown
2009-05-27 21:38             ` Mark Brown
2009-05-28  3:02       ` David Gibson
2009-05-28  3:02         ` David Gibson
2009-05-28  7:32       ` Benjamin Herrenschmidt
2009-05-28  7:32         ` Benjamin Herrenschmidt
2009-05-28 13:38         ` Grant Likely
2009-05-28 13:38           ` Grant Likely
2009-05-27 22:01     ` Mitch Bradley
2009-05-27 22:01       ` Mitch Bradley
2009-05-28  8:17       ` Benjamin Herrenschmidt
2009-05-28  8:17         ` Benjamin Herrenschmidt
2009-05-28 12:43     ` Holger Schurig
2009-05-28 13:12       ` Mark Brown
2009-05-27 17:44   ` Russell King
2009-05-27 17:44     ` Russell King
2009-05-27 17:52     ` Grant Likely
2009-05-27 17:52       ` Grant Likely
2009-05-28  3:44       ` David Gibson
2009-05-28  3:44         ` David Gibson
2009-05-30 11:22 ` Pavel Machek
2009-05-31  1:29   ` Kyle Moffett
2009-05-31  5:56     ` David Miller
2009-06-01  8:37     ` Dmitry Eremin-Solenikov
2009-05-31 10:08 ` Russell King - ARM Linux
2009-06-01  9:24   ` Stephen Rothwell
2009-06-01 10:36   ` Janboe Ye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gvm73f$ub5$2@ger.gmane.org' \
    --to=dbaryshkov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.