soc/intel/baytrail,braswell,quark: Drop RES_IN_KIB
Change-Id: I2360a1a79f07ff8466ed01aa7f180d410e019292 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55926 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
committed by
Felix Held
parent
772ca3cc00
commit
5c3cbcd8cc
@@ -6,21 +6,15 @@
|
||||
#include <soc/iomap.h>
|
||||
#include <soc/ramstage.h>
|
||||
|
||||
#define RES_IN_KIB(r) ((r) >> 10)
|
||||
|
||||
static void nc_read_resources(struct device *dev)
|
||||
{
|
||||
unsigned long base_k;
|
||||
int index = 0;
|
||||
unsigned long size_k;
|
||||
|
||||
/* Read standard PCI resources. */
|
||||
pci_dev_read_resources(dev);
|
||||
|
||||
/* 0 -> 0xa0000 */
|
||||
base_k = 0;
|
||||
size_k = 0xa0000 - base_k;
|
||||
ram_resource_kb(dev, index++, RES_IN_KIB(base_k), RES_IN_KIB(size_k));
|
||||
ram_from_to(dev, index++, 0, 0xa0000);
|
||||
|
||||
/*
|
||||
* Reserve everything between A segment and 1MB:
|
||||
@@ -29,30 +23,18 @@ static void nc_read_resources(struct device *dev)
|
||||
* 0xc0000 - 0xdffff: RAM
|
||||
* 0xe0000 - 0xfffff: ROM shadow
|
||||
*/
|
||||
base_k += size_k;
|
||||
size_k = 0xc0000 - base_k;
|
||||
mmio_resource_kb(dev, index++, RES_IN_KIB(base_k), RES_IN_KIB(size_k));
|
||||
mmio_from_to(dev, index++, 0xa0000, 0xc0000);
|
||||
|
||||
base_k += size_k;
|
||||
size_k = 0x100000 - base_k;
|
||||
reserved_ram_resource_kb(dev, index++, RES_IN_KIB(base_k),
|
||||
RES_IN_KIB(size_k));
|
||||
reserved_ram_from_to(dev, index++, 0xc0000, 1 * MiB);
|
||||
|
||||
/* 0x100000 -> cbmem_top - cacheable and usable */
|
||||
base_k += size_k;
|
||||
size_k = (unsigned long)cbmem_top() - base_k;
|
||||
ram_resource_kb(dev, index++, RES_IN_KIB(base_k), RES_IN_KIB(size_k));
|
||||
ram_from_to(dev, index++, 1 * MiB, (uintptr_t)cbmem_top());
|
||||
|
||||
/* cbmem_top -> 0xc0000000 - reserved */
|
||||
base_k += size_k;
|
||||
size_k = 0xc0000000 - base_k;
|
||||
reserved_ram_resource_kb(dev, index++, RES_IN_KIB(base_k),
|
||||
RES_IN_KIB(size_k));
|
||||
reserved_ram_from_to(dev, index++, (uintptr_t)cbmem_top(), 0xc0000000);
|
||||
|
||||
/* 0xc0000000 -> 4GiB is mmio. */
|
||||
base_k += size_k;
|
||||
size_k = 0x100000000ull - base_k;
|
||||
mmio_resource_kb(dev, index++, RES_IN_KIB(base_k), RES_IN_KIB(size_k));
|
||||
mmio_from_to(dev, index++, 0xc0000000, 4ull * GiB);
|
||||
}
|
||||
|
||||
static struct device_operations nc_ops = {
|
||||
|
Reference in New Issue
Block a user