[coreboot] pc speaker and cs5536

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Mar 13 13:00:01 CET 2008


On 13.03.2008 07:24, Nikolay Petukhov wrote:
> OK, then it is easier to include in a mainboard.c.
>   

Maybe call it from mainboard.c, but keep the function inside the cs5536
code.


> 2008/3/11, Jordan Crouse <jordan.crouse at amd.com>:
>   
>> On 11/03/08 15:53 +0500, Nikolay Petukhov wrote:
>>  > Hi, all.
>>  >
>>  > I have PCISA-LX-800 board (AMD LX800 + CS5536)
>>  > http://www.ieiworld.com/en/product_IPC.asp?model=PCISA-LX.
>>  >
>>  > With coreboot bios pc speaker not work on Linux.
>>  > But with vendor BIOS pc speaker work on Linux OK.
>>  >
>>  > The CS5536 datasheet say:
>>  > Legacy PC/AT Speaker Beep is only available when GPIO1 is programmed
>>  > to OUT_AUX1.
>>  > The coreboot not enable pc speaker output on cs5536.
>>  >
>>  > This patch enable pc speaker output on cs5536 based devices.
>>  >
>>  > Signed-off-by: Nikolay Petukhov <nikolay.petukhov at gmail.com>
>>
>>
>> comments below.
>>
>>  > --
>>  > Nikolay
>>
>>  > diff -Nru coreboot-v2-3132/src/southbridge/amd/cs5536/cs5536_early_setup.c coreboot-v2-3132-beep/src/southbridge/amd/cs5536/cs5536_early_setup.c
>>  > --- coreboot-v2-3132/src/southbridge/amd/cs5536/cs5536_early_setup.c  2008-01-18 15:35:56.000000000 +0500
>>  > +++ coreboot-v2-3132-beep/src/southbridge/amd/cs5536/cs5536_early_setup.c     2008-03-11 10:36:42.000000000 +0500
>>  > @@ -123,6 +123,15 @@
>>  >       outl(val, GPIO_IO_BASE + GPIOL_INPUT_ENABLE);
>>  >  }
>>
>>  > +static void cs5536_setup_beep(void)
>>  > +{
>>  > +     /* GPIO1 - BEEP */
>>  > +     /* Set: Output Enable  (0x4) */
>>  > +     outl(GPIOL_1_SET, GPIO_IO_BASE + GPIOL_OUTPUT_ENABLE);
>>  > +     /* Set: OUTAUX1 Select (0x10) */
>>  > +     outl(GPIOL_1_SET, GPIO_IO_BASE + GPIOL_OUT_AUX1_SELECT);
>>  > +}
>>
>>  I think we should wrap this with a config option.  Lots of platform designs
>>  these days are omitting the legacy speaker hardware and reclaiming
>>  GPIO1.
>>     

And it is debatable whether we want to have the function in
cs5536_early_setup.c. Another cs5536 file would be better.

>>  >  static void cs5536_disable_internal_uart(void)
>>  >  {
>>  >       msr_t msr;
>>  > @@ -221,4 +230,5 @@
>>  >       cs5536_enable_smbus();
>>  >       //print_debug("Setup power button\r\n");
>>  >       cs5536_setup_power_button();
>>  > +     cs5536_setup_beep();
>>  >  }
>>     

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the coreboot mailing list