mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
Merge tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/drivers
soc: amlogic: driver updates for v5.11 - enable building as modules - reset API updates * tag 'amlogic-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: replace devm_reset_control_array_get() soc: amlogic: canvas: add missing put_device() call in meson_canvas_get() firmware: meson-sm: enable build as module soc: meson: enable building drivers as modules soc: amlogic: socinfo: build for specific arch Link: https://lore.kernel.org/r/7him9ljgtr.fsf@baylibre.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
2bd87914b2
@ -3,8 +3,9 @@
|
||||
# Amlogic Secure Monitor driver
|
||||
#
|
||||
config MESON_SM
|
||||
bool
|
||||
default ARCH_MESON
|
||||
tristate "Amlogic Secure Monitor driver"
|
||||
depends on ARCH_MESON || COMPILE_TEST
|
||||
default y
|
||||
depends on ARM64_4K_PAGES
|
||||
help
|
||||
Say y here to enable the Amlogic secure monitor driver
|
||||
|
@ -331,3 +331,4 @@ static struct platform_driver meson_sm_driver = {
|
||||
},
|
||||
};
|
||||
module_platform_driver_probe(meson_sm_driver, meson_sm_probe);
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -9,7 +9,7 @@ config MESON_CANVAS
|
||||
Say yes to support the canvas IP for Amlogic SoCs.
|
||||
|
||||
config MESON_CLK_MEASURE
|
||||
bool "Amlogic Meson SoC Clock Measure driver"
|
||||
tristate "Amlogic Meson SoC Clock Measure driver"
|
||||
depends on ARCH_MESON || COMPILE_TEST
|
||||
default ARCH_MESON
|
||||
select REGMAP_MMIO
|
||||
@ -19,7 +19,7 @@ config MESON_CLK_MEASURE
|
||||
|
||||
config MESON_GX_SOCINFO
|
||||
bool "Amlogic Meson GX SoC Information driver"
|
||||
depends on ARCH_MESON || COMPILE_TEST
|
||||
depends on (ARM64 && ARCH_MESON) || COMPILE_TEST
|
||||
default ARCH_MESON
|
||||
select SOC_BUS
|
||||
help
|
||||
@ -27,7 +27,7 @@ config MESON_GX_SOCINFO
|
||||
information about the type, package and version.
|
||||
|
||||
config MESON_GX_PM_DOMAINS
|
||||
bool "Amlogic Meson GX Power Domains driver"
|
||||
tristate "Amlogic Meson GX Power Domains driver"
|
||||
depends on ARCH_MESON || COMPILE_TEST
|
||||
depends on PM && OF
|
||||
default ARCH_MESON
|
||||
@ -38,7 +38,7 @@ config MESON_GX_PM_DOMAINS
|
||||
Generic Power Domains.
|
||||
|
||||
config MESON_EE_PM_DOMAINS
|
||||
bool "Amlogic Meson Everything-Else Power Domains driver"
|
||||
tristate "Amlogic Meson Everything-Else Power Domains driver"
|
||||
depends on ARCH_MESON || COMPILE_TEST
|
||||
depends on PM && OF
|
||||
default ARCH_MESON
|
||||
@ -49,7 +49,7 @@ config MESON_EE_PM_DOMAINS
|
||||
Generic Power Domains.
|
||||
|
||||
config MESON_SECURE_PM_DOMAINS
|
||||
bool "Amlogic Meson Secure Power Domains driver"
|
||||
tristate "Amlogic Meson Secure Power Domains driver"
|
||||
depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
|
||||
depends on PM && OF
|
||||
depends on HAVE_ARM_SMCCC
|
||||
@ -63,7 +63,7 @@ config MESON_SECURE_PM_DOMAINS
|
||||
|
||||
config MESON_MX_SOCINFO
|
||||
bool "Amlogic Meson MX SoC Information driver"
|
||||
depends on ARCH_MESON || COMPILE_TEST
|
||||
depends on (ARM && ARCH_MESON) || COMPILE_TEST
|
||||
default ARCH_MESON
|
||||
select SOC_BUS
|
||||
help
|
||||
|
@ -72,8 +72,10 @@ struct meson_canvas *meson_canvas_get(struct device *dev)
|
||||
* current state, this driver probe cannot return -EPROBE_DEFER
|
||||
*/
|
||||
canvas = dev_get_drvdata(&canvas_pdev->dev);
|
||||
if (!canvas)
|
||||
if (!canvas) {
|
||||
put_device(&canvas_pdev->dev);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
static DEFINE_MUTEX(measure_lock);
|
||||
|
||||
@ -681,6 +682,7 @@ static const struct of_device_id meson_msr_match_table[] = {
|
||||
},
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, meson_msr_match_table);
|
||||
|
||||
static struct platform_driver meson_msr_driver = {
|
||||
.probe = meson_msr_probe,
|
||||
@ -689,4 +691,5 @@ static struct platform_driver meson_msr_driver = {
|
||||
.of_match_table = meson_msr_match_table,
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(meson_msr_driver);
|
||||
module_platform_driver(meson_msr_driver);
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/reset-controller.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/module.h>
|
||||
#include <dt-bindings/power/meson8-power.h>
|
||||
#include <dt-bindings/power/meson-axg-power.h>
|
||||
#include <dt-bindings/power/meson-g12a-power.h>
|
||||
@ -412,8 +413,7 @@ static int meson_ee_pwrc_init_domain(struct platform_device *pdev,
|
||||
dev_warn(&pdev->dev, "Invalid resets count %d for domain %s\n",
|
||||
count, dom->desc.name);
|
||||
|
||||
dom->rstc = devm_reset_control_array_get(&pdev->dev, false,
|
||||
false);
|
||||
dom->rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
|
||||
if (IS_ERR(dom->rstc))
|
||||
return PTR_ERR(dom->rstc);
|
||||
}
|
||||
@ -602,6 +602,7 @@ static const struct of_device_id meson_ee_pwrc_match_table[] = {
|
||||
},
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, meson_ee_pwrc_match_table);
|
||||
|
||||
static struct platform_driver meson_ee_pwrc_driver = {
|
||||
.probe = meson_ee_pwrc_probe,
|
||||
@ -611,4 +612,5 @@ static struct platform_driver meson_ee_pwrc_driver = {
|
||||
.of_match_table = meson_ee_pwrc_match_table,
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(meson_ee_pwrc_driver);
|
||||
module_platform_driver(meson_ee_pwrc_driver);
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
/* AO Offsets */
|
||||
|
||||
@ -303,7 +304,7 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(regmap_hhi);
|
||||
}
|
||||
|
||||
rstc = devm_reset_control_array_get(&pdev->dev, false, false);
|
||||
rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
|
||||
if (IS_ERR(rstc)) {
|
||||
if (PTR_ERR(rstc) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "failed to get reset lines\n");
|
||||
@ -364,6 +365,7 @@ static const struct of_device_id meson_gx_pwrc_vpu_match_table[] = {
|
||||
},
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, meson_gx_pwrc_vpu_match_table);
|
||||
|
||||
static struct platform_driver meson_gx_pwrc_vpu_driver = {
|
||||
.probe = meson_gx_pwrc_vpu_probe,
|
||||
@ -373,4 +375,5 @@ static struct platform_driver meson_gx_pwrc_vpu_driver = {
|
||||
.of_match_table = meson_gx_pwrc_vpu_match_table,
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(meson_gx_pwrc_vpu_driver);
|
||||
module_platform_driver(meson_gx_pwrc_vpu_driver);
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <dt-bindings/power/meson-a1-power.h>
|
||||
#include <linux/arm-smccc.h>
|
||||
#include <linux/firmware/meson/meson_sm.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#define PWRC_ON 1
|
||||
#define PWRC_OFF 0
|
||||
@ -193,6 +194,7 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
|
||||
},
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table);
|
||||
|
||||
static struct platform_driver meson_secure_pwrc_driver = {
|
||||
.probe = meson_secure_pwrc_probe,
|
||||
@ -201,4 +203,5 @@ static struct platform_driver meson_secure_pwrc_driver = {
|
||||
.of_match_table = meson_secure_pwrc_match_table,
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(meson_secure_pwrc_driver);
|
||||
module_platform_driver(meson_secure_pwrc_driver);
|
||||
MODULE_LICENSE("Dual MIT/GPL");
|
||||
|
Loading…
Reference in New Issue
Block a user