Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[saibcm-modules]: import new bcm modules #2578

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions platform/broadcom/saibcm-modules/include/ibde.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,28 @@ typedef struct ibde_s {
*/
int (*get_cmic_ver)(int d, uint32 *ver);

/*
* Probe available devices.
* Return value :
* 0: success to probe available devices
* -1: error happens during probe
*/
int (*probe)(void);

/*
* I2C operations on the Device, assuming it is connected by I2C to the CPU.
*/
/* Read from the internal device Address space using I2C */
int (*i2c_device_read)(
int dev, /* The device ID to access */
uint32 addr, /* The address to access in the internal device address space */
uint32 *value);/* the value to be read. */
/* Write to the internal device Address space using I2C */
int (*i2c_device_write)(
int dev, /* The device ID to access */
uint32 addr, /* The address to access in the internal device address space */
uint32 value); /* the value to be written. */

} ibde_t;


Expand Down
14 changes: 12 additions & 2 deletions platform/broadcom/saibcm-modules/include/kcom.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#define KCOM_M_HW_INIT 4 /* H/W initialized */
#define KCOM_M_ETH_HW_CONFIG 5 /* ETH HW config*/
#define KCOM_M_DETACH 6 /* Detach kernel module */
#define KCOM_M_REPROBE 7 /* Reprobe device */
#define KCOM_M_NETIF_CREATE 11 /* Create network interface */
#define KCOM_M_NETIF_DESTROY 12 /* Destroy network interface */
#define KCOM_M_NETIF_LIST 13 /* Get list of network interface IDs */
Expand All @@ -59,7 +60,7 @@
#define KCOM_M_DBGPKT_GET 42 /* Get debug packet function info */
#define KCOM_M_WB_CLEANUP 51 /* Clean up for warmbooting */

#define KCOM_VERSION 9 /* Protocol version */
#define KCOM_VERSION 10 /* Protocol version */

/*
* Message status codes
Expand Down Expand Up @@ -305,7 +306,7 @@ typedef struct kcom_eth_hw_config_s {
uint8 chan;
uint32 flags;
uint32 value;
} kcom_eth_hw_config_t;
} kcom_eth_hw_config_t;

/*
* Message types
Expand Down Expand Up @@ -379,6 +380,14 @@ typedef struct kcom_msg_detach_s {
uint32 flags;
} kcom_msg_detach_t;

/*
* Reprobe switch device.
*/
typedef struct kcom_msg_reprobe_s {
kcom_msg_hdr_t hdr;
uint32 flags;
} kcom_msg_reprobe_t;

