qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v2 3/3] bcm2835: add sdhost and gpio controllers


From: Clement Deschamps
Subject: Re: [Qemu-arm] [PATCH v2 3/3] bcm2835: add sdhost and gpio controllers
Date: Wed, 22 Feb 2017 23:59:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

Hello,


On 02/22/2017 07:27 PM, Andrew Baumann wrote:
> Hi,
>
>> From: Clement Deschamps [mailto:address@hidden
>> Sent: Wednesday, 22 February 2017 3:24
>> Subject: [PATCH v2 3/3] bcm2835: add sdhost and gpio controllers
>>
>> This adds the bcm2835_sdhost and bcm2835_gpio to the BCM2835 platform.
>>
>> The bcm2835_gpio has a link to both the sdhci and sdhost controllers for
>> supporting the alternate function of GPIOs 48-53 (SD controller selection)
>>
>> Signed-off-by: Clement Deschamps <address@hidden>
> [...]
>> +    /* SDHOST */
>> +    object_property_set_bool(OBJECT(&s->sdhost), true, "realized", &err);
>> +    if (err) {
>> +        error_propagate(errp, err);
>> +        return;
>> +    }
>> +
>> +    memory_region_add_subregion(&s->peri_mr, MMCI0_OFFSET,
>> +                sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->sdhost), 0));
>> +    sysbus_connect_irq(SYS_BUS_DEVICE(&s->sdhost), 0,
>> +        qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
>> +                               INTERRUPT_SDIO));
>> +    object_property_add_alias(OBJECT(s), "sd-bus-2", OBJECT(&s->sdhost),
>> +                              "sd-bus", &err);
> Is this alias still meaningful / needed, or is it a relic from the previous 
> version? Right now it doesn't appear to be used, and I'm thinking that if 
> someone did try to use it (e.g. at the board level by connecting an SD card) 
> then the new GPIO logic would allow swapping the two SD cards between the two 
> controllers, which doesn't sound like a faithful recreation of the hardware.
>
> Otherwise,
> Reviewed-by: Andrew Baumann <address@hidden>
>
> Cheers,
> Andrew

Thank you Andrew for your review.

You're right, we don't need to expose anymore the sdbus of the sdhost.
We can remove this alias.


Peter, do you agree with the sdcard reparenting function I implemented
in the GPIO controller (following your advices) ?


Best,
Clément




reply via email to

[Prev in Thread] Current Thread [Next in Thread]