Commit d19cf32f authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

Staging: sep: indent pass

Ok time to indent and get the code in vague shape. No other changes in this
patch.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 46eb5a13
...@@ -66,15 +66,15 @@ struct sep_device { ...@@ -66,15 +66,15 @@ struct sep_device {
/* counter for the messages from sep */ /* counter for the messages from sep */
unsigned long sep_to_host_reply_counter; unsigned long sep_to_host_reply_counter;
/* counter for the number of bytes allocated in the pool for the current /* counter for the number of bytes allocated in the pool for the current
transaction */ transaction */
unsigned long data_pool_bytes_allocated; unsigned long data_pool_bytes_allocated;
/* array of pointers to the pages that represent input data for the synchronic /* array of pointers to the pages that represent input data for the synchronic
DMA action */ DMA action */
struct page **in_page_array; struct page **in_page_array;
/* array of pointers to the pages that represent out data for the synchronic /* array of pointers to the pages that represent out data for the synchronic
DMA action */ DMA action */
struct page **out_page_array; struct page **out_page_array;
/* number of pages in the sep_in_page_array */ /* number of pages in the sep_in_page_array */
...@@ -121,9 +121,8 @@ static inline void sep_wait_sram_write(struct sep_device *dev) ...@@ -121,9 +121,8 @@ static inline void sep_wait_sram_write(struct sep_device *dev)
u32 reg_val; u32 reg_val;
do do
reg_val = sep_read_reg(dev, HW_SRAM_DATA_READY_REG_ADDR); reg_val = sep_read_reg(dev, HW_SRAM_DATA_READY_REG_ADDR);
while(!(reg_val & 1)); while (!(reg_val & 1));
} }
#endif #endif
...@@ -106,11 +106,11 @@ ...@@ -106,11 +106,11 @@
init command struct init command struct
*/ */
struct sep_driver_init_t { struct sep_driver_init_t {
/* start of the 1G of the host memory address that SEP can access */ /* start of the 1G of the host memory address that SEP can access */
unsigned long message_addr; unsigned long message_addr;
/* start address of resident */ /* start address of resident */
unsigned long message_size_in_words; unsigned long message_size_in_words;
}; };
...@@ -119,168 +119,168 @@ struct sep_driver_init_t { ...@@ -119,168 +119,168 @@ struct sep_driver_init_t {
realloc cache resident command realloc cache resident command
*/ */
struct sep_driver_realloc_cache_resident_t { struct sep_driver_realloc_cache_resident_t {
/* base address */ /* base address */
unsigned long base_addr; unsigned long base_addr;
/* current cache address */ /* current cache address */
unsigned long cache_addr; unsigned long cache_addr;
/* cache size in bytes*/ /* cache size in bytes */
unsigned long cache_size_in_bytes; unsigned long cache_size_in_bytes;
/* current resident address */ /* current resident address */
unsigned long resident_addr; unsigned long resident_addr;
/* resident size in bytes*/ /* resident size in bytes */
unsigned long resident_size_in_bytes; unsigned long resident_size_in_bytes;
/* new cache address */ /* new cache address */
unsigned long new_cache_addr; unsigned long new_cache_addr;
/* new resident address */ /* new resident address */
unsigned long new_resident_addr; unsigned long new_resident_addr;
/* new resident address */ /* new resident address */
unsigned long new_shared_area_addr; unsigned long new_shared_area_addr;
/* new base address */ /* new base address */
unsigned long new_base_addr; unsigned long new_base_addr;
}; };
/* /*
set api mode command struct set api mode command struct
*/ */
struct sep_driver_set_api_mode_t { struct sep_driver_set_api_mode_t {
/* mode to set - 1 - blocking, 0 - non-blocking */ /* mode to set - 1 - blocking, 0 - non-blocking */
unsigned long mode; unsigned long mode;
}; };
struct sep_driver_alloc_t { struct sep_driver_alloc_t {
/* virtual address of allocated space */ /* virtual address of allocated space */
unsigned long offset; unsigned long offset;
/* physical address of allocated space */ /* physical address of allocated space */
unsigned long phys_address; unsigned long phys_address;
/* number of bytes to allocate */ /* number of bytes to allocate */
unsigned long num_bytes; unsigned long num_bytes;
}; };
/* /*
*/ */
struct sep_driver_write_t { struct sep_driver_write_t {
/* application space address */ /* application space address */
unsigned long app_address; unsigned long app_address;
/* address of the data pool */ /* address of the data pool */
unsigned long datapool_address; unsigned long datapool_address;
/* number of bytes to write */ /* number of bytes to write */
unsigned long num_bytes; unsigned long num_bytes;
}; };
/* /*
*/ */
struct sep_driver_read_t { struct sep_driver_read_t {
/* application space address */ /* application space address */
unsigned long app_address; unsigned long app_address;
/* address of the data pool */ /* address of the data pool */
unsigned long datapool_address; unsigned long datapool_address;
/* number of bytes to read */ /* number of bytes to read */
unsigned long num_bytes; unsigned long num_bytes;
}; };
/* /*
*/ */
struct sep_driver_build_sync_table_t { struct sep_driver_build_sync_table_t {
/* address value of the data in */ /* address value of the data in */
unsigned long app_in_address; unsigned long app_in_address;
/* size of data in */ /* size of data in */
unsigned long data_in_size; unsigned long data_in_size;
/* address of the data out */ /* address of the data out */
unsigned long app_out_address; unsigned long app_out_address;
/* the size of the block of the operation - if needed, /* the size of the block of the operation - if needed,
every table will be modulo this parameter */ every table will be modulo this parameter */
unsigned long block_size; unsigned long block_size;
/* the physical address of the first input DMA table */ /* the physical address of the first input DMA table */
unsigned long in_table_address; unsigned long in_table_address;
/* number of entries in the first input DMA table */ /* number of entries in the first input DMA table */
unsigned long in_table_num_entries; unsigned long in_table_num_entries;
/* the physical address of the first output DMA table */ /* the physical address of the first output DMA table */
unsigned long out_table_address; unsigned long out_table_address;
/* number of entries in the first output DMA table */ /* number of entries in the first output DMA table */
unsigned long out_table_num_entries; unsigned long out_table_num_entries;
/* data in the first input table */ /* data in the first input table */
unsigned long table_data_size; unsigned long table_data_size;
/* distinct user/kernel layout */ /* distinct user/kernel layout */
bool isKernelVirtualAddress; bool isKernelVirtualAddress;
}; };
/* /*
*/ */
struct sep_driver_build_flow_table_t { struct sep_driver_build_flow_table_t {
/* flow type */ /* flow type */
unsigned long flow_type; unsigned long flow_type;
/* flag for input output */ /* flag for input output */
unsigned long input_output_flag; unsigned long input_output_flag;
/* address value of the data in */ /* address value of the data in */
unsigned long virt_buff_data_addr; unsigned long virt_buff_data_addr;
/* size of data in */ /* size of data in */
unsigned long num_virtual_buffers; unsigned long num_virtual_buffers;
/* the physical address of the first input DMA table */ /* the physical address of the first input DMA table */
unsigned long first_table_addr; unsigned long first_table_addr;
/* number of entries in the first input DMA table */ /* number of entries in the first input DMA table */
unsigned long first_table_num_entries; unsigned long first_table_num_entries;
/* data in the first input table */ /* data in the first input table */
unsigned long first_table_data_size; unsigned long first_table_data_size;
/* distinct user/kernel layout */ /* distinct user/kernel layout */
bool isKernelVirtualAddress; bool isKernelVirtualAddress;
}; };
struct sep_driver_add_flow_table_t { struct sep_driver_add_flow_table_t {
/* flow id */ /* flow id */
unsigned long flow_id; unsigned long flow_id;
/* flag for input output */ /* flag for input output */
unsigned long inputOutputFlag; unsigned long inputOutputFlag;
/* address value of the data in */ /* address value of the data in */
unsigned long virt_buff_data_addr; unsigned long virt_buff_data_addr;
/* size of data in */ /* size of data in */
unsigned long num_virtual_buffers; unsigned long num_virtual_buffers;
/* address of the first table */ /* address of the first table */
unsigned long first_table_addr; unsigned long first_table_addr;
/* number of entries in the first table */ /* number of entries in the first table */
unsigned long first_table_num_entries; unsigned long first_table_num_entries;
/* data size of the first table */ /* data size of the first table */
unsigned long first_table_data_size; unsigned long first_table_data_size;
/* distinct user/kernel layout */ /* distinct user/kernel layout */
bool isKernelVirtualAddress; bool isKernelVirtualAddress;
}; };
...@@ -288,49 +288,49 @@ struct sep_driver_add_flow_table_t { ...@@ -288,49 +288,49 @@ struct sep_driver_add_flow_table_t {
command struct for set flow id command struct for set flow id
*/ */
struct sep_driver_set_flow_id_t { struct sep_driver_set_flow_id_t {
/* flow id to set */ /* flow id to set */
unsigned long flow_id; unsigned long flow_id;
}; };
/* command struct for add tables message */ /* command struct for add tables message */
struct sep_driver_add_message_t { struct sep_driver_add_message_t {
/* flow id to set */ /* flow id to set */
unsigned long flow_id; unsigned long flow_id;
/* message size in bytes */ /* message size in bytes */
unsigned long message_size_in_bytes; unsigned long message_size_in_bytes;
/* address of the message */ /* address of the message */
unsigned long message_address; unsigned long message_address;
}; };
/* command struct for static pool addresses */ /* command struct for static pool addresses */
struct sep_driver_static_pool_addr_t { struct sep_driver_static_pool_addr_t {
/* physical address of the static pool */ /* physical address of the static pool */
unsigned long physical_static_address; unsigned long physical_static_address;
/* virtual address of the static pool */ /* virtual address of the static pool */
unsigned long virtual_static_address; unsigned long virtual_static_address;
}; };
/* command struct for getiing offset of the physical address from /* command struct for getiing offset of the physical address from
the start of the mapped area */ the start of the mapped area */
struct sep_driver_get_mapped_offset_t { struct sep_driver_get_mapped_offset_t {
/* physical address of the static pool */ /* physical address of the static pool */
unsigned long physical_address; unsigned long physical_address;
/* virtual address of the static pool */ /* virtual address of the static pool */
unsigned long offset; unsigned long offset;
}; };
/* command struct for getting time value and address */ /* command struct for getting time value and address */
struct sep_driver_get_time_t { struct sep_driver_get_time_t {
/* physical address of stored time */ /* physical address of stored time */
unsigned long time_physical_address; unsigned long time_physical_address;
/* value of the stored time */ /* value of the stored time */
unsigned long time_value; unsigned long time_value;
}; };
...@@ -338,34 +338,34 @@ struct sep_driver_get_time_t { ...@@ -338,34 +338,34 @@ struct sep_driver_get_time_t {
structure that represent one entry in the DMA LLI table structure that represent one entry in the DMA LLI table
*/ */
struct sep_lli_entry_t { struct sep_lli_entry_t {
/* physical address */ /* physical address */
unsigned long physical_address; unsigned long physical_address;
/* block size */ /* block size */
unsigned long block_size; unsigned long block_size;
}; };
/* /*
structure that reperesents data needed for lli table construction structure that reperesents data needed for lli table construction
*/ */
struct sep_lli_prepare_table_data_t { struct sep_lli_prepare_table_data_t {
/* pointer to the memory where the first lli entry to be built */ /* pointer to the memory where the first lli entry to be built */
struct sep_lli_entry_t *lli_entry_ptr; struct sep_lli_entry_t *lli_entry_ptr;
/* pointer to the array of lli entries from which the table is to be built */ /* pointer to the array of lli entries from which the table is to be built */
struct sep_lli_entry_t *lli_array_ptr; struct sep_lli_entry_t *lli_array_ptr;
/* number of elements in lli array */ /* number of elements in lli array */
int lli_array_size; int lli_array_size;
/* number of entries in the created table */ /* number of entries in the created table */
int num_table_entries; int num_table_entries;
/* number of array entries processed during table creation */ /* number of array entries processed during table creation */
int num_array_entries_processed; int num_array_entries_processed;
/* the totatl data size in the created table */ /* the totatl data size in the created table */
int lli_table_total_data_size; int lli_table_total_data_size;
}; };
/* /*
...@@ -373,19 +373,19 @@ struct sep_lli_prepare_table_data_t { ...@@ -373,19 +373,19 @@ struct sep_lli_prepare_table_data_t {
to show what table looks like to show what table looks like
*/ */
struct sep_lli_table_t { struct sep_lli_table_t {
/* number of pages mapped in this tables. If 0 - means that the table /* number of pages mapped in this tables. If 0 - means that the table
is not defined (used as a valid flag)*/ is not defined (used as a valid flag) */
unsigned long num_pages; unsigned long num_pages;
/* /*
pointer to array of page pointers that represent the mapping of the pointer to array of page pointers that represent the mapping of the
virtual buffer defined by the table to the physical memory. If this virtual buffer defined by the table to the physical memory. If this
pointer is NULL, it means that the table is not defined pointer is NULL, it means that the table is not defined
(used as a valid flag) (used as a valid flag)
*/ */
struct page **table_page_array_ptr; struct page **table_page_array_ptr;
/* maximum flow entries in table */ /* maximum flow entries in table */
struct sep_lli_entry_t lli_entries[SEP_DRIVER_MAX_FLOW_NUM_ENTRIES_IN_TABLE]; struct sep_lli_entry_t lli_entries[SEP_DRIVER_MAX_FLOW_NUM_ENTRIES_IN_TABLE];
}; };
...@@ -393,61 +393,61 @@ struct sep_lli_table_t { ...@@ -393,61 +393,61 @@ struct sep_lli_table_t {
structure for keeping the mapping of the virtual buffer into physical pages structure for keeping the mapping of the virtual buffer into physical pages
*/ */
struct sep_flow_buffer_data { struct sep_flow_buffer_data {
/* pointer to the array of page structs pointers to the pages of the /* pointer to the array of page structs pointers to the pages of the
virtual buffer */ virtual buffer */
struct page **page_array_ptr; struct page **page_array_ptr;
/* number of pages taken by the virtual buffer */ /* number of pages taken by the virtual buffer */
unsigned long num_pages; unsigned long num_pages;
/* this flag signals if this page_array is the last one among many that were /* this flag signals if this page_array is the last one among many that were
sent in one setting to SEP */ sent in one setting to SEP */
unsigned long last_page_array_flag; unsigned long last_page_array_flag;
}; };
/* /*
struct that keeps all the data for one flow struct that keeps all the data for one flow
*/ */
struct sep_flow_context_t { struct sep_flow_context_t {
/* /*
work struct for handling the flow done interrupt in the workqueue work struct for handling the flow done interrupt in the workqueue
this structure must be in the first place, since it will be used this structure must be in the first place, since it will be used
forcasting to the containing flow context forcasting to the containing flow context
*/ */
struct work_struct flow_wq; struct work_struct flow_wq;
/* flow id */ /* flow id */
unsigned long flow_id; unsigned long flow_id;
/* additional input tables exists */ /* additional input tables exists */
unsigned long input_tables_flag; unsigned long input_tables_flag;
/* additional output tables exists */ /* additional output tables exists */
unsigned long output_tables_flag; unsigned long output_tables_flag;
/* data of the first input file */ /* data of the first input file */
struct sep_lli_entry_t first_input_table; struct sep_lli_entry_t first_input_table;
/* data of the first output table */ /* data of the first output table */
struct sep_lli_entry_t first_output_table; struct sep_lli_entry_t first_output_table;
/* last input table data */ /* last input table data */
struct sep_lli_entry_t last_input_table; struct sep_lli_entry_t last_input_table;
/* last output table data */ /* last output table data */
struct sep_lli_entry_t last_output_table; struct sep_lli_entry_t last_output_table;
/* first list of table */ /* first list of table */
struct sep_lli_entry_t input_tables_in_process; struct sep_lli_entry_t input_tables_in_process;
/* output table in process (in sep) */ /* output table in process (in sep) */
struct sep_lli_entry_t output_tables_in_process; struct sep_lli_entry_t output_tables_in_process;
/* size of messages in bytes */ /* size of messages in bytes */
unsigned long message_size_in_bytes; unsigned long message_size_in_bytes;
/* message */ /* message */
unsigned char message[SEP_MAX_ADD_MESSAGE_LENGTH_IN_BYTES]; unsigned char message[SEP_MAX_ADD_MESSAGE_LENGTH_IN_BYTES];
}; };
...@@ -478,54 +478,35 @@ void sep_send_msg_rdy_cmd(void); ...@@ -478,54 +478,35 @@ void sep_send_msg_rdy_cmd(void);
This function releases all the application virtual This function releases all the application virtual
buffer physical pages, that were previously locked buffer physical pages, that were previously locked
*/ */
int sep_free_dma_pages(struct page **page_array_ptr, int sep_free_dma_pages(struct page **page_array_ptr, unsigned long num_pages, unsigned long dirtyFlag);
unsigned long num_pages,
unsigned long dirtyFlag);
/* /*
This function creates the input and output dma tables for This function creates the input and output dma tables for
symmetric operations (AES/DES) according to the block size symmetric operations (AES/DES) according to the block size
from LLI arays from LLI arays
*/ */
int sep_construct_dma_tables_from_lli( int sep_construct_dma_tables_from_lli(struct sep_lli_entry_t *lli_in_array,
struct sep_lli_entry_t *lli_in_array, unsigned long sep_in_lli_entries,
unsigned long sep_in_lli_entries, struct sep_lli_entry_t *lli_out_array,
struct sep_lli_entry_t *lli_out_array, unsigned long sep_out_lli_entries,
unsigned long sep_out_lli_entries, unsigned long block_size, unsigned long *lli_table_in_ptr, unsigned long *lli_table_out_ptr, unsigned long *in_num_entries_ptr, unsigned long *out_num_entries_ptr, unsigned long *table_data_size_ptr);
unsigned long block_size,
unsigned long *lli_table_in_ptr,
unsigned long *lli_table_out_ptr,
unsigned long *in_num_entries_ptr,
unsigned long *out_num_entries_ptr,
unsigned long *table_data_size_ptr);
/* /*
This function builds input and output DMA tables for synhronic symmetric This function builds input and output DMA tables for synhronic symmetric
operations (AES, DES) It also checks that each table is of the modular operations (AES, DES) It also checks that each table is of the modular
block size block size
*/ */
int sep_prepare_input_output_dma_table(unsigned long app_virt_in_addr, int sep_prepare_input_output_dma_table(unsigned long app_virt_in_addr,
unsigned long app_virt_out_addr, unsigned long app_virt_out_addr,
unsigned long data_size, unsigned long data_size,
unsigned long block_size, unsigned long block_size,
unsigned long *lli_table_in_ptr, unsigned long *lli_table_in_ptr, unsigned long *lli_table_out_ptr, unsigned long *in_num_entries_ptr, unsigned long *out_num_entries_ptr, unsigned long *table_data_size_ptr, bool isKernelVirtualAddress);
unsigned long *lli_table_out_ptr,
unsigned long *in_num_entries_ptr,
unsigned long *out_num_entries_ptr,
unsigned long *table_data_size_ptr,
bool isKernelVirtualAddress);
/* /*
This function prepares only input DMA table for synhronic symmetric This function prepares only input DMA table for synhronic symmetric
operations (HASH) operations (HASH)
*/ */
int sep_prepare_input_dma_table(unsigned long app_virt_addr, int sep_prepare_input_dma_table(unsigned long app_virt_addr, unsigned long data_size, unsigned long block_size, unsigned long *lli_table_ptr, unsigned long *num_entries_ptr, unsigned long *table_data_size_ptr, bool isKernelVirtualAddress);
unsigned long data_size,
unsigned long block_size,
unsigned long *lli_table_ptr,
unsigned long *num_entries_ptr,
unsigned long *table_data_size_ptr,
bool isKernelVirtualAddress);
/* this functions frees all the resources that were allocated for the building /* this functions frees all the resources that were allocated for the building
of the LLI DMA tables */ of the LLI DMA tables */
......
...@@ -51,12 +51,7 @@ This functions copies the cache and resident from their source location into ...@@ -51,12 +51,7 @@ This functions copies the cache and resident from their source location into
destination memory, which is external to Linux VM and is given as physical destination memory, which is external to Linux VM and is given as physical
address address
*/ */
int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, unsigned long cache_size_in_bytes, unsigned long src_resident_addr, unsigned long resident_size_in_bytes, unsigned long *dst_new_cache_addr_ptr, unsigned long *dst_new_resident_addr_ptr);
unsigned long cache_size_in_bytes,
unsigned long src_resident_addr,
unsigned long resident_size_in_bytes,
unsigned long *dst_new_cache_addr_ptr,
unsigned long *dst_new_resident_addr_ptr);
/* /*
This functions maps and allocates the shared area on the external This functions maps and allocates the shared area on the external
...@@ -65,9 +60,7 @@ to allocate. The outputs are kernel_shared_area_addr_ptr - the kerenl ...@@ -65,9 +60,7 @@ to allocate. The outputs are kernel_shared_area_addr_ptr - the kerenl
address of the mapped and allocated shared area, and address of the mapped and allocated shared area, and
phys_shared_area_addr_ptr - the physical address of the shared area phys_shared_area_addr_ptr - the physical address of the shared area
*/ */
int sep_map_and_alloc_shared_area(unsigned long shared_area_size, int sep_map_and_alloc_shared_area(unsigned long shared_area_size, unsigned long *kernel_shared_area_addr_ptr, unsigned long *phys_shared_area_addr_ptr);
unsigned long *kernel_shared_area_addr_ptr,
unsigned long *phys_shared_area_addr_ptr);
/* /*
This functions unmaps and deallocates the shared area on the external This functions unmaps and deallocates the shared area on the external
...@@ -76,9 +69,7 @@ deallocate,kernel_shared_area_addr_ptr - the kernel address of the ...@@ -76,9 +69,7 @@ deallocate,kernel_shared_area_addr_ptr - the kernel address of the
mapped and allocated shared area,phys_shared_area_addr_ptr - the physical mapped and allocated shared area,phys_shared_area_addr_ptr - the physical
address of the shared area address of the shared area
*/ */
void sep_unmap_and_free_shared_area(unsigned long shared_area_size, void sep_unmap_and_free_shared_area(unsigned long shared_area_size, unsigned long kernel_shared_area_addr, unsigned long phys_shared_area_addr);
unsigned long kernel_shared_area_addr,
unsigned long phys_shared_area_addr);
/* /*
......
...@@ -229,4 +229,4 @@ ...@@ -229,4 +229,4 @@
#define HW_CLR_SRAM_BUSY_REG_REG_ADDR 0x0F0CUL #define HW_CLR_SRAM_BUSY_REG_REG_ADDR 0x0F0CUL
#define HW_CC_SRAM_BASE_ADDRESS 0x5800UL #define HW_CC_SRAM_BASE_ADDRESS 0x5800UL
#endif /* ifndef HW_DEFS */ #endif /* ifndef HW_DEFS */
...@@ -85,12 +85,12 @@ static unsigned long CRYS_SEP_ROM[] = { ...@@ -85,12 +85,12 @@ static unsigned long CRYS_SEP_ROM[] = {
/* 2M size */ /* 2M size */
#endif /* SEP_DRIVER_ARM_DEBUG_MODE */ #endif /* SEP_DRIVER_ARM_DEBUG_MODE */
#define BASE_ADDRESS_FOR_SYSTEM 0xfffc0000 #define BASE_ADDRESS_FOR_SYSTEM 0xfffc0000
#define SEP_RAR_IO_MEM_REGION_SIZE 0x40000 #define SEP_RAR_IO_MEM_REGION_SIZE 0x40000
irqreturn_t sep_inthandler(int irq , void* dev_id); irqreturn_t sep_inthandler(int irq, void *dev_id);
/* Keep this a single static object for now to keep the conversion easy */ /* Keep this a single static object for now to keep the conversion easy */
...@@ -107,12 +107,11 @@ unsigned long jiffies_future; ...@@ -107,12 +107,11 @@ unsigned long jiffies_future;
/* /*
function that is activated on the succesfull probe of the SEP device function that is activated on the succesfull probe of the SEP device
*/ */
static int __devinit sep_probe(struct pci_dev *pdev, static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
const struct pci_device_id *ent);
static struct pci_device_id sep_pci_id_tbl[] = { static struct pci_device_id sep_pci_id_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x080c) }, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x080c)},
{ 0 } {0}
}; };
MODULE_DEVICE_TABLE(pci, sep_pci_id_tbl); MODULE_DEVICE_TABLE(pci, sep_pci_id_tbl);
...@@ -141,12 +140,7 @@ void sep_lock_cache_resident_area(void) ...@@ -141,12 +140,7 @@ void sep_lock_cache_resident_area(void)
destination memory, which is external to Linux VM and is given as destination memory, which is external to Linux VM and is given as
physical address physical address
*/ */
int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, unsigned long cache_size_in_bytes, unsigned long src_resident_addr, unsigned long resident_size_in_bytes, unsigned long *dst_new_cache_addr_ptr, unsigned long *dst_new_resident_addr_ptr)
unsigned long cache_size_in_bytes,
unsigned long src_resident_addr,
unsigned long resident_size_in_bytes,
unsigned long *dst_new_cache_addr_ptr,
unsigned long *dst_new_resident_addr_ptr)
{ {
/* resident address in user space */ /* resident address in user space */
unsigned long resident_addr; unsigned long resident_addr;
...@@ -157,7 +151,7 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, ...@@ -157,7 +151,7 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr,
const struct firmware *fw; const struct firmware *fw;
char *cache_name = "cache.image.bin"; char *cache_name = "cache.image.bin";
char *res_name = "resident.image.bin"; char *res_name = "resident.image.bin";
/* error */ /* error */
int error; int error;
...@@ -167,14 +161,10 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, ...@@ -167,14 +161,10 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr,
-------------------------------------*/ -------------------------------------*/
error = 0; error = 0;
edbg( edbg("SEP Driver:rar_virtual is %p\n", sep_dev->rar_virtual_address);
"SEP Driver:rar_virtual is %p\n", edbg("SEP Driver:rar_physical is %08lx\n", sep_dev->rar_physical_address);
sep_dev->rar_virtual_address);
edbg(
"SEP Driver:rar_physical is %08lx\n",
sep_dev->rar_physical_address);
sep_dev->rar_region_addr = (unsigned long)sep_dev->rar_virtual_address; sep_dev->rar_region_addr = (unsigned long) sep_dev->rar_virtual_address;
sep_dev->cache_physical_address = sep_dev->rar_physical_address; sep_dev->cache_physical_address = sep_dev->rar_physical_address;
sep_dev->cache_virtual_address = sep_dev->rar_virtual_address; sep_dev->cache_virtual_address = sep_dev->rar_virtual_address;
...@@ -182,72 +172,50 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, ...@@ -182,72 +172,50 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr,
/* load cache */ /* load cache */
error = request_firmware(&fw, cache_name, &sep_dev->sep_pci_dev_ptr->dev); error = request_firmware(&fw, cache_name, &sep_dev->sep_pci_dev_ptr->dev);
if (error) { if (error) {
edbg( edbg("SEP Driver:cant request cache fw\n");
"SEP Driver:cant request cache fw\n");
goto end_function; goto end_function;
} }
edbg( edbg("SEP Driver:cache data loc is %p\n", (void *) fw->data);
"SEP Driver:cache data loc is %p\n", edbg("SEP Driver:cache data size is %08Zx\n", fw->size);
(void *)fw->data);
edbg(
"SEP Driver:cache data size is %08Zx\n",
fw->size);
memcpy((void *)sep_dev->cache_virtual_address, (void *)fw->data, fw->size); memcpy((void *) sep_dev->cache_virtual_address, (void *) fw->data, fw->size);
sep_dev->cache_size = fw->size; sep_dev->cache_size = fw->size;
cache_addr = (unsigned long)sep_dev->cache_virtual_address; cache_addr = (unsigned long) sep_dev->cache_virtual_address;
release_firmware(fw); release_firmware(fw);
sep_dev->resident_physical_address = sep_dev->cache_physical_address sep_dev->resident_physical_address = sep_dev->cache_physical_address + sep_dev->cache_size;
+ sep_dev->cache_size; sep_dev->resident_virtual_address = sep_dev->cache_virtual_address + sep_dev->cache_size;
sep_dev->resident_virtual_address = sep_dev->cache_virtual_address
+ sep_dev->cache_size;
/* load resident */ /* load resident */
error = request_firmware(&fw, res_name, &sep_dev->sep_pci_dev_ptr->dev); error = request_firmware(&fw, res_name, &sep_dev->sep_pci_dev_ptr->dev);
if (error) { if (error) {
edbg( edbg("SEP Driver:cant request res fw\n");
"SEP Driver:cant request res fw\n");
goto end_function; goto end_function;
} }
edbg( edbg("SEP Driver:res data loc is %p\n", (void *) fw->data);
"SEP Driver:res data loc is %p\n", edbg("SEP Driver:res data size is %08Zx\n", fw->size);
(void *)fw->data);
edbg(
"SEP Driver:res data size is %08Zx\n",
fw->size);
memcpy((void *)sep_dev->resident_virtual_address, (void *)fw->data, fw->size); memcpy((void *) sep_dev->resident_virtual_address, (void *) fw->data, fw->size);
sep_dev->resident_size = fw->size; sep_dev->resident_size = fw->size;
release_firmware(fw); release_firmware(fw);
resident_addr = (unsigned long)sep_dev->resident_virtual_address; resident_addr = (unsigned long) sep_dev->resident_virtual_address;
edbg( edbg("SEP Driver:resident_addr (physical )is %08lx\n", sep_dev->resident_physical_address);
"SEP Driver:resident_addr (physical )is %08lx\n", edbg("SEP Driver:cache_addr (physical) is %08lx\n", sep_dev->cache_physical_address);
sep_dev->resident_physical_address);
edbg(
"SEP Driver:cache_addr (physical) is %08lx\n",
sep_dev->cache_physical_address);
edbg( edbg("SEP Driver:resident_addr (logical )is %08lx\n", resident_addr);
"SEP Driver:resident_addr (logical )is %08lx\n", edbg("SEP Driver:cache_addr (logical) is %08lx\n", cache_addr);
resident_addr);
edbg(
"SEP Driver:cache_addr (logical) is %08lx\n",
cache_addr);
edbg( edbg("SEP Driver:resident_size is %08lx\n", sep_dev->resident_size);
"SEP Driver:resident_size is %08lx\n", sep_dev->resident_size); edbg("SEP Driver:cache_size is %08lx\n", sep_dev->cache_size);
edbg(
"SEP Driver:cache_size is %08lx\n", sep_dev->cache_size);
...@@ -255,7 +223,7 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, ...@@ -255,7 +223,7 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr,
*dst_new_cache_addr_ptr = sep_dev->cache_physical_address; *dst_new_cache_addr_ptr = sep_dev->cache_physical_address;
*dst_new_resident_addr_ptr = sep_dev->resident_physical_address; *dst_new_resident_addr_ptr = sep_dev->resident_physical_address;
end_function: end_function:
return error; return error;
} }
...@@ -270,15 +238,12 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr, ...@@ -270,15 +238,12 @@ int sep_copy_cache_resident_to_area(unsigned long src_cache_addr,
shared area, and phys_shared_area_addr_ptr shared area, and phys_shared_area_addr_ptr
- the physical address of the shared area - the physical address of the shared area
*/ */
int sep_map_and_alloc_shared_area(unsigned long shared_area_size, int sep_map_and_alloc_shared_area(unsigned long shared_area_size, unsigned long *kernel_shared_area_addr_ptr, unsigned long *phys_shared_area_addr_ptr)
unsigned long *kernel_shared_area_addr_ptr,
unsigned long *phys_shared_area_addr_ptr)
{ {
// shared_virtual_address = ioremap_nocache(0xda00000,shared_area_size); // shared_virtual_address = ioremap_nocache(0xda00000,shared_area_size);
sep_dev->shared_virtual_address = kmalloc(shared_area_size, GFP_KERNEL); sep_dev->shared_virtual_address = kmalloc(shared_area_size, GFP_KERNEL);
if (!sep_dev->shared_virtual_address) { if (!sep_dev->shared_virtual_address) {
edbg( edbg("sep_driver:shared memory kmalloc failed\n");
"sep_driver:shared memory kmalloc failed\n");
return -1; return -1;
} }
...@@ -286,19 +251,13 @@ int sep_map_and_alloc_shared_area(unsigned long shared_area_size, ...@@ -286,19 +251,13 @@ int sep_map_and_alloc_shared_area(unsigned long shared_area_size,
sep_dev->shared_physical_address = __pa(sep_dev->shared_virtual_address); sep_dev->shared_physical_address = __pa(sep_dev->shared_virtual_address);
// shared_physical_address = 0xda00000; // shared_physical_address = 0xda00000;
*kernel_shared_area_addr_ptr = (unsigned long)sep_dev->shared_virtual_address; *kernel_shared_area_addr_ptr = (unsigned long) sep_dev->shared_virtual_address;
/* set the physical address of the shared area */ /* set the physical address of the shared area */
*phys_shared_area_addr_ptr = sep_dev->shared_physical_address; *phys_shared_area_addr_ptr = sep_dev->shared_physical_address;
edbg( edbg("SEP Driver:shared_virtual_address is %p\n", sep_dev->shared_virtual_address);
"SEP Driver:shared_virtual_address is %p\n", edbg("SEP Driver:shared_region_size is %08lx\n", shared_area_size);
sep_dev->shared_virtual_address); edbg("SEP Driver:shared_physical_addr is %08lx\n", *phys_shared_area_addr_ptr);
edbg(
"SEP Driver:shared_region_size is %08lx\n",
shared_area_size);
edbg(
"SEP Driver:shared_physical_addr is %08lx\n",
*phys_shared_area_addr_ptr);
return 0; return 0;
} }
...@@ -311,11 +270,9 @@ int sep_map_and_alloc_shared_area(unsigned long shared_area_size, ...@@ -311,11 +270,9 @@ int sep_map_and_alloc_shared_area(unsigned long shared_area_size,
shared area,phys_shared_area_addr_ptr - the physical address of shared area,phys_shared_area_addr_ptr - the physical address of
the shared area the shared area
*/ */
void sep_unmap_and_free_shared_area(unsigned long shared_area_size, void sep_unmap_and_free_shared_area(unsigned long shared_area_size, unsigned long kernel_shared_area_addr, unsigned long phys_shared_area_addr)
unsigned long kernel_shared_area_addr,
unsigned long phys_shared_area_addr)
{ {
kfree((void *)kernel_shared_area_addr); kfree((void *) kernel_shared_area_addr);
return; return;
} }
...@@ -327,16 +284,10 @@ void sep_unmap_and_free_shared_area(unsigned long shared_area_size, ...@@ -327,16 +284,10 @@ void sep_unmap_and_free_shared_area(unsigned long shared_area_size,
*/ */
unsigned long sep_shared_area_virt_to_phys(unsigned long virt_address) unsigned long sep_shared_area_virt_to_phys(unsigned long virt_address)
{ {
edbg( edbg("SEP Driver:sh virt to phys v %08lx\n", virt_address);
"SEP Driver:sh virt to phys v %08lx\n", edbg("SEP Driver:sh virt to phys p %08lx\n", sep_dev->shared_physical_address + (virt_address - (unsigned long) sep_dev->shared_virtual_address));
virt_address);
edbg( return (unsigned long) sep_dev->shared_physical_address + (virt_address - (unsigned long) sep_dev->shared_virtual_address);
"SEP Driver:sh virt to phys p %08lx\n",
sep_dev->shared_physical_address
+ (virt_address - (unsigned long)sep_dev->shared_virtual_address));
return (unsigned long)sep_dev->shared_physical_address +
(virt_address - (unsigned long)sep_dev->shared_virtual_address);
} }
/* /*
...@@ -347,16 +298,14 @@ unsigned long sep_shared_area_virt_to_phys(unsigned long virt_address) ...@@ -347,16 +298,14 @@ unsigned long sep_shared_area_virt_to_phys(unsigned long virt_address)
*/ */
unsigned long sep_shared_area_phys_to_virt(unsigned long phys_address) unsigned long sep_shared_area_phys_to_virt(unsigned long phys_address)
{ {
return (unsigned long)sep_dev->shared_virtual_address return (unsigned long) sep_dev->shared_virtual_address + (phys_address - sep_dev->shared_physical_address);
+ (phys_address - sep_dev->shared_physical_address);
} }
/* /*
function that is activaed on the succesfull probe of the SEP device function that is activaed on the succesfull probe of the SEP device
*/ */
static int __devinit sep_probe(struct pci_dev *pdev, static int __devinit sep_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
/* error */ /* error */
int error; int error;
...@@ -365,15 +314,13 @@ static int __devinit sep_probe(struct pci_dev *pdev, ...@@ -365,15 +314,13 @@ static int __devinit sep_probe(struct pci_dev *pdev,
CODE CODE
---------------------------*/ ---------------------------*/
edbg( edbg("Sep pci probe starting\n");
"Sep pci probe starting\n");
error = 0; error = 0;
/* enable the device */ /* enable the device */
error = pci_enable_device(pdev); error = pci_enable_device(pdev);
if (error) { if (error) {
edbg( edbg("error enabling pci device\n");
"error enabling pci device\n");
goto end_function; goto end_function;
} }
...@@ -383,111 +330,83 @@ static int __devinit sep_probe(struct pci_dev *pdev, ...@@ -383,111 +330,83 @@ static int __devinit sep_probe(struct pci_dev *pdev,
/* get the io memory start address */ /* get the io memory start address */
sep_dev->io_memory_start_physical_address = pci_resource_start(pdev, 0); sep_dev->io_memory_start_physical_address = pci_resource_start(pdev, 0);
if (!sep_dev->io_memory_start_physical_address) { if (!sep_dev->io_memory_start_physical_address) {
edbg( edbg("SEP Driver error pci resource start\n");
"SEP Driver error pci resource start\n");
goto end_function; goto end_function;
} }
/* get the io memory end address */ /* get the io memory end address */
sep_dev->io_memory_end_physical_address = pci_resource_end(pdev, 0); sep_dev->io_memory_end_physical_address = pci_resource_end(pdev, 0);
if (!sep_dev->io_memory_end_physical_address) { if (!sep_dev->io_memory_end_physical_address) {
edbg( edbg("SEP Driver error pci resource end\n");
"SEP Driver error pci resource end\n");
goto end_function; goto end_function;
} }
sep_dev->io_memory_size = sep_dev->io_memory_end_physical_address - sep_dev->io_memory_size = sep_dev->io_memory_end_physical_address - sep_dev->io_memory_start_physical_address + 1;
sep_dev->io_memory_start_physical_address + 1;
edbg( edbg("SEP Driver:io_memory_start_physical_address is %08lx\n", sep_dev->io_memory_start_physical_address);
"SEP Driver:io_memory_start_physical_address is %08lx\n",
sep_dev->io_memory_start_physical_address);
edbg( edbg("SEP Driver:io_memory_end_phyaical_address is %08lx\n", sep_dev->io_memory_end_physical_address);
"SEP Driver:io_memory_end_phyaical_address is %08lx\n",
sep_dev->io_memory_end_physical_address);
edbg( edbg("SEP Driver:io_memory_size is %08lx\n", sep_dev->io_memory_size);
"SEP Driver:io_memory_size is %08lx\n",
sep_dev->io_memory_size);
sep_dev->io_memory_start_virtual_address = sep_dev->io_memory_start_virtual_address = ioremap_nocache(sep_dev->io_memory_start_physical_address, sep_dev->io_memory_size);
ioremap_nocache(sep_dev->io_memory_start_physical_address,
sep_dev->io_memory_size);
if (!sep_dev->io_memory_start_virtual_address) { if (!sep_dev->io_memory_start_virtual_address) {
edbg( edbg("SEP Driver error ioremap of io memory\n");
"SEP Driver error ioremap of io memory\n");
goto end_function; goto end_function;
} }
edbg( edbg("SEP Driver:io_memory_start_virtual_address is %p\n", sep_dev->io_memory_start_virtual_address);
"SEP Driver:io_memory_start_virtual_address is %p\n",
sep_dev->io_memory_start_virtual_address);
sep_dev->reg_base_address = (void __iomem *)sep_dev->io_memory_start_virtual_address; sep_dev->reg_base_address = (void __iomem *) sep_dev->io_memory_start_virtual_address;
/* set up system base address and shared memory location */ /* set up system base address and shared memory location */
sep_dev->rar_virtual_address = kmalloc(2 * SEP_RAR_IO_MEM_REGION_SIZE, sep_dev->rar_virtual_address = kmalloc(2 * SEP_RAR_IO_MEM_REGION_SIZE, GFP_KERNEL);
GFP_KERNEL);
if (!sep_dev->rar_virtual_address) { if (!sep_dev->rar_virtual_address) {
edbg( edbg("SEP Driver:cant kmalloc rar\n");
"SEP Driver:cant kmalloc rar\n");
goto end_function; goto end_function;
} }
/* FIXME */ /* FIXME */
sep_dev->rar_physical_address = __pa(sep_dev->rar_virtual_address); sep_dev->rar_physical_address = __pa(sep_dev->rar_virtual_address);
edbg( edbg("SEP Driver:rar_physical is %08lx\n", sep_dev->rar_physical_address);
"SEP Driver:rar_physical is %08lx\n",
sep_dev->rar_physical_address);
edbg( edbg("SEP Driver:rar_virtual is %p\n", sep_dev->rar_virtual_address);
"SEP Driver:rar_virtual is %p\n",
sep_dev->rar_virtual_address);
#if !SEP_DRIVER_POLLING_MODE #if !SEP_DRIVER_POLLING_MODE
edbg( edbg("SEP Driver: about to write IMR and ICR REG_ADDR\n");
"SEP Driver: about to write IMR and ICR REG_ADDR\n");
/* clear ICR register */ /* clear ICR register */
sep_write_reg(sep_dev, HW_HOST_ICR_REG_ADDR, sep_write_reg(sep_dev, HW_HOST_ICR_REG_ADDR, 0xFFFFFFFF);
0xFFFFFFFF);
/* set the IMR register - open only GPR 2 */ /* set the IMR register - open only GPR 2 */
sep_write_reg(sep_dev, HW_HOST_IMR_REG_ADDR, sep_write_reg(sep_dev, HW_HOST_IMR_REG_ADDR, (~(0x1 << 13)));
(~(0x1 << 13)));
/* figure out our irq */ /* figure out our irq */
/* FIXME: */ /* FIXME: */
error = pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, (u8 *)&sep_dev->sep_irq); error = pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, (u8 *) & sep_dev->sep_irq);
edbg( edbg("SEP Driver: my irq is %d\n", sep_irq);
"SEP Driver: my irq is %d\n", sep_irq);
edbg( edbg("SEP Driver: about to call request_irq\n");
"SEP Driver: about to call request_irq\n");
/* get the interrupt line */ /* get the interrupt line */
error = request_irq(sep_irq, sep_inthandler, IRQF_SHARED, error = request_irq(sep_irq, sep_inthandler, IRQF_SHARED, "sep_driver", &sep_dev->reg_base_address);
"sep_driver", &sep_dev->reg_base_address);
if (error) if (error)
goto end_function; goto end_function;
goto end_function; goto end_function;
edbg( edbg("SEP Driver: about to write IMR REG_ADDR");
"SEP Driver: about to write IMR REG_ADDR");
/* set the IMR register - open only GPR 2 */ /* set the IMR register - open only GPR 2 */
sep_write_reg(sep_dev, HW_HOST_IMR_REG_ADDR, sep_write_reg(sep_dev, HW_HOST_IMR_REG_ADDR, (~(0x1 << 13)));
(~(0x1 << 13)));
#endif /* SEP_DRIVER_POLLING_MODE */ #endif /* SEP_DRIVER_POLLING_MODE */
end_function: end_function:
return error; return error;
} }
...@@ -515,26 +434,18 @@ void sep_load_rom_code(void) ...@@ -515,26 +434,18 @@ void sep_load_rom_code(void)
/* Loading ROM from SEP_ROM_image.h file */ /* Loading ROM from SEP_ROM_image.h file */
k = sizeof(CRYS_SEP_ROM); k = sizeof(CRYS_SEP_ROM);
edbg( edbg("SEP Driver: DX_CC_TST_SepRomLoader start\n");
"SEP Driver: DX_CC_TST_SepRomLoader start\n");
edbg( edbg("SEP Driver: k is %lu\n", k);
"SEP Driver: k is %lu\n", k); edbg("SEP Driver: sep_dev->reg_base_address is %p\n", sep_dev->reg_base_address);
edbg( edbg("SEP Driver: CRYS_SEP_ROM_start_address_offset is %p\n", CRYS_SEP_ROM_start_address_offset);
"SEP Driver: sep_dev->reg_base_address is %p\n",
sep_dev->reg_base_address);
edbg(
"SEP Driver: CRYS_SEP_ROM_start_address_offset is %p\n",
CRYS_SEP_ROM_start_address_offset);
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
/* write bank */ /* write bank */
sep_write_reg(sep_dev, SEP_ROM_BANK_register_offset, i); sep_write_reg(sep_dev, SEP_ROM_BANK_register_offset, i);
for (j = 0; j < CRYS_SEP_ROM_length / 4; j++) { for (j = 0; j < CRYS_SEP_ROM_length / 4; j++) {
sep_write_reg(sep_dev, sep_write_reg(sep_dev, CRYS_SEP_ROM_start_address_offset + 4 * j, CRYS_SEP_ROM[i * 0x1000 + j]);
CRYS_SEP_ROM_start_address_offset + 4*j,
CRYS_SEP_ROM[i * 0x1000 + j]);
k = k - 4; k = k - 4;
...@@ -545,7 +456,7 @@ void sep_load_rom_code(void) ...@@ -545,7 +456,7 @@ void sep_load_rom_code(void)
} }
} }
/* reset the SEP*/ /* reset the SEP */
sep_write_reg(sep_dev, HW_HOST_SEP_SW_RST_REG_ADDR, 0x1); sep_write_reg(sep_dev, HW_HOST_SEP_SW_RST_REG_ADDR, 0x1);
/* poll for SEP ROM boot finish */ /* poll for SEP ROM boot finish */
...@@ -553,49 +464,41 @@ void sep_load_rom_code(void) ...@@ -553,49 +464,41 @@ void sep_load_rom_code(void)
retVal = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR3_REG_ADDR); retVal = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR3_REG_ADDR);
} while (!regVal); } while (!regVal);
edbg( edbg("SEP Driver: ROM polling ended\n");
"SEP Driver: ROM polling ended\n");
switch (regVal) { switch (regVal) {
case 0x1: case 0x1:
/* fatal error - read erro status from GPRO */ /* fatal error - read erro status from GPRO */
Error = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR); Error = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
edbg( edbg("SEP Driver: ROM polling case 1\n");
"SEP Driver: ROM polling case 1\n");
break; break;
case 0x2: case 0x2:
/* Boot First Phase ended */ /* Boot First Phase ended */
warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR); warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
edbg( edbg("SEP Driver: ROM polling case 2\n");
"SEP Driver: ROM polling case 2\n");
break; break;
case 0x4: case 0x4:
/* Cold boot ended successfully */ /* Cold boot ended successfully */
warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR); warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
edbg( edbg("SEP Driver: ROM polling case 4\n");
"SEP Driver: ROM polling case 4\n");
Error = 0; Error = 0;
break; break;
case 0x8: case 0x8:
/* Warmboot ended successfully */ /* Warmboot ended successfully */
warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR); warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
edbg( edbg("SEP Driver: ROM polling case 8\n");
"SEP Driver: ROM polling case 8\n");
Error = 0; Error = 0;
break; break;
case 0x10: case 0x10:
/* ColdWarm boot ended successfully */ /* ColdWarm boot ended successfully */
warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR); warning = sep_read_reg(sep_dev, HW_HOST_SEP_HOST_GPR0_REG_ADDR);
edbg( edbg("SEP Driver: ROM polling case 16\n");
"SEP Driver: ROM polling case 16\n");
Error = 0; Error = 0;
break; break;
case 0x20: case 0x20:
edbg( edbg("SEP Driver: ROM polling case 32\n");
"SEP Driver: ROM polling case 32\n");
break; break;
} }
#endif #endif
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment