1 /****************************************************
2 * LED1 ---- PG6 LED2 ---- PG7 *
3 * LED3 ---- PG8 LED4 ---- PG9 *
4 * LED5 ---- PG10 LED6 ---- PG11 *
5 ****************************************************/
7 #include <linux/linkage.h>
8 #include <asm/blackfin.h>
10 /* All functions in this file save the registers they uses.
11 So there is no need to save any registers before calling them. */
15 /* Initialize LEDs. */
23 R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z);
34 P0.H = hi(PORTG_DIR_SET);
35 P0.L = lo(PORTG_DIR_SET);
39 P0.H = hi(PORTG_INEN);
40 P0.L = lo(PORTG_INEN);
52 .size _led_init, .-_led_init
54 /* Set one LED on. Leave other LEDs unchanged.
55 It expects the LED number passed through R0. */
73 .size _led_on, .-_led_on
75 /* Set one LED off. Leave other LEDs unchanged. */
85 P0.H = hi(PORTG_CLEAR);
86 P0.L = lo(PORTG_CLEAR);
93 .size _led_off, .-_led_off
95 /* Toggle one LED. Leave other LEDs unchanged. */
116 .size _led_toggle, .-_led_toggle
118 /* Display the number using LEDs in binary format. */
145 .size _led_disp_num, .-_led_disp_num
147 /* Toggle the number using LEDs in binary format. */
149 ENTRY(_led_toggle_num)
171 .size _led_toggle_num, .-_led_toggle_num