diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-sa1100/include | |
parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) |
Diffstat (limited to 'arch/arm/mach-sa1100/include')
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/SA-1111.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/dma.h | 117 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/io.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/lart.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/mcp.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/system.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/vmalloc.h | 4 |
7 files changed, 205 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/include/mach/SA-1111.h b/arch/arm/mach-sa1100/include/mach/SA-1111.h new file mode 100644 index 00000000000..c38f60915cb --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/SA-1111.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * Moved to new location | ||
3 | */ | ||
4 | #warning using old SA-1111.h - update to <asm/hardware/sa1111.h> | ||
5 | #include <asm/hardware/sa1111.h> | ||
diff --git a/arch/arm/mach-sa1100/include/mach/dma.h b/arch/arm/mach-sa1100/include/mach/dma.h new file mode 100644 index 00000000000..dda1b351310 --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/dma.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-sa1100/include/mach/dma.h | ||
3 | * | ||
4 | * Generic SA1100 DMA support | ||
5 | * | ||
6 | * Copyright (C) 2000 Nicolas Pitre | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_ARCH_DMA_H | ||
11 | #define __ASM_ARCH_DMA_H | ||
12 | |||
13 | #include "hardware.h" | ||
14 | |||
15 | |||
16 | /* | ||
17 | * The SA1100 has six internal DMA channels. | ||
18 | */ | ||
19 | #define SA1100_DMA_CHANNELS 6 | ||
20 | |||
21 | /* | ||
22 | * Maximum physical DMA buffer size | ||
23 | */ | ||
24 | #define MAX_DMA_SIZE 0x1fff | ||
25 | #define CUT_DMA_SIZE 0x1000 | ||
26 | |||
27 | /* | ||
28 | * All possible SA1100 devices a DMA channel can be attached to. | ||
29 | */ | ||
30 | typedef enum { | ||
31 | DMA_Ser0UDCWr = DDAR_Ser0UDCWr, /* Ser. port 0 UDC Write */ | ||
32 | DMA_Ser0UDCRd = DDAR_Ser0UDCRd, /* Ser. port 0 UDC Read */ | ||
33 | DMA_Ser1UARTWr = DDAR_Ser1UARTWr, /* Ser. port 1 UART Write */ | ||
34 | DMA_Ser1UARTRd = DDAR_Ser1UARTRd, /* Ser. port 1 UART Read */ | ||
35 | DMA_Ser1SDLCWr = DDAR_Ser1SDLCWr, /* Ser. port 1 SDLC Write */ | ||
36 | DMA_Ser1SDLCRd = DDAR_Ser1SDLCRd, /* Ser. port 1 SDLC Read */ | ||
37 | DMA_Ser2UARTWr = DDAR_Ser2UARTWr, /* Ser. port 2 UART Write */ | ||
38 | DMA_Ser2UARTRd = DDAR_Ser2UARTRd, /* Ser. port 2 UART Read */ | ||
39 | DMA_Ser2HSSPWr = DDAR_Ser2HSSPWr, /* Ser. port 2 HSSP Write */ | ||
40 | DMA_Ser2HSSPRd = DDAR_Ser2HSSPRd, /* Ser. port 2 HSSP Read */ | ||
41 | DMA_Ser3UARTWr = DDAR_Ser3UARTWr, /* Ser. port 3 UART Write */ | ||
42 | DMA_Ser3UARTRd = DDAR_Ser3UARTRd, /* Ser. port 3 UART Read */ | ||
43 | DMA_Ser4MCP0Wr = DDAR_Ser4MCP0Wr, /* Ser. port 4 MCP 0 Write (audio) */ | ||
44 | DMA_Ser4MCP0Rd = DDAR_Ser4MCP0Rd, /* Ser. port 4 MCP 0 Read (audio) */ | ||
45 | DMA_Ser4MCP1Wr = DDAR_Ser4MCP1Wr, /* Ser. port 4 MCP 1 Write */ | ||
46 | DMA_Ser4MCP1Rd = DDAR_Ser4MCP1Rd, /* Ser. port 4 MCP 1 Read */ | ||
47 | DMA_Ser4SSPWr = DDAR_Ser4SSPWr, /* Ser. port 4 SSP Write (16 bits) */ | ||
48 | DMA_Ser4SSPRd = DDAR_Ser4SSPRd /* Ser. port 4 SSP Read (16 bits) */ | ||
49 | } dma_device_t; | ||
50 | |||
51 | typedef struct { | ||
52 | volatile u_long DDAR; | ||
53 | volatile u_long SetDCSR; | ||
54 | volatile u_long ClrDCSR; | ||
55 | volatile u_long RdDCSR; | ||
56 | volatile dma_addr_t DBSA; | ||
57 | volatile u_long DBTA; | ||
58 | volatile dma_addr_t DBSB; | ||
59 | volatile u_long DBTB; | ||
60 | } dma_regs_t; | ||
61 | |||
62 | typedef void (*dma_callback_t)(void *data); | ||
63 | |||
64 | /* | ||
65 | * DMA function prototypes | ||
66 | */ | ||
67 | |||
68 | extern int sa1100_request_dma( dma_device_t device, const char *device_id, | ||
69 | dma_callback_t callback, void *data, | ||
70 | dma_regs_t **regs ); | ||
71 | extern void sa1100_free_dma( dma_regs_t *regs ); | ||
72 | extern int sa1100_start_dma( dma_regs_t *regs, dma_addr_t dma_ptr, u_int size ); | ||
73 | extern dma_addr_t sa1100_get_dma_pos(dma_regs_t *regs); | ||
74 | extern void sa1100_reset_dma(dma_regs_t *regs); | ||
75 | |||
76 | /** | ||
77 | * sa1100_stop_dma - stop DMA in progress | ||
78 | * @regs: identifier for the channel to use | ||
79 | * | ||
80 | * This stops DMA without clearing buffer pointers. Unlike | ||
81 | * sa1100_clear_dma() this allows subsequent use of sa1100_resume_dma() | ||
82 | * or sa1100_get_dma_pos(). | ||
83 | * | ||
84 | * The @regs identifier is provided by a successful call to | ||
85 | * sa1100_request_dma(). | ||
86 | **/ | ||
87 | |||
88 | #define sa1100_stop_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN) | ||
89 | |||
90 | /** | ||
91 | * sa1100_resume_dma - resume DMA on a stopped channel | ||
92 | * @regs: identifier for the channel to use | ||
93 | * | ||
94 | * This resumes DMA on a channel previously stopped with | ||
95 | * sa1100_stop_dma(). | ||
96 | * | ||
97 | * The @regs identifier is provided by a successful call to | ||
98 | * sa1100_request_dma(). | ||
99 | **/ | ||
100 | |||
101 | #define sa1100_resume_dma(regs) ((regs)->SetDCSR = DCSR_IE|DCSR_RUN) | ||
102 | |||
103 | /** | ||
104 | * sa1100_clear_dma - clear DMA pointers | ||
105 | * @regs: identifier for the channel to use | ||
106 | * | ||
107 | * This clear any DMA state so the DMA engine is ready to restart | ||
108 | * with new buffers through sa1100_start_dma(). Any buffers in flight | ||
109 | * are discarded. | ||
110 | * | ||
111 | * The @regs identifier is provided by a successful call to | ||
112 | * sa1100_request_dma(). | ||
113 | **/ | ||
114 | |||
115 | #define sa1100_clear_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN|DCSR_STRTA|DCSR_STRTB) | ||
116 | |||
117 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-sa1100/include/mach/io.h b/arch/arm/mach-sa1100/include/mach/io.h new file mode 100644 index 00000000000..d8b43f3dcd2 --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/io.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-sa1100/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (C) 1997-1999 Russell King | ||
5 | * | ||
6 | * Modifications: | ||
7 | * 06-12-1997 RMK Created. | ||
8 | * 07-04-1999 RMK Major cleanup | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_ARCH_IO_H | ||
11 | #define __ASM_ARM_ARCH_IO_H | ||
12 | |||
13 | #define IO_SPACE_LIMIT 0xffffffff | ||
14 | |||
15 | /* | ||
16 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
17 | * drivers out there that might just work if we fake them... | ||
18 | */ | ||
19 | #define __io(a) __typesafe_io(a) | ||
20 | #define __mem_pci(a) (a) | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-sa1100/include/mach/lart.h b/arch/arm/mach-sa1100/include/mach/lart.h new file mode 100644 index 00000000000..8a5482d908d --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/lart.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _INCLUDE_LART_H | ||
2 | #define _INCLUDE_LART_H | ||
3 | |||
4 | #define LART_GPIO_ETH0 GPIO_GPIO0 | ||
5 | #define LART_IRQ_ETH0 IRQ_GPIO0 | ||
6 | |||
7 | #define LART_GPIO_IDE GPIO_GPIO1 | ||
8 | #define LART_IRQ_IDE IRQ_GPIO1 | ||
9 | |||
10 | #define LART_GPIO_UCB1200 GPIO_GPIO18 | ||
11 | #define LART_IRQ_UCB1200 IRQ_GPIO18 | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h new file mode 100644 index 00000000000..ed1a331508a --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/mcp.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-sa1100/include/mach/mcp.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_ARCH_MCP_H | ||
11 | #define __ASM_ARM_ARCH_MCP_H | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | |||
15 | struct mcp_plat_data { | ||
16 | u32 mccr0; | ||
17 | u32 mccr1; | ||
18 | unsigned int sclk_rate; | ||
19 | int gpio_base; | ||
20 | }; | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h new file mode 100644 index 00000000000..ba9da9f7f18 --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/system.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-sa1100/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net> | ||
5 | */ | ||
6 | #include <mach/hardware.h> | ||
7 | |||
8 | static inline void arch_idle(void) | ||
9 | { | ||
10 | cpu_do_idle(); | ||
11 | } | ||
12 | |||
13 | static inline void arch_reset(char mode, const char *cmd) | ||
14 | { | ||
15 | if (mode == 's') { | ||
16 | /* Jump into ROM at address 0 */ | ||
17 | cpu_reset(0); | ||
18 | } else { | ||
19 | /* Use on-chip reset capability */ | ||
20 | RSRR = RSRR_SWR; | ||
21 | } | ||
22 | } | ||
diff --git a/arch/arm/mach-sa1100/include/mach/vmalloc.h b/arch/arm/mach-sa1100/include/mach/vmalloc.h new file mode 100644 index 00000000000..b3d00239848 --- /dev/null +++ b/arch/arm/mach-sa1100/include/mach/vmalloc.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-sa1100/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END (0xe8000000UL) | ||