[Skiboot] [PATCH 1/3 v2] core/flash: Add flash API
Stewart Smith
stewart at linux.vnet.ibm.com
Wed Feb 18 11:50:30 AEDT 2015
Jeremy Kerr <jk at ozlabs.org> writes:
> +enum flash_op {
> + FLASH_OP_READ,
> + FLASH_OP_WRITE,
> + FLASH_OP_ERASE,
> +};
> +
> +static int64_t opal_flash_op(uint64_t id, uint64_t offset, uint64_t buf,
> + uint64_t size, uint64_t token, enum flash_op op)
> +{
<snip>
> +static int64_t opal_flash_read(uint64_t id, uint64_t offset, uint64_t buf,
> + uint64_t size, uint64_t token)
> +{
> + return opal_flash_op(FLASH_OP_READ, id, offset, buf, size, token);
> +}
> +
> +static int64_t opal_flash_write(uint64_t id, uint64_t offset, uint64_t buf,
> + uint64_t size, uint64_t token)
> +{
> + return opal_flash_op(FLASH_OP_WRITE, id, offset, buf, size, token);
> +}
> +
> +static int64_t opal_flash_erase(uint64_t id, uint64_t offset, uint64_t size,
> + uint64_t token)
> +{
> + return opal_flash_op(FLASH_OP_ERASE, id, offset, 0L, size, token);
> +}
> +
(as mentioned on IRC) - it looks like FLASH_OP_X is in the wrong place,
so awaiting v2 of patch :)
More information about the Skiboot
mailing list