ARM: OMAP: Updates for common code shared between OMAP1 and OMAP2
Subsystems (8)
Tony Lindgren
maintainercover ARM: OMAP: Updates for common code shared between OMAP1 and OMAP2
Hi,
The following patch series contains updates for common code shared between OMAP1 and OMAP2
This is take #2 of the earlier 90 patch mountain, which has been split into six smaller series.
Regards,
Tony
Tony Lindgren
maintainerPATCH 1/18 ARM: OMAP: Add DMA IRQ sanity checks
From: Juha Yrjola <[email protected]>
Add DMA IRQ sanity checks
--- arch/arm/plat-omap/dma.c | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-)
arch/arm/plat-omap/dma.c +18 -7
@@ -925,10 +925,17 @@ static int omap2_dma_handle_ch(int ch) {u32 status =OMAP_DMA_CSR_REG (ch); -if (!status) +if (!status) { +if (printk_ratelimit ()) +printk (KERN_WARNING "Spurious DMA IRQ for lch %d\n" , ch);return 0 ; -if (unlikely (dma_chan[ch].dev_id ==-1 )) + } +if (unlikely (dma_chan[ch].dev_id ==-1 )) { +if (printk_ratelimit ()) +printk (KERN_WARNING "IRQ %04x for non-allocated DMA" +"channel %d\n" , status, ch);return 0 ; + }if (unlikely (status &OMAP_DMA_DROP_IRQ ))printk (KERN_INFO "DMA synchronization event drop occurred with device "
@@ -959,11 +966,15 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id)int i; val =omap_readl (OMAP_DMA4_IRQSTATUS_L0 ); - -for (i =1 ; i <=OMAP_LOGICAL_DMA_CH_COUNT ; i++) { -int active = val & (1 << (i -1 )); -if (active) -omap2_dma_handle_ch (i -1 ); +if (val ==0 ) { +if (printk_ratelimit ()) +printk (KERN_WARNING "Spurious DMA IRQ\n" ); +return IRQ_HANDLED ; + } +for (i =0 ; i <OMAP_LOGICAL_DMA_CH_COUNT && val !=0 ; i++) { +if (val &1 ) +omap2_dma_handle_ch (i); + val >>=1 ; }return IRQ_HANDLED ;
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 2/18 ARM: OMAP: Add function to print clock usecounts
From: Juha Yrjola <[email protected]>
Useful for debugging power management code.
--- arch/arm/plat-omap/clock.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
arch/arm/plat-omap/clock.c +35 -0
@@ -33,6 +33,41 @@ static DEFINE_SPINLOCK(clockfw_lock);static struct clk_functions *arch_clock; +#ifdef CONFIG_PM_DEBUG + +static void print_parents (struct clk *clk) +{ +struct clk *p; +int printed =0 ; + +list_for_each_entry (p, &clocks, node) { +if (p->parent == clk && p->usecount) { +if (!clk->usecount && !printed) { +printk ("MISMATCH: %s\n" , clk->name); + printed =1 ; + } +printk ("\t%-15s\n" , p->name); + } + } +} + +void clk_print_usecounts (void ) +{ +unsigned long flags; +struct clk *p; + +spin_lock_irqsave (&clockfw_lock, flags); +list_for_each_entry (p, &clocks, node) { +if (p->usecount) +printk ("%-15s: %d\n" , p->name, p->usecount); +print_parents (p); + + } +spin_unlock_irqrestore (&clockfw_lock, flags); +} + +#endif +/*------------------------------------------------------------------------- * Standard clock functions defined in include/linux/clk.h *-------------------------------------------------------------------------*/
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 3/18 ARM: OMAP: FB: add controller platform data
From: Imre Deak <[email protected]>
Add controller platform data
--- arch/arm/plat-omap/fb.c | 5 +++++ include/asm-arm/arch-omap/omapfb.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-)
arch/arm/plat-omap/fb.c +5 -0
@@ -55,6 +55,11 @@ void omapfb_reserve_mem(void) } } +void omapfb_set_ctrl_platform_data (void *data) +{ + omapfb_config.ctrl_platform_data = data; +} +static inline int omap_init_fb (void ) {const struct omap_lcd_config *conf;
include/asm-arm/arch-omap/omapfb.h +5 -3
@@ -292,8 +292,9 @@ struct omapfb_device { };struct omapfb_platform_data { -struct omap_lcd_config lcd; -struct omap_fbmem_config fbmem; +struct omap_lcd_config lcd; +struct omapfb_mem_desc mem_desc; +void *ctrl_platform_data; };#define OMAPFB_EVENT_READY 1
@@ -317,8 +318,9 @@ extern int omapfb_update_window_async(struct omapfb_update_window *win,void (*callback)(void *), void *callback_data); -/* in arch/arm/plat-omap/devices.c */ +/* in arch/arm/plat-omap/fb.c */ extern void omapfb_reserve_mem (void ); +extern void omapfb_set_ctrl_platform_data (void *pdata);#endif /* __KERNEL__ */
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 4/18 ARM: OMAP: h4 must have blinky leds!!
From: David Brownell <[email protected]>
This adds generic support for the "debug board" LEDs used by most of TI's OMAP reference boards, and board-specific support for the H4.
It's derived from the not-as-generic stuff used by OMAP1 H2/H3/P2. Those should be able to switch easily to this version, and clean up some of the omap1-specific code.
In addition to H4 support, one key improvement is supporting not just the "old" ARM debug LED API (with timer and idle LEDs, plus four that can be handy for kernel debugging), but it also supports the "new" generic LED API (most useful for usermode stuff IMO). Either or both APIs can be enabled.
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/board-h4.c | 14 ++ arch/arm/plat-omap/Kconfig | 5 + arch/arm/plat-omap/Makefile | 2 +- arch/arm/plat-omap/debug-leds.c | 319 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 340 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -20,6 +20,7 @@ config MACH_OMAP_GENERIC config MACH_OMAP_H4 bool "OMAP 2420 H4 board" depends on ARCH_OMAP2 && ARCH_OMAP24XX + select OMAP_DEBUG_LEDS if LEDS || LEDS_OMAP_DEBUG config MACH_OMAP_APOLLON bool "OMAP 2420 Apollon board"
arch/arm/mach-omap2/board-h4.c +14 -0
@@ -266,12 +266,26 @@ static struct platform_device h4_lcd_device = { .id = -1, }; +static struct resource h4_led_resources[] = { + [0 ] = { + .flags =IORESOURCE_MEM , + }, +}; + +static struct platform_device h4_led_device = { + .name ="omap_dbg_led" , + .id =-1 , + .num_resources =ARRAY_SIZE (h4_led_resources), + .resource = h4_led_resources, +}; +static struct platform_device *h4_devices[]__initdata = { &h4_smc91x_device, &h4_flash_device, &h4_irda_device, &h4_kp_device, &h4_lcd_device, + &h4_led_device, };static inline void __init h4_init_smc91x (void )
arch/arm/plat-omap/Kconfig +5 -0
@@ -19,6 +19,11 @@ endchoice comment "OMAP Feature Selections" +config OMAP_DEBUG_LEDS + bool + help + For debug card leds on TI reference boards. + config OMAP_RESET_CLOCKS bool "Reset unused clocks during boot" depends on ARCH_OMAP
arch/arm/plat-omap/Makefile +1 -1
@@ -16,4 +16,4 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o obj-$(CONFIG_CPU_FREQ) += cpu-omap.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o - +obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
arch/arm/plat-omap/debug-leds.c new file +319 -0
319 lines not on this page · raw message
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 5/18 ARM: OMAP: Sync headers with linux-omap
This patch syncs omap specific headers with linux-omap. Most of the changes needed because of bitrot caused by driver changes in linux-omap tree. Integrating this is needed for adding support for various omap drivers.
--- include/asm-arm/arch-omap/aic23.h | 4 +- include/asm-arm/arch-omap/board-apollon.h | 9 - include/asm-arm/arch-omap/board-h4.h | 3 - include/asm-arm/arch-omap/board.h | 41 +++-- include/asm-arm/arch-omap/dsp.h | 250 ----------------------------- include/asm-arm/arch-omap/dsp_common.h | 32 ++-- include/asm-arm/arch-omap/gpio-switch.h | 54 ++++++ include/asm-arm/arch-omap/gpmc.h | 2 + include/asm-arm/arch-omap/hardware.h | 9 + include/asm-arm/arch-omap/io.h | 11 ++ include/asm-arm/arch-omap/irqs.h | 19 ++- include/asm-arm/arch-omap/lcd_lph8923.h | 14 -- include/asm-arm/arch-omap/lcd_mipid.h | 24 +++ include/asm-arm/arch-omap/led.h | 24 +++ include/asm-arm/arch-omap/mcspi.h | 1 - include/asm-arm/arch-omap/memory.h | 13 ++ include/asm-arm/arch-omap/menelaus.h | 17 ++- include/asm-arm/arch-omap/omap16xx.h | 12 +- include/asm-arm/arch-omap/omap24xx.h | 9 + include/asm-arm/arch-omap/omapfb.h | 131 +++++++++------ include/asm-arm/arch-omap/sram.h | 4 +- include/asm-arm/arch-omap/usb.h | 40 ++++- 22 files changed, 334 insertions(+), 389 deletions(-)
include/asm-arm/arch-omap/aic23.h +2 -2
@@ -110,7 +110,7 @@#define TLV320AIC23ID1 (0x1a) // cs low#define TLV320AIC23ID2 (0x1b) // cs high -void tlv320aic23_power_up (void ); -void tlv320aic23_power_down (void ); +void aic23_power_up (void ); +void aic23_power_down (void );#endif /* __ASM_ARCH_AIC23_H */
include/asm-arm/arch-omap/board-apollon.h +0 -9
@@ -30,16 +30,7 @@#define __ASM_ARCH_OMAP_APOLLON_H/* Placeholder for APOLLON specific defines */ -/* GPMC CS0 */ -#define APOLLON_CS0_BASE 0x00000000 -/* GPMC CS1 */ -#define APOLLON_CS1_BASE 0x08000000 -#define APOLLON_ETHR_START (APOLLON_CS1_BASE + 0x300)#define APOLLON_ETHR_GPIO_IRQ 74 -/* GPMC CS2 - reserved for OneNAND */ -#define APOLLON_CS2_BASE 0x10000000 -/* GPMC CS3 - reserved for NOR or NAND */ -#define APOLLON_CS3_BASE 0x18000000#endif /* __ASM_ARCH_OMAP_APOLLON_H */
include/asm-arm/arch-omap/board-h4.h +0 -3
@@ -30,9 +30,6 @@#define __ASM_ARCH_OMAP_H4_H/* Placeholder for H4 specific defines */ -/* GPMC CS1 */ -#define OMAP24XX_ETHR_START 0x08000300#define OMAP24XX_ETHR_GPIO_IRQ 92 -#define H4_CS0_BASE 0x04000000#endif /* __ASM_ARCH_OMAP_H4_H */
include/asm-arm/arch-omap/board.h +24 -17
56 lines not on this page · raw message
include/asm-arm/arch-omap/dsp.h deleted +0 -250
250 lines not on this page · raw message
include/asm-arm/arch-omap/dsp_common.h +14 -18
@@ -1,38 +1,34 @@/* -* linux/include/asm-arm/arch-omap/dsp_common.h +* This file is part of OMAP DSP driver (DSP Gateway version 3.3.1) * -* Header for OMAP DSP subsystem control +* Copyright (C) 2004-2006 Nokia Corporation. All rights reserved. * -* Copyright (C) 2004,2005 Nokia Corporation +* Contact: Toshihiro Kobayashi <[email protected]> * -* Written by Toshihiro Kobayashi <[email protected]> +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA * -* 2005/06/03: DSP Gateway version 3.3 */ #ifndef ASM_ARCH_DSP_COMMON_H #define ASM_ARCH_DSP_COMMON_H +#ifdef CONFIG_ARCH_OMAP1 extern void omap_dsp_request_mpui (void );extern void omap_dsp_release_mpui (void );extern int omap_dsp_request_mem (void );extern int omap_dsp_release_mem (void ); - -extern void (*omap_dsp_audio_pwr_up_request)(int stage); -extern void (*omap_dsp_audio_pwr_down_request)(int stage); +#endif #endif /* ASM_ARCH_DSP_COMMON_H */
include/asm-arm/arch-omap/gpio-switch.h new file +54 -0
54 lines not on this page · raw message
include/asm-arm/arch-omap/gpmc.h +2 -0
@@ -87,5 +87,7 @@ extern int gpmc_cs_calc_divider(int cs,extern int gpmc_cs_set_timings (int cs,const struct gpmc_timings *t);extern int gpmc_cs_request (int cs,unsigned long size,unsigned long *base);extern void gpmc_cs_free (int cs); +extern void gpmc_cs_set_reserved (int cs,int reserved); +extern int gpmc_cs_reserved (int cs);#endif
include/asm-arm/arch-omap/hardware.h +9 -0
@@ -267,6 +267,15 @@#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)/* +* ---------------------------------------------------------------------------- +* Pulse-Width Light +* ---------------------------------------------------------------------------- +*/ +#define OMAP_PWL_BASE 0xfffb5800 +#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00) +#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04) + +/* * --------------------------------------------------------------------------- * Processor specific defines * ---------------------------------------------------------------------------
include/asm-arm/arch-omap/io.h +11 -0
@@ -77,6 +77,17 @@#define io_p2v (pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ #define io_v2p (va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ +/* DSP */ +#define DSP_MEM_24XX_PHYS OMAP24XX_DSP_MEM_BASE/* 0x58000000 */ +#define DSP_MEM_24XX_VIRT 0xe0000000 +#define DSP_MEM_24XX_SIZE 0x28000 +#define DSP_IPI_24XX_PHYS OMAP24XX_DSP_IPI_BASE/* 0x59000000 */ +#define DSP_IPI_24XX_VIRT 0xe1000000 +#define DSP_IPI_24XX_SIZE SZ_4K +#define DSP_MMU_24XX_PHYS OMAP24XX_DSP_MMU_BASE/* 0x5a000000 */ +#define DSP_MMU_24XX_VIRT 0xe2000000 +#define DSP_MMU_24XX_SIZE SZ_4K +#endif #ifndef __ASSEMBLER__
include/asm-arm/arch-omap/irqs.h +17 -3
@@ -37,8 +37,6 @@#define INT_DSP_MMU_ABORT 7#define INT_HOST 8#define INT_ABORT 9 -#define INT_DSP_MAILBOX1 10 -#define INT_DSP_MAILBOX2 11#define INT_BRIDGE_PRIV 13#define INT_GPIO_BANK1 14#define INT_UART3 15
@@ -63,6 +61,8 @@#define INT_1510_RES2 2#define INT_1510_SPI_TX 4#define INT_1510_SPI_RX 5 +#define INT_1510_DSP_MAILBOX1 10 +#define INT_1510_DSP_MAILBOX2 11#define INT_1510_RES12 12#define INT_1510_LB_MMU 17#define INT_1510_RES18 18
@@ -75,6 +75,8 @@#define INT_1610_IH2_FIQ 2#define INT_1610_McBSP2_TX 4#define INT_1610_McBSP2_RX 5 +#define INT_1610_DSP_MAILBOX1 10 +#define INT_1610_DSP_MAILBOX2 11#define INT_1610_LCD_LINE 12#define INT_1610_GPTIMER1 17#define INT_1610_GPTIMER2 18
@@ -131,11 +133,11 @@#define INT_RTC_TIMER (25 + IH2_BASE)#define INT_RTC_ALARM (26 + IH2_BASE)#define INT_MEM_STICK (27 + IH2_BASE) -#define INT_DSP_MMU (28 + IH2_BASE)/* * OMAP-1510 specific IRQ numbers for interrupt handler 2 */ +#define INT_1510_DSP_MMU (28 + IH2_BASE)#define INT_1510_COM_SPI_RO (31 + IH2_BASE)/*
@@ -146,6 +148,7 @@#define INT_1610_USB_OTG (8 + IH2_BASE)#define INT_1610_SoSSI (9 + IH2_BASE)#define INT_1610_SoSSI_MATCH (19 + IH2_BASE) +#define INT_1610_DSP_MMU (28 + IH2_BASE)#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)#define INT_1610_STI (32 + IH2_BASE)#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
@@ -239,10 +242,15 @@#define INT_24XX_SDMA_IRQ3 15#define INT_24XX_CAM_IRQ 24#define INT_24XX_DSS_IRQ 25 +#define INT_24XX_MAIL_U0_MPU 26 +#define INT_24XX_DSP_UMA 27 +#define INT_24XX_DSP_MMU 28#define INT_24XX_GPIO_BANK1 29#define INT_24XX_GPIO_BANK2 30#define INT_24XX_GPIO_BANK3 31#define INT_24XX_GPIO_BANK4 32 +#define INT_24XX_GPIO_BANK5 33 +#define INT_24XX_MAIL_U3_MPU 34#define INT_24XX_GPTIMER1 37#define INT_24XX_GPTIMER2 38#define INT_24XX_GPTIMER3 39
@@ -262,6 +270,12 @@#define INT_24XX_UART1_IRQ 72#define INT_24XX_UART2_IRQ 73#define INT_24XX_UART3_IRQ 74 +#define INT_24XX_USB_IRQ_GEN 75 +#define INT_24XX_USB_IRQ_NISO 76 +#define INT_24XX_USB_IRQ_ISO 77 +#define INT_24XX_USB_IRQ_HGEN 78 +#define INT_24XX_USB_IRQ_HSOF 79 +#define INT_24XX_USB_IRQ_OTG 80#define INT_24XX_MMC_IRQ 83/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
include/asm-arm/arch-omap/lcd_lph8923.h deleted +0 -14
@@ -1,14 +0,0 @@ -#ifndef __LCD_LPH8923_H -#define __LCD_LPH8923_H - -enum lcd_lph8923_test_num { -LCD_LPH8923_TEST_RGB_LINES , -}; - -enum lcd_lph8923_test_result { -LCD_LPH8923_TEST_SUCCESS , -LCD_LPH8923_TEST_INVALID , -LCD_LPH8923_TEST_FAILED , -}; - -#endif
include/asm-arm/arch-omap/lcd_mipid.h new file +24 -0
@@ -0,0 +1,24 @@ +#ifndef __LCD_MIPID_H +#define __LCD_MIPID_H + +enum mipid_test_num { +MIPID_TEST_RGB_LINES , +}; + +enum mipid_test_result { +MIPID_TEST_SUCCESS , +MIPID_TEST_INVALID , +MIPID_TEST_FAILED , +}; + +#ifdef __KERNEL__ + +struct mipid_platform_data { +int nreset_gpio; +int data_lines; +void (*shutdown)(struct mipid_platform_data *pdata); +}; + +#endif + +#endif
include/asm-arm/arch-omap/led.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* linux/include/asm-arm/arch-omap/led.h +* +* Copyright (C) 2006 Samsung Electronics +* Kyungmin Park <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#ifndef ASMARM_ARCH_LED_H +#define ASMARM_ARCH_LED_H + +struct omap_led_config { +struct led_classdev cdev; +s16 gpio; +}; + +struct omap_led_platform_data { +s16 nr_leds; +struct omap_led_config *leds; +}; + +#endif
include/asm-arm/arch-omap/mcspi.h +0 -1
@@ -2,7 +2,6 @@#define _OMAP2_MCSPI_Hstruct omap2_mcspi_platform_config { -unsigned long base;unsigned short num_cs; };
include/asm-arm/arch-omap/memory.h +13 -0
@@ -86,5 +86,18 @@#endif /* CONFIG_ARCH_OMAP15XX */ +/* Override the ARM default */ +#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + +#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE ==0 ) +#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE +#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2 +#endif + +#define CONSISTENT_DMA_SIZE \ + (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024) + +#endif +#endif
include/asm-arm/arch-omap/menelaus.h +13 -4
@@ -7,10 +7,19 @@#ifndef __ASM_ARCH_MENELAUS_H#define __ASM_ARCH_MENELAUS_H -extern void menelaus_mmc_register (void (*callback)(unsigned long data,u8 card_mask), -unsigned long data); -extern void menelaus_mmc_remove (void ); -extern void menelaus_mmc_opendrain (int enable); +extern int menelaus_register_mmc_callback (void (*callback)(void *data,u8 card_mask), +void *data); +extern void menelaus_unregister_mmc_callback (void ); +extern int menelaus_set_mmc_opendrain (int slot,int enable); +extern int menelaus_set_mmc_slot (int slot,int enable,int power,int cd_on); + +extern int menelaus_set_vmem (unsigned int mV); +extern int menelaus_set_vio (unsigned int mV); +extern int menelaus_set_vmmc (unsigned int mV); +extern int menelaus_set_vaux (unsigned int mV); +extern int menelaus_set_vdcdc (int dcdc,unsigned int mV); +extern int menelaus_set_slot_sel (int enable); +extern int menelaus_get_slot_pin_states (void );#if defined(CONFIG_ARCH_OMAP24XX ) && defined(CONFIG_MENELAUS )#define omap_has_menelaus () 1
include/asm-arm/arch-omap/omap16xx.h +3 -9
@@ -159,15 +159,6 @@#define UART3_MVR (OMAP_UART3_BASE + 0x50)/* -* ---------------------------------------------------------------------------- -* Pulse-Width Light -* ---------------------------------------------------------------------------- -*/ -#define OMAP16XX_PWL_BASE (0xfffb5800) -#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00) -#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04) - -/* * --------------------------------------------------------------------------- * Watchdog timer * ---------------------------------------------------------------------------
@@ -199,5 +190,8 @@#define WSPR_DISABLE_0 (0x0000aaaa)#define WSPR_DISABLE_1 (0x00005555) +/* Mailbox */ +#define OMAP16XX_MAILBOX_BASE (0xfffcf000) +#endif /* __ASM_ARCH_OMAP16XX_H */
include/asm-arm/arch-omap/omap24xx.h +9 -0
@@ -20,5 +20,14 @@#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000) +/* DSP SS */ +#define OMAP24XX_DSP_BASE 0x58000000 +#define OMAP24XX_DSP_MEM_BASE (OMAP24XX_DSP_BASE + 0x0) +#define OMAP24XX_DSP_IPI_BASE (OMAP24XX_DSP_BASE + 0x1000000) +#define OMAP24XX_DSP_MMU_BASE (OMAP24XX_DSP_BASE + 0x2000000) + +/* Mailbox */ +#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000) +#endif /* __ASM_ARCH_OMAP24XX_H */
include/asm-arm/arch-omap/omapfb.h +79 -52
252 lines not on this page · raw message
include/asm-arm/arch-omap/sram.h +2 -2
@@ -20,8 +20,8 @@ extern void omap2_sram_reprogram_sdrc(u3 u32 mem_type);extern u32 omap2_set_prcm (u32 dpll_ctrl_val,u32 sdrc_rfr_val,int bypass); -extern unsigned long omap_fb_sram_start; -extern unsigned long omap_fb_sram_size; +extern int omap_fb_sram_plane; +extern int omap_fb_sram_valid;/* Do not use these */ extern void sram_reprogram_clock (u32 ckctl,u32 dpllctl);
include/asm-arm/arch-omap/usb.h +35 -5
@@ -7,9 +7,27 @@/*-------------------------------------------------------------------------*/ -#define OTG_BASE 0xfffb0400 -#define UDC_BASE 0xfffb4000 -#define OMAP_OHCI_BASE 0xfffba000 +#define OMAP1_OTG_BASE 0xfffb0400 +#define OMAP1_UDC_BASE 0xfffb4000 +#define OMAP1_OHCI_BASE 0xfffba000 + +#define OMAP2_OHCI_BASE 0x4805e000 +#define OMAP2_UDC_BASE 0x4805e200 +#define OMAP2_OTG_BASE 0x4805e300 + +#ifdef CONFIG_ARCH_OMAP1 + +#define OTG_BASE OMAP1_OTG_BASE +#define UDC_BASE OMAP1_UDC_BASE +#define OMAP_OHCI_BASE OMAP1_OHCI_BASE + +#else + +#define OTG_BASE OMAP2_OTG_BASE +#define UDC_BASE OMAP2_UDC_BASE +#define OMAP_OHCI_BASE OMAP2_OHCI_BASE + +#endif /*-------------------------------------------------------------------------*/
@@ -28,6 +46,7 @@# define HST_IDLE_EN (1 << 14)# define DEV_IDLE_EN (1 << 13)# define OTG_RESET_DONE (1 << 2) +# define OTG_SOFT_RESET (1 << 1)#define OTG_SYSCON_2_REG OTG_REG32(0x08)# define OTG_EN (1 << 31)# define USBX_SYNCHRO (1 << 30)
@@ -103,6 +122,7 @@/*-------------------------------------------------------------------------*/ +/* OMAP1 */ #define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064)# define CONF_USB2_UNI_R (1 << 8)# define CONF_USB1_UNI_R (1 << 7)
@@ -111,7 +131,17 @@# define CONF_USB_PWRDN_DM_R (1 << 2)# define CONF_USB_PWRDN_DP_R (1 << 1) - - +/* OMAP2 */ +#define CONTROL_DEVCONF_REG __REG32(L4_24XX_BASE + 0x0274) +# define USB_UNIDIR 0x0 +# define USB_UNIDIR_TLL 0x1 +# define USB_BIDIR 0x2 +# define USB_BIDIR_TLL 0x3 +# define USBT0WRMODEI (x) ((x) << 22) +# define USBT1WRMODEI (x) ((x) << 20) +# define USBT2WRMODEI (x) ((x) << 18) +# define USBT2TLL5PI (1 << 17) +# define USB0PUENACTLOI (1 << 16) +# define USBSTANDBYCTRL (1 << 15)#endif /* __ASM_ARCH_OMAP_USB_H */
Tony Lindgren
maintainerPATCH 6/18 ARM: OMAP: Sync core code with linux-omap
This patch syncs omap specific core code with linux-omap. Most of the changes are needed to fix bitrot caused by driver updates in linux-omap tree.
--- arch/arm/mach-omap1/Kconfig | 17 ++-- arch/arm/mach-omap1/Makefile | 5 +- arch/arm/mach-omap1/devices.c | 71 +++++++++------ arch/arm/mach-omap2/Kconfig | 27 +++++- arch/arm/mach-omap2/Makefile | 7 ++ arch/arm/mach-omap2/devices.c | 60 +++++++++++- arch/arm/mach-omap2/gpmc.c | 12 ++- arch/arm/mach-omap2/io.c | 24 +++++- arch/arm/plat-omap/Kconfig | 8 ++ arch/arm/plat-omap/Makefile | 12 +++- arch/arm/plat-omap/common.c | 8 ++- arch/arm/plat-omap/devices.c | 70 ++++++++++++++- arch/arm/plat-omap/dmtimer.c | 2 +- arch/arm/plat-omap/fb.c | 72 ++++++++++++---- arch/arm/plat-omap/sram.c | 77 ++++++++++------- arch/arm/plat-omap/usb.c | 199 ++++++++++++++++++++++++++++++++-------- 16 files changed, 525 insertions(+), 146 deletions(-)
arch/arm/mach-omap1/Kconfig +3 -0
@@ -22,6 +22,7 @@ comment "OMAP Board Type" config MACH_OMAP_INNOVATOR bool "TI Innovator" depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX) + select OMAP_MCBSP help TI OMAP 1510 or 1610 Innovator board support. Say Y here if you have such a board.
@@ -29,6 +30,7 @@ config MACH_OMAP_INNOVATOR config MACH_OMAP_H2 bool "TI H2 Support" depends on ARCH_OMAP1 && ARCH_OMAP16XX + select OMAP_MCBSP help TI OMAP 1610/1611B H2 board support. Say Y here if you have such a board.
@@ -36,6 +38,7 @@ config MACH_OMAP_H2 config MACH_OMAP_H3 bool "TI H3 Support" depends on ARCH_OMAP1 && ARCH_OMAP16XX + select GPIOEXPANDER_OMAP help TI OMAP 1710 H3 board support. Say Y here if you have such a board.
arch/arm/mach-omap1/Makefile +0 -1
@@ -37,4 +37,3 @@ led-$(CONFIG_MACH_OMAP_INNOVATOR) += led led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o obj-$(CONFIG_LEDS) += $(led-y) -
arch/arm/mach-omap1/devices.c +41 -30
89 lines not on this page · raw message
arch/arm/mach-omap2/Kconfig +1 -0
@@ -9,6 +9,7 @@ config ARCH_OMAP2420 bool "OMAP2420 support" depends on ARCH_OMAP24XX select OMAP_DM_TIMER + select ARCH_OMAP_OTG comment "OMAP Board Type" depends on ARCH_OMAP2
arch/arm/mach-omap2/devices.c +55 -5
100 lines not on this page · raw message
arch/arm/mach-omap2/gpmc.c +10 -2
@@ -246,14 +246,22 @@ static int gpmc_cs_mem_enabled(int cs)return l & (1 <<6 ); } -static void gpmc_cs_set_reserved (int cs,int reserved) +int gpmc_cs_set_reserved (int cs,int reserved) { +if (cs >GPMC_CS_NUM ) +return -ENODEV ; + gpmc_cs_map &= ~(1 << cs); gpmc_cs_map |= (reserved ?1 :0 ) << cs; + +return 0 ; } -static int gpmc_cs_reserved (int cs) +int gpmc_cs_reserved (int cs) { +if (cs >GPMC_CS_NUM ) +return -ENODEV ; +return gpmc_cs_map & (1 << cs); }
arch/arm/mach-omap2/io.c +15 -3
@@ -40,9 +40,21 @@ static struct map_desc omap2_io_desc[] _ .type = MT_DEVICE }, { - .virtual = L4_24XX_VIRT, - .pfn = __phys_to_pfn(L4_24XX_PHYS), - .length = L4_24XX_SIZE, + .virtual = DSP_MEM_24XX_VIRT, + .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS), + .length = DSP_MEM_24XX_SIZE, + .type =MT_DEVICE + }, + { + .virtual = DSP_IPI_24XX_VIRT, + .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS), + .length = DSP_IPI_24XX_SIZE, + .type =MT_DEVICE + }, + { + .virtual = DSP_MMU_24XX_VIRT, + .pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS), + .length = DSP_MMU_24XX_SIZE, .type = MT_DEVICE } };
arch/arm/plat-omap/Kconfig +8 -0
@@ -62,6 +62,14 @@ 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_MCBSP + bool "McBSP support" + depends on ARCH_OMAP + default y + help + Say Y here if you want support for the OMAP Multichannel + Buffered Serial Port. + choice prompt "System timer" default OMAP_MPU_TIMER
arch/arm/plat-omap/Makefile +2 -1
@@ -3,7 +3,8 @@ # # Common support -obj-y := common.o sram.o sram-fn.o clock.o devices.o dma.o mux.o gpio.o mcbsp.o usb.o fb.o +obj-y := common.o sram.o sram-fn.o clock.o devices.o dma.o mux.o gpio.o \ + usb.o fb.o obj-m := obj-n := obj- :=
arch/arm/plat-omap/common.c +6 -2
@@ -93,8 +93,12 @@ static const void *get_config(u16 tag, s* in the kernel. */ for (i =0 ; i < omap_board_config_size; i++) {if (omap_board_config[i].tag == tag) { - kinfo = &omap_board_config[i]; -break ; +if (skip ==0 ) { + kinfo = &omap_board_config[i]; +break ; + }else { + skip--; + } } }if (kinfo ==NULL )
arch/arm/plat-omap/devices.c +67 -3
91 lines not on this page · raw message
arch/arm/plat-omap/dmtimer.c +1 -1
@@ -372,7 +372,7 @@ void omap_dm_timer_set_source(struct oma/* When the functional clock disappears, too quick writes seem to * cause an abort. */ - __delay(15000); + __delay(150000); }#endif
arch/arm/plat-omap/fb.c +55 -15
83 lines not on this page · raw message
arch/arm/plat-omap/sram.c +45 -30
122 lines not on this page · raw message
arch/arm/plat-omap/usb.c +161 -42
360 lines not on this page · raw message
Tony Lindgren
maintainerPATCH 7/18 ARM: OMAP: Avoid updating system time for sub-jiffy interrupts
Updating system time and reprogramming timer can cause latency issues on busy systems with lots of interrupts with constant updating of time and reprogramming the system timer.
If a non-timer dyntick interrupt happens within a jiffy from the last interrupt, updating time and reprogramming the timer is unnecessary as we will get a timer interrupt soon anyways.
--- arch/arm/plat-omap/timer32k.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/plat-omap/timer32k.c +11 -0
@@ -219,6 +219,17 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id)static irqreturn_t omap_32k_timer_handler (int irq,void *dev_id) { +unsigned long now; + + now =omap_32k_sync_timer_read (); + +/* Don't bother reprogramming timer if last tick was before next +* jiffie. We will get another interrupt when previously programmed +* timer expires. This cuts down interrupt load quite a bit. +*/ +if (now - omap_32k_last_tick <OMAP_32K_TICKS_PER_HZ ) +return IRQ_HANDLED ; +return _omap_32k_timer_interrupt (irq, dev_id); }
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 8/18 ARM: OMAP: Add mailbox support for IVA
From: Hiroshi DOYU <[email protected]>
This patch adds a generic mailbox interface for for DSP and IVA (Image Video Accelerator). This patch itself doesn't contain any IVA driver.
--- arch/arm/mach-omap1/mailbox.c | 206 ++++++++++++++++++++ arch/arm/mach-omap2/mailbox.c | 310 ++++++++++++++++++++++++++++++ arch/arm/plat-omap/mailbox.c | 352 +++++++++++++++++++++++++++++++++++ arch/arm/plat-omap/mailbox.h | 193 +++++++++++++++++++ include/asm-arm/arch-omap/mailbox.h | 68 +++++++ 5 files changed, 1129 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/mailbox.c new file +206 -0
@@ -0,0 +1,206 @@ +/* +* Mailbox reservation modules for DSP +* +* Copyright (C) 2006 Nokia Corporation +* Written by: Hiroshi DOYU <[email protected]> +* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +*/ + +#include <linux/kernel.h> +#include <linux/resource.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <asm/arch/mailbox.h> +#include <asm/arch/irqs.h> +#include <asm/io.h> + +#define MAILBOX_ARM2DSP1 0x00 +#define MAILBOX_ARM2DSP1b 0x04 +#define MAILBOX_DSP2ARM1 0x08 +#define MAILBOX_DSP2ARM1b 0x0c +#define MAILBOX_DSP2ARM2 0x10 +#define MAILBOX_DSP2ARM2b 0x14 +#define MAILBOX_ARM2DSP1_Flag 0x18 +#define MAILBOX_DSP2ARM1_Flag 0x1c +#define MAILBOX_DSP2ARM2_Flag 0x20 + +unsigned long mbox_base; + +struct omap_mbox1_fifo { +unsigned long cmd; +unsigned long data; +unsigned long flag; +}; + +struct omap_mbox1_priv { +struct omap_mbox1_fifo tx_fifo; +struct omap_mbox1_fifo rx_fifo; +}; + +static inline int mbox_read_reg (unsigned int reg) +{ +return __raw_readw (mbox_base + reg); +} + +static inline void mbox_write_reg (unsigned int val,unsigned int reg) +{ +__raw_writew (val, mbox_base + reg); +} + +/* msg */ +static inline mbox_msg_t omap1_mbox_fifo_read (struct omap_mbox *mbox) +{ +struct omap_mbox1_fifo *fifo = + &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo; +mbox_msg_t msg; + + msg =mbox_read_reg (fifo->data); + msg |= ((mbox_msg_t )mbox_read_reg (fifo->cmd)) <<16 ; + +return msg; +} + +static inline void +omap1_mbox_fifo_write (struct omap_mbox *mbox,mbox_msg_t msg) +{ +struct omap_mbox1_fifo *fifo = + &((struct omap_mbox1_priv *)mbox->priv)->tx_fifo; + +mbox_write_reg (msg &0xffff , fifo->data); +mbox_write_reg (msg >>16 , fifo->cmd); +} + +static inline int omap1_mbox_fifo_empty (struct omap_mbox *mbox) +{ +return 0 ; +} + +static inline int omap1_mbox_fifo_full (struct omap_mbox *mbox) +{ +struct omap_mbox1_fifo *fifo = + &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo; + +return (mbox_read_reg (fifo->flag)); +} + +/* irq */ +static inline void +omap1_mbox_enable_irq (struct omap_mbox *mbox,omap_mbox_type_t irq) +{ +if (irq ==IRQ_RX ) +enable_irq (mbox->irq); +} + +static inline void +omap1_mbox_disable_irq (struct omap_mbox *mbox,omap_mbox_type_t irq) +{ +if (irq ==IRQ_RX ) +disable_irq (mbox->irq); +} + +static inline int +omap1_mbox_is_irq (struct omap_mbox *mbox,omap_mbox_type_t irq) +{ +if (irq ==IRQ_TX ) +return 0 ; +return 1 ; +} + +struct omap_mbox_ops omap1_mbox_ops = { + .type =OMAP_MBOX_TYPE1 , + .fifo_read = omap1_mbox_fifo_read, + .fifo_write = omap1_mbox_fifo_write, + .fifo_empty = omap1_mbox_fifo_empty, + .fifo_full = omap1_mbox_fifo_full, + .enable_irq = omap1_mbox_enable_irq, + .disable_irq = omap1_mbox_disable_irq, + .is_irq = omap1_mbox_is_irq, +}; + +/* FIXME: the following struct should be created automatically by the user id */ + +/* DSP */ +static struct omap_mbox1_priv omap1_mbox_dsp_priv = { + .tx_fifo = { + .cmd = MAILBOX_ARM2DSP1b, + .data =MAILBOX_ARM2DSP1 , + .flag = MAILBOX_ARM2DSP1_Flag, + }, + .rx_fifo = { + .cmd = MAILBOX_DSP2ARM1b, + .data =MAILBOX_DSP2ARM1 , + .flag = MAILBOX_DSP2ARM1_Flag, + }, +}; + +struct omap_mbox mbox_dsp_info = { + .name ="dsp" , + .ops = &omap1_mbox_ops, + .priv = &omap1_mbox_dsp_priv, +}; +EXPORT_SYMBOL (mbox_dsp_info); + +static int __init omap1_mbox_probe (struct platform_device *pdev) +{ +struct resource *res; +int ret =0 ; + +if (pdev->num_resources !=2 ) { +dev_err (&pdev->dev,"invalid number of resources: %d\n" , + pdev->num_resources); +return -ENODEV ; + } + +/* MBOX base */ + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (unlikely (!res)) { +dev_err (&pdev->dev,"invalid mem resource\n" ); +return -ENODEV ; + } + mbox_base = res->start; + +/* DSP IRQ */ + res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); +if (unlikely (!res)) { +dev_err (&pdev->dev,"invalid irq resource\n" ); +return -ENODEV ; + } + mbox_dsp_info.irq = res->start; + + ret =omap_mbox_register (&mbox_dsp_info); + +return ret; +} + +static int omap1_mbox_remove (struct platform_device *pdev) +{ +omap_mbox_unregister (&mbox_dsp_info); + +return 0 ; +} + +static struct platform_driver omap1_mbox_driver = { + .probe = omap1_mbox_probe, + .remove = omap1_mbox_remove, + .driver = { + .name ="mailbox" , + }, +}; + +static int __init omap1_mbox_init (void ) +{ +return platform_driver_register (&omap1_mbox_driver); +} + +static void __exit omap1_mbox_exit(void) +{ +platform_driver_unregister (&omap1_mbox_driver); +} + +module_init (omap1_mbox_init); +module_exit (omap1_mbox_exit); + +MODULE_LICENSE ("GPL" );
arch/arm/mach-omap2/mailbox.c new file +310 -0
310 lines not on this page · raw message
arch/arm/plat-omap/mailbox.c new file +352 -0
352 lines not on this page · raw message
arch/arm/plat-omap/mailbox.h new file +193 -0
193 lines not on this page · raw message
include/asm-arm/arch-omap/mailbox.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 9/18 ARM: OMAP: Fix gpmc header
Fix gpmc header
--- include/asm-arm/arch-omap/gpmc.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-arm/arch-omap/gpmc.h +1 -1
@@ -87,7 +87,7 @@ extern int gpmc_cs_calc_divider(int cs,extern int gpmc_cs_set_timings (int cs,const struct gpmc_timings *t);extern int gpmc_cs_request (int cs,unsigned long size,unsigned long *base);extern void gpmc_cs_free (int cs); -extern void gpmc_cs_set_reserved (int cs,int reserved); +extern int gpmc_cs_set_reserved (int cs,int reserved);extern int gpmc_cs_reserved (int cs);#endif
Tony Lindgren
maintainerPATCH 10/18 ARM: OMAP: Fix warning in timer32k.c
From: Dirk Behme <[email protected]>
ARM: OMAP: Fix warning in timer32k.c if CONFIG_NO_IDLE_HZ isn't set:
arch/arm/plat-omap/timer32k.c:221: warning:
'omap_32k_timer_handler' defined but not used
--- arch/arm/plat-omap/timer32k.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/plat-omap/timer32k.c +12 -12
@@ -217,6 +217,18 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id)return IRQ_HANDLED ; } +static irqreturn_t omap_32k_timer_interrupt (int irq,void *dev_id) +{ +unsigned long flags; + +write_seqlock_irqsave (&xtime_lock, flags); +_omap_32k_timer_interrupt (irq, dev_id); +write_sequnlock_irqrestore (&xtime_lock, flags); + +return IRQ_HANDLED ; +} + +#ifdef CONFIG_NO_IDLE_HZ static irqreturn_t omap_32k_timer_handler (int irq,void *dev_id) {unsigned long now;
@@ -233,18 +245,6 @@ static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id)return _omap_32k_timer_interrupt (irq, dev_id); } -static irqreturn_t omap_32k_timer_interrupt (int irq,void *dev_id) -{ -unsigned long flags; - -write_seqlock_irqsave (&xtime_lock, flags); -_omap_32k_timer_interrupt (irq, dev_id); -write_sequnlock_irqrestore (&xtime_lock, flags); - -return IRQ_HANDLED ; -} - -#ifdef CONFIG_NO_IDLE_HZ /* * Programs the next timer interrupt needed. Called when dynamic tick is * enabled, and to reprogram the ticks to skip from pm_idle. Note that
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 11/18 ARM: OMAP: Update timer32k.c to compile
This patch updates 32KiHZ timer code to compile.
--- arch/arm/plat-omap/timer32k.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-)
arch/arm/plat-omap/timer32k.c +1 -11
@@ -42,6 +42,7 @@#include <linux/spinlock.h> #include <linux/err.h> #include <linux/clk.h> +#include <linux/clocksource.h> #include <asm/system.h> #include <asm/hardware.h>
@@ -171,15 +172,6 @@ omap_32k_ticks_to_nsecs(unsigned long ticks_32k)static unsigned long omap_32k_last_tick =0 ;/* -* Returns elapsed usecs since last 32k timer interrupt -*/ -static unsigned long omap_32k_timer_gettimeoffset (void ) -{ -unsigned long now =omap_32k_sync_timer_read (); -return omap_32k_ticks_to_usecs (now - omap_32k_last_tick); -} - -/* * Returns current time from boot in nsecs. It's OK for this to wrap * around for now, as it's just a relative time stamp. */
@@ -302,7 +294,6 @@ static __init void omap_init_32k_timer(void)if (cpu_class_is_omap1 ())setup_irq (INT_OS_TIMER , &omap_32k_timer_irq); - omap_timer.offset = omap_32k_timer_gettimeoffset; omap_32k_last_tick =omap_32k_sync_timer_read ();#ifdef CONFIG_ARCH_OMAP2
@@ -337,5 +328,4 @@ static void __init omap_timer_init(void)struct sys_timer omap_timer = { .init = omap_timer_init, - .offset =NULL ,/* Initialized later */ };
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 12/18 ARM: OMAP: Mostly cosmetic to sync up with linux-omap tree
From: Tony Lindgren <tmlind@baageli.(none)>
Mostly cosmetic to sync up with linux-omap tree
--- arch/arm/mach-omap1/Kconfig | 2 +- arch/arm/mach-omap2/devices.c | 6 +++--- arch/arm/plat-omap/devices.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/mach-omap1/Kconfig +1 -1
@@ -46,7 +46,7 @@ config MACH_OMAP_H3 config MACH_OMAP_OSK bool "TI OSK Support" depends on ARCH_OMAP1 && ARCH_OMAP16XX - select TPS65010 + select OMAP_MCBSP help TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here if you have such a board.
arch/arm/mach-omap2/devices.c +3 -3
@@ -24,7 +24,7 @@#include <asm/arch/mux.h> #include <asm/arch/gpio.h> -#if defined(CONFIG_I2C_OMAP ) || defined(CONFIG_I2C_OMAP_MODULE ) +#if defined(CONFIG_I2C_OMAP ) || defined(CONFIG_I2C_OMAP_MODULE )#define OMAP2_I2C_BASE2 0x48072000#define OMAP2_I2C_INT2 57
@@ -42,8 +42,8 @@ static struct resource i2c_resources2[] = { };static struct platform_device omap_i2c_device2 = { - .name ="i2c_omap" , - .id =2 , + .name ="i2c_omap" , + .id =2 , .num_resources =ARRAY_SIZE (i2c_resources2), .resource = i2c_resources2, };
arch/arm/plat-omap/devices.c +2 -2
@@ -112,8 +112,8 @@ static struct resource i2c_resources1[] = {/* DMA not used; works around erratum writing to non-empty i2c fifo */ static struct platform_device omap_i2c_device1 = { - .name ="i2c_omap" , - .id =1 , + .name ="i2c_omap" , + .id =1 , .num_resources =ARRAY_SIZE (i2c_resources1), .resource = i2c_resources1, };
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 13/18 ARM: OMAP: Sync framebuffer headers with N800 tree
From: Kai Svahn <[email protected]>
This patch syncs framebuffer headers with N800 tree.
--- include/asm-arm/arch-omap/hwa742.h | 12 +++++++ include/asm-arm/arch-omap/omapfb.h | 61 ++++++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 10 deletions(-)
include/asm-arm/arch-omap/hwa742.h new file +12 -0
@@ -0,0 +1,12 @@ +#ifndef _HWA742_H +#define _HWA742_H + +struct hwa742_platform_data { +void (*power_up)(struct device *dev); +void (*power_down)(struct device *dev); +unsigned long (*get_clock_rate)(struct device *dev); + +unsigned te_connected:1 ; +}; + +#endif
include/asm-arm/arch-omap/omapfb.h +51 -10
158 lines not on this page · raw message
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 14/18 ARM: OMAP: FB sync with N800 tree (support for dynamic SRAM allocations)
From: Imre Deak <[email protected]>
- in addition to fixed FB regions - as passed by the bootloader - allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out from sram.c to fb.c
--- arch/arm/mach-omap1/io.c | 4 +- arch/arm/mach-omap2/io.c | 3 +- arch/arm/plat-omap/fb.c | 271 +++++++++++++++++++++++++++++++++---- arch/arm/plat-omap/sram.c | 60 ++------- include/asm-arm/arch-omap/sram.h | 3 - 5 files changed, 256 insertions(+), 85 deletions(-)
arch/arm/mach-omap1/io.c +2 -2
@@ -17,11 +17,11 @@#include <asm/io.h> #include <asm/arch/mux.h> #include <asm/arch/tc.h> -#include <asm/arch/omapfb.h> extern int omap1_clk_init (void );extern void omap_check_revision (void );extern void omap_sram_init (void ); +extern void omapfb_reserve_sdram (void );/* * The machine specific code may provide the extra mapping besides the
@@ -121,7 +121,7 @@ void __init omap1_map_common_io(void)#endif omap_sram_init (); -omapfb_reserve_mem (); +omapfb_reserve_sdram (); }/*
arch/arm/mach-omap2/io.c +2 -1
@@ -27,6 +27,7 @@ extern void omap_sram_init(void);extern int omap2_clk_init (void );extern void omap2_check_revision (void );extern void gpmc_init (void ); +extern void omapfb_reserve_sdram (void );/* * The machine specific code may provide the extra mapping besides the
@@ -72,7 +73,7 @@ void __init omap2_map_common_io(void)omap2_check_revision ();omap_sram_init (); -omapfb_reserve_mem (); +omapfb_reserve_sdram (); }void __init omap2_init_common_hw (void )
arch/arm/plat-omap/fb.c +247 -30
316 lines not on this page · raw message
arch/arm/plat-omap/sram.c +13 -50
88 lines not on this page · raw message
include/asm-arm/arch-omap/sram.h +0 -3
@@ -20,9 +20,6 @@ extern void omap2_sram_reprogram_sdrc(u3 u32 mem_type);extern u32 omap2_set_prcm (u32 dpll_ctrl_val,u32 sdrc_rfr_val,int bypass); -extern int omap_fb_sram_plane; -extern int omap_fb_sram_valid; -/* Do not use these */ extern void sram_reprogram_clock (u32 ckctl,u32 dpllctl);extern unsigned long sram_reprogram_clock_sz;
Tony Lindgren
maintainerPATCH 15/18 ARM: OMAP: add SoSSI clock (call propagate_rate for childrens)
From: Imre Deak <[email protected]>
Clocks with the follow parent rate mode were not updating their children at propagate rate time.
--- arch/arm/plat-omap/clock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-omap/clock.c +2 -0
@@ -284,6 +284,8 @@ void followparent_recalc(struct clk *clk)return ; clk->rate = clk->parent->rate; +if (unlikely (clk->flags &RATE_PROPAGATES )) +propagate_rate (clk); }/* Propagate rate to children */
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 16/18 ARM: OMAP: partial LED fixes
From: David Brownell <[email protected]>
Partial fix for CONFIG_LEDS breakage ... at least allow platforms using the debug-leds support (H4 for now) to build with the generic LED support, and default the LED that would be the timer LED to trigger using the "heartbeat" (timer driven, rate depends on load).
Right now only H2 and P2 seem to have working LED support; this at least makes H4 less broken.
--- arch/arm/plat-omap/debug-leds.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-)
arch/arm/plat-omap/debug-leds.c +6 -11
@@ -39,12 +39,6 @@ static struct h2p2_dbg_fpga __iomem *fpga;static u16 led_state, hw_led_state; -#ifdef CONFIG_LEDS -#define old_led_api () 1 -#else -#define old_led_api () 0 -#endif -#ifdef CONFIG_LEDS_OMAP_DEBUG #define new_led_api () 1#else
@@ -202,7 +196,8 @@ struct dbg_led { static struct dbg_led dbg_leds[] = {/* REVISIT at least H2 uses different timer & cpu leds... */ #ifndef CONFIG_LEDS_TIMER - { .mask = 1 << 0, .cdev.name = "d4:green", }, /* timer */ + { .mask = 1 << 0, .cdev.name = "d4:green", + .cdev.default_trigger = "heartbeat", }, #endif #ifndef CONFIG_LEDS_CPU { .mask = 1 << 1, .cdev.name = "d5:green", }, /* !idle */
@@ -274,10 +269,10 @@ static int /* __init */ fpga_probe(struct platform_device *pdev) fpga =ioremap (iomem->start,H2P2_DBG_FPGA_SIZE );__raw_writew (~0 , &fpga->leds); -if (old_led_api ()) { - leds_event = h2p2_dbg_leds_event; -leds_event (led_start); - } +#ifdef CONFIG_LEDS + leds_event = h2p2_dbg_leds_event; +leds_event (led_start); +#endif if (new_led_api ()) {newled_init (&pdev->dev);
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 17/18 ARM: OMAP: restore CONFIG_GENERIC_TIME
From: David Brownell <[email protected]>
Somehow this got lost in a merge ...
--- arch/arm/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/Kconfig +1 -0
@@ -363,6 +363,7 @@ config ARCH_LH7A40X config ARCH_OMAP bool "TI OMAP" select GENERIC_GPIO + select GENERIC_TIME help Support for TI's OMAP platform (OMAP1 and OMAP2).
Signature · 1 line
1.4.4.2
Tony Lindgren
maintainerPATCH 18/18 ARM: OMAP: Fix GCC-reported compile time bug
From: David Brownell <[email protected]>
Fix GCC-reported compile time bug which prevents booting when the framebuffer code is disabled.
--- arch/arm/plat-omap/fb.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/plat-omap/fb.c +4 -1
@@ -333,7 +333,10 @@ unsigned long omapfb_reserve_sram(unsignunsigned long sram_vstart, unsigned long sram_size, unsigned long start_avail, - unsigned long size_avail) {} + unsigned long size_avail) +{ + return 0; +}#endif
Tony Lindgren
maintainerRe: [PATCH 8/18] ARM: OMAP: Add mailbox support for IVA
In reply to Tony LindgrenQuoted 5 lines · Tony Lindgren
From: Hiroshi DOYU <[email protected]>
This patch adds a generic mailbox interface for for DSP and IVA (Image Video Accelerator). This patch itself doesn't contain any IVA driver.
Here's an updated version that merges in two later fixes from Hiroshi.
Regards,
Tony
Quoted 1 line
From
7845896508123512184412464ca22505c13a728dMon Sep 17 00:00:00 2001
From: Hiroshi DOYU <[email protected]>
Date: Thu, 7 Dec 2006 15:43:59 -0800
Subject: [PATCH 8/18] ARM: OMAP: Add mailbox support for IVA
This patch adds a generic mailbox interface for for DSP and IVA (Image Video Accelerator). This patch itself doesn't contain any IVA driver.
--- arch/arm/mach-omap1/mailbox.c | 206 ++++++++++++++++++++ arch/arm/mach-omap2/mailbox.c | 310 ++++++++++++++++++++++++++++++ arch/arm/plat-omap/mailbox.c | 352 +++++++++++++++++++++++++++++++++++ arch/arm/plat-omap/mailbox.h | 193 +++++++++++++++++++ include/asm-arm/arch-omap/mailbox.h | 68 +++++++ 5 files changed, 1129 insertions(+), 0 deletions(-)
arch/arm/mach-omap1/mailbox.c new file +206 -0
@@ -0,0 +1,206 @@ +/* +* Mailbox reservation modules for DSP +* +* Copyright (C) 2006 Nokia Corporation +* Written by: Hiroshi DOYU <[email protected]> +* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +*/ + +#include <linux/kernel.h> +#include <linux/resource.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <asm/arch/mailbox.h> +#include <asm/arch/irqs.h> +#include <asm/io.h> + +#define MAILBOX_ARM2DSP1 0x00 +#define MAILBOX_ARM2DSP1b 0x04 +#define MAILBOX_DSP2ARM1 0x08 +#define MAILBOX_DSP2ARM1b 0x0c +#define MAILBOX_DSP2ARM2 0x10 +#define MAILBOX_DSP2ARM2b 0x14 +#define MAILBOX_ARM2DSP1_Flag 0x18 +#define MAILBOX_DSP2ARM1_Flag 0x1c +#define MAILBOX_DSP2ARM2_Flag 0x20 + +unsigned long mbox_base; + +struct omap_mbox1_fifo { +unsigned long cmd; +unsigned long data; +unsigned long flag; +}; + +struct omap_mbox1_priv { +struct omap_mbox1_fifo tx_fifo; +struct omap_mbox1_fifo rx_fifo; +}; + +static inline int mbox_read_reg (unsigned int reg) +{ +return __raw_readw (mbox_base + reg); +} + +static inline void mbox_write_reg (unsigned int val,unsigned int reg) +{ +__raw_writew (val, mbox_base + reg); +} + +/* msg */ +static inline mbox_msg_t omap1_mbox_fifo_read (struct omap_mbox *mbox) +{ +struct omap_mbox1_fifo *fifo = + &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo; +mbox_msg_t msg; + + msg =mbox_read_reg (fifo->data); + msg |= ((mbox_msg_t )mbox_read_reg (fifo->cmd)) <<16 ; + +return msg; +} + +static inline void +omap1_mbox_fifo_write (struct omap_mbox *mbox,mbox_msg_t msg) +{ +struct omap_mbox1_fifo *fifo = + &((struct omap_mbox1_priv *)mbox->priv)->tx_fifo; + +mbox_write_reg (msg &0xffff , fifo->data); +mbox_write_reg (msg >>16 , fifo->cmd); +} + +static inline int omap1_mbox_fifo_empty (struct omap_mbox *mbox) +{ +return 0 ; +} + +static inline int omap1_mbox_fifo_full (struct omap_mbox *mbox) +{ +struct omap_mbox1_fifo *fifo = + &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo; + +return (mbox_read_reg (fifo->flag)); +} + +/* irq */ +static inline void +omap1_mbox_enable_irq (struct omap_mbox *mbox,omap_mbox_type_t irq) +{ +if (irq ==IRQ_RX ) +enable_irq (mbox->irq); +} + +static inline void +omap1_mbox_disable_irq (struct omap_mbox *mbox,omap_mbox_type_t irq) +{ +if (irq ==IRQ_RX ) +disable_irq (mbox->irq); +} + +static inline int +omap1_mbox_is_irq (struct omap_mbox *mbox,omap_mbox_type_t irq) +{ +if (irq ==IRQ_TX ) +return 0 ; +return 1 ; +} + +static struct omap_mbox_ops omap1_mbox_ops = { + .type =OMAP_MBOX_TYPE1 , + .fifo_read = omap1_mbox_fifo_read, + .fifo_write = omap1_mbox_fifo_write, + .fifo_empty = omap1_mbox_fifo_empty, + .fifo_full = omap1_mbox_fifo_full, + .enable_irq = omap1_mbox_enable_irq, + .disable_irq = omap1_mbox_disable_irq, + .is_irq = omap1_mbox_is_irq, +}; + +/* FIXME: the following struct should be created automatically by the user id */ + +/* DSP */ +static struct omap_mbox1_priv omap1_mbox_dsp_priv = { + .tx_fifo = { + .cmd = MAILBOX_ARM2DSP1b, + .data =MAILBOX_ARM2DSP1 , + .flag = MAILBOX_ARM2DSP1_Flag, + }, + .rx_fifo = { + .cmd = MAILBOX_DSP2ARM1b, + .data =MAILBOX_DSP2ARM1 , + .flag = MAILBOX_DSP2ARM1_Flag, + }, +}; + +struct omap_mbox mbox_dsp_info = { + .name ="dsp" , + .ops = &omap1_mbox_ops, + .priv = &omap1_mbox_dsp_priv, +}; +EXPORT_SYMBOL (mbox_dsp_info); + +static int __init omap1_mbox_probe (struct platform_device *pdev) +{ +struct resource *res; +int ret =0 ; + +if (pdev->num_resources !=2 ) { +dev_err (&pdev->dev,"invalid number of resources: %d\n" , + pdev->num_resources); +return -ENODEV ; + } + +/* MBOX base */ + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (unlikely (!res)) { +dev_err (&pdev->dev,"invalid mem resource\n" ); +return -ENODEV ; + } + mbox_base = res->start; + +/* DSP IRQ */ + res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); +if (unlikely (!res)) { +dev_err (&pdev->dev,"invalid irq resource\n" ); +return -ENODEV ; + } + mbox_dsp_info.irq = res->start; + + ret =omap_mbox_register (&mbox_dsp_info); + +return ret; +} + +static int omap1_mbox_remove (struct platform_device *pdev) +{ +omap_mbox_unregister (&mbox_dsp_info); + +return 0 ; +} + +static struct platform_driver omap1_mbox_driver = { + .probe = omap1_mbox_probe, + .remove = omap1_mbox_remove, + .driver = { + .name ="mailbox" , + }, +}; + +static int __init omap1_mbox_init (void ) +{ +return platform_driver_register (&omap1_mbox_driver); +} + +static void __exit omap1_mbox_exit(void) +{ +platform_driver_unregister (&omap1_mbox_driver); +} + +module_init (omap1_mbox_init); +module_exit (omap1_mbox_exit); + +MODULE_LICENSE ("GPL" );
arch/arm/mach-omap2/mailbox.c new file +318 -0
318 lines not on this page · raw message
arch/arm/plat-omap/mailbox.c new file +509 -0
509 lines not on this page · raw message
arch/arm/plat-omap/mailbox.h new file +100 -0
100 lines not on this page · raw message
include/asm-arm/arch-omap/mailbox.h new file +73 -0
73 lines not on this page · raw message