From: Alexander Kern <alex.kern@gmx.de>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH 6/7]
Date: Sun, 21 Mar 2004 20:39:22 +0100 [thread overview]
Message-ID: <200403212039.22396.alex.kern@gmx.de> (raw)
In-Reply-To: <200403212033.39808.alex.kern@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 06_mach64-laterinit.diff --]
[-- Type: text/x-diff, Size: 5302 bytes --]
Only in linux-2.6.alex/drivers/video/aty/: .atyfb.o.cmd
Only in linux-2.6.alex/drivers/video/aty/: .atyfb_base.o.cmd
Only in linux-2.6.alex/drivers/video/aty/: .built-in.o.cmd
Only in linux-2.6.alex/drivers/video/aty/: .mach64_accel.o.cmd
Only in linux-2.6.alex/drivers/video/aty/: .mach64_ct.o.cmd
Only in linux-2.6.alex/drivers/video/aty/: .mach64_cursor.o.cmd
Only in linux-2.6.alex/drivers/video/aty/: atyfb.h.orig
Only in linux-2.6.alex/drivers/video/aty/: atyfb.o
diff -U 3 -H -d -I '*.o' -p -r -- linux-2.6.4/drivers/video/aty/atyfb_base.c linux-2.6.alex/drivers/video/aty/atyfb_base.c
--- linux-2.6.4/drivers/video/aty/atyfb_base.c 2004-03-19 21:18:14.000000000 +0100
+++ linux-2.6.alex/drivers/video/aty/atyfb_base.c 2004-03-20 18:47:53.000000000 +0100
@@ -366,24 +366,29 @@ static struct {
};
/* can not fail */
-static void __devinit correct_chipset(int i, struct atyfb_par *par)
+static void __devinit correct_chipset(struct atyfb_par *par)
{
u8 rev;
u16 type;
u32 chip_id;
const char *name;
+ int i;
+
+ for (i = sizeof(aty_chips) / sizeof(*aty_chips) - 1; i >= 0; i--)
+ if (par->pci_id == aty_chips[i].pci_id)
+ break;
name = aty_chips[i].name;
par->pll_limits.pll_max = aty_chips[i].pll;
par->pll_limits.mclk = aty_chips[i].mclk;
par->pll_limits.xclk = aty_chips[i].xclk;
par->features = aty_chips[i].features;
- par->pci_id = aty_chips[i].pci_id;
chip_id = aty_ld_le32(CONFIG_CHIP_ID, par);
type = chip_id & CFG_CHIP_TYPE;
rev = (chip_id & CFG_CHIP_REV) >> 24;
- switch(aty_chips[i].pci_id) {
+
+ switch(par->pci_id) {
#ifdef CONFIG_FB_ATY_GX
case PCI_CHIP_MACH64GX:
assert(type == 0x00d7);
@@ -432,7 +437,7 @@ static void __devinit correct_chipset(in
#endif
}
- printk("atyfb: %s [0x%04x rev 0x%02x] ", name, type, rev);
+ printk("atyfb: %s [0x%04x rev 0x%02x]\n", name, type, rev);
}
static char ram_dram[] __initdata = "DRAM";
@@ -2648,6 +2653,8 @@ static int __devinit atyfb_setup_sparc(s
par->mmap_map[j].prot_flag = _PAGE_E;
j++;
}
+
+ correct_chipset(par);
if (IS_XL(pdev->device)) {
/*
@@ -3025,14 +3032,14 @@ static int __devinit init_from_bios(stru
pll_block.MCLK_pwd, pll_block.MCLK_max_freq,
pll_block.XCLK_max_freq, pll_block.SCLK_freq);
- par->pll_limits.pll_min = pll_block.PCLK_min_freq;
- par->pll_limits.pll_max = pll_block.PCLK_max_freq;
- par->pll_limits.ref_clk = pll_block.ref_freq;
+ par->pll_limits.pll_min = pll_block.PCLK_min_freq/100;
+ par->pll_limits.pll_max = pll_block.PCLK_max_freq/100;
+ par->pll_limits.ref_clk = pll_block.ref_freq/100;
par->pll_limits.ref_div = pll_block.ref_divider;
- par->pll_limits.sclk = pll_block.SCLK_freq;
- par->pll_limits.mclk = pll_block.MCLK_max_freq;
- par->pll_limits.mclk_pm = pll_block.MCLK_pwd;
- par->pll_limits.xclk = pll_block.XCLK_max_freq;
+ par->pll_limits.sclk = pll_block.SCLK_freq/100;
+ par->pll_limits.mclk = pll_block.MCLK_max_freq/100;
+ par->pll_limits.mclk_pm = pll_block.MCLK_pwd/100;
+ par->pll_limits.xclk = pll_block.XCLK_max_freq/100;
#ifdef CONFIG_FB_ATY_GENERIC_LCD
aty_init_lcd(par, bios_base);
#endif
@@ -3093,6 +3100,7 @@ static int __devinit atyfb_setup_generic
}
/* always succeeded ? */
+ correct_chipset(par);
init_from_bios(par);
if (!(aty_ld_le32(CRTC_GEN_CNTL, par) & CRTC_EXT_DISP_EN))
@@ -3119,6 +3127,7 @@ static int __devinit atyfb_pci_probe(str
for (i = sizeof(aty_chips) / sizeof(*aty_chips) - 1; i >= 0; i--)
if (pdev->device == aty_chips[i].pci_id)
break;
+
if (i < 0)
return -ENODEV;
@@ -3144,6 +3153,7 @@ static int __devinit atyfb_pci_probe(str
}
par = info->par;
info->fix = atyfb_fix;
+ par->pci_id = aty_chips[i].pci_id;
/* Reserve space */
par->res_start = rp->start;
@@ -3153,9 +3163,6 @@ static int __devinit atyfb_pci_probe(str
goto err_free;
}
- /* set default Values aus pci_table */
- correct_chipset(i, par);
-
/* Setup "info" structure */
#ifdef __sparc__
rc = atyfb_setup_sparc(pdev, info, addr);
Only in linux-2.6.alex/drivers/video/aty/: atyfb_base.c.orig
Only in linux-2.6.alex/drivers/video/aty/: atyfb_base.o
Only in linux-2.6.alex/drivers/video/aty/: built-in.o
Only in linux-2.6.alex/drivers/video/aty/: mach64_accel.c.orig
Only in linux-2.6.alex/drivers/video/aty/: mach64_accel.o
diff -U 3 -H -d -I '*.o' -p -r -- linux-2.6.4/drivers/video/aty/mach64_ct.c linux-2.6.alex/drivers/video/aty/mach64_ct.c
--- linux-2.6.4/drivers/video/aty/mach64_ct.c 2004-03-13 21:13:44.000000000 +0100
+++ linux-2.6.alex/drivers/video/aty/mach64_ct.c 2004-03-20 20:10:00.000000000 +0100
@@ -273,12 +273,11 @@ void aty_set_pll_ct(const struct fb_info
__FUNCTION__,
pll->ct.pll_ext_cntl, pll->ct.pll_gen_cntl, pll->ct.pll_vclk_cntl);
-#endif
printk("atyfb(%s): setting clock %lu for FeedBackDivider %i, ReferenceDivider %i, PostDivider %i(%i)\n",
__FUNCTION__,
par->clk_wr_offset, pll->ct.vclk_fb_div,
pll->ct.pll_ref_div, pll->ct.vclk_post_div, pll->ct.vclk_post_div_real);
-
+#endif
#ifdef CONFIG_FB_ATY_GENERIC_LCD
if (par->lcd_table != 0) {
/* turn off LCD */
Only in linux-2.6.alex/drivers/video/aty/: mach64_ct.c.orig
Only in linux-2.6.alex/drivers/video/aty/: mach64_ct.o
Only in linux-2.6.alex/drivers/video/aty/: mach64_cursor.o
Only in linux-2.6.alex/drivers/video/aty/: xlinit.c.orig
next prev parent reply other threads:[~2004-03-21 19:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-21 19:33 [PATCH 0/7] Bunch of patches Alexander Kern
2004-03-21 19:37 ` [PATCH 1/7] Alexander Kern
2004-03-21 19:37 ` [PATCH 2/7] Alexander Kern
2004-03-21 19:38 ` [PATCH 3/7] Alexander Kern
2004-03-21 19:38 ` [PATCH 4/7] Alexander Kern
2004-03-21 19:38 ` [PATCH 5/7] Alexander Kern
2004-03-21 19:39 ` Alexander Kern [this message]
2004-03-21 20:47 ` [PATCH 6/7] Alexander Kern
2004-03-21 19:39 ` [PATCH 7/7] Alexander Kern
2004-03-21 20:49 ` [PATCH] all changes in two, again James mach64.diff Alexander Kern
2004-03-23 18:57 ` [PATCH 0/7] Bunch of patches James Simmons
2004-03-24 20:39 ` Alexander Kern
2004-03-24 21:25 ` all in one patch Alexander Kern
2004-03-24 21:27 ` James Simmons
2004-03-24 21:44 ` James Simmons
2004-03-24 21:26 ` Re: [PATCH 0/7] Bunch of patches James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200403212039.22396.alex.kern@gmx.de \
--to=alex.kern@gmx.de \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).