/*
* Enable/Disable debugging packet function.
*/
Expand Down Expand Up @@ -498,6 +507,7 @@ typedef union kcom_msg_s {
kcom_msg_hw_init_t hw_init;
kcom_msg_eth_hw_config_t eth_hw_config;
kcom_msg_detach_t detach;
kcom_msg_reprobe_t reprobe;
kcom_msg_netif_create_t netif_create;
kcom_msg_netif_destroy_t netif_destroy;
kcom_msg_netif_list_t netif_list;
Expand Down
63 changes: 63 additions & 0 deletions platform/broadcom/saibcm-modules/include/soc/devids.h
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,15 @@

#define BCM56980_DEVICE_ID 0xb980
#define BCM56980_A0_REV_ID 1
#define BCM56980_B0_REV_ID 0x11
#define BCM56981_DEVICE_ID 0xb981
#define BCM56981_A0_REV_ID 1
#define BCM56982_DEVICE_ID 0xb982
#define BCM56982_A0_REV_ID 1
#define BCM56983_DEVICE_ID 0xb983
#define BCM56983_A0_REV_ID 1
#define BCM56984_DEVICE_ID 0xb984
#define BCM56984_A0_REV_ID 1

#define BCM56968_DEVICE_ID 0xb968
#define BCM56968_A0_REV_ID 1
Expand Down Expand Up @@ -1289,15 +1298,20 @@

#define BCM56670_DEVICE_ID 0xb670
#define BCM56670_A0_REV_ID 1
#define BCM56670_B0_REV_ID 0x11

#define BCM56671_DEVICE_ID 0xb671
#define BCM56671_A0_REV_ID 1
#define BCM56671_B0_REV_ID 0x11

#define BCM56672_DEVICE_ID 0xb672
#define BCM56672_A0_REV_ID 1
#define BCM56672_B0_REV_ID 0x11

#define BCM56675_DEVICE_ID 0xb675
#define BCM56675_A0_REV_ID 1
#define BCM56675_B0_REV_ID 0x11


#define BCM56565_DEVICE_ID 0xb565
#define BCM56565_A0_REV_ID 1
Expand All @@ -1317,12 +1331,19 @@

#define BCM56760_DEVICE_ID 0xb760
#define BCM56760_A0_REV_ID 1
#define BCM56760_A1_REV_ID 2
#define BCM56760_B0_REV_ID 0x11

#define BCM56761_DEVICE_ID 0xb761
#define BCM56761_A0_REV_ID 1
#define BCM56761_B0_REV_ID 0x11

#define BCM56761_DEVICE_ID 0xb761
#define BCM56761_A0_REV_ID 1
#define BCM56761_A1_REV_ID 2
#define BCM56761_B0_REV_ID 0x11
#define BCM56761_B1_REV_ID 0x12

#define BCM56762_DEVICE_ID 0xb762
#define BCM56762_A0_REV_ID 1
#define BCM56762_B0_REV_ID 0x11
Expand All @@ -1347,6 +1368,11 @@
#define BCM56068_A0_REV_ID 1
#define BCM56068_B0_REV_ID 0x11

#define BCM56068_DEVICE_ID 0xb068
#define BCM56068_A0_REV_ID 1
#define BCM56068_B0_REV_ID 0x11
#define BCM56068_B1_REV_ID 0x12

#define BCM56069_DEVICE_ID 0xb069
#define BCM56069_A0_REV_ID 1
#define BCM56069_B0_REV_ID 0x11
Expand Down Expand Up @@ -1400,6 +1426,42 @@
#define BCM56873_DEVICE_ID 0xb873
#define BCM56873_A0_REV_ID 1

#define BCM56370_DEVICE_ID 0xb370
#define BCM56370_A0_REV_ID 1

#define BCM56371_DEVICE_ID 0xb371
#define BCM56371_A0_REV_ID 1

#define BCM56372_DEVICE_ID 0xb372
#define BCM56372_A0_REV_ID 1

#define BCM56374_DEVICE_ID 0xb374
#define BCM56374_A0_REV_ID 1

#define BCM56375_DEVICE_ID 0xb375
#define BCM56375_A0_REV_ID 1

#define BCM56376_DEVICE_ID 0xb376
#define BCM56376_A0_REV_ID 1

#define BCM56377_DEVICE_ID 0xb377
#define BCM56377_A0_REV_ID 1

#define BCM56577_DEVICE_ID 0xb577
#define BCM56577_A0_REV_ID 1

#define BCM56578_DEVICE_ID 0xb578
#define BCM56578_A0_REV_ID 1

#define BCM56579_DEVICE_ID 0xb579
#define BCM56579_A0_REV_ID 1

#define BCM56770_DEVICE_ID 0xb770
#define BCM56770_A0_REV_ID 1

#define BCM56771_DEVICE_ID 0xb771
#define BCM56771_A0_REV_ID 1

#define BCM53540_DEVICE_ID 0x8540
#define BCM53540_A0_REV_ID 1
#define BCM53547_DEVICE_ID 0x8547
Expand Down Expand Up @@ -1718,6 +1780,7 @@
#define DNXC_B0_REV_ID 0x0011
#define BCM88790_DEVICE_ID 0x8790
#define BCM88790_A0_REV_ID DNXC_A0_REV_ID
#define BCM88790_B0_REV_ID DNXC_B0_REV_ID
#define BCM88791_DEVICE_ID 0x8791
#define BCM88792_DEVICE_ID 0x8792
#define BCM88793_DEVICE_ID 0x8793
Expand Down
8 changes: 6 additions & 2 deletions platform/broadcom/saibcm-modules/make/Makefile.linux-gto
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,19 @@ endif
endif

ifdef DPP_CHIPS
CFLAGS += -DDUNE_BCM -D__DUNE_GTO_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__ -D__DUNE_LINUX_BCM_CPU_PCP_DMA__
CFLAGS += -DDUNE_BCM -D__DUNE_LINUX_BCM_CPU_PCP_DMA__
CFGFLAGS += -DSOC_CM_FUNCTION
endif

ifdef DFE_CHIPS
CFLAGS += -DDUNE_BCM -D__DUNE_GTO_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__
CFLAGS += -DDUNE_BCM
CFGFLAGS += -DSOC_CM_FUNCTION
endif

ifdef SAND_CHIPS
CFLAGS += -D__DUNE_GTO_BCM_CPU__ -D__DUNE_LINUX_BCM_CPU_PCIE__
endif

ifdef SHADOW_PLX
CFLAGS += -DBCM_PLX9656_LOCAL_BUS -DBDE_LINUX_NON_INTERRUPTIBLE -DSHADOW_SVK
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
#endif

extern void _dma_init(int robo_switch, int dev_index);
extern void _dma_init(int robo_switch);
extern int _dma_cleanup(void);
extern void _dma_pprint(void);
extern uint32_t *_salloc(int d, int size, const char *name);
Expand Down
Loading