From: Pavel Herrmann <morpheus.ibis@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 26/29] dm: Add child_pre_probe() and child_post_remove() methods
Date: Thu, 17 Jul 2014 09:09:55 +0200 [thread overview]
Message-ID: <22318864.0P9AQbsrg1@bloomfield> (raw)
In-Reply-To: <CAPnjgZ0Kcu_EdT5SYd=+5HRkQMeU2nf5Xb2AVLFhq=LgLhiPqg@mail.gmail.com>
On Wednesday 16 of July 2014 23:41:57 Simon Glass wrote:
> Hi Pavel,
>
> On 15 July 2014 02:26, Pavel Herrmann <morpheus.ibis@gmail.com> wrote:
> > Hi
> >
> > On Tuesday 08 of July 2014 21:38:16 Simon Glass wrote:
> >> ...
> >> +
> >> +Note that the information that controls this behaviour is in the bus's
> >> +driver, not the child's. In fact it is possible that child has no
> >> knowledge +that it is connected to a bus. The same child device may even
> >> be used on two +different bus types. As an example. the 'flash' device
> >> shown above may also +be connected on a SATA bus or standalone with no
> >> bus:
> >> +
> >> + xhci_usb (UCLASS_USB)
> >> + flash (UCLASS_FLASH_STORAGE) - parent data/methods defined by USB
> >> bus +
> >> + sata (UCLASS_SATA)
> >> + flash (UCLASS_FLASH_STORAGE) - parent data/methods defined by
> >> SATA
> >> bus +
> >> + flash (UCLASS_FLASH_STORAGE) - no parent data/methods (not on a bus)
> >
> > this is not the best example, since the driver actually needs to have an
> > idea what parent bus it is connected to, as it should use the parents
> > driver.ops to communicate with the device.
>
> Yes, it's not a good example.
>
> > the better (more realistic) version would show that the same device would
> > operate under various xhci_usb, ohci_usb and ehci_usb busses, which might
> > very well have different parent_priv structure (for example, ohci_usb
> > would probably not store maximum speed supported by the device, since the
> > bus only has the basic one)
>
> They still use the parent driver ops, but now they are all the same?
> Do you mean that the uclass would be the same for each bus?
Yes, I imagine the uclass for USB host controller would the same, not
depending on the speed of the controller.
> > as a side note, flash is a bit tricky here, since USB and SATA do not
> > provide you with "flash-like" interface even for flash-based devices, but
> > instead have a disk-like interface, which is simpler (does not give you
> > the ability to control bad block management, among other things).
>
> Another reason why the example is poor - I was more thinking of flash
> as a disk than a raw NAND device.
>
> Regards,
> Simon
regards
Pavel Herrmann
next prev parent reply other threads:[~2014-07-17 7:09 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 3:37 [U-Boot] [PATCH v2 0/29] Add additional core driver model features Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 01/29] dm: gpio: Don't use the driver model uclass for SPL Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 02/29] dm: Use an explicit expect value in core tests Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 03/29] stdio: Remove redundant code around stdio_register() calls Simon Glass
2014-07-10 23:23 ` Marek Vasut
2014-07-13 16:13 ` Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 04/29] stdio: Pass device pointer to stdio methods Simon Glass
2014-07-10 23:26 ` Marek Vasut
2014-07-11 4:29 ` Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 05/29] dm: Make sure that the root device is probed Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 06/29] dm: Provide a way to shut down driver model Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 07/29] sandbox: Remove all drivers before exit Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 08/29] dm: Allow drivers to be marked 'before relocation' Simon Glass
2014-07-10 23:29 ` Marek Vasut
2014-07-13 18:38 ` Simon Glass
2014-07-09 3:37 ` [U-Boot] [PATCH v2 09/29] dm: Support driver model prior to relocation Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 10/29] stdio: Provide functions to add/remove devices using stdio_dev Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 11/29] console: Remove vprintf() optimisation for sandbox Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 12/29] Add a flag indicating when the serial console is ready Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 13/29] dm: Move uclass error checking/probing into a function Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 14/29] fdt: Add a function to get the alias sequence of a node Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 15/29] dm: Move device display into its own function Simon Glass
2014-07-10 23:33 ` Marek Vasut
2014-07-11 4:27 ` Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 16/29] dm: Avoid activating devices in 'dm uclass' command Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 17/29] dm: Introduce device sequence numbering Simon Glass
2014-07-09 13:53 ` Jon Loeliger
2014-07-19 3:22 ` Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 18/29] dm: Display the sequence number for each device Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 19/29] dm: Allow a device to be found by its FDT offset Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 20/29] dm: Avoid accessing uclasses before they are ready Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 21/29] fdt: Add a function to get the node offset of an alias Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 22/29] dm: Tidy up some header file comments Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 23/29] dm: Provide a function to scan child FDT nodes Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 24/29] dm: Add functions to access a device's children Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 25/29] dm: Introduce per-child data for devices Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 26/29] dm: Add child_pre_probe() and child_post_remove() methods Simon Glass
2014-07-15 8:26 ` Pavel Herrmann
2014-07-17 5:41 ` Simon Glass
2014-07-17 7:09 ` Pavel Herrmann [this message]
2014-07-17 15:20 ` Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 27/29] dm: Improve errors and warnings in lists_bind_fdt() Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 28/29] dm: Add dm_scan_other() to locate board-specific devices Simon Glass
2014-07-09 3:38 ` [U-Boot] [PATCH v2 29/29] dm: Give the demo uclass a name Simon Glass
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=22318864.0P9AQbsrg1@bloomfield \
--to=morpheus.ibis@gmail.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox