Tue May 26 03:31:12 2009 UTC ()
use BUS_SPACE_MAP_LARGE to map the framebuffer


(macallan)
diff -r1.59 -r1.60 src/sys/arch/sparc/dev/cgfourteen.c

cvs diff -r1.59 -r1.60 src/sys/arch/sparc/dev/cgfourteen.c (expand / switch to unified diff)

--- src/sys/arch/sparc/dev/cgfourteen.c 2009/05/16 16:55:24 1.59
+++ src/sys/arch/sparc/dev/cgfourteen.c 2009/05/26 03:31:12 1.60
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cgfourteen.c,v 1.59 2009/05/16 16:55:24 cegger Exp $ */ 1/* $NetBSD: cgfourteen.c,v 1.60 2009/05/26 03:31:12 macallan Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 4 * Copyright (c) 1996
5 * The President and Fellows of Harvard College. All rights reserved. 5 * The President and Fellows of Harvard College. All rights reserved.
6 * Copyright (c) 1992, 1993 6 * Copyright (c) 1992, 1993
7 * The Regents of the University of California. All rights reserved. 7 * The Regents of the University of California. All rights reserved.
8 * 8 *
9 * This software was developed by the Computer Systems Engineering group 9 * This software was developed by the Computer Systems Engineering group
10 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 10 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
11 * contributed to Berkeley. 11 * contributed to Berkeley.
12 * 12 *
13 * All advertising materials mentioning features or use of this software 13 * All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement: 14 * must display the following acknowledgement:
@@ -357,30 +357,31 @@ cgfourteenattach(device_t parent, device @@ -357,30 +357,31 @@ cgfourteenattach(device_t parent, device
357 for (i = 0; i < ramsize; i++) 357 for (i = 0; i < ramsize; i++)
358 ((unsigned char *)bh)[i] = 0; 358 ((unsigned char *)bh)[i] = 0;
359 fbrcons_init(&sc->sc_rcfb); 359 fbrcons_init(&sc->sc_rcfb);
360 cg14_set_rcons_luts(sc); 360 cg14_set_rcons_luts(sc);
361 sc->sc_ctl->ctl_mctl = CG14_MCTL_ENABLEVID |  361 sc->sc_ctl->ctl_mctl = CG14_MCTL_ENABLEVID |
362 CG14_MCTL_PIXMODE_32 | CG14_MCTL_POWERCTL; 362 CG14_MCTL_PIXMODE_32 | CG14_MCTL_POWERCTL;
363 } else 363 } else
364 printf("\n"); 364 printf("\n");
365#endif 365#endif
366 366
367#if NWSDISPLAY > 0 367#if NWSDISPLAY > 0
368 prom_getprop(sa->sa_node, "address", 4, &items, &ptr); 368 prom_getprop(sa->sa_node, "address", 4, &items, &ptr);
369 if (fbva[1] == 0) { 369 if (fbva[1] == 0) {
370 if (sparc_bus_map_large( sc->sc_bustag, 370 if (sbus_bus_map( sc->sc_bustag,
371 sc->sc_physadr[CG14_PXL_IDX].sbr_slot, 371 sc->sc_physadr[CG14_PXL_IDX].sbr_slot,
372 sc->sc_physadr[CG14_PXL_IDX].sbr_offset, 372 sc->sc_physadr[CG14_PXL_IDX].sbr_offset,
373 ramsize, BUS_SPACE_MAP_LINEAR, &bh) != 0) { 373 ramsize, BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_LARGE,
 374 &bh) != 0) {
374 printf("%s: cannot map pixels\n",  375 printf("%s: cannot map pixels\n",
375 device_xname(sc->sc_dev)); 376 device_xname(sc->sc_dev));
376 return; 377 return;
377 } 378 }
378 sc->sc_fb.fb_pixels = bus_space_vaddr(sc->sc_bustag, bh); 379 sc->sc_fb.fb_pixels = bus_space_vaddr(sc->sc_bustag, bh);
379 } else { 380 } else {
380 sc->sc_fb.fb_pixels = (void *)fbva[1]; 381 sc->sc_fb.fb_pixels = (void *)fbva[1];
381 } 382 }
382 383
383 sc->sc_shadowfb = kmem_alloc(ramsize, KM_NOSLEEP); 384 sc->sc_shadowfb = kmem_alloc(ramsize, KM_NOSLEEP);
384 385
385 if (isconsole) 386 if (isconsole)
386 printf(" (console)\n"); 387 printf(" (console)\n");