diff -Nru coreboot-v2-3261/src/southbridge/amd/cs5536/chip.h coreboot-v2-3261-lx-speaker/src/southbridge/amd/cs5536/chip.h --- coreboot-v2-3261/src/southbridge/amd/cs5536/chip.h 2008-01-18 15:35:56.000000000 +0500 +++ coreboot-v2-3261-lx-speaker/src/southbridge/amd/cs5536/chip.h 2008-04-25 11:09:02.000000000 +0600 @@ -39,6 +39,7 @@ unsigned char com2_enable; /* enable COM2 */ unsigned int com2_address; /* e.g. 0x2F8 */ unsigned int com2_irq; /* e.g. 3 */ + unsigned char speaker_enable; /* enable speaker */ unsigned int unwanted_vpci[MAX_UNWANTED_VPCI]; /* the following allow you to disable unwanted virtualized PCI devices */ }; diff -Nru coreboot-v2-3261/src/southbridge/amd/cs5536/cs5536.c coreboot-v2-3261-lx-speaker/src/southbridge/amd/cs5536/cs5536.c --- coreboot-v2-3261/src/southbridge/amd/cs5536/cs5536.c 2008-01-18 20:08:58.000000000 +0500 +++ coreboot-v2-3261-lx-speaker/src/southbridge/amd/cs5536/cs5536.c 2008-04-25 11:09:02.000000000 +0600 @@ -248,6 +248,26 @@ isa_dma_init(); } +static void cs5536_enable_speaker(struct southbridge_amd_cs5536_config *sb) +{ + uint32_t gpio_addr; + device_t dev; + + dev = dev_find_device(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_CS5536_ISA, 0); + gpio_addr = pci_read_config32(dev, PCI_BASE_ADDRESS_1); + gpio_addr &= ~1; /* clear IO bit */ + + if (sb->speaker_enable) { + + /* GPIO1 - BEEP */ + /* Set: Output Enable (0x4) */ + outl(GPIOL_1_SET, gpio_addr + GPIOL_OUTPUT_ENABLE); + /* Set: OUTAUX1 Select (0x10) */ + outl(GPIOL_1_SET, gpio_addr + GPIOL_OUT_AUX1_SELECT); + } +} + static void uarts_init(struct southbridge_amd_cs5536_config *sb) { msr_t msr; @@ -580,6 +600,7 @@ setup_i8259(); lpc_init(sb); uarts_init(sb); + cs5536_enable_speaker(sb); if (sb->enable_gpio_int_route) { vrWrite((VRC_MISCELLANEOUS << 8) + PCI_INT_AB,