From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Andrzej Zaborowski <balrogg@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH for-3.0 1/1] hw/sd/omap_mmc: Split 'pseudo-reset' from 'power-on-reset'
Date: Mon, 9 Jul 2018 14:07:44 +0100 [thread overview]
Message-ID: <CAFEAcA8zeJYCD_1fee==nCYo8tWk61wzQoiR_KEA8CZ_GzyBaw@mail.gmail.com> (raw)
In-Reply-To: <20180706162155.8432-2-f4bug@amsat.org>
On 6 July 2018 at 17:21, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> DeviceClass::reset models a "cold power-on" reset which can
> also be use to powercycle a device; but there is no "hot reset"
> (a.k.a. soft-reset) method available.
>
> The OMAP MMC Power-Up Control bit is not designed to powercycle
> a card, but to disable it without powering it off (pseudo-reset):
>
> Multimedia Card (MMC/SD/SDIO) Interface [SPRU765A]
>
> MMC_CON[11] Power-Up Control (POW)
> This bit must be set to 1 before any valid transaction to either
> MMC/SD or SPI memory cards.
> When 1, the card is considered powered-up and the controller core
> is enabled.
> When 0, the card is considered powered-down (system dependent),
> and the controller core logic is in pseudo-reset state. This is,
> the MMC_STAT flags and the FIFO pointers are reset, any access to
> MMC_DATA[DATA] has no effect, a write into the MMC.CMD register
> is ignored, and a setting of MMC_SPI[STR] to 1 is ignored.
This text says that the card "is considered powered-down (system
dependent)", so it's not entirely invalid to reset the card here.
Still, if the guests get confused by it I guess that the n8x0
systems didn't do that, and certainly resetting the other parts
of the controller state is wrong.
Strictly I guess we should also check the enable flag for the other
things this text calls out:
* accesses to MMC_DATA[DATA]
* writes to MMC.CMD (we already do this)
* setting MMC_SPI[STR] to 1 (we don't emulate MMC_SPI)
but we should probably consider that a separate bug. (And the
n8x0 boards are pretty much unmaintained currently, so I don't
care very much whether we fix it or not. I don't have any working
test images -- I have one of uncertain vintage which seems to
be flaky when it gets to the mmc card init, but I think it
makes a bit more progress with this patch now.)
Applied to target-arm.next, thanks.
thanks
-- PMM
next prev parent reply other threads:[~2018-07-09 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 16:21 [Qemu-devel] [PATCH for-3.0 0/1] Fix the Nokia N810 tablet MMC Philippe Mathieu-Daudé
2018-07-06 16:21 ` [Qemu-devel] [PATCH for-3.0 1/1] hw/sd/omap_mmc: Split 'pseudo-reset' from 'power-on-reset' Philippe Mathieu-Daudé
2018-07-09 13:07 ` Peter Maydell [this message]
2018-07-09 13:13 ` [Qemu-devel] [PATCH for-3.0 0/1] Fix the Nokia N810 tablet MMC Peter Maydell
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='CAFEAcA8zeJYCD_1fee==nCYo8tWk61wzQoiR_KEA8CZ_GzyBaw@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=balrogg@gmail.com \
--cc=f4bug@amsat.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).