openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

portmod_system.c (791B)


      1 /*
      2  *         
      3  * 
      4  * 
      5  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      6  * 
      7  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      8  */
      9 #ifdef _ERR_MSG_MODULE_NAME 
     10 #error "_ERR_MSG_MODULE_NAME redefined" 
     11 #endif
     12 #define _ERR_MSG_MODULE_NAME BSL_LS_SOC_PORT
     13 
     14 #ifndef PORTMOD_STAND_ALONE 
     15 
     16 #include <soc/cm.h>
     17 
     18 int portmod_sys_get_endian(int unit, int *endian) {
     19 
     20     int pio, packet;
     21 
     22     return soc_cm_get_endian(unit, &pio, &packet, endian);
     23 }
     24 
     25 void* portmod_sys_dma_alloc(int unit, int size, char *name) {
     26 
     27     return soc_cm_salloc(unit, size, name);
     28 }
     29 
     30 void portmod_sys_dma_free(int unit, void *ptr)  {
     31 
     32     soc_cm_sfree(unit, ptr);
     33 }
     34 
     35 #endif /* !PORTMOD_STAND_ALONE */
     36 
     37 #undef _ERR_MSG_MODULE_NAME