Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1486868 > unrolled thread

[PATCH v2 09/14] MIPS: Malta: Probe RTC via DT

Started byPaul Burton <paul.burton@imgtec.com>
First post2016-09-19 23:30 +0200
Last post2016-09-20 13:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 09/14] MIPS: Malta: Probe RTC via DT Paul Burton <paul.burton@imgtec.com> - 2016-09-19 23:30 +0200
    Re: [PATCH v2 09/14] MIPS: Malta: Probe RTC via DT Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-20 12:30 +0200
      Re: [PATCH v2 09/14] MIPS: Malta: Probe RTC via DT Paul Burton <paul.burton@imgtec.com> - 2016-09-20 12:40 +0200
        Re: [PATCH v2 09/14] MIPS: Malta: Probe RTC via DT Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-20 13:00 +0200

#1486868 — [PATCH v2 09/14] MIPS: Malta: Probe RTC via DT

FromPaul Burton <paul.burton@imgtec.com>
Date2016-09-19 23:30 +0200
Subject[PATCH v2 09/14] MIPS: Malta: Probe RTC via DT
Message-ID<sjeiu-2pw-9@gated-at.bofh.it>
Add the DT node required to probe the RTC, and remove the platform code
that was previously doing it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>

---

Changes in v2:
- Remove rtc DT node label

 arch/mips/boot/dts/mti/malta.dts     | 15 +++++++++++++++
 arch/mips/mti-malta/malta-platform.c | 21 ---------------------
 2 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/arch/mips/boot/dts/mti/malta.dts b/arch/mips/boot/dts/mti/malta.dts
index af765af..fecbca8 100644
--- a/arch/mips/boot/dts/mti/malta.dts
+++ b/arch/mips/boot/dts/mti/malta.dts
@@ -49,4 +49,19 @@
 		interrupt-parent = <&gic>;
 		interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
 	};
+
+	isa {
+		compatible = "isa";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <1 0 0 0x1000>;
+
+		rtc@70 {
+			compatible = "motorola,mc146818";
+			reg = <1 0x70 0x8>;
+
+			interrupt-parent = <&i8259>;
+			interrupts = <8>;
+		};
+	};
 };
diff --git a/arch/mips/mti-malta/malta-platform.c b/arch/mips/mti-malta/malta-platform.c
index e1dd1c1..6433a39 100644
--- a/arch/mips/mti-malta/malta-platform.c
+++ b/arch/mips/mti-malta/malta-platform.c
@@ -23,7 +23,6 @@
  */
 #include <linux/init.h>
 #include <linux/serial_8250.h>
-#include <linux/mc146818rtc.h>
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/mtd/partitions.h>
@@ -68,25 +67,6 @@ static struct platform_device malta_uart8250_device = {
 	},
 };
 
