All of lore.kernel.org
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	<robh+dt@kernel.org>, <ssantosh@kernel.org>, <malat@debian.org>,
	<w-kwok2@ti.com>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Cc: <mark.rutland@arm.com>
Subject: Re: [net-next,v2,01/10] soc: ti: K2G: enhancement to support QMSS in NSS
Date: Thu, 29 Mar 2018 10:50:46 -0400	[thread overview]
Message-ID: <9ef90d5d-3714-3705-73d9-f3c04069279d@ti.com> (raw)
In-Reply-To: <1ccf03e7-17b4-cf00-176d-0e41038c88f8@ti.com>

Hi Grygorii,

Thanks for reviewing this!

On 03/28/2018 03:01 PM, Grygorii Strashko wrote:
> Hi Murali,
> 
> On 03/27/2018 11:31 AM, Murali Karicheri wrote:
>> Navigator Subsystem (NSS) available on K2G SoC has a cut down
>> version of QMSS with less number of queues, internal linking ram
>> with lesser number of buffers etc.  It doesn't have status and
>> explicit push register space as in QMSS available on other K2 SoCs.
>> So define reg indices specific to QMSS on K2G. This patch introduces
>> "keystone-navigator-qmss-l" compatibility to identify QMSS on
>> K2G NSS (QMSS Lite) and to customize the dts handling code. Per
>> Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>> ---
>>   .../bindings/soc/ti/keystone-navigator-qmss.txt    |  7 ++
>>   drivers/soc/ti/knav_qmss.h                         |  6 ++
>>   drivers/soc/ti/knav_qmss_queue.c                   | 90 ++++++++++++++++------
>>   3 files changed, 81 insertions(+), 22 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> index 77cd42c..1b0878a 100644
>> --- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> +++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> @@ -18,6 +18,7 @@ pool management.
>>   
>>   Required properties:
>>   - compatible	: Must be "ti,keystone-navigator-qmss";
>> +		: Must be "ti,keystone-navigator-qmss-l" for NSS Lite
> 
> 
> I think, It will be more accurate to add K2G specific compat string
> like "ti,66ak2g-navss-qm":
> 
> compatible = "ti,66ak2g-navss-qm", "ti,keystone-navigator-qmss";
> 
> because 66ak2g TRM doesn't mention "Navss light" and this Navss version is used
> only in 66ak2g Soc. As result, 66ak2g Navss QM is subset of of keystone 2 Navss QM 
> which should be defined in DT by adding more specific compat string in addition
> to generic one.  
> 

As I have mentioned in the commit description, it is not a subset of the K2
registers. There are some differences that makes it not compatible with K2 QMSS.
See my description, 

>>It doesn't have status and explicit push register space as in QMSS available on
>>other K2 SoCs.

And also

>> Per Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register

So will have to use a specific compatible = "ti,66ak2g-navss-qm" for this QM IMO.

