public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 02/22] stdio: Pass device pointer to stdio methods
Date: Sun, 1 Jun 2014 19:32:46 +0200	[thread overview]
Message-ID: <201406011932.46677.marex@denx.de> (raw)
In-Reply-To: <1400966481-14131-3-git-send-email-sjg@chromium.org>

On Saturday, May 24, 2014 at 11:21:01 PM, Simon Glass wrote:
> At present stdio device functions do not get any clue as to which stdio
> device is being acted on. Some implementations go to great lengths to work
> around this, such as defining a whole separate set of functions for each
> possible device.
> 
> For driver model we need to associate a stdio_dev with a device. It doesn't
> seem possible to continue with this work-around approach.
> 
> Instead, add a stdio_dev pointer to each of the stdio member functions.
> 
> Note: The serial drivers have the same problem, but it is not strictly
> necessary to fix that to get driver model running. Also, if we convert
> serial over to driver model the problem will go away.
> 
> Code size increases by 244 bytes for Thumb2 and 428 for PowerPC.
> 
> 22: stdio: Pass device pointer to stdio methods
>        arm: (for 2/2 boards)  all +244.0  bss -4.0  text +248.0
>    powerpc: (for 1/1 boards)  all +428.0  text +428.0
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Thanks for doing this !

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

  reply	other threads:[~2014-06-01 17:32 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-24 21:20 [U-Boot] [RFC PATCH 0/22] Introduce driver model serial uclass Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 01/22] stdio: Remove redundant code around stdio_register() calls Simon Glass
2014-06-01 17:30   ` Marek Vasut
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 02/22] stdio: Pass device pointer to stdio methods Simon Glass
2014-06-01 17:32   ` Marek Vasut [this message]
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 03/22] dm: Make sure that the root device is probed Simon Glass
2014-06-01 17:33   ` Marek Vasut
2014-06-03  1:59     ` Simon Glass
2014-06-03 11:25       ` Marek Vasut
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 04/22] dm: Provide a way to shut down driver model Simon Glass
2014-06-01 17:34   ` Marek Vasut
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 05/22] sandbox: Remove all drivers before exit Simon Glass
2014-05-27 15:28   ` Jon Loeliger
2014-05-27 21:05     ` Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 06/22] dm: Tidy up four minor code nits Simon Glass
2014-06-01 17:34   ` Marek Vasut
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 07/22] dm: Allow drivers to be marked 'before relocation' Simon Glass
2014-05-27 15:36   ` Jon Loeliger
2014-05-27 21:09     ` Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 08/22] dm: Use '*' to indicate a device is activated Simon Glass
2014-05-27 14:25   ` Jon Loeliger
2014-05-30 14:37     ` Simon Glass
2014-06-01 17:35     ` Marek Vasut
2014-06-21 16:14   ` Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 09/22] Remove form-feeds from dlmalloc.c Simon Glass
2014-05-27 14:22   ` Jon Loeliger
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 10/22] Add a simple malloc() implementation for pre-relocation Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 11/22] sandbox: config: Enable pre-relocation malloc() Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 12/22] dm: Support driver model prior to relocation Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 13/22] stdio: Provide functions to add/remove devices using stdio_dev Simon Glass
2014-06-01 17:37   ` Marek Vasut
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 14/22] console: Remove vprintf() optimisation for sandbox Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 15/22] Add a flag indicating when the serial console is ready Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 16/22] dm: Add a way to indicate a preferred device within a uclass Simon Glass
2014-05-27 15:42   ` Jon Loeliger
2014-05-30 14:43     ` Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 17/22] dm: Expand and improve the device lifecycle docs Simon Glass
2014-05-27 15:24   ` Jon Loeliger
2014-05-30 15:11     ` Simon Glass
2014-05-27 17:37   ` Jon Loeliger
2014-05-30 15:12     ` Simon Glass
     [not found]       ` <CAJgR-Bjc8rM3ASTxa1bZBHTjAu2WvCagTVDa3nNv+fAD3242vw@mail.gmail.com>
2014-06-02 15:49         ` Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 18/22] dm: Add a uclass for serial devices Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 19/22] Set up stdio earlier when using driver model Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 20/22] sandbox: Convert serial driver to use " Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 21/22] sandbox: serial: Support a coloured console Simon Glass
2014-05-24 21:21 ` [U-Boot] [RFC PATCH 22/22] sandbox: dts: Add a serial console node 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=201406011932.46677.marex@denx.de \
    --to=marex@denx.de \
    --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