linux/drivers/video/nuc900fb.c
<<
on> v3/spa v3/form v3a on> v href="../linux+v.116.2/drivers/video/nuc900fb.c">on> v3img src="../.static/gfx/right.png" alt=">>">on3/spa on3spa class="lxr_search">on> on> v3input typionhidden" namionnavtarget" /option">on> v3input typiontext" namionsearch" idonsearch">on> v3butt11Search v onclick="return ajax_prefs();">on> vPrefs v3/a>on3/spa > v v3/div > v v3form ac1" ="ajax+*" method="post" onsubmit="return false;">on3input typionhidden" namionajax_lookup" idonajax_lookup" /option">o> v v3/form o> v v3div class="headingbott1m">
v
v v v3div idonsearch_results" class="search_results" > v v3/div 3div idoncontent"> 3div idonfile_contents"
v v13/a>3spa	 class="comment">/*3/spa	  v v23/a>3spa	 class="comment"> *3/spa	  v v33/a>3spa	 class="comment"> * Copyright (c) 2009 Nuvot11v v43/a>3spa	 class="comment"> * All rights reserved.3/spa	  v v53/a>3spa	 class="comment"> *3/spa	  v v63/a>3spa	 class="comment"> * This program is free software; you ca	 redistribute it and/or modify3/spa	  v v73/a>3spa	 class="comment"> * it under thev v83/a>3spa	 class="comment"> * thev v93/a>3spa	 class="comment"> * (at your .11"
	) any later vers.11.3/spa	  v .6"
a>3spa	 class="comment"> *3/spa	  v 113/a>3spa	 class="comment"> *  Descri11"
	:3/spa	  v 123/a>3spa	 class="comment"> * v vNuvot11v 133/a>3spa	 class="comment"> *  Author:3/spa	  v 143/a>3spa	 class="comment"> *    Wang Qiang (rurality.linux@gmail.com) 2009/12/113/spa	  v 153/a>3spa	 class="comment"> */3/spa	  v 163/a>#include <linux/module.h3/a>> v 173/a>#include <linux/kernel.h3/a>> v 183/a>#include <linux/err.h3/a>> v 193/a>#include <linux/errno.h3/a>> v 203/a>#include <linux/string.h3/a>> v 213/a>#include <linux/mm.h3/a>> v 223/a>#include <linux/tty.h3/a>> v 233/a>#include <linux/slab.h3/a>> v 243/a>#include <linux/delay.h3/a>> v 253/a>#include <linux/fb.h3/a>> v 263/a>#include <linux/init.h3/a>> v 273/a>#include <linux/dma-mapping.h3/a>> v 283/a>#include <linux/interrupt.h3/a>> v 293/a>#include <linux/workqueue.h3/a>> v 303/a>#include <linux/wait.h3/a>> v 313/a>#include <linux/platform_device.h3/a>> v 323/a>#include <linux/clk.h3/a>> v 333/a>#include <linux/cpufreq.h3/a>> v 343/a>#include <linux/io.h3/a>> v 353/a>#include <linux/pm.h3/a>> v 363/a>#include <linux/device.h3/a>> v 373/a> v 383/a>#include <mach/map.h3/a>> v 393/a>#include <mach/regs-clock.h3/a>> v 403/a>#include <mach/regs-ldm.h3/a>> v 413/a>#include <linux/platform_data/video-nuc900fb.h3/a>> v 423/a> v 433/a>#include "nuc900fb.h3/a>" v 443/a> v 453/a> v 463/a>3spa	 class="comment">/*3/spa	  v 473/a>3spa	 class="comment"> *  Initialize thev 483/a>3spa	 class="comment"> */3/spa	  v 493/a>static voidv3a href="+code=nuc900fb_set_lcdaddr" class="sref">nuc900fb_set_lcdaddr3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v 503/a>{ v 513/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v 523/a>        voidv3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=regs" class="sref">regs3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>; v 533/a>        unsigned longv3a href="+code=vbaddr1" class="sref">vbaddr13/a>,v3a href="+code=vbaddr2" class="sref">vbaddr23/a>; v 543/a> v 553/a>        3a href="+code=vbaddr1" class="sref">vbaddr13/a>  =v3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_start" class="sref">smem_start3/a>; v 563/a>        3a href="+code=vbaddr2" class="sref">vbaddr23/a>  =v3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_start" class="sref">smem_start3/a>; v 573/a>        3a href="+code=vbaddr2" class="sref">vbaddr23/a> +=v3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=line_length" class="sref">line_length3/a> *v3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=yres" class="sref">yres3/a>; v 583/a> v 593/a>        3spa	 class="comment">/* set frambuffer start phy addr*/3/spa	  v 603/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=vbaddr1" class="sref">vbaddr13/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_VA_BADDR0" class="sref">REG_LCM_VA_BADDR03/a>); v 613/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=vbaddr2" class="sref">vbaddr23/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_VA_BADDR1" class="sref">REG_LCM_VA_BADDR13/a>); v 623/a> v 633/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_va_fbctrl" class="sref">lcd_va_fbctrl3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_VA_FBCTRL" class="sref">REG_LCM_VA_FBCTRL3/a>); v 643/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_va_scale" class="sref">lcd_va_scale3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_VA_SCALE" class="sref">REG_LCM_VA_SCALE3/a>); v 653/a>} v 663/a> v 673/a>3spa	 class="comment">/*3/spa	  v 683/a>3spa	 class="comment"> *      calculate divider for lcd div3/spa	  v 693/a>3spa	 class="comment"> */3/spa	  v 703/a>static unsigned intv3a href="+code=nuc900fb_calc_pixclk" class="sref">nuc900fb_calc_pixclk3/a>(structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a>, v 713/a>                                         unsigned longv3a href="+code=pixclk" class="sref">pixclk3/a>) v 723/a>{ v 733/a>        unsigned longv3a href="+code=clk" class="sref">clk3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk_rate" class="sref">clk_rate3/a>; v 743/a>        unsigned longvlongv3a href="+code=div" class="sref">div3/a>; v 753/a> v 763/a>        3spa	 class="comment">/* pixclk is in picseconds. our clock is in Hz*/3/spa	  v 773/a>        3spa	 class="comment">/* div = (clk * pixclk)/10^12 */3/spa	  v 783/a>        3a href="+code=div" class="sref">div3/a> = (unsigned longvlong)3a href="+code=clk" class="sref">clk3/a> *v3a href="+code=pixclk" class="sref">pixclk3/a>; v 793/a>        3a href="+code=div" class="sref">div3/a> >>= 12; v 803/a>        3a href="+code=do_div" class="sref">do_div3/a>(3a href="+code=div" class="sref">div3/a>, 625 *v625UL *v625); v 813/a> v 823/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"pixclk %ld, divisor is %lld\n"pixclk3/a>,v3a href="+code=div" class="sref">div3/a>); v 833/a> v 843/a>        return 3a href="+code=div" class="sref">div3/a>; v 853/a>} v 863/a> v 873/a>3spa	 class="comment">/*3/spa	  v 883/a>3spa	 class="comment"> *      Check thev 903/a>static intv3a href="+code=nuc900fb_check_var" class="sref">nuc900fb_check_var3/a>(structv3a href="+code=fb_var_screeninfo" class="sref">fb_var_screeninfo3/a> *3a href="+code=var" class="sref">var3/a>, v 913/a>                               structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v 923/a>{ v 933/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v 943/a>        structv3a href="+code=nuc900fb_mach_info" class="sref">nuc900fb_mach_info3/a> *3a href="+code=mach_info" class="sref">mach_info3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>->3a href="+code=platform_data" class="sref">platform_data3/a>; v 953/a>        structv3a href="+code=nuc900fb_display" class="sref">nuc900fb_display3/a> *3a href="+code=display" class="sref">display3/a> =v3a href="+code=NULL" class="sref">NULL3/a>; v 963/a>        structv3a href="+code=nuc900fb_display" class="sref">nuc900fb_display3/a> *3a href="+code=default_display" class="sref">default_display3/a> =v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a> + v 973/a>                                                   3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=default_display" class="sref">default_display3/a>; v 983/a>        intv3a href="+code=i" class="sref">i3/a>; v 993/a> v1003/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"check_var(var=%p, info=%p)\n"var3/a>,v3a href="+code=info" class="sref">info3/a>); v1013/a> v1023/a>        3spa	 class="comment">/* validate x/y resolu3.11<*/3/spa	  v1033/a>        3spa	 class="comment">/* choose default mode if possible<*/3/spa	  v1043/a>        if (3a href="+code=var" class="sref">var3/a>->3a href="+code=xres" class="sref">xres3/a> ==v3a href="+code=default_display" class="sref">default_display3/a>->3a href="+code=xres" class="sref">xres3/a> && v1053/a>            3a href="+code=var" class="sref">var3/a>->3a href="+code=yres" class="sref">yres3/a> ==v3a href="+code=default_display" class="sref">default_display3/a>->3a href="+code=yres" class="sref">yres3/a> && v1063/a>            3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a> ==v3a href="+code=default_display" class="sref">default_display3/a>->3a href="+code=bpp" class="sref">bpp3/a>) v1073/a>                3a href="+code=display" class="sref">display3/a> =v3a href="+code=default_display" class="sref">default_display3/a>; v1083/a>        else v1093/a>                for (3a href="+code=i" class="sref">i3/a> =v0;v3a href="+code=i" class="sref">i3/a> < 3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=num_displays" class="sref">num_displays3/a>;v3a href="+code=i" class="sref">i3/a>++) v1103/a>                        if (3a href="+code=var" class="sref">var3/a>->3a href="+code=xres" class="sref">xres3/a> ==v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a>[3a href="+code=i" class="sref">i3/a>].3a href="+code=xres" class="sref">xres3/a> && v1113/a>                            3a href="+code=var" class="sref">var3/a>->3a href="+code=yres" class="sref">yres3/a> ==v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a>[3a href="+code=i" class="sref">i3/a>].3a href="+code=yres" class="sref">yres3/a> && v1123/a>                            3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a> ==v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a>[3a href="+code=i" class="sref">i3/a>].3a href="+code=bpp" class="sref">bpp3/a>) { v1133/a>                                3a href="+code=display" class="sref">display3/a> =v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a> +v3a href="+code=i" class="sref">i3/a>; v1143/a>                                break; v1153/a>                        } v1163/a> v1173/a>        if (3a href="+code=display" class="sref">display3/a> ==v3a href="+code=NULL" class="sref">NULL3/a>) { v1183/a>                3a href="+code=printk" class="sref">printk3/a>(3a href="+code=KERN_ERR" class="sref">KERN_ERR3/a> 3spa	 class="string">"wrongvresolu3.11v1193/a>                        3a href="+code=var" class="sref">var3/a>->3a href="+code=xres" class="sref">xres3/a>,v3a href="+code=var" class="sref">var3/a>->3a href="+code=yres" class="sref">yres3/a>,v3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a>); v1203/a>                return -3a href="+code=EINVAL" class="sref">EINVAL3/a>; v1213/a>        } v1223/a> v1233/a>        3spa	 class="comment">/* it should be thev1243/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=xres_virtual" class="sref">xres_virtual3/a>       =v3a href="+code=display" class="sref">display3/a>->3a href="+code=xres" class="sref">xres3/a>; v1253/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=yres_virtual" class="sref">yres_virtual3/a>       =v3a href="+code=display" class="sref">display3/a>->3a href="+code=yres" class="sref">yres3/a>; v1263/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=height" class="sref">height3/a>             =v3a href="+code=display" class="sref">display3/a>->3a href="+code=height" class="sref">height3/a>; v1273/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=width" class="sref">width3/a>              =v3a href="+code=display" class="sref">display3/a>->3a href="+code=width" class="sref">width3/a>; v1283/a> v1293/a>        3spa	 class="comment">/* copy lcd settings<*/3/spa	  v1303/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=pixclock" class="sref">pixclock3/a>           =v3a href="+code=display" class="sref">display3/a>->3a href="+code=pixclock" class="sref">pixclock3/a>; v1313/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=left_margin" class="sref">left_margin3/a>        =v3a href="+code=display" class="sref">display3/a>->3a href="+code=left_margin" class="sref">left_margin3/a>; v1323/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=right_margin" class="sref">right_margin3/a>       =v3a href="+code=display" class="sref">display3/a>->3a href="+code=right_margin" class="sref">right_margin3/a>; v1333/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=upper_margin" class="sref">upper_margin3/a>       =v3a href="+code=display" class="sref">display3/a>->3a href="+code=upper_margin" class="sref">upper_margin3/a>; v1343/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=lower_margin" class="sref">lower_margin3/a>       =v3a href="+code=display" class="sref">display3/a>->3a href="+code=lower_margin" class="sref">lower_margin3/a>; v1353/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=vsync_len" class="sref">vsync_len3/a>          =v3a href="+code=display" class="sref">display3/a>->3a href="+code=vsync_len" class="sref">vsync_len3/a>; v1363/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=hsync_len" class="sref">hsync_len3/a>          =v3a href="+code=display" class="sref">display3/a>->3a href="+code=hsync_len" class="sref">hsync_len3/a>; v1373/a> v1383/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=transp" class="sref">transp3/a>.3a href="+code=offset" class="sref">offset3/a>      =v0; v1393/a>        3a href="+code=var" class="sref">var3/a>->3a href="+code=transp" class="sref">transp3/a>.3a href="+code=length" class="sref">length3/a>      =v0; v1403/a> v1413/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_dccs" class="sref">lcd_dccs3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=dccs" class="sref">dccs3/a>; v1423/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_device_ctrl" class="sref">lcd_device_ctrl3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=devctl" class="sref">devctl3/a>; v1433/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_va_fbctrl" class="sref">lcd_va_fbctrl3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=fbctrl" class="sref">fbctrl3/a>; v1443/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_va_scale" class="sref">lcd_va_scale3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=scale" class="sref">scale3/a>; v1453/a> v1463/a>        3spa	 class="comment">/* set R/G/B possions<*/3/spa	  v1473/a>        switch (3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a>) { v1483/a>        case 1: v1493/a>        case 2: v1503/a>        case 4: v1513/a>        case 8: v1523/a>        default: v1533/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=offset" class="sref">offset3/a>         =v0; v1543/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=length" class="sref">length3/a>         =v3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a>; v1553/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>              =v3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>; v1563/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>               =v3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>; v1573/a>                break; v1583/a>        case 12: v1593/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=length" class="sref">length3/a>         =v4; v1603/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=length" class="sref">length3/a>       =v4; v1613/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=length" class="sref">length3/a>        =v4; v1623/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=offset" class="sref">offset3/a>         =v8; v1633/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=offset" class="sref">offset3/a>       =v4; v1643/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=offset" class="sref">offset3/a>        =v0; v1653/a>                break; v1663/a>        case 16: v1673/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=length" class="sref">length3/a>         =v5; v1683/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=length" class="sref">length3/a>       =v6; v1693/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=length" class="sref">length3/a>        =v5; v1703/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=offset" class="sref">offset3/a>         =v11; v1713/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=offset" class="sref">offset3/a>       =v5; v1723/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=offset" class="sref">offset3/a>        =v0; v1733/a>                break; v1743/a>        case 18: v1753/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=length" class="sref">length3/a>         =v6; v1763/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=length" class="sref">length3/a>       =v6; v1773/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=length" class="sref">length3/a>        =v6; v1783/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=offset" class="sref">offset3/a>         =v12; v1793/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=offset" class="sref">offset3/a>       =v6; v1803/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=offset" class="sref">offset3/a>        =v0; v1813/a>                break; v1823/a>        case 32: v1833/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=length" class="sref">length3/a>         =v8; v1843/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=length" class="sref">length3/a>       =v8; v1853/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=length" class="sref">length3/a>        =v8; v1863/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=red" class="sref">red3/a>.3a href="+code=offset" class="sref">offset3/a>         =v16; v1873/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=green" class="sref">green3/a>.3a href="+code=offset" class="sref">offset3/a>       =v8; v1883/a>                3a href="+code=var" class="sref">var3/a>->3a href="+code=blue" class="sref">blue3/a>.3a href="+code=offset" class="sref">offset3/a>        =v0; v1893/a>                break; v1903/a>        } v1913/a> v1923/a>        return 0; v1933/a>} v1943/a> v1953/a>3spa	 class="comment">/*3/spa	  v1963/a>3spa	 class="comment"> *      Calculate lcd register values from var setting & save into hw3/spa	  v1973/a>3spa	 class="comment"> */3/spa	  v1983/a>static voidv3a href="+code=nuc900fb_calculate_lcd_regs" class="sref">nuc900fb_calculate_lcd_regs3/a>(const structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>, v1993/a>                                        structv3a href="+code=nuc900fb_hw" class="sref">nuc900fb_hw3/a> *3a href="+code=regs" class="sref">regs3/a>) v2003/a>{ v2013/a>        const structv3a href="+code=fb_var_screeninfo" class="sref">fb_var_screeninfo3/a> *3a href="+code=var" class="sref">var3/a> =v&3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>; v2023/a>        intv3a href="+code=vtt" class="sref">vtt3/a> =v3a href="+code=var" class="sref">var3/a>->3a href="+code=height" class="sref">height3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=upper_margin" class="sref">upper_margin3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=lower_margin" class="sref">lower_margin3/a>; v2033/a>        intv3a href="+code=htt" class="sref">htt3/a> =v3a href="+code=var" class="sref">var3/a>->3a href="+code=width" class="sref">width3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=left_margin" class="sref">left_margin3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=right_margin" class="sref">right_margin3/a>; v2043/a>        intv3a href="+code=hsync" class="sref">hsync3/a> =v3a href="+code=var" class="sref">var3/a>->3a href="+code=width" class="sref">width3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=right_margin" class="sref">right_margin3/a>; v2053/a>        intv3a href="+code=vsync" class="sref">vsync3/a> =v3a href="+code=var" class="sref">var3/a>->3a href="+code=height" class="sref">height3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=lower_margin" class="sref">lower_margin3/a>; v2063/a> v2073/a>        3a href="+code=regs" class="sref">regs3/a>->3a href="+code=lcd_crtc_size" class="sref">lcd_crtc_size3/a> =v3a href="+code=LCM_CRTC_SIZE_VTTVAL" class="sref">LCM_CRTC_SIZE_VTTVAL3/a>(3a href="+code=vtt" class="sref">vtt3/a>) | v2083/a>                              3a href="+code=LCM_CRTC_SIZE_HTTVAL" class="sref">LCM_CRTC_SIZE_HTTVAL3/a>(3a href="+code=htt" class="sref">htt3/a>); v2093/a>        3a href="+code=regs" class="sref">regs3/a>->3a href="+code=lcd_crtc_dend" class="sref">lcd_crtc_dend3/a> =v3a href="+code=LCM_CRTC_DEND_VDENDVAL" class="sref">LCM_CRTC_DEND_VDENDVAL3/a>(3a href="+code=var" class="sref">var3/a>->3a href="+code=height" class="sref">height3/a>) | v2103/a>                              3a href="+code=LCM_CRTC_DEND_HDENDVAL" class="sref">LCM_CRTC_DEND_HDENDVAL3/a>(3a href="+code=var" class="sref">var3/a>->3a href="+code=width" class="sref">width3/a>); v2113/a>        3a href="+code=regs" class="sref">regs3/a>->3a href="+code=lcd_crtc_hr" class="sref">lcd_crtc_hr3/a> =v3a href="+code=LCM_CRTC_HR_EVAL" class="sref">LCM_CRTC_HR_EVAL3/a>(3a href="+code=var" class="sref">var3/a>->3a href="+code=width" class="sref">width3/a> +v5) | v2123/a>                            3a href="+code=LCM_CRTC_HR_SVAL" class="sref">LCM_CRTC_HR_SVAL3/a>(3a href="+code=var" class="sref">var3/a>->3a href="+code=width" class="sref">width3/a> +v1); v2133/a>        3a href="+code=regs" class="sref">regs3/a>->3a href="+code=lcd_crtc_hsync" class="sref">lcd_crtc_hsync3/a> =v3a href="+code=LCM_CRTC_HSYNC_EVAL" class="sref">LCM_CRTC_HSYNC_EVAL3/a>(3a href="+code=hsync" class="sref">hsync3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=hsync_len" class="sref">hsync_len3/a>) | v2143/a>                               3a href="+code=LCM_CRTC_HSYNC_SVAL" class="sref">LCM_CRTC_HSYNC_SVAL3/a>(3a href="+code=hsync" class="sref">hsync3/a>); v2153/a>        3a href="+code=regs" class="sref">regs3/a>->3a href="+code=lcd_crtc_vr" class="sref">lcd_crtc_vr3/a> =v3a href="+code=LCM_CRTC_VR_EVAL" class="sref">LCM_CRTC_VR_EVAL3/a>(3a href="+code=vsync" class="sref">vsync3/a> +v3a href="+code=var" class="sref">var3/a>->3a href="+code=vsync_len" class="sref">vsync_len3/a>) | v2163/a>                            3a href="+code=LCM_CRTC_VR_SVAL" class="sref">LCM_CRTC_VR_SVAL3/a>(3a href="+code=vsync" class="sref">vsync3/a>); v2173/a> v2183/a>} v2193/a> v2203/a>3spa	 class="comment">/*3/spa	  v2213/a>3spa	 class="comment"> *      Activate (set) thev2223/a>3spa	 class="comment"> *      informa3.113/spa	  v2233/a>3spa	 class="comment"> */3/spa	  v2243/a>static voidv3a href="+code=nuc900fb_activate_var" class="sref">nuc900fb_activate_var3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v2253/a>{ v2263/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v2273/a>        voidv3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=regs" class="sref">regs3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>; v2283/a>        structv3a href="+code=fb_var_screeninfo" class="sref">fb_var_screeninfo3/a> *3a href="+code=var" class="sref">var3/a> =v&3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>; v2293/a>        intv3a href="+code=clkdiv" class="sref">clkdiv3/a>; v2303/a> v2313/a>        3a href="+code=clkdiv" class="sref">clkdiv3/a> =v3a href="+code=nuc900fb_calc_pixclk" class="sref">nuc900fb_calc_pixclk3/a>(3a href="+code=fbi" class="sref">fbi3/a>,v3a href="+code=var" class="sref">var3/a>->3a href="+code=pixclock" class="sref">pixclock3/a>) - 1; v2323/a>        if (3a href="+code=clkdiv" class="sref">clkdiv3/a> < 0) v2333/a>                3a href="+code=clkdiv" class="sref">clkdiv3/a> =v0; v2343/a> v2353/a>        3a href="+code=nuc900fb_calculate_lcd_regs" class="sref">nuc900fb_calculate_lcd_regs3/a>(3a href="+code=info" class="sref">info3/a>,v&3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>); v2363/a> v2373/a>        3spa	 class="comment">/* set thev2383/a> v2393/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"new lcd register set:\n"v2403/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"dccs       =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_dccs" class="sref">lcd_dccs3/a>); v2413/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"dev_ctl    =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_device_ctrl" class="sref">lcd_device_ctrl3/a>); v2423/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"crtc_size  =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_size" class="sref">lcd_crtc_size3/a>); v2433/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"crtc_dend  =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_dend" class="sref">lcd_crtc_dend3/a>); v2443/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"crtc_hr    =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_hr" class="sref">lcd_crtc_hr3/a>); v2453/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"crtc_hsync =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_hsync" class="sref">lcd_crtc_hsync3/a>); v2463/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"crtc_vr    =v0x%08x\n"fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_vr" class="sref">lcd_crtc_vr3/a>); v2473/a> v2483/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_device_ctrl" class="sref">lcd_device_ctrl3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DEV_CTRL" class="sref">REG_LCM_DEV_CTRL3/a>); v2493/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_size" class="sref">lcd_crtc_size3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_CRTC_SIZE" class="sref">REG_LCM_CRTC_SIZE3/a>); v2503/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_dend" class="sref">lcd_crtc_dend3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_CRTC_DEND" class="sref">REG_LCM_CRTC_DEND3/a>); v2513/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_hr" class="sref">lcd_crtc_hr3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_CRTC_HR" class="sref">REG_LCM_CRTC_HR3/a>); v2523/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_hsync" class="sref">lcd_crtc_hsync3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_CRTC_HSYNC" class="sref">REG_LCM_CRTC_HSYNC3/a>); v2533/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_crtc_vr" class="sref">lcd_crtc_vr3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_CRTC_VR" class="sref">REG_LCM_CRTC_VR3/a>); v2543/a> v2553/a>        3spa	 class="comment">/* set lcd address pointers */3/spa	  v2563/a>        3a href="+code=nuc900fb_set_lcdaddr" class="sref">nuc900fb_set_lcdaddr3/a>(3a href="+code=info" class="sref">info3/a>); v2573/a> v2583/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=regs" class="sref">regs3/a>.3a href="+code=lcd_dccs" class="sref">lcd_dccs3/a>,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v2593/a>} v2603/a> v2613/a>3spa	 class="comment">/*3/spa	  v2623/a>3spa	 class="comment"> *      Alters thev2633/a>3spa	 class="comment"> *3/spa	  v2643/a>3spa	 class="comment"> */3/spa	  v2653/a>static intv3a href="+code=nuc900fb_set_par" class="sref">nuc900fb_set_par3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v2663/a>{ v2673/a>        structv3a href="+code=fb_var_screeninfo" class="sref">fb_var_screeninfo3/a> *3a href="+code=var" class="sref">var3/a> =v&3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>; v2683/a> v2693/a>        switch (3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a>) { v2703/a>        case 32: v2713/a>        case 24: v2723/a>        case 18: v2733/a>        case 16: v2743/a>        case 12: v2753/a>                3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=visual" class="sref">visual3/a> =v3a href="+code=FB_VISUAL_TRUECOLOR" class="sref">FB_VISUAL_TRUECOLOR3/a>; v2763/a>                break; v2773/a>        case 1: v2783/a>                3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=visual" class="sref">visual3/a> =v3a href="+code=FB_VISUAL_MONO01" class="sref">FB_VISUAL_MONO013/a>; v2793/a>                break; v2803/a>        default: v2813/a>                3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=visual" class="sref">visual3/a> =v3a href="+code=FB_VISUAL_PSEUDOCOLOR" class="sref">FB_VISUAL_PSEUDOCOLOR3/a>; v2823/a>                break; v2833/a>        } v2843/a> v2853/a>        3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=line_length" class="sref">line_length3/a> =v(3a href="+code=var" class="sref">var3/a>->3a href="+code=xres_virtual" class="sref">xres_virtual3/a> *v3a href="+code=var" class="sref">var3/a>->3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a>) /v8; v2863/a> v2873/a>        3spa	 class="comment">/* activate thisv2883/a>        3a href="+code=nuc900fb_activate_var" class="sref">nuc900fb_activate_var3/a>(3a href="+code=info" class="sref">info3/a>); v2893/a>        return 0; v2903/a>} v2913/a> v2923/a>static 3a href="+code=inline" class="sref">inline3/a> unsigned intv3a href="+code=chan_to_field" class="sref">chan_to_field3/a>(unsigned intv3a href="+code=chan" class="sref">chan3/a>, v2933/a>                                         structv3a href="+code=fb_bitfield" class="sref">fb_bitfield3/a> *3a href="+code=bf" class="sref">bf3/a>) v2943/a>{ v2953/a>        3a href="+code=chan" class="sref">chan3/a>v&=v0xffff; v2963/a>        3a href="+code=chan" class="sref">chan3/a>v>>=v16 - 3a href="+code=bf" class="sref">bf3/a>->3a href="+code=length" class="sref">length3/a>; v2973/a>        return 3a href="+code=chan" class="sref">chan3/a>v<< 3a href="+code=bf" class="sref">bf3/a>->3a href="+code=offset" class="sref">offset3/a>; v2983/a>} v2993/a> v3003/a>static intv3a href="+code=nuc900fb_setcolreg" class="sref">nuc900fb_setcolreg3/a>(unsigned 3a href="+code=regno" class="sref">regno3/a>, v3013/a>                               unsigned 3a href="+code=red" class="sref">red3/a>, unsigned 3a href="+code=green" class="sref">green3/a>, unsigned 3a href="+code=blue" class="sref">blue3/a>, v3023/a>                               unsigned 3a href="+code=transp" class="sref">transp3/a>, structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v3033/a>{ v3043/a>        unsigned intv3a href="+code=val" class="sref">val3/a>; v3053/a> v3063/a>        switch (3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=visual" class="sref">visual3/a>) { v3073/a>        case 3a href="+code=FB_VISUAL_TRUECOLOR" class="sref">FB_VISUAL_TRUECOLOR3/a>: v3083/a>                3spa	 class="comment">/* true-colour, use pseuo-palette */3/spa	  v3093/a>                if (3a href="+code=regno" class="sref">regno3/a> < 16) { v3103/a>                        3a href="+code=u32" class="sref">u323/a> *3a href="+code=pal" class="sref">pal3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=pseudo_palette" class="sref">pseudo_palette3/a>; v3113/a> v3123/a>                        3a href="+code=val" class="sref">val3/a>  =v3a href="+code=chan_to_field" class="sref">chan_to_field3/a>(3a href="+code=red" class="sref">red3/a>, &3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=red" class="sref">red3/a>); v3133/a>                        3a href="+code=val" class="sref">val3/a> |=v3a href="+code=chan_to_field" class="sref">chan_to_field3/a>(3a href="+code=green" class="sref">green3/a>, &3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=green" class="sref">green3/a>); v3143/a>                        3a href="+code=val" class="sref">val3/a> |=v3a href="+code=chan_to_field" class="sref">chan_to_field3/a>(3a href="+code=blue" class="sref">blue3/a>, &3a href="+code=info" class="sref">info3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=blue" class="sref">blue3/a>); v3153/a>                        3a href="+code=pal" class="sref">pal3/a>[3a href="+code=regno" class="sref">regno3/a>] =v3a href="+code=val" class="sref">val3/a>; v3163/a>                } v3173/a>                break; v3183/a> v3193/a>        default: v3203/a>                return 1;   3spa	 class="comment">/* unknown type */3/spa	  v3213/a>        } v3223/a>        return 0; v3233/a>} v3243/a> v3253/a>3spa	 class="comment">/**3/spa	  v3263/a>3spa	 class="comment"> *      nuc900fb_blank3/spa	  v3273/a>3spa	 class="comment"> *3/spa	  v3283/a>3spa	 class="comment"> */3/spa	  v3293/a>static intv3a href="+code=nuc900fb_blank" class="sref">nuc900fb_blank3/a>(intv3a href="+code=blank_mode" class="sref">blank_mode3/a>, structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v3303/a>{ v3313/a> v3323/a>        return 0; v3333/a>} v3343/a> v3353/a>static structv3a href="+code=fb_ops" class="sref">fb_ops3/a> 3a href="+code=nuc900fb_ops" class="sref">nuc900fb_ops3/a> =v{ v3363/a>        .3a href="+code=owner" class="sref">owner3/a>                  =v3a href="+code=THIS_MODULE" class="sref">THIS_MODULE3/a>, v3373/a>        .3a href="+code=fb_check_var" class="sref">fb_check_var3/a>           =v3a href="+code=nuc900fb_check_var" class="sref">nuc900fb_check_var3/a>, v3383/a>        .3a href="+code=fb_set_par" class="sref">fb_set_par3/a>             =v3a href="+code=nuc900fb_set_par" class="sref">nuc900fb_set_par3/a>, v3393/a>        .3a href="+code=fb_blank" class="sref">fb_blank3/a>               =v3a href="+code=nuc900fb_blank" class="sref">nuc900fb_blank3/a>, v3403/a>        .3a href="+code=fb_setcolreg" class="sref">fb_setcolreg3/a>           =v3a href="+code=nuc900fb_setcolreg" class="sref">nuc900fb_setcolreg3/a>, v3413/a>        .3a href="+code=fb_fillrect" class="sref">fb_fillrect3/a>            =v3a href="+code=cfb_fillrect" class="sref">cfb_fillrect3/a>, v3423/a>        .3a href="+code=fb_copyarea" class="sref">fb_copyarea3/a>            =v3a href="+code=cfb_copyarea" class="sref">cfb_copyarea3/a>, v3433/a>        .3a href="+code=fb_imageblit" class="sref">fb_imageblit3/a>           =v3a href="+code=cfb_imageblit" class="sref">cfb_imageblit3/a>, v3443/a>}; v3453/a> v3463/a> v3473/a>static 3a href="+code=inline" class="sref">inline3/a> voidv3a href="+code=modify_gpio" class="sref">modify_gpio3/a>(voidv3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=reg" class="sref">reg3/a>, v3483/a>                               unsigned longv3a href="+code=set" class="sref">set3/a>, unsigned longv3a href="+code=mask" class="sref">mask3/a>) v3493/a>{ v3503/a>        unsigned longv3a href="+code=tmp" class="sref">tmp3/a>; v3513/a>        3a href="+code=tmp" class="sref">tmp3/a> =v3a href="+code=readl" class="sref">readl3/a>(3a href="+code=reg" class="sref">reg3/a>) & ~3a href="+code=mask" class="sref">mask3/a>; v3523/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=tmp" class="sref">tmp3/a> |v3a href="+code=set" class="sref">set3/a>, 3a href="+code=reg" class="sref">reg3/a>); v3533/a>} v3543/a> v3553/a>3spa	 class="comment">/*3/spa	  v3563/a>3spa	 class="comment"> * Initialise LCD-related registers3/spa	  v3573/a>3spa	 class="comment"> */3/spa	  v3583/a>static intv3a href="+code=nuc900fb_init_registers" class="sref">nuc900fb_init_registers3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v3593/a>{ v3603/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v3613/a>        structv3a href="+code=nuc900fb_mach_info" class="sref">nuc900fb_mach_info3/a> *3a href="+code=mach_info" class="sref">mach_info3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>->3a href="+code=platform_data" class="sref">platform_data3/a>; v3623/a>        voidv3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=regs" class="sref">regs3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>; v3633/a> v3643/a>        3spa	 class="comment">/*reset thev3653/a>        3a href="+code=writel" class="sref">writel3/a>(0,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v3663/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>) |v3a href="+code=LCM_DCCS_ENG_RST" class="sref">LCM_DCCS_ENG_RST3/a>, v3673/a>               3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v3683/a>        3a href="+code=ndelay" class="sref">ndelay3/a>(100); v3693/a>        3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>) & (~3a href="+code=LCM_DCCS_ENG_RST" class="sref">LCM_DCCS_ENG_RST3/a>), v3703/a>               3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v3713/a>        3a href="+code=ndelay" class="sref">ndelay3/a>(100); v3723/a> v3733/a>        3a href="+code=writel" class="sref">writel3/a>(0,v3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DEV_CTRL" class="sref">REG_LCM_DEV_CTRL3/a>); v3743/a> v3753/a>        3spa	 class="comment">/* config gpio output */3/spa	  v3763/a>        3a href="+code=modify_gpio" class="sref">modify_gpio3/a>(3a href="+code=W90X900_VA_GPIO" class="sref">W90X900_VA_GPIO3/a> +v0x54,v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=gpio_dir" class="sref">gpio_dir3/a>, v3773/a>                    3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=gpio_dir_mask" class="sref">gpio_dir_mask3/a>); v3783/a>        3a href="+code=modify_gpio" class="sref">modify_gpio3/a>(3a href="+code=W90X900_VA_GPIO" class="sref">W90X900_VA_GPIO3/a> +v0x58,v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=gpio_data" class="sref">gpio_data3/a>, v3793/a>                    3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=gpio_data_mask" class="sref">gpio_data_mask3/a>); v3803/a> v3813/a>        return 0; v3823/a>} v3833/a> v3843/a> v3853/a>3spa	 class="comment">/*3/spa	  v3863/a>3spa	 class="comment"> *    Alloc thev3873/a>3spa	 class="comment"> *    Thi buffer should be a non-cached, non-buffered, memory region3/spa	  v3883/a>3spa	 class="comment"> *    to allow palette and pixel writes without flushing thev3893/a>3spa	 class="comment"> */3/spa	  v3903/a>static intv3a href="+code=nuc900fb_map_video_memory" class="sref">nuc900fb_map_video_memory3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v3913/a>{ v3923/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v3933/a>        3a href="+code=dma_addr_t" class="sref">dma_addr_t3/a> 3a href="+code=map_dma" class="sref">map_dma3/a>; v3943/a>        unsigned longv3a href="+code=map_size" class="sref">map_size3/a> =v3a href="+code=PAGE_ALIGN" class="sref">PAGE_ALIGN3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_len" class="sref">smem_len3/a>); v3953/a> v3963/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"nuc900fb_map_video_memory(fbi=%p) map_size %lu\n"v3973/a>                3a href="+code=fbi" class="sref">fbi3/a>,v3a href="+code=map_size" class="sref">map_size3/a>); v3983/a> v3993/a>        3a href="+code=info" class="sref">info3/a>->3a href="+code=screen_base" class="sref">screen_base3/a> =v3a href="+code=dma_alloc_writecombine" class="sref">dma_alloc_writecombine3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3a href="+code=map_size" class="sref">map_size3/a>, v4003/a>                                                        &3a href="+code=map_dma" class="sref">map_dma3/a>,v3a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL3/a>); v4013/a> v4023/a>        if (!3a href="+code=info" class="sref">info3/a>->3a href="+code=screen_base" class="sref">screen_base3/a>) v4033/a>                return -3a href="+code=ENOMEM" class="sref">ENOMEM3/a>; v4043/a> v4053/a>        3a href="+code=memset" class="sref">memset3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=screen_base" class="sref">screen_base3/a>, 0x00,v3a href="+code=map_size" class="sref">map_size3/a>); v4063/a>        3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_start" class="sref">smem_start3/a> =v3a href="+code=map_dma" class="sref">map_dma3/a>; v4073/a> v4083/a>        return 0; v4093/a>} v4103/a> v4113/a>static 3a href="+code=inline" class="sref">inline3/a> voidv3a href="+code=nuc900fb_unmap_video_memory" class="sref">nuc900fb_unmap_video_memory3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v4123/a>{ v4133/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v4143/a>        3a href="+code=dma_free_writecombine" class="sref">dma_free_writecombine3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a>,v3a href="+code=PAGE_ALIGN" class="sref">PAGE_ALIGN3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_len" class="sref">smem_len3/a>), v4153/a>                              3a href="+code=info" class="sref">info3/a>->3a href="+code=screen_base" class="sref">screen_base3/a>, 3a href="+code=info" class="sref">info3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_start" class="sref">smem_start3/a>); v4163/a>} v4173/a> v4183/a>static 3a href="+code=irqreturn_t" class="sref">irqreturn_t3/a> 3a href="+code=nuc900fb_irqhandler" class="sref">nuc900fb_irqhandler3/a>(intv3a href="+code=irq" class="sref">irq3/a>, voidv*3a href="+code=dev_id" class="sref">dev_id3/a>) v4193/a>{ v4203/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=dev_id" class="sref">dev_id3/a>; v4213/a>        voidv3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=regs" class="sref">regs3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>; v4223/a>        voidv3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=irq_base" class="sref">irq_base3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=irq_base" class="sref">irq_base3/a>; v4233/a>        unsigned longv3a href="+code=lcdirq" class="sref">lcdirq3/a> =v3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_INT_CS" class="sref">REG_LCM_INT_CS3/a>); v4243/a> v4253/a>        if (3a href="+code=lcdirq" class="sref">lcdirq3/a> & 3a href="+code=LCM_INT_CS_DISP_F_STATUS" class="sref">LCM_INT_CS_DISP_F_STATUS3/a>)v{ v4263/a>                3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=irq_base" class="sref">irq_base3/a>) |v1<<30,v3a href="+code=irq_base" class="sref">irq_base3/a>); v4273/a> v4283/a>                3spa	 class="comment">/* wait VA_EN low */3/spa	  v4293/a>                if ((3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>) & v4303/a>                    3a href="+code=LCM_DCCS_SINGLE" class="sref">LCM_DCCS_SINGLE3/a>) ==v3a href="+code=LCM_DCCS_SINGLE" class="sref">LCM_DCCS_SINGLE3/a>) v4313/a>                        while ((3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>) & v4323/a>                               3a href="+code=LCM_DCCS_VA_EN" class="sref">LCM_DCCS_VA_EN3/a>) ==v3a href="+code=LCM_DCCS_VA_EN" class="sref">LCM_DCCS_VA_EN3/a>) v4333/a>                                ; v4343/a>                3spa	 class="comment">/* display_out-enable */3/spa	  v4353/a>                3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>) |v3a href="+code=LCM_DCCS_DISP_OUT_EN" class="sref">LCM_DCCS_DISP_OUT_EN3/a>, v4363/a>                        3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v4373/a>                3spa	 class="comment">/* va-enable*/3/spa	  v4383/a>                3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>) |v3a href="+code=LCM_DCCS_VA_EN" class="sref">LCM_DCCS_VA_EN3/a>, v4393/a>                        3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v4403/a>        } else if (3a href="+code=lcdirq" class="sref">lcdirq3/a> & 3a href="+code=LCM_INT_CS_UNDERRUN_INT" class="sref">LCM_INT_CS_UNDERRUN_INT3/a>)v{ v4413/a>                3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=irq_base" class="sref">irq_base3/a>) |v3a href="+code=LCM_INT_CS_UNDERRUN_INT" class="sref">LCM_INT_CS_UNDERRUN_INT3/a>,v3a href="+code=irq_base" class="sref">irq_base3/a>); v4423/a>        } else if (3a href="+code=lcdirq" class="sref">lcdirq3/a> & 3a href="+code=LCM_INT_CS_BUS_ERROR_INT" class="sref">LCM_INT_CS_BUS_ERROR_INT3/a>)v{ v4433/a>                3a href="+code=writel" class="sref">writel3/a>(3a href="+code=readl" class="sref">readl3/a>(3a href="+code=irq_base" class="sref">irq_base3/a>) |v3a href="+code=LCM_INT_CS_BUS_ERROR_INT" class="sref">LCM_INT_CS_BUS_ERROR_INT3/a>,v3a href="+code=irq_base" class="sref">irq_base3/a>); v4443/a>        } v4453/a> v4463/a>        return 3a href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLED3/a>; v4473/a>} v4483/a> v4493/a>#ifdef 3a href="+code=CONFIG_CPU_FREQ" class="sref">CONFIG_CPU_FREQ3/a> v4503/a> v4513/a>static intv3a href="+code=nuc900fb_cpufreq_transi3.11" class="sref">nuc900fb_cpufreq_transi3.113/a>(structv3a href="+code=notifier_block" class="sref">notifier_block3/a> *3a href="+code=nb" class="sref">nb3/a>, v4523/a>                                       unsigned longv3a href="+code=val" class="sref">val3/a>, voidv*3a href="+code=data" class="sref">data3/a>) v4533/a>{ v4543/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=info" class="sref">info3/a>; v4553/a>        structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=fbinfo" class="sref">fbinfo3/a>; v4563/a>        longv3a href="+code=delta_f" class="sref">delta_f3/a>; v4573/a>        3a href="+code=info" class="sref">info3/a> =v3a href="+code=container_of" class="sref">container_of3/a>(3a href="+code=nb" class="sref">nb3/a>, structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a>,v3a href="+code=freq_transi3.11" class="sref">freq_transi3.113/a>); v4583/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a> =v3a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata3/a>(3a href="+code=to_platform_device" class="sref">to_platform_device3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=dev" class="sref">dev3/a>)); v4593/a> v4603/a>        3a href="+code=delta_f" class="sref">delta_f3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=clk_rate" class="sref">clk_rate3/a> - 3a href="+code=clk_get_rate" class="sref">clk_get_rate3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=clk" class="sref">clk3/a>); v4613/a> v4623/a>        if ((3a href="+code=val" class="sref">val3/a> ==v3a href="+code=CPUFREQ_POSTCHANGE" class="sref">CPUFREQ_POSTCHANGE3/a> && 3a href="+code=delta_f" class="sref">delta_f3/a> > 0) || v4633/a>           (3a href="+code=val" class="sref">val3/a> ==v3a href="+code=CPUFREQ_PRECHANGE" class="sref">CPUFREQ_PRECHANGE3/a> && 3a href="+code=delta_f" class="sref">delta_f3/a> < 0))v{ v4643/a>                3a href="+code=info" class="sref">info3/a>->3a href="+code=clk_rate" class="sref">clk_rate3/a> =v3a href="+code=clk_get_rate" class="sref">clk_get_rate3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=clk" class="sref">clk3/a>); v4653/a>                3a href="+code=nuc900fb_activate_var" class="sref">nuc900fb_activate_var3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v4663/a>        } v4673/a> v4683/a>        return 0; v4693/a>} v4703/a> v4713/a>static 3a href="+code=inline" class="sref">inline3/a> intv3a href="+code=nuc900fb_cpufreq_register" class="sref">nuc900fb_cpufreq_register3/a>(structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a>) v4723/a>{ v4733/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=freq_transi3.11" class="sref">freq_transi3.113/a>.3a href="+code=notifier_call" class="sref">notifier_call3/a> =v3a href="+code=nuc900fb_cpufreq_transi3.11" class="sref">nuc900fb_cpufreq_transi3.113/a>; v4743/a>        return 3a href="+code=cpufreq_register_notifier" class="sref">cpufreq_register_notifier3/a>(&3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=freq_transi3.11" class="sref">freq_transi3.113/a>, v4753/a>                                  3a href="+code=CPUFREQ_TRANSITION_NOTIFIER" class="sref">CPUFREQ_TRANSITION_NOTIFIER3/a>); v4763/a>} v4773/a> v4783/a>static 3a href="+code=inline" class="sref">inline3/a> voidv3a href="+code=nuc900fb_cpufreq_deregister" class="sref">nuc900fb_cpufreq_deregister3/a>(structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a>) v4793/a>{ v4803/a>        3a href="+code=cpufreq_unregister_notifier" class="sref">cpufreq_unregister_notifier3/a>(&3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=freq_transi3.11" class="sref">freq_transi3.113/a>, v4813/a>                                    3a href="+code=CPUFREQ_TRANSITION_NOTIFIER" class="sref">CPUFREQ_TRANSITION_NOTIFIER3/a>); v4823/a>} v4833/a>#else v4843/a>static 3a href="+code=inline" class="sref">inline3/a> intv3a href="+code=nuc900fb_cpufreq_transi3.11" class="sref">nuc900fb_cpufreq_transi3.113/a>(structv3a href="+code=notifier_block" class="sref">notifier_block3/a> *3a href="+code=nb" class="sref">nb3/a>, v4853/a>                                       unsigned longv3a href="+code=val" class="sref">val3/a>, voidv*3a href="+code=data" class="sref">data3/a>) v4863/a>{ v4873/a>        return 0; v4883/a>} v4893/a> v4903/a>static 3a href="+code=inline" class="sref">inline3/a> intv3a href="+code=nuc900fb_cpufreq_register" class="sref">nuc900fb_cpufreq_register3/a>(structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a>) v4913/a>{ v4923/a>        return 0; v4933/a>} v4943/a> v4953/a>static 3a href="+code=inline" class="sref">inline3/a> voidv3a href="+code=nuc900fb_cpufreq_deregister" class="sref">nuc900fb_cpufreq_deregister3/a>(structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v4963/a>{ v4973/a>} v4983/a>#endif v4993/a> v5003/a>static char 3a href="+code=driver_nami" class="sref">driver_nami3/a>[] =v3spa	 class="string">"nuc900fb"v5013/a> v5023/a>static intv3a href="+code=nuc900fb_probi" class="sref">nuc900fb_probi3/a>(structv3a href="+code=platform_device" class="sref">platform_device3/a> *3a href="+code=pdev" class="sref">pdev3/a>) v5033/a>{ v5043/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a>; v5053/a>        structv3a href="+code=nuc900fb_display" class="sref">nuc900fb_display3/a> *3a href="+code=display" class="sref">display3/a>; v5063/a>        structv3a href="+code=fb_info" class="sref">fb_info3/a>     *3a href="+code=fbinfo" class="sref">fbinfo3/a>; v5073/a>        structv3a href="+code=nuc900fb_mach_info" class="sref">nuc900fb_mach_info3/a> *3a href="+code=mach_info" class="sref">mach_info3/a>; v5083/a>        structv3a href="+code=resource" class="sref">resource3/a> *3a href="+code=res" class="sref">res3/a>; v5093/a>        intv3a href="+code=ret" class="sref">ret3/a>; v5103/a>        intv3a href="+code=irq" class="sref">irq3/a>; v5113/a>        intv3a href="+code=i" class="sref">i3/a>; v5123/a>        intv3a href="+code=size" class="sref">size3/a>; v5133/a> v5143/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"devinit\n"v5153/a>        3a href="+code=mach_info" class="sref">mach_info3/a> =v3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>.3a href="+code=platform_data" class="sref">platform_data3/a>; v5163/a>        if (3a href="+code=mach_info" class="sref">mach_info3/a> ==v3a href="+code=NULL" class="sref">NULL3/a>)v{ v5173/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, v5183/a>                        3spa	 class="string">"no platform data for lcd, cannot attach\n"v5193/a>                return -3a href="+code=EINVAL" class="sref">EINVAL3/a>; v5203/a>        } v5213/a> v5223/a>        if (3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=default_display" class="sref">default_display3/a> > 3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=num_displays" class="sref">num_displays3/a>)v{ v5233/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, v5243/a>                        3spa	 class="string">"defaultv5253/a>                        3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=default_display" class="sref">default_display3/a>,v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=num_displays" class="sref">num_displays3/a>); v5263/a>                return -3a href="+code=EINVAL" class="sref">EINVAL3/a>; v5273/a>        } v5283/a> v5293/a> v5303/a>        3a href="+code=display" class="sref">display3/a> =v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a> +v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=default_display" class="sref">default_display3/a>; v5313/a> v5323/a>        3a href="+code=irq" class="sref">irq3/a> =v3a href="+code=platform_get_irq" class="sref">platform_get_irq3/a>(3a href="+code=pdev" class="sref">pdev3/a>, 0); v5333/a>        if (3a href="+code=irq" class="sref">irq3/a> < 0)v{ v5343/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, 3spa	 class="string">"no irq for device\n"v5353/a>                return -3a href="+code=ENOENT" class="sref">ENOENT3/a>; v5363/a>        } v5373/a> v5383/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a> =v3a href="+code=framibuffer_alloc" class="sref">framibuffer_alloc3/a>(sizeof(structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a>), &3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>); v5393/a>        if (!3a href="+code=fbinfo" class="sref">fbinfo3/a>) v5403/a>                return -3a href="+code=ENOMEM" class="sref">ENOMEM3/a>; v5413/a> v5423/a>        3a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata3/a>(3a href="+code=pdev" class="sref">pdev3/a>, 3a href="+code=fbinfo" class="sref">fbinfo3/a>); v5433/a> v5443/a>        3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=par" class="sref">par3/a>; v5453/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=dev" class="sref">dev3/a> =v&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>; v5463/a> v5473/a>#ifdef 3a href="+code=CONFIG_CPU_NUC950" class="sref">CONFIG_CPU_NUC9503/a> v5483/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=drv_typi" class="sref">drv_typi3/a> =v3a href="+code=LCDDRV_NUC950" class="sref">LCDDRV_NUC9503/a>; v5493/a>#endif v5503/a> v5513/a>        3a href="+code=res" class="sref">res3/a> =v3a href="+code=platform_get_resource" class="sref">platform_get_resource3/a>(3a href="+code=pdev" class="sref">pdev3/a>, 3a href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM3/a>, 0); v5523/a> v5533/a>        3a href="+code=size" class="sref">size3/a> =v3a href="+code=resource_size" class="sref">resource_size3/a>(3a href="+code=res" class="sref">res3/a>); v5543/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=mem" class="sref">mem3/a> =v3a href="+code=request_mem_region" class="sref">request_mem_region3/a>(3a href="+code=res" class="sref">res3/a>->3a href="+code=start" class="sref">start3/a>, 3a href="+code=size" class="sref">size3/a>, 3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=nami" class="sref">nami3/a>); v5553/a>        if (3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=mem" class="sref">mem3/a> ==v3a href="+code=NULL" class="sref">NULL3/a>)v{ v5563/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, 3spa	 class="string">"failed to alloc memory region\n"v5573/a>                3a href="+code=ret" class="sref">ret3/a> =v-3a href="+code=ENOENT" class="sref">ENOENT3/a>; v5583/a>                goto 3a href="+code=free_fb" class="sref">free_fb3/a>; v5593/a>        } v5603/a> v5613/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a> =v3a href="+code=ioremap" class="sref">ioremap3/a>(3a href="+code=res" class="sref">res3/a>->3a href="+code=start" class="sref">start3/a>, 3a href="+code=size" class="sref">size3/a>); v5623/a>        if (3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a> ==v3a href="+code=NULL" class="sref">NULL3/a>)v{ v5633/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, 3spa	 class="string">"ioremap() of lcd registers failed\n"v5643/a>                3a href="+code=ret" class="sref">ret3/a> =v-3a href="+code=ENXIO" class="sref">ENXIO3/a>; v5653/a>                goto 3a href="+code=release_mem_region" class="sref">release_mem_region3/a>; v5663/a>        } v5673/a> v5683/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=irq_base" class="sref">irq_base3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a> +v3a href="+code=REG_LCM_INT_CS" class="sref">REG_LCM_INT_CS3/a>; v5693/a> v5703/a> v5713/a>        3spa	 class="comment">/* Stop the LCD */3/spa	  v5723/a>        3a href="+code=writel" class="sref">writel3/a>(0,v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v5733/a> v5743/a>        3spa	 class="comment">/* fill the fbinfo*/3/spa	  v5753/a>        3a href="+code=strcpy" class="sref">strcpy3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=id" class="sref">id3/a>,v3a href="+code=driver_nami" class="sref">driver_nami3/a>); v5763/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=typi" class="sref">typi3/a>                =v3a href="+code=FB_TYPE_PACKED_PIXELS" class="sref">FB_TYPE_PACKED_PIXELS3/a>; v5773/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=typi_aux" class="sref">typi_aux3/a>            = 0; v5783/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=xpa	step" class="sref">xpa	step3/a>            = 0; v5793/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=ypa	step" class="sref">ypa	step3/a>            = 0; v5803/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=ywrapstep" class="sref">ywrapstep3/a>           = 0; v5813/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=accel" class="sref">accel3/a>               =v3a href="+code=FB_ACCEL_NONE" class="sref">FB_ACCEL_NONE3/a>; v5823/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=no	std" class="sref">no	std3/a>              = 0; v5833/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=activate" class="sref">activate3/a>            = 3a href="+code=FB_ACTIVATE_NOW" class="sref">FB_ACTIVATE_NOW3/a>; v5843/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=accel_flags" class="sref">accel_flags3/a>         = 0; v5853/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=vmode" class="sref">vmode3/a>               =v3a href="+code=FB_VMODE_NONINTERLACED" class="sref">FB_VMODE_NONINTERLACED3/a>; v5863/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fbops" class="sref">fbops3/a>                   =v&3a href="+code=nuc900fb_ops" class="sref">nuc900fb_ops3/a>; v5873/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=flags" class="sref">flags3/a>                   =v3a href="+code=FBINFO_FLAG_DEFAULT" class="sref">FBINFO_FLAG_DEFAULT3/a>; v5883/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=pseudo_palette" class="sref">pseudo_palette3/a>          =v&3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=pseudo_pal" class="sref">pseudo_pal3/a>; v5893/a> v5903/a>        3a href="+code=ret" class="sref">ret3/a> =v3a href="+code=request_irq" class="sref">request_irq3/a>(3a href="+code=irq" class="sref">irq3/a>,v3a href="+code=nuc900fb_irqhandler" class="sref">nuc900fb_irqhandler3/a>,v0, v5913/a>                          3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=nami" class="sref">nami3/a>, 3a href="+code=fbinfo" class="sref">fbinfo3/a>); v5923/a>        if (3a href="+code=ret" class="sref">ret3/a>)v{ v5933/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, 3spa	 class="string">"cannot register irq handler %d -err %d\n"v5943/a>                        3a href="+code=irq" class="sref">irq3/a>,v3a href="+code=ret" class="sref">ret3/a>); v5953/a>                3a href="+code=ret" class="sref">ret3/a> =v-3a href="+code=EBUSY" class="sref">EBUSY3/a>; v5963/a>                goto 3a href="+code=release_regs" class="sref">release_regs3/a>; v5973/a>        } v5983/a> v5993/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a> =v3a href="+code=clk_get" class="sref">clk_get3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, 3a href="+code=NULL" class="sref">NULL3/a>); v6003/a>        if (3a href="+code=IS_ERR" class="sref">IS_ERR3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>))v{ v6013/a>                3a href="+code=printk" class="sref">printk3/a>(3a href="+code=KERN_ERR" class="sref">KERN_ERR3/a> 3spa	 class="string">"nuc900-lcd:failed to get lcd clock source\n"v6023/a>                3a href="+code=ret" class="sref">ret3/a> =v3a href="+code=PTR_ERR" class="sref">PTR_ERR3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>); v6033/a>                goto 3a href="+code=release_irq" class="sref">release_irq3/a>; v6043/a>        } v6053/a> v6063/a>        3a href="+code=clk_enabli" class="sref">clk_enabli3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>); v6073/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"got and enablid clock\n"v6083/a> v6093/a>        3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk_rate" class="sref">clk_rate3/a> =v3a href="+code=clk_get_rate" class="sref">clk_get_rate3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>); v6103/a> v6113/a>        3spa	 class="comment">/* calutate the video buffer size */3/spa	  v6123/a>        for (3a href="+code=i" class="sref">i3/a> =v0; 3a href="+code=i" class="sref">i3/a> < 3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=num_displays" class="sref">num_displays3/a>; 3a href="+code=i" class="sref">i3/a>++)v{ v6133/a>                unsigned longv3a href="+code=smem_len" class="sref">smem_len3/a> =v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a>[3a href="+code=i" class="sref">i3/a>].3a href="+code=xres" class="sref">xres3/a>; v6143/a>                3a href="+code=smem_len" class="sref">smem_len3/a> *=v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a>[3a href="+code=i" class="sref">i3/a>].3a href="+code=yres" class="sref">yres3/a>; v6153/a>                3a href="+code=smem_len" class="sref">smem_len3/a> *=v3a href="+code=mach_info" class="sref">mach_info3/a>->3a href="+code=displays" class="sref">displays3/a>[3a href="+code=i" class="sref">i3/a>].3a href="+code=bpp" class="sref">bpp3/a>; v6163/a>                3a href="+code=smem_len" class="sref">smem_len3/a> >>= 3; v6173/a>                if (3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_len" class="sref">smem_len3/a> < 3a href="+code=smem_len" class="sref">smem_len3/a>) v6183/a>                        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=smem_len" class="sref">smem_len3/a> =v3a href="+code=smem_len" class="sref">smem_len3/a>; v6193/a>        } v6203/a> v6213/a>        3spa	 class="comment">/* Initialize Video Memory */3/spa	  v6223/a>        3a href="+code=ret" class="sref">ret3/a> =v3a href="+code=nuc900fb_map_video_memory" class="sref">nuc900fb_map_video_memory3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6233/a>        if (3a href="+code=ret" class="sref">ret3/a>)v{ v6243/a>                3a href="+code=printk" class="sref">printk3/a>(3a href="+code=KERN_ERR" class="sref">KERN_ERR3/a> 3spa	 class="string">"Failed to allocate video RAM: %x\n"ret3/a>); v6253/a>                goto 3a href="+code=release_clock" class="sref">release_clock3/a>; v6263/a>        } v6273/a> v6283/a>        3a href="+code=dev_dbg" class="sref">dev_dbg3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>,v3spa	 class="string">"got video memory\n"v6293/a> v6303/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=xres" class="sref">xres3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=xres" class="sref">xres3/a>; v6313/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=yres" class="sref">yres3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=yres" class="sref">yres3/a>; v6323/a>        3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>.3a href="+code=bits_per_pixel" class="sref">bits_per_pixel3/a> =v3a href="+code=display" class="sref">display3/a>->3a href="+code=bpp" class="sref">bpp3/a>; v6333/a> v6343/a>        3a href="+code=nuc900fb_init_registers" class="sref">nuc900fb_init_registers3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6353/a> v6363/a>        3a href="+code=nuc900fb_check_var" class="sref">nuc900fb_check_var3/a>(&3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=var" class="sref">var3/a>, 3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6373/a> v6383/a>        3a href="+code=ret" class="sref">ret3/a> =v3a href="+code=nuc900fb_cpufreq_register" class="sref">nuc900fb_cpufreq_register3/a>(3a href="+code=fbi" class="sref">fbi3/a>); v6393/a>        if (3a href="+code=ret" class="sref">ret3/a> < 0)v{ v6403/a>                3a href="+code=dev_err" class="sref">dev_err3/a>(&3a href="+code=pdev" class="sref">pdev3/a>->3a href="+code=dev" class="sref">dev3/a>, 3spa	 class="string">"Failed to register cpufreq\n"v6413/a>                goto 3a href="+code=free_video_memory" class="sref">free_video_memory3/a>; v6423/a>        } v6433/a> v6443/a>        3a href="+code=ret" class="sref">ret3/a> =v3a href="+code=register_framibuffer" class="sref">register_framibuffer3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6453/a>        if (3a href="+code=ret" class="sref">ret3/a>)v{ v6463/a>                3a href="+code=printk" class="sref">printk3/a>(3a href="+code=KERN_ERR" class="sref">KERN_ERR3/a> 3spa	 class="string">"failed to register framibuffer device: %d\n"v6473/a>                        3a href="+code=ret" class="sref">ret3/a>); v6483/a>                goto 3a href="+code=free_cpufreq" class="sref">free_cpufreq3/a>; v6493/a>        } v6503/a> v6513/a>        3a href="+code=printk" class="sref">printk3/a>(3a href="+code=KERN_INFO" class="sref">KERN_INFO3/a> 3spa	 class="string">"fb%d: %s frami buffer device\n"v6523/a>                3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=node" class="sref">node3/a>, 3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=fix" class="sref">fix3/a>.3a href="+code=id" class="sref">id3/a>); v6533/a> v6543/a>        return 0; v6553/a> v6563/a>3a href="+code=free_cpufreq" class="sref">free_cpufreq3/a>: v6573/a>        3a href="+code=nuc900fb_cpufreq_deregister" class="sref">nuc900fb_cpufreq_deregister3/a>(3a href="+code=fbi" class="sref">fbi3/a>); v6583/a>3a href="+code=free_video_memory" class="sref">free_video_memory3/a>: v6593/a>        3a href="+code=nuc900fb_unmap_video_memory" class="sref">nuc900fb_unmap_video_memory3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6603/a>3a href="+code=release_clock" class="sref">release_clock3/a>: v6613/a>        3a href="+code=clk_disabli" class="sref">clk_disabli3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>); v6623/a>        3a href="+code=clk_put" class="sref">clk_put3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>); v6633/a>3a href="+code=release_irq" class="sref">release_irq3/a>: v6643/a>        3a href="+code=free_irq" class="sref">free_irq3/a>(3a href="+code=irq" class="sref">irq3/a>,v3a href="+code=fbi" class="sref">fbi3/a>); v6653/a>3a href="+code=release_regs" class="sref">release_regs3/a>: v6663/a>        3a href="+code=iounmap" class="sref">iounmap3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>); v6673/a>3a href="+code=release_mem_region" class="sref">release_mem_region3/a>: v6683/a>        3a href="+code=release_mem_region" class="sref">release_mem_region3/a>(3a href="+code=res" class="sref">res3/a>->3a href="+code=start" class="sref">start3/a>, 3a href="+code=size" class="sref">size3/a>); v6693/a>3a href="+code=free_fb" class="sref">free_fb3/a>: v6703/a>        3a href="+code=framibuffer_release" class="sref">framibuffer_release3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6713/a>        return 3a href="+code=ret" class="sref">ret3/a>; v6723/a>} v6733/a> v6743/a>3spa	 class="comment">/*3/spa	  v6753/a>3spa	 class="comment"> * shutdown the lcd controller3/spa	  v6763/a>3spa	 class="comment"> */3/spa	  v6773/a>static void 3a href="+code=nuc900fb_stop_lcd" class="sref">nuc900fb_stop_lcd3/a>(structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=info" class="sref">info3/a>) v6783/a>{ v6793/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=info" class="sref">info3/a>->3a href="+code=par" class="sref">par3/a>; v6803/a>        void 3a href="+code=__iomem" class="sref">__iomem3/a> *3a href="+code=regs" class="sref">regs3/a> =v3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>; v6813/a> v6823/a>        3a href="+code=writel" class="sref">writel3/a>((~3a href="+code=LCM_DCCS_DISP_INT_EN" class="sref">LCM_DCCS_DISP_INT_EN3/a>)v| (~3a href="+code=LCM_DCCS_VA_EN" class="sref">LCM_DCCS_VA_EN3/a>)v| (~3a href="+code=LCM_DCCS_OSD_EN" class="sref">LCM_DCCS_OSD_EN3/a>), v6833/a>                3a href="+code=regs" class="sref">regs3/a> +v3a href="+code=REG_LCM_DCCS" class="sref">REG_LCM_DCCS3/a>); v6843/a>} v6853/a> v6863/a>3spa	 class="comment">/*3/spa	  v6873/a>3spa	 class="comment"> *  Cleanup3/spa	  v6883/a>3spa	 class="comment"> */3/spa	  v6893/a>static intv3a href="+code=nuc900fb_remove" class="sref">nuc900fb_remove3/a>(structv3a href="+code=platform_device" class="sref">platform_device3/a> *3a href="+code=pdev" class="sref">pdev3/a>) v6903/a>{ v6913/a>        structv3a href="+code=fb_info" class="sref">fb_info3/a> *3a href="+code=fbinfo" class="sref">fbinfo3/a> =v3a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata3/a>(3a href="+code=pdev" class="sref">pdev3/a>); v6923/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=par" class="sref">par3/a>; v6933/a>        intv3a href="+code=irq" class="sref">irq3/a>; v6943/a> v6953/a>        3a href="+code=nuc900fb_stop_lcd" class="sref">nuc900fb_stop_lcd3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6963/a>        3a href="+code=msleep" class="sref">msleep3/a>(1); v6973/a> v6983/a>        3a href="+code=unregister_framibuffer" class="sref">unregister_framibuffer3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v6993/a>        3a href="+code=nuc900fb_cpufreq_deregister" class="sref">nuc900fb_cpufreq_deregister3/a>(3a href="+code=fbi" class="sref">fbi3/a>); v7003/a>        3a href="+code=nuc900fb_unmap_video_memory" class="sref">nuc900fb_unmap_video_memory3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v7013/a> v7023/a>        3a href="+code=iounmap" class="sref">iounmap3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=io" class="sref">io3/a>); v7033/a> v7043/a>        3a href="+code=irq" class="sref">irq3/a> =v3a href="+code=platform_get_irq" class="sref">platform_get_irq3/a>(3a href="+code=pdev" class="sref">pdev3/a>, 0); v7053/a>        3a href="+code=free_irq" class="sref">free_irq3/a>(3a href="+code=irq" class="sref">irq3/a>,v3a href="+code=fbi" class="sref">fbi3/a>); v7063/a> v7073/a>        3a href="+code=release_resource" class="sref">release_resource3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=mem" class="sref">mem3/a>); v7083/a>        3a href="+code=kfree" class="sref">kfree3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=mem" class="sref">mem3/a>); v7093/a> v7103/a>        3a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata3/a>(3a href="+code=pdev" class="sref">pdev3/a>, 3a href="+code=NULL" class="sref">NULL3/a>); v7113/a>        3a href="+code=framibuffer_release" class="sref">framibuffer_release3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v7123/a> v7133/a>        return 0; v7143/a>} v7153/a> v7163/a>#ifdef 3a href="+code=CONFIG_PM" class="sref">CONFIG_PM3/a> v7173/a> v7183/a>3spa	 class="comment">/*3/spa	  v7193/a>3spa	 class="comment"> *      suspend and resume support for the lcd controller3/spa	  v7203/a>3spa	 class="comment"> */3/spa	  v7213/a> v7223/a>static intv3a href="+code=nuc900fb_suspend" class="sref">nuc900fb_suspend3/a>(structv3a href="+code=platform_device" class="sref">platform_device3/a> *3a href="+code=dev" class="sref">dev3/a>, 3a href="+code=pm_message_t" class="sref">pm_message_t3/a> 3a href="+code=state" class="sref">state3/a>) v7233/a>{ v7243/a>        structv3a href="+code=fb_info" class="sref">fb_info3/a>     *3a href="+code=fbinfo" class="sref">fbinfo3/a> =v3a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata3/a>(3a href="+code=dev" class="sref">dev3/a>); v7253/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=info" class="sref">info3/a> =v3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=par" class="sref">par3/a>; v7263/a> v7273/a>        3a href="+code=nuc900fb_stop_lcd" class="sref">nuc900fb_stop_lcd3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v7283/a>        3a href="+code=msleep" class="sref">msleep3/a>(1); v7293/a>        3a href="+code=clk_disabli" class="sref">clk_disabli3/a>(3a href="+code=info" class="sref">info3/a>->3a href="+code=clk" class="sref">clk3/a>); v7303/a>        return 0; v7313/a>} v7323/a> v7333/a>static intv3a href="+code=nuc900fb_resume" class="sref">nuc900fb_resume3/a>(structv3a href="+code=platform_device" class="sref">platform_device3/a> *3a href="+code=dev" class="sref">dev3/a>) v7343/a>{ v7353/a>        structv3a href="+code=fb_info" class="sref">fb_info3/a>     *3a href="+code=fbinfo" class="sref">fbinfo3/a> =v3a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata3/a>(3a href="+code=dev" class="sref">dev3/a>); v7363/a>        structv3a href="+code=nuc900fb_info" class="sref">nuc900fb_info3/a> *3a href="+code=fbi" class="sref">fbi3/a> =v3a href="+code=fbinfo" class="sref">fbinfo3/a>->3a href="+code=par" class="sref">par3/a>; v7373/a> v7383/a>        3a href="+code=printk" class="sref">printk3/a>(3a href="+code=KERN_INFO" class="sref">KERN_INFO3/a> 3spa	 class="string">"nuc900fb resume\n"v7393/a> v7403/a>        3a href="+code=clk_enabli" class="sref">clk_enabli3/a>(3a href="+code=fbi" class="sref">fbi3/a>->3a href="+code=clk" class="sref">clk3/a>); v7413/a>        3a href="+code=msleep" class="sref">msleep3/a>(1); v7423/a> v7433/a>        3a href="+code=nuc900fb_init_registers" class="sref">nuc900fb_init_registers3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v7443/a>        3a href="+code=nuc900fb_activate_var" class="sref">nuc900fb_activate_var3/a>(3a href="+code=fbinfo" class="sref">fbinfo3/a>); v7453/a> v7463/a>        return 0; v7473/a>} v7483/a> v7493/a>#else v7503/a>#definev3a href="+code=nuc900fb_suspend" class="sref">nuc900fb_suspend3/a> 3a href="+code=NULL" class="sref">NULL3/a> v7513/a>#definev3a href="+code=nuc900fb_resume" class="sref">nuc900fb_resume3/a>  3a href="+code=NULL" class="sref">NULL3/a> v7523/a>#endif v7533/a> v7543/a>static structv3a href="+code=platform_driver" class="sref">platform_driver3/a> 3a href="+code=nuc900fb_driver" class="sref">nuc900fb_driver3/a> =v{ v7553/a>        .3a href="+code=probe" class="sref">probe3/a>          =v3a href="+code=nuc900fb_probe" class="sref">nuc900fb_probe3/a>, v7563/a>        .3a href="+code=remove" class="sref">remove3/a>         =v3a href="+code=nuc900fb_remove" class="sref">nuc900fb_remove3/a>, v7573/a>        .3a href="+code=suspend" class="sref">suspend3/a>        =v3a href="+code=nuc900fb_suspend" class="sref">nuc900fb_suspend3/a>, v7583/a>        .3a href="+code=resume" class="sref">resume3/a>         =v3a href="+code=nuc900fb_resume" class="sref">nuc900fb_resume3/a>, v7593/a>        .3a href="+code=driver" class="sref">driver3/a>         =v{ v7603/a>                .3a href="+code=nami" class="sref">name3/a>   = 3spa	 class="string">"nuc900-lcd"v7613/a>                .3a href="+code=owner" class="sref">owner3/a>  =v3a href="+code=THIS_MODULE" class="sref">THIS_MODULE3/a>, v7623/a>        }, v7633/a>}; v7643/a> v7653/a>3a href="+code=module_platform_driver" class="sref">module_platform_driver3/a>(3a href="+code=nuc900fb_driver" class="sref">nuc900fb_driver3/a>); v7663/a> v7673/a>3a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION3/a>(3spa	 class="string">"Framibuffer driver for the NUC900"v7683/a>3a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE3/a>(3spa	 class="string">"GPL"v7693/a>3/pre>3/div>


3/div>