sonic-buildimage/platform/centec/centec-dal/dal_mpool.h
taochengyi 08f3b9720b
[centec]: Add centec arm64 architecture support for E530 (#4641)
summary of E530 platfrom:
 - CPU: CTC5236, arm64
 - LAN switch chip set: CENTEC CTC7132 (TsingMa). TsingMa is a purpose built device to address the challenge in the recent network evolution such as Cloud computing. CTC7132 provides 440Gbps I/O bandwidth and 400Gcore bandwidth, the CTC7132 family combines a feature-rich switch core and an embedded ARM A53 CPU Core running at 800MHz/1.2GHz. CTC7132 supports a variety of port configurations, such as QSGMII and USXGMII-M, providing full-rate port capability from 100M to 100G.
- device E530-48T4X: 48 * 10/100/1000 Base-T Ports, 4 * 10GE SFP+ Ports.
- device E530-24X2C: 24 * 10 GE SFP+ Ports, 2 * 100GE QSFP28 Ports.

add new files in three directories:
device/centec/arm64-centec_e530_24x2c-r0
device/centec/arm64-centec_e530_48t4x_p-r0
platform/centec-arm64

Co-authored-by: taocy <taocy2@centecnetworks.com>
Co-authored-by: Gu Xianghong <gxh2001757@163.com>
Co-authored-by: shil <shil@centecnetworks.com>
2020-08-06 03:16:11 -07:00

75 lines
1.4 KiB
C

/**
@file dal_mpool.h
@author Copyright (C) 2011 Centec Networks Inc. All rights reserved.
@date 2012-5-10
@version v2.0
This file contains the dma memory init, allocation and free APIs
*/
#ifndef _DMA_MPOOL_H
#define _DMA_MPOOL_H
#ifdef __cplusplus
extern "C" {
#endif
#define DAL_MPOOL_MAX_DESX_SIZE (1024*1024)
enum dal_mpool_type_e
{
DAL_MPOOL_TYPE_USELESS, /* just compatible with GB */
DAL_MPOOL_TYPE_DESC, /* dma mpool op for desc */
DAL_MPOOL_TYPE_DATA /* dma mpool op for data */
};
typedef enum dal_mpool_type_e dal_mpool_type_t;
struct dal_mpool_mem_s
{
unsigned char* address;
int size;
int type;
struct dal_mpool_mem_s* next;
};
typedef struct dal_mpool_mem_s dal_mpool_mem_t;
/**
@brief This function is to alloc dma memory
@param[in] size size of memory
@return NULL
*/
extern int
dal_mpool_init(unsigned char lchip);
extern int
dal_mpool_deinit(unsigned char lchip);
extern dal_mpool_mem_t*
dal_mpool_create(unsigned char lchip, void* base_ptr, int size);
extern void*
dal_mpool_alloc(unsigned char lchip, dal_mpool_mem_t* pool, int size, int type);
extern void
dal_mpool_free(unsigned char lchip, dal_mpool_mem_t* pool, void* addr);
extern int
dal_mpool_destroy(unsigned char lchip, dal_mpool_mem_t* pool);
extern int
dal_mpool_usage(dal_mpool_mem_t* pool, int type);
extern int
dal_mpool_debug(dal_mpool_mem_t* pool);
#ifdef __cplusplus
}
#endif
#endif /* !_DMA_MPOOL_H */