public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: add wrappers for MMC block_{read, write, erase}
Date: Fri, 30 May 2014 11:07:07 -0600	[thread overview]
Message-ID: <5388BABB.9020808@wwwdotorg.org> (raw)
In-Reply-To: <5388B820.7030806@broadcom.com>

On 05/30/2014 10:56 AM, Steve Rae wrote:
> On 14-05-30 08:58 AM, Stephen Warren wrote:
...
>> What code are you
>> looking at that handles multiple devices sequentially under program
>> control rather than user command control?
>
> Cannot go into too much detail here (yet) -- but imagine the situation
> where:
> - lookup the GPT partition name (in User, Boot1, Boot2)
> - do a block_write to the desired location...

So this is all to support some non-upstream code that you can't discuss?
That doesn't sound good...

> So after discussing with a colleague, we would propose the following.
> Does this implement what you were proposing?:
> 
> 
> Usage (example):
> 
> mmc->part_num_next_block_op = 1;          /* specify Boot1 partition */
> mmc->block_dev.block_read(0, 0, 1, buf);  /* read first block from Boot1
> partition */
> mmc->part_num_next_block_op = 0;          /* specify User partition */
> mmc->block_dev.block_read(0, 0, 1, buf);  /* read first block from User
> partition */

No. I would propose:

get_device("mmc", "0.1", &bdev_boot1);
bdev_boot1->block_read(...);
get_device("mmc", "0.0", &bdev_user);
bdev_user->block_read(...);

That way, nothing needs to change in block_dev_desc_t, get_device(), etc.

  reply	other threads:[~2014-05-30 17:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 22:15 [U-Boot] [PATCH] mmc: add wrappers for MMC block_{read, write, erase} Steve Rae
2014-05-29  5:47 ` Jaehoon Chung
2014-05-29  7:03 ` Jaehoon Chung
2014-05-29 17:24   ` Steve Rae
2014-05-29 16:25 ` Stephen Warren
2014-05-29 17:58   ` Steve Rae
2014-05-29 18:51     ` Stephen Warren
2014-05-29 19:44       ` Steve Rae
2014-05-29 20:30         ` Stephen Warren
2014-05-29 22:03           ` Steve Rae
2014-05-30 15:58             ` Stephen Warren
2014-05-30 16:56               ` Steve Rae
2014-05-30 17:07                 ` Stephen Warren [this message]
2014-05-30 18:39                   ` Steve Rae
2014-06-02  6:42 ` Pantelis Antoniou
2014-06-02 16:30   ` Stephen Warren

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=5388BABB.9020808@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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