📄 lcd2.lst
字号:
GAS LISTING /tmp/ccwryrah.s page 1 1 .section .mdebug.abi32 2 .previous 3 .section .debug_abbrev,"",@progbits 4 $Ldebug_abbrev0: 5 .section .debug_info,"",@progbits 6 $Ldebug_info0: 7 .section .debug_line,"",@progbits 8 $Ldebug_line0: 9 0000 B2010000 .text 9 0200A300 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .local panel 12 .comm panel,4,4 13 .rdata 14 .align 2 15 .type panels, @object 16 .size panels, 124 17 panels: 18 0000 53616D73 .ascii "Samsung_480x272_TFT\000" 18 756E675F 18 34383078 18 3237325F 18 54465400 19 0014 00000000 .space 44 19 00000000 19 00000000 19 00000000 19 00000000 20 0040 E0010000 .word 480 21 0044 10010000 .word 272 22 0048 000FF90E .word 251203328 23 004c 280E0C00 .word 790056 24 0050 09060400 .word 263689 25 0054 04800100 .word 98308 26 0058 7F020080 .word -2147483009 27 005c 7F020000 .word 639 28 0060 FFFFFF00 .word 16777215 29 0064 2F2F2F2F .word 791621423 30 0068 04000000 .word 4 31 006c 00000000 .word 0 32 0070 08000000 .word 8 33 0074 00000000 .word panel_init 34 0078 00000000 .word panel_shutdown 35 007c 00000000 .data 36 .align 2 37 .type lcd, @object 38 .size lcd, 4 39 lcd: 40 0000 000000B5 .word -1258291200 41 .align 2 42 .type sys, @object 43 .size sys, 4 44 sys: 45 0004 000090B1 .word -1315962880GAS LISTING /tmp/ccwryrah.s page 2 46 0008 00000000 .text 46 00000000 47 .align 2 48 .globl lcd_set_brightness 49 .ent lcd_set_brightness 50 .type lcd_set_brightness, @function 51 lcd_set_brightness: 52 $LFB2: 53 .file 1 "/mnt/hgfs/boot/booter/source/lcd2.c" 1:/mnt/hgfs/boot/booter/source/lcd2.c **** /* 2:/mnt/hgfs/boot/booter/source/lcd2.c **** * Example for Au1100 LCD controller 3:/mnt/hgfs/boot/booter/source/lcd2.c **** */ 4:/mnt/hgfs/boot/booter/source/lcd2.c **** 5:/mnt/hgfs/boot/booter/source/lcd2.c **** #include "example.h" 6:/mnt/hgfs/boot/booter/source/lcd2.c **** #include "irq.h" 7:/mnt/hgfs/boot/booter/source/lcd2.c **** 8:/mnt/hgfs/boot/booter/source/lcd2.c **** int panel_init(); 9:/mnt/hgfs/boot/booter/source/lcd2.c **** int panel_shutdown(); 10:/mnt/hgfs/boot/booter/source/lcd2.c **** 11:/mnt/hgfs/boot/booter/source/lcd2.c **** 12:/mnt/hgfs/boot/booter/source/lcd2.c **** struct panel_settings 13:/mnt/hgfs/boot/booter/source/lcd2.c **** { 14:/mnt/hgfs/boot/booter/source/lcd2.c **** unsigned char name[64]; 15:/mnt/hgfs/boot/booter/source/lcd2.c **** /* panel physical dimensions */ 16:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 Xres; 17:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 Yres; 18:/mnt/hgfs/boot/booter/source/lcd2.c **** /* panel timings */ 19:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_screen; 20:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_horztiming; 21:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_verttiming; 22:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_clkcontrol; 23:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_pwmdiv; 24:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_pwmhi; 25:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_outmask; 26:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_fifoctrl; 27:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_toyclksrc; 28:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_backlight; 29:/mnt/hgfs/boot/booter/source/lcd2.c **** uint32 mode_auxpll; 30:/mnt/hgfs/boot/booter/source/lcd2.c **** int (*device_init)(void); 31:/mnt/hgfs/boot/booter/source/lcd2.c **** int (*device_shutdown)(void); 32:/mnt/hgfs/boot/booter/source/lcd2.c **** }; 33:/mnt/hgfs/boot/booter/source/lcd2.c **** 34:/mnt/hgfs/boot/booter/source/lcd2.c **** /* 35:/mnt/hgfs/boot/booter/source/lcd2.c **** * Controller configurations for various panels. 36:/mnt/hgfs/boot/booter/source/lcd2.c **** */ 37:/mnt/hgfs/boot/booter/source/lcd2.c **** static const struct panel_settings panels[] = 38:/mnt/hgfs/boot/booter/source/lcd2.c **** { 39:/mnt/hgfs/boot/booter/source/lcd2.c **** { // Samsung 480x272 TFT 40:/mnt/hgfs/boot/booter/source/lcd2.c **** "Samsung_480x272_TFT", 41:/mnt/hgfs/boot/booter/source/lcd2.c **** 480, 272, 42:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_screen */ LCD_SCREEN_SX_N(480) | LCD_SCREEN_SY_N(272), 43:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_horztiming */ LCD_HORZTIMING_HPW_N(41) | LCD_HORZTIMING_HND1_N(8) | LCD_HORZTIMING_HND2_N 44:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_verttiming */ LCD_VERTTIMING_VPW_N(10) | LCD_VERTTIMING_VND1_N(4) | LCD_VERTTIMING_VND2_N 45:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_clkcontrol */ LCD_CLKCONTROL_IH | LCD_CLKCONTROL_IV | LCD_CLKCONTROL_PCD_N(4), // /10=9.6 46:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_pwmdiv */ 0x8000027F, 47:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_pwmhi */ 0x0000027f, 48:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_outmask */ 0x00FFFFFF,GAS LISTING /tmp/ccwryrah.s page 3 49:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_fifoctrl */ 0x2f2f2f2f, 50:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_toyclksrc */ 0x00000004, // AUXPLL directly 51:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_backlight */ 0x00000000, 52:/mnt/hgfs/boot/booter/source/lcd2.c **** /* mode_auxpll */ 8, // 96MHz AUXPLL 53:/mnt/hgfs/boot/booter/source/lcd2.c **** /* device_init */ panel_init, 54:/mnt/hgfs/boot/booter/source/lcd2.c **** /* device_shutdown */ panel_shutdown, 55:/mnt/hgfs/boot/booter/source/lcd2.c **** }, 56:/mnt/hgfs/boot/booter/source/lcd2.c **** }; 57:/mnt/hgfs/boot/booter/source/lcd2.c **** 58:/mnt/hgfs/boot/booter/source/lcd2.c **** #define NUM_PANELS (sizeof(panels) / sizeof(struct panel_settings)) 59:/mnt/hgfs/boot/booter/source/lcd2.c **** 60:/mnt/hgfs/boot/booter/source/lcd2.c **** static AU1200_LCD* lcd = (AU1200_LCD*) KSEG1(LCD_PHYS_ADDR); 61:/mnt/hgfs/boot/booter/source/lcd2.c **** static AU1X00_SYS* sys = (AU1X00_SYS *) KSEG1(SYS_PHYS_ADDR); 62:/mnt/hgfs/boot/booter/source/lcd2.c **** static int panel = 0; 63:/mnt/hgfs/boot/booter/source/lcd2.c **** 64:/mnt/hgfs/boot/booter/source/lcd2.c **** void lcd_irq_deinit(); 65:/mnt/hgfs/boot/booter/source/lcd2.c **** void lcd_irq_init(); 66:/mnt/hgfs/boot/booter/source/lcd2.c **** 67:/mnt/hgfs/boot/booter/source/lcd2.c **** 68:/mnt/hgfs/boot/booter/source/lcd2.c **** int lcd_set_brightness(unsigned int brightness) 69:/mnt/hgfs/boot/booter/source/lcd2.c **** { 54 .loc 1 69 0 55 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 56 .mask 0x00000000,0 57 .fmask 0x00000000,0 58 .set noreorder 59 .set nomacro 60 70:/mnt/hgfs/boot/booter/source/lcd2.c **** unsigned int hi, divider; 71:/mnt/hgfs/boot/booter/source/lcd2.c **** 72:/mnt/hgfs/boot/booter/source/lcd2.c **** if (brightness > 255) 73:/mnt/hgfs/boot/booter/source/lcd2.c **** brightness = 255; 74:/mnt/hgfs/boot/booter/source/lcd2.c **** brightness = 255 - brightness; 75:/mnt/hgfs/boot/booter/source/lcd2.c **** divider = (lcd->pwmdiv & 0x3FFFF) + 1; 61 .loc 1 75 0 62 0000 0000023C lui $2,%hi(lcd) 63 0004 0000478C lw $7,%lo(lcd)($2) 64 .loc 1 73 0 65 0008 FF000624 li $6,255 # 0xff 66 .loc 1 72 0 67 000c 0001832C sltu $3,$4,256 68 .loc 1 69 0 69 0010 21108000 move $2,$4 70 .loc 1 73 0 71 0014 0A10C300 movz $2,$6,$3 72 .loc 1 75 0 73 0018 1800E48C lw $4,24($7) 74 .loc 1 74 0 75 001c 2310C200 subu $2,$6,$2 76 .loc 1 75 0 77 0020 0300033C li $3,196608 # 0x30000 76:/mnt/hgfs/boot/booter/source/lcd2.c **** hi = (((brightness & 0xFF)+1) * divider >> 8); 78 .loc 1 76 0 79 0024 FF004530 andi $5,$2,0xff 80 .loc 1 75 0 81 0028 FFFF6334 ori $3,$3,0xffff 82 .loc 1 76 0GAS LISTING /tmp/ccwryrah.s page 4 83 002c 0100A524 addiu $5,$5,1 84 .loc 1 75 0 85 0030 24208300 and $4,$4,$3 86 .loc 1 76 0 87 0034 02188570 mul $3,$4,$5 88 0038 21206500 addu $4,$3,$5 89 003c 02220400 srl $4,$4,8 77:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->pwmhi = hi; 90 .loc 1 77 0 91 0040 1C00E4AC sw $4,28($7) 78:/mnt/hgfs/boot/booter/source/lcd2.c **** 79:/mnt/hgfs/boot/booter/source/lcd2.c **** return brightness; 80:/mnt/hgfs/boot/booter/source/lcd2.c **** } 92 .loc 1 80 0 93 0044 0800E003 j $31 94 0048 00000000 nop 95 96 .set macro 97 .set reorder 98 $LFE2: 99 .end lcd_set_brightness 100 .align 2 101 .globl lcd_irq 102 .ent lcd_irq 103 .type lcd_irq, @function 104 lcd_irq: 105 $LFB5: 81:/mnt/hgfs/boot/booter/source/lcd2.c **** 82:/mnt/hgfs/boot/booter/source/lcd2.c **** void lcd_shutdown() 83:/mnt/hgfs/boot/booter/source/lcd2.c **** { 84:/mnt/hgfs/boot/booter/source/lcd2.c **** if(lcd->screen & LCD_SCREEN_SEN) 85:/mnt/hgfs/boot/booter/source/lcd2.c **** { 86:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd_irq_deinit(); //Disable LCD IRQ 87:/mnt/hgfs/boot/booter/source/lcd2.c **** 88:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->winenable = 0; //Disable all windows 89:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->screen &= ~LCD_SCREEN_SEN; //Disable the LCD 90:/mnt/hgfs/boot/booter/source/lcd2.c **** 91:/mnt/hgfs/boot/booter/source/lcd2.c **** do 92:/mnt/hgfs/boot/booter/source/lcd2.c **** { 93:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->intstatus = lcd->intstatus; 94:/mnt/hgfs/boot/booter/source/lcd2.c **** } while((lcd->intstatus & LCD_INT_SD) == 0); //Wait for the LCD FIFO's to drain 95:/mnt/hgfs/boot/booter/source/lcd2.c **** 96:/mnt/hgfs/boot/booter/source/lcd2.c **** if(panels[panel].device_shutdown != NULL) 97:/mnt/hgfs/boot/booter/source/lcd2.c **** panels[panel].device_shutdown(); //Run device specific deinitialization routine 98:/mnt/hgfs/boot/booter/source/lcd2.c **** 99:/mnt/hgfs/boot/booter/source/lcd2.c **** #if defined(AU1200) 100:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc &= ~(SYS_PINFUNC_LP0 | SYS_PINFUNC_LP1 | SYS_PINFUNC_LD0 | SYS_PINFUNC_LD1 | SYS_PINF 101:/mnt/hgfs/boot/booter/source/lcd2.c **** #endif 102:/mnt/hgfs/boot/booter/source/lcd2.c **** } 103:/mnt/hgfs/boot/booter/source/lcd2.c **** } 104:/mnt/hgfs/boot/booter/source/lcd2.c **** 105:/mnt/hgfs/boot/booter/source/lcd2.c **** unsigned int lcd_init() 106:/mnt/hgfs/boot/booter/source/lcd2.c **** { 107:/mnt/hgfs/boot/booter/source/lcd2.c **** //Ensure screen is disabled before reconfiguring 108:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd_shutdown(); 109:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->screen = 0; 110:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->winenable = 0;GAS LISTING /tmp/ccwryrah.s page 5 111:/mnt/hgfs/boot/booter/source/lcd2.c **** 112:/mnt/hgfs/boot/booter/source/lcd2.c **** // Get the panel information/display mode 113:/mnt/hgfs/boot/booter/source/lcd2.c **** panel = 0; 114:/mnt/hgfs/boot/booter/source/lcd2.c **** 115:/mnt/hgfs/boot/booter/source/lcd2.c **** #if defined(AU1200) 116:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc |= SYS_PINFUNC_LD0 | SYS_PINFUNC_LD1; 117:/mnt/hgfs/boot/booter/source/lcd2.c **** if (panels[panel].mode_pwmdiv & LCD_PWMDIV_EN) 118:/mnt/hgfs/boot/booter/source/lcd2.c **** { 119:/mnt/hgfs/boot/booter/source/lcd2.c **** if (panels[panel].mode_pwmhi & LCD_PWMHI_PWMHI0) 120:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc |= SYS_PINFUNC_LP0; 121:/mnt/hgfs/boot/booter/source/lcd2.c **** if (panels[panel].mode_pwmhi & LCD_PWMHI_PWMHI1) 122:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc |= SYS_PINFUNC_LP1; 123:/mnt/hgfs/boot/booter/source/lcd2.c **** } 124:/mnt/hgfs/boot/booter/source/lcd2.c **** switch (panels[panel].mode_screen & LCD_SCREEN_ST) 125:/mnt/hgfs/boot/booter/source/lcd2.c **** { 126:/mnt/hgfs/boot/booter/source/lcd2.c **** case LCD_SCREEN_ST_M8STN: 127:/mnt/hgfs/boot/booter/source/lcd2.c **** case LCD_SCREEN_ST_CDSTN: 128:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc |= SYS_PINFUNC_LD8; 129:/mnt/hgfs/boot/booter/source/lcd2.c **** break; 130:/mnt/hgfs/boot/booter/source/lcd2.c **** case LCD_SCREEN_ST_TFT: 131:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc |= SYS_PINFUNC_LD8 | SYS_PINFUNC_LD16; 132:/mnt/hgfs/boot/booter/source/lcd2.c **** break; 133:/mnt/hgfs/boot/booter/source/lcd2.c **** } 134:/mnt/hgfs/boot/booter/source/lcd2.c **** if (panels[panel].mode_clkcontrol & LCD_CLKCONTROL_EXT) 135:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->pinfunc &= ~SYS_PINFUNC_EX1; 136:/mnt/hgfs/boot/booter/source/lcd2.c **** #endif 137:/mnt/hgfs/boot/booter/source/lcd2.c **** 138:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("Using panel %d: %s\n\n", panel, panels[panel].name); 139:/mnt/hgfs/boot/booter/source/lcd2.c **** 140:/mnt/hgfs/boot/booter/source/lcd2.c **** //Setup the TOY lcd clock 141:/mnt/hgfs/boot/booter/source/lcd2.c **** if (!(panels[panel].mode_clkcontrol & LCD_CLKCONTROL_EXT)) //If using internal clock 142:/mnt/hgfs/boot/booter/source/lcd2.c **** { 143:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("Using Internal LCD Clock: %X\n", panels[panel].mode_toyclksrc); 144:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->auxpll = panels[panel].mode_auxpll; 145:/mnt/hgfs/boot/booter/source/lcd2.c **** sys->clksrc = (sys->clksrc & ~0x0000001f) | panels[panel].mode_toyclksrc; 146:/mnt/hgfs/boot/booter/source/lcd2.c **** } 147:/mnt/hgfs/boot/booter/source/lcd2.c **** 148:/mnt/hgfs/boot/booter/source/lcd2.c **** //Setup LCD controller 149:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_horztiming = 0x%08X\n", panels[panel].mode_horztiming); 150:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_verttiming = 0x%08X\n", panels[panel].mode_verttiming); 151:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_clkcontrol = 0x%08X\n", panels[panel].mode_clkcontrol); 152:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_pwmdiv = 0x%08X\n", panels[panel].mode_pwmdiv); 153:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_pwmhi = 0x%08X\n", panels[panel].mode_pwmhi); 154:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_outmask = 0x%08X\n", panels[panel].mode_outmask); 155:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_fifoctrl = 0x%08X\n", panels[panel].mode_fifoctrl); 156:/mnt/hgfs/boot/booter/source/lcd2.c **** DPRINTF("lcd_screen = 0x%08X\n", panels[panel].mode_screen); 157:/mnt/hgfs/boot/booter/source/lcd2.c **** 158:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->horztiming = panels[panel].mode_horztiming; 159:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->verttiming = panels[panel].mode_verttiming; 160:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->clkcontrol = panels[panel].mode_clkcontrol; 161:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->outmask = panels[panel].mode_outmask; 162:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->fifoctrl = panels[panel].mode_fifoctrl; 163:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->pwmdiv = panels[panel].mode_pwmdiv; 164:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->pwmhi = panels[panel].mode_pwmhi; 165:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->screen = panels[panel].mode_screen; 166:/mnt/hgfs/boot/booter/source/lcd2.c **** 167:/mnt/hgfs/boot/booter/source/lcd2.c **** //Enable the LCD ControllerGAS LISTING /tmp/ccwryrah.s page 6 168:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd->screen |= LCD_SCREEN_SEN; 169:/mnt/hgfs/boot/booter/source/lcd2.c **** 170:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd_irq_init(); 171:/mnt/hgfs/boot/booter/source/lcd2.c **** 172:/mnt/hgfs/boot/booter/source/lcd2.c **** if(panels[panel].device_init != NULL) 173:/mnt/hgfs/boot/booter/source/lcd2.c **** panels[panel].device_init(); //Run device specific initialization routine 174:/mnt/hgfs/boot/booter/source/lcd2.c **** 175:/mnt/hgfs/boot/booter/source/lcd2.c **** lcd_set_brightness(120); 176:/mnt/hgfs/boot/booter/source/lcd2.c **** 177:/mnt/hgfs/boot/booter/source/lcd2.c **** return 1; 178:/mnt/hgfs/boot/booter/source/lcd2.c **** } 179:/mnt/hgfs/boot/booter/source/lcd2.c **** 180:/mnt/hgfs/boot/booter/source/lcd2.c **** struct LCD_IRQ 181:/mnt/hgfs/boot/booter/source/lcd2.c **** { 182:/mnt/hgfs/boot/booter/source/lcd2.c **** BOOL enabled; 183:/mnt/hgfs/boot/booter/source/lcd2.c **** void (*handler)(int, void*); 184:/mnt/hgfs/boot/booter/source/lcd2.c **** void* arg; 185:/mnt/hgfs/boot/booter/source/lcd2.c **** }; 186:/mnt/hgfs/boot/booter/source/lcd2.c **** static struct LCD_IRQ lcd_irqs[18]; 187:/mnt/hgfs/boot/booter/source/lcd2.c **** #define NUM_IRQS (sizeof(lcd_irqs) / sizeof(struct LCD_IRQ)) 188:/mnt/hgfs/boot/booter/source/lcd2.c **** 189:/mnt/hgfs/boot/booter/source/lcd2.c **** void lcd_irq(int number, void* arg) 190:/mnt/hgfs/boot/booter/source/lcd2.c **** { 106 .loc 1 190 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -