From: "Cédric Le Goater" <clg@kaod.org>
To: Eddie James <eajames@linux.ibm.com>, qemu-devel@nongnu.org
Cc: andrew@aj.id.au, peter.maydell@linaro.org, qemu-arm@nongnu.org,
joel@jms.id.au
Subject: Re: [Qemu-devel] [RFC v2] hw/sd/aspeed_sdhci: New device
Date: Mon, 19 Aug 2019 08:42:58 +0200 [thread overview]
Message-ID: <e93c7ced-ad33-fbca-427b-8996bb4860fe@kaod.org> (raw)
In-Reply-To: <cb2d52b2-65ef-41d6-0e3f-6aefb78f4d34@linux.ibm.com>
On 15/08/2019 22:21, Eddie James wrote:
>
> On 8/15/19 3:13 PM, Eddie James wrote:
>>
>> On 8/15/19 3:05 AM, Cédric Le Goater wrote:
>>> Hello Eddie,
>>>
>>> On 14/08/2019 22:27, Eddie James wrote:
>>>>
>>>> + sdhci->slots[0].capareg = (uint64_t)(uint32_t)val;
>>>> + break;
>>>> + case ASPEED_SDHCI_SDIO_148:
>>>> + sdhci->slots[0].maxcurr = (uint64_t)(uint32_t)val;
>>>> + break;
>>>> + case ASPEED_SDHCI_SDIO_240:
>>>> + sdhci->slots[1].capareg = (uint64_t)(uint32_t)val;
>>>> + break;
>>>> + case ASPEED_SDHCI_SDIO_248:
>>>> + sdhci->slots[1].maxcurr = (uint64_t)(uint32_t)val;
>>>> + break;
>>> I think these regs are readonly.
>>
>>
>> Well the actual regs at slot + 0x40/0x48 are indeed, but not the Aspeed-specific ones that mirror there. I think the idea is that Aspeed-specific code can set it's capabilities differently if desired. This may prevent the use of alias regions here.
>
>
> Actually I could be wrong after reading the specs again. It's a little confusing. I'm fine with making it read-only anyway, I doubt there will be any code that needs to write it.
Let's ask Aspeed what was the intent. It is a bit weird indeed.
>
>
>>
>>
>>>
>>>> + default:
>>>> + if (addr < ASPEED_SDHCI_REG_SIZE) {
>>>> + sdhci->regs[TO_REG(addr)] = (uint32_t)val;
>>>> + }
>>>> + }
>>>> +}
>>>> +
>>>> +static const MemoryRegionOps aspeed_sdhci_ops = {
>>>> + .read = aspeed_sdhci_read,
>>>> + .write = aspeed_sdhci_write,
>>>> + .endianness = DEVICE_NATIVE_ENDIAN,
>>>> + .valid.min_access_size = 4,
next prev parent reply other threads:[~2019-08-19 6:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 20:27 [Qemu-devel] [RFC v2] hw/sd/aspeed_sdhci: New device Eddie James
2019-08-15 8:05 ` Cédric Le Goater
2019-08-15 20:13 ` Eddie James
2019-08-15 20:21 ` Eddie James
2019-08-19 6:42 ` Cédric Le Goater [this message]
2019-08-19 6:41 ` Cédric Le Goater
2019-08-20 19:08 ` Eddie James
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=e93c7ced-ad33-fbca-427b-8996bb4860fe@kaod.org \
--to=clg@kaod.org \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=peter.maydell@linaro.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).