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; |
Kevin Hilman | d0e47fb | 2009-04-14 11:30:11 -0500 | [diff] [blame] | 21 | |
| 22 | /* parameters describe VBUS sourcing for host mode */ |
| 23 | extern void setup_usb(unsigned mA, unsigned potpgt_msec); |
| 24 | |
David Brownell | cece6e5 | 2008-09-07 23:41:57 -0700 | [diff] [blame] | 25 | /* parameters describe VBUS sourcing for host mode */ |
| 26 | extern void setup_usb(unsigned mA, unsigned potpgt_msec); |
| 27 | |
Mark A. Greer | f64691b | 2009-04-15 12:40:11 -0700 | [diff] [blame] | 28 | struct davinci_timer_instance { |
| 29 | void __iomem *base; |
| 30 | u32 bottom_irq; |
| 31 | u32 top_irq; |
| 32 | }; |
| 33 | |
| 34 | struct davinci_timer_info { |
| 35 | struct davinci_timer_instance *timers; |
| 36 | unsigned int clockevent_id; |
| 37 | unsigned int clocksource_id; |
| 38 | }; |
| 39 | |
Mark A. Greer | 79c3c0b | 2009-04-15 12:38:58 -0700 | [diff] [blame] | 40 | /* SoC specific init support */ |
| 41 | struct davinci_soc_info { |
| 42 | struct map_desc *io_desc; |
| 43 | unsigned long io_desc_num; |
Mark A. Greer | b9ab127 | 2009-04-15 12:39:09 -0700 | [diff] [blame] | 44 | u32 cpu_id; |
| 45 | u32 jtag_id; |
| 46 | void __iomem *jtag_id_base; |
| 47 | struct davinci_id *ids; |
| 48 | unsigned long ids_num; |
Mark A. Greer | 66e0c39 | 2009-04-15 12:39:23 -0700 | [diff] [blame] | 49 | struct davinci_clk *cpu_clks; |
Mark A. Greer | d81d188 | 2009-04-15 12:39:33 -0700 | [diff] [blame] | 50 | void __iomem **psc_bases; |
| 51 | unsigned long psc_bases_num; |
Mark A. Greer | 0e58595 | 2009-04-15 12:39:48 -0700 | [diff] [blame] | 52 | void __iomem *pinmux_base; |
| 53 | const struct mux_config *pinmux_pins; |
| 54 | unsigned long pinmux_pins_num; |
Mark A. Greer | 673dd36 | 2009-04-15 12:40:00 -0700 | [diff] [blame] | 55 | void __iomem *intc_base; |
| 56 | int intc_type; |
| 57 | u8 *intc_irq_prios; |
| 58 | unsigned long intc_irq_num; |
Mark A. Greer | f64691b | 2009-04-15 12:40:11 -0700 | [diff] [blame] | 59 | struct davinci_timer_info *timer_info; |
Mark A. Greer | 951d6f6 | 2009-04-15 12:40:21 -0700 | [diff] [blame] | 60 | void __iomem *wdt_base; |
Mark A. Greer | a994955 | 2009-04-15 12:40:35 -0700 | [diff] [blame^] | 61 | void __iomem *gpio_base; |
| 62 | unsigned gpio_num; |
| 63 | unsigned gpio_irq; |
Mark A. Greer | 79c3c0b | 2009-04-15 12:38:58 -0700 | [diff] [blame] | 64 | }; |
| 65 | |
| 66 | extern struct davinci_soc_info davinci_soc_info; |
| 67 | |
| 68 | extern void davinci_common_init(struct davinci_soc_info *soc_info); |
Mark A. Greer | 79c3c0b | 2009-04-15 12:38:58 -0700 | [diff] [blame] | 69 | |
Kevin Hilman | 7c6337e | 2007-04-30 19:37:19 +0100 | [diff] [blame] | 70 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |