nvethernetrm: add support for EQOS VM interrupts

Adds VM IRQ handling support at OSI layer and adds
corresponding support for EQOS as well.

Need to pass below parameters from DT -
o Number of VM IRQ's assigned per OS/VM.
o Number of VM channels assigned to a VM IRQ.
o List of DMA channels assigned to a VM IRQ.

Below is the sample DT representation -

vm_irq_config: vm-irq-config {
	nvidia,num-vm-irqs = <4>;
	vm_irq1 {
		nvidia,num-vm-channels = <2>;
		nvidia,vm-channels = <0 1>;
	};
	vm_irq2 {
		nvidia,num-vm-channels = <2>;
		nvidia,vm-channels = <2 3>;
	};
	vm_irq3 {
		nvidia,num-vm-channels = <2>;
		nvidia,vm-channels = <4 5>;
	};
	vm_irq4 {
		nvidia,num-vm-channels = <2>;
		nvidia,vm-channels = <6 7>;
	};
};

ethernet@<base_addr> {
	[...]
	nvidia,vm-irq-config = <&vm_irq_config>;
	[...]
}

Bug 200546379

Change-Id: Id20780d573aa70baf42b003728ba416ed61832d2
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2250403
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2198595
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Bhadram Varka
2019-06-26 20:23:44 +05:30
parent c43f5516ab
commit e8dcbc4286
7 changed files with 257 additions and 32 deletions

View File

@@ -212,8 +212,8 @@
#define EQOS_MAX_MAC_ADDRESS_FILTER 128U
#define EQOS_MAX_L3_L4_FILTER 8U
#define EQOS_MAX_HTR_REGS 8U
#define OSI_EQOS_MAX_NUM_CHANS 4U
#define OSI_EQOS_MAX_NUM_QUEUES 4U
#define OSI_EQOS_MAX_NUM_CHANS 8U
#define OSI_EQOS_MAX_NUM_QUEUES 8U
#define OSI_L2_FILTER_INDEX_ANY 127U
#define OSI_CHAN_ANY 0xFFU
@@ -238,6 +238,7 @@
#define OSI_MAC_HW_EQOS 0U
#define OSI_ETH_ALEN 6U
#define OSI_MAX_VM_IRQS 5U
#define BOOLEAN_FALSE (0U != 0U)
#define OSI_NULL ((void *)0)