Murali
> 
>>   - clocks	: phandle to the reference clock for this device.
>>   - queue-range	: <start number> total range of queue numbers for the device.
>>   - linkram0	: <address size> for internal link ram, where size is the total
>> @@ -39,6 +40,12 @@ Required properties:
>>   			  - Descriptor memory setup region.
>>   			  - Queue Management/Queue Proxy region for queue Push.
>>   			  - Queue Management/Queue Proxy region for queue Pop.
>> +
>> +For NSS lite, following QMSS reg indexes are used in that order
> 
> For 66AK2G NAVSS QM..
> 
>> +			  - Queue Peek region.
>> +			  - Queue configuration region.
>> +			  - Queue Management/Queue Proxy region for queue Push/Pop.
>> +
>>   - queue-pools	: child node classifying the queue ranges into pools.
>>   		  Queue ranges are grouped into 3 type of pools:
>>   		  - qpend	    : pool of qpend(interruptible) queues
>> diff --git a/drivers/soc/ti/knav_qmss.h b/drivers/soc/ti/knav_qmss.h
>> index 905b974..5fa1ce6 100644
>> --- a/drivers/soc/ti/knav_qmss.h
>> +++ b/drivers/soc/ti/knav_qmss.h
>> @@ -292,6 +292,11 @@ struct knav_queue {
>>   	struct list_head		list;
>>   };
>>   
>> +enum qmss_version {
>> +	QMSS,
>> +	QMSS_LITE,
> 
> QMSS_66AK2G
> 
>> +};
>> +
>>   struct knav_device {
>>   	struct device				*dev;
>>   	unsigned				base_id;
>> @@ -305,6 +310,7 @@ struct knav_device {
>>   	struct list_head			pools;
>>   	struct list_head			pdsps;
>>   	struct list_head			qmgrs;
>> +	enum qmss_version			version;
>>   };
>>   
> 
> [...]
> 
>>   }
>>   
>> +/* Match table for of_platform binding */
>> +static const struct of_device_id keystone_qmss_of_match[] = {
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss",
> 
> 		.data	= (void *)QMSS,
> 
>> +	},
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss-l",
>> +		.data	= (void *)QMSS_LITE,
>> +	},
>> +	{},
>> +};
>> +MODULE_DEVICE_TABLE(of, keystone_qmss_of_match);
>> +
>>   static int knav_queue_probe(struct platform_device *pdev)
>>   {
>>   	struct device_node *node = pdev->dev.of_node;
>>   	struct device_node *qmgrs, *queue_pools, *regions, *pdsps;
>> +	const struct of_device_id *match;
>>   	struct device *dev = &pdev->dev;
>>   	u32 temp[2];
>>   	int ret;
>> @@ -1700,6 +1749,10 @@ static int knav_queue_probe(struct platform_device *pdev)
>>   		return -ENOMEM;
>>   	}
>>   
>> +	match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev);
>> +	if (match && match->data)
>> +		kdev->version = QMSS_LITE;
> 
> 	if (match)
> 		kdev->version = match->data;
> 	else
> 		error?
> [...]
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

WARNING: multiple messages have this Message-ID (diff)
From: Murali Karicheri <m-karicheri2@ti.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	<robh+dt@kernel.org>, <ssantosh@kernel.org>, <malat@debian.org>,
	<w-kwok2@ti.com>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Cc: mark.rutland@arm.com
Subject: Re: [net-next, v2, 01/10] soc: ti: K2G: enhancement to support QMSS in NSS
Date: Thu, 29 Mar 2018 10:50:46 -0400	[thread overview]
Message-ID: <9ef90d5d-3714-3705-73d9-f3c04069279d@ti.com> (raw)
In-Reply-To: <1ccf03e7-17b4-cf00-176d-0e41038c88f8@ti.com>

Hi Grygorii,

Thanks for reviewing this!

On 03/28/2018 03:01 PM, Grygorii Strashko wrote:
> Hi Murali,
> 
> On 03/27/2018 11:31 AM, Murali Karicheri wrote:
>> Navigator Subsystem (NSS) available on K2G SoC has a cut down
>> version of QMSS with less number of queues, internal linking ram
>> with lesser number of buffers etc.  It doesn't have status and
>> explicit push register space as in QMSS available on other K2 SoCs.
>> So define reg indices specific to QMSS on K2G. This patch introduces
>> "keystone-navigator-qmss-l" compatibility to identify QMSS on
>> K2G NSS (QMSS Lite) and to customize the dts handling code. Per
>> Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>> ---
>>   .../bindings/soc/ti/keystone-navigator-qmss.txt    |  7 ++
>>   drivers/soc/ti/knav_qmss.h                         |  6 ++
>>   drivers/soc/ti/knav_qmss_queue.c                   | 90 ++++++++++++++++------
>>   3 files changed, 81 insertions(+), 22 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> index 77cd42c..1b0878a 100644
>> --- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> +++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> @@ -18,6 +18,7 @@ pool management.
>>   
>>   Required properties:
>>   - compatible	: Must be "ti,keystone-navigator-qmss";
>> +		: Must be "ti,keystone-navigator-qmss-l" for NSS Lite
> 
> 
> I think, It will be more accurate to add K2G specific compat string
> like "ti,66ak2g-navss-qm":
> 
> compatible = "ti,66ak2g-navss-qm", "ti,keystone-navigator-qmss";
> 
> because 66ak2g TRM doesn't mention "Navss light" and this Navss version is used
> only in 66ak2g Soc. As result, 66ak2g Navss QM is subset of of keystone 2 Navss QM 
> which should be defined in DT by adding more specific compat string in addition
> to generic one.  
> 

As I have mentioned in the commit description, it is not a subset of the K2
registers. There are some differences that makes it not compatible with K2 QMSS.
See my description, 

>>It doesn't have status and explicit push register space as in QMSS available on
>>other K2 SoCs.

And also

>> Per Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register

So will have to use a specific compatible = "ti,66ak2g-navss-qm" for this QM IMO.

Murali
> 
>>   - clocks	: phandle to the reference clock for this device.
>>   - queue-range	: <start number> total range of queue numbers for the device.
>>   - linkram0	: <address size> for internal link ram, where size is the total
>> @@ -39,6 +40,12 @@ Required properties:
>>   			  - Descriptor memory setup region.
>>   			  - Queue Management/Queue Proxy region for queue Push.
>>   			  - Queue Management/Queue Proxy region for queue Pop.
>> +
>> +For NSS lite, following QMSS reg indexes are used in that order
> 
> For 66AK2G NAVSS QM..
> 
>> +			  - Queue Peek region.
>> +			  - Queue configuration region.
>> +			  - Queue Management/Queue Proxy region for queue Push/Pop.
>> +
>>   - queue-pools	: child node classifying the queue ranges into pools.
>>   		  Queue ranges are grouped into 3 type of pools:
>>   		  - qpend	    : pool of qpend(interruptible) queues
>> diff --git a/drivers/soc/ti/knav_qmss.h b/drivers/soc/ti/knav_qmss.h
>> index 905b974..5fa1ce6 100644
>> --- a/drivers/soc/ti/knav_qmss.h
>> +++ b/drivers/soc/ti/knav_qmss.h
>> @@ -292,6 +292,11 @@ struct knav_queue {
>>   	struct list_head		list;
>>   };
>>   
>> +enum qmss_version {
>> +	QMSS,
>> +	QMSS_LITE,
> 
> QMSS_66AK2G
> 
>> +};
>> +
>>   struct knav_device {
>>   	struct device				*dev;
>>   	unsigned				base_id;
>> @@ -305,6 +310,7 @@ struct knav_device {
>>   	struct list_head			pools;
>>   	struct list_head			pdsps;
>>   	struct list_head			qmgrs;
>> +	enum qmss_version			version;
>>   };
>>   
> 
> [...]
> 
>>   }
>>   
>> +/* Match table for of_platform binding */
>> +static const struct of_device_id keystone_qmss_of_match[] = {
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss",
> 
> 		.data	= (void *)QMSS,
> 
>> +	},
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss-l",
>> +		.data	= (void *)QMSS_LITE,
>> +	},
>> +	{},
>> +};
>> +MODULE_DEVICE_TABLE(of, keystone_qmss_of_match);
>> +
>>   static int knav_queue_probe(struct platform_device *pdev)
>>   {
>>   	struct device_node *node = pdev->dev.of_node;
>>   	struct device_node *qmgrs, *queue_pools, *regions, *pdsps;
>> +	const struct of_device_id *match;
>>   	struct device *dev = &pdev->dev;
>>   	u32 temp[2];
>>   	int ret;
>> @@ -1700,6 +1749,10 @@ static int knav_queue_probe(struct platform_device *pdev)
>>   		return -ENOMEM;
>>   	}
>>   
>> +	match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev);
>> +	if (match && match->data)
>> +		kdev->version = QMSS_LITE;
> 
> 	if (match)
> 		kdev->version = match->data;
> 	else
> 		error?
> [...]
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

WARNING: multiple messages have this Message-ID (diff)
From: Murali Karicheri <m-karicheri2@ti.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	robh+dt@kernel.org, ssantosh@kernel.org, malat@debian.org,
	w-kwok2@ti.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, davem@davemloft.net,
	netdev@vger.kernel.org
Cc: mark.rutland@arm.com
Subject: Re: [net-next, v2, 01/10] soc: ti: K2G: enhancement to support QMSS in NSS
Date: Thu, 29 Mar 2018 10:50:46 -0400	[thread overview]
Message-ID: <9ef90d5d-3714-3705-73d9-f3c04069279d@ti.com> (raw)
In-Reply-To: <1ccf03e7-17b4-cf00-176d-0e41038c88f8@ti.com>

Hi Grygorii,

Thanks for reviewing this!

On 03/28/2018 03:01 PM, Grygorii Strashko wrote:
> Hi Murali,
> 
> On 03/27/2018 11:31 AM, Murali Karicheri wrote:
>> Navigator Subsystem (NSS) available on K2G SoC has a cut down
>> version of QMSS with less number of queues, internal linking ram
>> with lesser number of buffers etc.  It doesn't have status and
>> explicit push register space as in QMSS available on other K2 SoCs.
>> So define reg indices specific to QMSS on K2G. This patch introduces
>> "keystone-navigator-qmss-l" compatibility to identify QMSS on
>> K2G NSS (QMSS Lite) and to customize the dts handling code. Per
>> Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>> ---
>>   .../bindings/soc/ti/keystone-navigator-qmss.txt    |  7 ++
>>   drivers/soc/ti/knav_qmss.h                         |  6 ++
>>   drivers/soc/ti/knav_qmss_queue.c                   | 90 ++++++++++++++++------
>>   3 files changed, 81 insertions(+), 22 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> index 77cd42c..1b0878a 100644
>> --- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> +++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> @@ -18,6 +18,7 @@ pool management.
>>   
>>   Required properties:
>>   - compatible	: Must be "ti,keystone-navigator-qmss";
>> +		: Must be "ti,keystone-navigator-qmss-l" for NSS Lite
> 
> 
> I think, It will be more accurate to add K2G specific compat string
> like "ti,66ak2g-navss-qm":
> 
> compatible = "ti,66ak2g-navss-qm", "ti,keystone-navigator-qmss";
> 
> because 66ak2g TRM doesn't mention "Navss light" and this Navss version is used
> only in 66ak2g Soc. As result, 66ak2g Navss QM is subset of of keystone 2 Navss QM 
> which should be defined in DT by adding more specific compat string in addition
> to generic one.  
> 

As I have mentioned in the commit description, it is not a subset of the K2
registers. There are some differences that makes it not compatible with K2 QMSS.
See my description, 

>>It doesn't have status and explicit push register space as in QMSS available on
>>other K2 SoCs.

And also

>> Per Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register

So will have to use a specific compatible = "ti,66ak2g-navss-qm" for this QM IMO.

Murali
> 
>>   - clocks	: phandle to the reference clock for this device.
>>   - queue-range	: <start number> total range of queue numbers for the device.
>>   - linkram0	: <address size> for internal link ram, where size is the total
>> @@ -39,6 +40,12 @@ Required properties:
>>   			  - Descriptor memory setup region.
>>   			  - Queue Management/Queue Proxy region for queue Push.
>>   			  - Queue Management/Queue Proxy region for queue Pop.
>> +
>> +For NSS lite, following QMSS reg indexes are used in that order
> 
> For 66AK2G NAVSS QM..
> 
>> +			  - Queue Peek region.
>> +			  - Queue configuration region.
>> +			  - Queue Management/Queue Proxy region for queue Push/Pop.
>> +
>>   - queue-pools	: child node classifying the queue ranges into pools.
>>   		  Queue ranges are grouped into 3 type of pools:
>>   		  - qpend	    : pool of qpend(interruptible) queues
>> diff --git a/drivers/soc/ti/knav_qmss.h b/drivers/soc/ti/knav_qmss.h
>> index 905b974..5fa1ce6 100644
>> --- a/drivers/soc/ti/knav_qmss.h
>> +++ b/drivers/soc/ti/knav_qmss.h
>> @@ -292,6 +292,11 @@ struct knav_queue {
>>   	struct list_head		list;
>>   };
>>   
>> +enum qmss_version {
>> +	QMSS,
>> +	QMSS_LITE,
> 
> QMSS_66AK2G
> 
>> +};
>> +
>>   struct knav_device {
>>   	struct device				*dev;
>>   	unsigned				base_id;
>> @@ -305,6 +310,7 @@ struct knav_device {
>>   	struct list_head			pools;
>>   	struct list_head			pdsps;
>>   	struct list_head			qmgrs;
>> +	enum qmss_version			version;
>>   };
>>   
> 
> [...]
> 
>>   }
>>   
>> +/* Match table for of_platform binding */
>> +static const struct of_device_id keystone_qmss_of_match[] = {
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss",
> 
> 		.data	= (void *)QMSS,
> 
>> +	},
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss-l",
>> +		.data	= (void *)QMSS_LITE,
>> +	},
>> +	{},
>> +};
>> +MODULE_DEVICE_TABLE(of, keystone_qmss_of_match);
>> +
>>   static int knav_queue_probe(struct platform_device *pdev)
>>   {
>>   	struct device_node *node = pdev->dev.of_node;
>>   	struct device_node *qmgrs, *queue_pools, *regions, *pdsps;
>> +	const struct of_device_id *match;
>>   	struct device *dev = &pdev->dev;
>>   	u32 temp[2];
>>   	int ret;
>> @@ -1700,6 +1749,10 @@ static int knav_queue_probe(struct platform_device *pdev)
>>   		return -ENOMEM;
>>   	}
>>   
>> +	match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev);
>> +	if (match && match->data)
>> +		kdev->version = QMSS_LITE;
> 
> 	if (match)
> 		kdev->version = match->data;
> 	else
> 		error?
> [...]
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

WARNING: multiple messages have this Message-ID (diff)
From: m-karicheri2@ti.com (Murali Karicheri)
To: linux-arm-kernel@lists.infradead.org
Subject: [net-next, v2, 01/10] soc: ti: K2G: enhancement to support QMSS in NSS
Date: Thu, 29 Mar 2018 10:50:46 -0400	[thread overview]
Message-ID: <9ef90d5d-3714-3705-73d9-f3c04069279d@ti.com> (raw)
In-Reply-To: <1ccf03e7-17b4-cf00-176d-0e41038c88f8@ti.com>

Hi Grygorii,

Thanks for reviewing this!

On 03/28/2018 03:01 PM, Grygorii Strashko wrote:
> Hi Murali,
> 
> On 03/27/2018 11:31 AM, Murali Karicheri wrote:
>> Navigator Subsystem (NSS) available on K2G SoC has a cut down
>> version of QMSS with less number of queues, internal linking ram
>> with lesser number of buffers etc.  It doesn't have status and
>> explicit push register space as in QMSS available on other K2 SoCs.
>> So define reg indices specific to QMSS on K2G. This patch introduces
>> "keystone-navigator-qmss-l" compatibility to identify QMSS on
>> K2G NSS (QMSS Lite) and to customize the dts handling code. Per
>> Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>> ---
>>   .../bindings/soc/ti/keystone-navigator-qmss.txt    |  7 ++
>>   drivers/soc/ti/knav_qmss.h                         |  6 ++
>>   drivers/soc/ti/knav_qmss_queue.c                   | 90 ++++++++++++++++------
>>   3 files changed, 81 insertions(+), 22 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> index 77cd42c..1b0878a 100644
>> --- a/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> +++ b/Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt
>> @@ -18,6 +18,7 @@ pool management.
>>   
>>   Required properties:
>>   - compatible	: Must be "ti,keystone-navigator-qmss";
>> +		: Must be "ti,keystone-navigator-qmss-l" for NSS Lite
> 
> 
> I think, It will be more accurate to add K2G specific compat string
> like "ti,66ak2g-navss-qm":
> 
> compatible = "ti,66ak2g-navss-qm", "ti,keystone-navigator-qmss";
> 
> because 66ak2g TRM doesn't mention "Navss light" and this Navss version is used
> only in 66ak2g Soc. As result, 66ak2g Navss QM is subset of of keystone 2 Navss QM 
> which should be defined in DT by adding more specific compat string in addition
> to generic one.  
> 

As I have mentioned in the commit description, it is not a subset of the K2
registers. There are some differences that makes it not compatible with K2 QMSS.
See my description, 

>>It doesn't have status and explicit push register space as in QMSS available on
>>other K2 SoCs.

And also

>> Per Device manual, descriptors with index less than or equal to
>> regions0_size is in region 0 in the case of QMSS where as for
>> QMSS Lite, descriptors with index less than regions0_size is in
>> region 0. So update the size accordingly in the regions0_size bits
>> of the linking ram size 0 register

So will have to use a specific compatible = "ti,66ak2g-navss-qm" for this QM IMO.

Murali
> 
>>   - clocks	: phandle to the reference clock for this device.
>>   - queue-range	: <start number> total range of queue numbers for the device.
>>   - linkram0	: <address size> for internal link ram, where size is the total
>> @@ -39,6 +40,12 @@ Required properties:
>>   			  - Descriptor memory setup region.
>>   			  - Queue Management/Queue Proxy region for queue Push.
>>   			  - Queue Management/Queue Proxy region for queue Pop.
>> +
>> +For NSS lite, following QMSS reg indexes are used in that order
> 
> For 66AK2G NAVSS QM..
> 
>> +			  - Queue Peek region.
>> +			  - Queue configuration region.
>> +			  - Queue Management/Queue Proxy region for queue Push/Pop.
>> +
>>   - queue-pools	: child node classifying the queue ranges into pools.
>>   		  Queue ranges are grouped into 3 type of pools:
>>   		  - qpend	    : pool of qpend(interruptible) queues
>> diff --git a/drivers/soc/ti/knav_qmss.h b/drivers/soc/ti/knav_qmss.h
>> index 905b974..5fa1ce6 100644
>> --- a/drivers/soc/ti/knav_qmss.h
>> +++ b/drivers/soc/ti/knav_qmss.h
>> @@ -292,6 +292,11 @@ struct knav_queue {
>>   	struct list_head		list;
>>   };
>>   
>> +enum qmss_version {
>> +	QMSS,
>> +	QMSS_LITE,
> 
> QMSS_66AK2G
> 
>> +};
>> +
>>   struct knav_device {
>>   	struct device				*dev;
>>   	unsigned				base_id;
>> @@ -305,6 +310,7 @@ struct knav_device {
>>   	struct list_head			pools;
>>   	struct list_head			pdsps;
>>   	struct list_head			qmgrs;
>> +	enum qmss_version			version;
>>   };
>>   
> 
> [...]
> 
>>   }
>>   
>> +/* Match table for of_platform binding */
>> +static const struct of_device_id keystone_qmss_of_match[] = {
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss",
> 
> 		.data	= (void *)QMSS,
> 
>> +	},
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss-l",
>> +		.data	= (void *)QMSS_LITE,
>> +	},
>> +	{},
>> +};
>> +MODULE_DEVICE_TABLE(of, keystone_qmss_of_match);
>> +
>>   static int knav_queue_probe(struct platform_device *pdev)
>>   {
>>   	struct device_node *node = pdev->dev.of_node;
>>   	struct device_node *qmgrs, *queue_pools, *regions, *pdsps;
>> +	const struct of_device_id *match;
>>   	struct device *dev = &pdev->dev;
>>   	u32 temp[2];
>>   	int ret;
>> @@ -1700,6 +1749,10 @@ static int knav_queue_probe(struct platform_device *pdev)
>>   		return -ENOMEM;
>>   	}
>>   
>> +	match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev);
>> +	if (match && match->data)
>> +		kdev->version = QMSS_LITE;
> 
> 	if (match)
> 		kdev->version = match->data;
> 	else
> 		error?
> [...]
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

  reply	other threads:[~2018-03-29 14:48 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 16:31 [net-next PATCH v2 00/10] Add support for netcp driver on K2G SoC Murali Karicheri
2018-03-27 16:31 ` Murali Karicheri
2018-03-27 16:31 ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 01/10] soc: ti: K2G: enhancement to support QMSS in NSS Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-28 19:01   ` [net-next,v2,01/10] " Grygorii Strashko
2018-03-28 19:01     ` [net-next, v2, 01/10] " Grygorii Strashko
2018-03-28 19:01     ` [net-next,v2,01/10] " Grygorii Strashko
2018-03-29 14:50     ` Murali Karicheri [this message]
2018-03-29 14:50       ` [net-next, v2, 01/10] " Murali Karicheri
2018-03-29 14:50       ` Murali Karicheri
2018-03-29 14:50       ` Murali Karicheri
2018-03-29 14:59     ` [net-next,v2,01/10] " Murali Karicheri
2018-03-29 14:59       ` [net-next, v2, 01/10] " Murali Karicheri
2018-03-29 14:59       ` [net-next,v2,01/10] " Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 02/10] soc: ti: K2G: provide APIs to support driver probe deferral Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 03/10] net: netcp: ethss: make call to gbe_sgmii_config() conditional Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 17:13   ` Andrew Lunn
2018-03-27 17:13     ` Andrew Lunn
2018-03-27 19:20     ` Murali Karicheri
2018-03-27 19:20       ` Murali Karicheri
2018-03-27 19:20       ` Murali Karicheri
2018-03-27 17:18   ` Andrew Lunn
2018-03-27 17:18     ` Andrew Lunn
2018-03-27 17:18     ` Andrew Lunn
2018-03-27 19:39     ` Murali Karicheri
2018-03-27 19:39       ` Murali Karicheri
2018-03-27 19:39       ` Murali Karicheri
2018-03-29 16:27     ` Murali Karicheri
2018-03-29 16:27       ` Murali Karicheri
2018-03-29 16:27       ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 04/10] net: netcp: ethss: add support for handling sgmii link interface Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 05/10] net: netcp: ethss: use rgmii link status for 2u cpsw hardware Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 17:29   ` Andrew Lunn
2018-03-27 17:29     ` Andrew Lunn
2018-03-27 21:07     ` Murali Karicheri
2018-03-27 21:07       ` Murali Karicheri
2018-03-27 21:07       ` Murali Karicheri
2018-03-29 16:35     ` Murali Karicheri
2018-03-29 16:35       ` Murali Karicheri
2018-03-29 16:35       ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 06/10] net: netcp: ethss: map vlan priorities to zero flow Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 07/10] net: netcp: ethss: re-use stats handling code for 2u hardware Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 08/10] net: netcp: ethss: use of_get_phy_mode() to support different RGMII modes Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 17:35   ` Andrew Lunn
2018-03-27 17:35     ` Andrew Lunn
2018-03-29 20:03     ` Murali Karicheri
2018-03-29 20:03       ` Murali Karicheri
2018-03-29 20:03       ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 09/10] Revert "net: netcp: remove dead code from the driver" Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31 ` [net-next PATCH v2 10/10] net: netcp: support probe deferral Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri
2018-03-27 16:31   ` Murali Karicheri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ef90d5d-3714-3705-73d9-f3c04069279d@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malat@debian.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=w-kwok2@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.