aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h')
-rw-r--r--drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h64
1 files changed, 57 insertions, 7 deletions
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h
index 52b93c3..6e3d4a8 100644
--- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h
+++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h
@@ -1219,7 +1219,7 @@ cy_as_storage_query_device(
/* Handle to the device of interest */
cy_as_device_handle handle,
/* Parameters and return value for the query call */
- cy_as_storage_query_device_data *data,
+ cy_as_storage_query_device_data * data,
/* Callback to be called when the operation is complete */
cy_as_function_callback cb,
/* Client data to be passed to the callback */
@@ -1288,7 +1288,7 @@ cy_as_storage_query_unit(
to be instructed to disable the card detect feature. Also, if
the hardware design does not use the SD_WP GPIO of the West
Bridge to handle SD card's write protect notch, the handling
- of write protection if firmware should be disabled. This API
+ of write protection if firmware should be disabled. This AP
is used to enable/disable the card detect and write protect
support in West Bridge firmware.
@@ -1432,7 +1432,7 @@ cy_as_storage_read(
Notes
If the Samsung CEATA drive is the target for a read/write
operation, the maximum
- number of sectors that can be accessed through a single API
+ number of sectors that can be accessed through a single AP
call is limited to 2047.
Longer accesses addressed to a Samsung CEATA drive can
result in time-out errors.
@@ -1585,7 +1585,7 @@ cy_as_storage_write(
Notes
If the Samsung CEATA drive is the target for a read/write
operation, the maximum
- number of sectors that can be accessed through a single API
+ number of sectors that can be accessed through a single AP
call is limited to 2047.
Longer accesses addressed to a Samsung CEATA drive can
result in time-out errors.
@@ -1887,7 +1887,7 @@ cy_as_storage_get_transfer_amount(
/* Device number of interest */
uint32_t device,
/* Return value containing read/write sector counts. */
- cy_as_m_s_c_progress_data *data_p,
+ cy_as_m_s_c_progress_data * data_p,
/* Callback in case of async call */
cy_as_function_callback cb,
/* Client context to pass to the callback */
@@ -2059,7 +2059,7 @@ cy_as_sdio_query_card(
/* Device number */
uint32_t device,
/* Buffer to store card properties */
- cy_as_sdio_card *data_p
+ cy_as_sdio_card * data_p
);
/* Summary
@@ -2534,7 +2534,7 @@ cy_as_sdio_query_function(
/* IO function Number */
uint8_t n_function_no,
/* Buffer to store function properties */
- cy_as_sdio_func *data_p
+ cy_as_sdio_func * data_p
);
/* Summary
@@ -2749,7 +2749,57 @@ cy_as_sdio_resume(
uint8_t *data_p
);
+/* Summary
+ Change the operating clock frequency on the SD port.
+
+ Description
+ This function is used to dynamically change the operating clock
+ frequency on the SD/MMC port(s) of the West Bridge device. This
+ function should only be used in consultation with Cypress support,
+ as setting random clock values can cause errors.
+
+ The device firmware does not remember the clock value specified,
+ and will only make an instantaneous change to the frequency. If
+ the SD/MMC card has to be re-initialized due to a remove/insert
+ event or due to an access error, the frequency will be changed
+ back to the default value.
+ * Valid in Asynchronous Callback: Yes
+ * Valid on Antioch device: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not
+ been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded
+ into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been
+ started
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the
+ West Bridge device
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from
+ the firmware
+*/
+cy_as_return_status_t
+cy_as_storage_change_sd_frequency (
+ /* Handle to the West Bridge device. */
+ cy_as_device_handle handle,
+ /* Target bus number on which to make the change. */
+ cy_as_bus_number_t bus,
+ /* Clock source setting (can be 0x03, 0x01 or 0x11). */
+ uint8_t clk_source,
+ /* Factor by which to divide the source clock. The caller
+ should make sure that the effective clock speed is
+ greater than or equal to 5 MHz. */
+ uint8_t clk_divider,
+ /* Callback function to call on completion. */
+ cy_as_function_callback cb,
+ /* Client data to send to the callback. */
+ uint32_t client
+ );
/* For supporting deprecated functions */
#include "cyasstorage_dep.h"