Home | History | Annotate | Download | only in MarvellYukonDxe
      1 /**  <at> file
      2 *  API to ported msk driver
      3 *
      4 *  Copyright (c) 2011-2016, ARM Limited. All rights reserved.
      5 *
      6 *  This program and the accompanying materials
      7 *  are licensed and made available under the terms and conditions of the BSD License
      8 *  which accompanies this distribution.  The full text of the license may be found at
      9 *  http://opensource.org/licenses/bsd-license.php
     10 *
     11 *  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12 *  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 *
     14 **/
     15 
     16 #ifndef _IF_MSK_H_
     17 #define _IF_MSK_H_
     18 
     19 #include <Uefi.h>
     20 #include <Protocol/PciIo.h>
     21 #include "if_mskreg.h"
     22 #include "miivar.h"
     23 
     24 #define MAX_SUPPORTED_PACKET_SIZE   (1566) /* No jumbo frame size support */
     25 
     26 EFI_STATUS mskc_probe (EFI_PCI_IO_PROTOCOL *PciIo);
     27 
     28 EFI_STATUS mskc_attach (EFI_PCI_IO_PROTOCOL  *, struct msk_softc **);
     29 EFI_STATUS mskc_attach_if (struct msk_if_softc *, UINTN);
     30 VOID mskc_detach (struct msk_softc  *);
     31 VOID mskc_detach_if (struct msk_if_softc *);
     32 
     33 EFI_STATUS mskc_init (struct msk_if_softc *);
     34 VOID mskc_shutdown (struct msk_softc  *);
     35 VOID mskc_stop_if (struct msk_if_softc *);
     36 
     37 void
     38 mskc_rxfilter (
     39     IN struct msk_if_softc         *sc_if,
     40     IN UINT32                      FilterFlags,
     41     IN UINTN                       MCastFilterCnt,
     42     IN EFI_MAC_ADDRESS             *MCastFilter
     43     );
     44 
     45 EFI_STATUS
     46 mskc_transmit (
     47     IN struct msk_if_softc         *sc_if,
     48     IN UINTN                       BufferSize,
     49     IN VOID                        *Buffer
     50     );
     51 
     52 EFI_STATUS
     53 mskc_receive (
     54     IN struct msk_if_softc         *sc_if,
     55     IN OUT UINTN                   *BufferSize,
     56     OUT VOID                       *Buffer
     57     );
     58 
     59 void
     60 mskc_getstatus (
     61     IN struct msk_if_softc         *sc,
     62     OUT UINT32                     *InterruptStatus, OPTIONAL
     63     OUT VOID                       **TxBuf           OPTIONAL
     64     );
     65 
     66 #endif /* _IF_MSK_H_ */
     67