aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-pxa
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-pxa')
-rw-r--r--include/asm-arm/arch-pxa/irqs.h2
-rw-r--r--include/asm-arm/arch-pxa/memory.h36
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h22
-rw-r--r--include/asm-arm/arch-pxa/pxa2xx_spi.h5
-rw-r--r--include/asm-arm/arch-pxa/udc.h17
5 files changed, 17 insertions, 65 deletions
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
index f3bc70eee35b..67ed43674c63 100644
--- a/include/asm-arm/arch-pxa/irqs.h
+++ b/include/asm-arm/arch-pxa/irqs.h
@@ -73,7 +73,7 @@
73#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) 73#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
74 74
75#if defined(CONFIG_PXA25x) 75#if defined(CONFIG_PXA25x)
76#define PXA_LAST_GPIO 80 76#define PXA_LAST_GPIO 84
77#elif defined(CONFIG_PXA27x) 77#elif defined(CONFIG_PXA27x)
78#define PXA_LAST_GPIO 127 78#define PXA_LAST_GPIO 127
79#endif 79#endif
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h
index eaf6d43939e9..e17f9881faf0 100644
--- a/include/asm-arm/arch-pxa/memory.h
+++ b/include/asm-arm/arch-pxa/memory.h
@@ -27,7 +27,6 @@
27#define __virt_to_bus(x) __virt_to_phys(x) 27#define __virt_to_bus(x) __virt_to_phys(x)
28#define __bus_to_virt(x) __phys_to_virt(x) 28#define __bus_to_virt(x) __phys_to_virt(x)
29 29
30#ifdef CONFIG_DISCONTIGMEM
31/* 30/*
32 * The nodes are matched with the physical SDRAM banks as follows: 31 * The nodes are matched with the physical SDRAM banks as follows:
33 * 32 *
@@ -35,38 +34,9 @@
35 * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff 34 * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff
36 * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff 35 * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff
37 * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff 36 * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff
37 *
38 * This needs a node mem size of 26 bits.
38 */ 39 */
39 40#define NODE_MEM_SIZE_BITS 26
40/*
41 * Given a kernel address, find the home node of the underlying memory.
42 */
43#define KVADDR_TO_NID(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> 26)
44
45/*
46 * Given a page frame number, convert it to a node id.
47 */
48#define PFN_TO_NID(pfn) (((pfn) - PHYS_PFN_OFFSET) >> (26 - PAGE_SHIFT))
49
50/*
51 * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
52 * and returns the mem_map of that node.
53 */
54#define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr))
55
56/*
57 * Given a page frame number, find the owning node of the memory
58 * and returns the mem_map of that node.
59 */
60#define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn))
61
62/*
63 * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
64 * and returns the index corresponding to the appropriate page in the
65 * node's mem_map.
66 */
67#define LOCAL_MAP_NR(addr) \
68 (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT)
69
70#endif
71 41
72#endif 42#endif
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index f5cc65dd7d0d..083e03c5639f 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -99,7 +99,7 @@
99#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */ 99#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */
100#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ 100#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */
101#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ 101#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */
102#define DCSR_ENRINTR (1 << 9) /* The end of Receive */ 102#define DCSR_EORINTR (1 << 9) /* The end of Receive */
103#endif 103#endif
104#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ 104#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
105#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ 105#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
@@ -803,12 +803,11 @@
803#define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */ 803#define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */
804#define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */ 804#define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */
805#define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2)) 805#define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
806#define UDCISR1_IECC (1 << 31) /* IntEn - Configuration Change */ 806#define UDCISR1_IRCC (1 << 31) /* IntReq - Configuration Change */
807#define UDCISR1_IESOF (1 << 30) /* IntEn - Start of Frame */ 807#define UDCISR1_IRSOF (1 << 30) /* IntReq - Start of Frame */
808#define UDCISR1_IERU (1 << 29) /* IntEn - Resume */ 808#define UDCISR1_IRRU (1 << 29) /* IntReq - Resume */
809#define UDCISR1_IESU (1 << 28) /* IntEn - Suspend */ 809#define UDCISR1_IRSU (1 << 28) /* IntReq - Suspend */
810#define UDCISR1_IERS (1 << 27) /* IntEn - Reset */ 810#define UDCISR1_IRRS (1 << 27) /* IntReq - Reset */
811
812 811
813#define UDCFNR __REG(0x40600014) /* UDC Frame Number Register */ 812#define UDCFNR __REG(0x40600014) /* UDC Frame Number Register */
814#define UDCOTGICR __REG(0x40600018) /* UDC On-The-Go interrupt control */ 813#define UDCOTGICR __REG(0x40600018) /* UDC On-The-Go interrupt control */
@@ -1681,6 +1680,7 @@
1681#define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */ 1680#define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */
1682#define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ 1681#define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */
1683 1682
1683#define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */
1684#define SSPSP_DMYSTOP(x) (x << 23) /* Dummy Stop */ 1684#define SSPSP_DMYSTOP(x) (x << 23) /* Dummy Stop */
1685#define SSPSP_SFRMWDTH(x) (x << 16) /* Serial Frame Width */ 1685#define SSPSP_SFRMWDTH(x) (x << 16) /* Serial Frame Width */
1686#define SSPSP_SFRMDLY(x) (x << 9) /* Serial Frame Delay */ 1686#define SSPSP_SFRMDLY(x) (x << 9) /* Serial Frame Delay */
@@ -2241,7 +2241,7 @@
2241 2241
2242#define CICR1_TBIT (1 << 31) /* Transparency bit */ 2242#define CICR1_TBIT (1 << 31) /* Transparency bit */
2243#define CICR1_RGBT_CONV (0x3 << 30) /* RGBT conversion mask */ 2243#define CICR1_RGBT_CONV (0x3 << 30) /* RGBT conversion mask */
2244#define CICR1_PPL (0x3f << 15) /* Pixels per line mask */ 2244#define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */
2245#define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */ 2245#define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */
2246#define CICR1_RGB_F (1 << 11) /* RGB format */ 2246#define CICR1_RGB_F (1 << 11) /* RGB format */
2247#define CICR1_YCBCR_F (1 << 10) /* YCbCr format */ 2247#define CICR1_YCBCR_F (1 << 10) /* YCbCr format */
@@ -2267,7 +2267,7 @@
2267#define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */ 2267#define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */
2268#define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock 2268#define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
2269 wait count mask */ 2269 wait count mask */
2270#define CICR3_LPF (0x3ff << 0) /* Lines per frame mask */ 2270#define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */
2271 2271
2272#define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */ 2272#define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */
2273#define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */ 2273#define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */
@@ -2288,8 +2288,8 @@
2288#define CISR_EOL (1 << 8) /* End of line */ 2288#define CISR_EOL (1 << 8) /* End of line */
2289#define CISR_PAR_ERR (1 << 7) /* Parity error */ 2289#define CISR_PAR_ERR (1 << 7) /* Parity error */
2290#define CISR_CQD (1 << 6) /* Camera interface quick disable */ 2290#define CISR_CQD (1 << 6) /* Camera interface quick disable */
2291#define CISR_SOF (1 << 5) /* Start of frame */ 2291#define CISR_CDD (1 << 5) /* Camera interface disable done */
2292#define CISR_CDD (1 << 4) /* Camera interface disable done */ 2292#define CISR_SOF (1 << 4) /* Start of frame */
2293#define CISR_EOF (1 << 3) /* End of frame */ 2293#define CISR_EOF (1 << 3) /* End of frame */
2294#define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */ 2294#define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */
2295#define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */ 2295#define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */
diff --git a/include/asm-arm/arch-pxa/pxa2xx_spi.h b/include/asm-arm/arch-pxa/pxa2xx_spi.h
index 915590c391c8..acc7ec7a84a1 100644
--- a/include/asm-arm/arch-pxa/pxa2xx_spi.h
+++ b/include/asm-arm/arch-pxa/pxa2xx_spi.h
@@ -27,16 +27,13 @@
27#define SSP1_SerClkDiv(x) (((CLOCK_SPEED_HZ/2/(x+1))<<8)&0x0000ff00) 27#define SSP1_SerClkDiv(x) (((CLOCK_SPEED_HZ/2/(x+1))<<8)&0x0000ff00)
28#define SSP2_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) 28#define SSP2_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00)
29#define SSP3_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) 29#define SSP3_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00)
30#define SSP_TIMEOUT_SCALE (2712)
31#elif defined(CONFIG_PXA27x) 30#elif defined(CONFIG_PXA27x)
32#define CLOCK_SPEED_HZ 13000000 31#define CLOCK_SPEED_HZ 13000000
33#define SSP1_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) 32#define SSP1_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00)
34#define SSP2_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) 33#define SSP2_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00)
35#define SSP3_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00) 34#define SSP3_SerClkDiv(x) (((CLOCK_SPEED_HZ/(x+1))<<8)&0x000fff00)
36#define SSP_TIMEOUT_SCALE (769)
37#endif 35#endif
38 36
39#define SSP_TIMEOUT(x) ((x*10000)/SSP_TIMEOUT_SCALE)
40#define SSP1_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(1))))) 37#define SSP1_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(1)))))
41#define SSP2_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(2))))) 38#define SSP2_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(2)))))
42#define SSP3_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(3))))) 39#define SSP3_VIRT ((void *)(io_p2v(__PREG(SSCR0_P(3)))))
@@ -63,7 +60,7 @@ struct pxa2xx_spi_chip {
63 u8 tx_threshold; 60 u8 tx_threshold;
64 u8 rx_threshold; 61 u8 rx_threshold;
65 u8 dma_burst_size; 62 u8 dma_burst_size;
66 u32 timeout_microsecs; 63 u32 timeout;
67 u8 enable_loopback; 64 u8 enable_loopback;
68 void (*cs_control)(u32 command); 65 void (*cs_control)(u32 command);
69}; 66};
diff --git a/include/asm-arm/arch-pxa/udc.h b/include/asm-arm/arch-pxa/udc.h
index 121cd241115d..646480d37256 100644
--- a/include/asm-arm/arch-pxa/udc.h
+++ b/include/asm-arm/arch-pxa/udc.h
@@ -4,23 +4,8 @@
4 * This supports machine-specific differences in how the PXA2xx 4 * This supports machine-specific differences in how the PXA2xx
5 * USB Device Controller (UDC) is wired. 5 * USB Device Controller (UDC) is wired.
6 * 6 *
7 * It is set in linux/arch/arm/mach-pxa/<machine>.c and used in
8 * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c
9 */ 7 */
10struct pxa2xx_udc_mach_info { 8#include <asm/mach/udc_pxa2xx.h>
11 int (*udc_is_connected)(void); /* do we see host? */
12 void (*udc_command)(int cmd);
13#define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */
14#define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */
15
16 /* Boards following the design guidelines in the developer's manual,
17 * with on-chip GPIOs not Lubbock's wierd hardware, can have a sane
18 * VBUS IRQ and omit the methods above. Store the GPIO number
19 * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits.
20 */
21 u16 gpio_vbus; /* high == vbus present */
22 u16 gpio_pullup; /* high == pullup activated */
23};
24 9
25extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); 10extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
26 11