1 .cpu arm7tdmi 2 .arch armv4t 3 .fpu softvfp 4 .eabi_attribute 20, 1 5 .eabi_attribute 21, 1 6 .eabi_attribute 23, 3 7 .eabi_attribute 24, 1 8 .eabi_attribute 25, 1 9 .eabi_attribute 26, 1 10 .eabi_attribute 30, 4 11 .eabi_attribute 34, 0 12 .eabi_attribute 18, 4 13 .file "backlight.c" 14 .text 15 .Ltext0: 16 .cfi_sections .debug_frame 17 .file 1 "calypso/backlight.c" 18 .section .text.bl_mode_pwl,"ax",%progbits 19 .align 2 20 .global bl_mode_pwl 21 .syntax unified 22 .arm 24 bl_mode_pwl: 25 .LVL0: 26 .LFB0: 1:calypso/backlight.c **** /* Calypso DBB internal PWL (Pulse Width / Light) Driver */ 2:calypso/backlight.c **** 3:calypso/backlight.c **** /* (C) 2010 by Harald Welte 4:calypso/backlight.c **** * 5:calypso/backlight.c **** * All Rights Reserved 6:calypso/backlight.c **** * 7:calypso/backlight.c **** * This program is free software; you can redistribute it and/or modify 8:calypso/backlight.c **** * it under the terms of the GNU General Public License as published by 9:calypso/backlight.c **** * the Free Software Foundation; either version 2 of the License, or 10:calypso/backlight.c **** * (at your option) any later version. 11:calypso/backlight.c **** * 12:calypso/backlight.c **** * This program is distributed in the hope that it will be useful, 13:calypso/backlight.c **** * but WITHOUT ANY WARRANTY; without even the implied warranty of 14:calypso/backlight.c **** * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15:calypso/backlight.c **** * GNU General Public License for more details. 16:calypso/backlight.c **** * 17:calypso/backlight.c **** */ 18:calypso/backlight.c **** 19:calypso/backlight.c **** #include 20:calypso/backlight.c **** #include 21:calypso/backlight.c **** 22:calypso/backlight.c **** #define BASE_ADDR_PWL 0xfffe8000 23:calypso/backlight.c **** #define PWL_REG(m) (BASE_ADDR_PWL + (m)) 24:calypso/backlight.c **** 25:calypso/backlight.c **** #define ASIC_CONF_REG 0xfffef008 26:calypso/backlight.c **** #define LIGHT_LEVEL_REG 0xfffe4810 27:calypso/backlight.c **** 28:calypso/backlight.c **** enum pwl_reg { 29:calypso/backlight.c **** PWL_LEVEL = 0, 30:calypso/backlight.c **** PWL_CTRL = 1, 31:calypso/backlight.c **** }; 32:calypso/backlight.c **** 33:calypso/backlight.c **** #define ASCONF_PWL_ENA (1 << 4) 34:calypso/backlight.c **** 35:calypso/backlight.c **** void bl_mode_pwl(int on) 36:calypso/backlight.c **** { 27 .loc 1 36 1 view -0 28 .cfi_startproc 29 @ Function supports interworking. 30 @ args = 0, pretend = 0, frame = 0 31 @ frame_needed = 0, uses_anonymous_args = 0 32 @ link register save eliminated. 37:calypso/backlight.c **** uint16_t reg; 33 .loc 1 37 2 view .LVU1 38:calypso/backlight.c **** 39:calypso/backlight.c **** reg = readw(ASIC_CONF_REG); 34 .loc 1 39 2 view .LVU2 40:calypso/backlight.c **** 41:calypso/backlight.c **** if (on) { 35 .loc 1 41 5 is_stmt 0 view .LVU3 36 0000 000050E3 cmp r0, #0 42:calypso/backlight.c **** /* Enable pwl */ 43:calypso/backlight.c **** writeb(0x01, PWL_REG(PWL_CTRL)); 37 .loc 1 43 3 view .LVU4 38 0004 0100A013 movne r0, #1 39 .LVL1: 39:calypso/backlight.c **** 40 .loc 1 39 6 view .LVU5 41 0008 20209FE5 ldr r2, .L4 42 000c B73F52E1 ldrh r3, [r2, #-247] 43 .LVL2: 41:calypso/backlight.c **** /* Enable pwl */ 44 .loc 1 41 2 is_stmt 1 view .LVU6 45 0010 1C109FE5 ldr r1, .L4+4 46 .loc 1 43 3 view .LVU7 44:calypso/backlight.c **** /* Switch pin from LT to PWL */ 45:calypso/backlight.c **** reg |= ASCONF_PWL_ENA; 47 .loc 1 45 7 is_stmt 0 view .LVU8 48 0014 10308313 orrne r3, r3, #16 49 .LVL3: 46:calypso/backlight.c **** writew(reg, ASIC_CONF_REG); 47:calypso/backlight.c **** } else { 48:calypso/backlight.c **** /* Switch pin from PWL to LT */ 49:calypso/backlight.c **** reg &= ~ASCONF_PWL_ENA; 50 .loc 1 49 7 view .LVU9 51 0018 1030C303 biceq r3, r3, #16 43:calypso/backlight.c **** /* Switch pin from LT to PWL */ 52 .loc 1 43 3 view .LVU10 53 001c FE004115 strbne r0, [r1, #-254] 45:calypso/backlight.c **** writew(reg, ASIC_CONF_REG); 54 .loc 1 45 3 is_stmt 1 view .LVU11 55 .LVL4: 46:calypso/backlight.c **** writew(reg, ASIC_CONF_REG); 56 .loc 1 46 3 view .LVU12 50:calypso/backlight.c **** writew(reg, ASIC_CONF_REG); 57 .loc 1 50 3 is_stmt 0 view .LVU13 58 0020 B73F4201 strheq r3, [r2, #-247] @ movhi 46:calypso/backlight.c **** } else { 59 .loc 1 46 3 view .LVU14 60 0024 B73F4211 strhne r3, [r2, #-247] @ movhi 49:calypso/backlight.c **** writew(reg, ASIC_CONF_REG); 61 .loc 1 49 3 is_stmt 1 view .LVU15 62 .LVL5: 63 .loc 1 50 3 view .LVU16 51:calypso/backlight.c **** /* Disable pwl */ 52:calypso/backlight.c **** writeb(0x00, PWL_REG(PWL_CTRL)); 64 .loc 1 52 3 view .LVU17 65 0028 FE004105 strbeq r0, [r1, #-254] 53:calypso/backlight.c **** } 54:calypso/backlight.c **** } 66 .loc 1 54 1 is_stmt 0 view .LVU18 67 002c 1EFF2FE1 bx lr 68 .L5: 69 .align 2 70 .L4: 71 0030 FFF0FEFF .word -69377 72 0034 FF80FEFF .word -98049 73 .cfi_endproc 74 .LFE0: 76 .section .text.bl_level,"ax",%progbits 77 .align 2 78 .global bl_level 79 .syntax unified 80 .arm 82 bl_level: 83 .LVL6: 84 .LFB1: 55:calypso/backlight.c **** 56:calypso/backlight.c **** void bl_level(uint8_t level) 57:calypso/backlight.c **** { 85 .loc 1 57 1 is_stmt 1 view -0 86 .cfi_startproc 87 @ Function supports interworking. 88 @ args = 0, pretend = 0, frame = 0 89 @ frame_needed = 0, uses_anonymous_args = 0 90 @ link register save eliminated. 58:calypso/backlight.c **** if (readw(ASIC_CONF_REG) & ASCONF_PWL_ENA) { 91 .loc 1 58 2 view .LVU20 92 .loc 1 58 6 is_stmt 0 view .LVU21 93 0000 1C309FE5 ldr r3, .L9 94 0004 B73F53E1 ldrh r3, [r3, #-247] 95 .loc 1 58 5 view .LVU22 96 0008 100013E3 tst r3, #16 59:calypso/backlight.c **** writeb(level, PWL_REG(PWL_LEVEL)); 97 .loc 1 59 3 is_stmt 1 view .LVU23 98 000c 14309F15 ldrne r3, .L9+4 60:calypso/backlight.c **** } else { 61:calypso/backlight.c **** /* we need to scale the light level, as the 62:calypso/backlight.c **** * ARMIO light controller only knows 0..63 */ 63:calypso/backlight.c **** writeb(level>>2, LIGHT_LEVEL_REG); 99 .loc 1 63 3 is_stmt 0 view .LVU24 100 0010 14309F05 ldreq r3, .L9+8 101 0014 2001A001 lsreq r0, r0, #2 102 .LVL7: 59:calypso/backlight.c **** writeb(level, PWL_REG(PWL_LEVEL)); 103 .loc 1 59 3 view .LVU25 104 0018 FF004315 strbne r0, [r3, #-255] 105 .loc 1 63 3 is_stmt 1 view .LVU26 106 001c EF004305 strbeq r0, [r3, #-239] 64:calypso/backlight.c **** } 65:calypso/backlight.c **** } 107 .loc 1 65 1 is_stmt 0 view .LVU27 108 0020 1EFF2FE1 bx lr 109 .L10: 110 .align 2 111 .L9: 112 0024 FFF0FEFF .word -69377 113 0028 FF80FEFF .word -98049 114 002c FF48FEFF .word -112385 115 .cfi_endproc 116 .LFE1: 118 .text 119 .Letext0: 120 .file 2 "/usr/lib/gcc/arm-none-eabi/12.2.1/include/stdint.h" DEFINED SYMBOLS *ABS*:00000000 backlight.c /tmp/ccQ2ejfp.s:19 .text.bl_mode_pwl:00000000 $a /tmp/ccQ2ejfp.s:24 .text.bl_mode_pwl:00000000 bl_mode_pwl /tmp/ccQ2ejfp.s:71 .text.bl_mode_pwl:00000030 $d /tmp/ccQ2ejfp.s:77 .text.bl_level:00000000 $a /tmp/ccQ2ejfp.s:82 .text.bl_level:00000000 bl_level /tmp/ccQ2ejfp.s:112 .text.bl_level:00000024 $d NO UNDEFINED SYMBOLS