lkml.org 
[lkml]   [2007]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    SubjectRe: fix typo in geode_configre()@cyrix.c
    From
    Hi. Thanks Sorensen and Juergen.

    I overlooked the restored to CCR3.
    The bit4(0x10, MAPEN) of CCR3 is necessary to access advanced configuration registers.
    I'll repost patch.

    - restore CCR3
    - fix use 0x30 instead of 0x38.

    --- linux-2.6.19.orig/arch/i386/kernel/cpu/cyrix.c 2006-11-30 06:57:37.000000000 +0900
    +++ linux-2.6.19/arch/i386/kernel/cpu/cyrix.c 2007-01-17 16:15:40.000000000 +0900
    @@ -161,19 +161,18 @@ static void __cpuinit set_cx86_inc(void)
    static void __cpuinit geode_configure(void)
    {
    unsigned long flags;
    - u8 ccr3, ccr4;
    + u8 ccr3;
    local_irq_save(flags);

    /* Suspend on halt power saving and enable #SUSP pin */
    setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);

    ccr3 = getCx86(CX86_CCR3);
    - setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* Enable */
    + setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */

    - ccr4 = getCx86(CX86_CCR4);
    - ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */
    -
    - setCx86(CX86_CCR3, ccr3);
    + /* FPU fast, DTE cache, Mem bypass */
    + setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
    + setCx86(CX86_CCR3, ccr3); /* disable MAPEN */

    set_cx86_memwb();
    set_cx86_reorder();
    @@ -415,15 +414,14 @@ static void __cpuinit cyrix_identify(str

    if (dir0 == 5 || dir0 == 3)
    {
    - unsigned char ccr3, ccr4;
    + unsigned char ccr3;
    unsigned long flags;
    printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n");
    local_irq_save(flags);
    ccr3 = getCx86(CX86_CCR3);
    - setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
    - ccr4 = getCx86(CX86_CCR4);
    - setCx86(CX86_CCR4, ccr4 | 0x80); /* enable cpuid */
    - setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
    + setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
    + setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x80); /* enable cpuid */
    + setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
    local_irq_restore(flags);
    }
    }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-01-17 16:53    [W:0.021 / U:12.080 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site