All of lore.kernel.org
 help / color / mirror / Atom feed
From: pavel@denx.de (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCHv1 1/2] ARM: socfpga: initial support for Altera's SOCFPGA platform.
Date: Mon, 9 Jul 2012 12:58:38 +0200	[thread overview]
Message-ID: <20120709105838.GA12130@elf.ucw.cz> (raw)
In-Reply-To: <71B37E0559AC6849A68C5BA94C509FB45830BC6785@SJ-ITMSG02.altera.priv.altera.com>

Hi!

> > > Do you plan to resend a complete v2 with all your patches nicely
> > > rebased? It's not that easy to review such a set of small cleanup
> > > increments :-)
> >
> > Sorry about that. Obviously, complete v2 will follow when major
> > problems are fixed. (We do use git tree for coordination; I guess we
> > should make it public at this point?)
> 
> I'm reworking the patch to use the exisiting
> clocksource/dw_apb_timer driver.

Any news there? I got up-to attached diff, but could not get it to
boot...
									Pavel
diff --git a/arch/arm/boot/dts/socfpga_cyclone5.dts b/arch/arm/boot/dts/socfpga_cyclone5.dts
index 453a7e2..6f22e0e 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5.dts
@@ -85,6 +85,20 @@
             phy-mode = "gmii";
             };
 
+			rtc0: rtc at 00000 {
+				compatible = "not-there-picochip,pc3x2-rtc";
+				clock-freq = <200000000>;
+				reg = <0x00000 0xf>;
+				interrupts = <8>;
+			};
+
+			timer0: timer at ffd00000 {
+				compatible = "picochip,pc3x2-timer";
+				interrupts = <169>;
+				clock-freq = <200000000>;
+				reg = <0xffd00000 0x14>;
+				interrupt-parent = <&intc>;
+			};
 		};
 	};
 };
diff --git a/arch/arm/mach-picoxcell/time.c b/arch/arm/mach-picoxcell/time.c
index 2ecba67..eeebf2a 100644
--- a/arch/arm/mach-picoxcell/time.c
+++ b/arch/arm/mach-picoxcell/time.c
@@ -106,14 +106,15 @@ static void __init picoxcell_timer_init(void)
 		panic("No timer for clockevent");
 	picoxcell_add_clockevent(event_timer);
 
+#if 0
 	source_timer = of_find_matching_node(event_timer, picoxcell_timer_ids);
 	if (!source_timer)
 		panic("No timer for clocksource");
 	picoxcell_add_clocksource(source_timer);
-
+#endif
 	of_node_put(source_timer);
 
-	picoxcell_init_sched_clock();
+//	picoxcell_init_sched_clock();
 }
 
 struct sys_timer picoxcell_timer = {
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 81358e6..124422d 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -4,6 +4,7 @@ config MACH_SOCFPGA_CYCLONE5
 	select HAVE_SMP
 	select PLAT_SOCFPGA_ETH
 	select COMMON_CLK
+	select DW_APB_TIMER
 	help
 	  Include support for the Altera(R) Cyclone5 development platform.
 
diff --git a/arch/arm/mach-socfpga/common.c b/arch/arm/mach-socfpga/common.c
index ae310a5..7451c6f 100644
--- a/arch/arm/mach-socfpga/common.c
+++ b/arch/arm/mach-socfpga/common.c
@@ -42,6 +42,8 @@
 
 #include "common.h"
 
+#include "../../../arch/arm/mach-picoxcell/time.c"
+
 extern struct dw_mci_board sdmmc_platform_data;
 extern struct dma_pl330_platdata dma_platform_data;
 
@@ -112,6 +114,15 @@ void __init socfpga_timer_init(void __iomem *src_timer_base,
 	writel(0, osc_timer0_va_base + TIMER_CTRL);
 	writel(0, osc_timer1_va_base + TIMER_CTRL);
 
+#if 0
+	/* Fall back to jiffies? */
 	dwapbt_clocksource_init(src_timer_base);
+#endif
+
+#if 0
+	/* Use dt-based code from picoxcell */
 	dwapbt_clockevents_init(event_timer_base, event_timer_irq);
+#endif
+
+	picoxcell_timer_init();
 }
diff --git a/arch/arm/mach-socfpga/socfpga_cyclone5.c b/arch/arm/mach-socfpga/socfpga_cyclone5.c
index d67fc92..9fc89cc 100644
--- a/arch/arm/mach-socfpga/socfpga_cyclone5.c
+++ b/arch/arm/mach-socfpga/socfpga_cyclone5.c
@@ -118,6 +118,7 @@ static void __init socfpga_cyclone5_timer_init(void)
 
 	socfpga_timer_init(sp_timer0_va_base, osc_timer0_va_base,
 				IRQ_SOCFPGA_L4_OSC1_TIMER0);
+
 #ifdef CONFIG_OF
 	twd_local_timer_of_register();
 #endif

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2012-07-09 10:58 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 13:50 [RFC]Add initial support for Altera's SOCFPGA hardward dinguyen at altera.com
2012-06-27 13:50 ` [RFC PATCHv1 1/2] ARM: socfpga: initial support for Altera's SOCFPGA platform dinguyen at altera.com
2012-06-27 14:20   ` Thomas Petazzoni
2012-06-27 18:05     ` Pavel Machek
2012-06-27 18:40       ` Thomas Petazzoni
2012-06-29 19:54         ` Dinh Nguyen
2012-06-29 22:18           ` Thomas Petazzoni
2012-07-04 16:11             ` Thomas Petazzoni
2012-06-30 21:04         ` Arnd Bergmann
2012-07-01 18:41           ` Pavel Machek
2012-07-02 16:52             ` Arnd Bergmann
2012-07-02 21:53               ` Pavel Machek
2012-10-17 18:16             ` [PATCH] Fix socfpga compilation with early_printk() enabled Pavel Machek
2012-10-25 14:58               ` Arnd Bergmann
2012-10-27 11:56                 ` Pavel Machek
2012-10-27 15:39                   ` Arnd Bergmann
2012-10-28 23:01                     ` arm-soc tree was " Pavel Machek
2012-10-28 23:13                       ` Pavel Machek
2012-10-29  4:41                         ` Arnd Bergmann
2012-10-30 16:03                           ` Pawel Moll
2012-10-29  4:45                       ` Arnd Bergmann
2012-10-29  0:27                     ` [PATCH for soc] socfpga: map uart into virtual address space so that early_printk() works Pavel Machek
2012-11-03 11:26                       ` Pavel Machek
2012-11-05 17:18                         ` Olof Johansson
2012-06-27 20:27     ` [RFC PATCHv1 1/2] ARM: socfpga: initial support for Altera's SOCFPGA platform Pavel Machek
2012-06-30 18:57     ` Pavel Machek
2012-07-01 18:10       ` Pavel Machek
2012-07-04 10:56     ` Pavel Machek
2012-07-04 11:10       ` Thomas Petazzoni
2012-07-04 11:23         ` Pavel Machek
2012-07-04 14:30           ` Dinh Nguyen
2012-07-09 10:58             ` Pavel Machek [this message]
2012-07-04 11:15     ` Pavel Machek
2012-07-04 11:21       ` Thomas Petazzoni
2012-07-04 17:56   ` Rob Herring
2012-07-09 11:30     ` Pavel Machek
2012-07-09 13:25       ` Rob Herring
2012-07-10  9:48         ` Pavel Machek
2012-07-09 11:52     ` Pavel Machek
2012-07-09 12:06     ` Pavel Machek
2012-07-09 12:10     ` Pavel Machek
2012-06-27 13:50 ` [RFC PATCHv1 2/2] ARM: socfpga: Add board support for Altera's SOCFPGA Cyclone 5 HW dinguyen at altera.com
2012-06-27 14:25   ` Thomas Petazzoni
2012-06-27 21:06     ` Pavel Machek
2012-06-27 22:19       ` Thomas Petazzoni
2012-06-28  0:00     ` Pavel Machek
2012-07-10 11:15     ` Pavel Machek

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=20120709105838.GA12130@elf.ucw.cz \
    --to=pavel@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.