Lines Matching refs:fbi

52 	struct nuc900fb_info *fbi = info->par;  in nuc900fb_set_lcdaddr()  local
53 void __iomem *regs = fbi->io; in nuc900fb_set_lcdaddr()
64 writel(fbi->regs.lcd_va_fbctrl, regs + REG_LCM_VA_FBCTRL); in nuc900fb_set_lcdaddr()
65 writel(fbi->regs.lcd_va_scale, regs + REG_LCM_VA_SCALE); in nuc900fb_set_lcdaddr()
71 static unsigned int nuc900fb_calc_pixclk(struct nuc900fb_info *fbi, in nuc900fb_calc_pixclk() argument
74 unsigned long clk = fbi->clk_rate; in nuc900fb_calc_pixclk()
83 dev_dbg(fbi->dev, "pixclk %ld, divisor is %lld\n", pixclk, div); in nuc900fb_calc_pixclk()
94 struct nuc900fb_info *fbi = info->par; in nuc900fb_check_var() local
95 struct nuc900fb_mach_info *mach_info = fbi->dev->platform_data; in nuc900fb_check_var()
101 dev_dbg(fbi->dev, "check_var(var=%p, info=%p)\n", var, info); in nuc900fb_check_var()
142 fbi->regs.lcd_dccs = display->dccs; in nuc900fb_check_var()
143 fbi->regs.lcd_device_ctrl = display->devctl; in nuc900fb_check_var()
144 fbi->regs.lcd_va_fbctrl = display->fbctrl; in nuc900fb_check_var()
145 fbi->regs.lcd_va_scale = display->scale; in nuc900fb_check_var()
227 struct nuc900fb_info *fbi = info->par; in nuc900fb_activate_var() local
228 void __iomem *regs = fbi->io; in nuc900fb_activate_var()
232 clkdiv = nuc900fb_calc_pixclk(fbi, var->pixclock) - 1; in nuc900fb_activate_var()
236 nuc900fb_calculate_lcd_regs(info, &fbi->regs); in nuc900fb_activate_var()
240 dev_dbg(fbi->dev, "new lcd register set:\n"); in nuc900fb_activate_var()
241 dev_dbg(fbi->dev, "dccs = 0x%08x\n", fbi->regs.lcd_dccs); in nuc900fb_activate_var()
242 dev_dbg(fbi->dev, "dev_ctl = 0x%08x\n", fbi->regs.lcd_device_ctrl); in nuc900fb_activate_var()
243 dev_dbg(fbi->dev, "crtc_size = 0x%08x\n", fbi->regs.lcd_crtc_size); in nuc900fb_activate_var()
244 dev_dbg(fbi->dev, "crtc_dend = 0x%08x\n", fbi->regs.lcd_crtc_dend); in nuc900fb_activate_var()
245 dev_dbg(fbi->dev, "crtc_hr = 0x%08x\n", fbi->regs.lcd_crtc_hr); in nuc900fb_activate_var()
246 dev_dbg(fbi->dev, "crtc_hsync = 0x%08x\n", fbi->regs.lcd_crtc_hsync); in nuc900fb_activate_var()
247 dev_dbg(fbi->dev, "crtc_vr = 0x%08x\n", fbi->regs.lcd_crtc_vr); in nuc900fb_activate_var()
249 writel(fbi->regs.lcd_device_ctrl, regs + REG_LCM_DEV_CTRL); in nuc900fb_activate_var()
250 writel(fbi->regs.lcd_crtc_size, regs + REG_LCM_CRTC_SIZE); in nuc900fb_activate_var()
251 writel(fbi->regs.lcd_crtc_dend, regs + REG_LCM_CRTC_DEND); in nuc900fb_activate_var()
252 writel(fbi->regs.lcd_crtc_hr, regs + REG_LCM_CRTC_HR); in nuc900fb_activate_var()
253 writel(fbi->regs.lcd_crtc_hsync, regs + REG_LCM_CRTC_HSYNC); in nuc900fb_activate_var()
254 writel(fbi->regs.lcd_crtc_vr, regs + REG_LCM_CRTC_VR); in nuc900fb_activate_var()
259 writel(fbi->regs.lcd_dccs, regs + REG_LCM_DCCS); in nuc900fb_activate_var()
361 struct nuc900fb_info *fbi = info->par; in nuc900fb_init_registers() local
362 struct nuc900fb_mach_info *mach_info = fbi->dev->platform_data; in nuc900fb_init_registers()
363 void __iomem *regs = fbi->io; in nuc900fb_init_registers()
393 struct nuc900fb_info *fbi = info->par; in nuc900fb_map_video_memory() local
397 dev_dbg(fbi->dev, "nuc900fb_map_video_memory(fbi=%p) map_size %lu\n", in nuc900fb_map_video_memory()
398 fbi, map_size); in nuc900fb_map_video_memory()
400 info->screen_base = dma_alloc_writecombine(fbi->dev, map_size, in nuc900fb_map_video_memory()
414 struct nuc900fb_info *fbi = info->par; in nuc900fb_unmap_video_memory() local
415 dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len), in nuc900fb_unmap_video_memory()
421 struct nuc900fb_info *fbi = dev_id; in nuc900fb_irqhandler() local
422 void __iomem *regs = fbi->io; in nuc900fb_irqhandler()
423 void __iomem *irq_base = fbi->irq_base; in nuc900fb_irqhandler()
472 static inline int nuc900fb_cpufreq_register(struct nuc900fb_info *fbi) in nuc900fb_cpufreq_register() argument
474 fbi->freq_transition.notifier_call = nuc900fb_cpufreq_transition; in nuc900fb_cpufreq_register()
475 return cpufreq_register_notifier(&fbi->freq_transition, in nuc900fb_cpufreq_register()
479 static inline void nuc900fb_cpufreq_deregister(struct nuc900fb_info *fbi) in nuc900fb_cpufreq_deregister() argument
481 cpufreq_unregister_notifier(&fbi->freq_transition, in nuc900fb_cpufreq_deregister()
491 static inline int nuc900fb_cpufreq_register(struct nuc900fb_info *fbi) in nuc900fb_cpufreq_register() argument
505 struct nuc900fb_info *fbi; in nuc900fb_probe() local
545 fbi = fbinfo->par; in nuc900fb_probe()
546 fbi->dev = &pdev->dev; in nuc900fb_probe()
549 fbi->drv_type = LCDDRV_NUC950; in nuc900fb_probe()
555 fbi->mem = request_mem_region(res->start, size, pdev->name); in nuc900fb_probe()
556 if (fbi->mem == NULL) { in nuc900fb_probe()
562 fbi->io = ioremap(res->start, size); in nuc900fb_probe()
563 if (fbi->io == NULL) { in nuc900fb_probe()
569 fbi->irq_base = fbi->io + REG_LCM_INT_CS; in nuc900fb_probe()
573 writel(0, fbi->io + REG_LCM_DCCS); in nuc900fb_probe()
589 fbinfo->pseudo_palette = &fbi->pseudo_pal; in nuc900fb_probe()
600 fbi->clk = clk_get(&pdev->dev, NULL); in nuc900fb_probe()
601 if (IS_ERR(fbi->clk)) { in nuc900fb_probe()
603 ret = PTR_ERR(fbi->clk); in nuc900fb_probe()
607 clk_enable(fbi->clk); in nuc900fb_probe()
610 fbi->clk_rate = clk_get_rate(fbi->clk); in nuc900fb_probe()
639 ret = nuc900fb_cpufreq_register(fbi); in nuc900fb_probe()
658 nuc900fb_cpufreq_deregister(fbi); in nuc900fb_probe()
662 clk_disable(fbi->clk); in nuc900fb_probe()
663 clk_put(fbi->clk); in nuc900fb_probe()
665 free_irq(irq, fbi); in nuc900fb_probe()
667 iounmap(fbi->io); in nuc900fb_probe()
680 struct nuc900fb_info *fbi = info->par; in nuc900fb_stop_lcd() local
681 void __iomem *regs = fbi->io; in nuc900fb_stop_lcd()
693 struct nuc900fb_info *fbi = fbinfo->par; in nuc900fb_remove() local
700 nuc900fb_cpufreq_deregister(fbi); in nuc900fb_remove()
703 iounmap(fbi->io); in nuc900fb_remove()
706 free_irq(irq, fbi); in nuc900fb_remove()
708 release_resource(fbi->mem); in nuc900fb_remove()
709 kfree(fbi->mem); in nuc900fb_remove()
737 struct nuc900fb_info *fbi = fbinfo->par; in nuc900fb_resume() local
741 clk_enable(fbi->clk); in nuc900fb_resume()