From 0834ee469057ca87d132bc150b3791d8d9c122c8 Mon Sep 17 00:00:00 2001 From: Bryan Wu Date: Wed, 14 Mar 2012 01:25:26 +0800 Subject: [PATCH] --- yaml --- r: 326975 b: refs/heads/master c: ae5362d2c26c031fdb35ebd9c768eea62f38f25a h: refs/heads/master i: 326973: 894400012f1191017dff542c02b514e852e985fa 326971: 25fcaff4cd0fbc16589d9dc2b4d292846797f40c 326967: c72f6d8430a006ab9aa066dae467d96c6391174b 326959: 270d7b36673ddc5e736b70ff2b9271db1ffb5372 326943: 0d009721f47b0e0b4e4fda11a69306223cf43662 326911: 55f8f711838ed4d67f30ddf4f7d25a74015886a3 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-ks8695/Makefile | 3 - trunk/arch/arm/mach-ks8695/devices.c | 21 ----- .../arm/mach-ks8695/include/mach/devices.h | 5 - trunk/arch/arm/mach-ks8695/leds.c | 92 ------------------- 5 files changed, 1 insertion(+), 122 deletions(-) delete mode 100644 trunk/arch/arm/mach-ks8695/leds.c diff --git a/[refs] b/[refs] index bb92bbd1096d..3f15220cf28a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e031cd513ec2ff661465dc1198220075719e72d1 +refs/heads/master: ae5362d2c26c031fdb35ebd9c768eea62f38f25a diff --git a/trunk/arch/arm/mach-ks8695/Makefile b/trunk/arch/arm/mach-ks8695/Makefile index 853efd9133c6..9324ef965c26 100644 --- a/trunk/arch/arm/mach-ks8695/Makefile +++ b/trunk/arch/arm/mach-ks8695/Makefile @@ -11,9 +11,6 @@ obj- := # PCI support is optional obj-$(CONFIG_PCI) += pci.o -# LEDs -obj-$(CONFIG_LEDS) += leds.o - # Board-specific support obj-$(CONFIG_MACH_KS8695) += board-micrel.o obj-$(CONFIG_MACH_DSM320) += board-dsm320.o diff --git a/trunk/arch/arm/mach-ks8695/devices.c b/trunk/arch/arm/mach-ks8695/devices.c index 73bd63812878..47399bc3c024 100644 --- a/trunk/arch/arm/mach-ks8695/devices.c +++ b/trunk/arch/arm/mach-ks8695/devices.c @@ -182,27 +182,6 @@ static void __init ks8695_add_device_watchdog(void) } -/* -------------------------------------------------------------------- - * LEDs - * -------------------------------------------------------------------- */ - -#if defined(CONFIG_LEDS) -short ks8695_leds_cpu = -1; -short ks8695_leds_timer = -1; - -void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) -{ - /* Enable GPIO to access the LEDs */ - gpio_direction_output(cpu_led, 1); - gpio_direction_output(timer_led, 1); - - ks8695_leds_cpu = cpu_led; - ks8695_leds_timer = timer_led; -} -#else -void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) {} -#endif - /* -------------------------------------------------------------------- */ /* diff --git a/trunk/arch/arm/mach-ks8695/include/mach/devices.h b/trunk/arch/arm/mach-ks8695/include/mach/devices.h index 85a3c9aa7d13..1e6594a0f297 100644 --- a/trunk/arch/arm/mach-ks8695/include/mach/devices.h +++ b/trunk/arch/arm/mach-ks8695/include/mach/devices.h @@ -18,11 +18,6 @@ extern void __init ks8695_add_device_wan(void); extern void __init ks8695_add_device_lan(void); extern void __init ks8695_add_device_hpna(void); - /* LEDs */ -extern short ks8695_leds_cpu; -extern short ks8695_leds_timer; -extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led); - /* PCI */ #define KS8695_MODE_PCI 0 #define KS8695_MODE_MINIPCI 1 diff --git a/trunk/arch/arm/mach-ks8695/leds.c b/trunk/arch/arm/mach-ks8695/leds.c deleted file mode 100644 index 4bd707547293..000000000000 --- a/trunk/arch/arm/mach-ks8695/leds.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * LED driver for KS8695-based boards. - * - * Copyright (C) Andrew Victor - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include - -#include -#include - - -static inline void ks8695_led_on(unsigned int led) -{ - gpio_set_value(led, 0); -} - -static inline void ks8695_led_off(unsigned int led) -{ - gpio_set_value(led, 1); -} - -static inline void ks8695_led_toggle(unsigned int led) -{ - unsigned long is_off = gpio_get_value(led); - if (is_off) - ks8695_led_on(led); - else - ks8695_led_off(led); -} - - -/* - * Handle LED events. - */ -static void ks8695_leds_event(led_event_t evt) -{ - unsigned long flags; - - local_irq_save(flags); - - switch(evt) { - case led_start: /* System startup */ - ks8695_led_on(ks8695_leds_cpu); - break; - - case led_stop: /* System stop / suspend */ - ks8695_led_off(ks8695_leds_cpu); - break; - -#ifdef CONFIG_LEDS_TIMER - case led_timer: /* Every 50 timer ticks */ - ks8695_led_toggle(ks8695_leds_timer); - break; -#endif - -#ifdef CONFIG_LEDS_CPU - case led_idle_start: /* Entering idle state */ - ks8695_led_off(ks8695_leds_cpu); - break; - - case led_idle_end: /* Exit idle state */ - ks8695_led_on(ks8695_leds_cpu); - break; -#endif - - default: - break; - } - - local_irq_restore(flags); -} - - -static int __init leds_init(void) -{ - if ((ks8695_leds_timer == -1) || (ks8695_leds_cpu == -1)) - return -ENODEV; - - leds_event = ks8695_leds_event; - - leds_event(led_start); - return 0; -} - -__initcall(leds_init);