X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Fconsole%2Fsticore.c;fp=drivers%2Fvideo%2Fconsole%2Fsticore.c;h=0339f5640a78f0d56a4b1db24de78b5f0f73ecba;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=88e7038eab889f68eedc0ace5911cac131e3ec93;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 88e7038ea..0339f5640 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include @@ -274,7 +275,7 @@ static int __init sti_setup(char *str) if (str) strlcpy (default_sti_path, str, sizeof (default_sti_path)); - return 1; + return 0; } /* Assuming the machine has multiple STI consoles (=graphic cards) which @@ -320,7 +321,7 @@ static int __init sti_font_setup(char *str) i++; } - return 1; + return 0; } /* The optional linux kernel parameter "sti_font" defines which font @@ -372,7 +373,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) glob_cfg->save_addr)); /* dump extended cfg */ - cfg = PTR_STI((unsigned long)glob_cfg->ext_ptr); + cfg = PTR_STI(glob_cfg->ext_ptr); DPRINTK(( KERN_INFO "monitor %d\n" "in friendly mode: %d\n" @@ -452,11 +453,25 @@ sti_init_glob_cfg(struct sti_struct *sti, sti->regions_phys[i] = REGION_OFFSET_TO_PHYS(sti->regions[i], newhpa); + /* remap virtually */ + /* FIXME: add BTLB support if btlb==1 */ len = sti->regions[i].region_desc.length * 4096; + +/* XXX: Enabling IOREMAP debugging causes a crash, so we must be passing + * a virtual address to something expecting a physical address that doesn't + * go through a readX macro */ +#if 0 + if (len) + glob_cfg->region_ptrs[i] = (unsigned long) ( + sti->regions[i].region_desc.cache ? + ioremap(sti->regions_phys[i], len) : + ioremap_nocache(sti->regions_phys[i], len) ); +#else if (len) glob_cfg->region_ptrs[i] = sti->regions_phys[i]; +#endif - DPRINTK(("region #%d: phys %08lx, region_ptr %08x, len=%lukB, " + DPRINTK(("region #%d: phys %08lx, virt %08x, len=%lukB, " "btlb=%d, sysonly=%d, cache=%d, last=%d\n", i, sti->regions_phys[i], glob_cfg->region_ptrs[i], len/1024,