intel: Define `RCBA_LENGTH` in Kconfig and use it
Change-Id: Ief81d49f04c1743b2a37633c4a35da9d6ddb0974 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50039 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
ca935d1107
commit
b70ff52b83
|
@ -13,7 +13,7 @@ Device (PDRC)
|
||||||
// This does not seem to work correctly yet - set values statically for
|
// This does not seem to work correctly yet - set values statically for
|
||||||
// now.
|
// now.
|
||||||
Name (PDRS, ResourceTemplate() {
|
Name (PDRS, ResourceTemplate() {
|
||||||
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
||||||
|
|
|
@ -174,7 +174,7 @@ Device (PDRC)
|
||||||
Name (_UID, 1)
|
Name (_UID, 1)
|
||||||
|
|
||||||
Name (PDRS, ResourceTemplate () {
|
Name (PDRS, ResourceTemplate () {
|
||||||
Memory32Fixed (ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed (ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Memory32Fixed (ReadWrite, DEFAULT_MCHBAR, 0x00008000)
|
Memory32Fixed (ReadWrite, DEFAULT_MCHBAR, 0x00008000)
|
||||||
Memory32Fixed (ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
Memory32Fixed (ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
||||||
Memory32Fixed (ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
Memory32Fixed (ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
||||||
|
|
|
@ -37,7 +37,7 @@ Device (PDRC)
|
||||||
//})
|
//})
|
||||||
|
|
||||||
Name (PDRS, ResourceTemplate() {
|
Name (PDRS, ResourceTemplate() {
|
||||||
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
||||||
|
|
|
@ -10,7 +10,7 @@ Device (PDRC)
|
||||||
Name (_UID, 1)
|
Name (_UID, 1)
|
||||||
|
|
||||||
Name (PDRS, ResourceTemplate() {
|
Name (PDRS, ResourceTemplate() {
|
||||||
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00008000)
|
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00008000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
||||||
|
|
|
@ -12,7 +12,7 @@ Device (PDRC)
|
||||||
/* This does not seem to work correctly yet - set values statically for now. */
|
/* This does not seem to work correctly yet - set values statically for now. */
|
||||||
|
|
||||||
Name (PDRS, ResourceTemplate() {
|
Name (PDRS, ResourceTemplate() {
|
||||||
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
||||||
|
|
|
@ -10,7 +10,7 @@ Device (PDRC)
|
||||||
Name (_UID, 1)
|
Name (_UID, 1)
|
||||||
|
|
||||||
Name (PDRS, ResourceTemplate() {
|
Name (PDRS, ResourceTemplate() {
|
||||||
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
// Filled by _CRS
|
// Filled by _CRS
|
||||||
Memory32Fixed(ReadWrite, 0, 0x00008000, MCHB)
|
Memory32Fixed(ReadWrite, 0, 0x00008000, MCHB)
|
||||||
Memory32Fixed(ReadWrite, 0, 0x00001000, DMIB)
|
Memory32Fixed(ReadWrite, 0, 0x00001000, DMIB)
|
||||||
|
|
|
@ -10,7 +10,7 @@ Device (PDRC)
|
||||||
Name (_UID, 1)
|
Name (_UID, 1)
|
||||||
|
|
||||||
Name (PDRS, ResourceTemplate() {
|
Name (PDRS, ResourceTemplate() {
|
||||||
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, 0x00004000)
|
Memory32Fixed(ReadWrite, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
Memory32Fixed(ReadWrite, DEFAULT_MCHBAR, 0x00004000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_DMIBAR, 0x00001000)
|
||||||
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
Memory32Fixed(ReadWrite, DEFAULT_EPBAR, 0x00001000)
|
||||||
|
|
|
@ -181,7 +181,7 @@ Scope(\)
|
||||||
|
|
||||||
|
|
||||||
// ICH7 Root Complex Register Block. Memory Mapped through RCBA)
|
// ICH7 Root Complex Register Block. Memory Mapped through RCBA)
|
||||||
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, 0x4000)
|
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Field(RCRB, DWordAcc, Lock, Preserve)
|
Field(RCRB, DWordAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
Offset(0x0000), // Backbone
|
Offset(0x0000), // Backbone
|
||||||
|
|
|
@ -108,6 +108,10 @@ config FIXED_RCBA_MMIO_BASE
|
||||||
hex
|
hex
|
||||||
default 0xfed1c000
|
default 0xfed1c000
|
||||||
|
|
||||||
|
config RCBA_LENGTH
|
||||||
|
hex
|
||||||
|
default 0x4000
|
||||||
|
|
||||||
config FIXED_SMBUS_IO_BASE
|
config FIXED_SMBUS_IO_BASE
|
||||||
hex
|
hex
|
||||||
depends on SOUTHBRIDGE_INTEL_COMMON_SMBUS
|
depends on SOUTHBRIDGE_INTEL_COMMON_SMBUS
|
||||||
|
|
|
@ -110,7 +110,7 @@ Scope(\)
|
||||||
|
|
||||||
|
|
||||||
// ICH7 Root Complex Register Block. Memory Mapped through RCBA)
|
// ICH7 Root Complex Register Block. Memory Mapped through RCBA)
|
||||||
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, 0x4000)
|
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Field(RCRB, DWordAcc, Lock, Preserve)
|
Field(RCRB, DWordAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
// Backbone
|
// Backbone
|
||||||
|
|
|
@ -110,7 +110,7 @@ Scope(\)
|
||||||
|
|
||||||
|
|
||||||
// ICH9 Root Complex Register Block. Memory Mapped through RCBA)
|
// ICH9 Root Complex Register Block. Memory Mapped through RCBA)
|
||||||
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, 0x4000)
|
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Field(RCRB, DWordAcc, Lock, Preserve)
|
Field(RCRB, DWordAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
Offset(0x0000), // Backbone
|
Offset(0x0000), // Backbone
|
||||||
|
|
|
@ -112,7 +112,7 @@ Scope(\)
|
||||||
|
|
||||||
|
|
||||||
// ICH10 Root Complex Register Block. Memory Mapped through RCBA)
|
// ICH10 Root Complex Register Block. Memory Mapped through RCBA)
|
||||||
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, 0x4000)
|
OperationRegion(RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Field(RCRB, DWordAcc, Lock, Preserve)
|
Field(RCRB, DWordAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
Offset(0x0000), // Backbone
|
Offset(0x0000), // Backbone
|
||||||
|
|
|
@ -19,7 +19,7 @@ Scope (\)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Root Complex Register Block
|
// Root Complex Register Block
|
||||||
OperationRegion (RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, 0x4000)
|
OperationRegion (RCRB, SystemMemory, CONFIG_FIXED_RCBA_MMIO_BASE, CONFIG_RCBA_LENGTH)
|
||||||
Field (RCRB, DWordAcc, Lock, Preserve)
|
Field (RCRB, DWordAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
Offset (0x3404), // High Performance Timer Configuration
|
Offset (0x3404), // High Performance Timer Configuration
|
||||||
|
|
|
@ -560,7 +560,7 @@ static void pch_lpc_add_mmio_resources(struct device *dev)
|
||||||
if (CONFIG_FIXED_RCBA_MMIO_BASE < default_decode_base) {
|
if (CONFIG_FIXED_RCBA_MMIO_BASE < default_decode_base) {
|
||||||
res = new_resource(dev, RCBA);
|
res = new_resource(dev, RCBA);
|
||||||
res->base = (resource_t)CONFIG_FIXED_RCBA_MMIO_BASE;
|
res->base = (resource_t)CONFIG_FIXED_RCBA_MMIO_BASE;
|
||||||
res->size = 16 * 1024;
|
res->size = CONFIG_RCBA_LENGTH;
|
||||||
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED |
|
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED |
|
||||||
IORESOURCE_FIXED | IORESOURCE_RESERVE;
|
IORESOURCE_FIXED | IORESOURCE_RESERVE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue