mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 09:48:07 +07:00
d73236383e
This is required for SSIF to work.
There was no way to know if the interface being added was SI
or SSIF from the platform data, but that was required so the
i2c-addr is only added for SSIF interfaces. So add a field
for that.
Also rework the logic a bit so that ipmi-type is not set
for SSIF interfaces, as it is not necessary for that.
Fixes: 3cd83bac48
("ipmi: Consolidate the adding of platform devices")
Reported-by: Kamlakant Patel <kamlakantp@marvell.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: stable@vger.kernel.org # 5.1
26 lines
669 B
C
26 lines
669 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
* Generic code to add IPMI platform devices.
|
|
*/
|
|
|
|
#include <linux/ipmi.h>
|
|
|
|
enum ipmi_plat_interface_type { IPMI_PLAT_IF_SI, IPMI_PLAT_IF_SSIF };
|
|
|
|
struct ipmi_plat_data {
|
|
enum ipmi_plat_interface_type iftype;
|
|
unsigned int type; /* si_type for si, SI_INVALID for others */
|
|
unsigned int space; /* addr_space for si, intf# for ssif. */
|
|
unsigned long addr;
|
|
unsigned int regspacing;
|
|
unsigned int regsize;
|
|
unsigned int regshift;
|
|
unsigned int irq;
|
|
unsigned int slave_addr;
|
|
enum ipmi_addr_src addr_source;
|
|
};
|
|
|
|
struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
|
|
struct ipmi_plat_data *p);
|