On Wed, 26 Jul 2023 at 15:12, Sergey Kambalin <[email protected]> wrote:
>
> Signed-off-by: Sergey Kambalin <[email protected]>
> ---
> tests/qtest/bcm2838-mailbox.c | 70 +++++++++++++++++++++++++++++++++++
> tests/qtest/bcm2838-mailbox.h | 48 ++++++++++++++++++++++++
> tests/qtest/meson.build | 1 +
> 3 files changed, 119 insertions(+)
> create mode 100644 tests/qtest/bcm2838-mailbox.c
> create mode 100644 tests/qtest/bcm2838-mailbox.h
> index 0000000000..a81b325af9
> --- /dev/null
> +++ b/tests/qtest/bcm2838-mailbox.h
> @@ -0,0 +1,48 @@
> +/*
> + * Declarations for BCM2838 mailbox test.
> + *
> + * Copyright (c) 2023 Auriga LLC
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
> + * See the COPYING file in the top-level directory.
> + */
> +
> +typedef union {
> + uint32_t value;
> + struct {
> + uint32_t channel: 4;
> + uint32_t data : 28;
> + } fields;
> +} MboxRegWrite;
Again, you can't use bitfields for this kind of thing, I'm afraid.
thanks
-- PMM