ARM: OMAP: STI/XTI support.
Subsystems (5)
This implements a simple subsystem for the OMAP serial tracing interface, as found in omap16xx and omap24xx.
There's a few things implemented in this patch:
- STI console support
- STI netlink support
- STI RX FIFO support
In addition to this, we also provide a general tracing framework that can be used by both the kernel and userspace (and imask control for allowing DSP-side STI manipulation).
Since the IRQ is multiplexed, drivers register for the bits they're interested in (the RX FIFO is an example of this).
The netlink interface exists for streaming data bi-directionally. This is currently done using NETLINK_USERSOCK, which ends up being somewhat limiting.
All of these things have been tested on both OMAP1 and OMAP2, and it takes in to account some of the protocol differences.
---
If someone wishes the patch split for review, I'll resubmit it as a small patch series. Applies to current git.
arch/arm/mach-omap1/devices.c | 40 +++ arch/arm/mach-omap2/clock.h | 11 arch/arm/mach-omap2/devices.c | 42 +++ arch/arm/plat-omap/Kconfig | 11 arch/arm/plat-omap/Makefile | 3 arch/arm/plat-omap/sti/Makefile | 4 arch/arm/plat-omap/sti/sti-console.c | 174 ++++++++++++++ arch/arm/plat-omap/sti/sti-fifo.c | 117 +++++++++ arch/arm/plat-omap/sti/sti-netlink.c | 157 ++++++++++++ arch/arm/plat-omap/sti/sti.c | 425 +++++++++++++++++++++++++++++++++++ include/asm-arm/arch-omap/sti.h | 159 +++++++++++++ 11 files changed, 1143 insertions(+)
arch/arm/mach-omap1/devices.c +40 -0
@@ -99,6 +99,45 @@ static void omap_init_rtc(void)static inline void omap_init_rtc (void ) {}#endif +#if defined(CONFIG_OMAP_STI ) + +#define OMAP1_STI_BASE IO_ADDRESS(0xfffea000) +#define OMAP1_STI_CHANNEL_BASE (OMAP1_STI_BASE + 0x400) + +static struct resource sti_resources[] = { + { + .start =OMAP1_STI_BASE , + .end =OMAP1_STI_BASE +SZ_1K -1 , + .flags =IORESOURCE_MEM , + }, + { + .start =OMAP1_STI_CHANNEL_BASE , + .end =OMAP1_STI_CHANNEL_BASE +SZ_1K -1 , + .flags =IORESOURCE_MEM , + }, + { + .start =INT_1610_STI , + .flags =IORESOURCE_IRQ , + } +}; + +static struct platform_device sti_device = { + .name ="sti" , + .id =-1 , + .dev = { + .release = omap_nop_release, + }, + .num_resources =ARRAY_SIZE (sti_resources), + .resource = sti_resources, +}; + +static inline void omap_init_sti (void ) +{ +platform_device_register (&sti_device); +} +#else +static inline void omap_init_sti (void ) {} +#endif /*-------------------------------------------------------------------------*/
@@ -129,6 +168,7 @@ static int __init omap1_init_devices(voi*/ omap_init_irda ();omap_init_rtc (); +omap_init_sti ();return 0 ; }
arch/arm/mach-omap2/clock.h +11 -0
@@ -717,6 +717,16 @@ static struct clk sys_clkout2 = { .recalc = &omap2_clksel_recalc, }; +static struct clk emul_ck = { + .name ="emul_ck" , + .parent = &func_54m_ck, + .flags =CLOCK_IN_OMAP242X , + .enable_reg = (void __iomem *)&PRCM_CLKEMUL_CTRL , + .enable_bit =0 , + .recalc = &omap2_propagate_rate, + +}; +/* * MPU clock domain * Clocks:
@@ -1957,6 +1967,7 @@ static struct clk *onchip_clks[] = { &wdt1_osc_ck, &sys_clkout, &sys_clkout2, + &emul_ck,/* mpu domain clocks */ &mpu_ck,/* dsp domain clocks */
arch/arm/mach-omap2/devices.c +42 -0
54 lines not on this page · raw message
arch/arm/plat-omap/Kconfig +11 -0
@@ -83,6 +83,17 @@ config OMAP_MUX_WARNINGS to change the pin multiplexing setup. When there are no warnings printed, it's safe to deselect OMAP_MUX for your product. +config OMAP_STI + bool "STI/XTI support" + depends on ARCH_OMAP16XX || ARCH_OMAP24XX + default n + +config OMAP_STI_CONSOLE + bool "STI console support" + depends on OMAP_STI + help + This enables a console driver by way of STI/XTI. + choice prompt "System timer" default OMAP_MPU_TIMER
arch/arm/plat-omap/Makefile +3 -0
@@ -13,6 +13,9 @@ obj-$(CONFIG_OMAP_32K_TIMER) += timer32k # OCPI interconnect support for 1710, 1610 and 5912 obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o +# STI support +obj-$(CONFIG_OMAP_STI) += sti/ + obj-$(CONFIG_CPU_FREQ) += cpu-omap.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o
arch/arm/plat-omap/sti/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +obj-y += sti.o sti-fifo.o + +obj-$(CONFIG_OMAP_STI_CONSOLE) += sti-console.o +obj-$(CONFIG_NET) += sti-netlink.o
arch/arm/plat-omap/sti/sti-console.c new file +174 -0
174 lines not on this page · raw message
arch/arm/plat-omap/sti/sti-fifo.c new file +117 -0
117 lines not on this page · raw message
arch/arm/plat-omap/sti/sti-netlink.c new file +157 -0
157 lines not on this page · raw message
arch/arm/plat-omap/sti/sti.c new file +425 -0
425 lines not on this page · raw message
include/asm-arm/arch-omap/sti.h new file +159 -0
159 lines not on this page · raw message
Tony Lindgren
maintainerQuoted 16 lines · Paul Mundt
This implements a simple subsystem for the OMAP serial tracing interface, as found in omap16xx and omap24xx.
There's a few things implemented in this patch:
- STI console support
- STI netlink support
- STI RX FIFO supportIn addition to this, we also provide a general tracing framework that can be used by both the kernel and userspace (and imask control for allowing DSP-side STI manipulation).
Since the IRQ is multiplexed, drivers register for the bits they're interested in (the RX FIFO is an example of this).
Quoted 6 lines
The netlink interface exists for streaming data bi-directionally. This is currently done using
NETLINK_USERSOCK, which ends up being somewhat limiting.All of these things have been tested on both OMAP1 and OMAP2, and it takes in to account some of the protocol differences.
Thanks, pushing today.
Tony