Commit 680742f6 authored by Eric Auger's avatar Eric Auger Committed by Alex Williamson

vfio: platform: reset: calxedaxgmac: add reset function registration

This patch adds the reset function registration/unregistration.
This is handled through the module_vfio_reset_handler macro. This
latter also defines a MODULE_ALIAS which simplifies the load from
vfio-platform.
Signed-off-by: default avatarEric Auger <eric.auger@linaro.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 58864652
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#define DRIVER_AUTHOR "Eric Auger <eric.auger@linaro.org>" #define DRIVER_AUTHOR "Eric Auger <eric.auger@linaro.org>"
#define DRIVER_DESC "Reset support for Calxeda xgmac vfio platform device" #define DRIVER_DESC "Reset support for Calxeda xgmac vfio platform device"
#define CALXEDAXGMAC_COMPAT "calxeda,hb-xgmac"
/* XGMAC Register definitions */ /* XGMAC Register definitions */
#define XGMAC_CONTROL 0x00000000 /* MAC Configuration */ #define XGMAC_CONTROL 0x00000000 /* MAC Configuration */
...@@ -80,6 +78,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) ...@@ -80,6 +78,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev)
} }
EXPORT_SYMBOL_GPL(vfio_platform_calxedaxgmac_reset); EXPORT_SYMBOL_GPL(vfio_platform_calxedaxgmac_reset);
module_vfio_reset_handler("calxeda,hb-xgmac", vfio_platform_calxedaxgmac_reset);
MODULE_VERSION(DRIVER_VERSION); MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_AUTHOR(DRIVER_AUTHOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment