* [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
@ 2016-02-02 11:25 Zubair Lutfullah Kakakhel
2016-02-02 11:25 ` Zubair Lutfullah Kakakhel
2016-02-02 11:38 ` Sergei Shtylyov
0 siblings, 2 replies; 8+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-02-02 11:25 UTC (permalink / raw)
To: david.daney
Cc: janne.huttunen, aaro.koskinen, ralf, linux-mips, linux-kernel,
Zubair.Kakakhel
Add basic CN7XXX interface detection.
This allows the kernel to boot with ethernet working as it initializes
the ethernet ports with SGMII instead of defaulting to RGMII routines.
Tested on the utm8 from Rhino Labs with a CN7130.
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
arch/mips/cavium-octeon/executive/cvmx-helper.c | 41 +++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 376701f..1a28009 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -87,6 +87,8 @@ int cvmx_helper_get_number_of_interfaces(void)
return 9;
if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX))
return 4;
+ if (OCTEON_IS_MODEL(OCTEON_CN7XXX))
+ return 5;
else
return 3;
}
@@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface)
}
/**
+ * @INTERNAL
+ * Return interface mode for CN7XXX.
+ */
+static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)
+{
+ union cvmx_gmxx_inf_mode mode;
+
+ mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
+
+ if (interface < 2) { /* SGMII/QSGMII/XAUI */
+ switch (mode.cn68xx.mode) {
+ case 0:
+ return CVMX_HELPER_INTERFACE_MODE_DISABLED;
+ case 1:
+ case 2:
+ return CVMX_HELPER_INTERFACE_MODE_SGMII;
+ case 3:
+ return CVMX_HELPER_INTERFACE_MODE_XAUI;
+ default:
+ return CVMX_HELPER_INTERFACE_MODE_SGMII;
+ }
+ } else if (interface == 2) /* NPI */
+ return CVMX_HELPER_INTERFACE_MODE_NPI;
+ else if (interface == 3) /* LOOP */
+ return CVMX_HELPER_INTERFACE_MODE_LOOP;
+ else if (interface == 4) /* RGMII (AGL) */
+ return CVMX_HELPER_INTERFACE_MODE_RGMII;
+
+ return CVMX_HELPER_INTERFACE_MODE_DISABLED;
+}
+
+
+/**
* Get the operating mode of an interface. Depending on the Octeon
* chip and configuration, this function returns an enumeration
* of the type of packet I/O supported by an interface.
@@ -278,6 +313,12 @@ cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface)
return CVMX_HELPER_INTERFACE_MODE_DISABLED;
/*
+ * OCTEON III models
+ */
+ if (OCTEON_IS_MODEL(OCTEON_CN7XXX))
+ return __cvmx_get_mode_cn7xxx(interface);
+
+ /*
* Octeon II models
*/
if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-02 11:25 [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection Zubair Lutfullah Kakakhel
@ 2016-02-02 11:25 ` Zubair Lutfullah Kakakhel
2016-02-02 11:38 ` Sergei Shtylyov
1 sibling, 0 replies; 8+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-02-02 11:25 UTC (permalink / raw)
To: david.daney
Cc: janne.huttunen, aaro.koskinen, ralf, linux-mips, linux-kernel,
Zubair.Kakakhel
Add basic CN7XXX interface detection.
This allows the kernel to boot with ethernet working as it initializes
the ethernet ports with SGMII instead of defaulting to RGMII routines.
Tested on the utm8 from Rhino Labs with a CN7130.
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
---
arch/mips/cavium-octeon/executive/cvmx-helper.c | 41 +++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 376701f..1a28009 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -87,6 +87,8 @@ int cvmx_helper_get_number_of_interfaces(void)
return 9;
if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX))
return 4;
+ if (OCTEON_IS_MODEL(OCTEON_CN7XXX))
+ return 5;
else
return 3;
}
@@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface)
}
/**
+ * @INTERNAL
+ * Return interface mode for CN7XXX.
+ */
+static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)
+{
+ union cvmx_gmxx_inf_mode mode;
+
+ mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
+
+ if (interface < 2) { /* SGMII/QSGMII/XAUI */
+ switch (mode.cn68xx.mode) {
+ case 0:
+ return CVMX_HELPER_INTERFACE_MODE_DISABLED;
+ case 1:
+ case 2:
+ return CVMX_HELPER_INTERFACE_MODE_SGMII;
+ case 3:
+ return CVMX_HELPER_INTERFACE_MODE_XAUI;
+ default:
+ return CVMX_HELPER_INTERFACE_MODE_SGMII;
+ }
+ } else if (interface == 2) /* NPI */
+ return CVMX_HELPER_INTERFACE_MODE_NPI;
+ else if (interface == 3) /* LOOP */
+ return CVMX_HELPER_INTERFACE_MODE_LOOP;
+ else if (interface == 4) /* RGMII (AGL) */
+ return CVMX_HELPER_INTERFACE_MODE_RGMII;
+
+ return CVMX_HELPER_INTERFACE_MODE_DISABLED;
+}
+
+
+/**
* Get the operating mode of an interface. Depending on the Octeon
* chip and configuration, this function returns an enumeration
* of the type of packet I/O supported by an interface.
@@ -278,6 +313,12 @@ cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface)
return CVMX_HELPER_INTERFACE_MODE_DISABLED;
/*
+ * OCTEON III models
+ */
+ if (OCTEON_IS_MODEL(OCTEON_CN7XXX))
+ return __cvmx_get_mode_cn7xxx(interface);
+
+ /*
* Octeon II models
*/
if (OCTEON_IS_MODEL(OCTEON_CN6XXX) || OCTEON_IS_MODEL(OCTEON_CNF71XX))
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-02 11:25 [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection Zubair Lutfullah Kakakhel
2016-02-02 11:25 ` Zubair Lutfullah Kakakhel
@ 2016-02-02 11:38 ` Sergei Shtylyov
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
1 sibling, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2016-02-02 11:38 UTC (permalink / raw)
To: Zubair Lutfullah Kakakhel, david.daney
Cc: janne.huttunen, aaro.koskinen, ralf, linux-mips, linux-kernel
Hello.
On 2/2/2016 2:25 PM, Zubair Lutfullah Kakakhel wrote:
> Add basic CN7XXX interface detection.
>
> This allows the kernel to boot with ethernet working as it initializes
> the ethernet ports with SGMII instead of defaulting to RGMII routines.
>
> Tested on the utm8 from Rhino Labs with a CN7130.
>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> ---
> arch/mips/cavium-octeon/executive/cvmx-helper.c | 41 +++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> index 376701f..1a28009 100644
> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
[...]
> @@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface)
> }
>
> /**
> + * @INTERNAL
> + * Return interface mode for CN7XXX.
> + */
> +static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)
Not *unsigned*?
> +{
> + union cvmx_gmxx_inf_mode mode;
> +
> + mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
> +
> + if (interface < 2) { /* SGMII/QSGMII/XAUI */
> + switch (mode.cn68xx.mode) {
> + case 0:
> + return CVMX_HELPER_INTERFACE_MODE_DISABLED;
> + case 1:
> + case 2:
> + return CVMX_HELPER_INTERFACE_MODE_SGMII;
> + case 3:
> + return CVMX_HELPER_INTERFACE_MODE_XAUI;
> + default:
> + return CVMX_HELPER_INTERFACE_MODE_SGMII;
> + }
> + } else if (interface == 2) /* NPI */
> + return CVMX_HELPER_INTERFACE_MODE_NPI;
> + else if (interface == 3) /* LOOP */
> + return CVMX_HELPER_INTERFACE_MODE_LOOP;
> + else if (interface == 4) /* RGMII (AGL) */
> + return CVMX_HELPER_INTERFACE_MODE_RGMII;
This is asking to be a *switch* statement.
> +
> + return CVMX_HELPER_INTERFACE_MODE_DISABLED;
> +}
> +
> +
> +/**
> * Get the operating mode of an interface. Depending on the Octeon
> * chip and configuration, this function returns an enumeration
> * of the type of packet I/O supported by an interface.
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-02 11:38 ` Sergei Shtylyov
@ 2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
2016-02-03 17:52 ` Sergei Shtylyov
0 siblings, 2 replies; 8+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-02-03 17:45 UTC (permalink / raw)
To: Sergei Shtylyov, david.daney
Cc: janne.huttunen, aaro.koskinen, ralf, linux-mips, linux-kernel
Hi,
Thanks for the review. Comments below.
On 02/02/16 11:38, Sergei Shtylyov wrote:
> Hello.
>
> On 2/2/2016 2:25 PM, Zubair Lutfullah Kakakhel wrote:
>
>> Add basic CN7XXX interface detection.
>>
>> This allows the kernel to boot with ethernet working as it initializes
>> the ethernet ports with SGMII instead of defaulting to RGMII routines.
>>
>> Tested on the utm8 from Rhino Labs with a CN7130.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> ---
>> arch/mips/cavium-octeon/executive/cvmx-helper.c | 41 +++++++++++++++++++++++++
>> 1 file changed, 41 insertions(+)
>>
>> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>> index 376701f..1a28009 100644
>> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> [...]
>> @@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface)
>> }
>>
>> /**
>> + * @INTERNAL
>> + * Return interface mode for CN7XXX.
>> + */
>> +static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)
>
> Not *unsigned*?
The rest of the instances in the file don't have unsigned.
Probably because it is an enum..
>
>> +{
>> + union cvmx_gmxx_inf_mode mode;
>> +
>> + mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
>> +
>> + if (interface < 2) { /* SGMII/QSGMII/XAUI */
>> + switch (mode.cn68xx.mode) {
>> + case 0:
>> + return CVMX_HELPER_INTERFACE_MODE_DISABLED;
>> + case 1:
>> + case 2:
>> + return CVMX_HELPER_INTERFACE_MODE_SGMII;
>> + case 3:
>> + return CVMX_HELPER_INTERFACE_MODE_XAUI;
>> + default:
>> + return CVMX_HELPER_INTERFACE_MODE_SGMII;
>> + }
>> + } else if (interface == 2) /* NPI */
>> + return CVMX_HELPER_INTERFACE_MODE_NPI;
>> + else if (interface == 3) /* LOOP */
>> + return CVMX_HELPER_INTERFACE_MODE_LOOP;
>> + else if (interface == 4) /* RGMII (AGL) */
>> + return CVMX_HELPER_INTERFACE_MODE_RGMII;
>
> This is asking to be a *switch* statement.
Ask and you shall receive
(⌐▀͡ ̯ʖ▀)
Thanks
ZubairLK
>
>> +
>> + return CVMX_HELPER_INTERFACE_MODE_DISABLED;
>> +}
>> +
>> +
>> +/**
>> * Get the operating mode of an interface. Depending on the Octeon
>> * chip and configuration, this function returns an enumeration
>> * of the type of packet I/O supported by an interface.
> [...]
>
> MBR, Sergei
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
@ 2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
2016-02-03 17:52 ` Sergei Shtylyov
1 sibling, 0 replies; 8+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-02-03 17:45 UTC (permalink / raw)
To: Sergei Shtylyov, david.daney
Cc: janne.huttunen, aaro.koskinen, ralf, linux-mips, linux-kernel
Hi,
Thanks for the review. Comments below.
On 02/02/16 11:38, Sergei Shtylyov wrote:
> Hello.
>
> On 2/2/2016 2:25 PM, Zubair Lutfullah Kakakhel wrote:
>
>> Add basic CN7XXX interface detection.
>>
>> This allows the kernel to boot with ethernet working as it initializes
>> the ethernet ports with SGMII instead of defaulting to RGMII routines.
>>
>> Tested on the utm8 from Rhino Labs with a CN7130.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> ---
>> arch/mips/cavium-octeon/executive/cvmx-helper.c | 41 +++++++++++++++++++++++++
>> 1 file changed, 41 insertions(+)
>>
>> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>> index 376701f..1a28009 100644
>> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
> [...]
>> @@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_octeon2(int interface)
>> }
>>
>> /**
>> + * @INTERNAL
>> + * Return interface mode for CN7XXX.
>> + */
>> +static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)
>
> Not *unsigned*?
The rest of the instances in the file don't have unsigned.
Probably because it is an enum..
>
>> +{
>> + union cvmx_gmxx_inf_mode mode;
>> +
>> + mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
>> +
>> + if (interface < 2) { /* SGMII/QSGMII/XAUI */
>> + switch (mode.cn68xx.mode) {
>> + case 0:
>> + return CVMX_HELPER_INTERFACE_MODE_DISABLED;
>> + case 1:
>> + case 2:
>> + return CVMX_HELPER_INTERFACE_MODE_SGMII;
>> + case 3:
>> + return CVMX_HELPER_INTERFACE_MODE_XAUI;
>> + default:
>> + return CVMX_HELPER_INTERFACE_MODE_SGMII;
>> + }
>> + } else if (interface == 2) /* NPI */
>> + return CVMX_HELPER_INTERFACE_MODE_NPI;
>> + else if (interface == 3) /* LOOP */
>> + return CVMX_HELPER_INTERFACE_MODE_LOOP;
>> + else if (interface == 4) /* RGMII (AGL) */
>> + return CVMX_HELPER_INTERFACE_MODE_RGMII;
>
> This is asking to be a *switch* statement.
Ask and you shall receive
(⌐▀͡ ̯ʖ▀)
Thanks
ZubairLK
>
>> +
>> + return CVMX_HELPER_INTERFACE_MODE_DISABLED;
>> +}
>> +
>> +
>> +/**
>> * Get the operating mode of an interface. Depending on the Octeon
>> * chip and configuration, this function returns an enumeration
>> * of the type of packet I/O supported by an interface.
> [...]
>
> MBR, Sergei
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
@ 2016-02-03 17:52 ` Sergei Shtylyov
2016-02-03 17:57 ` David Daney
1 sibling, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2016-02-03 17:52 UTC (permalink / raw)
To: Zubair Lutfullah Kakakhel, david.daney
Cc: janne.huttunen, aaro.koskinen, ralf, linux-mips, linux-kernel
On 02/03/2016 08:45 PM, Zubair Lutfullah Kakakhel wrote:
>>> Add basic CN7XXX interface detection.
>>>
>>> This allows the kernel to boot with ethernet working as it initializes
>>> the ethernet ports with SGMII instead of defaulting to RGMII routines.
>>>
>>> Tested on the utm8 from Rhino Labs with a CN7130.
>>>
>>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>>> ---
>>> arch/mips/cavium-octeon/executive/cvmx-helper.c | 41
>>> +++++++++++++++++++++++++
>>> 1 file changed, 41 insertions(+)
>>>
>>> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>> b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>> index 376701f..1a28009 100644
>>> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>> [...]
>>> @@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t
>>> __cvmx_get_mode_octeon2(int interface)
>>> }
>>>
>>> /**
>>> + * @INTERNAL
>>> + * Return interface mode for CN7XXX.
>>> + */
>>> +static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)
>>
>> Not *unsigned*?
>
> The rest of the instances in the file don't have unsigned.
>
> Probably because it is an enum..
I meant the parameter, of course.
[...]
> (⌐▀͡ ̯ʖ▀)
>
> Thanks
> ZubairLK
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-03 17:52 ` Sergei Shtylyov
@ 2016-02-03 17:57 ` David Daney
2016-02-03 17:57 ` David Daney
0 siblings, 1 reply; 8+ messages in thread
From: David Daney @ 2016-02-03 17:57 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Zubair Lutfullah Kakakhel, david.daney, janne.huttunen,
aaro.koskinen, ralf, linux-mips, linux-kernel
On 02/03/2016 09:52 AM, Sergei Shtylyov wrote:
> On 02/03/2016 08:45 PM, Zubair Lutfullah Kakakhel wrote:
>
>>>> Add basic CN7XXX interface detection.
>>>>
>>>> This allows the kernel to boot with ethernet working as it initializes
>>>> the ethernet ports with SGMII instead of defaulting to RGMII routines.
>>>>
>>>> Tested on the utm8 from Rhino Labs with a CN7130.
>>>>
>>>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>>>> ---
>>>> arch/mips/cavium-octeon/executive/cvmx-helper.c | 41
>>>> +++++++++++++++++++++++++
>>>> 1 file changed, 41 insertions(+)
>>>>
>>>> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>>> b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>>> index 376701f..1a28009 100644
>>>> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>>> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>> [...]
>>>> @@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t
>>>> __cvmx_get_mode_octeon2(int interface)
>>>> }
>>>>
>>>> /**
>>>> + * @INTERNAL
>>>> + * Return interface mode for CN7XXX.
>>>> + */
>>>> +static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int
>>>> interface)
>>>
>>> Not *unsigned*?
>>
>> The rest of the instances in the file don't have unsigned.
>>
>> Probably because it is an enum..
>
> I meant the parameter, of course.
>
In this file, the "interface" is consistently given the type int. Check
it out, it is int everywhere.
I think it makes sense to maintain consistency and use int here too.
David Daney
> [...]
>
>> (⌐▀͡ ̯ʖ▀)
>>
>> Thanks
>> ZubairLK
>
> [...]
>
> MBR, Sergei
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection
2016-02-03 17:57 ` David Daney
@ 2016-02-03 17:57 ` David Daney
0 siblings, 0 replies; 8+ messages in thread
From: David Daney @ 2016-02-03 17:57 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Zubair Lutfullah Kakakhel, david.daney, janne.huttunen,
aaro.koskinen, ralf, linux-mips, linux-kernel
On 02/03/2016 09:52 AM, Sergei Shtylyov wrote:
> On 02/03/2016 08:45 PM, Zubair Lutfullah Kakakhel wrote:
>
>>>> Add basic CN7XXX interface detection.
>>>>
>>>> This allows the kernel to boot with ethernet working as it initializes
>>>> the ethernet ports with SGMII instead of defaulting to RGMII routines.
>>>>
>>>> Tested on the utm8 from Rhino Labs with a CN7130.
>>>>
>>>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>>>> ---
>>>> arch/mips/cavium-octeon/executive/cvmx-helper.c | 41
>>>> +++++++++++++++++++++++++
>>>> 1 file changed, 41 insertions(+)
>>>>
>>>> diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>>> b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>>> index 376701f..1a28009 100644
>>>> --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>>> +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
>>> [...]
>>>> @@ -260,6 +262,39 @@ static cvmx_helper_interface_mode_t
>>>> __cvmx_get_mode_octeon2(int interface)
>>>> }
>>>>
>>>> /**
>>>> + * @INTERNAL
>>>> + * Return interface mode for CN7XXX.
>>>> + */
>>>> +static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int
>>>> interface)
>>>
>>> Not *unsigned*?
>>
>> The rest of the instances in the file don't have unsigned.
>>
>> Probably because it is an enum..
>
> I meant the parameter, of course.
>
In this file, the "interface" is consistently given the type int. Check
it out, it is int everywhere.
I think it makes sense to maintain consistency and use int here too.
David Daney
> [...]
>
>> (⌐▀͡ ̯ʖ▀)
>>
>> Thanks
>> ZubairLK
>
> [...]
>
> MBR, Sergei
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-03 17:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-02 11:25 [PATCH] MIPS: Octeon: Add Octeon III CN7XXX interface detection Zubair Lutfullah Kakakhel
2016-02-02 11:25 ` Zubair Lutfullah Kakakhel
2016-02-02 11:38 ` Sergei Shtylyov
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
2016-02-03 17:45 ` Zubair Lutfullah Kakakhel
2016-02-03 17:52 ` Sergei Shtylyov
2016-02-03 17:57 ` David Daney
2016-02-03 17:57 ` David Daney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox