mirror of
https://review.coreboot.org/flashrom.git
synced 2025-10-27 19:32:11 +01:00
nv_sma_spi: Add Nvidia SMA Programmer
Add initial support for System Management Agent (SMA) programmer. SMA is a SOC which is working as a side band management on Nvidia server board. One of its functionality is to flash firmware to other components. Test: 1. Build flashrom with this change. 2. Run operation: erase, write, read 3. All operations completed with expected performance. NV_SMA_SPI has been tested with the following SPI flash models: w25r128jw w25r64jv w25q16v Change-Id: I6b2522788db3dcee2b30faff29f605cede8c0eaf Co-Developed-by: Gilbert Chen <gilbertc@nvidia.com> Co-Developed-by: Willie Thai <wthai@nvidia.com> Signed-off-by: Willie Thai <wthai@nvidia.com> Signed-off-by: Gilbert Chen <gilbertc@nvidia.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/88816 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
committed by
Anastasia Klimchuk
parent
c54d068418
commit
db43ab2989
@@ -118,6 +118,14 @@ int __wrap_libusb_get_config_descriptor(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __wrap_libusb_get_active_config_descriptor(libusb_device *dev, struct libusb_config_descriptor **config)
|
||||
{
|
||||
LOG_ME;
|
||||
if (get_io() && get_io()->libusb_get_config_descriptor)
|
||||
return get_io()->libusb_get_config_descriptor(get_io()->state, dev, 0, config);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __wrap_libusb_free_config_descriptor(struct libusb_config_descriptor *config)
|
||||
{
|
||||
LOG_ME;
|
||||
@@ -155,6 +163,16 @@ int __wrap_libusb_control_transfer(libusb_device_handle *devh, uint8_t bmRequest
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __wrap_libusb_bulk_transfer(libusb_device_handle *devh, unsigned char endpoint,
|
||||
unsigned char *data, int length, int *actual_length, unsigned int timeout)
|
||||
{
|
||||
LOG_ME;
|
||||
if (get_io() && get_io()->libusb_bulk_transfer)
|
||||
return get_io()->libusb_bulk_transfer(get_io()->state, devh, endpoint, data,
|
||||
length, actual_length, timeout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __wrap_libusb_release_interface(libusb_device_handle *devh, int interface_number)
|
||||
{
|
||||
LOG_ME;
|
||||
|
||||
Reference in New Issue
Block a user