From: Stefan E. <se...@us...> - 2003-11-10 17:06:45
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv27097/src/blob Modified Files: Makefile.am Added Files: ledasm-pxa.S Log Message: pxa led breakout --- NEW FILE: ledasm-pxa.S --- /* * ledasm-sa11x0.S: simple LED control code * * Copyright (C) 2001 Erik Mouw (J.A...@it...) * Copyright (C) 2003 Stefan Eletzhofer <ste...@in...> * * based on start-pxa.s Copyright (C) 2002 Intel Corporation * Written by Rusty Geldmacher (rus...@in...) * * $Id: ledasm-pxa.S,v 1.1 2003/11/10 17:06:40 seletz Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ .ident "$Id: ledasm-pxa.S,v 1.1 2003/11/10 17:06:40 seletz Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/arch.h> .globl ledinit /* initialise LED GPIO and turn LED on. * clobbers r0 and r1 */ ledinit: #if defined (NO_GPIO_LED_SUPPORT) mov pc, lr #endif ldr r1, =GPDR0 ldr r0, [r1] orr r0, r0, #LED_GPIO str r0, [r1] bl led_off mov pc, lr .globl led_on /* turn LED on. clobbers r0 and r1 */ led_on: #if defined (NO_GPIO_LED_SUPPORT) mov pc, lr #endif ldr r1, =GPSR0 mov r0, #LED_GPIO str r0, [r1] mov pc, lr .globl led_off /* turn LED off. clobbers r0 - r2 */ led_off: #if defined (NO_GPIO_LED_SUPPORT) mov pc, lr #endif ldr r1, =GPCR0 mov r0, #LED_GPIO str r0, [r1] mov pc, lr /* busy wait loop. clobbers r0 */ wait_loop: mov r0, #0x400000 wait_loop1: subs r0, r0, #1 bne wait_loop1 mov pc, lr blinky: /* blink LED. clobbers r0 and r1 */ mov r2, lr bl led_on bl wait_loop bl led_off bl wait_loop mov pc, r2 .globl led_blink /* blinks LED r0 times */ /* clobbers r0 - r4 */ led_blink: #if defined (NO_GPIO_LED_SUPPORT) mov pc, lr #endif mov r4, lr mov r3, r0 /* switch LED off if it wasn't already off */ bl led_off bl wait_loop blink0: bl blinky subs r3, r3, #1 bne blink0 mov pc, r4 Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- Makefile.am 5 Nov 2003 10:09:45 -0000 1.47 +++ Makefile.am 10 Nov 2003 17:06:41 -0000 1.48 @@ -150,13 +150,15 @@ ledasm-mmap.S \ ledasm-s3c2500.S \ ledasm-sa11x0.S \ + ledasm-pxa.S \ memsetup-s3c2500.S \ memsetup-sa1100.S \ memsetup-sa1110.S \ + memsetup-pxa.S \ start-s3c2500.S \ + start-sa11x0.S \ start-pxa.S \ - gpio-pxa.S \ - start-sa11x0.S + gpio-pxa.S blob_elf32_DEPENDENCIES = \ @BLOB_LED_STARTCODE@ \ |