Skip to content

Commit e9191aa

Browse files
committed
Merge tag 'amlogic-drivers-for-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers-late
Amlogic Drivers for v6.19: - Canvas device leak fix and error handling simplification - Add more SoCs definitions - Suport more SoCs for meson-gx-ao-secure * tag 'amlogic-drivers-for-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: soc: amlogic: meson-gx-socinfo: add new SoCs id dt-bindings: arm: amlogic: meson-gx-ao-secure: support more SoCs soc: amlogic: canvas: simplify lookup error handling soc: amlogic: canvas: fix device leak on lookup Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 3d89225 + ba8abbd commit e9191aa

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ properties:
3434
- amlogic,a4-ao-secure
3535
- amlogic,c3-ao-secure
3636
- amlogic,s4-ao-secure
37+
- amlogic,s6-ao-secure
38+
- amlogic,s7-ao-secure
39+
- amlogic,s7d-ao-secure
3740
- amlogic,t7-ao-secure
3841
- const: amlogic,meson-gx-ao-secure
3942
- const: syscon

drivers/soc/amlogic/meson-canvas.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,19 @@ struct meson_canvas *meson_canvas_get(struct device *dev)
6060
return ERR_PTR(-ENODEV);
6161

6262
canvas_pdev = of_find_device_by_node(canvas_node);
63-
if (!canvas_pdev) {
64-
of_node_put(canvas_node);
65-
return ERR_PTR(-EPROBE_DEFER);
66-
}
67-
6863
of_node_put(canvas_node);
64+
if (!canvas_pdev)
65+
return ERR_PTR(-EPROBE_DEFER);
6966

7067
/*
7168
* If priv is NULL, it's probably because the canvas hasn't
7269
* properly initialized. Bail out with -EINVAL because, in the
7370
* current state, this driver probe cannot return -EPROBE_DEFER
7471
*/
7572
canvas = dev_get_drvdata(&canvas_pdev->dev);
76-
if (!canvas) {
77-
put_device(&canvas_pdev->dev);
73+
put_device(&canvas_pdev->dev);
74+
if (!canvas)
7875
return ERR_PTR(-EINVAL);
79-
}
8076

8177
return canvas;
8278
}

drivers/soc/amlogic/meson-gx-socinfo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ static const struct meson_gx_soc_id {
4646
{ "A5", 0x3c },
4747
{ "C3", 0x3d },
4848
{ "A4", 0x40 },
49+
{ "S7", 0x46 },
50+
{ "S7D", 0x47 },
51+
{ "S6", 0x48 },
4952
};
5053

5154
static const struct meson_gx_package_id {
@@ -86,6 +89,9 @@ static const struct meson_gx_package_id {
8689
{ "A311D2", 0x36, 0x1, 0xf },
8790
{ "A113X2", 0x3c, 0x1, 0xf },
8891
{ "A113L2", 0x40, 0x1, 0xf },
92+
{ "S805X3", 0x46, 0x3, 0xf },
93+
{ "S905X5M", 0x47, 0x1, 0xf },
94+
{ "S905X5", 0x48, 0x1, 0xf },
8995
};
9096

9197
static inline unsigned int socinfo_to_major(u32 socinfo)

0 commit comments

Comments
 (0)