diff options
Diffstat (limited to 'arch/arm/mach-davinci/include')
19 files changed, 161 insertions, 114 deletions
diff --git a/arch/arm/mach-davinci/include/mach/aemif.h b/arch/arm/mach-davinci/include/mach/aemif.h new file mode 100644 index 000000000000..05b293443097 --- /dev/null +++ b/arch/arm/mach-davinci/include/mach/aemif.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * TI DaVinci AEMIF support | ||
3 | * | ||
4 | * Copyright 2010 (C) Texas Instruments, Inc. http://www.ti.com/ | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | #ifndef _MACH_DAVINCI_AEMIF_H | ||
11 | #define _MACH_DAVINCI_AEMIF_H | ||
12 | |||
13 | #define NRCSR_OFFSET 0x00 | ||
14 | #define AWCCR_OFFSET 0x04 | ||
15 | #define A1CR_OFFSET 0x10 | ||
16 | |||
17 | #define ACR_ASIZE_MASK 0x3 | ||
18 | #define ACR_EW_MASK BIT(30) | ||
19 | #define ACR_SS_MASK BIT(31) | ||
20 | |||
21 | /* All timings in nanoseconds */ | ||
22 | struct davinci_aemif_timing { | ||
23 | u8 wsetup; | ||
24 | u8 wstrobe; | ||
25 | u8 whold; | ||
26 | |||
27 | u8 rsetup; | ||
28 | u8 rstrobe; | ||
29 | u8 rhold; | ||
30 | |||
31 | u8 ta; | ||
32 | }; | ||
33 | |||
34 | int davinci_aemif_setup_timing(struct davinci_aemif_timing *t, | ||
35 | void __iomem *base, unsigned cs); | ||
36 | #endif | ||
diff --git a/arch/arm/mach-davinci/include/mach/clkdev.h b/arch/arm/mach-davinci/include/mach/clkdev.h index 730c49d1ebd8..14a504887189 100644 --- a/arch/arm/mach-davinci/include/mach/clkdev.h +++ b/arch/arm/mach-davinci/include/mach/clkdev.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __MACH_CLKDEV_H | 1 | #ifndef __MACH_CLKDEV_H |
2 | #define __MACH_CLKDEV_H | 2 | #define __MACH_CLKDEV_H |
3 | 3 | ||
4 | struct clk; | ||
5 | |||
4 | static inline int __clk_get(struct clk *clk) | 6 | static inline int __clk_get(struct clk *clk) |
5 | { | 7 | { |
6 | return 1; | 8 | return 1; |
diff --git a/arch/arm/mach-davinci/include/mach/cputype.h b/arch/arm/mach-davinci/include/mach/cputype.h index cea6b8972043..957fb87e832e 100644 --- a/arch/arm/mach-davinci/include/mach/cputype.h +++ b/arch/arm/mach-davinci/include/mach/cputype.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | 4 | * Author: Kevin Hilman, Deep Root Systems, LLC |
5 | * | 5 | * |
6 | * Defines the cpu_is_*() macros for runtime detection of DaVinci | 6 | * Defines the cpu_is_*() macros for runtime detection of DaVinci |
7 | * device type. In addtion, if support for a given device is not | 7 | * device type. In addition, if support for a given device is not |
8 | * compiled in to the kernel, the macros return 0 so that | 8 | * compiled in to the kernel, the macros return 0 so that |
9 | * resulting code can be optimized out. | 9 | * resulting code can be optimized out. |
10 | * | 10 | * |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 3c07059f526e..ad64da713fc8 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/davinci_emac.h> | 17 | #include <linux/davinci_emac.h> |
18 | #include <linux/spi/spi.h> | ||
18 | 19 | ||
19 | #include <mach/serial.h> | 20 | #include <mach/serial.h> |
20 | #include <mach/edma.h> | 21 | #include <mach/edma.h> |
@@ -23,11 +24,19 @@ | |||
23 | #include <mach/mmc.h> | 24 | #include <mach/mmc.h> |
24 | #include <mach/usb.h> | 25 | #include <mach/usb.h> |
25 | #include <mach/pm.h> | 26 | #include <mach/pm.h> |
27 | #include <mach/spi.h> | ||
26 | 28 | ||
27 | extern void __iomem *da8xx_syscfg0_base; | 29 | extern void __iomem *da8xx_syscfg0_base; |
28 | extern void __iomem *da8xx_syscfg1_base; | 30 | extern void __iomem *da8xx_syscfg1_base; |
29 | 31 | ||
30 | /* | 32 | /* |
33 | * If the DA850/OMAP-L138/AM18x SoC on board is of a higher speed grade | ||
34 | * (than the regular 300Mhz variant), the board code should set this up | ||
35 | * with the supported speed before calling da850_register_cpufreq(). | ||
36 | */ | ||
37 | extern unsigned int da850_max_speed; | ||
38 | |||
39 | /* | ||
31 | * The cp_intc interrupt controller for the da8xx isn't in the same | 40 | * The cp_intc interrupt controller for the da8xx isn't in the same |
32 | * chunk of physical memory space as the other registers (like it is | 41 | * chunk of physical memory space as the other registers (like it is |
33 | * on the davincis) so it needs to be mapped separately. It will be | 42 | * on the davincis) so it needs to be mapped separately. It will be |
@@ -55,13 +64,9 @@ extern void __iomem *da8xx_syscfg1_base; | |||
55 | #define DA8XX_TIMER64P1_BASE 0x01c21000 | 64 | #define DA8XX_TIMER64P1_BASE 0x01c21000 |
56 | #define DA8XX_GPIO_BASE 0x01e26000 | 65 | #define DA8XX_GPIO_BASE 0x01e26000 |
57 | #define DA8XX_PSC1_BASE 0x01e27000 | 66 | #define DA8XX_PSC1_BASE 0x01e27000 |
58 | #define DA8XX_LCD_CNTRL_BASE 0x01e13000 | ||
59 | #define DA8XX_PLL1_BASE 0x01e1a000 | ||
60 | #define DA8XX_MMCSD0_BASE 0x01c40000 | ||
61 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | 67 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 |
62 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 | 68 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 |
63 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 | 69 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 |
64 | #define DA8XX_DDR2_CTL_BASE 0xb0000000 | ||
65 | #define DA8XX_ARM_RAM_BASE 0xffff0000 | 70 | #define DA8XX_ARM_RAM_BASE 0xffff0000 |
66 | 71 | ||
67 | void __init da830_init(void); | 72 | void __init da830_init(void); |
@@ -70,15 +75,17 @@ void __init da850_init(void); | |||
70 | int da830_register_edma(struct edma_rsv_info *rsv); | 75 | int da830_register_edma(struct edma_rsv_info *rsv); |
71 | int da850_register_edma(struct edma_rsv_info *rsv[2]); | 76 | int da850_register_edma(struct edma_rsv_info *rsv[2]); |
72 | int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); | 77 | int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); |
78 | int da8xx_register_spi(int instance, struct spi_board_info *info, unsigned len); | ||
73 | int da8xx_register_watchdog(void); | 79 | int da8xx_register_watchdog(void); |
74 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); | 80 | int da8xx_register_usb20(unsigned mA, unsigned potpgt); |
75 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); | 81 | int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); |
76 | int da8xx_register_emac(void); | 82 | int da8xx_register_emac(void); |
77 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); | 83 | int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); |
78 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); | 84 | int da8xx_register_mmcsd0(struct davinci_mmc_config *config); |
85 | int da850_register_mmcsd1(struct davinci_mmc_config *config); | ||
79 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); | 86 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); |
80 | int da8xx_register_rtc(void); | 87 | int da8xx_register_rtc(void); |
81 | int da850_register_cpufreq(void); | 88 | int da850_register_cpufreq(char *async_clk); |
82 | int da8xx_register_cpuidle(void); | 89 | int da8xx_register_cpuidle(void); |
83 | void __iomem * __init da8xx_get_mem_ctlr(void); | 90 | void __iomem * __init da8xx_get_mem_ctlr(void); |
84 | int da850_register_pm(struct platform_device *pdev); | 91 | int da850_register_pm(struct platform_device *pdev); |
@@ -87,6 +94,7 @@ extern struct platform_device da8xx_serial_device; | |||
87 | extern struct emac_platform_data da8xx_emac_pdata; | 94 | extern struct emac_platform_data da8xx_emac_pdata; |
88 | extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata; | 95 | extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata; |
89 | extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata; | 96 | extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata; |
97 | extern struct davinci_spi_platform_data da8xx_spi_pdata[]; | ||
90 | 98 | ||
91 | extern struct platform_device da8xx_wdt_device; | 99 | extern struct platform_device da8xx_wdt_device; |
92 | 100 | ||
@@ -115,17 +123,8 @@ extern const short da830_ecap2_pins[]; | |||
115 | extern const short da830_eqep0_pins[]; | 123 | extern const short da830_eqep0_pins[]; |
116 | extern const short da830_eqep1_pins[]; | 124 | extern const short da830_eqep1_pins[]; |
117 | 125 | ||
118 | extern const short da850_uart0_pins[]; | ||
119 | extern const short da850_uart1_pins[]; | ||
120 | extern const short da850_uart2_pins[]; | ||
121 | extern const short da850_i2c0_pins[]; | 126 | extern const short da850_i2c0_pins[]; |
122 | extern const short da850_i2c1_pins[]; | 127 | extern const short da850_i2c1_pins[]; |
123 | extern const short da850_cpgmac_pins[]; | ||
124 | extern const short da850_rmii_pins[]; | ||
125 | extern const short da850_mcasp_pins[]; | ||
126 | extern const short da850_lcdcntl_pins[]; | 128 | extern const short da850_lcdcntl_pins[]; |
127 | extern const short da850_mmcsd0_pins[]; | ||
128 | extern const short da850_nand_pins[]; | ||
129 | extern const short da850_nor_pins[]; | ||
130 | 129 | ||
131 | #endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ | 130 | #endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index f761dfdb8689..f8b7ea4f6235 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -24,40 +24,47 @@ | |||
24 | 24 | ||
25 | #define UART_SHIFT 2 | 25 | #define UART_SHIFT 2 |
26 | 26 | ||
27 | #define davinci_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET) | ||
28 | #define davinci_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET) | ||
29 | |||
27 | .pushsection .data | 30 | .pushsection .data |
28 | davinci_uart_phys: .word 0 | 31 | davinci_uart_phys: .word 0 |
29 | davinci_uart_virt: .word 0 | 32 | davinci_uart_virt: .word 0 |
30 | .popsection | 33 | .popsection |
31 | 34 | ||
32 | .macro addruart, rx, tmp | 35 | .macro addruart, rp, rv |
33 | 36 | ||
34 | /* Use davinci_uart_phys/virt if already configured */ | 37 | /* Use davinci_uart_phys/virt if already configured */ |
35 | 10: mrc p15, 0, \rx, c1, c0 | 38 | 10: mrc p15, 0, \rp, c1, c0 |
36 | tst \rx, #1 @ MMU enabled? | 39 | tst \rp, #1 @ MMU enabled? |
37 | ldreq \rx, =__virt_to_phys(davinci_uart_phys) | 40 | ldreq \rp, =davinci_uart_v2p(davinci_uart_phys) |
38 | ldrne \rx, =davinci_uart_virt | 41 | ldrne \rp, =davinci_uart_phys |
39 | ldr \rx, [\rx] | 42 | add \rv, \rp, #4 @ davinci_uart_virt |
40 | cmp \rx, #0 @ is port configured? | 43 | ldr \rp, [\rp, #0] |
44 | ldr \rv, [\rv, #0] | ||
45 | cmp \rp, #0 @ is port configured? | ||
46 | cmpne \rv, #0 | ||
41 | bne 99f @ already configured | 47 | bne 99f @ already configured |
42 | 48 | ||
43 | mrc p15, 0, \rx, c1, c0 | 49 | /* Check the debug UART address set in uncompress.h */ |
44 | tst \rx, #1 @ MMU enabled? | 50 | mrc p15, 0, \rp, c1, c0 |
51 | tst \rp, #1 @ MMU enabled? | ||
45 | 52 | ||
46 | /* Copy uart phys address from decompressor uart info */ | 53 | /* Copy uart phys address from decompressor uart info */ |
47 | ldreq \tmp, =__virt_to_phys(davinci_uart_phys) | 54 | ldreq \rv, =davinci_uart_v2p(davinci_uart_phys) |
48 | ldrne \tmp, =davinci_uart_phys | 55 | ldrne \rv, =davinci_uart_phys |
49 | ldreq \rx, =DAVINCI_UART_INFO | 56 | ldreq \rp, =DAVINCI_UART_INFO |
50 | ldrne \rx, =__phys_to_virt(DAVINCI_UART_INFO) | 57 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
51 | ldr \rx, [\rx, #0] | 58 | ldr \rp, [\rp, #0] |
52 | str \rx, [\tmp] | 59 | str \rp, [\rv] |
53 | 60 | ||
54 | /* Copy uart virt address from decompressor uart info */ | 61 | /* Copy uart virt address from decompressor uart info */ |
55 | ldreq \tmp, =__virt_to_phys(davinci_uart_virt) | 62 | ldreq \rv, =davinci_uart_v2p(davinci_uart_virt) |
56 | ldrne \tmp, =davinci_uart_virt | 63 | ldrne \rv, =davinci_uart_virt |
57 | ldreq \rx, =DAVINCI_UART_INFO | 64 | ldreq \rp, =DAVINCI_UART_INFO |
58 | ldrne \rx, =__phys_to_virt(DAVINCI_UART_INFO) | 65 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
59 | ldr \rx, [\rx, #4] | 66 | ldr \rp, [\rp, #4] |
60 | str \rx, [\tmp] | 67 | str \rp, [\rv] |
61 | 68 | ||
62 | b 10b | 69 | b 10b |
63 | 99: | 70 | 99: |
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h index ea5df3b49ec4..2563bf4e93a1 100644 --- a/arch/arm/mach-davinci/include/mach/dm365.h +++ b/arch/arm/mach-davinci/include/mach/dm365.h | |||
@@ -21,10 +21,10 @@ | |||
21 | #include <media/davinci/vpfe_capture.h> | 21 | #include <media/davinci/vpfe_capture.h> |
22 | 22 | ||
23 | #define DM365_EMAC_BASE (0x01D07000) | 23 | #define DM365_EMAC_BASE (0x01D07000) |
24 | #define DM365_EMAC_MDIO_BASE (DM365_EMAC_BASE + 0x4000) | ||
24 | #define DM365_EMAC_CNTRL_OFFSET (0x0000) | 25 | #define DM365_EMAC_CNTRL_OFFSET (0x0000) |
25 | #define DM365_EMAC_CNTRL_MOD_OFFSET (0x3000) | 26 | #define DM365_EMAC_CNTRL_MOD_OFFSET (0x3000) |
26 | #define DM365_EMAC_CNTRL_RAM_OFFSET (0x1000) | 27 | #define DM365_EMAC_CNTRL_RAM_OFFSET (0x1000) |
27 | #define DM365_EMAC_MDIO_OFFSET (0x4000) | ||
28 | #define DM365_EMAC_CNTRL_RAM_SIZE (0x2000) | 28 | #define DM365_EMAC_CNTRL_RAM_SIZE (0x2000) |
29 | 29 | ||
30 | /* Base of key scan register bank */ | 30 | /* Base of key scan register bank */ |
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h index 6fca568a0fd2..5a1b26d4e68b 100644 --- a/arch/arm/mach-davinci/include/mach/dm644x.h +++ b/arch/arm/mach-davinci/include/mach/dm644x.h | |||
@@ -28,10 +28,10 @@ | |||
28 | #include <media/davinci/vpfe_capture.h> | 28 | #include <media/davinci/vpfe_capture.h> |
29 | 29 | ||
30 | #define DM644X_EMAC_BASE (0x01C80000) | 30 | #define DM644X_EMAC_BASE (0x01C80000) |
31 | #define DM644X_EMAC_MDIO_BASE (DM644X_EMAC_BASE + 0x4000) | ||
31 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) | 32 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) |
32 | #define DM644X_EMAC_CNTRL_MOD_OFFSET (0x1000) | 33 | #define DM644X_EMAC_CNTRL_MOD_OFFSET (0x1000) |
33 | #define DM644X_EMAC_CNTRL_RAM_OFFSET (0x2000) | 34 | #define DM644X_EMAC_CNTRL_RAM_OFFSET (0x2000) |
34 | #define DM644X_EMAC_MDIO_OFFSET (0x4000) | ||
35 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) | 35 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) |
36 | 36 | ||
37 | #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01E00000 | 37 | #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01E00000 |
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h index 0a27ee9a70e1..7a27f3f13913 100644 --- a/arch/arm/mach-davinci/include/mach/dm646x.h +++ b/arch/arm/mach-davinci/include/mach/dm646x.h | |||
@@ -19,10 +19,10 @@ | |||
19 | #include <linux/davinci_emac.h> | 19 | #include <linux/davinci_emac.h> |
20 | 20 | ||
21 | #define DM646X_EMAC_BASE (0x01C80000) | 21 | #define DM646X_EMAC_BASE (0x01C80000) |
22 | #define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) | ||
22 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) | 23 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) |
23 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) | 24 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) |
24 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) | 25 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) |
25 | #define DM646X_EMAC_MDIO_OFFSET (0x4000) | ||
26 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) | 26 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) |
27 | 27 | ||
28 | #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 | 28 | #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 |
diff --git a/arch/arm/mach-davinci/include/mach/edma.h b/arch/arm/mach-davinci/include/mach/edma.h index dc10ef6cf572..20c77f29bf0f 100644 --- a/arch/arm/mach-davinci/include/mach/edma.h +++ b/arch/arm/mach-davinci/include/mach/edma.h | |||
@@ -151,42 +151,6 @@ struct edmacc_param { | |||
151 | #define DA830_DMACH2EVENT_MAP1 0x00000000u | 151 | #define DA830_DMACH2EVENT_MAP1 0x00000000u |
152 | #define DA830_EDMA_ARM_OWN 0x30FFCCFFu | 152 | #define DA830_EDMA_ARM_OWN 0x30FFCCFFu |
153 | 153 | ||
154 | /* DA830 specific EDMA3 Events Information */ | ||
155 | enum DA830_edma_ch { | ||
156 | DA830_DMACH_MCASP0_RX, | ||
157 | DA830_DMACH_MCASP0_TX, | ||
158 | DA830_DMACH_MCASP1_RX, | ||
159 | DA830_DMACH_MCASP1_TX, | ||
160 | DA830_DMACH_MCASP2_RX, | ||
161 | DA830_DMACH_MCASP2_TX, | ||
162 | DA830_DMACH_GPIO_BNK0INT, | ||
163 | DA830_DMACH_GPIO_BNK1INT, | ||
164 | DA830_DMACH_UART0_RX, | ||
165 | DA830_DMACH_UART0_TX, | ||
166 | DA830_DMACH_TMR64P0_EVTOUT12, | ||
167 | DA830_DMACH_TMR64P0_EVTOUT34, | ||
168 | DA830_DMACH_UART1_RX, | ||
169 | DA830_DMACH_UART1_TX, | ||
170 | DA830_DMACH_SPI0_RX, | ||
171 | DA830_DMACH_SPI0_TX, | ||
172 | DA830_DMACH_MMCSD_RX, | ||
173 | DA830_DMACH_MMCSD_TX, | ||
174 | DA830_DMACH_SPI1_RX, | ||
175 | DA830_DMACH_SPI1_TX, | ||
176 | DA830_DMACH_DMAX_EVTOUT6, | ||
177 | DA830_DMACH_DMAX_EVTOUT7, | ||
178 | DA830_DMACH_GPIO_BNK2INT, | ||
179 | DA830_DMACH_GPIO_BNK3INT, | ||
180 | DA830_DMACH_I2C0_RX, | ||
181 | DA830_DMACH_I2C0_TX, | ||
182 | DA830_DMACH_I2C1_RX, | ||
183 | DA830_DMACH_I2C1_TX, | ||
184 | DA830_DMACH_GPIO_BNK4INT, | ||
185 | DA830_DMACH_GPIO_BNK5INT, | ||
186 | DA830_DMACH_UART2_RX, | ||
187 | DA830_DMACH_UART2_TX | ||
188 | }; | ||
189 | |||
190 | /*ch_status paramater of callback function possible values*/ | 154 | /*ch_status paramater of callback function possible values*/ |
191 | #define DMA_COMPLETE 1 | 155 | #define DMA_COMPLETE 1 |
192 | #define DMA_CC_ERROR 2 | 156 | #define DMA_CC_ERROR 2 |
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h index c45ba1f62a11..414e0b93e741 100644 --- a/arch/arm/mach-davinci/include/mach/hardware.h +++ b/arch/arm/mach-davinci/include/mach/hardware.h | |||
@@ -21,9 +21,6 @@ | |||
21 | */ | 21 | */ |
22 | #define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000 | 22 | #define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000 |
23 | 23 | ||
24 | /* System control register offsets */ | ||
25 | #define DM64XX_VDD3P3V_PWDN 0x48 | ||
26 | |||
27 | /* | 24 | /* |
28 | * I/O mapping | 25 | * I/O mapping |
29 | */ | 26 | */ |
diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h index 62b0a90309ad..d1b954955c12 100644 --- a/arch/arm/mach-davinci/include/mach/io.h +++ b/arch/arm/mach-davinci/include/mach/io.h | |||
@@ -22,8 +22,8 @@ | |||
22 | #define __mem_isa(a) (a) | 22 | #define __mem_isa(a) (a) |
23 | 23 | ||
24 | #ifndef __ASSEMBLER__ | 24 | #ifndef __ASSEMBLER__ |
25 | #define __arch_ioremap(p, s, t) davinci_ioremap(p, s, t) | 25 | #define __arch_ioremap davinci_ioremap |
26 | #define __arch_iounmap(v) davinci_iounmap(v) | 26 | #define __arch_iounmap davinci_iounmap |
27 | 27 | ||
28 | void __iomem *davinci_ioremap(unsigned long phys, size_t size, | 28 | void __iomem *davinci_ioremap(unsigned long phys, size_t size, |
29 | unsigned int type); | 29 | unsigned int type); |
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h index 22eb97c1c30b..491249ef209c 100644 --- a/arch/arm/mach-davinci/include/mach/memory.h +++ b/arch/arm/mach-davinci/include/mach/memory.h | |||
@@ -26,9 +26,9 @@ | |||
26 | #if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx) | 26 | #if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx) |
27 | #error Cannot enable DaVinci and DA8XX platforms concurrently | 27 | #error Cannot enable DaVinci and DA8XX platforms concurrently |
28 | #elif defined(CONFIG_ARCH_DAVINCI_DA8XX) | 28 | #elif defined(CONFIG_ARCH_DAVINCI_DA8XX) |
29 | #define PHYS_OFFSET DA8XX_DDR_BASE | 29 | #define PLAT_PHYS_OFFSET DA8XX_DDR_BASE |
30 | #else | 30 | #else |
31 | #define PHYS_OFFSET DAVINCI_DDR_BASE | 31 | #define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #define DDR2_SDRCR_OFFSET 0xc | 34 | #define DDR2_SDRCR_OFFSET 0xc |
@@ -41,27 +41,11 @@ | |||
41 | */ | 41 | */ |
42 | #define CONSISTENT_DMA_SIZE (14<<20) | 42 | #define CONSISTENT_DMA_SIZE (14<<20) |
43 | 43 | ||
44 | #ifndef __ASSEMBLY__ | ||
45 | /* | 44 | /* |
46 | * Restrict DMA-able region to workaround silicon bug. The bug | 45 | * Restrict DMA-able region to workaround silicon bug. The bug |
47 | * restricts buffers available for DMA to video hardware to be | 46 | * restricts buffers available for DMA to video hardware to be |
48 | * below 128M | 47 | * below 128M |
49 | */ | 48 | */ |
50 | static inline void | 49 | #define ARM_DMA_ZONE_SIZE SZ_128M |
51 | __arch_adjust_zones(unsigned long *size, unsigned long *holes) | ||
52 | { | ||
53 | unsigned int sz = (128<<20) >> PAGE_SHIFT; | ||
54 | |||
55 | size[1] = size[0] - sz; | ||
56 | size[0] = sz; | ||
57 | } | ||
58 | |||
59 | #define arch_adjust_zones(zone_size, holes) \ | ||
60 | if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(zone_size, holes) | ||
61 | |||
62 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + (128<<20) - 1) | ||
63 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + (128<<20)) | ||
64 | |||
65 | #endif | ||
66 | 50 | ||
67 | #endif /* __ASM_ARCH_MEMORY_H */ | 51 | #endif /* __ASM_ARCH_MEMORY_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index de11aac76a80..5d4e0fed828a 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h | |||
@@ -908,11 +908,15 @@ enum davinci_da850_index { | |||
908 | DA850_NEMA_CS_2, | 908 | DA850_NEMA_CS_2, |
909 | 909 | ||
910 | /* GPIO function */ | 910 | /* GPIO function */ |
911 | DA850_GPIO2_4, | ||
911 | DA850_GPIO2_6, | 912 | DA850_GPIO2_6, |
912 | DA850_GPIO2_8, | 913 | DA850_GPIO2_8, |
913 | DA850_GPIO2_15, | 914 | DA850_GPIO2_15, |
915 | DA850_GPIO3_12, | ||
916 | DA850_GPIO3_13, | ||
914 | DA850_GPIO4_0, | 917 | DA850_GPIO4_0, |
915 | DA850_GPIO4_1, | 918 | DA850_GPIO4_1, |
919 | DA850_GPIO6_13, | ||
916 | DA850_RTC_ALARM, | 920 | DA850_RTC_ALARM, |
917 | }; | 921 | }; |
918 | 922 | ||
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h index b2ad8090bd10..025151049f05 100644 --- a/arch/arm/mach-davinci/include/mach/nand.h +++ b/arch/arm/mach-davinci/include/mach/nand.h | |||
@@ -30,9 +30,6 @@ | |||
30 | 30 | ||
31 | #include <linux/mtd/nand.h> | 31 | #include <linux/mtd/nand.h> |
32 | 32 | ||
33 | #define NRCSR_OFFSET 0x00 | ||
34 | #define AWCCR_OFFSET 0x04 | ||
35 | #define A1CR_OFFSET 0x10 | ||
36 | #define NANDFCR_OFFSET 0x60 | 33 | #define NANDFCR_OFFSET 0x60 |
37 | #define NANDFSR_OFFSET 0x64 | 34 | #define NANDFSR_OFFSET 0x64 |
38 | #define NANDF1ECC_OFFSET 0x70 | 35 | #define NANDF1ECC_OFFSET 0x70 |
@@ -83,6 +80,9 @@ struct davinci_nand_pdata { /* platform_data */ | |||
83 | /* Main and mirror bbt descriptor overrides */ | 80 | /* Main and mirror bbt descriptor overrides */ |
84 | struct nand_bbt_descr *bbt_td; | 81 | struct nand_bbt_descr *bbt_td; |
85 | struct nand_bbt_descr *bbt_md; | 82 | struct nand_bbt_descr *bbt_md; |
83 | |||
84 | /* Access timings */ | ||
85 | struct davinci_aemif_timing *timing; | ||
86 | }; | 86 | }; |
87 | 87 | ||
88 | #endif /* __ARCH_ARM_DAVINCI_NAND_H */ | 88 | #endif /* __ARCH_ARM_DAVINCI_NAND_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index 983da6e4554c..a47e6f29206e 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
@@ -150,7 +150,7 @@ | |||
150 | #define DA8XX_LPSC0_SCR0_SS 10 | 150 | #define DA8XX_LPSC0_SCR0_SS 10 |
151 | #define DA8XX_LPSC0_SCR1_SS 11 | 151 | #define DA8XX_LPSC0_SCR1_SS 11 |
152 | #define DA8XX_LPSC0_SCR2_SS 12 | 152 | #define DA8XX_LPSC0_SCR2_SS 12 |
153 | #define DA8XX_LPSC0_DMAX 13 | 153 | #define DA8XX_LPSC0_PRUSS 13 |
154 | #define DA8XX_LPSC0_ARM 14 | 154 | #define DA8XX_LPSC0_ARM 14 |
155 | #define DA8XX_LPSC0_GEM 15 | 155 | #define DA8XX_LPSC0_GEM 15 |
156 | 156 | ||
@@ -172,6 +172,7 @@ | |||
172 | #define DA8XX_LPSC1_UART2 13 | 172 | #define DA8XX_LPSC1_UART2 13 |
173 | #define DA8XX_LPSC1_LCDC 16 | 173 | #define DA8XX_LPSC1_LCDC 16 |
174 | #define DA8XX_LPSC1_PWM 17 | 174 | #define DA8XX_LPSC1_PWM 17 |
175 | #define DA850_LPSC1_MMC_SD1 18 | ||
175 | #define DA8XX_LPSC1_ECAP 20 | 176 | #define DA8XX_LPSC1_ECAP 20 |
176 | #define DA830_LPSC1_EQEP 21 | 177 | #define DA830_LPSC1_EQEP 21 |
177 | #define DA850_LPSC1_TPTC2 21 | 178 | #define DA850_LPSC1_TPTC2 21 |
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 8051110b8ac3..c9e6ce185a66 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). | 23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). |
24 | */ | 24 | */ |
25 | #define DAVINCI_UART_INFO (PHYS_OFFSET + 0x3ff8) | 25 | #define DAVINCI_UART_INFO (PLAT_PHYS_OFFSET + 0x3ff8) |
26 | 26 | ||
27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) | 27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) |
28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) | 28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) |
diff --git a/arch/arm/mach-davinci/include/mach/spi.h b/arch/arm/mach-davinci/include/mach/spi.h index 910efbf099c0..7af305b37868 100644 --- a/arch/arm/mach-davinci/include/mach/spi.h +++ b/arch/arm/mach-davinci/include/mach/spi.h | |||
@@ -19,26 +19,71 @@ | |||
19 | #ifndef __ARCH_ARM_DAVINCI_SPI_H | 19 | #ifndef __ARCH_ARM_DAVINCI_SPI_H |
20 | #define __ARCH_ARM_DAVINCI_SPI_H | 20 | #define __ARCH_ARM_DAVINCI_SPI_H |
21 | 21 | ||
22 | #include <mach/edma.h> | ||
23 | |||
24 | #define SPI_INTERN_CS 0xFF | ||
25 | |||
22 | enum { | 26 | enum { |
23 | SPI_VERSION_1, /* For DM355/DM365/DM6467 */ | 27 | SPI_VERSION_1, /* For DM355/DM365/DM6467 */ |
24 | SPI_VERSION_2, /* For DA8xx */ | 28 | SPI_VERSION_2, /* For DA8xx */ |
25 | }; | 29 | }; |
26 | 30 | ||
31 | /** | ||
32 | * davinci_spi_platform_data - Platform data for SPI master device on DaVinci | ||
33 | * | ||
34 | * @version: version of the SPI IP. Different DaVinci devices have slightly | ||
35 | * varying versions of the same IP. | ||
36 | * @num_chipselect: number of chipselects supported by this SPI master | ||
37 | * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt | ||
38 | * controller withn the SoC. Possible values are 0 and 1. | ||
39 | * @chip_sel: list of GPIOs which can act as chip-selects for the SPI. | ||
40 | * SPI_INTERN_CS denotes internal SPI chip-select. Not necessary | ||
41 | * to populate if all chip-selects are internal. | ||
42 | * @cshold_bug: set this to true if the SPI controller on your chip requires | ||
43 | * a write to CSHOLD bit in between transfers (like in DM355). | ||
44 | * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any | ||
45 | * device on the bus. | ||
46 | */ | ||
27 | struct davinci_spi_platform_data { | 47 | struct davinci_spi_platform_data { |
28 | u8 version; | 48 | u8 version; |
29 | u8 num_chipselect; | 49 | u8 num_chipselect; |
50 | u8 intr_line; | ||
51 | u8 *chip_sel; | ||
52 | bool cshold_bug; | ||
53 | enum dma_event_q dma_event_q; | ||
54 | }; | ||
55 | |||
56 | /** | ||
57 | * davinci_spi_config - Per-chip-select configuration for SPI slave devices | ||
58 | * | ||
59 | * @wdelay: amount of delay between transmissions. Measured in number of | ||
60 | * SPI module clocks. | ||
61 | * @odd_parity: polarity of parity flag at the end of transmit data stream. | ||
62 | * 0 - odd parity, 1 - even parity. | ||
63 | * @parity_enable: enable transmission of parity at end of each transmit | ||
64 | * data stream. | ||
65 | * @io_type: type of IO transfer. Choose between polled, interrupt and DMA. | ||
66 | * @timer_disable: disable chip-select timers (setup and hold) | ||
67 | * @c2tdelay: chip-select setup time. Measured in number of SPI module clocks. | ||
68 | * @t2cdelay: chip-select hold time. Measured in number of SPI module clocks. | ||
69 | * @t2edelay: transmit data finished to SPI ENAn pin inactive time. Measured | ||
70 | * in number of SPI clocks. | ||
71 | * @c2edelay: chip-select active to SPI ENAn signal active time. Measured in | ||
72 | * number of SPI clocks. | ||
73 | */ | ||
74 | struct davinci_spi_config { | ||
30 | u8 wdelay; | 75 | u8 wdelay; |
31 | u8 odd_parity; | 76 | u8 odd_parity; |
32 | u8 parity_enable; | 77 | u8 parity_enable; |
33 | u8 wait_enable; | 78 | #define SPI_IO_TYPE_INTR 0 |
79 | #define SPI_IO_TYPE_POLL 1 | ||
80 | #define SPI_IO_TYPE_DMA 2 | ||
81 | u8 io_type; | ||
34 | u8 timer_disable; | 82 | u8 timer_disable; |
35 | u8 clk_internal; | ||
36 | u8 cs_hold; | ||
37 | u8 intr_level; | ||
38 | u8 poll_mode; | ||
39 | u8 use_dma; | ||
40 | u8 c2tdelay; | 83 | u8 c2tdelay; |
41 | u8 t2cdelay; | 84 | u8 t2cdelay; |
85 | u8 t2edelay; | ||
86 | u8 c2edelay; | ||
42 | }; | 87 | }; |
43 | 88 | ||
44 | #endif /* __ARCH_ARM_DAVINCI_SPI_H */ | 89 | #endif /* __ARCH_ARM_DAVINCI_SPI_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/tnetv107x.h b/arch/arm/mach-davinci/include/mach/tnetv107x.h index c72064733123..89c1fdc63c0b 100644 --- a/arch/arm/mach-davinci/include/mach/tnetv107x.h +++ b/arch/arm/mach-davinci/include/mach/tnetv107x.h | |||
@@ -33,6 +33,9 @@ | |||
33 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
34 | 34 | ||
35 | #include <linux/serial_8250.h> | 35 | #include <linux/serial_8250.h> |
36 | #include <linux/input/matrix_keypad.h> | ||
37 | #include <linux/mfd/ti_ssp.h> | ||
38 | |||
36 | #include <mach/mmc.h> | 39 | #include <mach/mmc.h> |
37 | #include <mach/nand.h> | 40 | #include <mach/nand.h> |
38 | #include <mach/serial.h> | 41 | #include <mach/serial.h> |
@@ -41,6 +44,8 @@ struct tnetv107x_device_info { | |||
41 | struct davinci_uart_config *serial_config; | 44 | struct davinci_uart_config *serial_config; |
42 | struct davinci_mmc_config *mmc_config[2]; /* 2 controllers */ | 45 | struct davinci_mmc_config *mmc_config[2]; /* 2 controllers */ |
43 | struct davinci_nand_pdata *nand_config[4]; /* 4 chipsels */ | 46 | struct davinci_nand_pdata *nand_config[4]; /* 4 chipsels */ |
47 | struct matrix_keypad_platform_data *keypad_config; | ||
48 | struct ti_ssp_data *ssp_config; | ||
44 | }; | 49 | }; |
45 | 50 | ||
46 | extern struct platform_device tnetv107x_wdt_device; | 51 | extern struct platform_device tnetv107x_wdt_device; |
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h index 15a6192ad6eb..78d80683cdc2 100644 --- a/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/arch/arm/mach-davinci/include/mach/uncompress.h | |||
@@ -25,8 +25,7 @@ | |||
25 | 25 | ||
26 | #include <mach/serial.h> | 26 | #include <mach/serial.h> |
27 | 27 | ||
28 | static u32 *uart; | 28 | u32 *uart; |
29 | static u32 *uart_info = (u32 *)(DAVINCI_UART_INFO); | ||
30 | 29 | ||
31 | /* PORT_16C550A, in polled non-fifo mode */ | 30 | /* PORT_16C550A, in polled non-fifo mode */ |
32 | static void putc(char c) | 31 | static void putc(char c) |
@@ -44,6 +43,8 @@ static inline void flush(void) | |||
44 | 43 | ||
45 | static inline void set_uart_info(u32 phys, void * __iomem virt) | 44 | static inline void set_uart_info(u32 phys, void * __iomem virt) |
46 | { | 45 | { |
46 | u32 *uart_info = (u32 *)(DAVINCI_UART_INFO); | ||
47 | |||
47 | uart = (u32 *)phys; | 48 | uart = (u32 *)phys; |
48 | uart_info[0] = phys; | 49 | uart_info[0] = phys; |
49 | uart_info[1] = (u32)virt; | 50 | uart_info[1] = (u32)virt; |
@@ -88,6 +89,8 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
88 | /* DA8xx boards */ | 89 | /* DA8xx boards */ |
89 | DEBUG_LL_DA8XX(davinci_da830_evm, 2); | 90 | DEBUG_LL_DA8XX(davinci_da830_evm, 2); |
90 | DEBUG_LL_DA8XX(davinci_da850_evm, 2); | 91 | DEBUG_LL_DA8XX(davinci_da850_evm, 2); |
92 | DEBUG_LL_DA8XX(mityomapl138, 1); | ||
93 | DEBUG_LL_DA8XX(omapl138_hawkboard, 2); | ||
91 | 94 | ||
92 | /* TNETV107x boards */ | 95 | /* TNETV107x boards */ |
93 | DEBUG_LL_TNETV107X(tnetv107x, 1); | 96 | DEBUG_LL_TNETV107X(tnetv107x, 1); |