[PATCH qemu 13/38] aspeed/smc: introduce a aspeed_smc_flash_update_cs() helper
Joel Stanley
joel at jms.id.au
Mon Nov 21 18:26:49 AEDT 2016
On Sat, Nov 19, 2016 at 12:51 AM, Cédric Le Goater <clg at kaod.org> wrote:
> aspeed_smc_update_cs() was uselessly looping on all CS to update their
> status.
>
> Signed-off-by: Cédric Le Goater <clg at kaod.org>
Reviewed-by: Joel Stanley <joel at jms.id.au>
> ---
> hw/ssi/aspeed_smc.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
> index 91cdc0bf1ac7..1c6c5089f265 100644
> --- a/hw/ssi/aspeed_smc.c
> +++ b/hw/ssi/aspeed_smc.c
> @@ -408,14 +408,10 @@ static const MemoryRegionOps aspeed_smc_flash_ops = {
> },
> };
>
> -static void aspeed_smc_update_cs(const AspeedSMCState *s)
> +static void aspeed_smc_flash_update_cs(AspeedSMCFlash *fl)
This hunk should have been in patch 12 I think.
> {
> - int i;
> -
> - for (i = 0; i < s->num_cs; ++i) {
> - qemu_set_irq(s->cs_lines[i],
> - aspeed_smc_is_ce_stop_active(&s->flashes[i]));
> - }
> + AspeedSMCState *s = fl->controller;
> + qemu_set_irq(s->cs_lines[fl->id], aspeed_smc_is_ce_stop_active(fl));
> }
More information about the openbmc
mailing list