qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: "Cédric Le Goater" <clg@kaod.org>, 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: Thu, 15 Aug 2019 15:21:50 -0500	[thread overview]
Message-ID: <cb2d52b2-65ef-41d6-0e3f-6aefb78f4d34@linux.ibm.com> (raw)
In-Reply-To: <24e21dd0-55b8-a5df-57da-2d68bee204a0@linux.ibm.com>


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.


>
>
>>
>>> +    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, 

  reply	other threads:[~2019-08-15 20:22 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 [this message]
2019-08-19  6:42       ` Cédric Le Goater
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=cb2d52b2-65ef-41d6-0e3f-6aefb78f4d34@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --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).