mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
reset: meson: make it possible to build as a module
In order to reduce the kernel Image size on multi-platform distributions,
make it possible to build the reset controller driver as a module.
This partially reverts commit 8290924e68
("reset: meson: make it
explicitly non-modular").
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
committed by
Philipp Zabel
parent
557acb3d2c
commit
3bfe8933f9
@@ -95,7 +95,8 @@ config RESET_LPC18XX
|
|||||||
This enables the reset controller driver for NXP LPC18xx/43xx SoCs.
|
This enables the reset controller driver for NXP LPC18xx/43xx SoCs.
|
||||||
|
|
||||||
config RESET_MESON
|
config RESET_MESON
|
||||||
bool "Meson Reset Driver" if COMPILE_TEST
|
tristate "Meson Reset Driver"
|
||||||
|
depends on ARCH_MESON || COMPILE_TEST
|
||||||
default ARCH_MESON
|
default ARCH_MESON
|
||||||
help
|
help
|
||||||
This enables the reset driver for Amlogic Meson SoCs.
|
This enables the reset driver for Amlogic Meson SoCs.
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
|
#include <linux/module.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/reset-controller.h>
|
#include <linux/reset-controller.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@@ -104,6 +105,7 @@ static const struct of_device_id meson_reset_dt_ids[] = {
|
|||||||
{ .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param},
|
{ .compatible = "amlogic,meson-a1-reset", .data = &meson_a1_param},
|
||||||
{ /* sentinel */ },
|
{ /* sentinel */ },
|
||||||
};
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);
|
||||||
|
|
||||||
static int meson_reset_probe(struct platform_device *pdev)
|
static int meson_reset_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
@@ -142,4 +144,8 @@ static struct platform_driver meson_reset_driver = {
|
|||||||
.of_match_table = meson_reset_dt_ids,
|
.of_match_table = meson_reset_dt_ids,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
builtin_platform_driver(meson_reset_driver);
|
module_platform_driver(meson_reset_driver);
|
||||||
|
|
||||||
|
MODULE_DESCRIPTION("Amlogic Meson Reset Controller driver");
|
||||||
|
MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
|
||||||
|
MODULE_LICENSE("Dual BSD/GPL");
|
||||||
|
Reference in New Issue
Block a user