* [Xenomai] OMAP L138 support
@ 2014-05-28 0:28 Peter Howard
2014-05-28 0:35 ` [Xenomai] [PATCH 1/2] Fix to Ti EDMA code - refer http://www.spinics.net/lists/linux-omap/msg10462 Peter Howard
2014-05-28 0:37 ` [Xenomai] [PATCH 2/2] Add ipipe support for Ti da850 board Peter Howard
0 siblings, 2 replies; 4+ messages in thread
From: Peter Howard @ 2014-05-28 0:28 UTC (permalink / raw)
To: xenomai
After discussion with Gilles, I'm putting up my patches for the L138
(specifically the da850) though we're still sorting out why things can
go wrong with FCSE best-effort and *lots* of tracing turned on.
Note: I'll be switching to my work email account to post the patches
(for proper attribution).
--
Peter Howard <pjh@northern-ridge.com.au>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Xenomai] [PATCH 1/2] Fix to Ti EDMA code - refer http://www.spinics.net/lists/linux-omap/msg10462
2014-05-28 0:28 [Xenomai] OMAP L138 support Peter Howard
@ 2014-05-28 0:35 ` Peter Howard
2014-05-28 0:37 ` [Xenomai] [PATCH 2/2] Add ipipe support for Ti da850 board Peter Howard
1 sibling, 0 replies; 4+ messages in thread
From: Peter Howard @ 2014-05-28 0:35 UTC (permalink / raw)
To: xenomai@xenomai.org
---
drivers/dma/edma.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index cd8da45..bf5ad0f 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -182,11 +182,13 @@ static void edma_execute(struct edma_chan *echan)
echan->ecc->dummy_slot);
}
- edma_resume(echan->ch_num);
-
if (edesc->processed <= MAX_NR_SG) {
dev_dbg(dev, "first transfer starting %d\n", echan->ch_num);
edma_start(echan->ch_num);
+ } else {
+ dev_dbg(dev, "chan: %d: completed %d elements, resuming\n",
+ echan->ch_num, edesc->processed);
+ edma_resume(echan->ch_num);
}
/*
--
1.9.3
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Xenomai] [PATCH 2/2] Add ipipe support for Ti da850 board
2014-05-28 0:28 [Xenomai] OMAP L138 support Peter Howard
2014-05-28 0:35 ` [Xenomai] [PATCH 1/2] Fix to Ti EDMA code - refer http://www.spinics.net/lists/linux-omap/msg10462 Peter Howard
@ 2014-05-28 0:37 ` Peter Howard
2014-05-28 9:56 ` Gilles Chanteperdrix
1 sibling, 1 reply; 4+ messages in thread
From: Peter Howard @ 2014-05-28 0:37 UTC (permalink / raw)
To: xenomai@xenomai.org
---
arch/arm/mach-davinci/Kconfig | 1 +
arch/arm/mach-davinci/cp_intc.c | 1 +
arch/arm/mach-davinci/time.c | 46 +++++++++++++++++++++++++++++++++++++++++
drivers/gpio/gpio-davinci.c | 7 +++++++
4 files changed, 55 insertions(+)
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index a075b3e..c7cb9f1 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -41,6 +41,7 @@ config ARCH_DAVINCI_DA850
select ARCH_DAVINCI_DA8XX
select ARCH_HAS_CPUFREQ
select CP_INTC
+ select IPIPE_ARM_KUSER_TSC if IPIPE
config ARCH_DAVINCI_DA8XX
bool
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c
index 006dae8..816affe 100644
--- a/arch/arm/mach-davinci/cp_intc.c
+++ b/arch/arm/mach-davinci/cp_intc.c
@@ -17,6 +17,7 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <linux/ipipe.h>
#include <mach/common.h>
#include <mach/cp_intc.h>
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 24ad30f..51d7336 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -19,6 +19,10 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/sched_clock.h>
+#ifdef CONFIG_IPIPE
+#include <linux/ipipe.h>
+#include <linux/ipipe_tickdev.h>
+#endif /* CONFIG_IPIPE */
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
@@ -94,9 +98,15 @@ struct timer_s {
unsigned long opts;
unsigned long flags;
void __iomem *base;
+#ifdef CONFIG_IPIPE
+ void *pbase;
+#endif /*CONFIG_IPIPE */
unsigned long tim_off;
unsigned long prd_off;
unsigned long enamode_shift;
+#ifdef CONFIG_IPIPE
+ int irq;
+#endif /* CONFIG_IPIPE */
struct irqaction irqaction;
};
static struct timer_s timers[];
@@ -166,6 +176,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
{
struct clock_event_device *evt = &clockevent_davinci;
+#ifdef CONFIG_IPIPE
+ __ipipe_tsc_update();
+#endif /* CONFIG_IPIPE */
evt->event_handler(evt);
return IRQ_HANDLED;
}
@@ -241,6 +254,9 @@ static void __init timer_init(void)
t->base = base[timer];
if (!t->base)
continue;
+#ifdef CONFIG_IPIPE
+ t->pbase = (void *)dtip[timer].base;
+#endif /* CONFIG_IPIPE */
if (IS_TIMER_BOT(t->id)) {
t->enamode_shift = 6;
@@ -262,6 +278,9 @@ static void __init timer_init(void)
irq = USING_COMPARE(t) ? dtip[i].cmp_irq : irq;
setup_irq(irq, &t->irqaction);
}
+#ifdef CONFIG_IPIPE
+ t->irq = irq;
+#endif /* CONFIG_IPIPE */
}
}
@@ -329,10 +348,26 @@ static void davinci_set_mode(enum clock_event_mode mode,
}
}
+#ifdef CONFIG_IPIPE
+static struct ipipe_timer davinci_itimer;
+
+static struct __ipipe_tscinfo tsc_info = {
+ .type = IPIPE_TSC_TYPE_FREERUNNING,
+ .u = {
+ {
+ .mask = 0xffffffff,
+ },
+ },
+};
+#endif /* CONFIG_IPIPE */
+
static struct clock_event_device clockevent_davinci = {
.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
.set_next_event = davinci_set_next_event,
.set_mode = davinci_set_mode,
+#ifdef CONFIG_IPIPE
+ .ipipe_timer = &davinci_itimer,
+#endif /* CONFIG_IPIPE */
};
@@ -398,6 +433,17 @@ void __init davinci_timer_init(void)
clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id];
clockevent_davinci.cpumask = cpumask_of(0);
+#ifdef CONFIG_IPIPE
+ tsc_info.freq = davinci_clock_tick_rate;
+ tsc_info.counter_vaddr = (void *)(timers[TID_CLOCKSOURCE].base +
+ timers[TID_CLOCKSOURCE].tim_off);
+ tsc_info.u.counter_paddr = timers[TID_CLOCKSOURCE].pbase +
+ timers[TID_CLOCKSOURCE].tim_off;
+ __ipipe_tsc_register(&tsc_info);
+
+ davinci_itimer.irq = timers[TID_CLOCKEVENT].irq;
+ davinci_itimer.min_delay_ticks = 3;
+#endif /* CONFIG_IPIPE */
clockevents_config_and_register(&clockevent_davinci,
davinci_clock_tick_rate, 1, 0xfffffffe);
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 7629b4f..937399a 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -23,6 +23,7 @@
#include <linux/platform_device.h>
#include <linux/platform_data/gpio-davinci.h>
#include <linux/irqchip/chained_irq.h>
+#include <linux/ipipe.h>
struct davinci_gpio_regs {
u32 dir;
@@ -338,9 +339,15 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)
while (status) {
bit = __ffs(status);
status &= ~BIT(bit);
+#ifdef CONFIG_IPIPE
+ ipipe_handle_demuxed_irq(
+ irq_find_mapping(d->irq_domain,
+ d->chip.base + bit));
+#else
generic_handle_irq(
irq_find_mapping(d->irq_domain,
d->chip.base + bit));
+#endif /* CONFIG_IPIPE */
}
}
chained_irq_exit(irq_desc_get_chip(desc), desc);
--
1.9.3
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Xenomai] [PATCH 2/2] Add ipipe support for Ti da850 board
2014-05-28 0:37 ` [Xenomai] [PATCH 2/2] Add ipipe support for Ti da850 board Peter Howard
@ 2014-05-28 9:56 ` Gilles Chanteperdrix
0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2014-05-28 9:56 UTC (permalink / raw)
To: Peter Howard, xenomai@xenomai.org
On 05/28/2014 02:37 AM, Peter Howard wrote:
> +#ifdef CONFIG_IPIPE
> + ipipe_handle_demuxed_irq(
> + irq_find_mapping(d->irq_domain,
> + d->chip.base + bit));
> +#else
> generic_handle_irq(
> irq_find_mapping(d->irq_domain,
> d->chip.base + bit));
> +#endif /* CONFIG_IPIPE */
> }
> }
> chained_irq_exit(irq_desc_get_chip(desc), desc);
>
You do not need the #ifdef CONFIG_IPIPE here, ipipe_handle_demuxed_irq
is replaced with generic_handle_irq when CONFIG_IPIPE is off.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-28 9:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28 0:28 [Xenomai] OMAP L138 support Peter Howard
2014-05-28 0:35 ` [Xenomai] [PATCH 1/2] Fix to Ti EDMA code - refer http://www.spinics.net/lists/linux-omap/msg10462 Peter Howard
2014-05-28 0:37 ` [Xenomai] [PATCH 2/2] Add ipipe support for Ti da850 board Peter Howard
2014-05-28 9:56 ` 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.