[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v5 05/28] hw/block/pflash_cfi02: Ad
From: |
Alistair Francis |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v5 05/28] hw/block/pflash_cfi02: Add an enum to define the write cycles |
Date: |
Fri, 28 Jun 2019 08:56:29 -0700 |
On Thu, Jun 27, 2019 at 1:44 PM Philippe Mathieu-Daudé
<address@hidden> wrote:
>
> No change in functionality is intended with this commit.
>
> Signed-off-by: Stephen Checkoway <address@hidden>
> Message-Id: <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Tested-by: Philippe Mathieu-Daudé <address@hidden>
> [PMD: Extracted from bigger patch]
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> hw/block/pflash_cfi02.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
> index 43796e551a..303d225f23 100644
> --- a/hw/block/pflash_cfi02.c
> +++ b/hw/block/pflash_cfi02.c
> @@ -57,6 +57,11 @@ do {
> \
>
> #define PFLASH_LAZY_ROMD_THRESHOLD 42
>
> +/* Special write cycles for CFI queries. */
> +enum {
> + WCYCLE_CFI = 7,
> +};
> +
> struct PFlashCFI02 {
> /*< private >*/
> SysBusDevice parent_obj;
> @@ -286,7 +291,7 @@ static void pflash_write(PFlashCFI02 *pfl, hwaddr offset,
> if (boff == 0x55 && cmd == 0x98) {
> enter_CFI_mode:
> /* Enter CFI query mode */
> - pfl->wcycle = 7;
> + pfl->wcycle = WCYCLE_CFI;
> pfl->cmd = 0x98;
> return;
> }
> @@ -458,7 +463,8 @@ static void pflash_write(PFlashCFI02 *pfl, hwaddr offset,
> goto reset_flash;
> }
> break;
> - case 7: /* Special value for CFI queries */
> + /* Special values for CFI queries */
> + case WCYCLE_CFI:
> DPRINTF("%s: invalid write in CFI query mode\n", __func__);
> goto reset_flash;
> default:
> --
> 2.20.1
>
>
- [Qemu-block] [PATCH v5 01/28] tests/pflash-cfi02: Add test for supported CFI commands, (continued)
- [Qemu-block] [PATCH v5 01/28] tests/pflash-cfi02: Add test for supported CFI commands, Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 02/28] hw/block/pflash: Simplify trace_pflash_io_read/write(), Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 03/28] hw/block/pflash: Simplify trace_pflash_data_read/write(), Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 04/28] hw/block/pflash_cfi02: Fix debug format string, Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 05/28] hw/block/pflash_cfi02: Add an enum to define the write cycles, Philippe Mathieu-Daudé, 2019/06/27
- Re: [Qemu-block] [Qemu-devel] [PATCH v5 05/28] hw/block/pflash_cfi02: Add an enum to define the write cycles,
Alistair Francis <=
- [Qemu-block] [PATCH v5 06/28] hw/block/pflash_cfi02: Add helpers to manipulate the status bits, Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 07/28] hw/block/pflash_cfi02: Simplify a statement using fall through, Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 08/28] hw/block/pflash_cfi02: Use the ldst API in pflash_write(), Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 09/28] hw/block/pflash_cfi02: Use the ldst API in pflash_read(), Philippe Mathieu-Daudé, 2019/06/27
- [Qemu-block] [PATCH v5 11/28] hw/block/pflash_cfi02: Unify the MemoryRegionOps, Philippe Mathieu-Daudé, 2019/06/27