diff options
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/hw-me.c | 54 | ||||
-rw-r--r-- | drivers/misc/mei/hw-txe.c | 32 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 3 |
3 files changed, 0 insertions, 89 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 6a2d272cea43..a9a0d08f758e 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c | |||
@@ -710,64 +710,10 @@ end: | |||
710 | return IRQ_HANDLED; | 710 | return IRQ_HANDLED; |
711 | } | 711 | } |
712 | 712 | ||
713 | /** | ||
714 | * mei_me_fw_status - retrieve fw status from the pci config space | ||
715 | * | ||
716 | * @dev: the device structure | ||
717 | * @fw_status: fw status registers storage | ||
718 | * | ||
719 | * returns 0 on success an error code otherwise | ||
720 | */ | ||
721 | static int mei_me_fw_status(struct mei_device *dev, | ||
722 | struct mei_fw_status *fw_status) | ||
723 | { | ||
724 | const u32 pci_cfg_reg[] = {PCI_CFG_HFS_1, PCI_CFG_HFS_2}; | ||
725 | int i; | ||
726 | |||
727 | if (!fw_status) | ||
728 | return -EINVAL; | ||
729 | |||
730 | switch (dev->pdev->device) { | ||
731 | case MEI_DEV_ID_IBXPK_1: | ||
732 | case MEI_DEV_ID_IBXPK_2: | ||
733 | case MEI_DEV_ID_CPT_1: | ||
734 | case MEI_DEV_ID_PBG_1: | ||
735 | case MEI_DEV_ID_PPT_1: | ||
736 | case MEI_DEV_ID_PPT_2: | ||
737 | case MEI_DEV_ID_PPT_3: | ||
738 | case MEI_DEV_ID_LPT_H: | ||
739 | case MEI_DEV_ID_LPT_W: | ||
740 | case MEI_DEV_ID_LPT_LP: | ||
741 | case MEI_DEV_ID_LPT_HR: | ||
742 | case MEI_DEV_ID_WPT_LP: | ||
743 | fw_status->count = 2; | ||
744 | break; | ||
745 | case MEI_DEV_ID_ICH10_1: | ||
746 | case MEI_DEV_ID_ICH10_2: | ||
747 | case MEI_DEV_ID_ICH10_3: | ||
748 | case MEI_DEV_ID_ICH10_4: | ||
749 | fw_status->count = 1; | ||
750 | break; | ||
751 | default: | ||
752 | fw_status->count = 0; | ||
753 | break; | ||
754 | } | ||
755 | |||
756 | for (i = 0; i < fw_status->count && i < MEI_FW_STATUS_MAX; i++) { | ||
757 | int ret; | ||
758 | ret = pci_read_config_dword(dev->pdev, | ||
759 | pci_cfg_reg[i], &fw_status->status[i]); | ||
760 | if (ret) | ||
761 | return ret; | ||
762 | } | ||
763 | return 0; | ||
764 | } | ||
765 | |||
766 | static const struct mei_hw_ops mei_me_hw_ops = { | 713 | static const struct mei_hw_ops mei_me_hw_ops = { |
767 | 714 | ||
768 | .pg_state = mei_me_pg_state, | 715 | .pg_state = mei_me_pg_state, |
769 | 716 | ||
770 | .fw_status = mei_me_fw_status, | ||
771 | .host_is_ready = mei_me_host_is_ready, | 717 | .host_is_ready = mei_me_host_is_ready, |
772 | 718 | ||
773 | .hw_is_ready = mei_me_hw_is_ready, | 719 | .hw_is_ready = mei_me_hw_is_ready, |
diff --git a/drivers/misc/mei/hw-txe.c b/drivers/misc/mei/hw-txe.c index 93273783dec5..f1cd166094f2 100644 --- a/drivers/misc/mei/hw-txe.c +++ b/drivers/misc/mei/hw-txe.c | |||
@@ -1042,40 +1042,8 @@ end: | |||
1042 | return IRQ_HANDLED; | 1042 | return IRQ_HANDLED; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | |||
1046 | /** | ||
1047 | * mei_txe_fw_status - retrieve fw status from the pci config space | ||
1048 | * | ||
1049 | * @dev: the device structure | ||
1050 | * @fw_status: fw status registers storage | ||
1051 | * | ||
1052 | * returns: 0 on success an error code otherwise | ||
1053 | */ | ||
1054 | static int mei_txe_fw_status(struct mei_device *dev, | ||
1055 | struct mei_fw_status *fw_status) | ||
1056 | { | ||
1057 | const u32 pci_cfg_reg[] = {PCI_CFG_TXE_FW_STS0, PCI_CFG_TXE_FW_STS1}; | ||
1058 | int i; | ||
1059 | |||
1060 | if (!fw_status) | ||
1061 | return -EINVAL; | ||
1062 | |||
1063 | fw_status->count = 2; | ||
1064 | |||
1065 | for (i = 0; i < fw_status->count && i < MEI_FW_STATUS_MAX; i++) { | ||
1066 | int ret; | ||
1067 | ret = pci_read_config_dword(dev->pdev, | ||
1068 | pci_cfg_reg[i], &fw_status->status[i]); | ||
1069 | if (ret) | ||
1070 | return ret; | ||
1071 | } | ||
1072 | |||
1073 | return 0; | ||
1074 | } | ||
1075 | |||
1076 | static const struct mei_hw_ops mei_txe_hw_ops = { | 1045 | static const struct mei_hw_ops mei_txe_hw_ops = { |
1077 | 1046 | ||
1078 | .fw_status = mei_txe_fw_status, | ||
1079 | .host_is_ready = mei_txe_host_is_ready, | 1047 | .host_is_ready = mei_txe_host_is_ready, |
1080 | 1048 | ||
1081 | .pg_state = mei_txe_pg_state, | 1049 | .pg_state = mei_txe_pg_state, |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 2afa3d69107d..0b0d6135543b 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -227,7 +227,6 @@ struct mei_cl { | |||
227 | 227 | ||
228 | /** struct mei_hw_ops | 228 | /** struct mei_hw_ops |
229 | * | 229 | * |
230 | * @fw_status - read FW status from PCI config space | ||
231 | * @host_is_ready - query for host readiness | 230 | * @host_is_ready - query for host readiness |
232 | 231 | ||
233 | * @hw_is_ready - query if hw is ready | 232 | * @hw_is_ready - query if hw is ready |
@@ -255,8 +254,6 @@ struct mei_cl { | |||
255 | */ | 254 | */ |
256 | struct mei_hw_ops { | 255 | struct mei_hw_ops { |
257 | 256 | ||
258 | int (*fw_status)(struct mei_device *dev, | ||
259 | struct mei_fw_status *fw_status); | ||
260 | bool (*host_is_ready)(struct mei_device *dev); | 257 | bool (*host_is_ready)(struct mei_device *dev); |
261 | 258 | ||
262 | bool (*hw_is_ready)(struct mei_device *dev); | 259 | bool (*hw_is_ready)(struct mei_device *dev); |