diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 18:04:33 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-19 07:17:21 +0100 |
commit | 62b7f5931c54e96fca56dd8761b0e466d355c881 (patch) | |
tree | 1258b392752379833a075df006c2f6d7ac4be51d /target/linux/bcm27xx/patches-5.4/950-0780-clk-bcm-rpi-Give-firmware-clocks-a-name.patch | |
parent | 76d1168d0d4b9d76e2ad78c0fc6b255561deb284 (diff) | |
download | upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.tar.gz upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.tar.bz2 upstream-62b7f5931c54e96fca56dd8761b0e466d355c881.zip |
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f07e572f64)
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0780-clk-bcm-rpi-Give-firmware-clocks-a-name.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0780-clk-bcm-rpi-Give-firmware-clocks-a-name.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0780-clk-bcm-rpi-Give-firmware-clocks-a-name.patch b/target/linux/bcm27xx/patches-5.4/950-0780-clk-bcm-rpi-Give-firmware-clocks-a-name.patch new file mode 100644 index 0000000000..745e8588ac --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0780-clk-bcm-rpi-Give-firmware-clocks-a-name.patch @@ -0,0 +1,52 @@ +From 5f69f49a942cd31e5f8b511e166fb55e3a0df267 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard <maxime@cerno.tech> +Date: Tue, 26 May 2020 14:30:31 +0200 +Subject: [PATCH] clk: bcm: rpi: Give firmware clocks a name + +We've registered the firmware clocks using their ID as name, but it's much +more convenient to register them using their proper name. Since the +firmware doesn't provide it, we have to duplicate it. + +Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> +Signed-off-by: Maxime Ripard <maxime@cerno.tech> +--- + drivers/clk/bcm/clk-raspberrypi.c | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +--- a/drivers/clk/bcm/clk-raspberrypi.c ++++ b/drivers/clk/bcm/clk-raspberrypi.c +@@ -36,6 +36,23 @@ enum rpi_firmware_clk_id { + RPI_FIRMWARE_NUM_CLK_ID, + }; + ++static char *rpi_firmware_clk_names[] = { ++ [RPI_FIRMWARE_EMMC_CLK_ID] = "emmc", ++ [RPI_FIRMWARE_UART_CLK_ID] = "uart", ++ [RPI_FIRMWARE_ARM_CLK_ID] = "arm", ++ [RPI_FIRMWARE_CORE_CLK_ID] = "core", ++ [RPI_FIRMWARE_V3D_CLK_ID] = "v3d", ++ [RPI_FIRMWARE_H264_CLK_ID] = "h264", ++ [RPI_FIRMWARE_ISP_CLK_ID] = "isp", ++ [RPI_FIRMWARE_SDRAM_CLK_ID] = "sdram", ++ [RPI_FIRMWARE_PIXEL_CLK_ID] = "pixel", ++ [RPI_FIRMWARE_PWM_CLK_ID] = "pwm", ++ [RPI_FIRMWARE_HEVC_CLK_ID] = "hevc", ++ [RPI_FIRMWARE_EMMC2_CLK_ID] = "emmc2", ++ [RPI_FIRMWARE_M2MC_CLK_ID] = "m2mc", ++ [RPI_FIRMWARE_PIXEL_BVB_CLK_ID] = "pixel-bvb", ++}; ++ + #define RPI_FIRMWARE_STATE_ENABLE_BIT BIT(0) + #define RPI_FIRMWARE_STATE_WAIT_BIT BIT(1) + +@@ -340,7 +357,9 @@ static struct clk_hw *raspberrypi_clk_re + data->rpi = rpi; + data->id = id; + +- init.name = devm_kasprintf(rpi->dev, GFP_KERNEL, "fw-clk-%u", id); ++ init.name = devm_kasprintf(rpi->dev, GFP_KERNEL, ++ "fw-clk-%s", ++ rpi_firmware_clk_names[id]); + init.ops = &raspberrypi_firmware_clk_ops; + init.flags = CLK_GET_RATE_NOCACHE; + |