diff options
Diffstat (limited to 'arch/arm/mach-kirkwood/include')
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/gpio.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/io.h | 51 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/leds-netxbig.h | 55 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/leds-ns2.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/memory.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/system.h | 36 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/vmalloc.h | 5 |
7 files changed, 192 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/include/mach/gpio.h b/arch/arm/mach-kirkwood/include/mach/gpio.h new file mode 100644 index 00000000000..84f340b546c --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/gpio.h | |||
@@ -0,0 +1,9 @@ | |||
1 | /* | ||
2 | * arch/asm-arm/mach-kirkwood/include/mach/gpio.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <plat/gpio.h> | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h new file mode 100644 index 00000000000..1aaddc364f2 --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/io.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/io.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IO_H | ||
10 | #define __ASM_ARCH_IO_H | ||
11 | |||
12 | #include "kirkwood.h" | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | |||
16 | static inline void __iomem *__io(unsigned long addr) | ||
17 | { | ||
18 | return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_BUS_BASE) | ||
19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); | ||
20 | } | ||
21 | |||
22 | static inline void __iomem * | ||
23 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | ||
24 | { | ||
25 | void __iomem *retval; | ||
26 | unsigned long offs = paddr - KIRKWOOD_REGS_PHYS_BASE; | ||
27 | if (mtype == MT_DEVICE && size && offs < KIRKWOOD_REGS_SIZE && | ||
28 | size <= KIRKWOOD_REGS_SIZE && offs + size <= KIRKWOOD_REGS_SIZE) { | ||
29 | retval = (void __iomem *)KIRKWOOD_REGS_VIRT_BASE + offs; | ||
30 | } else { | ||
31 | retval = __arm_ioremap(paddr, size, mtype); | ||
32 | } | ||
33 | |||
34 | return retval; | ||
35 | } | ||
36 | |||
37 | static inline void | ||
38 | __arch_iounmap(void __iomem *addr) | ||
39 | { | ||
40 | if (addr < (void __iomem *)KIRKWOOD_REGS_VIRT_BASE || | ||
41 | addr >= (void __iomem *)(KIRKWOOD_REGS_VIRT_BASE + KIRKWOOD_REGS_SIZE)) | ||
42 | __iounmap(addr); | ||
43 | } | ||
44 | |||
45 | #define __arch_ioremap __arch_ioremap | ||
46 | #define __arch_iounmap __arch_iounmap | ||
47 | #define __io(a) __io(a) | ||
48 | #define __mem_pci(a) (a) | ||
49 | |||
50 | |||
51 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/leds-netxbig.h b/arch/arm/mach-kirkwood/include/mach/leds-netxbig.h new file mode 100644 index 00000000000..24b536ebdf1 --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/leds-netxbig.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/leds-netxbig.h | ||
3 | * | ||
4 | * Platform data structure for netxbig LED driver | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MACH_LEDS_NETXBIG_H | ||
12 | #define __MACH_LEDS_NETXBIG_H | ||
13 | |||
14 | struct netxbig_gpio_ext { | ||
15 | unsigned *addr; | ||
16 | int num_addr; | ||
17 | unsigned *data; | ||
18 | int num_data; | ||
19 | unsigned enable; | ||
20 | }; | ||
21 | |||
22 | enum netxbig_led_mode { | ||
23 | NETXBIG_LED_OFF, | ||
24 | NETXBIG_LED_ON, | ||
25 | NETXBIG_LED_SATA, | ||
26 | NETXBIG_LED_TIMER1, | ||
27 | NETXBIG_LED_TIMER2, | ||
28 | NETXBIG_LED_MODE_NUM, | ||
29 | }; | ||
30 | |||
31 | #define NETXBIG_LED_INVALID_MODE NETXBIG_LED_MODE_NUM | ||
32 | |||
33 | struct netxbig_led_timer { | ||
34 | unsigned long delay_on; | ||
35 | unsigned long delay_off; | ||
36 | enum netxbig_led_mode mode; | ||
37 | }; | ||
38 | |||
39 | struct netxbig_led { | ||
40 | const char *name; | ||
41 | const char *default_trigger; | ||
42 | int mode_addr; | ||
43 | int *mode_val; | ||
44 | int bright_addr; | ||
45 | }; | ||
46 | |||
47 | struct netxbig_led_platform_data { | ||
48 | struct netxbig_gpio_ext *gpio_ext; | ||
49 | struct netxbig_led_timer *timer; | ||
50 | int num_timer; | ||
51 | struct netxbig_led *leds; | ||
52 | int num_leds; | ||
53 | }; | ||
54 | |||
55 | #endif /* __MACH_LEDS_NETXBIG_H */ | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/leds-ns2.h b/arch/arm/mach-kirkwood/include/mach/leds-ns2.h new file mode 100644 index 00000000000..e21272e5f66 --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/leds-ns2.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/leds-ns2.h | ||
3 | * | ||
4 | * Platform data structure for Network Space v2 LED driver | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MACH_LEDS_NS2_H | ||
12 | #define __MACH_LEDS_NS2_H | ||
13 | |||
14 | struct ns2_led { | ||
15 | const char *name; | ||
16 | const char *default_trigger; | ||
17 | unsigned cmd; | ||
18 | unsigned slow; | ||
19 | }; | ||
20 | |||
21 | struct ns2_led_platform_data { | ||
22 | int num_leds; | ||
23 | struct ns2_led *leds; | ||
24 | }; | ||
25 | |||
26 | #endif /* __MACH_LEDS_NS2_H */ | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h new file mode 100644 index 00000000000..4600b44e3ad --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/memory.h | |||
@@ -0,0 +1,10 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h new file mode 100644 index 00000000000..7568e95d279 --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/system.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/system.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_SYSTEM_H | ||
10 | #define __ASM_ARCH_SYSTEM_H | ||
11 | |||
12 | #include <mach/bridge-regs.h> | ||
13 | |||
14 | static inline void arch_idle(void) | ||
15 | { | ||
16 | cpu_do_idle(); | ||
17 | } | ||
18 | |||
19 | static inline void arch_reset(char mode, const char *cmd) | ||
20 | { | ||
21 | /* | ||
22 | * Enable soft reset to assert RSTOUTn. | ||
23 | */ | ||
24 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
25 | |||
26 | /* | ||
27 | * Assert soft reset. | ||
28 | */ | ||
29 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
30 | |||
31 | while (1) | ||
32 | ; | ||
33 | } | ||
34 | |||
35 | |||
36 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/vmalloc.h b/arch/arm/mach-kirkwood/include/mach/vmalloc.h new file mode 100644 index 00000000000..bf162ca3d2c --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000UL | ||