• Home
  • Raw
  • Download

Lines Matching refs:mmio

168 static void i810_screen_off(u8 __iomem *mmio, u8 mode)  in i810_screen_off()  argument
173 i810_writeb(SR_INDEX, mmio, SR01); in i810_screen_off()
174 val = i810_readb(SR_DATA, mmio); in i810_screen_off()
178 while((i810_readw(DISP_SL, mmio) & 0xFFF) && count--); in i810_screen_off()
179 i810_writeb(SR_INDEX, mmio, SR01); in i810_screen_off()
180 i810_writeb(SR_DATA, mmio, val); in i810_screen_off()
192 static void i810_dram_off(u8 __iomem *mmio, u8 mode) in i810_dram_off() argument
196 val = i810_readb(DRAMCH, mmio); in i810_dram_off()
199 i810_writeb(DRAMCH, mmio, val); in i810_dram_off()
211 static void i810_protect_regs(u8 __iomem *mmio, int mode) in i810_protect_regs() argument
215 i810_writeb(CR_INDEX_CGA, mmio, CR11); in i810_protect_regs()
216 reg = i810_readb(CR_DATA_CGA, mmio); in i810_protect_regs()
220 i810_writeb(CR_INDEX_CGA, mmio, CR11); in i810_protect_regs()
221 i810_writeb(CR_DATA_CGA, mmio, reg); in i810_protect_regs()
234 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_pll() local
237 tmp2 = i810_readl(DCLK_2D, mmio); in i810_load_pll()
239 i810_writel(DCLK_2D, mmio, tmp1 | tmp2); in i810_load_pll()
242 tmp2 = i810_readl(DCLK_0DS, mmio); in i810_load_pll()
244 i810_writel(DCLK_0DS, mmio, (tmp1 << 16) | tmp2); in i810_load_pll()
246 i810_writeb(MSR_WRITE, mmio, par->regs.msr | 0xC8 | 1); in i810_load_pll()
259 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_vga() local
262 i810_writeb(CR_INDEX_CGA, mmio, CR70); in i810_load_vga()
263 i810_writeb(CR_DATA_CGA, mmio, par->interlace); in i810_load_vga()
265 i810_writeb(CR_INDEX_CGA, mmio, CR00); in i810_load_vga()
266 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr00); in i810_load_vga()
267 i810_writeb(CR_INDEX_CGA, mmio, CR01); in i810_load_vga()
268 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr01); in i810_load_vga()
269 i810_writeb(CR_INDEX_CGA, mmio, CR02); in i810_load_vga()
270 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr02); in i810_load_vga()
271 i810_writeb(CR_INDEX_CGA, mmio, CR03); in i810_load_vga()
272 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr03); in i810_load_vga()
273 i810_writeb(CR_INDEX_CGA, mmio, CR04); in i810_load_vga()
274 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr04); in i810_load_vga()
275 i810_writeb(CR_INDEX_CGA, mmio, CR05); in i810_load_vga()
276 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr05); in i810_load_vga()
277 i810_writeb(CR_INDEX_CGA, mmio, CR06); in i810_load_vga()
278 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr06); in i810_load_vga()
279 i810_writeb(CR_INDEX_CGA, mmio, CR09); in i810_load_vga()
280 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr09); in i810_load_vga()
281 i810_writeb(CR_INDEX_CGA, mmio, CR10); in i810_load_vga()
282 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr10); in i810_load_vga()
283 i810_writeb(CR_INDEX_CGA, mmio, CR11); in i810_load_vga()
284 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr11); in i810_load_vga()
285 i810_writeb(CR_INDEX_CGA, mmio, CR12); in i810_load_vga()
286 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr12); in i810_load_vga()
287 i810_writeb(CR_INDEX_CGA, mmio, CR15); in i810_load_vga()
288 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr15); in i810_load_vga()
289 i810_writeb(CR_INDEX_CGA, mmio, CR16); in i810_load_vga()
290 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr16); in i810_load_vga()
302 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_vgax() local
304 i810_writeb(CR_INDEX_CGA, mmio, CR30); in i810_load_vgax()
305 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr30); in i810_load_vgax()
306 i810_writeb(CR_INDEX_CGA, mmio, CR31); in i810_load_vgax()
307 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr31); in i810_load_vgax()
308 i810_writeb(CR_INDEX_CGA, mmio, CR32); in i810_load_vgax()
309 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr32); in i810_load_vgax()
310 i810_writeb(CR_INDEX_CGA, mmio, CR33); in i810_load_vgax()
311 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr33); in i810_load_vgax()
312 i810_writeb(CR_INDEX_CGA, mmio, CR35); in i810_load_vgax()
313 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr35); in i810_load_vgax()
314 i810_writeb(CR_INDEX_CGA, mmio, CR39); in i810_load_vgax()
315 i810_writeb(CR_DATA_CGA, mmio, par->regs.cr39); in i810_load_vgax()
329 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_2d() local
331 i810_writel(FW_BLC, mmio, par->watermark); in i810_load_2d()
332 tmp = i810_readl(PIXCONF, mmio); in i810_load_2d()
334 i810_writel(PIXCONF, mmio, tmp); in i810_load_2d()
336 i810_writel(OVRACT, mmio, par->ovract); in i810_load_2d()
338 i810_writeb(GR_INDEX, mmio, GR10); in i810_load_2d()
339 tmp8 = i810_readb(GR_DATA, mmio); in i810_load_2d()
341 i810_writeb(GR_INDEX, mmio, GR10); in i810_load_2d()
342 i810_writeb(GR_DATA, mmio, tmp8); in i810_load_2d()
349 static void i810_hires(u8 __iomem *mmio) in i810_hires() argument
353 i810_writeb(CR_INDEX_CGA, mmio, CR80); in i810_hires()
354 val = i810_readb(CR_DATA_CGA, mmio); in i810_hires()
355 i810_writeb(CR_INDEX_CGA, mmio, CR80); in i810_hires()
356 i810_writeb(CR_DATA_CGA, mmio, val | 1); in i810_hires()
358 i810_writel(MEM_MODE, mmio, i810_readl(MEM_MODE, mmio) | 4); in i810_hires()
372 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_pitch() local
375 i810_writeb(SR_INDEX, mmio, SR01); in i810_load_pitch()
376 val = i810_readb(SR_DATA, mmio); in i810_load_pitch()
379 i810_writeb(SR_INDEX, mmio, SR01); in i810_load_pitch()
380 i810_writeb(SR_DATA, mmio, val); in i810_load_pitch()
383 i810_writeb(CR_INDEX_CGA, mmio, CR13); in i810_load_pitch()
384 i810_writeb(CR_DATA_CGA, mmio, (u8) tmp); in i810_load_pitch()
387 i810_writeb(CR_INDEX_CGA, mmio, CR41); in i810_load_pitch()
388 val = i810_readb(CR_DATA_CGA, mmio) & ~0x0F; in i810_load_pitch()
389 i810_writeb(CR_INDEX_CGA, mmio, CR41); in i810_load_pitch()
390 i810_writeb(CR_DATA_CGA, mmio, (u8) tmp | val); in i810_load_pitch()
402 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_color() local
406 reg1 = i810_readl(PIXCONF, mmio) & ~(0xF0000 | 1 << 27); in i810_load_color()
407 reg2 = i810_readw(BLTCNTL, mmio) & ~0x30; in i810_load_color()
411 i810_writel(PIXCONF, mmio, reg1); in i810_load_color()
412 i810_writew(BLTCNTL, mmio, reg2); in i810_load_color()
424 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_regs() local
426 i810_screen_off(mmio, OFF); in i810_load_regs()
427 i810_protect_regs(mmio, OFF); in i810_load_regs()
428 i810_dram_off(mmio, OFF); in i810_load_regs()
432 i810_dram_off(mmio, ON); in i810_load_regs()
434 i810_hires(mmio); in i810_load_regs()
435 i810_screen_off(mmio, ON); in i810_load_regs()
436 i810_protect_regs(mmio, ON); in i810_load_regs()
442 u8 __iomem *mmio) in i810_write_dac() argument
444 i810_writeb(CLUT_INDEX_WRITE, mmio, regno); in i810_write_dac()
445 i810_writeb(CLUT_DATA, mmio, red); in i810_write_dac()
446 i810_writeb(CLUT_DATA, mmio, green); in i810_write_dac()
447 i810_writeb(CLUT_DATA, mmio, blue); in i810_write_dac()
451 u8 __iomem *mmio) in i810_read_dac() argument
453 i810_writeb(CLUT_INDEX_READ, mmio, regno); in i810_read_dac()
454 *red = i810_readb(CLUT_DATA, mmio); in i810_read_dac()
455 *green = i810_readb(CLUT_DATA, mmio); in i810_read_dac()
456 *blue = i810_readb(CLUT_DATA, mmio); in i810_read_dac()
465 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_pll() local
468 tmp2 = i810_readl(DCLK_2D, mmio); in i810_restore_pll()
471 i810_writel(DCLK_2D, mmio, tmp1 | tmp2); in i810_restore_pll()
474 tmp2 = i810_readl(DCLK_1D, mmio); in i810_restore_pll()
477 i810_writel(DCLK_1D, mmio, tmp1 | tmp2); in i810_restore_pll()
479 i810_writel(DCLK_0DS, mmio, par->hw_state.dclk_0ds); in i810_restore_pll()
485 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_dac() local
488 tmp2 = i810_readl(PIXCONF, mmio); in i810_restore_dac()
491 i810_writel(PIXCONF, mmio, tmp1 | tmp2); in i810_restore_dac()
497 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_vgax() local
500 i810_writeb(CR_INDEX_CGA, mmio, CR30+i); in i810_restore_vgax()
501 i810_writeb(CR_DATA_CGA, mmio, *(&(par->hw_state.cr30) + i)); in i810_restore_vgax()
503 i810_writeb(CR_INDEX_CGA, mmio, CR35); in i810_restore_vgax()
504 i810_writeb(CR_DATA_CGA, mmio, par->hw_state.cr35); in i810_restore_vgax()
505 i810_writeb(CR_INDEX_CGA, mmio, CR39); in i810_restore_vgax()
506 i810_writeb(CR_DATA_CGA, mmio, par->hw_state.cr39); in i810_restore_vgax()
507 i810_writeb(CR_INDEX_CGA, mmio, CR41); in i810_restore_vgax()
508 i810_writeb(CR_DATA_CGA, mmio, par->hw_state.cr39); in i810_restore_vgax()
511 i810_writeb(CR_INDEX_CGA, mmio, CR70); in i810_restore_vgax()
514 j = i810_readb(CR_DATA_CGA, mmio); in i810_restore_vgax()
515 i810_writeb(CR_INDEX_CGA, mmio, CR70); in i810_restore_vgax()
516 i810_writeb(CR_DATA_CGA, mmio, j | i); in i810_restore_vgax()
518 i810_writeb(CR_INDEX_CGA, mmio, CR80); in i810_restore_vgax()
519 i810_writeb(CR_DATA_CGA, mmio, par->hw_state.cr80); in i810_restore_vgax()
520 i810_writeb(MSR_WRITE, mmio, par->hw_state.msr); in i810_restore_vgax()
521 i810_writeb(SR_INDEX, mmio, SR01); in i810_restore_vgax()
523 j = i810_readb(SR_DATA, mmio) & 0xE0; in i810_restore_vgax()
524 i810_writeb(SR_INDEX, mmio, SR01); in i810_restore_vgax()
525 i810_writeb(SR_DATA, mmio, i | j); in i810_restore_vgax()
531 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_vga() local
534 i810_writeb(CR_INDEX_CGA, mmio, CR00 + i); in i810_restore_vga()
535 i810_writeb(CR_DATA_CGA, mmio, *((&par->hw_state.cr00) + i)); in i810_restore_vga()
538 i810_writeb(CR_INDEX_CGA, mmio, CR10 + i); in i810_restore_vga()
539 i810_writeb(CR_DATA_CGA, mmio, *((&par->hw_state.cr10) + i)); in i810_restore_vga()
546 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_addr_map() local
548 i810_writeb(GR_INDEX, mmio, GR10); in i810_restore_addr_map()
549 tmp = i810_readb(GR_DATA, mmio); in i810_restore_addr_map()
552 i810_writeb(GR_INDEX, mmio, GR10); in i810_restore_addr_map()
553 i810_writeb(GR_DATA, mmio, tmp); in i810_restore_addr_map()
560 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_2d() local
562 tmp_word = i810_readw(BLTCNTL, mmio); in i810_restore_2d()
565 i810_writew(BLTCNTL, mmio, tmp_word); in i810_restore_2d()
567 i810_dram_off(mmio, OFF); in i810_restore_2d()
568 i810_writel(PIXCONF, mmio, par->hw_state.pixconf); in i810_restore_2d()
569 i810_dram_off(mmio, ON); in i810_restore_2d()
571 tmp_word = i810_readw(HWSTAM, mmio); in i810_restore_2d()
574 i810_writew(HWSTAM, mmio, tmp_word); in i810_restore_2d()
576 tmp_long = i810_readl(FW_BLC, mmio); in i810_restore_2d()
579 i810_writel(FW_BLC, mmio, tmp_long); in i810_restore_2d()
581 i810_writel(HWS_PGA, mmio, par->hw_state.hws_pga); in i810_restore_2d()
582 i810_writew(IER, mmio, par->hw_state.ier); in i810_restore_2d()
583 i810_writew(IMR, mmio, par->hw_state.imr); in i810_restore_2d()
584 i810_writel(DPLYSTAS, mmio, par->hw_state.dplystas); in i810_restore_2d()
589 u8 __iomem *mmio = par->mmio_start_virtual; in i810_restore_vga_state() local
591 i810_screen_off(mmio, OFF); in i810_restore_vga_state()
592 i810_protect_regs(mmio, OFF); in i810_restore_vga_state()
593 i810_dram_off(mmio, OFF); in i810_restore_vga_state()
599 i810_dram_off(mmio, ON); in i810_restore_vga_state()
601 i810_screen_off(mmio, ON); in i810_restore_vga_state()
602 i810_protect_regs(mmio, ON); in i810_restore_vga_state()
612 u8 __iomem *mmio = par->mmio_start_virtual; in i810_save_vgax() local
615 i810_writeb(CR_INDEX_CGA, mmio, CR30 + i); in i810_save_vgax()
616 *(&(par->hw_state.cr30) + i) = i810_readb(CR_DATA_CGA, mmio); in i810_save_vgax()
618 i810_writeb(CR_INDEX_CGA, mmio, CR35); in i810_save_vgax()
619 par->hw_state.cr35 = i810_readb(CR_DATA_CGA, mmio); in i810_save_vgax()
620 i810_writeb(CR_INDEX_CGA, mmio, CR39); in i810_save_vgax()
621 par->hw_state.cr39 = i810_readb(CR_DATA_CGA, mmio); in i810_save_vgax()
622 i810_writeb(CR_INDEX_CGA, mmio, CR41); in i810_save_vgax()
623 par->hw_state.cr41 = i810_readb(CR_DATA_CGA, mmio); in i810_save_vgax()
624 i810_writeb(CR_INDEX_CGA, mmio, CR70); in i810_save_vgax()
625 par->hw_state.cr70 = i810_readb(CR_DATA_CGA, mmio); in i810_save_vgax()
626 par->hw_state.msr = i810_readb(MSR_READ, mmio); in i810_save_vgax()
627 i810_writeb(CR_INDEX_CGA, mmio, CR80); in i810_save_vgax()
628 par->hw_state.cr80 = i810_readb(CR_DATA_CGA, mmio); in i810_save_vgax()
629 i810_writeb(SR_INDEX, mmio, SR01); in i810_save_vgax()
630 par->hw_state.sr01 = i810_readb(SR_DATA, mmio); in i810_save_vgax()
636 u8 __iomem *mmio = par->mmio_start_virtual; in i810_save_vga() local
639 i810_writeb(CR_INDEX_CGA, mmio, CR00 + i); in i810_save_vga()
640 *((&par->hw_state.cr00) + i) = i810_readb(CR_DATA_CGA, mmio); in i810_save_vga()
643 i810_writeb(CR_INDEX_CGA, mmio, CR10 + i); in i810_save_vga()
644 *((&par->hw_state.cr10) + i) = i810_readb(CR_DATA_CGA, mmio); in i810_save_vga()
650 u8 __iomem *mmio = par->mmio_start_virtual; in i810_save_2d() local
652 par->hw_state.dclk_2d = i810_readl(DCLK_2D, mmio); in i810_save_2d()
653 par->hw_state.dclk_1d = i810_readl(DCLK_1D, mmio); in i810_save_2d()
654 par->hw_state.dclk_0ds = i810_readl(DCLK_0DS, mmio); in i810_save_2d()
655 par->hw_state.pixconf = i810_readl(PIXCONF, mmio); in i810_save_2d()
656 par->hw_state.fw_blc = i810_readl(FW_BLC, mmio); in i810_save_2d()
657 par->hw_state.bltcntl = i810_readw(BLTCNTL, mmio); in i810_save_2d()
658 par->hw_state.hwstam = i810_readw(HWSTAM, mmio); in i810_save_2d()
659 par->hw_state.hws_pga = i810_readl(HWS_PGA, mmio); in i810_save_2d()
660 par->hw_state.ier = i810_readw(IER, mmio); in i810_save_2d()
661 par->hw_state.imr = i810_readw(IMR, mmio); in i810_save_2d()
662 par->hw_state.dplystas = i810_readl(DPLYSTAS, mmio); in i810_save_2d()
773 static void i810_enable_cursor(u8 __iomem *mmio, int mode) in i810_enable_cursor() argument
777 temp = i810_readl(PIXCONF, mmio); in i810_enable_cursor()
781 i810_writel(PIXCONF, mmio, temp); in i810_enable_cursor()
823 u8 __iomem *mmio = par->mmio_start_virtual; in i810_load_cursor_colors() local
828 temp = i810_readb(PIXCONF1, mmio); in i810_load_cursor_colors()
829 i810_writeb(PIXCONF1, mmio, temp | EXTENDED_PALETTE); in i810_load_cursor_colors()
831 i810_write_dac(4, red, green, blue, mmio); in i810_load_cursor_colors()
833 i810_writeb(PIXCONF1, mmio, temp); in i810_load_cursor_colors()
836 temp = i810_readb(PIXCONF1, mmio); in i810_load_cursor_colors()
837 i810_writeb(PIXCONF1, mmio, temp | EXTENDED_PALETTE); in i810_load_cursor_colors()
839 i810_write_dac(5, red, green, blue, mmio); in i810_load_cursor_colors()
841 i810_writeb(PIXCONF1, mmio, temp); in i810_load_cursor_colors()
853 u8 __iomem *mmio = par->mmio_start_virtual; in i810_init_cursor() local
855 i810_enable_cursor(mmio, OFF); in i810_init_cursor()
856 i810_writel(CURBASE, mmio, par->cursor_heap.physical); in i810_init_cursor()
857 i810_writew(CURCNTR, mmio, COORD_ACTIVE | CURSOR_MODE_64_XOR); in i810_init_cursor()
1204 u8 __iomem *mmio = par->mmio_start_virtual; in i810fb_getcolreg() local
1213 temp = i810_readb(PIXCONF1, mmio); in i810fb_getcolreg()
1214 i810_writeb(PIXCONF1, mmio, temp & ~EXTENDED_PALETTE); in i810fb_getcolreg()
1218 i810_read_dac(regno * 8, red, green, blue, mmio); in i810fb_getcolreg()
1224 i810_read_dac(regno * 8, red, &tmp, blue, mmio); in i810fb_getcolreg()
1225 i810_read_dac(regno * 4, &tmp, green, &tmp, mmio); in i810fb_getcolreg()
1228 i810_read_dac(regno, red, green, blue, mmio); in i810fb_getcolreg()
1231 i810_writeb(PIXCONF1, mmio, temp); in i810fb_getcolreg()
1287 u8 __iomem *mmio = par->mmio_start_virtual; in i810fb_setcolreg() local
1303 temp = i810_readb(PIXCONF1, mmio); in i810fb_setcolreg()
1304 i810_writeb(PIXCONF1, mmio, temp & ~EXTENDED_PALETTE); in i810fb_setcolreg()
1310 (u8) green, (u8) blue, mmio); in i810fb_setcolreg()
1319 (u8) blue, mmio); in i810fb_setcolreg()
1321 i810_read_dac((u8) (regno*4), &r, &g, &b, mmio); in i810fb_setcolreg()
1324 b, mmio); in i810fb_setcolreg()
1327 (u8) blue, mmio); in i810fb_setcolreg()
1330 i810_writeb(PIXCONF1, mmio, temp); in i810fb_setcolreg()
1393 u8 __iomem *mmio = par->mmio_start_virtual; in i810fb_blank() local
1396 pwr = i810_readl(PWR_CLKC, mmio); in i810fb_blank()
1428 i810_screen_off(mmio, scr_off); in i810fb_blank()
1429 i810_writel(HVSYNC, mmio, mode); in i810fb_blank()
1430 i810_writel(PWR_CLKC, mmio, pwr); in i810fb_blank()
1482 u8 __iomem *mmio = par->mmio_start_virtual; in i810fb_cursor() local
1490 if ((i810_readl(CURBASE, mmio) & 0xf) != par->cursor_heap.physical) { in i810fb_cursor()
1495 i810_enable_cursor(mmio, OFF); in i810fb_cursor()
1502 i810_writel(CURPOS, mmio, tmp); in i810fb_cursor()
1541 i810_enable_cursor(mmio, ON); in i810fb_cursor()
1819 u8 __iomem *mmio = par->mmio_start_virtual; in i810_init_device() local
1829 i810_writel(HVSYNC, mmio, 0); in i810_init_device()
1830 i810_writel(PWR_CLKC, mmio, 3); in i810_init_device()