Move some board specific functions to sb800.h.
Signed-off-by: Zheng Bao <zheng.bao@amd.com> Acked-by: Zheng Bao <zheng.bao@amd.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6279 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
8210e8972c
commit
79c04d559a
|
@ -61,7 +61,7 @@ static void sb800_acpi_init(void) {
|
|||
pmio_write(0x6C, ACPI_PMA_CNT_BLK & 0xFF);
|
||||
pmio_write(0x6D, ACPI_PMA_CNT_BLK >> 8);
|
||||
|
||||
pm_iowrite(0x74, 1<<0 | 1<<1 | 1<<4 | 1<<2); /* AcpiDecodeEnable, When set, SB uses
|
||||
pmio_write(0x74, 1<<0 | 1<<1 | 1<<4 | 1<<2); /* AcpiDecodeEnable, When set, SB uses
|
||||
* the contents of the PM registers at
|
||||
* index 60-6B to decode ACPI I/O address.
|
||||
* AcpiSmiEn & SmiCmdEn*/
|
||||
|
@ -95,8 +95,7 @@ static u8 get_sb800_revision(void)
|
|||
return rev;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void sb800_clk_output_48Mhz(void)
|
||||
void sb800_clk_output_48Mhz(void)
|
||||
{
|
||||
/* AcpiMMioDecodeEn */
|
||||
u8 reg8;
|
||||
|
@ -108,7 +107,6 @@ static void sb800_clk_output_48Mhz(void)
|
|||
*(volatile u32 *)(0xFED80000+0xE00+0x40) &= ~((1 << 0) | (1 << 2)); /* 48Mhz */
|
||||
*(volatile u32 *)(0xFED80000+0xE00+0x40) |= 1 << 1; /* 48Mhz */
|
||||
}
|
||||
#endif
|
||||
/***************************************
|
||||
* Legacy devices are mapped to LPC space.
|
||||
* Serial port 0
|
||||
|
@ -234,8 +232,7 @@ void soft_reset(void)
|
|||
outb(0x06, 0x0cf9);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void sb800_pci_port80(void)
|
||||
void sb800_pci_port80(void)
|
||||
{
|
||||
u8 byte;
|
||||
device_t dev;
|
||||
|
@ -279,7 +276,7 @@ static void sb800_pci_port80(void)
|
|||
byte &= ~(1 << 5); /* disable lpc port 80 */
|
||||
pci_write_config8(dev, 0x4A, byte);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define BIT0 (1 << 0)
|
||||
#define BIT1 (1 << 1)
|
||||
#define BIT2 (1 << 2)
|
||||
|
@ -338,12 +335,10 @@ struct pm_entry const pm_table[] =
|
|||
{0xBC, ~BIT1, BIT1},
|
||||
{0xED, ~(BIT0 + BIT1), 0},
|
||||
{0xDC, 0x7C, BIT0},
|
||||
|
||||
// {0xFF, 0xFF, 0xFF},
|
||||
|
||||
};
|
||||
|
||||
static void sb800_lpc_port80(void)
|
||||
void sb800_lpc_port80(void)
|
||||
{
|
||||
u8 byte;
|
||||
device_t dev;
|
||||
|
|
|
@ -47,12 +47,13 @@ extern void set_sm_enable_bits(device_t sm_dev, u32 reg_pos, u32 mask, u32 val);
|
|||
#define REV_SB800_A11 0x11
|
||||
#define REV_SB800_A12 0x12
|
||||
|
||||
/* This shouldn't be called before set_sb800_revision() is called.
|
||||
* Once set_sb800_revision() is called, we use get_sb800_revision(),
|
||||
* the simpler one, to get the sb800 revision ID.
|
||||
* The id is 0x39 if A11, 0x3A if A12, 0x3C if A14, 0x3D if A15.
|
||||
* The differentiate is 0x28, isn't it? */
|
||||
//#define get_sb800_revision(sm_dev) (pci_read_config8((sm_dev), 0x08) - 0x28)
|
||||
#ifdef __PRE_RAM__
|
||||
void sb800_lpc_port80(void);
|
||||
void sb800_pci_port80(void);
|
||||
void sb800_clk_output_48Mhz(void);
|
||||
#else
|
||||
/* void sb800_setup_sata_phys(struct device *dev); */
|
||||
#endif
|
||||
|
||||
void sb800_enable(device_t dev);
|
||||
void sb800_enable_usbdebug(unsigned int port);
|
||||
|
|
Loading…
Reference in New Issue