Skip to content

Commit

Permalink
xrp-kernel: export xrp_acpi_init_v0
Browse files Browse the repository at this point in the history
xrp_acpi_init_v0 is supposed to be used in place of xrp_init on systemsi
with ACPI. It calls xrp_init and then sets up identity address mapping
for the configured shared memory.

Signed-off-by: Max Filippov <[email protected]>
  • Loading branch information
jcmvbkbc committed Jul 15, 2021
1 parent c1be3ef commit df3c7a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
14 changes: 14 additions & 0 deletions xrp-kernel/xrp_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ enum xrp_init_flags {
long xrp_init(struct platform_device *pdev, enum xrp_init_flags flags,
const struct xrp_hw_ops *hw, void *hw_arg);

/*!
* Initialize generic XRP kernel driver from cdns,xrp-compatible device
* tree node. Set default address mapping.
*
* \param pdev: pointer to platform device associated with the XRP device
* instance
* \param flags: initialization flags
* \param hw: pointer to xrp_hw_ops structeure for this device
* \param hw_arg: opaque pointer passed back to hw-specific functions
* \return error code or pointer to struct xvp, use IS_ERR_VALUE and ERR_PTR
*/
long xrp_acpi_init_v0(struct platform_device *pdev, enum xrp_init_flags flags,
const struct xrp_hw_ops *hw, void *hw_arg);

/*!
* Initialize generic XRP kernel driver from cdns,xrp,v1-compatible device
* tree node.
Expand Down
9 changes: 5 additions & 4 deletions xrp-kernel/xvp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2437,10 +2437,10 @@ MODULE_DEVICE_TABLE(of, xrp_of_match);
#endif

#ifdef CONFIG_ACPI
static xrp_init_function xrp_acpi_init_v0;
static long xrp_acpi_init_v0(struct platform_device *pdev,
enum xrp_init_flags flags,
const struct xrp_hw_ops *hw_ops, void *hw_arg)
xrp_init_function xrp_acpi_init_v0;
long xrp_acpi_init_v0(struct platform_device *pdev,
enum xrp_init_flags flags,
const struct xrp_hw_ops *hw_ops, void *hw_arg)
{
long ret = xrp_init(pdev, flags, hw_ops, hw_arg);

Expand Down Expand Up @@ -2473,6 +2473,7 @@ static long xrp_acpi_init_v0(struct platform_device *pdev,
}
return ret;
}
EXPORT_SYMBOL(xrp_acpi_init_v0);

static xrp_init_function xrp_acpi_init_v1;
static long xrp_acpi_init_v1(struct platform_device *pdev,
Expand Down

0 comments on commit df3c7a9

Please sign in to comment.