aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig39
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/boot/compressed/Makefile4
-rw-r--r--arch/arm/boot/compressed/head-shark.S140
-rw-r--r--arch/arm/boot/compressed/ofw-shark.c260
-rw-r--r--arch/arm/boot/dts/Makefile4
-rw-r--r--arch/arm/boot/dts/at91sam9g25.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g35.dtsi1
-rw-r--r--arch/arm/boot/dts/at91sam9x25.dtsi24
-rw-r--r--arch/arm/boot/dts/at91sam9x35.dtsi1
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi67
-rw-r--r--arch/arm/boot/dts/at91sam9x5_macb0.dtsi56
-rw-r--r--arch/arm/boot/dts/at91sam9x5_macb1.dtsi44
-rw-r--r--arch/arm/boot/dts/at91sam9x5_usart3.dtsi51
-rw-r--r--arch/arm/boot/dts/qcom-msm8660-surf.dts (renamed from arch/arm/boot/dts/msm8660-surf.dts)0
-rw-r--r--arch/arm/boot/dts/qcom-msm8960-cdp.dts (renamed from arch/arm/boot/dts/msm8960-cdp.dts)0
-rw-r--r--arch/arm/boot/dts/sama5d3.dtsi203
-rw-r--r--arch/arm/boot/dts/sama5d31.dtsi16
-rw-r--r--arch/arm/boot/dts/sama5d31ek.dts3
-rw-r--r--arch/arm/boot/dts/sama5d33.dtsi14
-rw-r--r--arch/arm/boot/dts/sama5d33ek.dts3
-rw-r--r--arch/arm/boot/dts/sama5d34.dtsi16
-rw-r--r--arch/arm/boot/dts/sama5d34ek.dts3
-rw-r--r--arch/arm/boot/dts/sama5d35.dtsi18
-rw-r--r--arch/arm/boot/dts/sama5d35ek.dts3
-rw-r--r--arch/arm/boot/dts/sama5d3_can.dtsi54
-rw-r--r--arch/arm/boot/dts/sama5d3_emac.dtsi44
-rw-r--r--arch/arm/boot/dts/sama5d3_gmac.dtsi77
-rw-r--r--arch/arm/boot/dts/sama5d3_lcd.dtsi55
-rw-r--r--arch/arm/boot/dts/sama5d3_mci2.dtsi47
-rw-r--r--arch/arm/boot/dts/sama5d3_tcb1.dtsi27
-rw-r--r--arch/arm/boot/dts/sama5d3_uart.dtsi53
-rw-r--r--arch/arm/boot/dts/sama5d3xcm.dtsi1
-rw-r--r--arch/arm/boot/dts/ste-nomadik-stn8815.dtsi12
-rw-r--r--arch/arm/common/Makefile1
-rw-r--r--arch/arm/common/via82c505.c83
-rw-r--r--arch/arm/configs/shark_defconfig80
-rw-r--r--arch/arm/include/asm/mach/pci.h4
-rw-r--r--arch/arm/include/asm/sched_clock.h4
-rw-r--r--arch/arm/kernel/time.c29
-rw-r--r--arch/arm/lib/Makefile1
-rw-r--r--arch/arm/lib/io-shark.c13
-rw-r--r--arch/arm/mach-at91/board-cam60.c2
-rw-r--r--arch/arm/mach-at91/board-dt-rm9200.c7
-rw-r--r--arch/arm/mach-at91/board-dt-sam9.c7
-rw-r--r--arch/arm/mach-bcm/board_bcm281xx.c1
-rw-r--r--arch/arm/mach-bcm2835/bcm2835.c2
-rw-r--r--arch/arm/mach-clps711x/common.c2
-rw-r--r--arch/arm/mach-dove/board-dt.c11
-rw-r--r--arch/arm/mach-exynos/Kconfig38
-rw-r--r--arch/arm/mach-exynos/Makefile4
-rw-r--r--arch/arm/mach-exynos/common.c8
-rw-r--r--arch/arm/mach-exynos/common.h1
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c5
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c5
-rw-r--r--arch/arm/mach-gemini/time.c97
-rw-r--r--arch/arm/mach-highbank/Kconfig1
-rw-r--r--arch/arm/mach-highbank/highbank.c23
-rw-r--r--arch/arm/mach-imx/Kconfig10
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c29
-rw-r--r--arch/arm/mach-imx/common.h4
-rw-r--r--arch/arm/mach-imx/imx51-dt.c6
-rw-r--r--arch/arm/mach-imx/mach-imx53.c6
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c14
-rw-r--r--arch/arm/mach-imx/mach-imx6sl.c7
-rw-r--r--arch/arm/mach-imx/mach-vf610.c9
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c8
-rw-r--r--arch/arm/mach-msm/Kconfig13
-rw-r--r--arch/arm/mach-msm/Makefile3
-rw-r--r--arch/arm/mach-msm/board-dt-8660.c48
-rw-r--r--arch/arm/mach-msm/board-dt.c (renamed from arch/arm/mach-msm/board-dt-8960.c)17
-rw-r--r--arch/arm/mach-msm/include/mach/irqs-8960.h277
-rw-r--r--arch/arm/mach-msm/include/mach/irqs-8x60.h258
-rw-r--r--arch/arm/mach-msm/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c13
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c71
-rw-r--r--arch/arm/mach-nspire/nspire.c9
-rw-r--r--arch/arm/mach-omap2/Kconfig9
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_apll.c4
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_dpllcore.c11
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c24
-rw-r--r--arch/arm/mach-omap2/clock.c38
-rw-r--r--arch/arm/mach-omap2/clock.h2
-rw-r--r--arch/arm/mach-omap2/cm2xxx.c67
-rw-r--r--arch/arm/mach-omap2/cm2xxx.h8
-rw-r--r--arch/arm/mach-omap2/cm3xxx.c22
-rw-r--r--arch/arm/mach-omap2/cm3xxx.h1
-rw-r--r--arch/arm/mach-omap2/control.c54
-rw-r--r--arch/arm/mach-omap2/control.h1
-rw-r--r--arch/arm/mach-omap2/mcbsp.c16
-rw-r--r--arch/arm/mach-omap2/pm24xx.c24
-rw-r--r--arch/arm/mach-omap2/pm34xx.c3
-rw-r--r--arch/arm/mach-prima2/common.c11
-rw-r--r--arch/arm/mach-prima2/common.h1
-rw-r--r--arch/arm/mach-rockchip/rockchip.c9
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig13
-rw-r--r--arch/arm/mach-shark/Makefile10
-rw-r--r--arch/arm/mach-shark/Makefile.boot2
-rw-r--r--arch/arm/mach-shark/core.c146
-rw-r--r--arch/arm/mach-shark/dma.c23
-rw-r--r--arch/arm/mach-shark/include/mach/debug-macro.S34
-rw-r--r--arch/arm/mach-shark/include/mach/entry-macro.S36
-rw-r--r--arch/arm/mach-shark/include/mach/framebuffer.h16
-rw-r--r--arch/arm/mach-shark/include/mach/hardware.h16
-rw-r--r--arch/arm/mach-shark/include/mach/irqs.h13
-rw-r--r--arch/arm/mach-shark/include/mach/isa-dma.h13
-rw-r--r--arch/arm/mach-shark/include/mach/memory.h26
-rw-r--r--arch/arm/mach-shark/include/mach/timex.h7
-rw-r--r--arch/arm/mach-shark/include/mach/uncompress.h50
-rw-r--r--arch/arm/mach-shark/irq.c108
-rw-r--r--arch/arm/mach-shark/leds.c117
-rw-r--r--arch/arm/mach-shark/pci.c57
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm-reference.c2
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c4
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c46
-rw-r--r--arch/arm/mach-shmobile/board-lager-reference.c2
-rw-r--r--arch/arm/mach-shmobile/board-lager.c16
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a73a4.h2
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7778.h3
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7790.h2
-rw-r--r--arch/arm/mach-shmobile/setup-r8a73a4.c4
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c50
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c25
-rw-r--r--arch/arm/mach-socfpga/Kconfig1
-rw-r--r--arch/arm/mach-socfpga/socfpga.c2
-rw-r--r--arch/arm/mach-spear/Kconfig2
-rw-r--r--arch/arm/mach-sti/board-dt.c10
-rw-r--r--arch/arm/mach-sunxi/sunxi.c10
-rw-r--r--arch/arm/mach-tegra/Kconfig4
-rw-r--r--arch/arm/mach-tegra/Makefile1
-rw-r--r--arch/arm/mach-tegra/board-paz00.c5
-rw-r--r--arch/arm/mach-tegra/board-paz00.h25
-rw-r--r--arch/arm/mach-tegra/board.h12
-rw-r--r--arch/arm/mach-tegra/common.c115
-rw-r--r--arch/arm/mach-tegra/fuse.c2
-rw-r--r--arch/arm/mach-tegra/gpio-names.h247
-rw-r--r--arch/arm/mach-tegra/iomap.h152
-rw-r--r--arch/arm/mach-tegra/irammap.h6
-rw-r--r--arch/arm/mach-tegra/pm.c8
-rw-r--r--arch/arm/mach-tegra/pm.h3
-rw-r--r--arch/arm/mach-tegra/pmc.c50
-rw-r--r--arch/arm/mach-tegra/pmc.h5
-rw-r--r--arch/arm/mach-tegra/reset.c2
-rw-r--r--arch/arm/mach-tegra/sleep-tegra20.S5
-rw-r--r--arch/arm/mach-tegra/sleep-tegra30.S5
-rw-r--r--arch/arm/mach-tegra/tegra.c72
-rw-r--r--arch/arm/mach-u300/Kconfig1
-rw-r--r--arch/arm/mach-ux500/Kconfig29
-rw-r--r--arch/arm/mach-vexpress/Kconfig2
-rw-r--r--arch/arm/mach-vexpress/v2m.c14
-rw-r--r--arch/arm/mach-vt8500/Kconfig1
-rw-r--r--arch/arm/mach-vt8500/common.h24
-rw-r--r--arch/arm/mach-vt8500/vt8500.c6
153 files changed, 1154 insertions, 3394 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1ad6fb6c094d..e98261cb05bd 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -358,7 +358,6 @@ config ARCH_AT91
358 bool "Atmel AT91" 358 bool "Atmel AT91"
359 select ARCH_REQUIRE_GPIOLIB 359 select ARCH_REQUIRE_GPIOLIB
360 select CLKDEV_LOOKUP 360 select CLKDEV_LOOKUP
361 select HAVE_CLK
362 select IRQ_DOMAIN 361 select IRQ_DOMAIN
363 select NEED_MACH_GPIO_H 362 select NEED_MACH_GPIO_H
364 select NEED_MACH_IO_H if PCCARD 363 select NEED_MACH_IO_H if PCCARD
@@ -372,7 +371,6 @@ config ARCH_CLPS711X
372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" 371 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
373 select ARCH_REQUIRE_GPIOLIB 372 select ARCH_REQUIRE_GPIOLIB
374 select AUTO_ZRELADDR 373 select AUTO_ZRELADDR
375 select CLKDEV_LOOKUP
376 select CLKSRC_MMIO 374 select CLKSRC_MMIO
377 select COMMON_CLK 375 select COMMON_CLK
378 select CPU_ARM720T 376 select CPU_ARM720T
@@ -386,8 +384,9 @@ config ARCH_CLPS711X
386config ARCH_GEMINI 384config ARCH_GEMINI
387 bool "Cortina Systems Gemini" 385 bool "Cortina Systems Gemini"
388 select ARCH_REQUIRE_GPIOLIB 386 select ARCH_REQUIRE_GPIOLIB
389 select ARCH_USES_GETTIMEOFFSET 387 select CLKSRC_MMIO
390 select CPU_FA526 388 select CPU_FA526
389 select GENERIC_CLOCKEVENTS
391 select NEED_MACH_GPIO_H 390 select NEED_MACH_GPIO_H
392 help 391 help
393 Support for the Cortina Systems Gemini family SoCs 392 Support for the Cortina Systems Gemini family SoCs
@@ -631,7 +630,6 @@ config ARCH_PXA
631config ARCH_MSM 630config ARCH_MSM
632 bool "Qualcomm MSM" 631 bool "Qualcomm MSM"
633 select ARCH_REQUIRE_GPIOLIB 632 select ARCH_REQUIRE_GPIOLIB
634 select CLKDEV_LOOKUP
635 select CLKSRC_OF if OF 633 select CLKSRC_OF if OF
636 select COMMON_CLK 634 select COMMON_CLK
637 select GENERIC_CLOCKEVENTS 635 select GENERIC_CLOCKEVENTS
@@ -649,7 +647,6 @@ config ARCH_SHMOBILE
649 select GENERIC_CLOCKEVENTS 647 select GENERIC_CLOCKEVENTS
650 select HAVE_ARM_SCU if SMP 648 select HAVE_ARM_SCU if SMP
651 select HAVE_ARM_TWD if SMP 649 select HAVE_ARM_TWD if SMP
652 select HAVE_CLK
653 select HAVE_MACH_CLKDEV 650 select HAVE_MACH_CLKDEV
654 select HAVE_SMP 651 select HAVE_SMP
655 select MIGHT_HAVE_CACHE_L2X0 652 select MIGHT_HAVE_CACHE_L2X0
@@ -706,7 +703,6 @@ config ARCH_S3C24XX
706 select CLKSRC_SAMSUNG_PWM 703 select CLKSRC_SAMSUNG_PWM
707 select GENERIC_CLOCKEVENTS 704 select GENERIC_CLOCKEVENTS
708 select GPIO_SAMSUNG 705 select GPIO_SAMSUNG
709 select HAVE_CLK
710 select HAVE_S3C2410_I2C if I2C 706 select HAVE_S3C2410_I2C if I2C
711 select HAVE_S3C2410_WATCHDOG if WATCHDOG 707 select HAVE_S3C2410_WATCHDOG if WATCHDOG
712 select HAVE_S3C_RTC if RTC_CLASS 708 select HAVE_S3C_RTC if RTC_CLASS
@@ -730,18 +726,19 @@ config ARCH_S3C64XX
730 select CPU_V6 726 select CPU_V6
731 select GENERIC_CLOCKEVENTS 727 select GENERIC_CLOCKEVENTS
732 select GPIO_SAMSUNG 728 select GPIO_SAMSUNG
733 select HAVE_CLK
734 select HAVE_S3C2410_I2C if I2C 729 select HAVE_S3C2410_I2C if I2C
735 select HAVE_S3C2410_WATCHDOG if WATCHDOG 730 select HAVE_S3C2410_WATCHDOG if WATCHDOG
736 select HAVE_TCM 731 select HAVE_TCM
737 select NEED_MACH_GPIO_H 732 select NEED_MACH_GPIO_H
738 select NO_IOPORT 733 select NO_IOPORT
739 select PLAT_SAMSUNG 734 select PLAT_SAMSUNG
735 select PM_GENERIC_DOMAINS
740 select S3C_DEV_NAND 736 select S3C_DEV_NAND
741 select S3C_GPIO_TRACK 737 select S3C_GPIO_TRACK
742 select SAMSUNG_ATAGS 738 select SAMSUNG_ATAGS
743 select SAMSUNG_CLKSRC 739 select SAMSUNG_CLKSRC
744 select SAMSUNG_GPIOLIB_4BIT 740 select SAMSUNG_GPIOLIB_4BIT
741 select SAMSUNG_WAKEMASK
745 select SAMSUNG_WDT_RESET 742 select SAMSUNG_WDT_RESET
746 select USB_ARCH_HAS_OHCI 743 select USB_ARCH_HAS_OHCI
747 help 744 help
@@ -754,7 +751,6 @@ config ARCH_S5P64X0
754 select CPU_V6 751 select CPU_V6
755 select GENERIC_CLOCKEVENTS 752 select GENERIC_CLOCKEVENTS
756 select GPIO_SAMSUNG 753 select GPIO_SAMSUNG
757 select HAVE_CLK
758 select HAVE_S3C2410_I2C if I2C 754 select HAVE_S3C2410_I2C if I2C
759 select HAVE_S3C2410_WATCHDOG if WATCHDOG 755 select HAVE_S3C2410_WATCHDOG if WATCHDOG
760 select HAVE_S3C_RTC if RTC_CLASS 756 select HAVE_S3C_RTC if RTC_CLASS
@@ -773,7 +769,6 @@ config ARCH_S5PC100
773 select CPU_V7 769 select CPU_V7
774 select GENERIC_CLOCKEVENTS 770 select GENERIC_CLOCKEVENTS
775 select GPIO_SAMSUNG 771 select GPIO_SAMSUNG
776 select HAVE_CLK
777 select HAVE_S3C2410_I2C if I2C 772 select HAVE_S3C2410_I2C if I2C
778 select HAVE_S3C2410_WATCHDOG if WATCHDOG 773 select HAVE_S3C2410_WATCHDOG if WATCHDOG
779 select HAVE_S3C_RTC if RTC_CLASS 774 select HAVE_S3C_RTC if RTC_CLASS
@@ -793,7 +788,6 @@ config ARCH_S5PV210
793 select CPU_V7 788 select CPU_V7
794 select GENERIC_CLOCKEVENTS 789 select GENERIC_CLOCKEVENTS
795 select GPIO_SAMSUNG 790 select GPIO_SAMSUNG
796 select HAVE_CLK
797 select HAVE_S3C2410_I2C if I2C 791 select HAVE_S3C2410_I2C if I2C
798 select HAVE_S3C2410_WATCHDOG if WATCHDOG 792 select HAVE_S3C2410_WATCHDOG if WATCHDOG
799 select HAVE_S3C_RTC if RTC_CLASS 793 select HAVE_S3C_RTC if RTC_CLASS
@@ -810,11 +804,9 @@ config ARCH_EXYNOS
810 select ARCH_REQUIRE_GPIOLIB 804 select ARCH_REQUIRE_GPIOLIB
811 select ARCH_SPARSEMEM_ENABLE 805 select ARCH_SPARSEMEM_ENABLE
812 select ARM_GIC 806 select ARM_GIC
813 select CLKDEV_LOOKUP
814 select COMMON_CLK 807 select COMMON_CLK
815 select CPU_V7 808 select CPU_V7
816 select GENERIC_CLOCKEVENTS 809 select GENERIC_CLOCKEVENTS
817 select HAVE_CLK
818 select HAVE_S3C2410_I2C if I2C 810 select HAVE_S3C2410_I2C if I2C
819 select HAVE_S3C2410_WATCHDOG if WATCHDOG 811 select HAVE_S3C2410_WATCHDOG if WATCHDOG
820 select HAVE_S3C_RTC if RTC_CLASS 812 select HAVE_S3C_RTC if RTC_CLASS
@@ -824,20 +816,6 @@ config ARCH_EXYNOS
824 help 816 help
825 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) 817 Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
826 818
827config ARCH_SHARK
828 bool "Shark"
829 select ARCH_USES_GETTIMEOFFSET
830 select CPU_SA110
831 select ISA
832 select ISA_DMA
833 select NEED_MACH_MEMORY_H
834 select PCI
835 select VIRT_TO_BUS
836 select ZONE_DMA
837 help
838 Support for the StrongARM based Digital DNARD machine, also known
839 as "Shark" (<http://www.shark-linux.de/shark.html>).
840
841config ARCH_DAVINCI 819config ARCH_DAVINCI
842 bool "TI DaVinci" 820 bool "TI DaVinci"
843 select ARCH_HAS_HOLES_MEMORYMODEL 821 select ARCH_HAS_HOLES_MEMORYMODEL
@@ -865,7 +843,6 @@ config ARCH_OMAP1
865 select CLKSRC_MMIO 843 select CLKSRC_MMIO
866 select GENERIC_CLOCKEVENTS 844 select GENERIC_CLOCKEVENTS
867 select GENERIC_IRQ_CHIP 845 select GENERIC_IRQ_CHIP
868 select HAVE_CLK
869 select HAVE_IDE 846 select HAVE_IDE
870 select IRQ_DOMAIN 847 select IRQ_DOMAIN
871 select NEED_MACH_IO_H if PCCARD 848 select NEED_MACH_IO_H if PCCARD
@@ -1009,9 +986,7 @@ source "arch/arm/mach-sti/Kconfig"
1009 986
1010source "arch/arm/mach-s3c24xx/Kconfig" 987source "arch/arm/mach-s3c24xx/Kconfig"
1011 988
1012if ARCH_S3C64XX
1013source "arch/arm/mach-s3c64xx/Kconfig" 989source "arch/arm/mach-s3c64xx/Kconfig"
1014endif
1015 990
1016source "arch/arm/mach-s5p64x0/Kconfig" 991source "arch/arm/mach-s5p64x0/Kconfig"
1017 992
@@ -1431,12 +1406,6 @@ config PCI_NANOENGINE
1431config PCI_SYSCALL 1406config PCI_SYSCALL
1432 def_bool PCI 1407 def_bool PCI
1433 1408
1434# Select the host bridge type
1435config PCI_HOST_VIA82C505
1436 bool
1437 depends on PCI && ARCH_SHARK
1438 default y
1439
1440config PCI_HOST_ITE8152 1409config PCI_HOST_ITE8152
1441 bool 1410 bool
1442 depends on PCI && MACH_ARMCORE 1411 depends on PCI && MACH_ARMCORE
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db50b626be98..8b667132d7b4 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -188,7 +188,6 @@ machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0
188machine-$(CONFIG_ARCH_S5PC100) += s5pc100 188machine-$(CONFIG_ARCH_S5PC100) += s5pc100
189machine-$(CONFIG_ARCH_S5PV210) += s5pv210 189machine-$(CONFIG_ARCH_S5PV210) += s5pv210
190machine-$(CONFIG_ARCH_SA1100) += sa1100 190machine-$(CONFIG_ARCH_SA1100) += sa1100
191machine-$(CONFIG_ARCH_SHARK) += shark
192machine-$(CONFIG_ARCH_SHMOBILE) += shmobile 191machine-$(CONFIG_ARCH_SHMOBILE) += shmobile
193machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile 192machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile
194machine-$(CONFIG_ARCH_SIRF) += prima2 193machine-$(CONFIG_ARCH_SIRF) += prima2
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 7ac1610252ba..e7190bb5998e 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -44,10 +44,6 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
44OBJS += ll_char_wr.o font.o 44OBJS += ll_char_wr.o font.o
45endif 45endif
46 46
47ifeq ($(CONFIG_ARCH_SHARK),y)
48OBJS += head-shark.o ofw-shark.o
49endif
50
51ifeq ($(CONFIG_ARCH_SA1100),y) 47ifeq ($(CONFIG_ARCH_SA1100),y)
52OBJS += head-sa1100.o 48OBJS += head-sa1100.o
53endif 49endif
diff --git a/arch/arm/boot/compressed/head-shark.S b/arch/arm/boot/compressed/head-shark.S
deleted file mode 100644
index 92b56897ed64..000000000000
--- a/arch/arm/boot/compressed/head-shark.S
+++ /dev/null
@@ -1,140 +0,0 @@
1/* The head-file for the Shark
2 * by Alexander Schulz
3 *
4 * Does the following:
5 * - get the memory layout from firmware. This can only be done as long as the mmu
6 * is still on.
7 * - switch the mmu off, so we have physical addresses
8 * - copy the kernel to 0x08508000. This is done to have a fixed address where the
9 * C-parts (misc.c) are executed. This address must be known at compile-time,
10 * but the load-address of the kernel depends on how much memory is installed.
11 * - Jump to this location.
12 * - Set r8 with 0, r7 with the architecture ID for head.S
13 */
14
15#include <linux/linkage.h>
16
17#include <asm/assembler.h>
18
19 .section ".start", "ax"
20
21 .arch armv4
22 b __beginning
23
24__ofw_data: .long 0 @ the number of memory blocks
25 .space 128 @ (startaddr,size) ...
26 .space 128 @ bootargs
27 .align
28
29__beginning: mov r4, r0 @ save the entry to the firmware
30
31 mov r0, #0xC0 @ disable irq and fiq
32 mov r1, r0
33 mrs r3, cpsr
34 bic r2, r3, r0
35 eor r2, r2, r1
36 msr cpsr_c, r2
37
38 mov r0, r4 @ get the Memory layout from firmware
39 adr r1, __ofw_data
40 add r2, r1, #4
41 mov lr, pc
42 b ofw_init
43 mov r1, #0
44
45 adr r2, __mmu_off @ calculate physical address
46 sub r2, r2, #0xf0000000 @ openprom maps us at f000 virt, 0e50 phys
47 adr r0, __ofw_data
48 ldr r0, [r0, #4]
49 add r2, r2, r0
50 add r2, r2, #0x00500000
51
52 mrc p15, 0, r3, c1, c0
53 bic r3, r3, #0xC @ Write Buffer and DCache
54 bic r3, r3, #0x1000 @ ICache
55 mcr p15, 0, r3, c1, c0 @ disabled
56
57 mov r0, #0
58 mcr p15, 0, r0, c7, c7 @ flush I,D caches on v4
59 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
60 mcr p15, 0, r0, c8, c7 @ flush I,D TLBs on v4
61
62 bic r3, r3, #0x1 @ MMU
63 mcr p15, 0, r3, c1, c0 @ disabled
64
65 mov pc, r2
66
67__copy_target: .long 0x08507FFC
68__copy_end: .long 0x08607FFC
69
70 .word _start
71 .word __bss_start
72
73 .align
74__temp_stack: .space 128
75
76__mmu_off:
77 adr r0, __ofw_data @ read the 1. entry of the memory map
78 ldr r0, [r0, #4]
79 orr r0, r0, #0x00600000
80 sub r0, r0, #4
81
82 ldr r1, __copy_end
83 ldr r3, __copy_target
84
85/* r0 = 0x0e600000 (current end of kernelcode)
86 * r3 = 0x08508000 (where it should begin)
87 * r1 = 0x08608000 (end of copying area, 1MB)
88 * The kernel is compressed, so 1 MB should be enough.
89 * copy the kernel to the beginning of physical memory
90 * We start from the highest address, so we can copy
91 * from 0x08500000 to 0x08508000 if we have only 8MB
92 */
93
94/* As we get more 2.6-kernels it gets more and more
95 * uncomfortable to be bound to kernel images of 1MB only.
96 * So we add a loop here, to be able to copy some more.
97 * Alexander Schulz 2005-07-17
98 */
99
100 mov r4, #3 @ How many megabytes to copy
101
102
103__MoveCode: sub r4, r4, #1
104
105__Copy: ldr r2, [r0], #-4
106 str r2, [r1], #-4
107 teq r1, r3
108 bne __Copy
109
110 /* The firmware maps us in blocks of 1 MB, the next block is
111 _below_ the last one. So our decrementing source pointer
112 ist right here, but the destination pointer must be increased
113 by 2 MB */
114 add r1, r1, #0x00200000
115 add r3, r3, #0x00100000
116
117 teq r4, #0
118 bne __MoveCode
119
120
121 /* and jump to it */
122 adr r2, __go_on @ where we want to jump
123 adr r0, __ofw_data @ read the 1. entry of the memory map
124 ldr r0, [r0, #4]
125 sub r2, r2, r0 @ we are mapped add 0e50 now, sub that (-0e00)
126 sub r2, r2, #0x00500000 @ -0050
127 ldr r0, __copy_target @ and add 0850 8000 instead
128 add r0, r0, #4
129 add r2, r2, r0
130 mov pc, r2 @ and jump there
131
132__go_on:
133 adr sp, __temp_stack
134 add sp, sp, #128
135 adr r0, __ofw_data
136 mov lr, pc
137 b create_params
138
139 mov r8, #0
140 mov r7, #15
diff --git a/arch/arm/boot/compressed/ofw-shark.c b/arch/arm/boot/compressed/ofw-shark.c
deleted file mode 100644
index 465c54b6b128..000000000000
--- a/arch/arm/boot/compressed/ofw-shark.c
+++ /dev/null
@@ -1,260 +0,0 @@
1/*
2 * linux/arch/arm/boot/compressed/ofw-shark.c
3 *
4 * by Alexander Schulz
5 *
6 * This file is used to get some basic information
7 * about the memory layout of the shark we are running
8 * on. Memory is usually divided in blocks a 8 MB.
9 * And bootargs are copied from OpenFirmware.
10 */
11
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <asm/setup.h>
16#include <asm/page.h>
17
18
19asmlinkage void
20create_params (unsigned long *buffer)
21{
22 /* Is there a better address? Also change in mach-shark/core.c */
23 struct tag *tag = (struct tag *) 0x08003000;
24 int j,i,m,k,nr_banks,size;
25 unsigned char *c;
26
27 k = 0;
28
29 /* Head of the taglist */
30 tag->hdr.tag = ATAG_CORE;
31 tag->hdr.size = tag_size(tag_core);
32 tag->u.core.flags = 1;
33 tag->u.core.pagesize = PAGE_SIZE;
34 tag->u.core.rootdev = 0;
35
36 /* Build up one tagged block for each memory region */
37 size=0;
38 nr_banks=(unsigned int) buffer[0];
39 for (j=0;j<nr_banks;j++){
40 /* search the lowest address and put it into the next entry */
41 /* not a fast sort algorithm, but there are at most 8 entries */
42 /* and this is used only once anyway */
43 m=0xffffffff;
44 for (i=0;i<(unsigned int) buffer[0];i++){
45 if (buffer[2*i+1]<m) {
46 m=buffer[2*i+1];
47 k=i;
48 }
49 }
50
51 tag = tag_next(tag);
52 tag->hdr.tag = ATAG_MEM;
53 tag->hdr.size = tag_size(tag_mem32);
54 tag->u.mem.size = buffer[2*k+2];
55 tag->u.mem.start = buffer[2*k+1];
56
57 size += buffer[2*k+2];
58
59 buffer[2*k+1]=0xffffffff; /* mark as copied */
60 }
61
62 /* The command line */
63 tag = tag_next(tag);
64 tag->hdr.tag = ATAG_CMDLINE;
65
66 c=(unsigned char *)(&buffer[34]);
67 j=0;
68 while (*c) tag->u.cmdline.cmdline[j++]=*c++;
69
70 tag->u.cmdline.cmdline[j]=0;
71 tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2;
72
73 /* Hardware revision */
74 tag = tag_next(tag);
75 tag->hdr.tag = ATAG_REVISION;
76 tag->hdr.size = tag_size(tag_revision);
77 tag->u.revision.rev = ((unsigned char) buffer[33])-'0';
78
79 /* End of the taglist */
80 tag = tag_next(tag);
81 tag->hdr.tag = 0;
82 tag->hdr.size = 0;
83}
84
85
86typedef int (*ofw_handle_t)(void *);
87
88/* Everything below is called with a wrong MMU setting.
89 * This means: no string constants, no initialization of
90 * arrays, no global variables! This is ugly but I didn't
91 * want to write this in assembler :-)
92 */
93
94int
95of_decode_int(const unsigned char *p)
96{
97 unsigned int i = *p++ << 8;
98 i = (i + *p++) << 8;
99 i = (i + *p++) << 8;
100 return (i + *p);
101}
102
103int
104OF_finddevice(ofw_handle_t openfirmware, char *name)
105{
106 unsigned int args[8];
107 char service[12];
108
109 service[0]='f';
110 service[1]='i';
111 service[2]='n';
112 service[3]='d';
113 service[4]='d';
114 service[5]='e';
115 service[6]='v';
116 service[7]='i';
117 service[8]='c';
118 service[9]='e';
119 service[10]='\0';
120
121 args[0]=(unsigned int)service;
122 args[1]=1;
123 args[2]=1;
124 args[3]=(unsigned int)name;
125
126 if (openfirmware(args) == -1)
127 return -1;
128 return args[4];
129}
130
131int
132OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop)
133{
134 unsigned int args[8];
135 char service[12];
136
137 service[0]='g';
138 service[1]='e';
139 service[2]='t';
140 service[3]='p';
141 service[4]='r';
142 service[5]='o';
143 service[6]='p';
144 service[7]='l';
145 service[8]='e';
146 service[9]='n';
147 service[10]='\0';
148
149 args[0] = (unsigned int)service;
150 args[1] = 2;
151 args[2] = 1;
152 args[3] = (unsigned int)handle;
153 args[4] = (unsigned int)prop;
154
155 if (openfirmware(args) == -1)
156 return -1;
157 return args[5];
158}
159
160int
161OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen)
162{
163 unsigned int args[8];
164 char service[8];
165
166 service[0]='g';
167 service[1]='e';
168 service[2]='t';
169 service[3]='p';
170 service[4]='r';
171 service[5]='o';
172 service[6]='p';
173 service[7]='\0';
174
175 args[0] = (unsigned int)service;
176 args[1] = 4;
177 args[2] = 1;
178 args[3] = (unsigned int)handle;
179 args[4] = (unsigned int)prop;
180 args[5] = (unsigned int)buf;
181 args[6] = buflen;
182
183 if (openfirmware(args) == -1)
184 return -1;
185 return args[7];
186}
187
188asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer)
189{
190 int phandle,i,mem_len,buffer[32];
191 char temp[15];
192
193 temp[0]='/';
194 temp[1]='m';
195 temp[2]='e';
196 temp[3]='m';
197 temp[4]='o';
198 temp[5]='r';
199 temp[6]='y';
200 temp[7]='\0';
201
202 phandle=OF_finddevice(o,temp);
203
204 temp[0]='r';
205 temp[1]='e';
206 temp[2]='g';
207 temp[3]='\0';
208
209 mem_len = OF_getproplen(o,phandle, temp);
210 OF_getprop(o,phandle, temp, buffer, mem_len);
211 *nomr=mem_len >> 3;
212
213 for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]);
214
215 temp[0]='/';
216 temp[1]='c';
217 temp[2]='h';
218 temp[3]='o';
219 temp[4]='s';
220 temp[5]='e';
221 temp[6]='n';
222 temp[7]='\0';
223
224 phandle=OF_finddevice(o,temp);
225
226 temp[0]='b';
227 temp[1]='o';
228 temp[2]='o';
229 temp[3]='t';
230 temp[4]='a';
231 temp[5]='r';
232 temp[6]='g';
233 temp[7]='s';
234 temp[8]='\0';
235
236 mem_len = OF_getproplen(o,phandle, temp);
237 OF_getprop(o,phandle, temp, buffer, mem_len);
238 if (mem_len > 128) mem_len=128;
239 for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i];
240 pointer[i+33]=0;
241
242 temp[0]='/';
243 temp[1]='\0';
244 phandle=OF_finddevice(o,temp);
245 temp[0]='b';
246 temp[1]='a';
247 temp[2]='n';
248 temp[3]='n';
249 temp[4]='e';
250 temp[5]='r';
251 temp[6]='-';
252 temp[7]='n';
253 temp[8]='a';
254 temp[9]='m';
255 temp[10]='e';
256 temp[11]='\0';
257 mem_len = OF_getproplen(o,phandle, temp);
258 OF_getprop(o,phandle, temp, buffer, mem_len);
259 * ((unsigned char *) &pointer[32]) = ((unsigned char *) buffer)[mem_len-2];
260}
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 802720e3e8fd..c485157b0b5b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -103,8 +103,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
103 kirkwood-ts219-6282.dtb \ 103 kirkwood-ts219-6282.dtb \
104 kirkwood-openblocks_a6.dtb 104 kirkwood-openblocks_a6.dtb
105dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb 105dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
106dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ 106dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
107 msm8960-cdp.dtb 107 qcom-msm8960-cdp.dtb
108dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ 108dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
109 armada-370-mirabox.dtb \ 109 armada-370-mirabox.dtb \
110 armada-370-netgear-rn102.dtb \ 110 armada-370-netgear-rn102.dtb \
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi b/arch/arm/boot/dts/at91sam9g25.dtsi
index b4ec6fe53fc7..17b879990914 100644
--- a/arch/arm/boot/dts/at91sam9g25.dtsi
+++ b/arch/arm/boot/dts/at91sam9g25.dtsi
@@ -7,6 +7,8 @@
7 */ 7 */
8 8
9#include "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10#include "at91sam9x5_usart3.dtsi"
11#include "at91sam9x5_macb0.dtsi"
10 12
11/ { 13/ {
12 model = "Atmel AT91SAM9G25 SoC"; 14 model = "Atmel AT91SAM9G25 SoC";
diff --git a/arch/arm/boot/dts/at91sam9g35.dtsi b/arch/arm/boot/dts/at91sam9g35.dtsi
index bebf9f55614b..e35c2fcf8298 100644
--- a/arch/arm/boot/dts/at91sam9g35.dtsi
+++ b/arch/arm/boot/dts/at91sam9g35.dtsi
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10#include "at91sam9x5_macb0.dtsi"
10 11
11/ { 12/ {
12 model = "Atmel AT91SAM9G35 SoC"; 13 model = "Atmel AT91SAM9G35 SoC";
diff --git a/arch/arm/boot/dts/at91sam9x25.dtsi b/arch/arm/boot/dts/at91sam9x25.dtsi
index 49e94aba938f..c2554219f7a4 100644
--- a/arch/arm/boot/dts/at91sam9x25.dtsi
+++ b/arch/arm/boot/dts/at91sam9x25.dtsi
@@ -7,6 +7,9 @@
7 */ 7 */
8 8
9#include "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10#include "at91sam9x5_usart3.dtsi"
11#include "at91sam9x5_macb0.dtsi"
12#include "at91sam9x5_macb1.dtsi"
10 13
11/ { 14/ {
12 model = "Atmel AT91SAM9X25 SoC"; 15 model = "Atmel AT91SAM9X25 SoC";
@@ -22,27 +25,6 @@
22 0x80000000 0xfffd0000 0xb83fffff /* pioC */ 25 0x80000000 0xfffd0000 0xb83fffff /* pioC */
23 0x003fffff 0x003f8000 0x00000000 /* pioD */ 26 0x003fffff 0x003f8000 0x00000000 /* pioD */
24 >; 27 >;
25
26 macb1 {
27 pinctrl_macb1_rmii: macb1_rmii-0 {
28 atmel,pins =
29 <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC16 periph B */
30 AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC18 periph B */
31 AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC19 periph B */
32 AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC20 periph B */
33 AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC21 periph B */
34 AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC27 periph B */
35 AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC28 periph B */
36 AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC29 periph B */
37 AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC30 periph B */
38 AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC31 periph B */
39 };
40 };
41 };
42
43 macb1: ethernet@f8030000 {
44 pinctrl-names = "default";
45 pinctrl-0 = <&pinctrl_macb1_rmii>;
46 }; 28 };
47 }; 29 };
48 }; 30 };
diff --git a/arch/arm/boot/dts/at91sam9x35.dtsi b/arch/arm/boot/dts/at91sam9x35.dtsi
index 1a3d525a1f5d..8eac66ce0ab7 100644
--- a/arch/arm/boot/dts/at91sam9x35.dtsi
+++ b/arch/arm/boot/dts/at91sam9x35.dtsi
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10#include "at91sam9x5_macb0.dtsi"
10 11
11/ { 12/ {
12 model = "Atmel AT91SAM9X35 SoC"; 13 model = "Atmel AT91SAM9X35 SoC";
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index e74dc15efa9d..40267a116c3c 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -206,29 +206,6 @@
206 }; 206 };
207 }; 207 };
208 208
209 usart3 {
210 pinctrl_usart3: usart3-0 {
211 atmel,pins =
212 <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PC22 periph B with pullup */
213 AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC23 periph B */
214 };
215
216 pinctrl_usart3_rts: usart3_rts-0 {
217 atmel,pins =
218 <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC24 periph B */
219 };
220
221 pinctrl_usart3_cts: usart3_cts-0 {
222 atmel,pins =
223 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC25 periph B */
224 };
225
226 pinctrl_usart3_sck: usart3_sck-0 {
227 atmel,pins =
228 <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC26 periph B */
229 };
230 };
231
232 uart0 { 209 uart0 {
233 pinctrl_uart0: uart0-0 { 210 pinctrl_uart0: uart0-0 {
234 atmel,pins = 211 atmel,pins =
@@ -277,34 +254,6 @@
277 }; 254 };
278 }; 255 };
279 256
280 macb0 {
281 pinctrl_macb0_rmii: macb0_rmii-0 {
282 atmel,pins =
283 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A */
284 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A */
285 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A */
286 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A */
287 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A */
288 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A */
289 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
290 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
291 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
292 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
293 };
294
295 pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
296 atmel,pins =
297 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A */
298 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A */
299 AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */
300 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A */
301 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A */
302 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A */
303 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A */
304 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
305 };
306 };
307
308 mmc0 { 257 mmc0 {
309 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 { 258 pinctrl_mmc0_slot0_clk_cmd_dat0: mmc0_slot0_clk_cmd_dat0-0 {
310 atmel,pins = 259 atmel,pins =
@@ -610,22 +559,6 @@
610 status = "disabled"; 559 status = "disabled";
611 }; 560 };
612 561
613 macb0: ethernet@f802c000 {
614 compatible = "cdns,at32ap7000-macb", "cdns,macb";
615 reg = <0xf802c000 0x100>;
616 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
617 pinctrl-names = "default";
618 pinctrl-0 = <&pinctrl_macb0_rmii>;
619 status = "disabled";
620 };
621
622 macb1: ethernet@f8030000 {
623 compatible = "cdns,at32ap7000-macb", "cdns,macb";
624 reg = <0xf8030000 0x100>;
625 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
626 status = "disabled";
627 };
628
629 i2c0: i2c@f8010000 { 562 i2c0: i2c@f8010000 {
630 compatible = "atmel,at91sam9x5-i2c"; 563 compatible = "atmel,at91sam9x5-i2c";
631 reg = <0xf8010000 0x100>; 564 reg = <0xf8010000 0x100>;
diff --git a/arch/arm/boot/dts/at91sam9x5_macb0.dtsi b/arch/arm/boot/dts/at91sam9x5_macb0.dtsi
new file mode 100644
index 000000000000..55731ffba764
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9x5_macb0.dtsi
@@ -0,0 +1,56 @@
1/*
2 * at91sam9x5_macb0.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 1
3 * Ethernet interface.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff400 {
17 macb0 {
18 pinctrl_macb0_rmii: macb0_rmii-0 {
19 atmel,pins =
20 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A */
21 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A */
22 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A */
23 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A */
24 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A */
25 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A */
26 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */
27 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */
28 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */
29 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */
30 };
31
32 pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
33 atmel,pins =
34 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A */
35 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A */
36 AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A */
37 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A */
38 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A */
39 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A */
40 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A */
41 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB17 periph A */
42 };
43 };
44 };
45
46 macb0: ethernet@f802c000 {
47 compatible = "cdns,at32ap7000-macb", "cdns,macb";
48 reg = <0xf802c000 0x100>;
49 interrupts = <24 IRQ_TYPE_LEVEL_HIGH 3>;
50 pinctrl-names = "default";
51 pinctrl-0 = <&pinctrl_macb0_rmii>;
52 status = "disabled";
53 };
54 };
55 };
56};
diff --git a/arch/arm/boot/dts/at91sam9x5_macb1.dtsi b/arch/arm/boot/dts/at91sam9x5_macb1.dtsi
new file mode 100644
index 000000000000..77425a627a94
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9x5_macb1.dtsi
@@ -0,0 +1,44 @@
1/*
2 * at91sam9x5_macb1.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2
3 * Ethernet interfaces.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff400 {
17 macb1 {
18 pinctrl_macb1_rmii: macb1_rmii-0 {
19 atmel,pins =
20 <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC16 periph B */
21 AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC18 periph B */
22 AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC19 periph B */
23 AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC20 periph B */
24 AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC21 periph B */
25 AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC27 periph B */
26 AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC28 periph B */
27 AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC29 periph B */
28 AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* PC30 periph B */
29 AT91_PIOC 31 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC31 periph B */
30 };
31 };
32 };
33
34 macb1: ethernet@f8030000 {
35 compatible = "cdns,at32ap7000-macb", "cdns,macb";
36 reg = <0xf8030000 0x100>;
37 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 3>;
38 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_macb1_rmii>;
40 status = "disabled";
41 };
42 };
43 };
44};
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
new file mode 100644
index 000000000000..2347e9563cef
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
@@ -0,0 +1,51 @@
1/*
2 * at91sam9x5_usart3.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * 4 USART.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff400 {
17 usart3 {
18 pinctrl_usart3: usart3-0 {
19 atmel,pins =
20 <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* PC22 periph B with pullup */
21 AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC23 periph B */
22 };
23
24 pinctrl_usart3_rts: usart3_rts-0 {
25 atmel,pins =
26 <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC24 periph B */
27 };
28
29 pinctrl_usart3_cts: usart3_cts-0 {
30 atmel,pins =
31 <AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC25 periph B */
32 };
33
34 pinctrl_usart3_sck: usart3_sck-0 {
35 atmel,pins =
36 <AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC26 periph B */
37 };
38 };
39 };
40
41 usart3: serial@f8028000 {
42 compatible = "atmel,at91sam9260-usart";
43 reg = <0xf8028000 0x200>;
44 interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
45 pinctrl-names = "default";
46 pinctrl-0 = <&pinctrl_usart3>;
47 status = "disabled";
48 };
49 };
50 };
51};
diff --git a/arch/arm/boot/dts/msm8660-surf.dts b/arch/arm/boot/dts/qcom-msm8660-surf.dts
index 386d42870215..386d42870215 100644
--- a/arch/arm/boot/dts/msm8660-surf.dts
+++ b/arch/arm/boot/dts/qcom-msm8660-surf.dts
diff --git a/arch/arm/boot/dts/msm8960-cdp.dts b/arch/arm/boot/dts/qcom-msm8960-cdp.dts
index 93e9f7e0b7ad..93e9f7e0b7ad 100644
--- a/arch/arm/boot/dts/msm8960-cdp.dts
+++ b/arch/arm/boot/dts/qcom-msm8960-cdp.dts
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index b7f49615120d..5cdaba4cea86 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -31,7 +31,6 @@
31 gpio3 = &pioD; 31 gpio3 = &pioD;
32 gpio4 = &pioE; 32 gpio4 = &pioE;
33 tcb0 = &tcb0; 33 tcb0 = &tcb0;
34 tcb1 = &tcb1;
35 i2c0 = &i2c0; 34 i2c0 = &i2c0;
36 i2c1 = &i2c1; 35 i2c1 = &i2c1;
37 i2c2 = &i2c2; 36 i2c2 = &i2c2;
@@ -105,15 +104,6 @@
105 status = "disabled"; 104 status = "disabled";
106 }; 105 };
107 106
108 can0: can@f000c000 {
109 compatible = "atmel,at91sam9x5-can";
110 reg = <0xf000c000 0x300>;
111 interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&pinctrl_can0_rx_tx>;
114 status = "disabled";
115 };
116
117 tcb0: timer@f0010000 { 107 tcb0: timer@f0010000 {
118 compatible = "atmel,at91sam9x5-tcb"; 108 compatible = "atmel,at91sam9x5-tcb";
119 reg = <0xf0010000 0x100>; 109 reg = <0xf0010000 0x100>;
@@ -166,15 +156,6 @@
166 status = "disabled"; 156 status = "disabled";
167 }; 157 };
168 158
169 macb0: ethernet@f0028000 {
170 compatible = "cdns,pc302-gem", "cdns,gem";
171 reg = <0xf0028000 0x100>;
172 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
173 pinctrl-names = "default";
174 pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
175 status = "disabled";
176 };
177
178 isi: isi@f0034000 { 159 isi: isi@f0034000 {
179 compatible = "atmel,at91sam9g45-isi"; 160 compatible = "atmel,at91sam9g45-isi";
180 reg = <0xf0034000 0x4000>; 161 reg = <0xf0034000 0x4000>;
@@ -195,19 +176,6 @@
195 #size-cells = <0>; 176 #size-cells = <0>;
196 }; 177 };
197 178
198 mmc2: mmc@f8004000 {
199 compatible = "atmel,hsmci";
200 reg = <0xf8004000 0x600>;
201 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
202 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(1)>;
203 dma-names = "rxtx";
204 pinctrl-names = "default";
205 pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
206 status = "disabled";
207 #address-cells = <1>;
208 #size-cells = <0>;
209 };
210
211 spi1: spi@f8008000 { 179 spi1: spi@f8008000 {
212 #address-cells = <1>; 180 #address-cells = <1>;
213 #size-cells = <0>; 181 #size-cells = <0>;
@@ -231,20 +199,6 @@
231 status = "disabled"; 199 status = "disabled";
232 }; 200 };
233 201
234 can1: can@f8010000 {
235 compatible = "atmel,at91sam9x5-can";
236 reg = <0xf8010000 0x300>;
237 interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&pinctrl_can1_rx_tx>;
240 };
241
242 tcb1: timer@f8014000 {
243 compatible = "atmel,at91sam9x5-tcb";
244 reg = <0xf8014000 0x100>;
245 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
246 };
247
248 adc0: adc@f8018000 { 202 adc0: adc@f8018000 {
249 compatible = "atmel,at91sam9260-adc"; 203 compatible = "atmel,at91sam9260-adc";
250 reg = <0xf8018000 0x100>; 204 reg = <0xf8018000 0x100>;
@@ -341,15 +295,6 @@
341 status = "disabled"; 295 status = "disabled";
342 }; 296 };
343 297
344 macb1: ethernet@f802c000 {
345 compatible = "cdns,at32ap7000-macb", "cdns,macb";
346 reg = <0xf802c000 0x100>;
347 interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
348 pinctrl-names = "default";
349 pinctrl-0 = <&pinctrl_macb1_rmii>;
350 status = "disabled";
351 };
352
353 sha@f8034000 { 298 sha@f8034000 {
354 compatible = "atmel,sam9g46-sha"; 299 compatible = "atmel,sam9g46-sha";
355 reg = <0xf8034000 0x100>; 300 reg = <0xf8034000 0x100>;
@@ -474,22 +419,6 @@
474 }; 419 };
475 }; 420 };
476 421
477 can0 {
478 pinctrl_can0_rx_tx: can0_rx_tx {
479 atmel,pins =
480 <AT91_PIOD 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */
481 AT91_PIOD 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */
482 };
483 };
484
485 can1 {
486 pinctrl_can1_rx_tx: can1_rx_tx {
487 atmel,pins =
488 <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB14 periph B RX, conflicts with GCRS */
489 AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B TX, conflicts with GCOL */
490 };
491 };
492
493 dbgu { 422 dbgu {
494 pinctrl_dbgu: dbgu-0 { 423 pinctrl_dbgu: dbgu-0 {
495 atmel,pins = 424 atmel,pins =
@@ -537,107 +466,6 @@
537 }; 466 };
538 }; 467 };
539 468
540 lcd {
541 pinctrl_lcd: lcd-0 {
542 atmel,pins =
543 <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA24 periph A LCDPWM */
544 AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA26 periph A LCDVSYNC */
545 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA27 periph A LCDHSYNC */
546 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA25 periph A LCDDISP */
547 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA29 periph A LCDDEN */
548 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA28 periph A LCDPCK */
549 AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A LCDD0 pin */
550 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A LCDD1 pin */
551 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA2 periph A LCDD2 pin */
552 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA3 periph A LCDD3 pin */
553 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA4 periph A LCDD4 pin */
554 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA5 periph A LCDD5 pin */
555 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA6 periph A LCDD6 pin */
556 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA7 periph A LCDD7 pin */
557 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA8 periph A LCDD8 pin */
558 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A LCDD9 pin */
559 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA10 periph A LCDD10 pin */
560 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A LCDD11 pin */
561 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A LCDD12 pin */
562 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A LCDD13 pin */
563 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A LCDD14 pin */
564 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A LCDD15 pin */
565 AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC14 periph C LCDD16 pin */
566 AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC13 periph C LCDD17 pin */
567 AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC12 periph C LCDD18 pin */
568 AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC11 periph C LCDD19 pin */
569 AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC10 periph C LCDD20 pin */
570 AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC15 periph C LCDD21 pin */
571 AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE /* PE27 periph C LCDD22 pin */
572 AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PE28 periph C LCDD23 pin */
573 };
574 };
575
576 macb0 {
577 pinctrl_macb0_data_rgmii: macb0_data_rgmii {
578 atmel,pins =
579 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A GTX0, conflicts with PWMH0 */
580 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A GTX1, conflicts with PWML0 */
581 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A GTX2, conflicts with TK1 */
582 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A GTX3, conflicts with TF1 */
583 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A GRX0, conflicts with PWMH1 */
584 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A GRX1, conflicts with PWML1 */
585 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A GRX2, conflicts with TD1 */
586 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB7 periph A GRX3, conflicts with RK1 */
587 };
588 pinctrl_macb0_data_gmii: macb0_data_gmii {
589 atmel,pins =
590 <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB19 periph B GTX4, conflicts with MCI1_CDA */
591 AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB20 periph B GTX5, conflicts with MCI1_DA0 */
592 AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB21 periph B GTX6, conflicts with MCI1_DA1 */
593 AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB22 periph B GTX7, conflicts with MCI1_DA2 */
594 AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB23 periph B GRX4, conflicts with MCI1_DA3 */
595 AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB24 periph B GRX5, conflicts with MCI1_CK */
596 AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB25 periph B GRX6, conflicts with SCK1 */
597 AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB26 periph B GRX7, conflicts with CTS1 */
598 };
599 pinctrl_macb0_signal_rgmii: macb0_signal_rgmii {
600 atmel,pins =
601 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A GTXCK, conflicts with PWMH2 */
602 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A GTXEN, conflicts with PWML2 */
603 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A GRXCK, conflicts with RD1 */
604 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A GRXER, conflicts with PWML3 */
605 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A GMDC */
606 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A GMDIO */
607 AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A G125CK */
608 };
609 pinctrl_macb0_signal_gmii: macb0_signal_gmii {
610 atmel,pins =
611 <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A GTXEN, conflicts with PWML2 */
612 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB10 periph A GTXER, conflicts with RF1 */
613 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A GRXCK, conflicts with RD1 */
614 AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A GRXDV, conflicts with PWMH3 */
615 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A GRXER, conflicts with PWML3 */
616 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A GCRS, conflicts with CANRX1 */
617 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A GCOL, conflicts with CANTX1 */
618 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A GMDC */
619 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A GMDIO */
620 AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB27 periph B G125CKO */
621 };
622
623 };
624
625 macb1 {
626 pinctrl_macb1_rmii: macb1_rmii-0 {
627 atmel,pins =
628 <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC0 periph A ETX0, conflicts with TIOA3 */
629 AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC1 periph A ETX1, conflicts with TIOB3 */
630 AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC2 periph A ERX0, conflicts with TCLK3 */
631 AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC3 periph A ERX1, conflicts with TIOA4 */
632 AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC4 periph A ETXEN, conflicts with TIOB4 */
633 AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC5 periph A ECRSDV,conflicts with TCLK4 */
634 AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC6 periph A ERXER, conflicts with TIOA5 */
635 AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC7 periph A EREFCK, conflicts with TIOB5 */
636 AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC8 periph A EMDC, conflicts with TCLK5 */
637 AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC9 periph A EMDIO */
638 };
639 };
640
641 mmc0 { 469 mmc0 {
642 pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 { 470 pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 {
643 atmel,pins = 471 atmel,pins =
@@ -675,21 +503,6 @@
675 }; 503 };
676 }; 504 };
677 505
678 mmc2 {
679 pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 {
680 atmel,pins =
681 <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC15 periph A MCI2_CK, conflicts with PCK2 */
682 AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC10 periph A MCI2_CDA with pullup */
683 AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC11 periph A MCI2_DA0 with pullup */
684 };
685 pinctrl_mmc2_dat1_3: mmc2_dat1_3 {
686 atmel,pins =
687 <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */
688 AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */
689 AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */
690 };
691 };
692
693 nand0 { 506 nand0 {
694 pinctrl_nand0_ale_cle: nand0_ale_cle-0 { 507 pinctrl_nand0_ale_cle: nand0_ale_cle-0 {
695 atmel,pins = 508 atmel,pins =
@@ -748,22 +561,6 @@
748 }; 561 };
749 }; 562 };
750 563
751 uart0 {
752 pinctrl_uart0: uart0-0 {
753 atmel,pins =
754 <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */
755 AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC30 periph A with pullup, conflicts with ISI_PCK */
756 };
757 };
758
759 uart1 {
760 pinctrl_uart1: uart1-0 {
761 atmel,pins =
762 <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */
763 AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */
764 };
765 };
766
767 usart0 { 564 usart0 {
768 pinctrl_usart0: usart0-0 { 565 pinctrl_usart0: usart0-0 {
769 atmel,pins = 566 atmel,pins =
diff --git a/arch/arm/boot/dts/sama5d31.dtsi b/arch/arm/boot/dts/sama5d31.dtsi
new file mode 100644
index 000000000000..7997dc9863ed
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d31.dtsi
@@ -0,0 +1,16 @@
1/*
2 * sama5d31.dtsi - Device Tree Include file for SAMA5D31 SoC
3 *
4 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8#include "sama5d3.dtsi"
9#include "sama5d3_lcd.dtsi"
10#include "sama5d3_emac.dtsi"
11#include "sama5d3_mci2.dtsi"
12#include "sama5d3_uart.dtsi"
13
14/ {
15 compatible = "atmel,samad31", "atmel,sama5d3", "atmel,sama5";
16};
diff --git a/arch/arm/boot/dts/sama5d31ek.dts b/arch/arm/boot/dts/sama5d31ek.dts
index 027bac7510b6..04eec0dfcf7d 100644
--- a/arch/arm/boot/dts/sama5d31ek.dts
+++ b/arch/arm/boot/dts/sama5d31ek.dts
@@ -7,12 +7,13 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10#include "sama5d31.dtsi"
10#include "sama5d3xmb.dtsi" 11#include "sama5d3xmb.dtsi"
11#include "sama5d3xdm.dtsi" 12#include "sama5d3xdm.dtsi"
12 13
13/ { 14/ {
14 model = "Atmel SAMA5D31-EK"; 15 model = "Atmel SAMA5D31-EK";
15 compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 16 compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
16 17
17 ahb { 18 ahb {
18 apb { 19 apb {
diff --git a/arch/arm/boot/dts/sama5d33.dtsi b/arch/arm/boot/dts/sama5d33.dtsi
new file mode 100644
index 000000000000..39f832253caf
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d33.dtsi
@@ -0,0 +1,14 @@
1/*
2 * sama5d33.dtsi - Device Tree Include file for SAMA5D33 SoC
3 *
4 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8#include "sama5d3.dtsi"
9#include "sama5d3_lcd.dtsi"
10#include "sama5d3_gmac.dtsi"
11
12/ {
13 compatible = "atmel,samad33", "atmel,sama5d3", "atmel,sama5";
14};
diff --git a/arch/arm/boot/dts/sama5d33ek.dts b/arch/arm/boot/dts/sama5d33ek.dts
index 99bd0c8e0471..cbd6a3ff1545 100644
--- a/arch/arm/boot/dts/sama5d33ek.dts
+++ b/arch/arm/boot/dts/sama5d33ek.dts
@@ -7,12 +7,13 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10#include "sama5d33.dtsi"
10#include "sama5d3xmb.dtsi" 11#include "sama5d3xmb.dtsi"
11#include "sama5d3xdm.dtsi" 12#include "sama5d3xdm.dtsi"
12 13
13/ { 14/ {
14 model = "Atmel SAMA5D33-EK"; 15 model = "Atmel SAMA5D33-EK";
15 compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 16 compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d33", "atmel,sama5d3", "atmel,sama5";
16 17
17 ahb { 18 ahb {
18 apb { 19 apb {
diff --git a/arch/arm/boot/dts/sama5d34.dtsi b/arch/arm/boot/dts/sama5d34.dtsi
new file mode 100644
index 000000000000..89cda2c0da39
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d34.dtsi
@@ -0,0 +1,16 @@
1/*
2 * sama5d34.dtsi - Device Tree Include file for SAMA5D34 SoC
3 *
4 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8#include "sama5d3.dtsi"
9#include "sama5d3_lcd.dtsi"
10#include "sama5d3_gmac.dtsi"
11#include "sama5d3_can.dtsi"
12#include "sama5d3_mci2.dtsi"
13
14/ {
15 compatible = "atmel,samad34", "atmel,sama5d3", "atmel,sama5";
16};
diff --git a/arch/arm/boot/dts/sama5d34ek.dts b/arch/arm/boot/dts/sama5d34ek.dts
index fb8ee11cf282..878aa164275a 100644
--- a/arch/arm/boot/dts/sama5d34ek.dts
+++ b/arch/arm/boot/dts/sama5d34ek.dts
@@ -7,12 +7,13 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10#include "sama5d34.dtsi"
10#include "sama5d3xmb.dtsi" 11#include "sama5d3xmb.dtsi"
11#include "sama5d3xdm.dtsi" 12#include "sama5d3xdm.dtsi"
12 13
13/ { 14/ {
14 model = "Atmel SAMA5D34-EK"; 15 model = "Atmel SAMA5D34-EK";
15 compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 16 compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d34", "atmel,sama5d3", "atmel,sama5";
16 17
17 ahb { 18 ahb {
18 apb { 19 apb {
diff --git a/arch/arm/boot/dts/sama5d35.dtsi b/arch/arm/boot/dts/sama5d35.dtsi
new file mode 100644
index 000000000000..d20cd71b5f0e
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d35.dtsi
@@ -0,0 +1,18 @@
1/*
2 * sama5d35.dtsi - Device Tree Include file for SAMA5D35 SoC
3 *
4 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
5 *
6 * Licensed under GPLv2 or later.
7 */
8#include "sama5d3.dtsi"
9#include "sama5d3_gmac.dtsi"
10#include "sama5d3_emac.dtsi"
11#include "sama5d3_can.dtsi"
12#include "sama5d3_mci2.dtsi"
13#include "sama5d3_uart.dtsi"
14#include "sama5d3_tcb1.dtsi"
15
16/ {
17 compatible = "atmel,samad35", "atmel,sama5d3", "atmel,sama5";
18};
diff --git a/arch/arm/boot/dts/sama5d35ek.dts b/arch/arm/boot/dts/sama5d35ek.dts
index 509a53d9cc7b..9089c7c6cea8 100644
--- a/arch/arm/boot/dts/sama5d35ek.dts
+++ b/arch/arm/boot/dts/sama5d35ek.dts
@@ -7,11 +7,12 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10#include "sama5d35.dtsi"
10#include "sama5d3xmb.dtsi" 11#include "sama5d3xmb.dtsi"
11 12
12/ { 13/ {
13 model = "Atmel SAMA5D35-EK"; 14 model = "Atmel SAMA5D35-EK";
14 compatible = "atmel,sama5d35ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5"; 15 compatible = "atmel,sama5d35ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d35", "atmel,sama5d3", "atmel,sama5";
15 16
16 ahb { 17 ahb {
17 apb { 18 apb {
diff --git a/arch/arm/boot/dts/sama5d3_can.dtsi b/arch/arm/boot/dts/sama5d3_can.dtsi
new file mode 100644
index 000000000000..8ed3260cef66
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_can.dtsi
@@ -0,0 +1,54 @@
1/*
2 * at91sama5d3_can.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * CAN support
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff200 {
17 can0 {
18 pinctrl_can0_rx_tx: can0_rx_tx {
19 atmel,pins =
20 <AT91_PIOD 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PD14 periph C RX, conflicts with SCK0, SPI0_NPCS1 */
21 AT91_PIOD 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PD15 periph C TX, conflicts with CTS0, SPI0_NPCS2 */
22 };
23 };
24
25 can1 {
26 pinctrl_can1_rx_tx: can1_rx_tx {
27 atmel,pins =
28 <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB14 periph B RX, conflicts with GCRS */
29 AT91_PIOB 15 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB15 periph B TX, conflicts with GCOL */
30 };
31 };
32
33 };
34
35 can0: can@f000c000 {
36 compatible = "atmel,at91sam9x5-can";
37 reg = <0xf000c000 0x300>;
38 interrupts = <40 IRQ_TYPE_LEVEL_HIGH 3>;
39 pinctrl-names = "default";
40 pinctrl-0 = <&pinctrl_can0_rx_tx>;
41 status = "disabled";
42 };
43
44 can1: can@f8010000 {
45 compatible = "atmel,at91sam9x5-can";
46 reg = <0xf8010000 0x300>;
47 interrupts = <41 IRQ_TYPE_LEVEL_HIGH 3>;
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_can1_rx_tx>;
50 status = "disabled";
51 };
52 };
53 };
54};
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi
new file mode 100644
index 000000000000..4d4f351f1f9f
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_emac.dtsi
@@ -0,0 +1,44 @@
1/*
2 * at91sama5d3_emac.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * Ethernet.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff200 {
17 macb1 {
18 pinctrl_macb1_rmii: macb1_rmii-0 {
19 atmel,pins =
20 <AT91_PIOC 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC0 periph A ETX0, conflicts with TIOA3 */
21 AT91_PIOC 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC1 periph A ETX1, conflicts with TIOB3 */
22 AT91_PIOC 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC2 periph A ERX0, conflicts with TCLK3 */
23 AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC3 periph A ERX1, conflicts with TIOA4 */
24 AT91_PIOC 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC4 periph A ETXEN, conflicts with TIOB4 */
25 AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC5 periph A ECRSDV,conflicts with TCLK4 */
26 AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC6 periph A ERXER, conflicts with TIOA5 */
27 AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC7 periph A EREFCK, conflicts with TIOB5 */
28 AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC8 periph A EMDC, conflicts with TCLK5 */
29 AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC9 periph A EMDIO */
30 };
31 };
32 };
33
34 macb1: ethernet@f802c000 {
35 compatible = "cdns,at32ap7000-macb", "cdns,macb";
36 reg = <0xf802c000 0x100>;
37 interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
38 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_macb1_rmii>;
40 status = "disabled";
41 };
42 };
43 };
44};
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi
new file mode 100644
index 000000000000..0ba8be30ccd8
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_gmac.dtsi
@@ -0,0 +1,77 @@
1/*
2 * at91sama5d3_gmac.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * Gigabit Ethernet.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff200 {
17 macb0 {
18 pinctrl_macb0_data_rgmii: macb0_data_rgmii {
19 atmel,pins =
20 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A GTX0, conflicts with PWMH0 */
21 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A GTX1, conflicts with PWML0 */
22 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A GTX2, conflicts with TK1 */
23 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A GTX3, conflicts with TF1 */
24 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A GRX0, conflicts with PWMH1 */
25 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A GRX1, conflicts with PWML1 */
26 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A GRX2, conflicts with TD1 */
27 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB7 periph A GRX3, conflicts with RK1 */
28 };
29 pinctrl_macb0_data_gmii: macb0_data_gmii {
30 atmel,pins =
31 <AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB19 periph B GTX4, conflicts with MCI1_CDA */
32 AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB20 periph B GTX5, conflicts with MCI1_DA0 */
33 AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB21 periph B GTX6, conflicts with MCI1_DA1 */
34 AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB22 periph B GTX7, conflicts with MCI1_DA2 */
35 AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB23 periph B GRX4, conflicts with MCI1_DA3 */
36 AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB24 periph B GRX5, conflicts with MCI1_CK */
37 AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE /* PB25 periph B GRX6, conflicts with SCK1 */
38 AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB26 periph B GRX7, conflicts with CTS1 */
39 };
40 pinctrl_macb0_signal_rgmii: macb0_signal_rgmii {
41 atmel,pins =
42 <AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB8 periph A GTXCK, conflicts with PWMH2 */
43 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A GTXEN, conflicts with PWML2 */
44 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A GRXCK, conflicts with RD1 */
45 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A GRXER, conflicts with PWML3 */
46 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A GMDC */
47 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A GMDIO */
48 AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB18 periph A G125CK */
49 };
50 pinctrl_macb0_signal_gmii: macb0_signal_gmii {
51 atmel,pins =
52 <AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A GTXEN, conflicts with PWML2 */
53 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB10 periph A GTXER, conflicts with RF1 */
54 AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB11 periph A GRXCK, conflicts with RD1 */
55 AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB12 periph A GRXDV, conflicts with PWMH3 */
56 AT91_PIOB 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB13 periph A GRXER, conflicts with PWML3 */
57 AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB14 periph A GCRS, conflicts with CANRX1 */
58 AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB15 periph A GCOL, conflicts with CANTX1 */
59 AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB16 periph A GMDC */
60 AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB17 periph A GMDIO */
61 AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PB27 periph B G125CKO */
62 };
63
64 };
65 };
66
67 macb0: ethernet@f0028000 {
68 compatible = "cdns,pc302-gem", "cdns,gem";
69 reg = <0xf0028000 0x100>;
70 interrupts = <34 IRQ_TYPE_LEVEL_HIGH 3>;
71 pinctrl-names = "default";
72 pinctrl-0 = <&pinctrl_macb0_data_rgmii &pinctrl_macb0_signal_rgmii>;
73 status = "disabled";
74 };
75 };
76 };
77};
diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi
new file mode 100644
index 000000000000..01f52a79f8ba
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -0,0 +1,55 @@
1/*
2 * at91sama5d3_lcd.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * LCD support
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff200 {
17 lcd {
18 pinctrl_lcd: lcd-0 {
19 atmel,pins =
20 <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA24 periph A LCDPWM */
21 AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA26 periph A LCDVSYNC */
22 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA27 periph A LCDHSYNC */
23 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA25 periph A LCDDISP */
24 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA29 periph A LCDDEN */
25 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA28 periph A LCDPCK */
26 AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A LCDD0 pin */
27 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A LCDD1 pin */
28 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA2 periph A LCDD2 pin */
29 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA3 periph A LCDD3 pin */
30 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA4 periph A LCDD4 pin */
31 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA5 periph A LCDD5 pin */
32 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA6 periph A LCDD6 pin */
33 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA7 periph A LCDD7 pin */
34 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA8 periph A LCDD8 pin */
35 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A LCDD9 pin */
36 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA10 periph A LCDD10 pin */
37 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A LCDD11 pin */
38 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A LCDD12 pin */
39 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A LCDD13 pin */
40 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A LCDD14 pin */
41 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A LCDD15 pin */
42 AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC14 periph C LCDD16 pin */
43 AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC13 periph C LCDD17 pin */
44 AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC12 periph C LCDD18 pin */
45 AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC11 periph C LCDD19 pin */
46 AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC10 periph C LCDD20 pin */
47 AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC15 periph C LCDD21 pin */
48 AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE /* PE27 periph C LCDD22 pin */
49 AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PE28 periph C LCDD23 pin */
50 };
51 };
52 };
53 };
54 };
55};
diff --git a/arch/arm/boot/dts/sama5d3_mci2.dtsi b/arch/arm/boot/dts/sama5d3_mci2.dtsi
new file mode 100644
index 000000000000..38e88e39e551
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_mci2.dtsi
@@ -0,0 +1,47 @@
1/*
2 * at91sama5d3_mci2.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * 3 MMC ports
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff200 {
17 mmc2 {
18 pinctrl_mmc2_clk_cmd_dat0: mmc2_clk_cmd_dat0 {
19 atmel,pins =
20 <AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC15 periph A MCI2_CK, conflicts with PCK2 */
21 AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PC10 periph A MCI2_CDA with pullup */
22 AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC11 periph A MCI2_DA0 with pullup */
23 };
24 pinctrl_mmc2_dat1_3: mmc2_dat1_3 {
25 atmel,pins =
26 <AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC12 periph A MCI2_DA1 with pullup, conflicts with TIOA1 */
27 AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC13 periph A MCI2_DA2 with pullup, conflicts with TIOB1 */
28 AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PC14 periph A MCI2_DA3 with pullup, conflicts with TCLK1 */
29 };
30 };
31 };
32
33 mmc2: mmc@f8004000 {
34 compatible = "atmel,hsmci";
35 reg = <0xf8004000 0x600>;
36 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
37 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(1)>;
38 dma-names = "rxtx";
39 pinctrl-names = "default";
40 pinctrl-0 = <&pinctrl_mmc2_clk_cmd_dat0 &pinctrl_mmc2_dat1_3>;
41 status = "disabled";
42 #address-cells = <1>;
43 #size-cells = <0>;
44 };
45 };
46 };
47};
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
new file mode 100644
index 000000000000..5264bb4a6998
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
@@ -0,0 +1,27 @@
1/*
2 * at91sama5d3_tcb1.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * 2 TC blocks.
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 aliases {
15 tcb1 = &tcb1;
16 };
17
18 ahb {
19 apb {
20 tcb1: timer@f8014000 {
21 compatible = "atmel,at91sam9x5-tcb";
22 reg = <0xf8014000 0x100>;
23 interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
24 };
25 };
26 };
27};
diff --git a/arch/arm/boot/dts/sama5d3_uart.dtsi b/arch/arm/boot/dts/sama5d3_uart.dtsi
new file mode 100644
index 000000000000..98fcb2d57446
--- /dev/null
+++ b/arch/arm/boot/dts/sama5d3_uart.dtsi
@@ -0,0 +1,53 @@
1/*
2 * at91sama5d3_uart.dtsi - Device Tree Include file for AT91SAM9x5 SoC with
3 * UART support
4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
6 *
7 * Licensed under GPLv2.
8 */
9
10#include <dt-bindings/pinctrl/at91.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14 ahb {
15 apb {
16 pinctrl@fffff200 {
17 uart0 {
18 pinctrl_uart0: uart0-0 {
19 atmel,pins =
20 <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PC29 periph A, conflicts with PWMFI2, ISI_D8 */
21 AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* PC30 periph A with pullup, conflicts with ISI_PCK */
22 };
23 };
24
25 uart1 {
26 pinctrl_uart1: uart1-0 {
27 atmel,pins =
28 <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* PA30 periph B, conflicts with TWD0, ISI_VSYNC */
29 AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* PA31 periph B with pullup, conflicts with TWCK0, ISI_HSYNC */
30 };
31 };
32 };
33
34 uart0: serial@f0024000 {
35 compatible = "atmel,at91sam9260-usart";
36 reg = <0xf0024000 0x200>;
37 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
38 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_uart0>;
40 status = "disabled";
41 };
42
43 uart1: serial@f8028000 {
44 compatible = "atmel,at91sam9260-usart";
45 reg = <0xf8028000 0x200>;
46 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
47 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_uart1>;
49 status = "disabled";
50 };
51 };
52 };
53};
diff --git a/arch/arm/boot/dts/sama5d3xcm.dtsi b/arch/arm/boot/dts/sama5d3xcm.dtsi
index 31ed9e3bb649..726a0f35100c 100644
--- a/arch/arm/boot/dts/sama5d3xcm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm.dtsi
@@ -6,7 +6,6 @@
6 * 6 *
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9#include "sama5d3.dtsi"
10 9
11/ { 10/ {
12 compatible = "atmel,samad3xcm", "atmel,sama5d3", "atmel,sama5"; 11 compatible = "atmel,samad3xcm", "atmel,sama5d3", "atmel,sama5";
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
index 9169d3025f39..79425e3836ce 100644
--- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
+++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
@@ -653,6 +653,7 @@
653 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; 653 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
654 clocks = <&hclksmc>; 654 clocks = <&hclksmc>;
655 status = "okay"; 655 status = "okay";
656 timings = /bits/ 8 <0 0 0 0x10 0x0a 0>;
656 657
657 partition@0 { 658 partition@0 {
658 label = "X-Loader(NAND)"; 659 label = "X-Loader(NAND)";
@@ -707,8 +708,14 @@
707 pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>; 708 pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>;
708 709
709 stw4811@2d { 710 stw4811@2d {
710 compatible = "st,stw4811"; 711 compatible = "st,stw4811";
711 reg = <0x2d>; 712 reg = <0x2d>;
713 vmmc_regulator: vmmc {
714 compatible = "st,stw481x-vmmc";
715 regulator-name = "VMMC";
716 regulator-min-microvolt = <1800000>;
717 regulator-max-microvolt = <3300000>;
718 };
712 }; 719 };
713 }; 720 };
714 721
@@ -839,6 +846,7 @@
839 cd-inverted; 846 cd-inverted;
840 pinctrl-names = "default"; 847 pinctrl-names = "default";
841 pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; 848 pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
849 vmmc-supply = <&vmmc_regulator>;
842 }; 850 };
843 }; 851 };
844}; 852};
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index 8c60f473e976..eaa9cf4705a7 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -6,7 +6,6 @@ obj-y += firmware.o
6 6
7obj-$(CONFIG_ICST) += icst.o 7obj-$(CONFIG_ICST) += icst.o
8obj-$(CONFIG_SA1111) += sa1111.o 8obj-$(CONFIG_SA1111) += sa1111.o
9obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
10obj-$(CONFIG_DMABOUNCE) += dmabounce.o 9obj-$(CONFIG_DMABOUNCE) += dmabounce.o
11obj-$(CONFIG_SHARP_LOCOMO) += locomo.o 10obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
12obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o 11obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c
deleted file mode 100644
index 6cb362e56d29..000000000000
--- a/arch/arm/common/via82c505.c
+++ /dev/null
@@ -1,83 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/pci.h>
3#include <linux/interrupt.h>
4#include <linux/mm.h>
5#include <linux/init.h>
6#include <linux/ioport.h>
7#include <linux/io.h>
8
9
10#include <asm/mach/pci.h>
11
12#define MAX_SLOTS 7
13
14#define CONFIG_CMD(bus, devfn, where) (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
15
16static int
17via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where,
18 int size, u32 *value)
19{
20 outl(CONFIG_CMD(bus,devfn,where),0xCF8);
21 switch (size) {
22 case 1:
23 *value=inb(0xCFC + (where&3));
24 break;
25 case 2:
26 *value=inw(0xCFC + (where&2));
27 break;
28 case 4:
29 *value=inl(0xCFC);
30 break;
31 }
32 return PCIBIOS_SUCCESSFUL;
33}
34
35static int
36via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where,
37 int size, u32 value)
38{
39 outl(CONFIG_CMD(bus,devfn,where),0xCF8);
40 switch (size) {
41 case 1:
42 outb(value, 0xCFC + (where&3));
43 break;
44 case 2:
45 outw(value, 0xCFC + (where&2));
46 break;
47 case 4:
48 outl(value, 0xCFC);
49 break;
50 }
51 return PCIBIOS_SUCCESSFUL;
52}
53
54struct pci_ops via82c505_ops = {
55 .read = via82c505_read_config,
56 .write = via82c505_write_config,
57};
58
59void __init via82c505_preinit(void)
60{
61 printk(KERN_DEBUG "PCI: VIA 82c505\n");
62 if (!request_region(0xA8,2,"via config")) {
63 printk(KERN_WARNING"VIA 82c505: Unable to request region 0xA8\n");
64 return;
65 }
66 if (!request_region(0xCF8,8,"pci config")) {
67 printk(KERN_WARNING"VIA 82c505: Unable to request region 0xCF8\n");
68 release_region(0xA8, 2);
69 return;
70 }
71
72 /* Enable compatible Mode */
73 outb(0x96,0xA8);
74 outb(0x18,0xA9);
75 outb(0x93,0xA8);
76 outb(0xd0,0xA9);
77
78}
79
80int __init via82c505_setup(int nr, struct pci_sys_data *sys)
81{
82 return (nr == 0);
83}
diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig
deleted file mode 100644
index e319b2c56f11..000000000000
--- a/arch/arm/configs/shark_defconfig
+++ /dev/null
@@ -1,80 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_LOCALVERSION_AUTO is not set
3CONFIG_SYSVIPC=y
4CONFIG_LOG_BUF_SHIFT=14
5CONFIG_SYSFS_DEPRECATED_V2=y
6CONFIG_SLAB=y
7CONFIG_MODULES=y
8CONFIG_MODULE_UNLOAD=y
9CONFIG_MODULE_FORCE_UNLOAD=y
10# CONFIG_BLK_DEV_BSG is not set
11CONFIG_ARCH_SHARK=y
12CONFIG_LEDS=y
13CONFIG_LEDS_TIMER=y
14CONFIG_ZBOOT_ROM_TEXT=0x0
15CONFIG_ZBOOT_ROM_BSS=0x0
16CONFIG_FPE_NWFPE=y
17CONFIG_NET=y
18CONFIG_PACKET=y
19CONFIG_UNIX=y
20CONFIG_INET=y
21# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
22# CONFIG_INET_XFRM_MODE_TUNNEL is not set
23# CONFIG_INET_XFRM_MODE_BEET is not set
24# CONFIG_INET_LRO is not set
25# CONFIG_INET_DIAG is not set
26# CONFIG_IPV6 is not set
27CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
28# CONFIG_STANDALONE is not set
29# CONFIG_FIRMWARE_IN_KERNEL is not set
30CONFIG_PARPORT=m
31CONFIG_PARPORT_PC=m
32CONFIG_BLK_DEV_LOOP=y
33CONFIG_BLK_DEV_RAM=y
34CONFIG_IDE=y
35CONFIG_BLK_DEV_IDECD=m
36CONFIG_SCSI=m
37CONFIG_BLK_DEV_SD=m
38CONFIG_CHR_DEV_ST=m
39CONFIG_BLK_DEV_SR=m
40CONFIG_CHR_DEV_SG=m
41CONFIG_NETDEVICES=y
42CONFIG_NET_ETHERNET=y
43CONFIG_NET_PCI=y
44CONFIG_CS89x0=y
45# CONFIG_SERIO_SERPORT is not set
46CONFIG_SERIAL_8250=y
47CONFIG_SERIAL_8250_CONSOLE=y
48CONFIG_PRINTER=m
49# CONFIG_HWMON is not set
50CONFIG_FB=y
51CONFIG_FB_CYBER2000=y
52# CONFIG_VGA_CONSOLE is not set
53CONFIG_FRAMEBUFFER_CONSOLE=y
54CONFIG_LOGO=y
55# CONFIG_LOGO_LINUX_MONO is not set
56# CONFIG_LOGO_LINUX_VGA16 is not set
57CONFIG_SOUND=m
58CONFIG_SOUND_PRIME=m
59CONFIG_SOUND_OSS=m
60CONFIG_SOUND_SB=m
61CONFIG_RTC_CLASS=y
62CONFIG_RTC_DRV_CMOS=y
63CONFIG_EXT2_FS=y
64CONFIG_EXT3_FS=y
65CONFIG_ISO9660_FS=m
66CONFIG_JOLIET=y
67CONFIG_MSDOS_FS=m
68CONFIG_VFAT_FS=m
69CONFIG_NFS_FS=y
70CONFIG_NFS_V3=y
71CONFIG_NFSD=m
72CONFIG_PARTITION_ADVANCED=y
73CONFIG_NLS_CODEPAGE_437=m
74CONFIG_NLS_CODEPAGE_850=m
75CONFIG_NLS_ISO8859_1=m
76# CONFIG_ENABLE_MUST_CHECK is not set
77CONFIG_DEBUG_KERNEL=y
78# CONFIG_SCHED_DEBUG is not set
79# CONFIG_RCU_CPU_STALL_DETECTOR is not set
80CONFIG_DEBUG_USER=y
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index 454d642a4070..7fc42784becb 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -106,8 +106,4 @@ extern int dc21285_setup(int nr, struct pci_sys_data *);
106extern void dc21285_preinit(void); 106extern void dc21285_preinit(void);
107extern void dc21285_postinit(void); 107extern void dc21285_postinit(void);
108 108
109extern struct pci_ops via82c505_ops;
110extern int via82c505_setup(int nr, struct pci_sys_data *);
111extern void via82c505_init(void *sysdata);
112
113#endif /* __ASM_MACH_PCI_H */ 109#endif /* __ASM_MACH_PCI_H */
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h
deleted file mode 100644
index 2389b71a8e7c..000000000000
--- a/arch/arm/include/asm/sched_clock.h
+++ /dev/null
@@ -1,4 +0,0 @@
1/* You shouldn't include this file. Use linux/sched_clock.h instead.
2 * Temporary file until all asm/sched_clock.h users are gone
3 */
4#include <linux/sched_clock.h>
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 98aee3258398..829a96d4a179 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -11,25 +11,26 @@
11 * This file contains the ARM-specific time handling details: 11 * This file contains the ARM-specific time handling details:
12 * reading the RTC at bootup, etc... 12 * reading the RTC at bootup, etc...
13 */ 13 */
14#include <linux/clk-provider.h>
15#include <linux/clocksource.h>
16#include <linux/errno.h>
14#include <linux/export.h> 17#include <linux/export.h>
15#include <linux/kernel.h>
16#include <linux/interrupt.h>
17#include <linux/time.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/interrupt.h>
20#include <linux/irq.h>
21#include <linux/kernel.h>
22#include <linux/profile.h>
19#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/sched_clock.h>
20#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/time.h>
21#include <linux/timex.h> 27#include <linux/timex.h>
22#include <linux/errno.h>
23#include <linux/profile.h>
24#include <linux/timer.h> 28#include <linux/timer.h>
25#include <linux/clocksource.h>
26#include <linux/irq.h>
27#include <linux/sched_clock.h>
28 29
29#include <asm/thread_info.h>
30#include <asm/stacktrace.h>
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32#include <asm/mach/time.h> 31#include <asm/mach/time.h>
32#include <asm/stacktrace.h>
33#include <asm/thread_info.h>
33 34
34#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ 35#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
35 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) 36 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
@@ -116,8 +117,12 @@ int __init register_persistent_clock(clock_access_fn read_boot,
116 117
117void __init time_init(void) 118void __init time_init(void)
118{ 119{
119 if (machine_desc->init_time) 120 if (machine_desc->init_time) {
120 machine_desc->init_time(); 121 machine_desc->init_time();
121 else 122 } else {
123#ifdef CONFIG_COMMON_CLK
124 of_clk_init(NULL);
125#endif
122 clocksource_of_init(); 126 clocksource_of_init();
127 }
123} 128}
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index bd454b09133e..47d7338561de 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -41,7 +41,6 @@ else
41endif 41endif
42 42
43lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o 43lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o
44lib-$(CONFIG_ARCH_SHARK) += io-shark.o
45 44
46$(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S 45$(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S
47$(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S 46$(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
diff --git a/arch/arm/lib/io-shark.c b/arch/arm/lib/io-shark.c
deleted file mode 100644
index 824253948f51..000000000000
--- a/arch/arm/lib/io-shark.c
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * linux/arch/arm/lib/io-shark.c
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * linux/arch/arm/lib/io-ebsa.S
8 * Copyright (C) 1995, 1996 Russell King
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 */
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index ade948b82662..112e867c4abe 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -112,7 +112,7 @@ static struct spi_board_info cam60_spi_devices[] __initdata = {
112/* 112/*
113 * MACB Ethernet device 113 * MACB Ethernet device
114 */ 114 */
115static struct __initdata macb_platform_data cam60_macb_data = { 115static struct macb_platform_data cam60_macb_data __initdata = {
116 .phy_irq_pin = AT91_PIN_PB5, 116 .phy_irq_pin = AT91_PIN_PB5,
117 .is_rmii = 0, 117 .is_rmii = 0,
118}; 118};
diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
index 3fcb6623a33e..3a185faee795 100644
--- a/arch/arm/mach-at91/board-dt-rm9200.c
+++ b/arch/arm/mach-at91/board-dt-rm9200.c
@@ -14,7 +14,6 @@
14#include <linux/gpio.h> 14#include <linux/gpio.h>
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_irq.h> 16#include <linux/of_irq.h>
17#include <linux/of_platform.h>
18 17
19#include <asm/setup.h> 18#include <asm/setup.h>
20#include <asm/irq.h> 19#include <asm/irq.h>
@@ -36,11 +35,6 @@ static void __init at91rm9200_dt_init_irq(void)
36 of_irq_init(irq_of_match); 35 of_irq_init(irq_of_match);
37} 36}
38 37
39static void __init at91rm9200_dt_device_init(void)
40{
41 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
42}
43
44static const char *at91rm9200_dt_board_compat[] __initdata = { 38static const char *at91rm9200_dt_board_compat[] __initdata = {
45 "atmel,at91rm9200", 39 "atmel,at91rm9200",
46 NULL 40 NULL
@@ -52,6 +46,5 @@ DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
52 .handle_irq = at91_aic_handle_irq, 46 .handle_irq = at91_aic_handle_irq,
53 .init_early = at91rm9200_dt_initialize, 47 .init_early = at91rm9200_dt_initialize,
54 .init_irq = at91rm9200_dt_init_irq, 48 .init_irq = at91rm9200_dt_init_irq,
55 .init_machine = at91rm9200_dt_device_init,
56 .dt_compat = at91rm9200_dt_board_compat, 49 .dt_compat = at91rm9200_dt_board_compat,
57MACHINE_END 50MACHINE_END
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index 8db30132abed..3dab868b02fa 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -13,7 +13,6 @@
13#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/of_irq.h> 15#include <linux/of_irq.h>
16#include <linux/of_platform.h>
17 16
18#include <asm/setup.h> 17#include <asm/setup.h>
19#include <asm/irq.h> 18#include <asm/irq.h>
@@ -37,11 +36,6 @@ static void __init at91_dt_init_irq(void)
37 of_irq_init(irq_of_match); 36 of_irq_init(irq_of_match);
38} 37}
39 38
40static void __init at91_dt_device_init(void)
41{
42 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
43}
44
45static const char *at91_dt_board_compat[] __initdata = { 39static const char *at91_dt_board_compat[] __initdata = {
46 "atmel,at91sam9", 40 "atmel,at91sam9",
47 NULL 41 NULL
@@ -54,6 +48,5 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
54 .handle_irq = at91_aic_handle_irq, 48 .handle_irq = at91_aic_handle_irq,
55 .init_early = at91_dt_initialize, 49 .init_early = at91_dt_initialize,
56 .init_irq = at91_dt_init_irq, 50 .init_irq = at91_dt_init_irq,
57 .init_machine = at91_dt_device_init,
58 .dt_compat = at91_dt_board_compat, 51 .dt_compat = at91_dt_board_compat,
59MACHINE_END 52MACHINE_END
diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c
index 8d9f931164bb..26b2390492b8 100644
--- a/arch/arm/mach-bcm/board_bcm281xx.c
+++ b/arch/arm/mach-bcm/board_bcm281xx.c
@@ -68,7 +68,6 @@ static void __init board_init(void)
68static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; 68static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, };
69 69
70DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") 70DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
71 .init_time = clocksource_of_init,
72 .init_machine = board_init, 71 .init_machine = board_init,
73 .restart = bcm_kona_restart, 72 .restart = bcm_kona_restart,
74 .dt_compat = bcm11351_dt_compat, 73 .dt_compat = bcm11351_dt_compat,
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index 40686d7ef500..d50135be0c20 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -18,7 +18,6 @@
18#include <linux/of_address.h> 18#include <linux/of_address.h>
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <linux/clk/bcm2835.h> 20#include <linux/clk/bcm2835.h>
21#include <linux/clocksource.h>
22 21
23#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 23#include <asm/mach/map.h>
@@ -134,7 +133,6 @@ DT_MACHINE_START(BCM2835, "BCM2835")
134 .init_irq = bcm2835_init_irq, 133 .init_irq = bcm2835_init_irq,
135 .handle_irq = bcm2835_handle_irq, 134 .handle_irq = bcm2835_handle_irq,
136 .init_machine = bcm2835_init, 135 .init_machine = bcm2835_init,
137 .init_time = clocksource_of_init,
138 .restart = bcm2835_restart, 136 .restart = bcm2835_restart,
139 .dt_compat = bcm2835_compat 137 .dt_compat = bcm2835_compat
140MACHINE_END 138MACHINE_END
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index 4ca2f3ca2de4..134641d688bb 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -29,12 +29,12 @@
29#include <linux/clockchips.h> 29#include <linux/clockchips.h>
30#include <linux/clocksource.h> 30#include <linux/clocksource.h>
31#include <linux/clk-provider.h> 31#include <linux/clk-provider.h>
32#include <linux/sched_clock.h>
32 33
33#include <asm/exception.h> 34#include <asm/exception.h>
34#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
35#include <asm/mach/map.h> 36#include <asm/mach/map.h>
36#include <asm/mach/time.h> 37#include <asm/mach/time.h>
37#include <asm/sched_clock.h>
38#include <asm/system_misc.h> 38#include <asm/system_misc.h>
39 39
40#include <mach/hardware.h> 40#include <mach/hardware.h>
diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c
index 49f72a848423..ddb86631f16a 100644
--- a/arch/arm/mach-dove/board-dt.c
+++ b/arch/arm/mach-dove/board-dt.c
@@ -10,17 +10,13 @@
10 10
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/clk-provider.h> 12#include <linux/clk-provider.h>
13#include <linux/clocksource.h>
14#include <linux/irqchip.h>
15#include <linux/of.h> 13#include <linux/of.h>
16#include <linux/of_platform.h> 14#include <linux/of_platform.h>
17#include <linux/platform_data/usb-ehci-orion.h>
18#include <asm/hardware/cache-tauros2.h> 15#include <asm/hardware/cache-tauros2.h>
19#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
20#include <mach/dove.h> 17#include <mach/dove.h>
21#include <mach/pm.h> 18#include <mach/pm.h>
22#include <plat/common.h> 19#include <plat/common.h>
23#include <plat/irq.h>
24#include "common.h" 20#include "common.h"
25 21
26/* 22/*
@@ -45,12 +41,6 @@ static void __init dove_legacy_clk_init(void)
45 of_clk_get_from_provider(&clkspec)); 41 of_clk_get_from_provider(&clkspec));
46} 42}
47 43
48static void __init dove_dt_time_init(void)
49{
50 of_clk_init(NULL);
51 clocksource_of_init();
52}
53
54static void __init dove_dt_init_early(void) 44static void __init dove_dt_init_early(void)
55{ 45{
56 mvebu_mbus_init("marvell,dove-mbus", 46 mvebu_mbus_init("marvell,dove-mbus",
@@ -84,7 +74,6 @@ static const char * const dove_dt_board_compat[] = {
84DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") 74DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
85 .map_io = dove_map_io, 75 .map_io = dove_map_io,
86 .init_early = dove_dt_init_early, 76 .init_early = dove_dt_init_early,
87 .init_time = dove_dt_time_init,
88 .init_machine = dove_dt_init, 77 .init_machine = dove_dt_init,
89 .restart = dove_restart, 78 .restart = dove_restart,
90 .dt_compat = dove_dt_board_compat, 79 .dt_compat = dove_dt_board_compat,
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 56fe819ee10b..f9d67a0acb2a 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -14,19 +14,28 @@ menu "SAMSUNG EXYNOS SoCs Support"
14config ARCH_EXYNOS4 14config ARCH_EXYNOS4
15 bool "SAMSUNG EXYNOS4" 15 bool "SAMSUNG EXYNOS4"
16 default y 16 default y
17 select ARM_AMBA
18 select CLKSRC_OF
19 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
20 select CPU_EXYNOS4210
17 select GIC_NON_BANKED 21 select GIC_NON_BANKED
22 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
18 select HAVE_ARM_SCU if SMP 23 select HAVE_ARM_SCU if SMP
19 select HAVE_SMP 24 select HAVE_SMP
20 select MIGHT_HAVE_CACHE_L2X0 25 select MIGHT_HAVE_CACHE_L2X0
21 select PINCTRL 26 select PINCTRL
27 select S5P_DEV_MFC
22 help 28 help
23 Samsung EXYNOS4 SoCs based systems 29 Samsung EXYNOS4 SoCs based systems
24 30
25config ARCH_EXYNOS5 31config ARCH_EXYNOS5
26 bool "SAMSUNG EXYNOS5" 32 bool "SAMSUNG EXYNOS5"
33 select ARM_AMBA
34 select CLKSRC_OF
27 select HAVE_ARM_SCU if SMP 35 select HAVE_ARM_SCU if SMP
28 select HAVE_SMP 36 select HAVE_SMP
29 select PINCTRL 37 select PINCTRL
38 select USB_ARCH_HAS_XHCI
30 help 39 help
31 Samsung EXYNOS5 (Cortex-A15) SoC based systems 40 Samsung EXYNOS5 (Cortex-A15) SoC based systems
32 41
@@ -110,35 +119,6 @@ config SOC_EXYNOS5440
110 help 119 help
111 Enable EXYNOS5440 SoC support 120 Enable EXYNOS5440 SoC support
112 121
113comment "Flattened Device Tree based board for EXYNOS SoCs"
114
115config MACH_EXYNOS4_DT
116 bool "Samsung Exynos4 Machine using device tree"
117 default y
118 depends on ARCH_EXYNOS4
119 select ARM_AMBA
120 select CLKSRC_OF
121 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
122 select CPU_EXYNOS4210
123 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
124 select S5P_DEV_MFC
125 help
126 Machine support for Samsung Exynos4 machine with device tree enabled.
127 Select this if a fdt blob is available for the Exynos4 SoC based board.
128 Note: This is under development and not all peripherals can be supported
129 with this machine file.
130
131config MACH_EXYNOS5_DT
132 bool "SAMSUNG EXYNOS5 Machine using device tree"
133 default y
134 depends on ARCH_EXYNOS5
135 select ARM_AMBA
136 select CLKSRC_OF
137 select USB_ARCH_HAS_XHCI
138 help
139 Machine support for Samsung EXYNOS5 machine with device tree enabled.
140 Select this if a fdt blob is available for the EXYNOS5 SoC based board.
141
142endmenu 122endmenu
143 123
144endif 124endif
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 53696154aead..8930b66b4abd 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -32,5 +32,5 @@ AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec)
32 32
33# machine support 33# machine support
34 34
35obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o 35obj-$(CONFIG_ARCH_EXYNOS4) += mach-exynos4-dt.o
36obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o 36obj-$(CONFIG_ARCH_EXYNOS5) += mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index ba95e5db2501..a4e7ba828810 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -26,8 +26,6 @@
26#include <linux/export.h> 26#include <linux/export.h>
27#include <linux/irqdomain.h> 27#include <linux/irqdomain.h>
28#include <linux/of_address.h> 28#include <linux/of_address.h>
29#include <linux/clocksource.h>
30#include <linux/clk-provider.h>
31#include <linux/irqchip/arm-gic.h> 29#include <linux/irqchip/arm-gic.h>
32#include <linux/irqchip/chained_irq.h> 30#include <linux/irqchip/chained_irq.h>
33 31
@@ -367,12 +365,6 @@ static void __init exynos5_map_io(void)
367 iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); 365 iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
368} 366}
369 367
370void __init exynos_init_time(void)
371{
372 of_clk_init(NULL);
373 clocksource_of_init();
374}
375
376struct bus_type exynos_subsys = { 368struct bus_type exynos_subsys = {
377 .name = "exynos-core", 369 .name = "exynos-core",
378 .dev_name = "exynos-core", 370 .dev_name = "exynos-core",
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 8646a141ae46..f0fa2050d08d 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -16,7 +16,6 @@
16#include <linux/of.h> 16#include <linux/of.h>
17 17
18void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); 18void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
19void exynos_init_time(void);
20 19
21struct map_desc; 20struct map_desc;
22void exynos_init_io(void); 21void exynos_init_io(void);
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 0099c6c13bba..4b8f6e2ca163 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -11,12 +11,8 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#include <linux/kernel.h>
15#include <linux/of_platform.h> 14#include <linux/of_platform.h>
16#include <linux/of_fdt.h> 15#include <linux/of_fdt.h>
17#include <linux/serial_core.h>
18#include <linux/memblock.h>
19#include <linux/clocksource.h>
20 16
21#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
22#include <plat/mfc.h> 18#include <plat/mfc.h>
@@ -54,7 +50,6 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
54 .init_early = exynos_firmware_init, 50 .init_early = exynos_firmware_init,
55 .init_machine = exynos4_dt_machine_init, 51 .init_machine = exynos4_dt_machine_init,
56 .init_late = exynos_init_late, 52 .init_late = exynos_init_late,
57 .init_time = exynos_init_time,
58 .dt_compat = exynos4_dt_compat, 53 .dt_compat = exynos4_dt_compat,
59 .restart = exynos4_restart, 54 .restart = exynos4_restart,
60 .reserve = exynos4_reserve, 55 .reserve = exynos4_reserve,
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index f874b773ca13..7976ab333192 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -11,14 +11,10 @@
11 11
12#include <linux/of_platform.h> 12#include <linux/of_platform.h>
13#include <linux/of_fdt.h> 13#include <linux/of_fdt.h>
14#include <linux/memblock.h>
15#include <linux/io.h> 14#include <linux/io.h>
16#include <linux/clocksource.h>
17 15
18#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
19#include <mach/regs-pmu.h> 17#include <mach/regs-pmu.h>
20
21#include <plat/cpu.h>
22#include <plat/mfc.h> 18#include <plat/mfc.h>
23 19
24#include "common.h" 20#include "common.h"
@@ -76,7 +72,6 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
76 .map_io = exynos_init_io, 72 .map_io = exynos_init_io,
77 .init_machine = exynos5_dt_machine_init, 73 .init_machine = exynos5_dt_machine_init,
78 .init_late = exynos_init_late, 74 .init_late = exynos_init_late,
79 .init_time = exynos_init_time,
80 .dt_compat = exynos5_dt_compat, 75 .dt_compat = exynos5_dt_compat,
81 .restart = exynos5_restart, 76 .restart = exynos5_restart,
82 .reserve = exynos5_reserve, 77 .reserve = exynos5_reserve,
diff --git a/arch/arm/mach-gemini/time.c b/arch/arm/mach-gemini/time.c
index 21dc5a89d1c4..0a63c4d25b64 100644
--- a/arch/arm/mach-gemini/time.c
+++ b/arch/arm/mach-gemini/time.c
@@ -13,6 +13,8 @@
13#include <mach/hardware.h> 13#include <mach/hardware.h>
14#include <mach/global_reg.h> 14#include <mach/global_reg.h>
15#include <asm/mach/time.h> 15#include <asm/mach/time.h>
16#include <linux/clockchips.h>
17#include <linux/clocksource.h>
16 18
17/* 19/*
18 * Register definitions for the timers 20 * Register definitions for the timers
@@ -33,19 +35,89 @@
33#define TIMER_3_CR_CLOCK (1 << 7) 35#define TIMER_3_CR_CLOCK (1 << 7)
34#define TIMER_3_CR_INT (1 << 8) 36#define TIMER_3_CR_INT (1 << 8)
35 37
38static unsigned int tick_rate;
39
40static int gemini_timer_set_next_event(unsigned long cycles,
41 struct clock_event_device *evt)
42{
43 u32 cr;
44
45 cr = readl(TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
46
47 /* This may be overdoing it, feel free to test without this */
48 cr &= ~TIMER_2_CR_ENABLE;
49 cr &= ~TIMER_2_CR_INT;
50 writel(cr, TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
51
52 /* Set next event */
53 writel(cycles, TIMER_COUNT(IO_ADDRESS(GEMINI_TIMER2_BASE)));
54 writel(cycles, TIMER_LOAD(IO_ADDRESS(GEMINI_TIMER2_BASE)));
55 cr |= TIMER_2_CR_ENABLE;
56 cr |= TIMER_2_CR_INT;
57 writel(cr, TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
58
59 return 0;
60}
61
62static void gemini_timer_set_mode(enum clock_event_mode mode,
63 struct clock_event_device *evt)
64{
65 u32 period = DIV_ROUND_CLOSEST(tick_rate, HZ);
66 u32 cr;
67
68 switch (mode) {
69 case CLOCK_EVT_MODE_PERIODIC:
70 /* Start the timer */
71 writel(period,
72 TIMER_COUNT(IO_ADDRESS(GEMINI_TIMER2_BASE)));
73 writel(period,
74 TIMER_LOAD(IO_ADDRESS(GEMINI_TIMER2_BASE)));
75 cr = readl(TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
76 cr |= TIMER_2_CR_ENABLE;
77 cr |= TIMER_2_CR_INT;
78 writel(cr, TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
79 break;
80 case CLOCK_EVT_MODE_ONESHOT:
81 case CLOCK_EVT_MODE_UNUSED:
82 case CLOCK_EVT_MODE_SHUTDOWN:
83 case CLOCK_EVT_MODE_RESUME:
84 /*
85 * Disable also for oneshot: the set_next() call will
86 * arm the timer instead.
87 */
88 cr = readl(TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
89 cr &= ~TIMER_2_CR_ENABLE;
90 cr &= ~TIMER_2_CR_INT;
91 writel(cr, TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
92 break;
93 default:
94 break;
95 }
96}
97
98/* Use TIMER2 as clock event */
99static struct clock_event_device gemini_clockevent = {
100 .name = "TIMER2",
101 .rating = 300, /* Reasonably fast and accurate clock event */
102 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
103 .set_next_event = gemini_timer_set_next_event,
104 .set_mode = gemini_timer_set_mode,
105};
106
36/* 107/*
37 * IRQ handler for the timer 108 * IRQ handler for the timer
38 */ 109 */
39static irqreturn_t gemini_timer_interrupt(int irq, void *dev_id) 110static irqreturn_t gemini_timer_interrupt(int irq, void *dev_id)
40{ 111{
41 timer_tick(); 112 struct clock_event_device *evt = &gemini_clockevent;
42 113
114 evt->event_handler(evt);
43 return IRQ_HANDLED; 115 return IRQ_HANDLED;
44} 116}
45 117
46static struct irqaction gemini_timer_irq = { 118static struct irqaction gemini_timer_irq = {
47 .name = "Gemini Timer Tick", 119 .name = "Gemini Timer Tick",
48 .flags = IRQF_DISABLED | IRQF_TIMER, 120 .flags = IRQF_TIMER,
49 .handler = gemini_timer_interrupt, 121 .handler = gemini_timer_interrupt,
50}; 122};
51 123
@@ -54,9 +126,9 @@ static struct irqaction gemini_timer_irq = {
54 */ 126 */
55void __init gemini_timer_init(void) 127void __init gemini_timer_init(void)
56{ 128{
57 unsigned int tick_rate, reg_v; 129 u32 reg_v;
58 130
59 reg_v = __raw_readl(IO_ADDRESS(GEMINI_GLOBAL_BASE + GLOBAL_STATUS)); 131 reg_v = readl(IO_ADDRESS(GEMINI_GLOBAL_BASE + GLOBAL_STATUS));
60 tick_rate = REG_TO_AHB_SPEED(reg_v) * 1000000; 132 tick_rate = REG_TO_AHB_SPEED(reg_v) * 1000000;
61 133
62 printk(KERN_INFO "Bus: %dMHz", tick_rate / 1000000); 134 printk(KERN_INFO "Bus: %dMHz", tick_rate / 1000000);
@@ -82,8 +154,17 @@ void __init gemini_timer_init(void)
82 * Make irqs happen for the system timer 154 * Make irqs happen for the system timer
83 */ 155 */
84 setup_irq(IRQ_TIMER2, &gemini_timer_irq); 156 setup_irq(IRQ_TIMER2, &gemini_timer_irq);
85 /* Start the timer */ 157
86 __raw_writel(tick_rate / HZ, TIMER_COUNT(IO_ADDRESS(GEMINI_TIMER2_BASE))); 158 /* Enable and use TIMER1 as clock source */
87 __raw_writel(tick_rate / HZ, TIMER_LOAD(IO_ADDRESS(GEMINI_TIMER2_BASE))); 159 writel(0xffffffff, TIMER_COUNT(IO_ADDRESS(GEMINI_TIMER1_BASE)));
88 __raw_writel(TIMER_2_CR_ENABLE | TIMER_2_CR_INT, TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE))); 160 writel(0xffffffff, TIMER_LOAD(IO_ADDRESS(GEMINI_TIMER1_BASE)));
161 writel(TIMER_1_CR_ENABLE, TIMER_CR(IO_ADDRESS(GEMINI_TIMER_BASE)));
162 if (clocksource_mmio_init(TIMER_COUNT(IO_ADDRESS(GEMINI_TIMER1_BASE)),
163 "TIMER1", tick_rate, 300, 32,
164 clocksource_mmio_readl_up))
165 pr_err("timer: failed to initialize gemini clock source\n");
166
167 /* Configure and register the clockevent */
168 clockevents_config_and_register(&gemini_clockevent, tick_rate,
169 1, 0xffffffff);
89} 170}
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 8e8437dea3ce..616408d76be5 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -12,7 +12,6 @@ config ARCH_HIGHBANK
12 select ARM_GIC 12 select ARM_GIC
13 select ARM_TIMER_SP804 13 select ARM_TIMER_SP804
14 select CACHE_L2X0 14 select CACHE_L2X0
15 select CLKDEV_LOOKUP
16 select COMMON_CLK 15 select COMMON_CLK
17 select CPU_V7 16 select CPU_V7
18 select GENERIC_CLOCKEVENTS 17 select GENERIC_CLOCKEVENTS
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 8e63ccdb0de3..e6d6eacea9d0 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -24,7 +24,6 @@
24#include <linux/of_platform.h> 24#include <linux/of_platform.h>
25#include <linux/of_address.h> 25#include <linux/of_address.h>
26#include <linux/amba/bus.h> 26#include <linux/amba/bus.h>
27#include <linux/clk-provider.h>
28 27
29#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
30#include <asm/cputype.h> 29#include <asm/cputype.h>
@@ -83,20 +82,6 @@ static void __init highbank_init_irq(void)
83 } 82 }
84} 83}
85 84
86static void __init highbank_timer_init(void)
87{
88 struct device_node *np;
89
90 /* Map system registers */
91 np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
92 sregs_base = of_iomap(np, 0);
93 WARN_ON(!sregs_base);
94
95 of_clk_init(NULL);
96
97 clocksource_of_init();
98}
99
100static void highbank_power_off(void) 85static void highbank_power_off(void)
101{ 86{
102 highbank_set_pwr_shutdown(); 87 highbank_set_pwr_shutdown();
@@ -155,6 +140,13 @@ static struct notifier_block highbank_platform_nb = {
155 140
156static void __init highbank_init(void) 141static void __init highbank_init(void)
157{ 142{
143 struct device_node *np;
144
145 /* Map system registers */
146 np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
147 sregs_base = of_iomap(np, 0);
148 WARN_ON(!sregs_base);
149
158 pm_power_off = highbank_power_off; 150 pm_power_off = highbank_power_off;
159 highbank_pm_init(); 151 highbank_pm_init();
160 152
@@ -176,7 +168,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
176#endif 168#endif
177 .smp = smp_ops(highbank_smp_ops), 169 .smp = smp_ops(highbank_smp_ops),
178 .init_irq = highbank_init_irq, 170 .init_irq = highbank_init_irq,
179 .init_time = highbank_timer_init,
180 .init_machine = highbank_init, 171 .init_machine = highbank_init,
181 .dt_compat = highbank_match, 172 .dt_compat = highbank_match,
182 .restart = highbank_restart, 173 .restart = highbank_restart,
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 29a8af6922a8..a91909b95601 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -4,8 +4,8 @@ config ARCH_MXC
4 select ARM_CPU_SUSPEND if PM 4 select ARM_CPU_SUSPEND if PM
5 select ARM_PATCH_PHYS_VIRT 5 select ARM_PATCH_PHYS_VIRT
6 select AUTO_ZRELADDR if !ZBOOT_ROM 6 select AUTO_ZRELADDR if !ZBOOT_ROM
7 select CLKDEV_LOOKUP
8 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select COMMON_CLK
9 select GENERIC_ALLOCATOR 9 select GENERIC_ALLOCATOR
10 select GENERIC_CLOCKEVENTS 10 select GENERIC_CLOCKEVENTS
11 select GENERIC_IRQ_CHIP 11 select GENERIC_IRQ_CHIP
@@ -92,14 +92,12 @@ config MACH_MX27
92config SOC_IMX1 92config SOC_IMX1
93 bool 93 bool
94 select ARCH_MX1 94 select ARCH_MX1
95 select COMMON_CLK
96 select CPU_ARM920T 95 select CPU_ARM920T
97 select IMX_HAVE_IOMUX_V1 96 select IMX_HAVE_IOMUX_V1
98 select MXC_AVIC 97 select MXC_AVIC
99 98
100config SOC_IMX21 99config SOC_IMX21
101 bool 100 bool
102 select COMMON_CLK
103 select CPU_ARM926T 101 select CPU_ARM926T
104 select IMX_HAVE_IOMUX_V1 102 select IMX_HAVE_IOMUX_V1
105 select MXC_AVIC 103 select MXC_AVIC
@@ -108,7 +106,6 @@ config SOC_IMX25
108 bool 106 bool
109 select ARCH_MX25 107 select ARCH_MX25
110 select ARCH_MXC_IOMUX_V3 108 select ARCH_MXC_IOMUX_V3
111 select COMMON_CLK
112 select CPU_ARM926T 109 select CPU_ARM926T
113 select MXC_AVIC 110 select MXC_AVIC
114 111
@@ -116,7 +113,6 @@ config SOC_IMX27
116 bool 113 bool
117 select ARCH_HAS_CPUFREQ 114 select ARCH_HAS_CPUFREQ
118 select ARCH_HAS_OPP 115 select ARCH_HAS_OPP
119 select COMMON_CLK
120 select CPU_ARM926T 116 select CPU_ARM926T
121 select IMX_HAVE_IOMUX_V1 117 select IMX_HAVE_IOMUX_V1
122 select MACH_MX27 118 select MACH_MX27
@@ -124,7 +120,6 @@ config SOC_IMX27
124 120
125config SOC_IMX31 121config SOC_IMX31
126 bool 122 bool
127 select COMMON_CLK
128 select CPU_V6 123 select CPU_V6
129 select IMX_HAVE_PLATFORM_MXC_RNGA 124 select IMX_HAVE_PLATFORM_MXC_RNGA
130 select MXC_AVIC 125 select MXC_AVIC
@@ -133,7 +128,6 @@ config SOC_IMX31
133config SOC_IMX35 128config SOC_IMX35
134 bool 129 bool
135 select ARCH_MXC_IOMUX_V3 130 select ARCH_MXC_IOMUX_V3
136 select COMMON_CLK
137 select CPU_V6K 131 select CPU_V6K
138 select HAVE_EPIT 132 select HAVE_EPIT
139 select MXC_AVIC 133 select MXC_AVIC
@@ -144,7 +138,6 @@ config SOC_IMX5
144 select ARCH_HAS_CPUFREQ 138 select ARCH_HAS_CPUFREQ
145 select ARCH_HAS_OPP 139 select ARCH_HAS_OPP
146 select ARCH_MXC_IOMUX_V3 140 select ARCH_MXC_IOMUX_V3
147 select COMMON_CLK
148 select CPU_V7 141 select CPU_V7
149 select MXC_TZIC 142 select MXC_TZIC
150 143
@@ -791,7 +784,6 @@ config SOC_IMX6Q
791 select ARM_ERRATA_764369 if SMP 784 select ARM_ERRATA_764369 if SMP
792 select ARM_ERRATA_775420 785 select ARM_ERRATA_775420
793 select ARM_GIC 786 select ARM_GIC
794 select COMMON_CLK
795 select CPU_V7 787 select CPU_V7
796 select HAVE_ARM_SCU if SMP 788 select HAVE_ARM_SCU if SMP
797 select HAVE_ARM_TWD if SMP 789 select HAVE_ARM_TWD if SMP
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index 7c0dc4540aa4..ceaac9cd7b42 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -11,6 +11,7 @@
11#include <linux/clk.h> 11#include <linux/clk.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <linux/clkdev.h> 13#include <linux/clkdev.h>
14#include <linux/clk-provider.h>
14#include <linux/of.h> 15#include <linux/of.h>
15#include <linux/err.h> 16#include <linux/err.h>
16 17
@@ -131,8 +132,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
131{ 132{
132 int i; 133 int i;
133 134
134 of_clk_init(NULL);
135
136 clk[dummy] = imx_clk_fixed("dummy", 0); 135 clk[dummy] = imx_clk_fixed("dummy", 0);
137 clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil); 136 clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil);
138 clk[osc] = imx_obtain_fixed_clock("osc", rate_osc); 137 clk[osc] = imx_obtain_fixed_clock("osc", rate_osc);
@@ -465,12 +464,16 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
465 return 0; 464 return 0;
466} 465}
467 466
468int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, 467static void __init mx51_clocks_init_dt(struct device_node *np)
469 unsigned long rate_ckih1, unsigned long rate_ckih2) 468{
469 mx51_clocks_init(0, 0, 0, 0);
470}
471CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt);
472
473static void __init mx53_clocks_init(struct device_node *np)
470{ 474{
471 int i; 475 int i;
472 unsigned long r; 476 unsigned long r;
473 struct device_node *np;
474 477
475 clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 478 clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
476 clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); 479 clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
@@ -529,12 +532,11 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
529 pr_err("i.MX53 clk %d: register failed with %ld\n", 532 pr_err("i.MX53 clk %d: register failed with %ld\n",
530 i, PTR_ERR(clk[i])); 533 i, PTR_ERR(clk[i]));
531 534
532 np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm");
533 clk_data.clks = clk; 535 clk_data.clks = clk;
534 clk_data.clk_num = ARRAY_SIZE(clk); 536 clk_data.clk_num = ARRAY_SIZE(clk);
535 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); 537 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
536 538
537 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); 539 mx5_clocks_common_init(0, 0, 0, 0);
538 540
539 clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); 541 clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0");
540 clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); 542 clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
@@ -566,16 +568,5 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
566 568
567 r = clk_round_rate(clk[usboh3_per_gate], 54000000); 569 r = clk_round_rate(clk[usboh3_per_gate], 54000000);
568 clk_set_rate(clk[usboh3_per_gate], r); 570 clk_set_rate(clk[usboh3_per_gate], r);
569
570 return 0;
571}
572
573int __init mx51_clocks_init_dt(void)
574{
575 return mx51_clocks_init(0, 0, 0, 0);
576}
577
578int __init mx53_clocks_init_dt(void)
579{
580 return mx53_clocks_init(0, 0, 0, 0);
581} 571}
572CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init);
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 4517fd760bfc..28e8ca0871e8 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -63,13 +63,9 @@ extern int mx31_clocks_init(unsigned long fref);
63extern int mx35_clocks_init(void); 63extern int mx35_clocks_init(void);
64extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, 64extern int mx51_clocks_init(unsigned long ckil, unsigned long osc,
65 unsigned long ckih1, unsigned long ckih2); 65 unsigned long ckih1, unsigned long ckih2);
66extern int mx53_clocks_init(unsigned long ckil, unsigned long osc,
67 unsigned long ckih1, unsigned long ckih2);
68extern int mx25_clocks_init_dt(void); 66extern int mx25_clocks_init_dt(void);
69extern int mx27_clocks_init_dt(void); 67extern int mx27_clocks_init_dt(void);
70extern int mx31_clocks_init_dt(void); 68extern int mx31_clocks_init_dt(void);
71extern int mx51_clocks_init_dt(void);
72extern int mx53_clocks_init_dt(void);
73extern struct platform_device *mxc_register_gpio(char *name, int id, 69extern struct platform_device *mxc_register_gpio(char *name, int id,
74 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); 70 resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
75extern void mxc_set_cpu_type(unsigned int type); 71extern void mxc_set_cpu_type(unsigned int type);
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index 53e43e579dd7..bece8a65e6f0 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -34,17 +34,11 @@ static const char *imx51_dt_board_compat[] __initdata = {
34 NULL 34 NULL
35}; 35};
36 36
37static void __init imx51_timer_init(void)
38{
39 mx51_clocks_init_dt();
40}
41
42DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") 37DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
43 .map_io = mx51_map_io, 38 .map_io = mx51_map_io,
44 .init_early = imx51_init_early, 39 .init_early = imx51_init_early,
45 .init_irq = mx51_init_irq, 40 .init_irq = mx51_init_irq,
46 .handle_irq = imx51_handle_irq, 41 .handle_irq = imx51_handle_irq,
47 .init_time = imx51_timer_init,
48 .init_machine = imx51_dt_init, 42 .init_machine = imx51_dt_init,
49 .init_late = imx51_init_late, 43 .init_late = imx51_init_late,
50 .dt_compat = imx51_dt_board_compat, 44 .dt_compat = imx51_dt_board_compat,
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 98c58944015a..c9c4d8d96931 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -36,17 +36,11 @@ static const char *imx53_dt_board_compat[] __initdata = {
36 NULL 36 NULL
37}; 37};
38 38
39static void __init imx53_timer_init(void)
40{
41 mx53_clocks_init_dt();
42}
43
44DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") 39DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
45 .map_io = mx53_map_io, 40 .map_io = mx53_map_io,
46 .init_early = imx53_init_early, 41 .init_early = imx53_init_early,
47 .init_irq = mx53_init_irq, 42 .init_irq = mx53_init_irq,
48 .handle_irq = imx53_handle_irq, 43 .handle_irq = imx53_handle_irq,
49 .init_time = imx53_timer_init,
50 .init_machine = imx53_dt_init, 44 .init_machine = imx53_dt_init,
51 .init_late = imx53_init_late, 45 .init_late = imx53_init_late,
52 .dt_compat = imx53_dt_board_compat, 46 .dt_compat = imx53_dt_board_compat,
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 90372a21087f..3be0fa0e9796 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -11,9 +11,7 @@
11 */ 11 */
12 12
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/clk-provider.h>
15#include <linux/clkdev.h> 14#include <linux/clkdev.h>
16#include <linux/clocksource.h>
17#include <linux/cpu.h> 15#include <linux/cpu.h>
18#include <linux/delay.h> 16#include <linux/delay.h>
19#include <linux/export.h> 17#include <linux/export.h>
@@ -192,6 +190,9 @@ static void __init imx6q_1588_init(void)
192 190
193static void __init imx6q_init_machine(void) 191static void __init imx6q_init_machine(void)
194{ 192{
193 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
194 imx6q_revision());
195
195 imx6q_enet_phy_init(); 196 imx6q_enet_phy_init();
196 197
197 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 198 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -293,14 +294,6 @@ static void __init imx6q_init_irq(void)
293 irqchip_init(); 294 irqchip_init();
294} 295}
295 296
296static void __init imx6q_timer_init(void)
297{
298 of_clk_init(NULL);
299 clocksource_of_init();
300 imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
301 imx6q_revision());
302}
303
304static const char *imx6q_dt_compat[] __initdata = { 297static const char *imx6q_dt_compat[] __initdata = {
305 "fsl,imx6dl", 298 "fsl,imx6dl",
306 "fsl,imx6q", 299 "fsl,imx6q",
@@ -311,7 +304,6 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
311 .smp = smp_ops(imx_smp_ops), 304 .smp = smp_ops(imx_smp_ops),
312 .map_io = imx6q_map_io, 305 .map_io = imx6q_map_io,
313 .init_irq = imx6q_init_irq, 306 .init_irq = imx6q_init_irq,
314 .init_time = imx6q_timer_init,
315 .init_machine = imx6q_init_machine, 307 .init_machine = imx6q_init_machine,
316 .init_late = imx6q_init_late, 308 .init_late = imx6q_init_late,
317 .dt_compat = imx6q_dt_compat, 309 .dt_compat = imx6q_dt_compat,
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 0d75dc54f715..c70bd7c64974 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/clk-provider.h>
11#include <linux/irqchip.h> 10#include <linux/irqchip.h>
12#include <linux/of.h> 11#include <linux/of.h>
13#include <linux/of_platform.h> 12#include <linux/of_platform.h>
@@ -31,11 +30,6 @@ static void __init imx6sl_init_irq(void)
31 irqchip_init(); 30 irqchip_init();
32} 31}
33 32
34static void __init imx6sl_timer_init(void)
35{
36 of_clk_init(NULL);
37}
38
39static const char *imx6sl_dt_compat[] __initdata = { 33static const char *imx6sl_dt_compat[] __initdata = {
40 "fsl,imx6sl", 34 "fsl,imx6sl",
41 NULL, 35 NULL,
@@ -44,7 +38,6 @@ static const char *imx6sl_dt_compat[] __initdata = {
44DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") 38DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
45 .map_io = debug_ll_io_init, 39 .map_io = debug_ll_io_init,
46 .init_irq = imx6sl_init_irq, 40 .init_irq = imx6sl_init_irq,
47 .init_time = imx6sl_timer_init,
48 .init_machine = imx6sl_init_machine, 41 .init_machine = imx6sl_init_machine,
49 .dt_compat = imx6sl_dt_compat, 42 .dt_compat = imx6sl_dt_compat,
50 .restart = mxc_restart, 43 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index 816991deb9b8..af0cb8a9dc48 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -8,9 +8,7 @@
8 */ 8 */
9 9
10#include <linux/of_platform.h> 10#include <linux/of_platform.h>
11#include <linux/clocksource.h>
12#include <linux/irqchip.h> 11#include <linux/irqchip.h>
13#include <linux/clk-provider.h>
14#include <asm/mach/arch.h> 12#include <asm/mach/arch.h>
15#include <asm/hardware/cache-l2x0.h> 13#include <asm/hardware/cache-l2x0.h>
16 14
@@ -28,12 +26,6 @@ static void __init vf610_init_irq(void)
28 irqchip_init(); 26 irqchip_init();
29} 27}
30 28
31static void __init vf610_init_time(void)
32{
33 of_clk_init(NULL);
34 clocksource_of_init();
35}
36
37static const char *vf610_dt_compat[] __initdata = { 29static const char *vf610_dt_compat[] __initdata = {
38 "fsl,vf610", 30 "fsl,vf610",
39 NULL, 31 NULL,
@@ -41,7 +33,6 @@ static const char *vf610_dt_compat[] __initdata = {
41 33
42DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") 34DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
43 .init_irq = vf610_init_irq, 35 .init_irq = vf610_init_irq,
44 .init_time = vf610_init_time,
45 .init_machine = vf610_init_machine, 36 .init_machine = vf610_init_machine,
46 .dt_compat = vf610_dt_compat, 37 .dt_compat = vf610_dt_compat,
47 .restart = mxc_restart, 38 .restart = mxc_restart,
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 82d3ad8e87cf..a32a3e507a9d 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -15,7 +15,6 @@
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/clk-provider.h> 17#include <linux/clk-provider.h>
18#include <linux/clocksource.h>
19#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
20#include <linux/irqchip.h> 19#include <linux/irqchip.h>
21#include <linux/kexec.h> 20#include <linux/kexec.h>
@@ -66,12 +65,6 @@ static void __init kirkwood_legacy_clk_init(void)
66 clk_prepare_enable(clk); 65 clk_prepare_enable(clk);
67} 66}
68 67
69static void __init kirkwood_dt_time_init(void)
70{
71 of_clk_init(NULL);
72 clocksource_of_init();
73}
74
75static void __init kirkwood_dt_init_early(void) 68static void __init kirkwood_dt_init_early(void)
76{ 69{
77 mvebu_mbus_init("marvell,kirkwood-mbus", 70 mvebu_mbus_init("marvell,kirkwood-mbus",
@@ -122,7 +115,6 @@ DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
122 /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ 115 /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
123 .map_io = kirkwood_map_io, 116 .map_io = kirkwood_map_io,
124 .init_early = kirkwood_dt_init_early, 117 .init_early = kirkwood_dt_init_early,
125 .init_time = kirkwood_dt_time_init,
126 .init_machine = kirkwood_dt_init, 118 .init_machine = kirkwood_dt_init,
127 .restart = kirkwood_restart, 119 .restart = kirkwood_restart,
128 .dt_compat = kirkwood_dt_board_compat, 120 .dt_compat = kirkwood_dt_board_compat,
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 905efc8cac79..2586c2865874 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -1,12 +1,12 @@
1if ARCH_MSM 1if ARCH_MSM
2 2
3comment "Qualcomm MSM SoC Type" 3comment "Qualcomm MSM SoC Type"
4 depends on (ARCH_MSM8X60 || ARCH_MSM8960) 4 depends on ARCH_MSM_DT
5 5
6choice 6choice
7 prompt "Qualcomm MSM SoC Type" 7 prompt "Qualcomm MSM SoC Type"
8 default ARCH_MSM7X00A 8 default ARCH_MSM7X00A
9 depends on !(ARCH_MSM8X60 || ARCH_MSM8960) 9 depends on !ARCH_MSM_DT
10 10
11config ARCH_MSM7X00A 11config ARCH_MSM7X00A
12 bool "MSM7x00A / MSM7x01A" 12 bool "MSM7x00A / MSM7x01A"
@@ -49,7 +49,6 @@ config ARCH_MSM8X60
49 select GPIO_MSM_V2 49 select GPIO_MSM_V2
50 select HAVE_SMP 50 select HAVE_SMP
51 select MSM_SCM if SMP 51 select MSM_SCM if SMP
52 select USE_OF
53 52
54config ARCH_MSM8960 53config ARCH_MSM8960
55 bool "MSM8960" 54 bool "MSM8960"
@@ -58,6 +57,11 @@ config ARCH_MSM8960
58 select HAVE_SMP 57 select HAVE_SMP
59 select GPIO_MSM_V2 58 select GPIO_MSM_V2
60 select MSM_SCM if SMP 59 select MSM_SCM if SMP
60
61config ARCH_MSM_DT
62 def_bool y
63 depends on (ARCH_MSM8X60 || ARCH_MSM8960)
64 select SPARSE_IRQ
61 select USE_OF 65 select USE_OF
62 66
63config MSM_HAS_DEBUG_UART_HS 67config MSM_HAS_DEBUG_UART_HS
@@ -68,6 +72,7 @@ config MSM_SOC_REV_A
68 72
69config ARCH_MSM_ARM11 73config ARCH_MSM_ARM11
70 bool 74 bool
75
71config ARCH_MSM_SCORPION 76config ARCH_MSM_SCORPION
72 bool 77 bool
73 78
@@ -75,6 +80,7 @@ config MSM_VIC
75 bool 80 bool
76 81
77menu "Qualcomm MSM Board Type" 82menu "Qualcomm MSM Board Type"
83 depends on !ARCH_MSM_DT
78 84
79config MACH_HALIBUT 85config MACH_HALIBUT
80 depends on ARCH_MSM 86 depends on ARCH_MSM
@@ -122,6 +128,7 @@ config MSM_SMD
122 128
123config MSM_GPIOMUX 129config MSM_GPIOMUX
124 bool 130 bool
131 depends on !ARCH_MSM_DT
125 help 132 help
126 Support for MSM V1 TLMM GPIOMUX architecture. 133 Support for MSM V1 TLMM GPIOMUX architecture.
127 134
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index d872634c2f85..7ed4c1b2bdd2 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -26,7 +26,6 @@ obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o b
26obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o 26obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
27obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o 27obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
28obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o 28obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
29obj-$(CONFIG_ARCH_MSM8X60) += board-dt-8660.o 29obj-$(CONFIG_ARCH_MSM_DT) += board-dt.o
30obj-$(CONFIG_ARCH_MSM8960) += board-dt-8960.o
31obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o 30obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
32obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o 31obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
deleted file mode 100644
index c2946892f5e3..000000000000
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/init.h>
14#include <linux/of.h>
15#include <linux/of_platform.h>
16
17#include <asm/mach/arch.h>
18#include <asm/mach/map.h>
19
20#include "common.h"
21
22static void __init msm8x60_init_late(void)
23{
24 smd_debugfs_init();
25}
26
27static struct of_dev_auxdata msm_auxdata_lookup[] __initdata = {
28 {}
29};
30
31static void __init msm8x60_dt_init(void)
32{
33 of_platform_populate(NULL, of_default_bus_match_table,
34 msm_auxdata_lookup, NULL);
35}
36
37static const char *msm8x60_fluid_match[] __initdata = {
38 "qcom,msm8660-fluid",
39 "qcom,msm8660-surf",
40 NULL
41};
42
43DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
44 .smp = smp_ops(msm_smp_ops),
45 .init_machine = msm8x60_dt_init,
46 .init_late = msm8x60_init_late,
47 .dt_compat = msm8x60_fluid_match,
48MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt.c
index d4ca52c45111..16e6183ac9f1 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt.c
@@ -1,4 +1,4 @@
1/* Copyright (c) 2012, The Linux Foundation. All rights reserved. 1/* Copyright (c) 2010-2012,2013 The Linux Foundation. All rights reserved.
2 * 2 *
3 * This program is free software; you can redistribute it and/or modify 3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and 4 * it under the terms of the GNU General Public License version 2 and
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/of.h>
14#include <linux/of_platform.h> 15#include <linux/of_platform.h>
15 16
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
@@ -18,18 +19,14 @@
18 19
19#include "common.h" 20#include "common.h"
20 21
21static void __init msm_dt_init(void) 22static const char * const msm_dt_match[] __initconst = {
22{ 23 "qcom,msm8660-fluid",
23 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 24 "qcom,msm8660-surf",
24}
25
26static const char * const msm8960_dt_match[] __initconst = {
27 "qcom,msm8960-cdp", 25 "qcom,msm8960-cdp",
28 NULL 26 NULL
29}; 27};
30 28
31DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") 29DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
32 .smp = smp_ops(msm_smp_ops), 30 .smp = smp_ops(msm_smp_ops),
33 .init_machine = msm_dt_init, 31 .dt_compat = msm_dt_match,
34 .dt_compat = msm8960_dt_match,
35MACHINE_END 32MACHINE_END
diff --git a/arch/arm/mach-msm/include/mach/irqs-8960.h b/arch/arm/mach-msm/include/mach/irqs-8960.h
deleted file mode 100644
index 81ab2a6792bd..000000000000
--- a/arch/arm/mach-msm/include/mach/irqs-8960.h
+++ /dev/null
@@ -1,277 +0,0 @@
1/* Copyright (c) 2011 Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ASM_ARCH_MSM_IRQS_8960_H
14#define __ASM_ARCH_MSM_IRQS_8960_H
15
16/* MSM ACPU Interrupt Numbers */
17
18/* 0-15: STI/SGI (software triggered/generated interrupts)
19 16-31: PPI (private peripheral interrupts)
20 32+: SPI (shared peripheral interrupts) */
21
22#define GIC_PPI_START 16
23#define GIC_SPI_START 32
24
25#define INT_VGIC (GIC_PPI_START + 0)
26#define INT_DEBUG_TIMER_EXP (GIC_PPI_START + 1)
27#define INT_GP_TIMER_EXP (GIC_PPI_START + 2)
28#define INT_GP_TIMER2_EXP (GIC_PPI_START + 3)
29#define WDT0_ACCSCSSNBARK_INT (GIC_PPI_START + 4)
30#define WDT1_ACCSCSSNBARK_INT (GIC_PPI_START + 5)
31#define AVS_SVICINT (GIC_PPI_START + 6)
32#define AVS_SVICINTSWDONE (GIC_PPI_START + 7)
33#define CPU_DBGCPUXCOMMRXFULL (GIC_PPI_START + 8)
34#define CPU_DBGCPUXCOMMTXEMPTY (GIC_PPI_START + 9)
35#define CPU_SICCPUXPERFMONIRPTREQ (GIC_PPI_START + 10)
36#define SC_AVSCPUXDOWN (GIC_PPI_START + 11)
37#define SC_AVSCPUXUP (GIC_PPI_START + 12)
38#define SC_SICCPUXACGIRPTREQ (GIC_PPI_START + 13)
39#define SC_SICCPUXEXTFAULTIRPTREQ (GIC_PPI_START + 14)
40/* PPI 15 is unused */
41
42#define SC_SICMPUIRPTREQ (GIC_SPI_START + 0)
43#define SC_SICL2IRPTREQ (GIC_SPI_START + 1)
44#define SC_SICL2PERFMONIRPTREQ (GIC_SPI_START + 2)
45#define SC_SICAGCIRPTREQ (GIC_SPI_START + 3)
46#define TLMM_APCC_DIR_CONN_IRQ_0 (GIC_SPI_START + 4)
47#define TLMM_APCC_DIR_CONN_IRQ_1 (GIC_SPI_START + 5)
48#define TLMM_APCC_DIR_CONN_IRQ_2 (GIC_SPI_START + 6)
49#define TLMM_APCC_DIR_CONN_IRQ_3 (GIC_SPI_START + 7)
50#define TLMM_APCC_DIR_CONN_IRQ_4 (GIC_SPI_START + 8)
51#define TLMM_APCC_DIR_CONN_IRQ_5 (GIC_SPI_START + 9)
52#define TLMM_APCC_DIR_CONN_IRQ_6 (GIC_SPI_START + 10)
53#define TLMM_APCC_DIR_CONN_IRQ_7 (GIC_SPI_START + 11)
54#define TLMM_APCC_DIR_CONN_IRQ_8 (GIC_SPI_START + 12)
55#define TLMM_APCC_DIR_CONN_IRQ_9 (GIC_SPI_START + 13)
56#define PM8921_SEC_IRQ_103 (GIC_SPI_START + 14)
57#define PM8018_SEC_IRQ_106 (GIC_SPI_START + 15)
58#define TLMM_APCC_SUMMARY_IRQ (GIC_SPI_START + 16)
59#define SPDM_RT_1_IRQ (GIC_SPI_START + 17)
60#define SPDM_DIAG_IRQ (GIC_SPI_START + 18)
61#define RPM_APCC_CPU0_GP_HIGH_IRQ (GIC_SPI_START + 19)
62#define RPM_APCC_CPU0_GP_MEDIUM_IRQ (GIC_SPI_START + 20)
63#define RPM_APCC_CPU0_GP_LOW_IRQ (GIC_SPI_START + 21)
64#define RPM_APCC_CPU0_WAKE_UP_IRQ (GIC_SPI_START + 22)
65#define RPM_APCC_CPU1_GP_HIGH_IRQ (GIC_SPI_START + 23)
66#define RPM_APCC_CPU1_GP_MEDIUM_IRQ (GIC_SPI_START + 24)
67#define RPM_APCC_CPU1_GP_LOW_IRQ (GIC_SPI_START + 25)
68#define RPM_APCC_CPU1_WAKE_UP_IRQ (GIC_SPI_START + 26)
69#define SSBI2_2_SC_CPU0_SECURE_IRQ (GIC_SPI_START + 27)
70#define SSBI2_2_SC_CPU0_NON_SECURE_IRQ (GIC_SPI_START + 28)
71#define SSBI2_1_SC_CPU0_SECURE_IRQ (GIC_SPI_START + 29)
72#define SSBI2_1_SC_CPU0_NON_SECURE_IRQ (GIC_SPI_START + 30)
73#define MSMC_SC_SEC_CE_IRQ (GIC_SPI_START + 31)
74#define MSMC_SC_PRI_CE_IRQ (GIC_SPI_START + 32)
75#define SLIMBUS0_CORE_EE1_IRQ (GIC_SPI_START + 33)
76#define SLIMBUS0_BAM_EE1_IRQ (GIC_SPI_START + 34)
77#define Q6FW_WDOG_EXPIRED_IRQ (GIC_SPI_START + 35)
78#define Q6SW_WDOG_EXPIRED_IRQ (GIC_SPI_START + 36)
79#define MSS_TO_APPS_IRQ_0 (GIC_SPI_START + 37)
80#define MSS_TO_APPS_IRQ_1 (GIC_SPI_START + 38)
81#define MSS_TO_APPS_IRQ_2 (GIC_SPI_START + 39)
82#define MSS_TO_APPS_IRQ_3 (GIC_SPI_START + 40)
83#define MSS_TO_APPS_IRQ_4 (GIC_SPI_START + 41)
84#define MSS_TO_APPS_IRQ_5 (GIC_SPI_START + 42)
85#define MSS_TO_APPS_IRQ_6 (GIC_SPI_START + 43)
86#define MSS_TO_APPS_IRQ_7 (GIC_SPI_START + 44)
87#define MSS_TO_APPS_IRQ_8 (GIC_SPI_START + 45)
88#define MSS_TO_APPS_IRQ_9 (GIC_SPI_START + 46)
89#define VPE_IRQ (GIC_SPI_START + 47)
90#define VFE_IRQ (GIC_SPI_START + 48)
91#define VCODEC_IRQ (GIC_SPI_START + 49)
92#define TV_ENC_IRQ (GIC_SPI_START + 50)
93#define SMMU_VPE_CB_SC_SECURE_IRQ (GIC_SPI_START + 51)
94#define SMMU_VPE_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 52)
95#define SMMU_VFE_CB_SC_SECURE_IRQ (GIC_SPI_START + 53)
96#define SMMU_VFE_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 54)
97#define SMMU_VCODEC_B_CB_SC_SECURE_IRQ (GIC_SPI_START + 55)
98#define SMMU_VCODEC_B_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 56)
99#define SMMU_VCODEC_A_CB_SC_SECURE_IRQ (GIC_SPI_START + 57)
100#define SMMU_VCODEC_A_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 58)
101#define SMMU_ROT_CB_SC_SECURE_IRQ (GIC_SPI_START + 59)
102#define SMMU_ROT_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 60)
103#define SMMU_MDP1_CB_SC_SECURE_IRQ (GIC_SPI_START + 61)
104#define SMMU_MDP1_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 62)
105#define SMMU_MDP0_CB_SC_SECURE_IRQ (GIC_SPI_START + 63)
106#define SMMU_MDP0_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 64)
107#define SMMU_JPEGD_CB_SC_SECURE_IRQ (GIC_SPI_START + 65)
108#define SMMU_JPEGD_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 66)
109#define SMMU_IJPEG_CB_SC_SECURE_IRQ (GIC_SPI_START + 67)
110#define SMMU_IJPEG_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 68)
111#define SMMU_GFX3D_CB_SC_SECURE_IRQ (GIC_SPI_START + 69)
112#define SMMU_GFX3D_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 70)
113#define SMMU_GFX2D0_CB_SC_SECURE_IRQ (GIC_SPI_START + 71)
114#define SMMU_GFX2D0_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 72)
115#define ROT_IRQ (GIC_SPI_START + 73)
116#define MMSS_FABRIC_IRQ (GIC_SPI_START + 74)
117#define MDP_IRQ (GIC_SPI_START + 75)
118#define JPEGD_IRQ (GIC_SPI_START + 76)
119#define JPEG_IRQ (GIC_SPI_START + 77)
120#define MMSS_IMEM_IRQ (GIC_SPI_START + 78)
121#define HDMI_IRQ (GIC_SPI_START + 79)
122#define GFX3D_IRQ (GIC_SPI_START + 80)
123#define GFX2D0_IRQ (GIC_SPI_START + 81)
124#define DSI1_IRQ (GIC_SPI_START + 82)
125#define CSI_1_IRQ (GIC_SPI_START + 83)
126#define CSI_0_IRQ (GIC_SPI_START + 84)
127#define LPASS_SCSS_AUDIO_IF_OUT0_IRQ (GIC_SPI_START + 85)
128#define LPASS_SCSS_MIDI_IRQ (GIC_SPI_START + 86)
129#define LPASS_Q6SS_WDOG_EXPIRED (GIC_SPI_START + 87)
130#define LPASS_SCSS_GP_LOW_IRQ (GIC_SPI_START + 88)
131#define LPASS_SCSS_GP_MEDIUM_IRQ (GIC_SPI_START + 89)
132#define LPASS_SCSS_GP_HIGH_IRQ (GIC_SPI_START + 90)
133#define TOP_IMEM_IRQ (GIC_SPI_START + 91)
134#define FABRIC_SYS_IRQ (GIC_SPI_START + 92)
135#define FABRIC_APPS_IRQ (GIC_SPI_START + 93)
136#define USB1_HS_BAM_IRQ (GIC_SPI_START + 94)
137#define SDC4_BAM_IRQ (GIC_SPI_START + 95)
138#define SDC3_BAM_IRQ (GIC_SPI_START + 96)
139#define SDC2_BAM_IRQ (GIC_SPI_START + 97)
140#define SDC1_BAM_IRQ (GIC_SPI_START + 98)
141#define FABRIC_SPS_IRQ (GIC_SPI_START + 99)
142#define USB1_HS_IRQ (GIC_SPI_START + 100)
143#define SDC4_IRQ_0 (GIC_SPI_START + 101)
144#define SDC3_IRQ_0 (GIC_SPI_START + 102)
145#define SDC2_IRQ_0 (GIC_SPI_START + 103)
146#define SDC1_IRQ_0 (GIC_SPI_START + 104)
147#define SPS_BAM_DMA_IRQ (GIC_SPI_START + 105)
148#define SPS_SEC_VIOL_IRQ (GIC_SPI_START + 106)
149#define SPS_MTI_0 (GIC_SPI_START + 107)
150#define SPS_MTI_1 (GIC_SPI_START + 108)
151#define SPS_MTI_2 (GIC_SPI_START + 109)
152#define SPS_MTI_3 (GIC_SPI_START + 110)
153#define SPS_MTI_4 (GIC_SPI_START + 111)
154#define SPS_MTI_5 (GIC_SPI_START + 112)
155#define SPS_MTI_6 (GIC_SPI_START + 113)
156#define SPS_MTI_7 (GIC_SPI_START + 114)
157#define SPS_MTI_8 (GIC_SPI_START + 115)
158#define SPS_MTI_9 (GIC_SPI_START + 116)
159#define SPS_MTI_10 (GIC_SPI_START + 117)
160#define SPS_MTI_11 (GIC_SPI_START + 118)
161#define SPS_MTI_12 (GIC_SPI_START + 119)
162#define SPS_MTI_13 (GIC_SPI_START + 120)
163#define SPS_MTI_14 (GIC_SPI_START + 121)
164#define SPS_MTI_15 (GIC_SPI_START + 122)
165#define SPS_MTI_16 (GIC_SPI_START + 123)
166#define SPS_MTI_17 (GIC_SPI_START + 124)
167#define SPS_MTI_18 (GIC_SPI_START + 125)
168#define SPS_MTI_19 (GIC_SPI_START + 126)
169#define SPS_MTI_20 (GIC_SPI_START + 127)
170#define SPS_MTI_21 (GIC_SPI_START + 128)
171#define SPS_MTI_22 (GIC_SPI_START + 129)
172#define SPS_MTI_23 (GIC_SPI_START + 130)
173#define SPS_MTI_24 (GIC_SPI_START + 131)
174#define SPS_MTI_25 (GIC_SPI_START + 132)
175#define SPS_MTI_26 (GIC_SPI_START + 133)
176#define SPS_MTI_27 (GIC_SPI_START + 134)
177#define SPS_MTI_28 (GIC_SPI_START + 135)
178#define SPS_MTI_29 (GIC_SPI_START + 136)
179#define SPS_MTI_30 (GIC_SPI_START + 137)
180#define SPS_MTI_31 (GIC_SPI_START + 138)
181#define CSIPHY_4LN_IRQ (GIC_SPI_START + 139)
182#define CSIPHY_2LN_IRQ (GIC_SPI_START + 140)
183#define USB2_IRQ (GIC_SPI_START + 141)
184#define USB1_IRQ (GIC_SPI_START + 142)
185#define TSSC_SSBI_IRQ (GIC_SPI_START + 143)
186#define TSSC_SAMPLE_IRQ (GIC_SPI_START + 144)
187#define TSSC_PENUP_IRQ (GIC_SPI_START + 145)
188#define GSBI1_UARTDM_IRQ (GIC_SPI_START + 146)
189#define GSBI1_QUP_IRQ (GIC_SPI_START + 147)
190#define GSBI2_UARTDM_IRQ (GIC_SPI_START + 148)
191#define GSBI2_QUP_IRQ (GIC_SPI_START + 149)
192#define GSBI3_UARTDM_IRQ (GIC_SPI_START + 150)
193#define GSBI3_QUP_IRQ (GIC_SPI_START + 151)
194#define GSBI4_UARTDM_IRQ (GIC_SPI_START + 152)
195#define GSBI4_QUP_IRQ (GIC_SPI_START + 153)
196#define GSBI5_UARTDM_IRQ (GIC_SPI_START + 154)
197#define GSBI5_QUP_IRQ (GIC_SPI_START + 155)
198#define GSBI6_UARTDM_IRQ (GIC_SPI_START + 156)
199#define GSBI6_QUP_IRQ (GIC_SPI_START + 157)
200#define GSBI7_UARTDM_IRQ (GIC_SPI_START + 158)
201#define GSBI7_QUP_IRQ (GIC_SPI_START + 159)
202#define GSBI8_UARTDM_IRQ (GIC_SPI_START + 160)
203#define GSBI8_QUP_IRQ (GIC_SPI_START + 161)
204#define TSIF_TSPP_IRQ (GIC_SPI_START + 162)
205#define TSIF_BAM_IRQ (GIC_SPI_START + 163)
206#define TSIF2_IRQ (GIC_SPI_START + 164)
207#define TSIF1_IRQ (GIC_SPI_START + 165)
208#define DSI2_IRQ (GIC_SPI_START + 166)
209#define ISPIF_IRQ (GIC_SPI_START + 167)
210#define MSMC_SC_SEC_TMR_IRQ (GIC_SPI_START + 168)
211#define MSMC_SC_SEC_WDOG_BARK_IRQ (GIC_SPI_START + 169)
212#define INT_ADM0_SCSS_0_IRQ (GIC_SPI_START + 170)
213#define INT_ADM0_SCSS_1_IRQ (GIC_SPI_START + 171)
214#define INT_ADM0_SCSS_2_IRQ (GIC_SPI_START + 172)
215#define INT_ADM0_SCSS_3_IRQ (GIC_SPI_START + 173)
216#define CC_SCSS_WDT1CPU1BITEEXPIRED (GIC_SPI_START + 174)
217#define CC_SCSS_WDT1CPU0BITEEXPIRED (GIC_SPI_START + 175)
218#define CC_SCSS_WDT0CPU1BITEEXPIRED (GIC_SPI_START + 176)
219#define CC_SCSS_WDT0CPU0BITEEXPIRED (GIC_SPI_START + 177)
220#define TSENS_UPPER_LOWER_INT (GIC_SPI_START + 178)
221#define SSBI2_2_SC_CPU1_SECURE_INT (GIC_SPI_START + 179)
222#define SSBI2_2_SC_CPU1_NON_SECURE_INT (GIC_SPI_START + 180)
223#define SSBI2_1_SC_CPU1_SECURE_INT (GIC_SPI_START + 181)
224#define SSBI2_1_SC_CPU1_NON_SECURE_INT (GIC_SPI_START + 182)
225#define XPU_SUMMARY_IRQ (GIC_SPI_START + 183)
226#define BUS_EXCEPTION_SUMMARY_IRQ (GIC_SPI_START + 184)
227#define HSDDRX_EBI1CH0_IRQ (GIC_SPI_START + 185)
228#define HSDDRX_EBI1CH1_IRQ (GIC_SPI_START + 186)
229#define SDC5_BAM_IRQ (GIC_SPI_START + 187)
230#define SDC5_IRQ_0 (GIC_SPI_START + 188)
231#define GSBI9_UARTDM_IRQ (GIC_SPI_START + 189)
232#define GSBI9_QUP_IRQ (GIC_SPI_START + 190)
233#define GSBI10_UARTDM_IRQ (GIC_SPI_START + 191)
234#define GSBI10_QUP_IRQ (GIC_SPI_START + 192)
235#define GSBI11_UARTDM_IRQ (GIC_SPI_START + 193)
236#define GSBI11_QUP_IRQ (GIC_SPI_START + 194)
237#define GSBI12_UARTDM_IRQ (GIC_SPI_START + 195)
238#define GSBI12_QUP_IRQ (GIC_SPI_START + 196)
239#define RIVA_APSS_LTECOEX_IRQ (GIC_SPI_START + 197)
240#define RIVA_APSS_SPARE_IRQ (GIC_SPI_START + 198)
241#define RIVA_APSS_WDOG_BITE_RESET_RDY_IRQ (GIC_SPI_START + 199)
242#define RIVA_ASS_RESET_DONE_IRQ (GIC_SPI_START + 200)
243#define RIVA_APSS_ASIC_IRQ (GIC_SPI_START + 201)
244#define RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ (GIC_SPI_START + 202)
245#define RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ (GIC_SPI_START + 203)
246#define RIVA_APPS_WLAM_SMSM_IRQ (GIC_SPI_START + 204)
247#define RIVA_APPS_LOG_CTRL_IRQ (GIC_SPI_START + 205)
248#define RIVA_APPS_FM_CTRL_IRQ (GIC_SPI_START + 206)
249#define RIVA_APPS_HCI_IRQ (GIC_SPI_START + 207)
250#define RIVA_APPS_WLAN_CTRL_IRQ (GIC_SPI_START + 208)
251#define A2_BAM_IRQ (GIC_SPI_START + 209)
252#define SMMU_GFX2D1_CB_SC_SECURE_IRQ (GIC_SPI_START + 210)
253#define SMMU_GFX2D1_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 211)
254#define GFX2D1_IRQ (GIC_SPI_START + 212)
255#define PPSS_WDOG_TIMER_IRQ (GIC_SPI_START + 213)
256#define SPS_SLIMBUS_CORE_EE0_IRQ (GIC_SPI_START + 214)
257#define SPS_SLIMBUS_BAM_EE0_IRQ (GIC_SPI_START + 215)
258#define QDSS_ETB_IRQ (GIC_SPI_START + 216)
259#define QDSS_CTI2KPSS_CPU1_IRQ (GIC_SPI_START + 217)
260#define QDSS_CTI2KPSS_CPU0_IRQ (GIC_SPI_START + 218)
261#define TLMM_APCC_DIR_CONN_IRQ_16 (GIC_SPI_START + 219)
262#define TLMM_APCC_DIR_CONN_IRQ_17 (GIC_SPI_START + 220)
263#define TLMM_APCC_DIR_CONN_IRQ_18 (GIC_SPI_START + 221)
264#define TLMM_APCC_DIR_CONN_IRQ_19 (GIC_SPI_START + 222)
265#define TLMM_APCC_DIR_CONN_IRQ_20 (GIC_SPI_START + 223)
266#define TLMM_APCC_DIR_CONN_IRQ_21 (GIC_SPI_START + 224)
267#define PM8921_SEC_IRQ_104 (GIC_SPI_START + 225)
268#define PM8018_SEC_IRQ_107 (GIC_SPI_START + 226)
269
270/* For now, use the maximum number of interrupts until a pending GIC issue
271 * is sorted out */
272#define NR_MSM_IRQS 1020
273#define NR_BOARD_IRQS 0
274#define NR_GPIO_IRQS 0
275
276#endif
277
diff --git a/arch/arm/mach-msm/include/mach/irqs-8x60.h b/arch/arm/mach-msm/include/mach/irqs-8x60.h
deleted file mode 100644
index f65841c74c0b..000000000000
--- a/arch/arm/mach-msm/include/mach/irqs-8x60.h
+++ /dev/null
@@ -1,258 +0,0 @@
1/* Copyright (c) 2010 Code Aurora Forum. All rights reserved.
2 *
3 * This software is licensed under the terms of the GNU General Public
4 * License version 2, as published by the Free Software Foundation, and
5 * may be copied, distributed, and modified under those terms.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef __ASM_ARCH_MSM_IRQS_8X60_H
15#define __ASM_ARCH_MSM_IRQS_8X60_H
16
17/* MSM ACPU Interrupt Numbers */
18
19/* 0-15: STI/SGI (software triggered/generated interrupts)
20 * 16-31: PPI (private peripheral interrupts)
21 * 32+: SPI (shared peripheral interrupts)
22 */
23
24#define GIC_PPI_START 16
25#define GIC_SPI_START 32
26
27#define INT_DEBUG_TIMER_EXP (GIC_PPI_START + 0)
28#define INT_GP_TIMER_EXP (GIC_PPI_START + 1)
29#define INT_GP_TIMER2_EXP (GIC_PPI_START + 2)
30#define WDT0_ACCSCSSNBARK_INT (GIC_PPI_START + 3)
31#define WDT1_ACCSCSSNBARK_INT (GIC_PPI_START + 4)
32#define AVS_SVICINT (GIC_PPI_START + 5)
33#define AVS_SVICINTSWDONE (GIC_PPI_START + 6)
34#define CPU_DBGCPUXCOMMRXFULL (GIC_PPI_START + 7)
35#define CPU_DBGCPUXCOMMTXEMPTY (GIC_PPI_START + 8)
36#define CPU_SICCPUXPERFMONIRPTREQ (GIC_PPI_START + 9)
37#define SC_AVSCPUXDOWN (GIC_PPI_START + 10)
38#define SC_AVSCPUXUP (GIC_PPI_START + 11)
39#define SC_SICCPUXACGIRPTREQ (GIC_PPI_START + 12)
40/* PPI 13 to 15 are unused */
41
42
43#define SC_SICMPUIRPTREQ (GIC_SPI_START + 0)
44#define SC_SICL2IRPTREQ (GIC_SPI_START + 1)
45#define SC_SICL2ACGIRPTREQ (GIC_SPI_START + 2)
46#define NC (GIC_SPI_START + 3)
47#define TLMM_SCSS_DIR_CONN_IRQ_0 (GIC_SPI_START + 4)
48#define TLMM_SCSS_DIR_CONN_IRQ_1 (GIC_SPI_START + 5)
49#define TLMM_SCSS_DIR_CONN_IRQ_2 (GIC_SPI_START + 6)
50#define TLMM_SCSS_DIR_CONN_IRQ_3 (GIC_SPI_START + 7)
51#define TLMM_SCSS_DIR_CONN_IRQ_4 (GIC_SPI_START + 8)
52#define TLMM_SCSS_DIR_CONN_IRQ_5 (GIC_SPI_START + 9)
53#define TLMM_SCSS_DIR_CONN_IRQ_6 (GIC_SPI_START + 10)
54#define TLMM_SCSS_DIR_CONN_IRQ_7 (GIC_SPI_START + 11)
55#define TLMM_SCSS_DIR_CONN_IRQ_8 (GIC_SPI_START + 12)
56#define TLMM_SCSS_DIR_CONN_IRQ_9 (GIC_SPI_START + 13)
57#define PM8058_SEC_IRQ_N (GIC_SPI_START + 14)
58#define PM8901_SEC_IRQ_N (GIC_SPI_START + 15)
59#define TLMM_SCSS_SUMMARY_IRQ (GIC_SPI_START + 16)
60#define SPDM_RT_1_IRQ (GIC_SPI_START + 17)
61#define SPDM_DIAG_IRQ (GIC_SPI_START + 18)
62#define RPM_SCSS_CPU0_GP_HIGH_IRQ (GIC_SPI_START + 19)
63#define RPM_SCSS_CPU0_GP_MEDIUM_IRQ (GIC_SPI_START + 20)
64#define RPM_SCSS_CPU0_GP_LOW_IRQ (GIC_SPI_START + 21)
65#define RPM_SCSS_CPU0_WAKE_UP_IRQ (GIC_SPI_START + 22)
66#define RPM_SCSS_CPU1_GP_HIGH_IRQ (GIC_SPI_START + 23)
67#define RPM_SCSS_CPU1_GP_MEDIUM_IRQ (GIC_SPI_START + 24)
68#define RPM_SCSS_CPU1_GP_LOW_IRQ (GIC_SPI_START + 25)
69#define RPM_SCSS_CPU1_WAKE_UP_IRQ (GIC_SPI_START + 26)
70#define SSBI2_2_SC_CPU0_SECURE_INT (GIC_SPI_START + 27)
71#define SSBI2_2_SC_CPU0_NON_SECURE_INT (GIC_SPI_START + 28)
72#define SSBI2_1_SC_CPU0_SECURE_INT (GIC_SPI_START + 29)
73#define SSBI2_1_SC_CPU0_NON_SECURE_INT (GIC_SPI_START + 30)
74#define MSMC_SC_SEC_CE_IRQ (GIC_SPI_START + 31)
75#define MSMC_SC_PRI_CE_IRQ (GIC_SPI_START + 32)
76#define MARM_FIQ (GIC_SPI_START + 33)
77#define MARM_IRQ (GIC_SPI_START + 34)
78#define MARM_L2CC_IRQ (GIC_SPI_START + 35)
79#define MARM_WDOG_EXPIRED (GIC_SPI_START + 36)
80#define MARM_SCSS_GP_IRQ_0 (GIC_SPI_START + 37)
81#define MARM_SCSS_GP_IRQ_1 (GIC_SPI_START + 38)
82#define MARM_SCSS_GP_IRQ_2 (GIC_SPI_START + 39)
83#define MARM_SCSS_GP_IRQ_3 (GIC_SPI_START + 40)
84#define MARM_SCSS_GP_IRQ_4 (GIC_SPI_START + 41)
85#define MARM_SCSS_GP_IRQ_5 (GIC_SPI_START + 42)
86#define MARM_SCSS_GP_IRQ_6 (GIC_SPI_START + 43)
87#define MARM_SCSS_GP_IRQ_7 (GIC_SPI_START + 44)
88#define MARM_SCSS_GP_IRQ_8 (GIC_SPI_START + 45)
89#define MARM_SCSS_GP_IRQ_9 (GIC_SPI_START + 46)
90#define VPE_IRQ (GIC_SPI_START + 47)
91#define VFE_IRQ (GIC_SPI_START + 48)
92#define VCODEC_IRQ (GIC_SPI_START + 49)
93#define TV_ENC_IRQ (GIC_SPI_START + 50)
94#define SMMU_VPE_CB_SC_SECURE_IRQ (GIC_SPI_START + 51)
95#define SMMU_VPE_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 52)
96#define SMMU_VFE_CB_SC_SECURE_IRQ (GIC_SPI_START + 53)
97#define SMMU_VFE_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 54)
98#define SMMU_VCODEC_B_CB_SC_SECURE_IRQ (GIC_SPI_START + 55)
99#define SMMU_VCODEC_B_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 56)
100#define SMMU_VCODEC_A_CB_SC_SECURE_IRQ (GIC_SPI_START + 57)
101#define SMMU_VCODEC_A_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 58)
102#define SMMU_ROT_CB_SC_SECURE_IRQ (GIC_SPI_START + 59)
103#define SMMU_ROT_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 60)
104#define SMMU_MDP1_CB_SC_SECURE_IRQ (GIC_SPI_START + 61)
105#define SMMU_MDP1_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 62)
106#define SMMU_MDP0_CB_SC_SECURE_IRQ (GIC_SPI_START + 63)
107#define SMMU_MDP0_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 64)
108#define SMMU_JPEGD_CB_SC_SECURE_IRQ (GIC_SPI_START + 65)
109#define SMMU_JPEGD_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 66)
110#define SMMU_IJPEG_CB_SC_SECURE_IRQ (GIC_SPI_START + 67)
111#define SMMU_IJPEG_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 68)
112#define SMMU_GFX3D_CB_SC_SECURE_IRQ (GIC_SPI_START + 69)
113#define SMMU_GFX3D_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 70)
114#define SMMU_GFX2D0_CB_SC_SECURE_IRQ (GIC_SPI_START + 71)
115#define SMMU_GFX2D0_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 72)
116#define ROT_IRQ (GIC_SPI_START + 73)
117#define MMSS_FABRIC_IRQ (GIC_SPI_START + 74)
118#define MDP_IRQ (GIC_SPI_START + 75)
119#define JPEGD_IRQ (GIC_SPI_START + 76)
120#define JPEG_IRQ (GIC_SPI_START + 77)
121#define MMSS_IMEM_IRQ (GIC_SPI_START + 78)
122#define HDMI_IRQ (GIC_SPI_START + 79)
123#define GFX3D_IRQ (GIC_SPI_START + 80)
124#define GFX2D0_IRQ (GIC_SPI_START + 81)
125#define DSI_IRQ (GIC_SPI_START + 82)
126#define CSI_1_IRQ (GIC_SPI_START + 83)
127#define CSI_0_IRQ (GIC_SPI_START + 84)
128#define LPASS_SCSS_AUDIO_IF_OUT0_IRQ (GIC_SPI_START + 85)
129#define LPASS_SCSS_MIDI_IRQ (GIC_SPI_START + 86)
130#define LPASS_Q6SS_WDOG_EXPIRED (GIC_SPI_START + 87)
131#define LPASS_SCSS_GP_LOW_IRQ (GIC_SPI_START + 88)
132#define LPASS_SCSS_GP_MEDIUM_IRQ (GIC_SPI_START + 89)
133#define LPASS_SCSS_GP_HIGH_IRQ (GIC_SPI_START + 90)
134#define TOP_IMEM_IRQ (GIC_SPI_START + 91)
135#define FABRIC_SYS_IRQ (GIC_SPI_START + 92)
136#define FABRIC_APPS_IRQ (GIC_SPI_START + 93)
137#define USB1_HS_BAM_IRQ (GIC_SPI_START + 94)
138#define SDC4_BAM_IRQ (GIC_SPI_START + 95)
139#define SDC3_BAM_IRQ (GIC_SPI_START + 96)
140#define SDC2_BAM_IRQ (GIC_SPI_START + 97)
141#define SDC1_BAM_IRQ (GIC_SPI_START + 98)
142#define FABRIC_SPS_IRQ (GIC_SPI_START + 99)
143#define USB1_HS_IRQ (GIC_SPI_START + 100)
144#define SDC4_IRQ_0 (GIC_SPI_START + 101)
145#define SDC3_IRQ_0 (GIC_SPI_START + 102)
146#define SDC2_IRQ_0 (GIC_SPI_START + 103)
147#define SDC1_IRQ_0 (GIC_SPI_START + 104)
148#define SPS_BAM_DMA_IRQ (GIC_SPI_START + 105)
149#define SPS_SEC_VIOL_IRQ (GIC_SPI_START + 106)
150#define SPS_MTI_0 (GIC_SPI_START + 107)
151#define SPS_MTI_1 (GIC_SPI_START + 108)
152#define SPS_MTI_2 (GIC_SPI_START + 109)
153#define SPS_MTI_3 (GIC_SPI_START + 110)
154#define SPS_MTI_4 (GIC_SPI_START + 111)
155#define SPS_MTI_5 (GIC_SPI_START + 112)
156#define SPS_MTI_6 (GIC_SPI_START + 113)
157#define SPS_MTI_7 (GIC_SPI_START + 114)
158#define SPS_MTI_8 (GIC_SPI_START + 115)
159#define SPS_MTI_9 (GIC_SPI_START + 116)
160#define SPS_MTI_10 (GIC_SPI_START + 117)
161#define SPS_MTI_11 (GIC_SPI_START + 118)
162#define SPS_MTI_12 (GIC_SPI_START + 119)
163#define SPS_MTI_13 (GIC_SPI_START + 120)
164#define SPS_MTI_14 (GIC_SPI_START + 121)
165#define SPS_MTI_15 (GIC_SPI_START + 122)
166#define SPS_MTI_16 (GIC_SPI_START + 123)
167#define SPS_MTI_17 (GIC_SPI_START + 124)
168#define SPS_MTI_18 (GIC_SPI_START + 125)
169#define SPS_MTI_19 (GIC_SPI_START + 126)
170#define SPS_MTI_20 (GIC_SPI_START + 127)
171#define SPS_MTI_21 (GIC_SPI_START + 128)
172#define SPS_MTI_22 (GIC_SPI_START + 129)
173#define SPS_MTI_23 (GIC_SPI_START + 130)
174#define SPS_MTI_24 (GIC_SPI_START + 131)
175#define SPS_MTI_25 (GIC_SPI_START + 132)
176#define SPS_MTI_26 (GIC_SPI_START + 133)
177#define SPS_MTI_27 (GIC_SPI_START + 134)
178#define SPS_MTI_28 (GIC_SPI_START + 135)
179#define SPS_MTI_29 (GIC_SPI_START + 136)
180#define SPS_MTI_30 (GIC_SPI_START + 137)
181#define SPS_MTI_31 (GIC_SPI_START + 138)
182#define UXMC_EBI2_WR_ER_DONE_IRQ (GIC_SPI_START + 139)
183#define UXMC_EBI2_OP_DONE_IRQ (GIC_SPI_START + 140)
184#define USB2_IRQ (GIC_SPI_START + 141)
185#define USB1_IRQ (GIC_SPI_START + 142)
186#define TSSC_SSBI_IRQ (GIC_SPI_START + 143)
187#define TSSC_SAMPLE_IRQ (GIC_SPI_START + 144)
188#define TSSC_PENUP_IRQ (GIC_SPI_START + 145)
189#define INT_UART1DM_IRQ (GIC_SPI_START + 146)
190#define GSBI1_QUP_IRQ (GIC_SPI_START + 147)
191#define INT_UART2DM_IRQ (GIC_SPI_START + 148)
192#define GSBI2_QUP_IRQ (GIC_SPI_START + 149)
193#define INT_UART3DM_IRQ (GIC_SPI_START + 150)
194#define GSBI3_QUP_IRQ (GIC_SPI_START + 151)
195#define INT_UART4DM_IRQ (GIC_SPI_START + 152)
196#define GSBI4_QUP_IRQ (GIC_SPI_START + 153)
197#define INT_UART5DM_IRQ (GIC_SPI_START + 154)
198#define GSBI5_QUP_IRQ (GIC_SPI_START + 155)
199#define INT_UART6DM_IRQ (GIC_SPI_START + 156)
200#define GSBI6_QUP_IRQ (GIC_SPI_START + 157)
201#define INT_UART7DM_IRQ (GIC_SPI_START + 158)
202#define GSBI7_QUP_IRQ (GIC_SPI_START + 159)
203#define INT_UART8DM_IRQ (GIC_SPI_START + 160)
204#define GSBI8_QUP_IRQ (GIC_SPI_START + 161)
205#define TSIF_TSPP_IRQ (GIC_SPI_START + 162)
206#define TSIF_BAM_IRQ (GIC_SPI_START + 163)
207#define TSIF2_IRQ (GIC_SPI_START + 164)
208#define TSIF1_IRQ (GIC_SPI_START + 165)
209#define INT_ADM1_MASTER (GIC_SPI_START + 166)
210#define INT_ADM1_AARM (GIC_SPI_START + 167)
211#define INT_ADM1_SD2 (GIC_SPI_START + 168)
212#define INT_ADM1_SD3 (GIC_SPI_START + 169)
213#define INT_ADM0_MASTER (GIC_SPI_START + 170)
214#define INT_ADM0_AARM (GIC_SPI_START + 171)
215#define INT_ADM0_SD2 (GIC_SPI_START + 172)
216#define INT_ADM0_SD3 (GIC_SPI_START + 173)
217#define CC_SCSS_WDT1CPU1BITEEXPIRED (GIC_SPI_START + 174)
218#define CC_SCSS_WDT1CPU0BITEEXPIRED (GIC_SPI_START + 175)
219#define CC_SCSS_WDT0CPU1BITEEXPIRED (GIC_SPI_START + 176)
220#define CC_SCSS_WDT0CPU0BITEEXPIRED (GIC_SPI_START + 177)
221#define TSENS_UPPER_LOWER_INT (GIC_SPI_START + 178)
222#define SSBI2_2_SC_CPU1_SECURE_INT (GIC_SPI_START + 179)
223#define SSBI2_2_SC_CPU1_NON_SECURE_INT (GIC_SPI_START + 180)
224#define SSBI2_1_SC_CPU1_SECURE_INT (GIC_SPI_START + 181)
225#define SSBI2_1_SC_CPU1_NON_SECURE_INT (GIC_SPI_START + 182)
226#define XPU_SUMMARY_IRQ (GIC_SPI_START + 183)
227#define BUS_EXCEPTION_SUMMARY_IRQ (GIC_SPI_START + 184)
228#define HSDDRX_SMICH0_IRQ (GIC_SPI_START + 185)
229#define HSDDRX_EBI1_IRQ (GIC_SPI_START + 186)
230#define SDC5_BAM_IRQ (GIC_SPI_START + 187)
231#define SDC5_IRQ_0 (GIC_SPI_START + 188)
232#define INT_UART9DM_IRQ (GIC_SPI_START + 189)
233#define GSBI9_QUP_IRQ (GIC_SPI_START + 190)
234#define INT_UART10DM_IRQ (GIC_SPI_START + 191)
235#define GSBI10_QUP_IRQ (GIC_SPI_START + 192)
236#define INT_UART11DM_IRQ (GIC_SPI_START + 193)
237#define GSBI11_QUP_IRQ (GIC_SPI_START + 194)
238#define INT_UART12DM_IRQ (GIC_SPI_START + 195)
239#define GSBI12_QUP_IRQ (GIC_SPI_START + 196)
240
241/*SPI 197 to 209 arent used in 8x60*/
242#define SMMU_GFX2D1_CB_SC_SECURE_IRQ (GIC_SPI_START + 210)
243#define SMMU_GFX2D1_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 211)
244
245/*SPI 212 to 216 arent used in 8x60*/
246#define SMPSS_SPARE_1 (GIC_SPI_START + 217)
247#define SMPSS_SPARE_2 (GIC_SPI_START + 218)
248#define SMPSS_SPARE_3 (GIC_SPI_START + 219)
249#define SMPSS_SPARE_4 (GIC_SPI_START + 220)
250#define SMPSS_SPARE_5 (GIC_SPI_START + 221)
251#define SMPSS_SPARE_6 (GIC_SPI_START + 222)
252#define SMPSS_SPARE_7 (GIC_SPI_START + 223)
253
254#define NR_GPIO_IRQS 173
255#define NR_MSM_IRQS 256
256#define NR_BOARD_IRQS 0
257
258#endif
diff --git a/arch/arm/mach-msm/include/mach/irqs.h b/arch/arm/mach-msm/include/mach/irqs.h
index 3cd78b165abb..164d355c96ea 100644
--- a/arch/arm/mach-msm/include/mach/irqs.h
+++ b/arch/arm/mach-msm/include/mach/irqs.h
@@ -24,11 +24,6 @@
24#elif defined(CONFIG_ARCH_QSD8X50) 24#elif defined(CONFIG_ARCH_QSD8X50)
25#include "irqs-8x50.h" 25#include "irqs-8x50.h"
26#include "sirc.h" 26#include "sirc.h"
27#elif defined(CONFIG_ARCH_MSM8X60)
28#include "irqs-8x60.h"
29#elif defined(CONFIG_ARCH_MSM8960)
30/* TODO: Make these not generic. */
31#include "irqs-8960.h"
32#elif defined(CONFIG_ARCH_MSM_ARM11) 27#elif defined(CONFIG_ARCH_MSM_ARM11)
33#include "irqs-7x00.h" 28#include "irqs-7x00.h"
34#else 29#else
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 98f6e2adb53e..cc511a4890a3 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -13,8 +13,6 @@
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/clk/mxs.h> 14#include <linux/clk/mxs.h>
15#include <linux/clkdev.h> 15#include <linux/clkdev.h>
16#include <linux/clocksource.h>
17#include <linux/clk-provider.h>
18#include <linux/delay.h> 16#include <linux/delay.h>
19#include <linux/err.h> 17#include <linux/err.h>
20#include <linux/gpio.h> 18#include <linux/gpio.h>
@@ -490,16 +488,6 @@ static void mxs_restart(enum reboot_mode mode, const char *cmd)
490 soft_restart(0); 488 soft_restart(0);
491} 489}
492 490
493static void __init mxs_timer_init(void)
494{
495 if (of_machine_is_compatible("fsl,imx23"))
496 mx23_clocks_init();
497 else
498 mx28_clocks_init();
499 of_clk_init(NULL);
500 clocksource_of_init();
501}
502
503static const char *mxs_dt_compat[] __initdata = { 491static const char *mxs_dt_compat[] __initdata = {
504 "fsl,imx28", 492 "fsl,imx28",
505 "fsl,imx23", 493 "fsl,imx23",
@@ -508,7 +496,6 @@ static const char *mxs_dt_compat[] __initdata = {
508 496
509DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") 497DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
510 .handle_irq = icoll_handle_irq, 498 .handle_irq = icoll_handle_irq,
511 .init_time = mxs_timer_init,
512 .init_machine = mxs_machine_init, 499 .init_machine = mxs_machine_init,
513 .init_late = mxs_pm_init, 500 .init_late = mxs_pm_init,
514 .dt_compat = mxs_dt_compat, 501 .dt_compat = mxs_dt_compat,
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 13e0df9c11ce..cce2c9dfb5d1 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -25,15 +25,11 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/dma-mapping.h> 27#include <linux/dma-mapping.h>
28#include <linux/platform_data/clk-nomadik.h>
29#include <linux/clocksource.h>
30#include <linux/of_irq.h> 28#include <linux/of_irq.h>
31#include <linux/of_gpio.h> 29#include <linux/of_gpio.h>
32#include <linux/of_address.h> 30#include <linux/of_address.h>
33#include <linux/of_platform.h> 31#include <linux/of_platform.h>
34#include <linux/mtd/fsmc.h>
35#include <linux/gpio.h> 32#include <linux/gpio.h>
36#include <linux/amba/mmci.h>
37 33
38#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 35#include <asm/mach/map.h>
@@ -113,50 +109,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd)
113 writel(1, srcbase + 0x18); 109 writel(1, srcbase + 0x18);
114} 110}
115 111
116/* Initial value for SRC control register: all timers use MXTAL/8 source */
117#define SRC_CR_INIT_MASK 0x00007fff
118#define SRC_CR_INIT_VAL 0x2aaa8000
119
120static void __init cpu8815_timer_init_of(void)
121{
122 struct device_node *mtu;
123 void __iomem *base;
124 int irq;
125 u32 src_cr;
126
127 /* We need this to be up now */
128 nomadik_clk_init();
129
130 mtu = of_find_node_by_path("/mtu@101e2000");
131 if (!mtu)
132 return;
133 base = of_iomap(mtu, 0);
134 if (WARN_ON(!base))
135 return;
136 irq = irq_of_parse_and_map(mtu, 0);
137
138 pr_info("Remapped MTU @ %p, irq: %d\n", base, irq);
139
140 /* Configure timer sources in "system reset controller" ctrl reg */
141 src_cr = readl(base);
142 src_cr &= SRC_CR_INIT_MASK;
143 src_cr |= SRC_CR_INIT_VAL;
144 writel(src_cr, base);
145
146 clocksource_of_init();
147}
148
149static struct fsmc_nand_timings cpu8815_nand_timings = {
150 .thiz = 0,
151 .thold = 0x10,
152 .twait = 0x0A,
153 .tset = 0,
154};
155
156static struct fsmc_nand_platform_data cpu8815_nand_data = {
157 .nand_timings = &cpu8815_nand_timings,
158};
159
160/* 112/*
161 * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects 113 * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects
162 * to simply request an IRQ passed as a resource. So the GPIO pin needs 114 * to simply request an IRQ passed as a resource. So the GPIO pin needs
@@ -190,15 +142,6 @@ static int __init cpu8815_eth_init(void)
190device_initcall(cpu8815_eth_init); 142device_initcall(cpu8815_eth_init);
191 143
192/* 144/*
193 * TODO:
194 * cannot be set from device tree, convert to a proper DT
195 * binding.
196 */
197static struct mmci_platform_data mmcsd_plat_data = {
198 .ocr_mask = MMC_VDD_29_30,
199};
200
201/*
202 * This GPIO pin turns on a line that is used to detect card insertion 145 * This GPIO pin turns on a line that is used to detect card insertion
203 * on this board. 146 * on this board.
204 */ 147 */
@@ -232,24 +175,13 @@ static int __init cpu8815_mmcsd_init(void)
232} 175}
233device_initcall(cpu8815_mmcsd_init); 176device_initcall(cpu8815_mmcsd_init);
234 177
235
236/* These are mostly to get the right device names for the clock lookups */
237static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
238 OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE,
239 NULL, &cpu8815_nand_data),
240 OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE,
241 NULL, &mmcsd_plat_data),
242 { /* sentinel */ },
243};
244
245static void __init cpu8815_init_of(void) 178static void __init cpu8815_init_of(void)
246{ 179{
247#ifdef CONFIG_CACHE_L2X0 180#ifdef CONFIG_CACHE_L2X0
248 /* At full speed latency must be >=2, so 0x249 in low bits */ 181 /* At full speed latency must be >=2, so 0x249 in low bits */
249 l2x0_of_init(0x00730249, 0xfe000fff); 182 l2x0_of_init(0x00730249, 0xfe000fff);
250#endif 183#endif
251 of_platform_populate(NULL, of_default_bus_match_table, 184 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
252 cpu8815_auxdata_lookup, NULL);
253} 185}
254 186
255static const char * cpu8815_board_compat[] = { 187static const char * cpu8815_board_compat[] = {
@@ -259,7 +191,6 @@ static const char * cpu8815_board_compat[] = {
259 191
260DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") 192DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
261 .map_io = cpu8815_map_io, 193 .map_io = cpu8815_map_io,
262 .init_time = cpu8815_timer_init_of,
263 .init_machine = cpu8815_init_of, 194 .init_machine = cpu8815_init_of,
264 .restart = cpu8815_restart, 195 .restart = cpu8815_restart,
265 .dt_compat = cpu8815_board_compat, 196 .dt_compat = cpu8815_board_compat,
diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c
index 99e26092a9f7..4b2ed2e8352f 100644
--- a/arch/arm/mach-nspire/nspire.c
+++ b/arch/arm/mach-nspire/nspire.c
@@ -14,11 +14,9 @@
14#include <linux/of_platform.h> 14#include <linux/of_platform.h>
15#include <linux/irqchip.h> 15#include <linux/irqchip.h>
16#include <linux/irqchip/arm-vic.h> 16#include <linux/irqchip/arm-vic.h>
17#include <linux/clk-provider.h>
18#include <linux/clkdev.h> 17#include <linux/clkdev.h>
19#include <linux/amba/bus.h> 18#include <linux/amba/bus.h>
20#include <linux/amba/clcd.h> 19#include <linux/amba/clcd.h>
21#include <linux/clocksource.h>
22 20
23#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
24#include <asm/mach-types.h> 22#include <asm/mach-types.h>
@@ -65,12 +63,6 @@ static void __init nspire_init(void)
65 nspire_auxdata, NULL); 63 nspire_auxdata, NULL);
66} 64}
67 65
68static void __init nspire_init_time(void)
69{
70 of_clk_init(NULL);
71 clocksource_of_init();
72}
73
74static void nspire_restart(char mode, const char *cmd) 66static void nspire_restart(char mode, const char *cmd)
75{ 67{
76 void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K); 68 void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K);
@@ -83,7 +75,6 @@ static void nspire_restart(char mode, const char *cmd)
83DT_MACHINE_START(NSPIRE, "TI-NSPIRE") 75DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
84 .dt_compat = nspire_dt_match, 76 .dt_compat = nspire_dt_match,
85 .map_io = nspire_map_io, 77 .map_io = nspire_map_io,
86 .init_time = nspire_init_time,
87 .init_machine = nspire_init, 78 .init_machine = nspire_init,
88 .restart = nspire_restart, 79 .restart = nspire_restart,
89MACHINE_END 80MACHINE_END
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b5fb5f7992df..c94624429680 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -8,7 +8,6 @@ config ARCH_OMAP2
8 select CPU_V6 8 select CPU_V6
9 select MULTI_IRQ_HANDLER 9 select MULTI_IRQ_HANDLER
10 select SOC_HAS_OMAP2_SDRC 10 select SOC_HAS_OMAP2_SDRC
11 select COMMON_CLK
12 11
13config ARCH_OMAP3 12config ARCH_OMAP3
14 bool "TI OMAP3" 13 bool "TI OMAP3"
@@ -22,7 +21,6 @@ config ARCH_OMAP3
22 select PM_OPP if PM 21 select PM_OPP if PM
23 select PM_RUNTIME if CPU_IDLE 22 select PM_RUNTIME if CPU_IDLE
24 select SOC_HAS_OMAP2_SDRC 23 select SOC_HAS_OMAP2_SDRC
25 select COMMON_CLK
26 select USB_ARCH_HAS_EHCI if USB_SUPPORT 24 select USB_ARCH_HAS_EHCI if USB_SUPPORT
27 25
28config ARCH_OMAP4 26config ARCH_OMAP4
@@ -45,7 +43,6 @@ config ARCH_OMAP4
45 select PM_OPP if PM 43 select PM_OPP if PM
46 select PM_RUNTIME if CPU_IDLE 44 select PM_RUNTIME if CPU_IDLE
47 select USB_ARCH_HAS_EHCI if USB_SUPPORT 45 select USB_ARCH_HAS_EHCI if USB_SUPPORT
48 select COMMON_CLK
49 select ARM_ERRATA_754322 46 select ARM_ERRATA_754322
50 select ARM_ERRATA_775420 47 select ARM_ERRATA_775420
51 48
@@ -59,7 +56,6 @@ config SOC_OMAP5
59 select HAVE_ARM_SCU if SMP 56 select HAVE_ARM_SCU if SMP
60 select HAVE_ARM_TWD if LOCAL_TIMERS 57 select HAVE_ARM_TWD if LOCAL_TIMERS
61 select HAVE_SMP 58 select HAVE_SMP
62 select COMMON_CLK
63 select HAVE_ARM_ARCH_TIMER 59 select HAVE_ARM_ARCH_TIMER
64 select ARM_ERRATA_798181 if SMP 60 select ARM_ERRATA_798181 if SMP
65 61
@@ -70,7 +66,6 @@ config SOC_AM33XX
70 select ARM_CPU_SUSPEND if PM 66 select ARM_CPU_SUSPEND if PM
71 select CPU_V7 67 select CPU_V7
72 select MULTI_IRQ_HANDLER 68 select MULTI_IRQ_HANDLER
73 select COMMON_CLK
74 69
75config SOC_AM43XX 70config SOC_AM43XX
76 bool "TI AM43x" 71 bool "TI AM43x"
@@ -79,7 +74,6 @@ config SOC_AM43XX
79 select ARCH_OMAP2PLUS 74 select ARCH_OMAP2PLUS
80 select MULTI_IRQ_HANDLER 75 select MULTI_IRQ_HANDLER
81 select ARM_GIC 76 select ARM_GIC
82 select COMMON_CLK
83 select MACH_OMAP_GENERIC 77 select MACH_OMAP_GENERIC
84 78
85config ARCH_OMAP2PLUS 79config ARCH_OMAP2PLUS
@@ -89,11 +83,10 @@ config ARCH_OMAP2PLUS
89 select ARCH_HAS_HOLES_MEMORYMODEL 83 select ARCH_HAS_HOLES_MEMORYMODEL
90 select ARCH_OMAP 84 select ARCH_OMAP
91 select ARCH_REQUIRE_GPIOLIB 85 select ARCH_REQUIRE_GPIOLIB
92 select CLKDEV_LOOKUP
93 select CLKSRC_MMIO 86 select CLKSRC_MMIO
87 select COMMON_CLK
94 select GENERIC_CLOCKEVENTS 88 select GENERIC_CLOCKEVENTS
95 select GENERIC_IRQ_CHIP 89 select GENERIC_IRQ_CHIP
96 select HAVE_CLK
97 select OMAP_DM_TIMER 90 select OMAP_DM_TIMER
98 select PINCTRL 91 select PINCTRL
99 select PROC_DEVICETREE if PROC_FS 92 select PROC_DEVICETREE if PROC_FS
diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c
index 25b1feed480d..c78e893eba7d 100644
--- a/arch/arm/mach-omap2/clkt2xxx_apll.c
+++ b/arch/arm/mach-omap2/clkt2xxx_apll.c
@@ -52,7 +52,7 @@ static bool omap2xxx_clk_apll_locked(struct clk_hw *hw)
52 52
53 apll_mask = EN_APLL_LOCKED << clk->enable_bit; 53 apll_mask = EN_APLL_LOCKED << clk->enable_bit;
54 54
55 r = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); 55 r = omap2xxx_cm_get_pll_status();
56 56
57 return ((r & apll_mask) == apll_mask) ? true : false; 57 return ((r & apll_mask) == apll_mask) ? true : false;
58} 58}
@@ -126,7 +126,7 @@ u32 omap2xxx_get_apll_clkin(void)
126{ 126{
127 u32 aplls, srate = 0; 127 u32 aplls, srate = 0;
128 128
129 aplls = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL1); 129 aplls = omap2xxx_cm_get_pll_config();
130 aplls &= OMAP24XX_APLLS_CLKIN_MASK; 130 aplls &= OMAP24XX_APLLS_CLKIN_MASK;
131 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT; 131 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
132 132
diff --git a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
index d8620105c42a..3ff32543493c 100644
--- a/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
+++ b/arch/arm/mach-omap2/clkt2xxx_dpllcore.c
@@ -60,8 +60,7 @@ unsigned long omap2xxx_clk_get_core_rate(void)
60 60
61 core_clk = omap2_get_dpll_rate(dpll_core_ck); 61 core_clk = omap2_get_dpll_rate(dpll_core_ck);
62 62
63 v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2); 63 v = omap2xxx_cm_get_core_clk_src();
64 v &= OMAP24XX_CORE_CLK_SRC_MASK;
65 64
66 if (v == CORE_CLK_SRC_32K) 65 if (v == CORE_CLK_SRC_32K)
67 core_clk = 32768; 66 core_clk = 32768;
@@ -79,8 +78,7 @@ static long omap2_dpllcore_round_rate(unsigned long target_rate)
79{ 78{
80 u32 high, low, core_clk_src; 79 u32 high, low, core_clk_src;
81 80
82 core_clk_src = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2); 81 core_clk_src = omap2xxx_cm_get_core_clk_src();
83 core_clk_src &= OMAP24XX_CORE_CLK_SRC_MASK;
84 82
85 if (core_clk_src == CORE_CLK_SRC_DPLL) { /* DPLL clockout */ 83 if (core_clk_src == CORE_CLK_SRC_DPLL) { /* DPLL clockout */
86 high = curr_prcm_set->dpll_speed * 2; 84 high = curr_prcm_set->dpll_speed * 2;
@@ -120,8 +118,7 @@ int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate,
120 const struct dpll_data *dd; 118 const struct dpll_data *dd;
121 119
122 cur_rate = omap2xxx_clk_get_core_rate(); 120 cur_rate = omap2xxx_clk_get_core_rate();
123 mult = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2); 121 mult = omap2xxx_cm_get_core_clk_src();
124 mult &= OMAP24XX_CORE_CLK_SRC_MASK;
125 122
126 if ((rate == (cur_rate / 2)) && (mult == 2)) { 123 if ((rate == (cur_rate / 2)) && (mult == 2)) {
127 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1); 124 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL, 1);
@@ -145,7 +142,7 @@ int omap2_reprogram_dpllcore(struct clk_hw *hw, unsigned long rate,
145 tmpset.cm_clksel1_pll &= ~(dd->mult_mask | 142 tmpset.cm_clksel1_pll &= ~(dd->mult_mask |
146 dd->div1_mask); 143 dd->div1_mask);
147 div = ((curr_prcm_set->xtal_speed / 1000000) - 1); 144 div = ((curr_prcm_set->xtal_speed / 1000000) - 1);
148 tmpset.cm_clksel2_pll = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2); 145 tmpset.cm_clksel2_pll = omap2xxx_cm_get_core_pll_config();
149 tmpset.cm_clksel2_pll &= ~OMAP24XX_CORE_CLK_SRC_MASK; 146 tmpset.cm_clksel2_pll &= ~OMAP24XX_CORE_CLK_SRC_MASK;
150 if (rate > low) { 147 if (rate > low) {
151 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL_X2; 148 tmpset.cm_clksel2_pll |= CORE_CLK_SRC_DPLL_X2;
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
index ae2b35e76dc8..b935ed2922d8 100644
--- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
+++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
@@ -98,7 +98,7 @@ long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
98int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate, 98int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
99 unsigned long parent_rate) 99 unsigned long parent_rate)
100{ 100{
101 u32 cur_rate, done_rate, bypass = 0, tmp; 101 u32 cur_rate, done_rate, bypass = 0;
102 const struct prcm_config *prcm; 102 const struct prcm_config *prcm;
103 unsigned long found_speed = 0; 103 unsigned long found_speed = 0;
104 unsigned long flags; 104 unsigned long flags;
@@ -141,23 +141,11 @@ int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
141 else 141 else
142 done_rate = CORE_CLK_SRC_DPLL; 142 done_rate = CORE_CLK_SRC_DPLL;
143 143
144 /* MPU divider */ 144 omap2xxx_cm_set_mod_dividers(prcm->cm_clksel_mpu,
145 omap2_cm_write_mod_reg(prcm->cm_clksel_mpu, MPU_MOD, CM_CLKSEL); 145 prcm->cm_clksel_dsp,
146 146 prcm->cm_clksel_gfx,
147 /* dsp + iva1 div(2420), iva2.1(2430) */ 147 prcm->cm_clksel1_core,
148 omap2_cm_write_mod_reg(prcm->cm_clksel_dsp, 148 prcm->cm_clksel_mdm);
149 OMAP24XX_DSP_MOD, CM_CLKSEL);
150
151 omap2_cm_write_mod_reg(prcm->cm_clksel_gfx, GFX_MOD, CM_CLKSEL);
152
153 /* Major subsystem dividers */
154 tmp = omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK;
155 omap2_cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD,
156 CM_CLKSEL1);
157
158 if (cpu_is_omap2430())
159 omap2_cm_write_mod_reg(prcm->cm_clksel_mdm,
160 OMAP2430_MDM_MOD, CM_CLKSEL);
161 149
162 /* x2 to enter omap2xxx_sdrc_init_params() */ 150 /* x2 to enter omap2xxx_sdrc_init_params() */
163 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1); 151 omap2xxx_sdrc_reprogram(CORE_CLK_SRC_DPLL_X2, 1);
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 0c38ca96c840..c7c5d31e9082 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -543,6 +543,44 @@ int omap2_clk_disable_autoidle_all(void)
543} 543}
544 544
545/** 545/**
546 * omap2_clk_deny_idle - disable autoidle on an OMAP clock
547 * @clk: struct clk * to disable autoidle for
548 *
549 * Disable autoidle on an OMAP clock.
550 */
551int omap2_clk_deny_idle(struct clk *clk)
552{
553 struct clk_hw_omap *c;
554
555 if (__clk_get_flags(clk) & CLK_IS_BASIC)
556 return -EINVAL;
557
558 c = to_clk_hw_omap(__clk_get_hw(clk));
559 if (c->ops && c->ops->deny_idle)
560 c->ops->deny_idle(c);
561 return 0;
562}
563
564/**
565 * omap2_clk_allow_idle - enable autoidle on an OMAP clock
566 * @clk: struct clk * to enable autoidle for
567 *
568 * Enable autoidle on an OMAP clock.
569 */
570int omap2_clk_allow_idle(struct clk *clk)
571{
572 struct clk_hw_omap *c;
573
574 if (__clk_get_flags(clk) & CLK_IS_BASIC)
575 return -EINVAL;
576
577 c = to_clk_hw_omap(__clk_get_hw(clk));
578 if (c->ops && c->ops->allow_idle)
579 c->ops->allow_idle(c);
580 return 0;
581}
582
583/**
546 * omap2_clk_enable_init_clocks - prepare & enable a list of clocks 584 * omap2_clk_enable_init_clocks - prepare & enable a list of clocks
547 * @clk_names: ptr to an array of strings of clock names to enable 585 * @clk_names: ptr to an array of strings of clock names to enable
548 * @num_clocks: number of clock names in @clk_names 586 * @num_clocks: number of clock names in @clk_names
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 7aa32cd292f9..82916cc82c92 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -411,6 +411,8 @@ void omap2_clk_dflt_find_idlest(struct clk_hw_omap *clk,
411void omap2_init_clk_hw_omap_clocks(struct clk *clk); 411void omap2_init_clk_hw_omap_clocks(struct clk *clk);
412int omap2_clk_enable_autoidle_all(void); 412int omap2_clk_enable_autoidle_all(void);
413int omap2_clk_disable_autoidle_all(void); 413int omap2_clk_disable_autoidle_all(void);
414int omap2_clk_allow_idle(struct clk *clk);
415int omap2_clk_deny_idle(struct clk *clk);
414void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks); 416void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks);
415int omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name); 417int omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name);
416void omap2_clk_print_new_rates(const char *hfclkin_ck_name, 418void omap2_clk_print_new_rates(const char *hfclkin_ck_name,
diff --git a/arch/arm/mach-omap2/cm2xxx.c b/arch/arm/mach-omap2/cm2xxx.c
index 6774a53a3874..ce25abbcffae 100644
--- a/arch/arm/mach-omap2/cm2xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx.c
@@ -327,6 +327,73 @@ struct clkdm_ops omap2_clkdm_operations = {
327 .clkdm_clk_disable = omap2xxx_clkdm_clk_disable, 327 .clkdm_clk_disable = omap2xxx_clkdm_clk_disable,
328}; 328};
329 329
330int omap2xxx_cm_fclks_active(void)
331{
332 u32 f1, f2;
333
334 f1 = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
335 f2 = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
336
337 return (f1 | f2) ? 1 : 0;
338}
339
340int omap2xxx_cm_mpu_retention_allowed(void)
341{
342 u32 l;
343
344 /* Check for MMC, UART2, UART1, McSPI2, McSPI1 and DSS1. */
345 l = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
346 if (l & (OMAP2420_EN_MMC_MASK | OMAP24XX_EN_UART2_MASK |
347 OMAP24XX_EN_UART1_MASK | OMAP24XX_EN_MCSPI2_MASK |
348 OMAP24XX_EN_MCSPI1_MASK | OMAP24XX_EN_DSS1_MASK))
349 return 0;
350 /* Check for UART3. */
351 l = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
352 if (l & OMAP24XX_EN_UART3_MASK)
353 return 0;
354
355 return 1;
356}
357
358u32 omap2xxx_cm_get_core_clk_src(void)
359{
360 u32 v;
361
362 v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
363 v &= OMAP24XX_CORE_CLK_SRC_MASK;
364
365 return v;
366}
367
368u32 omap2xxx_cm_get_core_pll_config(void)
369{
370 return omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL2);
371}
372
373u32 omap2xxx_cm_get_pll_config(void)
374{
375 return omap2_cm_read_mod_reg(PLL_MOD, CM_CLKSEL1);
376}
377
378u32 omap2xxx_cm_get_pll_status(void)
379{
380 return omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
381}
382
383void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core, u32 mdm)
384{
385 u32 tmp;
386
387 omap2_cm_write_mod_reg(mpu, MPU_MOD, CM_CLKSEL);
388 omap2_cm_write_mod_reg(dsp, OMAP24XX_DSP_MOD, CM_CLKSEL);
389 omap2_cm_write_mod_reg(gfx, GFX_MOD, CM_CLKSEL);
390 tmp = omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) &
391 OMAP24XX_CLKSEL_DSS2_MASK;
392 omap2_cm_write_mod_reg(core | tmp, CORE_MOD, CM_CLKSEL1);
393 if (cpu_is_omap2430())
394 omap2_cm_write_mod_reg(mdm, OMAP2430_MDM_MOD, CM_CLKSEL);
395}
396
330/* 397/*
331 * 398 *
332 */ 399 */
diff --git a/arch/arm/mach-omap2/cm2xxx.h b/arch/arm/mach-omap2/cm2xxx.h
index 4cbb39b051d2..891d81c3c8f4 100644
--- a/arch/arm/mach-omap2/cm2xxx.h
+++ b/arch/arm/mach-omap2/cm2xxx.h
@@ -62,6 +62,14 @@ extern int omap2xxx_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id,
62 u8 idlest_shift); 62 u8 idlest_shift);
63extern int omap2xxx_cm_split_idlest_reg(void __iomem *idlest_reg, 63extern int omap2xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
64 s16 *prcm_inst, u8 *idlest_reg_id); 64 s16 *prcm_inst, u8 *idlest_reg_id);
65extern int omap2xxx_cm_fclks_active(void);
66extern int omap2xxx_cm_mpu_retention_allowed(void);
67extern u32 omap2xxx_cm_get_core_clk_src(void);
68extern u32 omap2xxx_cm_get_core_pll_config(void);
69extern u32 omap2xxx_cm_get_pll_config(void);
70extern u32 omap2xxx_cm_get_pll_status(void);
71extern void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core,
72 u32 mdm);
65 73
66extern int __init omap2xxx_cm_init(void); 74extern int __init omap2xxx_cm_init(void);
67 75
diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c
index 9061c307d915..f6f028867bfe 100644
--- a/arch/arm/mach-omap2/cm3xxx.c
+++ b/arch/arm/mach-omap2/cm3xxx.c
@@ -636,6 +636,28 @@ void omap3_cm_restore_context(void)
636 OMAP3_CM_CLKOUT_CTRL_OFFSET); 636 OMAP3_CM_CLKOUT_CTRL_OFFSET);
637} 637}
638 638
639void omap3_cm_save_scratchpad_contents(u32 *ptr)
640{
641 *ptr++ = omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL);
642 *ptr++ = omap2_cm_read_mod_reg(WKUP_MOD, CM_CLKSEL);
643 *ptr++ = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
644
645 /*
646 * As per erratum i671, ROM code does not respect the PER DPLL
647 * programming scheme if CM_AUTOIDLE_PLL..AUTO_PERIPH_DPLL == 1.
648 * Then, in anycase, clear these bits to avoid extra latencies.
649 */
650 *ptr++ = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE) &
651 ~OMAP3430_AUTO_PERIPH_DPLL_MASK;
652 *ptr++ = omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL1_PLL);
653 *ptr++ = omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL2_PLL);
654 *ptr++ = omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL3);
655 *ptr++ = omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_CLKEN_PLL);
656 *ptr++ = omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL);
657 *ptr++ = omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL);
658 *ptr++ = omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL);
659}
660
639/* 661/*
640 * 662 *
641 */ 663 */
diff --git a/arch/arm/mach-omap2/cm3xxx.h b/arch/arm/mach-omap2/cm3xxx.h
index e8e146f4a43f..8224c91b4d7a 100644
--- a/arch/arm/mach-omap2/cm3xxx.h
+++ b/arch/arm/mach-omap2/cm3xxx.h
@@ -83,6 +83,7 @@ extern int omap3xxx_cm_split_idlest_reg(void __iomem *idlest_reg,
83 83
84extern void omap3_cm_save_context(void); 84extern void omap3_cm_save_context(void);
85extern void omap3_cm_restore_context(void); 85extern void omap3_cm_restore_context(void);
86extern void omap3_cm_save_scratchpad_contents(u32 *ptr);
86 87
87extern int __init omap3xxx_cm_init(void); 88extern int __init omap3xxx_cm_init(void);
88 89
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 31e0dfe4a4ea..44bb4d544dcf 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -46,17 +46,7 @@ struct omap3_scratchpad {
46struct omap3_scratchpad_prcm_block { 46struct omap3_scratchpad_prcm_block {
47 u32 prm_clksrc_ctrl; 47 u32 prm_clksrc_ctrl;
48 u32 prm_clksel; 48 u32 prm_clksel;
49 u32 cm_clksel_core; 49 u32 cm_contents[11];
50 u32 cm_clksel_wkup;
51 u32 cm_clken_pll;
52 u32 cm_autoidle_pll;
53 u32 cm_clksel1_pll;
54 u32 cm_clksel2_pll;
55 u32 cm_clksel3_pll;
56 u32 cm_clken_pll_mpu;
57 u32 cm_autoidle_pll_mpu;
58 u32 cm_clksel1_pll_mpu;
59 u32 cm_clksel2_pll_mpu;
60 u32 prcm_block_size; 50 u32 prcm_block_size;
61}; 51};
62 52
@@ -347,34 +337,9 @@ void omap3_save_scratchpad_contents(void)
347 prcm_block_contents.prm_clksel = 337 prcm_block_contents.prm_clksel =
348 omap2_prm_read_mod_reg(OMAP3430_CCR_MOD, 338 omap2_prm_read_mod_reg(OMAP3430_CCR_MOD,
349 OMAP3_PRM_CLKSEL_OFFSET); 339 OMAP3_PRM_CLKSEL_OFFSET);
350 prcm_block_contents.cm_clksel_core = 340
351 omap2_cm_read_mod_reg(CORE_MOD, CM_CLKSEL); 341 omap3_cm_save_scratchpad_contents(prcm_block_contents.cm_contents);
352 prcm_block_contents.cm_clksel_wkup = 342
353 omap2_cm_read_mod_reg(WKUP_MOD, CM_CLKSEL);
354 prcm_block_contents.cm_clken_pll =
355 omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN);
356 /*
357 * As per erratum i671, ROM code does not respect the PER DPLL
358 * programming scheme if CM_AUTOIDLE_PLL..AUTO_PERIPH_DPLL == 1.
359 * Then, in anycase, clear these bits to avoid extra latencies.
360 */
361 prcm_block_contents.cm_autoidle_pll =
362 omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE) &
363 ~OMAP3430_AUTO_PERIPH_DPLL_MASK;
364 prcm_block_contents.cm_clksel1_pll =
365 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL1_PLL);
366 prcm_block_contents.cm_clksel2_pll =
367 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL2_PLL);
368 prcm_block_contents.cm_clksel3_pll =
369 omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL3);
370 prcm_block_contents.cm_clken_pll_mpu =
371 omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_CLKEN_PLL);
372 prcm_block_contents.cm_autoidle_pll_mpu =
373 omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL);
374 prcm_block_contents.cm_clksel1_pll_mpu =
375 omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL);
376 prcm_block_contents.cm_clksel2_pll_mpu =
377 omap2_cm_read_mod_reg(MPU_MOD, OMAP3430_CM_CLKSEL2_PLL);
378 prcm_block_contents.prcm_block_size = 0x0; 343 prcm_block_contents.prcm_block_size = 0x0;
379 344
380 /* Populate the SDRC block contents */ 345 /* Populate the SDRC block contents */
@@ -604,4 +569,15 @@ int omap3_ctrl_save_padconf(void)
604 return 0; 569 return 0;
605} 570}
606 571
572/**
573 * omap3_ctrl_set_iva_bootmode_idle - sets the IVA2 bootmode to idle
574 *
575 * Sets the bootmode for IVA2 to idle. This is needed by the PM code to
576 * force disable IVA2 so that it does not prevent any low-power states.
577 */
578void omap3_ctrl_set_iva_bootmode_idle(void)
579{
580 omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
581 OMAP343X_CONTROL_IVA2_BOOTMOD);
582}
607#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ 583#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index f7d7c2ef1b40..da054801b114 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -427,6 +427,7 @@ extern void omap_ctrl_write_dsp_boot_addr(u32 bootaddr);
427extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode); 427extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode);
428extern void omap3630_ctrl_disable_rta(void); 428extern void omap3630_ctrl_disable_rta(void);
429extern int omap3_ctrl_save_padconf(void); 429extern int omap3_ctrl_save_padconf(void);
430extern void omap3_ctrl_set_iva_bootmode_idle(void);
430extern void omap2_set_globals_control(void __iomem *ctrl, 431extern void omap2_set_globals_control(void __iomem *ctrl,
431 void __iomem *ctrl_pad); 432 void __iomem *ctrl_pad);
432#else 433#else
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 5d8768075dd9..b4ac3af1160c 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -25,6 +25,7 @@
25 25
26#include "soc.h" 26#include "soc.h"
27#include "omap_device.h" 27#include "omap_device.h"
28#include "clock.h"
28 29
29/* 30/*
30 * FIXME: Find a mechanism to enable/disable runtime the McBSP ICLK autoidle. 31 * FIXME: Find a mechanism to enable/disable runtime the McBSP ICLK autoidle.
@@ -33,22 +34,18 @@
33#include "cm3xxx.h" 34#include "cm3xxx.h"
34#include "cm-regbits-34xx.h" 35#include "cm-regbits-34xx.h"
35 36
37static struct clk *mcbsp_iclks[5];
38
36static int omap3_enable_st_clock(unsigned int id, bool enable) 39static int omap3_enable_st_clock(unsigned int id, bool enable)
37{ 40{
38 unsigned int w;
39
40 /* 41 /*
41 * Sidetone uses McBSP ICLK - which must not idle when sidetones 42 * Sidetone uses McBSP ICLK - which must not idle when sidetones
42 * are enabled or sidetones start sounding ugly. 43 * are enabled or sidetones start sounding ugly.
43 */ 44 */
44 w = omap2_cm_read_mod_reg(OMAP3430_PER_MOD, CM_AUTOIDLE);
45 if (enable) 45 if (enable)
46 w &= ~(1 << (id - 2)); 46 return omap2_clk_deny_idle(mcbsp_iclks[id]);
47 else 47 else
48 w |= 1 << (id - 2); 48 return omap2_clk_allow_idle(mcbsp_iclks[id]);
49 omap2_cm_write_mod_reg(w, OMAP3430_PER_MOD, CM_AUTOIDLE);
50
51 return 0;
52} 49}
53 50
54static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) 51static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
@@ -58,6 +55,7 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
58 struct omap_hwmod *oh_device[2]; 55 struct omap_hwmod *oh_device[2];
59 struct omap_mcbsp_platform_data *pdata = NULL; 56 struct omap_mcbsp_platform_data *pdata = NULL;
60 struct platform_device *pdev; 57 struct platform_device *pdev;
58 char clk_name[11];
61 59
62 sscanf(oh->name, "mcbsp%d", &id); 60 sscanf(oh->name, "mcbsp%d", &id);
63 61
@@ -99,6 +97,8 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
99 oh_device[1] = omap_hwmod_lookup(( 97 oh_device[1] = omap_hwmod_lookup((
100 (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone); 98 (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone);
101 pdata->enable_st_clock = omap3_enable_st_clock; 99 pdata->enable_st_clock = omap3_enable_st_clock;
100 sprintf(clk_name, "mcbsp%d_ick", id);
101 mcbsp_iclks[id] = clk_get(NULL, clk_name);
102 count++; 102 count++;
103 } 103 }
104 pdev = omap_device_build_ss(name, id, oh_device, count, pdata, 104 pdev = omap_device_build_ss(name, id, oh_device, count, pdata,
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index ce956b0a7ba4..8c0759496c8d 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -62,16 +62,6 @@ static struct clockdomain *dsp_clkdm, *mpu_clkdm, *wkup_clkdm, *gfx_clkdm;
62 62
63static struct clk *osc_ck, *emul_ck; 63static struct clk *osc_ck, *emul_ck;
64 64
65static int omap2_fclks_active(void)
66{
67 u32 f1, f2;
68
69 f1 = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
70 f2 = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
71
72 return (f1 | f2) ? 1 : 0;
73}
74
75static int omap2_enter_full_retention(void) 65static int omap2_enter_full_retention(void)
76{ 66{
77 u32 l; 67 u32 l;
@@ -142,17 +132,7 @@ static int sti_console_enabled;
142 132
143static int omap2_allow_mpu_retention(void) 133static int omap2_allow_mpu_retention(void)
144{ 134{
145 u32 l; 135 if (!omap2xxx_cm_mpu_retention_allowed())
146
147 /* Check for MMC, UART2, UART1, McSPI2, McSPI1 and DSS1. */
148 l = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1);
149 if (l & (OMAP2420_EN_MMC_MASK | OMAP24XX_EN_UART2_MASK |
150 OMAP24XX_EN_UART1_MASK | OMAP24XX_EN_MCSPI2_MASK |
151 OMAP24XX_EN_MCSPI1_MASK | OMAP24XX_EN_DSS1_MASK))
152 return 0;
153 /* Check for UART3. */
154 l = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2);
155 if (l & OMAP24XX_EN_UART3_MASK)
156 return 0; 136 return 0;
157 if (sti_console_enabled) 137 if (sti_console_enabled)
158 return 0; 138 return 0;
@@ -188,7 +168,7 @@ static void omap2_enter_mpu_retention(void)
188 168
189static int omap2_can_sleep(void) 169static int omap2_can_sleep(void)
190{ 170{
191 if (omap2_fclks_active()) 171 if (omap2xxx_cm_fclks_active())
192 return 0; 172 return 0;
193 if (__clk_is_enabled(osc_ck)) 173 if (__clk_is_enabled(osc_ck))
194 return 0; 174 return 0;
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 5a2d8034c8de..93b80e5da8d4 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -430,8 +430,7 @@ static void __init omap3_iva_idle(void)
430 OMAP3430_IVA2_MOD, CM_FCLKEN); 430 OMAP3430_IVA2_MOD, CM_FCLKEN);
431 431
432 /* Set IVA2 boot mode to 'idle' */ 432 /* Set IVA2 boot mode to 'idle' */
433 omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE, 433 omap3_ctrl_set_iva_bootmode_idle();
434 OMAP343X_CONTROL_IVA2_BOOTMOD);
435 434
436 /* Un-reset IVA2 */ 435 /* Un-reset IVA2 */
437 omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL); 436 omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index e110b6d4ae8c..d49aff74de98 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -6,7 +6,6 @@
6 * Licensed under GPLv2 or later. 6 * Licensed under GPLv2 or later.
7 */ 7 */
8 8
9#include <linux/clocksource.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <asm/sizes.h> 11#include <asm/sizes.h>
@@ -21,13 +20,6 @@ void __init sirfsoc_init_late(void)
21 sirfsoc_pm_init(); 20 sirfsoc_pm_init();
22} 21}
23 22
24static __init void sirfsoc_init_time(void)
25{
26 /* initialize clocking early, we want to set the OS timer */
27 sirfsoc_of_clk_init();
28 clocksource_of_init();
29}
30
31static __init void sirfsoc_map_io(void) 23static __init void sirfsoc_map_io(void)
32{ 24{
33 sirfsoc_map_lluart(); 25 sirfsoc_map_lluart();
@@ -43,7 +35,6 @@ static const char *atlas6_dt_match[] __initdata = {
43DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") 35DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
44 /* Maintainer: Barry Song <baohua.song@csr.com> */ 36 /* Maintainer: Barry Song <baohua.song@csr.com> */
45 .map_io = sirfsoc_map_io, 37 .map_io = sirfsoc_map_io,
46 .init_time = sirfsoc_init_time,
47 .init_late = sirfsoc_init_late, 38 .init_late = sirfsoc_init_late,
48 .dt_compat = atlas6_dt_match, 39 .dt_compat = atlas6_dt_match,
49 .restart = sirfsoc_restart, 40 .restart = sirfsoc_restart,
@@ -59,7 +50,6 @@ static const char *prima2_dt_match[] __initdata = {
59DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") 50DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
60 /* Maintainer: Barry Song <baohua.song@csr.com> */ 51 /* Maintainer: Barry Song <baohua.song@csr.com> */
61 .map_io = sirfsoc_map_io, 52 .map_io = sirfsoc_map_io,
62 .init_time = sirfsoc_init_time,
63 .dma_zone_size = SZ_256M, 53 .dma_zone_size = SZ_256M,
64 .init_late = sirfsoc_init_late, 54 .init_late = sirfsoc_init_late,
65 .dt_compat = prima2_dt_match, 55 .dt_compat = prima2_dt_match,
@@ -77,7 +67,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
77 /* Maintainer: Barry Song <baohua.song@csr.com> */ 67 /* Maintainer: Barry Song <baohua.song@csr.com> */
78 .smp = smp_ops(sirfsoc_smp_ops), 68 .smp = smp_ops(sirfsoc_smp_ops),
79 .map_io = sirfsoc_map_io, 69 .map_io = sirfsoc_map_io,
80 .init_time = sirfsoc_init_time,
81 .init_late = sirfsoc_init_late, 70 .init_late = sirfsoc_init_late,
82 .dt_compat = marco_dt_match, 71 .dt_compat = marco_dt_match,
83 .restart = sirfsoc_restart, 72 .restart = sirfsoc_restart,
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index a6304858474a..4b768060a858 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void);
23extern void sirfsoc_cpu_die(unsigned int cpu); 23extern void sirfsoc_cpu_die(unsigned int cpu);
24 24
25extern void __init sirfsoc_of_irq_init(void); 25extern void __init sirfsoc_of_irq_init(void);
26extern void __init sirfsoc_of_clk_init(void);
27extern void sirfsoc_restart(enum reboot_mode, const char *); 26extern void sirfsoc_restart(enum reboot_mode, const char *);
28extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); 27extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);
29 28
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 724d2d81f976..82c0b0709712 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -19,18 +19,10 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <linux/irqchip.h> 21#include <linux/irqchip.h>
22#include <linux/dw_apb_timer.h>
23#include <linux/clk-provider.h>
24#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 23#include <asm/mach/map.h>
26#include <asm/hardware/cache-l2x0.h> 24#include <asm/hardware/cache-l2x0.h>
27 25
28static void __init rockchip_timer_init(void)
29{
30 of_clk_init(NULL);
31 clocksource_of_init();
32}
33
34static void __init rockchip_dt_init(void) 26static void __init rockchip_dt_init(void)
35{ 27{
36 l2x0_of_init(0, ~0UL); 28 l2x0_of_init(0, ~0UL);
@@ -47,6 +39,5 @@ static const char * const rockchip_board_dt_compat[] = {
47 39
48DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") 40DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)")
49 .init_machine = rockchip_dt_init, 41 .init_machine = rockchip_dt_init,
50 .init_time = rockchip_timer_init,
51 .dt_compat = rockchip_board_dt_compat, 42 .dt_compat = rockchip_board_dt_compat,
52MACHINE_END 43MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 041da5172423..a2d5bb33647d 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -3,16 +3,7 @@
3# 3#
4# Licensed under GPLv2 4# Licensed under GPLv2
5 5
6# temporary until we can eliminate all drivers using it. 6if ARCH_S3C64XX
7config PLAT_S3C64XX
8 bool
9 depends on ARCH_S3C64XX
10 default y
11 select PM_GENERIC_DOMAINS
12 select SAMSUNG_WAKEMASK
13 help
14 Base platform code for any Samsung S3C64XX device
15
16 7
17# Configuration options for the S3C6410 CPU 8# Configuration options for the S3C6410 CPU
18 9
@@ -306,3 +297,5 @@ config MACH_WLF_CRAGG_6410
306 select SAMSUNG_GPIO_EXTRA128 297 select SAMSUNG_GPIO_EXTRA128
307 help 298 help
308 Machine support for the Wolfson Cragganmore S3C6410 variant. 299 Machine support for the Wolfson Cragganmore S3C6410 variant.
300
301endif
diff --git a/arch/arm/mach-shark/Makefile b/arch/arm/mach-shark/Makefile
deleted file mode 100644
index 29657183c452..000000000000
--- a/arch/arm/mach-shark/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Object file lists.
6
7obj-y := core.o dma.o irq.o pci.o leds.o
8obj-m :=
9obj-n :=
10obj- :=
diff --git a/arch/arm/mach-shark/Makefile.boot b/arch/arm/mach-shark/Makefile.boot
deleted file mode 100644
index e40e24e4ca34..000000000000
--- a/arch/arm/mach-shark/Makefile.boot
+++ /dev/null
@@ -1,2 +0,0 @@
1 zreladdr-y += 0x08008000
2
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
deleted file mode 100644
index 1d32c5e8eab6..000000000000
--- a/arch/arm/mach-shark/core.c
+++ /dev/null
@@ -1,146 +0,0 @@
1/*
2 * linux/arch/arm/mach-shark/arch.c
3 *
4 * Architecture specific stuff.
5 */
6#include <linux/kernel.h>
7#include <linux/init.h>
8#include <linux/interrupt.h>
9#include <linux/irq.h>
10#include <linux/sched.h>
11#include <linux/serial_8250.h>
12#include <linux/io.h>
13#include <linux/cpu.h>
14#include <linux/reboot.h>
15
16#include <asm/setup.h>
17#include <asm/mach-types.h>
18#include <asm/param.h>
19#include <asm/system_misc.h>
20
21#include <asm/mach/map.h>
22#include <asm/mach/arch.h>
23#include <asm/mach/time.h>
24
25#define ROMCARD_SIZE 0x08000000
26#define ROMCARD_START 0x10000000
27
28static void shark_restart(enum reboot_mode mode, const char *cmd)
29{
30 short temp;
31 /* Reset the Machine via pc[3] of the sequoia chipset */
32 outw(0x09,0x24);
33 temp=inw(0x26);
34 temp = temp | (1<<3) | (1<<10);
35 outw(0x09,0x24);
36 outw(temp,0x26);
37}
38
39static struct plat_serial8250_port serial_platform_data[] = {
40 {
41 .iobase = 0x3f8,
42 .irq = 4,
43 .uartclk = 1843200,
44 .regshift = 0,
45 .iotype = UPIO_PORT,
46 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
47 },
48 {
49 .iobase = 0x2f8,
50 .irq = 3,
51 .uartclk = 1843200,
52 .regshift = 0,
53 .iotype = UPIO_PORT,
54 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
55 },
56 { },
57};
58
59static struct platform_device serial_device = {
60 .name = "serial8250",
61 .id = PLAT8250_DEV_PLATFORM,
62 .dev = {
63 .platform_data = serial_platform_data,
64 },
65};
66
67static struct resource rtc_resources[] = {
68 [0] = {
69 .start = 0x70,
70 .end = 0x73,
71 .flags = IORESOURCE_IO,
72 },
73 [1] = {
74 .start = IRQ_ISA_RTC_ALARM,
75 .end = IRQ_ISA_RTC_ALARM,
76 .flags = IORESOURCE_IRQ,
77 }
78};
79
80static struct platform_device rtc_device = {
81 .name = "rtc_cmos",
82 .id = -1,
83 .resource = rtc_resources,
84 .num_resources = ARRAY_SIZE(rtc_resources),
85};
86
87static int __init shark_init(void)
88{
89 int ret;
90
91 if (machine_is_shark())
92 {
93 ret = platform_device_register(&rtc_device);
94 if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret);
95 ret = platform_device_register(&serial_device);
96 if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret);
97 }
98 return 0;
99}
100
101arch_initcall(shark_init);
102
103extern void shark_init_irq(void);
104
105#define IRQ_TIMER 0
106#define HZ_TIME ((1193180 + HZ/2) / HZ)
107
108static irqreturn_t
109shark_timer_interrupt(int irq, void *dev_id)
110{
111 timer_tick();
112 return IRQ_HANDLED;
113}
114
115static struct irqaction shark_timer_irq = {
116 .name = "Shark Timer Tick",
117 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
118 .handler = shark_timer_interrupt,
119};
120
121/*
122 * Set up timer interrupt, and return the current time in seconds.
123 */
124static void __init shark_timer_init(void)
125{
126 outb(0x34, 0x43); /* binary, mode 0, LSB/MSB, Ch 0 */
127 outb(HZ_TIME & 0xff, 0x40); /* LSB of count */
128 outb(HZ_TIME >> 8, 0x40);
129
130 setup_irq(IRQ_TIMER, &shark_timer_irq);
131}
132
133static void shark_init_early(void)
134{
135 cpu_idle_poll_ctrl(true);
136}
137
138MACHINE_START(SHARK, "Shark")
139 /* Maintainer: Alexander Schulz */
140 .atag_offset = 0x3000,
141 .init_early = shark_init_early,
142 .init_irq = shark_init_irq,
143 .init_time = shark_timer_init,
144 .dma_zone_size = SZ_4M,
145 .restart = shark_restart,
146MACHINE_END
diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c
deleted file mode 100644
index 10b5b8b3272a..000000000000
--- a/arch/arm/mach-shark/dma.c
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/arch/arm/mach-shark/dma.c
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * arch/arm/kernel/dma-ebsa285.c
8 * Copyright (C) 1998 Phil Blundell
9 */
10
11#include <linux/init.h>
12
13#include <asm/dma.h>
14#include <asm/mach/dma.h>
15
16static int __init shark_dma_init(void)
17{
18#ifdef CONFIG_ISA_DMA
19 isa_init_dma();
20#endif
21 return 0;
22}
23core_initcall(shark_dma_init);
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
deleted file mode 100644
index d129119a3f69..000000000000
--- a/arch/arm/mach-shark/include/mach/debug-macro.S
+++ /dev/null
@@ -1,34 +0,0 @@
1/* arch/arm/mach-shark/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
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
14 .macro addruart, rp, rv, tmp
15 mov \rp, #0x3f8
16 orr \rv, \rp, #0xfe000000
17 orr \rv, \rv, #0x00e00000
18 orr \rp, \rp, #0x40000000
19 .endm
20
21 .macro senduart,rd,rx
22 strb \rd, [\rx]
23 .endm
24
25 .macro waituart,rd,rx
26 .endm
27
28 .macro busyuart,rd,rx
29 mov \rd, #0
301001: add \rd, \rd, #1
31 teq \rd, #0x10000
32 bne 1001b
33 .endm
34
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
deleted file mode 100644
index c9e49f049532..000000000000
--- a/arch/arm/mach-shark/include/mach/entry-macro.S
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Shark platform
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10 .macro get_irqnr_preamble, base, tmp
11 mov \base, #0xfe000000
12 orr \base, \base, #0x00e00000
13 .endm
14
15 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
16
17 mov \irqstat, #0x0C
18 strb \irqstat, [\base, #0x20] @outb(0x0C, 0x20) /* Poll command */
19 ldrb \irqnr, [\base, #0x20] @irq = inb(0x20) & 7
20 and \irqstat, \irqnr, #0x80
21 teq \irqstat, #0
22 beq 43f
23 and \irqnr, \irqnr, #7
24 teq \irqnr, #2
25 bne 44f
2643: mov \irqstat, #0x0C
27 strb \irqstat, [\base, #0xa0] @outb(0x0C, 0xA0) /* Poll command */
28 ldrb \irqnr, [\base, #0xa0] @irq = (inb(0xA0) & 7) + 8
29 and \irqstat, \irqnr, #0x80
30 teq \irqstat, #0
31 beq 44f
32 and \irqnr, \irqnr, #7
33 add \irqnr, \irqnr, #8
3444: teq \irqstat, #0
35 .endm
36
diff --git a/arch/arm/mach-shark/include/mach/framebuffer.h b/arch/arm/mach-shark/include/mach/framebuffer.h
deleted file mode 100644
index 84a5bf6e5ba3..000000000000
--- a/arch/arm/mach-shark/include/mach/framebuffer.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/framebuffer.h
3 *
4 * by Alexander Schulz
5 *
6 */
7
8#ifndef __ASM_ARCH_FRAMEBUFFER_H
9#define __ASM_ARCH_FRAMEBUFFER_H
10
11/* defines for the Framebuffer */
12#define FB_START 0x06000000
13#define FB_SIZE 0x01000000
14
15#endif
16
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h
deleted file mode 100644
index 663f952a8ab3..000000000000
--- a/arch/arm/mach-shark/include/mach/hardware.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/hardware.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * arch/arm/mach-ebsa110/include/mach/hardware.h
8 * Copyright (C) 1996-1999 Russell King.
9 */
10#ifndef __ASM_ARCH_HARDWARE_H
11#define __ASM_ARCH_HARDWARE_H
12
13#define UNCACHEABLE_ADDR 0xdf010000
14
15#endif
16
diff --git a/arch/arm/mach-shark/include/mach/irqs.h b/arch/arm/mach-shark/include/mach/irqs.h
deleted file mode 100644
index c8e8a4e1f61a..000000000000
--- a/arch/arm/mach-shark/include/mach/irqs.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/irqs.h
3 *
4 * by Alexander Schulz
5 */
6
7#define NR_IRQS 16
8
9#define IRQ_ISA_KEYBOARD 1
10#define IRQ_ISA_RTC_ALARM 8
11#define I8042_KBD_IRQ 1
12#define I8042_AUX_IRQ 12
13#define IRQ_HARDDISK 14
diff --git a/arch/arm/mach-shark/include/mach/isa-dma.h b/arch/arm/mach-shark/include/mach/isa-dma.h
deleted file mode 100644
index 96c43b8f8dda..000000000000
--- a/arch/arm/mach-shark/include/mach/isa-dma.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/isa-dma.h
3 *
4 * by Alexander Schulz
5 */
6#ifndef __ASM_ARCH_DMA_H
7#define __ASM_ARCH_DMA_H
8
9#define MAX_DMA_CHANNELS 8
10#define DMA_ISA_CASCADE 4
11
12#endif /* _ASM_ARCH_DMA_H */
13
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
deleted file mode 100644
index 1cf8d6962617..000000000000
--- a/arch/arm/mach-shark/include/mach/memory.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/memory.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * arch/arm/mach-ebsa110/include/mach/memory.h
8 * Copyright (c) 1996-1999 Russell King.
9 */
10#ifndef __ASM_ARCH_MEMORY_H
11#define __ASM_ARCH_MEMORY_H
12
13#include <asm/sizes.h>
14
15/*
16 * Physical DRAM offset.
17 */
18#define PLAT_PHYS_OFFSET UL(0x08000000)
19
20/*
21 * Cache flushing area
22 */
23#define FLUSH_BASE_PHYS 0x80000000
24#define FLUSH_BASE 0xdf000000
25
26#endif
diff --git a/arch/arm/mach-shark/include/mach/timex.h b/arch/arm/mach-shark/include/mach/timex.h
deleted file mode 100644
index bb6eeaebed86..000000000000
--- a/arch/arm/mach-shark/include/mach/timex.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/timex.h
3 *
4 * by Alexander Schulz
5 */
6
7#define CLOCK_TICK_RATE 1193180
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
deleted file mode 100644
index a168435aecc9..000000000000
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/uncompress.h
3 * by Alexander Schulz
4 *
5 * derived from:
6 * arch/arm/mach-footbridge/include/mach/uncompress.h
7 * Copyright (C) 1996,1997,1998 Russell King
8 */
9
10#define SERIAL_BASE ((volatile unsigned char *)0x400003f8)
11
12static inline void putc(int c)
13{
14 volatile int t;
15
16 SERIAL_BASE[0] = c;
17 t=0x10000;
18 while (t--);
19}
20
21static inline void flush(void)
22{
23}
24
25#ifdef DEBUG
26static void putn(unsigned long z)
27{
28 int i;
29 char x;
30
31 putc('0');
32 putc('x');
33 for (i=0;i<8;i++) {
34 x='0'+((z>>((7-i)*4))&0xf);
35 if (x>'9') x=x-'0'+'A'-10;
36 putc(x);
37 }
38}
39
40static void putr()
41{
42 putc('\n');
43 putc('\r');
44}
45#endif
46
47/*
48 * nothing to do
49 */
50#define arch_decomp_setup()
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c
deleted file mode 100644
index 5dce13e429f3..000000000000
--- a/arch/arm/mach-shark/irq.c
+++ /dev/null
@@ -1,108 +0,0 @@
1/*
2 * linux/arch/arm/mach-shark/irq.c
3 *
4 * by Alexander Schulz
5 *
6 * derived from linux/arch/ppc/kernel/i8259.c and:
7 * arch/arm/mach-ebsa110/include/mach/irq.h
8 * Copyright (C) 1996-1998 Russell King
9 */
10
11#include <linux/init.h>
12#include <linux/fs.h>
13#include <linux/interrupt.h>
14#include <linux/io.h>
15
16#include <asm/irq.h>
17#include <asm/mach/irq.h>
18
19/*
20 * 8259A PIC functions to handle ISA devices:
21 */
22
23/*
24 * This contains the irq mask for both 8259A irq controllers,
25 * Let through the cascade-interrupt no. 2 (ff-(1<<2)==fb)
26 */
27static unsigned char cached_irq_mask[2] = { 0xfb, 0xff };
28
29/*
30 * These have to be protected by the irq controller spinlock
31 * before being called.
32 */
33static void shark_disable_8259A_irq(struct irq_data *d)
34{
35 unsigned int mask;
36 if (d->irq<8) {
37 mask = 1 << d->irq;
38 cached_irq_mask[0] |= mask;
39 outb(cached_irq_mask[1],0xA1);
40 } else {
41 mask = 1 << (d->irq-8);
42 cached_irq_mask[1] |= mask;
43 outb(cached_irq_mask[0],0x21);
44 }
45}
46
47static void shark_enable_8259A_irq(struct irq_data *d)
48{
49 unsigned int mask;
50 if (d->irq<8) {
51 mask = ~(1 << d->irq);
52 cached_irq_mask[0] &= mask;
53 outb(cached_irq_mask[0],0x21);
54 } else {
55 mask = ~(1 << (d->irq-8));
56 cached_irq_mask[1] &= mask;
57 outb(cached_irq_mask[1],0xA1);
58 }
59}
60
61static void shark_ack_8259A_irq(struct irq_data *d){}
62
63static irqreturn_t bogus_int(int irq, void *dev_id)
64{
65 printk("Got interrupt %i!\n",irq);
66 return IRQ_NONE;
67}
68
69static struct irqaction cascade;
70
71static struct irq_chip fb_chip = {
72 .name = "XT-PIC",
73 .irq_ack = shark_ack_8259A_irq,
74 .irq_mask = shark_disable_8259A_irq,
75 .irq_unmask = shark_enable_8259A_irq,
76};
77
78void __init shark_init_irq(void)
79{
80 int irq;
81
82 for (irq = 0; irq < NR_IRQS; irq++) {
83 irq_set_chip_and_handler(irq, &fb_chip, handle_edge_irq);
84 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
85 }
86
87 /* init master interrupt controller */
88 outb(0x11, 0x20); /* Start init sequence, edge triggered (level: 0x19)*/
89 outb(0x00, 0x21); /* Vector base */
90 outb(0x04, 0x21); /* Cascade (slave) on IRQ2 */
91 outb(0x03, 0x21); /* Select 8086 mode , auto eoi*/
92 outb(0x0A, 0x20);
93 /* init slave interrupt controller */
94 outb(0x11, 0xA0); /* Start init sequence, edge triggered */
95 outb(0x08, 0xA1); /* Vector base */
96 outb(0x02, 0xA1); /* Cascade (slave) on IRQ2 */
97 outb(0x03, 0xA1); /* Select 8086 mode, auto eoi */
98 outb(0x0A, 0xA0);
99 outb(cached_irq_mask[1],0xA1);
100 outb(cached_irq_mask[0],0x21);
101 //request_region(0x20,0x2,"pic1");
102 //request_region(0xA0,0x2,"pic2");
103
104 cascade.handler = bogus_int;
105 cascade.name = "cascade";
106 setup_irq(2,&cascade);
107}
108
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
deleted file mode 100644
index 081c778a10ac..000000000000
--- a/arch/arm/mach-shark/leds.c
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * DIGITAL Shark LED control routines.
3 *
4 * Driver for the 3 user LEDs found on the Shark
5 * Based on Versatile and RealView machine LED code
6 *
7 * License terms: GNU General Public License (GPL) version 2
8 * Author: Bryan Wu <bryan.wu@canonical.com>
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/io.h>
13#include <linux/ioport.h>
14#include <linux/slab.h>
15#include <linux/leds.h>
16
17#include <asm/mach-types.h>
18
19#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
20struct shark_led {
21 struct led_classdev cdev;
22 u8 mask;
23};
24
25/*
26 * The triggers lines up below will only be used if the
27 * LED triggers are compiled in.
28 */
29static const struct {
30 const char *name;
31 const char *trigger;
32} shark_leds[] = {
33 { "shark:amber0", "default-on", }, /* Bit 5 */
34 { "shark:green", "heartbeat", }, /* Bit 6 */
35 { "shark:amber1", "cpu0" }, /* Bit 7 */
36};
37
38static u16 led_reg_read(void)
39{
40 outw(0x09, 0x24);
41 return inw(0x26);
42}
43
44static void led_reg_write(u16 value)
45{
46 outw(0x09, 0x24);
47 outw(value, 0x26);
48}
49
50static void shark_led_set(struct led_classdev *cdev,
51 enum led_brightness b)
52{
53 struct shark_led *led = container_of(cdev,
54 struct shark_led, cdev);
55 u16 reg = led_reg_read();
56
57 if (b != LED_OFF)
58 reg |= led->mask;
59 else
60 reg &= ~led->mask;
61
62 led_reg_write(reg);
63}
64
65static enum led_brightness shark_led_get(struct led_classdev *cdev)
66{
67 struct shark_led *led = container_of(cdev,
68 struct shark_led, cdev);
69 u16 reg = led_reg_read();
70
71 return (reg & led->mask) ? LED_FULL : LED_OFF;
72}
73
74static int __init shark_leds_init(void)
75{
76 int i;
77 u16 reg;
78
79 if (!machine_is_shark())
80 return -ENODEV;
81
82 for (i = 0; i < ARRAY_SIZE(shark_leds); i++) {
83 struct shark_led *led;
84
85 led = kzalloc(sizeof(*led), GFP_KERNEL);
86 if (!led)
87 break;
88
89 led->cdev.name = shark_leds[i].name;
90 led->cdev.brightness_set = shark_led_set;
91 led->cdev.brightness_get = shark_led_get;
92 led->cdev.default_trigger = shark_leds[i].trigger;
93
94 /* Count in 5 bits offset */
95 led->mask = BIT(i + 5);
96
97 if (led_classdev_register(NULL, &led->cdev) < 0) {
98 kfree(led);
99 break;
100 }
101 }
102
103 /* Make LEDs independent of power-state */
104 request_region(0x24, 4, "led_reg");
105 reg = led_reg_read();
106 reg |= 1 << 10;
107 led_reg_write(reg);
108
109 return 0;
110}
111
112/*
113 * Since we may have triggers on any subsystem, defer registration
114 * until after subsystem_init.
115 */
116fs_initcall(shark_leds_init);
117#endif
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c
deleted file mode 100644
index 6d91a914c1dd..000000000000
--- a/arch/arm/mach-shark/pci.c
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * linux/arch/arm/mach-shark/pci.c
3 *
4 * PCI bios-type initialisation for PCI machines
5 *
6 * Bits taken from various places.
7 */
8#include <linux/kernel.h>
9#include <linux/pci.h>
10#include <linux/init.h>
11#include <linux/io.h>
12#include <video/vga.h>
13
14#include <asm/irq.h>
15#include <asm/mach/pci.h>
16#include <asm/mach-types.h>
17
18#define IO_START 0x40000000
19
20static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
21{
22 if (dev->bus->number == 0)
23 if (dev->devfn == 0)
24 return 255;
25 else
26 return 11;
27 else
28 return 255;
29}
30
31extern void __init via82c505_preinit(void);
32
33static struct hw_pci shark_pci __initdata = {
34 .setup = via82c505_setup,
35 .map_irq = shark_map_irq,
36 .nr_controllers = 1,
37 .ops = &via82c505_ops,
38 .preinit = via82c505_preinit,
39};
40
41static int __init shark_pci_init(void)
42{
43 if (!machine_is_shark())
44 return -ENODEV;
45
46 pcibios_min_io = 0x6000;
47 pcibios_min_mem = 0x50000000;
48 vga_base = 0xe8000000;
49
50 pci_ioremap_io(0, IO_START);
51
52 pci_common_init(&shark_pci);
53
54 return 0;
55}
56
57subsys_initcall(shark_pci_init);
diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c
index a23fa714f7ac..3276afcf3cc9 100644
--- a/arch/arm/mach-shmobile/board-ape6evm-reference.c
+++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c
@@ -57,7 +57,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
57}; 57};
58 58
59DT_MACHINE_START(APE6EVM_DT, "ape6evm") 59DT_MACHINE_START(APE6EVM_DT, "ape6evm")
60 .init_early = r8a73a4_init_delay, 60 .init_early = r8a73a4_init_early,
61 .init_machine = ape6evm_add_standard_devices, 61 .init_machine = ape6evm_add_standard_devices,
62 .dt_compat = ape6evm_boards_compat_dt, 62 .dt_compat = ape6evm_boards_compat_dt,
63MACHINE_END 63MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index 24b87eea9da3..1e9313a419ef 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = {
86 GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"), 86 GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"),
87}; 87};
88 88
89static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = { 89static struct gpio_keys_platform_data ape6evm_keys_pdata __initdata = {
90 .buttons = gpio_buttons, 90 .buttons = gpio_buttons,
91 .nbuttons = ARRAY_SIZE(gpio_buttons), 91 .nbuttons = ARRAY_SIZE(gpio_buttons),
92}; 92};
@@ -240,7 +240,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
240}; 240};
241 241
242DT_MACHINE_START(APE6EVM_DT, "ape6evm") 242DT_MACHINE_START(APE6EVM_DT, "ape6evm")
243 .init_early = r8a73a4_init_delay, 243 .init_early = r8a73a4_init_early,
244 .init_machine = ape6evm_add_standard_devices, 244 .init_machine = ape6evm_add_standard_devices,
245 .dt_compat = ape6evm_boards_compat_dt, 245 .dt_compat = ape6evm_boards_compat_dt,
246MACHINE_END 246MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 6b9faf3908f7..f2bf61bf2521 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -101,6 +101,12 @@ static struct resource sdhi0_resources[] __initdata = {
101 DEFINE_RES_IRQ(gic_iid(0x77)), 101 DEFINE_RES_IRQ(gic_iid(0x77)),
102}; 102};
103 103
104/* Ether */
105static struct resource ether_resources[] __initdata = {
106 DEFINE_RES_MEM(0xfde00000, 0x400),
107 DEFINE_RES_IRQ(gic_iid(0x89)),
108};
109
104static struct sh_eth_plat_data ether_platform_data __initdata = { 110static struct sh_eth_plat_data ether_platform_data __initdata = {
105 .phy = 0x01, 111 .phy = 0x01,
106 .edmac_endian = EDMAC_LITTLE_ENDIAN, 112 .edmac_endian = EDMAC_LITTLE_ENDIAN,
@@ -162,10 +168,6 @@ static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = {
162 MMC_CAP_NEEDS_POLL, 168 MMC_CAP_NEEDS_POLL,
163}; 169};
164 170
165static struct rcar_vin_platform_data vin_platform_data __initdata = {
166 .flags = RCAR_VIN_BT656,
167};
168
169/* In the default configuration both decoders reside on I2C bus 0 */ 171/* In the default configuration both decoders reside on I2C bus 0 */
170#define BOCKW_CAMERA(idx) \ 172#define BOCKW_CAMERA(idx) \
171static struct i2c_board_info camera##idx##_info = { \ 173static struct i2c_board_info camera##idx##_info = { \
@@ -181,6 +183,30 @@ static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = { \
181BOCKW_CAMERA(0); 183BOCKW_CAMERA(0);
182BOCKW_CAMERA(1); 184BOCKW_CAMERA(1);
183 185
186/* VIN */
187static struct rcar_vin_platform_data vin_platform_data __initdata = {
188 .flags = RCAR_VIN_BT656,
189};
190
191#define R8A7778_VIN(idx) \
192static struct resource vin##idx##_resources[] __initdata = { \
193 DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \
194 DEFINE_RES_IRQ(gic_iid(0x5a)), \
195}; \
196 \
197static struct platform_device_info vin##idx##_info __initdata = { \
198 .parent = &platform_bus, \
199 .name = "r8a7778-vin", \
200 .id = idx, \
201 .res = vin##idx##_resources, \
202 .num_res = ARRAY_SIZE(vin##idx##_resources), \
203 .dma_mask = DMA_BIT_MASK(32), \
204 .data = &vin_platform_data, \
205 .size_data = sizeof(vin_platform_data), \
206}
207R8A7778_VIN(0);
208R8A7778_VIN(1);
209
184static const struct pinctrl_map bockw_pinctrl_map[] = { 210static const struct pinctrl_map bockw_pinctrl_map[] = {
185 /* Ether */ 211 /* Ether */
186 PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", 212 PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778",
@@ -235,11 +261,17 @@ static void __init bockw_init(void)
235 r8a7778_clock_init(); 261 r8a7778_clock_init();
236 r8a7778_init_irq_extpin(1); 262 r8a7778_init_irq_extpin(1);
237 r8a7778_add_standard_devices(); 263 r8a7778_add_standard_devices();
238 r8a7778_add_ether_device(&ether_platform_data); 264
239 r8a7778_add_vin_device(0, &vin_platform_data); 265 platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
266 ether_resources,
267 ARRAY_SIZE(ether_resources),
268 &ether_platform_data,
269 sizeof(ether_platform_data));
270
271 platform_device_register_full(&vin0_info);
240 /* VIN1 has a pin conflict with Ether */ 272 /* VIN1 has a pin conflict with Ether */
241 if (!IS_ENABLED(CONFIG_SH_ETH)) 273 if (!IS_ENABLED(CONFIG_SH_ETH))
242 r8a7778_add_vin_device(1, &vin_platform_data); 274 platform_device_register_full(&vin1_info);
243 platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0, 275 platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0,
244 &iclink0_ml86v7667, 276 &iclink0_ml86v7667,
245 sizeof(iclink0_ml86v7667)); 277 sizeof(iclink0_ml86v7667));
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 9c316a1b2e32..2856f51ff8a6 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -38,7 +38,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
38}; 38};
39 39
40DT_MACHINE_START(LAGER_DT, "lager") 40DT_MACHINE_START(LAGER_DT, "lager")
41 .init_early = r8a7790_init_delay, 41 .init_early = r8a7790_init_early,
42 .init_machine = lager_add_standard_devices, 42 .init_machine = lager_add_standard_devices,
43 .init_time = r8a7790_timer_init, 43 .init_time = r8a7790_timer_init,
44 .dt_compat = lager_boards_compat_dt, 44 .dt_compat = lager_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 5930af8d434f..66edb7e10089 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -56,7 +56,7 @@ static struct gpio_led lager_leds[] = {
56 }, 56 },
57}; 57};
58 58
59static __initdata struct gpio_led_platform_data lager_leds_pdata = { 59static const struct gpio_led_platform_data lager_leds_pdata __initconst = {
60 .leds = lager_leds, 60 .leds = lager_leds,
61 .num_leds = ARRAY_SIZE(lager_leds), 61 .num_leds = ARRAY_SIZE(lager_leds),
62}; 62};
@@ -72,7 +72,7 @@ static struct gpio_keys_button gpio_buttons[] = {
72 GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"), 72 GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"),
73}; 73};
74 74
75static __initdata struct gpio_keys_platform_data lager_keys_pdata = { 75static const struct gpio_keys_platform_data lager_keys_pdata __initconst = {
76 .buttons = gpio_buttons, 76 .buttons = gpio_buttons,
77 .nbuttons = ARRAY_SIZE(gpio_buttons), 77 .nbuttons = ARRAY_SIZE(gpio_buttons),
78}; 78};
@@ -84,24 +84,24 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] =
84}; 84};
85 85
86/* MMCIF */ 86/* MMCIF */
87static struct sh_mmcif_plat_data mmcif1_pdata __initdata = { 87static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = {
88 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, 88 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
89}; 89};
90 90
91static struct resource mmcif1_resources[] __initdata = { 91static const struct resource mmcif1_resources[] __initconst = {
92 DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"), 92 DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"),
93 DEFINE_RES_IRQ(gic_spi(170)), 93 DEFINE_RES_IRQ(gic_spi(170)),
94}; 94};
95 95
96/* Ether */ 96/* Ether */
97static struct sh_eth_plat_data ether_pdata __initdata = { 97static const struct sh_eth_plat_data ether_pdata __initconst = {
98 .phy = 0x1, 98 .phy = 0x1,
99 .edmac_endian = EDMAC_LITTLE_ENDIAN, 99 .edmac_endian = EDMAC_LITTLE_ENDIAN,
100 .phy_interface = PHY_INTERFACE_MODE_RMII, 100 .phy_interface = PHY_INTERFACE_MODE_RMII,
101 .ether_link_active_low = 1, 101 .ether_link_active_low = 1,
102}; 102};
103 103
104static struct resource ether_resources[] __initdata = { 104static const struct resource ether_resources[] __initconst = {
105 DEFINE_RES_MEM(0xee700000, 0x400), 105 DEFINE_RES_MEM(0xee700000, 0x400),
106 DEFINE_RES_IRQ(gic_spi(162)), 106 DEFINE_RES_IRQ(gic_spi(162)),
107}; 107};
@@ -180,13 +180,13 @@ static void __init lager_init(void)
180 phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup); 180 phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
181} 181}
182 182
183static const char *lager_boards_compat_dt[] __initdata = { 183static const char * const lager_boards_compat_dt[] __initconst = {
184 "renesas,lager", 184 "renesas,lager",
185 NULL, 185 NULL,
186}; 186};
187 187
188DT_MACHINE_START(LAGER_DT, "lager") 188DT_MACHINE_START(LAGER_DT, "lager")
189 .init_early = r8a7790_init_delay, 189 .init_early = r8a7790_init_early,
190 .init_time = r8a7790_timer_init, 190 .init_time = r8a7790_timer_init,
191 .init_machine = lager_init, 191 .init_machine = lager_init,
192 .dt_compat = lager_boards_compat_dt, 192 .dt_compat = lager_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/include/mach/r8a73a4.h b/arch/arm/mach-shmobile/include/mach/r8a73a4.h
index f3a9b702da56..5214338a6a47 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a73a4.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a73a4.h
@@ -5,6 +5,6 @@ void r8a73a4_add_standard_devices(void);
5void r8a73a4_add_dt_devices(void); 5void r8a73a4_add_dt_devices(void);
6void r8a73a4_clock_init(void); 6void r8a73a4_clock_init(void);
7void r8a73a4_pinmux_init(void); 7void r8a73a4_pinmux_init(void);
8void r8a73a4_init_delay(void); 8void r8a73a4_init_early(void);
9 9
10#endif /* __ASM_R8A73A4_H__ */ 10#endif /* __ASM_R8A73A4_H__ */
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index adfcf51b163d..48933def0d55 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -23,9 +23,6 @@
23 23
24extern void r8a7778_add_standard_devices(void); 24extern void r8a7778_add_standard_devices(void);
25extern void r8a7778_add_standard_devices_dt(void); 25extern void r8a7778_add_standard_devices_dt(void);
26extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
27extern void r8a7778_add_vin_device(int id,
28 struct rcar_vin_platform_data *pdata);
29extern void r8a7778_add_dt_devices(void); 26extern void r8a7778_add_dt_devices(void);
30 27
31extern void r8a7778_init_late(void); 28extern void r8a7778_init_late(void);
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
index 788d55952091..177a8372abb7 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
@@ -5,7 +5,7 @@ void r8a7790_add_standard_devices(void);
5void r8a7790_add_dt_devices(void); 5void r8a7790_add_dt_devices(void);
6void r8a7790_clock_init(void); 6void r8a7790_clock_init(void);
7void r8a7790_pinmux_init(void); 7void r8a7790_pinmux_init(void);
8void r8a7790_init_delay(void); 8void r8a7790_init_early(void);
9void r8a7790_timer_init(void); 9void r8a7790_timer_init(void);
10 10
11#define MD(nr) BIT(nr) 11#define MD(nr) BIT(nr)
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 89491700afb7..53a896275cae 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -207,7 +207,7 @@ void __init r8a73a4_add_standard_devices(void)
207 r8a73a4_register_thermal(); 207 r8a73a4_register_thermal();
208} 208}
209 209
210void __init r8a73a4_init_delay(void) 210void __init r8a73a4_init_early(void)
211{ 211{
212#ifndef CONFIG_ARM_ARCH_TIMER 212#ifndef CONFIG_ARM_ARCH_TIMER
213 shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */ 213 shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
@@ -222,7 +222,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
222}; 222};
223 223
224DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") 224DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
225 .init_early = r8a73a4_init_delay, 225 .init_early = r8a73a4_init_early,
226 .dt_compat = r8a73a4_boards_compat_dt, 226 .dt_compat = r8a73a4_boards_compat_dt,
227MACHINE_END 227MACHINE_END
228#endif /* CONFIG_USE_OF */ 228#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 6a2657ebd197..468ee6551184 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -174,20 +174,6 @@ static struct platform_device_info hci##_info __initdata = { \
174USB_PLATFORM_INFO(ehci); 174USB_PLATFORM_INFO(ehci);
175USB_PLATFORM_INFO(ohci); 175USB_PLATFORM_INFO(ohci);
176 176
177/* Ether */
178static struct resource ether_resources[] __initdata = {
179 DEFINE_RES_MEM(0xfde00000, 0x400),
180 DEFINE_RES_IRQ(gic_iid(0x89)),
181};
182
183void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
184{
185 platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
186 ether_resources,
187 ARRAY_SIZE(ether_resources),
188 pdata, sizeof(*pdata));
189}
190
191/* PFC/GPIO */ 177/* PFC/GPIO */
192static struct resource pfc_resources[] __initdata = { 178static struct resource pfc_resources[] __initdata = {
193 DEFINE_RES_MEM(0xfffc0000, 0x118), 179 DEFINE_RES_MEM(0xfffc0000, 0x118),
@@ -272,7 +258,7 @@ static struct resource hspi_resources[] __initdata = {
272 DEFINE_RES_IRQ(gic_iid(0x75)), 258 DEFINE_RES_IRQ(gic_iid(0x75)),
273}; 259};
274 260
275void __init r8a7778_register_hspi(int id) 261static void __init r8a7778_register_hspi(int id)
276{ 262{
277 BUG_ON(id < 0 || id > 2); 263 BUG_ON(id < 0 || id > 2);
278 264
@@ -281,40 +267,6 @@ void __init r8a7778_register_hspi(int id)
281 hspi_resources + (2 * id), 2); 267 hspi_resources + (2 * id), 2);
282} 268}
283 269
284/* VIN */
285#define R8A7778_VIN(idx) \
286static struct resource vin##idx##_resources[] __initdata = { \
287 DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \
288 DEFINE_RES_IRQ(gic_iid(0x5a)), \
289}; \
290 \
291static struct platform_device_info vin##idx##_info __initdata = { \
292 .parent = &platform_bus, \
293 .name = "r8a7778-vin", \
294 .id = idx, \
295 .res = vin##idx##_resources, \
296 .num_res = ARRAY_SIZE(vin##idx##_resources), \
297 .dma_mask = DMA_BIT_MASK(32), \
298}
299
300R8A7778_VIN(0);
301R8A7778_VIN(1);
302
303static struct platform_device_info *vin_info_table[] __initdata = {
304 &vin0_info,
305 &vin1_info,
306};
307
308void __init r8a7778_add_vin_device(int id, struct rcar_vin_platform_data *pdata)
309{
310 BUG_ON(id < 0 || id > 1);
311
312 vin_info_table[id]->data = pdata;
313 vin_info_table[id]->size_data = sizeof(*pdata);
314
315 platform_device_register_full(vin_info_table[id]);
316}
317
318void __init r8a7778_add_dt_devices(void) 270void __init r8a7778_add_dt_devices(void)
319{ 271{
320 int i; 272 int i;
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index d0f5c9f9349a..e0d29a265c2d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -31,17 +31,18 @@
31#include <mach/r8a7790.h> 31#include <mach/r8a7790.h>
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
33 33
34static struct resource pfc_resources[] __initdata = { 34static const struct resource pfc_resources[] __initconst = {
35 DEFINE_RES_MEM(0xe6060000, 0x250), 35 DEFINE_RES_MEM(0xe6060000, 0x250),
36}; 36};
37 37
38#define R8A7790_GPIO(idx) \ 38#define R8A7790_GPIO(idx) \
39static struct resource r8a7790_gpio##idx##_resources[] __initdata = { \ 39static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \
40 DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ 40 DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \
41 DEFINE_RES_IRQ(gic_spi(4 + (idx))), \ 41 DEFINE_RES_IRQ(gic_spi(4 + (idx))), \
42}; \ 42}; \
43 \ 43 \
44static struct gpio_rcar_config r8a7790_gpio##idx##_platform_data __initdata = { \ 44static const struct gpio_rcar_config \
45r8a7790_gpio##idx##_platform_data __initconst = { \
45 .gpio_base = 32 * (idx), \ 46 .gpio_base = 32 * (idx), \
46 .irq_base = 0, \ 47 .irq_base = 0, \
47 .number_of_pins = 32, \ 48 .number_of_pins = 32, \
@@ -112,7 +113,7 @@ void __init r8a7790_pinmux_init(void)
112enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1, 113enum { SCIFA0, SCIFA1, SCIFB0, SCIFB1, SCIFB2, SCIFA2, SCIF0, SCIF1,
113 HSCIF0, HSCIF1 }; 114 HSCIF0, HSCIF1 };
114 115
115static struct plat_sci_port scif[] __initdata = { 116static const struct plat_sci_port scif[] __initconst = {
116 SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */ 117 SCIFA_DATA(SCIFA0, 0xe6c40000, gic_spi(144)), /* SCIFA0 */
117 SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */ 118 SCIFA_DATA(SCIFA1, 0xe6c50000, gic_spi(145)), /* SCIFA1 */
118 SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */ 119 SCIFB_DATA(SCIFB0, 0xe6c20000, gic_spi(148)), /* SCIFB0 */
@@ -131,11 +132,11 @@ static inline void r8a7790_register_scif(int idx)
131 sizeof(struct plat_sci_port)); 132 sizeof(struct plat_sci_port));
132} 133}
133 134
134static struct renesas_irqc_config irqc0_data __initdata = { 135static const struct renesas_irqc_config irqc0_data __initconst = {
135 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ 136 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */
136}; 137};
137 138
138static struct resource irqc0_resources[] __initdata = { 139static const struct resource irqc0_resources[] __initconst = {
139 DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */ 140 DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
140 DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */ 141 DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
141 DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */ 142 DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
@@ -150,7 +151,7 @@ static struct resource irqc0_resources[] __initdata = {
150 &irqc##idx##_data, \ 151 &irqc##idx##_data, \
151 sizeof(struct renesas_irqc_config)) 152 sizeof(struct renesas_irqc_config))
152 153
153static struct resource thermal_resources[] __initdata = { 154static const struct resource thermal_resources[] __initconst = {
154 DEFINE_RES_MEM(0xe61f0000, 0x14), 155 DEFINE_RES_MEM(0xe61f0000, 0x14),
155 DEFINE_RES_MEM(0xe61f0100, 0x38), 156 DEFINE_RES_MEM(0xe61f0100, 0x38),
156 DEFINE_RES_IRQ(gic_spi(69)), 157 DEFINE_RES_IRQ(gic_spi(69)),
@@ -161,13 +162,13 @@ static struct resource thermal_resources[] __initdata = {
161 thermal_resources, \ 162 thermal_resources, \
162 ARRAY_SIZE(thermal_resources)) 163 ARRAY_SIZE(thermal_resources))
163 164
164static struct sh_timer_config cmt00_platform_data __initdata = { 165static const struct sh_timer_config cmt00_platform_data __initconst = {
165 .name = "CMT00", 166 .name = "CMT00",
166 .timer_bit = 0, 167 .timer_bit = 0,
167 .clockevent_rating = 80, 168 .clockevent_rating = 80,
168}; 169};
169 170
170static struct resource cmt00_resources[] __initdata = { 171static const struct resource cmt00_resources[] __initconst = {
171 DEFINE_RES_MEM(0xffca0510, 0x0c), 172 DEFINE_RES_MEM(0xffca0510, 0x0c),
172 DEFINE_RES_MEM(0xffca0500, 0x04), 173 DEFINE_RES_MEM(0xffca0500, 0x04),
173 DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */ 174 DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
@@ -267,7 +268,7 @@ void __init r8a7790_timer_init(void)
267 clocksource_of_init(); 268 clocksource_of_init();
268} 269}
269 270
270void __init r8a7790_init_delay(void) 271void __init r8a7790_init_early(void)
271{ 272{
272#ifndef CONFIG_ARM_ARCH_TIMER 273#ifndef CONFIG_ARM_ARCH_TIMER
273 shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */ 274 shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
@@ -276,13 +277,13 @@ void __init r8a7790_init_delay(void)
276 277
277#ifdef CONFIG_USE_OF 278#ifdef CONFIG_USE_OF
278 279
279static const char *r8a7790_boards_compat_dt[] __initdata = { 280static const char * const r8a7790_boards_compat_dt[] __initconst = {
280 "renesas,r8a7790", 281 "renesas,r8a7790",
281 NULL, 282 NULL,
282}; 283};
283 284
284DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") 285DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
285 .init_early = r8a7790_init_delay, 286 .init_early = r8a7790_init_early,
286 .init_time = r8a7790_timer_init, 287 .init_time = r8a7790_timer_init,
287 .dt_compat = r8a7790_boards_compat_dt, 288 .dt_compat = r8a7790_boards_compat_dt,
288MACHINE_END 289MACHINE_END
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index dd86db467521..037100a1563a 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -4,7 +4,6 @@ config ARCH_SOCFPGA
4 select ARM_AMBA 4 select ARM_AMBA
5 select ARM_GIC 5 select ARM_GIC
6 select CACHE_L2X0 6 select CACHE_L2X0
7 select CLKDEV_LOOKUP
8 select COMMON_CLK 7 select COMMON_CLK
9 select CPU_V7 8 select CPU_V7
10 select DW_APB_TIMER_OF 9 select DW_APB_TIMER_OF
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index bfce9641e32f..dd0d49cdbe09 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -14,7 +14,6 @@
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17#include <linux/clk-provider.h>
18#include <linux/irqchip.h> 17#include <linux/irqchip.h>
19#include <linux/of_address.h> 18#include <linux/of_address.h>
20#include <linux/of_irq.h> 19#include <linux/of_irq.h>
@@ -107,7 +106,6 @@ static void __init socfpga_cyclone5_init(void)
107{ 106{
108 l2x0_of_init(0, ~0UL); 107 l2x0_of_init(0, ~0UL);
109 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 108 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
110 of_clk_init(NULL);
111 socfpga_init_clocks(); 109 socfpga_init_clocks();
112} 110}
113 111
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
index df0d59afeb40..ac1710e64d9a 100644
--- a/arch/arm/mach-spear/Kconfig
+++ b/arch/arm/mach-spear/Kconfig
@@ -7,11 +7,9 @@ menuconfig PLAT_SPEAR
7 default PLAT_SPEAR_SINGLE 7 default PLAT_SPEAR_SINGLE
8 select ARCH_REQUIRE_GPIOLIB 8 select ARCH_REQUIRE_GPIOLIB
9 select ARM_AMBA 9 select ARM_AMBA
10 select CLKDEV_LOOKUP
11 select CLKSRC_MMIO 10 select CLKSRC_MMIO
12 select COMMON_CLK 11 select COMMON_CLK
13 select GENERIC_CLOCKEVENTS 12 select GENERIC_CLOCKEVENTS
14 select HAVE_CLK
15 13
16if PLAT_SPEAR 14if PLAT_SPEAR
17 15
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c
index 8fe6f0c46480..1217fb598cfd 100644
--- a/arch/arm/mach-sti/board-dt.c
+++ b/arch/arm/mach-sti/board-dt.c
@@ -7,9 +7,8 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9 9
10#include <linux/clk-provider.h>
11#include <linux/clocksource.h>
12#include <linux/irq.h> 10#include <linux/irq.h>
11#include <linux/of_platform.h>
13#include <asm/hardware/cache-l2x0.h> 12#include <asm/hardware/cache-l2x0.h>
14#include <asm/mach/arch.h> 13#include <asm/mach/arch.h>
15 14
@@ -28,11 +27,10 @@ void __init stih41x_l2x0_init(void)
28 l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK); 27 l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
29} 28}
30 29
31static void __init stih41x_timer_init(void) 30static void __init stih41x_machine_init(void)
32{ 31{
33 of_clk_init(NULL);
34 clocksource_of_init();
35 stih41x_l2x0_init(); 32 stih41x_l2x0_init();
33 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
36} 34}
37 35
38static const char *stih41x_dt_match[] __initdata = { 36static const char *stih41x_dt_match[] __initdata = {
@@ -42,7 +40,7 @@ static const char *stih41x_dt_match[] __initdata = {
42}; 40};
43 41
44DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree") 42DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree")
45 .init_time = stih41x_timer_init, 43 .init_machine = stih41x_machine_init,
46 .smp = smp_ops(sti_smp_ops), 44 .smp = smp_ops(sti_smp_ops),
47 .dt_compat = stih41x_dt_match, 45 .dt_compat = stih41x_dt_match,
48MACHINE_END 46MACHINE_END
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index e79fb3469341..90dda6228510 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -10,7 +10,6 @@
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
13#include <linux/clocksource.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
@@ -20,8 +19,6 @@
20#include <linux/io.h> 19#include <linux/io.h>
21#include <linux/reboot.h> 20#include <linux/reboot.h>
22 21
23#include <linux/clk/sunxi.h>
24
25#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 23#include <asm/mach/map.h>
27#include <asm/system_misc.h> 24#include <asm/system_misc.h>
@@ -116,12 +113,6 @@ static void sunxi_setup_restart(void)
116 arm_pm_restart = of_id->data; 113 arm_pm_restart = of_id->data;
117} 114}
118 115
119static void __init sunxi_timer_init(void)
120{
121 sunxi_init_clocks();
122 clocksource_of_init();
123}
124
125static void __init sunxi_dt_init(void) 116static void __init sunxi_dt_init(void)
126{ 117{
127 sunxi_setup_restart(); 118 sunxi_setup_restart();
@@ -140,6 +131,5 @@ static const char * const sunxi_board_dt_compat[] = {
140 131
141DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") 132DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
142 .init_machine = sunxi_dt_init, 133 .init_machine = sunxi_dt_init,
143 .init_time = sunxi_timer_init,
144 .dt_compat = sunxi_board_dt_compat, 134 .dt_compat = sunxi_board_dt_compat,
145MACHINE_END 135MACHINE_END
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 67a76f2dfb9f..56bb6c35d958 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -3,7 +3,6 @@ config ARCH_TEGRA
3 select ARCH_HAS_CPUFREQ 3 select ARCH_HAS_CPUFREQ
4 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
5 select ARM_GIC 5 select ARM_GIC
6 select CLKDEV_LOOKUP
7 select CLKSRC_MMIO 6 select CLKSRC_MMIO
8 select CLKSRC_OF 7 select CLKSRC_OF
9 select COMMON_CLK 8 select COMMON_CLK
@@ -11,7 +10,6 @@ config ARCH_TEGRA
11 select GENERIC_CLOCKEVENTS 10 select GENERIC_CLOCKEVENTS
12 select HAVE_ARM_SCU if SMP 11 select HAVE_ARM_SCU if SMP
13 select HAVE_ARM_TWD if SMP 12 select HAVE_ARM_TWD if SMP
14 select HAVE_CLK
15 select HAVE_SMP 13 select HAVE_SMP
16 select MIGHT_HAVE_CACHE_L2X0 14 select MIGHT_HAVE_CACHE_L2X0
17 select MIGHT_HAVE_PCI 15 select MIGHT_HAVE_PCI
@@ -53,9 +51,9 @@ config ARCH_TEGRA_3x_SOC
53 51
54config ARCH_TEGRA_114_SOC 52config ARCH_TEGRA_114_SOC
55 bool "Enable support for Tegra114 family" 53 bool "Enable support for Tegra114 family"
56 select HAVE_ARM_ARCH_TIMER
57 select ARM_ERRATA_798181 54 select ARM_ERRATA_798181
58 select ARM_L1_CACHE_SHIFT_6 55 select ARM_L1_CACHE_SHIFT_6
56 select HAVE_ARM_ARCH_TIMER
59 select PINCTRL_TEGRA114 57 select PINCTRL_TEGRA114
60 help 58 help
61 Support for NVIDIA Tegra T114 processor family, based on the 59 Support for NVIDIA Tegra T114 processor family, based on the
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index e7e5f45c6558..97eb48e977e5 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -1,6 +1,5 @@
1asflags-y += -march=armv7-a 1asflags-y += -march=armv7-a
2 2
3obj-y += common.o
4obj-y += io.o 3obj-y += io.o
5obj-y += irq.o 4obj-y += irq.o
6obj-y += fuse.o 5obj-y += fuse.o
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 740e16f64728..06f024070dab 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -20,12 +20,11 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/rfkill-gpio.h> 21#include <linux/rfkill-gpio.h>
22#include "board.h" 22#include "board.h"
23#include "board-paz00.h"
24 23
25static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = { 24static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
26 .name = "wifi_rfkill", 25 .name = "wifi_rfkill",
27 .reset_gpio = TEGRA_WIFI_RST, 26 .reset_gpio = 25, /* PD1 */
28 .shutdown_gpio = TEGRA_WIFI_PWRN, 27 .shutdown_gpio = 85, /* PK5 */
29 .type = RFKILL_TYPE_WLAN, 28 .type = RFKILL_TYPE_WLAN,
30}; 29};
31 30
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
deleted file mode 100644
index 25c08ecef52f..000000000000
--- a/arch/arm/mach-tegra/board-paz00.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * arch/arm/mach-tegra/board-paz00.h
3 *
4 * Copyright (C) 2010 Marc Dietrich <marvin24@gmx.de>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
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 */
16
17#ifndef _MACH_TEGRA_BOARD_PAZ00_H
18#define _MACH_TEGRA_BOARD_PAZ00_H
19
20#include "gpio-names.h"
21
22#define TEGRA_WIFI_PWRN TEGRA_GPIO_PK5
23#define TEGRA_WIFI_RST TEGRA_GPIO_PD1
24
25#endif
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index db6810dc0b3d..bcf5dbf69d58 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -25,20 +25,8 @@
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/reboot.h> 26#include <linux/reboot.h>
27 27
28void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd);
29
30void __init tegra_init_early(void);
31void __init tegra_map_common_io(void); 28void __init tegra_map_common_io(void);
32void __init tegra_init_irq(void); 29void __init tegra_init_irq(void);
33void __init tegra_dt_init_irq(void);
34
35void tegra_init_late(void);
36
37#ifdef CONFIG_DEBUG_FS
38int tegra_clk_debugfs_init(void);
39#else
40static inline int tegra_clk_debugfs_init(void) { return 0; }
41#endif
42 30
43int __init tegra_powergate_init(void); 31int __init tegra_powergate_init(void);
44#if defined(CONFIG_ARCH_TEGRA_2x_SOC) && defined(CONFIG_DEBUG_FS) 32#if defined(CONFIG_ARCH_TEGRA_2x_SOC) && defined(CONFIG_DEBUG_FS)
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
deleted file mode 100644
index 94a119a35af8..000000000000
--- a/arch/arm/mach-tegra/common.c
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * arch/arm/mach-tegra/common.c
3 *
4 * Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
5 * Copyright (C) 2010 Google, Inc.
6 *
7 * Author:
8 * Colin Cross <ccross@android.com>
9 *
10 * This software is licensed under the terms of the GNU General Public
11 * License version 2, as published by the Free Software Foundation, and
12 * may be copied, distributed, and modified under those terms.
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 */
20
21#include <linux/init.h>
22#include <linux/io.h>
23#include <linux/clk.h>
24#include <linux/delay.h>
25#include <linux/reboot.h>
26#include <linux/irqchip.h>
27#include <linux/clk-provider.h>
28
29#include <asm/hardware/cache-l2x0.h>
30
31#include "board.h"
32#include "common.h"
33#include "cpuidle.h"
34#include "fuse.h"
35#include "iomap.h"
36#include "irq.h"
37#include "pmc.h"
38#include "apbio.h"
39#include "sleep.h"
40#include "pm.h"
41#include "reset.h"
42
43/*
44 * Storage for debug-macro.S's state.
45 *
46 * This must be in .data not .bss so that it gets initialized each time the
47 * kernel is loaded. The data is declared here rather than debug-macro.S so
48 * that multiple inclusions of debug-macro.S point at the same data.
49 */
50u32 tegra_uart_config[4] = {
51 /* Debug UART initialization required */
52 1,
53 /* Debug UART physical address */
54 0,
55 /* Debug UART virtual address */
56 0,
57 /* Scratch space for debug macro */
58 0,
59};
60
61#ifdef CONFIG_OF
62void __init tegra_dt_init_irq(void)
63{
64 of_clk_init(NULL);
65 tegra_pmc_init();
66 tegra_init_irq();
67 irqchip_init();
68 tegra_legacy_irq_syscore_init();
69}
70#endif
71
72void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd)
73{
74 void __iomem *reset = IO_ADDRESS(TEGRA_PMC_BASE + 0);
75 u32 reg;
76
77 reg = readl_relaxed(reset);
78 reg |= 0x10;
79 writel_relaxed(reg, reset);
80}
81
82static void __init tegra_init_cache(void)
83{
84#ifdef CONFIG_CACHE_L2X0
85 int ret;
86 void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
87 u32 aux_ctrl, cache_type;
88
89 cache_type = readl(p + L2X0_CACHE_TYPE);
90 aux_ctrl = (cache_type & 0x700) << (17-8);
91 aux_ctrl |= 0x7C400001;
92
93 ret = l2x0_of_init(aux_ctrl, 0x8200c3fe);
94 if (!ret)
95 l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs);
96#endif
97
98}
99
100void __init tegra_init_early(void)
101{
102 tegra_cpu_reset_handler_init();
103 tegra_apb_io_init();
104 tegra_init_fuse();
105 tegra_init_cache();
106 tegra_powergate_init();
107 tegra_hotplug_init();
108}
109
110void __init tegra_init_late(void)
111{
112 tegra_init_suspend();
113 tegra_cpuidle_init();
114 tegra_powergate_debugfs_init();
115}
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c
index e035cd284a6e..f3b5d0d7b620 100644
--- a/arch/arm/mach-tegra/fuse.c
+++ b/arch/arm/mach-tegra/fuse.c
@@ -112,7 +112,7 @@ u32 tegra_read_chipid(void)
112 return readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804); 112 return readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804);
113} 113}
114 114
115void tegra_init_fuse(void) 115void __init tegra_init_fuse(void)
116{ 116{
117 u32 id; 117 u32 id;
118 118
diff --git a/arch/arm/mach-tegra/gpio-names.h b/arch/arm/mach-tegra/gpio-names.h
deleted file mode 100644
index f28220a641b2..000000000000
--- a/arch/arm/mach-tegra/gpio-names.h
+++ /dev/null
@@ -1,247 +0,0 @@
1/*
2 * arch/arm/mach-tegra/include/mach/gpio-names.h
3 *
4 * Copyright (c) 2010 Google, Inc
5 *
6 * Author:
7 * Erik Gilling <konkers@google.com>
8 *
9 * This software is licensed under the terms of the GNU General Public
10 * License version 2, as published by the Free Software Foundation, and
11 * may be copied, distributed, and modified under those terms.
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
19#ifndef __MACH_TEGRA_GPIO_NAMES_H
20#define __MACH_TEGRA_GPIO_NAMES_H
21
22#define TEGRA_GPIO_PA0 0
23#define TEGRA_GPIO_PA1 1
24#define TEGRA_GPIO_PA2 2
25#define TEGRA_GPIO_PA3 3
26#define TEGRA_GPIO_PA4 4
27#define TEGRA_GPIO_PA5 5
28#define TEGRA_GPIO_PA6 6
29#define TEGRA_GPIO_PA7 7
30#define TEGRA_GPIO_PB0 8
31#define TEGRA_GPIO_PB1 9
32#define TEGRA_GPIO_PB2 10
33#define TEGRA_GPIO_PB3 11
34#define TEGRA_GPIO_PB4 12
35#define TEGRA_GPIO_PB5 13
36#define TEGRA_GPIO_PB6 14
37#define TEGRA_GPIO_PB7 15
38#define TEGRA_GPIO_PC0 16
39#define TEGRA_GPIO_PC1 17
40#define TEGRA_GPIO_PC2 18
41#define TEGRA_GPIO_PC3 19
42#define TEGRA_GPIO_PC4 20
43#define TEGRA_GPIO_PC5 21
44#define TEGRA_GPIO_PC6 22
45#define TEGRA_GPIO_PC7 23
46#define TEGRA_GPIO_PD0 24
47#define TEGRA_GPIO_PD1 25
48#define TEGRA_GPIO_PD2 26
49#define TEGRA_GPIO_PD3 27
50#define TEGRA_GPIO_PD4 28
51#define TEGRA_GPIO_PD5 29
52#define TEGRA_GPIO_PD6 30
53#define TEGRA_GPIO_PD7 31
54#define TEGRA_GPIO_PE0 32
55#define TEGRA_GPIO_PE1 33
56#define TEGRA_GPIO_PE2 34
57#define TEGRA_GPIO_PE3 35
58#define TEGRA_GPIO_PE4 36
59#define TEGRA_GPIO_PE5 37
60#define TEGRA_GPIO_PE6 38
61#define TEGRA_GPIO_PE7 39
62#define TEGRA_GPIO_PF0 40
63#define TEGRA_GPIO_PF1 41
64#define TEGRA_GPIO_PF2 42
65#define TEGRA_GPIO_PF3 43
66#define TEGRA_GPIO_PF4 44
67#define TEGRA_GPIO_PF5 45
68#define TEGRA_GPIO_PF6 46
69#define TEGRA_GPIO_PF7 47
70#define TEGRA_GPIO_PG0 48
71#define TEGRA_GPIO_PG1 49
72#define TEGRA_GPIO_PG2 50
73#define TEGRA_GPIO_PG3 51
74#define TEGRA_GPIO_PG4 52
75#define TEGRA_GPIO_PG5 53
76#define TEGRA_GPIO_PG6 54
77#define TEGRA_GPIO_PG7 55
78#define TEGRA_GPIO_PH0 56
79#define TEGRA_GPIO_PH1 57
80#define TEGRA_GPIO_PH2 58
81#define TEGRA_GPIO_PH3 59
82#define TEGRA_GPIO_PH4 60
83#define TEGRA_GPIO_PH5 61
84#define TEGRA_GPIO_PH6 62
85#define TEGRA_GPIO_PH7 63
86#define TEGRA_GPIO_PI0 64
87#define TEGRA_GPIO_PI1 65
88#define TEGRA_GPIO_PI2 66
89#define TEGRA_GPIO_PI3 67
90#define TEGRA_GPIO_PI4 68
91#define TEGRA_GPIO_PI5 69
92#define TEGRA_GPIO_PI6 70
93#define TEGRA_GPIO_PI7 71
94#define TEGRA_GPIO_PJ0 72
95#define TEGRA_GPIO_PJ1 73
96#define TEGRA_GPIO_PJ2 74
97#define TEGRA_GPIO_PJ3 75
98#define TEGRA_GPIO_PJ4 76
99#define TEGRA_GPIO_PJ5 77
100#define TEGRA_GPIO_PJ6 78
101#define TEGRA_GPIO_PJ7 79
102#define TEGRA_GPIO_PK0 80
103#define TEGRA_GPIO_PK1 81
104#define TEGRA_GPIO_PK2 82
105#define TEGRA_GPIO_PK3 83
106#define TEGRA_GPIO_PK4 84
107#define TEGRA_GPIO_PK5 85
108#define TEGRA_GPIO_PK6 86
109#define TEGRA_GPIO_PK7 87
110#define TEGRA_GPIO_PL0 88
111#define TEGRA_GPIO_PL1 89
112#define TEGRA_GPIO_PL2 90
113#define TEGRA_GPIO_PL3 91
114#define TEGRA_GPIO_PL4 92
115#define TEGRA_GPIO_PL5 93
116#define TEGRA_GPIO_PL6 94
117#define TEGRA_GPIO_PL7 95
118#define TEGRA_GPIO_PM0 96
119#define TEGRA_GPIO_PM1 97
120#define TEGRA_GPIO_PM2 98
121#define TEGRA_GPIO_PM3 99
122#define TEGRA_GPIO_PM4 100
123#define TEGRA_GPIO_PM5 101
124#define TEGRA_GPIO_PM6 102
125#define TEGRA_GPIO_PM7 103
126#define TEGRA_GPIO_PN0 104
127#define TEGRA_GPIO_PN1 105
128#define TEGRA_GPIO_PN2 106
129#define TEGRA_GPIO_PN3 107
130#define TEGRA_GPIO_PN4 108
131#define TEGRA_GPIO_PN5 109
132#define TEGRA_GPIO_PN6 110
133#define TEGRA_GPIO_PN7 111
134#define TEGRA_GPIO_PO0 112
135#define TEGRA_GPIO_PO1 113
136#define TEGRA_GPIO_PO2 114
137#define TEGRA_GPIO_PO3 115
138#define TEGRA_GPIO_PO4 116
139#define TEGRA_GPIO_PO5 117
140#define TEGRA_GPIO_PO6 118
141#define TEGRA_GPIO_PO7 119
142#define TEGRA_GPIO_PP0 120
143#define TEGRA_GPIO_PP1 121
144#define TEGRA_GPIO_PP2 122
145#define TEGRA_GPIO_PP3 123
146#define TEGRA_GPIO_PP4 124
147#define TEGRA_GPIO_PP5 125
148#define TEGRA_GPIO_PP6 126
149#define TEGRA_GPIO_PP7 127
150#define TEGRA_GPIO_PQ0 128
151#define TEGRA_GPIO_PQ1 129
152#define TEGRA_GPIO_PQ2 130
153#define TEGRA_GPIO_PQ3 131
154#define TEGRA_GPIO_PQ4 132
155#define TEGRA_GPIO_PQ5 133
156#define TEGRA_GPIO_PQ6 134
157#define TEGRA_GPIO_PQ7 135
158#define TEGRA_GPIO_PR0 136
159#define TEGRA_GPIO_PR1 137
160#define TEGRA_GPIO_PR2 138
161#define TEGRA_GPIO_PR3 139
162#define TEGRA_GPIO_PR4 140
163#define TEGRA_GPIO_PR5 141
164#define TEGRA_GPIO_PR6 142
165#define TEGRA_GPIO_PR7 143
166#define TEGRA_GPIO_PS0 144
167#define TEGRA_GPIO_PS1 145
168#define TEGRA_GPIO_PS2 146
169#define TEGRA_GPIO_PS3 147
170#define TEGRA_GPIO_PS4 148
171#define TEGRA_GPIO_PS5 149
172#define TEGRA_GPIO_PS6 150
173#define TEGRA_GPIO_PS7 151
174#define TEGRA_GPIO_PT0 152
175#define TEGRA_GPIO_PT1 153
176#define TEGRA_GPIO_PT2 154
177#define TEGRA_GPIO_PT3 155
178#define TEGRA_GPIO_PT4 156
179#define TEGRA_GPIO_PT5 157
180#define TEGRA_GPIO_PT6 158
181#define TEGRA_GPIO_PT7 159
182#define TEGRA_GPIO_PU0 160
183#define TEGRA_GPIO_PU1 161
184#define TEGRA_GPIO_PU2 162
185#define TEGRA_GPIO_PU3 163
186#define TEGRA_GPIO_PU4 164
187#define TEGRA_GPIO_PU5 165
188#define TEGRA_GPIO_PU6 166
189#define TEGRA_GPIO_PU7 167
190#define TEGRA_GPIO_PV0 168
191#define TEGRA_GPIO_PV1 169
192#define TEGRA_GPIO_PV2 170
193#define TEGRA_GPIO_PV3 171
194#define TEGRA_GPIO_PV4 172
195#define TEGRA_GPIO_PV5 173
196#define TEGRA_GPIO_PV6 174
197#define TEGRA_GPIO_PV7 175
198#define TEGRA_GPIO_PW0 176
199#define TEGRA_GPIO_PW1 177
200#define TEGRA_GPIO_PW2 178
201#define TEGRA_GPIO_PW3 179
202#define TEGRA_GPIO_PW4 180
203#define TEGRA_GPIO_PW5 181
204#define TEGRA_GPIO_PW6 182
205#define TEGRA_GPIO_PW7 183
206#define TEGRA_GPIO_PX0 184
207#define TEGRA_GPIO_PX1 185
208#define TEGRA_GPIO_PX2 186
209#define TEGRA_GPIO_PX3 187
210#define TEGRA_GPIO_PX4 188
211#define TEGRA_GPIO_PX5 189
212#define TEGRA_GPIO_PX6 190
213#define TEGRA_GPIO_PX7 191
214#define TEGRA_GPIO_PY0 192
215#define TEGRA_GPIO_PY1 193
216#define TEGRA_GPIO_PY2 194
217#define TEGRA_GPIO_PY3 195
218#define TEGRA_GPIO_PY4 196
219#define TEGRA_GPIO_PY5 197
220#define TEGRA_GPIO_PY6 198
221#define TEGRA_GPIO_PY7 199
222#define TEGRA_GPIO_PZ0 200
223#define TEGRA_GPIO_PZ1 201
224#define TEGRA_GPIO_PZ2 202
225#define TEGRA_GPIO_PZ3 203
226#define TEGRA_GPIO_PZ4 204
227#define TEGRA_GPIO_PZ5 205
228#define TEGRA_GPIO_PZ6 206
229#define TEGRA_GPIO_PZ7 207
230#define TEGRA_GPIO_PAA0 208
231#define TEGRA_GPIO_PAA1 209
232#define TEGRA_GPIO_PAA2 210
233#define TEGRA_GPIO_PAA3 211
234#define TEGRA_GPIO_PAA4 212
235#define TEGRA_GPIO_PAA5 213
236#define TEGRA_GPIO_PAA6 214
237#define TEGRA_GPIO_PAA7 215
238#define TEGRA_GPIO_PBB0 216
239#define TEGRA_GPIO_PBB1 217
240#define TEGRA_GPIO_PBB2 218
241#define TEGRA_GPIO_PBB3 219
242#define TEGRA_GPIO_PBB4 220
243#define TEGRA_GPIO_PBB5 221
244#define TEGRA_GPIO_PBB6 222
245#define TEGRA_GPIO_PBB7 223
246
247#endif
diff --git a/arch/arm/mach-tegra/iomap.h b/arch/arm/mach-tegra/iomap.h
index 3f5fa0749bde..cbee57fc4fd8 100644
--- a/arch/arm/mach-tegra/iomap.h
+++ b/arch/arm/mach-tegra/iomap.h
@@ -24,44 +24,12 @@
24#define TEGRA_IRAM_BASE 0x40000000 24#define TEGRA_IRAM_BASE 0x40000000
25#define TEGRA_IRAM_SIZE SZ_256K 25#define TEGRA_IRAM_SIZE SZ_256K
26 26
27#define TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K)
28
29#define TEGRA_HOST1X_BASE 0x50000000
30#define TEGRA_HOST1X_SIZE 0x24000
31
32#define TEGRA_ARM_PERIF_BASE 0x50040000 27#define TEGRA_ARM_PERIF_BASE 0x50040000
33#define TEGRA_ARM_PERIF_SIZE SZ_8K 28#define TEGRA_ARM_PERIF_SIZE SZ_8K
34 29
35#define TEGRA_ARM_PL310_BASE 0x50043000
36#define TEGRA_ARM_PL310_SIZE SZ_4K
37
38#define TEGRA_ARM_INT_DIST_BASE 0x50041000 30#define TEGRA_ARM_INT_DIST_BASE 0x50041000
39#define TEGRA_ARM_INT_DIST_SIZE SZ_4K 31#define TEGRA_ARM_INT_DIST_SIZE SZ_4K
40 32
41#define TEGRA_MPE_BASE 0x54040000
42#define TEGRA_MPE_SIZE SZ_256K
43
44#define TEGRA_VI_BASE 0x54080000
45#define TEGRA_VI_SIZE SZ_256K
46
47#define TEGRA_ISP_BASE 0x54100000
48#define TEGRA_ISP_SIZE SZ_256K
49
50#define TEGRA_DISPLAY_BASE 0x54200000
51#define TEGRA_DISPLAY_SIZE SZ_256K
52
53#define TEGRA_DISPLAY2_BASE 0x54240000
54#define TEGRA_DISPLAY2_SIZE SZ_256K
55
56#define TEGRA_HDMI_BASE 0x54280000
57#define TEGRA_HDMI_SIZE SZ_256K
58
59#define TEGRA_GART_BASE 0x58000000
60#define TEGRA_GART_SIZE SZ_32M
61
62#define TEGRA_RES_SEMA_BASE 0x60001000
63#define TEGRA_RES_SEMA_SIZE SZ_4K
64
65#define TEGRA_PRIMARY_ICTLR_BASE 0x60004000 33#define TEGRA_PRIMARY_ICTLR_BASE 0x60004000
66#define TEGRA_PRIMARY_ICTLR_SIZE SZ_64 34#define TEGRA_PRIMARY_ICTLR_SIZE SZ_64
67 35
@@ -98,51 +66,15 @@
98#define TEGRA_FLOW_CTRL_BASE 0x60007000 66#define TEGRA_FLOW_CTRL_BASE 0x60007000
99#define TEGRA_FLOW_CTRL_SIZE 20 67#define TEGRA_FLOW_CTRL_SIZE 20
100 68
101#define TEGRA_AHB_DMA_BASE 0x60008000
102#define TEGRA_AHB_DMA_SIZE SZ_4K
103
104#define TEGRA_AHB_DMA_CH0_BASE 0x60009000
105#define TEGRA_AHB_DMA_CH0_SIZE 32
106
107#define TEGRA_APB_DMA_BASE 0x6000A000
108#define TEGRA_APB_DMA_SIZE SZ_4K
109
110#define TEGRA_APB_DMA_CH0_BASE 0x6000B000
111#define TEGRA_APB_DMA_CH0_SIZE 32
112
113#define TEGRA_AHB_GIZMO_BASE 0x6000C004
114#define TEGRA_AHB_GIZMO_SIZE 0x10C
115
116#define TEGRA_SB_BASE 0x6000C200 69#define TEGRA_SB_BASE 0x6000C200
117#define TEGRA_SB_SIZE 256 70#define TEGRA_SB_SIZE 256
118 71
119#define TEGRA_STATMON_BASE 0x6000C400
120#define TEGRA_STATMON_SIZE SZ_1K
121
122#define TEGRA_GPIO_BASE 0x6000D000
123#define TEGRA_GPIO_SIZE SZ_4K
124
125#define TEGRA_EXCEPTION_VECTORS_BASE 0x6000F000 72#define TEGRA_EXCEPTION_VECTORS_BASE 0x6000F000
126#define TEGRA_EXCEPTION_VECTORS_SIZE SZ_4K 73#define TEGRA_EXCEPTION_VECTORS_SIZE SZ_4K
127 74
128#define TEGRA_APB_MISC_BASE 0x70000000 75#define TEGRA_APB_MISC_BASE 0x70000000
129#define TEGRA_APB_MISC_SIZE SZ_4K 76#define TEGRA_APB_MISC_SIZE SZ_4K
130 77
131#define TEGRA_APB_MISC_DAS_BASE 0x70000c00
132#define TEGRA_APB_MISC_DAS_SIZE SZ_128
133
134#define TEGRA_AC97_BASE 0x70002000
135#define TEGRA_AC97_SIZE SZ_512
136
137#define TEGRA_SPDIF_BASE 0x70002400
138#define TEGRA_SPDIF_SIZE SZ_512
139
140#define TEGRA_I2S1_BASE 0x70002800
141#define TEGRA_I2S1_SIZE SZ_256
142
143#define TEGRA_I2S2_BASE 0x70002A00
144#define TEGRA_I2S2_SIZE SZ_256
145
146#define TEGRA_UARTA_BASE 0x70006000 78#define TEGRA_UARTA_BASE 0x70006000
147#define TEGRA_UARTA_SIZE SZ_64 79#define TEGRA_UARTA_SIZE SZ_64
148 80
@@ -158,87 +90,15 @@
158#define TEGRA_UARTE_BASE 0x70006400 90#define TEGRA_UARTE_BASE 0x70006400
159#define TEGRA_UARTE_SIZE SZ_256 91#define TEGRA_UARTE_SIZE SZ_256
160 92
161#define TEGRA_NAND_BASE 0x70008000
162#define TEGRA_NAND_SIZE SZ_256
163
164#define TEGRA_HSMMC_BASE 0x70008500
165#define TEGRA_HSMMC_SIZE SZ_256
166
167#define TEGRA_SNOR_BASE 0x70009000
168#define TEGRA_SNOR_SIZE SZ_4K
169
170#define TEGRA_PWFM_BASE 0x7000A000
171#define TEGRA_PWFM_SIZE SZ_256
172
173#define TEGRA_PWFM0_BASE 0x7000A000
174#define TEGRA_PWFM0_SIZE 4
175
176#define TEGRA_PWFM1_BASE 0x7000A010
177#define TEGRA_PWFM1_SIZE 4
178
179#define TEGRA_PWFM2_BASE 0x7000A020
180#define TEGRA_PWFM2_SIZE 4
181
182#define TEGRA_PWFM3_BASE 0x7000A030
183#define TEGRA_PWFM3_SIZE 4
184
185#define TEGRA_MIPI_BASE 0x7000B000
186#define TEGRA_MIPI_SIZE SZ_256
187
188#define TEGRA_I2C_BASE 0x7000C000
189#define TEGRA_I2C_SIZE SZ_256
190
191#define TEGRA_TWC_BASE 0x7000C100
192#define TEGRA_TWC_SIZE SZ_256
193
194#define TEGRA_SPI_BASE 0x7000C380
195#define TEGRA_SPI_SIZE 48
196
197#define TEGRA_I2C2_BASE 0x7000C400
198#define TEGRA_I2C2_SIZE SZ_256
199
200#define TEGRA_I2C3_BASE 0x7000C500
201#define TEGRA_I2C3_SIZE SZ_256
202
203#define TEGRA_OWR_BASE 0x7000C600
204#define TEGRA_OWR_SIZE 80
205
206#define TEGRA_DVC_BASE 0x7000D000
207#define TEGRA_DVC_SIZE SZ_512
208
209#define TEGRA_SPI1_BASE 0x7000D400
210#define TEGRA_SPI1_SIZE SZ_512
211
212#define TEGRA_SPI2_BASE 0x7000D600
213#define TEGRA_SPI2_SIZE SZ_512
214
215#define TEGRA_SPI3_BASE 0x7000D800
216#define TEGRA_SPI3_SIZE SZ_512
217
218#define TEGRA_SPI4_BASE 0x7000DA00
219#define TEGRA_SPI4_SIZE SZ_512
220
221#define TEGRA_RTC_BASE 0x7000E000
222#define TEGRA_RTC_SIZE SZ_256
223
224#define TEGRA_KBC_BASE 0x7000E200
225#define TEGRA_KBC_SIZE SZ_256
226
227#define TEGRA_PMC_BASE 0x7000E400 93#define TEGRA_PMC_BASE 0x7000E400
228#define TEGRA_PMC_SIZE SZ_256 94#define TEGRA_PMC_SIZE SZ_256
229 95
230#define TEGRA_MC_BASE 0x7000F000
231#define TEGRA_MC_SIZE SZ_1K
232
233#define TEGRA_EMC_BASE 0x7000F400 96#define TEGRA_EMC_BASE 0x7000F400
234#define TEGRA_EMC_SIZE SZ_1K 97#define TEGRA_EMC_SIZE SZ_1K
235 98
236#define TEGRA_FUSE_BASE 0x7000F800 99#define TEGRA_FUSE_BASE 0x7000F800
237#define TEGRA_FUSE_SIZE SZ_1K 100#define TEGRA_FUSE_SIZE SZ_1K
238 101
239#define TEGRA_KFUSE_BASE 0x7000FC00
240#define TEGRA_KFUSE_SIZE SZ_1K
241
242#define TEGRA_EMC0_BASE 0x7001A000 102#define TEGRA_EMC0_BASE 0x7001A000
243#define TEGRA_EMC0_SIZE SZ_2K 103#define TEGRA_EMC0_SIZE SZ_2K
244 104
@@ -248,18 +108,6 @@
248#define TEGRA_CSITE_BASE 0x70040000 108#define TEGRA_CSITE_BASE 0x70040000
249#define TEGRA_CSITE_SIZE SZ_256K 109#define TEGRA_CSITE_SIZE SZ_256K
250 110
251#define TEGRA_SDMMC1_BASE 0xC8000000
252#define TEGRA_SDMMC1_SIZE SZ_512
253
254#define TEGRA_SDMMC2_BASE 0xC8000200
255#define TEGRA_SDMMC2_SIZE SZ_512
256
257#define TEGRA_SDMMC3_BASE 0xC8000400
258#define TEGRA_SDMMC3_SIZE SZ_512
259
260#define TEGRA_SDMMC4_BASE 0xC8000600
261#define TEGRA_SDMMC4_SIZE SZ_512
262
263/* On TEGRA, many peripherals are very closely packed in 111/* On TEGRA, many peripherals are very closely packed in
264 * two 256MB io windows (that actually only use about 64KB 112 * two 256MB io windows (that actually only use about 64KB
265 * at the start of each). 113 * at the start of each).
diff --git a/arch/arm/mach-tegra/irammap.h b/arch/arm/mach-tegra/irammap.h
index 501952a84344..e32e1742c9a1 100644
--- a/arch/arm/mach-tegra/irammap.h
+++ b/arch/arm/mach-tegra/irammap.h
@@ -23,4 +23,10 @@
23#define TEGRA_IRAM_RESET_HANDLER_OFFSET 0 23#define TEGRA_IRAM_RESET_HANDLER_OFFSET 0
24#define TEGRA_IRAM_RESET_HANDLER_SIZE SZ_1K 24#define TEGRA_IRAM_RESET_HANDLER_SIZE SZ_1K
25 25
26/*
27 * This area is used for LPx resume vector, only while LPx power state is
28 * active. At other times, the AVP may use this area for arbitrary purposes
29 */
30#define TEGRA_IRAM_LPx_RESUME_AREA (TEGRA_IRAM_BASE + SZ_4K)
31
26#endif 32#endif
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index ed294a04e1d3..36ed88af1cc1 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -263,10 +263,10 @@ static void tegra_suspend_enter_lp1(void)
263 tegra_pmc_suspend(); 263 tegra_pmc_suspend();
264 264
265 /* copy the reset vector & SDRAM shutdown code into IRAM */ 265 /* copy the reset vector & SDRAM shutdown code into IRAM */
266 memcpy(iram_save_addr, IO_ADDRESS(TEGRA_IRAM_CODE_AREA), 266 memcpy(iram_save_addr, IO_ADDRESS(TEGRA_IRAM_LPx_RESUME_AREA),
267 iram_save_size);
268 memcpy(IO_ADDRESS(TEGRA_IRAM_CODE_AREA), tegra_lp1_iram.start_addr,
269 iram_save_size); 267 iram_save_size);
268 memcpy(IO_ADDRESS(TEGRA_IRAM_LPx_RESUME_AREA),
269 tegra_lp1_iram.start_addr, iram_save_size);
270 270
271 *((u32 *)tegra_cpu_lp1_mask) = 1; 271 *((u32 *)tegra_cpu_lp1_mask) = 1;
272} 272}
@@ -276,7 +276,7 @@ static void tegra_suspend_exit_lp1(void)
276 tegra_pmc_resume(); 276 tegra_pmc_resume();
277 277
278 /* restore IRAM */ 278 /* restore IRAM */
279 memcpy(IO_ADDRESS(TEGRA_IRAM_CODE_AREA), iram_save_addr, 279 memcpy(IO_ADDRESS(TEGRA_IRAM_LPx_RESUME_AREA), iram_save_addr,
280 iram_save_size); 280 iram_save_size);
281 281
282 *(u32 *)tegra_cpu_lp1_mask = 0; 282 *(u32 *)tegra_cpu_lp1_mask = 0;
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index fe204e5256e7..6e92a7c2ecbd 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -37,9 +37,6 @@ void tegra30_sleep_core_init(void);
37 37
38extern unsigned long l2x0_saved_regs_addr; 38extern unsigned long l2x0_saved_regs_addr;
39 39
40void save_cpu_arch_register(void);
41void restore_cpu_arch_register(void);
42
43void tegra_clear_cpu_in_lp2(void); 40void tegra_clear_cpu_in_lp2(void);
44bool tegra_set_cpu_in_lp2(void); 41bool tegra_set_cpu_in_lp2(void);
45 42
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
index 8acb881f7cfe..93a4dbcde27e 100644
--- a/arch/arm/mach-tegra/pmc.c
+++ b/arch/arm/mach-tegra/pmc.c
@@ -166,6 +166,15 @@ int tegra_pmc_cpu_remove_clamping(int cpuid)
166 return tegra_pmc_powergate_remove_clamping(id); 166 return tegra_pmc_powergate_remove_clamping(id);
167} 167}
168 168
169void tegra_pmc_restart(enum reboot_mode mode, const char *cmd)
170{
171 u32 val;
172
173 val = tegra_pmc_readl(0);
174 val |= 0x10;
175 tegra_pmc_writel(val, 0);
176}
177
169#ifdef CONFIG_PM_SLEEP 178#ifdef CONFIG_PM_SLEEP
170static void set_power_timers(u32 us_on, u32 us_off, unsigned long rate) 179static void set_power_timers(u32 us_on, u32 us_off, unsigned long rate)
171{ 180{
@@ -285,13 +294,10 @@ static const struct of_device_id matches[] __initconst = {
285 { } 294 { }
286}; 295};
287 296
288static void __init tegra_pmc_parse_dt(void) 297void __init tegra_pmc_init_irq(void)
289{ 298{
290 struct device_node *np; 299 struct device_node *np;
291 u32 prop; 300 u32 val;
292 enum tegra_suspend_mode suspend_mode;
293 u32 core_good_time[2] = {0, 0};
294 u32 lp0_vec[2] = {0, 0};
295 301
296 np = of_find_matching_node(NULL, matches); 302 np = of_find_matching_node(NULL, matches);
297 BUG_ON(!np); 303 BUG_ON(!np);
@@ -300,6 +306,26 @@ static void __init tegra_pmc_parse_dt(void)
300 306
301 tegra_pmc_invert_interrupt = of_property_read_bool(np, 307 tegra_pmc_invert_interrupt = of_property_read_bool(np,
302 "nvidia,invert-interrupt"); 308 "nvidia,invert-interrupt");
309
310 val = tegra_pmc_readl(PMC_CTRL);
311 if (tegra_pmc_invert_interrupt)
312 val |= PMC_CTRL_INTR_LOW;
313 else
314 val &= ~PMC_CTRL_INTR_LOW;
315 tegra_pmc_writel(val, PMC_CTRL);
316}
317
318void __init tegra_pmc_init(void)
319{
320 struct device_node *np;
321 u32 prop;
322 enum tegra_suspend_mode suspend_mode;
323 u32 core_good_time[2] = {0, 0};
324 u32 lp0_vec[2] = {0, 0};
325
326 np = of_find_matching_node(NULL, matches);
327 BUG_ON(!np);
328
303 tegra_pclk = of_clk_get_by_name(np, "pclk"); 329 tegra_pclk = of_clk_get_by_name(np, "pclk");
304 WARN_ON(IS_ERR(tegra_pclk)); 330 WARN_ON(IS_ERR(tegra_pclk));
305 331
@@ -365,17 +391,3 @@ static void __init tegra_pmc_parse_dt(void)
365 391
366 pmc_pm_data.suspend_mode = suspend_mode; 392 pmc_pm_data.suspend_mode = suspend_mode;
367} 393}
368
369void __init tegra_pmc_init(void)
370{
371 u32 val;
372
373 tegra_pmc_parse_dt();
374
375 val = tegra_pmc_readl(PMC_CTRL);
376 if (tegra_pmc_invert_interrupt)
377 val |= PMC_CTRL_INTR_LOW;
378 else
379 val &= ~PMC_CTRL_INTR_LOW;
380 tegra_pmc_writel(val, PMC_CTRL);
381}
diff --git a/arch/arm/mach-tegra/pmc.h b/arch/arm/mach-tegra/pmc.h
index 549f8c7b762c..59e19c344298 100644
--- a/arch/arm/mach-tegra/pmc.h
+++ b/arch/arm/mach-tegra/pmc.h
@@ -18,6 +18,8 @@
18#ifndef __MACH_TEGRA_PMC_H 18#ifndef __MACH_TEGRA_PMC_H
19#define __MACH_TEGRA_PMC_H 19#define __MACH_TEGRA_PMC_H
20 20
21#include <linux/reboot.h>
22
21enum tegra_suspend_mode { 23enum tegra_suspend_mode {
22 TEGRA_SUSPEND_NONE = 0, 24 TEGRA_SUSPEND_NONE = 0,
23 TEGRA_SUSPEND_LP2, /* CPU voltage off */ 25 TEGRA_SUSPEND_LP2, /* CPU voltage off */
@@ -39,6 +41,9 @@ bool tegra_pmc_cpu_is_powered(int cpuid);
39int tegra_pmc_cpu_power_on(int cpuid); 41int tegra_pmc_cpu_power_on(int cpuid);
40int tegra_pmc_cpu_remove_clamping(int cpuid); 42int tegra_pmc_cpu_remove_clamping(int cpuid);
41 43
44void tegra_pmc_restart(enum reboot_mode mode, const char *cmd);
45
46void tegra_pmc_init_irq(void);
42void tegra_pmc_init(void); 47void tegra_pmc_init(void);
43 48
44#endif 49#endif
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
index fd0bbf8a6c94..568f5bbf979d 100644
--- a/arch/arm/mach-tegra/reset.c
+++ b/arch/arm/mach-tegra/reset.c
@@ -82,7 +82,7 @@ void __init tegra_cpu_reset_handler_init(void)
82 82
83#ifdef CONFIG_PM_SLEEP 83#ifdef CONFIG_PM_SLEEP
84 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP1] = 84 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP1] =
85 TEGRA_IRAM_CODE_AREA; 85 TEGRA_IRAM_LPx_RESUME_AREA;
86 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] = 86 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] =
87 virt_to_phys((void *)tegra_resume); 87 virt_to_phys((void *)tegra_resume);
88#endif 88#endif
diff --git a/arch/arm/mach-tegra/sleep-tegra20.S b/arch/arm/mach-tegra/sleep-tegra20.S
index 5c3bd11c9838..aaaf3abd2688 100644
--- a/arch/arm/mach-tegra/sleep-tegra20.S
+++ b/arch/arm/mach-tegra/sleep-tegra20.S
@@ -25,6 +25,7 @@
25#include <asm/cp15.h> 25#include <asm/cp15.h>
26#include <asm/cache.h> 26#include <asm/cache.h>
27 27
28#include "irammap.h"
28#include "sleep.h" 29#include "sleep.h"
29#include "flowctrl.h" 30#include "flowctrl.h"
30 31
@@ -235,7 +236,7 @@ ENTRY(tegra20_sleep_core_finish)
235 mov32 r0, tegra20_tear_down_core 236 mov32 r0, tegra20_tear_down_core
236 mov32 r1, tegra20_iram_start 237 mov32 r1, tegra20_iram_start
237 sub r0, r0, r1 238 sub r0, r0, r1
238 mov32 r1, TEGRA_IRAM_CODE_AREA 239 mov32 r1, TEGRA_IRAM_LPx_RESUME_AREA
239 add r0, r0, r1 240 add r0, r0, r1
240 241
241 mov pc, r3 242 mov pc, r3
@@ -328,7 +329,7 @@ tegra20_iram_start:
328 * The physical address of tegra_resume expected to be stored in 329 * The physical address of tegra_resume expected to be stored in
329 * PMC_SCRATCH41. 330 * PMC_SCRATCH41.
330 * 331 *
331 * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_CODE_AREA. 332 * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_LPx_RESUME_AREA.
332 */ 333 */
333ENTRY(tegra20_lp1_reset) 334ENTRY(tegra20_lp1_reset)
334 /* 335 /*
diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S
index 63fa91b5fafb..c6fc15cb25df 100644
--- a/arch/arm/mach-tegra/sleep-tegra30.S
+++ b/arch/arm/mach-tegra/sleep-tegra30.S
@@ -20,6 +20,7 @@
20#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/cache.h> 21#include <asm/cache.h>
22 22
23#include "irammap.h"
23#include "fuse.h" 24#include "fuse.h"
24#include "sleep.h" 25#include "sleep.h"
25#include "flowctrl.h" 26#include "flowctrl.h"
@@ -262,7 +263,7 @@ ENTRY(tegra30_sleep_core_finish)
262 mov32 r0, tegra30_tear_down_core 263 mov32 r0, tegra30_tear_down_core
263 mov32 r1, tegra30_iram_start 264 mov32 r1, tegra30_iram_start
264 sub r0, r0, r1 265 sub r0, r0, r1
265 mov32 r1, TEGRA_IRAM_CODE_AREA 266 mov32 r1, TEGRA_IRAM_LPx_RESUME_AREA
266 add r0, r0, r1 267 add r0, r0, r1
267 268
268 mov pc, r3 269 mov pc, r3
@@ -314,7 +315,7 @@ tegra30_iram_start:
314 * The physical address of tegra_resume expected to be stored in 315 * The physical address of tegra_resume expected to be stored in
315 * PMC_SCRATCH41. 316 * PMC_SCRATCH41.
316 * 317 *
317 * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_CODE_AREA. 318 * NOTE: THIS *MUST* BE RELOCATED TO TEGRA_IRAM_LPx_RESUME_AREA.
318 */ 319 */
319ENTRY(tegra30_lp1_reset) 320ENTRY(tegra30_lp1_reset)
320 /* 321 /*
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index 5b8605547a09..386115ae5c03 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/clocksource.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/platform_device.h> 21#include <linux/platform_device.h>
@@ -34,16 +33,78 @@
34#include <linux/sys_soc.h> 33#include <linux/sys_soc.h>
35#include <linux/usb/tegra_usb_phy.h> 34#include <linux/usb/tegra_usb_phy.h>
36#include <linux/clk/tegra.h> 35#include <linux/clk/tegra.h>
36#include <linux/irqchip.h>
37 37
38#include <asm/hardware/cache-l2x0.h>
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
40#include <asm/mach/time.h> 41#include <asm/mach/time.h>
41#include <asm/setup.h> 42#include <asm/setup.h>
42 43
44#include "apbio.h"
43#include "board.h" 45#include "board.h"
44#include "common.h" 46#include "common.h"
47#include "cpuidle.h"
45#include "fuse.h" 48#include "fuse.h"
46#include "iomap.h" 49#include "iomap.h"
50#include "irq.h"
51#include "pmc.h"
52#include "pm.h"
53#include "reset.h"
54#include "sleep.h"
55
56/*
57 * Storage for debug-macro.S's state.
58 *
59 * This must be in .data not .bss so that it gets initialized each time the
60 * kernel is loaded. The data is declared here rather than debug-macro.S so
61 * that multiple inclusions of debug-macro.S point at the same data.
62 */
63u32 tegra_uart_config[4] = {
64 /* Debug UART initialization required */
65 1,
66 /* Debug UART physical address */
67 0,
68 /* Debug UART virtual address */
69 0,
70 /* Scratch space for debug macro */
71 0,
72};
73
74static void __init tegra_init_cache(void)
75{
76#ifdef CONFIG_CACHE_L2X0
77 int ret;
78 void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
79 u32 aux_ctrl, cache_type;
80
81 cache_type = readl(p + L2X0_CACHE_TYPE);
82 aux_ctrl = (cache_type & 0x700) << (17-8);
83 aux_ctrl |= 0x7C400001;
84
85 ret = l2x0_of_init(aux_ctrl, 0x8200c3fe);
86 if (!ret)
87 l2x0_saved_regs_addr = virt_to_phys(&l2x0_saved_regs);
88#endif
89}
90
91static void __init tegra_init_early(void)
92{
93 tegra_cpu_reset_handler_init();
94 tegra_apb_io_init();
95 tegra_init_fuse();
96 tegra_init_cache();
97 tegra_powergate_init();
98 tegra_hotplug_init();
99}
100
101static void __init tegra_dt_init_irq(void)
102{
103 tegra_pmc_init_irq();
104 tegra_init_irq();
105 irqchip_init();
106 tegra_legacy_irq_syscore_init();
107}
47 108
48static void __init tegra_dt_init(void) 109static void __init tegra_dt_init(void)
49{ 110{
@@ -51,6 +112,8 @@ static void __init tegra_dt_init(void)
51 struct soc_device *soc_dev; 112 struct soc_device *soc_dev;
52 struct device *parent = NULL; 113 struct device *parent = NULL;
53 114
115 tegra_pmc_init();
116
54 tegra_clocks_apply_init_table(); 117 tegra_clocks_apply_init_table();
55 118
56 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); 119 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
@@ -97,7 +160,9 @@ static void __init tegra_dt_init_late(void)
97{ 160{
98 int i; 161 int i;
99 162
100 tegra_init_late(); 163 tegra_init_suspend();
164 tegra_cpuidle_init();
165 tegra_powergate_debugfs_init();
101 166
102 for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) { 167 for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) {
103 if (of_machine_is_compatible(board_init_funcs[i].machine)) { 168 if (of_machine_is_compatible(board_init_funcs[i].machine)) {
@@ -119,9 +184,8 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)")
119 .smp = smp_ops(tegra_smp_ops), 184 .smp = smp_ops(tegra_smp_ops),
120 .init_early = tegra_init_early, 185 .init_early = tegra_init_early,
121 .init_irq = tegra_dt_init_irq, 186 .init_irq = tegra_dt_init_irq,
122 .init_time = clocksource_of_init,
123 .init_machine = tegra_dt_init, 187 .init_machine = tegra_dt_init,
124 .init_late = tegra_dt_init_late, 188 .init_late = tegra_dt_init_late,
125 .restart = tegra_assert_system_reset, 189 .restart = tegra_pmc_restart,
126 .dt_compat = tegra_dt_board_compat, 190 .dt_compat = tegra_dt_board_compat,
127MACHINE_END 191MACHINE_END
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
index a1659863bfd5..8e23071bd1b3 100644
--- a/arch/arm/mach-u300/Kconfig
+++ b/arch/arm/mach-u300/Kconfig
@@ -5,7 +5,6 @@ config ARCH_U300
5 select ARM_AMBA 5 select ARM_AMBA
6 select ARM_PATCH_PHYS_VIRT 6 select ARM_PATCH_PHYS_VIRT
7 select ARM_VIC 7 select ARM_VIC
8 select CLKDEV_LOOKUP
9 select CLKSRC_MMIO 8 select CLKSRC_MMIO
10 select CLKSRC_OF 9 select CLKSRC_OF
11 select COMMON_CLK 10 select COMMON_CLK
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 99a28d628297..c67f8ad5ccd5 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -1,37 +1,32 @@
1config ARCH_U8500 1config ARCH_U8500
2 bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7 2 bool "ST-Ericsson U8500 Series" if ARCH_MULTI_V7
3 depends on MMU 3 depends on MMU
4 select AB8500_CORE
5 select ABX500_CORE
4 select ARCH_HAS_CPUFREQ 6 select ARCH_HAS_CPUFREQ
5 select ARCH_REQUIRE_GPIOLIB 7 select ARCH_REQUIRE_GPIOLIB
6 select ARM_AMBA 8 select ARM_AMBA
7 select CLKDEV_LOOKUP 9 select ARM_ERRATA_754322
10 select ARM_ERRATA_764369 if SMP
11 select ARM_GIC
12 select CACHE_L2X0
13 select CLKSRC_NOMADIK_MTU
14 select COMMON_CLK
8 select CPU_V7 15 select CPU_V7
9 select GENERIC_CLOCKEVENTS 16 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP 17 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if SMP 18 select HAVE_ARM_TWD if SMP
12 select HAVE_SMP 19 select HAVE_SMP
13 select MIGHT_HAVE_CACHE_L2X0 20 select MIGHT_HAVE_CACHE_L2X0
21 select PINCTRL
22 select PINCTRL_ABX500
23 select PINCTRL_NOMADIK
24 select PL310_ERRATA_753970 if CACHE_PL310
14 help 25 help
15 Support for ST-Ericsson's Ux500 architecture 26 Support for ST-Ericsson's Ux500 architecture
16 27
17if ARCH_U8500 28if ARCH_U8500
18 29
19config UX500_SOC_COMMON
20 bool
21 default y
22 select ABX500_CORE
23 select AB8500_CORE
24 select ARM_ERRATA_754322
25 select ARM_ERRATA_764369 if SMP
26 select ARM_GIC
27 select CACHE_L2X0
28 select CLKSRC_NOMADIK_MTU
29 select COMMON_CLK
30 select PINCTRL
31 select PINCTRL_NOMADIK
32 select PINCTRL_ABX500
33 select PL310_ERRATA_753970 if CACHE_PL310
34
35config UX500_SOC_DB8500 30config UX500_SOC_DB8500
36 bool 31 bool
37 select CPU_FREQ_TABLE if CPU_FREQ 32 select CPU_FREQ_TABLE if CPU_FREQ
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 365795447804..d7e7422527ca 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -4,14 +4,12 @@ config ARCH_VEXPRESS
4 select ARM_AMBA 4 select ARM_AMBA
5 select ARM_GIC 5 select ARM_GIC
6 select ARM_TIMER_SP804 6 select ARM_TIMER_SP804
7 select CLKDEV_LOOKUP
8 select COMMON_CLK 7 select COMMON_CLK
9 select COMMON_CLK_VERSATILE 8 select COMMON_CLK_VERSATILE
10 select CPU_V7 9 select CPU_V7
11 select GENERIC_CLOCKEVENTS 10 select GENERIC_CLOCKEVENTS
12 select HAVE_ARM_SCU if SMP 11 select HAVE_ARM_SCU if SMP
13 select HAVE_ARM_TWD if SMP 12 select HAVE_ARM_TWD if SMP
14 select HAVE_CLK
15 select HAVE_PATA_PLATFORM 13 select HAVE_PATA_PLATFORM
16 select HAVE_SMP 14 select HAVE_SMP
17 select ICST 15 select ICST
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 95a469e23e37..4f8b8cb17ff5 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -1,12 +1,10 @@
1/* 1/*
2 * Versatile Express V2M Motherboard Support 2 * Versatile Express V2M Motherboard Support
3 */ 3 */
4#include <linux/clocksource.h>
5#include <linux/device.h> 4#include <linux/device.h>
6#include <linux/amba/bus.h> 5#include <linux/amba/bus.h>
7#include <linux/amba/mmci.h> 6#include <linux/amba/mmci.h>
8#include <linux/io.h> 7#include <linux/io.h>
9#include <linux/clocksource.h>
10#include <linux/smp.h> 8#include <linux/smp.h>
11#include <linux/init.h> 9#include <linux/init.h>
12#include <linux/of_address.h> 10#include <linux/of_address.h>
@@ -22,7 +20,6 @@
22#include <linux/regulator/fixed.h> 20#include <linux/regulator/fixed.h>
23#include <linux/regulator/machine.h> 21#include <linux/regulator/machine.h>
24#include <linux/vexpress.h> 22#include <linux/vexpress.h>
25#include <linux/clk-provider.h>
26#include <linux/clkdev.h> 23#include <linux/clkdev.h>
27 24
28#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -422,16 +419,8 @@ void __init v2m_dt_init_early(void)
422 pr_warning("vexpress: DT HBI (%x) is not matching " 419 pr_warning("vexpress: DT HBI (%x) is not matching "
423 "hardware (%x)!\n", dt_hbi, hbi); 420 "hardware (%x)!\n", dt_hbi, hbi);
424 } 421 }
425}
426
427static void __init v2m_dt_timer_init(void)
428{
429 of_clk_init(NULL);
430 422
431 clocksource_of_init(); 423 versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000);
432
433 versatile_sched_clock_init(vexpress_get_24mhz_clock_base(),
434 24000000);
435} 424}
436 425
437static const struct of_device_id v2m_dt_bus_match[] __initconst = { 426static const struct of_device_id v2m_dt_bus_match[] __initconst = {
@@ -458,6 +447,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
458 .smp_init = smp_init_ops(vexpress_smp_init_ops), 447 .smp_init = smp_init_ops(vexpress_smp_init_ops),
459 .map_io = v2m_dt_map_io, 448 .map_io = v2m_dt_map_io,
460 .init_early = v2m_dt_init_early, 449 .init_early = v2m_dt_init_early,
461 .init_time = v2m_dt_timer_init,
462 .init_machine = v2m_dt_init, 450 .init_machine = v2m_dt_init,
463MACHINE_END 451MACHINE_END
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index 9b252934b206..927be93b692e 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -5,7 +5,6 @@ config ARCH_VT8500
5 select CLKDEV_LOOKUP 5 select CLKDEV_LOOKUP
6 select CLKSRC_OF 6 select CLKSRC_OF
7 select GENERIC_CLOCKEVENTS 7 select GENERIC_CLOCKEVENTS
8 select HAVE_CLK
9 select VT8500_TIMER 8 select VT8500_TIMER
10 select PINCTRL 9 select PINCTRL
11 help 10 help
diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h
deleted file mode 100644
index 087787af62f1..000000000000
--- a/arch/arm/mach-vt8500/common.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* linux/arch/arm/mach-vt8500/dt_common.h
2 *
3 * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ARCH_ARM_MACH_VT8500_DT_COMMON_H
17#define __ARCH_ARM_MACH_VT8500_DT_COMMON_H
18
19#include <linux/of.h>
20
21/* defined in drivers/clk/clk-vt8500.c */
22void __init vtwm_clk_init(void __iomem *pmc_base);
23
24#endif
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index eefaa60d6614..4a73464cb11b 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -18,7 +18,6 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <linux/clocksource.h>
22#include <linux/io.h> 21#include <linux/io.h>
23#include <linux/pm.h> 22#include <linux/pm.h>
24#include <linux/reboot.h> 23#include <linux/reboot.h>
@@ -33,8 +32,6 @@
33#include <linux/of_irq.h> 32#include <linux/of_irq.h>
34#include <linux/of_platform.h> 33#include <linux/of_platform.h>
35 34
36#include "common.h"
37
38#define LEGACY_GPIO_BASE 0xD8110000 35#define LEGACY_GPIO_BASE 0xD8110000
39#define LEGACY_PMC_BASE 0xD8130000 36#define LEGACY_PMC_BASE 0xD8130000
40 37
@@ -162,8 +159,6 @@ void __init vt8500_init(void)
162 else 159 else
163 pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); 160 pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
164 161
165 vtwm_clk_init(pmc_base);
166
167 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 162 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
168} 163}
169 164
@@ -180,7 +175,6 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
180 .dt_compat = vt8500_dt_compat, 175 .dt_compat = vt8500_dt_compat,
181 .map_io = vt8500_map_io, 176 .map_io = vt8500_map_io,
182 .init_machine = vt8500_init, 177 .init_machine = vt8500_init,
183 .init_time = clocksource_of_init,
184 .restart = vt8500_restart, 178 .restart = vt8500_restart,
185MACHINE_END 179MACHINE_END
186 180