-struct resource malta_rtc_resources[] = {
-	{
-		.start	= RTC_PORT(0),
-		.end	= RTC_PORT(7),
-		.flags	= IORESOURCE_IO,
-	}, {
-		.start	= RTC_IRQ,
-		.end	= RTC_IRQ,
-		.flags	= IORESOURCE_IRQ,
-	}
-};
-
-static struct platform_device malta_rtc_device = {
-	.name		= "rtc_cmos",
-	.id		= -1,
-	.resource	= malta_rtc_resources,
-	.num_resources	= ARRAY_SIZE(malta_rtc_resources),
-};
-
 static struct mtd_partition malta_mtd_partitions[] = {
 	{
 		.name =		"YAMON",
@@ -129,7 +109,6 @@ static struct platform_device malta_flash_device = {
 
 static struct platform_device *malta_devices[] __initdata = {
 	&malta_uart8250_device,
-	&malta_rtc_device,
 	&malta_flash_device,
 };
 
-- 
2.9.3

[toc] | [next] | [standalone]


#1487210

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2016-09-20 12:30 +0200
Message-ID<sjqtk-1J4-7@gated-at.bofh.it>
In reply to#1486868
Hello.

On 9/20/2016 12:21 AM, Paul Burton wrote:

> Add the DT node required to probe the RTC, and remove the platform code
> that was previously doing it.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
>
> ---
>
> Changes in v2:
> - Remove rtc DT node label

    Haven't you also renamed the node?

>  arch/mips/boot/dts/mti/malta.dts     | 15 +++++++++++++++
>  arch/mips/mti-malta/malta-platform.c | 21 ---------------------
>  2 files changed, 15 insertions(+), 21 deletions(-)
>
> diff --git a/arch/mips/boot/dts/mti/malta.dts b/arch/mips/boot/dts/mti/malta.dts
> index af765af..fecbca8 100644
> --- a/arch/mips/boot/dts/mti/malta.dts
> +++ b/arch/mips/boot/dts/mti/malta.dts
> @@ -49,4 +49,19 @@
>  		interrupt-parent = <&gic>;
>  		interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
>  	};
> +
> +	isa {
> +		compatible = "isa";
> +		#address-cells = <2>;
> +		#size-cells = <1>;
> +		ranges = <1 0 0 0x1000>;
> +
> +		rtc@70 {
> +			compatible = "motorola,mc146818";
> +			reg = <1 0x70 0x8>;
> +
> +			interrupt-parent = <&i8259>;
> +			interrupts = <8>;
> +		};
> +	};
>  };
[...]

MBR, Sergei

[toc] | [prev] | [next] | [standalone]


#1487226

FromPaul Burton <paul.burton@imgtec.com>
Date2016-09-20 12:40 +0200
Message-ID<sjqD0-1My-21@gated-at.bofh.it>
In reply to#1487210
On 20/09/16 11:21, Sergei Shtylyov wrote:
> Hello.
> 
> On 9/20/2016 12:21 AM, Paul Burton wrote:
> 
>> Add the DT node required to probe the RTC, and remove the platform code
>> that was previously doing it.
>>
>> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
>>
>> ---
>>
>> Changes in v2:
>> - Remove rtc DT node label
> 
>    Haven't you also renamed the node?

Hi Sergei,

Yes, strictly speaking I could have been more verbose & elaborated in
the changelog on every aspect of the simple change from "rtc:
mc146818@70" to "rtc@70". I didn't, but as it's obviously clear to you
what changed and it has no effect on either the code or the commit that
would end up in git I don't really see the point of your bringing it up.

Thanks,
    Paul

>>  arch/mips/boot/dts/mti/malta.dts     | 15 +++++++++++++++
>>  arch/mips/mti-malta/malta-platform.c | 21 ---------------------
>>  2 files changed, 15 insertions(+), 21 deletions(-)
>>
>> diff --git a/arch/mips/boot/dts/mti/malta.dts
>> b/arch/mips/boot/dts/mti/malta.dts
>> index af765af..fecbca8 100644
>> --- a/arch/mips/boot/dts/mti/malta.dts
>> +++ b/arch/mips/boot/dts/mti/malta.dts
>> @@ -49,4 +49,19 @@
>>          interrupt-parent = <&gic>;
>>          interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
>>      };
>> +
>> +    isa {
>> +        compatible = "isa";
>> +        #address-cells = <2>;
>> +        #size-cells = <1>;
>> +        ranges = <1 0 0 0x1000>;
>> +
>> +        rtc@70 {
>> +            compatible = "motorola,mc146818";
>> +            reg = <1 0x70 0x8>;
>> +
>> +            interrupt-parent = <&i8259>;
>> +            interrupts = <8>;
>> +        };
>> +    };
>>  };
> [...]
> 
> MBR, Sergei
> 

[toc] | [prev] | [next] | [standalone]


#1487237

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2016-09-20 13:00 +0200
Message-ID<sjqWl-1To-19@gated-at.bofh.it>
In reply to#1487226
On 9/20/2016 1:34 PM, Paul Burton wrote:

>>> Add the DT node required to probe the RTC, and remove the platform code
>>> that was previously doing it.
>>>
>>> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
>>>
>>> ---
>>>
>>> Changes in v2:
>>> - Remove rtc DT node label
>>
>>    Haven't you also renamed the node?
>
> Hi Sergei,
>
> Yes, strictly speaking I could have been more verbose & elaborated in
> the changelog on every aspect of the simple change from "rtc:
> mc146818@70" to "rtc@70". I didn't, but as it's obviously clear to you
> what changed and it has no effect on either the code or the commit that
> would end up in git I don't really see the point of your bringing it up.

    It may be obvious to me (since it was my comment that you addressed here) 
but not to others... Perhaps I'm too captious indeed, sorry about that. :-)

MBR, Sergei

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web