Path: blob/master/arch/arm/mach-clps711x/p720t-leds.c
10817 views
/*1* linux/arch/arm/mach-clps711x/leds.c2*3* Integrator LED control routines4*5* Copyright (C) 2000 Deep Blue Solutions Ltd6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA20*/21#include <linux/kernel.h>22#include <linux/init.h>23#include <linux/io.h>2425#include <mach/hardware.h>26#include <asm/leds.h>27#include <asm/system.h>28#include <asm/mach-types.h>2930#include <asm/hardware/clps7111.h>31#include <asm/hardware/ep7212.h>3233static void p720t_leds_event(led_event_t ledevt)34{35unsigned long flags;36u32 pddr;3738local_irq_save(flags);39switch(ledevt) {40case led_idle_start:41break;4243case led_idle_end:44break;4546case led_timer:47pddr = clps_readb(PDDR);48clps_writeb(pddr ^ 1, PDDR);49break;5051default:52break;53}5455local_irq_restore(flags);56}5758static int __init leds_init(void)59{60if (machine_is_p720t())61leds_event = p720t_leds_event;6263return 0;64}6566arch_initcall(leds_init);676869