All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] Add support for SUNXI boards
@ 2015-04-16  8:05 GP Orcullo
  2015-04-16 13:19 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 18+ messages in thread
From: GP Orcullo @ 2015-04-16  8:05 UTC (permalink / raw)
  To: xenomai; +Cc: GP Orcullo

Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.

---
 arch/arm/mach-sunxi/Kconfig     |    1 +
 drivers/irqchip/irq-sunxi-nmi.c |    7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 0fbd4f1..96d76da8 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -6,6 +6,7 @@ menuconfig ARCH_SUNXI
 	select PINCTRL
 	select PINCTRL_SUNXI
 	select SUN4I_TIMER
+	select IPIPE_ARM_KUSER_TSC if IPIPE
 
 if ARCH_SUNXI
 
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 12f547a..d3e8da2 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -77,8 +77,9 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 	u32 ctrl_off = ct->regs.type;
 	unsigned int src_type;
 	unsigned int i;
+	unsigned long flags;
 
-	irq_gc_lock(gc);
+	flags = irq_gc_lock(gc);
 
 	switch (flow_type & IRQF_TRIGGER_MASK) {
 	case IRQ_TYPE_EDGE_FALLING:
@@ -95,7 +96,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 		src_type = SUNXI_SRC_TYPE_LEVEL_LOW;
 		break;
 	default:
-		irq_gc_unlock(gc);
+		irq_gc_unlock(gc, flags);
 		pr_err("%s: Cannot assign multiple trigger modes to IRQ %d.\n",
 			__func__, data->irq);
 		return -EBADR;
@@ -113,7 +114,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 	src_type_reg |= src_type;
 	sunxi_sc_nmi_write(gc, ctrl_off, src_type_reg);
 
-	irq_gc_unlock(gc);
+	irq_gc_unlock(gc, flags);
 
 	return IRQ_SET_MASK_OK;
 }
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16  8:05 [Xenomai] [PATCH] Add support for SUNXI boards GP Orcullo
@ 2015-04-16 13:19 ` Gilles Chanteperdrix
  2015-04-16 16:04   ` GP Orcullo
  0 siblings, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2015-04-16 13:19 UTC (permalink / raw)
  To: GP Orcullo; +Cc: xenomai

On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.

Does not sunxi have GPIO ?

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 13:19 ` Gilles Chanteperdrix
@ 2015-04-16 16:04   ` GP Orcullo
  2015-04-16 16:16     ` Gilles Chanteperdrix
  2015-04-18  6:55     ` Maxime Ripard
  0 siblings, 2 replies; 18+ messages in thread
From: GP Orcullo @ 2015-04-16 16:04 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
<gilles.chanteperdrix@xenomai.org> wrote:
> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>
> Does not sunxi have GPIO ?
>
> --
>                                             Gilles.

There's no GPIO driver in the mainline kernel. The original sunxi
kernel has incomplete support for GPIOs.

-- 
GP Orcullo


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:04   ` GP Orcullo
@ 2015-04-16 16:16     ` Gilles Chanteperdrix
  2015-04-16 16:37       ` Jan Kiszka
  2015-04-18  6:55     ` Maxime Ripard
  1 sibling, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2015-04-16 16:16 UTC (permalink / raw)
  To: GP Orcullo; +Cc: xenomai

On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
> > On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >
> > Does not sunxi have GPIO ?
> >
> > --
> >                                             Gilles.
> 
> There's no GPIO driver in the mainline kernel. The original sunxi
> kernel has incomplete support for GPIOs.

Ok, what about timer and tsc? Basically, you should run through the
ARM porting guide and check every modification to be made. And if
you have done so, the commit message should mention it.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:16     ` Gilles Chanteperdrix
@ 2015-04-16 16:37       ` Jan Kiszka
  2015-04-16 16:43         ` Gilles Chanteperdrix
  2015-04-16 22:29         ` GP Orcullo
  0 siblings, 2 replies; 18+ messages in thread
From: Jan Kiszka @ 2015-04-16 16:37 UTC (permalink / raw)
  To: Gilles Chanteperdrix, GP Orcullo; +Cc: xenomai

On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
>> <gilles.chanteperdrix@xenomai.org> wrote:
>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>>>
>>> Does not sunxi have GPIO ?
>>>
>>> --
>>>                                             Gilles.
>>
>> There's no GPIO driver in the mainline kernel. The original sunxi
>> kernel has incomplete support for GPIOs.
> 
> Ok, what about timer and tsc? Basically, you should run through the
> ARM porting guide and check every modification to be made. And if
> you have done so, the commit message should mention it.

sunxi is pretty generic ARMv7-class in that regard, but double-checking
is surely better.

If time permits, I will give things a try on our Banana Pi - provided it
is fine with such an old kernel (I only started with 3.19 on it).

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:37       ` Jan Kiszka
@ 2015-04-16 16:43         ` Gilles Chanteperdrix
  2015-04-16 16:53           ` Jan Kiszka
  2015-04-16 22:29         ` GP Orcullo
  1 sibling, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2015-04-16 16:43 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: GP Orcullo, xenomai

On Thu, Apr 16, 2015 at 06:37:35PM +0200, Jan Kiszka wrote:
> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
> > On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> >> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> >> <gilles.chanteperdrix@xenomai.org> wrote:
> >>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >>>
> >>> Does not sunxi have GPIO ?
> >>>
> >>> --
> >>>                                             Gilles.
> >>
> >> There's no GPIO driver in the mainline kernel. The original sunxi
> >> kernel has incomplete support for GPIOs.
> > 
> > Ok, what about timer and tsc? Basically, you should run through the
> > ARM porting guide and check every modification to be made. And if
> > you have done so, the commit message should mention it.
> 
> sunxi is pretty generic ARMv7-class in that regard, but double-checking
> is surely better.

armv7 does not mean a particular timer. Cortex A9 or cortex A15 do,
but different ones, and Cortex A8 does not for instance. The
processor we are talking about is probably not a cortex A9 since on
I-pipe, there is no timer or tsc defined on A9 when booting in UP
mode (and GP Orcullo is booting in UP mode). So my question is not
about "double-checking", it is rather the first check.

> 
> If time permits, I will give things a try on our Banana Pi - provided it
> is fine with such an old kernel (I only started with 3.19 on it).

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:43         ` Gilles Chanteperdrix
@ 2015-04-16 16:53           ` Jan Kiszka
  2015-04-16 16:56             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2015-04-16 16:53 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: GP Orcullo, xenomai

On 2015-04-16 18:43, Gilles Chanteperdrix wrote:
> On Thu, Apr 16, 2015 at 06:37:35PM +0200, Jan Kiszka wrote:
>> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
>>> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
>>>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
>>>> <gilles.chanteperdrix@xenomai.org> wrote:
>>>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>>>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>>>>>
>>>>> Does not sunxi have GPIO ?
>>>>>
>>>>> --
>>>>>                                             Gilles.
>>>>
>>>> There's no GPIO driver in the mainline kernel. The original sunxi
>>>> kernel has incomplete support for GPIOs.
>>>
>>> Ok, what about timer and tsc? Basically, you should run through the
>>> ARM porting guide and check every modification to be made. And if
>>> you have done so, the commit message should mention it.
>>
>> sunxi is pretty generic ARMv7-class in that regard, but double-checking
>> is surely better.
> 
> armv7 does not mean a particular timer. Cortex A9 or cortex A15 do,
> but different ones, and Cortex A8 does not for instance. The
> processor we are talking about is probably not a cortex A9 since on
> I-pipe, there is no timer or tsc defined on A9 when booting in UP
> mode (and GP Orcullo is booting in UP mode). So my question is not
> about "double-checking", it is rather the first check.

The A20 is a dual-core Cortex A7.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:53           ` Jan Kiszka
@ 2015-04-16 16:56             ` Gilles Chanteperdrix
  2015-04-18  6:56               ` Maxime Ripard
  0 siblings, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2015-04-16 16:56 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: GP Orcullo, xenomai

On Thu, Apr 16, 2015 at 06:53:24PM +0200, Jan Kiszka wrote:
> On 2015-04-16 18:43, Gilles Chanteperdrix wrote:
> > On Thu, Apr 16, 2015 at 06:37:35PM +0200, Jan Kiszka wrote:
> >> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
> >>> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> >>>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> >>>> <gilles.chanteperdrix@xenomai.org> wrote:
> >>>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >>>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >>>>>
> >>>>> Does not sunxi have GPIO ?
> >>>>>
> >>>>> --
> >>>>>                                             Gilles.
> >>>>
> >>>> There's no GPIO driver in the mainline kernel. The original sunxi
> >>>> kernel has incomplete support for GPIOs.
> >>>
> >>> Ok, what about timer and tsc? Basically, you should run through the
> >>> ARM porting guide and check every modification to be made. And if
> >>> you have done so, the commit message should mention it.
> >>
> >> sunxi is pretty generic ARMv7-class in that regard, but double-checking
> >> is surely better.
> > 
> > armv7 does not mean a particular timer. Cortex A9 or cortex A15 do,
> > but different ones, and Cortex A8 does not for instance. The
> > processor we are talking about is probably not a cortex A9 since on
> > I-pipe, there is no timer or tsc defined on A9 when booting in UP
> > mode (and GP Orcullo is booting in UP mode). So my question is not
> > about "double-checking", it is rather the first check.
> 
> The A20 is a dual-core Cortex A7.

Strange that GP Orcullo is not running the kernel in SMP mode then.
The question still stands, what does this processor/core use as timer/tsc?

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:37       ` Jan Kiszka
  2015-04-16 16:43         ` Gilles Chanteperdrix
@ 2015-04-16 22:29         ` GP Orcullo
  2015-04-16 23:13           ` Gilles Chanteperdrix
  1 sibling, 1 reply; 18+ messages in thread
From: GP Orcullo @ 2015-04-16 22:29 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

On Fri, Apr 17, 2015 at 12:37 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
>> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
>>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
>>> <gilles.chanteperdrix@xenomai.org> wrote:
>>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>>>>
>>>> Does not sunxi have GPIO ?
>>>>
>>>> --
>>>>                                             Gilles.
>>>
>>> There's no GPIO driver in the mainline kernel. The original sunxi
>>> kernel has incomplete support for GPIOs.
>>
>> Ok, what about timer and tsc? Basically, you should run through the
>> ARM porting guide and check every modification to be made. And if
>> you have done so, the commit message should mention it.
>
> sunxi is pretty generic ARMv7-class in that regard, but double-checking
> is surely better.
>
> If time permits, I will give things a try on our Banana Pi - provided it
> is fine with such an old kernel (I only started with 3.19 on it).
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> Corporate Competence Center Embedded Linux

Use the kernel provided by Debian:
https://packages.debian.org/jessie/linux-image-3.16.0-4-armmp-lpae, as
most of the sunxi patches were backported.

-- 
GP Orcullo


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 22:29         ` GP Orcullo
@ 2015-04-16 23:13           ` Gilles Chanteperdrix
  0 siblings, 0 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2015-04-16 23:13 UTC (permalink / raw)
  To: GP Orcullo; +Cc: Jan Kiszka, xenomai

On Fri, Apr 17, 2015 at 06:29:52AM +0800, GP Orcullo wrote:
> On Fri, Apr 17, 2015 at 12:37 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> > On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
> >> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> >>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> >>> <gilles.chanteperdrix@xenomai.org> wrote:
> >>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >>>>
> >>>> Does not sunxi have GPIO ?
> >>>>
> >>>> --
> >>>>                                             Gilles.
> >>>
> >>> There's no GPIO driver in the mainline kernel. The original sunxi
> >>> kernel has incomplete support for GPIOs.
> >>
> >> Ok, what about timer and tsc? Basically, you should run through the
> >> ARM porting guide and check every modification to be made. And if
> >> you have done so, the commit message should mention it.
> >
> > sunxi is pretty generic ARMv7-class in that regard, but double-checking
> > is surely better.
> >
> > If time permits, I will give things a try on our Banana Pi - provided it
> > is fine with such an old kernel (I only started with 3.19 on it).
> >
> > Jan
> >
> > --
> > Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> > Corporate Competence Center Embedded Linux
> 
> Use the kernel provided by Debian:
> https://packages.debian.org/jessie/linux-image-3.16.0-4-armmp-lpae, as
> most of the sunxi patches were backported.

Be careful when using non-mainline kernel, some additional I-pipe
changes may be needed on top of the kernel differences with
mainline.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:04   ` GP Orcullo
  2015-04-16 16:16     ` Gilles Chanteperdrix
@ 2015-04-18  6:55     ` Maxime Ripard
  2015-04-18  8:05       ` GP Orcullo
  1 sibling, 1 reply; 18+ messages in thread
From: Maxime Ripard @ 2015-04-18  6:55 UTC (permalink / raw)
  To: GP Orcullo; +Cc: xenomai

On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
> > On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >
> > Does not sunxi have GPIO ?
> >
> > --
> >                                             Gilles.
> 
> There's no GPIO driver in the mainline kernel. The original sunxi
> kernel has incomplete support for GPIOs.

That's not true.

The GPIO support has been feature complete since 3.11.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150418/9c8cf63a/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-16 16:56             ` Gilles Chanteperdrix
@ 2015-04-18  6:56               ` Maxime Ripard
  2015-04-18  9:34                 ` Jan Kiszka
  0 siblings, 1 reply; 18+ messages in thread
From: Maxime Ripard @ 2015-04-18  6:56 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Jan Kiszka, GP Orcullo, xenomai

On Thu, Apr 16, 2015 at 06:56:00PM +0200, Gilles Chanteperdrix wrote:
> On Thu, Apr 16, 2015 at 06:53:24PM +0200, Jan Kiszka wrote:
> > On 2015-04-16 18:43, Gilles Chanteperdrix wrote:
> > > On Thu, Apr 16, 2015 at 06:37:35PM +0200, Jan Kiszka wrote:
> > >> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
> > >>> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> > >>>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> > >>>> <gilles.chanteperdrix@xenomai.org> wrote:
> > >>>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> > >>>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> > >>>>>
> > >>>>> Does not sunxi have GPIO ?
> > >>>>>
> > >>>>> --
> > >>>>>                                             Gilles.
> > >>>>
> > >>>> There's no GPIO driver in the mainline kernel. The original sunxi
> > >>>> kernel has incomplete support for GPIOs.
> > >>>
> > >>> Ok, what about timer and tsc? Basically, you should run through the
> > >>> ARM porting guide and check every modification to be made. And if
> > >>> you have done so, the commit message should mention it.
> > >>
> > >> sunxi is pretty generic ARMv7-class in that regard, but double-checking
> > >> is surely better.
> > > 
> > > armv7 does not mean a particular timer. Cortex A9 or cortex A15 do,
> > > but different ones, and Cortex A8 does not for instance. The
> > > processor we are talking about is probably not a cortex A9 since on
> > > I-pipe, there is no timer or tsc defined on A9 when booting in UP
> > > mode (and GP Orcullo is booting in UP mode). So my question is not
> > > about "double-checking", it is rather the first check.
> > 
> > The A20 is a dual-core Cortex A7.
> 
> Strange that GP Orcullo is not running the kernel in SMP mode then.

The A20 uses PSCI to implement its SMP ops, which requires some
cooperation from the bootloader. Maybe he just has a too ancient
bootloader.

> The question still stands, what does this processor/core use as
> timer/tsc?

ARM's architected timers, mostly.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150418/54cedb2d/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-18  6:55     ` Maxime Ripard
@ 2015-04-18  8:05       ` GP Orcullo
  2015-04-18  8:16         ` Maxime Ripard
  0 siblings, 1 reply; 18+ messages in thread
From: GP Orcullo @ 2015-04-18  8:05 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: xenomai

On Sat, Apr 18, 2015 at 2:55 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
>> <gilles.chanteperdrix@xenomai.org> wrote:
>> > On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>> >> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>> >
>> > Does not sunxi have GPIO ?
>> >
>> > --
>> >                                             Gilles.
>>
>> There's no GPIO driver in the mainline kernel. The original sunxi
>> kernel has incomplete support for GPIOs.
>
> That's not true.
>
> The GPIO support has been feature complete since 3.11.
>

I'm not sure if it supports interrupts though.

> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com



-- 
GP Orcullo


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-18  8:05       ` GP Orcullo
@ 2015-04-18  8:16         ` Maxime Ripard
  2015-04-18 14:45           ` GP Orcullo
  0 siblings, 1 reply; 18+ messages in thread
From: Maxime Ripard @ 2015-04-18  8:16 UTC (permalink / raw)
  To: GP Orcullo; +Cc: xenomai

On Sat, Apr 18, 2015 at 04:05:25PM +0800, GP Orcullo wrote:
> On Sat, Apr 18, 2015 at 2:55 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> >> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> >> <gilles.chanteperdrix@xenomai.org> wrote:
> >> > On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >> >> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >> >
> >> > Does not sunxi have GPIO ?
> >> >
> >> > --
> >> >                                             Gilles.
> >>
> >> There's no GPIO driver in the mainline kernel. The original sunxi
> >> kernel has incomplete support for GPIOs.
> >
> > That's not true.
> >
> > The GPIO support has been feature complete since 3.11.
> >
> 
> I'm not sure if it supports interrupts though.

It does, since 3.11.

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150418/68aa9327/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-18  6:56               ` Maxime Ripard
@ 2015-04-18  9:34                 ` Jan Kiszka
  2015-04-18 11:50                   ` Maxime Ripard
  0 siblings, 1 reply; 18+ messages in thread
From: Jan Kiszka @ 2015-04-18  9:34 UTC (permalink / raw)
  To: Maxime Ripard, Gilles Chanteperdrix, GP Orcullo; +Cc: xenomai

On 2015-04-18 08:56, Maxime Ripard wrote:
> On Thu, Apr 16, 2015 at 06:56:00PM +0200, Gilles Chanteperdrix wrote:
>> On Thu, Apr 16, 2015 at 06:53:24PM +0200, Jan Kiszka wrote:
>>> On 2015-04-16 18:43, Gilles Chanteperdrix wrote:
>>>> On Thu, Apr 16, 2015 at 06:37:35PM +0200, Jan Kiszka wrote:
>>>>> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
>>>>>> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
>>>>>>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
>>>>>>> <gilles.chanteperdrix@xenomai.org> wrote:
>>>>>>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>>>>>>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>>>>>>>>
>>>>>>>> Does not sunxi have GPIO ?
>>>>>>>>
>>>>>>>> --
>>>>>>>>                                             Gilles.
>>>>>>>
>>>>>>> There's no GPIO driver in the mainline kernel. The original sunxi
>>>>>>> kernel has incomplete support for GPIOs.
>>>>>>
>>>>>> Ok, what about timer and tsc? Basically, you should run through the
>>>>>> ARM porting guide and check every modification to be made. And if
>>>>>> you have done so, the commit message should mention it.
>>>>>
>>>>> sunxi is pretty generic ARMv7-class in that regard, but double-checking
>>>>> is surely better.
>>>>
>>>> armv7 does not mean a particular timer. Cortex A9 or cortex A15 do,
>>>> but different ones, and Cortex A8 does not for instance. The
>>>> processor we are talking about is probably not a cortex A9 since on
>>>> I-pipe, there is no timer or tsc defined on A9 when booting in UP
>>>> mode (and GP Orcullo is booting in UP mode). So my question is not
>>>> about "double-checking", it is rather the first check.
>>>
>>> The A20 is a dual-core Cortex A7.
>>
>> Strange that GP Orcullo is not running the kernel in SMP mode then.
> 
> The A20 uses PSCI to implement its SMP ops, which requires some
> cooperation from the bootloader. Maybe he just has a too ancient
> bootloader.

Recent upstream U-boot is a must, of course. I think the upstream kernel
never supported SMP without PSCI, and the now obsolete sunxi U-boot was
lacking that feature.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150418/b187c19f/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-18  9:34                 ` Jan Kiszka
@ 2015-04-18 11:50                   ` Maxime Ripard
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Ripard @ 2015-04-18 11:50 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: GP Orcullo, xenomai

On Sat, Apr 18, 2015 at 11:34:49AM +0200, Jan Kiszka wrote:
> On 2015-04-18 08:56, Maxime Ripard wrote:
> > On Thu, Apr 16, 2015 at 06:56:00PM +0200, Gilles Chanteperdrix wrote:
> >> On Thu, Apr 16, 2015 at 06:53:24PM +0200, Jan Kiszka wrote:
> >>> On 2015-04-16 18:43, Gilles Chanteperdrix wrote:
> >>>> On Thu, Apr 16, 2015 at 06:37:35PM +0200, Jan Kiszka wrote:
> >>>>> On 2015-04-16 18:16, Gilles Chanteperdrix wrote:
> >>>>>> On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> >>>>>>> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> >>>>>>> <gilles.chanteperdrix@xenomai.org> wrote:
> >>>>>>>> On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >>>>>>>>> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >>>>>>>>
> >>>>>>>> Does not sunxi have GPIO ?
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>>                                             Gilles.
> >>>>>>>
> >>>>>>> There's no GPIO driver in the mainline kernel. The original sunxi
> >>>>>>> kernel has incomplete support for GPIOs.
> >>>>>>
> >>>>>> Ok, what about timer and tsc? Basically, you should run through the
> >>>>>> ARM porting guide and check every modification to be made. And if
> >>>>>> you have done so, the commit message should mention it.
> >>>>>
> >>>>> sunxi is pretty generic ARMv7-class in that regard, but double-checking
> >>>>> is surely better.
> >>>>
> >>>> armv7 does not mean a particular timer. Cortex A9 or cortex A15 do,
> >>>> but different ones, and Cortex A8 does not for instance. The
> >>>> processor we are talking about is probably not a cortex A9 since on
> >>>> I-pipe, there is no timer or tsc defined on A9 when booting in UP
> >>>> mode (and GP Orcullo is booting in UP mode). So my question is not
> >>>> about "double-checking", it is rather the first check.
> >>>
> >>> The A20 is a dual-core Cortex A7.
> >>
> >> Strange that GP Orcullo is not running the kernel in SMP mode then.
> > 
> > The A20 uses PSCI to implement its SMP ops, which requires some
> > cooperation from the bootloader. Maybe he just has a too ancient
> > bootloader.
> 
> Recent upstream U-boot is a must, of course. I think the upstream kernel
> never supported SMP without PSCI, and the now obsolete sunxi U-boot was
> lacking that feature.

Exactly.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150418/46187f72/attachment.sig>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-18  8:16         ` Maxime Ripard
@ 2015-04-18 14:45           ` GP Orcullo
  2015-04-18 15:20             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 18+ messages in thread
From: GP Orcullo @ 2015-04-18 14:45 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: xenomai

On Sat, Apr 18, 2015 at 4:16 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Sat, Apr 18, 2015 at 04:05:25PM +0800, GP Orcullo wrote:
>> On Sat, Apr 18, 2015 at 2:55 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
>> >> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
>> >> <gilles.chanteperdrix@xenomai.org> wrote:
>> >> > On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
>> >> >> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
>> >> >
>> >> > Does not sunxi have GPIO ?
>> >> >
>> >> > --
>> >> >                                             Gilles.
>> >>
>> >> There's no GPIO driver in the mainline kernel. The original sunxi
>> >> kernel has incomplete support for GPIOs.
>> >
>> > That's not true.
>> >
>> > The GPIO support has been feature complete since 3.11.
>> >
>>
>> I'm not sure if it supports interrupts though.
>
> It does, since 3.11.
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

Attached is the updated patch.

-- 
GP Orcullo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Add-support-for-SUNXI-boards.patch
Type: text/x-patch
Size: 2622 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20150418/f648f089/attachment.bin>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Xenomai] [PATCH] Add support for SUNXI boards
  2015-04-18 14:45           ` GP Orcullo
@ 2015-04-18 15:20             ` Gilles Chanteperdrix
  0 siblings, 0 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2015-04-18 15:20 UTC (permalink / raw)
  To: GP Orcullo; +Cc: Maxime Ripard, xenomai

On Sat, Apr 18, 2015 at 10:45:10PM +0800, GP Orcullo wrote:
> On Sat, Apr 18, 2015 at 4:16 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Sat, Apr 18, 2015 at 04:05:25PM +0800, GP Orcullo wrote:
> >> On Sat, Apr 18, 2015 at 2:55 PM, Maxime Ripard
> >> <maxime.ripard@free-electrons.com> wrote:
> >> > On Fri, Apr 17, 2015 at 12:04:22AM +0800, GP Orcullo wrote:
> >> >> On Thu, Apr 16, 2015 at 9:19 PM, Gilles Chanteperdrix
> >> >> <gilles.chanteperdrix@xenomai.org> wrote:
> >> >> > On Thu, Apr 16, 2015 at 04:05:05PM +0800, GP Orcullo wrote:
> >> >> >> Tested on a Cubieboard2 with v3.16.7-ckt9 kernel.
> >> >> >
> >> >> > Does not sunxi have GPIO ?
> >> >> >
> >> >> > --
> >> >> >                                             Gilles.
> >> >>
> >> >> There's no GPIO driver in the mainline kernel. The original sunxi
> >> >> kernel has incomplete support for GPIOs.
> >> >
> >> > That's not true.
> >> >
> >> > The GPIO support has been feature complete since 3.11.
> >> >
> >>
> >> I'm not sure if it supports interrupts though.
> >
> > It does, since 3.11.
> >
> > --
> > Maxime Ripard, Free Electrons
> > Embedded Linux, Kernel and Android engineering
> > http://free-electrons.com
> 
> Attached is the updated patch.

You sure this is sufficient? Does not that pinctrl stuff use a
spinlock? We are not in a hurry, we can afford to be thorough.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-04-18 15:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-16  8:05 [Xenomai] [PATCH] Add support for SUNXI boards GP Orcullo
2015-04-16 13:19 ` Gilles Chanteperdrix
2015-04-16 16:04   ` GP Orcullo
2015-04-16 16:16     ` Gilles Chanteperdrix
2015-04-16 16:37       ` Jan Kiszka
2015-04-16 16:43         ` Gilles Chanteperdrix
2015-04-16 16:53           ` Jan Kiszka
2015-04-16 16:56             ` Gilles Chanteperdrix
2015-04-18  6:56               ` Maxime Ripard
2015-04-18  9:34                 ` Jan Kiszka
2015-04-18 11:50                   ` Maxime Ripard
2015-04-16 22:29         ` GP Orcullo
2015-04-16 23:13           ` Gilles Chanteperdrix
2015-04-18  6:55     ` Maxime Ripard
2015-04-18  8:05       ` GP Orcullo
2015-04-18  8:16         ` Maxime Ripard
2015-04-18 14:45           ` GP Orcullo
2015-04-18 15:20             ` Gilles Chanteperdrix

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.