diff options
Diffstat (limited to 'drivers/staging/westbridge/astoria/include/linux/westbridge')
4 files changed, 107 insertions, 12 deletions
diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashal.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashal.h index b695ba1..3f46201 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashal.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyashal.h @@ -91,13 +91,27 @@ #endif /*****************************/ +#ifdef CONFIG_MACH_C110_WESTBRIDGE_AST_PNAND_HAL + + #ifdef CY_HAL_DEFINED + #error only one HAL layer can be defined + #endif + + #define CY_HAL_DEFINED +/* moved to staging location, eventual implementation + * considered is here + * #include mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h> +*/ + #include "../../../arch/arm/plat-c110/include/mach/westbridge/westbridge-c110-pnand-hal/cyashalc110_pnand.h" + +#endif + /******/ #ifdef __CY_ASTORIA_CUSTOMER_HAL__ #ifdef CY_HAL_DEFINED #error only one HAL layer can be defined #endif -br #define CY_HAL_DEFINED #include "cyashal_customer.h" diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h index df7c2b6..ad60de7 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h @@ -255,6 +255,8 @@ typedef enum cy_as_funct_c_b_type { CY_FUNCT_CB_STOR_GETTRANSFERAMOUNT, /* Data from a CyAsStorageErase call. */ CY_FUNCT_CB_STOR_ERASE, + /* Data from a CyAsStorageStorChangeSDFrequency call. */ + CY_FUNCT_CB_STOR_CHANGE_SD_FREQ, /* Data from a CyAsStorageCancelAsync call. */ CY_FUNCT_CB_ABORT_P2S_XFER, /* Data from a CyAsUsbStart call. */ @@ -516,7 +518,7 @@ typedef struct cy_as_get_firmware_version_data { EXTERN cy_as_return_status_t cy_as_misc_create_device( /* Return value for handle to created device */ - cy_as_device_handle *handle_p, + cy_as_device_handle * handle_p, /* The HAL specific tag for this device */ cy_as_hal_device_tag tag ); @@ -575,7 +577,7 @@ cy_as_misc_configure_device( /* Handle to the device to configure */ cy_as_device_handle handle, /* Configuration information */ - cy_as_device_config *config_p + cy_as_device_config * config_p ); /* Summary @@ -678,7 +680,7 @@ cy_as_misc_get_firmware_version( /* Handle to the device to configure */ cy_as_device_handle handle, /* Return values indicating the firmware version. */ - cy_as_get_firmware_version_data *data, + cy_as_get_firmware_version_data * data, /* Callback to call when the operation is complete. */ cy_as_function_callback cb, /* Client data to be passed to the callback. */ @@ -857,7 +859,7 @@ cy_as_misc_acquire_resource( /* Handle to the device to configure */ cy_as_device_handle handle, /* The resource to acquire */ - cy_as_resource_type *resource, + cy_as_resource_type * resource, /* If true, force West Bridge to release the resource */ cy_bool force, /* Callback to call when the operation is complete. */ diff --git a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h index 773b645..ab4d660 100644 --- a/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h +++ b/drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h @@ -955,6 +955,7 @@ * CY_RQT_SDIO_RESUME * CY_RQT_SDIO_RESET_DEV * CY_RQT_P2S_DMA_START + * CY_RQT_CHANGE_SD_FREQ */ #ifndef __doxygen__ #define CY_RQT_STORAGE_RQT_CONTEXT (2) @@ -1946,6 +1947,34 @@ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS */ #define CY_RQT_P2S_DMA_START (35) +#if defined(CONFIG_MACH_U1_NA_SPR) || defined(CONFIG_MACH_U1_NA_USCC) +/* Summary + Changes the operating frequency of the SD card dynamically. + + Direction + P Port Processor -> West Bridge + + Length (in transfers) + 1 + + MailBox0 + * Context = 2 + * Request code = 36 + + D0 + Bits 12 - 15 : Bus number + Bits 8 - 11 : Device number + Bits 0 - 7 : Not used + + D1 + Bits 7 - 0 : Clock source setting + Bits 15 - 8 : Clock divider setting + + Responses + * CY_RESP_SUCCESS_FAILURE + */ +#define CY_RQT_CHANGE_SD_FREQ (36) +#endif /******************************************************/ 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" |