sconfig: Add a new mmio resource type
Add support for a mmio resource in the devicetree to allow memory-mapped IO addresses to be assigned to given values. AMD platforms perform a significant amount of configuration through these MMIO addresses, including I2C bus configuration. BUG=b:72121803 Change-Id: I5608721c22c1b229f527815b5f17fff3a080c3c8 Signed-off-by: Justin TerAvest <teravest@chromium.org> Reviewed-on: https://review.coreboot.org/23319 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
4eaf0fa155
commit
ca2ed9f450
9 changed files with 226 additions and 211 deletions
|
|
@ -257,6 +257,7 @@ u32 dev_path_encode(struct device *dev)
|
|||
ret |= dev->path.spi.cs;
|
||||
break;
|
||||
case DEVICE_PATH_NONE:
|
||||
case DEVICE_PATH_MMIO: /* don't care */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -332,6 +333,10 @@ const char *dev_path(struct device *dev)
|
|||
snprintf(buffer, sizeof (buffer), "SPI: %02x",
|
||||
dev->path.spi.cs);
|
||||
break;
|
||||
case DEVICE_PATH_MMIO:
|
||||
snprintf(buffer, sizeof (buffer), "MMIO: %08x",
|
||||
dev->path.mmio.addr);
|
||||
break;
|
||||
default:
|
||||
printk(BIOS_ERR, "Unknown device path type: %d\n",
|
||||
dev->path.type);
|
||||
|
|
@ -406,6 +411,9 @@ int path_eq(struct device_path *path1, struct device_path *path2)
|
|||
case DEVICE_PATH_SPI:
|
||||
equal = (path1->spi.cs == path2->spi.cs);
|
||||
break;
|
||||
case DEVICE_PATH_MMIO:
|
||||
equal = (path1->mmio.addr == path2->mmio.addr);
|
||||
break;
|
||||
default:
|
||||
printk(BIOS_ERR, "Unknown device type: %d\n", path1->type);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue