From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ums: Add "dev num" parameter. Check mmc device before do ums init.
Date: Wed, 4 Sep 2013 14:34:10 +0200 [thread overview]
Message-ID: <201309041434.10316.marex@denx.de> (raw)
In-Reply-To: <522703F6.6020507@samsung.com>
Dear Przemyslaw Marczak,
> Hello Marek,
> Thank you for reply.
>
> On 09/04/2013 12:26 AM, Marek Vasut wrote:
> > Dear Przemyslaw Marczak,
> >
> >> This change allows using every mmc device instance with ums, like eMMC
> >> or SD cards. Now MMC device is checked before ums is inited.
> >>
> >> Example of use: ums <device_number> for mmc devices.
> >>
> >> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> >> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> >> CC: Marek Vasut <marek.vasut@gmail.com>
> >> ---
> >>
> >> board/samsung/trats/trats.c | 12 +++---------
> >> common/cmd_usb_mass_storage.c | 30 ++++++++++++++----------------
> >> include/usb_mass_storage.h | 4 ++--
> >> 3 files changed, 19 insertions(+), 27 deletions(-)
> >>
> >> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
> >> index 7f61d17..b7f7b05 100644
> >> --- a/board/samsung/trats/trats.c
> >> +++ b/board/samsung/trats/trats.c
> >> @@ -816,17 +816,11 @@ static struct ums_board_info ums_board = {
> >>
> >> },
> >>
> >> };
> >>
> >> -struct ums_board_info *board_ums_init(unsigned int dev_num, unsigned
> >> int offset, - unsigned int part_size)
> >> +struct ums_board_info *board_ums_init(struct mmc *mmc, unsigned int
> >> offset, + unsigned int part_size)
> >>
> >> {
> >>
> >> - struct mmc *mmc;
> >> -
> >> - mmc = find_mmc_device(dev_num);
> >> - if (!mmc)
> >> - return NULL;
> >> -
> >>
> >> ums_board.ums_dev.mmc = mmc;
> >>
> >> - ums_board.ums_dev.dev_num = dev_num;
> >> + ums_board.ums_dev.dev_num = mmc->block_dev.dev;
> >
> > You already pass "mmc", why pass mmc->block_dev.dev too? Is it not a
> > little redundant?
>
> You are right, it is little redundant but pointer to this structure is
> returned so we expect that structure fields were proper filled, right?
Why not just remove the dev_num field ? The UMS core can retrieve that
information itself.
[...]
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-09-04 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 12:57 [U-Boot] [PATCH] arm:mmc:goni/exynos: Fix wrong mmc base register devices offset Przemyslaw Marczak
2013-09-03 12:57 ` [U-Boot] [PATCH] ums: Add "dev num" parameter. Check mmc device before do ums init Przemyslaw Marczak
2013-09-03 22:26 ` Marek Vasut
2013-09-04 9:57 ` Przemyslaw Marczak
2013-09-04 12:34 ` Marek Vasut [this message]
2013-09-04 14:01 ` Przemyslaw Marczak
2013-09-09 8:05 ` [U-Boot] [PATCH] arm:mmc:goni/exynos: Fix wrong mmc base register devices offset Przemyslaw Marczak
2013-09-11 1:53 ` Minkyu Kang
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=201309041434.10316.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