diff options
Diffstat (limited to 'arch/arm/plat-versatile')
| -rw-r--r-- | arch/arm/plat-versatile/Kconfig | 6 | ||||
| -rw-r--r-- | arch/arm/plat-versatile/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/plat-versatile/headsmp.S | 2 | ||||
| -rw-r--r-- | arch/arm/plat-versatile/leds.c | 103 | ||||
| -rw-r--r-- | arch/arm/plat-versatile/platsmp.c | 3 | ||||
| -rw-r--r-- | arch/arm/plat-versatile/sched-clock.c | 4 | 
6 files changed, 5 insertions, 114 deletions
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index 2c4332b9f94..fce41e93b6a 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig @@ -6,12 +6,6 @@ config PLAT_VERSATILE_CLOCK  config PLAT_VERSATILE_CLCD  	bool -config PLAT_VERSATILE_LEDS -	def_bool y if NEW_LEDS -	depends on ARCH_REALVIEW || ARCH_VERSATILE -	select LEDS_CLASS -	select LEDS_TRIGGERS -  config PLAT_VERSATILE_SCHED_CLOCK  	def_bool y diff --git a/arch/arm/plat-versatile/Makefile b/arch/arm/plat-versatile/Makefile index f88d448b629..2e0c472958a 100644 --- a/arch/arm/plat-versatile/Makefile +++ b/arch/arm/plat-versatile/Makefile @@ -2,6 +2,5 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include  obj-$(CONFIG_PLAT_VERSATILE_CLOCK) += clock.o  obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o -obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o  obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o  obj-$(CONFIG_SMP) += headsmp.o platsmp.o diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S index 2677bc3762d..40f27e52de7 100644 --- a/arch/arm/plat-versatile/headsmp.S +++ b/arch/arm/plat-versatile/headsmp.S @@ -10,6 +10,7 @@   */  #include <linux/linkage.h>  #include <linux/init.h> +#include <asm/assembler.h>  /*   * Realview/Versatile Express specific entry point for secondary CPUs. @@ -17,6 +18,7 @@   * until we're ready for them to initialise.   */  ENTRY(versatile_secondary_startup) + ARM_BE8(setend	be)  	mrc	p15, 0, r0, c0, c0, 5  	bic	r0, #0xff000000  	adr	r4, 1f diff --git a/arch/arm/plat-versatile/leds.c b/arch/arm/plat-versatile/leds.c deleted file mode 100644 index d2490d00b46..00000000000 --- a/arch/arm/plat-versatile/leds.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Driver for the 8 user LEDs found on the RealViews and Versatiles - * Based on DaVinci's DM365 board code - * - * License terms: GNU General Public License (GPL) version 2 - * Author: Linus Walleij <triad@df.lth.se> - */ -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/io.h> -#include <linux/slab.h> -#include <linux/leds.h> - -#include <mach/hardware.h> -#include <mach/platform.h> - -#ifdef VERSATILE_SYS_BASE -#define LEDREG	(__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET) -#endif - -#ifdef REALVIEW_SYS_BASE -#define LEDREG	(__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LED_OFFSET) -#endif - -struct versatile_led { -	struct led_classdev	cdev; -	u8			mask; -}; - -/* - * The triggers lines up below will only be used if the - * LED triggers are compiled in. - */ -static const struct { -	const char *name; -	const char *trigger; -} versatile_leds[] = { -	{ "versatile:0", "heartbeat", }, -	{ "versatile:1", "mmc0", }, -	{ "versatile:2", "cpu0" }, -	{ "versatile:3", "cpu1" }, -	{ "versatile:4", "cpu2" }, -	{ "versatile:5", "cpu3" }, -	{ "versatile:6", }, -	{ "versatile:7", }, -}; - -static void versatile_led_set(struct led_classdev *cdev, -			      enum led_brightness b) -{ -	struct versatile_led *led = container_of(cdev, -						 struct versatile_led, cdev); -	u32 reg = readl(LEDREG); - -	if (b != LED_OFF) -		reg |= led->mask; -	else -		reg &= ~led->mask; -	writel(reg, LEDREG); -} - -static enum led_brightness versatile_led_get(struct led_classdev *cdev) -{ -	struct versatile_led *led = container_of(cdev, -						 struct versatile_led, cdev); -	u32 reg = readl(LEDREG); - -	return (reg & led->mask) ? LED_FULL : LED_OFF; -} - -static int __init versatile_leds_init(void) -{ -	int i; - -	/* All ON */ -	writel(0xff, LEDREG); -	for (i = 0; i < ARRAY_SIZE(versatile_leds); i++) { -		struct versatile_led *led; - -		led = kzalloc(sizeof(*led), GFP_KERNEL); -		if (!led) -			break; - -		led->cdev.name = versatile_leds[i].name; -		led->cdev.brightness_set = versatile_led_set; -		led->cdev.brightness_get = versatile_led_get; -		led->cdev.default_trigger = versatile_leds[i].trigger; -		led->mask = BIT(i); - -		if (led_classdev_register(NULL, &led->cdev) < 0) { -			kfree(led); -			break; -		} -	} - -	return 0; -} - -/* - * Since we may have triggers on any subsystem, defer registration - * until after subsystem_init. - */ -fs_initcall(versatile_leds_init); diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c index 39895d892c3..53feb90c840 100644 --- a/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/plat-versatile/platsmp.c @@ -27,8 +27,7 @@ static void write_pen_release(int val)  {  	pen_release = val;  	smp_wmb(); -	__cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); -	outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1)); +	sync_cache_w(&pen_release);  }  static DEFINE_SPINLOCK(boot_lock); diff --git a/arch/arm/plat-versatile/sched-clock.c b/arch/arm/plat-versatile/sched-clock.c index 51b109e3b6c..c966ae90f4a 100644 --- a/arch/arm/plat-versatile/sched-clock.c +++ b/arch/arm/plat-versatile/sched-clock.c @@ -26,7 +26,7 @@  static void __iomem *ctr; -static u32 notrace versatile_read_sched_clock(void) +static u64 notrace versatile_read_sched_clock(void)  {  	if (ctr)  		return readl(ctr); @@ -37,5 +37,5 @@ static u32 notrace versatile_read_sched_clock(void)  void __init versatile_sched_clock_init(void __iomem *reg, unsigned long rate)  {  	ctr = reg; -	setup_sched_clock(versatile_read_sched_clock, 32, rate); +	sched_clock_register(versatile_read_sched_clock, 32, rate);  }  | 
