···7373#define XHI_BUFFER_START 074747575/**7676- * buffer_icap_get_status: Get the contents of the status register.7777- * @parameter base_address: is the base address of the device7676+ * buffer_icap_get_status - Get the contents of the status register.7777+ * @base_address: is the base address of the device7878 *7979 * The status register contains the ICAP status and the done bit.8080 *···9494}95959696/**9797- * buffer_icap_get_bram: Reads data from the storage buffer bram.9898- * @parameter base_address: contains the base address of the component.9999- * @parameter offset: The word offset from which the data should be read.9797+ * buffer_icap_get_bram - Reads data from the storage buffer bram.9898+ * @base_address: contains the base address of the component.9999+ * @offset: The word offset from which the data should be read.100100 *101101 * A bram is used as a configuration memory cache. One frame of data can102102 * be stored in this "storage buffer".···108108}109109110110/**111111- * buffer_icap_busy: Return true if the icap device is busy112112- * @parameter base_address: is the base address of the device111111+ * buffer_icap_busy - Return true if the icap device is busy112112+ * @base_address: is the base address of the device113113 *114114 * The queries the low order bit of the status register, which115115 * indicates whether the current configuration or readback operation···121121}122122123123/**124124- * buffer_icap_busy: Return true if the icap device is not busy125125- * @parameter base_address: is the base address of the device124124+ * buffer_icap_busy - Return true if the icap device is not busy125125+ * @base_address: is the base address of the device126126 *127127 * The queries the low order bit of the status register, which128128 * indicates whether the current configuration or readback operation···134134}135135136136/**137137- * buffer_icap_set_size: Set the size register.138138- * @parameter base_address: is the base address of the device139139- * @parameter data: The size in bytes.137137+ * buffer_icap_set_size - Set the size register.138138+ * @base_address: is the base address of the device139139+ * @data: The size in bytes.140140 *141141 * The size register holds the number of 8 bit bytes to transfer between142142 * bram and the icap (or icap to bram).···148148}149149150150/**151151- * buffer_icap_mSetoffsetReg: Set the bram offset register.152152- * @parameter base_address: contains the base address of the device.153153- * @parameter data: is the value to be written to the data register.151151+ * buffer_icap_set_offset - Set the bram offset register.152152+ * @base_address: contains the base address of the device.153153+ * @data: is the value to be written to the data register.154154 *155155 * The bram offset register holds the starting bram address to transfer156156 * data from during configuration or write data to during readback.···162162}163163164164/**165165- * buffer_icap_set_rnc: Set the RNC (Readback not Configure) register.166166- * @parameter base_address: contains the base address of the device.167167- * @parameter data: is the value to be written to the data register.165165+ * buffer_icap_set_rnc - Set the RNC (Readback not Configure) register.166166+ * @base_address: contains the base address of the device.167167+ * @data: is the value to be written to the data register.168168 *169169 * The RNC register determines the direction of the data transfer. It170170 * controls whether a configuration or readback take place. Writing to···178178}179179180180/**181181- * buffer_icap_set_bram: Write data to the storage buffer bram.182182- * @parameter base_address: contains the base address of the component.183183- * @parameter offset: The word offset at which the data should be written.184184- * @parameter data: The value to be written to the bram offset.181181+ * buffer_icap_set_bram - Write data to the storage buffer bram.182182+ * @base_address: contains the base address of the component.183183+ * @offset: The word offset at which the data should be written.184184+ * @data: The value to be written to the bram offset.185185 *186186 * A bram is used as a configuration memory cache. One frame of data can187187 * be stored in this "storage buffer".···193193}194194195195/**196196- * buffer_icap_device_read: Transfer bytes from ICAP to the storage buffer.197197- * @parameter drvdata: a pointer to the drvdata.198198- * @parameter offset: The storage buffer start address.199199- * @parameter count: The number of words (32 bit) to read from the196196+ * buffer_icap_device_read - Transfer bytes from ICAP to the storage buffer.197197+ * @drvdata: a pointer to the drvdata.198198+ * @offset: The storage buffer start address.199199+ * @count: The number of words (32 bit) to read from the200200 * device (ICAP).201201 **/202202static int buffer_icap_device_read(struct hwicap_drvdata *drvdata,···227227};228228229229/**230230- * buffer_icap_device_write: Transfer bytes from ICAP to the storage buffer.231231- * @parameter drvdata: a pointer to the drvdata.232232- * @parameter offset: The storage buffer start address.233233- * @parameter count: The number of words (32 bit) to read from the230230+ * buffer_icap_device_write - Transfer bytes from ICAP to the storage buffer.231231+ * @drvdata: a pointer to the drvdata.232232+ * @offset: The storage buffer start address.233233+ * @count: The number of words (32 bit) to read from the234234 * device (ICAP).235235 **/236236static int buffer_icap_device_write(struct hwicap_drvdata *drvdata,···261261};262262263263/**264264- * buffer_icap_reset: Reset the logic of the icap device.265265- * @parameter drvdata: a pointer to the drvdata.264264+ * buffer_icap_reset - Reset the logic of the icap device.265265+ * @drvdata: a pointer to the drvdata.266266 *267267 * Writing to the status register resets the ICAP logic in an internal268268 * version of the core. For the version of the core published in EDK,···274274}275275276276/**277277- * buffer_icap_set_configuration: Load a partial bitstream from system memory.278278- * @parameter drvdata: a pointer to the drvdata.279279- * @parameter data: Kernel address of the partial bitstream.280280- * @parameter size: the size of the partial bitstream in 32 bit words.277277+ * buffer_icap_set_configuration - Load a partial bitstream from system memory.278278+ * @drvdata: a pointer to the drvdata.279279+ * @data: Kernel address of the partial bitstream.280280+ * @size: the size of the partial bitstream in 32 bit words.281281 **/282282int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,283283 u32 size)···333333};334334335335/**336336- * buffer_icap_get_configuration: Read configuration data from the device.337337- * @parameter drvdata: a pointer to the drvdata.338338- * @parameter data: Address of the data representing the partial bitstream339339- * @parameter size: the size of the partial bitstream in 32 bit words.336336+ * buffer_icap_get_configuration - Read configuration data from the device.337337+ * @drvdata: a pointer to the drvdata.338338+ * @data: Address of the data representing the partial bitstream339339+ * @size: the size of the partial bitstream in 32 bit words.340340 **/341341int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data,342342 u32 size)
+30-30
drivers/char/xilinx_hwicap/fifo_icap.c
···949495959696/**9797- * fifo_icap_fifo_write: Write data to the write FIFO.9898- * @parameter drvdata: a pointer to the drvdata.9999- * @parameter data: the 32-bit value to be written to the FIFO.9797+ * fifo_icap_fifo_write - Write data to the write FIFO.9898+ * @drvdata: a pointer to the drvdata.9999+ * @data: the 32-bit value to be written to the FIFO.100100 *101101 * This function will silently fail if the fifo is full.102102 **/···108108}109109110110/**111111- * fifo_icap_fifo_read: Read data from the Read FIFO.112112- * @parameter drvdata: a pointer to the drvdata.111111+ * fifo_icap_fifo_read - Read data from the Read FIFO.112112+ * @drvdata: a pointer to the drvdata.113113 *114114 * This function will silently fail if the fifo is empty.115115 **/···121121}122122123123/**124124- * fifo_icap_set_read_size: Set the the size register.125125- * @parameter drvdata: a pointer to the drvdata.126126- * @parameter data: the size of the following read transaction, in words.124124+ * fifo_icap_set_read_size - Set the the size register.125125+ * @drvdata: a pointer to the drvdata.126126+ * @data: the size of the following read transaction, in words.127127 **/128128static inline void fifo_icap_set_read_size(struct hwicap_drvdata *drvdata,129129 u32 data)···132132}133133134134/**135135- * fifo_icap_start_config: Initiate a configuration (write) to the device.136136- * @parameter drvdata: a pointer to the drvdata.135135+ * fifo_icap_start_config - Initiate a configuration (write) to the device.136136+ * @drvdata: a pointer to the drvdata.137137 **/138138static inline void fifo_icap_start_config(struct hwicap_drvdata *drvdata)139139{···142142}143143144144/**145145- * fifo_icap_start_readback: Initiate a readback from the device.146146- * @parameter drvdata: a pointer to the drvdata.145145+ * fifo_icap_start_readback - Initiate a readback from the device.146146+ * @drvdata: a pointer to the drvdata.147147 **/148148static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata)149149{···152152}153153154154/**155155- * fifo_icap_busy: Return true if the ICAP is still processing a transaction.156156- * @parameter drvdata: a pointer to the drvdata.155155+ * fifo_icap_busy - Return true if the ICAP is still processing a transaction.156156+ * @drvdata: a pointer to the drvdata.157157 **/158158static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata)159159{···163163}164164165165/**166166- * fifo_icap_write_fifo_vacancy: Query the write fifo available space.167167- * @parameter drvdata: a pointer to the drvdata.166166+ * fifo_icap_write_fifo_vacancy - Query the write fifo available space.167167+ * @drvdata: a pointer to the drvdata.168168 *169169 * Return the number of words that can be safely pushed into the write fifo.170170 **/···175175}176176177177/**178178- * fifo_icap_read_fifo_occupancy: Query the read fifo available data.179179- * @parameter drvdata: a pointer to the drvdata.178178+ * fifo_icap_read_fifo_occupancy - Query the read fifo available data.179179+ * @drvdata: a pointer to the drvdata.180180 *181181 * Return the number of words that can be safely read from the read fifo.182182 **/···187187}188188189189/**190190- * fifo_icap_set_configuration: Send configuration data to the ICAP.191191- * @parameter drvdata: a pointer to the drvdata.192192- * @parameter frame_buffer: a pointer to the data to be written to the190190+ * fifo_icap_set_configuration - Send configuration data to the ICAP.191191+ * @drvdata: a pointer to the drvdata.192192+ * @frame_buffer: a pointer to the data to be written to the193193 * ICAP device.194194- * @parameter num_words: the number of words (32 bit) to write to the ICAP194194+ * @num_words: the number of words (32 bit) to write to the ICAP195195 * device.196196197197 * This function writes the given user data to the Write FIFO in···266266}267267268268/**269269- * fifo_icap_get_configuration: Read configuration data from the device.270270- * @parameter drvdata: a pointer to the drvdata.271271- * @parameter data: Address of the data representing the partial bitstream272272- * @parameter size: the size of the partial bitstream in 32 bit words.269269+ * fifo_icap_get_configuration - Read configuration data from the device.270270+ * @drvdata: a pointer to the drvdata.271271+ * @data: Address of the data representing the partial bitstream272272+ * @size: the size of the partial bitstream in 32 bit words.273273 *274274 * This function reads the specified number of words from the ICAP device in275275 * the polled mode.···335335}336336337337/**338338- * buffer_icap_reset: Reset the logic of the icap device.339339- * @parameter drvdata: a pointer to the drvdata.338338+ * buffer_icap_reset - Reset the logic of the icap device.339339+ * @drvdata: a pointer to the drvdata.340340 *341341 * This function forces the software reset of the complete HWICAP device.342342 * All the registers will return to the default value and the FIFO is also···360360}361361362362/**363363- * fifo_icap_flush_fifo: This function flushes the FIFOs in the device.364364- * @parameter drvdata: a pointer to the drvdata.363363+ * fifo_icap_flush_fifo - This function flushes the FIFOs in the device.364364+ * @drvdata: a pointer to the drvdata.365365 */366366void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata)367367{
+62-76
drivers/char/xilinx_hwicap/xilinx_hwicap.c
···8484#include <linux/init.h>8585#include <linux/poll.h>8686#include <linux/proc_fs.h>8787-#include <asm/semaphore.h>8787+#include <linux/mutex.h>8888#include <linux/sysctl.h>8989#include <linux/version.h>9090#include <linux/fs.h>···119119120120/* An array, which is set to true when the device is registered. */121121static bool probed_devices[HWICAP_DEVICES];122122+static struct mutex icap_sem;122123123124static struct class *icap_class;124125···200199};201200202201/**203203- * hwicap_command_desync: Send a DESYNC command to the ICAP port.204204- * @parameter drvdata: a pointer to the drvdata.202202+ * hwicap_command_desync - Send a DESYNC command to the ICAP port.203203+ * @drvdata: a pointer to the drvdata.205204 *206205 * This command desynchronizes the ICAP After this command, a207206 * bitstream containing a NULL packet, followed by a SYNCH packet is208207 * required before the ICAP will recognize commands.209208 */210210-int hwicap_command_desync(struct hwicap_drvdata *drvdata)209209+static int hwicap_command_desync(struct hwicap_drvdata *drvdata)211210{212211 u32 buffer[4];213212 u32 index = 0;···229228}230229231230/**232232- * hwicap_command_capture: Send a CAPTURE command to the ICAP port.233233- * @parameter drvdata: a pointer to the drvdata.234234- *235235- * This command captures all of the flip flop states so they will be236236- * available during readback. One can use this command instead of237237- * enabling the CAPTURE block in the design.238238- */239239-int hwicap_command_capture(struct hwicap_drvdata *drvdata)240240-{241241- u32 buffer[7];242242- u32 index = 0;243243-244244- /*245245- * Create the data to be written to the ICAP.246246- */247247- buffer[index++] = XHI_DUMMY_PACKET;248248- buffer[index++] = XHI_SYNC_PACKET;249249- buffer[index++] = XHI_NOOP_PACKET;250250- buffer[index++] = hwicap_type_1_write(drvdata->config_regs->CMD) | 1;251251- buffer[index++] = XHI_CMD_GCAPTURE;252252- buffer[index++] = XHI_DUMMY_PACKET;253253- buffer[index++] = XHI_DUMMY_PACKET;254254-255255- /*256256- * Write the data to the FIFO and intiate the transfer of data257257- * present in the FIFO to the ICAP device.258258- */259259- return drvdata->config->set_configuration(drvdata,260260- &buffer[0], index);261261-262262-}263263-264264-/**265265- * hwicap_get_configuration_register: Query a configuration register.266266- * @parameter drvdata: a pointer to the drvdata.267267- * @parameter reg: a constant which represents the configuration231231+ * hwicap_get_configuration_register - Query a configuration register.232232+ * @drvdata: a pointer to the drvdata.233233+ * @reg: a constant which represents the configuration268234 * register value to be returned.269235 * Examples: XHI_IDCODE, XHI_FLR.270270- * @parameter RegData: returns the value of the register.236236+ * @reg_data: returns the value of the register.271237 *272238 * Sends a query packet to the ICAP and then receives the response.273239 * The icap is left in Synched state.274240 */275275-int hwicap_get_configuration_register(struct hwicap_drvdata *drvdata,276276- u32 reg, u32 *RegData)241241+static int hwicap_get_configuration_register(struct hwicap_drvdata *drvdata,242242+ u32 reg, u32 *reg_data)277243{278244 int status;279245 u32 buffer[6];···268300 /*269301 * Read the configuration register270302 */271271- status = drvdata->config->get_configuration(drvdata, RegData, 1);303303+ status = drvdata->config->get_configuration(drvdata, reg_data, 1);272304 if (status)273305 return status;274306275307 return 0;276308}277309278278-int hwicap_initialize_hwicap(struct hwicap_drvdata *drvdata)310310+static int hwicap_initialize_hwicap(struct hwicap_drvdata *drvdata)279311{280312 int status;281313 u32 idcode;···312344}313345314346static ssize_t315315-hwicap_read(struct file *file, char *buf, size_t count, loff_t *ppos)347347+hwicap_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)316348{317349 struct hwicap_drvdata *drvdata = file->private_data;318350 ssize_t bytes_to_read = 0;···321353 u32 bytes_remaining;322354 int status;323355324324- if (down_interruptible(&drvdata->sem))325325- return -ERESTARTSYS;356356+ status = mutex_lock_interruptible(&drvdata->sem);357357+ if (status)358358+ return status;326359327360 if (drvdata->read_buffer_in_use) {328361 /* If there are leftover bytes in the buffer, just */···339370 goto error;340371 }341372 drvdata->read_buffer_in_use -= bytes_to_read;342342- memcpy(drvdata->read_buffer + bytes_to_read,343343- drvdata->read_buffer, 4 - bytes_to_read);373373+ memmove(drvdata->read_buffer,374374+ drvdata->read_buffer + bytes_to_read,375375+ 4 - bytes_to_read);344376 } else {345377 /* Get new data from the ICAP, and return was was requested. */346378 kbuf = (u32 *) get_zeroed_page(GFP_KERNEL);···384414 status = -EFAULT;385415 goto error;386416 }387387- memcpy(kbuf, drvdata->read_buffer, bytes_remaining);417417+ memcpy(drvdata->read_buffer,418418+ kbuf,419419+ bytes_remaining);388420 drvdata->read_buffer_in_use = bytes_remaining;389421 free_page((unsigned long)kbuf);390422 }391423 status = bytes_to_read;392424 error:393393- up(&drvdata->sem);425425+ mutex_unlock(&drvdata->sem);394426 return status;395427}396428397429static ssize_t398398-hwicap_write(struct file *file, const char *buf,430430+hwicap_write(struct file *file, const char __user *buf,399431 size_t count, loff_t *ppos)400432{401433 struct hwicap_drvdata *drvdata = file->private_data;···407435 ssize_t len;408436 ssize_t status;409437410410- if (down_interruptible(&drvdata->sem))411411- return -ERESTARTSYS;438438+ status = mutex_lock_interruptible(&drvdata->sem);439439+ if (status)440440+ return status;412441413442 left += drvdata->write_buffer_in_use;414443···438465 memcpy(kbuf, drvdata->write_buffer,439466 drvdata->write_buffer_in_use);440467 if (copy_from_user(441441- (((char *)kbuf) + (drvdata->write_buffer_in_use)),468468+ (((char *)kbuf) + drvdata->write_buffer_in_use),442469 buf + written,443470 len - (drvdata->write_buffer_in_use))) {444471 free_page((unsigned long)kbuf);···481508 free_page((unsigned long)kbuf);482509 status = written;483510 error:484484- up(&drvdata->sem);511511+ mutex_unlock(&drvdata->sem);485512 return status;486513}487514···492519493520 drvdata = container_of(inode->i_cdev, struct hwicap_drvdata, cdev);494521495495- if (down_interruptible(&drvdata->sem))496496- return -ERESTARTSYS;522522+ status = mutex_lock_interruptible(&drvdata->sem);523523+ if (status)524524+ return status;497525498526 if (drvdata->is_open) {499527 status = -EBUSY;···513539 drvdata->is_open = 1;514540515541 error:516516- up(&drvdata->sem);542542+ mutex_unlock(&drvdata->sem);517543 return status;518544}519545···523549 int i;524550 int status = 0;525551526526- if (down_interruptible(&drvdata->sem))527527- return -ERESTARTSYS;552552+ mutex_lock(&drvdata->sem);528553529554 if (drvdata->write_buffer_in_use) {530555 /* Flush write buffer. */···542569543570 error:544571 drvdata->is_open = 0;545545- up(&drvdata->sem);572572+ mutex_unlock(&drvdata->sem);546573 return status;547574}548575···565592566593 dev_info(dev, "Xilinx icap port driver\n");567594595595+ mutex_lock(&icap_sem);596596+568597 if (id < 0) {569598 for (id = 0; id < HWICAP_DEVICES; id++)570599 if (!probed_devices[id])571600 break;572601 }573602 if (id < 0 || id >= HWICAP_DEVICES) {603603+ mutex_unlock(&icap_sem);574604 dev_err(dev, "%s%i too large\n", DRIVER_NAME, id);575605 return -EINVAL;576606 }577607 if (probed_devices[id]) {608608+ mutex_unlock(&icap_sem);578609 dev_err(dev, "cannot assign to %s%i; it is already in use\n",579610 DRIVER_NAME, id);580611 return -EBUSY;581612 }582613583614 probed_devices[id] = 1;615615+ mutex_unlock(&icap_sem);584616585617 devt = MKDEV(xhwicap_major, xhwicap_minor + id);586618587587- drvdata = kmalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL);619619+ drvdata = kzalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL);588620 if (!drvdata) {589621 dev_err(dev, "Couldn't allocate device private record\n");590590- return -ENOMEM;622622+ retval = -ENOMEM;623623+ goto failed0;591624 }592592- memset((void *)drvdata, 0, sizeof(struct hwicap_drvdata));593625 dev_set_drvdata(dev, (void *)drvdata);594626595627 if (!regs_res) {···626648 drvdata->config = config;627649 drvdata->config_regs = config_regs;628650629629- init_MUTEX(&drvdata->sem);651651+ mutex_init(&drvdata->sem);630652 drvdata->is_open = 0;631653632654 dev_info(dev, "ioremap %lx to %p with size %x\n",···641663 goto failed3;642664 }643665 /* devfs_mk_cdev(devt, S_IFCHR|S_IRUGO|S_IWUGO, DRIVER_NAME); */644644- class_device_create(icap_class, NULL, devt, NULL, DRIVER_NAME);666666+ device_create(icap_class, dev, devt, "%s%d", DRIVER_NAME, id);645667 return 0; /* success */646668647669 failed3:···652674653675 failed1:654676 kfree(drvdata);677677+678678+ failed0:679679+ mutex_lock(&icap_sem);680680+ probed_devices[id] = 0;681681+ mutex_unlock(&icap_sem);655682656683 return retval;657684}···682699 if (!drvdata)683700 return 0;684701685685- class_device_destroy(icap_class, drvdata->devt);702702+ device_destroy(icap_class, drvdata->devt);686703 cdev_del(&drvdata->cdev);687704 iounmap(drvdata->base_address);688705 release_mem_region(drvdata->mem_start, drvdata->mem_size);689706 kfree(drvdata);690707 dev_set_drvdata(dev, NULL);691691- probed_devices[MINOR(dev->devt)-xhwicap_minor] = 0;692708709709+ mutex_lock(&icap_sem);710710+ probed_devices[MINOR(dev->devt)-xhwicap_minor] = 0;711711+ mutex_unlock(&icap_sem);693712 return 0; /* success */694713}695714···806821};807822808823/* Registration helpers to keep the number of #ifdefs to a minimum */809809-static inline int __devinit hwicap_of_register(void)824824+static inline int __init hwicap_of_register(void)810825{811826 pr_debug("hwicap: calling of_register_platform_driver()\n");812827 return of_register_platform_driver(&hwicap_of_driver);813828}814829815815-static inline void __devexit hwicap_of_unregister(void)830830+static inline void __exit hwicap_of_unregister(void)816831{817832 of_unregister_platform_driver(&hwicap_of_driver);818833}819834#else /* CONFIG_OF */820835/* CONFIG_OF not enabled; do nothing helpers */821821-static inline int __devinit hwicap_of_register(void) { return 0; }822822-static inline void __devexit hwicap_of_unregister(void) { }836836+static inline int __init hwicap_of_register(void) { return 0; }837837+static inline void __exit hwicap_of_unregister(void) { }823838#endif /* CONFIG_OF */824839825825-static int __devinit hwicap_module_init(void)840840+static int __init hwicap_module_init(void)826841{827842 dev_t devt;828843 int retval;829844830845 icap_class = class_create(THIS_MODULE, "xilinx_config");846846+ mutex_init(&icap_sem);831847832848 if (xhwicap_major) {833849 devt = MKDEV(xhwicap_major, xhwicap_minor);···869883 return retval;870884}871885872872-static void __devexit hwicap_module_cleanup(void)886886+static void __exit hwicap_module_cleanup(void)873887{874888 dev_t devt = MKDEV(xhwicap_major, xhwicap_minor);875889
+12-12
drivers/char/xilinx_hwicap/xilinx_hwicap.h
···4848 u8 write_buffer[4];4949 u32 read_buffer_in_use; /* Always in [0,3] */5050 u8 read_buffer[4];5151- u32 mem_start; /* phys. address of the control registers */5252- u32 mem_end; /* phys. address of the control registers */5353- u32 mem_size;5151+ resource_size_t mem_start;/* phys. address of the control registers */5252+ resource_size_t mem_end; /* phys. address of the control registers */5353+ resource_size_t mem_size;5454 void __iomem *base_address;/* virt. address of the control registers */55555656 struct device *dev;···6161 const struct config_registers *config_regs;6262 void *private_data;6363 bool is_open;6464- struct semaphore sem;6464+ struct mutex sem;6565};66666767struct hwicap_driver_config {···164164#define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL165165166166/**167167- * hwicap_type_1_read: Generates a Type 1 read packet header.168168- * @parameter: Register is the address of the register to be read back.167167+ * hwicap_type_1_read - Generates a Type 1 read packet header.168168+ * @reg: is the address of the register to be read back.169169 *170170 * Generates a Type 1 read packet header, which is used to indirectly171171 * read registers in the configuration logic. This packet must then172172 * be sent through the icap device, and a return packet received with173173 * the information.174174 **/175175-static inline u32 hwicap_type_1_read(u32 Register)175175+static inline u32 hwicap_type_1_read(u32 reg)176176{177177 return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |178178- (Register << XHI_REGISTER_SHIFT) |178178+ (reg << XHI_REGISTER_SHIFT) |179179 (XHI_OP_READ << XHI_OP_SHIFT);180180}181181182182/**183183- * hwicap_type_1_write: Generates a Type 1 write packet header184184- * @parameter: Register is the address of the register to be read back.183183+ * hwicap_type_1_write - Generates a Type 1 write packet header184184+ * @reg: is the address of the register to be read back.185185 **/186186-static inline u32 hwicap_type_1_write(u32 Register)186186+static inline u32 hwicap_type_1_write(u32 reg)187187{188188 return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |189189- (Register << XHI_REGISTER_SHIFT) |189189+ (reg << XHI_REGISTER_SHIFT) |190190 (XHI_OP_WRITE << XHI_OP_SHIFT);191191}192192