mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
parallel.c: Consoldiate parallel master registration logic
This is analogous to spi.c and opaque.c however parallel logic was previously never consoldiated. This free's up flashrom.c from namespace pollution. BUG=b:242246291 TEST=builds with both make and meson. Change-Id: Ie08e2e6c51ccef5281386bf7e3df439b91573974 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66651 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:

committed by
Edward O'Callaghan

parent
16744f9e96
commit
8f9e910eb3
41
flashrom.c
41
flashrom.c
@ -205,47 +205,6 @@ void programmer_unmap_flash_region(void *virt_addr, size_t len)
|
||||
msg_gspew("%s: unmapped 0x%0*" PRIxPTR "\n", __func__, PRIxPTR_WIDTH, (uintptr_t)virt_addr);
|
||||
}
|
||||
|
||||
void chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr)
|
||||
{
|
||||
flash->mst->par.chip_writeb(flash, val, addr);
|
||||
}
|
||||
|
||||
void chip_writew(const struct flashctx *flash, uint16_t val, chipaddr addr)
|
||||
{
|
||||
flash->mst->par.chip_writew(flash, val, addr);
|
||||
}
|
||||
|
||||
void chip_writel(const struct flashctx *flash, uint32_t val, chipaddr addr)
|
||||
{
|
||||
flash->mst->par.chip_writel(flash, val, addr);
|
||||
}
|
||||
|
||||
void chip_writen(const struct flashctx *flash, const uint8_t *buf, chipaddr addr, size_t len)
|
||||
{
|
||||
flash->mst->par.chip_writen(flash, buf, addr, len);
|
||||
}
|
||||
|
||||
uint8_t chip_readb(const struct flashctx *flash, const chipaddr addr)
|
||||
{
|
||||
return flash->mst->par.chip_readb(flash, addr);
|
||||
}
|
||||
|
||||
uint16_t chip_readw(const struct flashctx *flash, const chipaddr addr)
|
||||
{
|
||||
return flash->mst->par.chip_readw(flash, addr);
|
||||
}
|
||||
|
||||
uint32_t chip_readl(const struct flashctx *flash, const chipaddr addr)
|
||||
{
|
||||
return flash->mst->par.chip_readl(flash, addr);
|
||||
}
|
||||
|
||||
void chip_readn(const struct flashctx *flash, uint8_t *buf, chipaddr addr,
|
||||
size_t len)
|
||||
{
|
||||
flash->mst->par.chip_readn(flash, buf, addr, len);
|
||||
}
|
||||
|
||||
void programmer_delay(unsigned int usecs)
|
||||
{
|
||||
if (usecs > 0)
|
||||
|
Reference in New Issue
Block a user