diff options
Diffstat (limited to 'arch')
190 files changed, 1500 insertions, 6115 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7275009686e6..9adc278a22ab 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -294,6 +294,8 @@ config ARCH_AT91 | |||
294 | bool "Atmel AT91" | 294 | bool "Atmel AT91" |
295 | select ARCH_REQUIRE_GPIOLIB | 295 | select ARCH_REQUIRE_GPIOLIB |
296 | select HAVE_CLK | 296 | select HAVE_CLK |
297 | select CLKDEV_LOOKUP | ||
298 | select ARM_PATCH_PHYS_VIRT if MMU | ||
297 | help | 299 | help |
298 | This enables support for systems based on the Atmel AT91RM9200, | 300 | This enables support for systems based on the Atmel AT91RM9200, |
299 | AT91SAM9 and AT91CAP9 processors. | 301 | AT91SAM9 and AT91CAP9 processors. |
@@ -730,16 +732,6 @@ config ARCH_S5P64X0 | |||
730 | Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, | 732 | Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, |
731 | SMDK6450. | 733 | SMDK6450. |
732 | 734 | ||
733 | config ARCH_S5P6442 | ||
734 | bool "Samsung S5P6442" | ||
735 | select CPU_V6 | ||
736 | select GENERIC_GPIO | ||
737 | select HAVE_CLK | ||
738 | select ARCH_USES_GETTIMEOFFSET | ||
739 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | ||
740 | help | ||
741 | Samsung S5P6442 CPU based systems | ||
742 | |||
743 | config ARCH_S5PC100 | 735 | config ARCH_S5PC100 |
744 | bool "Samsung S5PC100" | 736 | bool "Samsung S5PC100" |
745 | select GENERIC_GPIO | 737 | select GENERIC_GPIO |
@@ -991,8 +983,6 @@ endif | |||
991 | 983 | ||
992 | source "arch/arm/mach-s5p64x0/Kconfig" | 984 | source "arch/arm/mach-s5p64x0/Kconfig" |
993 | 985 | ||
994 | source "arch/arm/mach-s5p6442/Kconfig" | ||
995 | |||
996 | source "arch/arm/mach-s5pc100/Kconfig" | 986 | source "arch/arm/mach-s5pc100/Kconfig" |
997 | 987 | ||
998 | source "arch/arm/mach-s5pv210/Kconfig" | 988 | source "arch/arm/mach-s5pv210/Kconfig" |
@@ -1399,7 +1389,6 @@ config NR_CPUS | |||
1399 | config HOTPLUG_CPU | 1389 | config HOTPLUG_CPU |
1400 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 1390 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
1401 | depends on SMP && HOTPLUG && EXPERIMENTAL | 1391 | depends on SMP && HOTPLUG && EXPERIMENTAL |
1402 | depends on !ARCH_MSM | ||
1403 | help | 1392 | help |
1404 | Say Y here to experiment with turning CPUs off and on. CPUs | 1393 | Say Y here to experiment with turning CPUs off and on. CPUs |
1405 | can be controlled through /sys/devices/system/cpu. | 1394 | can be controlled through /sys/devices/system/cpu. |
@@ -1420,7 +1409,7 @@ source kernel/Kconfig.preempt | |||
1420 | config HZ | 1409 | config HZ |
1421 | int | 1410 | int |
1422 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P64X0 || \ | 1411 | default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P64X0 || \ |
1423 | ARCH_S5P6442 || ARCH_S5PV210 || ARCH_EXYNOS4 | 1412 | ARCH_S5PV210 || ARCH_EXYNOS4 |
1424 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER | 1413 | default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER |
1425 | default AT91_TIMER_HZ if ARCH_AT91 | 1414 | default AT91_TIMER_HZ if ARCH_AT91 |
1426 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE | 1415 | default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE |
@@ -1516,6 +1505,9 @@ config ARCH_SPARSEMEM_DEFAULT | |||
1516 | config ARCH_SELECT_MEMORY_MODEL | 1505 | config ARCH_SELECT_MEMORY_MODEL |
1517 | def_bool ARCH_SPARSEMEM_ENABLE | 1506 | def_bool ARCH_SPARSEMEM_ENABLE |
1518 | 1507 | ||
1508 | config HAVE_ARCH_PFN_VALID | ||
1509 | def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM | ||
1510 | |||
1519 | config HIGHMEM | 1511 | config HIGHMEM |
1520 | bool "High Memory Support" | 1512 | bool "High Memory Support" |
1521 | depends on MMU | 1513 | depends on MMU |
@@ -1683,6 +1675,13 @@ endmenu | |||
1683 | 1675 | ||
1684 | menu "Boot options" | 1676 | menu "Boot options" |
1685 | 1677 | ||
1678 | config USE_OF | ||
1679 | bool "Flattened Device Tree support" | ||
1680 | select OF | ||
1681 | select OF_EARLY_FLATTREE | ||
1682 | help | ||
1683 | Include support for flattened device tree machine descriptions. | ||
1684 | |||
1686 | # Compressed boot loader in ROM. Yes, we really want to ask about | 1685 | # Compressed boot loader in ROM. Yes, we really want to ask about |
1687 | # TEXT and BSS so we preserve their values in the config files. | 1686 | # TEXT and BSS so we preserve their values in the config files. |
1688 | config ZBOOT_ROM_TEXT | 1687 | config ZBOOT_ROM_TEXT |
@@ -2021,7 +2020,7 @@ menu "Power management options" | |||
2021 | source "kernel/power/Kconfig" | 2020 | source "kernel/power/Kconfig" |
2022 | 2021 | ||
2023 | config ARCH_SUSPEND_POSSIBLE | 2022 | config ARCH_SUSPEND_POSSIBLE |
2024 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100 | 2023 | depends on !ARCH_S5P64X0 && !ARCH_S5PC100 |
2025 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ | 2024 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ |
2026 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | 2025 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE |
2027 | def_bool y | 2026 | def_bool y |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 25750bcb3397..f5b2b390c8f2 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -176,7 +176,6 @@ machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2416 s3c2440 s3c24 | |||
176 | machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 | 176 | machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 |
177 | machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx | 177 | machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx |
178 | machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0 | 178 | machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0 |
179 | machine-$(CONFIG_ARCH_S5P6442) := s5p6442 | ||
180 | machine-$(CONFIG_ARCH_S5PC100) := s5pc100 | 179 | machine-$(CONFIG_ARCH_S5PC100) := s5pc100 |
181 | machine-$(CONFIG_ARCH_S5PV210) := s5pv210 | 180 | machine-$(CONFIG_ARCH_S5PV210) := s5pv210 |
182 | machine-$(CONFIG_ARCH_EXYNOS4) := exynos4 | 181 | machine-$(CONFIG_ARCH_EXYNOS4) := exynos4 |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index ea5ee4d067f3..4b71766fb21d 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -7,7 +7,7 @@ config ARM_VIC | |||
7 | config ARM_VIC_NR | 7 | config ARM_VIC_NR |
8 | int | 8 | int |
9 | default 4 if ARCH_S5PV210 | 9 | default 4 if ARCH_S5PV210 |
10 | default 3 if ARCH_S5P6442 || ARCH_S5PC100 | 10 | default 3 if ARCH_S5PC100 |
11 | default 2 | 11 | default 2 |
12 | depends on ARM_VIC | 12 | depends on ARM_VIC |
13 | help | 13 | help |
diff --git a/arch/arm/configs/at572d940hfek_defconfig b/arch/arm/configs/at572d940hfek_defconfig deleted file mode 100644 index 1b1158ae8f82..000000000000 --- a/arch/arm/configs/at572d940hfek_defconfig +++ /dev/null | |||
@@ -1,358 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_LOCALVERSION="-AT572D940HF" | ||
3 | # CONFIG_LOCALVERSION_AUTO is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_POSIX_MQUEUE=y | ||
6 | CONFIG_BSD_PROCESS_ACCT=y | ||
7 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
8 | CONFIG_TASKSTATS=y | ||
9 | CONFIG_TASK_XACCT=y | ||
10 | CONFIG_TASK_IO_ACCOUNTING=y | ||
11 | CONFIG_AUDIT=y | ||
12 | CONFIG_CGROUPS=y | ||
13 | CONFIG_CGROUP_CPUACCT=y | ||
14 | CONFIG_CGROUP_SCHED=y | ||
15 | CONFIG_RT_GROUP_SCHED=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_RELAY=y | ||
18 | CONFIG_BLK_DEV_INITRD=y | ||
19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
20 | CONFIG_EXPERT=y | ||
21 | CONFIG_SLAB=y | ||
22 | CONFIG_PROFILING=y | ||
23 | CONFIG_OPROFILE=m | ||
24 | CONFIG_KPROBES=y | ||
25 | CONFIG_MODULES=y | ||
26 | CONFIG_MODULE_UNLOAD=y | ||
27 | CONFIG_MODVERSIONS=y | ||
28 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
29 | # CONFIG_BLK_DEV_BSG is not set | ||
30 | CONFIG_ARCH_AT91=y | ||
31 | CONFIG_ARCH_AT572D940HF=y | ||
32 | CONFIG_MACH_AT572D940HFEB=y | ||
33 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
34 | CONFIG_NO_HZ=y | ||
35 | CONFIG_HIGH_RES_TIMERS=y | ||
36 | CONFIG_PREEMPT=y | ||
37 | CONFIG_CMDLINE="mem=48M console=ttyS0 initrd=0x21100000,3145728 root=/dev/ram0 rw ip=172.16.1.181" | ||
38 | CONFIG_KEXEC=y | ||
39 | CONFIG_FPE_NWFPE=y | ||
40 | CONFIG_FPE_NWFPE_XP=y | ||
41 | CONFIG_NET=y | ||
42 | CONFIG_PACKET=m | ||
43 | CONFIG_UNIX=y | ||
44 | CONFIG_INET=y | ||
45 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
46 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
47 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
48 | # CONFIG_INET_LRO is not set | ||
49 | # CONFIG_INET_DIAG is not set | ||
50 | # CONFIG_IPV6 is not set | ||
51 | CONFIG_NET_PKTGEN=m | ||
52 | CONFIG_NET_TCPPROBE=m | ||
53 | CONFIG_CAN=m | ||
54 | CONFIG_CAN_RAW=m | ||
55 | CONFIG_CAN_BCM=m | ||
56 | CONFIG_CAN_VCAN=m | ||
57 | CONFIG_CAN_DEBUG_DEVICES=y | ||
58 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
59 | CONFIG_CONNECTOR=m | ||
60 | CONFIG_MTD=m | ||
61 | CONFIG_MTD_DEBUG=y | ||
62 | CONFIG_MTD_DEBUG_VERBOSE=1 | ||
63 | CONFIG_MTD_CONCAT=m | ||
64 | CONFIG_MTD_PARTITIONS=y | ||
65 | CONFIG_MTD_CHAR=m | ||
66 | CONFIG_MTD_BLOCK=m | ||
67 | CONFIG_MTD_BLOCK_RO=m | ||
68 | CONFIG_FTL=m | ||
69 | CONFIG_NFTL=m | ||
70 | CONFIG_NFTL_RW=y | ||
71 | CONFIG_INFTL=m | ||
72 | CONFIG_RFD_FTL=m | ||
73 | CONFIG_SSFDC=m | ||
74 | CONFIG_MTD_OOPS=m | ||
75 | CONFIG_MTD_CFI=m | ||
76 | CONFIG_MTD_JEDECPROBE=m | ||
77 | CONFIG_MTD_CFI_INTELEXT=m | ||
78 | CONFIG_MTD_CFI_AMDSTD=m | ||
79 | CONFIG_MTD_CFI_STAA=m | ||
80 | CONFIG_MTD_ROM=m | ||
81 | CONFIG_MTD_ABSENT=m | ||
82 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
83 | CONFIG_MTD_PHYSMAP=m | ||
84 | CONFIG_MTD_PLATRAM=m | ||
85 | CONFIG_MTD_DATAFLASH=m | ||
86 | CONFIG_MTD_M25P80=m | ||
87 | CONFIG_MTD_SLRAM=m | ||
88 | CONFIG_MTD_PHRAM=m | ||
89 | CONFIG_MTD_MTDRAM=m | ||
90 | CONFIG_MTD_BLOCK2MTD=m | ||
91 | CONFIG_MTD_NAND=m | ||
92 | CONFIG_MTD_NAND_VERIFY_WRITE=y | ||
93 | CONFIG_MTD_NAND_DISKONCHIP=m | ||
94 | CONFIG_MTD_NAND_NANDSIM=m | ||
95 | CONFIG_MTD_NAND_PLATFORM=m | ||
96 | CONFIG_MTD_ALAUDA=m | ||
97 | CONFIG_MTD_UBI=m | ||
98 | CONFIG_MTD_UBI_GLUEBI=m | ||
99 | CONFIG_BLK_DEV_LOOP=y | ||
100 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
101 | CONFIG_BLK_DEV_NBD=m | ||
102 | CONFIG_BLK_DEV_RAM=y | ||
103 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
104 | CONFIG_ATMEL_TCLIB=y | ||
105 | CONFIG_ATMEL_SSC=m | ||
106 | CONFIG_SENSORS_TSL2550=m | ||
107 | CONFIG_DS1682=m | ||
108 | CONFIG_RAID_ATTRS=m | ||
109 | CONFIG_SCSI=m | ||
110 | CONFIG_SCSI_TGT=m | ||
111 | # CONFIG_SCSI_PROC_FS is not set | ||
112 | CONFIG_BLK_DEV_SD=m | ||
113 | CONFIG_BLK_DEV_SR=m | ||
114 | CONFIG_CHR_DEV_SG=m | ||
115 | CONFIG_CHR_DEV_SCH=m | ||
116 | CONFIG_SCSI_MULTI_LUN=y | ||
117 | CONFIG_SCSI_CONSTANTS=y | ||
118 | CONFIG_SCSI_LOGGING=y | ||
119 | CONFIG_SCSI_SCAN_ASYNC=y | ||
120 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
121 | CONFIG_NETDEVICES=y | ||
122 | CONFIG_DUMMY=m | ||
123 | CONFIG_BONDING=m | ||
124 | CONFIG_MACVLAN=m | ||
125 | CONFIG_EQUALIZER=m | ||
126 | CONFIG_TUN=m | ||
127 | CONFIG_VETH=m | ||
128 | CONFIG_PHYLIB=y | ||
129 | CONFIG_MARVELL_PHY=m | ||
130 | CONFIG_DAVICOM_PHY=m | ||
131 | CONFIG_QSEMI_PHY=m | ||
132 | CONFIG_LXT_PHY=m | ||
133 | CONFIG_CICADA_PHY=m | ||
134 | CONFIG_VITESSE_PHY=m | ||
135 | CONFIG_SMSC_PHY=m | ||
136 | CONFIG_BROADCOM_PHY=m | ||
137 | CONFIG_ICPLUS_PHY=m | ||
138 | CONFIG_MDIO_BITBANG=m | ||
139 | CONFIG_NET_ETHERNET=y | ||
140 | # CONFIG_NETDEV_1000 is not set | ||
141 | # CONFIG_NETDEV_10000 is not set | ||
142 | CONFIG_USB_ZD1201=m | ||
143 | CONFIG_HOSTAP=m | ||
144 | CONFIG_HOSTAP_FIRMWARE=y | ||
145 | CONFIG_HOSTAP_FIRMWARE_NVRAM=y | ||
146 | CONFIG_USB_CATC=m | ||
147 | CONFIG_USB_KAWETH=m | ||
148 | CONFIG_USB_PEGASUS=m | ||
149 | CONFIG_USB_RTL8150=m | ||
150 | CONFIG_USB_USBNET=m | ||
151 | CONFIG_USB_NET_DM9601=m | ||
152 | CONFIG_USB_NET_GL620A=m | ||
153 | CONFIG_USB_NET_PLUSB=m | ||
154 | CONFIG_USB_NET_MCS7830=m | ||
155 | CONFIG_USB_NET_RNDIS_HOST=m | ||
156 | CONFIG_USB_ALI_M5632=y | ||
157 | CONFIG_USB_AN2720=y | ||
158 | CONFIG_USB_EPSON2888=y | ||
159 | CONFIG_USB_KC2190=y | ||
160 | # CONFIG_USB_NET_ZAURUS is not set | ||
161 | CONFIG_INPUT_MOUSEDEV=m | ||
162 | CONFIG_INPUT_EVDEV=m | ||
163 | CONFIG_INPUT_EVBUG=m | ||
164 | CONFIG_KEYBOARD_LKKBD=m | ||
165 | CONFIG_KEYBOARD_GPIO=m | ||
166 | CONFIG_KEYBOARD_NEWTON=m | ||
167 | CONFIG_KEYBOARD_STOWAWAY=m | ||
168 | CONFIG_KEYBOARD_SUNKBD=m | ||
169 | CONFIG_KEYBOARD_XTKBD=m | ||
170 | CONFIG_MOUSE_PS2=m | ||
171 | CONFIG_MOUSE_SERIAL=m | ||
172 | CONFIG_MOUSE_APPLETOUCH=m | ||
173 | CONFIG_MOUSE_VSXXXAA=m | ||
174 | CONFIG_MOUSE_GPIO=m | ||
175 | CONFIG_INPUT_MISC=y | ||
176 | CONFIG_INPUT_UINPUT=m | ||
177 | CONFIG_SERIO_SERPORT=m | ||
178 | CONFIG_SERIO_RAW=m | ||
179 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
180 | CONFIG_SERIAL_NONSTANDARD=y | ||
181 | CONFIG_N_HDLC=m | ||
182 | CONFIG_SPECIALIX=m | ||
183 | CONFIG_STALDRV=y | ||
184 | CONFIG_SERIAL_ATMEL=y | ||
185 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
186 | CONFIG_IPMI_HANDLER=m | ||
187 | CONFIG_IPMI_DEVICE_INTERFACE=m | ||
188 | CONFIG_IPMI_SI=m | ||
189 | CONFIG_IPMI_WATCHDOG=m | ||
190 | CONFIG_IPMI_POWEROFF=m | ||
191 | CONFIG_HW_RANDOM=y | ||
192 | CONFIG_R3964=m | ||
193 | CONFIG_RAW_DRIVER=m | ||
194 | CONFIG_TCG_TPM=m | ||
195 | CONFIG_TCG_NSC=m | ||
196 | CONFIG_TCG_ATMEL=m | ||
197 | CONFIG_I2C=m | ||
198 | CONFIG_I2C_CHARDEV=m | ||
199 | CONFIG_SPI=y | ||
200 | CONFIG_SPI_ATMEL=y | ||
201 | CONFIG_SPI_BITBANG=m | ||
202 | CONFIG_SPI_SPIDEV=m | ||
203 | # CONFIG_HWMON is not set | ||
204 | # CONFIG_VGA_CONSOLE is not set | ||
205 | CONFIG_SOUND=m | ||
206 | CONFIG_SND=m | ||
207 | CONFIG_SND_SEQUENCER=m | ||
208 | CONFIG_SND_SEQ_DUMMY=m | ||
209 | CONFIG_SND_MIXER_OSS=m | ||
210 | CONFIG_SND_PCM_OSS=m | ||
211 | # CONFIG_SND_PCM_OSS_PLUGINS is not set | ||
212 | CONFIG_SND_SEQUENCER_OSS=y | ||
213 | CONFIG_SND_DYNAMIC_MINORS=y | ||
214 | # CONFIG_SND_VERBOSE_PROCFS is not set | ||
215 | CONFIG_SND_DUMMY=m | ||
216 | CONFIG_SND_VIRMIDI=m | ||
217 | CONFIG_SND_USB_AUDIO=m | ||
218 | CONFIG_SND_USB_CAIAQ=m | ||
219 | CONFIG_SND_USB_CAIAQ_INPUT=y | ||
220 | CONFIG_HID=m | ||
221 | CONFIG_HIDRAW=y | ||
222 | CONFIG_USB_HID=m | ||
223 | CONFIG_USB_HIDDEV=y | ||
224 | CONFIG_USB_KBD=m | ||
225 | CONFIG_USB_MOUSE=m | ||
226 | CONFIG_HID_A4TECH=m | ||
227 | CONFIG_HID_APPLE=m | ||
228 | CONFIG_HID_BELKIN=m | ||
229 | CONFIG_HID_CHERRY=m | ||
230 | CONFIG_HID_CHICONY=m | ||
231 | CONFIG_HID_CYPRESS=m | ||
232 | CONFIG_HID_EZKEY=m | ||
233 | CONFIG_HID_GYRATION=m | ||
234 | CONFIG_HID_LOGITECH=m | ||
235 | CONFIG_HID_MICROSOFT=m | ||
236 | CONFIG_HID_MONTEREY=m | ||
237 | CONFIG_HID_PANTHERLORD=m | ||
238 | CONFIG_HID_PETALYNX=m | ||
239 | CONFIG_HID_SAMSUNG=m | ||
240 | CONFIG_HID_SONY=m | ||
241 | CONFIG_HID_SUNPLUS=m | ||
242 | CONFIG_USB=y | ||
243 | CONFIG_USB_DEVICEFS=y | ||
244 | # CONFIG_USB_DEVICE_CLASS is not set | ||
245 | CONFIG_USB_DYNAMIC_MINORS=y | ||
246 | CONFIG_USB_MON=y | ||
247 | CONFIG_USB_OHCI_HCD=y | ||
248 | CONFIG_USB_STORAGE=m | ||
249 | CONFIG_USB_STORAGE_DATAFAB=m | ||
250 | CONFIG_USB_STORAGE_FREECOM=m | ||
251 | CONFIG_USB_STORAGE_ISD200=m | ||
252 | CONFIG_USB_STORAGE_USBAT=m | ||
253 | CONFIG_USB_STORAGE_SDDR09=m | ||
254 | CONFIG_USB_STORAGE_SDDR55=m | ||
255 | CONFIG_USB_STORAGE_JUMPSHOT=m | ||
256 | CONFIG_USB_STORAGE_ALAUDA=m | ||
257 | CONFIG_USB_STORAGE_KARMA=m | ||
258 | CONFIG_USB_LIBUSUAL=y | ||
259 | CONFIG_USB_SERIAL=m | ||
260 | CONFIG_USB_EZUSB=y | ||
261 | CONFIG_USB_SERIAL_GENERIC=y | ||
262 | CONFIG_USB_SERIAL_PL2303=m | ||
263 | CONFIG_USB_SERIAL_SPCP8X5=m | ||
264 | CONFIG_USB_SERIAL_DEBUG=m | ||
265 | CONFIG_USB_EMI62=m | ||
266 | CONFIG_USB_EMI26=m | ||
267 | CONFIG_USB_ADUTUX=m | ||
268 | CONFIG_USB_TEST=m | ||
269 | CONFIG_USB_GADGET=m | ||
270 | CONFIG_USB_GADGET_DEBUG_FILES=y | ||
271 | CONFIG_USB_GADGET_DEBUG_FS=y | ||
272 | CONFIG_USB_ZERO=m | ||
273 | CONFIG_USB_ETH=m | ||
274 | CONFIG_USB_GADGETFS=m | ||
275 | CONFIG_USB_FILE_STORAGE=m | ||
276 | CONFIG_USB_G_SERIAL=m | ||
277 | CONFIG_USB_MIDI_GADGET=m | ||
278 | CONFIG_MMC=y | ||
279 | CONFIG_SDIO_UART=m | ||
280 | CONFIG_MMC_AT91=m | ||
281 | CONFIG_MMC_SPI=m | ||
282 | CONFIG_NEW_LEDS=y | ||
283 | CONFIG_LEDS_CLASS=m | ||
284 | CONFIG_LEDS_GPIO=m | ||
285 | CONFIG_LEDS_TRIGGERS=y | ||
286 | CONFIG_LEDS_TRIGGER_TIMER=m | ||
287 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | ||
288 | CONFIG_RTC_CLASS=y | ||
289 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | ||
290 | CONFIG_RTC_DRV_DS1307=m | ||
291 | CONFIG_RTC_DRV_DS1305=y | ||
292 | CONFIG_EXT2_FS=y | ||
293 | CONFIG_EXT2_FS_XATTR=y | ||
294 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
295 | CONFIG_EXT2_FS_SECURITY=y | ||
296 | CONFIG_EXT3_FS=y | ||
297 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
298 | CONFIG_EXT3_FS_SECURITY=y | ||
299 | CONFIG_JBD_DEBUG=y | ||
300 | CONFIG_REISERFS_FS=m | ||
301 | CONFIG_REISERFS_CHECK=y | ||
302 | CONFIG_REISERFS_PROC_INFO=y | ||
303 | CONFIG_REISERFS_FS_XATTR=y | ||
304 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
305 | CONFIG_REISERFS_FS_SECURITY=y | ||
306 | CONFIG_INOTIFY=y | ||
307 | CONFIG_FUSE_FS=m | ||
308 | CONFIG_MSDOS_FS=m | ||
309 | CONFIG_VFAT_FS=y | ||
310 | CONFIG_NTFS_FS=m | ||
311 | CONFIG_NTFS_RW=y | ||
312 | CONFIG_TMPFS=y | ||
313 | CONFIG_TMPFS_POSIX_ACL=y | ||
314 | CONFIG_JFFS2_FS=m | ||
315 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
316 | CONFIG_JFFS2_LZO=y | ||
317 | CONFIG_JFFS2_CMODE_FAVOURLZO=y | ||
318 | CONFIG_CRAMFS=m | ||
319 | CONFIG_NFS_FS=m | ||
320 | CONFIG_NFS_V3=y | ||
321 | CONFIG_NFS_V3_ACL=y | ||
322 | CONFIG_NFS_V4=y | ||
323 | CONFIG_NFSD=m | ||
324 | CONFIG_NFSD_V3_ACL=y | ||
325 | CONFIG_NFSD_V4=y | ||
326 | CONFIG_CIFS=m | ||
327 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
328 | CONFIG_PARTITION_ADVANCED=y | ||
329 | CONFIG_MAC_PARTITION=y | ||
330 | CONFIG_BSD_DISKLABEL=y | ||
331 | CONFIG_MINIX_SUBPARTITION=y | ||
332 | CONFIG_SOLARIS_X86_PARTITION=y | ||
333 | CONFIG_UNIXWARE_DISKLABEL=y | ||
334 | CONFIG_LDM_PARTITION=y | ||
335 | CONFIG_LDM_DEBUG=y | ||
336 | CONFIG_SGI_PARTITION=y | ||
337 | CONFIG_SUN_PARTITION=y | ||
338 | CONFIG_NLS_DEFAULT="cp437" | ||
339 | CONFIG_NLS_CODEPAGE_437=y | ||
340 | CONFIG_NLS_CODEPAGE_850=m | ||
341 | CONFIG_NLS_ASCII=y | ||
342 | CONFIG_NLS_ISO8859_1=y | ||
343 | CONFIG_NLS_UTF8=m | ||
344 | CONFIG_DLM=m | ||
345 | CONFIG_PRINTK_TIME=y | ||
346 | CONFIG_MAGIC_SYSRQ=y | ||
347 | CONFIG_UNUSED_SYMBOLS=y | ||
348 | CONFIG_DEBUG_FS=y | ||
349 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
350 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
351 | CONFIG_CRYPTO=y | ||
352 | CONFIG_CRYPTO_GF128MUL=m | ||
353 | CONFIG_CRYPTO_HMAC=y | ||
354 | CONFIG_CRYPTO_MD5=y | ||
355 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
356 | # CONFIG_CRYPTO_HW is not set | ||
357 | CONFIG_CRC_CCITT=m | ||
358 | CONFIG_CRC16=m | ||
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261_defconfig index b46025b66b64..ade6b2f23116 100644 --- a/arch/arm/configs/at91sam9261ek_defconfig +++ b/arch/arm/configs/at91sam9261_defconfig | |||
@@ -1,9 +1,13 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_KERNEL_LZMA=y | ||
3 | # CONFIG_SWAP is not set | 4 | # CONFIG_SWAP is not set |
4 | CONFIG_SYSVIPC=y | 5 | CONFIG_SYSVIPC=y |
6 | CONFIG_IKCONFIG=y | ||
7 | CONFIG_IKCONFIG_PROC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_NAMESPACES=y |
10 | CONFIG_EMBEDDED=y | ||
7 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 13 | CONFIG_MODULE_UNLOAD=y |
@@ -15,18 +19,27 @@ CONFIG_ARCH_AT91SAM9261=y | |||
15 | CONFIG_MACH_AT91SAM9261EK=y | 19 | CONFIG_MACH_AT91SAM9261EK=y |
16 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | 20 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y |
17 | # CONFIG_ARM_THUMB is not set | 21 | # CONFIG_ARM_THUMB is not set |
22 | CONFIG_AEABI=y | ||
23 | # CONFIG_OABI_COMPAT is not set | ||
18 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 24 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
19 | CONFIG_ZBOOT_ROM_BSS=0x0 | 25 | CONFIG_ZBOOT_ROM_BSS=0x0 |
20 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | 26 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" |
21 | CONFIG_FPE_NWFPE=y | 27 | CONFIG_AUTO_ZRELADDR=y |
28 | CONFIG_VFP=y | ||
29 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
22 | CONFIG_NET=y | 30 | CONFIG_NET=y |
23 | CONFIG_PACKET=y | 31 | CONFIG_PACKET=y |
24 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
25 | CONFIG_INET=y | 33 | CONFIG_INET=y |
34 | CONFIG_IP_MULTICAST=y | ||
26 | CONFIG_IP_PNP=y | 35 | CONFIG_IP_PNP=y |
36 | CONFIG_IP_PNP_DHCP=y | ||
27 | CONFIG_IP_PNP_BOOTP=y | 37 | CONFIG_IP_PNP_BOOTP=y |
28 | # CONFIG_INET_LRO is not set | 38 | # CONFIG_INET_LRO is not set |
29 | # CONFIG_IPV6 is not set | 39 | # CONFIG_IPV6 is not set |
40 | CONFIG_CFG80211=y | ||
41 | CONFIG_LIB80211=y | ||
42 | CONFIG_MAC80211=y | ||
30 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 43 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
31 | CONFIG_MTD=y | 44 | CONFIG_MTD=y |
32 | CONFIG_MTD_PARTITIONS=y | 45 | CONFIG_MTD_PARTITIONS=y |
@@ -34,8 +47,12 @@ CONFIG_MTD_CMDLINE_PARTS=y | |||
34 | CONFIG_MTD_BLOCK=y | 47 | CONFIG_MTD_BLOCK=y |
35 | CONFIG_MTD_NAND=y | 48 | CONFIG_MTD_NAND=y |
36 | CONFIG_MTD_NAND_ATMEL=y | 49 | CONFIG_MTD_NAND_ATMEL=y |
50 | CONFIG_MTD_UBI=y | ||
51 | CONFIG_MTD_UBI_GLUEBI=y | ||
37 | CONFIG_BLK_DEV_RAM=y | 52 | CONFIG_BLK_DEV_RAM=y |
38 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 53 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
54 | CONFIG_MISC_DEVICES=y | ||
55 | CONFIG_ATMEL_TCLIB=y | ||
39 | CONFIG_ATMEL_SSC=y | 56 | CONFIG_ATMEL_SSC=y |
40 | CONFIG_SCSI=y | 57 | CONFIG_SCSI=y |
41 | CONFIG_BLK_DEV_SD=y | 58 | CONFIG_BLK_DEV_SD=y |
@@ -45,12 +62,27 @@ CONFIG_NET_ETHERNET=y | |||
45 | CONFIG_DM9000=y | 62 | CONFIG_DM9000=y |
46 | # CONFIG_NETDEV_1000 is not set | 63 | # CONFIG_NETDEV_1000 is not set |
47 | # CONFIG_NETDEV_10000 is not set | 64 | # CONFIG_NETDEV_10000 is not set |
65 | CONFIG_USB_ZD1201=m | ||
66 | CONFIG_RTL8187=m | ||
67 | CONFIG_LIBERTAS=m | ||
68 | CONFIG_LIBERTAS_USB=m | ||
69 | CONFIG_LIBERTAS_SDIO=m | ||
70 | CONFIG_LIBERTAS_SPI=m | ||
71 | CONFIG_RT2X00=m | ||
72 | CONFIG_RT2500USB=m | ||
73 | CONFIG_RT73USB=m | ||
74 | CONFIG_ZD1211RW=m | ||
75 | CONFIG_INPUT_POLLDEV=m | ||
48 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 76 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
77 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 | ||
78 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 | ||
79 | CONFIG_INPUT_EVDEV=y | ||
49 | # CONFIG_KEYBOARD_ATKBD is not set | 80 | # CONFIG_KEYBOARD_ATKBD is not set |
50 | CONFIG_KEYBOARD_GPIO=y | 81 | CONFIG_KEYBOARD_GPIO=y |
51 | # CONFIG_INPUT_MOUSE is not set | 82 | # CONFIG_INPUT_MOUSE is not set |
52 | CONFIG_INPUT_TOUCHSCREEN=y | 83 | CONFIG_INPUT_TOUCHSCREEN=y |
53 | CONFIG_TOUCHSCREEN_ADS7846=y | 84 | CONFIG_TOUCHSCREEN_ADS7846=y |
85 | CONFIG_DEVPTS_MULTIPLE_INSTANCES=y | ||
54 | CONFIG_SERIAL_ATMEL=y | 86 | CONFIG_SERIAL_ATMEL=y |
55 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 87 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
56 | CONFIG_HW_RANDOM=y | 88 | CONFIG_HW_RANDOM=y |
@@ -65,31 +97,62 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
65 | CONFIG_AT91SAM9X_WATCHDOG=y | 97 | CONFIG_AT91SAM9X_WATCHDOG=y |
66 | CONFIG_FB=y | 98 | CONFIG_FB=y |
67 | CONFIG_FB_ATMEL=y | 99 | CONFIG_FB_ATMEL=y |
68 | # CONFIG_VGA_CONSOLE is not set | 100 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
101 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
102 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
103 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
104 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
105 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
106 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
107 | CONFIG_LOGO=y | ||
108 | CONFIG_SOUND=y | ||
109 | CONFIG_SND=y | ||
110 | CONFIG_SND_SEQUENCER=y | ||
111 | CONFIG_SND_MIXER_OSS=y | ||
112 | CONFIG_SND_PCM_OSS=y | ||
113 | # CONFIG_SND_SUPPORT_OLD_API is not set | ||
114 | # CONFIG_SND_VERBOSE_PROCFS is not set | ||
115 | # CONFIG_SND_DRIVERS is not set | ||
116 | # CONFIG_SND_ARM is not set | ||
117 | CONFIG_SND_AT73C213=y | ||
118 | CONFIG_SND_USB_AUDIO=m | ||
69 | # CONFIG_USB_HID is not set | 119 | # CONFIG_USB_HID is not set |
70 | CONFIG_USB=y | 120 | CONFIG_USB=y |
71 | CONFIG_USB_DEVICEFS=y | 121 | CONFIG_USB_DEVICEFS=y |
72 | CONFIG_USB_MON=y | ||
73 | CONFIG_USB_OHCI_HCD=y | 122 | CONFIG_USB_OHCI_HCD=y |
74 | CONFIG_USB_STORAGE=y | 123 | CONFIG_USB_STORAGE=y |
75 | CONFIG_USB_STORAGE_DEBUG=y | ||
76 | CONFIG_USB_GADGET=y | 124 | CONFIG_USB_GADGET=y |
77 | CONFIG_USB_ZERO=m | 125 | CONFIG_USB_ZERO=m |
126 | CONFIG_USB_ETH=m | ||
78 | CONFIG_USB_GADGETFS=m | 127 | CONFIG_USB_GADGETFS=m |
79 | CONFIG_USB_FILE_STORAGE=m | 128 | CONFIG_USB_FILE_STORAGE=m |
80 | CONFIG_USB_G_SERIAL=m | 129 | CONFIG_USB_G_SERIAL=m |
81 | CONFIG_MMC=y | 130 | CONFIG_MMC=y |
82 | CONFIG_MMC_AT91=m | 131 | CONFIG_MMC_AT91=m |
132 | CONFIG_NEW_LEDS=y | ||
133 | CONFIG_LEDS_CLASS=y | ||
134 | CONFIG_LEDS_GPIO=y | ||
135 | CONFIG_LEDS_TRIGGERS=y | ||
136 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
137 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
138 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
83 | CONFIG_RTC_CLASS=y | 139 | CONFIG_RTC_CLASS=y |
84 | CONFIG_RTC_DRV_AT91SAM9=y | 140 | CONFIG_RTC_DRV_AT91SAM9=y |
85 | CONFIG_EXT2_FS=y | 141 | CONFIG_MSDOS_FS=y |
86 | CONFIG_INOTIFY=y | ||
87 | CONFIG_VFAT_FS=y | 142 | CONFIG_VFAT_FS=y |
88 | CONFIG_TMPFS=y | 143 | CONFIG_TMPFS=y |
89 | CONFIG_CRAMFS=y | 144 | CONFIG_UBIFS_FS=y |
145 | CONFIG_UBIFS_FS_ADVANCED_COMPR=y | ||
146 | CONFIG_SQUASHFS=y | ||
147 | CONFIG_SQUASHFS_LZO=y | ||
148 | CONFIG_SQUASHFS_XZ=y | ||
149 | CONFIG_NFS_FS=y | ||
150 | CONFIG_NFS_V3=y | ||
151 | CONFIG_ROOT_NFS=y | ||
90 | CONFIG_NLS_CODEPAGE_437=y | 152 | CONFIG_NLS_CODEPAGE_437=y |
91 | CONFIG_NLS_CODEPAGE_850=y | 153 | CONFIG_NLS_CODEPAGE_850=y |
92 | CONFIG_NLS_ISO8859_1=y | 154 | CONFIG_NLS_ISO8859_1=y |
93 | CONFIG_DEBUG_KERNEL=y | 155 | CONFIG_NLS_ISO8859_15=y |
94 | CONFIG_DEBUG_USER=y | 156 | CONFIG_NLS_UTF8=y |
95 | CONFIG_DEBUG_LL=y | 157 | CONFIG_FTRACE=y |
158 | CONFIG_CRC_CCITT=m | ||
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263_defconfig index 8a04d6f4e065..1cf96264cba1 100644 --- a/arch/arm/configs/at91sam9263ek_defconfig +++ b/arch/arm/configs/at91sam9263_defconfig | |||
@@ -1,9 +1,13 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_KERNEL_LZMA=y | ||
3 | # CONFIG_SWAP is not set | 4 | # CONFIG_SWAP is not set |
4 | CONFIG_SYSVIPC=y | 5 | CONFIG_SYSVIPC=y |
6 | CONFIG_IKCONFIG=y | ||
7 | CONFIG_IKCONFIG_PROC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_NAMESPACES=y |
10 | CONFIG_EMBEDDED=y | ||
7 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 13 | CONFIG_MODULE_UNLOAD=y |
@@ -13,53 +17,81 @@ CONFIG_MODULE_UNLOAD=y | |||
13 | CONFIG_ARCH_AT91=y | 17 | CONFIG_ARCH_AT91=y |
14 | CONFIG_ARCH_AT91SAM9263=y | 18 | CONFIG_ARCH_AT91SAM9263=y |
15 | CONFIG_MACH_AT91SAM9263EK=y | 19 | CONFIG_MACH_AT91SAM9263EK=y |
20 | CONFIG_MACH_USB_A9263=y | ||
21 | CONFIG_MACH_NEOCORE926=y | ||
16 | CONFIG_MTD_AT91_DATAFLASH_CARD=y | 22 | CONFIG_MTD_AT91_DATAFLASH_CARD=y |
17 | # CONFIG_ARM_THUMB is not set | 23 | # CONFIG_ARM_THUMB is not set |
24 | CONFIG_AEABI=y | ||
25 | # CONFIG_OABI_COMPAT is not set | ||
18 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 26 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
19 | CONFIG_ZBOOT_ROM_BSS=0x0 | 27 | CONFIG_ZBOOT_ROM_BSS=0x0 |
20 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | 28 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" |
21 | CONFIG_FPE_NWFPE=y | 29 | CONFIG_AUTO_ZRELADDR=y |
22 | CONFIG_NET=y | 30 | CONFIG_NET=y |
23 | CONFIG_PACKET=y | 31 | CONFIG_PACKET=y |
24 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
33 | CONFIG_NET_KEY=y | ||
25 | CONFIG_INET=y | 34 | CONFIG_INET=y |
35 | CONFIG_IP_MULTICAST=y | ||
36 | CONFIG_IP_ADVANCED_ROUTER=y | ||
37 | CONFIG_IP_ROUTE_VERBOSE=y | ||
26 | CONFIG_IP_PNP=y | 38 | CONFIG_IP_PNP=y |
39 | CONFIG_IP_PNP_DHCP=y | ||
27 | CONFIG_IP_PNP_BOOTP=y | 40 | CONFIG_IP_PNP_BOOTP=y |
28 | CONFIG_IP_PNP_RARP=y | 41 | CONFIG_IP_PNP_RARP=y |
42 | CONFIG_NET_IPIP=y | ||
43 | CONFIG_IP_MROUTE=y | ||
44 | CONFIG_IP_PIMSM_V1=y | ||
45 | CONFIG_IP_PIMSM_V2=y | ||
29 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | 46 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
30 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | 47 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
31 | # CONFIG_INET_XFRM_MODE_BEET is not set | 48 | # CONFIG_INET_XFRM_MODE_BEET is not set |
32 | # CONFIG_INET_LRO is not set | 49 | # CONFIG_INET_LRO is not set |
33 | # CONFIG_INET_DIAG is not set | 50 | # CONFIG_INET_DIAG is not set |
34 | # CONFIG_IPV6 is not set | 51 | CONFIG_IPV6=y |
35 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 52 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
36 | CONFIG_MTD=y | 53 | CONFIG_MTD=y |
37 | CONFIG_MTD_PARTITIONS=y | 54 | CONFIG_MTD_PARTITIONS=y |
38 | CONFIG_MTD_CMDLINE_PARTS=y | 55 | CONFIG_MTD_CMDLINE_PARTS=y |
39 | CONFIG_MTD_CHAR=y | 56 | CONFIG_MTD_CHAR=y |
40 | CONFIG_MTD_BLOCK=y | 57 | CONFIG_MTD_BLOCK=y |
58 | CONFIG_NFTL=y | ||
59 | CONFIG_NFTL_RW=y | ||
41 | CONFIG_MTD_DATAFLASH=y | 60 | CONFIG_MTD_DATAFLASH=y |
61 | CONFIG_MTD_BLOCK2MTD=y | ||
42 | CONFIG_MTD_NAND=y | 62 | CONFIG_MTD_NAND=y |
43 | CONFIG_MTD_NAND_ATMEL=y | 63 | CONFIG_MTD_NAND_ATMEL=y |
64 | CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y | ||
65 | CONFIG_MTD_UBI=y | ||
66 | CONFIG_MTD_UBI_GLUEBI=y | ||
44 | CONFIG_BLK_DEV_LOOP=y | 67 | CONFIG_BLK_DEV_LOOP=y |
45 | CONFIG_BLK_DEV_RAM=y | 68 | CONFIG_BLK_DEV_RAM=y |
46 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 69 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
47 | CONFIG_ATMEL_SSC=y | 70 | CONFIG_MISC_DEVICES=y |
71 | CONFIG_ATMEL_PWM=y | ||
72 | CONFIG_ATMEL_TCLIB=y | ||
48 | CONFIG_SCSI=y | 73 | CONFIG_SCSI=y |
49 | CONFIG_BLK_DEV_SD=y | 74 | CONFIG_BLK_DEV_SD=y |
50 | CONFIG_SCSI_MULTI_LUN=y | 75 | CONFIG_SCSI_MULTI_LUN=y |
51 | CONFIG_NETDEVICES=y | 76 | CONFIG_NETDEVICES=y |
52 | CONFIG_NET_ETHERNET=y | ||
53 | CONFIG_MII=y | 77 | CONFIG_MII=y |
78 | CONFIG_SMSC_PHY=y | ||
79 | CONFIG_NET_ETHERNET=y | ||
54 | CONFIG_MACB=y | 80 | CONFIG_MACB=y |
81 | # CONFIG_NETDEV_1000 is not set | ||
82 | # CONFIG_NETDEV_10000 is not set | ||
83 | CONFIG_USB_ZD1201=m | ||
84 | CONFIG_INPUT_POLLDEV=m | ||
55 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 85 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
86 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 | ||
87 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 | ||
56 | CONFIG_INPUT_EVDEV=y | 88 | CONFIG_INPUT_EVDEV=y |
57 | # CONFIG_KEYBOARD_ATKBD is not set | 89 | # CONFIG_KEYBOARD_ATKBD is not set |
58 | CONFIG_KEYBOARD_GPIO=y | 90 | CONFIG_KEYBOARD_GPIO=y |
59 | # CONFIG_INPUT_MOUSE is not set | 91 | # CONFIG_INPUT_MOUSE is not set |
60 | CONFIG_INPUT_TOUCHSCREEN=y | 92 | CONFIG_INPUT_TOUCHSCREEN=y |
61 | CONFIG_TOUCHSCREEN_ADS7846=y | 93 | CONFIG_TOUCHSCREEN_ADS7846=y |
62 | # CONFIG_SERIO is not set | 94 | CONFIG_LEGACY_PTY_COUNT=4 |
63 | CONFIG_SERIAL_ATMEL=y | 95 | CONFIG_SERIAL_ATMEL=y |
64 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 96 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
65 | CONFIG_HW_RANDOM=y | 97 | CONFIG_HW_RANDOM=y |
@@ -74,8 +106,25 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
74 | CONFIG_AT91SAM9X_WATCHDOG=y | 106 | CONFIG_AT91SAM9X_WATCHDOG=y |
75 | CONFIG_FB=y | 107 | CONFIG_FB=y |
76 | CONFIG_FB_ATMEL=y | 108 | CONFIG_FB_ATMEL=y |
77 | # CONFIG_VGA_CONSOLE is not set | 109 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
78 | # CONFIG_USB_HID is not set | 110 | CONFIG_LCD_CLASS_DEVICE=y |
111 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
112 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
113 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
114 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
115 | CONFIG_LOGO=y | ||
116 | CONFIG_SOUND=y | ||
117 | CONFIG_SND=y | ||
118 | CONFIG_SND_SEQUENCER=y | ||
119 | CONFIG_SND_MIXER_OSS=y | ||
120 | CONFIG_SND_PCM_OSS=y | ||
121 | # CONFIG_SND_SUPPORT_OLD_API is not set | ||
122 | # CONFIG_SND_VERBOSE_PROCFS is not set | ||
123 | # CONFIG_SND_DRIVERS is not set | ||
124 | # CONFIG_SND_ARM is not set | ||
125 | CONFIG_SND_ATMEL_AC97C=y | ||
126 | # CONFIG_SND_SPI is not set | ||
127 | CONFIG_SND_USB_AUDIO=m | ||
79 | CONFIG_USB=y | 128 | CONFIG_USB=y |
80 | CONFIG_USB_DEVICEFS=y | 129 | CONFIG_USB_DEVICEFS=y |
81 | CONFIG_USB_MON=y | 130 | CONFIG_USB_MON=y |
@@ -83,24 +132,37 @@ CONFIG_USB_OHCI_HCD=y | |||
83 | CONFIG_USB_STORAGE=y | 132 | CONFIG_USB_STORAGE=y |
84 | CONFIG_USB_GADGET=y | 133 | CONFIG_USB_GADGET=y |
85 | CONFIG_USB_ZERO=m | 134 | CONFIG_USB_ZERO=m |
135 | CONFIG_USB_ETH=m | ||
86 | CONFIG_USB_GADGETFS=m | 136 | CONFIG_USB_GADGETFS=m |
87 | CONFIG_USB_FILE_STORAGE=m | 137 | CONFIG_USB_FILE_STORAGE=m |
88 | CONFIG_USB_G_SERIAL=m | 138 | CONFIG_USB_G_SERIAL=m |
89 | CONFIG_MMC=y | 139 | CONFIG_MMC=y |
140 | CONFIG_SDIO_UART=m | ||
90 | CONFIG_MMC_AT91=m | 141 | CONFIG_MMC_AT91=m |
142 | CONFIG_NEW_LEDS=y | ||
143 | CONFIG_LEDS_CLASS=y | ||
144 | CONFIG_LEDS_ATMEL_PWM=y | ||
145 | CONFIG_LEDS_GPIO=y | ||
146 | CONFIG_LEDS_TRIGGERS=y | ||
147 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
91 | CONFIG_RTC_CLASS=y | 148 | CONFIG_RTC_CLASS=y |
92 | CONFIG_RTC_DRV_AT91SAM9=y | 149 | CONFIG_RTC_DRV_AT91SAM9=y |
93 | CONFIG_EXT2_FS=y | 150 | CONFIG_EXT2_FS=y |
94 | CONFIG_INOTIFY=y | 151 | CONFIG_FUSE_FS=m |
95 | CONFIG_VFAT_FS=y | 152 | CONFIG_VFAT_FS=y |
96 | CONFIG_TMPFS=y | 153 | CONFIG_TMPFS=y |
97 | CONFIG_JFFS2_FS=y | 154 | CONFIG_JFFS2_FS=y |
155 | CONFIG_UBIFS_FS=y | ||
156 | CONFIG_UBIFS_FS_ADVANCED_COMPR=y | ||
98 | CONFIG_CRAMFS=y | 157 | CONFIG_CRAMFS=y |
99 | CONFIG_NFS_FS=y | 158 | CONFIG_NFS_FS=y |
159 | CONFIG_NFS_V3=y | ||
160 | CONFIG_NFS_V3_ACL=y | ||
161 | CONFIG_NFS_V4=y | ||
100 | CONFIG_ROOT_NFS=y | 162 | CONFIG_ROOT_NFS=y |
101 | CONFIG_NLS_CODEPAGE_437=y | 163 | CONFIG_NLS_CODEPAGE_437=y |
102 | CONFIG_NLS_CODEPAGE_850=y | 164 | CONFIG_NLS_CODEPAGE_850=y |
103 | CONFIG_NLS_ISO8859_1=y | 165 | CONFIG_NLS_ISO8859_1=y |
104 | CONFIG_DEBUG_KERNEL=y | 166 | CONFIG_FTRACE=y |
105 | CONFIG_DEBUG_USER=y | 167 | CONFIG_DEBUG_USER=y |
106 | CONFIG_DEBUG_LL=y | 168 | CONFIG_XZ_DEC=y |
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig index 2ffba24d2e2a..da53ff3b4d70 100644 --- a/arch/arm/configs/exynos4_defconfig +++ b/arch/arm/configs/exynos4_defconfig | |||
@@ -8,7 +8,9 @@ CONFIG_ARCH_EXYNOS4=y | |||
8 | CONFIG_S3C_LOWLEVEL_UART_PORT=1 | 8 | CONFIG_S3C_LOWLEVEL_UART_PORT=1 |
9 | CONFIG_MACH_SMDKC210=y | 9 | CONFIG_MACH_SMDKC210=y |
10 | CONFIG_MACH_SMDKV310=y | 10 | CONFIG_MACH_SMDKV310=y |
11 | CONFIG_MACH_ARMLEX4210=y | ||
11 | CONFIG_MACH_UNIVERSAL_C210=y | 12 | CONFIG_MACH_UNIVERSAL_C210=y |
13 | CONFIG_MACH_NURI=y | ||
12 | CONFIG_NO_HZ=y | 14 | CONFIG_NO_HZ=y |
13 | CONFIG_HIGH_RES_TIMERS=y | 15 | CONFIG_HIGH_RES_TIMERS=y |
14 | CONFIG_SMP=y | 16 | CONFIG_SMP=y |
diff --git a/arch/arm/configs/neocore926_defconfig b/arch/arm/configs/neocore926_defconfig deleted file mode 100644 index 462dd1850d15..000000000000 --- a/arch/arm/configs/neocore926_defconfig +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | # CONFIG_COMPAT_BRK is not set | ||
7 | CONFIG_MODULES=y | ||
8 | CONFIG_MODULE_UNLOAD=y | ||
9 | # CONFIG_BLK_DEV_BSG is not set | ||
10 | # CONFIG_IOSCHED_DEADLINE is not set | ||
11 | # CONFIG_IOSCHED_CFQ is not set | ||
12 | CONFIG_ARCH_AT91=y | ||
13 | CONFIG_ARCH_AT91SAM9263=y | ||
14 | CONFIG_MACH_NEOCORE926=y | ||
15 | CONFIG_MTD_AT91_DATAFLASH_CARD=y | ||
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
18 | CONFIG_FPE_NWFPE=y | ||
19 | CONFIG_NET=y | ||
20 | CONFIG_PACKET=y | ||
21 | CONFIG_UNIX=y | ||
22 | CONFIG_NET_KEY=y | ||
23 | CONFIG_INET=y | ||
24 | CONFIG_IP_PNP=y | ||
25 | CONFIG_IP_PNP_DHCP=y | ||
26 | CONFIG_IP_PNP_BOOTP=y | ||
27 | CONFIG_IP_PNP_RARP=y | ||
28 | CONFIG_NET_IPIP=y | ||
29 | # CONFIG_INET_LRO is not set | ||
30 | CONFIG_IPV6=y | ||
31 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
32 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
33 | CONFIG_MTD=y | ||
34 | CONFIG_MTD_PARTITIONS=y | ||
35 | CONFIG_MTD_CHAR=y | ||
36 | CONFIG_MTD_BLOCK=y | ||
37 | CONFIG_NFTL=y | ||
38 | CONFIG_NFTL_RW=y | ||
39 | CONFIG_MTD_BLOCK2MTD=y | ||
40 | CONFIG_MTD_NAND=y | ||
41 | CONFIG_MTD_NAND_ECC_SMC=y | ||
42 | CONFIG_MTD_NAND_VERIFY_WRITE=y | ||
43 | CONFIG_MTD_NAND_ATMEL=y | ||
44 | CONFIG_MTD_NAND_PLATFORM=y | ||
45 | CONFIG_BLK_DEV_LOOP=y | ||
46 | CONFIG_BLK_DEV_NBD=y | ||
47 | CONFIG_ATMEL_PWM=y | ||
48 | CONFIG_ATMEL_TCLIB=y | ||
49 | CONFIG_SCSI=y | ||
50 | CONFIG_CHR_DEV_SG=y | ||
51 | CONFIG_NETDEVICES=y | ||
52 | CONFIG_SMSC_PHY=y | ||
53 | CONFIG_NET_ETHERNET=y | ||
54 | CONFIG_MACB=y | ||
55 | # CONFIG_NETDEV_1000 is not set | ||
56 | # CONFIG_NETDEV_10000 is not set | ||
57 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
58 | CONFIG_INPUT_EVDEV=y | ||
59 | CONFIG_INPUT_TOUCHSCREEN=y | ||
60 | CONFIG_TOUCHSCREEN_ADS7846=y | ||
61 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
62 | # CONFIG_DEVKMEM is not set | ||
63 | CONFIG_SERIAL_NONSTANDARD=y | ||
64 | CONFIG_SERIAL_ATMEL=y | ||
65 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
66 | # CONFIG_SERIAL_ATMEL_PDC is not set | ||
67 | # CONFIG_HW_RANDOM is not set | ||
68 | CONFIG_I2C=y | ||
69 | CONFIG_I2C_CHARDEV=y | ||
70 | CONFIG_SPI=y | ||
71 | CONFIG_SPI_ATMEL=y | ||
72 | # CONFIG_HWMON is not set | ||
73 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
74 | CONFIG_FB=y | ||
75 | CONFIG_FB_ATMEL=y | ||
76 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
77 | CONFIG_LCD_CLASS_DEVICE=y | ||
78 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
79 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
80 | # CONFIG_VGA_CONSOLE is not set | ||
81 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
82 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
83 | CONFIG_LOGO=y | ||
84 | CONFIG_USB=y | ||
85 | CONFIG_USB_DEVICEFS=y | ||
86 | CONFIG_USB_MON=y | ||
87 | CONFIG_USB_OHCI_HCD=y | ||
88 | CONFIG_USB_STORAGE=y | ||
89 | CONFIG_MMC=y | ||
90 | CONFIG_SDIO_UART=y | ||
91 | CONFIG_MMC_AT91=m | ||
92 | CONFIG_EXT2_FS=y | ||
93 | # CONFIG_DNOTIFY is not set | ||
94 | CONFIG_AUTOFS_FS=y | ||
95 | CONFIG_VFAT_FS=y | ||
96 | CONFIG_TMPFS=y | ||
97 | CONFIG_JFFS2_FS=y | ||
98 | CONFIG_JFFS2_FS_WBUF_VERIFY=y | ||
99 | CONFIG_NFS_FS=y | ||
100 | CONFIG_ROOT_NFS=y | ||
101 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
102 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
103 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
104 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/arm/configs/s5p6442_defconfig b/arch/arm/configs/s5p6442_defconfig deleted file mode 100644 index 0e92a784af66..000000000000 --- a/arch/arm/configs/s5p6442_defconfig +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
3 | CONFIG_BLK_DEV_INITRD=y | ||
4 | CONFIG_KALLSYMS_ALL=y | ||
5 | CONFIG_MODULES=y | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | # CONFIG_BLK_DEV_BSG is not set | ||
8 | CONFIG_ARCH_S5P6442=y | ||
9 | CONFIG_S3C_LOWLEVEL_UART_PORT=1 | ||
10 | CONFIG_MACH_SMDK6442=y | ||
11 | CONFIG_CPU_32v6K=y | ||
12 | CONFIG_AEABI=y | ||
13 | CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc" | ||
14 | CONFIG_FPE_NWFPE=y | ||
15 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
16 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
17 | CONFIG_BLK_DEV_LOOP=y | ||
18 | CONFIG_BLK_DEV_RAM=y | ||
19 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
20 | # CONFIG_MISC_DEVICES is not set | ||
21 | CONFIG_SCSI=y | ||
22 | CONFIG_BLK_DEV_SD=y | ||
23 | CONFIG_CHR_DEV_SG=y | ||
24 | CONFIG_INPUT_EVDEV=y | ||
25 | # CONFIG_INPUT_KEYBOARD is not set | ||
26 | # CONFIG_INPUT_MOUSE is not set | ||
27 | CONFIG_INPUT_TOUCHSCREEN=y | ||
28 | CONFIG_SERIAL_8250=y | ||
29 | CONFIG_SERIAL_8250_NR_UARTS=3 | ||
30 | CONFIG_SERIAL_SAMSUNG=y | ||
31 | CONFIG_SERIAL_SAMSUNG_CONSOLE=y | ||
32 | CONFIG_HW_RANDOM=y | ||
33 | # CONFIG_HWMON is not set | ||
34 | # CONFIG_VGA_CONSOLE is not set | ||
35 | # CONFIG_HID_SUPPORT is not set | ||
36 | # CONFIG_USB_SUPPORT is not set | ||
37 | CONFIG_EXT2_FS=y | ||
38 | CONFIG_INOTIFY=y | ||
39 | CONFIG_MSDOS_FS=y | ||
40 | CONFIG_VFAT_FS=y | ||
41 | CONFIG_TMPFS=y | ||
42 | CONFIG_TMPFS_POSIX_ACL=y | ||
43 | CONFIG_CRAMFS=y | ||
44 | CONFIG_ROMFS_FS=y | ||
45 | CONFIG_PARTITION_ADVANCED=y | ||
46 | CONFIG_BSD_DISKLABEL=y | ||
47 | CONFIG_SOLARIS_X86_PARTITION=y | ||
48 | CONFIG_NLS_CODEPAGE_437=y | ||
49 | CONFIG_NLS_ASCII=y | ||
50 | CONFIG_NLS_ISO8859_1=y | ||
51 | CONFIG_MAGIC_SYSRQ=y | ||
52 | CONFIG_DEBUG_KERNEL=y | ||
53 | CONFIG_DEBUG_RT_MUTEXES=y | ||
54 | CONFIG_DEBUG_SPINLOCK=y | ||
55 | CONFIG_DEBUG_MUTEXES=y | ||
56 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
57 | CONFIG_DEBUG_INFO=y | ||
58 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
59 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
60 | # CONFIG_ARM_UNWIND is not set | ||
61 | CONFIG_DEBUG_USER=y | ||
62 | CONFIG_DEBUG_ERRORS=y | ||
63 | CONFIG_DEBUG_LL=y | ||
64 | CONFIG_DEBUG_S3C_UART=1 | ||
65 | CONFIG_CRC_CCITT=y | ||
diff --git a/arch/arm/configs/usb-a9263_defconfig b/arch/arm/configs/usb-a9263_defconfig deleted file mode 100644 index ee82d09249c6..000000000000 --- a/arch/arm/configs/usb-a9263_defconfig +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
7 | CONFIG_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | # CONFIG_BLK_DEV_BSG is not set | ||
11 | # CONFIG_IOSCHED_DEADLINE is not set | ||
12 | # CONFIG_IOSCHED_CFQ is not set | ||
13 | CONFIG_ARCH_AT91=y | ||
14 | CONFIG_ARCH_AT91SAM9263=y | ||
15 | CONFIG_MACH_USB_A9263=y | ||
16 | CONFIG_AT91_SLOW_CLOCK=y | ||
17 | # CONFIG_ARM_THUMB is not set | ||
18 | CONFIG_AEABI=y | ||
19 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
20 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
21 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200" | ||
22 | CONFIG_FPE_NWFPE=y | ||
23 | CONFIG_PM=y | ||
24 | CONFIG_NET=y | ||
25 | CONFIG_PACKET=y | ||
26 | CONFIG_UNIX=y | ||
27 | CONFIG_INET=y | ||
28 | CONFIG_IP_MULTICAST=y | ||
29 | CONFIG_IP_ADVANCED_ROUTER=y | ||
30 | CONFIG_IP_ROUTE_VERBOSE=y | ||
31 | CONFIG_IP_PNP=y | ||
32 | CONFIG_IP_PNP_BOOTP=y | ||
33 | CONFIG_IP_PNP_RARP=y | ||
34 | CONFIG_IP_MROUTE=y | ||
35 | CONFIG_IP_PIMSM_V1=y | ||
36 | CONFIG_IP_PIMSM_V2=y | ||
37 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
38 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
39 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
40 | # CONFIG_INET_LRO is not set | ||
41 | # CONFIG_INET_DIAG is not set | ||
42 | # CONFIG_IPV6 is not set | ||
43 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
44 | CONFIG_MTD=y | ||
45 | CONFIG_MTD_PARTITIONS=y | ||
46 | CONFIG_MTD_CMDLINE_PARTS=y | ||
47 | CONFIG_MTD_CHAR=y | ||
48 | CONFIG_MTD_BLOCK=y | ||
49 | CONFIG_MTD_DATAFLASH=y | ||
50 | CONFIG_MTD_NAND=y | ||
51 | CONFIG_MTD_NAND_ATMEL=y | ||
52 | CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y | ||
53 | CONFIG_BLK_DEV_LOOP=y | ||
54 | # CONFIG_MISC_DEVICES is not set | ||
55 | CONFIG_SCSI=y | ||
56 | CONFIG_BLK_DEV_SD=y | ||
57 | CONFIG_SCSI_MULTI_LUN=y | ||
58 | CONFIG_NETDEVICES=y | ||
59 | CONFIG_NET_ETHERNET=y | ||
60 | CONFIG_MII=y | ||
61 | CONFIG_MACB=y | ||
62 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
63 | CONFIG_INPUT_EVDEV=y | ||
64 | CONFIG_INPUT_EVBUG=y | ||
65 | # CONFIG_KEYBOARD_ATKBD is not set | ||
66 | CONFIG_KEYBOARD_GPIO=y | ||
67 | # CONFIG_INPUT_MOUSE is not set | ||
68 | # CONFIG_SERIO is not set | ||
69 | CONFIG_SERIAL_ATMEL=y | ||
70 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
71 | CONFIG_HW_RANDOM=y | ||
72 | CONFIG_SPI=y | ||
73 | CONFIG_SPI_ATMEL=y | ||
74 | # CONFIG_HWMON is not set | ||
75 | # CONFIG_VGA_CONSOLE is not set | ||
76 | # CONFIG_USB_HID is not set | ||
77 | CONFIG_USB=y | ||
78 | CONFIG_USB_DEVICEFS=y | ||
79 | CONFIG_USB_MON=y | ||
80 | CONFIG_USB_OHCI_HCD=y | ||
81 | CONFIG_USB_STORAGE=y | ||
82 | CONFIG_USB_GADGET=y | ||
83 | CONFIG_USB_ETH=m | ||
84 | CONFIG_NEW_LEDS=y | ||
85 | CONFIG_LEDS_CLASS=y | ||
86 | CONFIG_LEDS_GPIO=y | ||
87 | CONFIG_LEDS_TRIGGERS=y | ||
88 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
89 | CONFIG_EXT2_FS=y | ||
90 | CONFIG_INOTIFY=y | ||
91 | CONFIG_FUSE_FS=m | ||
92 | CONFIG_VFAT_FS=y | ||
93 | CONFIG_TMPFS=y | ||
94 | CONFIG_JFFS2_FS=y | ||
95 | CONFIG_NFS_FS=y | ||
96 | CONFIG_NFS_V3=y | ||
97 | CONFIG_NFS_V3_ACL=y | ||
98 | CONFIG_NFS_V4=y | ||
99 | CONFIG_ROOT_NFS=y | ||
100 | CONFIG_NLS_CODEPAGE_437=y | ||
101 | CONFIG_NLS_CODEPAGE_850=y | ||
102 | CONFIG_NLS_ISO8859_1=y | ||
103 | CONFIG_DEBUG_KERNEL=y | ||
104 | CONFIG_DEBUG_USER=y | ||
105 | CONFIG_DEBUG_LL=y | ||
106 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h index 2242ce22ec6c..d493d0b742a1 100644 --- a/arch/arm/include/asm/fiq.h +++ b/arch/arm/include/asm/fiq.h | |||
@@ -4,6 +4,13 @@ | |||
4 | * Support for FIQ on ARM architectures. | 4 | * Support for FIQ on ARM architectures. |
5 | * Written by Philip Blundell <philb@gnu.org>, 1998 | 5 | * Written by Philip Blundell <philb@gnu.org>, 1998 |
6 | * Re-written by Russell King | 6 | * Re-written by Russell King |
7 | * | ||
8 | * NOTE: The FIQ mode registers are not magically preserved across | ||
9 | * suspend/resume. | ||
10 | * | ||
11 | * Drivers which require these registers to be preserved across power | ||
12 | * management operations must implement appropriate suspend/resume handlers to | ||
13 | * save and restore them. | ||
7 | */ | 14 | */ |
8 | 15 | ||
9 | #ifndef __ASM_FIQ_H | 16 | #ifndef __ASM_FIQ_H |
@@ -29,9 +36,21 @@ struct fiq_handler { | |||
29 | extern int claim_fiq(struct fiq_handler *f); | 36 | extern int claim_fiq(struct fiq_handler *f); |
30 | extern void release_fiq(struct fiq_handler *f); | 37 | extern void release_fiq(struct fiq_handler *f); |
31 | extern void set_fiq_handler(void *start, unsigned int length); | 38 | extern void set_fiq_handler(void *start, unsigned int length); |
32 | extern void set_fiq_regs(struct pt_regs *regs); | ||
33 | extern void get_fiq_regs(struct pt_regs *regs); | ||
34 | extern void enable_fiq(int fiq); | 39 | extern void enable_fiq(int fiq); |
35 | extern void disable_fiq(int fiq); | 40 | extern void disable_fiq(int fiq); |
36 | 41 | ||
42 | /* helpers defined in fiqasm.S: */ | ||
43 | extern void __set_fiq_regs(unsigned long const *regs); | ||
44 | extern void __get_fiq_regs(unsigned long *regs); | ||
45 | |||
46 | static inline void set_fiq_regs(struct pt_regs const *regs) | ||
47 | { | ||
48 | __set_fiq_regs(®s->ARM_r8); | ||
49 | } | ||
50 | |||
51 | static inline void get_fiq_regs(struct pt_regs *regs) | ||
52 | { | ||
53 | __get_fiq_regs(®s->ARM_r8); | ||
54 | } | ||
55 | |||
37 | #endif | 56 | #endif |
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index bf13b814c1b8..946f4d778f71 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -18,6 +18,8 @@ struct machine_desc { | |||
18 | unsigned int nr; /* architecture number */ | 18 | unsigned int nr; /* architecture number */ |
19 | const char *name; /* architecture name */ | 19 | const char *name; /* architecture name */ |
20 | unsigned long boot_params; /* tagged list */ | 20 | unsigned long boot_params; /* tagged list */ |
21 | const char **dt_compat; /* array of device tree | ||
22 | * 'compatible' strings */ | ||
21 | 23 | ||
22 | unsigned int nr_irqs; /* number of IRQs */ | 24 | unsigned int nr_irqs; /* number of IRQs */ |
23 | 25 | ||
@@ -48,6 +50,13 @@ struct machine_desc { | |||
48 | extern struct machine_desc *machine_desc; | 50 | extern struct machine_desc *machine_desc; |
49 | 51 | ||
50 | /* | 52 | /* |
53 | * Machine type table - also only accessible during boot | ||
54 | */ | ||
55 | extern struct machine_desc __arch_info_begin[], __arch_info_end[]; | ||
56 | #define for_each_machine_desc(p) \ | ||
57 | for (p = __arch_info_begin; p < __arch_info_end; p++) | ||
58 | |||
59 | /* | ||
51 | * Set of macros to define architecture features. This is built into | 60 | * Set of macros to define architecture features. This is built into |
52 | * a table by the linker. | 61 | * a table by the linker. |
53 | */ | 62 | */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index f51a69595f6e..ac75d0848889 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -197,7 +197,7 @@ typedef unsigned long pgprot_t; | |||
197 | 197 | ||
198 | typedef struct page *pgtable_t; | 198 | typedef struct page *pgtable_t; |
199 | 199 | ||
200 | #ifndef CONFIG_SPARSEMEM | 200 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID |
201 | extern int pfn_valid(unsigned long); | 201 | extern int pfn_valid(unsigned long); |
202 | #endif | 202 | #endif |
203 | 203 | ||
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h new file mode 100644 index 000000000000..11b8708fc4db --- /dev/null +++ b/arch/arm/include/asm/prom.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/prom.h | ||
3 | * | ||
4 | * Copyright (C) 2009 Canonical Ltd. <jeremy.kerr@canonical.com> | ||
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 | */ | ||
11 | #ifndef __ASMARM_PROM_H | ||
12 | #define __ASMARM_PROM_H | ||
13 | |||
14 | #ifdef CONFIG_OF | ||
15 | |||
16 | #include <asm/setup.h> | ||
17 | #include <asm/irq.h> | ||
18 | |||
19 | static inline void irq_dispose_mapping(unsigned int virq) | ||
20 | { | ||
21 | return; | ||
22 | } | ||
23 | |||
24 | extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys); | ||
25 | extern void arm_dt_memblock_reserve(void); | ||
26 | |||
27 | #else /* CONFIG_OF */ | ||
28 | |||
29 | static inline struct machine_desc *setup_machine_fdt(unsigned int dt_phys) | ||
30 | { | ||
31 | return NULL; | ||
32 | } | ||
33 | |||
34 | static inline void arm_dt_memblock_reserve(void) { } | ||
35 | |||
36 | #endif /* CONFIG_OF */ | ||
37 | #endif /* ASMARM_PROM_H */ | ||
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 95176af3df8c..ee2ad8ae07af 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -217,6 +217,10 @@ extern struct meminfo meminfo; | |||
217 | #define bank_phys_end(bank) ((bank)->start + (bank)->size) | 217 | #define bank_phys_end(bank) ((bank)->start + (bank)->size) |
218 | #define bank_phys_size(bank) (bank)->size | 218 | #define bank_phys_size(bank) (bank)->size |
219 | 219 | ||
220 | extern int arm_add_memory(phys_addr_t start, unsigned long size); | ||
221 | extern void early_print(const char *str, ...); | ||
222 | extern void dump_machine_table(void); | ||
223 | |||
220 | #endif /* __KERNEL__ */ | 224 | #endif /* __KERNEL__ */ |
221 | 225 | ||
222 | #endif | 226 | #endif |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index d2b514fd76f4..e42d96a45d3e 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -70,6 +70,7 @@ extern void platform_smp_prepare_cpus(unsigned int); | |||
70 | */ | 70 | */ |
71 | struct secondary_data { | 71 | struct secondary_data { |
72 | unsigned long pgdir; | 72 | unsigned long pgdir; |
73 | unsigned long swapper_pg_dir; | ||
73 | void *stack; | 74 | void *stack; |
74 | }; | 75 | }; |
75 | extern struct secondary_data secondary_data; | 76 | extern struct secondary_data secondary_data; |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 87dbe3e21970..3de689aa6f68 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -400,6 +400,7 @@ | |||
400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) | 400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) |
401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) | 401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) |
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | 402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) |
403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | ||
403 | 404 | ||
404 | /* | 405 | /* |
405 | * The following SWIs are ARM private. | 406 | * The following SWIs are ARM private. |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 8d95446150a3..a5b31af5c2b8 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -24,7 +24,7 @@ obj-$(CONFIG_OC_ETM) += etm.o | |||
24 | 24 | ||
25 | obj-$(CONFIG_ISA_DMA_API) += dma.o | 25 | obj-$(CONFIG_ISA_DMA_API) += dma.o |
26 | obj-$(CONFIG_ARCH_ACORN) += ecard.o | 26 | obj-$(CONFIG_ARCH_ACORN) += ecard.o |
27 | obj-$(CONFIG_FIQ) += fiq.o | 27 | obj-$(CONFIG_FIQ) += fiq.o fiqasm.o |
28 | obj-$(CONFIG_MODULES) += armksyms.o module.o | 28 | obj-$(CONFIG_MODULES) += armksyms.o module.o |
29 | obj-$(CONFIG_ARTHUR) += arthur.o | 29 | obj-$(CONFIG_ARTHUR) += arthur.o |
30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o | 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o |
@@ -44,6 +44,7 @@ obj-$(CONFIG_ARM_THUMBEE) += thumbee.o | |||
44 | obj-$(CONFIG_KGDB) += kgdb.o | 44 | obj-$(CONFIG_KGDB) += kgdb.o |
45 | obj-$(CONFIG_ARM_UNWIND) += unwind.o | 45 | obj-$(CONFIG_ARM_UNWIND) += unwind.o |
46 | obj-$(CONFIG_HAVE_TCM) += tcm.o | 46 | obj-$(CONFIG_HAVE_TCM) += tcm.o |
47 | obj-$(CONFIG_OF) += devtree.o | ||
47 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 48 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
48 | obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o | 49 | obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o |
49 | CFLAGS_swp_emulate.o := -Wa,-march=armv7-a | 50 | CFLAGS_swp_emulate.o := -Wa,-march=armv7-a |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 7fbf28c35bb2..24cdac3ce2e3 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -383,6 +383,7 @@ | |||
383 | CALL(sys_open_by_handle_at) | 383 | CALL(sys_open_by_handle_at) |
384 | CALL(sys_clock_adjtime) | 384 | CALL(sys_clock_adjtime) |
385 | CALL(sys_syncfs) | 385 | CALL(sys_syncfs) |
386 | CALL(sys_sendmmsg) | ||
386 | #ifndef syscalls_counted | 387 | #ifndef syscalls_counted |
387 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 388 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
388 | #define syscalls_counted | 389 | #define syscalls_counted |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c new file mode 100644 index 000000000000..a701e4226a6c --- /dev/null +++ b/arch/arm/kernel/devtree.c | |||
@@ -0,0 +1,145 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/devtree.c | ||
3 | * | ||
4 | * Copyright (C) 2009 Canonical Ltd. <jeremy.kerr@canonical.com> | ||
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 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/errno.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/bootmem.h> | ||
16 | #include <linux/memblock.h> | ||
17 | #include <linux/of.h> | ||
18 | #include <linux/of_fdt.h> | ||
19 | #include <linux/of_irq.h> | ||
20 | #include <linux/of_platform.h> | ||
21 | |||
22 | #include <asm/setup.h> | ||
23 | #include <asm/page.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | |||
27 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | ||
28 | { | ||
29 | arm_add_memory(base, size); | ||
30 | } | ||
31 | |||
32 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | ||
33 | { | ||
34 | return alloc_bootmem_align(size, align); | ||
35 | } | ||
36 | |||
37 | void __init arm_dt_memblock_reserve(void) | ||
38 | { | ||
39 | u64 *reserve_map, base, size; | ||
40 | |||
41 | if (!initial_boot_params) | ||
42 | return; | ||
43 | |||
44 | /* Reserve the dtb region */ | ||
45 | memblock_reserve(virt_to_phys(initial_boot_params), | ||
46 | be32_to_cpu(initial_boot_params->totalsize)); | ||
47 | |||
48 | /* | ||
49 | * Process the reserve map. This will probably overlap the initrd | ||
50 | * and dtb locations which are already reserved, but overlaping | ||
51 | * doesn't hurt anything | ||
52 | */ | ||
53 | reserve_map = ((void*)initial_boot_params) + | ||
54 | be32_to_cpu(initial_boot_params->off_mem_rsvmap); | ||
55 | while (1) { | ||
56 | base = be64_to_cpup(reserve_map++); | ||
57 | size = be64_to_cpup(reserve_map++); | ||
58 | if (!size) | ||
59 | break; | ||
60 | memblock_reserve(base, size); | ||
61 | } | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * setup_machine_fdt - Machine setup when an dtb was passed to the kernel | ||
66 | * @dt_phys: physical address of dt blob | ||
67 | * | ||
68 | * If a dtb was passed to the kernel in r2, then use it to choose the | ||
69 | * correct machine_desc and to setup the system. | ||
70 | */ | ||
71 | struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | ||
72 | { | ||
73 | struct boot_param_header *devtree; | ||
74 | struct machine_desc *mdesc, *mdesc_best = NULL; | ||
75 | unsigned int score, mdesc_score = ~1; | ||
76 | unsigned long dt_root; | ||
77 | const char *model; | ||
78 | |||
79 | devtree = phys_to_virt(dt_phys); | ||
80 | |||
81 | /* check device tree validity */ | ||
82 | if (be32_to_cpu(devtree->magic) != OF_DT_HEADER) | ||
83 | return NULL; | ||
84 | |||
85 | /* Search the mdescs for the 'best' compatible value match */ | ||
86 | initial_boot_params = devtree; | ||
87 | dt_root = of_get_flat_dt_root(); | ||
88 | for_each_machine_desc(mdesc) { | ||
89 | score = of_flat_dt_match(dt_root, mdesc->dt_compat); | ||
90 | if (score > 0 && score < mdesc_score) { | ||
91 | mdesc_best = mdesc; | ||
92 | mdesc_score = score; | ||
93 | } | ||
94 | } | ||
95 | if (!mdesc_best) { | ||
96 | const char *prop; | ||
97 | long size; | ||
98 | |||
99 | early_print("\nError: unrecognized/unsupported " | ||
100 | "device tree compatible list:\n[ "); | ||
101 | |||
102 | prop = of_get_flat_dt_prop(dt_root, "compatible", &size); | ||
103 | while (size > 0) { | ||
104 | early_print("'%s' ", prop); | ||
105 | size -= strlen(prop) + 1; | ||
106 | prop += strlen(prop) + 1; | ||
107 | } | ||
108 | early_print("]\n\n"); | ||
109 | |||
110 | dump_machine_table(); /* does not return */ | ||
111 | } | ||
112 | |||
113 | model = of_get_flat_dt_prop(dt_root, "model", NULL); | ||
114 | if (!model) | ||
115 | model = of_get_flat_dt_prop(dt_root, "compatible", NULL); | ||
116 | if (!model) | ||
117 | model = "<unknown>"; | ||
118 | pr_info("Machine: %s, model: %s\n", mdesc_best->name, model); | ||
119 | |||
120 | /* Retrieve various information from the /chosen node */ | ||
121 | of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); | ||
122 | /* Initialize {size,address}-cells info */ | ||
123 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | ||
124 | /* Setup memory, calling early_init_dt_add_memory_arch */ | ||
125 | of_scan_flat_dt(early_init_dt_scan_memory, NULL); | ||
126 | |||
127 | /* Change machine number to match the mdesc we're using */ | ||
128 | __machine_arch_type = mdesc_best->nr; | ||
129 | |||
130 | return mdesc_best; | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * irq_create_of_mapping - Hook to resolve OF irq specifier into a Linux irq# | ||
135 | * | ||
136 | * Currently the mapping mechanism is trivial; simple flat hwirq numbers are | ||
137 | * mapped 1:1 onto Linux irq numbers. Cascaded irq controllers are not | ||
138 | * supported. | ||
139 | */ | ||
140 | unsigned int irq_create_of_mapping(struct device_node *controller, | ||
141 | const u32 *intspec, unsigned int intsize) | ||
142 | { | ||
143 | return intspec[0]; | ||
144 | } | ||
145 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); | ||
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index e72dc34eea1c..4c164ece5891 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c | |||
@@ -89,47 +89,6 @@ void set_fiq_handler(void *start, unsigned int length) | |||
89 | flush_icache_range(0x1c, 0x1c + length); | 89 | flush_icache_range(0x1c, 0x1c + length); |
90 | } | 90 | } |
91 | 91 | ||
92 | /* | ||
93 | * Taking an interrupt in FIQ mode is death, so both these functions | ||
94 | * disable irqs for the duration. Note - these functions are almost | ||
95 | * entirely coded in assembly. | ||
96 | */ | ||
97 | void __naked set_fiq_regs(struct pt_regs *regs) | ||
98 | { | ||
99 | register unsigned long tmp; | ||
100 | asm volatile ( | ||
101 | "mov ip, sp\n\ | ||
102 | stmfd sp!, {fp, ip, lr, pc}\n\ | ||
103 | sub fp, ip, #4\n\ | ||
104 | mrs %0, cpsr\n\ | ||
105 | msr cpsr_c, %2 @ select FIQ mode\n\ | ||
106 | mov r0, r0\n\ | ||
107 | ldmia %1, {r8 - r14}\n\ | ||
108 | msr cpsr_c, %0 @ return to SVC mode\n\ | ||
109 | mov r0, r0\n\ | ||
110 | ldmfd sp, {fp, sp, pc}" | ||
111 | : "=&r" (tmp) | ||
112 | : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); | ||
113 | } | ||
114 | |||
115 | void __naked get_fiq_regs(struct pt_regs *regs) | ||
116 | { | ||
117 | register unsigned long tmp; | ||
118 | asm volatile ( | ||
119 | "mov ip, sp\n\ | ||
120 | stmfd sp!, {fp, ip, lr, pc}\n\ | ||
121 | sub fp, ip, #4\n\ | ||
122 | mrs %0, cpsr\n\ | ||
123 | msr cpsr_c, %2 @ select FIQ mode\n\ | ||
124 | mov r0, r0\n\ | ||
125 | stmia %1, {r8 - r14}\n\ | ||
126 | msr cpsr_c, %0 @ return to SVC mode\n\ | ||
127 | mov r0, r0\n\ | ||
128 | ldmfd sp, {fp, sp, pc}" | ||
129 | : "=&r" (tmp) | ||
130 | : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); | ||
131 | } | ||
132 | |||
133 | int claim_fiq(struct fiq_handler *f) | 92 | int claim_fiq(struct fiq_handler *f) |
134 | { | 93 | { |
135 | int ret = 0; | 94 | int ret = 0; |
@@ -174,8 +133,8 @@ void disable_fiq(int fiq) | |||
174 | } | 133 | } |
175 | 134 | ||
176 | EXPORT_SYMBOL(set_fiq_handler); | 135 | EXPORT_SYMBOL(set_fiq_handler); |
177 | EXPORT_SYMBOL(set_fiq_regs); | 136 | EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ |
178 | EXPORT_SYMBOL(get_fiq_regs); | 137 | EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ |
179 | EXPORT_SYMBOL(claim_fiq); | 138 | EXPORT_SYMBOL(claim_fiq); |
180 | EXPORT_SYMBOL(release_fiq); | 139 | EXPORT_SYMBOL(release_fiq); |
181 | EXPORT_SYMBOL(enable_fiq); | 140 | EXPORT_SYMBOL(enable_fiq); |
diff --git a/arch/arm/kernel/fiqasm.S b/arch/arm/kernel/fiqasm.S new file mode 100644 index 000000000000..207f9d652010 --- /dev/null +++ b/arch/arm/kernel/fiqasm.S | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/fiqasm.S | ||
3 | * | ||
4 | * Derived from code originally in linux/arch/arm/kernel/fiq.c: | ||
5 | * | ||
6 | * Copyright (C) 1998 Russell King | ||
7 | * Copyright (C) 1998, 1999 Phil Blundell | ||
8 | * Copyright (C) 2011, Linaro Limited | ||
9 | * | ||
10 | * FIQ support written by Philip Blundell <philb@gnu.org>, 1998. | ||
11 | * | ||
12 | * FIQ support re-written by Russell King to be more generic | ||
13 | * | ||
14 | * v7/Thumb-2 compatibility modifications by Linaro Limited, 2011. | ||
15 | */ | ||
16 | |||
17 | #include <linux/linkage.h> | ||
18 | #include <asm/assembler.h> | ||
19 | |||
20 | /* | ||
21 | * Taking an interrupt in FIQ mode is death, so both these functions | ||
22 | * disable irqs for the duration. | ||
23 | */ | ||
24 | |||
25 | ENTRY(__set_fiq_regs) | ||
26 | mov r2, #PSR_I_BIT | PSR_F_BIT | FIQ_MODE | ||
27 | mrs r1, cpsr | ||
28 | msr cpsr_c, r2 @ select FIQ mode | ||
29 | mov r0, r0 @ avoid hazard prior to ARMv4 | ||
30 | ldmia r0!, {r8 - r12} | ||
31 | ldr sp, [r0], #4 | ||
32 | ldr lr, [r0] | ||
33 | msr cpsr_c, r1 @ return to SVC mode | ||
34 | mov r0, r0 @ avoid hazard prior to ARMv4 | ||
35 | mov pc, lr | ||
36 | ENDPROC(__set_fiq_regs) | ||
37 | |||
38 | ENTRY(__get_fiq_regs) | ||
39 | mov r2, #PSR_I_BIT | PSR_F_BIT | FIQ_MODE | ||
40 | mrs r1, cpsr | ||
41 | msr cpsr_c, r2 @ select FIQ mode | ||
42 | mov r0, r0 @ avoid hazard prior to ARMv4 | ||
43 | stmia r0!, {r8 - r12} | ||
44 | str sp, [r0], #4 | ||
45 | str lr, [r0] | ||
46 | msr cpsr_c, r1 @ return to SVC mode | ||
47 | mov r0, r0 @ avoid hazard prior to ARMv4 | ||
48 | mov pc, lr | ||
49 | ENDPROC(__get_fiq_regs) | ||
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index c84b57d27d07..854bd22380d3 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -15,6 +15,12 @@ | |||
15 | #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) | 15 | #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) |
16 | #define ATAG_CORE_SIZE_EMPTY ((2*4) >> 2) | 16 | #define ATAG_CORE_SIZE_EMPTY ((2*4) >> 2) |
17 | 17 | ||
18 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
19 | #define OF_DT_MAGIC 0xd00dfeed | ||
20 | #else | ||
21 | #define OF_DT_MAGIC 0xedfe0dd0 /* 0xd00dfeed in big-endian */ | ||
22 | #endif | ||
23 | |||
18 | /* | 24 | /* |
19 | * Exception handling. Something went wrong and we can't proceed. We | 25 | * Exception handling. Something went wrong and we can't proceed. We |
20 | * ought to tell the user, but since we don't have any guarantee that | 26 | * ought to tell the user, but since we don't have any guarantee that |
@@ -28,20 +34,26 @@ | |||
28 | 34 | ||
29 | /* Determine validity of the r2 atags pointer. The heuristic requires | 35 | /* Determine validity of the r2 atags pointer. The heuristic requires |
30 | * that the pointer be aligned, in the first 16k of physical RAM and | 36 | * that the pointer be aligned, in the first 16k of physical RAM and |
31 | * that the ATAG_CORE marker is first and present. Future revisions | 37 | * that the ATAG_CORE marker is first and present. If CONFIG_OF_FLATTREE |
38 | * is selected, then it will also accept a dtb pointer. Future revisions | ||
32 | * of this function may be more lenient with the physical address and | 39 | * of this function may be more lenient with the physical address and |
33 | * may also be able to move the ATAGS block if necessary. | 40 | * may also be able to move the ATAGS block if necessary. |
34 | * | 41 | * |
35 | * Returns: | 42 | * Returns: |
36 | * r2 either valid atags pointer, or zero | 43 | * r2 either valid atags pointer, valid dtb pointer, or zero |
37 | * r5, r6 corrupted | 44 | * r5, r6 corrupted |
38 | */ | 45 | */ |
39 | __vet_atags: | 46 | __vet_atags: |
40 | tst r2, #0x3 @ aligned? | 47 | tst r2, #0x3 @ aligned? |
41 | bne 1f | 48 | bne 1f |
42 | 49 | ||
43 | ldr r5, [r2, #0] @ is first tag ATAG_CORE? | 50 | ldr r5, [r2, #0] |
44 | cmp r5, #ATAG_CORE_SIZE | 51 | #ifdef CONFIG_OF_FLATTREE |
52 | ldr r6, =OF_DT_MAGIC @ is it a DTB? | ||
53 | cmp r5, r6 | ||
54 | beq 2f | ||
55 | #endif | ||
56 | cmp r5, #ATAG_CORE_SIZE @ is first tag ATAG_CORE? | ||
45 | cmpne r5, #ATAG_CORE_SIZE_EMPTY | 57 | cmpne r5, #ATAG_CORE_SIZE_EMPTY |
46 | bne 1f | 58 | bne 1f |
47 | ldr r5, [r2, #4] | 59 | ldr r5, [r2, #4] |
@@ -49,7 +61,7 @@ __vet_atags: | |||
49 | cmp r5, r6 | 61 | cmp r5, r6 |
50 | bne 1f | 62 | bne 1f |
51 | 63 | ||
52 | mov pc, lr @ atag pointer is ok | 64 | 2: mov pc, lr @ atag/dtb pointer is ok |
53 | 65 | ||
54 | 1: mov r2, #0 | 66 | 1: mov r2, #0 |
55 | mov pc, lr | 67 | mov pc, lr |
@@ -61,7 +73,7 @@ ENDPROC(__vet_atags) | |||
61 | * | 73 | * |
62 | * r0 = cp#15 control register | 74 | * r0 = cp#15 control register |
63 | * r1 = machine ID | 75 | * r1 = machine ID |
64 | * r2 = atags pointer | 76 | * r2 = atags/dtb pointer |
65 | * r9 = processor ID | 77 | * r9 = processor ID |
66 | */ | 78 | */ |
67 | __INIT | 79 | __INIT |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index c9173cfbbc74..278c1b0ebb2e 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -59,7 +59,7 @@ | |||
59 | * | 59 | * |
60 | * This is normally called from the decompressor code. The requirements | 60 | * This is normally called from the decompressor code. The requirements |
61 | * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0, | 61 | * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0, |
62 | * r1 = machine nr, r2 = atags pointer. | 62 | * r1 = machine nr, r2 = atags or dtb pointer. |
63 | * | 63 | * |
64 | * This code is mostly position independent, so if you link the kernel at | 64 | * This code is mostly position independent, so if you link the kernel at |
65 | * 0xc0008000, you call this at __pa(0xc0008000). | 65 | * 0xc0008000, you call this at __pa(0xc0008000). |
@@ -91,7 +91,7 @@ ENTRY(stext) | |||
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * r1 = machine no, r2 = atags, | 94 | * r1 = machine no, r2 = atags or dtb, |
95 | * r8 = phys_offset, r9 = cpuid, r10 = procinfo | 95 | * r8 = phys_offset, r9 = cpuid, r10 = procinfo |
96 | */ | 96 | */ |
97 | bl __vet_atags | 97 | bl __vet_atags |
@@ -113,6 +113,7 @@ ENTRY(stext) | |||
113 | ldr r13, =__mmap_switched @ address to jump to after | 113 | ldr r13, =__mmap_switched @ address to jump to after |
114 | @ mmu has been enabled | 114 | @ mmu has been enabled |
115 | adr lr, BSYM(1f) @ return (PIC) address | 115 | adr lr, BSYM(1f) @ return (PIC) address |
116 | mov r8, r4 @ set TTBR1 to swapper_pg_dir | ||
116 | ARM( add pc, r10, #PROCINFO_INITFUNC ) | 117 | ARM( add pc, r10, #PROCINFO_INITFUNC ) |
117 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) | 118 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) |
118 | THUMB( mov pc, r12 ) | 119 | THUMB( mov pc, r12 ) |
@@ -302,8 +303,10 @@ ENTRY(secondary_startup) | |||
302 | */ | 303 | */ |
303 | adr r4, __secondary_data | 304 | adr r4, __secondary_data |
304 | ldmia r4, {r5, r7, r12} @ address to jump to after | 305 | ldmia r4, {r5, r7, r12} @ address to jump to after |
305 | sub r4, r4, r5 @ mmu has been enabled | 306 | sub lr, r4, r5 @ mmu has been enabled |
306 | ldr r4, [r7, r4] @ get secondary_data.pgdir | 307 | ldr r4, [r7, lr] @ get secondary_data.pgdir |
308 | add r7, r7, #4 | ||
309 | ldr r8, [r7, lr] @ get secondary_data.swapper_pg_dir | ||
307 | adr lr, BSYM(__enable_mmu) @ return address | 310 | adr lr, BSYM(__enable_mmu) @ return address |
308 | mov r13, r12 @ __secondary_switched address | 311 | mov r13, r12 @ __secondary_switched address |
309 | ARM( add pc, r10, #PROCINFO_INITFUNC ) @ initialise processor | 312 | ARM( add pc, r10, #PROCINFO_INITFUNC ) @ initialise processor |
@@ -339,7 +342,7 @@ __secondary_data: | |||
339 | * | 342 | * |
340 | * r0 = cp#15 control register | 343 | * r0 = cp#15 control register |
341 | * r1 = machine ID | 344 | * r1 = machine ID |
342 | * r2 = atags pointer | 345 | * r2 = atags or dtb pointer |
343 | * r4 = page table pointer | 346 | * r4 = page table pointer |
344 | * r9 = processor ID | 347 | * r9 = processor ID |
345 | * r13 = *virtual* address to jump to upon completion | 348 | * r13 = *virtual* address to jump to upon completion |
@@ -376,7 +379,7 @@ ENDPROC(__enable_mmu) | |||
376 | * | 379 | * |
377 | * r0 = cp#15 control register | 380 | * r0 = cp#15 control register |
378 | * r1 = machine ID | 381 | * r1 = machine ID |
379 | * r2 = atags pointer | 382 | * r2 = atags or dtb pointer |
380 | * r9 = processor ID | 383 | * r9 = processor ID |
381 | * r13 = *virtual* address to jump to upon completion | 384 | * r13 = *virtual* address to jump to upon completion |
382 | * | 385 | * |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 6dce209a623b..ed11fb08b05a 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/screen_info.h> | 20 | #include <linux/screen_info.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
23 | #include <linux/of_fdt.h> | ||
23 | #include <linux/crash_dump.h> | 24 | #include <linux/crash_dump.h> |
24 | #include <linux/root_dev.h> | 25 | #include <linux/root_dev.h> |
25 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
@@ -42,6 +43,7 @@ | |||
42 | #include <asm/cachetype.h> | 43 | #include <asm/cachetype.h> |
43 | #include <asm/tlbflush.h> | 44 | #include <asm/tlbflush.h> |
44 | 45 | ||
46 | #include <asm/prom.h> | ||
45 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
46 | #include <asm/mach/irq.h> | 48 | #include <asm/mach/irq.h> |
47 | #include <asm/mach/time.h> | 49 | #include <asm/mach/time.h> |
@@ -309,7 +311,7 @@ static void __init cacheid_init(void) | |||
309 | */ | 311 | */ |
310 | extern struct proc_info_list *lookup_processor_type(unsigned int); | 312 | extern struct proc_info_list *lookup_processor_type(unsigned int); |
311 | 313 | ||
312 | static void __init early_print(const char *str, ...) | 314 | void __init early_print(const char *str, ...) |
313 | { | 315 | { |
314 | extern void printascii(const char *); | 316 | extern void printascii(const char *); |
315 | char buf[256]; | 317 | char buf[256]; |
@@ -439,25 +441,12 @@ void cpu_init(void) | |||
439 | : "r14"); | 441 | : "r14"); |
440 | } | 442 | } |
441 | 443 | ||
442 | static struct machine_desc * __init setup_machine(unsigned int nr) | 444 | void __init dump_machine_table(void) |
443 | { | 445 | { |
444 | extern struct machine_desc __arch_info_begin[], __arch_info_end[]; | ||
445 | struct machine_desc *p; | 446 | struct machine_desc *p; |
446 | 447 | ||
447 | /* | 448 | early_print("Available machine support:\n\nID (hex)\tNAME\n"); |
448 | * locate machine in the list of supported machines. | 449 | for_each_machine_desc(p) |
449 | */ | ||
450 | for (p = __arch_info_begin; p < __arch_info_end; p++) | ||
451 | if (nr == p->nr) { | ||
452 | printk("Machine: %s\n", p->name); | ||
453 | return p; | ||
454 | } | ||
455 | |||
456 | early_print("\n" | ||
457 | "Error: unrecognized/unsupported machine ID (r1 = 0x%08x).\n\n" | ||
458 | "Available machine support:\n\nID (hex)\tNAME\n", nr); | ||
459 | |||
460 | for (p = __arch_info_begin; p < __arch_info_end; p++) | ||
461 | early_print("%08x\t%s\n", p->nr, p->name); | 450 | early_print("%08x\t%s\n", p->nr, p->name); |
462 | 451 | ||
463 | early_print("\nPlease check your kernel config and/or bootloader.\n"); | 452 | early_print("\nPlease check your kernel config and/or bootloader.\n"); |
@@ -466,7 +455,7 @@ static struct machine_desc * __init setup_machine(unsigned int nr) | |||
466 | /* can't use cpu_relax() here as it may require MMU setup */; | 455 | /* can't use cpu_relax() here as it may require MMU setup */; |
467 | } | 456 | } |
468 | 457 | ||
469 | static int __init arm_add_memory(phys_addr_t start, unsigned long size) | 458 | int __init arm_add_memory(phys_addr_t start, unsigned long size) |
470 | { | 459 | { |
471 | struct membank *bank = &meminfo.bank[meminfo.nr_banks]; | 460 | struct membank *bank = &meminfo.bank[meminfo.nr_banks]; |
472 | 461 | ||
@@ -801,23 +790,29 @@ static void __init squash_mem_tags(struct tag *tag) | |||
801 | tag->hdr.tag = ATAG_NONE; | 790 | tag->hdr.tag = ATAG_NONE; |
802 | } | 791 | } |
803 | 792 | ||
804 | void __init setup_arch(char **cmdline_p) | 793 | static struct machine_desc * __init setup_machine_tags(unsigned int nr) |
805 | { | 794 | { |
806 | struct tag *tags = (struct tag *)&init_tags; | 795 | struct tag *tags = (struct tag *)&init_tags; |
807 | struct machine_desc *mdesc; | 796 | struct machine_desc *mdesc = NULL, *p; |
808 | char *from = default_command_line; | 797 | char *from = default_command_line; |
809 | 798 | ||
810 | init_tags.mem.start = PHYS_OFFSET; | 799 | init_tags.mem.start = PHYS_OFFSET; |
811 | 800 | ||
812 | unwind_init(); | 801 | /* |
813 | 802 | * locate machine in the list of supported machines. | |
814 | setup_processor(); | 803 | */ |
815 | mdesc = setup_machine(machine_arch_type); | 804 | for_each_machine_desc(p) |
816 | machine_desc = mdesc; | 805 | if (nr == p->nr) { |
817 | machine_name = mdesc->name; | 806 | printk("Machine: %s\n", p->name); |
807 | mdesc = p; | ||
808 | break; | ||
809 | } | ||
818 | 810 | ||
819 | if (mdesc->soft_reboot) | 811 | if (!mdesc) { |
820 | reboot_setup("s"); | 812 | early_print("\nError: unrecognized/unsupported machine ID" |
813 | " (r1 = 0x%08x).\n\n", nr); | ||
814 | dump_machine_table(); /* does not return */ | ||
815 | } | ||
821 | 816 | ||
822 | if (__atags_pointer) | 817 | if (__atags_pointer) |
823 | tags = phys_to_virt(__atags_pointer); | 818 | tags = phys_to_virt(__atags_pointer); |
@@ -849,8 +844,17 @@ void __init setup_arch(char **cmdline_p) | |||
849 | if (tags->hdr.tag != ATAG_CORE) | 844 | if (tags->hdr.tag != ATAG_CORE) |
850 | convert_to_tag_list(tags); | 845 | convert_to_tag_list(tags); |
851 | #endif | 846 | #endif |
852 | if (tags->hdr.tag != ATAG_CORE) | 847 | |
848 | if (tags->hdr.tag != ATAG_CORE) { | ||
849 | #if defined(CONFIG_OF) | ||
850 | /* | ||
851 | * If CONFIG_OF is set, then assume this is a reasonably | ||
852 | * modern system that should pass boot parameters | ||
853 | */ | ||
854 | early_print("Warning: Neither atags nor dtb found\n"); | ||
855 | #endif | ||
853 | tags = (struct tag *)&init_tags; | 856 | tags = (struct tag *)&init_tags; |
857 | } | ||
854 | 858 | ||
855 | if (mdesc->fixup) | 859 | if (mdesc->fixup) |
856 | mdesc->fixup(mdesc, tags, &from, &meminfo); | 860 | mdesc->fixup(mdesc, tags, &from, &meminfo); |
@@ -862,14 +866,34 @@ void __init setup_arch(char **cmdline_p) | |||
862 | parse_tags(tags); | 866 | parse_tags(tags); |
863 | } | 867 | } |
864 | 868 | ||
869 | /* parse_early_param needs a boot_command_line */ | ||
870 | strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); | ||
871 | |||
872 | return mdesc; | ||
873 | } | ||
874 | |||
875 | |||
876 | void __init setup_arch(char **cmdline_p) | ||
877 | { | ||
878 | struct machine_desc *mdesc; | ||
879 | |||
880 | unwind_init(); | ||
881 | |||
882 | setup_processor(); | ||
883 | mdesc = setup_machine_fdt(__atags_pointer); | ||
884 | if (!mdesc) | ||
885 | mdesc = setup_machine_tags(machine_arch_type); | ||
886 | machine_desc = mdesc; | ||
887 | machine_name = mdesc->name; | ||
888 | |||
889 | if (mdesc->soft_reboot) | ||
890 | reboot_setup("s"); | ||
891 | |||
865 | init_mm.start_code = (unsigned long) _text; | 892 | init_mm.start_code = (unsigned long) _text; |
866 | init_mm.end_code = (unsigned long) _etext; | 893 | init_mm.end_code = (unsigned long) _etext; |
867 | init_mm.end_data = (unsigned long) _edata; | 894 | init_mm.end_data = (unsigned long) _edata; |
868 | init_mm.brk = (unsigned long) _end; | 895 | init_mm.brk = (unsigned long) _end; |
869 | 896 | ||
870 | /* parse_early_param needs a boot_command_line */ | ||
871 | strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); | ||
872 | |||
873 | /* populate cmd_line too for later use, preserving boot_command_line */ | 897 | /* populate cmd_line too for later use, preserving boot_command_line */ |
874 | strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); | 898 | strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); |
875 | *cmdline_p = cmd_line; | 899 | *cmdline_p = cmd_line; |
@@ -881,6 +905,8 @@ void __init setup_arch(char **cmdline_p) | |||
881 | paging_init(mdesc); | 905 | paging_init(mdesc); |
882 | request_standard_resources(mdesc); | 906 | request_standard_resources(mdesc); |
883 | 907 | ||
908 | unflatten_device_tree(); | ||
909 | |||
884 | #ifdef CONFIG_SMP | 910 | #ifdef CONFIG_SMP |
885 | if (is_smp()) | 911 | if (is_smp()) |
886 | smp_init_cpus(); | 912 | smp_init_cpus(); |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index d439a8f4c078..344e52b16c8c 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -105,6 +105,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
105 | */ | 105 | */ |
106 | secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; | 106 | secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; |
107 | secondary_data.pgdir = virt_to_phys(pgd); | 107 | secondary_data.pgdir = virt_to_phys(pgd); |
108 | secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); | ||
108 | __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); | 109 | __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); |
109 | outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); | 110 | outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); |
110 | 111 | ||
diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S index 6dc06487f3c3..c562f649734c 100644 --- a/arch/arm/lib/lib1funcs.S +++ b/arch/arm/lib/lib1funcs.S | |||
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA. */ | |||
35 | 35 | ||
36 | #include <linux/linkage.h> | 36 | #include <linux/linkage.h> |
37 | #include <asm/assembler.h> | 37 | #include <asm/assembler.h> |
38 | 38 | #include <asm/unwind.h> | |
39 | 39 | ||
40 | .macro ARM_DIV_BODY dividend, divisor, result, curbit | 40 | .macro ARM_DIV_BODY dividend, divisor, result, curbit |
41 | 41 | ||
@@ -207,6 +207,7 @@ Boston, MA 02111-1307, USA. */ | |||
207 | 207 | ||
208 | ENTRY(__udivsi3) | 208 | ENTRY(__udivsi3) |
209 | ENTRY(__aeabi_uidiv) | 209 | ENTRY(__aeabi_uidiv) |
210 | UNWIND(.fnstart) | ||
210 | 211 | ||
211 | subs r2, r1, #1 | 212 | subs r2, r1, #1 |
212 | moveq pc, lr | 213 | moveq pc, lr |
@@ -230,10 +231,12 @@ ENTRY(__aeabi_uidiv) | |||
230 | mov r0, r0, lsr r2 | 231 | mov r0, r0, lsr r2 |
231 | mov pc, lr | 232 | mov pc, lr |
232 | 233 | ||
234 | UNWIND(.fnend) | ||
233 | ENDPROC(__udivsi3) | 235 | ENDPROC(__udivsi3) |
234 | ENDPROC(__aeabi_uidiv) | 236 | ENDPROC(__aeabi_uidiv) |
235 | 237 | ||
236 | ENTRY(__umodsi3) | 238 | ENTRY(__umodsi3) |
239 | UNWIND(.fnstart) | ||
237 | 240 | ||
238 | subs r2, r1, #1 @ compare divisor with 1 | 241 | subs r2, r1, #1 @ compare divisor with 1 |
239 | bcc Ldiv0 | 242 | bcc Ldiv0 |
@@ -247,10 +250,12 @@ ENTRY(__umodsi3) | |||
247 | 250 | ||
248 | mov pc, lr | 251 | mov pc, lr |
249 | 252 | ||
253 | UNWIND(.fnend) | ||
250 | ENDPROC(__umodsi3) | 254 | ENDPROC(__umodsi3) |
251 | 255 | ||
252 | ENTRY(__divsi3) | 256 | ENTRY(__divsi3) |
253 | ENTRY(__aeabi_idiv) | 257 | ENTRY(__aeabi_idiv) |
258 | UNWIND(.fnstart) | ||
254 | 259 | ||
255 | cmp r1, #0 | 260 | cmp r1, #0 |
256 | eor ip, r0, r1 @ save the sign of the result. | 261 | eor ip, r0, r1 @ save the sign of the result. |
@@ -287,10 +292,12 @@ ENTRY(__aeabi_idiv) | |||
287 | rsbmi r0, r0, #0 | 292 | rsbmi r0, r0, #0 |
288 | mov pc, lr | 293 | mov pc, lr |
289 | 294 | ||
295 | UNWIND(.fnend) | ||
290 | ENDPROC(__divsi3) | 296 | ENDPROC(__divsi3) |
291 | ENDPROC(__aeabi_idiv) | 297 | ENDPROC(__aeabi_idiv) |
292 | 298 | ||
293 | ENTRY(__modsi3) | 299 | ENTRY(__modsi3) |
300 | UNWIND(.fnstart) | ||
294 | 301 | ||
295 | cmp r1, #0 | 302 | cmp r1, #0 |
296 | beq Ldiv0 | 303 | beq Ldiv0 |
@@ -310,11 +317,14 @@ ENTRY(__modsi3) | |||
310 | rsbmi r0, r0, #0 | 317 | rsbmi r0, r0, #0 |
311 | mov pc, lr | 318 | mov pc, lr |
312 | 319 | ||
320 | UNWIND(.fnend) | ||
313 | ENDPROC(__modsi3) | 321 | ENDPROC(__modsi3) |
314 | 322 | ||
315 | #ifdef CONFIG_AEABI | 323 | #ifdef CONFIG_AEABI |
316 | 324 | ||
317 | ENTRY(__aeabi_uidivmod) | 325 | ENTRY(__aeabi_uidivmod) |
326 | UNWIND(.fnstart) | ||
327 | UNWIND(.save {r0, r1, ip, lr} ) | ||
318 | 328 | ||
319 | stmfd sp!, {r0, r1, ip, lr} | 329 | stmfd sp!, {r0, r1, ip, lr} |
320 | bl __aeabi_uidiv | 330 | bl __aeabi_uidiv |
@@ -323,10 +333,12 @@ ENTRY(__aeabi_uidivmod) | |||
323 | sub r1, r1, r3 | 333 | sub r1, r1, r3 |
324 | mov pc, lr | 334 | mov pc, lr |
325 | 335 | ||
336 | UNWIND(.fnend) | ||
326 | ENDPROC(__aeabi_uidivmod) | 337 | ENDPROC(__aeabi_uidivmod) |
327 | 338 | ||
328 | ENTRY(__aeabi_idivmod) | 339 | ENTRY(__aeabi_idivmod) |
329 | 340 | UNWIND(.fnstart) | |
341 | UNWIND(.save {r0, r1, ip, lr} ) | ||
330 | stmfd sp!, {r0, r1, ip, lr} | 342 | stmfd sp!, {r0, r1, ip, lr} |
331 | bl __aeabi_idiv | 343 | bl __aeabi_idiv |
332 | ldmfd sp!, {r1, r2, ip, lr} | 344 | ldmfd sp!, {r1, r2, ip, lr} |
@@ -334,15 +346,18 @@ ENTRY(__aeabi_idivmod) | |||
334 | sub r1, r1, r3 | 346 | sub r1, r1, r3 |
335 | mov pc, lr | 347 | mov pc, lr |
336 | 348 | ||
349 | UNWIND(.fnend) | ||
337 | ENDPROC(__aeabi_idivmod) | 350 | ENDPROC(__aeabi_idivmod) |
338 | 351 | ||
339 | #endif | 352 | #endif |
340 | 353 | ||
341 | Ldiv0: | 354 | Ldiv0: |
342 | 355 | UNWIND(.fnstart) | |
356 | UNWIND(.pad #4) | ||
357 | UNWIND(.save {lr}) | ||
343 | str lr, [sp, #-8]! | 358 | str lr, [sp, #-8]! |
344 | bl __div0 | 359 | bl __div0 |
345 | mov r0, #0 @ About as wrong as it could be. | 360 | mov r0, #0 @ About as wrong as it could be. |
346 | ldr pc, [sp], #8 | 361 | ldr pc, [sp], #8 |
347 | 362 | UNWIND(.fnend) | |
348 | 363 | ENDPROC(Ldiv0) | |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 2d299bf5d72f..22484670e7ba 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -3,9 +3,6 @@ if ARCH_AT91 | |||
3 | config HAVE_AT91_DATAFLASH_CARD | 3 | config HAVE_AT91_DATAFLASH_CARD |
4 | bool | 4 | bool |
5 | 5 | ||
6 | config HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
7 | bool | ||
8 | |||
9 | config HAVE_AT91_USART3 | 6 | config HAVE_AT91_USART3 |
10 | bool | 7 | bool |
11 | 8 | ||
@@ -85,11 +82,6 @@ config ARCH_AT91CAP9 | |||
85 | select HAVE_FB_ATMEL | 82 | select HAVE_FB_ATMEL |
86 | select HAVE_NET_MACB | 83 | select HAVE_NET_MACB |
87 | 84 | ||
88 | config ARCH_AT572D940HF | ||
89 | bool "AT572D940HF" | ||
90 | select CPU_ARM926T | ||
91 | select GENERIC_CLOCKEVENTS | ||
92 | |||
93 | config ARCH_AT91X40 | 85 | config ARCH_AT91X40 |
94 | bool "AT91x40" | 86 | bool "AT91x40" |
95 | select ARCH_USES_GETTIMEOFFSET | 87 | select ARCH_USES_GETTIMEOFFSET |
@@ -209,7 +201,6 @@ comment "AT91SAM9260 / AT91SAM9XE Board Type" | |||
209 | config MACH_AT91SAM9260EK | 201 | config MACH_AT91SAM9260EK |
210 | bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit" | 202 | bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit" |
211 | select HAVE_AT91_DATAFLASH_CARD | 203 | select HAVE_AT91_DATAFLASH_CARD |
212 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
213 | help | 204 | help |
214 | Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit | 205 | Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit |
215 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> | 206 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> |
@@ -270,7 +261,6 @@ comment "AT91SAM9261 Board Type" | |||
270 | config MACH_AT91SAM9261EK | 261 | config MACH_AT91SAM9261EK |
271 | bool "Atmel AT91SAM9261-EK Evaluation Kit" | 262 | bool "Atmel AT91SAM9261-EK Evaluation Kit" |
272 | select HAVE_AT91_DATAFLASH_CARD | 263 | select HAVE_AT91_DATAFLASH_CARD |
273 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
274 | help | 264 | help |
275 | Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit. | 265 | Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit. |
276 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820> | 266 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820> |
@@ -286,7 +276,6 @@ comment "AT91SAM9G10 Board Type" | |||
286 | config MACH_AT91SAM9G10EK | 276 | config MACH_AT91SAM9G10EK |
287 | bool "Atmel AT91SAM9G10-EK Evaluation Kit" | 277 | bool "Atmel AT91SAM9G10-EK Evaluation Kit" |
288 | select HAVE_AT91_DATAFLASH_CARD | 278 | select HAVE_AT91_DATAFLASH_CARD |
289 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
290 | help | 279 | help |
291 | Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit. | 280 | Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit. |
292 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588> | 281 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588> |
@@ -302,7 +291,6 @@ comment "AT91SAM9263 Board Type" | |||
302 | config MACH_AT91SAM9263EK | 291 | config MACH_AT91SAM9263EK |
303 | bool "Atmel AT91SAM9263-EK Evaluation Kit" | 292 | bool "Atmel AT91SAM9263-EK Evaluation Kit" |
304 | select HAVE_AT91_DATAFLASH_CARD | 293 | select HAVE_AT91_DATAFLASH_CARD |
305 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
306 | help | 294 | help |
307 | Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit. | 295 | Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit. |
308 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057> | 296 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057> |
@@ -343,7 +331,6 @@ comment "AT91SAM9G20 Board Type" | |||
343 | config MACH_AT91SAM9G20EK | 331 | config MACH_AT91SAM9G20EK |
344 | bool "Atmel AT91SAM9G20-EK Evaluation Kit" | 332 | bool "Atmel AT91SAM9G20-EK Evaluation Kit" |
345 | select HAVE_AT91_DATAFLASH_CARD | 333 | select HAVE_AT91_DATAFLASH_CARD |
346 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
347 | help | 334 | help |
348 | Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit | 335 | Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit |
349 | that embeds only one SD/MMC slot. | 336 | that embeds only one SD/MMC slot. |
@@ -351,7 +338,6 @@ config MACH_AT91SAM9G20EK | |||
351 | config MACH_AT91SAM9G20EK_2MMC | 338 | config MACH_AT91SAM9G20EK_2MMC |
352 | depends on MACH_AT91SAM9G20EK | 339 | depends on MACH_AT91SAM9G20EK |
353 | bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" | 340 | bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" |
354 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
355 | help | 341 | help |
356 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit | 342 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit |
357 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and | 343 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and |
@@ -416,7 +402,6 @@ comment "AT91SAM9G45 Board Type" | |||
416 | 402 | ||
417 | config MACH_AT91SAM9M10G45EK | 403 | config MACH_AT91SAM9M10G45EK |
418 | bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" | 404 | bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" |
419 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
420 | help | 405 | help |
421 | Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit. | 406 | Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit. |
422 | "ES" at the end of the name means that this board is an | 407 | "ES" at the end of the name means that this board is an |
@@ -433,7 +418,6 @@ comment "AT91CAP9 Board Type" | |||
433 | config MACH_AT91CAP9ADK | 418 | config MACH_AT91CAP9ADK |
434 | bool "Atmel AT91CAP9A-DK Evaluation Kit" | 419 | bool "Atmel AT91CAP9A-DK Evaluation Kit" |
435 | select HAVE_AT91_DATAFLASH_CARD | 420 | select HAVE_AT91_DATAFLASH_CARD |
436 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
437 | help | 421 | help |
438 | Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit. | 422 | Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit. |
439 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138> | 423 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138> |
@@ -442,23 +426,6 @@ endif | |||
442 | 426 | ||
443 | # ---------------------------------------------------------- | 427 | # ---------------------------------------------------------- |
444 | 428 | ||
445 | if ARCH_AT572D940HF | ||
446 | |||
447 | comment "AT572D940HF Board Type" | ||
448 | |||
449 | config MACH_AT572D940HFEB | ||
450 | bool "AT572D940HF-EK" | ||
451 | depends on ARCH_AT572D940HF | ||
452 | select HAVE_AT91_DATAFLASH_CARD | ||
453 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
454 | help | ||
455 | Select this if you are using Atmel's AT572D940HF-EK evaluation kit. | ||
456 | <http://www.atmel.com/products/diopsis/default.asp> | ||
457 | |||
458 | endif | ||
459 | |||
460 | # ---------------------------------------------------------- | ||
461 | |||
462 | if ARCH_AT91X40 | 429 | if ARCH_AT91X40 |
463 | 430 | ||
464 | comment "AT91X40 Board Type" | 431 | comment "AT91X40 Board Type" |
@@ -483,13 +450,6 @@ config MTD_AT91_DATAFLASH_CARD | |||
483 | help | 450 | help |
484 | Enable support for the DataFlash card. | 451 | Enable support for the DataFlash card. |
485 | 452 | ||
486 | config MTD_NAND_ATMEL_BUSWIDTH_16 | ||
487 | bool "Enable 16-bit data bus interface to NAND flash" | ||
488 | depends on HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
489 | help | ||
490 | On AT91SAM926x boards both types of NAND flash can be present | ||
491 | (8 and 16 bit data bus width). | ||
492 | |||
493 | # ---------------------------------------------------------- | 453 | # ---------------------------------------------------------- |
494 | 454 | ||
495 | comment "AT91 Feature Selections" | 455 | comment "AT91 Feature Selections" |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index a83835e0c185..96966231920c 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -19,7 +19,6 @@ obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devi | |||
19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9_alt_reset.o | 19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9_alt_reset.o |
20 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o | 20 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o |
21 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o | 21 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o |
22 | obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o | ||
23 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 22 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
24 | 23 | ||
25 | # AT91RM9200 board-specific support | 24 | # AT91RM9200 board-specific support |
@@ -78,9 +77,6 @@ obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o | |||
78 | # AT91CAP9 board-specific support | 77 | # AT91CAP9 board-specific support |
79 | obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o | 78 | obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o |
80 | 79 | ||
81 | # AT572D940HF board-specific support | ||
82 | obj-$(CONFIG_MACH_AT572D940HFEB) += board-at572d940hf_ek.o | ||
83 | |||
84 | # AT91X40 board-specific support | 80 | # AT91X40 board-specific support |
85 | obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o | 81 | obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o |
86 | 82 | ||
diff --git a/arch/arm/mach-at91/at572d940hf.c b/arch/arm/mach-at91/at572d940hf.c deleted file mode 100644 index a6b9c68c003a..000000000000 --- a/arch/arm/mach-at91/at572d940hf.c +++ /dev/null | |||
@@ -1,377 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at572d940hf.c | ||
3 | * | ||
4 | * Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2008 Atmel | ||
6 | * | ||
7 | * Copyright (C) 2005 SAN People | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <linux/module.h> | ||
26 | |||
27 | #include <asm/mach/irq.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | #include <mach/at572d940hf.h> | ||
31 | #include <mach/at91_pmc.h> | ||
32 | #include <mach/at91_rstc.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | #include "clock.h" | ||
36 | |||
37 | static struct map_desc at572d940hf_io_desc[] __initdata = { | ||
38 | { | ||
39 | .virtual = AT91_VA_BASE_SYS, | ||
40 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | ||
41 | .length = SZ_16K, | ||
42 | .type = MT_DEVICE, | ||
43 | }, { | ||
44 | .virtual = AT91_IO_VIRT_BASE - AT572D940HF_SRAM_SIZE, | ||
45 | .pfn = __phys_to_pfn(AT572D940HF_SRAM_BASE), | ||
46 | .length = AT572D940HF_SRAM_SIZE, | ||
47 | .type = MT_DEVICE, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | /* -------------------------------------------------------------------- | ||
52 | * Clocks | ||
53 | * -------------------------------------------------------------------- */ | ||
54 | |||
55 | /* | ||
56 | * The peripheral clocks. | ||
57 | */ | ||
58 | static struct clk pioA_clk = { | ||
59 | .name = "pioA_clk", | ||
60 | .pmc_mask = 1 << AT572D940HF_ID_PIOA, | ||
61 | .type = CLK_TYPE_PERIPHERAL, | ||
62 | }; | ||
63 | static struct clk pioB_clk = { | ||
64 | .name = "pioB_clk", | ||
65 | .pmc_mask = 1 << AT572D940HF_ID_PIOB, | ||
66 | .type = CLK_TYPE_PERIPHERAL, | ||
67 | }; | ||
68 | static struct clk pioC_clk = { | ||
69 | .name = "pioC_clk", | ||
70 | .pmc_mask = 1 << AT572D940HF_ID_PIOC, | ||
71 | .type = CLK_TYPE_PERIPHERAL, | ||
72 | }; | ||
73 | static struct clk macb_clk = { | ||
74 | .name = "macb_clk", | ||
75 | .pmc_mask = 1 << AT572D940HF_ID_EMAC, | ||
76 | .type = CLK_TYPE_PERIPHERAL, | ||
77 | }; | ||
78 | static struct clk usart0_clk = { | ||
79 | .name = "usart0_clk", | ||
80 | .pmc_mask = 1 << AT572D940HF_ID_US0, | ||
81 | .type = CLK_TYPE_PERIPHERAL, | ||
82 | }; | ||
83 | static struct clk usart1_clk = { | ||
84 | .name = "usart1_clk", | ||
85 | .pmc_mask = 1 << AT572D940HF_ID_US1, | ||
86 | .type = CLK_TYPE_PERIPHERAL, | ||
87 | }; | ||
88 | static struct clk usart2_clk = { | ||
89 | .name = "usart2_clk", | ||
90 | .pmc_mask = 1 << AT572D940HF_ID_US2, | ||
91 | .type = CLK_TYPE_PERIPHERAL, | ||
92 | }; | ||
93 | static struct clk mmc_clk = { | ||
94 | .name = "mci_clk", | ||
95 | .pmc_mask = 1 << AT572D940HF_ID_MCI, | ||
96 | .type = CLK_TYPE_PERIPHERAL, | ||
97 | }; | ||
98 | static struct clk udc_clk = { | ||
99 | .name = "udc_clk", | ||
100 | .pmc_mask = 1 << AT572D940HF_ID_UDP, | ||
101 | .type = CLK_TYPE_PERIPHERAL, | ||
102 | }; | ||
103 | static struct clk twi0_clk = { | ||
104 | .name = "twi0_clk", | ||
105 | .pmc_mask = 1 << AT572D940HF_ID_TWI0, | ||
106 | .type = CLK_TYPE_PERIPHERAL, | ||
107 | }; | ||
108 | static struct clk spi0_clk = { | ||
109 | .name = "spi0_clk", | ||
110 | .pmc_mask = 1 << AT572D940HF_ID_SPI0, | ||
111 | .type = CLK_TYPE_PERIPHERAL, | ||
112 | }; | ||
113 | static struct clk spi1_clk = { | ||
114 | .name = "spi1_clk", | ||
115 | .pmc_mask = 1 << AT572D940HF_ID_SPI1, | ||
116 | .type = CLK_TYPE_PERIPHERAL, | ||
117 | }; | ||
118 | static struct clk ssc0_clk = { | ||
119 | .name = "ssc0_clk", | ||
120 | .pmc_mask = 1 << AT572D940HF_ID_SSC0, | ||
121 | .type = CLK_TYPE_PERIPHERAL, | ||
122 | }; | ||
123 | static struct clk ssc1_clk = { | ||
124 | .name = "ssc1_clk", | ||
125 | .pmc_mask = 1 << AT572D940HF_ID_SSC1, | ||
126 | .type = CLK_TYPE_PERIPHERAL, | ||
127 | }; | ||
128 | static struct clk ssc2_clk = { | ||
129 | .name = "ssc2_clk", | ||
130 | .pmc_mask = 1 << AT572D940HF_ID_SSC2, | ||
131 | .type = CLK_TYPE_PERIPHERAL, | ||
132 | }; | ||
133 | static struct clk tc0_clk = { | ||
134 | .name = "tc0_clk", | ||
135 | .pmc_mask = 1 << AT572D940HF_ID_TC0, | ||
136 | .type = CLK_TYPE_PERIPHERAL, | ||
137 | }; | ||
138 | static struct clk tc1_clk = { | ||
139 | .name = "tc1_clk", | ||
140 | .pmc_mask = 1 << AT572D940HF_ID_TC1, | ||
141 | .type = CLK_TYPE_PERIPHERAL, | ||
142 | }; | ||
143 | static struct clk tc2_clk = { | ||
144 | .name = "tc2_clk", | ||
145 | .pmc_mask = 1 << AT572D940HF_ID_TC2, | ||
146 | .type = CLK_TYPE_PERIPHERAL, | ||
147 | }; | ||
148 | static struct clk ohci_clk = { | ||
149 | .name = "ohci_clk", | ||
150 | .pmc_mask = 1 << AT572D940HF_ID_UHP, | ||
151 | .type = CLK_TYPE_PERIPHERAL, | ||
152 | }; | ||
153 | static struct clk ssc3_clk = { | ||
154 | .name = "ssc3_clk", | ||
155 | .pmc_mask = 1 << AT572D940HF_ID_SSC3, | ||
156 | .type = CLK_TYPE_PERIPHERAL, | ||
157 | }; | ||
158 | static struct clk twi1_clk = { | ||
159 | .name = "twi1_clk", | ||
160 | .pmc_mask = 1 << AT572D940HF_ID_TWI1, | ||
161 | .type = CLK_TYPE_PERIPHERAL, | ||
162 | }; | ||
163 | static struct clk can0_clk = { | ||
164 | .name = "can0_clk", | ||
165 | .pmc_mask = 1 << AT572D940HF_ID_CAN0, | ||
166 | .type = CLK_TYPE_PERIPHERAL, | ||
167 | }; | ||
168 | static struct clk can1_clk = { | ||
169 | .name = "can1_clk", | ||
170 | .pmc_mask = 1 << AT572D940HF_ID_CAN1, | ||
171 | .type = CLK_TYPE_PERIPHERAL, | ||
172 | }; | ||
173 | static struct clk mAgicV_clk = { | ||
174 | .name = "mAgicV_clk", | ||
175 | .pmc_mask = 1 << AT572D940HF_ID_MSIRQ0, | ||
176 | .type = CLK_TYPE_PERIPHERAL, | ||
177 | }; | ||
178 | |||
179 | |||
180 | static struct clk *periph_clocks[] __initdata = { | ||
181 | &pioA_clk, | ||
182 | &pioB_clk, | ||
183 | &pioC_clk, | ||
184 | &macb_clk, | ||
185 | &usart0_clk, | ||
186 | &usart1_clk, | ||
187 | &usart2_clk, | ||
188 | &mmc_clk, | ||
189 | &udc_clk, | ||
190 | &twi0_clk, | ||
191 | &spi0_clk, | ||
192 | &spi1_clk, | ||
193 | &ssc0_clk, | ||
194 | &ssc1_clk, | ||
195 | &ssc2_clk, | ||
196 | &tc0_clk, | ||
197 | &tc1_clk, | ||
198 | &tc2_clk, | ||
199 | &ohci_clk, | ||
200 | &ssc3_clk, | ||
201 | &twi1_clk, | ||
202 | &can0_clk, | ||
203 | &can1_clk, | ||
204 | &mAgicV_clk, | ||
205 | /* irq0 .. irq2 */ | ||
206 | }; | ||
207 | |||
208 | /* | ||
209 | * The five programmable clocks. | ||
210 | * You must configure pin multiplexing to bring these signals out. | ||
211 | */ | ||
212 | static struct clk pck0 = { | ||
213 | .name = "pck0", | ||
214 | .pmc_mask = AT91_PMC_PCK0, | ||
215 | .type = CLK_TYPE_PROGRAMMABLE, | ||
216 | .id = 0, | ||
217 | }; | ||
218 | static struct clk pck1 = { | ||
219 | .name = "pck1", | ||
220 | .pmc_mask = AT91_PMC_PCK1, | ||
221 | .type = CLK_TYPE_PROGRAMMABLE, | ||
222 | .id = 1, | ||
223 | }; | ||
224 | static struct clk pck2 = { | ||
225 | .name = "pck2", | ||
226 | .pmc_mask = AT91_PMC_PCK2, | ||
227 | .type = CLK_TYPE_PROGRAMMABLE, | ||
228 | .id = 2, | ||
229 | }; | ||
230 | static struct clk pck3 = { | ||
231 | .name = "pck3", | ||
232 | .pmc_mask = AT91_PMC_PCK3, | ||
233 | .type = CLK_TYPE_PROGRAMMABLE, | ||
234 | .id = 3, | ||
235 | }; | ||
236 | |||
237 | static struct clk mAgicV_mem_clk = { | ||
238 | .name = "mAgicV_mem_clk", | ||
239 | .pmc_mask = AT91_PMC_PCK4, | ||
240 | .type = CLK_TYPE_PROGRAMMABLE, | ||
241 | .id = 4, | ||
242 | }; | ||
243 | |||
244 | /* HClocks */ | ||
245 | static struct clk hck0 = { | ||
246 | .name = "hck0", | ||
247 | .pmc_mask = AT91_PMC_HCK0, | ||
248 | .type = CLK_TYPE_SYSTEM, | ||
249 | .id = 0, | ||
250 | }; | ||
251 | static struct clk hck1 = { | ||
252 | .name = "hck1", | ||
253 | .pmc_mask = AT91_PMC_HCK1, | ||
254 | .type = CLK_TYPE_SYSTEM, | ||
255 | .id = 1, | ||
256 | }; | ||
257 | |||
258 | static void __init at572d940hf_register_clocks(void) | ||
259 | { | ||
260 | int i; | ||
261 | |||
262 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | ||
263 | clk_register(periph_clocks[i]); | ||
264 | |||
265 | clk_register(&pck0); | ||
266 | clk_register(&pck1); | ||
267 | clk_register(&pck2); | ||
268 | clk_register(&pck3); | ||
269 | clk_register(&mAgicV_mem_clk); | ||
270 | |||
271 | clk_register(&hck0); | ||
272 | clk_register(&hck1); | ||
273 | } | ||
274 | |||
275 | /* -------------------------------------------------------------------- | ||
276 | * GPIO | ||
277 | * -------------------------------------------------------------------- */ | ||
278 | |||
279 | static struct at91_gpio_bank at572d940hf_gpio[] = { | ||
280 | { | ||
281 | .id = AT572D940HF_ID_PIOA, | ||
282 | .offset = AT91_PIOA, | ||
283 | .clock = &pioA_clk, | ||
284 | }, { | ||
285 | .id = AT572D940HF_ID_PIOB, | ||
286 | .offset = AT91_PIOB, | ||
287 | .clock = &pioB_clk, | ||
288 | }, { | ||
289 | .id = AT572D940HF_ID_PIOC, | ||
290 | .offset = AT91_PIOC, | ||
291 | .clock = &pioC_clk, | ||
292 | } | ||
293 | }; | ||
294 | |||
295 | static void at572d940hf_reset(void) | ||
296 | { | ||
297 | at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); | ||
298 | } | ||
299 | |||
300 | |||
301 | /* -------------------------------------------------------------------- | ||
302 | * AT572D940HF processor initialization | ||
303 | * -------------------------------------------------------------------- */ | ||
304 | |||
305 | void __init at572d940hf_initialize(unsigned long main_clock) | ||
306 | { | ||
307 | /* Map peripherals */ | ||
308 | iotable_init(at572d940hf_io_desc, ARRAY_SIZE(at572d940hf_io_desc)); | ||
309 | |||
310 | at91_arch_reset = at572d940hf_reset; | ||
311 | at91_extern_irq = (1 << AT572D940HF_ID_IRQ0) | (1 << AT572D940HF_ID_IRQ1) | ||
312 | | (1 << AT572D940HF_ID_IRQ2); | ||
313 | |||
314 | /* Init clock subsystem */ | ||
315 | at91_clock_init(main_clock); | ||
316 | |||
317 | /* Register the processor-specific clocks */ | ||
318 | at572d940hf_register_clocks(); | ||
319 | |||
320 | /* Register GPIO subsystem */ | ||
321 | at91_gpio_init(at572d940hf_gpio, 3); | ||
322 | } | ||
323 | |||
324 | /* -------------------------------------------------------------------- | ||
325 | * Interrupt initialization | ||
326 | * -------------------------------------------------------------------- */ | ||
327 | |||
328 | /* | ||
329 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
330 | */ | ||
331 | static unsigned int at572d940hf_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
332 | 7, /* Advanced Interrupt Controller */ | ||
333 | 7, /* System Peripherals */ | ||
334 | 0, /* Parallel IO Controller A */ | ||
335 | 0, /* Parallel IO Controller B */ | ||
336 | 0, /* Parallel IO Controller C */ | ||
337 | 3, /* Ethernet */ | ||
338 | 6, /* USART 0 */ | ||
339 | 6, /* USART 1 */ | ||
340 | 6, /* USART 2 */ | ||
341 | 0, /* Multimedia Card Interface */ | ||
342 | 4, /* USB Device Port */ | ||
343 | 0, /* Two-Wire Interface 0 */ | ||
344 | 6, /* Serial Peripheral Interface 0 */ | ||
345 | 6, /* Serial Peripheral Interface 1 */ | ||
346 | 5, /* Serial Synchronous Controller 0 */ | ||
347 | 5, /* Serial Synchronous Controller 1 */ | ||
348 | 5, /* Serial Synchronous Controller 2 */ | ||
349 | 0, /* Timer Counter 0 */ | ||
350 | 0, /* Timer Counter 1 */ | ||
351 | 0, /* Timer Counter 2 */ | ||
352 | 3, /* USB Host port */ | ||
353 | 3, /* Serial Synchronous Controller 3 */ | ||
354 | 0, /* Two-Wire Interface 1 */ | ||
355 | 0, /* CAN Controller 0 */ | ||
356 | 0, /* CAN Controller 1 */ | ||
357 | 0, /* mAgicV HALT line */ | ||
358 | 0, /* mAgicV SIRQ0 line */ | ||
359 | 0, /* mAgicV exception line */ | ||
360 | 0, /* mAgicV end of DMA line */ | ||
361 | 0, /* Advanced Interrupt Controller */ | ||
362 | 0, /* Advanced Interrupt Controller */ | ||
363 | 0, /* Advanced Interrupt Controller */ | ||
364 | }; | ||
365 | |||
366 | void __init at572d940hf_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | ||
367 | { | ||
368 | if (!priority) | ||
369 | priority = at572d940hf_default_irq_priority; | ||
370 | |||
371 | /* Initialize the AIC interrupt controller */ | ||
372 | at91_aic_init(priority); | ||
373 | |||
374 | /* Enable GPIO interrupts */ | ||
375 | at91_gpio_irq_setup(); | ||
376 | } | ||
377 | |||
diff --git a/arch/arm/mach-at91/at572d940hf_devices.c b/arch/arm/mach-at91/at572d940hf_devices.c deleted file mode 100644 index 0fc20a240782..000000000000 --- a/arch/arm/mach-at91/at572d940hf_devices.c +++ /dev/null | |||
@@ -1,970 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at572d940hf_devices.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Atmel Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> | ||
6 | * Copyright (C) 2005 David Brownell | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/map.h> | ||
26 | |||
27 | #include <linux/dma-mapping.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | |||
30 | #include <mach/board.h> | ||
31 | #include <mach/gpio.h> | ||
32 | #include <mach/at572d940hf.h> | ||
33 | #include <mach/at572d940hf_matrix.h> | ||
34 | #include <mach/at91sam9_smc.h> | ||
35 | |||
36 | #include "generic.h" | ||
37 | #include "sam9_smc.h" | ||
38 | |||
39 | |||
40 | /* -------------------------------------------------------------------- | ||
41 | * USB Host | ||
42 | * -------------------------------------------------------------------- */ | ||
43 | |||
44 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
45 | static u64 ohci_dmamask = DMA_BIT_MASK(32); | ||
46 | static struct at91_usbh_data usbh_data; | ||
47 | |||
48 | static struct resource usbh_resources[] = { | ||
49 | [0] = { | ||
50 | .start = AT572D940HF_UHP_BASE, | ||
51 | .end = AT572D940HF_UHP_BASE + SZ_1M - 1, | ||
52 | .flags = IORESOURCE_MEM, | ||
53 | }, | ||
54 | [1] = { | ||
55 | .start = AT572D940HF_ID_UHP, | ||
56 | .end = AT572D940HF_ID_UHP, | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device at572d940hf_usbh_device = { | ||
62 | .name = "at91_ohci", | ||
63 | .id = -1, | ||
64 | .dev = { | ||
65 | .dma_mask = &ohci_dmamask, | ||
66 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
67 | .platform_data = &usbh_data, | ||
68 | }, | ||
69 | .resource = usbh_resources, | ||
70 | .num_resources = ARRAY_SIZE(usbh_resources), | ||
71 | }; | ||
72 | |||
73 | void __init at91_add_device_usbh(struct at91_usbh_data *data) | ||
74 | { | ||
75 | if (!data) | ||
76 | return; | ||
77 | |||
78 | usbh_data = *data; | ||
79 | platform_device_register(&at572d940hf_usbh_device); | ||
80 | |||
81 | } | ||
82 | #else | ||
83 | void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
84 | #endif | ||
85 | |||
86 | |||
87 | /* -------------------------------------------------------------------- | ||
88 | * USB Device (Gadget) | ||
89 | * -------------------------------------------------------------------- */ | ||
90 | |||
91 | #ifdef CONFIG_USB_GADGET_AT91 | ||
92 | static struct at91_udc_data udc_data; | ||
93 | |||
94 | static struct resource udc_resources[] = { | ||
95 | [0] = { | ||
96 | .start = AT572D940HF_BASE_UDP, | ||
97 | .end = AT572D940HF_BASE_UDP + SZ_16K - 1, | ||
98 | .flags = IORESOURCE_MEM, | ||
99 | }, | ||
100 | [1] = { | ||
101 | .start = AT572D940HF_ID_UDP, | ||
102 | .end = AT572D940HF_ID_UDP, | ||
103 | .flags = IORESOURCE_IRQ, | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | static struct platform_device at572d940hf_udc_device = { | ||
108 | .name = "at91_udc", | ||
109 | .id = -1, | ||
110 | .dev = { | ||
111 | .platform_data = &udc_data, | ||
112 | }, | ||
113 | .resource = udc_resources, | ||
114 | .num_resources = ARRAY_SIZE(udc_resources), | ||
115 | }; | ||
116 | |||
117 | void __init at91_add_device_udc(struct at91_udc_data *data) | ||
118 | { | ||
119 | if (!data) | ||
120 | return; | ||
121 | |||
122 | if (data->vbus_pin) { | ||
123 | at91_set_gpio_input(data->vbus_pin, 0); | ||
124 | at91_set_deglitch(data->vbus_pin, 1); | ||
125 | } | ||
126 | |||
127 | /* Pullup pin is handled internally */ | ||
128 | |||
129 | udc_data = *data; | ||
130 | platform_device_register(&at572d940hf_udc_device); | ||
131 | } | ||
132 | #else | ||
133 | void __init at91_add_device_udc(struct at91_udc_data *data) {} | ||
134 | #endif | ||
135 | |||
136 | |||
137 | /* -------------------------------------------------------------------- | ||
138 | * Ethernet | ||
139 | * -------------------------------------------------------------------- */ | ||
140 | |||
141 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | ||
142 | static u64 eth_dmamask = DMA_BIT_MASK(32); | ||
143 | static struct at91_eth_data eth_data; | ||
144 | |||
145 | static struct resource eth_resources[] = { | ||
146 | [0] = { | ||
147 | .start = AT572D940HF_BASE_EMAC, | ||
148 | .end = AT572D940HF_BASE_EMAC + SZ_16K - 1, | ||
149 | .flags = IORESOURCE_MEM, | ||
150 | }, | ||
151 | [1] = { | ||
152 | .start = AT572D940HF_ID_EMAC, | ||
153 | .end = AT572D940HF_ID_EMAC, | ||
154 | .flags = IORESOURCE_IRQ, | ||
155 | }, | ||
156 | }; | ||
157 | |||
158 | static struct platform_device at572d940hf_eth_device = { | ||
159 | .name = "macb", | ||
160 | .id = -1, | ||
161 | .dev = { | ||
162 | .dma_mask = ð_dmamask, | ||
163 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
164 | .platform_data = ð_data, | ||
165 | }, | ||
166 | .resource = eth_resources, | ||
167 | .num_resources = ARRAY_SIZE(eth_resources), | ||
168 | }; | ||
169 | |||
170 | void __init at91_add_device_eth(struct at91_eth_data *data) | ||
171 | { | ||
172 | if (!data) | ||
173 | return; | ||
174 | |||
175 | if (data->phy_irq_pin) { | ||
176 | at91_set_gpio_input(data->phy_irq_pin, 0); | ||
177 | at91_set_deglitch(data->phy_irq_pin, 1); | ||
178 | } | ||
179 | |||
180 | /* Only RMII is supported */ | ||
181 | data->is_rmii = 1; | ||
182 | |||
183 | /* Pins used for RMII */ | ||
184 | at91_set_A_periph(AT91_PIN_PA16, 0); /* ETXCK_EREFCK */ | ||
185 | at91_set_A_periph(AT91_PIN_PA17, 0); /* ERXDV */ | ||
186 | at91_set_A_periph(AT91_PIN_PA18, 0); /* ERX0 */ | ||
187 | at91_set_A_periph(AT91_PIN_PA19, 0); /* ERX1 */ | ||
188 | at91_set_A_periph(AT91_PIN_PA20, 0); /* ERXER */ | ||
189 | at91_set_A_periph(AT91_PIN_PA23, 0); /* ETXEN */ | ||
190 | at91_set_A_periph(AT91_PIN_PA21, 0); /* ETX0 */ | ||
191 | at91_set_A_periph(AT91_PIN_PA22, 0); /* ETX1 */ | ||
192 | at91_set_A_periph(AT91_PIN_PA13, 0); /* EMDIO */ | ||
193 | at91_set_A_periph(AT91_PIN_PA14, 0); /* EMDC */ | ||
194 | |||
195 | eth_data = *data; | ||
196 | platform_device_register(&at572d940hf_eth_device); | ||
197 | } | ||
198 | #else | ||
199 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | ||
200 | #endif | ||
201 | |||
202 | |||
203 | /* -------------------------------------------------------------------- | ||
204 | * MMC / SD | ||
205 | * -------------------------------------------------------------------- */ | ||
206 | |||
207 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | ||
208 | static u64 mmc_dmamask = DMA_BIT_MASK(32); | ||
209 | static struct at91_mmc_data mmc_data; | ||
210 | |||
211 | static struct resource mmc_resources[] = { | ||
212 | [0] = { | ||
213 | .start = AT572D940HF_BASE_MCI, | ||
214 | .end = AT572D940HF_BASE_MCI + SZ_16K - 1, | ||
215 | .flags = IORESOURCE_MEM, | ||
216 | }, | ||
217 | [1] = { | ||
218 | .start = AT572D940HF_ID_MCI, | ||
219 | .end = AT572D940HF_ID_MCI, | ||
220 | .flags = IORESOURCE_IRQ, | ||
221 | }, | ||
222 | }; | ||
223 | |||
224 | static struct platform_device at572d940hf_mmc_device = { | ||
225 | .name = "at91_mci", | ||
226 | .id = -1, | ||
227 | .dev = { | ||
228 | .dma_mask = &mmc_dmamask, | ||
229 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
230 | .platform_data = &mmc_data, | ||
231 | }, | ||
232 | .resource = mmc_resources, | ||
233 | .num_resources = ARRAY_SIZE(mmc_resources), | ||
234 | }; | ||
235 | |||
236 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | ||
237 | { | ||
238 | if (!data) | ||
239 | return; | ||
240 | |||
241 | /* input/irq */ | ||
242 | if (data->det_pin) { | ||
243 | at91_set_gpio_input(data->det_pin, 1); | ||
244 | at91_set_deglitch(data->det_pin, 1); | ||
245 | } | ||
246 | if (data->wp_pin) | ||
247 | at91_set_gpio_input(data->wp_pin, 1); | ||
248 | if (data->vcc_pin) | ||
249 | at91_set_gpio_output(data->vcc_pin, 0); | ||
250 | |||
251 | /* CLK */ | ||
252 | at91_set_A_periph(AT91_PIN_PC22, 0); | ||
253 | |||
254 | /* CMD */ | ||
255 | at91_set_A_periph(AT91_PIN_PC23, 1); | ||
256 | |||
257 | /* DAT0, maybe DAT1..DAT3 */ | ||
258 | at91_set_A_periph(AT91_PIN_PC24, 1); | ||
259 | if (data->wire4) { | ||
260 | at91_set_A_periph(AT91_PIN_PC25, 1); | ||
261 | at91_set_A_periph(AT91_PIN_PC26, 1); | ||
262 | at91_set_A_periph(AT91_PIN_PC27, 1); | ||
263 | } | ||
264 | |||
265 | mmc_data = *data; | ||
266 | platform_device_register(&at572d940hf_mmc_device); | ||
267 | } | ||
268 | #else | ||
269 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | ||
270 | #endif | ||
271 | |||
272 | |||
273 | /* -------------------------------------------------------------------- | ||
274 | * NAND / SmartMedia | ||
275 | * -------------------------------------------------------------------- */ | ||
276 | |||
277 | #if defined(CONFIG_MTD_NAND_ATMEL) || defined(CONFIG_MTD_NAND_ATMEL_MODULE) | ||
278 | static struct atmel_nand_data nand_data; | ||
279 | |||
280 | #define NAND_BASE AT91_CHIPSELECT_3 | ||
281 | |||
282 | static struct resource nand_resources[] = { | ||
283 | { | ||
284 | .start = NAND_BASE, | ||
285 | .end = NAND_BASE + SZ_256M - 1, | ||
286 | .flags = IORESOURCE_MEM, | ||
287 | } | ||
288 | }; | ||
289 | |||
290 | static struct platform_device at572d940hf_nand_device = { | ||
291 | .name = "atmel_nand", | ||
292 | .id = -1, | ||
293 | .dev = { | ||
294 | .platform_data = &nand_data, | ||
295 | }, | ||
296 | .resource = nand_resources, | ||
297 | .num_resources = ARRAY_SIZE(nand_resources), | ||
298 | }; | ||
299 | |||
300 | void __init at91_add_device_nand(struct atmel_nand_data *data) | ||
301 | { | ||
302 | unsigned long csa; | ||
303 | |||
304 | if (!data) | ||
305 | return; | ||
306 | |||
307 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
308 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); | ||
309 | |||
310 | /* enable pin */ | ||
311 | if (data->enable_pin) | ||
312 | at91_set_gpio_output(data->enable_pin, 1); | ||
313 | |||
314 | /* ready/busy pin */ | ||
315 | if (data->rdy_pin) | ||
316 | at91_set_gpio_input(data->rdy_pin, 1); | ||
317 | |||
318 | /* card detect pin */ | ||
319 | if (data->det_pin) | ||
320 | at91_set_gpio_input(data->det_pin, 1); | ||
321 | |||
322 | at91_set_A_periph(AT91_PIN_PB28, 0); /* A[22] */ | ||
323 | at91_set_B_periph(AT91_PIN_PA28, 0); /* NANDOE */ | ||
324 | at91_set_B_periph(AT91_PIN_PA29, 0); /* NANDWE */ | ||
325 | |||
326 | nand_data = *data; | ||
327 | platform_device_register(&at572d940hf_nand_device); | ||
328 | } | ||
329 | |||
330 | #else | ||
331 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} | ||
332 | #endif | ||
333 | |||
334 | |||
335 | /* -------------------------------------------------------------------- | ||
336 | * TWI (i2c) | ||
337 | * -------------------------------------------------------------------- */ | ||
338 | |||
339 | /* | ||
340 | * Prefer the GPIO code since the TWI controller isn't robust | ||
341 | * (gets overruns and underruns under load) and can only issue | ||
342 | * repeated STARTs in one scenario (the driver doesn't yet handle them). | ||
343 | */ | ||
344 | |||
345 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
346 | |||
347 | static struct i2c_gpio_platform_data pdata = { | ||
348 | .sda_pin = AT91_PIN_PC7, | ||
349 | .sda_is_open_drain = 1, | ||
350 | .scl_pin = AT91_PIN_PC8, | ||
351 | .scl_is_open_drain = 1, | ||
352 | .udelay = 2, /* ~100 kHz */ | ||
353 | }; | ||
354 | |||
355 | static struct platform_device at572d940hf_twi_device { | ||
356 | .name = "i2c-gpio", | ||
357 | .id = -1, | ||
358 | .dev.platform_data = &pdata, | ||
359 | }; | ||
360 | |||
361 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | ||
362 | { | ||
363 | at91_set_GPIO_periph(AT91_PIN_PC7, 1); /* TWD (SDA) */ | ||
364 | at91_set_multi_drive(AT91_PIN_PC7, 1); | ||
365 | |||
366 | at91_set_GPIO_periph(AT91_PIN_PA8, 1); /* TWCK (SCL) */ | ||
367 | at91_set_multi_drive(AT91_PIN_PC8, 1); | ||
368 | |||
369 | i2c_register_board_info(0, devices, nr_devices); | ||
370 | platform_device_register(&at572d940hf_twi_device); | ||
371 | } | ||
372 | |||
373 | #elif defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) | ||
374 | |||
375 | static struct resource twi0_resources[] = { | ||
376 | [0] = { | ||
377 | .start = AT572D940HF_BASE_TWI0, | ||
378 | .end = AT572D940HF_BASE_TWI0 + SZ_16K - 1, | ||
379 | .flags = IORESOURCE_MEM, | ||
380 | }, | ||
381 | [1] = { | ||
382 | .start = AT572D940HF_ID_TWI0, | ||
383 | .end = AT572D940HF_ID_TWI0, | ||
384 | .flags = IORESOURCE_IRQ, | ||
385 | }, | ||
386 | }; | ||
387 | |||
388 | static struct platform_device at572d940hf_twi0_device = { | ||
389 | .name = "at91_i2c", | ||
390 | .id = 0, | ||
391 | .resource = twi0_resources, | ||
392 | .num_resources = ARRAY_SIZE(twi0_resources), | ||
393 | }; | ||
394 | |||
395 | static struct resource twi1_resources[] = { | ||
396 | [0] = { | ||
397 | .start = AT572D940HF_BASE_TWI1, | ||
398 | .end = AT572D940HF_BASE_TWI1 + SZ_16K - 1, | ||
399 | .flags = IORESOURCE_MEM, | ||
400 | }, | ||
401 | [1] = { | ||
402 | .start = AT572D940HF_ID_TWI1, | ||
403 | .end = AT572D940HF_ID_TWI1, | ||
404 | .flags = IORESOURCE_IRQ, | ||
405 | }, | ||
406 | }; | ||
407 | |||
408 | static struct platform_device at572d940hf_twi1_device = { | ||
409 | .name = "at91_i2c", | ||
410 | .id = 1, | ||
411 | .resource = twi1_resources, | ||
412 | .num_resources = ARRAY_SIZE(twi1_resources), | ||
413 | }; | ||
414 | |||
415 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | ||
416 | { | ||
417 | /* pins used for TWI0 interface */ | ||
418 | at91_set_A_periph(AT91_PIN_PC7, 0); /* TWD */ | ||
419 | at91_set_multi_drive(AT91_PIN_PC7, 1); | ||
420 | |||
421 | at91_set_A_periph(AT91_PIN_PC8, 0); /* TWCK */ | ||
422 | at91_set_multi_drive(AT91_PIN_PC8, 1); | ||
423 | |||
424 | /* pins used for TWI1 interface */ | ||
425 | at91_set_A_periph(AT91_PIN_PC20, 0); /* TWD */ | ||
426 | at91_set_multi_drive(AT91_PIN_PC20, 1); | ||
427 | |||
428 | at91_set_A_periph(AT91_PIN_PC21, 0); /* TWCK */ | ||
429 | at91_set_multi_drive(AT91_PIN_PC21, 1); | ||
430 | |||
431 | i2c_register_board_info(0, devices, nr_devices); | ||
432 | platform_device_register(&at572d940hf_twi0_device); | ||
433 | platform_device_register(&at572d940hf_twi1_device); | ||
434 | } | ||
435 | #else | ||
436 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) {} | ||
437 | #endif | ||
438 | |||
439 | |||
440 | /* -------------------------------------------------------------------- | ||
441 | * SPI | ||
442 | * -------------------------------------------------------------------- */ | ||
443 | |||
444 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
445 | static u64 spi_dmamask = DMA_BIT_MASK(32); | ||
446 | |||
447 | static struct resource spi0_resources[] = { | ||
448 | [0] = { | ||
449 | .start = AT572D940HF_BASE_SPI0, | ||
450 | .end = AT572D940HF_BASE_SPI0 + SZ_16K - 1, | ||
451 | .flags = IORESOURCE_MEM, | ||
452 | }, | ||
453 | [1] = { | ||
454 | .start = AT572D940HF_ID_SPI0, | ||
455 | .end = AT572D940HF_ID_SPI0, | ||
456 | .flags = IORESOURCE_IRQ, | ||
457 | }, | ||
458 | }; | ||
459 | |||
460 | static struct platform_device at572d940hf_spi0_device = { | ||
461 | .name = "atmel_spi", | ||
462 | .id = 0, | ||
463 | .dev = { | ||
464 | .dma_mask = &spi_dmamask, | ||
465 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
466 | }, | ||
467 | .resource = spi0_resources, | ||
468 | .num_resources = ARRAY_SIZE(spi0_resources), | ||
469 | }; | ||
470 | |||
471 | static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 }; | ||
472 | |||
473 | static struct resource spi1_resources[] = { | ||
474 | [0] = { | ||
475 | .start = AT572D940HF_BASE_SPI1, | ||
476 | .end = AT572D940HF_BASE_SPI1 + SZ_16K - 1, | ||
477 | .flags = IORESOURCE_MEM, | ||
478 | }, | ||
479 | [1] = { | ||
480 | .start = AT572D940HF_ID_SPI1, | ||
481 | .end = AT572D940HF_ID_SPI1, | ||
482 | .flags = IORESOURCE_IRQ, | ||
483 | }, | ||
484 | }; | ||
485 | |||
486 | static struct platform_device at572d940hf_spi1_device = { | ||
487 | .name = "atmel_spi", | ||
488 | .id = 1, | ||
489 | .dev = { | ||
490 | .dma_mask = &spi_dmamask, | ||
491 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
492 | }, | ||
493 | .resource = spi1_resources, | ||
494 | .num_resources = ARRAY_SIZE(spi1_resources), | ||
495 | }; | ||
496 | |||
497 | static const unsigned spi1_standard_cs[4] = { AT91_PIN_PC3, AT91_PIN_PC4, AT91_PIN_PC5, AT91_PIN_PC6 }; | ||
498 | |||
499 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | ||
500 | { | ||
501 | int i; | ||
502 | unsigned long cs_pin; | ||
503 | short enable_spi0 = 0; | ||
504 | short enable_spi1 = 0; | ||
505 | |||
506 | /* Choose SPI chip-selects */ | ||
507 | for (i = 0; i < nr_devices; i++) { | ||
508 | if (devices[i].controller_data) | ||
509 | cs_pin = (unsigned long) devices[i].controller_data; | ||
510 | else if (devices[i].bus_num == 0) | ||
511 | cs_pin = spi0_standard_cs[devices[i].chip_select]; | ||
512 | else | ||
513 | cs_pin = spi1_standard_cs[devices[i].chip_select]; | ||
514 | |||
515 | if (devices[i].bus_num == 0) | ||
516 | enable_spi0 = 1; | ||
517 | else | ||
518 | enable_spi1 = 1; | ||
519 | |||
520 | /* enable chip-select pin */ | ||
521 | at91_set_gpio_output(cs_pin, 1); | ||
522 | |||
523 | /* pass chip-select pin to driver */ | ||
524 | devices[i].controller_data = (void *) cs_pin; | ||
525 | } | ||
526 | |||
527 | spi_register_board_info(devices, nr_devices); | ||
528 | |||
529 | /* Configure SPI bus(es) */ | ||
530 | if (enable_spi0) { | ||
531 | at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ | ||
532 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | ||
533 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | ||
534 | |||
535 | at91_clock_associate("spi0_clk", &at572d940hf_spi0_device.dev, "spi_clk"); | ||
536 | platform_device_register(&at572d940hf_spi0_device); | ||
537 | } | ||
538 | if (enable_spi1) { | ||
539 | at91_set_A_periph(AT91_PIN_PC0, 0); /* SPI1_MISO */ | ||
540 | at91_set_A_periph(AT91_PIN_PC1, 0); /* SPI1_MOSI */ | ||
541 | at91_set_A_periph(AT91_PIN_PC2, 0); /* SPI1_SPCK */ | ||
542 | |||
543 | at91_clock_associate("spi1_clk", &at572d940hf_spi1_device.dev, "spi_clk"); | ||
544 | platform_device_register(&at572d940hf_spi1_device); | ||
545 | } | ||
546 | } | ||
547 | #else | ||
548 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {} | ||
549 | #endif | ||
550 | |||
551 | |||
552 | /* -------------------------------------------------------------------- | ||
553 | * Timer/Counter blocks | ||
554 | * -------------------------------------------------------------------- */ | ||
555 | |||
556 | #ifdef CONFIG_ATMEL_TCLIB | ||
557 | |||
558 | static struct resource tcb_resources[] = { | ||
559 | [0] = { | ||
560 | .start = AT572D940HF_BASE_TCB, | ||
561 | .end = AT572D940HF_BASE_TCB + SZ_16K - 1, | ||
562 | .flags = IORESOURCE_MEM, | ||
563 | }, | ||
564 | [1] = { | ||
565 | .start = AT572D940HF_ID_TC0, | ||
566 | .end = AT572D940HF_ID_TC0, | ||
567 | .flags = IORESOURCE_IRQ, | ||
568 | }, | ||
569 | [2] = { | ||
570 | .start = AT572D940HF_ID_TC1, | ||
571 | .end = AT572D940HF_ID_TC1, | ||
572 | .flags = IORESOURCE_IRQ, | ||
573 | }, | ||
574 | [3] = { | ||
575 | .start = AT572D940HF_ID_TC2, | ||
576 | .end = AT572D940HF_ID_TC2, | ||
577 | .flags = IORESOURCE_IRQ, | ||
578 | }, | ||
579 | }; | ||
580 | |||
581 | static struct platform_device at572d940hf_tcb_device = { | ||
582 | .name = "atmel_tcb", | ||
583 | .id = 0, | ||
584 | .resource = tcb_resources, | ||
585 | .num_resources = ARRAY_SIZE(tcb_resources), | ||
586 | }; | ||
587 | |||
588 | static void __init at91_add_device_tc(void) | ||
589 | { | ||
590 | /* this chip has a separate clock and irq for each TC channel */ | ||
591 | at91_clock_associate("tc0_clk", &at572d940hf_tcb_device.dev, "t0_clk"); | ||
592 | at91_clock_associate("tc1_clk", &at572d940hf_tcb_device.dev, "t1_clk"); | ||
593 | at91_clock_associate("tc2_clk", &at572d940hf_tcb_device.dev, "t2_clk"); | ||
594 | platform_device_register(&at572d940hf_tcb_device); | ||
595 | } | ||
596 | #else | ||
597 | static void __init at91_add_device_tc(void) { } | ||
598 | #endif | ||
599 | |||
600 | |||
601 | /* -------------------------------------------------------------------- | ||
602 | * RTT | ||
603 | * -------------------------------------------------------------------- */ | ||
604 | |||
605 | static struct resource rtt_resources[] = { | ||
606 | { | ||
607 | .start = AT91_BASE_SYS + AT91_RTT, | ||
608 | .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1, | ||
609 | .flags = IORESOURCE_MEM, | ||
610 | } | ||
611 | }; | ||
612 | |||
613 | static struct platform_device at572d940hf_rtt_device = { | ||
614 | .name = "at91_rtt", | ||
615 | .id = 0, | ||
616 | .resource = rtt_resources, | ||
617 | .num_resources = ARRAY_SIZE(rtt_resources), | ||
618 | }; | ||
619 | |||
620 | static void __init at91_add_device_rtt(void) | ||
621 | { | ||
622 | platform_device_register(&at572d940hf_rtt_device); | ||
623 | } | ||
624 | |||
625 | |||
626 | /* -------------------------------------------------------------------- | ||
627 | * Watchdog | ||
628 | * -------------------------------------------------------------------- */ | ||
629 | |||
630 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||
631 | static struct platform_device at572d940hf_wdt_device = { | ||
632 | .name = "at91_wdt", | ||
633 | .id = -1, | ||
634 | .num_resources = 0, | ||
635 | }; | ||
636 | |||
637 | static void __init at91_add_device_watchdog(void) | ||
638 | { | ||
639 | platform_device_register(&at572d940hf_wdt_device); | ||
640 | } | ||
641 | #else | ||
642 | static void __init at91_add_device_watchdog(void) {} | ||
643 | #endif | ||
644 | |||
645 | |||
646 | /* -------------------------------------------------------------------- | ||
647 | * UART | ||
648 | * -------------------------------------------------------------------- */ | ||
649 | |||
650 | #if defined(CONFIG_SERIAL_ATMEL) | ||
651 | static struct resource dbgu_resources[] = { | ||
652 | [0] = { | ||
653 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | ||
654 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | ||
655 | .flags = IORESOURCE_MEM, | ||
656 | }, | ||
657 | [1] = { | ||
658 | .start = AT91_ID_SYS, | ||
659 | .end = AT91_ID_SYS, | ||
660 | .flags = IORESOURCE_IRQ, | ||
661 | }, | ||
662 | }; | ||
663 | |||
664 | static struct atmel_uart_data dbgu_data = { | ||
665 | .use_dma_tx = 0, | ||
666 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | ||
667 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
668 | }; | ||
669 | |||
670 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | ||
671 | |||
672 | static struct platform_device at572d940hf_dbgu_device = { | ||
673 | .name = "atmel_usart", | ||
674 | .id = 0, | ||
675 | .dev = { | ||
676 | .dma_mask = &dbgu_dmamask, | ||
677 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
678 | .platform_data = &dbgu_data, | ||
679 | }, | ||
680 | .resource = dbgu_resources, | ||
681 | .num_resources = ARRAY_SIZE(dbgu_resources), | ||
682 | }; | ||
683 | |||
684 | static inline void configure_dbgu_pins(void) | ||
685 | { | ||
686 | at91_set_A_periph(AT91_PIN_PC31, 1); /* DTXD */ | ||
687 | at91_set_A_periph(AT91_PIN_PC30, 0); /* DRXD */ | ||
688 | } | ||
689 | |||
690 | static struct resource uart0_resources[] = { | ||
691 | [0] = { | ||
692 | .start = AT572D940HF_BASE_US0, | ||
693 | .end = AT572D940HF_BASE_US0 + SZ_16K - 1, | ||
694 | .flags = IORESOURCE_MEM, | ||
695 | }, | ||
696 | [1] = { | ||
697 | .start = AT572D940HF_ID_US0, | ||
698 | .end = AT572D940HF_ID_US0, | ||
699 | .flags = IORESOURCE_IRQ, | ||
700 | }, | ||
701 | }; | ||
702 | |||
703 | static struct atmel_uart_data uart0_data = { | ||
704 | .use_dma_tx = 1, | ||
705 | .use_dma_rx = 1, | ||
706 | }; | ||
707 | |||
708 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | ||
709 | |||
710 | static struct platform_device at572d940hf_uart0_device = { | ||
711 | .name = "atmel_usart", | ||
712 | .id = 1, | ||
713 | .dev = { | ||
714 | .dma_mask = &uart0_dmamask, | ||
715 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
716 | .platform_data = &uart0_data, | ||
717 | }, | ||
718 | .resource = uart0_resources, | ||
719 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
720 | }; | ||
721 | |||
722 | static inline void configure_usart0_pins(unsigned pins) | ||
723 | { | ||
724 | at91_set_A_periph(AT91_PIN_PA8, 1); /* TXD0 */ | ||
725 | at91_set_A_periph(AT91_PIN_PA7, 0); /* RXD0 */ | ||
726 | |||
727 | if (pins & ATMEL_UART_RTS) | ||
728 | at91_set_A_periph(AT91_PIN_PA10, 0); /* RTS0 */ | ||
729 | if (pins & ATMEL_UART_CTS) | ||
730 | at91_set_A_periph(AT91_PIN_PA9, 0); /* CTS0 */ | ||
731 | } | ||
732 | |||
733 | static struct resource uart1_resources[] = { | ||
734 | [0] = { | ||
735 | .start = AT572D940HF_BASE_US1, | ||
736 | .end = AT572D940HF_BASE_US1 + SZ_16K - 1, | ||
737 | .flags = IORESOURCE_MEM, | ||
738 | }, | ||
739 | [1] = { | ||
740 | .start = AT572D940HF_ID_US1, | ||
741 | .end = AT572D940HF_ID_US1, | ||
742 | .flags = IORESOURCE_IRQ, | ||
743 | }, | ||
744 | }; | ||
745 | |||
746 | static struct atmel_uart_data uart1_data = { | ||
747 | .use_dma_tx = 1, | ||
748 | .use_dma_rx = 1, | ||
749 | }; | ||
750 | |||
751 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | ||
752 | |||
753 | static struct platform_device at572d940hf_uart1_device = { | ||
754 | .name = "atmel_usart", | ||
755 | .id = 2, | ||
756 | .dev = { | ||
757 | .dma_mask = &uart1_dmamask, | ||
758 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
759 | .platform_data = &uart1_data, | ||
760 | }, | ||
761 | .resource = uart1_resources, | ||
762 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
763 | }; | ||
764 | |||
765 | static inline void configure_usart1_pins(unsigned pins) | ||
766 | { | ||
767 | at91_set_A_periph(AT91_PIN_PC10, 1); /* TXD1 */ | ||
768 | at91_set_A_periph(AT91_PIN_PC9 , 0); /* RXD1 */ | ||
769 | |||
770 | if (pins & ATMEL_UART_RTS) | ||
771 | at91_set_A_periph(AT91_PIN_PC12, 0); /* RTS1 */ | ||
772 | if (pins & ATMEL_UART_CTS) | ||
773 | at91_set_A_periph(AT91_PIN_PC11, 0); /* CTS1 */ | ||
774 | } | ||
775 | |||
776 | static struct resource uart2_resources[] = { | ||
777 | [0] = { | ||
778 | .start = AT572D940HF_BASE_US2, | ||
779 | .end = AT572D940HF_BASE_US2 + SZ_16K - 1, | ||
780 | .flags = IORESOURCE_MEM, | ||
781 | }, | ||
782 | [1] = { | ||
783 | .start = AT572D940HF_ID_US2, | ||
784 | .end = AT572D940HF_ID_US2, | ||
785 | .flags = IORESOURCE_IRQ, | ||
786 | }, | ||
787 | }; | ||
788 | |||
789 | static struct atmel_uart_data uart2_data = { | ||
790 | .use_dma_tx = 1, | ||
791 | .use_dma_rx = 1, | ||
792 | }; | ||
793 | |||
794 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | ||
795 | |||
796 | static struct platform_device at572d940hf_uart2_device = { | ||
797 | .name = "atmel_usart", | ||
798 | .id = 3, | ||
799 | .dev = { | ||
800 | .dma_mask = &uart2_dmamask, | ||
801 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
802 | .platform_data = &uart2_data, | ||
803 | }, | ||
804 | .resource = uart2_resources, | ||
805 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
806 | }; | ||
807 | |||
808 | static inline void configure_usart2_pins(unsigned pins) | ||
809 | { | ||
810 | at91_set_A_periph(AT91_PIN_PC15, 1); /* TXD2 */ | ||
811 | at91_set_A_periph(AT91_PIN_PC14, 0); /* RXD2 */ | ||
812 | |||
813 | if (pins & ATMEL_UART_RTS) | ||
814 | at91_set_A_periph(AT91_PIN_PC17, 0); /* RTS2 */ | ||
815 | if (pins & ATMEL_UART_CTS) | ||
816 | at91_set_A_periph(AT91_PIN_PC16, 0); /* CTS2 */ | ||
817 | } | ||
818 | |||
819 | static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | ||
820 | struct platform_device *atmel_default_console_device; /* the serial console device */ | ||
821 | |||
822 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | ||
823 | { | ||
824 | struct platform_device *pdev; | ||
825 | |||
826 | switch (id) { | ||
827 | case 0: /* DBGU */ | ||
828 | pdev = &at572d940hf_dbgu_device; | ||
829 | configure_dbgu_pins(); | ||
830 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
831 | break; | ||
832 | case AT572D940HF_ID_US0: | ||
833 | pdev = &at572d940hf_uart0_device; | ||
834 | configure_usart0_pins(pins); | ||
835 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
836 | break; | ||
837 | case AT572D940HF_ID_US1: | ||
838 | pdev = &at572d940hf_uart1_device; | ||
839 | configure_usart1_pins(pins); | ||
840 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
841 | break; | ||
842 | case AT572D940HF_ID_US2: | ||
843 | pdev = &at572d940hf_uart2_device; | ||
844 | configure_usart2_pins(pins); | ||
845 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
846 | break; | ||
847 | default: | ||
848 | return; | ||
849 | } | ||
850 | pdev->id = portnr; /* update to mapped ID */ | ||
851 | |||
852 | if (portnr < ATMEL_MAX_UART) | ||
853 | at91_uarts[portnr] = pdev; | ||
854 | } | ||
855 | |||
856 | void __init at91_set_serial_console(unsigned portnr) | ||
857 | { | ||
858 | if (portnr < ATMEL_MAX_UART) | ||
859 | atmel_default_console_device = at91_uarts[portnr]; | ||
860 | } | ||
861 | |||
862 | void __init at91_add_device_serial(void) | ||
863 | { | ||
864 | int i; | ||
865 | |||
866 | for (i = 0; i < ATMEL_MAX_UART; i++) { | ||
867 | if (at91_uarts[i]) | ||
868 | platform_device_register(at91_uarts[i]); | ||
869 | } | ||
870 | |||
871 | if (!atmel_default_console_device) | ||
872 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
873 | } | ||
874 | |||
875 | #else | ||
876 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | ||
877 | void __init at91_set_serial_console(unsigned portnr) {} | ||
878 | void __init at91_add_device_serial(void) {} | ||
879 | #endif | ||
880 | |||
881 | |||
882 | /* -------------------------------------------------------------------- | ||
883 | * mAgic | ||
884 | * -------------------------------------------------------------------- */ | ||
885 | |||
886 | #ifdef CONFIG_MAGICV | ||
887 | static struct resource mAgic_resources[] = { | ||
888 | { | ||
889 | .start = AT91_MAGIC_PM_BASE, | ||
890 | .end = AT91_MAGIC_PM_BASE + AT91_MAGIC_PM_SIZE - 1, | ||
891 | .flags = IORESOURCE_MEM, | ||
892 | }, | ||
893 | { | ||
894 | .start = AT91_MAGIC_DM_I_BASE, | ||
895 | .end = AT91_MAGIC_DM_I_BASE + AT91_MAGIC_DM_I_SIZE - 1, | ||
896 | .flags = IORESOURCE_MEM, | ||
897 | }, | ||
898 | { | ||
899 | .start = AT91_MAGIC_DM_F_BASE, | ||
900 | .end = AT91_MAGIC_DM_F_BASE + AT91_MAGIC_DM_F_SIZE - 1, | ||
901 | .flags = IORESOURCE_MEM, | ||
902 | }, | ||
903 | { | ||
904 | .start = AT91_MAGIC_DM_DB_BASE, | ||
905 | .end = AT91_MAGIC_DM_DB_BASE + AT91_MAGIC_DM_DB_SIZE - 1, | ||
906 | .flags = IORESOURCE_MEM, | ||
907 | }, | ||
908 | { | ||
909 | .start = AT91_MAGIC_REGS_BASE, | ||
910 | .end = AT91_MAGIC_REGS_BASE + AT91_MAGIC_REGS_SIZE - 1, | ||
911 | .flags = IORESOURCE_MEM, | ||
912 | }, | ||
913 | { | ||
914 | .start = AT91_MAGIC_EXTPAGE_BASE, | ||
915 | .end = AT91_MAGIC_EXTPAGE_BASE + AT91_MAGIC_EXTPAGE_SIZE - 1, | ||
916 | .flags = IORESOURCE_MEM, | ||
917 | }, | ||
918 | { | ||
919 | .start = AT572D940HF_ID_MSIRQ0, | ||
920 | .end = AT572D940HF_ID_MSIRQ0, | ||
921 | .flags = IORESOURCE_IRQ, | ||
922 | }, | ||
923 | { | ||
924 | .start = AT572D940HF_ID_MHALT, | ||
925 | .end = AT572D940HF_ID_MHALT, | ||
926 | .flags = IORESOURCE_IRQ, | ||
927 | }, | ||
928 | { | ||
929 | .start = AT572D940HF_ID_MEXC, | ||
930 | .end = AT572D940HF_ID_MEXC, | ||
931 | .flags = IORESOURCE_IRQ, | ||
932 | }, | ||
933 | { | ||
934 | .start = AT572D940HF_ID_MEDMA, | ||
935 | .end = AT572D940HF_ID_MEDMA, | ||
936 | .flags = IORESOURCE_IRQ, | ||
937 | }, | ||
938 | }; | ||
939 | |||
940 | static struct platform_device mAgic_device = { | ||
941 | .name = "mAgic", | ||
942 | .id = -1, | ||
943 | .num_resources = ARRAY_SIZE(mAgic_resources), | ||
944 | .resource = mAgic_resources, | ||
945 | }; | ||
946 | |||
947 | void __init at91_add_device_mAgic(void) | ||
948 | { | ||
949 | platform_device_register(&mAgic_device); | ||
950 | } | ||
951 | #else | ||
952 | void __init at91_add_device_mAgic(void) {} | ||
953 | #endif | ||
954 | |||
955 | |||
956 | /* -------------------------------------------------------------------- */ | ||
957 | |||
958 | /* | ||
959 | * These devices are always present and don't need any board-specific | ||
960 | * setup. | ||
961 | */ | ||
962 | static int __init at91_add_standard_devices(void) | ||
963 | { | ||
964 | at91_add_device_rtt(); | ||
965 | at91_add_device_watchdog(); | ||
966 | at91_add_device_tc(); | ||
967 | return 0; | ||
968 | } | ||
969 | |||
970 | arch_initcall(at91_add_standard_devices); | ||
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c index 73376170fb91..17fae4a42ab5 100644 --- a/arch/arm/mach-at91/at91cap9.c +++ b/arch/arm/mach-at91/at91cap9.c | |||
@@ -222,6 +222,25 @@ static struct clk *periph_clocks[] __initdata = { | |||
222 | // irq0 .. irq1 | 222 | // irq0 .. irq1 |
223 | }; | 223 | }; |
224 | 224 | ||
225 | static struct clk_lookup periph_clocks_lookups[] = { | ||
226 | CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), | ||
227 | CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), | ||
228 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), | ||
229 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), | ||
230 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | ||
231 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | ||
232 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), | ||
233 | CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk), | ||
234 | CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk), | ||
235 | }; | ||
236 | |||
237 | static struct clk_lookup usart_clocks_lookups[] = { | ||
238 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
239 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
240 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
241 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
242 | }; | ||
243 | |||
225 | /* | 244 | /* |
226 | * The four programmable clocks. | 245 | * The four programmable clocks. |
227 | * You must configure pin multiplexing to bring these signals out. | 246 | * You must configure pin multiplexing to bring these signals out. |
@@ -258,12 +277,29 @@ static void __init at91cap9_register_clocks(void) | |||
258 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 277 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
259 | clk_register(periph_clocks[i]); | 278 | clk_register(periph_clocks[i]); |
260 | 279 | ||
280 | clkdev_add_table(periph_clocks_lookups, | ||
281 | ARRAY_SIZE(periph_clocks_lookups)); | ||
282 | clkdev_add_table(usart_clocks_lookups, | ||
283 | ARRAY_SIZE(usart_clocks_lookups)); | ||
284 | |||
261 | clk_register(&pck0); | 285 | clk_register(&pck0); |
262 | clk_register(&pck1); | 286 | clk_register(&pck1); |
263 | clk_register(&pck2); | 287 | clk_register(&pck2); |
264 | clk_register(&pck3); | 288 | clk_register(&pck3); |
265 | } | 289 | } |
266 | 290 | ||
291 | static struct clk_lookup console_clock_lookup; | ||
292 | |||
293 | void __init at91cap9_set_console_clock(int id) | ||
294 | { | ||
295 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
296 | return; | ||
297 | |||
298 | console_clock_lookup.con_id = "usart"; | ||
299 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
300 | clkdev_add(&console_clock_lookup); | ||
301 | } | ||
302 | |||
267 | /* -------------------------------------------------------------------- | 303 | /* -------------------------------------------------------------------- |
268 | * GPIO | 304 | * GPIO |
269 | * -------------------------------------------------------------------- */ | 305 | * -------------------------------------------------------------------- */ |
@@ -303,11 +339,14 @@ static void at91cap9_poweroff(void) | |||
303 | * AT91CAP9 processor initialization | 339 | * AT91CAP9 processor initialization |
304 | * -------------------------------------------------------------------- */ | 340 | * -------------------------------------------------------------------- */ |
305 | 341 | ||
306 | void __init at91cap9_initialize(unsigned long main_clock) | 342 | void __init at91cap9_map_io(void) |
307 | { | 343 | { |
308 | /* Map peripherals */ | 344 | /* Map peripherals */ |
309 | iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc)); | 345 | iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc)); |
346 | } | ||
310 | 347 | ||
348 | void __init at91cap9_initialize(unsigned long main_clock) | ||
349 | { | ||
311 | at91_arch_reset = at91cap9_reset; | 350 | at91_arch_reset = at91cap9_reset; |
312 | pm_power_off = at91cap9_poweroff; | 351 | pm_power_off = at91cap9_poweroff; |
313 | at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); | 352 | at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); |
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 21020ceb2f3a..cd850ed6f335 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -181,10 +181,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data) | |||
181 | 181 | ||
182 | /* Pullup pin is handled internally by USB device peripheral */ | 182 | /* Pullup pin is handled internally by USB device peripheral */ |
183 | 183 | ||
184 | /* Clocks */ | ||
185 | at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk"); | ||
186 | at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk"); | ||
187 | |||
188 | platform_device_register(&at91_usba_udc_device); | 184 | platform_device_register(&at91_usba_udc_device); |
189 | } | 185 | } |
190 | #else | 186 | #else |
@@ -355,7 +351,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
355 | } | 351 | } |
356 | 352 | ||
357 | mmc0_data = *data; | 353 | mmc0_data = *data; |
358 | at91_clock_associate("mci0_clk", &at91cap9_mmc0_device.dev, "mci_clk"); | ||
359 | platform_device_register(&at91cap9_mmc0_device); | 354 | platform_device_register(&at91cap9_mmc0_device); |
360 | } else { /* MCI1 */ | 355 | } else { /* MCI1 */ |
361 | /* CLK */ | 356 | /* CLK */ |
@@ -373,7 +368,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
373 | } | 368 | } |
374 | 369 | ||
375 | mmc1_data = *data; | 370 | mmc1_data = *data; |
376 | at91_clock_associate("mci1_clk", &at91cap9_mmc1_device.dev, "mci_clk"); | ||
377 | platform_device_register(&at91cap9_mmc1_device); | 371 | platform_device_register(&at91cap9_mmc1_device); |
378 | } | 372 | } |
379 | } | 373 | } |
@@ -614,7 +608,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
614 | at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | 608 | at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ |
615 | at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | 609 | at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ |
616 | 610 | ||
617 | at91_clock_associate("spi0_clk", &at91cap9_spi0_device.dev, "spi_clk"); | ||
618 | platform_device_register(&at91cap9_spi0_device); | 611 | platform_device_register(&at91cap9_spi0_device); |
619 | } | 612 | } |
620 | if (enable_spi1) { | 613 | if (enable_spi1) { |
@@ -622,7 +615,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
622 | at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ | 615 | at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ |
623 | at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ | 616 | at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ |
624 | 617 | ||
625 | at91_clock_associate("spi1_clk", &at91cap9_spi1_device.dev, "spi_clk"); | ||
626 | platform_device_register(&at91cap9_spi1_device); | 618 | platform_device_register(&at91cap9_spi1_device); |
627 | } | 619 | } |
628 | } | 620 | } |
@@ -659,8 +651,6 @@ static struct platform_device at91cap9_tcb_device = { | |||
659 | 651 | ||
660 | static void __init at91_add_device_tc(void) | 652 | static void __init at91_add_device_tc(void) |
661 | { | 653 | { |
662 | /* this chip has one clock and irq for all three TC channels */ | ||
663 | at91_clock_associate("tcb_clk", &at91cap9_tcb_device.dev, "t0_clk"); | ||
664 | platform_device_register(&at91cap9_tcb_device); | 654 | platform_device_register(&at91cap9_tcb_device); |
665 | } | 655 | } |
666 | #else | 656 | #else |
@@ -1001,12 +991,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
1001 | case AT91CAP9_ID_SSC0: | 991 | case AT91CAP9_ID_SSC0: |
1002 | pdev = &at91cap9_ssc0_device; | 992 | pdev = &at91cap9_ssc0_device; |
1003 | configure_ssc0_pins(pins); | 993 | configure_ssc0_pins(pins); |
1004 | at91_clock_associate("ssc0_clk", &pdev->dev, "ssc"); | ||
1005 | break; | 994 | break; |
1006 | case AT91CAP9_ID_SSC1: | 995 | case AT91CAP9_ID_SSC1: |
1007 | pdev = &at91cap9_ssc1_device; | 996 | pdev = &at91cap9_ssc1_device; |
1008 | configure_ssc1_pins(pins); | 997 | configure_ssc1_pins(pins); |
1009 | at91_clock_associate("ssc1_clk", &pdev->dev, "ssc"); | ||
1010 | break; | 998 | break; |
1011 | default: | 999 | default: |
1012 | return; | 1000 | return; |
@@ -1199,32 +1187,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1199 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1187 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1200 | { | 1188 | { |
1201 | struct platform_device *pdev; | 1189 | struct platform_device *pdev; |
1190 | struct atmel_uart_data *pdata; | ||
1202 | 1191 | ||
1203 | switch (id) { | 1192 | switch (id) { |
1204 | case 0: /* DBGU */ | 1193 | case 0: /* DBGU */ |
1205 | pdev = &at91cap9_dbgu_device; | 1194 | pdev = &at91cap9_dbgu_device; |
1206 | configure_dbgu_pins(); | 1195 | configure_dbgu_pins(); |
1207 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1208 | break; | 1196 | break; |
1209 | case AT91CAP9_ID_US0: | 1197 | case AT91CAP9_ID_US0: |
1210 | pdev = &at91cap9_uart0_device; | 1198 | pdev = &at91cap9_uart0_device; |
1211 | configure_usart0_pins(pins); | 1199 | configure_usart0_pins(pins); |
1212 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1213 | break; | 1200 | break; |
1214 | case AT91CAP9_ID_US1: | 1201 | case AT91CAP9_ID_US1: |
1215 | pdev = &at91cap9_uart1_device; | 1202 | pdev = &at91cap9_uart1_device; |
1216 | configure_usart1_pins(pins); | 1203 | configure_usart1_pins(pins); |
1217 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1218 | break; | 1204 | break; |
1219 | case AT91CAP9_ID_US2: | 1205 | case AT91CAP9_ID_US2: |
1220 | pdev = &at91cap9_uart2_device; | 1206 | pdev = &at91cap9_uart2_device; |
1221 | configure_usart2_pins(pins); | 1207 | configure_usart2_pins(pins); |
1222 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1223 | break; | 1208 | break; |
1224 | default: | 1209 | default: |
1225 | return; | 1210 | return; |
1226 | } | 1211 | } |
1227 | pdev->id = portnr; /* update to mapped ID */ | 1212 | pdata = pdev->dev.platform_data; |
1213 | pdata->num = portnr; /* update to mapped ID */ | ||
1228 | 1214 | ||
1229 | if (portnr < ATMEL_MAX_UART) | 1215 | if (portnr < ATMEL_MAX_UART) |
1230 | at91_uarts[portnr] = pdev; | 1216 | at91_uarts[portnr] = pdev; |
@@ -1232,8 +1218,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1232 | 1218 | ||
1233 | void __init at91_set_serial_console(unsigned portnr) | 1219 | void __init at91_set_serial_console(unsigned portnr) |
1234 | { | 1220 | { |
1235 | if (portnr < ATMEL_MAX_UART) | 1221 | if (portnr < ATMEL_MAX_UART) { |
1236 | atmel_default_console_device = at91_uarts[portnr]; | 1222 | atmel_default_console_device = at91_uarts[portnr]; |
1223 | at91cap9_set_console_clock(portnr); | ||
1224 | } | ||
1237 | } | 1225 | } |
1238 | 1226 | ||
1239 | void __init at91_add_device_serial(void) | 1227 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 2e9ecad97f3d..b228ce9e21a1 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <mach/at91rm9200.h> | 18 | #include <mach/at91rm9200.h> |
19 | #include <mach/at91_pmc.h> | 19 | #include <mach/at91_pmc.h> |
20 | #include <mach/at91_st.h> | 20 | #include <mach/at91_st.h> |
21 | #include <mach/cpu.h> | ||
21 | 22 | ||
22 | #include "generic.h" | 23 | #include "generic.h" |
23 | #include "clock.h" | 24 | #include "clock.h" |
@@ -191,6 +192,26 @@ static struct clk *periph_clocks[] __initdata = { | |||
191 | // irq0 .. irq6 | 192 | // irq0 .. irq6 |
192 | }; | 193 | }; |
193 | 194 | ||
195 | static struct clk_lookup periph_clocks_lookups[] = { | ||
196 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | ||
197 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | ||
198 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), | ||
199 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), | ||
200 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), | ||
201 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), | ||
202 | CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk), | ||
203 | CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk), | ||
204 | CLKDEV_CON_DEV_ID("ssc", "ssc.2", &ssc2_clk), | ||
205 | }; | ||
206 | |||
207 | static struct clk_lookup usart_clocks_lookups[] = { | ||
208 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
209 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
210 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
211 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
212 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk), | ||
213 | }; | ||
214 | |||
194 | /* | 215 | /* |
195 | * The four programmable clocks. | 216 | * The four programmable clocks. |
196 | * You must configure pin multiplexing to bring these signals out. | 217 | * You must configure pin multiplexing to bring these signals out. |
@@ -227,12 +248,29 @@ static void __init at91rm9200_register_clocks(void) | |||
227 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 248 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
228 | clk_register(periph_clocks[i]); | 249 | clk_register(periph_clocks[i]); |
229 | 250 | ||
251 | clkdev_add_table(periph_clocks_lookups, | ||
252 | ARRAY_SIZE(periph_clocks_lookups)); | ||
253 | clkdev_add_table(usart_clocks_lookups, | ||
254 | ARRAY_SIZE(usart_clocks_lookups)); | ||
255 | |||
230 | clk_register(&pck0); | 256 | clk_register(&pck0); |
231 | clk_register(&pck1); | 257 | clk_register(&pck1); |
232 | clk_register(&pck2); | 258 | clk_register(&pck2); |
233 | clk_register(&pck3); | 259 | clk_register(&pck3); |
234 | } | 260 | } |
235 | 261 | ||
262 | static struct clk_lookup console_clock_lookup; | ||
263 | |||
264 | void __init at91rm9200_set_console_clock(int id) | ||
265 | { | ||
266 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
267 | return; | ||
268 | |||
269 | console_clock_lookup.con_id = "usart"; | ||
270 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
271 | clkdev_add(&console_clock_lookup); | ||
272 | } | ||
273 | |||
236 | /* -------------------------------------------------------------------- | 274 | /* -------------------------------------------------------------------- |
237 | * GPIO | 275 | * GPIO |
238 | * -------------------------------------------------------------------- */ | 276 | * -------------------------------------------------------------------- */ |
@@ -266,15 +304,25 @@ static void at91rm9200_reset(void) | |||
266 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); | 304 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); |
267 | } | 305 | } |
268 | 306 | ||
307 | int rm9200_type; | ||
308 | EXPORT_SYMBOL(rm9200_type); | ||
309 | |||
310 | void __init at91rm9200_set_type(int type) | ||
311 | { | ||
312 | rm9200_type = type; | ||
313 | } | ||
269 | 314 | ||
270 | /* -------------------------------------------------------------------- | 315 | /* -------------------------------------------------------------------- |
271 | * AT91RM9200 processor initialization | 316 | * AT91RM9200 processor initialization |
272 | * -------------------------------------------------------------------- */ | 317 | * -------------------------------------------------------------------- */ |
273 | void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks) | 318 | void __init at91rm9200_map_io(void) |
274 | { | 319 | { |
275 | /* Map peripherals */ | 320 | /* Map peripherals */ |
276 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); | 321 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); |
322 | } | ||
277 | 323 | ||
324 | void __init at91rm9200_initialize(unsigned long main_clock) | ||
325 | { | ||
278 | at91_arch_reset = at91rm9200_reset; | 326 | at91_arch_reset = at91rm9200_reset; |
279 | at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | 327 | at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) |
280 | | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) | 328 | | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) |
@@ -288,7 +336,8 @@ void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks | |||
288 | at91rm9200_register_clocks(); | 336 | at91rm9200_register_clocks(); |
289 | 337 | ||
290 | /* Initialize GPIO subsystem */ | 338 | /* Initialize GPIO subsystem */ |
291 | at91_gpio_init(at91rm9200_gpio, banks); | 339 | at91_gpio_init(at91rm9200_gpio, |
340 | cpu_is_at91rm9200_bga() ? AT91RM9200_BGA : AT91RM9200_PQFP); | ||
292 | } | 341 | } |
293 | 342 | ||
294 | 343 | ||
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 7b539228e0ef..a0ba475be04c 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -644,15 +644,7 @@ static struct platform_device at91rm9200_tcb1_device = { | |||
644 | 644 | ||
645 | static void __init at91_add_device_tc(void) | 645 | static void __init at91_add_device_tc(void) |
646 | { | 646 | { |
647 | /* this chip has a separate clock and irq for each TC channel */ | ||
648 | at91_clock_associate("tc0_clk", &at91rm9200_tcb0_device.dev, "t0_clk"); | ||
649 | at91_clock_associate("tc1_clk", &at91rm9200_tcb0_device.dev, "t1_clk"); | ||
650 | at91_clock_associate("tc2_clk", &at91rm9200_tcb0_device.dev, "t2_clk"); | ||
651 | platform_device_register(&at91rm9200_tcb0_device); | 647 | platform_device_register(&at91rm9200_tcb0_device); |
652 | |||
653 | at91_clock_associate("tc3_clk", &at91rm9200_tcb1_device.dev, "t0_clk"); | ||
654 | at91_clock_associate("tc4_clk", &at91rm9200_tcb1_device.dev, "t1_clk"); | ||
655 | at91_clock_associate("tc5_clk", &at91rm9200_tcb1_device.dev, "t2_clk"); | ||
656 | platform_device_register(&at91rm9200_tcb1_device); | 648 | platform_device_register(&at91rm9200_tcb1_device); |
657 | } | 649 | } |
658 | #else | 650 | #else |
@@ -849,17 +841,14 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
849 | case AT91RM9200_ID_SSC0: | 841 | case AT91RM9200_ID_SSC0: |
850 | pdev = &at91rm9200_ssc0_device; | 842 | pdev = &at91rm9200_ssc0_device; |
851 | configure_ssc0_pins(pins); | 843 | configure_ssc0_pins(pins); |
852 | at91_clock_associate("ssc0_clk", &pdev->dev, "ssc"); | ||
853 | break; | 844 | break; |
854 | case AT91RM9200_ID_SSC1: | 845 | case AT91RM9200_ID_SSC1: |
855 | pdev = &at91rm9200_ssc1_device; | 846 | pdev = &at91rm9200_ssc1_device; |
856 | configure_ssc1_pins(pins); | 847 | configure_ssc1_pins(pins); |
857 | at91_clock_associate("ssc1_clk", &pdev->dev, "ssc"); | ||
858 | break; | 848 | break; |
859 | case AT91RM9200_ID_SSC2: | 849 | case AT91RM9200_ID_SSC2: |
860 | pdev = &at91rm9200_ssc2_device; | 850 | pdev = &at91rm9200_ssc2_device; |
861 | configure_ssc2_pins(pins); | 851 | configure_ssc2_pins(pins); |
862 | at91_clock_associate("ssc2_clk", &pdev->dev, "ssc"); | ||
863 | break; | 852 | break; |
864 | default: | 853 | default: |
865 | return; | 854 | return; |
@@ -1109,37 +1098,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1109 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1098 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1110 | { | 1099 | { |
1111 | struct platform_device *pdev; | 1100 | struct platform_device *pdev; |
1101 | struct atmel_uart_data *pdata; | ||
1112 | 1102 | ||
1113 | switch (id) { | 1103 | switch (id) { |
1114 | case 0: /* DBGU */ | 1104 | case 0: /* DBGU */ |
1115 | pdev = &at91rm9200_dbgu_device; | 1105 | pdev = &at91rm9200_dbgu_device; |
1116 | configure_dbgu_pins(); | 1106 | configure_dbgu_pins(); |
1117 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1118 | break; | 1107 | break; |
1119 | case AT91RM9200_ID_US0: | 1108 | case AT91RM9200_ID_US0: |
1120 | pdev = &at91rm9200_uart0_device; | 1109 | pdev = &at91rm9200_uart0_device; |
1121 | configure_usart0_pins(pins); | 1110 | configure_usart0_pins(pins); |
1122 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1123 | break; | 1111 | break; |
1124 | case AT91RM9200_ID_US1: | 1112 | case AT91RM9200_ID_US1: |
1125 | pdev = &at91rm9200_uart1_device; | 1113 | pdev = &at91rm9200_uart1_device; |
1126 | configure_usart1_pins(pins); | 1114 | configure_usart1_pins(pins); |
1127 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1128 | break; | 1115 | break; |
1129 | case AT91RM9200_ID_US2: | 1116 | case AT91RM9200_ID_US2: |
1130 | pdev = &at91rm9200_uart2_device; | 1117 | pdev = &at91rm9200_uart2_device; |
1131 | configure_usart2_pins(pins); | 1118 | configure_usart2_pins(pins); |
1132 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1133 | break; | 1119 | break; |
1134 | case AT91RM9200_ID_US3: | 1120 | case AT91RM9200_ID_US3: |
1135 | pdev = &at91rm9200_uart3_device; | 1121 | pdev = &at91rm9200_uart3_device; |
1136 | configure_usart3_pins(pins); | 1122 | configure_usart3_pins(pins); |
1137 | at91_clock_associate("usart3_clk", &pdev->dev, "usart"); | ||
1138 | break; | 1123 | break; |
1139 | default: | 1124 | default: |
1140 | return; | 1125 | return; |
1141 | } | 1126 | } |
1142 | pdev->id = portnr; /* update to mapped ID */ | 1127 | pdata = pdev->dev.platform_data; |
1128 | pdata->num = portnr; /* update to mapped ID */ | ||
1143 | 1129 | ||
1144 | if (portnr < ATMEL_MAX_UART) | 1130 | if (portnr < ATMEL_MAX_UART) |
1145 | at91_uarts[portnr] = pdev; | 1131 | at91_uarts[portnr] = pdev; |
@@ -1147,8 +1133,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1147 | 1133 | ||
1148 | void __init at91_set_serial_console(unsigned portnr) | 1134 | void __init at91_set_serial_console(unsigned portnr) |
1149 | { | 1135 | { |
1150 | if (portnr < ATMEL_MAX_UART) | 1136 | if (portnr < ATMEL_MAX_UART) { |
1151 | atmel_default_console_device = at91_uarts[portnr]; | 1137 | atmel_default_console_device = at91_uarts[portnr]; |
1138 | at91rm9200_set_console_clock(portnr); | ||
1139 | } | ||
1152 | } | 1140 | } |
1153 | 1141 | ||
1154 | void __init at91_add_device_serial(void) | 1142 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 195208b30024..7d606b04d313 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -231,6 +231,28 @@ static struct clk *periph_clocks[] __initdata = { | |||
231 | // irq0 .. irq2 | 231 | // irq0 .. irq2 |
232 | }; | 232 | }; |
233 | 233 | ||
234 | static struct clk_lookup periph_clocks_lookups[] = { | ||
235 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | ||
236 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | ||
237 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | ||
238 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | ||
239 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), | ||
240 | CLKDEV_CON_DEV_ID("t3_clk", "atmel_tcb.1", &tc3_clk), | ||
241 | CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk), | ||
242 | CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk), | ||
243 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), | ||
244 | }; | ||
245 | |||
246 | static struct clk_lookup usart_clocks_lookups[] = { | ||
247 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
248 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
249 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
250 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
251 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk), | ||
252 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.5", &usart4_clk), | ||
253 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.6", &usart5_clk), | ||
254 | }; | ||
255 | |||
234 | /* | 256 | /* |
235 | * The two programmable clocks. | 257 | * The two programmable clocks. |
236 | * You must configure pin multiplexing to bring these signals out. | 258 | * You must configure pin multiplexing to bring these signals out. |
@@ -255,10 +277,27 @@ static void __init at91sam9260_register_clocks(void) | |||
255 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 277 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
256 | clk_register(periph_clocks[i]); | 278 | clk_register(periph_clocks[i]); |
257 | 279 | ||
280 | clkdev_add_table(periph_clocks_lookups, | ||
281 | ARRAY_SIZE(periph_clocks_lookups)); | ||
282 | clkdev_add_table(usart_clocks_lookups, | ||
283 | ARRAY_SIZE(usart_clocks_lookups)); | ||
284 | |||
258 | clk_register(&pck0); | 285 | clk_register(&pck0); |
259 | clk_register(&pck1); | 286 | clk_register(&pck1); |
260 | } | 287 | } |
261 | 288 | ||
289 | static struct clk_lookup console_clock_lookup; | ||
290 | |||
291 | void __init at91sam9260_set_console_clock(int id) | ||
292 | { | ||
293 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
294 | return; | ||
295 | |||
296 | console_clock_lookup.con_id = "usart"; | ||
297 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
298 | clkdev_add(&console_clock_lookup); | ||
299 | } | ||
300 | |||
262 | /* -------------------------------------------------------------------- | 301 | /* -------------------------------------------------------------------- |
263 | * GPIO | 302 | * GPIO |
264 | * -------------------------------------------------------------------- */ | 303 | * -------------------------------------------------------------------- */ |
@@ -289,7 +328,7 @@ static void at91sam9260_poweroff(void) | |||
289 | * AT91SAM9260 processor initialization | 328 | * AT91SAM9260 processor initialization |
290 | * -------------------------------------------------------------------- */ | 329 | * -------------------------------------------------------------------- */ |
291 | 330 | ||
292 | static void __init at91sam9xe_initialize(void) | 331 | static void __init at91sam9xe_map_io(void) |
293 | { | 332 | { |
294 | unsigned long cidr, sram_size; | 333 | unsigned long cidr, sram_size; |
295 | 334 | ||
@@ -310,18 +349,21 @@ static void __init at91sam9xe_initialize(void) | |||
310 | iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc)); | 349 | iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc)); |
311 | } | 350 | } |
312 | 351 | ||
313 | void __init at91sam9260_initialize(unsigned long main_clock) | 352 | void __init at91sam9260_map_io(void) |
314 | { | 353 | { |
315 | /* Map peripherals */ | 354 | /* Map peripherals */ |
316 | iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc)); | 355 | iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc)); |
317 | 356 | ||
318 | if (cpu_is_at91sam9xe()) | 357 | if (cpu_is_at91sam9xe()) |
319 | at91sam9xe_initialize(); | 358 | at91sam9xe_map_io(); |
320 | else if (cpu_is_at91sam9g20()) | 359 | else if (cpu_is_at91sam9g20()) |
321 | iotable_init(at91sam9g20_sram_desc, ARRAY_SIZE(at91sam9g20_sram_desc)); | 360 | iotable_init(at91sam9g20_sram_desc, ARRAY_SIZE(at91sam9g20_sram_desc)); |
322 | else | 361 | else |
323 | iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); | 362 | iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); |
363 | } | ||
324 | 364 | ||
365 | void __init at91sam9260_initialize(unsigned long main_clock) | ||
366 | { | ||
325 | at91_arch_reset = at91sam9_alt_reset; | 367 | at91_arch_reset = at91sam9_alt_reset; |
326 | pm_power_off = at91sam9260_poweroff; | 368 | pm_power_off = at91sam9260_poweroff; |
327 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) | 369 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 07eb7b07e442..1fdeb9058a76 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -609,7 +609,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
609 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | 609 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ |
610 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */ | 610 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI1_SPCK */ |
611 | 611 | ||
612 | at91_clock_associate("spi0_clk", &at91sam9260_spi0_device.dev, "spi_clk"); | ||
613 | platform_device_register(&at91sam9260_spi0_device); | 612 | platform_device_register(&at91sam9260_spi0_device); |
614 | } | 613 | } |
615 | if (enable_spi1) { | 614 | if (enable_spi1) { |
@@ -617,7 +616,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
617 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */ | 616 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */ |
618 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */ | 617 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */ |
619 | 618 | ||
620 | at91_clock_associate("spi1_clk", &at91sam9260_spi1_device.dev, "spi_clk"); | ||
621 | platform_device_register(&at91sam9260_spi1_device); | 619 | platform_device_register(&at91sam9260_spi1_device); |
622 | } | 620 | } |
623 | } | 621 | } |
@@ -694,15 +692,7 @@ static struct platform_device at91sam9260_tcb1_device = { | |||
694 | 692 | ||
695 | static void __init at91_add_device_tc(void) | 693 | static void __init at91_add_device_tc(void) |
696 | { | 694 | { |
697 | /* this chip has a separate clock and irq for each TC channel */ | ||
698 | at91_clock_associate("tc0_clk", &at91sam9260_tcb0_device.dev, "t0_clk"); | ||
699 | at91_clock_associate("tc1_clk", &at91sam9260_tcb0_device.dev, "t1_clk"); | ||
700 | at91_clock_associate("tc2_clk", &at91sam9260_tcb0_device.dev, "t2_clk"); | ||
701 | platform_device_register(&at91sam9260_tcb0_device); | 695 | platform_device_register(&at91sam9260_tcb0_device); |
702 | |||
703 | at91_clock_associate("tc3_clk", &at91sam9260_tcb1_device.dev, "t0_clk"); | ||
704 | at91_clock_associate("tc4_clk", &at91sam9260_tcb1_device.dev, "t1_clk"); | ||
705 | at91_clock_associate("tc5_clk", &at91sam9260_tcb1_device.dev, "t2_clk"); | ||
706 | platform_device_register(&at91sam9260_tcb1_device); | 696 | platform_device_register(&at91sam9260_tcb1_device); |
707 | } | 697 | } |
708 | #else | 698 | #else |
@@ -820,7 +810,6 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
820 | case AT91SAM9260_ID_SSC: | 810 | case AT91SAM9260_ID_SSC: |
821 | pdev = &at91sam9260_ssc_device; | 811 | pdev = &at91sam9260_ssc_device; |
822 | configure_ssc_pins(pins); | 812 | configure_ssc_pins(pins); |
823 | at91_clock_associate("ssc_clk", &pdev->dev, "pclk"); | ||
824 | break; | 813 | break; |
825 | default: | 814 | default: |
826 | return; | 815 | return; |
@@ -1139,47 +1128,42 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1139 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1128 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1140 | { | 1129 | { |
1141 | struct platform_device *pdev; | 1130 | struct platform_device *pdev; |
1131 | struct atmel_uart_data *pdata; | ||
1142 | 1132 | ||
1143 | switch (id) { | 1133 | switch (id) { |
1144 | case 0: /* DBGU */ | 1134 | case 0: /* DBGU */ |
1145 | pdev = &at91sam9260_dbgu_device; | 1135 | pdev = &at91sam9260_dbgu_device; |
1146 | configure_dbgu_pins(); | 1136 | configure_dbgu_pins(); |
1147 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1148 | break; | 1137 | break; |
1149 | case AT91SAM9260_ID_US0: | 1138 | case AT91SAM9260_ID_US0: |
1150 | pdev = &at91sam9260_uart0_device; | 1139 | pdev = &at91sam9260_uart0_device; |
1151 | configure_usart0_pins(pins); | 1140 | configure_usart0_pins(pins); |
1152 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1153 | break; | 1141 | break; |
1154 | case AT91SAM9260_ID_US1: | 1142 | case AT91SAM9260_ID_US1: |
1155 | pdev = &at91sam9260_uart1_device; | 1143 | pdev = &at91sam9260_uart1_device; |
1156 | configure_usart1_pins(pins); | 1144 | configure_usart1_pins(pins); |
1157 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1158 | break; | 1145 | break; |
1159 | case AT91SAM9260_ID_US2: | 1146 | case AT91SAM9260_ID_US2: |
1160 | pdev = &at91sam9260_uart2_device; | 1147 | pdev = &at91sam9260_uart2_device; |
1161 | configure_usart2_pins(pins); | 1148 | configure_usart2_pins(pins); |
1162 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1163 | break; | 1149 | break; |
1164 | case AT91SAM9260_ID_US3: | 1150 | case AT91SAM9260_ID_US3: |
1165 | pdev = &at91sam9260_uart3_device; | 1151 | pdev = &at91sam9260_uart3_device; |
1166 | configure_usart3_pins(pins); | 1152 | configure_usart3_pins(pins); |
1167 | at91_clock_associate("usart3_clk", &pdev->dev, "usart"); | ||
1168 | break; | 1153 | break; |
1169 | case AT91SAM9260_ID_US4: | 1154 | case AT91SAM9260_ID_US4: |
1170 | pdev = &at91sam9260_uart4_device; | 1155 | pdev = &at91sam9260_uart4_device; |
1171 | configure_usart4_pins(); | 1156 | configure_usart4_pins(); |
1172 | at91_clock_associate("usart4_clk", &pdev->dev, "usart"); | ||
1173 | break; | 1157 | break; |
1174 | case AT91SAM9260_ID_US5: | 1158 | case AT91SAM9260_ID_US5: |
1175 | pdev = &at91sam9260_uart5_device; | 1159 | pdev = &at91sam9260_uart5_device; |
1176 | configure_usart5_pins(); | 1160 | configure_usart5_pins(); |
1177 | at91_clock_associate("usart5_clk", &pdev->dev, "usart"); | ||
1178 | break; | 1161 | break; |
1179 | default: | 1162 | default: |
1180 | return; | 1163 | return; |
1181 | } | 1164 | } |
1182 | pdev->id = portnr; /* update to mapped ID */ | 1165 | pdata = pdev->dev.platform_data; |
1166 | pdata->num = portnr; /* update to mapped ID */ | ||
1183 | 1167 | ||
1184 | if (portnr < ATMEL_MAX_UART) | 1168 | if (portnr < ATMEL_MAX_UART) |
1185 | at91_uarts[portnr] = pdev; | 1169 | at91_uarts[portnr] = pdev; |
@@ -1187,8 +1171,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1187 | 1171 | ||
1188 | void __init at91_set_serial_console(unsigned portnr) | 1172 | void __init at91_set_serial_console(unsigned portnr) |
1189 | { | 1173 | { |
1190 | if (portnr < ATMEL_MAX_UART) | 1174 | if (portnr < ATMEL_MAX_UART) { |
1191 | atmel_default_console_device = at91_uarts[portnr]; | 1175 | atmel_default_console_device = at91_uarts[portnr]; |
1176 | at91sam9260_set_console_clock(portnr); | ||
1177 | } | ||
1192 | } | 1178 | } |
1193 | 1179 | ||
1194 | void __init at91_add_device_serial(void) | 1180 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index fcad88668504..c1483168c97a 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -178,6 +178,24 @@ static struct clk *periph_clocks[] __initdata = { | |||
178 | // irq0 .. irq2 | 178 | // irq0 .. irq2 |
179 | }; | 179 | }; |
180 | 180 | ||
181 | static struct clk_lookup periph_clocks_lookups[] = { | ||
182 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | ||
183 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | ||
184 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | ||
185 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | ||
186 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk), | ||
187 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | ||
188 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | ||
189 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | ||
190 | }; | ||
191 | |||
192 | static struct clk_lookup usart_clocks_lookups[] = { | ||
193 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
194 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
195 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
196 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
197 | }; | ||
198 | |||
181 | /* | 199 | /* |
182 | * The four programmable clocks. | 200 | * The four programmable clocks. |
183 | * You must configure pin multiplexing to bring these signals out. | 201 | * You must configure pin multiplexing to bring these signals out. |
@@ -228,6 +246,11 @@ static void __init at91sam9261_register_clocks(void) | |||
228 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 246 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
229 | clk_register(periph_clocks[i]); | 247 | clk_register(periph_clocks[i]); |
230 | 248 | ||
249 | clkdev_add_table(periph_clocks_lookups, | ||
250 | ARRAY_SIZE(periph_clocks_lookups)); | ||
251 | clkdev_add_table(usart_clocks_lookups, | ||
252 | ARRAY_SIZE(usart_clocks_lookups)); | ||
253 | |||
231 | clk_register(&pck0); | 254 | clk_register(&pck0); |
232 | clk_register(&pck1); | 255 | clk_register(&pck1); |
233 | clk_register(&pck2); | 256 | clk_register(&pck2); |
@@ -237,6 +260,18 @@ static void __init at91sam9261_register_clocks(void) | |||
237 | clk_register(&hck1); | 260 | clk_register(&hck1); |
238 | } | 261 | } |
239 | 262 | ||
263 | static struct clk_lookup console_clock_lookup; | ||
264 | |||
265 | void __init at91sam9261_set_console_clock(int id) | ||
266 | { | ||
267 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
268 | return; | ||
269 | |||
270 | console_clock_lookup.con_id = "usart"; | ||
271 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
272 | clkdev_add(&console_clock_lookup); | ||
273 | } | ||
274 | |||
240 | /* -------------------------------------------------------------------- | 275 | /* -------------------------------------------------------------------- |
241 | * GPIO | 276 | * GPIO |
242 | * -------------------------------------------------------------------- */ | 277 | * -------------------------------------------------------------------- */ |
@@ -267,7 +302,7 @@ static void at91sam9261_poweroff(void) | |||
267 | * AT91SAM9261 processor initialization | 302 | * AT91SAM9261 processor initialization |
268 | * -------------------------------------------------------------------- */ | 303 | * -------------------------------------------------------------------- */ |
269 | 304 | ||
270 | void __init at91sam9261_initialize(unsigned long main_clock) | 305 | void __init at91sam9261_map_io(void) |
271 | { | 306 | { |
272 | /* Map peripherals */ | 307 | /* Map peripherals */ |
273 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); | 308 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); |
@@ -276,8 +311,10 @@ void __init at91sam9261_initialize(unsigned long main_clock) | |||
276 | iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc)); | 311 | iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc)); |
277 | else | 312 | else |
278 | iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); | 313 | iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); |
314 | } | ||
279 | 315 | ||
280 | 316 | void __init at91sam9261_initialize(unsigned long main_clock) | |
317 | { | ||
281 | at91_arch_reset = at91sam9_alt_reset; | 318 | at91_arch_reset = at91sam9_alt_reset; |
282 | pm_power_off = at91sam9261_poweroff; | 319 | pm_power_off = at91sam9261_poweroff; |
283 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | 320 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 59fc48311fb0..3eb4538fceeb 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -426,7 +426,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
426 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | 426 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ |
427 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | 427 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ |
428 | 428 | ||
429 | at91_clock_associate("spi0_clk", &at91sam9261_spi0_device.dev, "spi_clk"); | ||
430 | platform_device_register(&at91sam9261_spi0_device); | 429 | platform_device_register(&at91sam9261_spi0_device); |
431 | } | 430 | } |
432 | if (enable_spi1) { | 431 | if (enable_spi1) { |
@@ -434,7 +433,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
434 | at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */ | 433 | at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */ |
435 | at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */ | 434 | at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */ |
436 | 435 | ||
437 | at91_clock_associate("spi1_clk", &at91sam9261_spi1_device.dev, "spi_clk"); | ||
438 | platform_device_register(&at91sam9261_spi1_device); | 436 | platform_device_register(&at91sam9261_spi1_device); |
439 | } | 437 | } |
440 | } | 438 | } |
@@ -581,10 +579,6 @@ static struct platform_device at91sam9261_tcb_device = { | |||
581 | 579 | ||
582 | static void __init at91_add_device_tc(void) | 580 | static void __init at91_add_device_tc(void) |
583 | { | 581 | { |
584 | /* this chip has a separate clock and irq for each TC channel */ | ||
585 | at91_clock_associate("tc0_clk", &at91sam9261_tcb_device.dev, "t0_clk"); | ||
586 | at91_clock_associate("tc1_clk", &at91sam9261_tcb_device.dev, "t1_clk"); | ||
587 | at91_clock_associate("tc2_clk", &at91sam9261_tcb_device.dev, "t2_clk"); | ||
588 | platform_device_register(&at91sam9261_tcb_device); | 582 | platform_device_register(&at91sam9261_tcb_device); |
589 | } | 583 | } |
590 | #else | 584 | #else |
@@ -786,17 +780,14 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
786 | case AT91SAM9261_ID_SSC0: | 780 | case AT91SAM9261_ID_SSC0: |
787 | pdev = &at91sam9261_ssc0_device; | 781 | pdev = &at91sam9261_ssc0_device; |
788 | configure_ssc0_pins(pins); | 782 | configure_ssc0_pins(pins); |
789 | at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); | ||
790 | break; | 783 | break; |
791 | case AT91SAM9261_ID_SSC1: | 784 | case AT91SAM9261_ID_SSC1: |
792 | pdev = &at91sam9261_ssc1_device; | 785 | pdev = &at91sam9261_ssc1_device; |
793 | configure_ssc1_pins(pins); | 786 | configure_ssc1_pins(pins); |
794 | at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); | ||
795 | break; | 787 | break; |
796 | case AT91SAM9261_ID_SSC2: | 788 | case AT91SAM9261_ID_SSC2: |
797 | pdev = &at91sam9261_ssc2_device; | 789 | pdev = &at91sam9261_ssc2_device; |
798 | configure_ssc2_pins(pins); | 790 | configure_ssc2_pins(pins); |
799 | at91_clock_associate("ssc2_clk", &pdev->dev, "pclk"); | ||
800 | break; | 791 | break; |
801 | default: | 792 | default: |
802 | return; | 793 | return; |
@@ -989,32 +980,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
989 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 980 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
990 | { | 981 | { |
991 | struct platform_device *pdev; | 982 | struct platform_device *pdev; |
983 | struct atmel_uart_data *pdata; | ||
992 | 984 | ||
993 | switch (id) { | 985 | switch (id) { |
994 | case 0: /* DBGU */ | 986 | case 0: /* DBGU */ |
995 | pdev = &at91sam9261_dbgu_device; | 987 | pdev = &at91sam9261_dbgu_device; |
996 | configure_dbgu_pins(); | 988 | configure_dbgu_pins(); |
997 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
998 | break; | 989 | break; |
999 | case AT91SAM9261_ID_US0: | 990 | case AT91SAM9261_ID_US0: |
1000 | pdev = &at91sam9261_uart0_device; | 991 | pdev = &at91sam9261_uart0_device; |
1001 | configure_usart0_pins(pins); | 992 | configure_usart0_pins(pins); |
1002 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1003 | break; | 993 | break; |
1004 | case AT91SAM9261_ID_US1: | 994 | case AT91SAM9261_ID_US1: |
1005 | pdev = &at91sam9261_uart1_device; | 995 | pdev = &at91sam9261_uart1_device; |
1006 | configure_usart1_pins(pins); | 996 | configure_usart1_pins(pins); |
1007 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1008 | break; | 997 | break; |
1009 | case AT91SAM9261_ID_US2: | 998 | case AT91SAM9261_ID_US2: |
1010 | pdev = &at91sam9261_uart2_device; | 999 | pdev = &at91sam9261_uart2_device; |
1011 | configure_usart2_pins(pins); | 1000 | configure_usart2_pins(pins); |
1012 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1013 | break; | 1001 | break; |
1014 | default: | 1002 | default: |
1015 | return; | 1003 | return; |
1016 | } | 1004 | } |
1017 | pdev->id = portnr; /* update to mapped ID */ | 1005 | pdata = pdev->dev.platform_data; |
1006 | pdata->num = portnr; /* update to mapped ID */ | ||
1018 | 1007 | ||
1019 | if (portnr < ATMEL_MAX_UART) | 1008 | if (portnr < ATMEL_MAX_UART) |
1020 | at91_uarts[portnr] = pdev; | 1009 | at91_uarts[portnr] = pdev; |
@@ -1022,8 +1011,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1022 | 1011 | ||
1023 | void __init at91_set_serial_console(unsigned portnr) | 1012 | void __init at91_set_serial_console(unsigned portnr) |
1024 | { | 1013 | { |
1025 | if (portnr < ATMEL_MAX_UART) | 1014 | if (portnr < ATMEL_MAX_UART) { |
1026 | atmel_default_console_device = at91_uarts[portnr]; | 1015 | atmel_default_console_device = at91_uarts[portnr]; |
1016 | at91sam9261_set_console_clock(portnr); | ||
1017 | } | ||
1027 | } | 1018 | } |
1028 | 1019 | ||
1029 | void __init at91_add_device_serial(void) | 1020 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 249f900954d8..dc28477d14ff 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -199,6 +199,23 @@ static struct clk *periph_clocks[] __initdata = { | |||
199 | // irq0 .. irq1 | 199 | // irq0 .. irq1 |
200 | }; | 200 | }; |
201 | 201 | ||
202 | static struct clk_lookup periph_clocks_lookups[] = { | ||
203 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | ||
204 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | ||
205 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), | ||
206 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), | ||
207 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | ||
208 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | ||
209 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), | ||
210 | }; | ||
211 | |||
212 | static struct clk_lookup usart_clocks_lookups[] = { | ||
213 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
214 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
215 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
216 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
217 | }; | ||
218 | |||
202 | /* | 219 | /* |
203 | * The four programmable clocks. | 220 | * The four programmable clocks. |
204 | * You must configure pin multiplexing to bring these signals out. | 221 | * You must configure pin multiplexing to bring these signals out. |
@@ -235,12 +252,29 @@ static void __init at91sam9263_register_clocks(void) | |||
235 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 252 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
236 | clk_register(periph_clocks[i]); | 253 | clk_register(periph_clocks[i]); |
237 | 254 | ||
255 | clkdev_add_table(periph_clocks_lookups, | ||
256 | ARRAY_SIZE(periph_clocks_lookups)); | ||
257 | clkdev_add_table(usart_clocks_lookups, | ||
258 | ARRAY_SIZE(usart_clocks_lookups)); | ||
259 | |||
238 | clk_register(&pck0); | 260 | clk_register(&pck0); |
239 | clk_register(&pck1); | 261 | clk_register(&pck1); |
240 | clk_register(&pck2); | 262 | clk_register(&pck2); |
241 | clk_register(&pck3); | 263 | clk_register(&pck3); |
242 | } | 264 | } |
243 | 265 | ||
266 | static struct clk_lookup console_clock_lookup; | ||
267 | |||
268 | void __init at91sam9263_set_console_clock(int id) | ||
269 | { | ||
270 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
271 | return; | ||
272 | |||
273 | console_clock_lookup.con_id = "usart"; | ||
274 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
275 | clkdev_add(&console_clock_lookup); | ||
276 | } | ||
277 | |||
244 | /* -------------------------------------------------------------------- | 278 | /* -------------------------------------------------------------------- |
245 | * GPIO | 279 | * GPIO |
246 | * -------------------------------------------------------------------- */ | 280 | * -------------------------------------------------------------------- */ |
@@ -279,11 +313,14 @@ static void at91sam9263_poweroff(void) | |||
279 | * AT91SAM9263 processor initialization | 313 | * AT91SAM9263 processor initialization |
280 | * -------------------------------------------------------------------- */ | 314 | * -------------------------------------------------------------------- */ |
281 | 315 | ||
282 | void __init at91sam9263_initialize(unsigned long main_clock) | 316 | void __init at91sam9263_map_io(void) |
283 | { | 317 | { |
284 | /* Map peripherals */ | 318 | /* Map peripherals */ |
285 | iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc)); | 319 | iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc)); |
320 | } | ||
286 | 321 | ||
322 | void __init at91sam9263_initialize(unsigned long main_clock) | ||
323 | { | ||
287 | at91_arch_reset = at91sam9_alt_reset; | 324 | at91_arch_reset = at91sam9_alt_reset; |
288 | pm_power_off = at91sam9263_poweroff; | 325 | pm_power_off = at91sam9263_poweroff; |
289 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); | 326 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index fb5c23af1017..ffe081b77ed0 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -308,7 +308,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
308 | } | 308 | } |
309 | 309 | ||
310 | mmc0_data = *data; | 310 | mmc0_data = *data; |
311 | at91_clock_associate("mci0_clk", &at91sam9263_mmc0_device.dev, "mci_clk"); | ||
312 | platform_device_register(&at91sam9263_mmc0_device); | 311 | platform_device_register(&at91sam9263_mmc0_device); |
313 | } else { /* MCI1 */ | 312 | } else { /* MCI1 */ |
314 | /* CLK */ | 313 | /* CLK */ |
@@ -339,7 +338,6 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
339 | } | 338 | } |
340 | 339 | ||
341 | mmc1_data = *data; | 340 | mmc1_data = *data; |
342 | at91_clock_associate("mci1_clk", &at91sam9263_mmc1_device.dev, "mci_clk"); | ||
343 | platform_device_register(&at91sam9263_mmc1_device); | 341 | platform_device_register(&at91sam9263_mmc1_device); |
344 | } | 342 | } |
345 | } | 343 | } |
@@ -686,7 +684,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
686 | at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | 684 | at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ |
687 | at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | 685 | at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ |
688 | 686 | ||
689 | at91_clock_associate("spi0_clk", &at91sam9263_spi0_device.dev, "spi_clk"); | ||
690 | platform_device_register(&at91sam9263_spi0_device); | 687 | platform_device_register(&at91sam9263_spi0_device); |
691 | } | 688 | } |
692 | if (enable_spi1) { | 689 | if (enable_spi1) { |
@@ -694,7 +691,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
694 | at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ | 691 | at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ |
695 | at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ | 692 | at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ |
696 | 693 | ||
697 | at91_clock_associate("spi1_clk", &at91sam9263_spi1_device.dev, "spi_clk"); | ||
698 | platform_device_register(&at91sam9263_spi1_device); | 694 | platform_device_register(&at91sam9263_spi1_device); |
699 | } | 695 | } |
700 | } | 696 | } |
@@ -941,8 +937,6 @@ static struct platform_device at91sam9263_tcb_device = { | |||
941 | 937 | ||
942 | static void __init at91_add_device_tc(void) | 938 | static void __init at91_add_device_tc(void) |
943 | { | 939 | { |
944 | /* this chip has one clock and irq for all three TC channels */ | ||
945 | at91_clock_associate("tcb_clk", &at91sam9263_tcb_device.dev, "t0_clk"); | ||
946 | platform_device_register(&at91sam9263_tcb_device); | 940 | platform_device_register(&at91sam9263_tcb_device); |
947 | } | 941 | } |
948 | #else | 942 | #else |
@@ -1171,12 +1165,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
1171 | case AT91SAM9263_ID_SSC0: | 1165 | case AT91SAM9263_ID_SSC0: |
1172 | pdev = &at91sam9263_ssc0_device; | 1166 | pdev = &at91sam9263_ssc0_device; |
1173 | configure_ssc0_pins(pins); | 1167 | configure_ssc0_pins(pins); |
1174 | at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); | ||
1175 | break; | 1168 | break; |
1176 | case AT91SAM9263_ID_SSC1: | 1169 | case AT91SAM9263_ID_SSC1: |
1177 | pdev = &at91sam9263_ssc1_device; | 1170 | pdev = &at91sam9263_ssc1_device; |
1178 | configure_ssc1_pins(pins); | 1171 | configure_ssc1_pins(pins); |
1179 | at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); | ||
1180 | break; | 1172 | break; |
1181 | default: | 1173 | default: |
1182 | return; | 1174 | return; |
@@ -1370,32 +1362,30 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1370 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1362 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1371 | { | 1363 | { |
1372 | struct platform_device *pdev; | 1364 | struct platform_device *pdev; |
1365 | struct atmel_uart_data *pdata; | ||
1373 | 1366 | ||
1374 | switch (id) { | 1367 | switch (id) { |
1375 | case 0: /* DBGU */ | 1368 | case 0: /* DBGU */ |
1376 | pdev = &at91sam9263_dbgu_device; | 1369 | pdev = &at91sam9263_dbgu_device; |
1377 | configure_dbgu_pins(); | 1370 | configure_dbgu_pins(); |
1378 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1379 | break; | 1371 | break; |
1380 | case AT91SAM9263_ID_US0: | 1372 | case AT91SAM9263_ID_US0: |
1381 | pdev = &at91sam9263_uart0_device; | 1373 | pdev = &at91sam9263_uart0_device; |
1382 | configure_usart0_pins(pins); | 1374 | configure_usart0_pins(pins); |
1383 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1384 | break; | 1375 | break; |
1385 | case AT91SAM9263_ID_US1: | 1376 | case AT91SAM9263_ID_US1: |
1386 | pdev = &at91sam9263_uart1_device; | 1377 | pdev = &at91sam9263_uart1_device; |
1387 | configure_usart1_pins(pins); | 1378 | configure_usart1_pins(pins); |
1388 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1389 | break; | 1379 | break; |
1390 | case AT91SAM9263_ID_US2: | 1380 | case AT91SAM9263_ID_US2: |
1391 | pdev = &at91sam9263_uart2_device; | 1381 | pdev = &at91sam9263_uart2_device; |
1392 | configure_usart2_pins(pins); | 1382 | configure_usart2_pins(pins); |
1393 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1394 | break; | 1383 | break; |
1395 | default: | 1384 | default: |
1396 | return; | 1385 | return; |
1397 | } | 1386 | } |
1398 | pdev->id = portnr; /* update to mapped ID */ | 1387 | pdata = pdev->dev.platform_data; |
1388 | pdata->num = portnr; /* update to mapped ID */ | ||
1399 | 1389 | ||
1400 | if (portnr < ATMEL_MAX_UART) | 1390 | if (portnr < ATMEL_MAX_UART) |
1401 | at91_uarts[portnr] = pdev; | 1391 | at91_uarts[portnr] = pdev; |
@@ -1403,8 +1393,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1403 | 1393 | ||
1404 | void __init at91_set_serial_console(unsigned portnr) | 1394 | void __init at91_set_serial_console(unsigned portnr) |
1405 | { | 1395 | { |
1406 | if (portnr < ATMEL_MAX_UART) | 1396 | if (portnr < ATMEL_MAX_UART) { |
1407 | atmel_default_console_device = at91_uarts[portnr]; | 1397 | atmel_default_console_device = at91_uarts[portnr]; |
1398 | at91sam9263_set_console_clock(portnr); | ||
1399 | } | ||
1408 | } | 1400 | } |
1409 | 1401 | ||
1410 | void __init at91_add_device_serial(void) | 1402 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index c67b47f1c0fd..2bb6ff9af1c7 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -184,22 +184,6 @@ static struct clk vdec_clk = { | |||
184 | .type = CLK_TYPE_PERIPHERAL, | 184 | .type = CLK_TYPE_PERIPHERAL, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | /* One additional fake clock for ohci */ | ||
188 | static struct clk ohci_clk = { | ||
189 | .name = "ohci_clk", | ||
190 | .pmc_mask = 0, | ||
191 | .type = CLK_TYPE_PERIPHERAL, | ||
192 | .parent = &uhphs_clk, | ||
193 | }; | ||
194 | |||
195 | /* One additional fake clock for second TC block */ | ||
196 | static struct clk tcb1_clk = { | ||
197 | .name = "tcb1_clk", | ||
198 | .pmc_mask = 0, | ||
199 | .type = CLK_TYPE_PERIPHERAL, | ||
200 | .parent = &tcb0_clk, | ||
201 | }; | ||
202 | |||
203 | static struct clk *periph_clocks[] __initdata = { | 187 | static struct clk *periph_clocks[] __initdata = { |
204 | &pioA_clk, | 188 | &pioA_clk, |
205 | &pioB_clk, | 189 | &pioB_clk, |
@@ -228,8 +212,30 @@ static struct clk *periph_clocks[] __initdata = { | |||
228 | &udphs_clk, | 212 | &udphs_clk, |
229 | &mmc1_clk, | 213 | &mmc1_clk, |
230 | // irq0 | 214 | // irq0 |
231 | &ohci_clk, | 215 | }; |
232 | &tcb1_clk, | 216 | |
217 | static struct clk_lookup periph_clocks_lookups[] = { | ||
218 | /* One additional fake clock for ohci */ | ||
219 | CLKDEV_CON_ID("ohci_clk", &uhphs_clk), | ||
220 | CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci.0", &uhphs_clk), | ||
221 | CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), | ||
222 | CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), | ||
223 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), | ||
224 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), | ||
225 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | ||
226 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | ||
227 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb0_clk), | ||
228 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk), | ||
229 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | ||
230 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | ||
231 | }; | ||
232 | |||
233 | static struct clk_lookup usart_clocks_lookups[] = { | ||
234 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
235 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
236 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
237 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
238 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk), | ||
233 | }; | 239 | }; |
234 | 240 | ||
235 | /* | 241 | /* |
@@ -256,6 +262,11 @@ static void __init at91sam9g45_register_clocks(void) | |||
256 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 262 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
257 | clk_register(periph_clocks[i]); | 263 | clk_register(periph_clocks[i]); |
258 | 264 | ||
265 | clkdev_add_table(periph_clocks_lookups, | ||
266 | ARRAY_SIZE(periph_clocks_lookups)); | ||
267 | clkdev_add_table(usart_clocks_lookups, | ||
268 | ARRAY_SIZE(usart_clocks_lookups)); | ||
269 | |||
259 | if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11()) | 270 | if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11()) |
260 | clk_register(&vdec_clk); | 271 | clk_register(&vdec_clk); |
261 | 272 | ||
@@ -263,6 +274,18 @@ static void __init at91sam9g45_register_clocks(void) | |||
263 | clk_register(&pck1); | 274 | clk_register(&pck1); |
264 | } | 275 | } |
265 | 276 | ||
277 | static struct clk_lookup console_clock_lookup; | ||
278 | |||
279 | void __init at91sam9g45_set_console_clock(int id) | ||
280 | { | ||
281 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
282 | return; | ||
283 | |||
284 | console_clock_lookup.con_id = "usart"; | ||
285 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
286 | clkdev_add(&console_clock_lookup); | ||
287 | } | ||
288 | |||
266 | /* -------------------------------------------------------------------- | 289 | /* -------------------------------------------------------------------- |
267 | * GPIO | 290 | * GPIO |
268 | * -------------------------------------------------------------------- */ | 291 | * -------------------------------------------------------------------- */ |
@@ -306,11 +329,14 @@ static void at91sam9g45_poweroff(void) | |||
306 | * AT91SAM9G45 processor initialization | 329 | * AT91SAM9G45 processor initialization |
307 | * -------------------------------------------------------------------- */ | 330 | * -------------------------------------------------------------------- */ |
308 | 331 | ||
309 | void __init at91sam9g45_initialize(unsigned long main_clock) | 332 | void __init at91sam9g45_map_io(void) |
310 | { | 333 | { |
311 | /* Map peripherals */ | 334 | /* Map peripherals */ |
312 | iotable_init(at91sam9g45_io_desc, ARRAY_SIZE(at91sam9g45_io_desc)); | 335 | iotable_init(at91sam9g45_io_desc, ARRAY_SIZE(at91sam9g45_io_desc)); |
336 | } | ||
313 | 337 | ||
338 | void __init at91sam9g45_initialize(unsigned long main_clock) | ||
339 | { | ||
314 | at91_arch_reset = at91sam9g45_reset; | 340 | at91_arch_reset = at91sam9g45_reset; |
315 | pm_power_off = at91sam9g45_poweroff; | 341 | pm_power_off = at91sam9g45_poweroff; |
316 | at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); | 342 | at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 5e9f8a4c38df..05674865bc21 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -180,7 +180,6 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) | |||
180 | } | 180 | } |
181 | 181 | ||
182 | usbh_ehci_data = *data; | 182 | usbh_ehci_data = *data; |
183 | at91_clock_associate("uhphs_clk", &at91_usbh_ehci_device.dev, "ehci_clk"); | ||
184 | platform_device_register(&at91_usbh_ehci_device); | 183 | platform_device_register(&at91_usbh_ehci_device); |
185 | } | 184 | } |
186 | #else | 185 | #else |
@@ -266,10 +265,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data) | |||
266 | 265 | ||
267 | /* Pullup pin is handled internally by USB device peripheral */ | 266 | /* Pullup pin is handled internally by USB device peripheral */ |
268 | 267 | ||
269 | /* Clocks */ | ||
270 | at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk"); | ||
271 | at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk"); | ||
272 | |||
273 | platform_device_register(&at91_usba_udc_device); | 268 | platform_device_register(&at91_usba_udc_device); |
274 | } | 269 | } |
275 | #else | 270 | #else |
@@ -478,7 +473,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) | |||
478 | } | 473 | } |
479 | 474 | ||
480 | mmc0_data = *data; | 475 | mmc0_data = *data; |
481 | at91_clock_associate("mci0_clk", &at91sam9g45_mmc0_device.dev, "mci_clk"); | ||
482 | platform_device_register(&at91sam9g45_mmc0_device); | 476 | platform_device_register(&at91sam9g45_mmc0_device); |
483 | 477 | ||
484 | } else { /* MCI1 */ | 478 | } else { /* MCI1 */ |
@@ -504,7 +498,6 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) | |||
504 | } | 498 | } |
505 | 499 | ||
506 | mmc1_data = *data; | 500 | mmc1_data = *data; |
507 | at91_clock_associate("mci1_clk", &at91sam9g45_mmc1_device.dev, "mci_clk"); | ||
508 | platform_device_register(&at91sam9g45_mmc1_device); | 501 | platform_device_register(&at91sam9g45_mmc1_device); |
509 | 502 | ||
510 | } | 503 | } |
@@ -801,7 +794,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
801 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI0_MOSI */ | 794 | at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI0_MOSI */ |
802 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI0_SPCK */ | 795 | at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI0_SPCK */ |
803 | 796 | ||
804 | at91_clock_associate("spi0_clk", &at91sam9g45_spi0_device.dev, "spi_clk"); | ||
805 | platform_device_register(&at91sam9g45_spi0_device); | 797 | platform_device_register(&at91sam9g45_spi0_device); |
806 | } | 798 | } |
807 | if (enable_spi1) { | 799 | if (enable_spi1) { |
@@ -809,7 +801,6 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
809 | at91_set_A_periph(AT91_PIN_PB15, 0); /* SPI1_MOSI */ | 801 | at91_set_A_periph(AT91_PIN_PB15, 0); /* SPI1_MOSI */ |
810 | at91_set_A_periph(AT91_PIN_PB16, 0); /* SPI1_SPCK */ | 802 | at91_set_A_periph(AT91_PIN_PB16, 0); /* SPI1_SPCK */ |
811 | 803 | ||
812 | at91_clock_associate("spi1_clk", &at91sam9g45_spi1_device.dev, "spi_clk"); | ||
813 | platform_device_register(&at91sam9g45_spi1_device); | 804 | platform_device_register(&at91sam9g45_spi1_device); |
814 | } | 805 | } |
815 | } | 806 | } |
@@ -999,10 +990,7 @@ static struct platform_device at91sam9g45_tcb1_device = { | |||
999 | 990 | ||
1000 | static void __init at91_add_device_tc(void) | 991 | static void __init at91_add_device_tc(void) |
1001 | { | 992 | { |
1002 | /* this chip has one clock and irq for all six TC channels */ | ||
1003 | at91_clock_associate("tcb0_clk", &at91sam9g45_tcb0_device.dev, "t0_clk"); | ||
1004 | platform_device_register(&at91sam9g45_tcb0_device); | 993 | platform_device_register(&at91sam9g45_tcb0_device); |
1005 | at91_clock_associate("tcb1_clk", &at91sam9g45_tcb1_device.dev, "t0_clk"); | ||
1006 | platform_device_register(&at91sam9g45_tcb1_device); | 994 | platform_device_register(&at91sam9g45_tcb1_device); |
1007 | } | 995 | } |
1008 | #else | 996 | #else |
@@ -1286,12 +1274,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
1286 | case AT91SAM9G45_ID_SSC0: | 1274 | case AT91SAM9G45_ID_SSC0: |
1287 | pdev = &at91sam9g45_ssc0_device; | 1275 | pdev = &at91sam9g45_ssc0_device; |
1288 | configure_ssc0_pins(pins); | 1276 | configure_ssc0_pins(pins); |
1289 | at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); | ||
1290 | break; | 1277 | break; |
1291 | case AT91SAM9G45_ID_SSC1: | 1278 | case AT91SAM9G45_ID_SSC1: |
1292 | pdev = &at91sam9g45_ssc1_device; | 1279 | pdev = &at91sam9g45_ssc1_device; |
1293 | configure_ssc1_pins(pins); | 1280 | configure_ssc1_pins(pins); |
1294 | at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); | ||
1295 | break; | 1281 | break; |
1296 | default: | 1282 | default: |
1297 | return; | 1283 | return; |
@@ -1527,37 +1513,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1527 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1513 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1528 | { | 1514 | { |
1529 | struct platform_device *pdev; | 1515 | struct platform_device *pdev; |
1516 | struct atmel_uart_data *pdata; | ||
1530 | 1517 | ||
1531 | switch (id) { | 1518 | switch (id) { |
1532 | case 0: /* DBGU */ | 1519 | case 0: /* DBGU */ |
1533 | pdev = &at91sam9g45_dbgu_device; | 1520 | pdev = &at91sam9g45_dbgu_device; |
1534 | configure_dbgu_pins(); | 1521 | configure_dbgu_pins(); |
1535 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1536 | break; | 1522 | break; |
1537 | case AT91SAM9G45_ID_US0: | 1523 | case AT91SAM9G45_ID_US0: |
1538 | pdev = &at91sam9g45_uart0_device; | 1524 | pdev = &at91sam9g45_uart0_device; |
1539 | configure_usart0_pins(pins); | 1525 | configure_usart0_pins(pins); |
1540 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1541 | break; | 1526 | break; |
1542 | case AT91SAM9G45_ID_US1: | 1527 | case AT91SAM9G45_ID_US1: |
1543 | pdev = &at91sam9g45_uart1_device; | 1528 | pdev = &at91sam9g45_uart1_device; |
1544 | configure_usart1_pins(pins); | 1529 | configure_usart1_pins(pins); |
1545 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1546 | break; | 1530 | break; |
1547 | case AT91SAM9G45_ID_US2: | 1531 | case AT91SAM9G45_ID_US2: |
1548 | pdev = &at91sam9g45_uart2_device; | 1532 | pdev = &at91sam9g45_uart2_device; |
1549 | configure_usart2_pins(pins); | 1533 | configure_usart2_pins(pins); |
1550 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1551 | break; | 1534 | break; |
1552 | case AT91SAM9G45_ID_US3: | 1535 | case AT91SAM9G45_ID_US3: |
1553 | pdev = &at91sam9g45_uart3_device; | 1536 | pdev = &at91sam9g45_uart3_device; |
1554 | configure_usart3_pins(pins); | 1537 | configure_usart3_pins(pins); |
1555 | at91_clock_associate("usart3_clk", &pdev->dev, "usart"); | ||
1556 | break; | 1538 | break; |
1557 | default: | 1539 | default: |
1558 | return; | 1540 | return; |
1559 | } | 1541 | } |
1560 | pdev->id = portnr; /* update to mapped ID */ | 1542 | pdata = pdev->dev.platform_data; |
1543 | pdata->num = portnr; /* update to mapped ID */ | ||
1561 | 1544 | ||
1562 | if (portnr < ATMEL_MAX_UART) | 1545 | if (portnr < ATMEL_MAX_UART) |
1563 | at91_uarts[portnr] = pdev; | 1546 | at91_uarts[portnr] = pdev; |
@@ -1565,8 +1548,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1565 | 1548 | ||
1566 | void __init at91_set_serial_console(unsigned portnr) | 1549 | void __init at91_set_serial_console(unsigned portnr) |
1567 | { | 1550 | { |
1568 | if (portnr < ATMEL_MAX_UART) | 1551 | if (portnr < ATMEL_MAX_UART) { |
1569 | atmel_default_console_device = at91_uarts[portnr]; | 1552 | atmel_default_console_device = at91_uarts[portnr]; |
1553 | at91sam9g45_set_console_clock(portnr); | ||
1554 | } | ||
1570 | } | 1555 | } |
1571 | 1556 | ||
1572 | void __init at91_add_device_serial(void) | 1557 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 6a9d24e5ed8e..1a40f16b66c8 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -190,6 +190,24 @@ static struct clk *periph_clocks[] __initdata = { | |||
190 | // irq0 | 190 | // irq0 |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct clk_lookup periph_clocks_lookups[] = { | ||
194 | CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), | ||
195 | CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), | ||
196 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | ||
197 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | ||
198 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), | ||
199 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | ||
200 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | ||
201 | }; | ||
202 | |||
203 | static struct clk_lookup usart_clocks_lookups[] = { | ||
204 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
205 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
206 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
207 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
208 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk), | ||
209 | }; | ||
210 | |||
193 | /* | 211 | /* |
194 | * The two programmable clocks. | 212 | * The two programmable clocks. |
195 | * You must configure pin multiplexing to bring these signals out. | 213 | * You must configure pin multiplexing to bring these signals out. |
@@ -214,10 +232,27 @@ static void __init at91sam9rl_register_clocks(void) | |||
214 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | 232 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) |
215 | clk_register(periph_clocks[i]); | 233 | clk_register(periph_clocks[i]); |
216 | 234 | ||
235 | clkdev_add_table(periph_clocks_lookups, | ||
236 | ARRAY_SIZE(periph_clocks_lookups)); | ||
237 | clkdev_add_table(usart_clocks_lookups, | ||
238 | ARRAY_SIZE(usart_clocks_lookups)); | ||
239 | |||
217 | clk_register(&pck0); | 240 | clk_register(&pck0); |
218 | clk_register(&pck1); | 241 | clk_register(&pck1); |
219 | } | 242 | } |
220 | 243 | ||
244 | static struct clk_lookup console_clock_lookup; | ||
245 | |||
246 | void __init at91sam9rl_set_console_clock(int id) | ||
247 | { | ||
248 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
249 | return; | ||
250 | |||
251 | console_clock_lookup.con_id = "usart"; | ||
252 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
253 | clkdev_add(&console_clock_lookup); | ||
254 | } | ||
255 | |||
221 | /* -------------------------------------------------------------------- | 256 | /* -------------------------------------------------------------------- |
222 | * GPIO | 257 | * GPIO |
223 | * -------------------------------------------------------------------- */ | 258 | * -------------------------------------------------------------------- */ |
@@ -252,7 +287,7 @@ static void at91sam9rl_poweroff(void) | |||
252 | * AT91SAM9RL processor initialization | 287 | * AT91SAM9RL processor initialization |
253 | * -------------------------------------------------------------------- */ | 288 | * -------------------------------------------------------------------- */ |
254 | 289 | ||
255 | void __init at91sam9rl_initialize(unsigned long main_clock) | 290 | void __init at91sam9rl_map_io(void) |
256 | { | 291 | { |
257 | unsigned long cidr, sram_size; | 292 | unsigned long cidr, sram_size; |
258 | 293 | ||
@@ -275,7 +310,10 @@ void __init at91sam9rl_initialize(unsigned long main_clock) | |||
275 | 310 | ||
276 | /* Map SRAM */ | 311 | /* Map SRAM */ |
277 | iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); | 312 | iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); |
313 | } | ||
278 | 314 | ||
315 | void __init at91sam9rl_initialize(unsigned long main_clock) | ||
316 | { | ||
279 | at91_arch_reset = at91sam9_alt_reset; | 317 | at91_arch_reset = at91sam9_alt_reset; |
280 | pm_power_off = at91sam9rl_poweroff; | 318 | pm_power_off = at91sam9rl_poweroff; |
281 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); | 319 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index c49262bddd85..c296045f2b6a 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -155,10 +155,6 @@ void __init at91_add_device_usba(struct usba_platform_data *data) | |||
155 | 155 | ||
156 | /* Pullup pin is handled internally by USB device peripheral */ | 156 | /* Pullup pin is handled internally by USB device peripheral */ |
157 | 157 | ||
158 | /* Clocks */ | ||
159 | at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk"); | ||
160 | at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk"); | ||
161 | |||
162 | platform_device_register(&at91_usba_udc_device); | 158 | platform_device_register(&at91_usba_udc_device); |
163 | } | 159 | } |
164 | #else | 160 | #else |
@@ -605,10 +601,6 @@ static struct platform_device at91sam9rl_tcb_device = { | |||
605 | 601 | ||
606 | static void __init at91_add_device_tc(void) | 602 | static void __init at91_add_device_tc(void) |
607 | { | 603 | { |
608 | /* this chip has a separate clock and irq for each TC channel */ | ||
609 | at91_clock_associate("tc0_clk", &at91sam9rl_tcb_device.dev, "t0_clk"); | ||
610 | at91_clock_associate("tc1_clk", &at91sam9rl_tcb_device.dev, "t1_clk"); | ||
611 | at91_clock_associate("tc2_clk", &at91sam9rl_tcb_device.dev, "t2_clk"); | ||
612 | platform_device_register(&at91sam9rl_tcb_device); | 604 | platform_device_register(&at91sam9rl_tcb_device); |
613 | } | 605 | } |
614 | #else | 606 | #else |
@@ -892,12 +884,10 @@ void __init at91_add_device_ssc(unsigned id, unsigned pins) | |||
892 | case AT91SAM9RL_ID_SSC0: | 884 | case AT91SAM9RL_ID_SSC0: |
893 | pdev = &at91sam9rl_ssc0_device; | 885 | pdev = &at91sam9rl_ssc0_device; |
894 | configure_ssc0_pins(pins); | 886 | configure_ssc0_pins(pins); |
895 | at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); | ||
896 | break; | 887 | break; |
897 | case AT91SAM9RL_ID_SSC1: | 888 | case AT91SAM9RL_ID_SSC1: |
898 | pdev = &at91sam9rl_ssc1_device; | 889 | pdev = &at91sam9rl_ssc1_device; |
899 | configure_ssc1_pins(pins); | 890 | configure_ssc1_pins(pins); |
900 | at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); | ||
901 | break; | 891 | break; |
902 | default: | 892 | default: |
903 | return; | 893 | return; |
@@ -1141,37 +1131,34 @@ struct platform_device *atmel_default_console_device; /* the serial console devi | |||
1141 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1131 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1142 | { | 1132 | { |
1143 | struct platform_device *pdev; | 1133 | struct platform_device *pdev; |
1134 | struct atmel_uart_data *pdata; | ||
1144 | 1135 | ||
1145 | switch (id) { | 1136 | switch (id) { |
1146 | case 0: /* DBGU */ | 1137 | case 0: /* DBGU */ |
1147 | pdev = &at91sam9rl_dbgu_device; | 1138 | pdev = &at91sam9rl_dbgu_device; |
1148 | configure_dbgu_pins(); | 1139 | configure_dbgu_pins(); |
1149 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
1150 | break; | 1140 | break; |
1151 | case AT91SAM9RL_ID_US0: | 1141 | case AT91SAM9RL_ID_US0: |
1152 | pdev = &at91sam9rl_uart0_device; | 1142 | pdev = &at91sam9rl_uart0_device; |
1153 | configure_usart0_pins(pins); | 1143 | configure_usart0_pins(pins); |
1154 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
1155 | break; | 1144 | break; |
1156 | case AT91SAM9RL_ID_US1: | 1145 | case AT91SAM9RL_ID_US1: |
1157 | pdev = &at91sam9rl_uart1_device; | 1146 | pdev = &at91sam9rl_uart1_device; |
1158 | configure_usart1_pins(pins); | 1147 | configure_usart1_pins(pins); |
1159 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
1160 | break; | 1148 | break; |
1161 | case AT91SAM9RL_ID_US2: | 1149 | case AT91SAM9RL_ID_US2: |
1162 | pdev = &at91sam9rl_uart2_device; | 1150 | pdev = &at91sam9rl_uart2_device; |
1163 | configure_usart2_pins(pins); | 1151 | configure_usart2_pins(pins); |
1164 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
1165 | break; | 1152 | break; |
1166 | case AT91SAM9RL_ID_US3: | 1153 | case AT91SAM9RL_ID_US3: |
1167 | pdev = &at91sam9rl_uart3_device; | 1154 | pdev = &at91sam9rl_uart3_device; |
1168 | configure_usart3_pins(pins); | 1155 | configure_usart3_pins(pins); |
1169 | at91_clock_associate("usart3_clk", &pdev->dev, "usart"); | ||
1170 | break; | 1156 | break; |
1171 | default: | 1157 | default: |
1172 | return; | 1158 | return; |
1173 | } | 1159 | } |
1174 | pdev->id = portnr; /* update to mapped ID */ | 1160 | pdata = pdev->dev.platform_data; |
1161 | pdata->num = portnr; /* update to mapped ID */ | ||
1175 | 1162 | ||
1176 | if (portnr < ATMEL_MAX_UART) | 1163 | if (portnr < ATMEL_MAX_UART) |
1177 | at91_uarts[portnr] = pdev; | 1164 | at91_uarts[portnr] = pdev; |
@@ -1179,8 +1166,10 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1179 | 1166 | ||
1180 | void __init at91_set_serial_console(unsigned portnr) | 1167 | void __init at91_set_serial_console(unsigned portnr) |
1181 | { | 1168 | { |
1182 | if (portnr < ATMEL_MAX_UART) | 1169 | if (portnr < ATMEL_MAX_UART) { |
1183 | atmel_default_console_device = at91_uarts[portnr]; | 1170 | atmel_default_console_device = at91_uarts[portnr]; |
1171 | at91sam9rl_set_console_clock(portnr); | ||
1172 | } | ||
1184 | } | 1173 | } |
1185 | 1174 | ||
1186 | void __init at91_add_device_serial(void) | 1175 | void __init at91_add_device_serial(void) |
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index ad3ec85b2790..56ba3bd035ae 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c | |||
@@ -37,11 +37,6 @@ unsigned long clk_get_rate(struct clk *clk) | |||
37 | return AT91X40_MASTER_CLOCK; | 37 | return AT91X40_MASTER_CLOCK; |
38 | } | 38 | } |
39 | 39 | ||
40 | struct clk *clk_get(struct device *dev, const char *id) | ||
41 | { | ||
42 | return NULL; | ||
43 | } | ||
44 | |||
45 | void __init at91x40_initialize(unsigned long main_clock) | 40 | void __init at91x40_initialize(unsigned long main_clock) |
46 | { | 41 | { |
47 | at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) | 42 | at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) |
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index 8a3fc84847c1..ab1d463aa47d 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -35,14 +35,18 @@ | |||
35 | 35 | ||
36 | #include <mach/board.h> | 36 | #include <mach/board.h> |
37 | #include <mach/gpio.h> | 37 | #include <mach/gpio.h> |
38 | #include <mach/cpu.h> | ||
38 | 39 | ||
39 | #include "generic.h" | 40 | #include "generic.h" |
40 | 41 | ||
41 | 42 | ||
42 | static void __init onearm_map_io(void) | 43 | static void __init onearm_init_early(void) |
43 | { | 44 | { |
45 | /* Set cpu type: PQFP */ | ||
46 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
47 | |||
44 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
45 | at91rm9200_initialize(18432000, AT91RM9200_PQFP); | 49 | at91rm9200_initialize(18432000); |
46 | 50 | ||
47 | /* DBGU on ttyS0. (Rx & Tx only) */ | 51 | /* DBGU on ttyS0. (Rx & Tx only) */ |
48 | at91_register_uart(0, 0, 0); | 52 | at91_register_uart(0, 0, 0); |
@@ -92,9 +96,9 @@ static void __init onearm_board_init(void) | |||
92 | 96 | ||
93 | MACHINE_START(ONEARM, "Ajeco 1ARM single board computer") | 97 | MACHINE_START(ONEARM, "Ajeco 1ARM single board computer") |
94 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 98 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
95 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
96 | .timer = &at91rm9200_timer, | 99 | .timer = &at91rm9200_timer, |
97 | .map_io = onearm_map_io, | 100 | .map_io = at91rm9200_map_io, |
101 | .init_early = onearm_init_early, | ||
98 | .init_irq = onearm_init_irq, | 102 | .init_irq = onearm_init_irq, |
99 | .init_machine = onearm_board_init, | 103 | .init_machine = onearm_board_init, |
100 | MACHINE_END | 104 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index cba7f7771fee..a4924de48c36 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include "generic.h" | 48 | #include "generic.h" |
49 | 49 | ||
50 | 50 | ||
51 | static void __init afeb9260_map_io(void) | 51 | static void __init afeb9260_init_early(void) |
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91sam9260_initialize(18432000); | 54 | at91sam9260_initialize(18432000); |
@@ -218,9 +218,9 @@ static void __init afeb9260_board_init(void) | |||
218 | 218 | ||
219 | MACHINE_START(AFEB9260, "Custom afeb9260 board") | 219 | MACHINE_START(AFEB9260, "Custom afeb9260 board") |
220 | /* Maintainer: Sergey Lapin <slapin@ossfans.org> */ | 220 | /* Maintainer: Sergey Lapin <slapin@ossfans.org> */ |
221 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
222 | .timer = &at91sam926x_timer, | 221 | .timer = &at91sam926x_timer, |
223 | .map_io = afeb9260_map_io, | 222 | .map_io = at91sam9260_map_io, |
223 | .init_early = afeb9260_init_early, | ||
224 | .init_irq = afeb9260_init_irq, | 224 | .init_irq = afeb9260_init_irq, |
225 | .init_machine = afeb9260_board_init, | 225 | .init_machine = afeb9260_board_init, |
226 | MACHINE_END | 226 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-at572d940hf_ek.c b/arch/arm/mach-at91/board-at572d940hf_ek.c deleted file mode 100644 index 3929f1c9e4e5..000000000000 --- a/arch/arm/mach-at91/board-at572d940hf_ek.c +++ /dev/null | |||
@@ -1,326 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/board-at572d940hf_ek.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Atmel Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2005 SAN People | ||
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 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/spi/ds1305.h> | ||
29 | #include <linux/irq.h> | ||
30 | #include <linux/mtd/physmap.h> | ||
31 | |||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/setup.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/irq.h> | ||
36 | |||
37 | #include <asm/mach/arch.h> | ||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/irq.h> | ||
40 | |||
41 | #include <mach/board.h> | ||
42 | #include <mach/gpio.h> | ||
43 | #include <mach/at91sam9_smc.h> | ||
44 | |||
45 | #include "sam9_smc.h" | ||
46 | #include "generic.h" | ||
47 | |||
48 | |||
49 | static void __init eb_map_io(void) | ||
50 | { | ||
51 | /* Initialize processor: 12.500 MHz crystal */ | ||
52 | at572d940hf_initialize(12000000); | ||
53 | |||
54 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
58 | at91_register_uart(AT572D940HF_ID_US0, 1, 0); | ||
59 | |||
60 | /* USART1 on ttyS2. (Rx & Tx only) */ | ||
61 | at91_register_uart(AT572D940HF_ID_US1, 2, 0); | ||
62 | |||
63 | /* USART2 on ttyS3. (Tx & Rx only */ | ||
64 | at91_register_uart(AT572D940HF_ID_US2, 3, 0); | ||
65 | |||
66 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
67 | at91_set_serial_console(0); | ||
68 | } | ||
69 | |||
70 | static void __init eb_init_irq(void) | ||
71 | { | ||
72 | at572d940hf_init_interrupts(NULL); | ||
73 | } | ||
74 | |||
75 | |||
76 | /* | ||
77 | * USB Host Port | ||
78 | */ | ||
79 | static struct at91_usbh_data __initdata eb_usbh_data = { | ||
80 | .ports = 2, | ||
81 | }; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * USB Device Port | ||
86 | */ | ||
87 | static struct at91_udc_data __initdata eb_udc_data = { | ||
88 | .vbus_pin = 0, /* no VBUS detection,UDC always on */ | ||
89 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
90 | }; | ||
91 | |||
92 | |||
93 | /* | ||
94 | * MCI (SD/MMC) | ||
95 | */ | ||
96 | static struct at91_mmc_data __initdata eb_mmc_data = { | ||
97 | .wire4 = 1, | ||
98 | /* .det_pin = ... not connected */ | ||
99 | /* .wp_pin = ... not connected */ | ||
100 | /* .vcc_pin = ... not connected */ | ||
101 | }; | ||
102 | |||
103 | |||
104 | /* | ||
105 | * MACB Ethernet device | ||
106 | */ | ||
107 | static struct at91_eth_data __initdata eb_eth_data = { | ||
108 | .phy_irq_pin = AT91_PIN_PB25, | ||
109 | .is_rmii = 1, | ||
110 | }; | ||
111 | |||
112 | /* | ||
113 | * NOR flash | ||
114 | */ | ||
115 | |||
116 | static struct mtd_partition eb_nor_partitions[] = { | ||
117 | { | ||
118 | .name = "Raw Environment", | ||
119 | .offset = 0, | ||
120 | .size = SZ_4M, | ||
121 | .mask_flags = 0, | ||
122 | }, | ||
123 | { | ||
124 | .name = "OS FS", | ||
125 | .offset = MTDPART_OFS_APPEND, | ||
126 | .size = 3 * SZ_1M, | ||
127 | .mask_flags = 0, | ||
128 | }, | ||
129 | { | ||
130 | .name = "APP FS", | ||
131 | .offset = MTDPART_OFS_APPEND, | ||
132 | .size = MTDPART_SIZ_FULL, | ||
133 | .mask_flags = 0, | ||
134 | }, | ||
135 | }; | ||
136 | |||
137 | static void nor_flash_set_vpp(struct map_info* mi, int i) { | ||
138 | }; | ||
139 | |||
140 | static struct physmap_flash_data nor_flash_data = { | ||
141 | .width = 4, | ||
142 | .parts = eb_nor_partitions, | ||
143 | .nr_parts = ARRAY_SIZE(eb_nor_partitions), | ||
144 | .set_vpp = nor_flash_set_vpp, | ||
145 | }; | ||
146 | |||
147 | static struct resource nor_flash_resources[] = { | ||
148 | { | ||
149 | .start = AT91_CHIPSELECT_0, | ||
150 | .end = AT91_CHIPSELECT_0 + SZ_16M - 1, | ||
151 | .flags = IORESOURCE_MEM, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | static struct platform_device nor_flash = { | ||
156 | .name = "physmap-flash", | ||
157 | .id = 0, | ||
158 | .dev = { | ||
159 | .platform_data = &nor_flash_data, | ||
160 | }, | ||
161 | .resource = nor_flash_resources, | ||
162 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
163 | }; | ||
164 | |||
165 | static struct sam9_smc_config __initdata eb_nor_smc_config = { | ||
166 | .ncs_read_setup = 1, | ||
167 | .nrd_setup = 1, | ||
168 | .ncs_write_setup = 1, | ||
169 | .nwe_setup = 1, | ||
170 | |||
171 | .ncs_read_pulse = 7, | ||
172 | .nrd_pulse = 7, | ||
173 | .ncs_write_pulse = 7, | ||
174 | .nwe_pulse = 7, | ||
175 | |||
176 | .read_cycle = 9, | ||
177 | .write_cycle = 9, | ||
178 | |||
179 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_32, | ||
180 | .tdf_cycles = 1, | ||
181 | }; | ||
182 | |||
183 | static void __init eb_add_device_nor(void) | ||
184 | { | ||
185 | /* configure chip-select 0 (NOR) */ | ||
186 | sam9_smc_configure(0, &eb_nor_smc_config); | ||
187 | platform_device_register(&nor_flash); | ||
188 | } | ||
189 | |||
190 | /* | ||
191 | * NAND flash | ||
192 | */ | ||
193 | static struct mtd_partition __initdata eb_nand_partition[] = { | ||
194 | { | ||
195 | .name = "Partition 1", | ||
196 | .offset = 0, | ||
197 | .size = SZ_16M, | ||
198 | }, | ||
199 | { | ||
200 | .name = "Partition 2", | ||
201 | .offset = MTDPART_OFS_NXTBLK, | ||
202 | .size = MTDPART_SIZ_FULL, | ||
203 | } | ||
204 | }; | ||
205 | |||
206 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
207 | { | ||
208 | *num_partitions = ARRAY_SIZE(eb_nand_partition); | ||
209 | return eb_nand_partition; | ||
210 | } | ||
211 | |||
212 | static struct atmel_nand_data __initdata eb_nand_data = { | ||
213 | .ale = 22, | ||
214 | .cle = 21, | ||
215 | /* .det_pin = ... not connected */ | ||
216 | /* .rdy_pin = AT91_PIN_PC16, */ | ||
217 | .enable_pin = AT91_PIN_PA15, | ||
218 | .partition_info = nand_partitions, | ||
219 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
220 | .bus_width_16 = 1, | ||
221 | #else | ||
222 | .bus_width_16 = 0, | ||
223 | #endif | ||
224 | }; | ||
225 | |||
226 | static struct sam9_smc_config __initdata eb_nand_smc_config = { | ||
227 | .ncs_read_setup = 0, | ||
228 | .nrd_setup = 0, | ||
229 | .ncs_write_setup = 1, | ||
230 | .nwe_setup = 1, | ||
231 | |||
232 | .ncs_read_pulse = 3, | ||
233 | .nrd_pulse = 3, | ||
234 | .ncs_write_pulse = 3, | ||
235 | .nwe_pulse = 3, | ||
236 | |||
237 | .read_cycle = 5, | ||
238 | .write_cycle = 5, | ||
239 | |||
240 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
241 | .tdf_cycles = 12, | ||
242 | }; | ||
243 | |||
244 | static void __init eb_add_device_nand(void) | ||
245 | { | ||
246 | /* setup bus-width (8 or 16) */ | ||
247 | if (eb_nand_data.bus_width_16) | ||
248 | eb_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
249 | else | ||
250 | eb_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
251 | |||
252 | /* configure chip-select 3 (NAND) */ | ||
253 | sam9_smc_configure(3, &eb_nand_smc_config); | ||
254 | |||
255 | at91_add_device_nand(&eb_nand_data); | ||
256 | } | ||
257 | |||
258 | |||
259 | /* | ||
260 | * SPI devices | ||
261 | */ | ||
262 | static struct resource rtc_resources[] = { | ||
263 | [0] = { | ||
264 | .start = AT572D940HF_ID_IRQ1, | ||
265 | .end = AT572D940HF_ID_IRQ1, | ||
266 | .flags = IORESOURCE_IRQ, | ||
267 | }, | ||
268 | }; | ||
269 | |||
270 | static struct ds1305_platform_data ds1306_data = { | ||
271 | .is_ds1306 = true, | ||
272 | .en_1hz = false, | ||
273 | }; | ||
274 | |||
275 | static struct spi_board_info eb_spi_devices[] = { | ||
276 | { /* RTC Dallas DS1306 */ | ||
277 | .modalias = "rtc-ds1305", | ||
278 | .chip_select = 3, | ||
279 | .mode = SPI_CS_HIGH | SPI_CPOL | SPI_CPHA, | ||
280 | .max_speed_hz = 500000, | ||
281 | .bus_num = 0, | ||
282 | .irq = AT572D940HF_ID_IRQ1, | ||
283 | .platform_data = (void *) &ds1306_data, | ||
284 | }, | ||
285 | #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) | ||
286 | { /* Dataflash card */ | ||
287 | .modalias = "mtd_dataflash", | ||
288 | .chip_select = 0, | ||
289 | .max_speed_hz = 15 * 1000 * 1000, | ||
290 | .bus_num = 0, | ||
291 | }, | ||
292 | #endif | ||
293 | }; | ||
294 | |||
295 | static void __init eb_board_init(void) | ||
296 | { | ||
297 | /* Serial */ | ||
298 | at91_add_device_serial(); | ||
299 | /* USB Host */ | ||
300 | at91_add_device_usbh(&eb_usbh_data); | ||
301 | /* USB Device */ | ||
302 | at91_add_device_udc(&eb_udc_data); | ||
303 | /* I2C */ | ||
304 | at91_add_device_i2c(NULL, 0); | ||
305 | /* NOR */ | ||
306 | eb_add_device_nor(); | ||
307 | /* NAND */ | ||
308 | eb_add_device_nand(); | ||
309 | /* SPI */ | ||
310 | at91_add_device_spi(eb_spi_devices, ARRAY_SIZE(eb_spi_devices)); | ||
311 | /* MMC */ | ||
312 | at91_add_device_mmc(0, &eb_mmc_data); | ||
313 | /* Ethernet */ | ||
314 | at91_add_device_eth(&eb_eth_data); | ||
315 | /* mAgic */ | ||
316 | at91_add_device_mAgic(); | ||
317 | } | ||
318 | |||
319 | MACHINE_START(AT572D940HFEB, "Atmel AT91D940HF-EB") | ||
320 | /* Maintainer: Atmel <costa.antonior@gmail.com> */ | ||
321 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
322 | .timer = &at91sam926x_timer, | ||
323 | .map_io = eb_map_io, | ||
324 | .init_irq = eb_init_irq, | ||
325 | .init_machine = eb_board_init, | ||
326 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index b54e3e6fceb6..148fccb9a25a 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include "generic.h" | 45 | #include "generic.h" |
46 | 46 | ||
47 | 47 | ||
48 | static void __init cam60_map_io(void) | 48 | static void __init cam60_init_early(void) |
49 | { | 49 | { |
50 | /* Initialize processor: 10 MHz crystal */ | 50 | /* Initialize processor: 10 MHz crystal */ |
51 | at91sam9260_initialize(10000000); | 51 | at91sam9260_initialize(10000000); |
@@ -198,9 +198,9 @@ static void __init cam60_board_init(void) | |||
198 | 198 | ||
199 | MACHINE_START(CAM60, "KwikByte CAM60") | 199 | MACHINE_START(CAM60, "KwikByte CAM60") |
200 | /* Maintainer: KwikByte */ | 200 | /* Maintainer: KwikByte */ |
201 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
202 | .timer = &at91sam926x_timer, | 201 | .timer = &at91sam926x_timer, |
203 | .map_io = cam60_map_io, | 202 | .map_io = at91sam9260_map_io, |
203 | .init_early = cam60_init_early, | ||
204 | .init_irq = cam60_init_irq, | 204 | .init_irq = cam60_init_irq, |
205 | .init_machine = cam60_board_init, | 205 | .init_machine = cam60_board_init, |
206 | MACHINE_END | 206 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index e7274440ead9..1904fdf87613 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -44,12 +44,13 @@ | |||
44 | #include <mach/gpio.h> | 44 | #include <mach/gpio.h> |
45 | #include <mach/at91cap9_matrix.h> | 45 | #include <mach/at91cap9_matrix.h> |
46 | #include <mach/at91sam9_smc.h> | 46 | #include <mach/at91sam9_smc.h> |
47 | #include <mach/system_rev.h> | ||
47 | 48 | ||
48 | #include "sam9_smc.h" | 49 | #include "sam9_smc.h" |
49 | #include "generic.h" | 50 | #include "generic.h" |
50 | 51 | ||
51 | 52 | ||
52 | static void __init cap9adk_map_io(void) | 53 | static void __init cap9adk_init_early(void) |
53 | { | 54 | { |
54 | /* Initialize processor: 12 MHz crystal */ | 55 | /* Initialize processor: 12 MHz crystal */ |
55 | at91cap9_initialize(12000000); | 56 | at91cap9_initialize(12000000); |
@@ -187,11 +188,6 @@ static struct atmel_nand_data __initdata cap9adk_nand_data = { | |||
187 | // .rdy_pin = ... not connected | 188 | // .rdy_pin = ... not connected |
188 | .enable_pin = AT91_PIN_PD15, | 189 | .enable_pin = AT91_PIN_PD15, |
189 | .partition_info = nand_partitions, | 190 | .partition_info = nand_partitions, |
190 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
191 | .bus_width_16 = 1, | ||
192 | #else | ||
193 | .bus_width_16 = 0, | ||
194 | #endif | ||
195 | }; | 191 | }; |
196 | 192 | ||
197 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { | 193 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { |
@@ -219,6 +215,7 @@ static void __init cap9adk_add_device_nand(void) | |||
219 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 215 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
220 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); | 216 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); |
221 | 217 | ||
218 | cap9adk_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
222 | /* setup bus-width (8 or 16) */ | 219 | /* setup bus-width (8 or 16) */ |
223 | if (cap9adk_nand_data.bus_width_16) | 220 | if (cap9adk_nand_data.bus_width_16) |
224 | cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16; | 221 | cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -399,9 +396,9 @@ static void __init cap9adk_board_init(void) | |||
399 | 396 | ||
400 | MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK") | 397 | MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK") |
401 | /* Maintainer: Stelian Pop <stelian.pop@leadtechdesign.com> */ | 398 | /* Maintainer: Stelian Pop <stelian.pop@leadtechdesign.com> */ |
402 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
403 | .timer = &at91sam926x_timer, | 399 | .timer = &at91sam926x_timer, |
404 | .map_io = cap9adk_map_io, | 400 | .map_io = at91cap9_map_io, |
401 | .init_early = cap9adk_init_early, | ||
405 | .init_irq = cap9adk_init_irq, | 402 | .init_irq = cap9adk_init_irq, |
406 | .init_machine = cap9adk_board_init, | 403 | .init_machine = cap9adk_board_init, |
407 | MACHINE_END | 404 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 295e1e77fa60..f36b18687494 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -40,10 +40,10 @@ | |||
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
42 | 42 | ||
43 | static void __init carmeva_map_io(void) | 43 | static void __init carmeva_init_early(void) |
44 | { | 44 | { |
45 | /* Initialize processor: 20.000 MHz crystal */ | 45 | /* Initialize processor: 20.000 MHz crystal */ |
46 | at91rm9200_initialize(20000000, AT91RM9200_BGA); | 46 | at91rm9200_initialize(20000000); |
47 | 47 | ||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | 48 | /* DBGU on ttyS0. (Rx & Tx only) */ |
49 | at91_register_uart(0, 0, 0); | 49 | at91_register_uart(0, 0, 0); |
@@ -162,9 +162,9 @@ static void __init carmeva_board_init(void) | |||
162 | 162 | ||
163 | MACHINE_START(CARMEVA, "Carmeva") | 163 | MACHINE_START(CARMEVA, "Carmeva") |
164 | /* Maintainer: Conitec Datasystems */ | 164 | /* Maintainer: Conitec Datasystems */ |
165 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
166 | .timer = &at91rm9200_timer, | 165 | .timer = &at91rm9200_timer, |
167 | .map_io = carmeva_map_io, | 166 | .map_io = at91rm9200_map_io, |
167 | .init_early = carmeva_init_early, | ||
168 | .init_irq = carmeva_init_irq, | 168 | .init_irq = carmeva_init_irq, |
169 | .init_machine = carmeva_board_init, | 169 | .init_machine = carmeva_board_init, |
170 | MACHINE_END | 170 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index 3838594578f3..980511084fe4 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include "sam9_smc.h" | 47 | #include "sam9_smc.h" |
48 | #include "generic.h" | 48 | #include "generic.h" |
49 | 49 | ||
50 | static void __init cpu9krea_map_io(void) | 50 | static void __init cpu9krea_init_early(void) |
51 | { | 51 | { |
52 | /* Initialize processor: 18.432 MHz crystal */ | 52 | /* Initialize processor: 18.432 MHz crystal */ |
53 | at91sam9260_initialize(18432000); | 53 | at91sam9260_initialize(18432000); |
@@ -375,9 +375,9 @@ MACHINE_START(CPUAT9260, "Eukrea CPU9260") | |||
375 | MACHINE_START(CPUAT9G20, "Eukrea CPU9G20") | 375 | MACHINE_START(CPUAT9G20, "Eukrea CPU9G20") |
376 | #endif | 376 | #endif |
377 | /* Maintainer: Eric Benard - EUKREA Electromatique */ | 377 | /* Maintainer: Eric Benard - EUKREA Electromatique */ |
378 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
379 | .timer = &at91sam926x_timer, | 378 | .timer = &at91sam926x_timer, |
380 | .map_io = cpu9krea_map_io, | 379 | .map_io = at91sam9260_map_io, |
380 | .init_early = cpu9krea_init_early, | ||
381 | .init_irq = cpu9krea_init_irq, | 381 | .init_irq = cpu9krea_init_irq, |
382 | .init_machine = cpu9krea_board_init, | 382 | .init_machine = cpu9krea_board_init, |
383 | MACHINE_END | 383 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index 2f4dd8cdd484..6daabe3907a1 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <mach/board.h> | 38 | #include <mach/board.h> |
39 | #include <mach/gpio.h> | 39 | #include <mach/gpio.h> |
40 | #include <mach/at91rm9200_mc.h> | 40 | #include <mach/at91rm9200_mc.h> |
41 | #include <mach/cpu.h> | ||
41 | 42 | ||
42 | #include "generic.h" | 43 | #include "generic.h" |
43 | 44 | ||
@@ -50,10 +51,13 @@ static struct gpio_led cpuat91_leds[] = { | |||
50 | }, | 51 | }, |
51 | }; | 52 | }; |
52 | 53 | ||
53 | static void __init cpuat91_map_io(void) | 54 | static void __init cpuat91_init_early(void) |
54 | { | 55 | { |
56 | /* Set cpu type: PQFP */ | ||
57 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
58 | |||
55 | /* Initialize processor: 18.432 MHz crystal */ | 59 | /* Initialize processor: 18.432 MHz crystal */ |
56 | at91rm9200_initialize(18432000, AT91RM9200_PQFP); | 60 | at91rm9200_initialize(18432000); |
57 | 61 | ||
58 | /* DBGU on ttyS0. (Rx & Tx only) */ | 62 | /* DBGU on ttyS0. (Rx & Tx only) */ |
59 | at91_register_uart(0, 0, 0); | 63 | at91_register_uart(0, 0, 0); |
@@ -175,9 +179,9 @@ static void __init cpuat91_board_init(void) | |||
175 | 179 | ||
176 | MACHINE_START(CPUAT91, "Eukrea") | 180 | MACHINE_START(CPUAT91, "Eukrea") |
177 | /* Maintainer: Eric Benard - EUKREA Electromatique */ | 181 | /* Maintainer: Eric Benard - EUKREA Electromatique */ |
178 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
179 | .timer = &at91rm9200_timer, | 182 | .timer = &at91rm9200_timer, |
180 | .map_io = cpuat91_map_io, | 183 | .map_io = at91rm9200_map_io, |
184 | .init_early = cpuat91_init_early, | ||
181 | .init_irq = cpuat91_init_irq, | 185 | .init_irq = cpuat91_init_irq, |
182 | .init_machine = cpuat91_board_init, | 186 | .init_machine = cpuat91_board_init, |
183 | MACHINE_END | 187 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 464839dc39bd..d98bcec1dfe0 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -43,10 +43,10 @@ | |||
43 | #include "generic.h" | 43 | #include "generic.h" |
44 | 44 | ||
45 | 45 | ||
46 | static void __init csb337_map_io(void) | 46 | static void __init csb337_init_early(void) |
47 | { | 47 | { |
48 | /* Initialize processor: 3.6864 MHz crystal */ | 48 | /* Initialize processor: 3.6864 MHz crystal */ |
49 | at91rm9200_initialize(3686400, AT91RM9200_BGA); | 49 | at91rm9200_initialize(3686400); |
50 | 50 | ||
51 | /* Setup the LEDs */ | 51 | /* Setup the LEDs */ |
52 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | 52 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); |
@@ -257,9 +257,9 @@ static void __init csb337_board_init(void) | |||
257 | 257 | ||
258 | MACHINE_START(CSB337, "Cogent CSB337") | 258 | MACHINE_START(CSB337, "Cogent CSB337") |
259 | /* Maintainer: Bill Gatliff */ | 259 | /* Maintainer: Bill Gatliff */ |
260 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
261 | .timer = &at91rm9200_timer, | 260 | .timer = &at91rm9200_timer, |
262 | .map_io = csb337_map_io, | 261 | .map_io = at91rm9200_map_io, |
262 | .init_early = csb337_init_early, | ||
263 | .init_irq = csb337_init_irq, | 263 | .init_irq = csb337_init_irq, |
264 | .init_machine = csb337_board_init, | 264 | .init_machine = csb337_board_init, |
265 | MACHINE_END | 265 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index 431688c61412..019aab4e20b0 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -40,10 +40,10 @@ | |||
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
42 | 42 | ||
43 | static void __init csb637_map_io(void) | 43 | static void __init csb637_init_early(void) |
44 | { | 44 | { |
45 | /* Initialize processor: 3.6864 MHz crystal */ | 45 | /* Initialize processor: 3.6864 MHz crystal */ |
46 | at91rm9200_initialize(3686400, AT91RM9200_BGA); | 46 | at91rm9200_initialize(3686400); |
47 | 47 | ||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | 48 | /* DBGU on ttyS0. (Rx & Tx only) */ |
49 | at91_register_uart(0, 0, 0); | 49 | at91_register_uart(0, 0, 0); |
@@ -138,9 +138,9 @@ static void __init csb637_board_init(void) | |||
138 | 138 | ||
139 | MACHINE_START(CSB637, "Cogent CSB637") | 139 | MACHINE_START(CSB637, "Cogent CSB637") |
140 | /* Maintainer: Bill Gatliff */ | 140 | /* Maintainer: Bill Gatliff */ |
141 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
142 | .timer = &at91rm9200_timer, | 141 | .timer = &at91rm9200_timer, |
143 | .map_io = csb637_map_io, | 142 | .map_io = at91rm9200_map_io, |
143 | .init_early = csb637_init_early, | ||
144 | .init_irq = csb637_init_irq, | 144 | .init_irq = csb637_init_irq, |
145 | .init_machine = csb637_board_init, | 145 | .init_machine = csb637_board_init, |
146 | MACHINE_END | 146 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c index d8df59a3426d..d2023f27c652 100644 --- a/arch/arm/mach-at91/board-eb01.c +++ b/arch/arm/mach-at91/board-eb01.c | |||
@@ -35,7 +35,7 @@ static void __init at91eb01_init_irq(void) | |||
35 | at91x40_init_interrupts(NULL); | 35 | at91x40_init_interrupts(NULL); |
36 | } | 36 | } |
37 | 37 | ||
38 | static void __init at91eb01_map_io(void) | 38 | static void __init at91eb01_init_early(void) |
39 | { | 39 | { |
40 | at91x40_initialize(40000000); | 40 | at91x40_initialize(40000000); |
41 | } | 41 | } |
@@ -43,7 +43,7 @@ static void __init at91eb01_map_io(void) | |||
43 | MACHINE_START(AT91EB01, "Atmel AT91 EB01") | 43 | MACHINE_START(AT91EB01, "Atmel AT91 EB01") |
44 | /* Maintainer: Greg Ungerer <gerg@snapgear.com> */ | 44 | /* Maintainer: Greg Ungerer <gerg@snapgear.com> */ |
45 | .timer = &at91x40_timer, | 45 | .timer = &at91x40_timer, |
46 | .init_early = at91eb01_init_early, | ||
46 | .init_irq = at91eb01_init_irq, | 47 | .init_irq = at91eb01_init_irq, |
47 | .map_io = at91eb01_map_io, | ||
48 | MACHINE_END | 48 | MACHINE_END |
49 | 49 | ||
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index 6cf6566ae346..e9484535cbc8 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -40,10 +40,10 @@ | |||
40 | #include "generic.h" | 40 | #include "generic.h" |
41 | 41 | ||
42 | 42 | ||
43 | static void __init eb9200_map_io(void) | 43 | static void __init eb9200_init_early(void) |
44 | { | 44 | { |
45 | /* Initialize processor: 18.432 MHz crystal */ | 45 | /* Initialize processor: 18.432 MHz crystal */ |
46 | at91rm9200_initialize(18432000, AT91RM9200_BGA); | 46 | at91rm9200_initialize(18432000); |
47 | 47 | ||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | 48 | /* DBGU on ttyS0. (Rx & Tx only) */ |
49 | at91_register_uart(0, 0, 0); | 49 | at91_register_uart(0, 0, 0); |
@@ -120,9 +120,9 @@ static void __init eb9200_board_init(void) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | MACHINE_START(ATEB9200, "Embest ATEB9200") | 122 | MACHINE_START(ATEB9200, "Embest ATEB9200") |
123 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
124 | .timer = &at91rm9200_timer, | 123 | .timer = &at91rm9200_timer, |
125 | .map_io = eb9200_map_io, | 124 | .map_io = at91rm9200_map_io, |
125 | .init_early = eb9200_init_early, | ||
126 | .init_irq = eb9200_init_irq, | 126 | .init_irq = eb9200_init_irq, |
127 | .init_machine = eb9200_board_init, | 127 | .init_machine = eb9200_board_init, |
128 | MACHINE_END | 128 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index de2fd04e7c8a..a6f57faa10a7 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -38,14 +38,18 @@ | |||
38 | 38 | ||
39 | #include <mach/board.h> | 39 | #include <mach/board.h> |
40 | #include <mach/gpio.h> | 40 | #include <mach/gpio.h> |
41 | #include <mach/cpu.h> | ||
41 | 42 | ||
42 | #include "generic.h" | 43 | #include "generic.h" |
43 | 44 | ||
44 | 45 | ||
45 | static void __init ecb_at91map_io(void) | 46 | static void __init ecb_at91init_early(void) |
46 | { | 47 | { |
48 | /* Set cpu type: PQFP */ | ||
49 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
50 | |||
47 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
48 | at91rm9200_initialize(18432000, AT91RM9200_PQFP); | 52 | at91rm9200_initialize(18432000); |
49 | 53 | ||
50 | /* Setup the LEDs */ | 54 | /* Setup the LEDs */ |
51 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | 55 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); |
@@ -168,9 +172,9 @@ static void __init ecb_at91board_init(void) | |||
168 | 172 | ||
169 | MACHINE_START(ECBAT91, "emQbit's ECB_AT91") | 173 | MACHINE_START(ECBAT91, "emQbit's ECB_AT91") |
170 | /* Maintainer: emQbit.com */ | 174 | /* Maintainer: emQbit.com */ |
171 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
172 | .timer = &at91rm9200_timer, | 175 | .timer = &at91rm9200_timer, |
173 | .map_io = ecb_at91map_io, | 176 | .map_io = at91rm9200_map_io, |
177 | .init_early = ecb_at91init_early, | ||
174 | .init_irq = ecb_at91init_irq, | 178 | .init_irq = ecb_at91init_irq, |
175 | .init_machine = ecb_at91board_init, | 179 | .init_machine = ecb_at91board_init, |
176 | MACHINE_END | 180 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c index a158a0ce458f..bfc0062d1483 100644 --- a/arch/arm/mach-at91/board-eco920.c +++ b/arch/arm/mach-at91/board-eco920.c | |||
@@ -26,11 +26,16 @@ | |||
26 | 26 | ||
27 | #include <mach/board.h> | 27 | #include <mach/board.h> |
28 | #include <mach/at91rm9200_mc.h> | 28 | #include <mach/at91rm9200_mc.h> |
29 | #include <mach/cpu.h> | ||
30 | |||
29 | #include "generic.h" | 31 | #include "generic.h" |
30 | 32 | ||
31 | static void __init eco920_map_io(void) | 33 | static void __init eco920_init_early(void) |
32 | { | 34 | { |
33 | at91rm9200_initialize(18432000, AT91RM9200_PQFP); | 35 | /* Set cpu type: PQFP */ |
36 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
37 | |||
38 | at91rm9200_initialize(18432000); | ||
34 | 39 | ||
35 | /* Setup the LEDs */ | 40 | /* Setup the LEDs */ |
36 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | 41 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); |
@@ -86,21 +91,6 @@ static struct platform_device eco920_flash = { | |||
86 | .num_resources = 1, | 91 | .num_resources = 1, |
87 | }; | 92 | }; |
88 | 93 | ||
89 | static struct resource at91_beeper_resources[] = { | ||
90 | [0] = { | ||
91 | .start = AT91RM9200_BASE_TC3, | ||
92 | .end = AT91RM9200_BASE_TC3 + 0x39, | ||
93 | .flags = IORESOURCE_MEM, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct platform_device at91_beeper = { | ||
98 | .name = "at91_beeper", | ||
99 | .id = 0, | ||
100 | .resource = at91_beeper_resources, | ||
101 | .num_resources = ARRAY_SIZE(at91_beeper_resources), | ||
102 | }; | ||
103 | |||
104 | static struct spi_board_info eco920_spi_devices[] = { | 94 | static struct spi_board_info eco920_spi_devices[] = { |
105 | { /* CAN controller */ | 95 | { /* CAN controller */ |
106 | .modalias = "tlv5638", | 96 | .modalias = "tlv5638", |
@@ -139,18 +129,14 @@ static void __init eco920_board_init(void) | |||
139 | AT91_SMC_TDF_(1) /* float time */ | 129 | AT91_SMC_TDF_(1) /* float time */ |
140 | ); | 130 | ); |
141 | 131 | ||
142 | at91_clock_associate("tc3_clk", &at91_beeper.dev, "at91_beeper"); | ||
143 | at91_set_B_periph(AT91_PIN_PB6, 0); | ||
144 | platform_device_register(&at91_beeper); | ||
145 | |||
146 | at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices)); | 132 | at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices)); |
147 | } | 133 | } |
148 | 134 | ||
149 | MACHINE_START(ECO920, "eco920") | 135 | MACHINE_START(ECO920, "eco920") |
150 | /* Maintainer: Sascha Hauer */ | 136 | /* Maintainer: Sascha Hauer */ |
151 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
152 | .timer = &at91rm9200_timer, | 137 | .timer = &at91rm9200_timer, |
153 | .map_io = eco920_map_io, | 138 | .map_io = at91rm9200_map_io, |
139 | .init_early = eco920_init_early, | ||
154 | .init_irq = eco920_init_irq, | 140 | .init_irq = eco920_init_irq, |
155 | .init_machine = eco920_board_init, | 141 | .init_machine = eco920_board_init, |
156 | MACHINE_END | 142 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c index c8a62dc8fa65..466c063b8d21 100644 --- a/arch/arm/mach-at91/board-flexibity.c +++ b/arch/arm/mach-at91/board-flexibity.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #include "generic.h" | 38 | #include "generic.h" |
39 | 39 | ||
40 | static void __init flexibity_map_io(void) | 40 | static void __init flexibity_init_early(void) |
41 | { | 41 | { |
42 | /* Initialize processor: 18.432 MHz crystal */ | 42 | /* Initialize processor: 18.432 MHz crystal */ |
43 | at91sam9260_initialize(18432000); | 43 | at91sam9260_initialize(18432000); |
@@ -154,9 +154,9 @@ static void __init flexibity_board_init(void) | |||
154 | 154 | ||
155 | MACHINE_START(FLEXIBITY, "Flexibity Connect") | 155 | MACHINE_START(FLEXIBITY, "Flexibity Connect") |
156 | /* Maintainer: Maxim Osipov */ | 156 | /* Maintainer: Maxim Osipov */ |
157 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
158 | .timer = &at91sam926x_timer, | 157 | .timer = &at91sam926x_timer, |
159 | .map_io = flexibity_map_io, | 158 | .map_io = at91sam9260_map_io, |
159 | .init_early = flexibity_init_early, | ||
160 | .init_irq = flexibity_init_irq, | 160 | .init_irq = flexibity_init_irq, |
161 | .init_machine = flexibity_board_init, | 161 | .init_machine = flexibity_board_init, |
162 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index dfc7dfe738e4..e2d1dc9eff45 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -57,7 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | 59 | ||
60 | static void __init foxg20_map_io(void) | 60 | static void __init foxg20_init_early(void) |
61 | { | 61 | { |
62 | /* Initialize processor: 18.432 MHz crystal */ | 62 | /* Initialize processor: 18.432 MHz crystal */ |
63 | at91sam9260_initialize(18432000); | 63 | at91sam9260_initialize(18432000); |
@@ -266,9 +266,9 @@ static void __init foxg20_board_init(void) | |||
266 | 266 | ||
267 | MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20") | 267 | MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20") |
268 | /* Maintainer: Sergio Tanzilli */ | 268 | /* Maintainer: Sergio Tanzilli */ |
269 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
270 | .timer = &at91sam926x_timer, | 269 | .timer = &at91sam926x_timer, |
271 | .map_io = foxg20_map_io, | 270 | .map_io = at91sam9260_map_io, |
271 | .init_early = foxg20_init_early, | ||
272 | .init_irq = foxg20_init_irq, | 272 | .init_irq = foxg20_init_irq, |
273 | .init_machine = foxg20_board_init, | 273 | .init_machine = foxg20_board_init, |
274 | MACHINE_END | 274 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c index bc28136ee249..1d4f36b3cb27 100644 --- a/arch/arm/mach-at91/board-gsia18s.c +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -38,9 +38,9 @@ | |||
38 | #include "sam9_smc.h" | 38 | #include "sam9_smc.h" |
39 | #include "generic.h" | 39 | #include "generic.h" |
40 | 40 | ||
41 | static void __init gsia18s_map_io(void) | 41 | static void __init gsia18s_init_early(void) |
42 | { | 42 | { |
43 | stamp9g20_map_io(); | 43 | stamp9g20_init_early(); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | 46 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). |
@@ -576,9 +576,9 @@ static void __init gsia18s_board_init(void) | |||
576 | } | 576 | } |
577 | 577 | ||
578 | MACHINE_START(GSIA18S, "GS_IA18_S") | 578 | MACHINE_START(GSIA18S, "GS_IA18_S") |
579 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
580 | .timer = &at91sam926x_timer, | 579 | .timer = &at91sam926x_timer, |
581 | .map_io = gsia18s_map_io, | 580 | .map_io = at91sam9260_map_io, |
581 | .init_early = gsia18s_init_early, | ||
582 | .init_irq = init_irq, | 582 | .init_irq = init_irq, |
583 | .init_machine = gsia18s_board_init, | 583 | .init_machine = gsia18s_board_init, |
584 | MACHINE_END | 584 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index d2e1f4ec1fcc..9b003ff744ba 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -35,14 +35,18 @@ | |||
35 | 35 | ||
36 | #include <mach/board.h> | 36 | #include <mach/board.h> |
37 | #include <mach/gpio.h> | 37 | #include <mach/gpio.h> |
38 | #include <mach/cpu.h> | ||
38 | 39 | ||
39 | #include "generic.h" | 40 | #include "generic.h" |
40 | 41 | ||
41 | 42 | ||
42 | static void __init kafa_map_io(void) | 43 | static void __init kafa_init_early(void) |
43 | { | 44 | { |
45 | /* Set cpu type: PQFP */ | ||
46 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
47 | |||
44 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
45 | at91rm9200_initialize(18432000, AT91RM9200_PQFP); | 49 | at91rm9200_initialize(18432000); |
46 | 50 | ||
47 | /* Set up the LEDs */ | 51 | /* Set up the LEDs */ |
48 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); | 52 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); |
@@ -94,9 +98,9 @@ static void __init kafa_board_init(void) | |||
94 | 98 | ||
95 | MACHINE_START(KAFA, "Sperry-Sun KAFA") | 99 | MACHINE_START(KAFA, "Sperry-Sun KAFA") |
96 | /* Maintainer: Sergei Sharonov */ | 100 | /* Maintainer: Sergei Sharonov */ |
97 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
98 | .timer = &at91rm9200_timer, | 101 | .timer = &at91rm9200_timer, |
99 | .map_io = kafa_map_io, | 102 | .map_io = at91rm9200_map_io, |
103 | .init_early = kafa_init_early, | ||
100 | .init_irq = kafa_init_irq, | 104 | .init_irq = kafa_init_irq, |
101 | .init_machine = kafa_board_init, | 105 | .init_machine = kafa_board_init, |
102 | MACHINE_END | 106 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index a13d2063faff..a813a74b65f9 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -36,16 +36,19 @@ | |||
36 | 36 | ||
37 | #include <mach/board.h> | 37 | #include <mach/board.h> |
38 | #include <mach/gpio.h> | 38 | #include <mach/gpio.h> |
39 | 39 | #include <mach/cpu.h> | |
40 | #include <mach/at91rm9200_mc.h> | 40 | #include <mach/at91rm9200_mc.h> |
41 | 41 | ||
42 | #include "generic.h" | 42 | #include "generic.h" |
43 | 43 | ||
44 | 44 | ||
45 | static void __init kb9202_map_io(void) | 45 | static void __init kb9202_init_early(void) |
46 | { | 46 | { |
47 | /* Set cpu type: PQFP */ | ||
48 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
49 | |||
47 | /* Initialize processor: 10 MHz crystal */ | 50 | /* Initialize processor: 10 MHz crystal */ |
48 | at91rm9200_initialize(10000000, AT91RM9200_PQFP); | 51 | at91rm9200_initialize(10000000); |
49 | 52 | ||
50 | /* Set up the LEDs */ | 53 | /* Set up the LEDs */ |
51 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | 54 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); |
@@ -136,9 +139,9 @@ static void __init kb9202_board_init(void) | |||
136 | 139 | ||
137 | MACHINE_START(KB9200, "KB920x") | 140 | MACHINE_START(KB9200, "KB920x") |
138 | /* Maintainer: KwikByte, Inc. */ | 141 | /* Maintainer: KwikByte, Inc. */ |
139 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
140 | .timer = &at91rm9200_timer, | 142 | .timer = &at91rm9200_timer, |
141 | .map_io = kb9202_map_io, | 143 | .map_io = at91rm9200_map_io, |
144 | .init_early = kb9202_init_early, | ||
142 | .init_irq = kb9202_init_irq, | 145 | .init_irq = kb9202_init_irq, |
143 | .init_machine = kb9202_board_init, | 146 | .init_machine = kb9202_board_init, |
144 | MACHINE_END | 147 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index fe5f1d47e6e2..961e805db68c 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include "generic.h" | 51 | #include "generic.h" |
52 | 52 | ||
53 | 53 | ||
54 | static void __init neocore926_map_io(void) | 54 | static void __init neocore926_init_early(void) |
55 | { | 55 | { |
56 | /* Initialize processor: 20 MHz crystal */ | 56 | /* Initialize processor: 20 MHz crystal */ |
57 | at91sam9263_initialize(20000000); | 57 | at91sam9263_initialize(20000000); |
@@ -387,9 +387,9 @@ static void __init neocore926_board_init(void) | |||
387 | 387 | ||
388 | MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926") | 388 | MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926") |
389 | /* Maintainer: ADENEO */ | 389 | /* Maintainer: ADENEO */ |
390 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
391 | .timer = &at91sam926x_timer, | 390 | .timer = &at91sam926x_timer, |
392 | .map_io = neocore926_map_io, | 391 | .map_io = at91sam9263_map_io, |
392 | .init_early = neocore926_init_early, | ||
393 | .init_irq = neocore926_init_irq, | 393 | .init_irq = neocore926_init_irq, |
394 | .init_machine = neocore926_board_init, | 394 | .init_machine = neocore926_board_init, |
395 | MACHINE_END | 395 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c index feb65787c30b..21a21af25878 100644 --- a/arch/arm/mach-at91/board-pcontrol-g20.c +++ b/arch/arm/mach-at91/board-pcontrol-g20.c | |||
@@ -37,9 +37,9 @@ | |||
37 | #include "generic.h" | 37 | #include "generic.h" |
38 | 38 | ||
39 | 39 | ||
40 | static void __init pcontrol_g20_map_io(void) | 40 | static void __init pcontrol_g20_init_early(void) |
41 | { | 41 | { |
42 | stamp9g20_map_io(); | 42 | stamp9g20_init_early(); |
43 | 43 | ||
44 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | 44 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ |
45 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | 45 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
@@ -222,9 +222,9 @@ static void __init pcontrol_g20_board_init(void) | |||
222 | 222 | ||
223 | MACHINE_START(PCONTROL_G20, "PControl G20") | 223 | MACHINE_START(PCONTROL_G20, "PControl G20") |
224 | /* Maintainer: pgsellmann@portner-elektronik.at */ | 224 | /* Maintainer: pgsellmann@portner-elektronik.at */ |
225 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
226 | .timer = &at91sam926x_timer, | 225 | .timer = &at91sam926x_timer, |
227 | .map_io = pcontrol_g20_map_io, | 226 | .map_io = at91sam9260_map_io, |
227 | .init_early = pcontrol_g20_init_early, | ||
228 | .init_irq = init_irq, | 228 | .init_irq = init_irq, |
229 | .init_machine = pcontrol_g20_board_init, | 229 | .init_machine = pcontrol_g20_board_init, |
230 | MACHINE_END | 230 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index 55dad3a46547..756cc2a745dd 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -43,10 +43,10 @@ | |||
43 | #include "generic.h" | 43 | #include "generic.h" |
44 | 44 | ||
45 | 45 | ||
46 | static void __init picotux200_map_io(void) | 46 | static void __init picotux200_init_early(void) |
47 | { | 47 | { |
48 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
49 | at91rm9200_initialize(18432000, AT91RM9200_BGA); | 49 | at91rm9200_initialize(18432000); |
50 | 50 | ||
51 | /* DBGU on ttyS0. (Rx & Tx only) */ | 51 | /* DBGU on ttyS0. (Rx & Tx only) */ |
52 | at91_register_uart(0, 0, 0); | 52 | at91_register_uart(0, 0, 0); |
@@ -123,9 +123,9 @@ static void __init picotux200_board_init(void) | |||
123 | 123 | ||
124 | MACHINE_START(PICOTUX2XX, "picotux 200") | 124 | MACHINE_START(PICOTUX2XX, "picotux 200") |
125 | /* Maintainer: Kleinhenz Elektronik GmbH */ | 125 | /* Maintainer: Kleinhenz Elektronik GmbH */ |
126 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
127 | .timer = &at91rm9200_timer, | 126 | .timer = &at91rm9200_timer, |
128 | .map_io = picotux200_map_io, | 127 | .map_io = at91rm9200_map_io, |
128 | .init_early = picotux200_init_early, | ||
129 | .init_irq = picotux200_init_irq, | 129 | .init_irq = picotux200_init_irq, |
130 | .init_machine = picotux200_board_init, | 130 | .init_machine = picotux200_board_init, |
131 | MACHINE_END | 131 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index 69d15a875b66..d1a6001b0bd8 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include "generic.h" | 48 | #include "generic.h" |
49 | 49 | ||
50 | 50 | ||
51 | static void __init ek_map_io(void) | 51 | static void __init ek_init_early(void) |
52 | { | 52 | { |
53 | /* Initialize processor: 12.000 MHz crystal */ | 53 | /* Initialize processor: 12.000 MHz crystal */ |
54 | at91sam9260_initialize(12000000); | 54 | at91sam9260_initialize(12000000); |
@@ -268,9 +268,9 @@ static void __init ek_board_init(void) | |||
268 | 268 | ||
269 | MACHINE_START(QIL_A9260, "CALAO QIL_A9260") | 269 | MACHINE_START(QIL_A9260, "CALAO QIL_A9260") |
270 | /* Maintainer: calao-systems */ | 270 | /* Maintainer: calao-systems */ |
271 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
272 | .timer = &at91sam926x_timer, | 271 | .timer = &at91sam926x_timer, |
273 | .map_io = ek_map_io, | 272 | .map_io = at91sam9260_map_io, |
273 | .init_early = ek_init_early, | ||
274 | .init_irq = ek_init_irq, | 274 | .init_irq = ek_init_irq, |
275 | .init_machine = ek_board_init, | 275 | .init_machine = ek_board_init, |
276 | MACHINE_END | 276 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 4c1047c8200d..aef9627710b0 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -45,10 +45,10 @@ | |||
45 | #include "generic.h" | 45 | #include "generic.h" |
46 | 46 | ||
47 | 47 | ||
48 | static void __init dk_map_io(void) | 48 | static void __init dk_init_early(void) |
49 | { | 49 | { |
50 | /* Initialize processor: 18.432 MHz crystal */ | 50 | /* Initialize processor: 18.432 MHz crystal */ |
51 | at91rm9200_initialize(18432000, AT91RM9200_BGA); | 51 | at91rm9200_initialize(18432000); |
52 | 52 | ||
53 | /* Setup the LEDs */ | 53 | /* Setup the LEDs */ |
54 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); | 54 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); |
@@ -227,9 +227,9 @@ static void __init dk_board_init(void) | |||
227 | 227 | ||
228 | MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK") | 228 | MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK") |
229 | /* Maintainer: SAN People/Atmel */ | 229 | /* Maintainer: SAN People/Atmel */ |
230 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
231 | .timer = &at91rm9200_timer, | 230 | .timer = &at91rm9200_timer, |
232 | .map_io = dk_map_io, | 231 | .map_io = at91rm9200_map_io, |
232 | .init_early = dk_init_early, | ||
233 | .init_irq = dk_init_irq, | 233 | .init_irq = dk_init_irq, |
234 | .init_machine = dk_board_init, | 234 | .init_machine = dk_board_init, |
235 | MACHINE_END | 235 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index 9df1be8818c0..015a02183080 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -45,10 +45,10 @@ | |||
45 | #include "generic.h" | 45 | #include "generic.h" |
46 | 46 | ||
47 | 47 | ||
48 | static void __init ek_map_io(void) | 48 | static void __init ek_init_early(void) |
49 | { | 49 | { |
50 | /* Initialize processor: 18.432 MHz crystal */ | 50 | /* Initialize processor: 18.432 MHz crystal */ |
51 | at91rm9200_initialize(18432000, AT91RM9200_BGA); | 51 | at91rm9200_initialize(18432000); |
52 | 52 | ||
53 | /* Setup the LEDs */ | 53 | /* Setup the LEDs */ |
54 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); | 54 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); |
@@ -193,9 +193,9 @@ static void __init ek_board_init(void) | |||
193 | 193 | ||
194 | MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK") | 194 | MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK") |
195 | /* Maintainer: SAN People/Atmel */ | 195 | /* Maintainer: SAN People/Atmel */ |
196 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
197 | .timer = &at91rm9200_timer, | 196 | .timer = &at91rm9200_timer, |
198 | .map_io = ek_map_io, | 197 | .map_io = at91rm9200_map_io, |
198 | .init_early = ek_init_early, | ||
199 | .init_irq = ek_init_irq, | 199 | .init_irq = ek_init_irq, |
200 | .init_machine = ek_board_init, | 200 | .init_machine = ek_board_init, |
201 | MACHINE_END | 201 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 25a26beaa728..aaf1bf0989b3 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include "generic.h" | 44 | #include "generic.h" |
45 | 45 | ||
46 | 46 | ||
47 | static void __init ek_map_io(void) | 47 | static void __init ek_init_early(void) |
48 | { | 48 | { |
49 | /* Initialize processor: 18.432 MHz crystal */ | 49 | /* Initialize processor: 18.432 MHz crystal */ |
50 | at91sam9260_initialize(18432000); | 50 | at91sam9260_initialize(18432000); |
@@ -212,9 +212,9 @@ static void __init ek_board_init(void) | |||
212 | 212 | ||
213 | MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260") | 213 | MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260") |
214 | /* Maintainer: Olimex */ | 214 | /* Maintainer: Olimex */ |
215 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
216 | .timer = &at91sam926x_timer, | 215 | .timer = &at91sam926x_timer, |
217 | .map_io = ek_map_io, | 216 | .map_io = at91sam9260_map_io, |
217 | .init_early = ek_init_early, | ||
218 | .init_irq = ek_init_irq, | 218 | .init_irq = ek_init_irq, |
219 | .init_machine = ek_board_init, | 219 | .init_machine = ek_board_init, |
220 | MACHINE_END | 220 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index de1816e0e1d9..d600dc123227 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -44,12 +44,13 @@ | |||
44 | #include <mach/gpio.h> | 44 | #include <mach/gpio.h> |
45 | #include <mach/at91sam9_smc.h> | 45 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/at91_shdwc.h> | 46 | #include <mach/at91_shdwc.h> |
47 | #include <mach/system_rev.h> | ||
47 | 48 | ||
48 | #include "sam9_smc.h" | 49 | #include "sam9_smc.h" |
49 | #include "generic.h" | 50 | #include "generic.h" |
50 | 51 | ||
51 | 52 | ||
52 | static void __init ek_map_io(void) | 53 | static void __init ek_init_early(void) |
53 | { | 54 | { |
54 | /* Initialize processor: 18.432 MHz crystal */ | 55 | /* Initialize processor: 18.432 MHz crystal */ |
55 | at91sam9260_initialize(18432000); | 56 | at91sam9260_initialize(18432000); |
@@ -191,11 +192,6 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
191 | .rdy_pin = AT91_PIN_PC13, | 192 | .rdy_pin = AT91_PIN_PC13, |
192 | .enable_pin = AT91_PIN_PC14, | 193 | .enable_pin = AT91_PIN_PC14, |
193 | .partition_info = nand_partitions, | 194 | .partition_info = nand_partitions, |
194 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
195 | .bus_width_16 = 1, | ||
196 | #else | ||
197 | .bus_width_16 = 0, | ||
198 | #endif | ||
199 | }; | 195 | }; |
200 | 196 | ||
201 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 197 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
@@ -218,6 +214,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { | |||
218 | 214 | ||
219 | static void __init ek_add_device_nand(void) | 215 | static void __init ek_add_device_nand(void) |
220 | { | 216 | { |
217 | ek_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
221 | /* setup bus-width (8 or 16) */ | 218 | /* setup bus-width (8 or 16) */ |
222 | if (ek_nand_data.bus_width_16) | 219 | if (ek_nand_data.bus_width_16) |
223 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | 220 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -356,9 +353,9 @@ static void __init ek_board_init(void) | |||
356 | 353 | ||
357 | MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") | 354 | MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") |
358 | /* Maintainer: Atmel */ | 355 | /* Maintainer: Atmel */ |
359 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
360 | .timer = &at91sam926x_timer, | 356 | .timer = &at91sam926x_timer, |
361 | .map_io = ek_map_io, | 357 | .map_io = at91sam9260_map_io, |
358 | .init_early = ek_init_early, | ||
362 | .init_irq = ek_init_irq, | 359 | .init_irq = ek_init_irq, |
363 | .init_machine = ek_board_init, | 360 | .init_machine = ek_board_init, |
364 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 14acc901e24c..f897f84d43dc 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -48,12 +48,13 @@ | |||
48 | #include <mach/gpio.h> | 48 | #include <mach/gpio.h> |
49 | #include <mach/at91sam9_smc.h> | 49 | #include <mach/at91sam9_smc.h> |
50 | #include <mach/at91_shdwc.h> | 50 | #include <mach/at91_shdwc.h> |
51 | #include <mach/system_rev.h> | ||
51 | 52 | ||
52 | #include "sam9_smc.h" | 53 | #include "sam9_smc.h" |
53 | #include "generic.h" | 54 | #include "generic.h" |
54 | 55 | ||
55 | 56 | ||
56 | static void __init ek_map_io(void) | 57 | static void __init ek_init_early(void) |
57 | { | 58 | { |
58 | /* Initialize processor: 18.432 MHz crystal */ | 59 | /* Initialize processor: 18.432 MHz crystal */ |
59 | at91sam9261_initialize(18432000); | 60 | at91sam9261_initialize(18432000); |
@@ -197,11 +198,6 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
197 | .rdy_pin = AT91_PIN_PC15, | 198 | .rdy_pin = AT91_PIN_PC15, |
198 | .enable_pin = AT91_PIN_PC14, | 199 | .enable_pin = AT91_PIN_PC14, |
199 | .partition_info = nand_partitions, | 200 | .partition_info = nand_partitions, |
200 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
201 | .bus_width_16 = 1, | ||
202 | #else | ||
203 | .bus_width_16 = 0, | ||
204 | #endif | ||
205 | }; | 201 | }; |
206 | 202 | ||
207 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 203 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
@@ -224,6 +220,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { | |||
224 | 220 | ||
225 | static void __init ek_add_device_nand(void) | 221 | static void __init ek_add_device_nand(void) |
226 | { | 222 | { |
223 | ek_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
227 | /* setup bus-width (8 or 16) */ | 224 | /* setup bus-width (8 or 16) */ |
228 | if (ek_nand_data.bus_width_16) | 225 | if (ek_nand_data.bus_width_16) |
229 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | 226 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -623,9 +620,9 @@ MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") | |||
623 | MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK") | 620 | MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK") |
624 | #endif | 621 | #endif |
625 | /* Maintainer: Atmel */ | 622 | /* Maintainer: Atmel */ |
626 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
627 | .timer = &at91sam926x_timer, | 623 | .timer = &at91sam926x_timer, |
628 | .map_io = ek_map_io, | 624 | .map_io = at91sam9261_map_io, |
625 | .init_early = ek_init_early, | ||
629 | .init_irq = ek_init_irq, | 626 | .init_irq = ek_init_irq, |
630 | .init_machine = ek_board_init, | 627 | .init_machine = ek_board_init, |
631 | MACHINE_END | 628 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index bfe490df58be..605b26f40a4c 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -47,12 +47,13 @@ | |||
47 | #include <mach/gpio.h> | 47 | #include <mach/gpio.h> |
48 | #include <mach/at91sam9_smc.h> | 48 | #include <mach/at91sam9_smc.h> |
49 | #include <mach/at91_shdwc.h> | 49 | #include <mach/at91_shdwc.h> |
50 | #include <mach/system_rev.h> | ||
50 | 51 | ||
51 | #include "sam9_smc.h" | 52 | #include "sam9_smc.h" |
52 | #include "generic.h" | 53 | #include "generic.h" |
53 | 54 | ||
54 | 55 | ||
55 | static void __init ek_map_io(void) | 56 | static void __init ek_init_early(void) |
56 | { | 57 | { |
57 | /* Initialize processor: 16.367 MHz crystal */ | 58 | /* Initialize processor: 16.367 MHz crystal */ |
58 | at91sam9263_initialize(16367660); | 59 | at91sam9263_initialize(16367660); |
@@ -198,11 +199,6 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
198 | .rdy_pin = AT91_PIN_PA22, | 199 | .rdy_pin = AT91_PIN_PA22, |
199 | .enable_pin = AT91_PIN_PD15, | 200 | .enable_pin = AT91_PIN_PD15, |
200 | .partition_info = nand_partitions, | 201 | .partition_info = nand_partitions, |
201 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
202 | .bus_width_16 = 1, | ||
203 | #else | ||
204 | .bus_width_16 = 0, | ||
205 | #endif | ||
206 | }; | 202 | }; |
207 | 203 | ||
208 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 204 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
@@ -225,6 +221,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { | |||
225 | 221 | ||
226 | static void __init ek_add_device_nand(void) | 222 | static void __init ek_add_device_nand(void) |
227 | { | 223 | { |
224 | ek_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
228 | /* setup bus-width (8 or 16) */ | 225 | /* setup bus-width (8 or 16) */ |
229 | if (ek_nand_data.bus_width_16) | 226 | if (ek_nand_data.bus_width_16) |
230 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | 227 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -454,9 +451,9 @@ static void __init ek_board_init(void) | |||
454 | 451 | ||
455 | MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") | 452 | MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") |
456 | /* Maintainer: Atmel */ | 453 | /* Maintainer: Atmel */ |
457 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
458 | .timer = &at91sam926x_timer, | 454 | .timer = &at91sam926x_timer, |
459 | .map_io = ek_map_io, | 455 | .map_io = at91sam9263_map_io, |
456 | .init_early = ek_init_early, | ||
460 | .init_irq = ek_init_irq, | 457 | .init_irq = ek_init_irq, |
461 | .init_machine = ek_board_init, | 458 | .init_machine = ek_board_init, |
462 | MACHINE_END | 459 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index ca8198b3c168..7624cf0d006b 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <mach/board.h> | 43 | #include <mach/board.h> |
44 | #include <mach/gpio.h> | 44 | #include <mach/gpio.h> |
45 | #include <mach/at91sam9_smc.h> | 45 | #include <mach/at91sam9_smc.h> |
46 | #include <mach/system_rev.h> | ||
46 | 47 | ||
47 | #include "sam9_smc.h" | 48 | #include "sam9_smc.h" |
48 | #include "generic.h" | 49 | #include "generic.h" |
@@ -60,7 +61,7 @@ static int inline ek_have_2mmc(void) | |||
60 | } | 61 | } |
61 | 62 | ||
62 | 63 | ||
63 | static void __init ek_map_io(void) | 64 | static void __init ek_init_early(void) |
64 | { | 65 | { |
65 | /* Initialize processor: 18.432 MHz crystal */ | 66 | /* Initialize processor: 18.432 MHz crystal */ |
66 | at91sam9260_initialize(18432000); | 67 | at91sam9260_initialize(18432000); |
@@ -175,11 +176,6 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
175 | .rdy_pin = AT91_PIN_PC13, | 176 | .rdy_pin = AT91_PIN_PC13, |
176 | .enable_pin = AT91_PIN_PC14, | 177 | .enable_pin = AT91_PIN_PC14, |
177 | .partition_info = nand_partitions, | 178 | .partition_info = nand_partitions, |
178 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
179 | .bus_width_16 = 1, | ||
180 | #else | ||
181 | .bus_width_16 = 0, | ||
182 | #endif | ||
183 | }; | 179 | }; |
184 | 180 | ||
185 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 181 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
@@ -202,6 +198,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { | |||
202 | 198 | ||
203 | static void __init ek_add_device_nand(void) | 199 | static void __init ek_add_device_nand(void) |
204 | { | 200 | { |
201 | ek_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
205 | /* setup bus-width (8 or 16) */ | 202 | /* setup bus-width (8 or 16) */ |
206 | if (ek_nand_data.bus_width_16) | 203 | if (ek_nand_data.bus_width_16) |
207 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | 204 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -406,18 +403,18 @@ static void __init ek_board_init(void) | |||
406 | 403 | ||
407 | MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") | 404 | MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") |
408 | /* Maintainer: Atmel */ | 405 | /* Maintainer: Atmel */ |
409 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
410 | .timer = &at91sam926x_timer, | 406 | .timer = &at91sam926x_timer, |
411 | .map_io = ek_map_io, | 407 | .map_io = at91sam9260_map_io, |
408 | .init_early = ek_init_early, | ||
412 | .init_irq = ek_init_irq, | 409 | .init_irq = ek_init_irq, |
413 | .init_machine = ek_board_init, | 410 | .init_machine = ek_board_init, |
414 | MACHINE_END | 411 | MACHINE_END |
415 | 412 | ||
416 | MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod") | 413 | MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod") |
417 | /* Maintainer: Atmel */ | 414 | /* Maintainer: Atmel */ |
418 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
419 | .timer = &at91sam926x_timer, | 415 | .timer = &at91sam926x_timer, |
420 | .map_io = ek_map_io, | 416 | .map_io = at91sam9260_map_io, |
417 | .init_early = ek_init_early, | ||
421 | .init_irq = ek_init_irq, | 418 | .init_irq = ek_init_irq, |
422 | .init_machine = ek_board_init, | 419 | .init_machine = ek_board_init, |
423 | MACHINE_END | 420 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 6c999dbd2bcf..063c95d0e8f0 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -41,12 +41,13 @@ | |||
41 | #include <mach/gpio.h> | 41 | #include <mach/gpio.h> |
42 | #include <mach/at91sam9_smc.h> | 42 | #include <mach/at91sam9_smc.h> |
43 | #include <mach/at91_shdwc.h> | 43 | #include <mach/at91_shdwc.h> |
44 | #include <mach/system_rev.h> | ||
44 | 45 | ||
45 | #include "sam9_smc.h" | 46 | #include "sam9_smc.h" |
46 | #include "generic.h" | 47 | #include "generic.h" |
47 | 48 | ||
48 | 49 | ||
49 | static void __init ek_map_io(void) | 50 | static void __init ek_init_early(void) |
50 | { | 51 | { |
51 | /* Initialize processor: 12.000 MHz crystal */ | 52 | /* Initialize processor: 12.000 MHz crystal */ |
52 | at91sam9g45_initialize(12000000); | 53 | at91sam9g45_initialize(12000000); |
@@ -155,11 +156,6 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
155 | .rdy_pin = AT91_PIN_PC8, | 156 | .rdy_pin = AT91_PIN_PC8, |
156 | .enable_pin = AT91_PIN_PC14, | 157 | .enable_pin = AT91_PIN_PC14, |
157 | .partition_info = nand_partitions, | 158 | .partition_info = nand_partitions, |
158 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
159 | .bus_width_16 = 1, | ||
160 | #else | ||
161 | .bus_width_16 = 0, | ||
162 | #endif | ||
163 | }; | 159 | }; |
164 | 160 | ||
165 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 161 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
@@ -182,6 +178,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = { | |||
182 | 178 | ||
183 | static void __init ek_add_device_nand(void) | 179 | static void __init ek_add_device_nand(void) |
184 | { | 180 | { |
181 | ek_nand_data.bus_width_16 = !board_have_nand_8bit(); | ||
185 | /* setup bus-width (8 or 16) */ | 182 | /* setup bus-width (8 or 16) */ |
186 | if (ek_nand_data.bus_width_16) | 183 | if (ek_nand_data.bus_width_16) |
187 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | 184 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; |
@@ -424,9 +421,9 @@ static void __init ek_board_init(void) | |||
424 | 421 | ||
425 | MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK") | 422 | MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK") |
426 | /* Maintainer: Atmel */ | 423 | /* Maintainer: Atmel */ |
427 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
428 | .timer = &at91sam926x_timer, | 424 | .timer = &at91sam926x_timer, |
429 | .map_io = ek_map_io, | 425 | .map_io = at91sam9g45_map_io, |
426 | .init_early = ek_init_early, | ||
430 | .init_irq = ek_init_irq, | 427 | .init_irq = ek_init_irq, |
431 | .init_machine = ek_board_init, | 428 | .init_machine = ek_board_init, |
432 | MACHINE_END | 429 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 3bf3408e94c1..effb399a80a6 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "generic.h" | 38 | #include "generic.h" |
39 | 39 | ||
40 | 40 | ||
41 | static void __init ek_map_io(void) | 41 | static void __init ek_init_early(void) |
42 | { | 42 | { |
43 | /* Initialize processor: 12.000 MHz crystal */ | 43 | /* Initialize processor: 12.000 MHz crystal */ |
44 | at91sam9rl_initialize(12000000); | 44 | at91sam9rl_initialize(12000000); |
@@ -329,9 +329,9 @@ static void __init ek_board_init(void) | |||
329 | 329 | ||
330 | MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK") | 330 | MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK") |
331 | /* Maintainer: Atmel */ | 331 | /* Maintainer: Atmel */ |
332 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
333 | .timer = &at91sam926x_timer, | 332 | .timer = &at91sam926x_timer, |
334 | .map_io = ek_map_io, | 333 | .map_io = at91sam9rl_map_io, |
334 | .init_early = ek_init_early, | ||
335 | .init_irq = ek_init_irq, | 335 | .init_irq = ek_init_irq, |
336 | .init_machine = ek_board_init, | 336 | .init_machine = ek_board_init, |
337 | MACHINE_END | 337 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index 17f7d9b32142..3eb0a1153cc8 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | #define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x)) | 41 | #define SNAPPER9260_IO_EXP_GPIO(x) (NR_BUILTIN_GPIO + (x)) |
42 | 42 | ||
43 | static void __init snapper9260_map_io(void) | 43 | static void __init snapper9260_init_early(void) |
44 | { | 44 | { |
45 | at91sam9260_initialize(18432000); | 45 | at91sam9260_initialize(18432000); |
46 | 46 | ||
@@ -178,9 +178,9 @@ static void __init snapper9260_board_init(void) | |||
178 | } | 178 | } |
179 | 179 | ||
180 | MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module") | 180 | MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module") |
181 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
182 | .timer = &at91sam926x_timer, | 181 | .timer = &at91sam926x_timer, |
183 | .map_io = snapper9260_map_io, | 182 | .map_io = at91sam9260_map_io, |
183 | .init_early = snapper9260_init_early, | ||
184 | .init_irq = snapper9260_init_irq, | 184 | .init_irq = snapper9260_init_irq, |
185 | .init_machine = snapper9260_board_init, | 185 | .init_machine = snapper9260_board_init, |
186 | MACHINE_END | 186 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index f8902b118960..5e5c85688f5f 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "generic.h" | 32 | #include "generic.h" |
33 | 33 | ||
34 | 34 | ||
35 | void __init stamp9g20_map_io(void) | 35 | void __init stamp9g20_init_early(void) |
36 | { | 36 | { |
37 | /* Initialize processor: 18.432 MHz crystal */ | 37 | /* Initialize processor: 18.432 MHz crystal */ |
38 | at91sam9260_initialize(18432000); | 38 | at91sam9260_initialize(18432000); |
@@ -44,9 +44,9 @@ void __init stamp9g20_map_io(void) | |||
44 | at91_set_serial_console(0); | 44 | at91_set_serial_console(0); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void __init stamp9g20evb_map_io(void) | 47 | static void __init stamp9g20evb_init_early(void) |
48 | { | 48 | { |
49 | stamp9g20_map_io(); | 49 | stamp9g20_init_early(); |
50 | 50 | ||
51 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | 51 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ |
52 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | 52 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS |
@@ -54,9 +54,9 @@ static void __init stamp9g20evb_map_io(void) | |||
54 | | ATMEL_UART_DCD | ATMEL_UART_RI); | 54 | | ATMEL_UART_DCD | ATMEL_UART_RI); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void __init portuxg20_map_io(void) | 57 | static void __init portuxg20_init_early(void) |
58 | { | 58 | { |
59 | stamp9g20_map_io(); | 59 | stamp9g20_init_early(); |
60 | 60 | ||
61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | 61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ |
62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | 62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS |
@@ -298,18 +298,18 @@ static void __init stamp9g20evb_board_init(void) | |||
298 | 298 | ||
299 | MACHINE_START(PORTUXG20, "taskit PortuxG20") | 299 | MACHINE_START(PORTUXG20, "taskit PortuxG20") |
300 | /* Maintainer: taskit GmbH */ | 300 | /* Maintainer: taskit GmbH */ |
301 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
302 | .timer = &at91sam926x_timer, | 301 | .timer = &at91sam926x_timer, |
303 | .map_io = portuxg20_map_io, | 302 | .map_io = at91sam9260_map_io, |
303 | .init_early = portuxg20_init_early, | ||
304 | .init_irq = init_irq, | 304 | .init_irq = init_irq, |
305 | .init_machine = portuxg20_board_init, | 305 | .init_machine = portuxg20_board_init, |
306 | MACHINE_END | 306 | MACHINE_END |
307 | 307 | ||
308 | MACHINE_START(STAMP9G20, "taskit Stamp9G20") | 308 | MACHINE_START(STAMP9G20, "taskit Stamp9G20") |
309 | /* Maintainer: taskit GmbH */ | 309 | /* Maintainer: taskit GmbH */ |
310 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
311 | .timer = &at91sam926x_timer, | 310 | .timer = &at91sam926x_timer, |
312 | .map_io = stamp9g20evb_map_io, | 311 | .map_io = at91sam9260_map_io, |
312 | .init_early = stamp9g20evb_init_early, | ||
313 | .init_irq = init_irq, | 313 | .init_irq = init_irq, |
314 | .init_machine = stamp9g20evb_board_init, | 314 | .init_machine = stamp9g20evb_board_init, |
315 | MACHINE_END | 315 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-usb-a9260.c b/arch/arm/mach-at91/board-usb-a9260.c index 07784baeae84..0e784e6fedec 100644 --- a/arch/arm/mach-at91/board-usb-a9260.c +++ b/arch/arm/mach-at91/board-usb-a9260.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include "generic.h" | 48 | #include "generic.h" |
49 | 49 | ||
50 | 50 | ||
51 | static void __init ek_map_io(void) | 51 | static void __init ek_init_early(void) |
52 | { | 52 | { |
53 | /* Initialize processor: 12.000 MHz crystal */ | 53 | /* Initialize processor: 12.000 MHz crystal */ |
54 | at91sam9260_initialize(12000000); | 54 | at91sam9260_initialize(12000000); |
@@ -228,9 +228,9 @@ static void __init ek_board_init(void) | |||
228 | 228 | ||
229 | MACHINE_START(USB_A9260, "CALAO USB_A9260") | 229 | MACHINE_START(USB_A9260, "CALAO USB_A9260") |
230 | /* Maintainer: calao-systems */ | 230 | /* Maintainer: calao-systems */ |
231 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
232 | .timer = &at91sam926x_timer, | 231 | .timer = &at91sam926x_timer, |
233 | .map_io = ek_map_io, | 232 | .map_io = at91sam9260_map_io, |
233 | .init_early = ek_init_early, | ||
234 | .init_irq = ek_init_irq, | 234 | .init_irq = ek_init_irq, |
235 | .init_machine = ek_board_init, | 235 | .init_machine = ek_board_init, |
236 | MACHINE_END | 236 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-usb-a9263.c b/arch/arm/mach-at91/board-usb-a9263.c index b614508931fd..cf626dd14b2c 100644 --- a/arch/arm/mach-at91/board-usb-a9263.c +++ b/arch/arm/mach-at91/board-usb-a9263.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include "generic.h" | 47 | #include "generic.h" |
48 | 48 | ||
49 | 49 | ||
50 | static void __init ek_map_io(void) | 50 | static void __init ek_init_early(void) |
51 | { | 51 | { |
52 | /* Initialize processor: 12.00 MHz crystal */ | 52 | /* Initialize processor: 12.00 MHz crystal */ |
53 | at91sam9263_initialize(12000000); | 53 | at91sam9263_initialize(12000000); |
@@ -244,9 +244,9 @@ static void __init ek_board_init(void) | |||
244 | 244 | ||
245 | MACHINE_START(USB_A9263, "CALAO USB_A9263") | 245 | MACHINE_START(USB_A9263, "CALAO USB_A9263") |
246 | /* Maintainer: calao-systems */ | 246 | /* Maintainer: calao-systems */ |
247 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
248 | .timer = &at91sam926x_timer, | 247 | .timer = &at91sam926x_timer, |
249 | .map_io = ek_map_io, | 248 | .map_io = at91sam9263_map_io, |
249 | .init_early = ek_init_early, | ||
250 | .init_irq = ek_init_irq, | 250 | .init_irq = ek_init_irq, |
251 | .init_machine = ek_board_init, | 251 | .init_machine = ek_board_init, |
252 | MACHINE_END | 252 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index e0f0080eb639..c208cc334d7d 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -45,14 +45,18 @@ | |||
45 | #include <mach/board.h> | 45 | #include <mach/board.h> |
46 | #include <mach/gpio.h> | 46 | #include <mach/gpio.h> |
47 | #include <mach/at91rm9200_mc.h> | 47 | #include <mach/at91rm9200_mc.h> |
48 | #include <mach/cpu.h> | ||
48 | 49 | ||
49 | #include "generic.h" | 50 | #include "generic.h" |
50 | 51 | ||
51 | 52 | ||
52 | static void __init yl9200_map_io(void) | 53 | static void __init yl9200_init_early(void) |
53 | { | 54 | { |
55 | /* Set cpu type: PQFP */ | ||
56 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
57 | |||
54 | /* Initialize processor: 18.432 MHz crystal */ | 58 | /* Initialize processor: 18.432 MHz crystal */ |
55 | at91rm9200_initialize(18432000, AT91RM9200_PQFP); | 59 | at91rm9200_initialize(18432000); |
56 | 60 | ||
57 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ | 61 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ |
58 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); | 62 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); |
@@ -594,9 +598,9 @@ static void __init yl9200_board_init(void) | |||
594 | 598 | ||
595 | MACHINE_START(YL9200, "uCdragon YL-9200") | 599 | MACHINE_START(YL9200, "uCdragon YL-9200") |
596 | /* Maintainer: S.Birtles */ | 600 | /* Maintainer: S.Birtles */ |
597 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
598 | .timer = &at91rm9200_timer, | 601 | .timer = &at91rm9200_timer, |
599 | .map_io = yl9200_map_io, | 602 | .map_io = at91rm9200_map_io, |
603 | .init_early = yl9200_init_early, | ||
600 | .init_irq = yl9200_init_irq, | 604 | .init_irq = yl9200_init_irq, |
601 | .init_machine = yl9200_board_init, | 605 | .init_machine = yl9200_board_init, |
602 | MACHINE_END | 606 | MACHINE_END |
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 9113da6845f1..61873f3aa92d 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -163,7 +163,7 @@ static struct clk udpck = { | |||
163 | .parent = &pllb, | 163 | .parent = &pllb, |
164 | .mode = pmc_sys_mode, | 164 | .mode = pmc_sys_mode, |
165 | }; | 165 | }; |
166 | static struct clk utmi_clk = { | 166 | struct clk utmi_clk = { |
167 | .name = "utmi_clk", | 167 | .name = "utmi_clk", |
168 | .parent = &main_clk, | 168 | .parent = &main_clk, |
169 | .pmc_mask = AT91_PMC_UPLLEN, /* in CKGR_UCKR */ | 169 | .pmc_mask = AT91_PMC_UPLLEN, /* in CKGR_UCKR */ |
@@ -182,7 +182,7 @@ static struct clk uhpck = { | |||
182 | * memory, interfaces to on-chip peripherals, the AIC, and sometimes more | 182 | * memory, interfaces to on-chip peripherals, the AIC, and sometimes more |
183 | * (e.g baud rate generation). It's sourced from one of the primary clocks. | 183 | * (e.g baud rate generation). It's sourced from one of the primary clocks. |
184 | */ | 184 | */ |
185 | static struct clk mck = { | 185 | struct clk mck = { |
186 | .name = "mck", | 186 | .name = "mck", |
187 | .pmc_mask = AT91_PMC_MCKRDY, /* in PMC_SR */ | 187 | .pmc_mask = AT91_PMC_MCKRDY, /* in PMC_SR */ |
188 | }; | 188 | }; |
@@ -215,43 +215,6 @@ static struct clk __init *at91_css_to_clk(unsigned long css) | |||
215 | return NULL; | 215 | return NULL; |
216 | } | 216 | } |
217 | 217 | ||
218 | /* | ||
219 | * Associate a particular clock with a function (eg, "uart") and device. | ||
220 | * The drivers can then request the same 'function' with several different | ||
221 | * devices and not care about which clock name to use. | ||
222 | */ | ||
223 | void __init at91_clock_associate(const char *id, struct device *dev, const char *func) | ||
224 | { | ||
225 | struct clk *clk = clk_get(NULL, id); | ||
226 | |||
227 | if (!dev || !clk || !IS_ERR(clk_get(dev, func))) | ||
228 | return; | ||
229 | |||
230 | clk->function = func; | ||
231 | clk->dev = dev; | ||
232 | } | ||
233 | |||
234 | /* clocks cannot be de-registered no refcounting necessary */ | ||
235 | struct clk *clk_get(struct device *dev, const char *id) | ||
236 | { | ||
237 | struct clk *clk; | ||
238 | |||
239 | list_for_each_entry(clk, &clocks, node) { | ||
240 | if (strcmp(id, clk->name) == 0) | ||
241 | return clk; | ||
242 | if (clk->function && (dev == clk->dev) && strcmp(id, clk->function) == 0) | ||
243 | return clk; | ||
244 | } | ||
245 | |||
246 | return ERR_PTR(-ENOENT); | ||
247 | } | ||
248 | EXPORT_SYMBOL(clk_get); | ||
249 | |||
250 | void clk_put(struct clk *clk) | ||
251 | { | ||
252 | } | ||
253 | EXPORT_SYMBOL(clk_put); | ||
254 | |||
255 | static void __clk_enable(struct clk *clk) | 218 | static void __clk_enable(struct clk *clk) |
256 | { | 219 | { |
257 | if (clk->parent) | 220 | if (clk->parent) |
@@ -498,32 +461,38 @@ postcore_initcall(at91_clk_debugfs_init); | |||
498 | /*------------------------------------------------------------------------*/ | 461 | /*------------------------------------------------------------------------*/ |
499 | 462 | ||
500 | /* Register a new clock */ | 463 | /* Register a new clock */ |
464 | static void __init at91_clk_add(struct clk *clk) | ||
465 | { | ||
466 | list_add_tail(&clk->node, &clocks); | ||
467 | |||
468 | clk->cl.con_id = clk->name; | ||
469 | clk->cl.clk = clk; | ||
470 | clkdev_add(&clk->cl); | ||
471 | } | ||
472 | |||
501 | int __init clk_register(struct clk *clk) | 473 | int __init clk_register(struct clk *clk) |
502 | { | 474 | { |
503 | if (clk_is_peripheral(clk)) { | 475 | if (clk_is_peripheral(clk)) { |
504 | if (!clk->parent) | 476 | if (!clk->parent) |
505 | clk->parent = &mck; | 477 | clk->parent = &mck; |
506 | clk->mode = pmc_periph_mode; | 478 | clk->mode = pmc_periph_mode; |
507 | list_add_tail(&clk->node, &clocks); | ||
508 | } | 479 | } |
509 | else if (clk_is_sys(clk)) { | 480 | else if (clk_is_sys(clk)) { |
510 | clk->parent = &mck; | 481 | clk->parent = &mck; |
511 | clk->mode = pmc_sys_mode; | 482 | clk->mode = pmc_sys_mode; |
512 | |||
513 | list_add_tail(&clk->node, &clocks); | ||
514 | } | 483 | } |
515 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS | 484 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS |
516 | else if (clk_is_programmable(clk)) { | 485 | else if (clk_is_programmable(clk)) { |
517 | clk->mode = pmc_sys_mode; | 486 | clk->mode = pmc_sys_mode; |
518 | init_programmable_clock(clk); | 487 | init_programmable_clock(clk); |
519 | list_add_tail(&clk->node, &clocks); | ||
520 | } | 488 | } |
521 | #endif | 489 | #endif |
522 | 490 | ||
491 | at91_clk_add(clk); | ||
492 | |||
523 | return 0; | 493 | return 0; |
524 | } | 494 | } |
525 | 495 | ||
526 | |||
527 | /*------------------------------------------------------------------------*/ | 496 | /*------------------------------------------------------------------------*/ |
528 | 497 | ||
529 | static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg) | 498 | static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg) |
@@ -630,7 +599,7 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) | |||
630 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); | 599 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); |
631 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || | 600 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || |
632 | cpu_is_at91sam9263() || cpu_is_at91sam9g20() || | 601 | cpu_is_at91sam9263() || cpu_is_at91sam9g20() || |
633 | cpu_is_at91sam9g10() || cpu_is_at572d940hf()) { | 602 | cpu_is_at91sam9g10()) { |
634 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | 603 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; |
635 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | 604 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; |
636 | } else if (cpu_is_at91cap9()) { | 605 | } else if (cpu_is_at91cap9()) { |
@@ -754,19 +723,19 @@ int __init at91_clock_init(unsigned long main_clock) | |||
754 | 723 | ||
755 | /* Register the PMC's standard clocks */ | 724 | /* Register the PMC's standard clocks */ |
756 | for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++) | 725 | for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++) |
757 | list_add_tail(&standard_pmc_clocks[i]->node, &clocks); | 726 | at91_clk_add(standard_pmc_clocks[i]); |
758 | 727 | ||
759 | if (cpu_has_pllb()) | 728 | if (cpu_has_pllb()) |
760 | list_add_tail(&pllb.node, &clocks); | 729 | at91_clk_add(&pllb); |
761 | 730 | ||
762 | if (cpu_has_uhp()) | 731 | if (cpu_has_uhp()) |
763 | list_add_tail(&uhpck.node, &clocks); | 732 | at91_clk_add(&uhpck); |
764 | 733 | ||
765 | if (cpu_has_udpfs()) | 734 | if (cpu_has_udpfs()) |
766 | list_add_tail(&udpck.node, &clocks); | 735 | at91_clk_add(&udpck); |
767 | 736 | ||
768 | if (cpu_has_utmi()) | 737 | if (cpu_has_utmi()) |
769 | list_add_tail(&utmi_clk.node, &clocks); | 738 | at91_clk_add(&utmi_clk); |
770 | 739 | ||
771 | /* MCK and CPU clock are "always on" */ | 740 | /* MCK and CPU clock are "always on" */ |
772 | clk_enable(&mck); | 741 | clk_enable(&mck); |
diff --git a/arch/arm/mach-at91/clock.h b/arch/arm/mach-at91/clock.h index 6cf4b78e175d..c2e63e47dcbe 100644 --- a/arch/arm/mach-at91/clock.h +++ b/arch/arm/mach-at91/clock.h | |||
@@ -6,6 +6,8 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/clkdev.h> | ||
10 | |||
9 | #define CLK_TYPE_PRIMARY 0x1 | 11 | #define CLK_TYPE_PRIMARY 0x1 |
10 | #define CLK_TYPE_PLL 0x2 | 12 | #define CLK_TYPE_PLL 0x2 |
11 | #define CLK_TYPE_PROGRAMMABLE 0x4 | 13 | #define CLK_TYPE_PROGRAMMABLE 0x4 |
@@ -16,8 +18,7 @@ | |||
16 | struct clk { | 18 | struct clk { |
17 | struct list_head node; | 19 | struct list_head node; |
18 | const char *name; /* unique clock name */ | 20 | const char *name; /* unique clock name */ |
19 | const char *function; /* function of the clock */ | 21 | struct clk_lookup cl; |
20 | struct device *dev; /* device associated with function */ | ||
21 | unsigned long rate_hz; | 22 | unsigned long rate_hz; |
22 | struct clk *parent; | 23 | struct clk *parent; |
23 | u32 pmc_mask; | 24 | u32 pmc_mask; |
@@ -29,3 +30,18 @@ struct clk { | |||
29 | 30 | ||
30 | 31 | ||
31 | extern int __init clk_register(struct clk *clk); | 32 | extern int __init clk_register(struct clk *clk); |
33 | extern struct clk mck; | ||
34 | extern struct clk utmi_clk; | ||
35 | |||
36 | #define CLKDEV_CON_ID(_id, _clk) \ | ||
37 | { \ | ||
38 | .con_id = _id, \ | ||
39 | .clk = _clk, \ | ||
40 | } | ||
41 | |||
42 | #define CLKDEV_CON_DEV_ID(_con_id, _dev_id, _clk) \ | ||
43 | { \ | ||
44 | .con_id = _con_id, \ | ||
45 | .dev_id = _dev_id, \ | ||
46 | .clk = _clk, \ | ||
47 | } | ||
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 0c66deb2db39..8ff3418f3430 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -8,8 +8,21 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/clkdev.h> | ||
12 | |||
13 | /* Map io */ | ||
14 | extern void __init at91rm9200_map_io(void); | ||
15 | extern void __init at91sam9260_map_io(void); | ||
16 | extern void __init at91sam9261_map_io(void); | ||
17 | extern void __init at91sam9263_map_io(void); | ||
18 | extern void __init at91sam9rl_map_io(void); | ||
19 | extern void __init at91sam9g45_map_io(void); | ||
20 | extern void __init at91x40_map_io(void); | ||
21 | extern void __init at91cap9_map_io(void); | ||
22 | |||
11 | /* Processors */ | 23 | /* Processors */ |
12 | extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks); | 24 | extern void __init at91rm9200_set_type(int type); |
25 | extern void __init at91rm9200_initialize(unsigned long main_clock); | ||
13 | extern void __init at91sam9260_initialize(unsigned long main_clock); | 26 | extern void __init at91sam9260_initialize(unsigned long main_clock); |
14 | extern void __init at91sam9261_initialize(unsigned long main_clock); | 27 | extern void __init at91sam9261_initialize(unsigned long main_clock); |
15 | extern void __init at91sam9263_initialize(unsigned long main_clock); | 28 | extern void __init at91sam9263_initialize(unsigned long main_clock); |
@@ -17,7 +30,6 @@ extern void __init at91sam9rl_initialize(unsigned long main_clock); | |||
17 | extern void __init at91sam9g45_initialize(unsigned long main_clock); | 30 | extern void __init at91sam9g45_initialize(unsigned long main_clock); |
18 | extern void __init at91x40_initialize(unsigned long main_clock); | 31 | extern void __init at91x40_initialize(unsigned long main_clock); |
19 | extern void __init at91cap9_initialize(unsigned long main_clock); | 32 | extern void __init at91cap9_initialize(unsigned long main_clock); |
20 | extern void __init at572d940hf_initialize(unsigned long main_clock); | ||
21 | 33 | ||
22 | /* Interrupts */ | 34 | /* Interrupts */ |
23 | extern void __init at91rm9200_init_interrupts(unsigned int priority[]); | 35 | extern void __init at91rm9200_init_interrupts(unsigned int priority[]); |
@@ -28,7 +40,6 @@ extern void __init at91sam9rl_init_interrupts(unsigned int priority[]); | |||
28 | extern void __init at91sam9g45_init_interrupts(unsigned int priority[]); | 40 | extern void __init at91sam9g45_init_interrupts(unsigned int priority[]); |
29 | extern void __init at91x40_init_interrupts(unsigned int priority[]); | 41 | extern void __init at91x40_init_interrupts(unsigned int priority[]); |
30 | extern void __init at91cap9_init_interrupts(unsigned int priority[]); | 42 | extern void __init at91cap9_init_interrupts(unsigned int priority[]); |
31 | extern void __init at572d940hf_init_interrupts(unsigned int priority[]); | ||
32 | extern void __init at91_aic_init(unsigned int priority[]); | 43 | extern void __init at91_aic_init(unsigned int priority[]); |
33 | 44 | ||
34 | /* Timer */ | 45 | /* Timer */ |
@@ -39,8 +50,19 @@ extern struct sys_timer at91x40_timer; | |||
39 | 50 | ||
40 | /* Clocks */ | 51 | /* Clocks */ |
41 | extern int __init at91_clock_init(unsigned long main_clock); | 52 | extern int __init at91_clock_init(unsigned long main_clock); |
53 | /* | ||
54 | * function to specify the clock of the default console. As we do not | ||
55 | * use the device/driver bus, the dev_name is not intialize. So we need | ||
56 | * to link the clock to a specific con_id only "usart" | ||
57 | */ | ||
58 | extern void __init at91rm9200_set_console_clock(int id); | ||
59 | extern void __init at91sam9260_set_console_clock(int id); | ||
60 | extern void __init at91sam9261_set_console_clock(int id); | ||
61 | extern void __init at91sam9263_set_console_clock(int id); | ||
62 | extern void __init at91sam9rl_set_console_clock(int id); | ||
63 | extern void __init at91sam9g45_set_console_clock(int id); | ||
64 | extern void __init at91cap9_set_console_clock(int id); | ||
42 | struct device; | 65 | struct device; |
43 | extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func); | ||
44 | 66 | ||
45 | /* Power Management */ | 67 | /* Power Management */ |
46 | extern void at91_irq_suspend(void); | 68 | extern void at91_irq_suspend(void); |
diff --git a/arch/arm/mach-at91/include/mach/at572d940hf.h b/arch/arm/mach-at91/include/mach/at572d940hf.h deleted file mode 100644 index be510cfc56be..000000000000 --- a/arch/arm/mach-at91/include/mach/at572d940hf.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | * include/mach/at572d940hf.h | ||
3 | * | ||
4 | * Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2008 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 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef AT572D940HF_H | ||
24 | #define AT572D940HF_H | ||
25 | |||
26 | /* | ||
27 | * Peripheral identifiers/interrupts. | ||
28 | */ | ||
29 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
30 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
31 | #define AT572D940HF_ID_PIOA 2 /* Parallel IO Controller A */ | ||
32 | #define AT572D940HF_ID_PIOB 3 /* Parallel IO Controller B */ | ||
33 | #define AT572D940HF_ID_PIOC 4 /* Parallel IO Controller C */ | ||
34 | #define AT572D940HF_ID_EMAC 5 /* MACB ethernet controller */ | ||
35 | #define AT572D940HF_ID_US0 6 /* USART 0 */ | ||
36 | #define AT572D940HF_ID_US1 7 /* USART 1 */ | ||
37 | #define AT572D940HF_ID_US2 8 /* USART 2 */ | ||
38 | #define AT572D940HF_ID_MCI 9 /* Multimedia Card Interface */ | ||
39 | #define AT572D940HF_ID_UDP 10 /* USB Device Port */ | ||
40 | #define AT572D940HF_ID_TWI0 11 /* Two-Wire Interface 0 */ | ||
41 | #define AT572D940HF_ID_SPI0 12 /* Serial Peripheral Interface 0 */ | ||
42 | #define AT572D940HF_ID_SPI1 13 /* Serial Peripheral Interface 1 */ | ||
43 | #define AT572D940HF_ID_SSC0 14 /* Serial Synchronous Controller 0 */ | ||
44 | #define AT572D940HF_ID_SSC1 15 /* Serial Synchronous Controller 1 */ | ||
45 | #define AT572D940HF_ID_SSC2 16 /* Serial Synchronous Controller 2 */ | ||
46 | #define AT572D940HF_ID_TC0 17 /* Timer Counter 0 */ | ||
47 | #define AT572D940HF_ID_TC1 18 /* Timer Counter 1 */ | ||
48 | #define AT572D940HF_ID_TC2 19 /* Timer Counter 2 */ | ||
49 | #define AT572D940HF_ID_UHP 20 /* USB Host port */ | ||
50 | #define AT572D940HF_ID_SSC3 21 /* Serial Synchronous Controller 3 */ | ||
51 | #define AT572D940HF_ID_TWI1 22 /* Two-Wire Interface 1 */ | ||
52 | #define AT572D940HF_ID_CAN0 23 /* CAN Controller 0 */ | ||
53 | #define AT572D940HF_ID_CAN1 24 /* CAN Controller 1 */ | ||
54 | #define AT572D940HF_ID_MHALT 25 /* mAgicV HALT line */ | ||
55 | #define AT572D940HF_ID_MSIRQ0 26 /* mAgicV SIRQ0 line */ | ||
56 | #define AT572D940HF_ID_MEXC 27 /* mAgicV exception line */ | ||
57 | #define AT572D940HF_ID_MEDMA 28 /* mAgicV end of DMA line */ | ||
58 | #define AT572D940HF_ID_IRQ0 29 /* External Interrupt Source (IRQ0) */ | ||
59 | #define AT572D940HF_ID_IRQ1 30 /* External Interrupt Source (IRQ1) */ | ||
60 | #define AT572D940HF_ID_IRQ2 31 /* External Interrupt Source (IRQ2) */ | ||
61 | |||
62 | |||
63 | /* | ||
64 | * User Peripheral physical base addresses. | ||
65 | */ | ||
66 | #define AT572D940HF_BASE_TCB 0xfffa0000 | ||
67 | #define AT572D940HF_BASE_TC0 0xfffa0000 | ||
68 | #define AT572D940HF_BASE_TC1 0xfffa0040 | ||
69 | #define AT572D940HF_BASE_TC2 0xfffa0080 | ||
70 | #define AT572D940HF_BASE_UDP 0xfffa4000 | ||
71 | #define AT572D940HF_BASE_MCI 0xfffa8000 | ||
72 | #define AT572D940HF_BASE_TWI0 0xfffac000 | ||
73 | #define AT572D940HF_BASE_US0 0xfffb0000 | ||
74 | #define AT572D940HF_BASE_US1 0xfffb4000 | ||
75 | #define AT572D940HF_BASE_US2 0xfffb8000 | ||
76 | #define AT572D940HF_BASE_SSC0 0xfffbc000 | ||
77 | #define AT572D940HF_BASE_SSC1 0xfffc0000 | ||
78 | #define AT572D940HF_BASE_SSC2 0xfffc4000 | ||
79 | #define AT572D940HF_BASE_SPI0 0xfffc8000 | ||
80 | #define AT572D940HF_BASE_SPI1 0xfffcc000 | ||
81 | #define AT572D940HF_BASE_SSC3 0xfffd0000 | ||
82 | #define AT572D940HF_BASE_TWI1 0xfffd4000 | ||
83 | #define AT572D940HF_BASE_EMAC 0xfffd8000 | ||
84 | #define AT572D940HF_BASE_CAN0 0xfffdc000 | ||
85 | #define AT572D940HF_BASE_CAN1 0xfffe0000 | ||
86 | #define AT91_BASE_SYS 0xffffea00 | ||
87 | |||
88 | |||
89 | /* | ||
90 | * System Peripherals (offset from AT91_BASE_SYS) | ||
91 | */ | ||
92 | #define AT91_SDRAMC0 (0xffffea00 - AT91_BASE_SYS) | ||
93 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | ||
94 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | ||
95 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | ||
96 | #define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) | ||
97 | #define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) | ||
98 | #define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) | ||
99 | #define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) | ||
100 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
101 | #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) | ||
102 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) | ||
103 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | ||
104 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | ||
105 | |||
106 | #define AT91_USART0 AT572D940HF_ID_US0 | ||
107 | #define AT91_USART1 AT572D940HF_ID_US1 | ||
108 | #define AT91_USART2 AT572D940HF_ID_US2 | ||
109 | |||
110 | |||
111 | /* | ||
112 | * Internal Memory. | ||
113 | */ | ||
114 | #define AT572D940HF_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | ||
115 | #define AT572D940HF_SRAM_SIZE (48 * SZ_1K) /* Internal SRAM size (48Kb) */ | ||
116 | |||
117 | #define AT572D940HF_ROM_BASE 0x00400000 /* Internal ROM base address */ | ||
118 | #define AT572D940HF_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */ | ||
119 | |||
120 | #define AT572D940HF_UHP_BASE 0x00500000 /* USB Host controller */ | ||
121 | |||
122 | |||
123 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at572d940hf_matrix.h b/arch/arm/mach-at91/include/mach/at572d940hf_matrix.h deleted file mode 100644 index b6751df09488..000000000000 --- a/arch/arm/mach-at91/include/mach/at572d940hf_matrix.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | * include/mach//at572d940hf_matrix.h | ||
3 | * | ||
4 | * Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2008 Atmel | ||
6 | * | ||
7 | * Copyright (C) 2005 SAN People | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef AT572D940HF_MATRIX_H | ||
25 | #define AT572D940HF_MATRIX_H | ||
26 | |||
27 | #define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */ | ||
28 | #define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */ | ||
29 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | ||
30 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | ||
31 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | ||
32 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */ | ||
33 | |||
34 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | ||
35 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | ||
36 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | ||
37 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) | ||
38 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) | ||
39 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) | ||
40 | |||
41 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */ | ||
42 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */ | ||
43 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */ | ||
44 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */ | ||
45 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */ | ||
46 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
47 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
48 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
49 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
50 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
51 | #define AT91_MATRIX_FIXED_DEFMSTR (0x7 << 18) /* Fixed Index of Default Master */ | ||
52 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | ||
53 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | ||
54 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | ||
55 | |||
56 | #define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */ | ||
57 | #define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */ | ||
58 | #define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */ | ||
59 | #define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */ | ||
60 | #define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */ | ||
61 | |||
62 | #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */ | ||
63 | #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */ | ||
64 | #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */ | ||
65 | #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */ | ||
66 | #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */ | ||
67 | #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */ | ||
68 | #define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */ | ||
69 | |||
70 | #define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */ | ||
71 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
72 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
73 | |||
74 | #define AT91_MATRIX_SFR0 (AT91_MATRIX + 0x110) /* Special Function Register 0 */ | ||
75 | #define AT91_MATRIX_SFR1 (AT91_MATRIX + 0x114) /* Special Function Register 1 */ | ||
76 | #define AT91_MATRIX_SFR2 (AT91_MATRIX + 0x118) /* Special Function Register 2 */ | ||
77 | #define AT91_MATRIX_SFR3 (AT91_MATRIX + 0x11C) /* Special Function Register 3 */ | ||
78 | #define AT91_MATRIX_SFR4 (AT91_MATRIX + 0x120) /* Special Function Register 4 */ | ||
79 | #define AT91_MATRIX_SFR5 (AT91_MATRIX + 0x124) /* Special Function Register 5 */ | ||
80 | #define AT91_MATRIX_SFR6 (AT91_MATRIX + 0x128) /* Special Function Register 6 */ | ||
81 | #define AT91_MATRIX_SFR7 (AT91_MATRIX + 0x12C) /* Special Function Register 7 */ | ||
82 | #define AT91_MATRIX_SFR8 (AT91_MATRIX + 0x130) /* Special Function Register 8 */ | ||
83 | #define AT91_MATRIX_SFR9 (AT91_MATRIX + 0x134) /* Special Function Register 9 */ | ||
84 | #define AT91_MATRIX_SFR10 (AT91_MATRIX + 0x138) /* Special Function Register 10 */ | ||
85 | #define AT91_MATRIX_SFR11 (AT91_MATRIX + 0x13C) /* Special Function Register 11 */ | ||
86 | #define AT91_MATRIX_SFR12 (AT91_MATRIX + 0x140) /* Special Function Register 12 */ | ||
87 | #define AT91_MATRIX_SFR13 (AT91_MATRIX + 0x144) /* Special Function Register 13 */ | ||
88 | #define AT91_MATRIX_SFR14 (AT91_MATRIX + 0x148) /* Special Function Register 14 */ | ||
89 | #define AT91_MATRIX_SFR15 (AT91_MATRIX + 0x14C) /* Special Function Register 15 */ | ||
90 | |||
91 | |||
92 | /* | ||
93 | * The following registers / bits are not defined in the Datasheet (Revision A) | ||
94 | */ | ||
95 | |||
96 | #define AT91_MATRIX_TCR (AT91_MATRIX + 0x100) /* TCM Configuration Register */ | ||
97 | #define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */ | ||
98 | #define AT91_MATRIX_ITCM_0 (0 << 0) | ||
99 | #define AT91_MATRIX_ITCM_16 (5 << 0) | ||
100 | #define AT91_MATRIX_ITCM_32 (6 << 0) | ||
101 | #define AT91_MATRIX_ITCM_64 (7 << 0) | ||
102 | #define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */ | ||
103 | #define AT91_MATRIX_DTCM_0 (0 << 4) | ||
104 | #define AT91_MATRIX_DTCM_16 (5 << 4) | ||
105 | #define AT91_MATRIX_DTCM_32 (6 << 4) | ||
106 | #define AT91_MATRIX_DTCM_64 (7 << 4) | ||
107 | |||
108 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */ | ||
109 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
110 | #define AT91_MATRIX_CS1A_SMC (0 << 1) | ||
111 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) | ||
112 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
113 | #define AT91_MATRIX_CS3A_SMC (0 << 3) | ||
114 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
115 | #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
116 | #define AT91_MATRIX_CS4A_SMC (0 << 4) | ||
117 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) | ||
118 | #define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */ | ||
119 | #define AT91_MATRIX_CS5A_SMC (0 << 5) | ||
120 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) | ||
121 | #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
122 | |||
123 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91cap9.h b/arch/arm/mach-at91/include/mach/at91cap9.h index 9c6af9737485..665993849a7b 100644 --- a/arch/arm/mach-at91/include/mach/at91cap9.h +++ b/arch/arm/mach-at91/include/mach/at91cap9.h | |||
@@ -20,8 +20,6 @@ | |||
20 | /* | 20 | /* |
21 | * Peripheral identifiers/interrupts. | 21 | * Peripheral identifiers/interrupts. |
22 | */ | 22 | */ |
23 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
24 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
25 | #define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */ | 23 | #define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */ |
26 | #define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */ | 24 | #define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */ |
27 | #define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */ | 25 | #define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */ |
@@ -123,6 +121,4 @@ | |||
123 | #define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */ | 121 | #define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */ |
124 | #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ | 122 | #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ |
125 | 123 | ||
126 | #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 | ||
127 | |||
128 | #endif | 124 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h index 78983155a074..99e0f8d02d7b 100644 --- a/arch/arm/mach-at91/include/mach/at91rm9200.h +++ b/arch/arm/mach-at91/include/mach/at91rm9200.h | |||
@@ -19,8 +19,6 @@ | |||
19 | /* | 19 | /* |
20 | * Peripheral identifiers/interrupts. | 20 | * Peripheral identifiers/interrupts. |
21 | */ | 21 | */ |
22 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
23 | #define AT91_ID_SYS 1 /* System Peripheral */ | ||
24 | #define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */ | 22 | #define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */ |
25 | #define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */ | 23 | #define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */ |
26 | #define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */ | 24 | #define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h index 4e79036d3b80..8b6bf835cd73 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9260.h +++ b/arch/arm/mach-at91/include/mach/at91sam9260.h | |||
@@ -20,8 +20,6 @@ | |||
20 | /* | 20 | /* |
21 | * Peripheral identifiers/interrupts. | 21 | * Peripheral identifiers/interrupts. |
22 | */ | 22 | */ |
23 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
24 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
25 | #define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */ | 23 | #define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */ |
26 | #define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */ | 24 | #define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */ |
27 | #define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */ | 25 | #define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h index 2b5618518129..eafbddaf523c 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9261.h +++ b/arch/arm/mach-at91/include/mach/at91sam9261.h | |||
@@ -18,8 +18,6 @@ | |||
18 | /* | 18 | /* |
19 | * Peripheral identifiers/interrupts. | 19 | * Peripheral identifiers/interrupts. |
20 | */ | 20 | */ |
21 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
22 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
23 | #define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */ | 21 | #define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */ |
24 | #define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */ | 22 | #define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */ |
25 | #define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */ | 23 | #define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h index 2091f1e42d43..e2d348213a7b 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9263.h +++ b/arch/arm/mach-at91/include/mach/at91sam9263.h | |||
@@ -18,8 +18,6 @@ | |||
18 | /* | 18 | /* |
19 | * Peripheral identifiers/interrupts. | 19 | * Peripheral identifiers/interrupts. |
20 | */ | 20 | */ |
21 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
22 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
23 | #define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */ | 21 | #define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */ |
24 | #define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */ | 22 | #define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */ |
25 | #define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */ | 23 | #define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h index a526869aee37..659304aa73d9 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9g45.h +++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h | |||
@@ -18,8 +18,6 @@ | |||
18 | /* | 18 | /* |
19 | * Peripheral identifiers/interrupts. | 19 | * Peripheral identifiers/interrupts. |
20 | */ | 20 | */ |
21 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
22 | #define AT91_ID_SYS 1 /* System Controller Interrupt */ | ||
23 | #define AT91SAM9G45_ID_PIOA 2 /* Parallel I/O Controller A */ | 21 | #define AT91SAM9G45_ID_PIOA 2 /* Parallel I/O Controller A */ |
24 | #define AT91SAM9G45_ID_PIOB 3 /* Parallel I/O Controller B */ | 22 | #define AT91SAM9G45_ID_PIOB 3 /* Parallel I/O Controller B */ |
25 | #define AT91SAM9G45_ID_PIOC 4 /* Parallel I/O Controller C */ | 23 | #define AT91SAM9G45_ID_PIOC 4 /* Parallel I/O Controller C */ |
@@ -131,8 +129,6 @@ | |||
131 | #define AT91SAM9G45_EHCI_BASE 0x00800000 /* USB Host controller (EHCI) */ | 129 | #define AT91SAM9G45_EHCI_BASE 0x00800000 /* USB Host controller (EHCI) */ |
132 | #define AT91SAM9G45_VDEC_BASE 0x00900000 /* Video Decoder Controller */ | 130 | #define AT91SAM9G45_VDEC_BASE 0x00900000 /* Video Decoder Controller */ |
133 | 131 | ||
134 | #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 | ||
135 | |||
136 | #define CONSISTENT_DMA_SIZE SZ_4M | 132 | #define CONSISTENT_DMA_SIZE SZ_4M |
137 | 133 | ||
138 | /* | 134 | /* |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h index 87ba8517ad98..41dbbe61055c 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9rl.h +++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h | |||
@@ -17,8 +17,6 @@ | |||
17 | /* | 17 | /* |
18 | * Peripheral identifiers/interrupts. | 18 | * Peripheral identifiers/interrupts. |
19 | */ | 19 | */ |
20 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
21 | #define AT91_ID_SYS 1 /* System Controller */ | ||
22 | #define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */ | 20 | #define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */ |
23 | #define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */ | 21 | #define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */ |
24 | #define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */ | 22 | #define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */ |
diff --git a/arch/arm/mach-at91/include/mach/at91x40.h b/arch/arm/mach-at91/include/mach/at91x40.h index 063ac44a0204..a152ff87e688 100644 --- a/arch/arm/mach-at91/include/mach/at91x40.h +++ b/arch/arm/mach-at91/include/mach/at91x40.h | |||
@@ -15,8 +15,6 @@ | |||
15 | /* | 15 | /* |
16 | * IRQ list. | 16 | * IRQ list. |
17 | */ | 17 | */ |
18 | #define AT91_ID_FIQ 0 /* FIQ */ | ||
19 | #define AT91_ID_SYS 1 /* System Peripheral */ | ||
20 | #define AT91X40_ID_USART0 2 /* USART port 0 */ | 18 | #define AT91X40_ID_USART0 2 /* USART port 0 */ |
21 | #define AT91X40_ID_USART1 3 /* USART port 1 */ | 19 | #define AT91X40_ID_USART1 3 /* USART port 1 */ |
22 | #define AT91X40_ID_TC0 4 /* Timer/Counter 0 */ | 20 | #define AT91X40_ID_TC0 4 /* Timer/Counter 0 */ |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 2b499eb343a1..ed544a0d5a1d 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -90,7 +90,7 @@ struct at91_eth_data { | |||
90 | extern void __init at91_add_device_eth(struct at91_eth_data *data); | 90 | extern void __init at91_add_device_eth(struct at91_eth_data *data); |
91 | 91 | ||
92 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) \ | 92 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) \ |
93 | || defined(CONFIG_ARCH_AT91SAM9G45) || defined(CONFIG_ARCH_AT572D940HF) | 93 | || defined(CONFIG_ARCH_AT91SAM9G45) |
94 | #define eth_platform_data at91_eth_data | 94 | #define eth_platform_data at91_eth_data |
95 | #endif | 95 | #endif |
96 | 96 | ||
@@ -140,6 +140,7 @@ extern void __init at91_set_serial_console(unsigned portnr); | |||
140 | extern struct platform_device *atmel_default_console_device; | 140 | extern struct platform_device *atmel_default_console_device; |
141 | 141 | ||
142 | struct atmel_uart_data { | 142 | struct atmel_uart_data { |
143 | int num; /* port num */ | ||
143 | short use_dma_tx; /* use transmit DMA? */ | 144 | short use_dma_tx; /* use transmit DMA? */ |
144 | short use_dma_rx; /* use receive DMA? */ | 145 | short use_dma_rx; /* use receive DMA? */ |
145 | void __iomem *regs; /* virt. base address, if any */ | 146 | void __iomem *regs; /* virt. base address, if any */ |
@@ -203,9 +204,6 @@ extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); | |||
203 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); | 204 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); |
204 | extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); | 205 | extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); |
205 | 206 | ||
206 | /* AT572D940HF DSP */ | ||
207 | extern void __init at91_add_device_mAgic(void); | ||
208 | |||
209 | /* FIXME: this needs a better location, but gets stuff building again */ | 207 | /* FIXME: this needs a better location, but gets stuff building again */ |
210 | extern int at91_suspend_entering_slow_clock(void); | 208 | extern int at91_suspend_entering_slow_clock(void); |
211 | 209 | ||
diff --git a/arch/arm/mach-at91/include/mach/clkdev.h b/arch/arm/mach-at91/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-at91/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 0700f2125305..df966c2bc2d4 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -34,8 +34,6 @@ | |||
34 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 | 34 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 |
35 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 | 35 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 |
36 | 36 | ||
37 | #define ARCH_ID_AT572D940HF 0x0e0303e0 | ||
38 | |||
39 | #define ARCH_ID_AT91M40800 0x14080044 | 37 | #define ARCH_ID_AT91M40800 0x14080044 |
40 | #define ARCH_ID_AT91R40807 0x44080746 | 38 | #define ARCH_ID_AT91R40807 0x44080746 |
41 | #define ARCH_ID_AT91M40807 0x14080745 | 39 | #define ARCH_ID_AT91M40807 0x14080745 |
@@ -90,9 +88,16 @@ static inline unsigned long at91cap9_rev_identify(void) | |||
90 | #endif | 88 | #endif |
91 | 89 | ||
92 | #ifdef CONFIG_ARCH_AT91RM9200 | 90 | #ifdef CONFIG_ARCH_AT91RM9200 |
91 | extern int rm9200_type; | ||
92 | #define ARCH_REVISON_9200_BGA (0 << 0) | ||
93 | #define ARCH_REVISON_9200_PQFP (1 << 0) | ||
93 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) | 94 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) |
95 | #define cpu_is_at91rm9200_bga() (!cpu_is_at91rm9200_pqfp()) | ||
96 | #define cpu_is_at91rm9200_pqfp() (cpu_is_at91rm9200() && rm9200_type & ARCH_REVISON_9200_PQFP) | ||
94 | #else | 97 | #else |
95 | #define cpu_is_at91rm9200() (0) | 98 | #define cpu_is_at91rm9200() (0) |
99 | #define cpu_is_at91rm9200_bga() (0) | ||
100 | #define cpu_is_at91rm9200_pqfp() (0) | ||
96 | #endif | 101 | #endif |
97 | 102 | ||
98 | #ifdef CONFIG_ARCH_AT91SAM9260 | 103 | #ifdef CONFIG_ARCH_AT91SAM9260 |
@@ -181,12 +186,6 @@ static inline unsigned long at91cap9_rev_identify(void) | |||
181 | #define cpu_is_at91cap9_revC() (0) | 186 | #define cpu_is_at91cap9_revC() (0) |
182 | #endif | 187 | #endif |
183 | 188 | ||
184 | #ifdef CONFIG_ARCH_AT572D940HF | ||
185 | #define cpu_is_at572d940hf() (at91_cpu_identify() == ARCH_ID_AT572D940HF) | ||
186 | #else | ||
187 | #define cpu_is_at572d940hf() (0) | ||
188 | #endif | ||
189 | |||
190 | /* | 189 | /* |
191 | * Since this is ARM, we will never run on any AVR32 CPU. But these | 190 | * Since this is ARM, we will never run on any AVR32 CPU. But these |
192 | * definitions may reduce clutter in common drivers. | 191 | * definitions may reduce clutter in common drivers. |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index 3d64a75e3ed5..1008b9fb5074 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -32,13 +32,17 @@ | |||
32 | #include <mach/at91cap9.h> | 32 | #include <mach/at91cap9.h> |
33 | #elif defined(CONFIG_ARCH_AT91X40) | 33 | #elif defined(CONFIG_ARCH_AT91X40) |
34 | #include <mach/at91x40.h> | 34 | #include <mach/at91x40.h> |
35 | #elif defined(CONFIG_ARCH_AT572D940HF) | ||
36 | #include <mach/at572d940hf.h> | ||
37 | #else | 35 | #else |
38 | #error "Unsupported AT91 processor" | 36 | #error "Unsupported AT91 processor" |
39 | #endif | 37 | #endif |
40 | 38 | ||
41 | 39 | ||
40 | /* | ||
41 | * Peripheral identifiers/interrupts. | ||
42 | */ | ||
43 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
44 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
45 | |||
42 | #ifdef CONFIG_MMU | 46 | #ifdef CONFIG_MMU |
43 | /* | 47 | /* |
44 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF | 48 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF |
@@ -82,13 +86,6 @@ | |||
82 | #define AT91_CHIPSELECT_6 0x70000000 | 86 | #define AT91_CHIPSELECT_6 0x70000000 |
83 | #define AT91_CHIPSELECT_7 0x80000000 | 87 | #define AT91_CHIPSELECT_7 0x80000000 |
84 | 88 | ||
85 | /* SDRAM */ | ||
86 | #ifdef CONFIG_DRAM_BASE | ||
87 | #define AT91_SDRAM_BASE CONFIG_DRAM_BASE | ||
88 | #else | ||
89 | #define AT91_SDRAM_BASE AT91_CHIPSELECT_1 | ||
90 | #endif | ||
91 | |||
92 | /* Clocks */ | 89 | /* Clocks */ |
93 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ | 90 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ |
94 | 91 | ||
diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h index c2cfe5040642..401c207f2f39 100644 --- a/arch/arm/mach-at91/include/mach/memory.h +++ b/arch/arm/mach-at91/include/mach/memory.h | |||
@@ -23,6 +23,4 @@ | |||
23 | 23 | ||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | 25 | ||
26 | #define PLAT_PHYS_OFFSET (AT91_SDRAM_BASE) | ||
27 | |||
28 | #endif | 26 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/stamp9g20.h b/arch/arm/mach-at91/include/mach/stamp9g20.h index 6120f9c46d59..f62c0abca4b4 100644 --- a/arch/arm/mach-at91/include/mach/stamp9g20.h +++ b/arch/arm/mach-at91/include/mach/stamp9g20.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __MACH_STAMP9G20_H | 1 | #ifndef __MACH_STAMP9G20_H |
2 | #define __MACH_STAMP9G20_H | 2 | #define __MACH_STAMP9G20_H |
3 | 3 | ||
4 | void stamp9g20_map_io(void); | 4 | void stamp9g20_init_early(void); |
5 | void stamp9g20_board_init(void); | 5 | void stamp9g20_board_init(void); |
6 | 6 | ||
7 | #endif | 7 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/system_rev.h b/arch/arm/mach-at91/include/mach/system_rev.h new file mode 100644 index 000000000000..b855ee75f72c --- /dev/null +++ b/arch/arm/mach-at91/include/mach/system_rev.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
3 | * | ||
4 | * Under GPLv2 only | ||
5 | */ | ||
6 | |||
7 | #ifndef __ARCH_SYSTEM_REV_H__ | ||
8 | #define __ARCH_SYSTEM_REV_H__ | ||
9 | |||
10 | /* | ||
11 | * board revision encoding | ||
12 | * mach specific | ||
13 | * the 16-31 bit are reserved for at91 generic information | ||
14 | * | ||
15 | * bit 31: | ||
16 | * 0 => nand 16 bit | ||
17 | * 1 => nand 8 bit | ||
18 | */ | ||
19 | #define BOARD_HAVE_NAND_8BIT (1 << 31) | ||
20 | static int inline board_have_nand_8bit(void) | ||
21 | { | ||
22 | return system_rev & BOARD_HAVE_NAND_8BIT; | ||
23 | } | ||
24 | |||
25 | #endif /* __ARCH_SYSTEM_REV_H__ */ | ||
diff --git a/arch/arm/mach-at91/include/mach/timex.h b/arch/arm/mach-at91/include/mach/timex.h index 05a6e8af80c4..31ac2d97f14c 100644 --- a/arch/arm/mach-at91/include/mach/timex.h +++ b/arch/arm/mach-at91/include/mach/timex.h | |||
@@ -82,11 +82,6 @@ | |||
82 | #define AT91X40_MASTER_CLOCK 40000000 | 82 | #define AT91X40_MASTER_CLOCK 40000000 |
83 | #define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK) | 83 | #define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK) |
84 | 84 | ||
85 | #elif defined(CONFIG_ARCH_AT572D940HF) | ||
86 | |||
87 | #define AT572D940HF_MASTER_CLOCK 80000000 | ||
88 | #define CLOCK_TICK_RATE (AT572D940HF_MASTER_CLOCK/16) | ||
89 | |||
90 | #endif | 85 | #endif |
91 | 86 | ||
92 | #endif | 87 | #endif |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index b95b9196deed..133aac405853 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -1055,7 +1055,7 @@ int da850_register_pm(struct platform_device *pdev) | |||
1055 | if (!pdata->cpupll_reg_base) | 1055 | if (!pdata->cpupll_reg_base) |
1056 | return -ENOMEM; | 1056 | return -ENOMEM; |
1057 | 1057 | ||
1058 | pdata->ddrpll_reg_base = ioremap(DA8XX_PLL1_BASE, SZ_4K); | 1058 | pdata->ddrpll_reg_base = ioremap(DA850_PLL1_BASE, SZ_4K); |
1059 | if (!pdata->ddrpll_reg_base) { | 1059 | if (!pdata->ddrpll_reg_base) { |
1060 | ret = -ENOMEM; | 1060 | ret = -ENOMEM; |
1061 | goto no_ddrpll_mem; | 1061 | goto no_ddrpll_mem; |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 58a02dc7b15a..4e66881c7aee 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -24,23 +24,25 @@ | |||
24 | #include "clock.h" | 24 | #include "clock.h" |
25 | 25 | ||
26 | #define DA8XX_TPCC_BASE 0x01c00000 | 26 | #define DA8XX_TPCC_BASE 0x01c00000 |
27 | #define DA850_MMCSD1_BASE 0x01e1b000 | ||
28 | #define DA850_TPCC1_BASE 0x01e30000 | ||
29 | #define DA8XX_TPTC0_BASE 0x01c08000 | 27 | #define DA8XX_TPTC0_BASE 0x01c08000 |
30 | #define DA8XX_TPTC1_BASE 0x01c08400 | 28 | #define DA8XX_TPTC1_BASE 0x01c08400 |
31 | #define DA850_TPTC2_BASE 0x01e38000 | ||
32 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ | 29 | #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ |
33 | #define DA8XX_I2C0_BASE 0x01c22000 | 30 | #define DA8XX_I2C0_BASE 0x01c22000 |
34 | #define DA8XX_RTC_BASE 0x01C23000 | 31 | #define DA8XX_RTC_BASE 0x01c23000 |
32 | #define DA8XX_MMCSD0_BASE 0x01c40000 | ||
33 | #define DA8XX_SPI0_BASE 0x01c41000 | ||
34 | #define DA830_SPI1_BASE 0x01e12000 | ||
35 | #define DA8XX_LCD_CNTRL_BASE 0x01e13000 | ||
36 | #define DA850_MMCSD1_BASE 0x01e1b000 | ||
35 | #define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000 | 37 | #define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000 |
36 | #define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000 | 38 | #define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000 |
37 | #define DA8XX_EMAC_CPGMAC_BASE 0x01e23000 | 39 | #define DA8XX_EMAC_CPGMAC_BASE 0x01e23000 |
38 | #define DA8XX_EMAC_MDIO_BASE 0x01e24000 | 40 | #define DA8XX_EMAC_MDIO_BASE 0x01e24000 |
39 | #define DA8XX_GPIO_BASE 0x01e26000 | ||
40 | #define DA8XX_I2C1_BASE 0x01e28000 | 41 | #define DA8XX_I2C1_BASE 0x01e28000 |
41 | #define DA8XX_SPI0_BASE 0x01c41000 | 42 | #define DA850_TPCC1_BASE 0x01e30000 |
42 | #define DA830_SPI1_BASE 0x01e12000 | 43 | #define DA850_TPTC2_BASE 0x01e38000 |
43 | #define DA850_SPI1_BASE 0x01f0e000 | 44 | #define DA850_SPI1_BASE 0x01f0e000 |
45 | #define DA8XX_DDR2_CTL_BASE 0xb0000000 | ||
44 | 46 | ||
45 | #define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 | 47 | #define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 |
46 | #define DA8XX_EMAC_MOD_REG_OFFSET 0x2000 | 48 | #define DA8XX_EMAC_MOD_REG_OFFSET 0x2000 |
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 22ebc64bc9d9..8f4f736aa267 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -33,6 +33,9 @@ | |||
33 | #define DM365_MMCSD0_BASE 0x01D11000 | 33 | #define DM365_MMCSD0_BASE 0x01D11000 |
34 | #define DM365_MMCSD1_BASE 0x01D00000 | 34 | #define DM365_MMCSD1_BASE 0x01D00000 |
35 | 35 | ||
36 | /* System control register offsets */ | ||
37 | #define DM64XX_VDD3P3V_PWDN 0x48 | ||
38 | |||
36 | static struct resource i2c_resources[] = { | 39 | static struct resource i2c_resources[] = { |
37 | { | 40 | { |
38 | .start = DAVINCI_I2C_BASE, | 41 | .start = DAVINCI_I2C_BASE, |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index e4fc1af8500e..ad64da713fc8 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -64,13 +64,9 @@ extern unsigned int da850_max_speed; | |||
64 | #define DA8XX_TIMER64P1_BASE 0x01c21000 | 64 | #define DA8XX_TIMER64P1_BASE 0x01c21000 |
65 | #define DA8XX_GPIO_BASE 0x01e26000 | 65 | #define DA8XX_GPIO_BASE 0x01e26000 |
66 | #define DA8XX_PSC1_BASE 0x01e27000 | 66 | #define DA8XX_PSC1_BASE 0x01e27000 |
67 | #define DA8XX_LCD_CNTRL_BASE 0x01e13000 | ||
68 | #define DA8XX_PLL1_BASE 0x01e1a000 | ||
69 | #define DA8XX_MMCSD0_BASE 0x01c40000 | ||
70 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | 67 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 |
71 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 | 68 | #define DA8XX_AEMIF_CS3_BASE 0x62000000 |
72 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 | 69 | #define DA8XX_AEMIF_CTL_BASE 0x68000000 |
73 | #define DA8XX_DDR2_CTL_BASE 0xb0000000 | ||
74 | #define DA8XX_ARM_RAM_BASE 0xffff0000 | 70 | #define DA8XX_ARM_RAM_BASE 0xffff0000 |
75 | 71 | ||
76 | void __init da830_init(void); | 72 | void __init da830_init(void); |
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-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 805196207ce8..b92c1e557145 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -169,9 +169,11 @@ config MACH_NURI | |||
169 | select S3C_DEV_HSMMC2 | 169 | select S3C_DEV_HSMMC2 |
170 | select S3C_DEV_HSMMC3 | 170 | select S3C_DEV_HSMMC3 |
171 | select S3C_DEV_I2C1 | 171 | select S3C_DEV_I2C1 |
172 | select S3C_DEV_I2C3 | ||
172 | select S3C_DEV_I2C5 | 173 | select S3C_DEV_I2C5 |
173 | select S5P_DEV_USB_EHCI | 174 | select S5P_DEV_USB_EHCI |
174 | select EXYNOS4_SETUP_I2C1 | 175 | select EXYNOS4_SETUP_I2C1 |
176 | select EXYNOS4_SETUP_I2C3 | ||
175 | select EXYNOS4_SETUP_I2C5 | 177 | select EXYNOS4_SETUP_I2C5 |
176 | select EXYNOS4_SETUP_SDHCI | 178 | select EXYNOS4_SETUP_SDHCI |
177 | select SAMSUNG_DEV_PWM | 179 | select SAMSUNG_DEV_PWM |
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index 777897551e42..683fc387c8af 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile | |||
@@ -16,6 +16,7 @@ obj-$(CONFIG_CPU_EXYNOS4210) += cpu.o init.o clock.o irq-combiner.o | |||
16 | obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o gpiolib.o irq-eint.o dma.o | 16 | obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o gpiolib.o irq-eint.o dma.o |
17 | obj-$(CONFIG_PM) += pm.o sleep.o | 17 | obj-$(CONFIG_PM) += pm.o sleep.o |
18 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o | 18 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o |
19 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | ||
19 | 20 | ||
20 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 21 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
21 | 22 | ||
diff --git a/arch/arm/mach-exynos4/cpuidle.c b/arch/arm/mach-exynos4/cpuidle.c new file mode 100644 index 000000000000..bf7e96f2793a --- /dev/null +++ b/arch/arm/mach-exynos4/cpuidle.c | |||
@@ -0,0 +1,86 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/cpuidle.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/cpuidle.h> | ||
14 | #include <linux/io.h> | ||
15 | |||
16 | #include <asm/proc-fns.h> | ||
17 | |||
18 | static int exynos4_enter_idle(struct cpuidle_device *dev, | ||
19 | struct cpuidle_state *state); | ||
20 | |||
21 | static struct cpuidle_state exynos4_cpuidle_set[] = { | ||
22 | [0] = { | ||
23 | .enter = exynos4_enter_idle, | ||
24 | .exit_latency = 1, | ||
25 | .target_residency = 100000, | ||
26 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
27 | .name = "IDLE", | ||
28 | .desc = "ARM clock gating(WFI)", | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); | ||
33 | |||
34 | static struct cpuidle_driver exynos4_idle_driver = { | ||
35 | .name = "exynos4_idle", | ||
36 | .owner = THIS_MODULE, | ||
37 | }; | ||
38 | |||
39 | static int exynos4_enter_idle(struct cpuidle_device *dev, | ||
40 | struct cpuidle_state *state) | ||
41 | { | ||
42 | struct timeval before, after; | ||
43 | int idle_time; | ||
44 | |||
45 | local_irq_disable(); | ||
46 | do_gettimeofday(&before); | ||
47 | |||
48 | cpu_do_idle(); | ||
49 | |||
50 | do_gettimeofday(&after); | ||
51 | local_irq_enable(); | ||
52 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | ||
53 | (after.tv_usec - before.tv_usec); | ||
54 | |||
55 | return idle_time; | ||
56 | } | ||
57 | |||
58 | static int __init exynos4_init_cpuidle(void) | ||
59 | { | ||
60 | int i, max_cpuidle_state, cpu_id; | ||
61 | struct cpuidle_device *device; | ||
62 | |||
63 | cpuidle_register_driver(&exynos4_idle_driver); | ||
64 | |||
65 | for_each_cpu(cpu_id, cpu_online_mask) { | ||
66 | device = &per_cpu(exynos4_cpuidle_device, cpu_id); | ||
67 | device->cpu = cpu_id; | ||
68 | |||
69 | device->state_count = (sizeof(exynos4_cpuidle_set) / | ||
70 | sizeof(struct cpuidle_state)); | ||
71 | |||
72 | max_cpuidle_state = device->state_count; | ||
73 | |||
74 | for (i = 0; i < max_cpuidle_state; i++) { | ||
75 | memcpy(&device->states[i], &exynos4_cpuidle_set[i], | ||
76 | sizeof(struct cpuidle_state)); | ||
77 | } | ||
78 | |||
79 | if (cpuidle_register_device(device)) { | ||
80 | printk(KERN_ERR "CPUidle register device failed\n,"); | ||
81 | return -EIO; | ||
82 | } | ||
83 | } | ||
84 | return 0; | ||
85 | } | ||
86 | device_initcall(exynos4_init_cpuidle); | ||
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index bb5d12f43af8..642702bb5b12 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/serial_core.h> | 12 | #include <linux/serial_core.h> |
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
15 | #include <linux/i2c/atmel_mxt_ts.h> | ||
15 | #include <linux/gpio_keys.h> | 16 | #include <linux/gpio_keys.h> |
16 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
17 | #include <linux/regulator/machine.h> | 18 | #include <linux/regulator/machine.h> |
@@ -32,6 +33,8 @@ | |||
32 | #include <plat/sdhci.h> | 33 | #include <plat/sdhci.h> |
33 | #include <plat/ehci.h> | 34 | #include <plat/ehci.h> |
34 | #include <plat/clock.h> | 35 | #include <plat/clock.h> |
36 | #include <plat/gpio-cfg.h> | ||
37 | #include <plat/iic.h> | ||
35 | 38 | ||
36 | #include <mach/map.h> | 39 | #include <mach/map.h> |
37 | 40 | ||
@@ -259,6 +262,88 @@ static struct i2c_board_info i2c1_devs[] __initdata = { | |||
259 | /* Gyro, To be updated */ | 262 | /* Gyro, To be updated */ |
260 | }; | 263 | }; |
261 | 264 | ||
265 | /* TSP */ | ||
266 | static u8 mxt_init_vals[] = { | ||
267 | /* MXT_GEN_COMMAND(6) */ | ||
268 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
269 | /* MXT_GEN_POWER(7) */ | ||
270 | 0x20, 0xff, 0x32, | ||
271 | /* MXT_GEN_ACQUIRE(8) */ | ||
272 | 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x23, | ||
273 | /* MXT_TOUCH_MULTI(9) */ | ||
274 | 0x00, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, | ||
275 | 0x00, 0x01, 0x01, 0x0e, 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00, | ||
276 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
277 | 0x00, | ||
278 | /* MXT_TOUCH_KEYARRAY(15) */ | ||
279 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, | ||
280 | 0x00, | ||
281 | /* MXT_SPT_GPIOPWM(19) */ | ||
282 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
283 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
284 | /* MXT_PROCI_GRIPFACE(20) */ | ||
285 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x28, 0x04, | ||
286 | 0x0f, 0x0a, | ||
287 | /* MXT_PROCG_NOISE(22) */ | ||
288 | 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x23, 0x00, | ||
289 | 0x00, 0x05, 0x0f, 0x19, 0x23, 0x2d, 0x03, | ||
290 | /* MXT_TOUCH_PROXIMITY(23) */ | ||
291 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
292 | 0x00, 0x00, 0x00, 0x00, 0x00, | ||
293 | /* MXT_PROCI_ONETOUCH(24) */ | ||
294 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
295 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
296 | /* MXT_SPT_SELFTEST(25) */ | ||
297 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
298 | 0x00, 0x00, 0x00, 0x00, | ||
299 | /* MXT_PROCI_TWOTOUCH(27) */ | ||
300 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
301 | /* MXT_SPT_CTECONFIG(28) */ | ||
302 | 0x00, 0x00, 0x02, 0x08, 0x10, 0x00, | ||
303 | }; | ||
304 | |||
305 | static struct mxt_platform_data mxt_platform_data = { | ||
306 | .config = mxt_init_vals, | ||
307 | .config_length = ARRAY_SIZE(mxt_init_vals), | ||
308 | |||
309 | .x_line = 18, | ||
310 | .y_line = 11, | ||
311 | .x_size = 1024, | ||
312 | .y_size = 600, | ||
313 | .blen = 0x1, | ||
314 | .threshold = 0x28, | ||
315 | .voltage = 2800000, /* 2.8V */ | ||
316 | .orient = MXT_DIAGONAL_COUNTER, | ||
317 | .irqflags = IRQF_TRIGGER_FALLING, | ||
318 | }; | ||
319 | |||
320 | static struct s3c2410_platform_i2c i2c3_data __initdata = { | ||
321 | .flags = 0, | ||
322 | .bus_num = 3, | ||
323 | .slave_addr = 0x10, | ||
324 | .frequency = 400 * 1000, | ||
325 | .sda_delay = 100, | ||
326 | }; | ||
327 | |||
328 | static struct i2c_board_info i2c3_devs[] __initdata = { | ||
329 | { | ||
330 | I2C_BOARD_INFO("atmel_mxt_ts", 0x4a), | ||
331 | .platform_data = &mxt_platform_data, | ||
332 | .irq = IRQ_EINT(4), | ||
333 | }, | ||
334 | }; | ||
335 | |||
336 | static void __init nuri_tsp_init(void) | ||
337 | { | ||
338 | int gpio; | ||
339 | |||
340 | /* TOUCH_INT: XEINT_4 */ | ||
341 | gpio = EXYNOS4_GPX0(4); | ||
342 | gpio_request(gpio, "TOUCH_INT"); | ||
343 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf)); | ||
344 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); | ||
345 | } | ||
346 | |||
262 | /* GPIO I2C 5 (PMIC) */ | 347 | /* GPIO I2C 5 (PMIC) */ |
263 | static struct i2c_board_info i2c5_devs[] __initdata = { | 348 | static struct i2c_board_info i2c5_devs[] __initdata = { |
264 | /* max8997, To be updated */ | 349 | /* max8997, To be updated */ |
@@ -283,6 +368,7 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
283 | &s3c_device_wdt, | 368 | &s3c_device_wdt, |
284 | &s3c_device_timer[0], | 369 | &s3c_device_timer[0], |
285 | &s5p_device_ehci, | 370 | &s5p_device_ehci, |
371 | &s3c_device_i2c3, | ||
286 | 372 | ||
287 | /* NURI Devices */ | 373 | /* NURI Devices */ |
288 | &nuri_gpio_keys, | 374 | &nuri_gpio_keys, |
@@ -300,8 +386,11 @@ static void __init nuri_map_io(void) | |||
300 | static void __init nuri_machine_init(void) | 386 | static void __init nuri_machine_init(void) |
301 | { | 387 | { |
302 | nuri_sdhci_init(); | 388 | nuri_sdhci_init(); |
389 | nuri_tsp_init(); | ||
303 | 390 | ||
304 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); | 391 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); |
392 | s3c_i2c3_set_platdata(&i2c3_data); | ||
393 | i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs)); | ||
305 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); | 394 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); |
306 | 395 | ||
307 | nuri_ehci_init(); | 396 | nuri_ehci_init(); |
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c index 5b84bcd30271..b9913234bbf6 100644 --- a/arch/arm/mach-netx/fb.c +++ b/arch/arm/mach-netx/fb.c | |||
@@ -103,7 +103,6 @@ static struct amba_device fb_device = { | |||
103 | .flags = IORESOURCE_MEM, | 103 | .flags = IORESOURCE_MEM, |
104 | }, | 104 | }, |
105 | .irq = { NETX_IRQ_LCD, NO_IRQ }, | 105 | .irq = { NETX_IRQ_LCD, NO_IRQ }, |
106 | .periphid = 0x10112400, | ||
107 | }; | 106 | }; |
108 | 107 | ||
109 | int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) | 108 | int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) |
diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c index 405e62128917..82db072cb836 100644 --- a/arch/arm/mach-s3c64xx/dev-spi.c +++ b/arch/arm/mach-s3c64xx/dev-spi.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <mach/dma.h> | 17 | #include <mach/dma.h> |
18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
19 | #include <mach/gpio-bank-c.h> | ||
20 | #include <mach/spi-clocks.h> | 19 | #include <mach/spi-clocks.h> |
21 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
22 | 21 | ||
@@ -40,23 +39,15 @@ static char *spi_src_clks[] = { | |||
40 | */ | 39 | */ |
41 | static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) | 40 | static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) |
42 | { | 41 | { |
42 | unsigned int base; | ||
43 | |||
43 | switch (pdev->id) { | 44 | switch (pdev->id) { |
44 | case 0: | 45 | case 0: |
45 | s3c_gpio_cfgpin(S3C64XX_GPC(0), S3C64XX_GPC0_SPI_MISO0); | 46 | base = S3C64XX_GPC(0); |
46 | s3c_gpio_cfgpin(S3C64XX_GPC(1), S3C64XX_GPC1_SPI_CLKO); | ||
47 | s3c_gpio_cfgpin(S3C64XX_GPC(2), S3C64XX_GPC2_SPI_MOSIO); | ||
48 | s3c_gpio_setpull(S3C64XX_GPC(0), S3C_GPIO_PULL_UP); | ||
49 | s3c_gpio_setpull(S3C64XX_GPC(1), S3C_GPIO_PULL_UP); | ||
50 | s3c_gpio_setpull(S3C64XX_GPC(2), S3C_GPIO_PULL_UP); | ||
51 | break; | 47 | break; |
52 | 48 | ||
53 | case 1: | 49 | case 1: |
54 | s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_SPI_MISO1); | 50 | base = S3C64XX_GPC(4); |
55 | s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_SPI_CLK1); | ||
56 | s3c_gpio_cfgpin(S3C64XX_GPC(6), S3C64XX_GPC6_SPI_MOSI1); | ||
57 | s3c_gpio_setpull(S3C64XX_GPC(4), S3C_GPIO_PULL_UP); | ||
58 | s3c_gpio_setpull(S3C64XX_GPC(5), S3C_GPIO_PULL_UP); | ||
59 | s3c_gpio_setpull(S3C64XX_GPC(6), S3C_GPIO_PULL_UP); | ||
60 | break; | 51 | break; |
61 | 52 | ||
62 | default: | 53 | default: |
@@ -64,6 +55,9 @@ static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) | |||
64 | return -EINVAL; | 55 | return -EINVAL; |
65 | } | 56 | } |
66 | 57 | ||
58 | s3c_gpio_cfgall_range(base, 3, | ||
59 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
60 | |||
67 | return 0; | 61 | return 0; |
68 | } | 62 | } |
69 | 63 | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-a.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-a.h deleted file mode 100644 index 34212e1a7e81..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-a.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-a.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank A register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPACON (S3C64XX_GPA_BASE + 0x00) | ||
16 | #define S3C64XX_GPADAT (S3C64XX_GPA_BASE + 0x04) | ||
17 | #define S3C64XX_GPAPUD (S3C64XX_GPA_BASE + 0x08) | ||
18 | #define S3C64XX_GPACONSLP (S3C64XX_GPA_BASE + 0x0c) | ||
19 | #define S3C64XX_GPAPUDSLP (S3C64XX_GPA_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPA_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPA_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPA_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPA0_UART_RXD0 (0x02 << 0) | ||
26 | #define S3C64XX_GPA0_EINT_G1_0 (0x07 << 0) | ||
27 | |||
28 | #define S3C64XX_GPA1_UART_TXD0 (0x02 << 4) | ||
29 | #define S3C64XX_GPA1_EINT_G1_1 (0x07 << 4) | ||
30 | |||
31 | #define S3C64XX_GPA2_UART_nCTS0 (0x02 << 8) | ||
32 | #define S3C64XX_GPA2_EINT_G1_2 (0x07 << 8) | ||
33 | |||
34 | #define S3C64XX_GPA3_UART_nRTS0 (0x02 << 12) | ||
35 | #define S3C64XX_GPA3_EINT_G1_3 (0x07 << 12) | ||
36 | |||
37 | #define S3C64XX_GPA4_UART_RXD1 (0x02 << 16) | ||
38 | #define S3C64XX_GPA4_EINT_G1_4 (0x07 << 16) | ||
39 | |||
40 | #define S3C64XX_GPA5_UART_TXD1 (0x02 << 20) | ||
41 | #define S3C64XX_GPA5_EINT_G1_5 (0x07 << 20) | ||
42 | |||
43 | #define S3C64XX_GPA6_UART_nCTS1 (0x02 << 24) | ||
44 | #define S3C64XX_GPA6_EINT_G1_6 (0x07 << 24) | ||
45 | |||
46 | #define S3C64XX_GPA7_UART_nRTS1 (0x02 << 28) | ||
47 | #define S3C64XX_GPA7_EINT_G1_7 (0x07 << 28) | ||
48 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-b.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-b.h deleted file mode 100644 index 7232c037e642..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-b.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-b.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank B register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPBCON (S3C64XX_GPB_BASE + 0x00) | ||
16 | #define S3C64XX_GPBDAT (S3C64XX_GPB_BASE + 0x04) | ||
17 | #define S3C64XX_GPBPUD (S3C64XX_GPB_BASE + 0x08) | ||
18 | #define S3C64XX_GPBCONSLP (S3C64XX_GPB_BASE + 0x0c) | ||
19 | #define S3C64XX_GPBPUDSLP (S3C64XX_GPB_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPB_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPB_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPB_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPB0_UART_RXD2 (0x02 << 0) | ||
26 | #define S3C64XX_GPB0_EXTDMA_REQ (0x03 << 0) | ||
27 | #define S3C64XX_GPB0_IrDA_RXD (0x04 << 0) | ||
28 | #define S3C64XX_GPB0_ADDR_CF0 (0x05 << 0) | ||
29 | #define S3C64XX_GPB0_EINT_G1_8 (0x07 << 0) | ||
30 | |||
31 | #define S3C64XX_GPB1_UART_TXD2 (0x02 << 4) | ||
32 | #define S3C64XX_GPB1_EXTDMA_ACK (0x03 << 4) | ||
33 | #define S3C64XX_GPB1_IrDA_TXD (0x04 << 4) | ||
34 | #define S3C64XX_GPB1_ADDR_CF1 (0x05 << 4) | ||
35 | #define S3C64XX_GPB1_EINT_G1_9 (0x07 << 4) | ||
36 | |||
37 | #define S3C64XX_GPB2_UART_RXD3 (0x02 << 8) | ||
38 | #define S3C64XX_GPB2_IrDA_RXD (0x03 << 8) | ||
39 | #define S3C64XX_GPB2_EXTDMA_REQ (0x04 << 8) | ||
40 | #define S3C64XX_GPB2_ADDR_CF2 (0x05 << 8) | ||
41 | #define S3C64XX_GPB2_I2C_SCL1 (0x06 << 8) | ||
42 | #define S3C64XX_GPB2_EINT_G1_10 (0x07 << 8) | ||
43 | |||
44 | #define S3C64XX_GPB3_UART_TXD3 (0x02 << 12) | ||
45 | #define S3C64XX_GPB3_IrDA_TXD (0x03 << 12) | ||
46 | #define S3C64XX_GPB3_EXTDMA_ACK (0x04 << 12) | ||
47 | #define S3C64XX_GPB3_I2C_SDA1 (0x06 << 12) | ||
48 | #define S3C64XX_GPB3_EINT_G1_11 (0x07 << 12) | ||
49 | |||
50 | #define S3C64XX_GPB4_IrDA_SDBW (0x02 << 16) | ||
51 | #define S3C64XX_GPB4_CAM_FIELD (0x03 << 16) | ||
52 | #define S3C64XX_GPB4_CF_DATA_DIR (0x04 << 16) | ||
53 | #define S3C64XX_GPB4_EINT_G1_12 (0x07 << 16) | ||
54 | |||
55 | #define S3C64XX_GPB5_I2C_SCL0 (0x02 << 20) | ||
56 | #define S3C64XX_GPB5_EINT_G1_13 (0x07 << 20) | ||
57 | |||
58 | #define S3C64XX_GPB6_I2C_SDA0 (0x02 << 24) | ||
59 | #define S3C64XX_GPB6_EINT_G1_14 (0x07 << 24) | ||
60 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-c.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-c.h deleted file mode 100644 index db189ab1639a..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-c.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-c.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank C register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPCCON (S3C64XX_GPC_BASE + 0x00) | ||
16 | #define S3C64XX_GPCDAT (S3C64XX_GPC_BASE + 0x04) | ||
17 | #define S3C64XX_GPCPUD (S3C64XX_GPC_BASE + 0x08) | ||
18 | #define S3C64XX_GPCCONSLP (S3C64XX_GPC_BASE + 0x0c) | ||
19 | #define S3C64XX_GPCPUDSLP (S3C64XX_GPC_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPC_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPC_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPC_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPC0_SPI_MISO0 (0x02 << 0) | ||
26 | #define S3C64XX_GPC0_EINT_G2_0 (0x07 << 0) | ||
27 | |||
28 | #define S3C64XX_GPC1_SPI_CLKO (0x02 << 4) | ||
29 | #define S3C64XX_GPC1_EINT_G2_1 (0x07 << 4) | ||
30 | |||
31 | #define S3C64XX_GPC2_SPI_MOSIO (0x02 << 8) | ||
32 | #define S3C64XX_GPC2_EINT_G2_2 (0x07 << 8) | ||
33 | |||
34 | #define S3C64XX_GPC3_SPI_nCSO (0x02 << 12) | ||
35 | #define S3C64XX_GPC3_EINT_G2_3 (0x07 << 12) | ||
36 | |||
37 | #define S3C64XX_GPC4_SPI_MISO1 (0x02 << 16) | ||
38 | #define S3C64XX_GPC4_MMC2_CMD (0x03 << 16) | ||
39 | #define S3C64XX_GPC4_I2S_V40_DO0 (0x05 << 16) | ||
40 | #define S3C64XX_GPC4_EINT_G2_4 (0x07 << 16) | ||
41 | |||
42 | #define S3C64XX_GPC5_SPI_CLK1 (0x02 << 20) | ||
43 | #define S3C64XX_GPC5_MMC2_CLK (0x03 << 20) | ||
44 | #define S3C64XX_GPC5_I2S_V40_DO1 (0x05 << 20) | ||
45 | #define S3C64XX_GPC5_EINT_G2_5 (0x07 << 20) | ||
46 | |||
47 | #define S3C64XX_GPC6_SPI_MOSI1 (0x02 << 24) | ||
48 | #define S3C64XX_GPC6_EINT_G2_6 (0x07 << 24) | ||
49 | |||
50 | #define S3C64XX_GPC7_SPI_nCS1 (0x02 << 28) | ||
51 | #define S3C64XX_GPC7_I2S_V40_DO2 (0x05 << 28) | ||
52 | #define S3C64XX_GPC7_EINT_G2_7 (0x07 << 28) | ||
53 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-d.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-d.h deleted file mode 100644 index 1a01cee7aca3..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-d.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-d.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank D register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPDCON (S3C64XX_GPD_BASE + 0x00) | ||
16 | #define S3C64XX_GPDDAT (S3C64XX_GPD_BASE + 0x04) | ||
17 | #define S3C64XX_GPDPUD (S3C64XX_GPD_BASE + 0x08) | ||
18 | #define S3C64XX_GPDCONSLP (S3C64XX_GPD_BASE + 0x0c) | ||
19 | #define S3C64XX_GPDPUDSLP (S3C64XX_GPD_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPD_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPD_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPD_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPD0_PCM0_SCLK (0x02 << 0) | ||
26 | #define S3C64XX_GPD0_I2S0_CLK (0x03 << 0) | ||
27 | #define S3C64XX_GPD0_AC97_BITCLK (0x04 << 0) | ||
28 | #define S3C64XX_GPD0_EINT_G3_0 (0x07 << 0) | ||
29 | |||
30 | #define S3C64XX_GPD1_PCM0_EXTCLK (0x02 << 4) | ||
31 | #define S3C64XX_GPD1_I2S0_CDCLK (0x03 << 4) | ||
32 | #define S3C64XX_GPD1_AC97_nRESET (0x04 << 4) | ||
33 | #define S3C64XX_GPD1_EINT_G3_1 (0x07 << 4) | ||
34 | |||
35 | #define S3C64XX_GPD2_PCM0_FSYNC (0x02 << 8) | ||
36 | #define S3C64XX_GPD2_I2S0_LRCLK (0x03 << 8) | ||
37 | #define S3C64XX_GPD2_AC97_SYNC (0x04 << 8) | ||
38 | #define S3C64XX_GPD2_EINT_G3_2 (0x07 << 8) | ||
39 | |||
40 | #define S3C64XX_GPD3_PCM0_SIN (0x02 << 12) | ||
41 | #define S3C64XX_GPD3_I2S0_DI (0x03 << 12) | ||
42 | #define S3C64XX_GPD3_AC97_SDI (0x04 << 12) | ||
43 | #define S3C64XX_GPD3_EINT_G3_3 (0x07 << 12) | ||
44 | |||
45 | #define S3C64XX_GPD4_PCM0_SOUT (0x02 << 16) | ||
46 | #define S3C64XX_GPD4_I2S0_D0 (0x03 << 16) | ||
47 | #define S3C64XX_GPD4_AC97_SDO (0x04 << 16) | ||
48 | #define S3C64XX_GPD4_EINT_G3_4 (0x07 << 16) | ||
49 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-e.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-e.h deleted file mode 100644 index f057adb627dd..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-e.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-e.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank E register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPECON (S3C64XX_GPE_BASE + 0x00) | ||
16 | #define S3C64XX_GPEDAT (S3C64XX_GPE_BASE + 0x04) | ||
17 | #define S3C64XX_GPEPUD (S3C64XX_GPE_BASE + 0x08) | ||
18 | #define S3C64XX_GPECONSLP (S3C64XX_GPE_BASE + 0x0c) | ||
19 | #define S3C64XX_GPEPUDSLP (S3C64XX_GPE_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPE_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPE_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPE_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPE0_PCM1_SCLK (0x02 << 0) | ||
26 | #define S3C64XX_GPE0_I2S1_CLK (0x03 << 0) | ||
27 | #define S3C64XX_GPE0_AC97_BITCLK (0x04 << 0) | ||
28 | |||
29 | #define S3C64XX_GPE1_PCM1_EXTCLK (0x02 << 4) | ||
30 | #define S3C64XX_GPE1_I2S1_CDCLK (0x03 << 4) | ||
31 | #define S3C64XX_GPE1_AC97_nRESET (0x04 << 4) | ||
32 | |||
33 | #define S3C64XX_GPE2_PCM1_FSYNC (0x02 << 8) | ||
34 | #define S3C64XX_GPE2_I2S1_LRCLK (0x03 << 8) | ||
35 | #define S3C64XX_GPE2_AC97_SYNC (0x04 << 8) | ||
36 | |||
37 | #define S3C64XX_GPE3_PCM1_SIN (0x02 << 12) | ||
38 | #define S3C64XX_GPE3_I2S1_DI (0x03 << 12) | ||
39 | #define S3C64XX_GPE3_AC97_SDI (0x04 << 12) | ||
40 | |||
41 | #define S3C64XX_GPE4_PCM1_SOUT (0x02 << 16) | ||
42 | #define S3C64XX_GPE4_I2S1_D0 (0x03 << 16) | ||
43 | #define S3C64XX_GPE4_AC97_SDO (0x04 << 16) | ||
44 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-f.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-f.h deleted file mode 100644 index 62ab8f5e7835..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-f.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-f.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank F register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPFCON (S3C64XX_GPF_BASE + 0x00) | ||
16 | #define S3C64XX_GPFDAT (S3C64XX_GPF_BASE + 0x04) | ||
17 | #define S3C64XX_GPFPUD (S3C64XX_GPF_BASE + 0x08) | ||
18 | #define S3C64XX_GPFCONSLP (S3C64XX_GPF_BASE + 0x0c) | ||
19 | #define S3C64XX_GPFPUDSLP (S3C64XX_GPF_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPF_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPF_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPF_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPF0_CAMIF_CLK (0x02 << 0) | ||
26 | #define S3C64XX_GPF0_EINT_G4_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPF1_CAMIF_HREF (0x02 << 2) | ||
29 | #define S3C64XX_GPF1_EINT_G4_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPF2_CAMIF_PCLK (0x02 << 4) | ||
32 | #define S3C64XX_GPF2_EINT_G4_2 (0x03 << 4) | ||
33 | |||
34 | #define S3C64XX_GPF3_CAMIF_nRST (0x02 << 6) | ||
35 | #define S3C64XX_GPF3_EINT_G4_3 (0x03 << 6) | ||
36 | |||
37 | #define S3C64XX_GPF4_CAMIF_VSYNC (0x02 << 8) | ||
38 | #define S3C64XX_GPF4_EINT_G4_4 (0x03 << 8) | ||
39 | |||
40 | #define S3C64XX_GPF5_CAMIF_YDATA0 (0x02 << 10) | ||
41 | #define S3C64XX_GPF5_EINT_G4_5 (0x03 << 10) | ||
42 | |||
43 | #define S3C64XX_GPF6_CAMIF_YDATA1 (0x02 << 12) | ||
44 | #define S3C64XX_GPF6_EINT_G4_6 (0x03 << 12) | ||
45 | |||
46 | #define S3C64XX_GPF7_CAMIF_YDATA2 (0x02 << 14) | ||
47 | #define S3C64XX_GPF7_EINT_G4_7 (0x03 << 14) | ||
48 | |||
49 | #define S3C64XX_GPF8_CAMIF_YDATA3 (0x02 << 16) | ||
50 | #define S3C64XX_GPF8_EINT_G4_8 (0x03 << 16) | ||
51 | |||
52 | #define S3C64XX_GPF9_CAMIF_YDATA4 (0x02 << 18) | ||
53 | #define S3C64XX_GPF9_EINT_G4_9 (0x03 << 18) | ||
54 | |||
55 | #define S3C64XX_GPF10_CAMIF_YDATA5 (0x02 << 20) | ||
56 | #define S3C64XX_GPF10_EINT_G4_10 (0x03 << 20) | ||
57 | |||
58 | #define S3C64XX_GPF11_CAMIF_YDATA6 (0x02 << 22) | ||
59 | #define S3C64XX_GPF11_EINT_G4_11 (0x03 << 22) | ||
60 | |||
61 | #define S3C64XX_GPF12_CAMIF_YDATA7 (0x02 << 24) | ||
62 | #define S3C64XX_GPF12_EINT_G4_12 (0x03 << 24) | ||
63 | |||
64 | #define S3C64XX_GPF13_PWM_ECLK (0x02 << 26) | ||
65 | #define S3C64XX_GPF13_EINT_G4_13 (0x03 << 26) | ||
66 | |||
67 | #define S3C64XX_GPF14_PWM_TOUT0 (0x02 << 28) | ||
68 | #define S3C64XX_GPF14_CLKOUT0 (0x03 << 28) | ||
69 | |||
70 | #define S3C64XX_GPF15_PWM_TOUT1 (0x02 << 30) | ||
71 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-g.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-g.h deleted file mode 100644 index b94954af1598..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-g.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-g.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank G register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPGCON (S3C64XX_GPG_BASE + 0x00) | ||
16 | #define S3C64XX_GPGDAT (S3C64XX_GPG_BASE + 0x04) | ||
17 | #define S3C64XX_GPGPUD (S3C64XX_GPG_BASE + 0x08) | ||
18 | #define S3C64XX_GPGCONSLP (S3C64XX_GPG_BASE + 0x0c) | ||
19 | #define S3C64XX_GPGPUDSLP (S3C64XX_GPG_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPG_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPG_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPG_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPG0_MMC0_CLK (0x02 << 0) | ||
26 | #define S3C64XX_GPG0_EINT_G5_0 (0x07 << 0) | ||
27 | |||
28 | #define S3C64XX_GPG1_MMC0_CMD (0x02 << 4) | ||
29 | #define S3C64XX_GPG1_EINT_G5_1 (0x07 << 4) | ||
30 | |||
31 | #define S3C64XX_GPG2_MMC0_DATA0 (0x02 << 8) | ||
32 | #define S3C64XX_GPG2_EINT_G5_2 (0x07 << 8) | ||
33 | |||
34 | #define S3C64XX_GPG3_MMC0_DATA1 (0x02 << 12) | ||
35 | #define S3C64XX_GPG3_EINT_G5_3 (0x07 << 12) | ||
36 | |||
37 | #define S3C64XX_GPG4_MMC0_DATA2 (0x02 << 16) | ||
38 | #define S3C64XX_GPG4_EINT_G5_4 (0x07 << 16) | ||
39 | |||
40 | #define S3C64XX_GPG5_MMC0_DATA3 (0x02 << 20) | ||
41 | #define S3C64XX_GPG5_EINT_G5_5 (0x07 << 20) | ||
42 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-h.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-h.h deleted file mode 100644 index 5d75aaad865e..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-h.h +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-h.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank H register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPHCON0 (S3C64XX_GPH_BASE + 0x00) | ||
16 | #define S3C64XX_GPHCON1 (S3C64XX_GPH_BASE + 0x04) | ||
17 | #define S3C64XX_GPHDAT (S3C64XX_GPH_BASE + 0x08) | ||
18 | #define S3C64XX_GPHPUD (S3C64XX_GPH_BASE + 0x0c) | ||
19 | #define S3C64XX_GPHCONSLP (S3C64XX_GPH_BASE + 0x10) | ||
20 | #define S3C64XX_GPHPUDSLP (S3C64XX_GPH_BASE + 0x14) | ||
21 | |||
22 | #define S3C64XX_GPH_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPH_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
24 | #define S3C64XX_GPH_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
25 | |||
26 | #define S3C64XX_GPH0_MMC1_CLK (0x02 << 0) | ||
27 | #define S3C64XX_GPH0_KP_COL0 (0x04 << 0) | ||
28 | #define S3C64XX_GPH0_EINT_G6_0 (0x07 << 0) | ||
29 | |||
30 | #define S3C64XX_GPH1_MMC1_CMD (0x02 << 4) | ||
31 | #define S3C64XX_GPH1_KP_COL1 (0x04 << 4) | ||
32 | #define S3C64XX_GPH1_EINT_G6_1 (0x07 << 4) | ||
33 | |||
34 | #define S3C64XX_GPH2_MMC1_DATA0 (0x02 << 8) | ||
35 | #define S3C64XX_GPH2_KP_COL2 (0x04 << 8) | ||
36 | #define S3C64XX_GPH2_EINT_G6_2 (0x07 << 8) | ||
37 | |||
38 | #define S3C64XX_GPH3_MMC1_DATA1 (0x02 << 12) | ||
39 | #define S3C64XX_GPH3_KP_COL3 (0x04 << 12) | ||
40 | #define S3C64XX_GPH3_EINT_G6_3 (0x07 << 12) | ||
41 | |||
42 | #define S3C64XX_GPH4_MMC1_DATA2 (0x02 << 16) | ||
43 | #define S3C64XX_GPH4_KP_COL4 (0x04 << 16) | ||
44 | #define S3C64XX_GPH4_EINT_G6_4 (0x07 << 16) | ||
45 | |||
46 | #define S3C64XX_GPH5_MMC1_DATA3 (0x02 << 20) | ||
47 | #define S3C64XX_GPH5_KP_COL5 (0x04 << 20) | ||
48 | #define S3C64XX_GPH5_EINT_G6_5 (0x07 << 20) | ||
49 | |||
50 | #define S3C64XX_GPH6_MMC1_DATA4 (0x02 << 24) | ||
51 | #define S3C64XX_GPH6_MMC2_DATA0 (0x03 << 24) | ||
52 | #define S3C64XX_GPH6_KP_COL6 (0x04 << 24) | ||
53 | #define S3C64XX_GPH6_I2S_V40_BCLK (0x05 << 24) | ||
54 | #define S3C64XX_GPH6_ADDR_CF0 (0x06 << 24) | ||
55 | #define S3C64XX_GPH6_EINT_G6_6 (0x07 << 24) | ||
56 | |||
57 | #define S3C64XX_GPH7_MMC1_DATA5 (0x02 << 28) | ||
58 | #define S3C64XX_GPH7_MMC2_DATA1 (0x03 << 28) | ||
59 | #define S3C64XX_GPH7_KP_COL7 (0x04 << 28) | ||
60 | #define S3C64XX_GPH7_I2S_V40_CDCLK (0x05 << 28) | ||
61 | #define S3C64XX_GPH7_ADDR_CF1 (0x06 << 28) | ||
62 | #define S3C64XX_GPH7_EINT_G6_7 (0x07 << 28) | ||
63 | |||
64 | #define S3C64XX_GPH8_MMC1_DATA6 (0x02 << 0) | ||
65 | #define S3C64XX_GPH8_MMC2_DATA2 (0x03 << 0) | ||
66 | #define S3C64XX_GPH8_I2S_V40_LRCLK (0x05 << 0) | ||
67 | #define S3C64XX_GPH8_ADDR_CF2 (0x06 << 0) | ||
68 | #define S3C64XX_GPH8_EINT_G6_8 (0x07 << 0) | ||
69 | |||
70 | #define S3C64XX_GPH9_OUTPUT (0x01 << 4) | ||
71 | #define S3C64XX_GPH9_MMC1_DATA7 (0x02 << 4) | ||
72 | #define S3C64XX_GPH9_MMC2_DATA3 (0x03 << 4) | ||
73 | #define S3C64XX_GPH9_I2S_V40_DI (0x05 << 4) | ||
74 | #define S3C64XX_GPH9_EINT_G6_9 (0x07 << 4) | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-i.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-i.h deleted file mode 100644 index 4ceaa6098bc7..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-i.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-i.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank I register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPICON (S3C64XX_GPI_BASE + 0x00) | ||
16 | #define S3C64XX_GPIDAT (S3C64XX_GPI_BASE + 0x04) | ||
17 | #define S3C64XX_GPIPUD (S3C64XX_GPI_BASE + 0x08) | ||
18 | #define S3C64XX_GPICONSLP (S3C64XX_GPI_BASE + 0x0c) | ||
19 | #define S3C64XX_GPIPUDSLP (S3C64XX_GPI_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPI_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPI_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPI_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPI0_VD0 (0x02 << 0) | ||
26 | #define S3C64XX_GPI1_VD1 (0x02 << 2) | ||
27 | #define S3C64XX_GPI2_VD2 (0x02 << 4) | ||
28 | #define S3C64XX_GPI3_VD3 (0x02 << 6) | ||
29 | #define S3C64XX_GPI4_VD4 (0x02 << 8) | ||
30 | #define S3C64XX_GPI5_VD5 (0x02 << 10) | ||
31 | #define S3C64XX_GPI6_VD6 (0x02 << 12) | ||
32 | #define S3C64XX_GPI7_VD7 (0x02 << 14) | ||
33 | #define S3C64XX_GPI8_VD8 (0x02 << 16) | ||
34 | #define S3C64XX_GPI9_VD9 (0x02 << 18) | ||
35 | #define S3C64XX_GPI10_VD10 (0x02 << 20) | ||
36 | #define S3C64XX_GPI11_VD11 (0x02 << 22) | ||
37 | #define S3C64XX_GPI12_VD12 (0x02 << 24) | ||
38 | #define S3C64XX_GPI13_VD13 (0x02 << 26) | ||
39 | #define S3C64XX_GPI14_VD14 (0x02 << 28) | ||
40 | #define S3C64XX_GPI15_VD15 (0x02 << 30) | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-j.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-j.h deleted file mode 100644 index 6f25cd079a40..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-j.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-j.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank J register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPJCON (S3C64XX_GPJ_BASE + 0x00) | ||
16 | #define S3C64XX_GPJDAT (S3C64XX_GPJ_BASE + 0x04) | ||
17 | #define S3C64XX_GPJPUD (S3C64XX_GPJ_BASE + 0x08) | ||
18 | #define S3C64XX_GPJCONSLP (S3C64XX_GPJ_BASE + 0x0c) | ||
19 | #define S3C64XX_GPJPUDSLP (S3C64XX_GPJ_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPJ_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPJ_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPJ_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPJ0_VD16 (0x02 << 0) | ||
26 | #define S3C64XX_GPJ1_VD17 (0x02 << 2) | ||
27 | #define S3C64XX_GPJ2_VD18 (0x02 << 4) | ||
28 | #define S3C64XX_GPJ3_VD19 (0x02 << 6) | ||
29 | #define S3C64XX_GPJ4_VD20 (0x02 << 8) | ||
30 | #define S3C64XX_GPJ5_VD21 (0x02 << 10) | ||
31 | #define S3C64XX_GPJ6_VD22 (0x02 << 12) | ||
32 | #define S3C64XX_GPJ7_VD23 (0x02 << 14) | ||
33 | #define S3C64XX_GPJ8_LCD_HSYNC (0x02 << 16) | ||
34 | #define S3C64XX_GPJ9_LCD_VSYNC (0x02 << 18) | ||
35 | #define S3C64XX_GPJ10_LCD_VDEN (0x02 << 20) | ||
36 | #define S3C64XX_GPJ11_LCD_VCLK (0x02 << 22) | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-n.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-n.h deleted file mode 100644 index d0aeda1cd9de..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-n.h +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-n.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank N register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPNCON (S3C64XX_GPN_BASE + 0x00) | ||
16 | #define S3C64XX_GPNDAT (S3C64XX_GPN_BASE + 0x04) | ||
17 | #define S3C64XX_GPNPUD (S3C64XX_GPN_BASE + 0x08) | ||
18 | |||
19 | #define S3C64XX_GPN_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
20 | #define S3C64XX_GPN_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
21 | #define S3C64XX_GPN_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
22 | |||
23 | #define S3C64XX_GPN0_EINT0 (0x02 << 0) | ||
24 | #define S3C64XX_GPN0_KP_ROW0 (0x03 << 0) | ||
25 | |||
26 | #define S3C64XX_GPN1_EINT1 (0x02 << 2) | ||
27 | #define S3C64XX_GPN1_KP_ROW1 (0x03 << 2) | ||
28 | |||
29 | #define S3C64XX_GPN2_EINT2 (0x02 << 4) | ||
30 | #define S3C64XX_GPN2_KP_ROW2 (0x03 << 4) | ||
31 | |||
32 | #define S3C64XX_GPN3_EINT3 (0x02 << 6) | ||
33 | #define S3C64XX_GPN3_KP_ROW3 (0x03 << 6) | ||
34 | |||
35 | #define S3C64XX_GPN4_EINT4 (0x02 << 8) | ||
36 | #define S3C64XX_GPN4_KP_ROW4 (0x03 << 8) | ||
37 | |||
38 | #define S3C64XX_GPN5_EINT5 (0x02 << 10) | ||
39 | #define S3C64XX_GPN5_KP_ROW5 (0x03 << 10) | ||
40 | |||
41 | #define S3C64XX_GPN6_EINT6 (0x02 << 12) | ||
42 | #define S3C64XX_GPN6_KP_ROW6 (0x03 << 12) | ||
43 | |||
44 | #define S3C64XX_GPN7_EINT7 (0x02 << 14) | ||
45 | #define S3C64XX_GPN7_KP_ROW7 (0x03 << 14) | ||
46 | |||
47 | #define S3C64XX_GPN8_EINT8 (0x02 << 16) | ||
48 | #define S3C64XX_GPN9_EINT9 (0x02 << 18) | ||
49 | #define S3C64XX_GPN10_EINT10 (0x02 << 20) | ||
50 | #define S3C64XX_GPN11_EINT11 (0x02 << 22) | ||
51 | #define S3C64XX_GPN12_EINT12 (0x02 << 24) | ||
52 | #define S3C64XX_GPN13_EINT13 (0x02 << 26) | ||
53 | #define S3C64XX_GPN14_EINT14 (0x02 << 28) | ||
54 | #define S3C64XX_GPN15_EINT15 (0x02 << 30) | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-o.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-o.h deleted file mode 100644 index 21868fa102d0..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-o.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-o.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank O register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPOCON (S3C64XX_GPO_BASE + 0x00) | ||
16 | #define S3C64XX_GPODAT (S3C64XX_GPO_BASE + 0x04) | ||
17 | #define S3C64XX_GPOPUD (S3C64XX_GPO_BASE + 0x08) | ||
18 | #define S3C64XX_GPOCONSLP (S3C64XX_GPO_BASE + 0x0c) | ||
19 | #define S3C64XX_GPOPUDSLP (S3C64XX_GPO_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPO_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPO_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPO_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPO0_MEM0_nCS2 (0x02 << 0) | ||
26 | #define S3C64XX_GPO0_EINT_G7_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPO1_MEM0_nCS3 (0x02 << 2) | ||
29 | #define S3C64XX_GPO1_EINT_G7_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPO2_MEM0_nCS4 (0x02 << 4) | ||
32 | #define S3C64XX_GPO2_EINT_G7_2 (0x03 << 4) | ||
33 | |||
34 | #define S3C64XX_GPO3_MEM0_nCS5 (0x02 << 6) | ||
35 | #define S3C64XX_GPO3_EINT_G7_3 (0x03 << 6) | ||
36 | |||
37 | #define S3C64XX_GPO4_EINT_G7_4 (0x03 << 8) | ||
38 | |||
39 | #define S3C64XX_GPO5_EINT_G7_5 (0x03 << 10) | ||
40 | |||
41 | #define S3C64XX_GPO6_MEM0_ADDR6 (0x02 << 12) | ||
42 | #define S3C64XX_GPO6_EINT_G7_6 (0x03 << 12) | ||
43 | |||
44 | #define S3C64XX_GPO7_MEM0_ADDR7 (0x02 << 14) | ||
45 | #define S3C64XX_GPO7_EINT_G7_7 (0x03 << 14) | ||
46 | |||
47 | #define S3C64XX_GPO8_MEM0_ADDR8 (0x02 << 16) | ||
48 | #define S3C64XX_GPO8_EINT_G7_8 (0x03 << 16) | ||
49 | |||
50 | #define S3C64XX_GPO9_MEM0_ADDR9 (0x02 << 18) | ||
51 | #define S3C64XX_GPO9_EINT_G7_9 (0x03 << 18) | ||
52 | |||
53 | #define S3C64XX_GPO10_MEM0_ADDR10 (0x02 << 20) | ||
54 | #define S3C64XX_GPO10_EINT_G7_10 (0x03 << 20) | ||
55 | |||
56 | #define S3C64XX_GPO11_MEM0_ADDR11 (0x02 << 22) | ||
57 | #define S3C64XX_GPO11_EINT_G7_11 (0x03 << 22) | ||
58 | |||
59 | #define S3C64XX_GPO12_MEM0_ADDR12 (0x02 << 24) | ||
60 | #define S3C64XX_GPO12_EINT_G7_12 (0x03 << 24) | ||
61 | |||
62 | #define S3C64XX_GPO13_MEM0_ADDR13 (0x02 << 26) | ||
63 | #define S3C64XX_GPO13_EINT_G7_13 (0x03 << 26) | ||
64 | |||
65 | #define S3C64XX_GPO14_MEM0_ADDR14 (0x02 << 28) | ||
66 | #define S3C64XX_GPO14_EINT_G7_14 (0x03 << 28) | ||
67 | |||
68 | #define S3C64XX_GPO15_MEM0_ADDR15 (0x02 << 30) | ||
69 | #define S3C64XX_GPO15_EINT_G7_15 (0x03 << 30) | ||
70 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-p.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-p.h deleted file mode 100644 index 46bcfb63b8de..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-p.h +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-p.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank P register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPPCON (S3C64XX_GPP_BASE + 0x00) | ||
16 | #define S3C64XX_GPPDAT (S3C64XX_GPP_BASE + 0x04) | ||
17 | #define S3C64XX_GPPPUD (S3C64XX_GPP_BASE + 0x08) | ||
18 | #define S3C64XX_GPPCONSLP (S3C64XX_GPP_BASE + 0x0c) | ||
19 | #define S3C64XX_GPPPUDSLP (S3C64XX_GPP_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPP_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPP_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPP_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPP0_MEM0_ADDRV (0x02 << 0) | ||
26 | #define S3C64XX_GPP0_EINT_G8_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPP1_MEM0_SMCLK (0x02 << 2) | ||
29 | #define S3C64XX_GPP1_EINT_G8_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPP2_MEM0_nWAIT (0x02 << 4) | ||
32 | #define S3C64XX_GPP2_EINT_G8_2 (0x03 << 4) | ||
33 | |||
34 | #define S3C64XX_GPP3_MEM0_RDY0_ALE (0x02 << 6) | ||
35 | #define S3C64XX_GPP3_EINT_G8_3 (0x03 << 6) | ||
36 | |||
37 | #define S3C64XX_GPP4_MEM0_RDY1_CLE (0x02 << 8) | ||
38 | #define S3C64XX_GPP4_EINT_G8_4 (0x03 << 8) | ||
39 | |||
40 | #define S3C64XX_GPP5_MEM0_INTsm0_FWE (0x02 << 10) | ||
41 | #define S3C64XX_GPP5_EINT_G8_5 (0x03 << 10) | ||
42 | |||
43 | #define S3C64XX_GPP6_MEM0_(null) (0x02 << 12) | ||
44 | #define S3C64XX_GPP6_EINT_G8_6 (0x03 << 12) | ||
45 | |||
46 | #define S3C64XX_GPP7_MEM0_INTsm1_FRE (0x02 << 14) | ||
47 | #define S3C64XX_GPP7_EINT_G8_7 (0x03 << 14) | ||
48 | |||
49 | #define S3C64XX_GPP8_MEM0_RPn_RnB (0x02 << 16) | ||
50 | #define S3C64XX_GPP8_EINT_G8_8 (0x03 << 16) | ||
51 | |||
52 | #define S3C64XX_GPP9_MEM0_ATA_RESET (0x02 << 18) | ||
53 | #define S3C64XX_GPP9_EINT_G8_9 (0x03 << 18) | ||
54 | |||
55 | #define S3C64XX_GPP10_MEM0_ATA_INPACK (0x02 << 20) | ||
56 | #define S3C64XX_GPP10_EINT_G8_10 (0x03 << 20) | ||
57 | |||
58 | #define S3C64XX_GPP11_MEM0_ATA_REG (0x02 << 22) | ||
59 | #define S3C64XX_GPP11_EINT_G8_11 (0x03 << 22) | ||
60 | |||
61 | #define S3C64XX_GPP12_MEM0_ATA_WE (0x02 << 24) | ||
62 | #define S3C64XX_GPP12_EINT_G8_12 (0x03 << 24) | ||
63 | |||
64 | #define S3C64XX_GPP13_MEM0_ATA_OE (0x02 << 26) | ||
65 | #define S3C64XX_GPP13_EINT_G8_13 (0x03 << 26) | ||
66 | |||
67 | #define S3C64XX_GPP14_MEM0_ATA_CD (0x02 << 28) | ||
68 | #define S3C64XX_GPP14_EINT_G8_14 (0x03 << 28) | ||
69 | |||
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-q.h b/arch/arm/mach-s3c64xx/include/mach/gpio-bank-q.h deleted file mode 100644 index 1712223487b0..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/gpio-bank-q.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c64xx/include/mach/gpio-bank-q.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank Q register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPQCON (S3C64XX_GPQ_BASE + 0x00) | ||
16 | #define S3C64XX_GPQDAT (S3C64XX_GPQ_BASE + 0x04) | ||
17 | #define S3C64XX_GPQPUD (S3C64XX_GPQ_BASE + 0x08) | ||
18 | #define S3C64XX_GPQCONSLP (S3C64XX_GPQ_BASE + 0x0c) | ||
19 | #define S3C64XX_GPQPUDSLP (S3C64XX_GPQ_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPQ_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPQ_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPQ_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPQ0_MEM0_ADDR18_RAS (0x02 << 0) | ||
26 | #define S3C64XX_GPQ0_EINT_G9_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPQ1_MEM0_ADDR19_CAS (0x02 << 2) | ||
29 | #define S3C64XX_GPQ1_EINT_G9_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPQ2_EINT_G9_2 (0x03 << 4) | ||
32 | |||
33 | #define S3C64XX_GPQ3_EINT_G9_3 (0x03 << 6) | ||
34 | |||
35 | #define S3C64XX_GPQ4_EINT_G9_4 (0x03 << 8) | ||
36 | |||
37 | #define S3C64XX_GPQ5_EINT_G9_5 (0x03 << 10) | ||
38 | |||
39 | #define S3C64XX_GPQ6_EINT_G9_6 (0x03 << 12) | ||
40 | |||
41 | #define S3C64XX_GPQ7_MEM0_ADDR17_WENDMC (0x02 << 14) | ||
42 | #define S3C64XX_GPQ7_EINT_G9_7 (0x03 << 14) | ||
43 | |||
44 | #define S3C64XX_GPQ8_MEM0_ADDR16_APDMC (0x02 << 16) | ||
45 | #define S3C64XX_GPQ8_EINT_G9_8 (0x03 << 16) | ||
46 | |||
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 686a4f270b12..2c0353a80906 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
51 | #include <mach/regs-fb.h> | 51 | #include <mach/regs-fb.h> |
52 | #include <mach/map.h> | 52 | #include <mach/map.h> |
53 | #include <mach/gpio-bank-f.h> | ||
54 | 53 | ||
55 | #include <asm/irq.h> | 54 | #include <asm/irq.h> |
56 | #include <asm/mach-types.h> | 55 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 79412f735a8d..bc1c470b7de6 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -30,26 +30,18 @@ | |||
30 | #include <mach/regs-gpio-memport.h> | 30 | #include <mach/regs-gpio-memport.h> |
31 | 31 | ||
32 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK | 32 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK |
33 | #include <mach/gpio-bank-n.h> | ||
34 | |||
35 | void s3c_pm_debug_smdkled(u32 set, u32 clear) | 33 | void s3c_pm_debug_smdkled(u32 set, u32 clear) |
36 | { | 34 | { |
37 | unsigned long flags; | 35 | unsigned long flags; |
38 | u32 reg; | 36 | int i; |
39 | 37 | ||
40 | local_irq_save(flags); | 38 | local_irq_save(flags); |
41 | reg = __raw_readl(S3C64XX_GPNCON); | 39 | for (i = 0; i < 4; i++) { |
42 | reg &= ~(S3C64XX_GPN_CONMASK(12) | S3C64XX_GPN_CONMASK(13) | | 40 | if (clear & (1 << i)) |
43 | S3C64XX_GPN_CONMASK(14) | S3C64XX_GPN_CONMASK(15)); | 41 | gpio_set_value(S3C64XX_GPN(12 + i), 0); |
44 | reg |= S3C64XX_GPN_OUTPUT(12) | S3C64XX_GPN_OUTPUT(13) | | 42 | if (set & (1 << i)) |
45 | S3C64XX_GPN_OUTPUT(14) | S3C64XX_GPN_OUTPUT(15); | 43 | gpio_set_value(S3C64XX_GPN(12 + i), 1); |
46 | __raw_writel(reg, S3C64XX_GPNCON); | 44 | } |
47 | |||
48 | reg = __raw_readl(S3C64XX_GPNDAT); | ||
49 | reg &= ~(clear << 12); | ||
50 | reg |= set << 12; | ||
51 | __raw_writel(reg, S3C64XX_GPNDAT); | ||
52 | |||
53 | local_irq_restore(flags); | 45 | local_irq_restore(flags); |
54 | } | 46 | } |
55 | #endif | 47 | #endif |
@@ -187,6 +179,18 @@ static int s3c64xx_pm_init(void) | |||
187 | pm_cpu_prep = s3c64xx_pm_prepare; | 179 | pm_cpu_prep = s3c64xx_pm_prepare; |
188 | pm_cpu_sleep = s3c64xx_cpu_suspend; | 180 | pm_cpu_sleep = s3c64xx_cpu_suspend; |
189 | pm_uart_udivslot = 1; | 181 | pm_uart_udivslot = 1; |
182 | |||
183 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK | ||
184 | gpio_request(S3C64XX_GPN(12), "DEBUG_LED0"); | ||
185 | gpio_request(S3C64XX_GPN(13), "DEBUG_LED1"); | ||
186 | gpio_request(S3C64XX_GPN(14), "DEBUG_LED2"); | ||
187 | gpio_request(S3C64XX_GPN(15), "DEBUG_LED3"); | ||
188 | gpio_direction_output(S3C64XX_GPN(12), 0); | ||
189 | gpio_direction_output(S3C64XX_GPN(13), 0); | ||
190 | gpio_direction_output(S3C64XX_GPN(14), 0); | ||
191 | gpio_direction_output(S3C64XX_GPN(15), 0); | ||
192 | #endif | ||
193 | |||
190 | return 0; | 194 | return 0; |
191 | } | 195 | } |
192 | 196 | ||
diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c b/arch/arm/mach-s3c64xx/setup-i2c0.c index 406192a43c6e..241af94a9e70 100644 --- a/arch/arm/mach-s3c64xx/setup-i2c0.c +++ b/arch/arm/mach-s3c64xx/setup-i2c0.c | |||
@@ -18,14 +18,11 @@ | |||
18 | 18 | ||
19 | struct platform_device; /* don't need the contents */ | 19 | struct platform_device; /* don't need the contents */ |
20 | 20 | ||
21 | #include <mach/gpio-bank-b.h> | ||
22 | #include <plat/iic.h> | 21 | #include <plat/iic.h> |
23 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
24 | 23 | ||
25 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | 24 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) |
26 | { | 25 | { |
27 | s3c_gpio_cfgpin(S3C64XX_GPB(5), S3C64XX_GPB5_I2C_SCL0); | 26 | s3c_gpio_cfgall_range(S3C64XX_GPB(5), 2, |
28 | s3c_gpio_cfgpin(S3C64XX_GPB(6), S3C64XX_GPB6_I2C_SDA0); | 27 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); |
29 | s3c_gpio_setpull(S3C64XX_GPB(5), S3C_GPIO_PULL_UP); | ||
30 | s3c_gpio_setpull(S3C64XX_GPB(6), S3C_GPIO_PULL_UP); | ||
31 | } | 28 | } |
diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c b/arch/arm/mach-s3c64xx/setup-i2c1.c index 1ee62c97cd7f..3d13a961986d 100644 --- a/arch/arm/mach-s3c64xx/setup-i2c1.c +++ b/arch/arm/mach-s3c64xx/setup-i2c1.c | |||
@@ -18,14 +18,11 @@ | |||
18 | 18 | ||
19 | struct platform_device; /* don't need the contents */ | 19 | struct platform_device; /* don't need the contents */ |
20 | 20 | ||
21 | #include <mach/gpio-bank-b.h> | ||
22 | #include <plat/iic.h> | 21 | #include <plat/iic.h> |
23 | #include <plat/gpio-cfg.h> | 22 | #include <plat/gpio-cfg.h> |
24 | 23 | ||
25 | void s3c_i2c1_cfg_gpio(struct platform_device *dev) | 24 | void s3c_i2c1_cfg_gpio(struct platform_device *dev) |
26 | { | 25 | { |
27 | s3c_gpio_cfgpin(S3C64XX_GPB(2), S3C64XX_GPB2_I2C_SCL1); | 26 | s3c_gpio_cfgall_range(S3C64XX_GPB(2), 2, |
28 | s3c_gpio_cfgpin(S3C64XX_GPB(3), S3C64XX_GPB3_I2C_SDA1); | 27 | S3C_GPIO_SFN(6), S3C_GPIO_PULL_UP); |
29 | s3c_gpio_setpull(S3C64XX_GPB(2), S3C_GPIO_PULL_UP); | ||
30 | s3c_gpio_setpull(S3C64XX_GPB(3), S3C_GPIO_PULL_UP); | ||
31 | } | 28 | } |
diff --git a/arch/arm/mach-s3c64xx/sleep.S b/arch/arm/mach-s3c64xx/sleep.S index afe5a762f46e..1f87732b2320 100644 --- a/arch/arm/mach-s3c64xx/sleep.S +++ b/arch/arm/mach-s3c64xx/sleep.S | |||
@@ -20,7 +20,6 @@ | |||
20 | #define S3C64XX_VA_GPIO (0x0) | 20 | #define S3C64XX_VA_GPIO (0x0) |
21 | 21 | ||
22 | #include <mach/regs-gpio.h> | 22 | #include <mach/regs-gpio.h> |
23 | #include <mach/gpio-bank-n.h> | ||
24 | 23 | ||
25 | #define LL_UART (S3C_PA_UART + (0x400 * CONFIG_S3C_LOWLEVEL_UART_PORT)) | 24 | #define LL_UART (S3C_PA_UART + (0x400 * CONFIG_S3C_LOWLEVEL_UART_PORT)) |
26 | 25 | ||
@@ -68,6 +67,13 @@ ENTRY(s3c_cpu_resume) | |||
68 | ldr r2, =LL_UART /* for debug */ | 67 | ldr r2, =LL_UART /* for debug */ |
69 | 68 | ||
70 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK | 69 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK |
70 | |||
71 | #define S3C64XX_GPNCON (S3C64XX_GPN_BASE + 0x00) | ||
72 | #define S3C64XX_GPNDAT (S3C64XX_GPN_BASE + 0x04) | ||
73 | |||
74 | #define S3C64XX_GPN_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
75 | #define S3C64XX_GPN_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
76 | |||
71 | /* Initialise the GPIO state if we are debugging via the SMDK LEDs, | 77 | /* Initialise the GPIO state if we are debugging via the SMDK LEDs, |
72 | * as the uboot version supplied resets these to inputs during the | 78 | * as the uboot version supplied resets these to inputs during the |
73 | * resume checks. | 79 | * resume checks. |
diff --git a/arch/arm/mach-s5p6442/Kconfig b/arch/arm/mach-s5p6442/Kconfig deleted file mode 100644 index 33569e4007c4..000000000000 --- a/arch/arm/mach-s5p6442/Kconfig +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | # arch/arm/mach-s5p6442/Kconfig | ||
2 | # | ||
3 | # Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | # http://www.samsung.com/ | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | # Configuration options for the S5P6442 | ||
9 | |||
10 | if ARCH_S5P6442 | ||
11 | |||
12 | config CPU_S5P6442 | ||
13 | bool | ||
14 | select S3C_PL330_DMA | ||
15 | help | ||
16 | Enable S5P6442 CPU support | ||
17 | |||
18 | config MACH_SMDK6442 | ||
19 | bool "SMDK6442" | ||
20 | select CPU_S5P6442 | ||
21 | select S3C_DEV_WDT | ||
22 | help | ||
23 | Machine support for Samsung SMDK6442 | ||
24 | |||
25 | endif | ||
diff --git a/arch/arm/mach-s5p6442/Makefile b/arch/arm/mach-s5p6442/Makefile deleted file mode 100644 index 90a3d8373416..000000000000 --- a/arch/arm/mach-s5p6442/Makefile +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # arch/arm/mach-s5p6442/Makefile | ||
2 | # | ||
3 | # Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | # http://www.samsung.com/ | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | obj-y := | ||
9 | obj-m := | ||
10 | obj-n := | ||
11 | obj- := | ||
12 | |||
13 | # Core support for S5P6442 system | ||
14 | |||
15 | obj-$(CONFIG_CPU_S5P6442) += cpu.o init.o clock.o dma.o | ||
16 | obj-$(CONFIG_CPU_S5P6442) += setup-i2c0.o | ||
17 | |||
18 | # machine support | ||
19 | |||
20 | obj-$(CONFIG_MACH_SMDK6442) += mach-smdk6442.o | ||
21 | |||
22 | # device support | ||
23 | obj-y += dev-audio.o | ||
24 | obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o | ||
diff --git a/arch/arm/mach-s5p6442/Makefile.boot b/arch/arm/mach-s5p6442/Makefile.boot deleted file mode 100644 index ff90aa13bd67..000000000000 --- a/arch/arm/mach-s5p6442/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y := 0x20008000 | ||
2 | params_phys-y := 0x20000100 | ||
diff --git a/arch/arm/mach-s5p6442/clock.c b/arch/arm/mach-s5p6442/clock.c deleted file mode 100644 index fbbc7bede685..000000000000 --- a/arch/arm/mach-s5p6442/clock.c +++ /dev/null | |||
@@ -1,420 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/clock.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - Clock support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/list.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | #include <mach/map.h> | ||
22 | |||
23 | #include <plat/cpu-freq.h> | ||
24 | #include <mach/regs-clock.h> | ||
25 | #include <plat/clock.h> | ||
26 | #include <plat/cpu.h> | ||
27 | #include <plat/pll.h> | ||
28 | #include <plat/s5p-clock.h> | ||
29 | #include <plat/clock-clksrc.h> | ||
30 | #include <plat/s5p6442.h> | ||
31 | |||
32 | static struct clksrc_clk clk_mout_apll = { | ||
33 | .clk = { | ||
34 | .name = "mout_apll", | ||
35 | .id = -1, | ||
36 | }, | ||
37 | .sources = &clk_src_apll, | ||
38 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, | ||
39 | }; | ||
40 | |||
41 | static struct clksrc_clk clk_mout_mpll = { | ||
42 | .clk = { | ||
43 | .name = "mout_mpll", | ||
44 | .id = -1, | ||
45 | }, | ||
46 | .sources = &clk_src_mpll, | ||
47 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, | ||
48 | }; | ||
49 | |||
50 | static struct clksrc_clk clk_mout_epll = { | ||
51 | .clk = { | ||
52 | .name = "mout_epll", | ||
53 | .id = -1, | ||
54 | }, | ||
55 | .sources = &clk_src_epll, | ||
56 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, | ||
57 | }; | ||
58 | |||
59 | /* Possible clock sources for ARM Mux */ | ||
60 | static struct clk *clk_src_arm_list[] = { | ||
61 | [1] = &clk_mout_apll.clk, | ||
62 | [2] = &clk_mout_mpll.clk, | ||
63 | }; | ||
64 | |||
65 | static struct clksrc_sources clk_src_arm = { | ||
66 | .sources = clk_src_arm_list, | ||
67 | .nr_sources = ARRAY_SIZE(clk_src_arm_list), | ||
68 | }; | ||
69 | |||
70 | static struct clksrc_clk clk_mout_arm = { | ||
71 | .clk = { | ||
72 | .name = "mout_arm", | ||
73 | .id = -1, | ||
74 | }, | ||
75 | .sources = &clk_src_arm, | ||
76 | .reg_src = { .reg = S5P_CLK_MUX_STAT0, .shift = 16, .size = 3 }, | ||
77 | }; | ||
78 | |||
79 | static struct clk clk_dout_a2m = { | ||
80 | .name = "dout_a2m", | ||
81 | .id = -1, | ||
82 | .parent = &clk_mout_apll.clk, | ||
83 | }; | ||
84 | |||
85 | /* Possible clock sources for D0 Mux */ | ||
86 | static struct clk *clk_src_d0_list[] = { | ||
87 | [1] = &clk_mout_mpll.clk, | ||
88 | [2] = &clk_dout_a2m, | ||
89 | }; | ||
90 | |||
91 | static struct clksrc_sources clk_src_d0 = { | ||
92 | .sources = clk_src_d0_list, | ||
93 | .nr_sources = ARRAY_SIZE(clk_src_d0_list), | ||
94 | }; | ||
95 | |||
96 | static struct clksrc_clk clk_mout_d0 = { | ||
97 | .clk = { | ||
98 | .name = "mout_d0", | ||
99 | .id = -1, | ||
100 | }, | ||
101 | .sources = &clk_src_d0, | ||
102 | .reg_src = { .reg = S5P_CLK_MUX_STAT0, .shift = 20, .size = 3 }, | ||
103 | }; | ||
104 | |||
105 | static struct clk clk_dout_apll = { | ||
106 | .name = "dout_apll", | ||
107 | .id = -1, | ||
108 | .parent = &clk_mout_arm.clk, | ||
109 | }; | ||
110 | |||
111 | /* Possible clock sources for D0SYNC Mux */ | ||
112 | static struct clk *clk_src_d0sync_list[] = { | ||
113 | [1] = &clk_mout_d0.clk, | ||
114 | [2] = &clk_dout_apll, | ||
115 | }; | ||
116 | |||
117 | static struct clksrc_sources clk_src_d0sync = { | ||
118 | .sources = clk_src_d0sync_list, | ||
119 | .nr_sources = ARRAY_SIZE(clk_src_d0sync_list), | ||
120 | }; | ||
121 | |||
122 | static struct clksrc_clk clk_mout_d0sync = { | ||
123 | .clk = { | ||
124 | .name = "mout_d0sync", | ||
125 | .id = -1, | ||
126 | }, | ||
127 | .sources = &clk_src_d0sync, | ||
128 | .reg_src = { .reg = S5P_CLK_MUX_STAT1, .shift = 28, .size = 3 }, | ||
129 | }; | ||
130 | |||
131 | /* Possible clock sources for D1 Mux */ | ||
132 | static struct clk *clk_src_d1_list[] = { | ||
133 | [1] = &clk_mout_mpll.clk, | ||
134 | [2] = &clk_dout_a2m, | ||
135 | }; | ||
136 | |||
137 | static struct clksrc_sources clk_src_d1 = { | ||
138 | .sources = clk_src_d1_list, | ||
139 | .nr_sources = ARRAY_SIZE(clk_src_d1_list), | ||
140 | }; | ||
141 | |||
142 | static struct clksrc_clk clk_mout_d1 = { | ||
143 | .clk = { | ||
144 | .name = "mout_d1", | ||
145 | .id = -1, | ||
146 | }, | ||
147 | .sources = &clk_src_d1, | ||
148 | .reg_src = { .reg = S5P_CLK_MUX_STAT0, .shift = 24, .size = 3 }, | ||
149 | }; | ||
150 | |||
151 | /* Possible clock sources for D1SYNC Mux */ | ||
152 | static struct clk *clk_src_d1sync_list[] = { | ||
153 | [1] = &clk_mout_d1.clk, | ||
154 | [2] = &clk_dout_apll, | ||
155 | }; | ||
156 | |||
157 | static struct clksrc_sources clk_src_d1sync = { | ||
158 | .sources = clk_src_d1sync_list, | ||
159 | .nr_sources = ARRAY_SIZE(clk_src_d1sync_list), | ||
160 | }; | ||
161 | |||
162 | static struct clksrc_clk clk_mout_d1sync = { | ||
163 | .clk = { | ||
164 | .name = "mout_d1sync", | ||
165 | .id = -1, | ||
166 | }, | ||
167 | .sources = &clk_src_d1sync, | ||
168 | .reg_src = { .reg = S5P_CLK_MUX_STAT1, .shift = 24, .size = 3 }, | ||
169 | }; | ||
170 | |||
171 | static struct clk clk_hclkd0 = { | ||
172 | .name = "hclkd0", | ||
173 | .id = -1, | ||
174 | .parent = &clk_mout_d0sync.clk, | ||
175 | }; | ||
176 | |||
177 | static struct clk clk_hclkd1 = { | ||
178 | .name = "hclkd1", | ||
179 | .id = -1, | ||
180 | .parent = &clk_mout_d1sync.clk, | ||
181 | }; | ||
182 | |||
183 | static struct clk clk_pclkd0 = { | ||
184 | .name = "pclkd0", | ||
185 | .id = -1, | ||
186 | .parent = &clk_hclkd0, | ||
187 | }; | ||
188 | |||
189 | static struct clk clk_pclkd1 = { | ||
190 | .name = "pclkd1", | ||
191 | .id = -1, | ||
192 | .parent = &clk_hclkd1, | ||
193 | }; | ||
194 | |||
195 | int s5p6442_clk_ip0_ctrl(struct clk *clk, int enable) | ||
196 | { | ||
197 | return s5p_gatectrl(S5P_CLKGATE_IP0, clk, enable); | ||
198 | } | ||
199 | |||
200 | int s5p6442_clk_ip3_ctrl(struct clk *clk, int enable) | ||
201 | { | ||
202 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); | ||
203 | } | ||
204 | |||
205 | static struct clksrc_clk clksrcs[] = { | ||
206 | { | ||
207 | .clk = { | ||
208 | .name = "dout_a2m", | ||
209 | .id = -1, | ||
210 | .parent = &clk_mout_apll.clk, | ||
211 | }, | ||
212 | .sources = &clk_src_apll, | ||
213 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, | ||
214 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, | ||
215 | }, { | ||
216 | .clk = { | ||
217 | .name = "dout_apll", | ||
218 | .id = -1, | ||
219 | .parent = &clk_mout_arm.clk, | ||
220 | }, | ||
221 | .sources = &clk_src_arm, | ||
222 | .reg_src = { .reg = S5P_CLK_MUX_STAT0, .shift = 16, .size = 3 }, | ||
223 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 3 }, | ||
224 | }, { | ||
225 | .clk = { | ||
226 | .name = "hclkd1", | ||
227 | .id = -1, | ||
228 | .parent = &clk_mout_d1sync.clk, | ||
229 | }, | ||
230 | .sources = &clk_src_d1sync, | ||
231 | .reg_src = { .reg = S5P_CLK_MUX_STAT1, .shift = 24, .size = 3 }, | ||
232 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 24, .size = 4 }, | ||
233 | }, { | ||
234 | .clk = { | ||
235 | .name = "hclkd0", | ||
236 | .id = -1, | ||
237 | .parent = &clk_mout_d0sync.clk, | ||
238 | }, | ||
239 | .sources = &clk_src_d0sync, | ||
240 | .reg_src = { .reg = S5P_CLK_MUX_STAT1, .shift = 28, .size = 3 }, | ||
241 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 4 }, | ||
242 | }, { | ||
243 | .clk = { | ||
244 | .name = "pclkd0", | ||
245 | .id = -1, | ||
246 | .parent = &clk_hclkd0, | ||
247 | }, | ||
248 | .sources = &clk_src_d0sync, | ||
249 | .reg_src = { .reg = S5P_CLK_MUX_STAT1, .shift = 28, .size = 3 }, | ||
250 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 }, | ||
251 | }, { | ||
252 | .clk = { | ||
253 | .name = "pclkd1", | ||
254 | .id = -1, | ||
255 | .parent = &clk_hclkd1, | ||
256 | }, | ||
257 | .sources = &clk_src_d1sync, | ||
258 | .reg_src = { .reg = S5P_CLK_MUX_STAT1, .shift = 24, .size = 3 }, | ||
259 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 }, | ||
260 | } | ||
261 | }; | ||
262 | |||
263 | /* Clock initialisation code */ | ||
264 | static struct clksrc_clk *init_parents[] = { | ||
265 | &clk_mout_apll, | ||
266 | &clk_mout_mpll, | ||
267 | &clk_mout_epll, | ||
268 | &clk_mout_arm, | ||
269 | &clk_mout_d0, | ||
270 | &clk_mout_d0sync, | ||
271 | &clk_mout_d1, | ||
272 | &clk_mout_d1sync, | ||
273 | }; | ||
274 | |||
275 | void __init_or_cpufreq s5p6442_setup_clocks(void) | ||
276 | { | ||
277 | struct clk *pclkd0_clk; | ||
278 | struct clk *pclkd1_clk; | ||
279 | |||
280 | unsigned long xtal; | ||
281 | unsigned long arm; | ||
282 | unsigned long hclkd0 = 0; | ||
283 | unsigned long hclkd1 = 0; | ||
284 | unsigned long pclkd0 = 0; | ||
285 | unsigned long pclkd1 = 0; | ||
286 | |||
287 | unsigned long apll; | ||
288 | unsigned long mpll; | ||
289 | unsigned long epll; | ||
290 | unsigned int ptr; | ||
291 | |||
292 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); | ||
293 | |||
294 | xtal = clk_get_rate(&clk_xtal); | ||
295 | |||
296 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | ||
297 | |||
298 | apll = s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508); | ||
299 | mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P_MPLL_CON), pll_4502); | ||
300 | epll = s5p_get_pll45xx(xtal, __raw_readl(S5P_EPLL_CON), pll_4500); | ||
301 | |||
302 | printk(KERN_INFO "S5P6442: PLL settings, A=%ld, M=%ld, E=%ld", | ||
303 | apll, mpll, epll); | ||
304 | |||
305 | clk_fout_apll.rate = apll; | ||
306 | clk_fout_mpll.rate = mpll; | ||
307 | clk_fout_epll.rate = epll; | ||
308 | |||
309 | for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++) | ||
310 | s3c_set_clksrc(init_parents[ptr], true); | ||
311 | |||
312 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) | ||
313 | s3c_set_clksrc(&clksrcs[ptr], true); | ||
314 | |||
315 | arm = clk_get_rate(&clk_dout_apll); | ||
316 | hclkd0 = clk_get_rate(&clk_hclkd0); | ||
317 | hclkd1 = clk_get_rate(&clk_hclkd1); | ||
318 | |||
319 | pclkd0_clk = clk_get(NULL, "pclkd0"); | ||
320 | BUG_ON(IS_ERR(pclkd0_clk)); | ||
321 | |||
322 | pclkd0 = clk_get_rate(pclkd0_clk); | ||
323 | clk_put(pclkd0_clk); | ||
324 | |||
325 | pclkd1_clk = clk_get(NULL, "pclkd1"); | ||
326 | BUG_ON(IS_ERR(pclkd1_clk)); | ||
327 | |||
328 | pclkd1 = clk_get_rate(pclkd1_clk); | ||
329 | clk_put(pclkd1_clk); | ||
330 | |||
331 | printk(KERN_INFO "S5P6442: HCLKD0=%ld, HCLKD1=%ld, PCLKD0=%ld, PCLKD1=%ld\n", | ||
332 | hclkd0, hclkd1, pclkd0, pclkd1); | ||
333 | |||
334 | /* For backward compatibility */ | ||
335 | clk_f.rate = arm; | ||
336 | clk_h.rate = hclkd1; | ||
337 | clk_p.rate = pclkd1; | ||
338 | |||
339 | clk_pclkd0.rate = pclkd0; | ||
340 | clk_pclkd1.rate = pclkd1; | ||
341 | } | ||
342 | |||
343 | static struct clk init_clocks_off[] = { | ||
344 | { | ||
345 | .name = "pdma", | ||
346 | .id = -1, | ||
347 | .parent = &clk_pclkd1, | ||
348 | .enable = s5p6442_clk_ip0_ctrl, | ||
349 | .ctrlbit = (1 << 3), | ||
350 | }, | ||
351 | }; | ||
352 | |||
353 | static struct clk init_clocks[] = { | ||
354 | { | ||
355 | .name = "systimer", | ||
356 | .id = -1, | ||
357 | .parent = &clk_pclkd1, | ||
358 | .enable = s5p6442_clk_ip3_ctrl, | ||
359 | .ctrlbit = (1<<16), | ||
360 | }, { | ||
361 | .name = "uart", | ||
362 | .id = 0, | ||
363 | .parent = &clk_pclkd1, | ||
364 | .enable = s5p6442_clk_ip3_ctrl, | ||
365 | .ctrlbit = (1<<17), | ||
366 | }, { | ||
367 | .name = "uart", | ||
368 | .id = 1, | ||
369 | .parent = &clk_pclkd1, | ||
370 | .enable = s5p6442_clk_ip3_ctrl, | ||
371 | .ctrlbit = (1<<18), | ||
372 | }, { | ||
373 | .name = "uart", | ||
374 | .id = 2, | ||
375 | .parent = &clk_pclkd1, | ||
376 | .enable = s5p6442_clk_ip3_ctrl, | ||
377 | .ctrlbit = (1<<19), | ||
378 | }, { | ||
379 | .name = "watchdog", | ||
380 | .id = -1, | ||
381 | .parent = &clk_pclkd1, | ||
382 | .enable = s5p6442_clk_ip3_ctrl, | ||
383 | .ctrlbit = (1 << 22), | ||
384 | }, { | ||
385 | .name = "timers", | ||
386 | .id = -1, | ||
387 | .parent = &clk_pclkd1, | ||
388 | .enable = s5p6442_clk_ip3_ctrl, | ||
389 | .ctrlbit = (1<<23), | ||
390 | }, | ||
391 | }; | ||
392 | |||
393 | static struct clk *clks[] __initdata = { | ||
394 | &clk_ext, | ||
395 | &clk_epll, | ||
396 | &clk_mout_apll.clk, | ||
397 | &clk_mout_mpll.clk, | ||
398 | &clk_mout_epll.clk, | ||
399 | &clk_mout_d0.clk, | ||
400 | &clk_mout_d0sync.clk, | ||
401 | &clk_mout_d1.clk, | ||
402 | &clk_mout_d1sync.clk, | ||
403 | &clk_hclkd0, | ||
404 | &clk_pclkd0, | ||
405 | &clk_hclkd1, | ||
406 | &clk_pclkd1, | ||
407 | }; | ||
408 | |||
409 | void __init s5p6442_register_clocks(void) | ||
410 | { | ||
411 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | ||
412 | |||
413 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | ||
414 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | ||
415 | |||
416 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
417 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
418 | |||
419 | s3c_pwmclk_init(); | ||
420 | } | ||
diff --git a/arch/arm/mach-s5p6442/cpu.c b/arch/arm/mach-s5p6442/cpu.c deleted file mode 100644 index 842af86bda6d..000000000000 --- a/arch/arm/mach-s5p6442/cpu.c +++ /dev/null | |||
@@ -1,143 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/cpu.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/timer.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/sysdev.h> | ||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/sched.h> | ||
23 | |||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/map.h> | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
28 | #include <asm/proc-fns.h> | ||
29 | |||
30 | #include <mach/hardware.h> | ||
31 | #include <mach/map.h> | ||
32 | #include <asm/irq.h> | ||
33 | |||
34 | #include <plat/regs-serial.h> | ||
35 | #include <mach/regs-clock.h> | ||
36 | |||
37 | #include <plat/cpu.h> | ||
38 | #include <plat/devs.h> | ||
39 | #include <plat/clock.h> | ||
40 | #include <plat/s5p6442.h> | ||
41 | |||
42 | /* Initial IO mappings */ | ||
43 | |||
44 | static struct map_desc s5p6442_iodesc[] __initdata = { | ||
45 | { | ||
46 | .virtual = (unsigned long)S5P_VA_SYSTIMER, | ||
47 | .pfn = __phys_to_pfn(S5P6442_PA_SYSTIMER), | ||
48 | .length = SZ_16K, | ||
49 | .type = MT_DEVICE, | ||
50 | }, { | ||
51 | .virtual = (unsigned long)S5P_VA_GPIO, | ||
52 | .pfn = __phys_to_pfn(S5P6442_PA_GPIO), | ||
53 | .length = SZ_4K, | ||
54 | .type = MT_DEVICE, | ||
55 | }, { | ||
56 | .virtual = (unsigned long)VA_VIC0, | ||
57 | .pfn = __phys_to_pfn(S5P6442_PA_VIC0), | ||
58 | .length = SZ_16K, | ||
59 | .type = MT_DEVICE, | ||
60 | }, { | ||
61 | .virtual = (unsigned long)VA_VIC1, | ||
62 | .pfn = __phys_to_pfn(S5P6442_PA_VIC1), | ||
63 | .length = SZ_16K, | ||
64 | .type = MT_DEVICE, | ||
65 | }, { | ||
66 | .virtual = (unsigned long)VA_VIC2, | ||
67 | .pfn = __phys_to_pfn(S5P6442_PA_VIC2), | ||
68 | .length = SZ_16K, | ||
69 | .type = MT_DEVICE, | ||
70 | }, { | ||
71 | .virtual = (unsigned long)S3C_VA_UART, | ||
72 | .pfn = __phys_to_pfn(S3C_PA_UART), | ||
73 | .length = SZ_512K, | ||
74 | .type = MT_DEVICE, | ||
75 | } | ||
76 | }; | ||
77 | |||
78 | static void s5p6442_idle(void) | ||
79 | { | ||
80 | if (!need_resched()) | ||
81 | cpu_do_idle(); | ||
82 | |||
83 | local_irq_enable(); | ||
84 | } | ||
85 | |||
86 | /* | ||
87 | * s5p6442_map_io | ||
88 | * | ||
89 | * register the standard cpu IO areas | ||
90 | */ | ||
91 | |||
92 | void __init s5p6442_map_io(void) | ||
93 | { | ||
94 | iotable_init(s5p6442_iodesc, ARRAY_SIZE(s5p6442_iodesc)); | ||
95 | } | ||
96 | |||
97 | void __init s5p6442_init_clocks(int xtal) | ||
98 | { | ||
99 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | ||
100 | |||
101 | s3c24xx_register_baseclocks(xtal); | ||
102 | s5p_register_clocks(xtal); | ||
103 | s5p6442_register_clocks(); | ||
104 | s5p6442_setup_clocks(); | ||
105 | } | ||
106 | |||
107 | void __init s5p6442_init_irq(void) | ||
108 | { | ||
109 | /* S5P6442 supports 3 VIC */ | ||
110 | u32 vic[3]; | ||
111 | |||
112 | /* VIC0, VIC1, and VIC2: some interrupt reserved */ | ||
113 | vic[0] = 0x7fefffff; | ||
114 | vic[1] = 0X7f389c81; | ||
115 | vic[2] = 0X1bbbcfff; | ||
116 | |||
117 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | ||
118 | } | ||
119 | |||
120 | struct sysdev_class s5p6442_sysclass = { | ||
121 | .name = "s5p6442-core", | ||
122 | }; | ||
123 | |||
124 | static struct sys_device s5p6442_sysdev = { | ||
125 | .cls = &s5p6442_sysclass, | ||
126 | }; | ||
127 | |||
128 | static int __init s5p6442_core_init(void) | ||
129 | { | ||
130 | return sysdev_class_register(&s5p6442_sysclass); | ||
131 | } | ||
132 | |||
133 | core_initcall(s5p6442_core_init); | ||
134 | |||
135 | int __init s5p6442_init(void) | ||
136 | { | ||
137 | printk(KERN_INFO "S5P6442: Initializing architecture\n"); | ||
138 | |||
139 | /* set idle function */ | ||
140 | pm_idle = s5p6442_idle; | ||
141 | |||
142 | return sysdev_register(&s5p6442_sysdev); | ||
143 | } | ||
diff --git a/arch/arm/mach-s5p6442/dev-audio.c b/arch/arm/mach-s5p6442/dev-audio.c deleted file mode 100644 index 8719dc41fe32..000000000000 --- a/arch/arm/mach-s5p6442/dev-audio.c +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/dev-audio.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co. Ltd | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
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 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/dma-mapping.h> | ||
13 | #include <linux/gpio.h> | ||
14 | |||
15 | #include <plat/gpio-cfg.h> | ||
16 | #include <plat/audio.h> | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | #include <mach/dma.h> | ||
20 | #include <mach/irqs.h> | ||
21 | |||
22 | static int s5p6442_cfg_i2s(struct platform_device *pdev) | ||
23 | { | ||
24 | unsigned int base; | ||
25 | |||
26 | /* configure GPIO for i2s port */ | ||
27 | switch (pdev->id) { | ||
28 | case 1: | ||
29 | base = S5P6442_GPC1(0); | ||
30 | break; | ||
31 | |||
32 | case 0: | ||
33 | base = S5P6442_GPC0(0); | ||
34 | break; | ||
35 | |||
36 | default: | ||
37 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | ||
38 | return -EINVAL; | ||
39 | } | ||
40 | |||
41 | s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2)); | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | static const char *rclksrc_v35[] = { | ||
46 | [0] = "busclk", | ||
47 | [1] = "i2sclk", | ||
48 | }; | ||
49 | |||
50 | static struct s3c_audio_pdata i2sv35_pdata = { | ||
51 | .cfg_gpio = s5p6442_cfg_i2s, | ||
52 | .type = { | ||
53 | .i2s = { | ||
54 | .quirks = QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR, | ||
55 | .src_clk = rclksrc_v35, | ||
56 | }, | ||
57 | }, | ||
58 | }; | ||
59 | |||
60 | static struct resource s5p6442_iis0_resource[] = { | ||
61 | [0] = { | ||
62 | .start = S5P6442_PA_I2S0, | ||
63 | .end = S5P6442_PA_I2S0 + 0x100 - 1, | ||
64 | .flags = IORESOURCE_MEM, | ||
65 | }, | ||
66 | [1] = { | ||
67 | .start = DMACH_I2S0_TX, | ||
68 | .end = DMACH_I2S0_TX, | ||
69 | .flags = IORESOURCE_DMA, | ||
70 | }, | ||
71 | [2] = { | ||
72 | .start = DMACH_I2S0_RX, | ||
73 | .end = DMACH_I2S0_RX, | ||
74 | .flags = IORESOURCE_DMA, | ||
75 | }, | ||
76 | [3] = { | ||
77 | .start = DMACH_I2S0S_TX, | ||
78 | .end = DMACH_I2S0S_TX, | ||
79 | .flags = IORESOURCE_DMA, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | struct platform_device s5p6442_device_iis0 = { | ||
84 | .name = "samsung-i2s", | ||
85 | .id = 0, | ||
86 | .num_resources = ARRAY_SIZE(s5p6442_iis0_resource), | ||
87 | .resource = s5p6442_iis0_resource, | ||
88 | .dev = { | ||
89 | .platform_data = &i2sv35_pdata, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | static const char *rclksrc_v3[] = { | ||
94 | [0] = "iis", | ||
95 | [1] = "sclk_audio", | ||
96 | }; | ||
97 | |||
98 | static struct s3c_audio_pdata i2sv3_pdata = { | ||
99 | .cfg_gpio = s5p6442_cfg_i2s, | ||
100 | .type = { | ||
101 | .i2s = { | ||
102 | .src_clk = rclksrc_v3, | ||
103 | }, | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | static struct resource s5p6442_iis1_resource[] = { | ||
108 | [0] = { | ||
109 | .start = S5P6442_PA_I2S1, | ||
110 | .end = S5P6442_PA_I2S1 + 0x100 - 1, | ||
111 | .flags = IORESOURCE_MEM, | ||
112 | }, | ||
113 | [1] = { | ||
114 | .start = DMACH_I2S1_TX, | ||
115 | .end = DMACH_I2S1_TX, | ||
116 | .flags = IORESOURCE_DMA, | ||
117 | }, | ||
118 | [2] = { | ||
119 | .start = DMACH_I2S1_RX, | ||
120 | .end = DMACH_I2S1_RX, | ||
121 | .flags = IORESOURCE_DMA, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | struct platform_device s5p6442_device_iis1 = { | ||
126 | .name = "samsung-i2s", | ||
127 | .id = 1, | ||
128 | .num_resources = ARRAY_SIZE(s5p6442_iis1_resource), | ||
129 | .resource = s5p6442_iis1_resource, | ||
130 | .dev = { | ||
131 | .platform_data = &i2sv3_pdata, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | /* PCM Controller platform_devices */ | ||
136 | |||
137 | static int s5p6442_pcm_cfg_gpio(struct platform_device *pdev) | ||
138 | { | ||
139 | unsigned int base; | ||
140 | |||
141 | switch (pdev->id) { | ||
142 | case 0: | ||
143 | base = S5P6442_GPC0(0); | ||
144 | break; | ||
145 | |||
146 | case 1: | ||
147 | base = S5P6442_GPC1(0); | ||
148 | break; | ||
149 | |||
150 | default: | ||
151 | printk(KERN_DEBUG "Invalid PCM Controller number!"); | ||
152 | return -EINVAL; | ||
153 | } | ||
154 | |||
155 | s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3)); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static struct s3c_audio_pdata s3c_pcm_pdata = { | ||
160 | .cfg_gpio = s5p6442_pcm_cfg_gpio, | ||
161 | }; | ||
162 | |||
163 | static struct resource s5p6442_pcm0_resource[] = { | ||
164 | [0] = { | ||
165 | .start = S5P6442_PA_PCM0, | ||
166 | .end = S5P6442_PA_PCM0 + 0x100 - 1, | ||
167 | .flags = IORESOURCE_MEM, | ||
168 | }, | ||
169 | [1] = { | ||
170 | .start = DMACH_PCM0_TX, | ||
171 | .end = DMACH_PCM0_TX, | ||
172 | .flags = IORESOURCE_DMA, | ||
173 | }, | ||
174 | [2] = { | ||
175 | .start = DMACH_PCM0_RX, | ||
176 | .end = DMACH_PCM0_RX, | ||
177 | .flags = IORESOURCE_DMA, | ||
178 | }, | ||
179 | }; | ||
180 | |||
181 | struct platform_device s5p6442_device_pcm0 = { | ||
182 | .name = "samsung-pcm", | ||
183 | .id = 0, | ||
184 | .num_resources = ARRAY_SIZE(s5p6442_pcm0_resource), | ||
185 | .resource = s5p6442_pcm0_resource, | ||
186 | .dev = { | ||
187 | .platform_data = &s3c_pcm_pdata, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct resource s5p6442_pcm1_resource[] = { | ||
192 | [0] = { | ||
193 | .start = S5P6442_PA_PCM1, | ||
194 | .end = S5P6442_PA_PCM1 + 0x100 - 1, | ||
195 | .flags = IORESOURCE_MEM, | ||
196 | }, | ||
197 | [1] = { | ||
198 | .start = DMACH_PCM1_TX, | ||
199 | .end = DMACH_PCM1_TX, | ||
200 | .flags = IORESOURCE_DMA, | ||
201 | }, | ||
202 | [2] = { | ||
203 | .start = DMACH_PCM1_RX, | ||
204 | .end = DMACH_PCM1_RX, | ||
205 | .flags = IORESOURCE_DMA, | ||
206 | }, | ||
207 | }; | ||
208 | |||
209 | struct platform_device s5p6442_device_pcm1 = { | ||
210 | .name = "samsung-pcm", | ||
211 | .id = 1, | ||
212 | .num_resources = ARRAY_SIZE(s5p6442_pcm1_resource), | ||
213 | .resource = s5p6442_pcm1_resource, | ||
214 | .dev = { | ||
215 | .platform_data = &s3c_pcm_pdata, | ||
216 | }, | ||
217 | }; | ||
diff --git a/arch/arm/mach-s5p6442/dev-spi.c b/arch/arm/mach-s5p6442/dev-spi.c deleted file mode 100644 index cce8c2470709..000000000000 --- a/arch/arm/mach-s5p6442/dev-spi.c +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/dev-spi.c | ||
2 | * | ||
3 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
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 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/dma-mapping.h> | ||
13 | #include <linux/gpio.h> | ||
14 | |||
15 | #include <mach/dma.h> | ||
16 | #include <mach/map.h> | ||
17 | #include <mach/irqs.h> | ||
18 | #include <mach/spi-clocks.h> | ||
19 | |||
20 | #include <plat/s3c64xx-spi.h> | ||
21 | #include <plat/gpio-cfg.h> | ||
22 | |||
23 | static char *spi_src_clks[] = { | ||
24 | [S5P6442_SPI_SRCCLK_PCLK] = "pclk", | ||
25 | [S5P6442_SPI_SRCCLK_SCLK] = "spi_epll", | ||
26 | }; | ||
27 | |||
28 | /* SPI Controller platform_devices */ | ||
29 | |||
30 | /* Since we emulate multi-cs capability, we do not touch the CS. | ||
31 | * The emulated CS is toggled by board specific mechanism, as it can | ||
32 | * be either some immediate GPIO or some signal out of some other | ||
33 | * chip in between ... or some yet another way. | ||
34 | * We simply do not assume anything about CS. | ||
35 | */ | ||
36 | static int s5p6442_spi_cfg_gpio(struct platform_device *pdev) | ||
37 | { | ||
38 | switch (pdev->id) { | ||
39 | case 0: | ||
40 | s3c_gpio_cfgpin(S5P6442_GPB(0), S3C_GPIO_SFN(2)); | ||
41 | s3c_gpio_setpull(S5P6442_GPB(0), S3C_GPIO_PULL_UP); | ||
42 | s3c_gpio_cfgall_range(S5P6442_GPB(2), 2, | ||
43 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
44 | break; | ||
45 | |||
46 | default: | ||
47 | dev_err(&pdev->dev, "Invalid SPI Controller number!"); | ||
48 | return -EINVAL; | ||
49 | } | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static struct resource s5p6442_spi0_resource[] = { | ||
55 | [0] = { | ||
56 | .start = S5P6442_PA_SPI, | ||
57 | .end = S5P6442_PA_SPI + 0x100 - 1, | ||
58 | .flags = IORESOURCE_MEM, | ||
59 | }, | ||
60 | [1] = { | ||
61 | .start = DMACH_SPI0_TX, | ||
62 | .end = DMACH_SPI0_TX, | ||
63 | .flags = IORESOURCE_DMA, | ||
64 | }, | ||
65 | [2] = { | ||
66 | .start = DMACH_SPI0_RX, | ||
67 | .end = DMACH_SPI0_RX, | ||
68 | .flags = IORESOURCE_DMA, | ||
69 | }, | ||
70 | [3] = { | ||
71 | .start = IRQ_SPI0, | ||
72 | .end = IRQ_SPI0, | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static struct s3c64xx_spi_info s5p6442_spi0_pdata = { | ||
78 | .cfg_gpio = s5p6442_spi_cfg_gpio, | ||
79 | .fifo_lvl_mask = 0x1ff, | ||
80 | .rx_lvl_offset = 15, | ||
81 | }; | ||
82 | |||
83 | static u64 spi_dmamask = DMA_BIT_MASK(32); | ||
84 | |||
85 | struct platform_device s5p6442_device_spi = { | ||
86 | .name = "s3c64xx-spi", | ||
87 | .id = 0, | ||
88 | .num_resources = ARRAY_SIZE(s5p6442_spi0_resource), | ||
89 | .resource = s5p6442_spi0_resource, | ||
90 | .dev = { | ||
91 | .dma_mask = &spi_dmamask, | ||
92 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
93 | .platform_data = &s5p6442_spi0_pdata, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | void __init s5p6442_spi_set_info(int cntrlr, int src_clk_nr, int num_cs) | ||
98 | { | ||
99 | struct s3c64xx_spi_info *pd; | ||
100 | |||
101 | /* Reject invalid configuration */ | ||
102 | if (!num_cs || src_clk_nr < 0 | ||
103 | || src_clk_nr > S5P6442_SPI_SRCCLK_SCLK) { | ||
104 | printk(KERN_ERR "%s: Invalid SPI configuration\n", __func__); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | switch (cntrlr) { | ||
109 | case 0: | ||
110 | pd = &s5p6442_spi0_pdata; | ||
111 | break; | ||
112 | default: | ||
113 | printk(KERN_ERR "%s: Invalid SPI controller(%d)\n", | ||
114 | __func__, cntrlr); | ||
115 | return; | ||
116 | } | ||
117 | |||
118 | pd->num_cs = num_cs; | ||
119 | pd->src_clk_nr = src_clk_nr; | ||
120 | pd->src_clk_name = spi_src_clks[src_clk_nr]; | ||
121 | } | ||
diff --git a/arch/arm/mach-s5p6442/dma.c b/arch/arm/mach-s5p6442/dma.c deleted file mode 100644 index 7dfb13654f8a..000000000000 --- a/arch/arm/mach-s5p6442/dma.c +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
3 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/dma-mapping.h> | ||
22 | |||
23 | #include <plat/devs.h> | ||
24 | #include <plat/irqs.h> | ||
25 | |||
26 | #include <mach/map.h> | ||
27 | #include <mach/irqs.h> | ||
28 | |||
29 | #include <plat/s3c-pl330-pdata.h> | ||
30 | |||
31 | static u64 dma_dmamask = DMA_BIT_MASK(32); | ||
32 | |||
33 | static struct resource s5p6442_pdma_resource[] = { | ||
34 | [0] = { | ||
35 | .start = S5P6442_PA_PDMA, | ||
36 | .end = S5P6442_PA_PDMA + SZ_4K, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, | ||
39 | [1] = { | ||
40 | .start = IRQ_PDMA, | ||
41 | .end = IRQ_PDMA, | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | static struct s3c_pl330_platdata s5p6442_pdma_pdata = { | ||
47 | .peri = { | ||
48 | [0] = DMACH_UART0_RX, | ||
49 | [1] = DMACH_UART0_TX, | ||
50 | [2] = DMACH_UART1_RX, | ||
51 | [3] = DMACH_UART1_TX, | ||
52 | [4] = DMACH_UART2_RX, | ||
53 | [5] = DMACH_UART2_TX, | ||
54 | [6] = DMACH_MAX, | ||
55 | [7] = DMACH_MAX, | ||
56 | [8] = DMACH_MAX, | ||
57 | [9] = DMACH_I2S0_RX, | ||
58 | [10] = DMACH_I2S0_TX, | ||
59 | [11] = DMACH_I2S0S_TX, | ||
60 | [12] = DMACH_I2S1_RX, | ||
61 | [13] = DMACH_I2S1_TX, | ||
62 | [14] = DMACH_MAX, | ||
63 | [15] = DMACH_MAX, | ||
64 | [16] = DMACH_SPI0_RX, | ||
65 | [17] = DMACH_SPI0_TX, | ||
66 | [18] = DMACH_MAX, | ||
67 | [19] = DMACH_MAX, | ||
68 | [20] = DMACH_PCM0_RX, | ||
69 | [21] = DMACH_PCM0_TX, | ||
70 | [22] = DMACH_PCM1_RX, | ||
71 | [23] = DMACH_PCM1_TX, | ||
72 | [24] = DMACH_MAX, | ||
73 | [25] = DMACH_MAX, | ||
74 | [26] = DMACH_MAX, | ||
75 | [27] = DMACH_MSM_REQ0, | ||
76 | [28] = DMACH_MSM_REQ1, | ||
77 | [29] = DMACH_MSM_REQ2, | ||
78 | [30] = DMACH_MSM_REQ3, | ||
79 | [31] = DMACH_MAX, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct platform_device s5p6442_device_pdma = { | ||
84 | .name = "s3c-pl330", | ||
85 | .id = -1, | ||
86 | .num_resources = ARRAY_SIZE(s5p6442_pdma_resource), | ||
87 | .resource = s5p6442_pdma_resource, | ||
88 | .dev = { | ||
89 | .dma_mask = &dma_dmamask, | ||
90 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
91 | .platform_data = &s5p6442_pdma_pdata, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | static struct platform_device *s5p6442_dmacs[] __initdata = { | ||
96 | &s5p6442_device_pdma, | ||
97 | }; | ||
98 | |||
99 | static int __init s5p6442_dma_init(void) | ||
100 | { | ||
101 | platform_add_devices(s5p6442_dmacs, ARRAY_SIZE(s5p6442_dmacs)); | ||
102 | |||
103 | return 0; | ||
104 | } | ||
105 | arch_initcall(s5p6442_dma_init); | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/debug-macro.S b/arch/arm/mach-s5p6442/include/mach/debug-macro.S deleted file mode 100644 index e2213205d780..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Based on arch/arm/mach-s3c6400/include/mach/debug-macro.S | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | /* pull in the relevant register and map files. */ | ||
14 | |||
15 | #include <mach/map.h> | ||
16 | #include <plat/regs-serial.h> | ||
17 | |||
18 | .macro addruart, rp, rv | ||
19 | ldr \rp, = S3C_PA_UART | ||
20 | ldr \rv, = S3C_VA_UART | ||
21 | #if CONFIG_DEBUG_S3C_UART != 0 | ||
22 | add \rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART) | ||
23 | add \rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART) | ||
24 | #endif | ||
25 | .endm | ||
26 | |||
27 | #define fifo_full fifo_full_s5pv210 | ||
28 | #define fifo_level fifo_level_s5pv210 | ||
29 | |||
30 | /* include the reset of the code which will do the work, we're only | ||
31 | * compiling for a single cpu processor type so the default of s3c2440 | ||
32 | * will be fine with us. | ||
33 | */ | ||
34 | |||
35 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/dma.h b/arch/arm/mach-s5p6442/include/mach/dma.h deleted file mode 100644 index 81209eb1409b..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/dma.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
3 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __MACH_DMA_H | ||
21 | #define __MACH_DMA_H | ||
22 | |||
23 | /* This platform uses the common S3C DMA API driver for PL330 */ | ||
24 | #include <plat/s3c-dma-pl330.h> | ||
25 | |||
26 | #endif /* __MACH_DMA_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/entry-macro.S b/arch/arm/mach-s5p6442/include/mach/entry-macro.S deleted file mode 100644 index 6d574edbf1ae..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Low-level IRQ helper macros for the Samsung S5P6442 | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <asm/hardware/vic.h> | ||
14 | #include <mach/map.h> | ||
15 | #include <plat/irqs.h> | ||
16 | |||
17 | .macro disable_fiq | ||
18 | .endm | ||
19 | |||
20 | .macro get_irqnr_preamble, base, tmp | ||
21 | ldr \base, =VA_VIC0 | ||
22 | .endm | ||
23 | |||
24 | .macro arch_ret_to_user, tmp1, tmp2 | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
28 | |||
29 | @ check the vic0 | ||
30 | mov \irqnr, # S5P_IRQ_OFFSET + 31 | ||
31 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
32 | teq \irqstat, #0 | ||
33 | |||
34 | @ otherwise try vic1 | ||
35 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
36 | addeq \irqnr, \irqnr, #32 | ||
37 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
38 | teqeq \irqstat, #0 | ||
39 | |||
40 | @ otherwise try vic2 | ||
41 | addeq \tmp, \base, #(VA_VIC2 - VA_VIC0) | ||
42 | addeq \irqnr, \irqnr, #32 | ||
43 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
44 | teqeq \irqstat, #0 | ||
45 | |||
46 | clzne \irqstat, \irqstat | ||
47 | subne \irqnr, \irqnr, \irqstat | ||
48 | .endm | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/gpio.h b/arch/arm/mach-s5p6442/include/mach/gpio.h deleted file mode 100644 index b8715df2fdab..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/gpio.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/gpio.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - GPIO lib support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_GPIO_H | ||
14 | #define __ASM_ARCH_GPIO_H __FILE__ | ||
15 | |||
16 | #define gpio_get_value __gpio_get_value | ||
17 | #define gpio_set_value __gpio_set_value | ||
18 | #define gpio_cansleep __gpio_cansleep | ||
19 | #define gpio_to_irq __gpio_to_irq | ||
20 | |||
21 | /* GPIO bank sizes */ | ||
22 | #define S5P6442_GPIO_A0_NR (8) | ||
23 | #define S5P6442_GPIO_A1_NR (2) | ||
24 | #define S5P6442_GPIO_B_NR (4) | ||
25 | #define S5P6442_GPIO_C0_NR (5) | ||
26 | #define S5P6442_GPIO_C1_NR (5) | ||
27 | #define S5P6442_GPIO_D0_NR (2) | ||
28 | #define S5P6442_GPIO_D1_NR (6) | ||
29 | #define S5P6442_GPIO_E0_NR (8) | ||
30 | #define S5P6442_GPIO_E1_NR (5) | ||
31 | #define S5P6442_GPIO_F0_NR (8) | ||
32 | #define S5P6442_GPIO_F1_NR (8) | ||
33 | #define S5P6442_GPIO_F2_NR (8) | ||
34 | #define S5P6442_GPIO_F3_NR (6) | ||
35 | #define S5P6442_GPIO_G0_NR (7) | ||
36 | #define S5P6442_GPIO_G1_NR (7) | ||
37 | #define S5P6442_GPIO_G2_NR (7) | ||
38 | #define S5P6442_GPIO_H0_NR (8) | ||
39 | #define S5P6442_GPIO_H1_NR (8) | ||
40 | #define S5P6442_GPIO_H2_NR (8) | ||
41 | #define S5P6442_GPIO_H3_NR (8) | ||
42 | #define S5P6442_GPIO_J0_NR (8) | ||
43 | #define S5P6442_GPIO_J1_NR (6) | ||
44 | #define S5P6442_GPIO_J2_NR (8) | ||
45 | #define S5P6442_GPIO_J3_NR (8) | ||
46 | #define S5P6442_GPIO_J4_NR (5) | ||
47 | |||
48 | /* GPIO bank numbers */ | ||
49 | |||
50 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra | ||
51 | * space for debugging purposes so that any accidental | ||
52 | * change from one gpio bank to another can be caught. | ||
53 | */ | ||
54 | |||
55 | #define S5P6442_GPIO_NEXT(__gpio) \ | ||
56 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | ||
57 | |||
58 | enum s5p_gpio_number { | ||
59 | S5P6442_GPIO_A0_START = 0, | ||
60 | S5P6442_GPIO_A1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_A0), | ||
61 | S5P6442_GPIO_B_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_A1), | ||
62 | S5P6442_GPIO_C0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_B), | ||
63 | S5P6442_GPIO_C1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_C0), | ||
64 | S5P6442_GPIO_D0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_C1), | ||
65 | S5P6442_GPIO_D1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_D0), | ||
66 | S5P6442_GPIO_E0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_D1), | ||
67 | S5P6442_GPIO_E1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_E0), | ||
68 | S5P6442_GPIO_F0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_E1), | ||
69 | S5P6442_GPIO_F1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_F0), | ||
70 | S5P6442_GPIO_F2_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_F1), | ||
71 | S5P6442_GPIO_F3_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_F2), | ||
72 | S5P6442_GPIO_G0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_F3), | ||
73 | S5P6442_GPIO_G1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_G0), | ||
74 | S5P6442_GPIO_G2_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_G1), | ||
75 | S5P6442_GPIO_H0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_G2), | ||
76 | S5P6442_GPIO_H1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_H0), | ||
77 | S5P6442_GPIO_H2_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_H1), | ||
78 | S5P6442_GPIO_H3_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_H2), | ||
79 | S5P6442_GPIO_J0_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_H3), | ||
80 | S5P6442_GPIO_J1_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_J0), | ||
81 | S5P6442_GPIO_J2_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_J1), | ||
82 | S5P6442_GPIO_J3_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_J2), | ||
83 | S5P6442_GPIO_J4_START = S5P6442_GPIO_NEXT(S5P6442_GPIO_J3), | ||
84 | }; | ||
85 | |||
86 | /* S5P6442 GPIO number definitions. */ | ||
87 | #define S5P6442_GPA0(_nr) (S5P6442_GPIO_A0_START + (_nr)) | ||
88 | #define S5P6442_GPA1(_nr) (S5P6442_GPIO_A1_START + (_nr)) | ||
89 | #define S5P6442_GPB(_nr) (S5P6442_GPIO_B_START + (_nr)) | ||
90 | #define S5P6442_GPC0(_nr) (S5P6442_GPIO_C0_START + (_nr)) | ||
91 | #define S5P6442_GPC1(_nr) (S5P6442_GPIO_C1_START + (_nr)) | ||
92 | #define S5P6442_GPD0(_nr) (S5P6442_GPIO_D0_START + (_nr)) | ||
93 | #define S5P6442_GPD1(_nr) (S5P6442_GPIO_D1_START + (_nr)) | ||
94 | #define S5P6442_GPE0(_nr) (S5P6442_GPIO_E0_START + (_nr)) | ||
95 | #define S5P6442_GPE1(_nr) (S5P6442_GPIO_E1_START + (_nr)) | ||
96 | #define S5P6442_GPF0(_nr) (S5P6442_GPIO_F0_START + (_nr)) | ||
97 | #define S5P6442_GPF1(_nr) (S5P6442_GPIO_F1_START + (_nr)) | ||
98 | #define S5P6442_GPF2(_nr) (S5P6442_GPIO_F2_START + (_nr)) | ||
99 | #define S5P6442_GPF3(_nr) (S5P6442_GPIO_F3_START + (_nr)) | ||
100 | #define S5P6442_GPG0(_nr) (S5P6442_GPIO_G0_START + (_nr)) | ||
101 | #define S5P6442_GPG1(_nr) (S5P6442_GPIO_G1_START + (_nr)) | ||
102 | #define S5P6442_GPG2(_nr) (S5P6442_GPIO_G2_START + (_nr)) | ||
103 | #define S5P6442_GPH0(_nr) (S5P6442_GPIO_H0_START + (_nr)) | ||
104 | #define S5P6442_GPH1(_nr) (S5P6442_GPIO_H1_START + (_nr)) | ||
105 | #define S5P6442_GPH2(_nr) (S5P6442_GPIO_H2_START + (_nr)) | ||
106 | #define S5P6442_GPH3(_nr) (S5P6442_GPIO_H3_START + (_nr)) | ||
107 | #define S5P6442_GPJ0(_nr) (S5P6442_GPIO_J0_START + (_nr)) | ||
108 | #define S5P6442_GPJ1(_nr) (S5P6442_GPIO_J1_START + (_nr)) | ||
109 | #define S5P6442_GPJ2(_nr) (S5P6442_GPIO_J2_START + (_nr)) | ||
110 | #define S5P6442_GPJ3(_nr) (S5P6442_GPIO_J3_START + (_nr)) | ||
111 | #define S5P6442_GPJ4(_nr) (S5P6442_GPIO_J4_START + (_nr)) | ||
112 | |||
113 | /* the end of the S5P6442 specific gpios */ | ||
114 | #define S5P6442_GPIO_END (S5P6442_GPJ4(S5P6442_GPIO_J4_NR) + 1) | ||
115 | #define S3C_GPIO_END S5P6442_GPIO_END | ||
116 | |||
117 | /* define the number of gpios we need to the one after the GPJ4() range */ | ||
118 | #define ARCH_NR_GPIOS (S5P6442_GPJ4(S5P6442_GPIO_J4_NR) + \ | ||
119 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | ||
120 | |||
121 | #include <asm-generic/gpio.h> | ||
122 | |||
123 | #endif /* __ASM_ARCH_GPIO_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/hardware.h b/arch/arm/mach-s5p6442/include/mach/hardware.h deleted file mode 100644 index 8cd7b67b49d4..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/hardware.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/hardware.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - Hardware support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_HARDWARE_H | ||
14 | #define __ASM_ARCH_HARDWARE_H __FILE__ | ||
15 | |||
16 | /* currently nothing here, placeholder */ | ||
17 | |||
18 | #endif /* __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/io.h b/arch/arm/mach-s5p6442/include/mach/io.h deleted file mode 100644 index 5d2195ad0b67..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/io.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* arch/arm/mach-s5p6442/include/mach/io.h | ||
2 | * | ||
3 | * Copyright 2008-2010 Ben Dooks <ben-linux@fluff.org> | ||
4 | * | ||
5 | * Default IO routines for S5P6442 | ||
6 | */ | ||
7 | |||
8 | #ifndef __ASM_ARM_ARCH_IO_H | ||
9 | #define __ASM_ARM_ARCH_IO_H | ||
10 | |||
11 | /* No current ISA/PCI bus support. */ | ||
12 | #define __io(a) __typesafe_io(a) | ||
13 | #define __mem_pci(a) (a) | ||
14 | |||
15 | #define IO_SPACE_LIMIT (0xFFFFFFFF) | ||
16 | |||
17 | #endif | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/irqs.h b/arch/arm/mach-s5p6442/include/mach/irqs.h deleted file mode 100644 index 3fbc6c3ad2da..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/irqs.h +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/irqs.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - IRQ definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_IRQS_H | ||
14 | #define __ASM_ARCH_IRQS_H __FILE__ | ||
15 | |||
16 | #include <plat/irqs.h> | ||
17 | |||
18 | /* VIC0 */ | ||
19 | #define IRQ_EINT16_31 S5P_IRQ_VIC0(16) | ||
20 | #define IRQ_BATF S5P_IRQ_VIC0(17) | ||
21 | #define IRQ_MDMA S5P_IRQ_VIC0(18) | ||
22 | #define IRQ_PDMA S5P_IRQ_VIC0(19) | ||
23 | #define IRQ_TIMER0_VIC S5P_IRQ_VIC0(21) | ||
24 | #define IRQ_TIMER1_VIC S5P_IRQ_VIC0(22) | ||
25 | #define IRQ_TIMER2_VIC S5P_IRQ_VIC0(23) | ||
26 | #define IRQ_TIMER3_VIC S5P_IRQ_VIC0(24) | ||
27 | #define IRQ_TIMER4_VIC S5P_IRQ_VIC0(25) | ||
28 | #define IRQ_SYSTIMER S5P_IRQ_VIC0(26) | ||
29 | #define IRQ_WDT S5P_IRQ_VIC0(27) | ||
30 | #define IRQ_RTC_ALARM S5P_IRQ_VIC0(28) | ||
31 | #define IRQ_RTC_TIC S5P_IRQ_VIC0(29) | ||
32 | #define IRQ_GPIOINT S5P_IRQ_VIC0(30) | ||
33 | |||
34 | /* VIC1 */ | ||
35 | #define IRQ_PMU S5P_IRQ_VIC1(0) | ||
36 | #define IRQ_ONENAND S5P_IRQ_VIC1(7) | ||
37 | #define IRQ_UART0 S5P_IRQ_VIC1(10) | ||
38 | #define IRQ_UART1 S5P_IRQ_VIC1(11) | ||
39 | #define IRQ_UART2 S5P_IRQ_VIC1(12) | ||
40 | #define IRQ_SPI0 S5P_IRQ_VIC1(15) | ||
41 | #define IRQ_IIC S5P_IRQ_VIC1(19) | ||
42 | #define IRQ_IIC1 S5P_IRQ_VIC1(20) | ||
43 | #define IRQ_IIC2 S5P_IRQ_VIC1(21) | ||
44 | #define IRQ_OTG S5P_IRQ_VIC1(24) | ||
45 | #define IRQ_MSM S5P_IRQ_VIC1(25) | ||
46 | #define IRQ_HSMMC0 S5P_IRQ_VIC1(26) | ||
47 | #define IRQ_HSMMC1 S5P_IRQ_VIC1(27) | ||
48 | #define IRQ_HSMMC2 S5P_IRQ_VIC1(28) | ||
49 | #define IRQ_COMMRX S5P_IRQ_VIC1(29) | ||
50 | #define IRQ_COMMTX S5P_IRQ_VIC1(30) | ||
51 | |||
52 | /* VIC2 */ | ||
53 | #define IRQ_LCD0 S5P_IRQ_VIC2(0) | ||
54 | #define IRQ_LCD1 S5P_IRQ_VIC2(1) | ||
55 | #define IRQ_LCD2 S5P_IRQ_VIC2(2) | ||
56 | #define IRQ_LCD3 S5P_IRQ_VIC2(3) | ||
57 | #define IRQ_ROTATOR S5P_IRQ_VIC2(4) | ||
58 | #define IRQ_FIMC0 S5P_IRQ_VIC2(5) | ||
59 | #define IRQ_FIMC1 S5P_IRQ_VIC2(6) | ||
60 | #define IRQ_FIMC2 S5P_IRQ_VIC2(7) | ||
61 | #define IRQ_JPEG S5P_IRQ_VIC2(8) | ||
62 | #define IRQ_3D S5P_IRQ_VIC2(10) | ||
63 | #define IRQ_Mixer S5P_IRQ_VIC2(11) | ||
64 | #define IRQ_MFC S5P_IRQ_VIC2(14) | ||
65 | #define IRQ_TVENC S5P_IRQ_VIC2(15) | ||
66 | #define IRQ_I2S0 S5P_IRQ_VIC2(16) | ||
67 | #define IRQ_I2S1 S5P_IRQ_VIC2(17) | ||
68 | #define IRQ_RP S5P_IRQ_VIC2(19) | ||
69 | #define IRQ_PCM0 S5P_IRQ_VIC2(20) | ||
70 | #define IRQ_PCM1 S5P_IRQ_VIC2(21) | ||
71 | #define IRQ_ADC S5P_IRQ_VIC2(23) | ||
72 | #define IRQ_PENDN S5P_IRQ_VIC2(24) | ||
73 | #define IRQ_KEYPAD S5P_IRQ_VIC2(25) | ||
74 | #define IRQ_SSS_INT S5P_IRQ_VIC2(27) | ||
75 | #define IRQ_SSS_HASH S5P_IRQ_VIC2(28) | ||
76 | #define IRQ_VIC_END S5P_IRQ_VIC2(31) | ||
77 | |||
78 | #define S5P_IRQ_EINT_BASE (IRQ_VIC_END + 1) | ||
79 | |||
80 | #define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) | ||
81 | #define S5P_EINT_BASE2 (S5P_IRQ_EINT_BASE) | ||
82 | |||
83 | /* Set the default NR_IRQS */ | ||
84 | |||
85 | #define NR_IRQS (IRQ_EINT(31) + 1) | ||
86 | |||
87 | #endif /* __ASM_ARCH_IRQS_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h deleted file mode 100644 index 058dab4482a1..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/map.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/map.h | ||
2 | * | ||
3 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - Memory map definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MAP_H | ||
14 | #define __ASM_ARCH_MAP_H __FILE__ | ||
15 | |||
16 | #include <plat/map-base.h> | ||
17 | #include <plat/map-s5p.h> | ||
18 | |||
19 | #define S5P6442_PA_SDRAM 0x20000000 | ||
20 | |||
21 | #define S5P6442_PA_I2S0 0xC0B00000 | ||
22 | #define S5P6442_PA_I2S1 0xF2200000 | ||
23 | |||
24 | #define S5P6442_PA_CHIPID 0xE0000000 | ||
25 | |||
26 | #define S5P6442_PA_SYSCON 0xE0100000 | ||
27 | |||
28 | #define S5P6442_PA_GPIO 0xE0200000 | ||
29 | |||
30 | #define S5P6442_PA_VIC0 0xE4000000 | ||
31 | #define S5P6442_PA_VIC1 0xE4100000 | ||
32 | #define S5P6442_PA_VIC2 0xE4200000 | ||
33 | |||
34 | #define S5P6442_PA_SROMC 0xE7000000 | ||
35 | |||
36 | #define S5P6442_PA_MDMA 0xE8000000 | ||
37 | #define S5P6442_PA_PDMA 0xE9000000 | ||
38 | |||
39 | #define S5P6442_PA_TIMER 0xEA000000 | ||
40 | |||
41 | #define S5P6442_PA_SYSTIMER 0xEA100000 | ||
42 | |||
43 | #define S5P6442_PA_WATCHDOG 0xEA200000 | ||
44 | |||
45 | #define S5P6442_PA_UART 0xEC000000 | ||
46 | |||
47 | #define S5P6442_PA_IIC0 0xEC100000 | ||
48 | |||
49 | #define S5P6442_PA_SPI 0xEC300000 | ||
50 | |||
51 | #define S5P6442_PA_PCM0 0xF2400000 | ||
52 | #define S5P6442_PA_PCM1 0xF2500000 | ||
53 | |||
54 | /* Compatibiltiy Defines */ | ||
55 | |||
56 | #define S3C_PA_IIC S5P6442_PA_IIC0 | ||
57 | #define S3C_PA_WDT S5P6442_PA_WATCHDOG | ||
58 | |||
59 | #define S5P_PA_CHIPID S5P6442_PA_CHIPID | ||
60 | #define S5P_PA_SDRAM S5P6442_PA_SDRAM | ||
61 | #define S5P_PA_SROMC S5P6442_PA_SROMC | ||
62 | #define S5P_PA_SYSCON S5P6442_PA_SYSCON | ||
63 | #define S5P_PA_TIMER S5P6442_PA_TIMER | ||
64 | |||
65 | /* UART */ | ||
66 | |||
67 | #define S3C_PA_UART S5P6442_PA_UART | ||
68 | |||
69 | #define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET)) | ||
70 | #define S5P_PA_UART0 S5P_PA_UART(0) | ||
71 | #define S5P_PA_UART1 S5P_PA_UART(1) | ||
72 | #define S5P_PA_UART2 S5P_PA_UART(2) | ||
73 | |||
74 | #define S5P_SZ_UART SZ_256 | ||
75 | |||
76 | #endif /* __ASM_ARCH_MAP_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-s5p6442/include/mach/memory.h deleted file mode 100644 index cfe259dded33..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/memory.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - Memory definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
17 | #define CONSISTENT_DMA_SIZE SZ_8M | ||
18 | |||
19 | #endif /* __ASM_ARCH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/pwm-clock.h b/arch/arm/mach-s5p6442/include/mach/pwm-clock.h deleted file mode 100644 index 2724b37def31..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/pwm-clock.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/pwm-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
7 | * Copyright 2008 Simtec Electronics | ||
8 | * Ben Dooks <ben@simtec.co.uk> | ||
9 | * http://armlinux.simtec.co.uk/ | ||
10 | * | ||
11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h | ||
12 | * | ||
13 | * S5P6442 - pwm clock and timer support | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_PWMCLK_H | ||
21 | #define __ASM_ARCH_PWMCLK_H __FILE__ | ||
22 | |||
23 | /** | ||
24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | ||
25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. | ||
26 | * | ||
27 | * Return true if the given configuration from TCFG1 is a TCLK instead | ||
28 | * any of the TDIV clocks. | ||
29 | */ | ||
30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | ||
31 | { | ||
32 | return tcfg == S3C64XX_TCFG1_MUX_TCLK; | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * tcfg_to_divisor() - convert tcfg1 setting to a divisor | ||
37 | * @tcfg1: The tcfg1 setting, shifted down. | ||
38 | * | ||
39 | * Get the divisor value for the given tcfg1 setting. We assume the | ||
40 | * caller has already checked to see if this is not a TCLK source. | ||
41 | */ | ||
42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | ||
43 | { | ||
44 | return 1 << tcfg1; | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * pwm_tdiv_has_div1() - does the tdiv setting have a /1 | ||
49 | * | ||
50 | * Return true if we have a /1 in the tdiv setting. | ||
51 | */ | ||
52 | static inline unsigned int pwm_tdiv_has_div1(void) | ||
53 | { | ||
54 | return 1; | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * pwm_tdiv_div_bits() - calculate TCFG1 divisor value. | ||
59 | * @div: The divisor to calculate the bit information for. | ||
60 | * | ||
61 | * Turn a divisor into the necessary bit field for TCFG1. | ||
62 | */ | ||
63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | ||
64 | { | ||
65 | return ilog2(div); | ||
66 | } | ||
67 | |||
68 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK | ||
69 | |||
70 | #endif /* __ASM_ARCH_PWMCLK_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/regs-clock.h b/arch/arm/mach-s5p6442/include/mach/regs-clock.h deleted file mode 100644 index 00828a336991..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/regs-clock.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/regs-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - Clock register definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_CLOCK_H | ||
14 | #define __ASM_ARCH_REGS_CLOCK_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #define S5P_CLKREG(x) (S3C_VA_SYS + (x)) | ||
19 | |||
20 | #define S5P_APLL_LOCK S5P_CLKREG(0x00) | ||
21 | #define S5P_MPLL_LOCK S5P_CLKREG(0x08) | ||
22 | #define S5P_EPLL_LOCK S5P_CLKREG(0x10) | ||
23 | #define S5P_VPLL_LOCK S5P_CLKREG(0x20) | ||
24 | |||
25 | #define S5P_APLL_CON S5P_CLKREG(0x100) | ||
26 | #define S5P_MPLL_CON S5P_CLKREG(0x108) | ||
27 | #define S5P_EPLL_CON S5P_CLKREG(0x110) | ||
28 | #define S5P_VPLL_CON S5P_CLKREG(0x120) | ||
29 | |||
30 | #define S5P_CLK_SRC0 S5P_CLKREG(0x200) | ||
31 | #define S5P_CLK_SRC1 S5P_CLKREG(0x204) | ||
32 | #define S5P_CLK_SRC2 S5P_CLKREG(0x208) | ||
33 | #define S5P_CLK_SRC3 S5P_CLKREG(0x20C) | ||
34 | #define S5P_CLK_SRC4 S5P_CLKREG(0x210) | ||
35 | #define S5P_CLK_SRC5 S5P_CLKREG(0x214) | ||
36 | #define S5P_CLK_SRC6 S5P_CLKREG(0x218) | ||
37 | |||
38 | #define S5P_CLK_SRC_MASK0 S5P_CLKREG(0x280) | ||
39 | #define S5P_CLK_SRC_MASK1 S5P_CLKREG(0x284) | ||
40 | |||
41 | #define S5P_CLK_DIV0 S5P_CLKREG(0x300) | ||
42 | #define S5P_CLK_DIV1 S5P_CLKREG(0x304) | ||
43 | #define S5P_CLK_DIV2 S5P_CLKREG(0x308) | ||
44 | #define S5P_CLK_DIV3 S5P_CLKREG(0x30C) | ||
45 | #define S5P_CLK_DIV4 S5P_CLKREG(0x310) | ||
46 | #define S5P_CLK_DIV5 S5P_CLKREG(0x314) | ||
47 | #define S5P_CLK_DIV6 S5P_CLKREG(0x318) | ||
48 | |||
49 | #define S5P_CLKGATE_IP0 S5P_CLKREG(0x460) | ||
50 | #define S5P_CLKGATE_IP3 S5P_CLKREG(0x46C) | ||
51 | |||
52 | /* CLK_OUT */ | ||
53 | #define S5P_CLK_OUT_SHIFT (12) | ||
54 | #define S5P_CLK_OUT_MASK (0x1F << S5P_CLK_OUT_SHIFT) | ||
55 | #define S5P_CLK_OUT S5P_CLKREG(0x500) | ||
56 | |||
57 | #define S5P_CLK_DIV_STAT0 S5P_CLKREG(0x1000) | ||
58 | #define S5P_CLK_DIV_STAT1 S5P_CLKREG(0x1004) | ||
59 | |||
60 | #define S5P_CLK_MUX_STAT0 S5P_CLKREG(0x1100) | ||
61 | #define S5P_CLK_MUX_STAT1 S5P_CLKREG(0x1104) | ||
62 | |||
63 | #define S5P_MDNIE_SEL S5P_CLKREG(0x7008) | ||
64 | |||
65 | /* Register Bit definition */ | ||
66 | #define S5P_EPLL_EN (1<<31) | ||
67 | #define S5P_EPLL_MASK 0xffffffff | ||
68 | #define S5P_EPLLVAL(_m, _p, _s) ((_m) << 16 | ((_p) << 8) | ((_s))) | ||
69 | |||
70 | /* CLKDIV0 */ | ||
71 | #define S5P_CLKDIV0_APLL_SHIFT (0) | ||
72 | #define S5P_CLKDIV0_APLL_MASK (0x7 << S5P_CLKDIV0_APLL_SHIFT) | ||
73 | #define S5P_CLKDIV0_A2M_SHIFT (4) | ||
74 | #define S5P_CLKDIV0_A2M_MASK (0x7 << S5P_CLKDIV0_A2M_SHIFT) | ||
75 | #define S5P_CLKDIV0_D0CLK_SHIFT (16) | ||
76 | #define S5P_CLKDIV0_D0CLK_MASK (0xF << S5P_CLKDIV0_D0CLK_SHIFT) | ||
77 | #define S5P_CLKDIV0_P0CLK_SHIFT (20) | ||
78 | #define S5P_CLKDIV0_P0CLK_MASK (0x7 << S5P_CLKDIV0_P0CLK_SHIFT) | ||
79 | #define S5P_CLKDIV0_D1CLK_SHIFT (24) | ||
80 | #define S5P_CLKDIV0_D1CLK_MASK (0xF << S5P_CLKDIV0_D1CLK_SHIFT) | ||
81 | #define S5P_CLKDIV0_P1CLK_SHIFT (28) | ||
82 | #define S5P_CLKDIV0_P1CLK_MASK (0x7 << S5P_CLKDIV0_P1CLK_SHIFT) | ||
83 | |||
84 | /* Clock MUX status Registers */ | ||
85 | #define S5P_CLK_MUX_STAT0_APLL_SHIFT (0) | ||
86 | #define S5P_CLK_MUX_STAT0_APLL_MASK (0x7 << S5P_CLK_MUX_STAT0_APLL_SHIFT) | ||
87 | #define S5P_CLK_MUX_STAT0_MPLL_SHIFT (4) | ||
88 | #define S5P_CLK_MUX_STAT0_MPLL_MASK (0x7 << S5P_CLK_MUX_STAT0_MPLL_SHIFT) | ||
89 | #define S5P_CLK_MUX_STAT0_EPLL_SHIFT (8) | ||
90 | #define S5P_CLK_MUX_STAT0_EPLL_MASK (0x7 << S5P_CLK_MUX_STAT0_EPLL_SHIFT) | ||
91 | #define S5P_CLK_MUX_STAT0_VPLL_SHIFT (12) | ||
92 | #define S5P_CLK_MUX_STAT0_VPLL_MASK (0x7 << S5P_CLK_MUX_STAT0_VPLL_SHIFT) | ||
93 | #define S5P_CLK_MUX_STAT0_MUXARM_SHIFT (16) | ||
94 | #define S5P_CLK_MUX_STAT0_MUXARM_MASK (0x7 << S5P_CLK_MUX_STAT0_MUXARM_SHIFT) | ||
95 | #define S5P_CLK_MUX_STAT0_MUXD0_SHIFT (20) | ||
96 | #define S5P_CLK_MUX_STAT0_MUXD0_MASK (0x7 << S5P_CLK_MUX_STAT0_MUXD0_SHIFT) | ||
97 | #define S5P_CLK_MUX_STAT0_MUXD1_SHIFT (24) | ||
98 | #define S5P_CLK_MUX_STAT0_MUXD1_MASK (0x7 << S5P_CLK_MUX_STAT0_MUXD1_SHIFT) | ||
99 | #define S5P_CLK_MUX_STAT1_D1SYNC_SHIFT (24) | ||
100 | #define S5P_CLK_MUX_STAT1_D1SYNC_MASK (0x7 << S5P_CLK_MUX_STAT1_D1SYNC_SHIFT) | ||
101 | #define S5P_CLK_MUX_STAT1_D0SYNC_SHIFT (28) | ||
102 | #define S5P_CLK_MUX_STAT1_D0SYNC_MASK (0x7 << S5P_CLK_MUX_STAT1_D0SYNC_SHIFT) | ||
103 | |||
104 | #endif /* __ASM_ARCH_REGS_CLOCK_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/regs-irq.h b/arch/arm/mach-s5p6442/include/mach/regs-irq.h deleted file mode 100644 index 73782b52a83b..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/regs-irq.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/regs-irq.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - IRQ register definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_IRQ_H | ||
14 | #define __ASM_ARCH_REGS_IRQ_H __FILE__ | ||
15 | |||
16 | #include <asm/hardware/vic.h> | ||
17 | #include <mach/map.h> | ||
18 | |||
19 | #endif /* __ASM_ARCH_REGS_IRQ_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/spi-clocks.h b/arch/arm/mach-s5p6442/include/mach/spi-clocks.h deleted file mode 100644 index 7fd88205a97c..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/spi-clocks.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/spi-clocks.h | ||
2 | * | ||
3 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
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 | |||
11 | #ifndef __S5P6442_PLAT_SPI_CLKS_H | ||
12 | #define __S5P6442_PLAT_SPI_CLKS_H __FILE__ | ||
13 | |||
14 | #define S5P6442_SPI_SRCCLK_PCLK 0 | ||
15 | #define S5P6442_SPI_SRCCLK_SCLK 1 | ||
16 | |||
17 | #endif /* __S5P6442_PLAT_SPI_CLKS_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/system.h b/arch/arm/mach-s5p6442/include/mach/system.h deleted file mode 100644 index c30c1cc1b97e..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/system.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/system.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - system support header | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_SYSTEM_H | ||
14 | #define __ASM_ARCH_SYSTEM_H __FILE__ | ||
15 | |||
16 | #include <plat/system-reset.h> | ||
17 | |||
18 | static void arch_idle(void) | ||
19 | { | ||
20 | /* nothing here yet */ | ||
21 | } | ||
22 | |||
23 | #endif /* __ASM_ARCH_SYSTEM_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/tick.h b/arch/arm/mach-s5p6442/include/mach/tick.h deleted file mode 100644 index e1d4cabf8297..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/tick.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/tick.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Based on arch/arm/mach-s3c6400/include/mach/tick.h | ||
7 | * | ||
8 | * S5P6442 - Timer tick support definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_TICK_H | ||
16 | #define __ASM_ARCH_TICK_H __FILE__ | ||
17 | |||
18 | static inline u32 s3c24xx_ostimer_pending(void) | ||
19 | { | ||
20 | u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS); | ||
21 | return pend & (1 << (IRQ_TIMER4_VIC - S5P_IRQ_VIC0(0))); | ||
22 | } | ||
23 | |||
24 | #define TICK_MAX (0xffffffff) | ||
25 | |||
26 | #endif /* __ASM_ARCH_TICK_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/timex.h b/arch/arm/mach-s5p6442/include/mach/timex.h deleted file mode 100644 index ff8f2fcadeb7..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/timex.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* arch/arm/mach-s5p6442/include/mach/timex.h | ||
2 | * | ||
3 | * Copyright (c) 2003-2010 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S5P6442 - time parameters | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_TIMEX_H | ||
14 | #define __ASM_ARCH_TIMEX_H | ||
15 | |||
16 | /* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it | ||
17 | * a variable is useless. It seems as long as we make our timers an | ||
18 | * exact multiple of HZ, any value that makes a 1->1 correspondence | ||
19 | * for the time conversion functions to/from jiffies is acceptable. | ||
20 | */ | ||
21 | |||
22 | #define CLOCK_TICK_RATE 12000000 | ||
23 | |||
24 | #endif /* __ASM_ARCH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/uncompress.h b/arch/arm/mach-s5p6442/include/mach/uncompress.h deleted file mode 100644 index 5ac7cbeeb987..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/uncompress.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5P6442 - uncompress code | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
14 | #define __ASM_ARCH_UNCOMPRESS_H | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | #include <plat/uncompress.h> | ||
18 | |||
19 | static void arch_detect_cpu(void) | ||
20 | { | ||
21 | /* we do not need to do any cpu detection here at the moment. */ | ||
22 | } | ||
23 | |||
24 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/vmalloc.h b/arch/arm/mach-s5p6442/include/mach/vmalloc.h deleted file mode 100644 index 4aa55e55ac47..000000000000 --- a/arch/arm/mach-s5p6442/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* arch/arm/mach-s5p6442/include/mach/vmalloc.h | ||
2 | * | ||
3 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * S5P6442 vmalloc definition | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_VMALLOC_H | ||
13 | #define __ASM_ARCH_VMALLOC_H | ||
14 | |||
15 | #define VMALLOC_END 0xF6000000UL | ||
16 | |||
17 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s5p6442/init.c b/arch/arm/mach-s5p6442/init.c deleted file mode 100644 index 1874bdb71e1d..000000000000 --- a/arch/arm/mach-s5p6442/init.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/s5p6442-init.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/serial_core.h> | ||
15 | |||
16 | #include <plat/cpu.h> | ||
17 | #include <plat/devs.h> | ||
18 | #include <plat/s5p6442.h> | ||
19 | #include <plat/regs-serial.h> | ||
20 | |||
21 | static struct s3c24xx_uart_clksrc s5p6442_serial_clocks[] = { | ||
22 | [0] = { | ||
23 | .name = "pclk", | ||
24 | .divisor = 1, | ||
25 | .min_baud = 0, | ||
26 | .max_baud = 0, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | /* uart registration process */ | ||
31 | void __init s5p6442_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
32 | { | ||
33 | struct s3c2410_uartcfg *tcfg = cfg; | ||
34 | u32 ucnt; | ||
35 | |||
36 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | ||
37 | if (!tcfg->clocks) { | ||
38 | tcfg->clocks = s5p6442_serial_clocks; | ||
39 | tcfg->clocks_size = ARRAY_SIZE(s5p6442_serial_clocks); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); | ||
44 | } | ||
diff --git a/arch/arm/mach-s5p6442/mach-smdk6442.c b/arch/arm/mach-s5p6442/mach-smdk6442.c deleted file mode 100644 index eaf6b9c489ff..000000000000 --- a/arch/arm/mach-s5p6442/mach-smdk6442.c +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/mach-smdk6442.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
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 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/serial_core.h> | ||
15 | #include <linux/i2c.h> | ||
16 | |||
17 | #include <asm/mach/arch.h> | ||
18 | #include <asm/mach/map.h> | ||
19 | #include <asm/setup.h> | ||
20 | #include <asm/mach-types.h> | ||
21 | |||
22 | #include <mach/map.h> | ||
23 | #include <mach/regs-clock.h> | ||
24 | |||
25 | #include <plat/regs-serial.h> | ||
26 | #include <plat/s5p6442.h> | ||
27 | #include <plat/devs.h> | ||
28 | #include <plat/cpu.h> | ||
29 | #include <plat/iic.h> | ||
30 | |||
31 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
32 | #define SMDK6442_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
33 | S3C2410_UCON_RXILEVEL | \ | ||
34 | S3C2410_UCON_TXIRQMODE | \ | ||
35 | S3C2410_UCON_RXIRQMODE | \ | ||
36 | S3C2410_UCON_RXFIFO_TOI | \ | ||
37 | S3C2443_UCON_RXERR_IRQEN) | ||
38 | |||
39 | #define SMDK6442_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
40 | |||
41 | #define SMDK6442_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
42 | S5PV210_UFCON_TXTRIG4 | \ | ||
43 | S5PV210_UFCON_RXTRIG4) | ||
44 | |||
45 | static struct s3c2410_uartcfg smdk6442_uartcfgs[] __initdata = { | ||
46 | [0] = { | ||
47 | .hwport = 0, | ||
48 | .flags = 0, | ||
49 | .ucon = SMDK6442_UCON_DEFAULT, | ||
50 | .ulcon = SMDK6442_ULCON_DEFAULT, | ||
51 | .ufcon = SMDK6442_UFCON_DEFAULT, | ||
52 | }, | ||
53 | [1] = { | ||
54 | .hwport = 1, | ||
55 | .flags = 0, | ||
56 | .ucon = SMDK6442_UCON_DEFAULT, | ||
57 | .ulcon = SMDK6442_ULCON_DEFAULT, | ||
58 | .ufcon = SMDK6442_UFCON_DEFAULT, | ||
59 | }, | ||
60 | [2] = { | ||
61 | .hwport = 2, | ||
62 | .flags = 0, | ||
63 | .ucon = SMDK6442_UCON_DEFAULT, | ||
64 | .ulcon = SMDK6442_ULCON_DEFAULT, | ||
65 | .ufcon = SMDK6442_UFCON_DEFAULT, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct platform_device *smdk6442_devices[] __initdata = { | ||
70 | &s3c_device_i2c0, | ||
71 | &samsung_asoc_dma, | ||
72 | &s5p6442_device_iis0, | ||
73 | &s3c_device_wdt, | ||
74 | }; | ||
75 | |||
76 | static struct i2c_board_info smdk6442_i2c_devs0[] __initdata = { | ||
77 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
78 | }; | ||
79 | |||
80 | static void __init smdk6442_map_io(void) | ||
81 | { | ||
82 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | ||
83 | s3c24xx_init_clocks(12000000); | ||
84 | s3c24xx_init_uarts(smdk6442_uartcfgs, ARRAY_SIZE(smdk6442_uartcfgs)); | ||
85 | } | ||
86 | |||
87 | static void __init smdk6442_machine_init(void) | ||
88 | { | ||
89 | s3c_i2c0_set_platdata(NULL); | ||
90 | i2c_register_board_info(0, smdk6442_i2c_devs0, | ||
91 | ARRAY_SIZE(smdk6442_i2c_devs0)); | ||
92 | platform_add_devices(smdk6442_devices, ARRAY_SIZE(smdk6442_devices)); | ||
93 | } | ||
94 | |||
95 | MACHINE_START(SMDK6442, "SMDK6442") | ||
96 | /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ | ||
97 | .boot_params = S5P_PA_SDRAM + 0x100, | ||
98 | .init_irq = s5p6442_init_irq, | ||
99 | .map_io = smdk6442_map_io, | ||
100 | .init_machine = smdk6442_machine_init, | ||
101 | .timer = &s3c24xx_timer, | ||
102 | MACHINE_END | ||
diff --git a/arch/arm/mach-s5p6442/setup-i2c0.c b/arch/arm/mach-s5p6442/setup-i2c0.c deleted file mode 100644 index aad85656b0cc..000000000000 --- a/arch/arm/mach-s5p6442/setup-i2c0.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/setup-i2c0.c | ||
2 | * | ||
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * I2C0 GPIO configuration. | ||
7 | * | ||
8 | * Based on plat-s3c64xx/setup-i2c0.c | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/gpio.h> | ||
18 | |||
19 | struct platform_device; /* don't need the contents */ | ||
20 | |||
21 | #include <plat/gpio-cfg.h> | ||
22 | #include <plat/iic.h> | ||
23 | |||
24 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | ||
25 | { | ||
26 | s3c_gpio_cfgall_range(S5P6442_GPD1(0), 2, | ||
27 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
28 | } | ||
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index bf0b02414e5b..7c6cb4fa47a9 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c | |||
@@ -99,8 +99,11 @@ static void sdi0_configure(void) | |||
99 | gpio_direction_output(sdi0_vsel, 0); | 99 | gpio_direction_output(sdi0_vsel, 0); |
100 | gpio_direction_output(sdi0_en, 1); | 100 | gpio_direction_output(sdi0_en, 1); |
101 | 101 | ||
102 | /* Add the device */ | 102 | /* Add the device, force v2 to subrevision 1 */ |
103 | db8500_add_sdi0(&mop500_sdi0_data); | 103 | if (cpu_is_u8500v2()) |
104 | db8500_add_sdi0(&mop500_sdi0_data, 0x10480180); | ||
105 | else | ||
106 | db8500_add_sdi0(&mop500_sdi0_data, 0); | ||
104 | } | 107 | } |
105 | 108 | ||
106 | void mop500_sdi_tc35892_init(void) | 109 | void mop500_sdi_tc35892_init(void) |
@@ -188,13 +191,18 @@ static struct mmci_platform_data mop500_sdi4_data = { | |||
188 | 191 | ||
189 | void __init mop500_sdi_init(void) | 192 | void __init mop500_sdi_init(void) |
190 | { | 193 | { |
194 | u32 periphid = 0; | ||
195 | |||
196 | /* v2 has a new version of this block that need to be forced */ | ||
197 | if (cpu_is_u8500v2()) | ||
198 | periphid = 0x10480180; | ||
191 | /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ | 199 | /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ |
192 | if (!cpu_is_u8500v10()) | 200 | if (!cpu_is_u8500v10()) |
193 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; | 201 | mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; |
194 | db8500_add_sdi2(&mop500_sdi2_data); | 202 | db8500_add_sdi2(&mop500_sdi2_data, periphid); |
195 | 203 | ||
196 | /* On-board eMMC */ | 204 | /* On-board eMMC */ |
197 | db8500_add_sdi4(&mop500_sdi4_data); | 205 | db8500_add_sdi4(&mop500_sdi4_data, periphid); |
198 | 206 | ||
199 | if (machine_is_hrefv60()) { | 207 | if (machine_is_hrefv60()) { |
200 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; | 208 | mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO; |
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index c719b5a1d913..7825705033bf 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -28,18 +28,20 @@ dbx500_add_msp_spi(const char *name, resource_size_t base, int irq, | |||
28 | 28 | ||
29 | static inline struct amba_device * | 29 | static inline struct amba_device * |
30 | dbx500_add_spi(const char *name, resource_size_t base, int irq, | 30 | dbx500_add_spi(const char *name, resource_size_t base, int irq, |
31 | struct spi_master_cntlr *pdata) | 31 | struct spi_master_cntlr *pdata, |
32 | u32 periphid) | ||
32 | { | 33 | { |
33 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 34 | return dbx500_add_amba_device(name, base, irq, pdata, periphid); |
34 | } | 35 | } |
35 | 36 | ||
36 | struct mmci_platform_data; | 37 | struct mmci_platform_data; |
37 | 38 | ||
38 | static inline struct amba_device * | 39 | static inline struct amba_device * |
39 | dbx500_add_sdi(const char *name, resource_size_t base, int irq, | 40 | dbx500_add_sdi(const char *name, resource_size_t base, int irq, |
40 | struct mmci_platform_data *pdata) | 41 | struct mmci_platform_data *pdata, |
42 | u32 periphid) | ||
41 | { | 43 | { |
42 | return dbx500_add_amba_device(name, base, irq, pdata, 0); | 44 | return dbx500_add_amba_device(name, base, irq, pdata, periphid); |
43 | } | 45 | } |
44 | 46 | ||
45 | struct amba_pl011_data; | 47 | struct amba_pl011_data; |
diff --git a/arch/arm/mach-ux500/devices-db5500.h b/arch/arm/mach-ux500/devices-db5500.h index 94627f7783b0..0c4bccd02b90 100644 --- a/arch/arm/mach-ux500/devices-db5500.h +++ b/arch/arm/mach-ux500/devices-db5500.h | |||
@@ -38,24 +38,34 @@ | |||
38 | ux500_add_usb(U5500_USBOTG_BASE, IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) | 38 | ux500_add_usb(U5500_USBOTG_BASE, IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) |
39 | 39 | ||
40 | #define db5500_add_sdi0(pdata) \ | 40 | #define db5500_add_sdi0(pdata) \ |
41 | dbx500_add_sdi("sdi0", U5500_SDI0_BASE, IRQ_DB5500_SDMMC0, pdata) | 41 | dbx500_add_sdi("sdi0", U5500_SDI0_BASE, IRQ_DB5500_SDMMC0, pdata, \ |
42 | 0x10480180) | ||
42 | #define db5500_add_sdi1(pdata) \ | 43 | #define db5500_add_sdi1(pdata) \ |
43 | dbx500_add_sdi("sdi1", U5500_SDI1_BASE, IRQ_DB5500_SDMMC1, pdata) | 44 | dbx500_add_sdi("sdi1", U5500_SDI1_BASE, IRQ_DB5500_SDMMC1, pdata, \ |
45 | 0x10480180) | ||
44 | #define db5500_add_sdi2(pdata) \ | 46 | #define db5500_add_sdi2(pdata) \ |
45 | dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata) | 47 | dbx500_add_sdi("sdi2", U5500_SDI2_BASE, IRQ_DB5500_SDMMC2, pdata \ |
48 | 0x10480180) | ||
46 | #define db5500_add_sdi3(pdata) \ | 49 | #define db5500_add_sdi3(pdata) \ |
47 | dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata) | 50 | dbx500_add_sdi("sdi3", U5500_SDI3_BASE, IRQ_DB5500_SDMMC3, pdata \ |
51 | 0x10480180) | ||
48 | #define db5500_add_sdi4(pdata) \ | 52 | #define db5500_add_sdi4(pdata) \ |
49 | dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata) | 53 | dbx500_add_sdi("sdi4", U5500_SDI4_BASE, IRQ_DB5500_SDMMC4, pdata \ |
54 | 0x10480180) | ||
50 | 55 | ||
56 | /* This one has a bad peripheral ID in the U5500 silicon */ | ||
51 | #define db5500_add_spi0(pdata) \ | 57 | #define db5500_add_spi0(pdata) \ |
52 | dbx500_add_spi("spi0", U5500_SPI0_BASE, IRQ_DB5500_SPI0, pdata) | 58 | dbx500_add_spi("spi0", U5500_SPI0_BASE, IRQ_DB5500_SPI0, pdata, \ |
59 | 0x10080023) | ||
53 | #define db5500_add_spi1(pdata) \ | 60 | #define db5500_add_spi1(pdata) \ |
54 | dbx500_add_spi("spi1", U5500_SPI1_BASE, IRQ_DB5500_SPI1, pdata) | 61 | dbx500_add_spi("spi1", U5500_SPI1_BASE, IRQ_DB5500_SPI1, pdata, \ |
62 | 0x10080023) | ||
55 | #define db5500_add_spi2(pdata) \ | 63 | #define db5500_add_spi2(pdata) \ |
56 | dbx500_add_spi("spi2", U5500_SPI2_BASE, IRQ_DB5500_SPI2, pdata) | 64 | dbx500_add_spi("spi2", U5500_SPI2_BASE, IRQ_DB5500_SPI2, pdata \ |
65 | 0x10080023) | ||
57 | #define db5500_add_spi3(pdata) \ | 66 | #define db5500_add_spi3(pdata) \ |
58 | dbx500_add_spi("spi3", U5500_SPI3_BASE, IRQ_DB5500_SPI3, pdata) | 67 | dbx500_add_spi("spi3", U5500_SPI3_BASE, IRQ_DB5500_SPI3, pdata \ |
68 | 0x10080023) | ||
59 | 69 | ||
60 | #define db5500_add_uart0(plat) \ | 70 | #define db5500_add_uart0(plat) \ |
61 | dbx500_add_uart("uart0", U5500_UART0_BASE, IRQ_DB5500_UART0, plat) | 71 | dbx500_add_uart("uart0", U5500_UART0_BASE, IRQ_DB5500_UART0, plat) |
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h index 9cc6f8f5d3e6..cbd4a9ae8109 100644 --- a/arch/arm/mach-ux500/devices-db8500.h +++ b/arch/arm/mach-ux500/devices-db8500.h | |||
@@ -25,7 +25,7 @@ static inline struct amba_device * | |||
25 | db8500_add_ssp(const char *name, resource_size_t base, int irq, | 25 | db8500_add_ssp(const char *name, resource_size_t base, int irq, |
26 | struct pl022_ssp_controller *pdata) | 26 | struct pl022_ssp_controller *pdata) |
27 | { | 27 | { |
28 | return dbx500_add_amba_device(name, base, irq, pdata, SSP_PER_ID); | 28 | return dbx500_add_amba_device(name, base, irq, pdata, 0); |
29 | } | 29 | } |
30 | 30 | ||
31 | 31 | ||
@@ -64,18 +64,18 @@ db8500_add_ssp(const char *name, resource_size_t base, int irq, | |||
64 | #define db8500_add_usb(rx_cfg, tx_cfg) \ | 64 | #define db8500_add_usb(rx_cfg, tx_cfg) \ |
65 | ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) | 65 | ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) |
66 | 66 | ||
67 | #define db8500_add_sdi0(pdata) \ | 67 | #define db8500_add_sdi0(pdata, pid) \ |
68 | dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata) | 68 | dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata, pid) |
69 | #define db8500_add_sdi1(pdata) \ | 69 | #define db8500_add_sdi1(pdata, pid) \ |
70 | dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata) | 70 | dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata, pid) |
71 | #define db8500_add_sdi2(pdata) \ | 71 | #define db8500_add_sdi2(pdata, pid) \ |
72 | dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata) | 72 | dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata, pid) |
73 | #define db8500_add_sdi3(pdata) \ | 73 | #define db8500_add_sdi3(pdata, pid) \ |
74 | dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata) | 74 | dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata, pid) |
75 | #define db8500_add_sdi4(pdata) \ | 75 | #define db8500_add_sdi4(pdata, pid) \ |
76 | dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata) | 76 | dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata, pid) |
77 | #define db8500_add_sdi5(pdata) \ | 77 | #define db8500_add_sdi5(pdata, pid) \ |
78 | dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata) | 78 | dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata, pid) |
79 | 79 | ||
80 | #define db8500_add_ssp0(pdata) \ | 80 | #define db8500_add_ssp0(pdata) \ |
81 | db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata) | 81 | db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata) |
@@ -83,13 +83,13 @@ db8500_add_ssp(const char *name, resource_size_t base, int irq, | |||
83 | db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata) | 83 | db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata) |
84 | 84 | ||
85 | #define db8500_add_spi0(pdata) \ | 85 | #define db8500_add_spi0(pdata) \ |
86 | dbx500_add_spi("spi0", U8500_SPI0_BASE, IRQ_DB8500_SPI0, pdata) | 86 | dbx500_add_spi("spi0", U8500_SPI0_BASE, IRQ_DB8500_SPI0, pdata, 0) |
87 | #define db8500_add_spi1(pdata) \ | 87 | #define db8500_add_spi1(pdata) \ |
88 | dbx500_add_spi("spi1", U8500_SPI1_BASE, IRQ_DB8500_SPI1, pdata) | 88 | dbx500_add_spi("spi1", U8500_SPI1_BASE, IRQ_DB8500_SPI1, pdata, 0) |
89 | #define db8500_add_spi2(pdata) \ | 89 | #define db8500_add_spi2(pdata) \ |
90 | dbx500_add_spi("spi2", U8500_SPI2_BASE, IRQ_DB8500_SPI2, pdata) | 90 | dbx500_add_spi("spi2", U8500_SPI2_BASE, IRQ_DB8500_SPI2, pdata, 0) |
91 | #define db8500_add_spi3(pdata) \ | 91 | #define db8500_add_spi3(pdata) \ |
92 | dbx500_add_spi("spi3", U8500_SPI3_BASE, IRQ_DB8500_SPI3, pdata) | 92 | dbx500_add_spi("spi3", U8500_SPI3_BASE, IRQ_DB8500_SPI3, pdata, 0) |
93 | 93 | ||
94 | #define db8500_add_uart0(pdata) \ | 94 | #define db8500_add_uart0(pdata) \ |
95 | dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata) | 95 | dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata) |
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index 2c6f71049f2e..470ac52663d6 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h | |||
@@ -29,9 +29,6 @@ | |||
29 | #include <mach/db8500-regs.h> | 29 | #include <mach/db8500-regs.h> |
30 | #include <mach/db5500-regs.h> | 30 | #include <mach/db5500-regs.h> |
31 | 31 | ||
32 | /* ST-Ericsson modified pl022 id */ | ||
33 | #define SSP_PER_ID 0x01080022 | ||
34 | |||
35 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
36 | 33 | ||
37 | #include <mach/id.h> | 34 | #include <mach/id.h> |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index c96fa1b3f49f..73b4a8b66a57 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -176,6 +176,7 @@ ENDPROC(v6_coherent_kern_range) | |||
176 | */ | 176 | */ |
177 | ENTRY(v6_flush_kern_dcache_area) | 177 | ENTRY(v6_flush_kern_dcache_area) |
178 | add r1, r0, r1 | 178 | add r1, r0, r1 |
179 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | ||
179 | 1: | 180 | 1: |
180 | #ifdef HARVARD_CACHE | 181 | #ifdef HARVARD_CACHE |
181 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line | 182 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index dc18d81ef8ce..d32f02b61866 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -221,6 +221,8 @@ ENDPROC(v7_coherent_user_range) | |||
221 | ENTRY(v7_flush_kern_dcache_area) | 221 | ENTRY(v7_flush_kern_dcache_area) |
222 | dcache_line_size r2, r3 | 222 | dcache_line_size r2, r3 |
223 | add r1, r0, r1 | 223 | add r1, r0, r1 |
224 | sub r3, r2, #1 | ||
225 | bic r0, r0, r3 | ||
224 | 1: | 226 | 1: |
225 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line | 227 | mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line |
226 | add r0, r0, r2 | 228 | add r0, r0, r2 |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index b0ee9ba3cfab..8bfae964b133 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -24,9 +24,7 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm); | |||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * We fork()ed a process, and we need a new context for the child | 26 | * We fork()ed a process, and we need a new context for the child |
27 | * to run in. We reserve version 0 for initial tasks so we will | 27 | * to run in. |
28 | * always allocate an ASID. The ASID 0 is reserved for the TTBR | ||
29 | * register changing sequence. | ||
30 | */ | 28 | */ |
31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 29 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
32 | { | 30 | { |
@@ -36,8 +34,11 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
36 | 34 | ||
37 | static void flush_context(void) | 35 | static void flush_context(void) |
38 | { | 36 | { |
39 | /* set the reserved ASID before flushing the TLB */ | 37 | u32 ttb; |
40 | asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0)); | 38 | /* Copy TTBR1 into TTBR0 */ |
39 | asm volatile("mrc p15, 0, %0, c2, c0, 1\n" | ||
40 | "mcr p15, 0, %0, c2, c0, 0" | ||
41 | : "=r" (ttb)); | ||
41 | isb(); | 42 | isb(); |
42 | local_flush_tlb_all(); | 43 | local_flush_tlb_all(); |
43 | if (icache_is_vivt_asid_tagged()) { | 44 | if (icache_is_vivt_asid_tagged()) { |
@@ -93,7 +94,7 @@ static void reset_context(void *info) | |||
93 | return; | 94 | return; |
94 | 95 | ||
95 | smp_rmb(); | 96 | smp_rmb(); |
96 | asid = cpu_last_asid + cpu + 1; | 97 | asid = cpu_last_asid + cpu; |
97 | 98 | ||
98 | flush_context(); | 99 | flush_context(); |
99 | set_mm_context(mm, asid); | 100 | set_mm_context(mm, asid); |
@@ -143,13 +144,13 @@ void __new_context(struct mm_struct *mm) | |||
143 | * to start a new version and flush the TLB. | 144 | * to start a new version and flush the TLB. |
144 | */ | 145 | */ |
145 | if (unlikely((asid & ~ASID_MASK) == 0)) { | 146 | if (unlikely((asid & ~ASID_MASK) == 0)) { |
146 | asid = cpu_last_asid + smp_processor_id() + 1; | 147 | asid = cpu_last_asid + smp_processor_id(); |
147 | flush_context(); | 148 | flush_context(); |
148 | #ifdef CONFIG_SMP | 149 | #ifdef CONFIG_SMP |
149 | smp_wmb(); | 150 | smp_wmb(); |
150 | smp_call_function(reset_context, NULL, 1); | 151 | smp_call_function(reset_context, NULL, 1); |
151 | #endif | 152 | #endif |
152 | cpu_last_asid += NR_CPUS; | 153 | cpu_last_asid += NR_CPUS - 1; |
153 | } | 154 | } |
154 | 155 | ||
155 | set_mm_context(mm, asid); | 156 | set_mm_context(mm, asid); |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 3f17ea146f0e..2c2cce9cd8c8 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -15,12 +15,14 @@ | |||
15 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
16 | #include <linux/nodemask.h> | 16 | #include <linux/nodemask.h> |
17 | #include <linux/initrd.h> | 17 | #include <linux/initrd.h> |
18 | #include <linux/of_fdt.h> | ||
18 | #include <linux/highmem.h> | 19 | #include <linux/highmem.h> |
19 | #include <linux/gfp.h> | 20 | #include <linux/gfp.h> |
20 | #include <linux/memblock.h> | 21 | #include <linux/memblock.h> |
21 | #include <linux/sort.h> | 22 | #include <linux/sort.h> |
22 | 23 | ||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/prom.h> | ||
24 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
25 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
26 | #include <asm/sizes.h> | 28 | #include <asm/sizes.h> |
@@ -71,6 +73,14 @@ static int __init parse_tag_initrd2(const struct tag *tag) | |||
71 | 73 | ||
72 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | 74 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); |
73 | 75 | ||
76 | #ifdef CONFIG_OF_FLATTREE | ||
77 | void __init early_init_dt_setup_initrd_arch(unsigned long start, unsigned long end) | ||
78 | { | ||
79 | phys_initrd_start = start; | ||
80 | phys_initrd_size = end - start; | ||
81 | } | ||
82 | #endif /* CONFIG_OF_FLATTREE */ | ||
83 | |||
74 | /* | 84 | /* |
75 | * This keeps memory configuration data used by a couple memory | 85 | * This keeps memory configuration data used by a couple memory |
76 | * initialization functions, as well as show_mem() for the skipping | 86 | * initialization functions, as well as show_mem() for the skipping |
@@ -273,13 +283,15 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, | |||
273 | free_area_init_node(0, zone_size, min, zhole_size); | 283 | free_area_init_node(0, zone_size, min, zhole_size); |
274 | } | 284 | } |
275 | 285 | ||
276 | #ifndef CONFIG_SPARSEMEM | 286 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID |
277 | int pfn_valid(unsigned long pfn) | 287 | int pfn_valid(unsigned long pfn) |
278 | { | 288 | { |
279 | return memblock_is_memory(pfn << PAGE_SHIFT); | 289 | return memblock_is_memory(pfn << PAGE_SHIFT); |
280 | } | 290 | } |
281 | EXPORT_SYMBOL(pfn_valid); | 291 | EXPORT_SYMBOL(pfn_valid); |
292 | #endif | ||
282 | 293 | ||
294 | #ifndef CONFIG_SPARSEMEM | ||
283 | static void arm_memory_present(void) | 295 | static void arm_memory_present(void) |
284 | { | 296 | { |
285 | } | 297 | } |
@@ -334,6 +346,7 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | |||
334 | #endif | 346 | #endif |
335 | 347 | ||
336 | arm_mm_memblock_reserve(); | 348 | arm_mm_memblock_reserve(); |
349 | arm_dt_memblock_reserve(); | ||
337 | 350 | ||
338 | /* reserve any platform specific memblock areas */ | 351 | /* reserve any platform specific memblock areas */ |
339 | if (mdesc->reserve) | 352 | if (mdesc->reserve) |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index d2384106af9c..5b3d7d543659 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -5,14 +5,9 @@ extern pmd_t *top_pmd; | |||
5 | 5 | ||
6 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) | 6 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) |
7 | 7 | ||
8 | static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt) | ||
9 | { | ||
10 | return pmd_offset(pud_offset(pgd, virt), virt); | ||
11 | } | ||
12 | |||
13 | static inline pmd_t *pmd_off_k(unsigned long virt) | 8 | static inline pmd_t *pmd_off_k(unsigned long virt) |
14 | { | 9 | { |
15 | return pmd_off(pgd_offset_k(virt), virt); | 10 | return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt); |
16 | } | 11 | } |
17 | 12 | ||
18 | struct mem_type { | 13 | struct mem_type { |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 08a92368d9d3..9d9e736c2b4f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -763,15 +763,12 @@ static void __init sanity_check_meminfo(void) | |||
763 | { | 763 | { |
764 | int i, j, highmem = 0; | 764 | int i, j, highmem = 0; |
765 | 765 | ||
766 | lowmem_limit = __pa(vmalloc_min - 1) + 1; | ||
767 | memblock_set_current_limit(lowmem_limit); | ||
768 | |||
769 | for (i = 0, j = 0; i < meminfo.nr_banks; i++) { | 766 | for (i = 0, j = 0; i < meminfo.nr_banks; i++) { |
770 | struct membank *bank = &meminfo.bank[j]; | 767 | struct membank *bank = &meminfo.bank[j]; |
771 | *bank = meminfo.bank[i]; | 768 | *bank = meminfo.bank[i]; |
772 | 769 | ||
773 | #ifdef CONFIG_HIGHMEM | 770 | #ifdef CONFIG_HIGHMEM |
774 | if (__va(bank->start) > vmalloc_min || | 771 | if (__va(bank->start) >= vmalloc_min || |
775 | __va(bank->start) < (void *)PAGE_OFFSET) | 772 | __va(bank->start) < (void *)PAGE_OFFSET) |
776 | highmem = 1; | 773 | highmem = 1; |
777 | 774 | ||
@@ -829,6 +826,9 @@ static void __init sanity_check_meminfo(void) | |||
829 | bank->size = newsize; | 826 | bank->size = newsize; |
830 | } | 827 | } |
831 | #endif | 828 | #endif |
829 | if (!bank->highmem && bank->start + bank->size > lowmem_limit) | ||
830 | lowmem_limit = bank->start + bank->size; | ||
831 | |||
832 | j++; | 832 | j++; |
833 | } | 833 | } |
834 | #ifdef CONFIG_HIGHMEM | 834 | #ifdef CONFIG_HIGHMEM |
@@ -852,6 +852,7 @@ static void __init sanity_check_meminfo(void) | |||
852 | } | 852 | } |
853 | #endif | 853 | #endif |
854 | meminfo.nr_banks = j; | 854 | meminfo.nr_banks = j; |
855 | memblock_set_current_limit(lowmem_limit); | ||
855 | } | 856 | } |
856 | 857 | ||
857 | static inline void prepare_page_table(void) | 858 | static inline void prepare_page_table(void) |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index ab17cc0d3fa7..1d2b8451bf25 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -213,7 +213,9 @@ __v6_setup: | |||
213 | mcr p15, 0, r0, c2, c0, 2 @ TTB control register | 213 | mcr p15, 0, r0, c2, c0, 2 @ TTB control register |
214 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) | 214 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) |
215 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) | 215 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) |
216 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 216 | ALT_SMP(orr r8, r8, #TTB_FLAGS_SMP) |
217 | ALT_UP(orr r8, r8, #TTB_FLAGS_UP) | ||
218 | mcr p15, 0, r8, c2, c0, 1 @ load TTB1 | ||
217 | #endif /* CONFIG_MMU */ | 219 | #endif /* CONFIG_MMU */ |
218 | adr r5, v6_crval | 220 | adr r5, v6_crval |
219 | ldmia r5, {r5, r6} | 221 | ldmia r5, {r5, r6} |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index babfba09c89f..b3b566ec83d3 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -108,18 +108,16 @@ ENTRY(cpu_v7_switch_mm) | |||
108 | #ifdef CONFIG_ARM_ERRATA_430973 | 108 | #ifdef CONFIG_ARM_ERRATA_430973 |
109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
110 | #endif | 110 | #endif |
111 | #ifdef CONFIG_ARM_ERRATA_754322 | 111 | mrc p15, 0, r2, c2, c0, 1 @ load TTB 1 |
112 | dsb | 112 | mcr p15, 0, r2, c2, c0, 0 @ into TTB 0 |
113 | #endif | ||
114 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
115 | isb | ||
116 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
117 | isb | 113 | isb |
118 | #ifdef CONFIG_ARM_ERRATA_754322 | 114 | #ifdef CONFIG_ARM_ERRATA_754322 |
119 | dsb | 115 | dsb |
120 | #endif | 116 | #endif |
121 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 117 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
122 | isb | 118 | isb |
119 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
120 | isb | ||
123 | #endif | 121 | #endif |
124 | mov pc, lr | 122 | mov pc, lr |
125 | ENDPROC(cpu_v7_switch_mm) | 123 | ENDPROC(cpu_v7_switch_mm) |
@@ -368,7 +366,9 @@ __v7_setup: | |||
368 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register | 366 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register |
369 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) | 367 | ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) |
370 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) | 368 | ALT_UP(orr r4, r4, #TTB_FLAGS_UP) |
371 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 369 | ALT_SMP(orr r8, r8, #TTB_FLAGS_SMP) |
370 | ALT_UP(orr r8, r8, #TTB_FLAGS_UP) | ||
371 | mcr p15, 0, r8, c2, c0, 1 @ load TTB1 | ||
372 | ldr r5, =PRRR @ PRRR | 372 | ldr r5, =PRRR @ PRRR |
373 | ldr r6, =NMRR @ NMRR | 373 | ldr r6, =NMRR @ NMRR |
374 | mcr p15, 0, r5, c10, c2, 0 @ write PRRR | 374 | mcr p15, 0, r5, c10, c2, 0 @ write PRRR |
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 6751bcf7b888..e98f5c5c7879 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | config PLAT_S5P | 8 | config PLAT_S5P |
9 | bool | 9 | bool |
10 | depends on (ARCH_S5P64X0 || ARCH_S5P6442 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS4) | 10 | depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS4) |
11 | default y | 11 | default y |
12 | select ARM_VIC if !ARCH_EXYNOS4 | 12 | select ARM_VIC if !ARCH_EXYNOS4 |
13 | select ARM_GIC if ARCH_EXYNOS4 | 13 | select ARM_GIC if ARCH_EXYNOS4 |
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c index 5cf5e721e6ca..bbc2aa7449ca 100644 --- a/arch/arm/plat-s5p/cpu.c +++ b/arch/arm/plat-s5p/cpu.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
23 | #include <plat/s5p6440.h> | 23 | #include <plat/s5p6440.h> |
24 | #include <plat/s5p6442.h> | ||
25 | #include <plat/s5p6450.h> | 24 | #include <plat/s5p6450.h> |
26 | #include <plat/s5pc100.h> | 25 | #include <plat/s5pc100.h> |
27 | #include <plat/s5pv210.h> | 26 | #include <plat/s5pv210.h> |
@@ -30,7 +29,6 @@ | |||
30 | /* table of supported CPUs */ | 29 | /* table of supported CPUs */ |
31 | 30 | ||
32 | static const char name_s5p6440[] = "S5P6440"; | 31 | static const char name_s5p6440[] = "S5P6440"; |
33 | static const char name_s5p6442[] = "S5P6442"; | ||
34 | static const char name_s5p6450[] = "S5P6450"; | 32 | static const char name_s5p6450[] = "S5P6450"; |
35 | static const char name_s5pc100[] = "S5PC100"; | 33 | static const char name_s5pc100[] = "S5PC100"; |
36 | static const char name_s5pv210[] = "S5PV210/S5PC110"; | 34 | static const char name_s5pv210[] = "S5PV210/S5PC110"; |
@@ -46,14 +44,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
46 | .init = s5p64x0_init, | 44 | .init = s5p64x0_init, |
47 | .name = name_s5p6440, | 45 | .name = name_s5p6440, |
48 | }, { | 46 | }, { |
49 | .idcode = 0x36442000, | ||
50 | .idmask = 0xfffff000, | ||
51 | .map_io = s5p6442_map_io, | ||
52 | .init_clocks = s5p6442_init_clocks, | ||
53 | .init_uarts = s5p6442_init_uarts, | ||
54 | .init = s5p6442_init, | ||
55 | .name = name_s5p6442, | ||
56 | }, { | ||
57 | .idcode = 0x36450000, | 47 | .idcode = 0x36450000, |
58 | .idmask = 0xfffff000, | 48 | .idmask = 0xfffff000, |
59 | .map_io = s5p6450_map_io, | 49 | .map_io = s5p6450_map_io, |
diff --git a/arch/arm/plat-s5p/include/plat/s5p6442.h b/arch/arm/plat-s5p/include/plat/s5p6442.h deleted file mode 100644 index 7b8801349c94..000000000000 --- a/arch/arm/plat-s5p/include/plat/s5p6442.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* arch/arm/plat-s5p/include/plat/s5p6442.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Header file for s5p6442 cpu support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | /* Common init code for S5P6442 related SoCs */ | ||
14 | |||
15 | extern void s5p6442_common_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
16 | extern void s5p6442_register_clocks(void); | ||
17 | extern void s5p6442_setup_clocks(void); | ||
18 | |||
19 | #ifdef CONFIG_CPU_S5P6442 | ||
20 | |||
21 | extern int s5p6442_init(void); | ||
22 | extern void s5p6442_init_irq(void); | ||
23 | extern void s5p6442_map_io(void); | ||
24 | extern void s5p6442_init_clocks(int xtal); | ||
25 | |||
26 | #define s5p6442_init_uarts s5p6442_common_init_uarts | ||
27 | |||
28 | #else | ||
29 | #define s5p6442_init_clocks NULL | ||
30 | #define s5p6442_init_uarts NULL | ||
31 | #define s5p6442_map_io NULL | ||
32 | #define s5p6442_init NULL | ||
33 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 3aedac0034ba..c0a5741b23e6 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -86,7 +86,6 @@ extern struct sysdev_class s3c2443_sysclass; | |||
86 | extern struct sysdev_class s3c6410_sysclass; | 86 | extern struct sysdev_class s3c6410_sysclass; |
87 | extern struct sysdev_class s3c64xx_sysclass; | 87 | extern struct sysdev_class s3c64xx_sysclass; |
88 | extern struct sysdev_class s5p64x0_sysclass; | 88 | extern struct sysdev_class s5p64x0_sysclass; |
89 | extern struct sysdev_class s5p6442_sysclass; | ||
90 | extern struct sysdev_class s5pv210_sysclass; | 89 | extern struct sysdev_class s5pv210_sysclass; |
91 | extern struct sysdev_class exynos4_sysclass; | 90 | extern struct sysdev_class exynos4_sysclass; |
92 | 91 | ||
diff --git a/arch/arm/plat-samsung/include/plat/debug-macro.S b/arch/arm/plat-samsung/include/plat/debug-macro.S index dc6efd90e8ff..207e275362a8 100644 --- a/arch/arm/plat-samsung/include/plat/debug-macro.S +++ b/arch/arm/plat-samsung/include/plat/debug-macro.S | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <plat/regs-serial.h> | 12 | #include <plat/regs-serial.h> |
13 | 13 | ||
14 | /* The S5PV210/S5PC110 and S5P6442 implementations are as belows. */ | 14 | /* The S5PV210/S5PC110 implementations are as belows. */ |
15 | 15 | ||
16 | .macro fifo_level_s5pv210 rd, rx | 16 | .macro fifo_level_s5pv210 rd, rx |
17 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | 17 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 39818d8da420..b61b8ee7cc52 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -111,12 +111,6 @@ extern struct platform_device exynos4_device_spdif; | |||
111 | extern struct platform_device exynos4_device_pd[]; | 111 | extern struct platform_device exynos4_device_pd[]; |
112 | extern struct platform_device exynos4_device_ahci; | 112 | extern struct platform_device exynos4_device_ahci; |
113 | 113 | ||
114 | extern struct platform_device s5p6442_device_pcm0; | ||
115 | extern struct platform_device s5p6442_device_pcm1; | ||
116 | extern struct platform_device s5p6442_device_iis0; | ||
117 | extern struct platform_device s5p6442_device_iis1; | ||
118 | extern struct platform_device s5p6442_device_spi; | ||
119 | |||
120 | extern struct platform_device s5p6440_device_pcm; | 114 | extern struct platform_device s5p6440_device_pcm; |
121 | extern struct platform_device s5p6440_device_iis; | 115 | extern struct platform_device s5p6440_device_iis; |
122 | 116 | ||
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h index 788837e99cb3..c151c5f94a87 100644 --- a/arch/arm/plat-samsung/include/plat/regs-serial.h +++ b/arch/arm/plat-samsung/include/plat/regs-serial.h | |||
@@ -194,7 +194,7 @@ | |||
194 | #define S3C64XX_UINTSP 0x34 | 194 | #define S3C64XX_UINTSP 0x34 |
195 | #define S3C64XX_UINTM 0x38 | 195 | #define S3C64XX_UINTM 0x38 |
196 | 196 | ||
197 | /* Following are specific to S5PV210 and S5P6442 */ | 197 | /* Following are specific to S5PV210 */ |
198 | #define S5PV210_UCON_CLKMASK (1<<10) | 198 | #define S5PV210_UCON_CLKMASK (1<<10) |
199 | #define S5PV210_UCON_PCLK (0<<10) | 199 | #define S5PV210_UCON_PCLK (0<<10) |
200 | #define S5PV210_UCON_UCLK (1<<10) | 200 | #define S5PV210_UCON_UCLK (1<<10) |
diff --git a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h index ff1a561b326e..0ffe34a21554 100644 --- a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +++ b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | |||
@@ -69,6 +69,5 @@ extern void s3c64xx_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | |||
69 | extern void s5pc100_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 69 | extern void s5pc100_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); |
70 | extern void s5pv210_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 70 | extern void s5pv210_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); |
71 | extern void s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | 71 | extern void s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); |
72 | extern void s5p6442_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); | ||
73 | 72 | ||
74 | #endif /* __S3C64XX_PLAT_SPI_H */ | 73 | #endif /* __S3C64XX_PLAT_SPI_H */ |
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index bfc9d071db9b..aa677e2a3823 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1014,6 +1014,7 @@ static struct platform_device *__initdata at32_usarts[4]; | |||
1014 | void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) | 1014 | void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) |
1015 | { | 1015 | { |
1016 | struct platform_device *pdev; | 1016 | struct platform_device *pdev; |
1017 | struct atmel_uart_data *pdata; | ||
1017 | 1018 | ||
1018 | switch (hw_id) { | 1019 | switch (hw_id) { |
1019 | case 0: | 1020 | case 0: |
@@ -1042,7 +1043,8 @@ void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) | |||
1042 | data->regs = (void __iomem *)pdev->resource[0].start; | 1043 | data->regs = (void __iomem *)pdev->resource[0].start; |
1043 | } | 1044 | } |
1044 | 1045 | ||
1045 | pdev->id = line; | 1046 | pdata = pdev->dev.platform_data; |
1047 | pdata->num = portnr; | ||
1046 | at32_usarts[line] = pdev; | 1048 | at32_usarts[line] = pdev; |
1047 | } | 1049 | } |
1048 | 1050 | ||
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index 61740201b311..679458d9a622 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h | |||
@@ -33,6 +33,7 @@ extern struct platform_device *atmel_default_console_device; | |||
33 | #define ATMEL_USART_CLK 0x04 | 33 | #define ATMEL_USART_CLK 0x04 |
34 | 34 | ||
35 | struct atmel_uart_data { | 35 | struct atmel_uart_data { |
36 | int num; /* port num */ | ||
36 | short use_dma_tx; /* use transmit DMA? */ | 37 | short use_dma_tx; /* use transmit DMA? */ |
37 | short use_dma_rx; /* use receive DMA? */ | 38 | short use_dma_rx; /* use receive DMA? */ |
38 | void __iomem *regs; /* virtual base address, if any */ | 39 | void __iomem *regs; /* virtual base address, if any */ |
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 00ee90f08343..b15cc219b1d9 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -130,7 +130,7 @@ void __init early_init_devtree(void *params) | |||
130 | * device-tree, including the platform type, initrd location and | 130 | * device-tree, including the platform type, initrd location and |
131 | * size, TCE reserve, and more ... | 131 | * size, TCE reserve, and more ... |
132 | */ | 132 | */ |
133 | of_scan_flat_dt(early_init_dt_scan_chosen, NULL); | 133 | of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line); |
134 | 134 | ||
135 | /* Scan memory nodes and rebuild MEMBLOCKs */ | 135 | /* Scan memory nodes and rebuild MEMBLOCKs */ |
136 | memblock_init(); | 136 | memblock_init(); |
diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h index f29b862d9db3..857d9b7858ad 100644 --- a/arch/mips/include/asm/prom.h +++ b/arch/mips/include/asm/prom.h | |||
@@ -14,9 +14,6 @@ | |||
14 | #ifdef CONFIG_OF | 14 | #ifdef CONFIG_OF |
15 | #include <asm/bootinfo.h> | 15 | #include <asm/bootinfo.h> |
16 | 16 | ||
17 | /* which is compatible with the flattened device tree (FDT) */ | ||
18 | #define cmd_line arcs_cmdline | ||
19 | |||
20 | extern int early_init_dt_scan_memory_arch(unsigned long node, | 17 | extern int early_init_dt_scan_memory_arch(unsigned long node, |
21 | const char *uname, int depth, void *data); | 18 | const char *uname, int depth, void *data); |
22 | 19 | ||
diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index a19811e98a41..5b7eade41fa3 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c | |||
@@ -83,7 +83,8 @@ void __init early_init_devtree(void *params) | |||
83 | * device-tree, including the platform type, initrd location and | 83 | * device-tree, including the platform type, initrd location and |
84 | * size, and more ... | 84 | * size, and more ... |
85 | */ | 85 | */ |
86 | of_scan_flat_dt(early_init_dt_scan_chosen, NULL); | 86 | of_scan_flat_dt(early_init_dt_scan_chosen, arcs_cmdline); |
87 | |||
87 | 88 | ||
88 | /* Scan memory nodes */ | 89 | /* Scan memory nodes */ |
89 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 90 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 48aeb55faae9..f2c906b1d8d3 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -694,7 +694,7 @@ void __init early_init_devtree(void *params) | |||
694 | * device-tree, including the platform type, initrd location and | 694 | * device-tree, including the platform type, initrd location and |
695 | * size, TCE reserve, and more ... | 695 | * size, TCE reserve, and more ... |
696 | */ | 696 | */ |
697 | of_scan_flat_dt(early_init_dt_scan_chosen_ppc, NULL); | 697 | of_scan_flat_dt(early_init_dt_scan_chosen_ppc, cmd_line); |
698 | 698 | ||
699 | /* Scan memory nodes and rebuild MEMBLOCKs */ | 699 | /* Scan memory nodes and rebuild MEMBLOCKs */ |
700 | memblock_init(); | 700 | memblock_init(); |