qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH v2 4/5] ast2400: create SPI flash slaves


From: Cédric Le Goater
Subject: Re: [Qemu-arm] [PATCH v2 4/5] ast2400: create SPI flash slaves
Date: Mon, 20 Jun 2016 18:02:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

On 06/20/2016 05:38 PM, Peter Maydell wrote:
> On 17 June 2016 at 13:15, Cédric Le Goater <address@hidden> wrote:
>> A set of SPI flash slaves is attached under the flash controllers of
>> the palmetto platform. "n25q256a" flash modules are used for the BMC
>> and "mx25l25635e" for the host. These types are common in the
>> OpenPower ecosystem.
>>
>> The segment addresses used for the memory mappings are the defaults
>> provided by the specs. They can be changed with the Segment Address
>> Register but this is not supported in the current implementation.
>>
>> Signed-off-by: Cédric Le Goater <address@hidden>
>> ---
> 
>> diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
>> index 6a02906c8f97..a8337eb81975 100644
>> --- a/hw/ssi/aspeed_smc.c
>> +++ b/hw/ssi/aspeed_smc.c
> 
>> +void aspeed_smc_init_flashes(AspeedSMCState *s, const char *flashtype,
>> +                             Error **errp)
>> +{
>> +    int i ;
>> +    char name[32];
>> +
>> +    for (i = 0; i < s->num_cs; ++i) {
>> +        Object *obj = object_new(TYPE_ASPEED_SMC_FLASH);
>> +        AspeedSMCFlashState *fl = ASPEED_SMC_FLASH(obj);
>> +        DriveInfo *dinfo = drive_get_next(IF_MTD);
> 
> You don't want to be calling drive_get_next() in code in
> hw/ssi -- that should be done at the board level, and then
> the board creates the flash device and sets its drive property
> and connects the flash device up to the SSI controller.

OK. I will rework that part.
 
Thanks,

C.




reply via email to

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