Date: Sun, 28 Sep 1997 22:08:44 -0700 (PDT) From: <nsayer@quack.kfu.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/4650: Cirrus Logic pcic chips need audio bit & LPDM bit set. Message-ID: <199709290508.WAA09986@icarus.kfu.com> Resent-Message-ID: <199709290510.WAA16935@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 4650 >Category: kern >Synopsis: Cirrus Logic pcic chips need audio bit & LPDM bit set >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: support >Submitter-Id: current-users >Arrival-Date: Sun Sep 28 22:10:00 PDT 1997 >Last-Modified: >Originator: Nick Sayer >Organization: >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: Laptops (or desktops) with Cirrus Logic PD672x chipsets. >Description: PCMCIA modem cards send the speaker audio (dialing noises) to the host to be sent to the speaker. Cirrus Logic PCIC chips have a bit to enable or disable this, and it is disabled by default. There is also a Low Power Dynamic Mode bit (this one is one per chip rather than one per slot, but it doesn't hurt to set it per slot - extras are ignored) that the docco claims will reduce PCIC power consumption by 30% or so. I have seen no ill effects from turning this bit on. >How-To-Repeat: >Fix: *** pcic.c.orig Sun Jul 6 09:11:53 1997 --- pcic.c Sun Jul 6 10:19:03 1997 *************** *** 949,954 **** --- 949,961 ---- printf("pcic: controller irq %d\n", pcic_irq); } #endif /* PCIC_NO_IRQ */ + #ifndef NOCIRRUSHACK + if (sp->controller == PCIC_PD672X) + { + setb (sp, PCIC_MISC1, PCIC_SPKR_EN); + setb (sp, PCIC_MISC2, PCIC_LPDM_EN); + } + #endif /* * Check for a card in this slot. */ *************** *** 1331,1334 **** --- 1338,1348 ---- if (pcic_irq > 0) sp->putb(sp, PCIC_STAT_INT, (pcic_irq << 4) | 0xF); + #ifndef NOCIRRUSHACK + if (sp->controller == PCIC_PD672X) + { + setb (sp, PCIC_MISC1, PCIC_SPKR_EN); + setb (sp, PCIC_MISC2, PCIC_LPDM_EN); + } + #endif } *** i82365.h.orig Sun Jul 6 09:11:52 1997 --- i82365.h Sun Jul 6 09:15:04 1997 *************** *** 84,90 **** --- 84,92 ---- #define PCIC_IO1 0x0c /* I/O Address 1 */ #define PCIC_MEMBASE 0x10 /* Base of memory window registers */ #define PCIC_CDGC 0x16 /* Card Detect and General Control */ + #define PCIC_MISC1 0x16 /* PD672x: Misc control register 1 per slot */ #define PCIC_GLO_CTRL 0x1e /* Global Control Register */ + #define PCIC_MISC2 0x1e /* PD672x: Misc control register 2 per chip */ #define PCIC_TIME_SETUP0 0x3a #define PCIC_TIME_CMD0 0x3b *************** *** 205,210 **** --- 207,215 ---- #define PCIC_CDRES_EN 0x10 /* card detect resume enable */ #define PCIC_SW_CD_INT 0x20 /* s/w card detect interrupt */ + /* For Misc. Control Register 1 */ + #define PCIC_SPKR_EN 0x10 /* Cirrus PD672x: speaker enable */ + /* For Global Control register (PCIC_GLO_CTRL) */ #define PCIC_PWR_DOWN 0x01 /* power down */ #define PCIC_LVL_MODE 0x02 /* level mode interrupt enable */ *************** *** 212,217 **** --- 217,224 ---- #define PCIC_IRQ0_LEVEL 0x08 /* irq 14 pulse mode enable */ #define PCIC_IRQ1_LEVEL 0x10 + /* For Misc. Control Register 2 */ + #define PCIC_LPDM_EN 0x02 /* Cirrus PD672x: low power dynamic mode */ /* * Mask of allowable interrupts. * Ints are 3,4,5,7,9,10,11,12,14,15 >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709290508.WAA09986>