Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
ARM: 6945/1: Add unwinding support for division functions
ARM: kill pmd_off()
ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks
ARM: 6943/1: mm: use TTBR1 instead of reserved context ID
ARM: 6942/1: mm: make TTBR1 always point to swapper_pg_dir on ARMv6/7
ARM: 6941/1: cache: ensure MVA is cacheline aligned in flush_kern_dcache_area
ARM: add sendmmsg syscall
ARM: 6863/1: allow hotplug on msm
ARM: 6832/1: mmci: support for ST-Ericsson db8500v2
ARM: 6830/1: mach-ux500: force PrimeCell revisions
ARM: 6829/1: amba: make hardcoded periphid override hardware
ARM: 6828/1: mach-ux500: delete SSP PrimeCell ID
ARM: 6827/1: mach-netx: delete hardcoded periphid
ARM: 6940/1: fiq: Briefly document driver responsibilities for suspend/resume
ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2
ARM: 6914/1: sparsemem: fix highmem detection when using SPARSEMEM
ARM: 6913/1: sparsemem: allow pfn_valid to be overridden when using SPARSEMEM
at91: drop at572d940hf support
at91rm9200: introduce at91rm9200_set_type to specficy cpu package
at91: drop boot_params and PLAT_PHYS_OFFSET
...

+1611 -6135
+29 -4
Documentation/arm/Booting
··· 65 65 The boot loader must ultimately be able to provide a MACH_TYPE_xxx 66 66 value to the kernel. (see linux/arch/arm/tools/mach-types). 67 67 68 - 69 - 4. Setup the kernel tagged list 70 - ------------------------------- 68 + 4. Setup boot data 69 + ------------------ 71 70 72 71 Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED 73 72 New boot loaders: MANDATORY 73 + 74 + The boot loader must provide either a tagged list or a dtb image for 75 + passing configuration data to the kernel. The physical address of the 76 + boot data is passed to the kernel in register r2. 77 + 78 + 4a. Setup the kernel tagged list 79 + -------------------------------- 74 80 75 81 The boot loader must create and initialise the kernel tagged list. 76 82 A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE. ··· 107 101 the kernel decompressor nor initrd 'bootp' program will overwrite 108 102 it. The recommended placement is in the first 16KiB of RAM. 109 103 104 + 4b. Setup the device tree 105 + ------------------------- 106 + 107 + The boot loader must load a device tree image (dtb) into system ram 108 + at a 64bit aligned address and initialize it with the boot data. The 109 + dtb format is documented in Documentation/devicetree/booting-without-of.txt. 110 + The kernel will look for the dtb magic value of 0xd00dfeed at the dtb 111 + physical address to determine if a dtb has been passed instead of a 112 + tagged list. 113 + 114 + The boot loader must pass at a minimum the size and location of the 115 + system memory, and the root filesystem location. The dtb must be 116 + placed in a region of memory where the kernel decompressor will not 117 + overwrite it. The recommended placement is in the first 16KiB of RAM 118 + with the caveat that it may not be located at physical address 0 since 119 + the kernel interprets a value of 0 in r2 to mean neither a tagged list 120 + nor a dtb were passed. 121 + 110 122 5. Calling the kernel image 111 123 --------------------------- 112 124 ··· 149 125 - CPU register settings 150 126 r0 = 0, 151 127 r1 = machine type number discovered in (3) above. 152 - r2 = physical address of tagged list in system RAM. 128 + r2 = physical address of tagged list in system RAM, or 129 + physical address of device tree block (dtb) in system RAM 153 130 154 131 - CPU mode 155 132 All forms of interrupts must be disabled (IRQs and FIQs)
-2
Documentation/arm/Samsung/Overview.txt
··· 14 14 - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list 15 15 - S3C64XX: S3C6400 and S3C6410 16 16 - S5P6440 17 - - S5P6442 18 17 - S5PC100 19 18 - S5PC110 / S5PV210 20 19 ··· 35 36 unifying all the SoCs into one kernel. 36 37 37 38 s5p6440_defconfig - S5P6440 specific default configuration 38 - s5p6442_defconfig - S5P6442 specific default configuration 39 39 s5pc100_defconfig - S5PC100 specific default configuration 40 40 s5pc110_defconfig - S5PC110 specific default configuration 41 41 s5pv210_defconfig - S5PV210 specific default configuration
+44 -4
Documentation/devicetree/booting-without-of.txt
··· 12 12 ================= 13 13 14 14 I - Introduction 15 - 1) Entry point for arch/powerpc 16 - 2) Entry point for arch/x86 15 + 1) Entry point for arch/arm 16 + 2) Entry point for arch/powerpc 17 + 3) Entry point for arch/x86 17 18 18 19 II - The DT block format 19 20 1) Header ··· 149 148 it with special cases. 150 149 151 150 152 - 1) Entry point for arch/powerpc 151 + 1) Entry point for arch/arm 152 + --------------------------- 153 + 154 + There is one single entry point to the kernel, at the start 155 + of the kernel image. That entry point supports two calling 156 + conventions. A summary of the interface is described here. A full 157 + description of the boot requirements is documented in 158 + Documentation/arm/Booting 159 + 160 + a) ATAGS interface. Minimal information is passed from firmware 161 + to the kernel with a tagged list of predefined parameters. 162 + 163 + r0 : 0 164 + 165 + r1 : Machine type number 166 + 167 + r2 : Physical address of tagged list in system RAM 168 + 169 + b) Entry with a flattened device-tree block. Firmware loads the 170 + physical address of the flattened device tree block (dtb) into r2, 171 + r1 is not used, but it is considered good practise to use a valid 172 + machine number as described in Documentation/arm/Booting. 173 + 174 + r0 : 0 175 + 176 + r1 : Valid machine type number. When using a device tree, 177 + a single machine type number will often be assigned to 178 + represent a class or family of SoCs. 179 + 180 + r2 : physical pointer to the device-tree block 181 + (defined in chapter II) in RAM. Device tree can be located 182 + anywhere in system RAM, but it should be aligned on a 64 bit 183 + boundary. 184 + 185 + The kernel will differentiate between ATAGS and device tree booting by 186 + reading the memory pointed to by r2 and looking for either the flattened 187 + device tree block magic value (0xd00dfeed) or the ATAG_CORE value at 188 + offset 0x4 from r2 (0x54410001). 189 + 190 + 2) Entry point for arch/powerpc 153 191 ------------------------------- 154 192 155 193 There is one single entry point to the kernel, at the start ··· 266 226 cannot support both configurations with Book E and configurations 267 227 with classic Powerpc architectures. 268 228 269 - 2) Entry point for arch/x86 229 + 3) Entry point for arch/x86 270 230 ------------------------------- 271 231 272 232 There is one single 32bit entry point to the kernel at code32_start,
+14 -15
arch/arm/Kconfig
··· 294 294 bool "Atmel AT91" 295 295 select ARCH_REQUIRE_GPIOLIB 296 296 select HAVE_CLK 297 + select CLKDEV_LOOKUP 298 + select ARM_PATCH_PHYS_VIRT if MMU 297 299 help 298 300 This enables support for systems based on the Atmel AT91RM9200, 299 301 AT91SAM9 and AT91CAP9 processors. ··· 732 730 Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440, 733 731 SMDK6450. 734 732 735 - config ARCH_S5P6442 736 - bool "Samsung S5P6442" 737 - select CPU_V6 738 - select GENERIC_GPIO 739 - select HAVE_CLK 740 - select ARCH_USES_GETTIMEOFFSET 741 - select HAVE_S3C2410_WATCHDOG if WATCHDOG 742 - help 743 - Samsung S5P6442 CPU based systems 744 - 745 733 config ARCH_S5PC100 746 734 bool "Samsung S5PC100" 747 735 select GENERIC_GPIO ··· 982 990 endif 983 991 984 992 source "arch/arm/mach-s5p64x0/Kconfig" 985 - 986 - source "arch/arm/mach-s5p6442/Kconfig" 987 993 988 994 source "arch/arm/mach-s5pc100/Kconfig" 989 995 ··· 1389 1399 config HOTPLUG_CPU 1390 1400 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" 1391 1401 depends on SMP && HOTPLUG && EXPERIMENTAL 1392 - depends on !ARCH_MSM 1393 1402 help 1394 1403 Say Y here to experiment with turning CPUs off and on. CPUs 1395 1404 can be controlled through /sys/devices/system/cpu. ··· 1409 1420 config HZ 1410 1421 int 1411 1422 default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P64X0 || \ 1412 - ARCH_S5P6442 || ARCH_S5PV210 || ARCH_EXYNOS4 1423 + ARCH_S5PV210 || ARCH_EXYNOS4 1413 1424 default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER 1414 1425 default AT91_TIMER_HZ if ARCH_AT91 1415 1426 default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE ··· 1504 1515 1505 1516 config ARCH_SELECT_MEMORY_MODEL 1506 1517 def_bool ARCH_SPARSEMEM_ENABLE 1518 + 1519 + config HAVE_ARCH_PFN_VALID 1520 + def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM 1507 1521 1508 1522 config HIGHMEM 1509 1523 bool "High Memory Support" ··· 1674 1682 endmenu 1675 1683 1676 1684 menu "Boot options" 1685 + 1686 + config USE_OF 1687 + bool "Flattened Device Tree support" 1688 + select OF 1689 + select OF_EARLY_FLATTREE 1690 + help 1691 + Include support for flattened device tree machine descriptions. 1677 1692 1678 1693 # Compressed boot loader in ROM. Yes, we really want to ask about 1679 1694 # TEXT and BSS so we preserve their values in the config files. ··· 2020 2021 source "kernel/power/Kconfig" 2021 2022 2022 2023 config ARCH_SUSPEND_POSSIBLE 2023 - depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100 2024 + depends on !ARCH_S5P64X0 && !ARCH_S5PC100 2024 2025 depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ 2025 2026 CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE 2026 2027 def_bool y
-1
arch/arm/Makefile
··· 176 176 machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 177 177 machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx 178 178 machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0 179 - machine-$(CONFIG_ARCH_S5P6442) := s5p6442 180 179 machine-$(CONFIG_ARCH_S5PC100) := s5pc100 181 180 machine-$(CONFIG_ARCH_S5PV210) := s5pv210 182 181 machine-$(CONFIG_ARCH_EXYNOS4) := exynos4
+1 -1
arch/arm/common/Kconfig
··· 7 7 config ARM_VIC_NR 8 8 int 9 9 default 4 if ARCH_S5PV210 10 - default 3 if ARCH_S5P6442 || ARCH_S5PC100 10 + default 3 if ARCH_S5PC100 11 11 default 2 12 12 depends on ARM_VIC 13 13 help
-358
arch/arm/configs/at572d940hfek_defconfig
··· 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
+74 -11
arch/arm/configs/at91sam9261ek_defconfig arch/arm/configs/at91sam9261_defconfig
··· 1 1 CONFIG_EXPERIMENTAL=y 2 2 # CONFIG_LOCALVERSION_AUTO is not set 3 + CONFIG_KERNEL_LZMA=y 3 4 # CONFIG_SWAP is not set 4 5 CONFIG_SYSVIPC=y 6 + CONFIG_IKCONFIG=y 7 + CONFIG_IKCONFIG_PROC=y 5 8 CONFIG_LOG_BUF_SHIFT=14 6 - CONFIG_BLK_DEV_INITRD=y 9 + CONFIG_NAMESPACES=y 10 + CONFIG_EMBEDDED=y 7 11 CONFIG_SLAB=y 8 12 CONFIG_MODULES=y 9 13 CONFIG_MODULE_UNLOAD=y ··· 19 15 CONFIG_MACH_AT91SAM9261EK=y 20 16 CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 21 17 # CONFIG_ARM_THUMB is not set 18 + CONFIG_AEABI=y 19 + # CONFIG_OABI_COMPAT is not set 22 20 CONFIG_ZBOOT_ROM_TEXT=0x0 23 21 CONFIG_ZBOOT_ROM_BSS=0x0 24 22 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 25 - CONFIG_FPE_NWFPE=y 23 + CONFIG_AUTO_ZRELADDR=y 24 + CONFIG_VFP=y 25 + # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 26 26 CONFIG_NET=y 27 27 CONFIG_PACKET=y 28 28 CONFIG_UNIX=y 29 29 CONFIG_INET=y 30 + CONFIG_IP_MULTICAST=y 30 31 CONFIG_IP_PNP=y 32 + CONFIG_IP_PNP_DHCP=y 31 33 CONFIG_IP_PNP_BOOTP=y 32 34 # CONFIG_INET_LRO is not set 33 35 # CONFIG_IPV6 is not set 36 + CONFIG_CFG80211=y 37 + CONFIG_LIB80211=y 38 + CONFIG_MAC80211=y 34 39 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 35 40 CONFIG_MTD=y 36 41 CONFIG_MTD_PARTITIONS=y ··· 47 34 CONFIG_MTD_BLOCK=y 48 35 CONFIG_MTD_NAND=y 49 36 CONFIG_MTD_NAND_ATMEL=y 37 + CONFIG_MTD_UBI=y 38 + CONFIG_MTD_UBI_GLUEBI=y 50 39 CONFIG_BLK_DEV_RAM=y 51 40 CONFIG_BLK_DEV_RAM_SIZE=8192 41 + CONFIG_MISC_DEVICES=y 42 + CONFIG_ATMEL_TCLIB=y 52 43 CONFIG_ATMEL_SSC=y 53 44 CONFIG_SCSI=y 54 45 CONFIG_BLK_DEV_SD=y ··· 62 45 CONFIG_DM9000=y 63 46 # CONFIG_NETDEV_1000 is not set 64 47 # CONFIG_NETDEV_10000 is not set 48 + CONFIG_USB_ZD1201=m 49 + CONFIG_RTL8187=m 50 + CONFIG_LIBERTAS=m 51 + CONFIG_LIBERTAS_USB=m 52 + CONFIG_LIBERTAS_SDIO=m 53 + CONFIG_LIBERTAS_SPI=m 54 + CONFIG_RT2X00=m 55 + CONFIG_RT2500USB=m 56 + CONFIG_RT73USB=m 57 + CONFIG_ZD1211RW=m 58 + CONFIG_INPUT_POLLDEV=m 65 59 # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 60 + CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 61 + CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 62 + CONFIG_INPUT_EVDEV=y 66 63 # CONFIG_KEYBOARD_ATKBD is not set 67 64 CONFIG_KEYBOARD_GPIO=y 68 65 # CONFIG_INPUT_MOUSE is not set 69 66 CONFIG_INPUT_TOUCHSCREEN=y 70 67 CONFIG_TOUCHSCREEN_ADS7846=y 68 + CONFIG_DEVPTS_MULTIPLE_INSTANCES=y 71 69 CONFIG_SERIAL_ATMEL=y 72 70 CONFIG_SERIAL_ATMEL_CONSOLE=y 73 71 CONFIG_HW_RANDOM=y ··· 97 65 CONFIG_AT91SAM9X_WATCHDOG=y 98 66 CONFIG_FB=y 99 67 CONFIG_FB_ATMEL=y 100 - # CONFIG_VGA_CONSOLE is not set 68 + CONFIG_BACKLIGHT_LCD_SUPPORT=y 69 + # CONFIG_LCD_CLASS_DEVICE is not set 70 + CONFIG_BACKLIGHT_CLASS_DEVICE=y 71 + CONFIG_BACKLIGHT_ATMEL_LCDC=y 72 + # CONFIG_BACKLIGHT_GENERIC is not set 73 + CONFIG_FRAMEBUFFER_CONSOLE=y 74 + CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y 75 + CONFIG_LOGO=y 76 + CONFIG_SOUND=y 77 + CONFIG_SND=y 78 + CONFIG_SND_SEQUENCER=y 79 + CONFIG_SND_MIXER_OSS=y 80 + CONFIG_SND_PCM_OSS=y 81 + # CONFIG_SND_SUPPORT_OLD_API is not set 82 + # CONFIG_SND_VERBOSE_PROCFS is not set 83 + # CONFIG_SND_DRIVERS is not set 84 + # CONFIG_SND_ARM is not set 85 + CONFIG_SND_AT73C213=y 86 + CONFIG_SND_USB_AUDIO=m 101 87 # CONFIG_USB_HID is not set 102 88 CONFIG_USB=y 103 89 CONFIG_USB_DEVICEFS=y 104 - CONFIG_USB_MON=y 105 90 CONFIG_USB_OHCI_HCD=y 106 91 CONFIG_USB_STORAGE=y 107 - CONFIG_USB_STORAGE_DEBUG=y 108 92 CONFIG_USB_GADGET=y 109 93 CONFIG_USB_ZERO=m 94 + CONFIG_USB_ETH=m 110 95 CONFIG_USB_GADGETFS=m 111 96 CONFIG_USB_FILE_STORAGE=m 112 97 CONFIG_USB_G_SERIAL=m 113 98 CONFIG_MMC=y 114 99 CONFIG_MMC_AT91=m 100 + CONFIG_NEW_LEDS=y 101 + CONFIG_LEDS_CLASS=y 102 + CONFIG_LEDS_GPIO=y 103 + CONFIG_LEDS_TRIGGERS=y 104 + CONFIG_LEDS_TRIGGER_TIMER=y 105 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 106 + CONFIG_LEDS_TRIGGER_GPIO=y 115 107 CONFIG_RTC_CLASS=y 116 108 CONFIG_RTC_DRV_AT91SAM9=y 117 - CONFIG_EXT2_FS=y 118 - CONFIG_INOTIFY=y 109 + CONFIG_MSDOS_FS=y 119 110 CONFIG_VFAT_FS=y 120 111 CONFIG_TMPFS=y 121 - CONFIG_CRAMFS=y 112 + CONFIG_UBIFS_FS=y 113 + CONFIG_UBIFS_FS_ADVANCED_COMPR=y 114 + CONFIG_SQUASHFS=y 115 + CONFIG_SQUASHFS_LZO=y 116 + CONFIG_SQUASHFS_XZ=y 117 + CONFIG_NFS_FS=y 118 + CONFIG_NFS_V3=y 119 + CONFIG_ROOT_NFS=y 122 120 CONFIG_NLS_CODEPAGE_437=y 123 121 CONFIG_NLS_CODEPAGE_850=y 124 122 CONFIG_NLS_ISO8859_1=y 125 - CONFIG_DEBUG_KERNEL=y 126 - CONFIG_DEBUG_USER=y 127 - CONFIG_DEBUG_LL=y 123 + CONFIG_NLS_ISO8859_15=y 124 + CONFIG_NLS_UTF8=y 125 + CONFIG_FTRACE=y 126 + CONFIG_CRC_CCITT=m
+73 -11
arch/arm/configs/at91sam9263ek_defconfig arch/arm/configs/at91sam9263_defconfig
··· 1 1 CONFIG_EXPERIMENTAL=y 2 2 # CONFIG_LOCALVERSION_AUTO is not set 3 + CONFIG_KERNEL_LZMA=y 3 4 # CONFIG_SWAP is not set 4 5 CONFIG_SYSVIPC=y 6 + CONFIG_IKCONFIG=y 7 + CONFIG_IKCONFIG_PROC=y 5 8 CONFIG_LOG_BUF_SHIFT=14 6 - CONFIG_BLK_DEV_INITRD=y 9 + CONFIG_NAMESPACES=y 10 + CONFIG_EMBEDDED=y 7 11 CONFIG_SLAB=y 8 12 CONFIG_MODULES=y 9 13 CONFIG_MODULE_UNLOAD=y ··· 17 13 CONFIG_ARCH_AT91=y 18 14 CONFIG_ARCH_AT91SAM9263=y 19 15 CONFIG_MACH_AT91SAM9263EK=y 16 + CONFIG_MACH_USB_A9263=y 17 + CONFIG_MACH_NEOCORE926=y 20 18 CONFIG_MTD_AT91_DATAFLASH_CARD=y 21 19 # CONFIG_ARM_THUMB is not set 20 + CONFIG_AEABI=y 21 + # CONFIG_OABI_COMPAT is not set 22 22 CONFIG_ZBOOT_ROM_TEXT=0x0 23 23 CONFIG_ZBOOT_ROM_BSS=0x0 24 24 CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" 25 - CONFIG_FPE_NWFPE=y 25 + CONFIG_AUTO_ZRELADDR=y 26 26 CONFIG_NET=y 27 27 CONFIG_PACKET=y 28 28 CONFIG_UNIX=y 29 + CONFIG_NET_KEY=y 29 30 CONFIG_INET=y 31 + CONFIG_IP_MULTICAST=y 32 + CONFIG_IP_ADVANCED_ROUTER=y 33 + CONFIG_IP_ROUTE_VERBOSE=y 30 34 CONFIG_IP_PNP=y 35 + CONFIG_IP_PNP_DHCP=y 31 36 CONFIG_IP_PNP_BOOTP=y 32 37 CONFIG_IP_PNP_RARP=y 38 + CONFIG_NET_IPIP=y 39 + CONFIG_IP_MROUTE=y 40 + CONFIG_IP_PIMSM_V1=y 41 + CONFIG_IP_PIMSM_V2=y 33 42 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 34 43 # CONFIG_INET_XFRM_MODE_TUNNEL is not set 35 44 # CONFIG_INET_XFRM_MODE_BEET is not set 36 45 # CONFIG_INET_LRO is not set 37 46 # CONFIG_INET_DIAG is not set 38 - # CONFIG_IPV6 is not set 47 + CONFIG_IPV6=y 39 48 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 40 49 CONFIG_MTD=y 41 50 CONFIG_MTD_PARTITIONS=y 42 51 CONFIG_MTD_CMDLINE_PARTS=y 43 52 CONFIG_MTD_CHAR=y 44 53 CONFIG_MTD_BLOCK=y 54 + CONFIG_NFTL=y 55 + CONFIG_NFTL_RW=y 45 56 CONFIG_MTD_DATAFLASH=y 57 + CONFIG_MTD_BLOCK2MTD=y 46 58 CONFIG_MTD_NAND=y 47 59 CONFIG_MTD_NAND_ATMEL=y 60 + CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y 61 + CONFIG_MTD_UBI=y 62 + CONFIG_MTD_UBI_GLUEBI=y 48 63 CONFIG_BLK_DEV_LOOP=y 49 64 CONFIG_BLK_DEV_RAM=y 50 65 CONFIG_BLK_DEV_RAM_SIZE=8192 51 - CONFIG_ATMEL_SSC=y 66 + CONFIG_MISC_DEVICES=y 67 + CONFIG_ATMEL_PWM=y 68 + CONFIG_ATMEL_TCLIB=y 52 69 CONFIG_SCSI=y 53 70 CONFIG_BLK_DEV_SD=y 54 71 CONFIG_SCSI_MULTI_LUN=y 55 72 CONFIG_NETDEVICES=y 56 - CONFIG_NET_ETHERNET=y 57 73 CONFIG_MII=y 74 + CONFIG_SMSC_PHY=y 75 + CONFIG_NET_ETHERNET=y 58 76 CONFIG_MACB=y 77 + # CONFIG_NETDEV_1000 is not set 78 + # CONFIG_NETDEV_10000 is not set 79 + CONFIG_USB_ZD1201=m 80 + CONFIG_INPUT_POLLDEV=m 59 81 # CONFIG_INPUT_MOUSEDEV_PSAUX is not set 82 + CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 83 + CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 60 84 CONFIG_INPUT_EVDEV=y 61 85 # CONFIG_KEYBOARD_ATKBD is not set 62 86 CONFIG_KEYBOARD_GPIO=y 63 87 # CONFIG_INPUT_MOUSE is not set 64 88 CONFIG_INPUT_TOUCHSCREEN=y 65 89 CONFIG_TOUCHSCREEN_ADS7846=y 66 - # CONFIG_SERIO is not set 90 + CONFIG_LEGACY_PTY_COUNT=4 67 91 CONFIG_SERIAL_ATMEL=y 68 92 CONFIG_SERIAL_ATMEL_CONSOLE=y 69 93 CONFIG_HW_RANDOM=y ··· 106 74 CONFIG_AT91SAM9X_WATCHDOG=y 107 75 CONFIG_FB=y 108 76 CONFIG_FB_ATMEL=y 109 - # CONFIG_VGA_CONSOLE is not set 110 - # CONFIG_USB_HID is not set 77 + CONFIG_BACKLIGHT_LCD_SUPPORT=y 78 + CONFIG_LCD_CLASS_DEVICE=y 79 + CONFIG_BACKLIGHT_CLASS_DEVICE=y 80 + CONFIG_BACKLIGHT_ATMEL_LCDC=y 81 + CONFIG_FRAMEBUFFER_CONSOLE=y 82 + CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y 83 + CONFIG_LOGO=y 84 + CONFIG_SOUND=y 85 + CONFIG_SND=y 86 + CONFIG_SND_SEQUENCER=y 87 + CONFIG_SND_MIXER_OSS=y 88 + CONFIG_SND_PCM_OSS=y 89 + # CONFIG_SND_SUPPORT_OLD_API is not set 90 + # CONFIG_SND_VERBOSE_PROCFS is not set 91 + # CONFIG_SND_DRIVERS is not set 92 + # CONFIG_SND_ARM is not set 93 + CONFIG_SND_ATMEL_AC97C=y 94 + # CONFIG_SND_SPI is not set 95 + CONFIG_SND_USB_AUDIO=m 111 96 CONFIG_USB=y 112 97 CONFIG_USB_DEVICEFS=y 113 98 CONFIG_USB_MON=y ··· 132 83 CONFIG_USB_STORAGE=y 133 84 CONFIG_USB_GADGET=y 134 85 CONFIG_USB_ZERO=m 86 + CONFIG_USB_ETH=m 135 87 CONFIG_USB_GADGETFS=m 136 88 CONFIG_USB_FILE_STORAGE=m 137 89 CONFIG_USB_G_SERIAL=m 138 90 CONFIG_MMC=y 91 + CONFIG_SDIO_UART=m 139 92 CONFIG_MMC_AT91=m 93 + CONFIG_NEW_LEDS=y 94 + CONFIG_LEDS_CLASS=y 95 + CONFIG_LEDS_ATMEL_PWM=y 96 + CONFIG_LEDS_GPIO=y 97 + CONFIG_LEDS_TRIGGERS=y 98 + CONFIG_LEDS_TRIGGER_HEARTBEAT=y 140 99 CONFIG_RTC_CLASS=y 141 100 CONFIG_RTC_DRV_AT91SAM9=y 142 101 CONFIG_EXT2_FS=y 143 - CONFIG_INOTIFY=y 102 + CONFIG_FUSE_FS=m 144 103 CONFIG_VFAT_FS=y 145 104 CONFIG_TMPFS=y 146 105 CONFIG_JFFS2_FS=y 106 + CONFIG_UBIFS_FS=y 107 + CONFIG_UBIFS_FS_ADVANCED_COMPR=y 147 108 CONFIG_CRAMFS=y 148 109 CONFIG_NFS_FS=y 110 + CONFIG_NFS_V3=y 111 + CONFIG_NFS_V3_ACL=y 112 + CONFIG_NFS_V4=y 149 113 CONFIG_ROOT_NFS=y 150 114 CONFIG_NLS_CODEPAGE_437=y 151 115 CONFIG_NLS_CODEPAGE_850=y 152 116 CONFIG_NLS_ISO8859_1=y 153 - CONFIG_DEBUG_KERNEL=y 117 + CONFIG_FTRACE=y 154 118 CONFIG_DEBUG_USER=y 155 - CONFIG_DEBUG_LL=y 119 + CONFIG_XZ_DEC=y
+2
arch/arm/configs/exynos4_defconfig
··· 8 8 CONFIG_S3C_LOWLEVEL_UART_PORT=1 9 9 CONFIG_MACH_SMDKC210=y 10 10 CONFIG_MACH_SMDKV310=y 11 + CONFIG_MACH_ARMLEX4210=y 11 12 CONFIG_MACH_UNIVERSAL_C210=y 13 + CONFIG_MACH_NURI=y 12 14 CONFIG_NO_HZ=y 13 15 CONFIG_HIGH_RES_TIMERS=y 14 16 CONFIG_SMP=y
-104
arch/arm/configs/neocore926_defconfig
··· 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
-65
arch/arm/configs/s5p6442_defconfig
··· 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
-106
arch/arm/configs/usb-a9263_defconfig
··· 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
+21 -2
arch/arm/include/asm/fiq.h
··· 4 4 * Support for FIQ on ARM architectures. 5 5 * Written by Philip Blundell <philb@gnu.org>, 1998 6 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 16 #ifndef __ASM_FIQ_H ··· 36 29 extern int claim_fiq(struct fiq_handler *f); 37 30 extern void release_fiq(struct fiq_handler *f); 38 31 extern void set_fiq_handler(void *start, unsigned int length); 39 - extern void set_fiq_regs(struct pt_regs *regs); 40 - extern void get_fiq_regs(struct pt_regs *regs); 41 32 extern void enable_fiq(int fiq); 42 33 extern void disable_fiq(int fiq); 34 + 35 + /* helpers defined in fiqasm.S: */ 36 + extern void __set_fiq_regs(unsigned long const *regs); 37 + extern void __get_fiq_regs(unsigned long *regs); 38 + 39 + static inline void set_fiq_regs(struct pt_regs const *regs) 40 + { 41 + __set_fiq_regs(&regs->ARM_r8); 42 + } 43 + 44 + static inline void get_fiq_regs(struct pt_regs *regs) 45 + { 46 + __get_fiq_regs(&regs->ARM_r8); 47 + } 43 48 44 49 #endif
+9
arch/arm/include/asm/mach/arch.h
··· 18 18 unsigned int nr; /* architecture number */ 19 19 const char *name; /* architecture name */ 20 20 unsigned long boot_params; /* tagged list */ 21 + const char **dt_compat; /* array of device tree 22 + * 'compatible' strings */ 21 23 22 24 unsigned int nr_irqs; /* number of IRQs */ 23 25 ··· 48 46 * Current machine - only accessible during boot. 49 47 */ 50 48 extern struct machine_desc *machine_desc; 49 + 50 + /* 51 + * Machine type table - also only accessible during boot 52 + */ 53 + extern struct machine_desc __arch_info_begin[], __arch_info_end[]; 54 + #define for_each_machine_desc(p) \ 55 + for (p = __arch_info_begin; p < __arch_info_end; p++) 51 56 52 57 /* 53 58 * Set of macros to define architecture features. This is built into
+1 -1
arch/arm/include/asm/page.h
··· 197 197 198 198 typedef struct page *pgtable_t; 199 199 200 - #ifndef CONFIG_SPARSEMEM 200 + #ifdef CONFIG_HAVE_ARCH_PFN_VALID 201 201 extern int pfn_valid(unsigned long); 202 202 #endif 203 203
+37
arch/arm/include/asm/prom.h
··· 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 */
+4
arch/arm/include/asm/setup.h
··· 217 217 #define bank_phys_end(bank) ((bank)->start + (bank)->size) 218 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 224 #endif /* __KERNEL__ */ 221 225 222 226 #endif
+1
arch/arm/include/asm/smp.h
··· 70 70 */ 71 71 struct secondary_data { 72 72 unsigned long pgdir; 73 + unsigned long swapper_pg_dir; 73 74 void *stack; 74 75 }; 75 76 extern struct secondary_data secondary_data;
+1
arch/arm/include/asm/unistd.h
··· 400 400 #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) 401 401 #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) 402 402 #define __NR_syncfs (__NR_SYSCALL_BASE+373) 403 + #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) 403 404 404 405 /* 405 406 * The following SWIs are ARM private.
+2 -1
arch/arm/kernel/Makefile
··· 24 24 25 25 obj-$(CONFIG_ISA_DMA_API) += dma.o 26 26 obj-$(CONFIG_ARCH_ACORN) += ecard.o 27 - obj-$(CONFIG_FIQ) += fiq.o 27 + obj-$(CONFIG_FIQ) += fiq.o fiqasm.o 28 28 obj-$(CONFIG_MODULES) += armksyms.o module.o 29 29 obj-$(CONFIG_ARTHUR) += arthur.o 30 30 obj-$(CONFIG_ISA_DMA) += dma-isa.o ··· 44 44 obj-$(CONFIG_KGDB) += kgdb.o 45 45 obj-$(CONFIG_ARM_UNWIND) += unwind.o 46 46 obj-$(CONFIG_HAVE_TCM) += tcm.o 47 + obj-$(CONFIG_OF) += devtree.o 47 48 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 48 49 obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o 49 50 CFLAGS_swp_emulate.o := -Wa,-march=armv7-a
+1
arch/arm/kernel/calls.S
··· 383 383 CALL(sys_open_by_handle_at) 384 384 CALL(sys_clock_adjtime) 385 385 CALL(sys_syncfs) 386 + CALL(sys_sendmmsg) 386 387 #ifndef syscalls_counted 387 388 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 388 389 #define syscalls_counted
+145
arch/arm/kernel/devtree.c
··· 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);
+2 -43
arch/arm/kernel/fiq.c
··· 89 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" (&regs->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" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); 131 - } 132 - 133 92 int claim_fiq(struct fiq_handler *f) 134 93 { 135 94 int ret = 0; ··· 133 174 } 134 175 135 176 EXPORT_SYMBOL(set_fiq_handler); 136 - EXPORT_SYMBOL(set_fiq_regs); 137 - EXPORT_SYMBOL(get_fiq_regs); 177 + EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ 178 + EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ 138 179 EXPORT_SYMBOL(claim_fiq); 139 180 EXPORT_SYMBOL(release_fiq); 140 181 EXPORT_SYMBOL(enable_fiq);
+49
arch/arm/kernel/fiqasm.S
··· 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)
+18 -6
arch/arm/kernel/head-common.S
··· 15 15 #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) 16 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 25 * Exception handling. Something went wrong and we can't proceed. We 20 26 * ought to tell the user, but since we don't have any guarantee that ··· 34 28 35 29 /* Determine validity of the r2 atags pointer. The heuristic requires 36 30 * that the pointer be aligned, in the first 16k of physical RAM and 37 - * that the ATAG_CORE marker is first and present. Future revisions 31 + * that the ATAG_CORE marker is first and present. If CONFIG_OF_FLATTREE 32 + * is selected, then it will also accept a dtb pointer. Future revisions 38 33 * of this function may be more lenient with the physical address and 39 34 * may also be able to move the ATAGS block if necessary. 40 35 * 41 36 * Returns: 42 - * r2 either valid atags pointer, or zero 37 + * r2 either valid atags pointer, valid dtb pointer, or zero 43 38 * r5, r6 corrupted 44 39 */ 45 40 __vet_atags: 46 41 tst r2, #0x3 @ aligned? 47 42 bne 1f 48 43 49 - ldr r5, [r2, #0] @ is first tag ATAG_CORE? 50 - cmp r5, #ATAG_CORE_SIZE 44 + ldr r5, [r2, #0] 45 + #ifdef CONFIG_OF_FLATTREE 46 + ldr r6, =OF_DT_MAGIC @ is it a DTB? 47 + cmp r5, r6 48 + beq 2f 49 + #endif 50 + cmp r5, #ATAG_CORE_SIZE @ is first tag ATAG_CORE? 51 51 cmpne r5, #ATAG_CORE_SIZE_EMPTY 52 52 bne 1f 53 53 ldr r5, [r2, #4] ··· 61 49 cmp r5, r6 62 50 bne 1f 63 51 64 - mov pc, lr @ atag pointer is ok 52 + 2: mov pc, lr @ atag/dtb pointer is ok 65 53 66 54 1: mov r2, #0 67 55 mov pc, lr ··· 73 61 * 74 62 * r0 = cp#15 control register 75 63 * r1 = machine ID 76 - * r2 = atags pointer 64 + * r2 = atags/dtb pointer 77 65 * r9 = processor ID 78 66 */ 79 67 __INIT
+9 -6
arch/arm/kernel/head.S
··· 59 59 * 60 60 * This is normally called from the decompressor code. The requirements 61 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 64 * This code is mostly position independent, so if you link the kernel at 65 65 * 0xc0008000, you call this at __pa(0xc0008000). ··· 91 91 #endif 92 92 93 93 /* 94 - * r1 = machine no, r2 = atags, 94 + * r1 = machine no, r2 = atags or dtb, 95 95 * r8 = phys_offset, r9 = cpuid, r10 = procinfo 96 96 */ 97 97 bl __vet_atags ··· 113 113 ldr r13, =__mmap_switched @ address to jump to after 114 114 @ mmu has been enabled 115 115 adr lr, BSYM(1f) @ return (PIC) address 116 + mov r8, r4 @ set TTBR1 to swapper_pg_dir 116 117 ARM( add pc, r10, #PROCINFO_INITFUNC ) 117 118 THUMB( add r12, r10, #PROCINFO_INITFUNC ) 118 119 THUMB( mov pc, r12 ) ··· 303 302 */ 304 303 adr r4, __secondary_data 305 304 ldmia r4, {r5, r7, r12} @ address to jump to after 306 - sub r4, r4, r5 @ mmu has been enabled 307 - ldr r4, [r7, r4] @ get secondary_data.pgdir 305 + sub lr, r4, r5 @ mmu has been enabled 306 + ldr r4, [r7, lr] @ get secondary_data.pgdir 307 + add r7, r7, #4 308 + ldr r8, [r7, lr] @ get secondary_data.swapper_pg_dir 308 309 adr lr, BSYM(__enable_mmu) @ return address 309 310 mov r13, r12 @ __secondary_switched address 310 311 ARM( add pc, r10, #PROCINFO_INITFUNC ) @ initialise processor ··· 342 339 * 343 340 * r0 = cp#15 control register 344 341 * r1 = machine ID 345 - * r2 = atags pointer 342 + * r2 = atags or dtb pointer 346 343 * r4 = page table pointer 347 344 * r9 = processor ID 348 345 * r13 = *virtual* address to jump to upon completion ··· 379 376 * 380 377 * r0 = cp#15 control register 381 378 * r1 = machine ID 382 - * r2 = atags pointer 379 + * r2 = atags or dtb pointer 383 380 * r9 = processor ID 384 381 * r13 = *virtual* address to jump to upon completion 385 382 *
+58 -32
arch/arm/kernel/setup.c
··· 20 20 #include <linux/screen_info.h> 21 21 #include <linux/init.h> 22 22 #include <linux/kexec.h> 23 + #include <linux/of_fdt.h> 23 24 #include <linux/crash_dump.h> 24 25 #include <linux/root_dev.h> 25 26 #include <linux/cpu.h> ··· 43 42 #include <asm/cachetype.h> 44 43 #include <asm/tlbflush.h> 45 44 45 + #include <asm/prom.h> 46 46 #include <asm/mach/arch.h> 47 47 #include <asm/mach/irq.h> 48 48 #include <asm/mach/time.h> ··· 311 309 */ 312 310 extern struct proc_info_list *lookup_processor_type(unsigned int); 313 311 314 - static void __init early_print(const char *str, ...) 312 + void __init early_print(const char *str, ...) 315 313 { 316 314 extern void printascii(const char *); 317 315 char buf[256]; ··· 441 439 : "r14"); 442 440 } 443 441 444 - static struct machine_desc * __init setup_machine(unsigned int nr) 442 + void __init dump_machine_table(void) 445 443 { 446 - extern struct machine_desc __arch_info_begin[], __arch_info_end[]; 447 444 struct machine_desc *p; 448 445 449 - /* 450 - * locate machine in the list of supported machines. 451 - */ 452 - for (p = __arch_info_begin; p < __arch_info_end; p++) 453 - if (nr == p->nr) { 454 - printk("Machine: %s\n", p->name); 455 - return p; 456 - } 457 - 458 - early_print("\n" 459 - "Error: unrecognized/unsupported machine ID (r1 = 0x%08x).\n\n" 460 - "Available machine support:\n\nID (hex)\tNAME\n", nr); 461 - 462 - for (p = __arch_info_begin; p < __arch_info_end; p++) 446 + early_print("Available machine support:\n\nID (hex)\tNAME\n"); 447 + for_each_machine_desc(p) 463 448 early_print("%08x\t%s\n", p->nr, p->name); 464 449 465 450 early_print("\nPlease check your kernel config and/or bootloader.\n"); ··· 455 466 /* can't use cpu_relax() here as it may require MMU setup */; 456 467 } 457 468 458 - static int __init arm_add_memory(phys_addr_t start, unsigned long size) 469 + int __init arm_add_memory(phys_addr_t start, unsigned long size) 459 470 { 460 471 struct membank *bank = &meminfo.bank[meminfo.nr_banks]; 461 472 ··· 790 801 tag->hdr.tag = ATAG_NONE; 791 802 } 792 803 793 - void __init setup_arch(char **cmdline_p) 804 + static struct machine_desc * __init setup_machine_tags(unsigned int nr) 794 805 { 795 806 struct tag *tags = (struct tag *)&init_tags; 796 - struct machine_desc *mdesc; 807 + struct machine_desc *mdesc = NULL, *p; 797 808 char *from = default_command_line; 798 809 799 810 init_tags.mem.start = PHYS_OFFSET; 800 811 801 - unwind_init(); 812 + /* 813 + * locate machine in the list of supported machines. 814 + */ 815 + for_each_machine_desc(p) 816 + if (nr == p->nr) { 817 + printk("Machine: %s\n", p->name); 818 + mdesc = p; 819 + break; 820 + } 802 821 803 - setup_processor(); 804 - mdesc = setup_machine(machine_arch_type); 805 - machine_desc = mdesc; 806 - machine_name = mdesc->name; 807 - 808 - if (mdesc->soft_reboot) 809 - reboot_setup("s"); 822 + if (!mdesc) { 823 + early_print("\nError: unrecognized/unsupported machine ID" 824 + " (r1 = 0x%08x).\n\n", nr); 825 + dump_machine_table(); /* does not return */ 826 + } 810 827 811 828 if (__atags_pointer) 812 829 tags = phys_to_virt(__atags_pointer); ··· 844 849 if (tags->hdr.tag != ATAG_CORE) 845 850 convert_to_tag_list(tags); 846 851 #endif 847 - if (tags->hdr.tag != ATAG_CORE) 852 + 853 + if (tags->hdr.tag != ATAG_CORE) { 854 + #if defined(CONFIG_OF) 855 + /* 856 + * If CONFIG_OF is set, then assume this is a reasonably 857 + * modern system that should pass boot parameters 858 + */ 859 + early_print("Warning: Neither atags nor dtb found\n"); 860 + #endif 848 861 tags = (struct tag *)&init_tags; 862 + } 849 863 850 864 if (mdesc->fixup) 851 865 mdesc->fixup(mdesc, tags, &from, &meminfo); ··· 866 862 parse_tags(tags); 867 863 } 868 864 865 + /* parse_early_param needs a boot_command_line */ 866 + strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); 867 + 868 + return mdesc; 869 + } 870 + 871 + 872 + void __init setup_arch(char **cmdline_p) 873 + { 874 + struct machine_desc *mdesc; 875 + 876 + unwind_init(); 877 + 878 + setup_processor(); 879 + mdesc = setup_machine_fdt(__atags_pointer); 880 + if (!mdesc) 881 + mdesc = setup_machine_tags(machine_arch_type); 882 + machine_desc = mdesc; 883 + machine_name = mdesc->name; 884 + 885 + if (mdesc->soft_reboot) 886 + reboot_setup("s"); 887 + 869 888 init_mm.start_code = (unsigned long) _text; 870 889 init_mm.end_code = (unsigned long) _etext; 871 890 init_mm.end_data = (unsigned long) _edata; 872 891 init_mm.brk = (unsigned long) _end; 873 - 874 - /* parse_early_param needs a boot_command_line */ 875 - strlcpy(boot_command_line, from, COMMAND_LINE_SIZE); 876 892 877 893 /* populate cmd_line too for later use, preserving boot_command_line */ 878 894 strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); ··· 904 880 905 881 paging_init(mdesc); 906 882 request_standard_resources(mdesc); 883 + 884 + unflatten_device_tree(); 907 885 908 886 #ifdef CONFIG_SMP 909 887 if (is_smp())
+1
arch/arm/kernel/smp.c
··· 105 105 */ 106 106 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; 107 107 secondary_data.pgdir = virt_to_phys(pgd); 108 + secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); 108 109 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 109 110 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); 110 111
+20 -5
arch/arm/lib/lib1funcs.S
··· 35 35 36 36 #include <linux/linkage.h> 37 37 #include <asm/assembler.h> 38 - 38 + #include <asm/unwind.h> 39 39 40 40 .macro ARM_DIV_BODY dividend, divisor, result, curbit 41 41 ··· 207 207 208 208 ENTRY(__udivsi3) 209 209 ENTRY(__aeabi_uidiv) 210 + UNWIND(.fnstart) 210 211 211 212 subs r2, r1, #1 212 213 moveq pc, lr ··· 231 230 mov r0, r0, lsr r2 232 231 mov pc, lr 233 232 233 + UNWIND(.fnend) 234 234 ENDPROC(__udivsi3) 235 235 ENDPROC(__aeabi_uidiv) 236 236 237 237 ENTRY(__umodsi3) 238 + UNWIND(.fnstart) 238 239 239 240 subs r2, r1, #1 @ compare divisor with 1 240 241 bcc Ldiv0 ··· 250 247 251 248 mov pc, lr 252 249 250 + UNWIND(.fnend) 253 251 ENDPROC(__umodsi3) 254 252 255 253 ENTRY(__divsi3) 256 254 ENTRY(__aeabi_idiv) 255 + UNWIND(.fnstart) 257 256 258 257 cmp r1, #0 259 258 eor ip, r0, r1 @ save the sign of the result. ··· 292 287 rsbmi r0, r0, #0 293 288 mov pc, lr 294 289 290 + UNWIND(.fnend) 295 291 ENDPROC(__divsi3) 296 292 ENDPROC(__aeabi_idiv) 297 293 298 294 ENTRY(__modsi3) 295 + UNWIND(.fnstart) 299 296 300 297 cmp r1, #0 301 298 beq Ldiv0 ··· 317 310 rsbmi r0, r0, #0 318 311 mov pc, lr 319 312 313 + UNWIND(.fnend) 320 314 ENDPROC(__modsi3) 321 315 322 316 #ifdef CONFIG_AEABI 323 317 324 318 ENTRY(__aeabi_uidivmod) 319 + UNWIND(.fnstart) 320 + UNWIND(.save {r0, r1, ip, lr} ) 325 321 326 322 stmfd sp!, {r0, r1, ip, lr} 327 323 bl __aeabi_uidiv ··· 333 323 sub r1, r1, r3 334 324 mov pc, lr 335 325 326 + UNWIND(.fnend) 336 327 ENDPROC(__aeabi_uidivmod) 337 328 338 329 ENTRY(__aeabi_idivmod) 339 - 330 + UNWIND(.fnstart) 331 + UNWIND(.save {r0, r1, ip, lr} ) 340 332 stmfd sp!, {r0, r1, ip, lr} 341 333 bl __aeabi_idiv 342 334 ldmfd sp!, {r1, r2, ip, lr} ··· 346 334 sub r1, r1, r3 347 335 mov pc, lr 348 336 337 + UNWIND(.fnend) 349 338 ENDPROC(__aeabi_idivmod) 350 339 351 340 #endif 352 341 353 342 Ldiv0: 354 - 343 + UNWIND(.fnstart) 344 + UNWIND(.pad #4) 345 + UNWIND(.save {lr}) 355 346 str lr, [sp, #-8]! 356 347 bl __div0 357 348 mov r0, #0 @ About as wrong as it could be. 358 349 ldr pc, [sp], #8 359 - 360 - 350 + UNWIND(.fnend) 351 + ENDPROC(Ldiv0)
-40
arch/arm/mach-at91/Kconfig
··· 3 3 config HAVE_AT91_DATAFLASH_CARD 4 4 bool 5 5 6 - config HAVE_NAND_ATMEL_BUSWIDTH_16 7 - bool 8 - 9 6 config HAVE_AT91_USART3 10 7 bool 11 8 ··· 81 84 select GENERIC_CLOCKEVENTS 82 85 select HAVE_FB_ATMEL 83 86 select HAVE_NET_MACB 84 - 85 - config ARCH_AT572D940HF 86 - bool "AT572D940HF" 87 - select CPU_ARM926T 88 - select GENERIC_CLOCKEVENTS 89 87 90 88 config ARCH_AT91X40 91 89 bool "AT91x40" ··· 201 209 config MACH_AT91SAM9260EK 202 210 bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit" 203 211 select HAVE_AT91_DATAFLASH_CARD 204 - select HAVE_NAND_ATMEL_BUSWIDTH_16 205 212 help 206 213 Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit 207 214 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933> ··· 261 270 config MACH_AT91SAM9261EK 262 271 bool "Atmel AT91SAM9261-EK Evaluation Kit" 263 272 select HAVE_AT91_DATAFLASH_CARD 264 - select HAVE_NAND_ATMEL_BUSWIDTH_16 265 273 help 266 274 Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit. 267 275 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820> ··· 276 286 config MACH_AT91SAM9G10EK 277 287 bool "Atmel AT91SAM9G10-EK Evaluation Kit" 278 288 select HAVE_AT91_DATAFLASH_CARD 279 - select HAVE_NAND_ATMEL_BUSWIDTH_16 280 289 help 281 290 Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit. 282 291 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588> ··· 291 302 config MACH_AT91SAM9263EK 292 303 bool "Atmel AT91SAM9263-EK Evaluation Kit" 293 304 select HAVE_AT91_DATAFLASH_CARD 294 - select HAVE_NAND_ATMEL_BUSWIDTH_16 295 305 help 296 306 Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit. 297 307 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057> ··· 331 343 config MACH_AT91SAM9G20EK 332 344 bool "Atmel AT91SAM9G20-EK Evaluation Kit" 333 345 select HAVE_AT91_DATAFLASH_CARD 334 - select HAVE_NAND_ATMEL_BUSWIDTH_16 335 346 help 336 347 Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit 337 348 that embeds only one SD/MMC slot. ··· 338 351 config MACH_AT91SAM9G20EK_2MMC 339 352 depends on MACH_AT91SAM9G20EK 340 353 bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" 341 - select HAVE_NAND_ATMEL_BUSWIDTH_16 342 354 help 343 355 Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit 344 356 with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and ··· 402 416 403 417 config MACH_AT91SAM9M10G45EK 404 418 bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" 405 - select HAVE_NAND_ATMEL_BUSWIDTH_16 406 419 help 407 420 Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit. 408 421 "ES" at the end of the name means that this board is an ··· 418 433 config MACH_AT91CAP9ADK 419 434 bool "Atmel AT91CAP9A-DK Evaluation Kit" 420 435 select HAVE_AT91_DATAFLASH_CARD 421 - select HAVE_NAND_ATMEL_BUSWIDTH_16 422 436 help 423 437 Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit. 424 438 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138> 425 - 426 - endif 427 - 428 - # ---------------------------------------------------------- 429 - 430 - if ARCH_AT572D940HF 431 - 432 - comment "AT572D940HF Board Type" 433 - 434 - config MACH_AT572D940HFEB 435 - bool "AT572D940HF-EK" 436 - depends on ARCH_AT572D940HF 437 - select HAVE_AT91_DATAFLASH_CARD 438 - select HAVE_NAND_ATMEL_BUSWIDTH_16 439 - help 440 - Select this if you are using Atmel's AT572D940HF-EK evaluation kit. 441 - <http://www.atmel.com/products/diopsis/default.asp> 442 439 443 440 endif 444 441 ··· 449 482 depends on HAVE_AT91_DATAFLASH_CARD 450 483 help 451 484 Enable support for the DataFlash card. 452 - 453 - config MTD_NAND_ATMEL_BUSWIDTH_16 454 - bool "Enable 16-bit data bus interface to NAND flash" 455 - depends on HAVE_NAND_ATMEL_BUSWIDTH_16 456 - help 457 - On AT91SAM926x boards both types of NAND flash can be present 458 - (8 and 16 bit data bus width). 459 485 460 486 # ---------------------------------------------------------- 461 487
-4
arch/arm/mach-at91/Makefile
··· 19 19 obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9_alt_reset.o 20 20 obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o 21 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 22 obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o 24 23 25 24 # AT91RM9200 board-specific support ··· 76 77 77 78 # AT91CAP9 board-specific support 78 79 obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o 79 - 80 - # AT572D940HF board-specific support 81 - obj-$(CONFIG_MACH_AT572D940HFEB) += board-at572d940hf_ek.o 82 80 83 81 # AT91X40 board-specific support 84 82 obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o
-377
arch/arm/mach-at91/at572d940hf.c
··· 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 -
-970
arch/arm/mach-at91/at572d940hf_devices.c
··· 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 = &eth_dmamask, 163 - .coherent_dma_mask = DMA_BIT_MASK(32), 164 - .platform_data = &eth_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);
+40 -1
arch/arm/mach-at91/at91cap9.c
··· 222 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 245 * The four programmable clocks. 227 246 * You must configure pin multiplexing to bring these signals out. ··· 277 258 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 278 259 clk_register(periph_clocks[i]); 279 260 261 + clkdev_add_table(periph_clocks_lookups, 262 + ARRAY_SIZE(periph_clocks_lookups)); 263 + clkdev_add_table(usart_clocks_lookups, 264 + ARRAY_SIZE(usart_clocks_lookups)); 265 + 280 266 clk_register(&pck0); 281 267 clk_register(&pck1); 282 268 clk_register(&pck2); 283 269 clk_register(&pck3); 270 + } 271 + 272 + static struct clk_lookup console_clock_lookup; 273 + 274 + void __init at91cap9_set_console_clock(int id) 275 + { 276 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 277 + return; 278 + 279 + console_clock_lookup.con_id = "usart"; 280 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 281 + clkdev_add(&console_clock_lookup); 284 282 } 285 283 286 284 /* -------------------------------------------------------------------- ··· 339 303 * AT91CAP9 processor initialization 340 304 * -------------------------------------------------------------------- */ 341 305 342 - void __init at91cap9_initialize(unsigned long main_clock) 306 + void __init at91cap9_map_io(void) 343 307 { 344 308 /* Map peripherals */ 345 309 iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc)); 310 + } 346 311 312 + void __init at91cap9_initialize(unsigned long main_clock) 313 + { 347 314 at91_arch_reset = at91cap9_reset; 348 315 pm_power_off = at91cap9_poweroff; 349 316 at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
+6 -18
arch/arm/mach-at91/at91cap9_devices.c
··· 181 181 182 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 184 platform_device_register(&at91_usba_udc_device); 189 185 } 190 186 #else ··· 351 355 } 352 356 353 357 mmc0_data = *data; 354 - at91_clock_associate("mci0_clk", &at91cap9_mmc0_device.dev, "mci_clk"); 355 358 platform_device_register(&at91cap9_mmc0_device); 356 359 } else { /* MCI1 */ 357 360 /* CLK */ ··· 368 373 } 369 374 370 375 mmc1_data = *data; 371 - at91_clock_associate("mci1_clk", &at91cap9_mmc1_device.dev, "mci_clk"); 372 376 platform_device_register(&at91cap9_mmc1_device); 373 377 } 374 378 } ··· 608 614 at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ 609 615 at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ 610 616 611 - at91_clock_associate("spi0_clk", &at91cap9_spi0_device.dev, "spi_clk"); 612 617 platform_device_register(&at91cap9_spi0_device); 613 618 } 614 619 if (enable_spi1) { ··· 615 622 at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ 616 623 at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ 617 624 618 - at91_clock_associate("spi1_clk", &at91cap9_spi1_device.dev, "spi_clk"); 619 625 platform_device_register(&at91cap9_spi1_device); 620 626 } 621 627 } ··· 651 659 652 660 static void __init at91_add_device_tc(void) 653 661 { 654 - /* this chip has one clock and irq for all three TC channels */ 655 - at91_clock_associate("tcb_clk", &at91cap9_tcb_device.dev, "t0_clk"); 656 662 platform_device_register(&at91cap9_tcb_device); 657 663 } 658 664 #else ··· 991 1001 case AT91CAP9_ID_SSC0: 992 1002 pdev = &at91cap9_ssc0_device; 993 1003 configure_ssc0_pins(pins); 994 - at91_clock_associate("ssc0_clk", &pdev->dev, "ssc"); 995 1004 break; 996 1005 case AT91CAP9_ID_SSC1: 997 1006 pdev = &at91cap9_ssc1_device; 998 1007 configure_ssc1_pins(pins); 999 - at91_clock_associate("ssc1_clk", &pdev->dev, "ssc"); 1000 1008 break; 1001 1009 default: 1002 1010 return; ··· 1187 1199 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1188 1200 { 1189 1201 struct platform_device *pdev; 1202 + struct atmel_uart_data *pdata; 1190 1203 1191 1204 switch (id) { 1192 1205 case 0: /* DBGU */ 1193 1206 pdev = &at91cap9_dbgu_device; 1194 1207 configure_dbgu_pins(); 1195 - at91_clock_associate("mck", &pdev->dev, "usart"); 1196 1208 break; 1197 1209 case AT91CAP9_ID_US0: 1198 1210 pdev = &at91cap9_uart0_device; 1199 1211 configure_usart0_pins(pins); 1200 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 1201 1212 break; 1202 1213 case AT91CAP9_ID_US1: 1203 1214 pdev = &at91cap9_uart1_device; 1204 1215 configure_usart1_pins(pins); 1205 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 1206 1216 break; 1207 1217 case AT91CAP9_ID_US2: 1208 1218 pdev = &at91cap9_uart2_device; 1209 1219 configure_usart2_pins(pins); 1210 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1211 1220 break; 1212 1221 default: 1213 1222 return; 1214 1223 } 1215 - pdev->id = portnr; /* update to mapped ID */ 1224 + pdata = pdev->dev.platform_data; 1225 + pdata->num = portnr; /* update to mapped ID */ 1216 1226 1217 1227 if (portnr < ATMEL_MAX_UART) 1218 1228 at91_uarts[portnr] = pdev; ··· 1218 1232 1219 1233 void __init at91_set_serial_console(unsigned portnr) 1220 1234 { 1221 - if (portnr < ATMEL_MAX_UART) 1235 + if (portnr < ATMEL_MAX_UART) { 1222 1236 atmel_default_console_device = at91_uarts[portnr]; 1237 + at91cap9_set_console_clock(portnr); 1238 + } 1223 1239 } 1224 1240 1225 1241 void __init at91_add_device_serial(void)
+51 -2
arch/arm/mach-at91/at91rm9200.c
··· 18 18 #include <mach/at91rm9200.h> 19 19 #include <mach/at91_pmc.h> 20 20 #include <mach/at91_st.h> 21 + #include <mach/cpu.h> 21 22 22 23 #include "generic.h" 23 24 #include "clock.h" ··· 192 191 // irq0 .. irq6 193 192 }; 194 193 194 + static struct clk_lookup periph_clocks_lookups[] = { 195 + CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), 196 + CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), 197 + CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), 198 + CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), 199 + CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), 200 + CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), 201 + CLKDEV_CON_DEV_ID("ssc", "ssc.0", &ssc0_clk), 202 + CLKDEV_CON_DEV_ID("ssc", "ssc.1", &ssc1_clk), 203 + CLKDEV_CON_DEV_ID("ssc", "ssc.2", &ssc2_clk), 204 + }; 205 + 206 + static struct clk_lookup usart_clocks_lookups[] = { 207 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), 208 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), 209 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), 210 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), 211 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk), 212 + }; 213 + 195 214 /* 196 215 * The four programmable clocks. 197 216 * You must configure pin multiplexing to bring these signals out. ··· 248 227 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 249 228 clk_register(periph_clocks[i]); 250 229 230 + clkdev_add_table(periph_clocks_lookups, 231 + ARRAY_SIZE(periph_clocks_lookups)); 232 + clkdev_add_table(usart_clocks_lookups, 233 + ARRAY_SIZE(usart_clocks_lookups)); 234 + 251 235 clk_register(&pck0); 252 236 clk_register(&pck1); 253 237 clk_register(&pck2); 254 238 clk_register(&pck3); 239 + } 240 + 241 + static struct clk_lookup console_clock_lookup; 242 + 243 + void __init at91rm9200_set_console_clock(int id) 244 + { 245 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 246 + return; 247 + 248 + console_clock_lookup.con_id = "usart"; 249 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 250 + clkdev_add(&console_clock_lookup); 255 251 } 256 252 257 253 /* -------------------------------------------------------------------- ··· 304 266 at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); 305 267 } 306 268 269 + int rm9200_type; 270 + EXPORT_SYMBOL(rm9200_type); 271 + 272 + void __init at91rm9200_set_type(int type) 273 + { 274 + rm9200_type = type; 275 + } 307 276 308 277 /* -------------------------------------------------------------------- 309 278 * AT91RM9200 processor initialization 310 279 * -------------------------------------------------------------------- */ 311 - void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks) 280 + void __init at91rm9200_map_io(void) 312 281 { 313 282 /* Map peripherals */ 314 283 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); 284 + } 315 285 286 + void __init at91rm9200_initialize(unsigned long main_clock) 287 + { 316 288 at91_arch_reset = at91rm9200_reset; 317 289 at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) 318 290 | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) ··· 336 288 at91rm9200_register_clocks(); 337 289 338 290 /* Initialize GPIO subsystem */ 339 - at91_gpio_init(at91rm9200_gpio, banks); 291 + at91_gpio_init(at91rm9200_gpio, 292 + cpu_is_at91rm9200_bga() ? AT91RM9200_BGA : AT91RM9200_PQFP); 340 293 } 341 294 342 295
+6 -18
arch/arm/mach-at91/at91rm9200_devices.c
··· 644 644 645 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 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 648 platform_device_register(&at91rm9200_tcb1_device); 657 649 } 658 650 #else ··· 841 849 case AT91RM9200_ID_SSC0: 842 850 pdev = &at91rm9200_ssc0_device; 843 851 configure_ssc0_pins(pins); 844 - at91_clock_associate("ssc0_clk", &pdev->dev, "ssc"); 845 852 break; 846 853 case AT91RM9200_ID_SSC1: 847 854 pdev = &at91rm9200_ssc1_device; 848 855 configure_ssc1_pins(pins); 849 - at91_clock_associate("ssc1_clk", &pdev->dev, "ssc"); 850 856 break; 851 857 case AT91RM9200_ID_SSC2: 852 858 pdev = &at91rm9200_ssc2_device; 853 859 configure_ssc2_pins(pins); 854 - at91_clock_associate("ssc2_clk", &pdev->dev, "ssc"); 855 860 break; 856 861 default: 857 862 return; ··· 1098 1109 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1099 1110 { 1100 1111 struct platform_device *pdev; 1112 + struct atmel_uart_data *pdata; 1101 1113 1102 1114 switch (id) { 1103 1115 case 0: /* DBGU */ 1104 1116 pdev = &at91rm9200_dbgu_device; 1105 1117 configure_dbgu_pins(); 1106 - at91_clock_associate("mck", &pdev->dev, "usart"); 1107 1118 break; 1108 1119 case AT91RM9200_ID_US0: 1109 1120 pdev = &at91rm9200_uart0_device; 1110 1121 configure_usart0_pins(pins); 1111 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 1112 1122 break; 1113 1123 case AT91RM9200_ID_US1: 1114 1124 pdev = &at91rm9200_uart1_device; 1115 1125 configure_usart1_pins(pins); 1116 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 1117 1126 break; 1118 1127 case AT91RM9200_ID_US2: 1119 1128 pdev = &at91rm9200_uart2_device; 1120 1129 configure_usart2_pins(pins); 1121 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1122 1130 break; 1123 1131 case AT91RM9200_ID_US3: 1124 1132 pdev = &at91rm9200_uart3_device; 1125 1133 configure_usart3_pins(pins); 1126 - at91_clock_associate("usart3_clk", &pdev->dev, "usart"); 1127 1134 break; 1128 1135 default: 1129 1136 return; 1130 1137 } 1131 - pdev->id = portnr; /* update to mapped ID */ 1138 + pdata = pdev->dev.platform_data; 1139 + pdata->num = portnr; /* update to mapped ID */ 1132 1140 1133 1141 if (portnr < ATMEL_MAX_UART) 1134 1142 at91_uarts[portnr] = pdev; ··· 1133 1147 1134 1148 void __init at91_set_serial_console(unsigned portnr) 1135 1149 { 1136 - if (portnr < ATMEL_MAX_UART) 1150 + if (portnr < ATMEL_MAX_UART) { 1137 1151 atmel_default_console_device = at91_uarts[portnr]; 1152 + at91rm9200_set_console_clock(portnr); 1153 + } 1138 1154 } 1139 1155 1140 1156 void __init at91_add_device_serial(void)
+45 -3
arch/arm/mach-at91/at91sam9260.c
··· 231 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 257 * The two programmable clocks. 236 258 * You must configure pin multiplexing to bring these signals out. ··· 277 255 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 278 256 clk_register(periph_clocks[i]); 279 257 258 + clkdev_add_table(periph_clocks_lookups, 259 + ARRAY_SIZE(periph_clocks_lookups)); 260 + clkdev_add_table(usart_clocks_lookups, 261 + ARRAY_SIZE(usart_clocks_lookups)); 262 + 280 263 clk_register(&pck0); 281 264 clk_register(&pck1); 265 + } 266 + 267 + static struct clk_lookup console_clock_lookup; 268 + 269 + void __init at91sam9260_set_console_clock(int id) 270 + { 271 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 272 + return; 273 + 274 + console_clock_lookup.con_id = "usart"; 275 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 276 + clkdev_add(&console_clock_lookup); 282 277 } 283 278 284 279 /* -------------------------------------------------------------------- ··· 328 289 * AT91SAM9260 processor initialization 329 290 * -------------------------------------------------------------------- */ 330 291 331 - static void __init at91sam9xe_initialize(void) 292 + static void __init at91sam9xe_map_io(void) 332 293 { 333 294 unsigned long cidr, sram_size; 334 295 ··· 349 310 iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc)); 350 311 } 351 312 352 - void __init at91sam9260_initialize(unsigned long main_clock) 313 + void __init at91sam9260_map_io(void) 353 314 { 354 315 /* Map peripherals */ 355 316 iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc)); 356 317 357 318 if (cpu_is_at91sam9xe()) 358 - at91sam9xe_initialize(); 319 + at91sam9xe_map_io(); 359 320 else if (cpu_is_at91sam9g20()) 360 321 iotable_init(at91sam9g20_sram_desc, ARRAY_SIZE(at91sam9g20_sram_desc)); 361 322 else 362 323 iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); 324 + } 363 325 326 + void __init at91sam9260_initialize(unsigned long main_clock) 327 + { 364 328 at91_arch_reset = at91sam9_alt_reset; 365 329 pm_power_off = at91sam9260_poweroff; 366 330 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
+6 -20
arch/arm/mach-at91/at91sam9260_devices.c
··· 609 609 at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ 610 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 612 platform_device_register(&at91sam9260_spi0_device); 614 613 } 615 614 if (enable_spi1) { ··· 616 617 at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI1_MOSI */ 617 618 at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI1_SPCK */ 618 619 619 - at91_clock_associate("spi1_clk", &at91sam9260_spi1_device.dev, "spi_clk"); 620 620 platform_device_register(&at91sam9260_spi1_device); 621 621 } 622 622 } ··· 692 694 693 695 static void __init at91_add_device_tc(void) 694 696 { 695 - /* this chip has a separate clock and irq for each TC channel */ 696 - at91_clock_associate("tc0_clk", &at91sam9260_tcb0_device.dev, "t0_clk"); 697 - at91_clock_associate("tc1_clk", &at91sam9260_tcb0_device.dev, "t1_clk"); 698 - at91_clock_associate("tc2_clk", &at91sam9260_tcb0_device.dev, "t2_clk"); 699 697 platform_device_register(&at91sam9260_tcb0_device); 700 - 701 - at91_clock_associate("tc3_clk", &at91sam9260_tcb1_device.dev, "t0_clk"); 702 - at91_clock_associate("tc4_clk", &at91sam9260_tcb1_device.dev, "t1_clk"); 703 - at91_clock_associate("tc5_clk", &at91sam9260_tcb1_device.dev, "t2_clk"); 704 698 platform_device_register(&at91sam9260_tcb1_device); 705 699 } 706 700 #else ··· 810 820 case AT91SAM9260_ID_SSC: 811 821 pdev = &at91sam9260_ssc_device; 812 822 configure_ssc_pins(pins); 813 - at91_clock_associate("ssc_clk", &pdev->dev, "pclk"); 814 823 break; 815 824 default: 816 825 return; ··· 1128 1139 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1129 1140 { 1130 1141 struct platform_device *pdev; 1142 + struct atmel_uart_data *pdata; 1131 1143 1132 1144 switch (id) { 1133 1145 case 0: /* DBGU */ 1134 1146 pdev = &at91sam9260_dbgu_device; 1135 1147 configure_dbgu_pins(); 1136 - at91_clock_associate("mck", &pdev->dev, "usart"); 1137 1148 break; 1138 1149 case AT91SAM9260_ID_US0: 1139 1150 pdev = &at91sam9260_uart0_device; 1140 1151 configure_usart0_pins(pins); 1141 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 1142 1152 break; 1143 1153 case AT91SAM9260_ID_US1: 1144 1154 pdev = &at91sam9260_uart1_device; 1145 1155 configure_usart1_pins(pins); 1146 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 1147 1156 break; 1148 1157 case AT91SAM9260_ID_US2: 1149 1158 pdev = &at91sam9260_uart2_device; 1150 1159 configure_usart2_pins(pins); 1151 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1152 1160 break; 1153 1161 case AT91SAM9260_ID_US3: 1154 1162 pdev = &at91sam9260_uart3_device; 1155 1163 configure_usart3_pins(pins); 1156 - at91_clock_associate("usart3_clk", &pdev->dev, "usart"); 1157 1164 break; 1158 1165 case AT91SAM9260_ID_US4: 1159 1166 pdev = &at91sam9260_uart4_device; 1160 1167 configure_usart4_pins(); 1161 - at91_clock_associate("usart4_clk", &pdev->dev, "usart"); 1162 1168 break; 1163 1169 case AT91SAM9260_ID_US5: 1164 1170 pdev = &at91sam9260_uart5_device; 1165 1171 configure_usart5_pins(); 1166 - at91_clock_associate("usart5_clk", &pdev->dev, "usart"); 1167 1172 break; 1168 1173 default: 1169 1174 return; 1170 1175 } 1171 - pdev->id = portnr; /* update to mapped ID */ 1176 + pdata = pdev->dev.platform_data; 1177 + pdata->num = portnr; /* update to mapped ID */ 1172 1178 1173 1179 if (portnr < ATMEL_MAX_UART) 1174 1180 at91_uarts[portnr] = pdev; ··· 1171 1187 1172 1188 void __init at91_set_serial_console(unsigned portnr) 1173 1189 { 1174 - if (portnr < ATMEL_MAX_UART) 1190 + if (portnr < ATMEL_MAX_UART) { 1175 1191 atmel_default_console_device = at91_uarts[portnr]; 1192 + at91sam9260_set_console_clock(portnr); 1193 + } 1176 1194 } 1177 1195 1178 1196 void __init at91_add_device_serial(void)
+39 -2
arch/arm/mach-at91/at91sam9261.c
··· 178 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 200 * The four programmable clocks. 183 201 * You must configure pin multiplexing to bring these signals out. ··· 246 228 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 247 229 clk_register(periph_clocks[i]); 248 230 231 + clkdev_add_table(periph_clocks_lookups, 232 + ARRAY_SIZE(periph_clocks_lookups)); 233 + clkdev_add_table(usart_clocks_lookups, 234 + ARRAY_SIZE(usart_clocks_lookups)); 235 + 249 236 clk_register(&pck0); 250 237 clk_register(&pck1); 251 238 clk_register(&pck2); ··· 258 235 259 236 clk_register(&hck0); 260 237 clk_register(&hck1); 238 + } 239 + 240 + static struct clk_lookup console_clock_lookup; 241 + 242 + void __init at91sam9261_set_console_clock(int id) 243 + { 244 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 245 + return; 246 + 247 + console_clock_lookup.con_id = "usart"; 248 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 249 + clkdev_add(&console_clock_lookup); 261 250 } 262 251 263 252 /* -------------------------------------------------------------------- ··· 302 267 * AT91SAM9261 processor initialization 303 268 * -------------------------------------------------------------------- */ 304 269 305 - void __init at91sam9261_initialize(unsigned long main_clock) 270 + void __init at91sam9261_map_io(void) 306 271 { 307 272 /* Map peripherals */ 308 273 iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); ··· 311 276 iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc)); 312 277 else 313 278 iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); 279 + } 314 280 315 - 281 + void __init at91sam9261_initialize(unsigned long main_clock) 282 + { 316 283 at91_arch_reset = at91sam9_alt_reset; 317 284 pm_power_off = at91sam9261_poweroff; 318 285 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
+6 -15
arch/arm/mach-at91/at91sam9261_devices.c
··· 426 426 at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ 427 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 429 platform_device_register(&at91sam9261_spi0_device); 431 430 } 432 431 if (enable_spi1) { ··· 433 434 at91_set_A_periph(AT91_PIN_PB31, 0); /* SPI1_MOSI */ 434 435 at91_set_A_periph(AT91_PIN_PB29, 0); /* SPI1_SPCK */ 435 436 436 - at91_clock_associate("spi1_clk", &at91sam9261_spi1_device.dev, "spi_clk"); 437 437 platform_device_register(&at91sam9261_spi1_device); 438 438 } 439 439 } ··· 579 581 580 582 static void __init at91_add_device_tc(void) 581 583 { 582 - /* this chip has a separate clock and irq for each TC channel */ 583 - at91_clock_associate("tc0_clk", &at91sam9261_tcb_device.dev, "t0_clk"); 584 - at91_clock_associate("tc1_clk", &at91sam9261_tcb_device.dev, "t1_clk"); 585 - at91_clock_associate("tc2_clk", &at91sam9261_tcb_device.dev, "t2_clk"); 586 584 platform_device_register(&at91sam9261_tcb_device); 587 585 } 588 586 #else ··· 780 786 case AT91SAM9261_ID_SSC0: 781 787 pdev = &at91sam9261_ssc0_device; 782 788 configure_ssc0_pins(pins); 783 - at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); 784 789 break; 785 790 case AT91SAM9261_ID_SSC1: 786 791 pdev = &at91sam9261_ssc1_device; 787 792 configure_ssc1_pins(pins); 788 - at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); 789 793 break; 790 794 case AT91SAM9261_ID_SSC2: 791 795 pdev = &at91sam9261_ssc2_device; 792 796 configure_ssc2_pins(pins); 793 - at91_clock_associate("ssc2_clk", &pdev->dev, "pclk"); 794 797 break; 795 798 default: 796 799 return; ··· 980 989 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 981 990 { 982 991 struct platform_device *pdev; 992 + struct atmel_uart_data *pdata; 983 993 984 994 switch (id) { 985 995 case 0: /* DBGU */ 986 996 pdev = &at91sam9261_dbgu_device; 987 997 configure_dbgu_pins(); 988 - at91_clock_associate("mck", &pdev->dev, "usart"); 989 998 break; 990 999 case AT91SAM9261_ID_US0: 991 1000 pdev = &at91sam9261_uart0_device; 992 1001 configure_usart0_pins(pins); 993 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 994 1002 break; 995 1003 case AT91SAM9261_ID_US1: 996 1004 pdev = &at91sam9261_uart1_device; 997 1005 configure_usart1_pins(pins); 998 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 999 1006 break; 1000 1007 case AT91SAM9261_ID_US2: 1001 1008 pdev = &at91sam9261_uart2_device; 1002 1009 configure_usart2_pins(pins); 1003 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1004 1010 break; 1005 1011 default: 1006 1012 return; 1007 1013 } 1008 - pdev->id = portnr; /* update to mapped ID */ 1014 + pdata = pdev->dev.platform_data; 1015 + pdata->num = portnr; /* update to mapped ID */ 1009 1016 1010 1017 if (portnr < ATMEL_MAX_UART) 1011 1018 at91_uarts[portnr] = pdev; ··· 1011 1022 1012 1023 void __init at91_set_serial_console(unsigned portnr) 1013 1024 { 1014 - if (portnr < ATMEL_MAX_UART) 1025 + if (portnr < ATMEL_MAX_UART) { 1015 1026 atmel_default_console_device = at91_uarts[portnr]; 1027 + at91sam9261_set_console_clock(portnr); 1028 + } 1016 1029 } 1017 1030 1018 1031 void __init at91_add_device_serial(void)
+38 -1
arch/arm/mach-at91/at91sam9263.c
··· 199 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 220 * The four programmable clocks. 204 221 * You must configure pin multiplexing to bring these signals out. ··· 252 235 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 253 236 clk_register(periph_clocks[i]); 254 237 238 + clkdev_add_table(periph_clocks_lookups, 239 + ARRAY_SIZE(periph_clocks_lookups)); 240 + clkdev_add_table(usart_clocks_lookups, 241 + ARRAY_SIZE(usart_clocks_lookups)); 242 + 255 243 clk_register(&pck0); 256 244 clk_register(&pck1); 257 245 clk_register(&pck2); 258 246 clk_register(&pck3); 247 + } 248 + 249 + static struct clk_lookup console_clock_lookup; 250 + 251 + void __init at91sam9263_set_console_clock(int id) 252 + { 253 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 254 + return; 255 + 256 + console_clock_lookup.con_id = "usart"; 257 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 258 + clkdev_add(&console_clock_lookup); 259 259 } 260 260 261 261 /* -------------------------------------------------------------------- ··· 313 279 * AT91SAM9263 processor initialization 314 280 * -------------------------------------------------------------------- */ 315 281 316 - void __init at91sam9263_initialize(unsigned long main_clock) 282 + void __init at91sam9263_map_io(void) 317 283 { 318 284 /* Map peripherals */ 319 285 iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc)); 286 + } 320 287 288 + void __init at91sam9263_initialize(unsigned long main_clock) 289 + { 321 290 at91_arch_reset = at91sam9_alt_reset; 322 291 pm_power_off = at91sam9263_poweroff; 323 292 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
+6 -14
arch/arm/mach-at91/at91sam9263_devices.c
··· 308 308 } 309 309 310 310 mmc0_data = *data; 311 - at91_clock_associate("mci0_clk", &at91sam9263_mmc0_device.dev, "mci_clk"); 312 311 platform_device_register(&at91sam9263_mmc0_device); 313 312 } else { /* MCI1 */ 314 313 /* CLK */ ··· 338 339 } 339 340 340 341 mmc1_data = *data; 341 - at91_clock_associate("mci1_clk", &at91sam9263_mmc1_device.dev, "mci_clk"); 342 342 platform_device_register(&at91sam9263_mmc1_device); 343 343 } 344 344 } ··· 684 686 at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ 685 687 at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ 686 688 687 - at91_clock_associate("spi0_clk", &at91sam9263_spi0_device.dev, "spi_clk"); 688 689 platform_device_register(&at91sam9263_spi0_device); 689 690 } 690 691 if (enable_spi1) { ··· 691 694 at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ 692 695 at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ 693 696 694 - at91_clock_associate("spi1_clk", &at91sam9263_spi1_device.dev, "spi_clk"); 695 697 platform_device_register(&at91sam9263_spi1_device); 696 698 } 697 699 } ··· 937 941 938 942 static void __init at91_add_device_tc(void) 939 943 { 940 - /* this chip has one clock and irq for all three TC channels */ 941 - at91_clock_associate("tcb_clk", &at91sam9263_tcb_device.dev, "t0_clk"); 942 944 platform_device_register(&at91sam9263_tcb_device); 943 945 } 944 946 #else ··· 1165 1171 case AT91SAM9263_ID_SSC0: 1166 1172 pdev = &at91sam9263_ssc0_device; 1167 1173 configure_ssc0_pins(pins); 1168 - at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); 1169 1174 break; 1170 1175 case AT91SAM9263_ID_SSC1: 1171 1176 pdev = &at91sam9263_ssc1_device; 1172 1177 configure_ssc1_pins(pins); 1173 - at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); 1174 1178 break; 1175 1179 default: 1176 1180 return; ··· 1362 1370 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1363 1371 { 1364 1372 struct platform_device *pdev; 1373 + struct atmel_uart_data *pdata; 1365 1374 1366 1375 switch (id) { 1367 1376 case 0: /* DBGU */ 1368 1377 pdev = &at91sam9263_dbgu_device; 1369 1378 configure_dbgu_pins(); 1370 - at91_clock_associate("mck", &pdev->dev, "usart"); 1371 1379 break; 1372 1380 case AT91SAM9263_ID_US0: 1373 1381 pdev = &at91sam9263_uart0_device; 1374 1382 configure_usart0_pins(pins); 1375 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 1376 1383 break; 1377 1384 case AT91SAM9263_ID_US1: 1378 1385 pdev = &at91sam9263_uart1_device; 1379 1386 configure_usart1_pins(pins); 1380 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 1381 1387 break; 1382 1388 case AT91SAM9263_ID_US2: 1383 1389 pdev = &at91sam9263_uart2_device; 1384 1390 configure_usart2_pins(pins); 1385 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1386 1391 break; 1387 1392 default: 1388 1393 return; 1389 1394 } 1390 - pdev->id = portnr; /* update to mapped ID */ 1395 + pdata = pdev->dev.platform_data; 1396 + pdata->num = portnr; /* update to mapped ID */ 1391 1397 1392 1398 if (portnr < ATMEL_MAX_UART) 1393 1399 at91_uarts[portnr] = pdev; ··· 1393 1403 1394 1404 void __init at91_set_serial_console(unsigned portnr) 1395 1405 { 1396 - if (portnr < ATMEL_MAX_UART) 1406 + if (portnr < ATMEL_MAX_UART) { 1397 1407 atmel_default_console_device = at91_uarts[portnr]; 1408 + at91sam9263_set_console_clock(portnr); 1409 + } 1398 1410 } 1399 1411 1400 1412 void __init at91_add_device_serial(void)
+45 -19
arch/arm/mach-at91/at91sam9g45.c
··· 184 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 187 static struct clk *periph_clocks[] __initdata = { 204 188 &pioA_clk, 205 189 &pioB_clk, ··· 212 228 &udphs_clk, 213 229 &mmc1_clk, 214 230 // irq0 215 - &ohci_clk, 216 - &tcb1_clk, 231 + }; 232 + 233 + static struct clk_lookup periph_clocks_lookups[] = { 234 + /* One additional fake clock for ohci */ 235 + CLKDEV_CON_ID("ohci_clk", &uhphs_clk), 236 + CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci.0", &uhphs_clk), 237 + CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc.0", &utmi_clk), 238 + CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc.0", &udphs_clk), 239 + CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), 240 + CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), 241 + CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), 242 + CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), 243 + CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb0_clk), 244 + CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk), 245 + CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), 246 + CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), 247 + }; 248 + 249 + static struct clk_lookup usart_clocks_lookups[] = { 250 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), 251 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), 252 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), 253 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), 254 + CLKDEV_CON_DEV_ID("usart", "atmel_usart.4", &usart3_clk), 217 255 }; 218 256 219 257 /* ··· 262 256 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 263 257 clk_register(periph_clocks[i]); 264 258 259 + clkdev_add_table(periph_clocks_lookups, 260 + ARRAY_SIZE(periph_clocks_lookups)); 261 + clkdev_add_table(usart_clocks_lookups, 262 + ARRAY_SIZE(usart_clocks_lookups)); 263 + 265 264 if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11()) 266 265 clk_register(&vdec_clk); 267 266 268 267 clk_register(&pck0); 269 268 clk_register(&pck1); 269 + } 270 + 271 + static struct clk_lookup console_clock_lookup; 272 + 273 + void __init at91sam9g45_set_console_clock(int id) 274 + { 275 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 276 + return; 277 + 278 + console_clock_lookup.con_id = "usart"; 279 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 280 + clkdev_add(&console_clock_lookup); 270 281 } 271 282 272 283 /* -------------------------------------------------------------------- ··· 329 306 * AT91SAM9G45 processor initialization 330 307 * -------------------------------------------------------------------- */ 331 308 332 - void __init at91sam9g45_initialize(unsigned long main_clock) 309 + void __init at91sam9g45_map_io(void) 333 310 { 334 311 /* Map peripherals */ 335 312 iotable_init(at91sam9g45_io_desc, ARRAY_SIZE(at91sam9g45_io_desc)); 313 + } 336 314 315 + void __init at91sam9g45_initialize(unsigned long main_clock) 316 + { 337 317 at91_arch_reset = at91sam9g45_reset; 338 318 pm_power_off = at91sam9g45_poweroff; 339 319 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
+6 -21
arch/arm/mach-at91/at91sam9g45_devices.c
··· 180 180 } 181 181 182 182 usbh_ehci_data = *data; 183 - at91_clock_associate("uhphs_clk", &at91_usbh_ehci_device.dev, "ehci_clk"); 184 183 platform_device_register(&at91_usbh_ehci_device); 185 184 } 186 185 #else ··· 264 265 } 265 266 266 267 /* Pullup pin is handled internally by USB device peripheral */ 267 - 268 - /* Clocks */ 269 - at91_clock_associate("utmi_clk", &at91_usba_udc_device.dev, "hclk"); 270 - at91_clock_associate("udphs_clk", &at91_usba_udc_device.dev, "pclk"); 271 268 272 269 platform_device_register(&at91_usba_udc_device); 273 270 } ··· 473 478 } 474 479 475 480 mmc0_data = *data; 476 - at91_clock_associate("mci0_clk", &at91sam9g45_mmc0_device.dev, "mci_clk"); 477 481 platform_device_register(&at91sam9g45_mmc0_device); 478 482 479 483 } else { /* MCI1 */ ··· 498 504 } 499 505 500 506 mmc1_data = *data; 501 - at91_clock_associate("mci1_clk", &at91sam9g45_mmc1_device.dev, "mci_clk"); 502 507 platform_device_register(&at91sam9g45_mmc1_device); 503 508 504 509 } ··· 794 801 at91_set_A_periph(AT91_PIN_PB1, 0); /* SPI0_MOSI */ 795 802 at91_set_A_periph(AT91_PIN_PB2, 0); /* SPI0_SPCK */ 796 803 797 - at91_clock_associate("spi0_clk", &at91sam9g45_spi0_device.dev, "spi_clk"); 798 804 platform_device_register(&at91sam9g45_spi0_device); 799 805 } 800 806 if (enable_spi1) { ··· 801 809 at91_set_A_periph(AT91_PIN_PB15, 0); /* SPI1_MOSI */ 802 810 at91_set_A_periph(AT91_PIN_PB16, 0); /* SPI1_SPCK */ 803 811 804 - at91_clock_associate("spi1_clk", &at91sam9g45_spi1_device.dev, "spi_clk"); 805 812 platform_device_register(&at91sam9g45_spi1_device); 806 813 } 807 814 } ··· 990 999 991 1000 static void __init at91_add_device_tc(void) 992 1001 { 993 - /* this chip has one clock and irq for all six TC channels */ 994 - at91_clock_associate("tcb0_clk", &at91sam9g45_tcb0_device.dev, "t0_clk"); 995 1002 platform_device_register(&at91sam9g45_tcb0_device); 996 - at91_clock_associate("tcb1_clk", &at91sam9g45_tcb1_device.dev, "t0_clk"); 997 1003 platform_device_register(&at91sam9g45_tcb1_device); 998 1004 } 999 1005 #else ··· 1274 1286 case AT91SAM9G45_ID_SSC0: 1275 1287 pdev = &at91sam9g45_ssc0_device; 1276 1288 configure_ssc0_pins(pins); 1277 - at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); 1278 1289 break; 1279 1290 case AT91SAM9G45_ID_SSC1: 1280 1291 pdev = &at91sam9g45_ssc1_device; 1281 1292 configure_ssc1_pins(pins); 1282 - at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); 1283 1293 break; 1284 1294 default: 1285 1295 return; ··· 1513 1527 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1514 1528 { 1515 1529 struct platform_device *pdev; 1530 + struct atmel_uart_data *pdata; 1516 1531 1517 1532 switch (id) { 1518 1533 case 0: /* DBGU */ 1519 1534 pdev = &at91sam9g45_dbgu_device; 1520 1535 configure_dbgu_pins(); 1521 - at91_clock_associate("mck", &pdev->dev, "usart"); 1522 1536 break; 1523 1537 case AT91SAM9G45_ID_US0: 1524 1538 pdev = &at91sam9g45_uart0_device; 1525 1539 configure_usart0_pins(pins); 1526 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 1527 1540 break; 1528 1541 case AT91SAM9G45_ID_US1: 1529 1542 pdev = &at91sam9g45_uart1_device; 1530 1543 configure_usart1_pins(pins); 1531 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 1532 1544 break; 1533 1545 case AT91SAM9G45_ID_US2: 1534 1546 pdev = &at91sam9g45_uart2_device; 1535 1547 configure_usart2_pins(pins); 1536 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1537 1548 break; 1538 1549 case AT91SAM9G45_ID_US3: 1539 1550 pdev = &at91sam9g45_uart3_device; 1540 1551 configure_usart3_pins(pins); 1541 - at91_clock_associate("usart3_clk", &pdev->dev, "usart"); 1542 1552 break; 1543 1553 default: 1544 1554 return; 1545 1555 } 1546 - pdev->id = portnr; /* update to mapped ID */ 1556 + pdata = pdev->dev.platform_data; 1557 + pdata->num = portnr; /* update to mapped ID */ 1547 1558 1548 1559 if (portnr < ATMEL_MAX_UART) 1549 1560 at91_uarts[portnr] = pdev; ··· 1548 1565 1549 1566 void __init at91_set_serial_console(unsigned portnr) 1550 1567 { 1551 - if (portnr < ATMEL_MAX_UART) 1568 + if (portnr < ATMEL_MAX_UART) { 1552 1569 atmel_default_console_device = at91_uarts[portnr]; 1570 + at91sam9g45_set_console_clock(portnr); 1571 + } 1553 1572 } 1554 1573 1555 1574 void __init at91_add_device_serial(void)
+39 -1
arch/arm/mach-at91/at91sam9rl.c
··· 190 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 212 * The two programmable clocks. 195 213 * You must configure pin multiplexing to bring these signals out. ··· 232 214 for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) 233 215 clk_register(periph_clocks[i]); 234 216 217 + clkdev_add_table(periph_clocks_lookups, 218 + ARRAY_SIZE(periph_clocks_lookups)); 219 + clkdev_add_table(usart_clocks_lookups, 220 + ARRAY_SIZE(usart_clocks_lookups)); 221 + 235 222 clk_register(&pck0); 236 223 clk_register(&pck1); 224 + } 225 + 226 + static struct clk_lookup console_clock_lookup; 227 + 228 + void __init at91sam9rl_set_console_clock(int id) 229 + { 230 + if (id >= ARRAY_SIZE(usart_clocks_lookups)) 231 + return; 232 + 233 + console_clock_lookup.con_id = "usart"; 234 + console_clock_lookup.clk = usart_clocks_lookups[id].clk; 235 + clkdev_add(&console_clock_lookup); 237 236 } 238 237 239 238 /* -------------------------------------------------------------------- ··· 287 252 * AT91SAM9RL processor initialization 288 253 * -------------------------------------------------------------------- */ 289 254 290 - void __init at91sam9rl_initialize(unsigned long main_clock) 255 + void __init at91sam9rl_map_io(void) 291 256 { 292 257 unsigned long cidr, sram_size; 293 258 ··· 310 275 311 276 /* Map SRAM */ 312 277 iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); 278 + } 313 279 280 + void __init at91sam9rl_initialize(unsigned long main_clock) 281 + { 314 282 at91_arch_reset = at91sam9_alt_reset; 315 283 pm_power_off = at91sam9rl_poweroff; 316 284 at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
+6 -17
arch/arm/mach-at91/at91sam9rl_devices.c
··· 155 155 156 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 158 platform_device_register(&at91_usba_udc_device); 163 159 } 164 160 #else ··· 601 605 602 606 static void __init at91_add_device_tc(void) 603 607 { 604 - /* this chip has a separate clock and irq for each TC channel */ 605 - at91_clock_associate("tc0_clk", &at91sam9rl_tcb_device.dev, "t0_clk"); 606 - at91_clock_associate("tc1_clk", &at91sam9rl_tcb_device.dev, "t1_clk"); 607 - at91_clock_associate("tc2_clk", &at91sam9rl_tcb_device.dev, "t2_clk"); 608 608 platform_device_register(&at91sam9rl_tcb_device); 609 609 } 610 610 #else ··· 884 892 case AT91SAM9RL_ID_SSC0: 885 893 pdev = &at91sam9rl_ssc0_device; 886 894 configure_ssc0_pins(pins); 887 - at91_clock_associate("ssc0_clk", &pdev->dev, "pclk"); 888 895 break; 889 896 case AT91SAM9RL_ID_SSC1: 890 897 pdev = &at91sam9rl_ssc1_device; 891 898 configure_ssc1_pins(pins); 892 - at91_clock_associate("ssc1_clk", &pdev->dev, "pclk"); 893 899 break; 894 900 default: 895 901 return; ··· 1131 1141 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) 1132 1142 { 1133 1143 struct platform_device *pdev; 1144 + struct atmel_uart_data *pdata; 1134 1145 1135 1146 switch (id) { 1136 1147 case 0: /* DBGU */ 1137 1148 pdev = &at91sam9rl_dbgu_device; 1138 1149 configure_dbgu_pins(); 1139 - at91_clock_associate("mck", &pdev->dev, "usart"); 1140 1150 break; 1141 1151 case AT91SAM9RL_ID_US0: 1142 1152 pdev = &at91sam9rl_uart0_device; 1143 1153 configure_usart0_pins(pins); 1144 - at91_clock_associate("usart0_clk", &pdev->dev, "usart"); 1145 1154 break; 1146 1155 case AT91SAM9RL_ID_US1: 1147 1156 pdev = &at91sam9rl_uart1_device; 1148 1157 configure_usart1_pins(pins); 1149 - at91_clock_associate("usart1_clk", &pdev->dev, "usart"); 1150 1158 break; 1151 1159 case AT91SAM9RL_ID_US2: 1152 1160 pdev = &at91sam9rl_uart2_device; 1153 1161 configure_usart2_pins(pins); 1154 - at91_clock_associate("usart2_clk", &pdev->dev, "usart"); 1155 1162 break; 1156 1163 case AT91SAM9RL_ID_US3: 1157 1164 pdev = &at91sam9rl_uart3_device; 1158 1165 configure_usart3_pins(pins); 1159 - at91_clock_associate("usart3_clk", &pdev->dev, "usart"); 1160 1166 break; 1161 1167 default: 1162 1168 return; 1163 1169 } 1164 - pdev->id = portnr; /* update to mapped ID */ 1170 + pdata = pdev->dev.platform_data; 1171 + pdata->num = portnr; /* update to mapped ID */ 1165 1172 1166 1173 if (portnr < ATMEL_MAX_UART) 1167 1174 at91_uarts[portnr] = pdev; ··· 1166 1179 1167 1180 void __init at91_set_serial_console(unsigned portnr) 1168 1181 { 1169 - if (portnr < ATMEL_MAX_UART) 1182 + if (portnr < ATMEL_MAX_UART) { 1170 1183 atmel_default_console_device = at91_uarts[portnr]; 1184 + at91sam9rl_set_console_clock(portnr); 1185 + } 1171 1186 } 1172 1187 1173 1188 void __init at91_add_device_serial(void)
-5
arch/arm/mach-at91/at91x40.c
··· 37 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 40 void __init at91x40_initialize(unsigned long main_clock) 46 41 { 47 42 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
+8 -4
arch/arm/mach-at91/board-1arm.c
··· 35 35 36 36 #include <mach/board.h> 37 37 #include <mach/gpio.h> 38 + #include <mach/cpu.h> 38 39 39 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 48 /* Initialize processor: 18.432 MHz crystal */ 45 - at91rm9200_initialize(18432000, AT91RM9200_PQFP); 49 + at91rm9200_initialize(18432000); 46 50 47 51 /* DBGU on ttyS0. (Rx & Tx only) */ 48 52 at91_register_uart(0, 0, 0); ··· 96 92 97 93 MACHINE_START(ONEARM, "Ajeco 1ARM single board computer") 98 94 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ 99 - .boot_params = AT91_SDRAM_BASE + 0x100, 100 95 .timer = &at91rm9200_timer, 101 - .map_io = onearm_map_io, 96 + .map_io = at91rm9200_map_io, 97 + .init_early = onearm_init_early, 102 98 .init_irq = onearm_init_irq, 103 99 .init_machine = onearm_board_init, 104 100 MACHINE_END
+3 -3
arch/arm/mach-at91/board-afeb-9260v1.c
··· 48 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 53 /* Initialize processor: 18.432 MHz crystal */ 54 54 at91sam9260_initialize(18432000); ··· 218 218 219 219 MACHINE_START(AFEB9260, "Custom afeb9260 board") 220 220 /* Maintainer: Sergey Lapin <slapin@ossfans.org> */ 221 - .boot_params = AT91_SDRAM_BASE + 0x100, 222 221 .timer = &at91sam926x_timer, 223 - .map_io = afeb9260_map_io, 222 + .map_io = at91sam9260_map_io, 223 + .init_early = afeb9260_init_early, 224 224 .init_irq = afeb9260_init_irq, 225 225 .init_machine = afeb9260_board_init, 226 226 MACHINE_END
-326
arch/arm/mach-at91/board-at572d940hf_ek.c
··· 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
+3 -3
arch/arm/mach-at91/board-cam60.c
··· 45 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 50 /* Initialize processor: 10 MHz crystal */ 51 51 at91sam9260_initialize(10000000); ··· 198 198 199 199 MACHINE_START(CAM60, "KwikByte CAM60") 200 200 /* Maintainer: KwikByte */ 201 - .boot_params = AT91_SDRAM_BASE + 0x100, 202 201 .timer = &at91sam926x_timer, 203 - .map_io = cam60_map_io, 202 + .map_io = at91sam9260_map_io, 203 + .init_early = cam60_init_early, 204 204 .init_irq = cam60_init_irq, 205 205 .init_machine = cam60_board_init, 206 206 MACHINE_END
+5 -8
arch/arm/mach-at91/board-cap9adk.c
··· 44 44 #include <mach/gpio.h> 45 45 #include <mach/at91cap9_matrix.h> 46 46 #include <mach/at91sam9_smc.h> 47 + #include <mach/system_rev.h> 47 48 48 49 #include "sam9_smc.h" 49 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 55 /* Initialize processor: 12 MHz crystal */ 55 56 at91cap9_initialize(12000000); ··· 188 187 // .rdy_pin = ... not connected 189 188 .enable_pin = AT91_PIN_PD15, 190 189 .partition_info = nand_partitions, 191 - #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) 192 - .bus_width_16 = 1, 193 - #else 194 - .bus_width_16 = 0, 195 - #endif 196 190 }; 197 191 198 192 static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { ··· 215 219 csa = at91_sys_read(AT91_MATRIX_EBICSA); 216 220 at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); 217 221 222 + cap9adk_nand_data.bus_width_16 = !board_have_nand_8bit(); 218 223 /* setup bus-width (8 or 16) */ 219 224 if (cap9adk_nand_data.bus_width_16) 220 225 cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16; ··· 396 399 397 400 MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK") 398 401 /* Maintainer: Stelian Pop <stelian.pop@leadtechdesign.com> */ 399 - .boot_params = AT91_SDRAM_BASE + 0x100, 400 402 .timer = &at91sam926x_timer, 401 - .map_io = cap9adk_map_io, 403 + .map_io = at91cap9_map_io, 404 + .init_early = cap9adk_init_early, 402 405 .init_irq = cap9adk_init_irq, 403 406 .init_machine = cap9adk_board_init, 404 407 MACHINE_END
+4 -4
arch/arm/mach-at91/board-carmeva.c
··· 40 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 45 /* Initialize processor: 20.000 MHz crystal */ 46 - at91rm9200_initialize(20000000, AT91RM9200_BGA); 46 + at91rm9200_initialize(20000000); 47 47 48 48 /* DBGU on ttyS0. (Rx & Tx only) */ 49 49 at91_register_uart(0, 0, 0); ··· 162 162 163 163 MACHINE_START(CARMEVA, "Carmeva") 164 164 /* Maintainer: Conitec Datasystems */ 165 - .boot_params = AT91_SDRAM_BASE + 0x100, 166 165 .timer = &at91rm9200_timer, 167 - .map_io = carmeva_map_io, 166 + .map_io = at91rm9200_map_io, 167 + .init_early = carmeva_init_early, 168 168 .init_irq = carmeva_init_irq, 169 169 .init_machine = carmeva_board_init, 170 170 MACHINE_END
+3 -3
arch/arm/mach-at91/board-cpu9krea.c
··· 47 47 #include "sam9_smc.h" 48 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 52 /* Initialize processor: 18.432 MHz crystal */ 53 53 at91sam9260_initialize(18432000); ··· 375 375 MACHINE_START(CPUAT9G20, "Eukrea CPU9G20") 376 376 #endif 377 377 /* Maintainer: Eric Benard - EUKREA Electromatique */ 378 - .boot_params = AT91_SDRAM_BASE + 0x100, 379 378 .timer = &at91sam926x_timer, 380 - .map_io = cpu9krea_map_io, 379 + .map_io = at91sam9260_map_io, 380 + .init_early = cpu9krea_init_early, 381 381 .init_irq = cpu9krea_init_irq, 382 382 .init_machine = cpu9krea_board_init, 383 383 MACHINE_END
+8 -4
arch/arm/mach-at91/board-cpuat91.c
··· 38 38 #include <mach/board.h> 39 39 #include <mach/gpio.h> 40 40 #include <mach/at91rm9200_mc.h> 41 + #include <mach/cpu.h> 41 42 42 43 #include "generic.h" 43 44 ··· 51 50 }, 52 51 }; 53 52 54 - static void __init cpuat91_map_io(void) 53 + static void __init cpuat91_init_early(void) 55 54 { 55 + /* Set cpu type: PQFP */ 56 + at91rm9200_set_type(ARCH_REVISON_9200_PQFP); 57 + 56 58 /* Initialize processor: 18.432 MHz crystal */ 57 - at91rm9200_initialize(18432000, AT91RM9200_PQFP); 59 + at91rm9200_initialize(18432000); 58 60 59 61 /* DBGU on ttyS0. (Rx & Tx only) */ 60 62 at91_register_uart(0, 0, 0); ··· 179 175 180 176 MACHINE_START(CPUAT91, "Eukrea") 181 177 /* Maintainer: Eric Benard - EUKREA Electromatique */ 182 - .boot_params = AT91_SDRAM_BASE + 0x100, 183 178 .timer = &at91rm9200_timer, 184 - .map_io = cpuat91_map_io, 179 + .map_io = at91rm9200_map_io, 180 + .init_early = cpuat91_init_early, 185 181 .init_irq = cpuat91_init_irq, 186 182 .init_machine = cpuat91_board_init, 187 183 MACHINE_END
+4 -4
arch/arm/mach-at91/board-csb337.c
··· 43 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 48 /* Initialize processor: 3.6864 MHz crystal */ 49 - at91rm9200_initialize(3686400, AT91RM9200_BGA); 49 + at91rm9200_initialize(3686400); 50 50 51 51 /* Setup the LEDs */ 52 52 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); ··· 257 257 258 258 MACHINE_START(CSB337, "Cogent CSB337") 259 259 /* Maintainer: Bill Gatliff */ 260 - .boot_params = AT91_SDRAM_BASE + 0x100, 261 260 .timer = &at91rm9200_timer, 262 - .map_io = csb337_map_io, 261 + .map_io = at91rm9200_map_io, 262 + .init_early = csb337_init_early, 263 263 .init_irq = csb337_init_irq, 264 264 .init_machine = csb337_board_init, 265 265 MACHINE_END
+4 -4
arch/arm/mach-at91/board-csb637.c
··· 40 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 45 /* Initialize processor: 3.6864 MHz crystal */ 46 - at91rm9200_initialize(3686400, AT91RM9200_BGA); 46 + at91rm9200_initialize(3686400); 47 47 48 48 /* DBGU on ttyS0. (Rx & Tx only) */ 49 49 at91_register_uart(0, 0, 0); ··· 138 138 139 139 MACHINE_START(CSB637, "Cogent CSB637") 140 140 /* Maintainer: Bill Gatliff */ 141 - .boot_params = AT91_SDRAM_BASE + 0x100, 142 141 .timer = &at91rm9200_timer, 143 - .map_io = csb637_map_io, 142 + .map_io = at91rm9200_map_io, 143 + .init_early = csb637_init_early, 144 144 .init_irq = csb637_init_irq, 145 145 .init_machine = csb637_board_init, 146 146 MACHINE_END
+2 -2
arch/arm/mach-at91/board-eb01.c
··· 35 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 40 at91x40_initialize(40000000); 41 41 } ··· 43 43 MACHINE_START(AT91EB01, "Atmel AT91 EB01") 44 44 /* Maintainer: Greg Ungerer <gerg@snapgear.com> */ 45 45 .timer = &at91x40_timer, 46 + .init_early = at91eb01_init_early, 46 47 .init_irq = at91eb01_init_irq, 47 - .map_io = at91eb01_map_io, 48 48 MACHINE_END 49 49
+4 -4
arch/arm/mach-at91/board-eb9200.c
··· 40 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 45 /* Initialize processor: 18.432 MHz crystal */ 46 - at91rm9200_initialize(18432000, AT91RM9200_BGA); 46 + at91rm9200_initialize(18432000); 47 47 48 48 /* DBGU on ttyS0. (Rx & Tx only) */ 49 49 at91_register_uart(0, 0, 0); ··· 120 120 } 121 121 122 122 MACHINE_START(ATEB9200, "Embest ATEB9200") 123 - .boot_params = AT91_SDRAM_BASE + 0x100, 124 123 .timer = &at91rm9200_timer, 125 - .map_io = eb9200_map_io, 124 + .map_io = at91rm9200_map_io, 125 + .init_early = eb9200_init_early, 126 126 .init_irq = eb9200_init_irq, 127 127 .init_machine = eb9200_board_init, 128 128 MACHINE_END
+8 -4
arch/arm/mach-at91/board-ecbat91.c
··· 38 38 39 39 #include <mach/board.h> 40 40 #include <mach/gpio.h> 41 + #include <mach/cpu.h> 41 42 42 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 51 /* Initialize processor: 18.432 MHz crystal */ 48 - at91rm9200_initialize(18432000, AT91RM9200_PQFP); 52 + at91rm9200_initialize(18432000); 49 53 50 54 /* Setup the LEDs */ 51 55 at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); ··· 172 168 173 169 MACHINE_START(ECBAT91, "emQbit's ECB_AT91") 174 170 /* Maintainer: emQbit.com */ 175 - .boot_params = AT91_SDRAM_BASE + 0x100, 176 171 .timer = &at91rm9200_timer, 177 - .map_io = ecb_at91map_io, 172 + .map_io = at91rm9200_map_io, 173 + .init_early = ecb_at91init_early, 178 174 .init_irq = ecb_at91init_irq, 179 175 .init_machine = ecb_at91board_init, 180 176 MACHINE_END
+9 -23
arch/arm/mach-at91/board-eco920.c
··· 26 26 27 27 #include <mach/board.h> 28 28 #include <mach/at91rm9200_mc.h> 29 + #include <mach/cpu.h> 30 + 29 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 40 /* Setup the LEDs */ 36 41 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); ··· 91 86 .num_resources = 1, 92 87 }; 93 88 94 - static struct resource at91_beeper_resources[] = { 95 - [0] = { 96 - .start = AT91RM9200_BASE_TC3, 97 - .end = AT91RM9200_BASE_TC3 + 0x39, 98 - .flags = IORESOURCE_MEM, 99 - }, 100 - }; 101 - 102 - static struct platform_device at91_beeper = { 103 - .name = "at91_beeper", 104 - .id = 0, 105 - .resource = at91_beeper_resources, 106 - .num_resources = ARRAY_SIZE(at91_beeper_resources), 107 - }; 108 - 109 89 static struct spi_board_info eco920_spi_devices[] = { 110 90 { /* CAN controller */ 111 91 .modalias = "tlv5638", ··· 129 139 AT91_SMC_TDF_(1) /* float time */ 130 140 ); 131 141 132 - at91_clock_associate("tc3_clk", &at91_beeper.dev, "at91_beeper"); 133 - at91_set_B_periph(AT91_PIN_PB6, 0); 134 - platform_device_register(&at91_beeper); 135 - 136 142 at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices)); 137 143 } 138 144 139 145 MACHINE_START(ECO920, "eco920") 140 146 /* Maintainer: Sascha Hauer */ 141 - .boot_params = AT91_SDRAM_BASE + 0x100, 142 147 .timer = &at91rm9200_timer, 143 - .map_io = eco920_map_io, 148 + .map_io = at91rm9200_map_io, 149 + .init_early = eco920_init_early, 144 150 .init_irq = eco920_init_irq, 145 151 .init_machine = eco920_board_init, 146 152 MACHINE_END
+3 -3
arch/arm/mach-at91/board-flexibity.c
··· 37 37 38 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 42 /* Initialize processor: 18.432 MHz crystal */ 43 43 at91sam9260_initialize(18432000); ··· 154 154 155 155 MACHINE_START(FLEXIBITY, "Flexibity Connect") 156 156 /* Maintainer: Maxim Osipov */ 157 - .boot_params = AT91_SDRAM_BASE + 0x100, 158 157 .timer = &at91sam926x_timer, 159 - .map_io = flexibity_map_io, 158 + .map_io = at91sam9260_map_io, 159 + .init_early = flexibity_init_early, 160 160 .init_irq = flexibity_init_irq, 161 161 .init_machine = flexibity_board_init, 162 162 MACHINE_END
+3 -3
arch/arm/mach-at91/board-foxg20.c
··· 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 62 /* Initialize processor: 18.432 MHz crystal */ 63 63 at91sam9260_initialize(18432000); ··· 266 266 267 267 MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20") 268 268 /* Maintainer: Sergio Tanzilli */ 269 - .boot_params = AT91_SDRAM_BASE + 0x100, 270 269 .timer = &at91sam926x_timer, 271 - .map_io = foxg20_map_io, 270 + .map_io = at91sam9260_map_io, 271 + .init_early = foxg20_init_early, 272 272 .init_irq = foxg20_init_irq, 273 273 .init_machine = foxg20_board_init, 274 274 MACHINE_END
+4 -4
arch/arm/mach-at91/board-gsia18s.c
··· 38 38 #include "sam9_smc.h" 39 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 46 * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). ··· 576 576 } 577 577 578 578 MACHINE_START(GSIA18S, "GS_IA18_S") 579 - .boot_params = AT91_SDRAM_BASE + 0x100, 580 579 .timer = &at91sam926x_timer, 581 - .map_io = gsia18s_map_io, 580 + .map_io = at91sam9260_map_io, 581 + .init_early = gsia18s_init_early, 582 582 .init_irq = init_irq, 583 583 .init_machine = gsia18s_board_init, 584 584 MACHINE_END
+8 -4
arch/arm/mach-at91/board-kafa.c
··· 35 35 36 36 #include <mach/board.h> 37 37 #include <mach/gpio.h> 38 + #include <mach/cpu.h> 38 39 39 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 48 /* Initialize processor: 18.432 MHz crystal */ 45 - at91rm9200_initialize(18432000, AT91RM9200_PQFP); 49 + at91rm9200_initialize(18432000); 46 50 47 51 /* Set up the LEDs */ 48 52 at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); ··· 98 94 99 95 MACHINE_START(KAFA, "Sperry-Sun KAFA") 100 96 /* Maintainer: Sergei Sharonov */ 101 - .boot_params = AT91_SDRAM_BASE + 0x100, 102 97 .timer = &at91rm9200_timer, 103 - .map_io = kafa_map_io, 98 + .map_io = at91rm9200_map_io, 99 + .init_early = kafa_init_early, 104 100 .init_irq = kafa_init_irq, 105 101 .init_machine = kafa_board_init, 106 102 MACHINE_END
+8 -5
arch/arm/mach-at91/board-kb9202.c
··· 36 36 37 37 #include <mach/board.h> 38 38 #include <mach/gpio.h> 39 - 39 + #include <mach/cpu.h> 40 40 #include <mach/at91rm9200_mc.h> 41 41 42 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 50 /* Initialize processor: 10 MHz crystal */ 48 - at91rm9200_initialize(10000000, AT91RM9200_PQFP); 51 + at91rm9200_initialize(10000000); 49 52 50 53 /* Set up the LEDs */ 51 54 at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); ··· 139 136 140 137 MACHINE_START(KB9200, "KB920x") 141 138 /* Maintainer: KwikByte, Inc. */ 142 - .boot_params = AT91_SDRAM_BASE + 0x100, 143 139 .timer = &at91rm9200_timer, 144 - .map_io = kb9202_map_io, 140 + .map_io = at91rm9200_map_io, 141 + .init_early = kb9202_init_early, 145 142 .init_irq = kb9202_init_irq, 146 143 .init_machine = kb9202_board_init, 147 144 MACHINE_END
+3 -3
arch/arm/mach-at91/board-neocore926.c
··· 51 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 56 /* Initialize processor: 20 MHz crystal */ 57 57 at91sam9263_initialize(20000000); ··· 387 387 388 388 MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926") 389 389 /* Maintainer: ADENEO */ 390 - .boot_params = AT91_SDRAM_BASE + 0x100, 391 390 .timer = &at91sam926x_timer, 392 - .map_io = neocore926_map_io, 391 + .map_io = at91sam9263_map_io, 392 + .init_early = neocore926_init_early, 393 393 .init_irq = neocore926_init_irq, 394 394 .init_machine = neocore926_board_init, 395 395 MACHINE_END
+4 -4
arch/arm/mach-at91/board-pcontrol-g20.c
··· 37 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 44 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ 45 45 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS ··· 222 222 223 223 MACHINE_START(PCONTROL_G20, "PControl G20") 224 224 /* Maintainer: pgsellmann@portner-elektronik.at */ 225 - .boot_params = AT91_SDRAM_BASE + 0x100, 226 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 228 .init_irq = init_irq, 229 229 .init_machine = pcontrol_g20_board_init, 230 230 MACHINE_END
+4 -4
arch/arm/mach-at91/board-picotux200.c
··· 43 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 48 /* Initialize processor: 18.432 MHz crystal */ 49 - at91rm9200_initialize(18432000, AT91RM9200_BGA); 49 + at91rm9200_initialize(18432000); 50 50 51 51 /* DBGU on ttyS0. (Rx & Tx only) */ 52 52 at91_register_uart(0, 0, 0); ··· 123 123 124 124 MACHINE_START(PICOTUX2XX, "picotux 200") 125 125 /* Maintainer: Kleinhenz Elektronik GmbH */ 126 - .boot_params = AT91_SDRAM_BASE + 0x100, 127 126 .timer = &at91rm9200_timer, 128 - .map_io = picotux200_map_io, 127 + .map_io = at91rm9200_map_io, 128 + .init_early = picotux200_init_early, 129 129 .init_irq = picotux200_init_irq, 130 130 .init_machine = picotux200_board_init, 131 131 MACHINE_END
+3 -3
arch/arm/mach-at91/board-qil-a9260.c
··· 48 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 53 /* Initialize processor: 12.000 MHz crystal */ 54 54 at91sam9260_initialize(12000000); ··· 268 268 269 269 MACHINE_START(QIL_A9260, "CALAO QIL_A9260") 270 270 /* Maintainer: calao-systems */ 271 - .boot_params = AT91_SDRAM_BASE + 0x100, 272 271 .timer = &at91sam926x_timer, 273 - .map_io = ek_map_io, 272 + .map_io = at91sam9260_map_io, 273 + .init_early = ek_init_early, 274 274 .init_irq = ek_init_irq, 275 275 .init_machine = ek_board_init, 276 276 MACHINE_END
+4 -4
arch/arm/mach-at91/board-rm9200dk.c
··· 45 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 50 /* Initialize processor: 18.432 MHz crystal */ 51 - at91rm9200_initialize(18432000, AT91RM9200_BGA); 51 + at91rm9200_initialize(18432000); 52 52 53 53 /* Setup the LEDs */ 54 54 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); ··· 227 227 228 228 MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK") 229 229 /* Maintainer: SAN People/Atmel */ 230 - .boot_params = AT91_SDRAM_BASE + 0x100, 231 230 .timer = &at91rm9200_timer, 232 - .map_io = dk_map_io, 231 + .map_io = at91rm9200_map_io, 232 + .init_early = dk_init_early, 233 233 .init_irq = dk_init_irq, 234 234 .init_machine = dk_board_init, 235 235 MACHINE_END
+4 -4
arch/arm/mach-at91/board-rm9200ek.c
··· 45 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 50 /* Initialize processor: 18.432 MHz crystal */ 51 - at91rm9200_initialize(18432000, AT91RM9200_BGA); 51 + at91rm9200_initialize(18432000); 52 52 53 53 /* Setup the LEDs */ 54 54 at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); ··· 193 193 194 194 MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK") 195 195 /* Maintainer: SAN People/Atmel */ 196 - .boot_params = AT91_SDRAM_BASE + 0x100, 197 196 .timer = &at91rm9200_timer, 198 - .map_io = ek_map_io, 197 + .map_io = at91rm9200_map_io, 198 + .init_early = ek_init_early, 199 199 .init_irq = ek_init_irq, 200 200 .init_machine = ek_board_init, 201 201 MACHINE_END
+3 -3
arch/arm/mach-at91/board-sam9-l9260.c
··· 44 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 49 /* Initialize processor: 18.432 MHz crystal */ 50 50 at91sam9260_initialize(18432000); ··· 212 212 213 213 MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260") 214 214 /* Maintainer: Olimex */ 215 - .boot_params = AT91_SDRAM_BASE + 0x100, 216 215 .timer = &at91sam926x_timer, 217 - .map_io = ek_map_io, 216 + .map_io = at91sam9260_map_io, 217 + .init_early = ek_init_early, 218 218 .init_irq = ek_init_irq, 219 219 .init_machine = ek_board_init, 220 220 MACHINE_END
+5 -8
arch/arm/mach-at91/board-sam9260ek.c
··· 44 44 #include <mach/gpio.h> 45 45 #include <mach/at91sam9_smc.h> 46 46 #include <mach/at91_shdwc.h> 47 + #include <mach/system_rev.h> 47 48 48 49 #include "sam9_smc.h" 49 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 55 /* Initialize processor: 18.432 MHz crystal */ 55 56 at91sam9260_initialize(18432000); ··· 192 191 .rdy_pin = AT91_PIN_PC13, 193 192 .enable_pin = AT91_PIN_PC14, 194 193 .partition_info = nand_partitions, 195 - #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) 196 - .bus_width_16 = 1, 197 - #else 198 - .bus_width_16 = 0, 199 - #endif 200 194 }; 201 195 202 196 static struct sam9_smc_config __initdata ek_nand_smc_config = { ··· 214 218 215 219 static void __init ek_add_device_nand(void) 216 220 { 221 + ek_nand_data.bus_width_16 = !board_have_nand_8bit(); 217 222 /* setup bus-width (8 or 16) */ 218 223 if (ek_nand_data.bus_width_16) 219 224 ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ··· 353 356 354 357 MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") 355 358 /* Maintainer: Atmel */ 356 - .boot_params = AT91_SDRAM_BASE + 0x100, 357 359 .timer = &at91sam926x_timer, 358 - .map_io = ek_map_io, 360 + .map_io = at91sam9260_map_io, 361 + .init_early = ek_init_early, 359 362 .init_irq = ek_init_irq, 360 363 .init_machine = ek_board_init, 361 364 MACHINE_END
+5 -8
arch/arm/mach-at91/board-sam9261ek.c
··· 48 48 #include <mach/gpio.h> 49 49 #include <mach/at91sam9_smc.h> 50 50 #include <mach/at91_shdwc.h> 51 + #include <mach/system_rev.h> 51 52 52 53 #include "sam9_smc.h" 53 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 59 /* Initialize processor: 18.432 MHz crystal */ 59 60 at91sam9261_initialize(18432000); ··· 198 197 .rdy_pin = AT91_PIN_PC15, 199 198 .enable_pin = AT91_PIN_PC14, 200 199 .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 200 }; 207 201 208 202 static struct sam9_smc_config __initdata ek_nand_smc_config = { ··· 220 224 221 225 static void __init ek_add_device_nand(void) 222 226 { 227 + ek_nand_data.bus_width_16 = !board_have_nand_8bit(); 223 228 /* setup bus-width (8 or 16) */ 224 229 if (ek_nand_data.bus_width_16) 225 230 ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ··· 620 623 MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK") 621 624 #endif 622 625 /* Maintainer: Atmel */ 623 - .boot_params = AT91_SDRAM_BASE + 0x100, 624 626 .timer = &at91sam926x_timer, 625 - .map_io = ek_map_io, 627 + .map_io = at91sam9261_map_io, 628 + .init_early = ek_init_early, 626 629 .init_irq = ek_init_irq, 627 630 .init_machine = ek_board_init, 628 631 MACHINE_END
+5 -8
arch/arm/mach-at91/board-sam9263ek.c
··· 47 47 #include <mach/gpio.h> 48 48 #include <mach/at91sam9_smc.h> 49 49 #include <mach/at91_shdwc.h> 50 + #include <mach/system_rev.h> 50 51 51 52 #include "sam9_smc.h" 52 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 58 /* Initialize processor: 16.367 MHz crystal */ 58 59 at91sam9263_initialize(16367660); ··· 199 198 .rdy_pin = AT91_PIN_PA22, 200 199 .enable_pin = AT91_PIN_PD15, 201 200 .partition_info = nand_partitions, 202 - #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) 203 - .bus_width_16 = 1, 204 - #else 205 - .bus_width_16 = 0, 206 - #endif 207 201 }; 208 202 209 203 static struct sam9_smc_config __initdata ek_nand_smc_config = { ··· 221 225 222 226 static void __init ek_add_device_nand(void) 223 227 { 228 + ek_nand_data.bus_width_16 = !board_have_nand_8bit(); 224 229 /* setup bus-width (8 or 16) */ 225 230 if (ek_nand_data.bus_width_16) 226 231 ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ··· 451 454 452 455 MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") 453 456 /* Maintainer: Atmel */ 454 - .boot_params = AT91_SDRAM_BASE + 0x100, 455 457 .timer = &at91sam926x_timer, 456 - .map_io = ek_map_io, 458 + .map_io = at91sam9263_map_io, 459 + .init_early = ek_init_early, 457 460 .init_irq = ek_init_irq, 458 461 .init_machine = ek_board_init, 459 462 MACHINE_END
+7 -10
arch/arm/mach-at91/board-sam9g20ek.c
··· 43 43 #include <mach/board.h> 44 44 #include <mach/gpio.h> 45 45 #include <mach/at91sam9_smc.h> 46 + #include <mach/system_rev.h> 46 47 47 48 #include "sam9_smc.h" 48 49 #include "generic.h" ··· 61 60 } 62 61 63 62 64 - static void __init ek_map_io(void) 63 + static void __init ek_init_early(void) 65 64 { 66 65 /* Initialize processor: 18.432 MHz crystal */ 67 66 at91sam9260_initialize(18432000); ··· 176 175 .rdy_pin = AT91_PIN_PC13, 177 176 .enable_pin = AT91_PIN_PC14, 178 177 .partition_info = nand_partitions, 179 - #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) 180 - .bus_width_16 = 1, 181 - #else 182 - .bus_width_16 = 0, 183 - #endif 184 178 }; 185 179 186 180 static struct sam9_smc_config __initdata ek_nand_smc_config = { ··· 198 202 199 203 static void __init ek_add_device_nand(void) 200 204 { 205 + ek_nand_data.bus_width_16 = !board_have_nand_8bit(); 201 206 /* setup bus-width (8 or 16) */ 202 207 if (ek_nand_data.bus_width_16) 203 208 ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ··· 403 406 404 407 MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") 405 408 /* Maintainer: Atmel */ 406 - .boot_params = AT91_SDRAM_BASE + 0x100, 407 409 .timer = &at91sam926x_timer, 408 - .map_io = ek_map_io, 410 + .map_io = at91sam9260_map_io, 411 + .init_early = ek_init_early, 409 412 .init_irq = ek_init_irq, 410 413 .init_machine = ek_board_init, 411 414 MACHINE_END 412 415 413 416 MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod") 414 417 /* Maintainer: Atmel */ 415 - .boot_params = AT91_SDRAM_BASE + 0x100, 416 418 .timer = &at91sam926x_timer, 417 - .map_io = ek_map_io, 419 + .map_io = at91sam9260_map_io, 420 + .init_early = ek_init_early, 418 421 .init_irq = ek_init_irq, 419 422 .init_machine = ek_board_init, 420 423 MACHINE_END
+5 -8
arch/arm/mach-at91/board-sam9m10g45ek.c
··· 41 41 #include <mach/gpio.h> 42 42 #include <mach/at91sam9_smc.h> 43 43 #include <mach/at91_shdwc.h> 44 + #include <mach/system_rev.h> 44 45 45 46 #include "sam9_smc.h" 46 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 52 /* Initialize processor: 12.000 MHz crystal */ 52 53 at91sam9g45_initialize(12000000); ··· 156 155 .rdy_pin = AT91_PIN_PC8, 157 156 .enable_pin = AT91_PIN_PC14, 158 157 .partition_info = nand_partitions, 159 - #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) 160 - .bus_width_16 = 1, 161 - #else 162 - .bus_width_16 = 0, 163 - #endif 164 158 }; 165 159 166 160 static struct sam9_smc_config __initdata ek_nand_smc_config = { ··· 178 182 179 183 static void __init ek_add_device_nand(void) 180 184 { 185 + ek_nand_data.bus_width_16 = !board_have_nand_8bit(); 181 186 /* setup bus-width (8 or 16) */ 182 187 if (ek_nand_data.bus_width_16) 183 188 ek_nand_smc_config.mode |= AT91_SMC_DBW_16; ··· 421 424 422 425 MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK") 423 426 /* Maintainer: Atmel */ 424 - .boot_params = AT91_SDRAM_BASE + 0x100, 425 427 .timer = &at91sam926x_timer, 426 - .map_io = ek_map_io, 428 + .map_io = at91sam9g45_map_io, 429 + .init_early = ek_init_early, 427 430 .init_irq = ek_init_irq, 428 431 .init_machine = ek_board_init, 429 432 MACHINE_END
+3 -3
arch/arm/mach-at91/board-sam9rlek.c
··· 38 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 43 /* Initialize processor: 12.000 MHz crystal */ 44 44 at91sam9rl_initialize(12000000); ··· 329 329 330 330 MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK") 331 331 /* Maintainer: Atmel */ 332 - .boot_params = AT91_SDRAM_BASE + 0x100, 333 332 .timer = &at91sam926x_timer, 334 - .map_io = ek_map_io, 333 + .map_io = at91sam9rl_map_io, 334 + .init_early = ek_init_early, 335 335 .init_irq = ek_init_irq, 336 336 .init_machine = ek_board_init, 337 337 MACHINE_END
+3 -3
arch/arm/mach-at91/board-snapper9260.c
··· 40 40 41 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 45 at91sam9260_initialize(18432000); 46 46 ··· 178 178 } 179 179 180 180 MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module") 181 - .boot_params = AT91_SDRAM_BASE + 0x100, 182 181 .timer = &at91sam926x_timer, 183 - .map_io = snapper9260_map_io, 182 + .map_io = at91sam9260_map_io, 183 + .init_early = snapper9260_init_early, 184 184 .init_irq = snapper9260_init_irq, 185 185 .init_machine = snapper9260_board_init, 186 186 MACHINE_END
+9 -9
arch/arm/mach-at91/board-stamp9g20.c
··· 32 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 37 /* Initialize processor: 18.432 MHz crystal */ 38 38 at91sam9260_initialize(18432000); ··· 44 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 51 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ 52 52 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS ··· 54 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 61 /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ 62 62 at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS ··· 298 298 299 299 MACHINE_START(PORTUXG20, "taskit PortuxG20") 300 300 /* Maintainer: taskit GmbH */ 301 - .boot_params = AT91_SDRAM_BASE + 0x100, 302 301 .timer = &at91sam926x_timer, 303 - .map_io = portuxg20_map_io, 302 + .map_io = at91sam9260_map_io, 303 + .init_early = portuxg20_init_early, 304 304 .init_irq = init_irq, 305 305 .init_machine = portuxg20_board_init, 306 306 MACHINE_END 307 307 308 308 MACHINE_START(STAMP9G20, "taskit Stamp9G20") 309 309 /* Maintainer: taskit GmbH */ 310 - .boot_params = AT91_SDRAM_BASE + 0x100, 311 310 .timer = &at91sam926x_timer, 312 - .map_io = stamp9g20evb_map_io, 311 + .map_io = at91sam9260_map_io, 312 + .init_early = stamp9g20evb_init_early, 313 313 .init_irq = init_irq, 314 314 .init_machine = stamp9g20evb_board_init, 315 315 MACHINE_END
+3 -3
arch/arm/mach-at91/board-usb-a9260.c
··· 48 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 53 /* Initialize processor: 12.000 MHz crystal */ 54 54 at91sam9260_initialize(12000000); ··· 228 228 229 229 MACHINE_START(USB_A9260, "CALAO USB_A9260") 230 230 /* Maintainer: calao-systems */ 231 - .boot_params = AT91_SDRAM_BASE + 0x100, 232 231 .timer = &at91sam926x_timer, 233 - .map_io = ek_map_io, 232 + .map_io = at91sam9260_map_io, 233 + .init_early = ek_init_early, 234 234 .init_irq = ek_init_irq, 235 235 .init_machine = ek_board_init, 236 236 MACHINE_END
+3 -3
arch/arm/mach-at91/board-usb-a9263.c
··· 47 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 52 /* Initialize processor: 12.00 MHz crystal */ 53 53 at91sam9263_initialize(12000000); ··· 244 244 245 245 MACHINE_START(USB_A9263, "CALAO USB_A9263") 246 246 /* Maintainer: calao-systems */ 247 - .boot_params = AT91_SDRAM_BASE + 0x100, 248 247 .timer = &at91sam926x_timer, 249 - .map_io = ek_map_io, 248 + .map_io = at91sam9263_map_io, 249 + .init_early = ek_init_early, 250 250 .init_irq = ek_init_irq, 251 251 .init_machine = ek_board_init, 252 252 MACHINE_END
+8 -4
arch/arm/mach-at91/board-yl-9200.c
··· 45 45 #include <mach/board.h> 46 46 #include <mach/gpio.h> 47 47 #include <mach/at91rm9200_mc.h> 48 + #include <mach/cpu.h> 48 49 49 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 58 /* Initialize processor: 18.432 MHz crystal */ 55 - at91rm9200_initialize(18432000, AT91RM9200_PQFP); 59 + at91rm9200_initialize(18432000); 56 60 57 61 /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ 58 62 at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); ··· 598 594 599 595 MACHINE_START(YL9200, "uCdragon YL-9200") 600 596 /* Maintainer: S.Birtles */ 601 - .boot_params = AT91_SDRAM_BASE + 0x100, 602 597 .timer = &at91rm9200_timer, 603 - .map_io = yl9200_map_io, 598 + .map_io = at91rm9200_map_io, 599 + .init_early = yl9200_init_early, 604 600 .init_irq = yl9200_init_irq, 605 601 .init_machine = yl9200_board_init, 606 602 MACHINE_END
+19 -50
arch/arm/mach-at91/clock.c
··· 163 163 .parent = &pllb, 164 164 .mode = pmc_sys_mode, 165 165 }; 166 - static struct clk utmi_clk = { 166 + struct clk utmi_clk = { 167 167 .name = "utmi_clk", 168 168 .parent = &main_clk, 169 169 .pmc_mask = AT91_PMC_UPLLEN, /* in CKGR_UCKR */ ··· 182 182 * memory, interfaces to on-chip peripherals, the AIC, and sometimes more 183 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 186 .name = "mck", 187 187 .pmc_mask = AT91_PMC_MCKRDY, /* in PMC_SR */ 188 188 }; ··· 214 214 215 215 return NULL; 216 216 } 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 217 255 218 static void __clk_enable(struct clk *clk) 256 219 { ··· 461 498 /*------------------------------------------------------------------------*/ 462 499 463 500 /* Register a new clock */ 501 + static void __init at91_clk_add(struct clk *clk) 502 + { 503 + list_add_tail(&clk->node, &clocks); 504 + 505 + clk->cl.con_id = clk->name; 506 + clk->cl.clk = clk; 507 + clkdev_add(&clk->cl); 508 + } 509 + 464 510 int __init clk_register(struct clk *clk) 465 511 { 466 512 if (clk_is_peripheral(clk)) { 467 513 if (!clk->parent) 468 514 clk->parent = &mck; 469 515 clk->mode = pmc_periph_mode; 470 - list_add_tail(&clk->node, &clocks); 471 516 } 472 517 else if (clk_is_sys(clk)) { 473 518 clk->parent = &mck; 474 519 clk->mode = pmc_sys_mode; 475 - 476 - list_add_tail(&clk->node, &clocks); 477 520 } 478 521 #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS 479 522 else if (clk_is_programmable(clk)) { 480 523 clk->mode = pmc_sys_mode; 481 524 init_programmable_clock(clk); 482 - list_add_tail(&clk->node, &clocks); 483 525 } 484 526 #endif 485 527 528 + at91_clk_add(clk); 529 + 486 530 return 0; 487 531 } 488 - 489 532 490 533 /*------------------------------------------------------------------------*/ 491 534 ··· 599 630 at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); 600 631 } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || 601 632 cpu_is_at91sam9263() || cpu_is_at91sam9g20() || 602 - cpu_is_at91sam9g10() || cpu_is_at572d940hf()) { 633 + cpu_is_at91sam9g10()) { 603 634 uhpck.pmc_mask = AT91SAM926x_PMC_UHP; 604 635 udpck.pmc_mask = AT91SAM926x_PMC_UDP; 605 636 } else if (cpu_is_at91cap9()) { ··· 723 754 724 755 /* Register the PMC's standard clocks */ 725 756 for (i = 0; i < ARRAY_SIZE(standard_pmc_clocks); i++) 726 - list_add_tail(&standard_pmc_clocks[i]->node, &clocks); 757 + at91_clk_add(standard_pmc_clocks[i]); 727 758 728 759 if (cpu_has_pllb()) 729 - list_add_tail(&pllb.node, &clocks); 760 + at91_clk_add(&pllb); 730 761 731 762 if (cpu_has_uhp()) 732 - list_add_tail(&uhpck.node, &clocks); 763 + at91_clk_add(&uhpck); 733 764 734 765 if (cpu_has_udpfs()) 735 - list_add_tail(&udpck.node, &clocks); 766 + at91_clk_add(&udpck); 736 767 737 768 if (cpu_has_utmi()) 738 - list_add_tail(&utmi_clk.node, &clocks); 769 + at91_clk_add(&utmi_clk); 739 770 740 771 /* MCK and CPU clock are "always on" */ 741 772 clk_enable(&mck);
+18 -2
arch/arm/mach-at91/clock.h
··· 6 6 * published by the Free Software Foundation. 7 7 */ 8 8 9 + #include <linux/clkdev.h> 10 + 9 11 #define CLK_TYPE_PRIMARY 0x1 10 12 #define CLK_TYPE_PLL 0x2 11 13 #define CLK_TYPE_PROGRAMMABLE 0x4 ··· 18 16 struct clk { 19 17 struct list_head node; 20 18 const char *name; /* unique clock name */ 21 - const char *function; /* function of the clock */ 22 - struct device *dev; /* device associated with function */ 19 + struct clk_lookup cl; 23 20 unsigned long rate_hz; 24 21 struct clk *parent; 25 22 u32 pmc_mask; ··· 30 29 31 30 32 31 extern int __init clk_register(struct clk *clk); 32 + extern struct clk mck; 33 + extern struct clk utmi_clk; 34 + 35 + #define CLKDEV_CON_ID(_id, _clk) \ 36 + { \ 37 + .con_id = _id, \ 38 + .clk = _clk, \ 39 + } 40 + 41 + #define CLKDEV_CON_DEV_ID(_con_id, _dev_id, _clk) \ 42 + { \ 43 + .con_id = _con_id, \ 44 + .dev_id = _dev_id, \ 45 + .clk = _clk, \ 46 + }
+26 -4
arch/arm/mach-at91/generic.h
··· 8 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 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 26 extern void __init at91sam9260_initialize(unsigned long main_clock); 14 27 extern void __init at91sam9261_initialize(unsigned long main_clock); 15 28 extern void __init at91sam9263_initialize(unsigned long main_clock); ··· 30 17 extern void __init at91sam9g45_initialize(unsigned long main_clock); 31 18 extern void __init at91x40_initialize(unsigned long main_clock); 32 19 extern void __init at91cap9_initialize(unsigned long main_clock); 33 - extern void __init at572d940hf_initialize(unsigned long main_clock); 34 20 35 21 /* Interrupts */ 36 22 extern void __init at91rm9200_init_interrupts(unsigned int priority[]); ··· 40 28 extern void __init at91sam9g45_init_interrupts(unsigned int priority[]); 41 29 extern void __init at91x40_init_interrupts(unsigned int priority[]); 42 30 extern void __init at91cap9_init_interrupts(unsigned int priority[]); 43 - extern void __init at572d940hf_init_interrupts(unsigned int priority[]); 44 31 extern void __init at91_aic_init(unsigned int priority[]); 45 32 46 33 /* Timer */ ··· 50 39 51 40 /* Clocks */ 52 41 extern int __init at91_clock_init(unsigned long main_clock); 42 + /* 43 + * function to specify the clock of the default console. As we do not 44 + * use the device/driver bus, the dev_name is not intialize. So we need 45 + * to link the clock to a specific con_id only "usart" 46 + */ 47 + extern void __init at91rm9200_set_console_clock(int id); 48 + extern void __init at91sam9260_set_console_clock(int id); 49 + extern void __init at91sam9261_set_console_clock(int id); 50 + extern void __init at91sam9263_set_console_clock(int id); 51 + extern void __init at91sam9rl_set_console_clock(int id); 52 + extern void __init at91sam9g45_set_console_clock(int id); 53 + extern void __init at91cap9_set_console_clock(int id); 53 54 struct device; 54 - extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func); 55 55 56 56 /* Power Management */ 57 57 extern void at91_irq_suspend(void);
-123
arch/arm/mach-at91/include/mach/at572d940hf.h
··· 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
-123
arch/arm/mach-at91/include/mach/at572d940hf_matrix.h
··· 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
-4
arch/arm/mach-at91/include/mach/at91cap9.h
··· 20 20 /* 21 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 23 #define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */ 26 24 #define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */ 27 25 #define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */ ··· 120 122 #define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */ 121 123 #define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */ 122 124 #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ 123 - 124 - #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 125 125 126 126 #endif
-2
arch/arm/mach-at91/include/mach/at91rm9200.h
··· 19 19 /* 20 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 22 #define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */ 25 23 #define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */ 26 24 #define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */
-2
arch/arm/mach-at91/include/mach/at91sam9260.h
··· 20 20 /* 21 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 23 #define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */ 26 24 #define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */ 27 25 #define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */
-2
arch/arm/mach-at91/include/mach/at91sam9261.h
··· 18 18 /* 19 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 21 #define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */ 24 22 #define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */ 25 23 #define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */
-2
arch/arm/mach-at91/include/mach/at91sam9263.h
··· 18 18 /* 19 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 21 #define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */ 24 22 #define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */ 25 23 #define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */
-4
arch/arm/mach-at91/include/mach/at91sam9g45.h
··· 18 18 /* 19 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 21 #define AT91SAM9G45_ID_PIOA 2 /* Parallel I/O Controller A */ 24 22 #define AT91SAM9G45_ID_PIOB 3 /* Parallel I/O Controller B */ 25 23 #define AT91SAM9G45_ID_PIOC 4 /* Parallel I/O Controller C */ ··· 128 130 #define AT91SAM9G45_OHCI_BASE 0x00700000 /* USB Host controller (OHCI) */ 129 131 #define AT91SAM9G45_EHCI_BASE 0x00800000 /* USB Host controller (EHCI) */ 130 132 #define AT91SAM9G45_VDEC_BASE 0x00900000 /* Video Decoder Controller */ 131 - 132 - #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 133 133 134 134 #define CONSISTENT_DMA_SIZE SZ_4M 135 135
-2
arch/arm/mach-at91/include/mach/at91sam9rl.h
··· 17 17 /* 18 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 20 #define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */ 23 21 #define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */ 24 22 #define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */
-2
arch/arm/mach-at91/include/mach/at91x40.h
··· 15 15 /* 16 16 * IRQ list. 17 17 */ 18 - #define AT91_ID_FIQ 0 /* FIQ */ 19 - #define AT91_ID_SYS 1 /* System Peripheral */ 20 18 #define AT91X40_ID_USART0 2 /* USART port 0 */ 21 19 #define AT91X40_ID_USART1 3 /* USART port 1 */ 22 20 #define AT91X40_ID_TC0 4 /* Timer/Counter 0 */
+2 -4
arch/arm/mach-at91/include/mach/board.h
··· 90 90 extern void __init at91_add_device_eth(struct at91_eth_data *data); 91 91 92 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 94 #define eth_platform_data at91_eth_data 95 95 #endif 96 96 ··· 140 140 extern struct platform_device *atmel_default_console_device; 141 141 142 142 struct atmel_uart_data { 143 + int num; /* port num */ 143 144 short use_dma_tx; /* use transmit DMA? */ 144 145 short use_dma_rx; /* use receive DMA? */ 145 146 void __iomem *regs; /* virt. base address, if any */ ··· 203 202 extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); 204 203 extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); 205 204 extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); 206 - 207 - /* AT572D940HF DSP */ 208 - extern void __init at91_add_device_mAgic(void); 209 205 210 206 /* FIXME: this needs a better location, but gets stuff building again */ 211 207 extern int at91_suspend_entering_slow_clock(void);
+7
arch/arm/mach-at91/include/mach/clkdev.h
··· 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
+7 -8
arch/arm/mach-at91/include/mach/cpu.h
··· 34 34 #define ARCH_ID_AT91SAM9XE256 0x329a93a0 35 35 #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 36 36 37 - #define ARCH_ID_AT572D940HF 0x0e0303e0 38 - 39 37 #define ARCH_ID_AT91M40800 0x14080044 40 38 #define ARCH_ID_AT91R40807 0x44080746 41 39 #define ARCH_ID_AT91M40807 0x14080745 ··· 88 90 #endif 89 91 90 92 #ifdef CONFIG_ARCH_AT91RM9200 93 + extern int rm9200_type; 94 + #define ARCH_REVISON_9200_BGA (0 << 0) 95 + #define ARCH_REVISON_9200_PQFP (1 << 0) 91 96 #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) 97 + #define cpu_is_at91rm9200_bga() (!cpu_is_at91rm9200_pqfp()) 98 + #define cpu_is_at91rm9200_pqfp() (cpu_is_at91rm9200() && rm9200_type & ARCH_REVISON_9200_PQFP) 92 99 #else 93 100 #define cpu_is_at91rm9200() (0) 101 + #define cpu_is_at91rm9200_bga() (0) 102 + #define cpu_is_at91rm9200_pqfp() (0) 94 103 #endif 95 104 96 105 #ifdef CONFIG_ARCH_AT91SAM9260 ··· 184 179 #define cpu_is_at91cap9() (0) 185 180 #define cpu_is_at91cap9_revB() (0) 186 181 #define cpu_is_at91cap9_revC() (0) 187 - #endif 188 - 189 - #ifdef CONFIG_ARCH_AT572D940HF 190 - #define cpu_is_at572d940hf() (at91_cpu_identify() == ARCH_ID_AT572D940HF) 191 - #else 192 - #define cpu_is_at572d940hf() (0) 193 182 #endif 194 183 195 184 /*
+6 -9
arch/arm/mach-at91/include/mach/hardware.h
··· 32 32 #include <mach/at91cap9.h> 33 33 #elif defined(CONFIG_ARCH_AT91X40) 34 34 #include <mach/at91x40.h> 35 - #elif defined(CONFIG_ARCH_AT572D940HF) 36 - #include <mach/at572d940hf.h> 37 35 #else 38 36 #error "Unsupported AT91 processor" 39 37 #endif 40 38 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 */ 41 45 42 46 #ifdef CONFIG_MMU 43 47 /* ··· 85 81 #define AT91_CHIPSELECT_5 0x60000000 86 82 #define AT91_CHIPSELECT_6 0x70000000 87 83 #define AT91_CHIPSELECT_7 0x80000000 88 - 89 - /* SDRAM */ 90 - #ifdef CONFIG_DRAM_BASE 91 - #define AT91_SDRAM_BASE CONFIG_DRAM_BASE 92 - #else 93 - #define AT91_SDRAM_BASE AT91_CHIPSELECT_1 94 - #endif 95 84 96 85 /* Clocks */ 97 86 #define AT91_SLOW_CLOCK 32768 /* slow clock */
-2
arch/arm/mach-at91/include/mach/memory.h
··· 23 23 24 24 #include <mach/hardware.h> 25 25 26 - #define PLAT_PHYS_OFFSET (AT91_SDRAM_BASE) 27 - 28 26 #endif
+1 -1
arch/arm/mach-at91/include/mach/stamp9g20.h
··· 1 1 #ifndef __MACH_STAMP9G20_H 2 2 #define __MACH_STAMP9G20_H 3 3 4 - void stamp9g20_map_io(void); 4 + void stamp9g20_init_early(void); 5 5 void stamp9g20_board_init(void); 6 6 7 7 #endif
+25
arch/arm/mach-at91/include/mach/system_rev.h
··· 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__ */
-5
arch/arm/mach-at91/include/mach/timex.h
··· 82 82 #define AT91X40_MASTER_CLOCK 40000000 83 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 85 #endif 91 86 92 87 #endif
+1 -1
arch/arm/mach-davinci/da850.c
··· 1055 1055 if (!pdata->cpupll_reg_base) 1056 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 1059 if (!pdata->ddrpll_reg_base) { 1060 1060 ret = -ENOMEM; 1061 1061 goto no_ddrpll_mem;
+9 -7
arch/arm/mach-davinci/devices-da8xx.c
··· 24 24 #include "clock.h" 25 25 26 26 #define DA8XX_TPCC_BASE 0x01c00000 27 - #define DA850_MMCSD1_BASE 0x01e1b000 28 - #define DA850_TPCC1_BASE 0x01e30000 29 27 #define DA8XX_TPTC0_BASE 0x01c08000 30 28 #define DA8XX_TPTC1_BASE 0x01c08400 31 - #define DA850_TPTC2_BASE 0x01e38000 32 29 #define DA8XX_WDOG_BASE 0x01c21000 /* DA8XX_TIMER64P1_BASE */ 33 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 37 #define DA8XX_EMAC_CPPI_PORT_BASE 0x01e20000 36 38 #define DA8XX_EMAC_CPGMACSS_BASE 0x01e22000 37 39 #define DA8XX_EMAC_CPGMAC_BASE 0x01e23000 38 40 #define DA8XX_EMAC_MDIO_BASE 0x01e24000 39 - #define DA8XX_GPIO_BASE 0x01e26000 40 41 #define DA8XX_I2C1_BASE 0x01e28000 41 - #define DA8XX_SPI0_BASE 0x01c41000 42 - #define DA830_SPI1_BASE 0x01e12000 42 + #define DA850_TPCC1_BASE 0x01e30000 43 + #define DA850_TPTC2_BASE 0x01e38000 43 44 #define DA850_SPI1_BASE 0x01f0e000 45 + #define DA8XX_DDR2_CTL_BASE 0xb0000000 44 46 45 47 #define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 46 48 #define DA8XX_EMAC_MOD_REG_OFFSET 0x2000
+3
arch/arm/mach-davinci/devices.c
··· 33 33 #define DM365_MMCSD0_BASE 0x01D11000 34 34 #define DM365_MMCSD1_BASE 0x01D00000 35 35 36 + /* System control register offsets */ 37 + #define DM64XX_VDD3P3V_PWDN 0x48 38 + 36 39 static struct resource i2c_resources[] = { 37 40 { 38 41 .start = DAVINCI_I2C_BASE,
-4
arch/arm/mach-davinci/include/mach/da8xx.h
··· 64 64 #define DA8XX_TIMER64P1_BASE 0x01c21000 65 65 #define DA8XX_GPIO_BASE 0x01e26000 66 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 67 #define DA8XX_AEMIF_CS2_BASE 0x60000000 71 68 #define DA8XX_AEMIF_CS3_BASE 0x62000000 72 69 #define DA8XX_AEMIF_CTL_BASE 0x68000000 73 - #define DA8XX_DDR2_CTL_BASE 0xb0000000 74 70 #define DA8XX_ARM_RAM_BASE 0xffff0000 75 71 76 72 void __init da830_init(void);
-3
arch/arm/mach-davinci/include/mach/hardware.h
··· 21 21 */ 22 22 #define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000 23 23 24 - /* System control register offsets */ 25 - #define DM64XX_VDD3P3V_PWDN 0x48 26 - 27 24 /* 28 25 * I/O mapping 29 26 */
+2
arch/arm/mach-exynos4/Kconfig
··· 169 169 select S3C_DEV_HSMMC2 170 170 select S3C_DEV_HSMMC3 171 171 select S3C_DEV_I2C1 172 + select S3C_DEV_I2C3 172 173 select S3C_DEV_I2C5 173 174 select S5P_DEV_USB_EHCI 174 175 select EXYNOS4_SETUP_I2C1 176 + select EXYNOS4_SETUP_I2C3 175 177 select EXYNOS4_SETUP_I2C5 176 178 select EXYNOS4_SETUP_SDHCI 177 179 select SAMSUNG_DEV_PWM
+1
arch/arm/mach-exynos4/Makefile
··· 16 16 obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o gpiolib.o irq-eint.o dma.o 17 17 obj-$(CONFIG_PM) += pm.o sleep.o 18 18 obj-$(CONFIG_CPU_FREQ) += cpufreq.o 19 + obj-$(CONFIG_CPU_IDLE) += cpuidle.o 19 20 20 21 obj-$(CONFIG_SMP) += platsmp.o headsmp.o 21 22
+86
arch/arm/mach-exynos4/cpuidle.c
··· 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);
+89
arch/arm/mach-exynos4/mach-nuri.c
··· 12 12 #include <linux/serial_core.h> 13 13 #include <linux/input.h> 14 14 #include <linux/i2c.h> 15 + #include <linux/i2c/atmel_mxt_ts.h> 15 16 #include <linux/gpio_keys.h> 16 17 #include <linux/gpio.h> 17 18 #include <linux/regulator/machine.h> ··· 33 32 #include <plat/sdhci.h> 34 33 #include <plat/ehci.h> 35 34 #include <plat/clock.h> 35 + #include <plat/gpio-cfg.h> 36 + #include <plat/iic.h> 36 37 37 38 #include <mach/map.h> 38 39 ··· 262 259 /* Gyro, To be updated */ 263 260 }; 264 261 262 + /* TSP */ 263 + static u8 mxt_init_vals[] = { 264 + /* MXT_GEN_COMMAND(6) */ 265 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 266 + /* MXT_GEN_POWER(7) */ 267 + 0x20, 0xff, 0x32, 268 + /* MXT_GEN_ACQUIRE(8) */ 269 + 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x23, 270 + /* MXT_TOUCH_MULTI(9) */ 271 + 0x00, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 272 + 0x00, 0x01, 0x01, 0x0e, 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 273 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 274 + 0x00, 275 + /* MXT_TOUCH_KEYARRAY(15) */ 276 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 277 + 0x00, 278 + /* MXT_SPT_GPIOPWM(19) */ 279 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 280 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 281 + /* MXT_PROCI_GRIPFACE(20) */ 282 + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x28, 0x04, 283 + 0x0f, 0x0a, 284 + /* MXT_PROCG_NOISE(22) */ 285 + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x23, 0x00, 286 + 0x00, 0x05, 0x0f, 0x19, 0x23, 0x2d, 0x03, 287 + /* MXT_TOUCH_PROXIMITY(23) */ 288 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 289 + 0x00, 0x00, 0x00, 0x00, 0x00, 290 + /* MXT_PROCI_ONETOUCH(24) */ 291 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 292 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 293 + /* MXT_SPT_SELFTEST(25) */ 294 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 295 + 0x00, 0x00, 0x00, 0x00, 296 + /* MXT_PROCI_TWOTOUCH(27) */ 297 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 298 + /* MXT_SPT_CTECONFIG(28) */ 299 + 0x00, 0x00, 0x02, 0x08, 0x10, 0x00, 300 + }; 301 + 302 + static struct mxt_platform_data mxt_platform_data = { 303 + .config = mxt_init_vals, 304 + .config_length = ARRAY_SIZE(mxt_init_vals), 305 + 306 + .x_line = 18, 307 + .y_line = 11, 308 + .x_size = 1024, 309 + .y_size = 600, 310 + .blen = 0x1, 311 + .threshold = 0x28, 312 + .voltage = 2800000, /* 2.8V */ 313 + .orient = MXT_DIAGONAL_COUNTER, 314 + .irqflags = IRQF_TRIGGER_FALLING, 315 + }; 316 + 317 + static struct s3c2410_platform_i2c i2c3_data __initdata = { 318 + .flags = 0, 319 + .bus_num = 3, 320 + .slave_addr = 0x10, 321 + .frequency = 400 * 1000, 322 + .sda_delay = 100, 323 + }; 324 + 325 + static struct i2c_board_info i2c3_devs[] __initdata = { 326 + { 327 + I2C_BOARD_INFO("atmel_mxt_ts", 0x4a), 328 + .platform_data = &mxt_platform_data, 329 + .irq = IRQ_EINT(4), 330 + }, 331 + }; 332 + 333 + static void __init nuri_tsp_init(void) 334 + { 335 + int gpio; 336 + 337 + /* TOUCH_INT: XEINT_4 */ 338 + gpio = EXYNOS4_GPX0(4); 339 + gpio_request(gpio, "TOUCH_INT"); 340 + s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf)); 341 + s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); 342 + } 343 + 265 344 /* GPIO I2C 5 (PMIC) */ 266 345 static struct i2c_board_info i2c5_devs[] __initdata = { 267 346 /* max8997, To be updated */ ··· 368 283 &s3c_device_wdt, 369 284 &s3c_device_timer[0], 370 285 &s5p_device_ehci, 286 + &s3c_device_i2c3, 371 287 372 288 /* NURI Devices */ 373 289 &nuri_gpio_keys, ··· 386 300 static void __init nuri_machine_init(void) 387 301 { 388 302 nuri_sdhci_init(); 303 + nuri_tsp_init(); 389 304 390 305 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); 306 + s3c_i2c3_set_platdata(&i2c3_data); 307 + i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs)); 391 308 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); 392 309 393 310 nuri_ehci_init();
-1
arch/arm/mach-netx/fb.c
··· 103 103 .flags = IORESOURCE_MEM, 104 104 }, 105 105 .irq = { NETX_IRQ_LCD, NO_IRQ }, 106 - .periphid = 0x10112400, 107 106 }; 108 107 109 108 int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel)
+7 -13
arch/arm/mach-s3c64xx/dev-spi.c
··· 16 16 17 17 #include <mach/dma.h> 18 18 #include <mach/map.h> 19 - #include <mach/gpio-bank-c.h> 20 19 #include <mach/spi-clocks.h> 21 20 #include <mach/irqs.h> 22 21 ··· 39 40 */ 40 41 static int s3c64xx_spi_cfg_gpio(struct platform_device *pdev) 41 42 { 43 + unsigned int base; 44 + 42 45 switch (pdev->id) { 43 46 case 0: 44 - s3c_gpio_cfgpin(S3C64XX_GPC(0), S3C64XX_GPC0_SPI_MISO0); 45 - s3c_gpio_cfgpin(S3C64XX_GPC(1), S3C64XX_GPC1_SPI_CLKO); 46 - s3c_gpio_cfgpin(S3C64XX_GPC(2), S3C64XX_GPC2_SPI_MOSIO); 47 - s3c_gpio_setpull(S3C64XX_GPC(0), S3C_GPIO_PULL_UP); 48 - s3c_gpio_setpull(S3C64XX_GPC(1), S3C_GPIO_PULL_UP); 49 - s3c_gpio_setpull(S3C64XX_GPC(2), S3C_GPIO_PULL_UP); 47 + base = S3C64XX_GPC(0); 50 48 break; 51 49 52 50 case 1: 53 - s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_SPI_MISO1); 54 - s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_SPI_CLK1); 55 - s3c_gpio_cfgpin(S3C64XX_GPC(6), S3C64XX_GPC6_SPI_MOSI1); 56 - s3c_gpio_setpull(S3C64XX_GPC(4), S3C_GPIO_PULL_UP); 57 - s3c_gpio_setpull(S3C64XX_GPC(5), S3C_GPIO_PULL_UP); 58 - s3c_gpio_setpull(S3C64XX_GPC(6), S3C_GPIO_PULL_UP); 51 + base = S3C64XX_GPC(4); 59 52 break; 60 53 61 54 default: 62 55 dev_err(&pdev->dev, "Invalid SPI Controller number!"); 63 56 return -EINVAL; 64 57 } 58 + 59 + s3c_gpio_cfgall_range(base, 3, 60 + S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); 65 61 66 62 return 0; 67 63 }
-48
arch/arm/mach-s3c64xx/include/mach/gpio-bank-a.h
··· 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 -
-60
arch/arm/mach-s3c64xx/include/mach/gpio-bank-b.h
··· 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 -
-53
arch/arm/mach-s3c64xx/include/mach/gpio-bank-c.h
··· 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 -
-49
arch/arm/mach-s3c64xx/include/mach/gpio-bank-d.h
··· 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 -
-44
arch/arm/mach-s3c64xx/include/mach/gpio-bank-e.h
··· 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 -
-71
arch/arm/mach-s3c64xx/include/mach/gpio-bank-f.h
··· 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 -
-42
arch/arm/mach-s3c64xx/include/mach/gpio-bank-g.h
··· 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 -
-74
arch/arm/mach-s3c64xx/include/mach/gpio-bank-h.h
··· 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)
-40
arch/arm/mach-s3c64xx/include/mach/gpio-bank-i.h
··· 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)
-36
arch/arm/mach-s3c64xx/include/mach/gpio-bank-j.h
··· 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)
-54
arch/arm/mach-s3c64xx/include/mach/gpio-bank-n.h
··· 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)
-70
arch/arm/mach-s3c64xx/include/mach/gpio-bank-o.h
··· 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 -
-69
arch/arm/mach-s3c64xx/include/mach/gpio-bank-p.h
··· 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 -
-46
arch/arm/mach-s3c64xx/include/mach/gpio-bank-q.h
··· 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 -
-1
arch/arm/mach-s3c64xx/mach-smdk6410.c
··· 50 50 #include <mach/hardware.h> 51 51 #include <mach/regs-fb.h> 52 52 #include <mach/map.h> 53 - #include <mach/gpio-bank-f.h> 54 53 55 54 #include <asm/irq.h> 56 55 #include <asm/mach-types.h>
+19 -15
arch/arm/mach-s3c64xx/pm.c
··· 30 30 #include <mach/regs-gpio-memport.h> 31 31 32 32 #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 33 - #include <mach/gpio-bank-n.h> 34 - 35 33 void s3c_pm_debug_smdkled(u32 set, u32 clear) 36 34 { 37 35 unsigned long flags; 38 - u32 reg; 36 + int i; 39 37 40 38 local_irq_save(flags); 41 - reg = __raw_readl(S3C64XX_GPNCON); 42 - reg &= ~(S3C64XX_GPN_CONMASK(12) | S3C64XX_GPN_CONMASK(13) | 43 - S3C64XX_GPN_CONMASK(14) | S3C64XX_GPN_CONMASK(15)); 44 - reg |= S3C64XX_GPN_OUTPUT(12) | S3C64XX_GPN_OUTPUT(13) | 45 - S3C64XX_GPN_OUTPUT(14) | S3C64XX_GPN_OUTPUT(15); 46 - __raw_writel(reg, S3C64XX_GPNCON); 47 - 48 - reg = __raw_readl(S3C64XX_GPNDAT); 49 - reg &= ~(clear << 12); 50 - reg |= set << 12; 51 - __raw_writel(reg, S3C64XX_GPNDAT); 52 - 39 + for (i = 0; i < 4; i++) { 40 + if (clear & (1 << i)) 41 + gpio_set_value(S3C64XX_GPN(12 + i), 0); 42 + if (set & (1 << i)) 43 + gpio_set_value(S3C64XX_GPN(12 + i), 1); 44 + } 53 45 local_irq_restore(flags); 54 46 } 55 47 #endif ··· 179 187 pm_cpu_prep = s3c64xx_pm_prepare; 180 188 pm_cpu_sleep = s3c64xx_cpu_suspend; 181 189 pm_uart_udivslot = 1; 190 + 191 + #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 192 + gpio_request(S3C64XX_GPN(12), "DEBUG_LED0"); 193 + gpio_request(S3C64XX_GPN(13), "DEBUG_LED1"); 194 + gpio_request(S3C64XX_GPN(14), "DEBUG_LED2"); 195 + gpio_request(S3C64XX_GPN(15), "DEBUG_LED3"); 196 + gpio_direction_output(S3C64XX_GPN(12), 0); 197 + gpio_direction_output(S3C64XX_GPN(13), 0); 198 + gpio_direction_output(S3C64XX_GPN(14), 0); 199 + gpio_direction_output(S3C64XX_GPN(15), 0); 200 + #endif 201 + 182 202 return 0; 183 203 } 184 204
+2 -5
arch/arm/mach-s3c64xx/setup-i2c0.c
··· 18 18 19 19 struct platform_device; /* don't need the contents */ 20 20 21 - #include <mach/gpio-bank-b.h> 22 21 #include <plat/iic.h> 23 22 #include <plat/gpio-cfg.h> 24 23 25 24 void s3c_i2c0_cfg_gpio(struct platform_device *dev) 26 25 { 27 - s3c_gpio_cfgpin(S3C64XX_GPB(5), S3C64XX_GPB5_I2C_SCL0); 28 - s3c_gpio_cfgpin(S3C64XX_GPB(6), S3C64XX_GPB6_I2C_SDA0); 29 - s3c_gpio_setpull(S3C64XX_GPB(5), S3C_GPIO_PULL_UP); 30 - s3c_gpio_setpull(S3C64XX_GPB(6), S3C_GPIO_PULL_UP); 26 + s3c_gpio_cfgall_range(S3C64XX_GPB(5), 2, 27 + S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); 31 28 }
+2 -5
arch/arm/mach-s3c64xx/setup-i2c1.c
··· 18 18 19 19 struct platform_device; /* don't need the contents */ 20 20 21 - #include <mach/gpio-bank-b.h> 22 21 #include <plat/iic.h> 23 22 #include <plat/gpio-cfg.h> 24 23 25 24 void s3c_i2c1_cfg_gpio(struct platform_device *dev) 26 25 { 27 - s3c_gpio_cfgpin(S3C64XX_GPB(2), S3C64XX_GPB2_I2C_SCL1); 28 - s3c_gpio_cfgpin(S3C64XX_GPB(3), S3C64XX_GPB3_I2C_SDA1); 29 - s3c_gpio_setpull(S3C64XX_GPB(2), S3C_GPIO_PULL_UP); 30 - s3c_gpio_setpull(S3C64XX_GPB(3), S3C_GPIO_PULL_UP); 26 + s3c_gpio_cfgall_range(S3C64XX_GPB(2), 2, 27 + S3C_GPIO_SFN(6), S3C_GPIO_PULL_UP); 31 28 }
+7 -1
arch/arm/mach-s3c64xx/sleep.S
··· 20 20 #define S3C64XX_VA_GPIO (0x0) 21 21 22 22 #include <mach/regs-gpio.h> 23 - #include <mach/gpio-bank-n.h> 24 23 25 24 #define LL_UART (S3C_PA_UART + (0x400 * CONFIG_S3C_LOWLEVEL_UART_PORT)) 26 25 ··· 67 68 ldr r2, =LL_UART /* for debug */ 68 69 69 70 #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 71 + 72 + #define S3C64XX_GPNCON (S3C64XX_GPN_BASE + 0x00) 73 + #define S3C64XX_GPNDAT (S3C64XX_GPN_BASE + 0x04) 74 + 75 + #define S3C64XX_GPN_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) 76 + #define S3C64XX_GPN_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) 77 + 70 78 /* Initialise the GPIO state if we are debugging via the SMDK LEDs, 71 79 * as the uboot version supplied resets these to inputs during the 72 80 * resume checks.
-25
arch/arm/mach-s5p6442/Kconfig
··· 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
-24
arch/arm/mach-s5p6442/Makefile
··· 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
-2
arch/arm/mach-s5p6442/Makefile.boot
··· 1 - zreladdr-y := 0x20008000 2 - params_phys-y := 0x20000100
-420
arch/arm/mach-s5p6442/clock.c
··· 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 - }
-143
arch/arm/mach-s5p6442/cpu.c
··· 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 - }
-217
arch/arm/mach-s5p6442/dev-audio.c
··· 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 - };
-121
arch/arm/mach-s5p6442/dev-spi.c
··· 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 - }
-105
arch/arm/mach-s5p6442/dma.c
··· 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);
-35
arch/arm/mach-s5p6442/include/mach/debug-macro.S
··· 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>
-26
arch/arm/mach-s5p6442/include/mach/dma.h
··· 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 */
-48
arch/arm/mach-s5p6442/include/mach/entry-macro.S
··· 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
-123
arch/arm/mach-s5p6442/include/mach/gpio.h
··· 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 */
-18
arch/arm/mach-s5p6442/include/mach/hardware.h
··· 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 */
-17
arch/arm/mach-s5p6442/include/mach/io.h
··· 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
-87
arch/arm/mach-s5p6442/include/mach/irqs.h
··· 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 */
-76
arch/arm/mach-s5p6442/include/mach/map.h
··· 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 */
-19
arch/arm/mach-s5p6442/include/mach/memory.h
··· 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 */
-70
arch/arm/mach-s5p6442/include/mach/pwm-clock.h
··· 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 */
-104
arch/arm/mach-s5p6442/include/mach/regs-clock.h
··· 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 */
-19
arch/arm/mach-s5p6442/include/mach/regs-irq.h
··· 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 */
-17
arch/arm/mach-s5p6442/include/mach/spi-clocks.h
··· 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 */
-23
arch/arm/mach-s5p6442/include/mach/system.h
··· 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 */
-26
arch/arm/mach-s5p6442/include/mach/tick.h
··· 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 */
-24
arch/arm/mach-s5p6442/include/mach/timex.h
··· 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 */
-24
arch/arm/mach-s5p6442/include/mach/uncompress.h
··· 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 */
-17
arch/arm/mach-s5p6442/include/mach/vmalloc.h
··· 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 */
-44
arch/arm/mach-s5p6442/init.c
··· 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 - }
-102
arch/arm/mach-s5p6442/mach-smdk6442.c
··· 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
-28
arch/arm/mach-s5p6442/setup-i2c0.c
··· 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 - }
+12 -4
arch/arm/mach-ux500/board-mop500-sdi.c
··· 99 99 gpio_direction_output(sdi0_vsel, 0); 100 100 gpio_direction_output(sdi0_en, 1); 101 101 102 - /* Add the device */ 103 - db8500_add_sdi0(&mop500_sdi0_data); 102 + /* Add the device, force v2 to subrevision 1 */ 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 109 void mop500_sdi_tc35892_init(void) ··· 191 188 192 189 void __init mop500_sdi_init(void) 193 190 { 191 + u32 periphid = 0; 192 + 193 + /* v2 has a new version of this block that need to be forced */ 194 + if (cpu_is_u8500v2()) 195 + periphid = 0x10480180; 194 196 /* PoP:ed eMMC on top of DB8500 v1.0 has problems with high speed */ 195 197 if (!cpu_is_u8500v10()) 196 198 mop500_sdi2_data.capabilities |= MMC_CAP_MMC_HIGHSPEED; 197 - db8500_add_sdi2(&mop500_sdi2_data); 199 + db8500_add_sdi2(&mop500_sdi2_data, periphid); 198 200 199 201 /* On-board eMMC */ 200 - db8500_add_sdi4(&mop500_sdi4_data); 202 + db8500_add_sdi4(&mop500_sdi4_data, periphid); 201 203 202 204 if (machine_is_hrefv60()) { 203 205 mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
+6 -4
arch/arm/mach-ux500/devices-common.h
··· 28 28 29 29 static inline struct amba_device * 30 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 37 struct mmci_platform_data; 37 38 38 39 static inline struct amba_device * 39 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 47 struct amba_pl011_data;
+19 -9
arch/arm/mach-ux500/devices-db5500.h
··· 38 38 ux500_add_usb(U5500_USBOTG_BASE, IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) 39 39 40 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 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 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 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 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 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 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 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 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 70 #define db5500_add_uart0(plat) \ 61 71 dbx500_add_uart("uart0", U5500_UART0_BASE, IRQ_DB5500_UART0, plat)
+17 -17
arch/arm/mach-ux500/devices-db8500.h
··· 25 25 db8500_add_ssp(const char *name, resource_size_t base, int irq, 26 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 64 #define db8500_add_usb(rx_cfg, tx_cfg) \ 65 65 ux500_add_usb(U8500_USBOTG_BASE, IRQ_DB8500_USBOTG, rx_cfg, tx_cfg) 66 66 67 - #define db8500_add_sdi0(pdata) \ 68 - dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata) 69 - #define db8500_add_sdi1(pdata) \ 70 - dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata) 71 - #define db8500_add_sdi2(pdata) \ 72 - dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata) 73 - #define db8500_add_sdi3(pdata) \ 74 - dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata) 75 - #define db8500_add_sdi4(pdata) \ 76 - dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata) 77 - #define db8500_add_sdi5(pdata) \ 78 - dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata) 67 + #define db8500_add_sdi0(pdata, pid) \ 68 + dbx500_add_sdi("sdi0", U8500_SDI0_BASE, IRQ_DB8500_SDMMC0, pdata, pid) 69 + #define db8500_add_sdi1(pdata, pid) \ 70 + dbx500_add_sdi("sdi1", U8500_SDI1_BASE, IRQ_DB8500_SDMMC1, pdata, pid) 71 + #define db8500_add_sdi2(pdata, pid) \ 72 + dbx500_add_sdi("sdi2", U8500_SDI2_BASE, IRQ_DB8500_SDMMC2, pdata, pid) 73 + #define db8500_add_sdi3(pdata, pid) \ 74 + dbx500_add_sdi("sdi3", U8500_SDI3_BASE, IRQ_DB8500_SDMMC3, pdata, pid) 75 + #define db8500_add_sdi4(pdata, pid) \ 76 + dbx500_add_sdi("sdi4", U8500_SDI4_BASE, IRQ_DB8500_SDMMC4, pdata, pid) 77 + #define db8500_add_sdi5(pdata, pid) \ 78 + dbx500_add_sdi("sdi5", U8500_SDI5_BASE, IRQ_DB8500_SDMMC5, pdata, pid) 79 79 80 80 #define db8500_add_ssp0(pdata) \ 81 81 db8500_add_ssp("ssp0", U8500_SSP0_BASE, IRQ_DB8500_SSP0, pdata) ··· 83 83 db8500_add_ssp("ssp1", U8500_SSP1_BASE, IRQ_DB8500_SSP1, pdata) 84 84 85 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 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 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 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 94 #define db8500_add_uart0(pdata) \ 95 95 dbx500_add_uart("uart0", U8500_UART0_BASE, IRQ_DB8500_UART0, pdata)
-3
arch/arm/mach-ux500/include/mach/hardware.h
··· 29 29 #include <mach/db8500-regs.h> 30 30 #include <mach/db5500-regs.h> 31 31 32 - /* ST-Ericsson modified pl022 id */ 33 - #define SSP_PER_ID 0x01080022 34 - 35 32 #ifndef __ASSEMBLY__ 36 33 37 34 #include <mach/id.h>
+1
arch/arm/mm/cache-v6.S
··· 176 176 */ 177 177 ENTRY(v6_flush_kern_dcache_area) 178 178 add r1, r0, r1 179 + bic r0, r0, #D_CACHE_LINE_SIZE - 1 179 180 1: 180 181 #ifdef HARVARD_CACHE 181 182 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line
+2
arch/arm/mm/cache-v7.S
··· 221 221 ENTRY(v7_flush_kern_dcache_area) 222 222 dcache_line_size r2, r3 223 223 add r1, r0, r1 224 + sub r3, r2, #1 225 + bic r0, r0, r3 224 226 1: 225 227 mcr p15, 0, r0, c7, c14, 1 @ clean & invalidate D line / unified line 226 228 add r0, r0, r2
+9 -8
arch/arm/mm/context.c
··· 24 24 25 25 /* 26 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 28 - * always allocate an ASID. The ASID 0 is reserved for the TTBR 29 - * register changing sequence. 27 + * to run in. 30 28 */ 31 29 void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) 32 30 { ··· 34 36 35 37 static void flush_context(void) 36 38 { 37 - /* set the reserved ASID before flushing the TLB */ 38 - asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0)); 39 + u32 ttb; 40 + /* Copy TTBR1 into TTBR0 */ 41 + asm volatile("mrc p15, 0, %0, c2, c0, 1\n" 42 + "mcr p15, 0, %0, c2, c0, 0" 43 + : "=r" (ttb)); 39 44 isb(); 40 45 local_flush_tlb_all(); 41 46 if (icache_is_vivt_asid_tagged()) { ··· 94 93 return; 95 94 96 95 smp_rmb(); 97 - asid = cpu_last_asid + cpu + 1; 96 + asid = cpu_last_asid + cpu; 98 97 99 98 flush_context(); 100 99 set_mm_context(mm, asid); ··· 144 143 * to start a new version and flush the TLB. 145 144 */ 146 145 if (unlikely((asid & ~ASID_MASK) == 0)) { 147 - asid = cpu_last_asid + smp_processor_id() + 1; 146 + asid = cpu_last_asid + smp_processor_id(); 148 147 flush_context(); 149 148 #ifdef CONFIG_SMP 150 149 smp_wmb(); 151 150 smp_call_function(reset_context, NULL, 1); 152 151 #endif 153 - cpu_last_asid += NR_CPUS; 152 + cpu_last_asid += NR_CPUS - 1; 154 153 } 155 154 156 155 set_mm_context(mm, asid);
+14 -1
arch/arm/mm/init.c
··· 15 15 #include <linux/mman.h> 16 16 #include <linux/nodemask.h> 17 17 #include <linux/initrd.h> 18 + #include <linux/of_fdt.h> 18 19 #include <linux/highmem.h> 19 20 #include <linux/gfp.h> 20 21 #include <linux/memblock.h> 21 22 #include <linux/sort.h> 22 23 23 24 #include <asm/mach-types.h> 25 + #include <asm/prom.h> 24 26 #include <asm/sections.h> 25 27 #include <asm/setup.h> 26 28 #include <asm/sizes.h> ··· 72 70 } 73 71 74 72 __tagtable(ATAG_INITRD2, parse_tag_initrd2); 73 + 74 + #ifdef CONFIG_OF_FLATTREE 75 + void __init early_init_dt_setup_initrd_arch(unsigned long start, unsigned long end) 76 + { 77 + phys_initrd_start = start; 78 + phys_initrd_size = end - start; 79 + } 80 + #endif /* CONFIG_OF_FLATTREE */ 75 81 76 82 /* 77 83 * This keeps memory configuration data used by a couple memory ··· 283 273 free_area_init_node(0, zone_size, min, zhole_size); 284 274 } 285 275 286 - #ifndef CONFIG_SPARSEMEM 276 + #ifdef CONFIG_HAVE_ARCH_PFN_VALID 287 277 int pfn_valid(unsigned long pfn) 288 278 { 289 279 return memblock_is_memory(pfn << PAGE_SHIFT); 290 280 } 291 281 EXPORT_SYMBOL(pfn_valid); 282 + #endif 292 283 284 + #ifndef CONFIG_SPARSEMEM 293 285 static void arm_memory_present(void) 294 286 { 295 287 } ··· 346 334 #endif 347 335 348 336 arm_mm_memblock_reserve(); 337 + arm_dt_memblock_reserve(); 349 338 350 339 /* reserve any platform specific memblock areas */ 351 340 if (mdesc->reserve)
+1 -6
arch/arm/mm/mm.h
··· 5 5 6 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 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 13 struct mem_type {
+5 -4
arch/arm/mm/mmu.c
··· 763 763 { 764 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 766 for (i = 0, j = 0; i < meminfo.nr_banks; i++) { 770 767 struct membank *bank = &meminfo.bank[j]; 771 768 *bank = meminfo.bank[i]; 772 769 773 770 #ifdef CONFIG_HIGHMEM 774 - if (__va(bank->start) > vmalloc_min || 771 + if (__va(bank->start) >= vmalloc_min || 775 772 __va(bank->start) < (void *)PAGE_OFFSET) 776 773 highmem = 1; 777 774 ··· 826 829 bank->size = newsize; 827 830 } 828 831 #endif 832 + if (!bank->highmem && bank->start + bank->size > lowmem_limit) 833 + lowmem_limit = bank->start + bank->size; 834 + 829 835 j++; 830 836 } 831 837 #ifdef CONFIG_HIGHMEM ··· 852 852 } 853 853 #endif 854 854 meminfo.nr_banks = j; 855 + memblock_set_current_limit(lowmem_limit); 855 856 } 856 857 857 858 static inline void prepare_page_table(void)
+3 -1
arch/arm/mm/proc-v6.S
··· 213 213 mcr p15, 0, r0, c2, c0, 2 @ TTB control register 214 214 ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) 215 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 219 #endif /* CONFIG_MMU */ 218 220 adr r5, v6_crval 219 221 ldmia r5, {r5, r6}
+7 -7
arch/arm/mm/proc-v7.S
··· 108 108 #ifdef CONFIG_ARM_ERRATA_430973 109 109 mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB 110 110 #endif 111 - #ifdef CONFIG_ARM_ERRATA_754322 112 - dsb 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 111 + mrc p15, 0, r2, c2, c0, 1 @ load TTB 1 112 + mcr p15, 0, r2, c2, c0, 0 @ into TTB 0 117 113 isb 118 114 #ifdef CONFIG_ARM_ERRATA_754322 119 115 dsb 120 116 #endif 121 117 mcr p15, 0, r1, c13, c0, 1 @ set context ID 118 + isb 119 + mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 122 120 isb 123 121 #endif 124 122 mov pc, lr ··· 366 368 mcr p15, 0, r10, c2, c0, 2 @ TTB control register 367 369 ALT_SMP(orr r4, r4, #TTB_FLAGS_SMP) 368 370 ALT_UP(orr r4, r4, #TTB_FLAGS_UP) 369 - mcr p15, 0, r4, c2, c0, 1 @ load TTB1 371 + ALT_SMP(orr r8, r8, #TTB_FLAGS_SMP) 372 + ALT_UP(orr r8, r8, #TTB_FLAGS_UP) 373 + mcr p15, 0, r8, c2, c0, 1 @ load TTB1 370 374 ldr r5, =PRRR @ PRRR 371 375 ldr r6, =NMRR @ NMRR 372 376 mcr p15, 0, r5, c10, c2, 0 @ write PRRR
+1 -1
arch/arm/plat-s5p/Kconfig
··· 7 7 8 8 config PLAT_S5P 9 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 11 default y 12 12 select ARM_VIC if !ARCH_EXYNOS4 13 13 select ARM_GIC if ARCH_EXYNOS4
-10
arch/arm/plat-s5p/cpu.c
··· 21 21 22 22 #include <plat/cpu.h> 23 23 #include <plat/s5p6440.h> 24 - #include <plat/s5p6442.h> 25 24 #include <plat/s5p6450.h> 26 25 #include <plat/s5pc100.h> 27 26 #include <plat/s5pv210.h> ··· 29 30 /* table of supported CPUs */ 30 31 31 32 static const char name_s5p6440[] = "S5P6440"; 32 - static const char name_s5p6442[] = "S5P6442"; 33 33 static const char name_s5p6450[] = "S5P6450"; 34 34 static const char name_s5pc100[] = "S5PC100"; 35 35 static const char name_s5pv210[] = "S5PV210/S5PC110"; ··· 43 45 .init_uarts = s5p6440_init_uarts, 44 46 .init = s5p64x0_init, 45 47 .name = name_s5p6440, 46 - }, { 47 - .idcode = 0x36442000, 48 - .idmask = 0xfffff000, 49 - .map_io = s5p6442_map_io, 50 - .init_clocks = s5p6442_init_clocks, 51 - .init_uarts = s5p6442_init_uarts, 52 - .init = s5p6442_init, 53 - .name = name_s5p6442, 54 48 }, { 55 49 .idcode = 0x36450000, 56 50 .idmask = 0xfffff000,
-33
arch/arm/plat-s5p/include/plat/s5p6442.h
··· 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
-1
arch/arm/plat-samsung/include/plat/cpu.h
··· 86 86 extern struct sysdev_class s3c6410_sysclass; 87 87 extern struct sysdev_class s3c64xx_sysclass; 88 88 extern struct sysdev_class s5p64x0_sysclass; 89 - extern struct sysdev_class s5p6442_sysclass; 90 89 extern struct sysdev_class s5pv210_sysclass; 91 90 extern struct sysdev_class exynos4_sysclass; 92 91
+1 -1
arch/arm/plat-samsung/include/plat/debug-macro.S
··· 11 11 12 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 16 .macro fifo_level_s5pv210 rd, rx 17 17 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
-6
arch/arm/plat-samsung/include/plat/devs.h
··· 111 111 extern struct platform_device exynos4_device_pd[]; 112 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 114 extern struct platform_device s5p6440_device_pcm; 121 115 extern struct platform_device s5p6440_device_iis; 122 116
+1 -1
arch/arm/plat-samsung/include/plat/regs-serial.h
··· 194 194 #define S3C64XX_UINTSP 0x34 195 195 #define S3C64XX_UINTM 0x38 196 196 197 - /* Following are specific to S5PV210 and S5P6442 */ 197 + /* Following are specific to S5PV210 */ 198 198 #define S5PV210_UCON_CLKMASK (1<<10) 199 199 #define S5PV210_UCON_PCLK (0<<10) 200 200 #define S5PV210_UCON_UCLK (1<<10)
-1
arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
··· 69 69 extern void s5pc100_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); 70 70 extern void s5pv210_spi_set_info(int cntrlr, int src_clk_nr, int num_cs); 71 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 73 #endif /* __S3C64XX_PLAT_SPI_H */
+3 -1
arch/avr32/mach-at32ap/at32ap700x.c
··· 1014 1014 void __init at32_map_usart(unsigned int hw_id, unsigned int line, int flags) 1015 1015 { 1016 1016 struct platform_device *pdev; 1017 + struct atmel_uart_data *pdata; 1017 1018 1018 1019 switch (hw_id) { 1019 1020 case 0: ··· 1043 1042 data->regs = (void __iomem *)pdev->resource[0].start; 1044 1043 } 1045 1044 1046 - pdev->id = line; 1045 + pdata = pdev->dev.platform_data; 1046 + pdata->num = portnr; 1047 1047 at32_usarts[line] = pdev; 1048 1048 } 1049 1049
+1
arch/avr32/mach-at32ap/include/mach/board.h
··· 33 33 #define ATMEL_USART_CLK 0x04 34 34 35 35 struct atmel_uart_data { 36 + int num; /* port num */ 36 37 short use_dma_tx; /* use transmit DMA? */ 37 38 short use_dma_rx; /* use receive DMA? */ 38 39 void __iomem *regs; /* virtual base address, if any */
+1 -1
arch/microblaze/kernel/prom.c
··· 130 130 * device-tree, including the platform type, initrd location and 131 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 135 /* Scan memory nodes and rebuild MEMBLOCKs */ 136 136 memblock_init();
-3
arch/mips/include/asm/prom.h
··· 14 14 #ifdef CONFIG_OF 15 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 17 extern int early_init_dt_scan_memory_arch(unsigned long node, 21 18 const char *uname, int depth, void *data); 22 19
+2 -1
arch/mips/kernel/prom.c
··· 83 83 * device-tree, including the platform type, initrd location and 84 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 89 /* Scan memory nodes */ 89 90 of_scan_flat_dt(early_init_dt_scan_root, NULL);
+1 -1
arch/powerpc/kernel/prom.c
··· 694 694 * device-tree, including the platform type, initrd location and 695 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 699 /* Scan memory nodes and rebuild MEMBLOCKs */ 700 700 memblock_init();
+5
drivers/amba/bus.c
··· 603 603 if (ret) 604 604 goto err_out; 605 605 606 + /* Hard-coded primecell ID instead of plug-n-play */ 607 + if (dev->periphid != 0) 608 + goto skip_probe; 609 + 606 610 /* 607 611 * Dynamically calculate the size of the resource 608 612 * and use this for iomap ··· 647 643 if (ret) 648 644 goto err_release; 649 645 646 + skip_probe: 650 647 ret = device_add(&dev->dev); 651 648 if (ret) 652 649 goto err_release;
+23 -2
drivers/mmc/host/mmci.c
··· 51 51 * is asserted (likewise for RX) 52 52 * @sdio: variant supports SDIO 53 53 * @st_clkdiv: true if using a ST-specific clock divider algorithm 54 + * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register 54 55 */ 55 56 struct variant_data { 56 57 unsigned int clkreg; ··· 61 60 unsigned int fifohalfsize; 62 61 bool sdio; 63 62 bool st_clkdiv; 63 + bool blksz_datactrl16; 64 64 }; 65 65 66 66 static struct variant_data variant_arm = { ··· 92 90 .datalength_bits = 24, 93 91 .sdio = true, 94 92 .st_clkdiv = true, 93 + }; 94 + 95 + static struct variant_data variant_ux500v2 = { 96 + .fifosize = 30 * 4, 97 + .fifohalfsize = 8 * 4, 98 + .clkreg = MCI_CLK_ENABLE, 99 + .clkreg_enable = MCI_ST_UX500_HWFCEN, 100 + .datalength_bits = 24, 101 + .sdio = true, 102 + .st_clkdiv = true, 103 + .blksz_datactrl16 = true, 95 104 }; 96 105 97 106 /* ··· 478 465 blksz_bits = ffs(data->blksz) - 1; 479 466 BUG_ON(1 << blksz_bits != data->blksz); 480 467 481 - datactrl = MCI_DPSM_ENABLE | blksz_bits << 4; 468 + if (variant->blksz_datactrl16) 469 + datactrl = MCI_DPSM_ENABLE | (data->blksz << 16); 470 + else 471 + datactrl = MCI_DPSM_ENABLE | blksz_bits << 4; 482 472 483 473 if (data->flags & MMC_DATA_READ) 484 474 datactrl |= MCI_DPSM_DIRECTION; ··· 1327 1311 }, 1328 1312 { 1329 1313 .id = 0x00480180, 1330 - .mask = 0x00ffffff, 1314 + .mask = 0xf0ffffff, 1331 1315 .data = &variant_ux500, 1316 + }, 1317 + { 1318 + .id = 0x10480180, 1319 + .mask = 0xf0ffffff, 1320 + .data = &variant_ux500v2, 1332 1321 }, 1333 1322 { 0, 0 }, 1334 1323 };
+4 -4
drivers/of/fdt.c
··· 670 670 671 671 pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname); 672 672 673 - if (depth != 1 || 673 + if (depth != 1 || !data || 674 674 (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0)) 675 675 return 0; 676 676 ··· 679 679 /* Retrieve command line */ 680 680 p = of_get_flat_dt_prop(node, "bootargs", &l); 681 681 if (p != NULL && l > 0) 682 - strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); 682 + strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); 683 683 684 684 #ifdef CONFIG_CMDLINE 685 685 #ifndef CONFIG_CMDLINE_FORCE 686 686 if (p == NULL || l == 0 || (l == 1 && (*p) == 0)) 687 687 #endif 688 - strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 688 + strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 689 689 #endif /* CONFIG_CMDLINE */ 690 690 691 - pr_debug("Command line is: %s\n", cmd_line); 691 + pr_debug("Command line is: %s\n", (char*)data); 692 692 693 693 /* break now */ 694 694 return 1;
+1 -1
drivers/tty/serial/atmel_serial.c
··· 1420 1420 port->flags = UPF_BOOT_AUTOCONF; 1421 1421 port->ops = &atmel_pops; 1422 1422 port->fifosize = 1; 1423 - port->line = pdev->id; 1423 + port->line = data->num; 1424 1424 port->dev = &pdev->dev; 1425 1425 port->mapbase = pdev->resource[0].start; 1426 1426 port->irq = pdev->resource[1].start;
+2
include/linux/mmzone.h
··· 1051 1051 return __nr_to_section(pfn_to_section_nr(pfn)); 1052 1052 } 1053 1053 1054 + #ifndef CONFIG_HAVE_ARCH_PFN_VALID 1054 1055 static inline int pfn_valid(unsigned long pfn) 1055 1056 { 1056 1057 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS) 1057 1058 return 0; 1058 1059 return valid_section(__nr_to_section(pfn_to_section_nr(pfn))); 1059 1060 } 1061 + #endif 1060 1062 1061 1063 static inline int pfn_present(unsigned long pfn) 1062 1064 {
+2 -2
sound/soc/samsung/Kconfig
··· 1 1 config SND_SOC_SAMSUNG 2 2 tristate "ASoC support for Samsung" 3 - depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_S5P64X0 || ARCH_S5P6442 || ARCH_EXYNOS4 3 + depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_S5P64X0 || ARCH_EXYNOS4 4 4 select S3C64XX_DMA if ARCH_S3C64XX 5 5 select S3C2410_DMA if ARCH_S3C2410 6 6 help ··· 55 55 56 56 config SND_SOC_SAMSUNG_SMDK_WM8580 57 57 tristate "SoC I2S Audio support for WM8580 on SMDK" 58 - depends on SND_SOC_SAMSUNG && (MACH_SMDK6410 || MACH_SMDKC100 || MACH_SMDK6440 || MACH_SMDK6450 || MACH_SMDK6442 || MACH_SMDKV210 || MACH_SMDKC110) 58 + depends on SND_SOC_SAMSUNG && (MACH_SMDK6410 || MACH_SMDKC100 || MACH_SMDK6440 || MACH_SMDK6450 || MACH_SMDKV210 || MACH_SMDKC110) 59 59 select SND_SOC_WM8580 60 60 select SND_SAMSUNG_I2S 61 61 help
+1 -1
sound/soc/samsung/smdk_wm8580.c
··· 249 249 int ret; 250 250 char *str; 251 251 252 - if (machine_is_smdkc100() || machine_is_smdk6442() 252 + if (machine_is_smdkc100() 253 253 || machine_is_smdkv210() || machine_is_smdkc110()) { 254 254 smdk.num_links = 3; 255 255 /* Secondary is at offset SAMSUNG_I2S_SECOFF from Primary */