qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Kambalin, Sergey" <sergey.kambalin@auriga.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Sergey Kambalin" <serg.oker@gmail.com>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] Use named constants in BCM props
Date: Tue, 13 Jun 2023 19:00:57 +0000	[thread overview]
Message-ID: <60638efd8f464e66afc5e2a106f09d5f@auriga.com> (raw)
In-Reply-To: <6fe833be-d884-663d-a58e-d3716e52e3d9@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]




________________________________
От: Philippe Mathieu-Daudé <philmd@linaro.org>
Отправлено: 13 июня 2023 г. 1:30
Кому: Sergey Kambalin; qemu-arm@nongnu.org
Копия: qemu-devel@nongnu.org; Kambalin, Sergey
Тема: Re: [PATCH v2] Use named constants in BCM props

On 12/6/23 13:59, Sergey Kambalin wrote:
> ping
>
> - PI_FIRMWARE_*_RATE constsnts were moved to raspberrypi-fw-defs.h
>    (seems more suitable place for them)
> - inclusion of "qemu/osdep.h" has been removed
> - year in copyright header has been updated
>
> Signed-off-by: Sergey Kambalin <sergey.kambalin@auriga.com>
> ---
>   hw/misc/bcm2835_property.c            | 120 ++++++++++---------
>   include/hw/arm/raspi_platform.h       |   6 +
>   include/hw/misc/raspberrypi-fw-defs.h | 163 ++++++++++++++++++++++++++
>   3 files changed, 236 insertions(+), 53 deletions(-)
>   create mode 100644 include/hw/misc/raspberrypi-fw-defs.h


> diff --git a/include/hw/arm/raspi_platform.h b/include/hw/arm/raspi_platform.h
> index 4a56dd4b89..92a317950a 100644
> --- a/include/hw/arm/raspi_platform.h
> +++ b/include/hw/arm/raspi_platform.h
> @@ -170,4 +170,10 @@
>   #define INTERRUPT_ILLEGAL_TYPE0        6
>   #define INTERRUPT_ILLEGAL_TYPE1        7
>
> +/* Clock rates */
> +#define RPI_FIRMWARE_EMMC_CLK_RATE    50000000

OK.

> +#define RPI_FIRMWARE_UART_CLK_RATE    3000000

OK.

> +#define RPI_FIRMWARE_CORE_CLK_RATE    350000000

Seems VC4 frequency range, adapted for raspi3 (BCM2837).

IIUC the VC6 (raspi4) is clocked at 500MHz.

S.K.: You're right! There should be 250 MHz as these are bcm2835 values, not bcm2711(rpi4)

> +#define RPI_FIRMWARE_DEFAULT_CLK_RATE 700000000

Seems VC4 freq for raspi1 (BCM2835)

Likely we don't want to use a default, but the correct per-soc
value...

S.K.:  Per-soc values are not implemented yet, and I'm not 100% sure if it's needed.
          So I decided to return BCM2835 core clock as a default value.
          May be leaving LOG_UNIMP message would have been a better option?

Should I fix it there or pull your split patch and continue it as v4?

[-- Attachment #2: Type: text/html, Size: 4695 bytes --]

  reply	other threads:[~2023-06-13 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5b407848-2a4c-6447-6726-cf85f278f3e7@linaro.org>
2023-06-12 11:59 ` [PATCH v2] Use named constants in BCM props Sergey Kambalin
2023-06-12 22:30   ` Philippe Mathieu-Daudé
2023-06-13 19:00     ` Kambalin, Sergey [this message]
2023-06-03  9:29 Sergey Kambalin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60638efd8f464e66afc5e2a106f09d5f@auriga.com \
    --to=sergey.kambalin@auriga.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=serg.oker@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).