Browse Source

ARM: plat-nomadik: move MTU, kill plat-nomadik

This moves the MTU timer driver from arch/arm/plat-nomadik
to drivers/clocksource and moves the header file to the
platform_data directory.

As this moves the last file being compiled to an object out
of arch/arm/plat-nomadik, we have to "turn off the light"
and delete the plat-nomadik directory, because it is not
allowed to have an empty Makefile in a plat-* directory.
This is probably also a desired side effect of depopulating
the arch/arm directory of drivers. Luckily we have just
deleted all the <plat/*> include files prior to this so
by moving the last one we may delete the directory.

After this all the Ux500 and Nomadik device drivers live
outside of the arch/arm hierarchy.

Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij 12 years ago
parent
commit
694e33a7f4

+ 0 - 1
arch/arm/Kconfig

@@ -1065,7 +1065,6 @@ source "arch/arm/mach-mxs/Kconfig"
 source "arch/arm/mach-netx/Kconfig"
 source "arch/arm/mach-netx/Kconfig"
 
 
 source "arch/arm/mach-nomadik/Kconfig"
 source "arch/arm/mach-nomadik/Kconfig"
-source "arch/arm/plat-nomadik/Kconfig"
 
 
 source "arch/arm/plat-omap/Kconfig"
 source "arch/arm/plat-omap/Kconfig"
 
 

+ 0 - 1
arch/arm/Makefile

@@ -201,7 +201,6 @@ plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_ARCH_ZYNQ)	+= versatile
 plat-$(CONFIG_ARCH_ZYNQ)	+= versatile
 plat-$(CONFIG_PLAT_IOP)		+= iop
 plat-$(CONFIG_PLAT_IOP)		+= iop
-plat-$(CONFIG_PLAT_NOMADIK)	+= nomadik
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
 plat-$(CONFIG_PLAT_PXA)		+= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	+= s3c24xx samsung
 plat-$(CONFIG_PLAT_S3C24XX)	+= s3c24xx samsung

+ 1 - 1
arch/arm/mach-nomadik/Kconfig

@@ -4,7 +4,7 @@ menu "Nomadik boards"
 
 
 config MACH_NOMADIK_8815NHK
 config MACH_NOMADIK_8815NHK
 	bool "ST 8815 Nomadik Hardware Kit (evaluation board)"
 	bool "ST 8815 Nomadik Hardware Kit (evaluation board)"
-	select HAS_MTU
+	select CLKSRC_NOMADIK_MTU
 	select NOMADIK_8815
 	select NOMADIK_8815
 
 
 endmenu
 endmenu

+ 2 - 4
arch/arm/mach-nomadik/board-nhk8815.c

@@ -25,16 +25,14 @@
 #include <linux/io.h>
 #include <linux/io.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_data/pinctrl-nomadik.h>
 #include <linux/platform_data/pinctrl-nomadik.h>
+#include <linux/platform_data/clocksource-nomadik-mtu.h>
+#include <linux/platform_data/mtd-nomadik-nand.h>
 #include <asm/hardware/vic.h>
 #include <asm/hardware/vic.h>
 #include <asm/sizes.h>
 #include <asm/sizes.h>
 #include <asm/mach-types.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
-
-#include <plat/mtu.h>
-
-#include <linux/platform_data/mtd-nomadik-nand.h>
 #include <mach/fsmc.h>
 #include <mach/fsmc.h>
 #include <mach/irqs.h>
 #include <mach/irqs.h>
 
 

+ 1 - 1
arch/arm/mach-ux500/Kconfig

@@ -7,8 +7,8 @@ config UX500_SOC_COMMON
 	select ARM_ERRATA_764369 if SMP
 	select ARM_ERRATA_764369 if SMP
 	select ARM_GIC
 	select ARM_GIC
 	select CACHE_L2X0
 	select CACHE_L2X0
+	select CLKSRC_NOMADIK_MTU
 	select COMMON_CLK
 	select COMMON_CLK
-	select HAS_MTU
 	select PINCTRL
 	select PINCTRL
 	select PINCTRL_NOMADIK
 	select PINCTRL_NOMADIK
 	select PL310_ERRATA_753970 if CACHE_PL310
 	select PL310_ERRATA_753970 if CACHE_PL310

+ 1 - 2
arch/arm/mach-ux500/timer.c

@@ -9,11 +9,10 @@
 #include <linux/clksrc-dbx500-prcmu.h>
 #include <linux/clksrc-dbx500-prcmu.h>
 #include <linux/of.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_address.h>
+#include <linux/platform_data/clocksource-nomadik-mtu.h>
 
 
 #include <asm/smp_twd.h>
 #include <asm/smp_twd.h>
 
 
-#include <plat/mtu.h>
-
 #include <mach/setup.h>
 #include <mach/setup.h>
 #include <mach/hardware.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
 #include <mach/irqs.h>

+ 0 - 29
arch/arm/plat-nomadik/Kconfig

@@ -1,29 +0,0 @@
-# We keep common IP's here for Nomadik and other similar
-# familiy of processors from ST-Ericsson. At the moment we have
-# just MTU, others to follow soon.
-
-config PLAT_NOMADIK
-	bool
-	depends on ARCH_NOMADIK || ARCH_U8500
-	default y
-	select CLKSRC_MMIO
-	help
-	  Common platform code for Nomadik and other ST-Ericsson
-	  platforms.
-
-if PLAT_NOMADIK
-
-config HAS_MTU
-	bool
-	help
-	  Support for Multi Timer Unit. MTU provides access
-	  to multiple interrupt generating programmable
-	  32-bit free running decrementing counters.
-
-config NOMADIK_MTU_SCHED_CLOCK
-	bool
-	depends on HAS_MTU
-	help
-	  Use the Multi Timer Unit as the sched_clock.
-
-endif

+ 0 - 5
arch/arm/plat-nomadik/Makefile

@@ -1,5 +0,0 @@
-# arch/arm/plat-nomadik/Makefile
-# Copyright 2009 ST-Ericsson
-# Licensed under GPLv2
-
-obj-$(CONFIG_HAS_MTU)	+= timer.o

+ 1 - 1
drivers/char/hw_random/Kconfig

@@ -216,7 +216,7 @@ config HW_RANDOM_MXC_RNGA
 
 
 config HW_RANDOM_NOMADIK
 config HW_RANDOM_NOMADIK
 	tristate "ST-Ericsson Nomadik Random Number Generator support"
 	tristate "ST-Ericsson Nomadik Random Number Generator support"
-	depends on HW_RANDOM && PLAT_NOMADIK
+	depends on HW_RANDOM && ARCH_NOMADIK
 	---help---
 	---help---
 	  This driver provides kernel-side support for the Random Number
 	  This driver provides kernel-side support for the Random Number
 	  Generator hardware found on ST-Ericsson SoCs (8815 and 8500).
 	  Generator hardware found on ST-Ericsson SoCs (8815 and 8500).

+ 16 - 1
drivers/clocksource/Kconfig

@@ -22,6 +22,21 @@ config DW_APB_TIMER_OF
 config ARMADA_370_XP_TIMER
 config ARMADA_370_XP_TIMER
 	bool
 	bool
 
 
+config CLKSRC_NOMADIK_MTU
+	bool
+	depends on (ARCH_NOMADIK || ARCH_U8500)
+	select CLKSRC_MMIO
+	help
+	  Support for Multi Timer Unit. MTU provides access
+	  to multiple interrupt generating programmable
+	  32-bit free running decrementing counters.
+
+config CLKSRC_NOMADIK_MTU_SCHED_CLOCK
+	bool
+	depends on CLKSRC_NOMADIK_MTU
+	help
+	  Use the Multi Timer Unit as the sched_clock.
+
 config CLKSRC_DBX500_PRCMU
 config CLKSRC_DBX500_PRCMU
 	bool "Clocksource PRCMU Timer"
 	bool "Clocksource PRCMU Timer"
 	depends on UX500_SOC_DB8500
 	depends on UX500_SOC_DB8500
@@ -31,7 +46,7 @@ config CLKSRC_DBX500_PRCMU
 
 
 config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
 config CLKSRC_DBX500_PRCMU_SCHED_CLOCK
 	bool "Clocksource PRCMU Timer sched_clock"
 	bool "Clocksource PRCMU Timer sched_clock"
-	depends on (CLKSRC_DBX500_PRCMU && !NOMADIK_MTU_SCHED_CLOCK)
+	depends on (CLKSRC_DBX500_PRCMU && !CLKSRC_NOMADIK_MTU_SCHED_CLOCK)
 	default y
 	default y
 	help
 	help
 	  Use the always on PRCMU Timer as sched_clock
 	  Use the always on PRCMU Timer as sched_clock

+ 1 - 0
drivers/clocksource/Makefile

@@ -11,6 +11,7 @@ obj-$(CONFIG_CLKBLD_I8253)	+= i8253.o
 obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
 obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
 obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
 obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
+obj-$(CONFIG_CLKSRC_NOMADIK_MTU)	+= nomadik-mtu.o
 obj-$(CONFIG_CLKSRC_DBX500_PRCMU)	+= clksrc-dbx500-prcmu.o
 obj-$(CONFIG_CLKSRC_DBX500_PRCMU)	+= clksrc-dbx500-prcmu.o
 obj-$(CONFIG_ARMADA_370_XP_TIMER)	+= time-armada-370-xp.o
 obj-$(CONFIG_ARMADA_370_XP_TIMER)	+= time-armada-370-xp.o
 obj-$(CONFIG_ARCH_BCM2835)	+= bcm2835_timer.o
 obj-$(CONFIG_ARCH_BCM2835)	+= bcm2835_timer.o

+ 2 - 2
arch/arm/plat-nomadik/timer.c → drivers/clocksource/nomadik-mtu.c

@@ -1,6 +1,4 @@
 /*
 /*
- *  linux/arch/arm/plat-nomadik/timer.c
- *
  * Copyright (C) 2008 STMicroelectronics
  * Copyright (C) 2008 STMicroelectronics
  * Copyright (C) 2010 Alessandro Rubini
  * Copyright (C) 2010 Alessandro Rubini
  * Copyright (C) 2010 Linus Walleij for ST-Ericsson
  * Copyright (C) 2010 Linus Walleij for ST-Ericsson
@@ -14,9 +12,11 @@
 #include <linux/irq.h>
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/io.h>
 #include <linux/clockchips.h>
 #include <linux/clockchips.h>
+#include <linux/clocksource.h>
 #include <linux/clk.h>
 #include <linux/clk.h>
 #include <linux/jiffies.h>
 #include <linux/jiffies.h>
 #include <linux/err.h>
 #include <linux/err.h>
+#include <linux/platform_data/clocksource-nomadik-mtu.h>
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
 #include <asm/sched_clock.h>
 #include <asm/sched_clock.h>
 
 

+ 1 - 1
drivers/input/keyboard/Kconfig

@@ -408,7 +408,7 @@ config KEYBOARD_NEWTON
 
 
 config KEYBOARD_NOMADIK
 config KEYBOARD_NOMADIK
 	tristate "ST-Ericsson Nomadik SKE keyboard"
 	tristate "ST-Ericsson Nomadik SKE keyboard"
-	depends on PLAT_NOMADIK
+	depends on (ARCH_NOMADIK || ARCH_U8500)
 	select INPUT_MATRIXKMAP
 	select INPUT_MATRIXKMAP
 	help
 	help
 	  Say Y here if you want to use a keypad provided on the SKE controller
 	  Say Y here if you want to use a keypad provided on the SKE controller

+ 1 - 1
drivers/mtd/nand/Kconfig

@@ -559,7 +559,7 @@ config MTD_NAND_JZ4740
 
 
 config MTD_NAND_FSMC
 config MTD_NAND_FSMC
 	tristate "Support for NAND on ST Micros FSMC"
 	tristate "Support for NAND on ST Micros FSMC"
-	depends on PLAT_SPEAR || PLAT_NOMADIK || MACH_U300
+	depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300
 	help
 	help
 	  Enables support for NAND Flash chips on the ST Microelectronics
 	  Enables support for NAND Flash chips on the ST Microelectronics
 	  Flexible Static Memory Controller (FSMC)
 	  Flexible Static Memory Controller (FSMC)

+ 0 - 0
arch/arm/plat-nomadik/include/plat/mtu.h → include/linux/platform_data/clocksource-nomadik-mtu.h