0b474a5d544236f93231de514fea0bc95ab26bc8
[openwrt/staging/neocturne.git] /
1 From 9f520509f20c5c56a0e092c5fb3c991d02420672 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Tue, 20 Sep 2022 13:43:19 +0200
4 Subject: [PATCH] firmware: raspberrypi: Move the clock IDs to the
5 firmware header
6
7 We'll need the clock IDs in more drivers than just the clock driver from
8 now on, so let's move them in the firmware header.
9
10 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
11 Acked-by: Stephen Boyd <sboyd@kernel.org>
12 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
13 ---
14 drivers/clk/bcm/clk-raspberrypi.c | 19 -------------------
15 include/soc/bcm2835/raspberrypi-firmware.h | 19 +++++++++++++++++++
16 2 files changed, 19 insertions(+), 19 deletions(-)
17
18 --- a/drivers/clk/bcm/clk-raspberrypi.c
19 +++ b/drivers/clk/bcm/clk-raspberrypi.c
20 @@ -18,25 +18,6 @@
21
22 #include <soc/bcm2835/raspberrypi-firmware.h>
23
24 -enum rpi_firmware_clk_id {
25 - RPI_FIRMWARE_EMMC_CLK_ID = 1,
26 - RPI_FIRMWARE_UART_CLK_ID,
27 - RPI_FIRMWARE_ARM_CLK_ID,
28 - RPI_FIRMWARE_CORE_CLK_ID,
29 - RPI_FIRMWARE_V3D_CLK_ID,
30 - RPI_FIRMWARE_H264_CLK_ID,
31 - RPI_FIRMWARE_ISP_CLK_ID,
32 - RPI_FIRMWARE_SDRAM_CLK_ID,
33 - RPI_FIRMWARE_PIXEL_CLK_ID,
34 - RPI_FIRMWARE_PWM_CLK_ID,
35 - RPI_FIRMWARE_HEVC_CLK_ID,
36 - RPI_FIRMWARE_EMMC2_CLK_ID,
37 - RPI_FIRMWARE_M2MC_CLK_ID,
38 - RPI_FIRMWARE_PIXEL_BVB_CLK_ID,
39 - RPI_FIRMWARE_VEC_CLK_ID,
40 - RPI_FIRMWARE_NUM_CLK_ID,
41 -};
42 -
43 static char *rpi_firmware_clk_names[] = {
44 [RPI_FIRMWARE_EMMC_CLK_ID] = "emmc",
45 [RPI_FIRMWARE_UART_CLK_ID] = "uart",
46 --- a/include/soc/bcm2835/raspberrypi-firmware.h
47 +++ b/include/soc/bcm2835/raspberrypi-firmware.h
48 @@ -160,6 +160,25 @@ enum rpi_firmware_property_tag {
49 RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001,
50 };
51
52 +enum rpi_firmware_clk_id {
53 + RPI_FIRMWARE_EMMC_CLK_ID = 1,
54 + RPI_FIRMWARE_UART_CLK_ID,
55 + RPI_FIRMWARE_ARM_CLK_ID,
56 + RPI_FIRMWARE_CORE_CLK_ID,
57 + RPI_FIRMWARE_V3D_CLK_ID,
58 + RPI_FIRMWARE_H264_CLK_ID,
59 + RPI_FIRMWARE_ISP_CLK_ID,
60 + RPI_FIRMWARE_SDRAM_CLK_ID,
61 + RPI_FIRMWARE_PIXEL_CLK_ID,
62 + RPI_FIRMWARE_PWM_CLK_ID,
63 + RPI_FIRMWARE_HEVC_CLK_ID,
64 + RPI_FIRMWARE_EMMC2_CLK_ID,
65 + RPI_FIRMWARE_M2MC_CLK_ID,
66 + RPI_FIRMWARE_PIXEL_BVB_CLK_ID,
67 + RPI_FIRMWARE_VEC_CLK_ID,
68 + RPI_FIRMWARE_NUM_CLK_ID,
69 +};
70 +
71 #define GET_DISPLAY_SETTINGS_PAYLOAD_SIZE 64
72
73 #if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE)