Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Header for code common to all DaVinci machines. |
| 3 | * |
| 4 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> |
| 5 | * |
| 6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under |
| 7 | * the terms of the GNU General Public License version 2. This program |
| 8 | * is licensed "as is" without any warranty of any kind, whether express |
| 9 | * or implied. |
| 10 | */ |
| 11 | |
| 12 | #ifndef __ARCH_ARM_MACH_DAVINCI_COMMON_H |
| 13 | #define __ARCH_ARM_MACH_DAVINCI_COMMON_H |
| 14 | |
| 15 | struct sys_timer; |
| 16 | |
| 17 | extern struct sys_timer davinci_timer; |
| 18 | |
Kevin Hilman | d0e47fb | 2009-04-14 11:30:11 -0500 | [diff] [blame] | 19 | extern void davinci_irq_init(void); |
Mark A. Greer | 673dd36 | 2009-04-15 12:40:00 -0700 | [diff] [blame] | 20 | extern void __iomem *davinci_intc_base; |
Mark A. Greer | 0b0c4c2 | 2009-04-15 12:41:40 -0700 | [diff] [blame] | 21 | extern int davinci_intc_type; |
Kevin Hilman | d0e47fb | 2009-04-14 11:30:11 -0500 | [diff] [blame] | 22 | |
Mark A. Greer | f64691b | 2009-04-15 12:40:11 -0700 | [diff] [blame] | 23 | struct davinci_timer_instance { |
| 24 | void __iomem *base; |
| 25 | u32 bottom_irq; |
| 26 | u32 top_irq; |
Mark A. Greer | 3abd5ac | 2009-04-15 12:41:54 -0700 | [diff] [blame] | 27 | unsigned long cmp_off; |
| 28 | unsigned int cmp_irq; |
Mark A. Greer | f64691b | 2009-04-15 12:40:11 -0700 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | struct davinci_timer_info { |
| 32 | struct davinci_timer_instance *timers; |
| 33 | unsigned int clockevent_id; |
| 34 | unsigned int clocksource_id; |
| 35 | }; |
| 36 | |
Mark A. Greer | 79c3c0b | 2009-04-15 12:38:58 -0700 | [diff] [blame] | 37 | /* SoC specific init support */ |
| 38 | struct davinci_soc_info { |
| 39 | struct map_desc *io_desc; |
| 40 | unsigned long io_desc_num; |
Mark A. Greer | b9ab127 | 2009-04-15 12:39:09 -0700 | [diff] [blame] | 41 | u32 cpu_id; |
| 42 | u32 jtag_id; |
| 43 | void __iomem *jtag_id_base; |
| 44 | struct davinci_id *ids; |
| 45 | unsigned long ids_num; |
Kevin Hilman | 08aca08 | 2010-01-11 08:22:23 -0800 | [diff] [blame^] | 46 | struct clk_lookup *cpu_clks; |
Mark A. Greer | d81d188 | 2009-04-15 12:39:33 -0700 | [diff] [blame] | 47 | void __iomem **psc_bases; |
| 48 | unsigned long psc_bases_num; |
Mark A. Greer | 0e58595 | 2009-04-15 12:39:48 -0700 | [diff] [blame] | 49 | void __iomem *pinmux_base; |
| 50 | const struct mux_config *pinmux_pins; |
| 51 | unsigned long pinmux_pins_num; |
Mark A. Greer | 673dd36 | 2009-04-15 12:40:00 -0700 | [diff] [blame] | 52 | void __iomem *intc_base; |
| 53 | int intc_type; |
| 54 | u8 *intc_irq_prios; |
| 55 | unsigned long intc_irq_num; |
Mark A. Greer | f64691b | 2009-04-15 12:40:11 -0700 | [diff] [blame] | 56 | struct davinci_timer_info *timer_info; |
Mark A. Greer | a994955 | 2009-04-15 12:40:35 -0700 | [diff] [blame] | 57 | void __iomem *gpio_base; |
| 58 | unsigned gpio_num; |
| 59 | unsigned gpio_irq; |
David Brownell | 7a36071 | 2009-06-25 17:01:31 -0700 | [diff] [blame] | 60 | unsigned gpio_unbanked; |
Mark A. Greer | 65e866a | 2009-03-18 12:36:08 -0500 | [diff] [blame] | 61 | struct platform_device *serial_dev; |
Mark A. Greer | 972412b | 2009-04-15 12:40:56 -0700 | [diff] [blame] | 62 | struct emac_platform_data *emac_pdata; |
David Brownell | 0d04eb4 | 2009-04-30 17:35:48 -0700 | [diff] [blame] | 63 | dma_addr_t sram_dma; |
| 64 | unsigned sram_len; |
Mark A. Greer | 79c3c0b | 2009-04-15 12:38:58 -0700 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | extern struct davinci_soc_info davinci_soc_info; |
| 68 | |
| 69 | extern void davinci_common_init(struct davinci_soc_info *soc_info); |
Mark A. Greer | 79c3c0b | 2009-04-15 12:38:58 -0700 | [diff] [blame] | 70 | |
David Brownell | 0d04eb4 | 2009-04-30 17:35:48 -0700 | [diff] [blame] | 71 | /* standard place to map on-chip SRAMs; they *may* support DMA */ |
| 72 | #define SRAM_VIRT 0xfffe0000 |
| 73 | #define SRAM_SIZE SZ_128K |
| 74 | |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 75 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |