diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-03-13 17:57:23 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2015-03-19 11:37:45 -0400 |
commit | 23b8408246aef28499a918b10425c1da4fef613a (patch) | |
tree | 330e5ba1033c92ce7d84e7499228267d602d3227 | |
parent | 4c8056543e6aa283fe03b1e96d2dd22816ee4350 (diff) |
ARM: at91: remove hardware.h
hardware.h is now mostyl unused, move the remaining declarations to pm.c and
remove it.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r-- | arch/arm/mach-at91/include/mach/hardware.h | 123 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm_suspend.S | 1 | ||||
-rw-r--r-- | arch/arm/mach-at91/sama5.c | 2 |
4 files changed, 9 insertions, 128 deletions
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h deleted file mode 100644 index 2f8ce2d69fdb..000000000000 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2003 SAN People | ||
5 | * Copyright (C) 2003 ATMEL | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_HARDWARE_H | ||
15 | #define __ASM_ARCH_HARDWARE_H | ||
16 | |||
17 | #include <asm/sizes.h> | ||
18 | |||
19 | /* DBGU base */ | ||
20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ | ||
21 | #define AT91_BASE_DBGU0 0xfffff200 | ||
22 | /* 9263, 9g45, sama5d3 */ | ||
23 | #define AT91_BASE_DBGU1 0xffffee00 | ||
24 | /* sama5d4 */ | ||
25 | #define AT91_BASE_DBGU2 0xfc069000 | ||
26 | |||
27 | /* | ||
28 | * On all at91 except rm9200 and x40 have the System Controller starts | ||
29 | * at address 0xffffc000 and has a size of 16KiB. | ||
30 | * | ||
31 | * On rm9200 it's start at 0xfffe4000 of 111KiB with non reserved data starting | ||
32 | * at 0xfffff000 | ||
33 | * | ||
34 | * Removes the individual definitions of AT91_BASE_SYS and | ||
35 | * replaces them with a common version at base 0xfffffc000 and size 16KiB | ||
36 | * and map the same memory space | ||
37 | */ | ||
38 | #define AT91_BASE_SYS 0xffffc000 | ||
39 | |||
40 | /* | ||
41 | * On sama5d4 there is no system controller, we map some needed peripherals | ||
42 | */ | ||
43 | #define AT91_ALT_BASE_SYS 0xfc069000 | ||
44 | |||
45 | /* | ||
46 | * On all at91 have the Advanced Interrupt Controller starts at address | ||
47 | * 0xfffff000 and the Power Management Controller starts at 0xfffffc00 | ||
48 | */ | ||
49 | #define AT91_AIC 0xfffff000 | ||
50 | #define AT91_PMC 0xfffffc00 | ||
51 | |||
52 | /* | ||
53 | * Peripheral identifiers/interrupts. | ||
54 | */ | ||
55 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
56 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
57 | |||
58 | #ifdef CONFIG_MMU | ||
59 | /* | ||
60 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF | ||
61 | * to 0xFEF78000 .. 0xFF000000. (544Kb) | ||
62 | */ | ||
63 | #define AT91_IO_PHYS_BASE 0xFFF78000 | ||
64 | #define AT91_IO_VIRT_BASE IOMEM(0xFF000000 - AT91_IO_SIZE) | ||
65 | |||
66 | /* | ||
67 | * On sama5d4, remap the peripherals from address 0xFC069000 .. 0xFC06F000 | ||
68 | * to 0xFB069000 .. 0xFB06F000. (24Kb) | ||
69 | */ | ||
70 | #define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS | ||
71 | #define AT91_ALT_IO_VIRT_BASE IOMEM(0xFB069000) | ||
72 | #else | ||
73 | /* | ||
74 | * Identity mapping for the non MMU case. | ||
75 | */ | ||
76 | #define AT91_IO_PHYS_BASE AT91_BASE_SYS | ||
77 | #define AT91_IO_VIRT_BASE IOMEM(AT91_IO_PHYS_BASE) | ||
78 | |||
79 | #define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS | ||
80 | #define AT91_ALT_IO_VIRT_BASE IOMEM(AT91_ALT_BASE_SYS) | ||
81 | #endif | ||
82 | |||
83 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | ||
84 | |||
85 | /* Convert a physical IO address to virtual IO address */ | ||
86 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) | ||
87 | #define AT91_ALT_IO_P2V(x) ((x) - AT91_ALT_IO_PHYS_BASE + AT91_ALT_IO_VIRT_BASE) | ||
88 | |||
89 | /* | ||
90 | * Virtual to Physical Address mapping for IO devices. | ||
91 | */ | ||
92 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) | ||
93 | #define AT91_ALT_VA_BASE_SYS AT91_ALT_IO_P2V(AT91_ALT_BASE_SYS) | ||
94 | |||
95 | /* Internal SRAM is mapped below the IO devices */ | ||
96 | #define AT91_SRAM_MAX SZ_1M | ||
97 | #define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX) | ||
98 | |||
99 | /* External Memory Map */ | ||
100 | #define AT91_CHIPSELECT_0 0x10000000 | ||
101 | #define AT91_CHIPSELECT_1 0x20000000 | ||
102 | #define AT91_CHIPSELECT_2 0x30000000 | ||
103 | #define AT91_CHIPSELECT_3 0x40000000 | ||
104 | #define AT91_CHIPSELECT_4 0x50000000 | ||
105 | #define AT91_CHIPSELECT_5 0x60000000 | ||
106 | #define AT91_CHIPSELECT_6 0x70000000 | ||
107 | #define AT91_CHIPSELECT_7 0x80000000 | ||
108 | |||
109 | /* Clocks */ | ||
110 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ | ||
111 | |||
112 | /* | ||
113 | * FIXME: this is needed to communicate between the pinctrl driver and | ||
114 | * the PM implementation in the machine. Possibly part of the PM | ||
115 | * implementation should be moved down into the pinctrl driver and get | ||
116 | * called as part of the generic suspend/resume path. | ||
117 | */ | ||
118 | #ifndef __ASSEMBLY__ | ||
119 | extern void at91_pinctrl_gpio_suspend(void); | ||
120 | extern void at91_pinctrl_gpio_resume(void); | ||
121 | #endif | ||
122 | |||
123 | #endif | ||
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 2a12c01afc67..f93a735ba327 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -32,11 +32,18 @@ | |||
32 | #include <asm/fncpy.h> | 32 | #include <asm/fncpy.h> |
33 | #include <asm/cacheflush.h> | 33 | #include <asm/cacheflush.h> |
34 | 34 | ||
35 | #include <mach/hardware.h> | ||
36 | |||
37 | #include "generic.h" | 35 | #include "generic.h" |
38 | #include "pm.h" | 36 | #include "pm.h" |
39 | 37 | ||
38 | /* | ||
39 | * FIXME: this is needed to communicate between the pinctrl driver and | ||
40 | * the PM implementation in the machine. Possibly part of the PM | ||
41 | * implementation should be moved down into the pinctrl driver and get | ||
42 | * called as part of the generic suspend/resume path. | ||
43 | */ | ||
44 | extern void at91_pinctrl_gpio_suspend(void); | ||
45 | extern void at91_pinctrl_gpio_resume(void); | ||
46 | |||
40 | static struct { | 47 | static struct { |
41 | unsigned long uhp_udp_mask; | 48 | unsigned long uhp_udp_mask; |
42 | int memctrl; | 49 | int memctrl; |
diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index 7c444c259740..bd22b2c8a051 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/clk/at91_pmc.h> | 15 | #include <linux/clk/at91_pmc.h> |
16 | #include <mach/hardware.h> | ||
17 | #include <mach/at91_ramc.h> | 16 | #include <mach/at91_ramc.h> |
18 | #include "pm.h" | 17 | #include "pm.h" |
19 | 18 | ||
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c index ef5d2073774b..41d829d8e7d5 100644 --- a/arch/arm/mach-at91/sama5.c +++ b/arch/arm/mach-at91/sama5.c | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
15 | #include <asm/system_misc.h> | 15 | #include <asm/system_misc.h> |
16 | 16 | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | #include "generic.h" | 17 | #include "generic.h" |
20 | #include "soc.h" | 18 | #include "soc.h" |
21 | 19 | ||