From 07d7adbd067b4036ed0bf44cfe64c9e7d7c0e258 Mon Sep 17 00:00:00 2001 From: Archit Dev Date: Wed, 20 Nov 2024 20:19:45 +0530 Subject: [PATCH] allsoc : icss_emac : remove sysconfig files - remove sysconfig files Fixes: PINDSW-8293 Signed-off-by: Archit Dev --- .../.meta/icss_emac/icss_emac.syscfg.js | 210 ------------------ .../icss_emac/icss_emac_am243x.syscfg.js | 166 -------------- .../icss_emac/icss_emac_am261x.syscfg.js | 145 ------------ .../icss_emac/icss_emac_am263px.syscfg.js | 145 ------------ .../icss_emac/icss_emac_am263x.syscfg.js | 145 ------------ .../.meta/icss_emac/icss_emac_am64x.syscfg.js | 166 -------------- .../.meta/icss_emac/templates/icss_emac.h.xdt | 15 -- .../templates/icss_emac_config.c.xdt | 69 ------ .../templates/icss_emac_deinit.c.xdt | 1 - .../icss_emac/templates/icss_emac_init.c.xdt | 1 - 10 files changed, 1063 deletions(-) delete mode 100644 sysconfig/networking/.meta/icss_emac/icss_emac.syscfg.js delete mode 100644 sysconfig/networking/.meta/icss_emac/icss_emac_am243x.syscfg.js delete mode 100644 sysconfig/networking/.meta/icss_emac/icss_emac_am261x.syscfg.js delete mode 100644 sysconfig/networking/.meta/icss_emac/icss_emac_am263px.syscfg.js delete mode 100644 sysconfig/networking/.meta/icss_emac/icss_emac_am263x.syscfg.js delete mode 100644 sysconfig/networking/.meta/icss_emac/icss_emac_am64x.syscfg.js delete mode 100644 sysconfig/networking/.meta/icss_emac/templates/icss_emac.h.xdt delete mode 100644 sysconfig/networking/.meta/icss_emac/templates/icss_emac_config.c.xdt delete mode 100644 sysconfig/networking/.meta/icss_emac/templates/icss_emac_deinit.c.xdt delete mode 100644 sysconfig/networking/.meta/icss_emac/templates/icss_emac_init.c.xdt diff --git a/sysconfig/networking/.meta/icss_emac/icss_emac.syscfg.js b/sysconfig/networking/.meta/icss_emac/icss_emac.syscfg.js deleted file mode 100644 index 75be3b65..00000000 --- a/sysconfig/networking/.meta/icss_emac/icss_emac.syscfg.js +++ /dev/null @@ -1,210 +0,0 @@ - -let common = system.getScript("/common"); -let pinmux = system.getScript("/drivers/pinmux/pinmux"); -let soc = system.getScript(`/networking/icss_emac/icss_emac_${common.getSocName()}`); - -let iss_emac_module_name = "/networking/icss_emac/icss_emac"; - -function getInstanceConfig(inst) -{ - let config = soc.getStaticConfig(); - - soc.updateConfig(inst, config); - - return { - ...config, - ...inst, - }; -} - -function getPktBufSizes(module) -{ - return soc.getPktBufSizes(module); -} - -function checkSameFieldName(instance, iccsInstance, fieldname, report) -{ - let moduleInstances = instance.$module.$instances; - - for (let i = 0; i < moduleInstances.length; i++) { - if (instance[fieldname] === moduleInstances[i][fieldname] && - instance !== moduleInstances[i] && instance.instance === iccsInstance) { - report.logError(`Same ${fieldname} cannot be selected`, instance, fieldname); - } - } -} - -function validate(instance, report) { - common.validate.checkNumberRange(instance, report, "phyAddr0", 0, 31); - common.validate.checkNumberRange(instance, report, "phyAddr1", 0, 31); - common.validate.checkNumberRange(instance, report, "pktBufSizeKB", 16, 1024); - common.validate.checkNumberRange(instance, report, "linkTaskPriority", 0, 31); - common.validate.checkNumberRange(instance, report, "rxTaskPriority", 0, 31); - common.validate.checkNumberRange(instance, report, "txTaskPriority", 0, 31); -} - -function getConfigurables() -{ - let config = []; - let icssConfig = soc.getIcssInstancesArr(); - let phyToMacInterfaceConfig = soc.getPhyToMacInterfacesArr(); - - config.push( - common.ui.makeConfig(icssConfig, "instance", "ICSS Instance"), - { - name: "mode", - displayName: "EMAC Mode", - default: "SWITCH", - options: [ - { - name: "SWITCH", - displayName: "Switch", - }, - { - name: "DUAL MAC | MAC1", - displayName: "MAC1 of DUAL EMAC", - }, - { - name: "DUAL MAC | MAC2", - displayName: "MAC2 of DUAL EMAC", - }, - { - name: "MAC1", - displayName: "MAC1", - }, - { - name: "MAC2", - displayName: "MAC2", - }, - ], - }, - { - name: "phyAddr0", - description: "Phy Address of the port in single/dual EMAC mode or Port 0 in Switch mode. Value MUST be between 0 .. 31", - displayName: "Phy Address 0", - default: 15, - }, - { - name: "phyAddr1", - description: "Phy Address of Port 1 in Switch mode. Value MUST be between 0 .. 31", - displayName: "Phy Address 1", - default: 15, - }, - common.ui.makeConfig(phyToMacInterfaceConfig, "phyToMacInterfaceMode", "MII"), - { - name: "queue", - displayName: "RT/NRT Priority Separation Queue", - description: "If packets are in Queue <= RT/NRT Priority separation queue, they will be forwarded to RT callback and others to NRT callback.", - default: "QUEUE3", - options: [ - { name: "QUEUE1", }, - { name: "QUEUE2", }, - { name: "QUEUE3", }, - { name: "QUEUE4", }, - ], - }, - { - name: "pktBufSizeKB", - displayName: "Queue Buffer Size (KB)", - description: "Value MUST be between 16 KB .. 1024 KB", - default: 64, - }, - { - name: "linkTaskPriority", - displayName: "Link Task Priority", - description: "Value MUST be between 0 (lowest priority) .. 31 (highest priority)", - default: 28, - }, - { - name: "rxTaskPriority", - displayName: "RX Task Priority", - description: "Value MUST be between 0 (lowest priority) .. 31 (highest priority)", - default: 26, - }, - { - name: "txInterruptEnable", - displayName: "TX Interrupt Enable", - default: false, - }, - { - name: "txTaskPriority", - displayName: "TX Task Priority", - description: "Valid only if TX Interrupt Enable is checked. Value MUST be between 0 (lowest priority) .. 31 (highest priority)", - default: 26, - }, - { - name: "halfDuplexEnable", - displayName: "Half Duplex Enable", - description: "Flag to enable Half duplex capability. Firmware support is also required.", - default: false, - }, - { - name: "enableIntrPacing", - displayName: "Interrupt Pacing Enable", - default: false, - }, - { - name: "intrPacingMode", - displayName: "Interrupt Pacing Mode", - description: "Valid only if Interrupt Pacing Enable is checked", - default: "MODE1", - options: [ - { - name: "MODE1", - displayName : "Frame count based", - }, - ], - }, - { - name: "pacingThreshold", - displayName: "Interrupt Pacing Threshold Value", - description: "Valid only if Interrupt Pacing Enable is checked", - default: 100, - }, - { - name: "learningEnable", - displayName: "Learning Enable", - description: "Valid only for switch mode", - default: false, - }, - { - name: "splitQueue", - displayName: "Split Queue", - longDescription: "Flag to enable Split Queue capability. If enabled, then out of the four queues, two queues are dedicated to each receiving port. ICSS_EMAC_QUEUE1 and ICSS_EMAC_QUEUE2 for Port 0 and ICSS_EMAC_QUEUE3 and ICSS_EMAC_QUEUE4 for Port 1.", - default: false, - }, - ); - - return config; -} - -let icss_emac_module = { - - displayName: "ICSS-EMAC", - longDescription: "Driver for ICSS-EMAC which provide APIs for end point and switch that has been implemented on PRU-ICSS cores at at 100 Mbps.", - defaultInstanceName: "CONFIG_ICSS_EMAC", - templates: { - "/drivers/system/system_config.c.xdt": { - driver_config: "/networking/icss_emac/templates/icss_emac_config.c.xdt", - driver_init: "/networking/icss_emac/templates/icss_emac_init.c.xdt", - driver_deinit: "/networking/icss_emac/templates/icss_emac_deinit.c.xdt", - }, - "/drivers/system/system_config.h.xdt": { - driver_config: "/networking/icss_emac/templates/icss_emac.h.xdt", - }, - }, - config: getConfigurables(), - moduleStatic: { - modules: function(inst) { - return [{ - name: "system_common", - moduleName: "/system_common", - }] - }, - }, - getInstanceConfig, - getPktBufSizes, - validate: validate, -}; - -exports = icss_emac_module; \ No newline at end of file diff --git a/sysconfig/networking/.meta/icss_emac/icss_emac_am243x.syscfg.js b/sysconfig/networking/.meta/icss_emac/icss_emac_am243x.syscfg.js deleted file mode 100644 index d8681c03..00000000 --- a/sysconfig/networking/.meta/icss_emac/icss_emac_am243x.syscfg.js +++ /dev/null @@ -1,166 +0,0 @@ - -let common = system.getScript("/common"); - -let icss_instances = [ - { - name: "ICSSG0", - }, - { - name: "ICSSG1", - } -]; - -let phyToMacModes_instances = [ - { - name: "MII", - }, - { - name: "RGMII", - } -]; - -let INTERRUPT_OFFSET_ICSS = { - "ICSSG0": 120, - "ICSSG1": 248, -}; - -let PORT_INT_OFFSET = { - "rxIntNum" : [0, 1], - "txIntNum" : [2, 3], - "linkIntNum" : [6, 7], -}; - -const staticConfig = -{ - emacMode: [ "ICSS_EMAC_MODE_SWITCH", "0" ], - phyAddr: [15, 3], - phyToMacInterfaceMode: "ICSS_EMAC_MII_MODE", - halfDuplexEnable: false, - enableIntrPacing: "ICSS_EMAC_DISABLE_PACING", - intrPacingMode: "ICSS_EMAC_INTR_PACING_MODE1", - pacingThreshold: 0, - ethPrioQueue: "ICSS_EMAC_QUEUE3", - learningEnable: false, - portMask: "ICSS_EMAC_MODE_SWITCH", - txInterruptEnable: false, - linkIntNum: INTERRUPT_OFFSET_ICSS["ICSSG0"] + PORT_INT_OFFSET["linkIntNum"][0], - rxIntNum: INTERRUPT_OFFSET_ICSS["ICSSG0"] + PORT_INT_OFFSET["rxIntNum"][0], - txIntNum: INTERRUPT_OFFSET_ICSS["ICSSG0"] + PORT_INT_OFFSET["txIntNum"][0], - pktBufSize: 0x10000, - txTaskPriority: 10, - rxTaskPriority: 10, - linkTaskPriority: 10, - pktBufIndex: 0, - splitQueue: 0, -}; - -function getIcssInstancesArr() -{ - return icss_instances; -} - -function getPhyToMacInterfacesArr() -{ - return phyToMacModes_instances; -} - -function getStaticConfig() { - return _.cloneDeep(staticConfig); -} - -function updateConfig(inst, config) -{ - let port = 0; - - switch(inst.mode) - { - case "SWITCH": - config.emacMode[0] = "ICSS_EMAC_MODE_SWITCH"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_SWITCH"; - port = 0; - break; - - case "DUAL MAC | MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - port = 0; - break; - - case "MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - port = 0; - break; - - case "DUAL MAC | MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - port = 1; - break; - - case "MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - port = 1; - break; - } - - switch(inst.instance) - { - case "ICSSG0": - config.pktBufIndex = 0; - break; - case "ICSSG1": - config.pktBufIndex = 1; - break; - } - config.linkIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["linkIntNum"][port]; - config.rxIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["rxIntNum"][port]; - config.txIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["txIntNum"][port]; - config.phyAddr[0] = inst.phyAddr0; - config.phyAddr[1] = inst.phyAddr1; - config.ethPrioQueue = `ICSS_EMAC_${inst.queue}`; - config.pktBufSize = inst.pktBufSizeKB*1024; -} - -function getPktBufSizes(module) -{ - let pktBufSizes= [ 0, 0 ]; - - for(let i = 0; i < module.$instances.length; i++) - { - let instance = module.$instances[i]; - let config = module.getInstanceConfig(instance); - - switch(config.instance) - { - case "ICSSG0": - if(config.pktBufSize > pktBufSizes[0]) - { - pktBufSizes[0] = config.pktBufSize; - } - break; - case "ICSSG1": - if(config.pktBufSize > pktBufSizes[1]) - { - pktBufSizes[1] = config.pktBufSize; - } - break; - } - } - - return pktBufSizes; -} - -exports = { - getStaticConfig, - updateConfig, - getIcssInstancesArr, - getPhyToMacInterfacesArr, - getPktBufSizes, -}; diff --git a/sysconfig/networking/.meta/icss_emac/icss_emac_am261x.syscfg.js b/sysconfig/networking/.meta/icss_emac/icss_emac_am261x.syscfg.js deleted file mode 100644 index 47224333..00000000 --- a/sysconfig/networking/.meta/icss_emac/icss_emac_am261x.syscfg.js +++ /dev/null @@ -1,145 +0,0 @@ - -let common = system.getScript("/common"); - -let icss_instances = [ - { - name: "ICSSM0", - }, -]; - -let phyToMacModes_instances = [ - { - name: "MII", - }, -]; - -let INTERRUPT_OFFSET_ICSS = { - "ICSSM0": 0, -}; - -let PORT_INT_OFFSET = { - "rxIntNum" : [0, 1], - "txIntNum" : [2, 3], - "linkIntNum" : [6, 7], -}; - -const staticConfig = -{ - emacMode: [ "ICSS_EMAC_MODE_SWITCH", "0" ], - phyAddr: [12, 3], - phyToMacInterfaceMode: "ICSS_EMAC_MII_MODE", - halfDuplexEnable: false, - enableIntrPacing: "ICSS_EMAC_DISABLE_PACING", - intrPacingMode: "ICSS_EMAC_INTR_PACING_MODE1", - pacingThreshold: 0, - ethPrioQueue: "ICSS_EMAC_QUEUE3", - learningEnable: false, - portMask: "ICSS_EMAC_MODE_SWITCH", - txInterruptEnable: false, - linkIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["linkIntNum"][0], - rxIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["rxIntNum"][0], - txIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["txIntNum"][0], - pktBufSize: 0x10000, - txTaskPriority: 10, - rxTaskPriority: 10, - linkTaskPriority: 10, - pktBufIndex: 0, - splitQueue: 0, -}; - -function getIcssInstancesArr() -{ - return icss_instances; -} - -function getPhyToMacInterfacesArr() -{ - return phyToMacModes_instances; -} - -function getStaticConfig() { - return _.cloneDeep(staticConfig); -} - -function updateConfig(inst, config) -{ - let port = 0; - - switch(inst.mode) - { - case "SWITCH": - config.emacMode[0] = "ICSS_EMAC_MODE_SWITCH"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_SWITCH"; - config.phyAddr[0] = inst.phyAddr0; - config.phyAddr[1] = inst.phyAddr1; - port = 0; - break; - - case "DUAL MAC | MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - config.phyAddr[0] = inst.phyAddr0; - port = 0; - break; - - case "MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - config.phyAddr[0] = inst.phyAddr0; - port = 0; - break; - - case "DUAL MAC | MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - config.phyAddr[0] = inst.phyAddr1; - port = 1; - break; - - case "MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - config.phyAddr[0] = inst.phyAddr1; - port = 1; - break; - } - - switch(inst.instance) - { - case "ICSSM0": - config.pktBufIndex = 0; - break; - } - config.linkIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["linkIntNum"][port]; - config.rxIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["rxIntNum"][port]; - config.txIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["txIntNum"][port]; - config.ethPrioQueue = `ICSS_EMAC_${inst.queue}`; - config.pktBufSize = inst.pktBufSizeKB*1024; -} - -function getPktBufSizes(module) -{ - let pktBufSizes= [ 0 ]; - let instance = module.$instances[0]; - let config = module.getInstanceConfig(instance); - - if(config.pktBufSize > pktBufSizes[0]) - { - pktBufSizes[0] = config.pktBufSize; - } - - return pktBufSizes; -} - -exports = { - getStaticConfig, - updateConfig, - getIcssInstancesArr, - getPhyToMacInterfacesArr, - getPktBufSizes, -}; diff --git a/sysconfig/networking/.meta/icss_emac/icss_emac_am263px.syscfg.js b/sysconfig/networking/.meta/icss_emac/icss_emac_am263px.syscfg.js deleted file mode 100644 index 47224333..00000000 --- a/sysconfig/networking/.meta/icss_emac/icss_emac_am263px.syscfg.js +++ /dev/null @@ -1,145 +0,0 @@ - -let common = system.getScript("/common"); - -let icss_instances = [ - { - name: "ICSSM0", - }, -]; - -let phyToMacModes_instances = [ - { - name: "MII", - }, -]; - -let INTERRUPT_OFFSET_ICSS = { - "ICSSM0": 0, -}; - -let PORT_INT_OFFSET = { - "rxIntNum" : [0, 1], - "txIntNum" : [2, 3], - "linkIntNum" : [6, 7], -}; - -const staticConfig = -{ - emacMode: [ "ICSS_EMAC_MODE_SWITCH", "0" ], - phyAddr: [12, 3], - phyToMacInterfaceMode: "ICSS_EMAC_MII_MODE", - halfDuplexEnable: false, - enableIntrPacing: "ICSS_EMAC_DISABLE_PACING", - intrPacingMode: "ICSS_EMAC_INTR_PACING_MODE1", - pacingThreshold: 0, - ethPrioQueue: "ICSS_EMAC_QUEUE3", - learningEnable: false, - portMask: "ICSS_EMAC_MODE_SWITCH", - txInterruptEnable: false, - linkIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["linkIntNum"][0], - rxIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["rxIntNum"][0], - txIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["txIntNum"][0], - pktBufSize: 0x10000, - txTaskPriority: 10, - rxTaskPriority: 10, - linkTaskPriority: 10, - pktBufIndex: 0, - splitQueue: 0, -}; - -function getIcssInstancesArr() -{ - return icss_instances; -} - -function getPhyToMacInterfacesArr() -{ - return phyToMacModes_instances; -} - -function getStaticConfig() { - return _.cloneDeep(staticConfig); -} - -function updateConfig(inst, config) -{ - let port = 0; - - switch(inst.mode) - { - case "SWITCH": - config.emacMode[0] = "ICSS_EMAC_MODE_SWITCH"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_SWITCH"; - config.phyAddr[0] = inst.phyAddr0; - config.phyAddr[1] = inst.phyAddr1; - port = 0; - break; - - case "DUAL MAC | MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - config.phyAddr[0] = inst.phyAddr0; - port = 0; - break; - - case "MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - config.phyAddr[0] = inst.phyAddr0; - port = 0; - break; - - case "DUAL MAC | MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - config.phyAddr[0] = inst.phyAddr1; - port = 1; - break; - - case "MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - config.phyAddr[0] = inst.phyAddr1; - port = 1; - break; - } - - switch(inst.instance) - { - case "ICSSM0": - config.pktBufIndex = 0; - break; - } - config.linkIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["linkIntNum"][port]; - config.rxIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["rxIntNum"][port]; - config.txIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["txIntNum"][port]; - config.ethPrioQueue = `ICSS_EMAC_${inst.queue}`; - config.pktBufSize = inst.pktBufSizeKB*1024; -} - -function getPktBufSizes(module) -{ - let pktBufSizes= [ 0 ]; - let instance = module.$instances[0]; - let config = module.getInstanceConfig(instance); - - if(config.pktBufSize > pktBufSizes[0]) - { - pktBufSizes[0] = config.pktBufSize; - } - - return pktBufSizes; -} - -exports = { - getStaticConfig, - updateConfig, - getIcssInstancesArr, - getPhyToMacInterfacesArr, - getPktBufSizes, -}; diff --git a/sysconfig/networking/.meta/icss_emac/icss_emac_am263x.syscfg.js b/sysconfig/networking/.meta/icss_emac/icss_emac_am263x.syscfg.js deleted file mode 100644 index a6c98724..00000000 --- a/sysconfig/networking/.meta/icss_emac/icss_emac_am263x.syscfg.js +++ /dev/null @@ -1,145 +0,0 @@ - -let common = system.getScript("/common"); - -let icss_instances = [ - { - name: "ICSSM0", - }, -]; - -let phyToMacModes_instances = [ - { - name: "MII", - }, -]; - -let INTERRUPT_OFFSET_ICSS = { - "ICSSM0": 0, -}; - -let PORT_INT_OFFSET = { - "rxIntNum" : [0, 1], - "txIntNum" : [2, 3], - "linkIntNum" : [6, 7], -}; - -const staticConfig = -{ - emacMode: [ "ICSS_EMAC_MODE_SWITCH", "0" ], - phyAddr: [15, 3], - phyToMacInterfaceMode: "ICSS_EMAC_MII_MODE", - halfDuplexEnable: false, - enableIntrPacing: "ICSS_EMAC_DISABLE_PACING", - intrPacingMode: "ICSS_EMAC_INTR_PACING_MODE1", - pacingThreshold: 0, - ethPrioQueue: "ICSS_EMAC_QUEUE3", - learningEnable: false, - portMask: "ICSS_EMAC_MODE_SWITCH", - txInterruptEnable: false, - linkIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["linkIntNum"][0], - rxIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["rxIntNum"][0], - txIntNum: INTERRUPT_OFFSET_ICSS["ICSSM0"] + PORT_INT_OFFSET["txIntNum"][0], - pktBufSize: 0x10000, - txTaskPriority: 10, - rxTaskPriority: 10, - linkTaskPriority: 10, - pktBufIndex: 0, - splitQueue: 0, -}; - -function getIcssInstancesArr() -{ - return icss_instances; -} - -function getPhyToMacInterfacesArr() -{ - return phyToMacModes_instances; -} - -function getStaticConfig() { - return _.cloneDeep(staticConfig); -} - -function updateConfig(inst, config) -{ - let port = 0; - - switch(inst.mode) - { - case "SWITCH": - config.emacMode[0] = "ICSS_EMAC_MODE_SWITCH"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_SWITCH"; - config.phyAddr[0] = inst.phyAddr0; - config.phyAddr[1] = inst.phyAddr1; - port = 0; - break; - - case "DUAL MAC | MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - config.phyAddr[0] = inst.phyAddr0; - port = 0; - break; - - case "MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - config.phyAddr[0] = inst.phyAddr0; - port = 0; - break; - - case "DUAL MAC | MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - config.phyAddr[0] = inst.phyAddr1; - port = 1; - break; - - case "MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - config.phyAddr[0] = inst.phyAddr1; - port = 1; - break; - } - - switch(inst.instance) - { - case "ICSSM0": - config.pktBufIndex = 0; - break; - } - config.linkIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["linkIntNum"][port]; - config.rxIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["rxIntNum"][port]; - config.txIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["txIntNum"][port]; - config.ethPrioQueue = `ICSS_EMAC_${inst.queue}`; - config.pktBufSize = inst.pktBufSizeKB*1024; -} - -function getPktBufSizes(module) -{ - let pktBufSizes= [ 0 ]; - let instance = module.$instances[0]; - let config = module.getInstanceConfig(instance); - - if(config.pktBufSize > pktBufSizes[0]) - { - pktBufSizes[0] = config.pktBufSize; - } - - return pktBufSizes; -} - -exports = { - getStaticConfig, - updateConfig, - getIcssInstancesArr, - getPhyToMacInterfacesArr, - getPktBufSizes, -}; diff --git a/sysconfig/networking/.meta/icss_emac/icss_emac_am64x.syscfg.js b/sysconfig/networking/.meta/icss_emac/icss_emac_am64x.syscfg.js deleted file mode 100644 index d8681c03..00000000 --- a/sysconfig/networking/.meta/icss_emac/icss_emac_am64x.syscfg.js +++ /dev/null @@ -1,166 +0,0 @@ - -let common = system.getScript("/common"); - -let icss_instances = [ - { - name: "ICSSG0", - }, - { - name: "ICSSG1", - } -]; - -let phyToMacModes_instances = [ - { - name: "MII", - }, - { - name: "RGMII", - } -]; - -let INTERRUPT_OFFSET_ICSS = { - "ICSSG0": 120, - "ICSSG1": 248, -}; - -let PORT_INT_OFFSET = { - "rxIntNum" : [0, 1], - "txIntNum" : [2, 3], - "linkIntNum" : [6, 7], -}; - -const staticConfig = -{ - emacMode: [ "ICSS_EMAC_MODE_SWITCH", "0" ], - phyAddr: [15, 3], - phyToMacInterfaceMode: "ICSS_EMAC_MII_MODE", - halfDuplexEnable: false, - enableIntrPacing: "ICSS_EMAC_DISABLE_PACING", - intrPacingMode: "ICSS_EMAC_INTR_PACING_MODE1", - pacingThreshold: 0, - ethPrioQueue: "ICSS_EMAC_QUEUE3", - learningEnable: false, - portMask: "ICSS_EMAC_MODE_SWITCH", - txInterruptEnable: false, - linkIntNum: INTERRUPT_OFFSET_ICSS["ICSSG0"] + PORT_INT_OFFSET["linkIntNum"][0], - rxIntNum: INTERRUPT_OFFSET_ICSS["ICSSG0"] + PORT_INT_OFFSET["rxIntNum"][0], - txIntNum: INTERRUPT_OFFSET_ICSS["ICSSG0"] + PORT_INT_OFFSET["txIntNum"][0], - pktBufSize: 0x10000, - txTaskPriority: 10, - rxTaskPriority: 10, - linkTaskPriority: 10, - pktBufIndex: 0, - splitQueue: 0, -}; - -function getIcssInstancesArr() -{ - return icss_instances; -} - -function getPhyToMacInterfacesArr() -{ - return phyToMacModes_instances; -} - -function getStaticConfig() { - return _.cloneDeep(staticConfig); -} - -function updateConfig(inst, config) -{ - let port = 0; - - switch(inst.mode) - { - case "SWITCH": - config.emacMode[0] = "ICSS_EMAC_MODE_SWITCH"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_SWITCH"; - port = 0; - break; - - case "DUAL MAC | MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - port = 0; - break; - - case "MAC1": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC1"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC1"; - port = 0; - break; - - case "DUAL MAC | MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "ICSS_EMAC_MODE_DUALMAC"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - port = 1; - break; - - case "MAC2": - config.emacMode[0] = "ICSS_EMAC_MODE_MAC2"; - config.emacMode[1] = "0"; - config.portMask = "ICSS_EMAC_MODE_MAC2"; - port = 1; - break; - } - - switch(inst.instance) - { - case "ICSSG0": - config.pktBufIndex = 0; - break; - case "ICSSG1": - config.pktBufIndex = 1; - break; - } - config.linkIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["linkIntNum"][port]; - config.rxIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["rxIntNum"][port]; - config.txIntNum = INTERRUPT_OFFSET_ICSS[inst.instance] + PORT_INT_OFFSET["txIntNum"][port]; - config.phyAddr[0] = inst.phyAddr0; - config.phyAddr[1] = inst.phyAddr1; - config.ethPrioQueue = `ICSS_EMAC_${inst.queue}`; - config.pktBufSize = inst.pktBufSizeKB*1024; -} - -function getPktBufSizes(module) -{ - let pktBufSizes= [ 0, 0 ]; - - for(let i = 0; i < module.$instances.length; i++) - { - let instance = module.$instances[i]; - let config = module.getInstanceConfig(instance); - - switch(config.instance) - { - case "ICSSG0": - if(config.pktBufSize > pktBufSizes[0]) - { - pktBufSizes[0] = config.pktBufSize; - } - break; - case "ICSSG1": - if(config.pktBufSize > pktBufSizes[1]) - { - pktBufSizes[1] = config.pktBufSize; - } - break; - } - } - - return pktBufSizes; -} - -exports = { - getStaticConfig, - updateConfig, - getIcssInstancesArr, - getPhyToMacInterfacesArr, - getPktBufSizes, -}; diff --git a/sysconfig/networking/.meta/icss_emac/templates/icss_emac.h.xdt b/sysconfig/networking/.meta/icss_emac/templates/icss_emac.h.xdt deleted file mode 100644 index e5a53cd3..00000000 --- a/sysconfig/networking/.meta/icss_emac/templates/icss_emac.h.xdt +++ /dev/null @@ -1,15 +0,0 @@ -%%{ - let module = system.modules['/networking/icss_emac/icss_emac']; -%%} -/* - * ICSS EMAC - */ -#include - -/* ICSS EMAC Instance Macros */ -% for(let i = 0; i < module.$instances.length; i++) { - % let instance = module.$instances[i]; -#define `instance.$name.toUpperCase()` (`i`U) -% } -#define CONFIG_ICSS_EMAC_INSTANCES (`module.$instances.length`U) -#define ICSS_EMAC_MODE (`module.getInstanceConfig(module.$instances[0]).emacMode[0]`) diff --git a/sysconfig/networking/.meta/icss_emac/templates/icss_emac_config.c.xdt b/sysconfig/networking/.meta/icss_emac/templates/icss_emac_config.c.xdt deleted file mode 100644 index d701d111..00000000 --- a/sysconfig/networking/.meta/icss_emac/templates/icss_emac_config.c.xdt +++ /dev/null @@ -1,69 +0,0 @@ -%%{ - let module = system.modules['/networking/icss_emac/icss_emac']; - let pktBufSizes = module.getPktBufSizes(module); -%%} - -/* - * ICSS EMAC - */ - -/* ICSS EMAC Packet Buffers */ -% for(let i=0; i