common/sfc_efx/base: add interrupts module for Riverhead
[dpdk.git] / drivers / common / sfc_efx / base / efx_mcdi.c
index 8cd651f..ade7f7f 100644 (file)
@@ -60,6 +60,21 @@ static const efx_mcdi_ops_t  __efx_mcdi_ef10_ops = {
 
 #endif /* EFX_OPTS_EF10() */
 
+#if EFSYS_OPT_RIVERHEAD
+
+static const efx_mcdi_ops_t    __efx_mcdi_rhead_ops = {
+       ef10_mcdi_init,                 /* emco_init */
+       ef10_mcdi_send_request,         /* emco_send_request */
+       ef10_mcdi_poll_reboot,          /* emco_poll_reboot */
+       ef10_mcdi_poll_response,        /* emco_poll_response */
+       ef10_mcdi_read_response,        /* emco_read_response */
+       ef10_mcdi_fini,                 /* emco_fini */
+       ef10_mcdi_feature_supported,    /* emco_feature_supported */
+       ef10_mcdi_get_timeout,          /* emco_get_timeout */
+};
+
+#endif /* EFSYS_OPT_RIVERHEAD */
+
 
 
        __checkReturn   efx_rc_t
@@ -98,6 +113,12 @@ efx_mcdi_init(
                break;
 #endif /* EFSYS_OPT_MEDFORD2 */
 
+#if EFSYS_OPT_RIVERHEAD
+       case EFX_FAMILY_RIVERHEAD:
+               emcop = &__efx_mcdi_rhead_ops;
+               break;
+#endif /* EFSYS_OPT_RIVERHEAD */
+
        default:
                EFSYS_ASSERT(0);
                rc = ENOTSUP;
@@ -2011,7 +2032,7 @@ fail1:
 
 #endif /* EFSYS_OPT_MAC_STATS */
 
-#if EFX_OPTS_EF10()
+#if EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10()
 
 /*
  * This function returns the pf and vf number of a function.  If it is a pf the
@@ -2108,7 +2129,7 @@ fail1:
        return (rc);
 }
 
-#endif /* EFX_OPTS_EF10() */
+#endif /* EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() */
 
        __checkReturn           efx_rc_t
 efx_mcdi_set_workaround(