make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / drivers / i2c / xilinx_iic / xiic.c
1 /* $Id: xiic.c,v 1.1.1.1 2005/04/11 02:50:21 jack Exp $ */
2 /******************************************************************************
3 *
4 *     Author: Xilinx, Inc.
5 *     
6 *     
7 *     This program is free software; you can redistribute it and/or modify it
8 *     under the terms of the GNU General Public License as published by the
9 *     Free Software Foundation; either version 2 of the License, or (at your
10 *     option) any later version.
11 *     
12 *     
13 *     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
14 *     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
15 *     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
16 *     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
17 *     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR
18 *     OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
19 *     XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
20 *     THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY
21 *     WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM
22 *     CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
23 *     FITNESS FOR A PARTICULAR PURPOSE.
24 *     
25 *     
26 *     Xilinx products are not intended for use in life support appliances,
27 *     devices, or systems. Use in such applications is expressly prohibited.
28 *     
29 *     
30 *     (c) Copyright 2002 Xilinx Inc.
31 *     All rights reserved.
32 *     
33 *     
34 *     You should have received a copy of the GNU General Public License along
35 *     with this program; if not, write to the Free Software Foundation, Inc.,
36 *     675 Mass Ave, Cambridge, MA 02139, USA.
37 *
38 ******************************************************************************/
39 /*****************************************************************************/
40 /**
41 *
42 * @file xiic.c
43 *
44 * Contains required functions for the XIic component. See xiic.h for more
45 * information on the driver.
46 *
47 * <pre>
48 * MODIFICATION HISTORY:
49 *
50 * Ver   Who  Date     Changes
51 * ----- --- ------- -----------------------------------------------
52 * 1.01a rfp  10/19/01 release
53 * </pre>
54 *
55 ****************************************************************************/
56
57 /***************************** Include Files *******************************/
58
59 #include "xiic.h"
60 #include "xiic_i.h"
61 #include "xio.h"
62 #include "xparameters.h"
63
64 /************************** Constant Definitions ***************************/
65
66 /**************************** Type Definitions *****************************/
67
68 /***************** Macros (Inline Functions) Definitions *******************/
69
70 /************************** Function Prototypes ****************************/
71
72 static void XIic_StubStatusHandler(void *CallBackRef, XStatus ErrorCode);
73
74 static void XIic_StubHandler(void *CallBackRef, int ByteCount);
75
76 /************************** Variable Definitions **************************/
77
78 /*****************************************************************************/
79 /**
80 *
81 * Initializes a specific XIic instance.  The initialization entails:
82 *
83 * - Check the device has an entry in the configuration table.
84 * - Initialize the driver to allow access to the device registers and
85 *   initialize other subcomponents necessary for the operation of the device.
86 * - Default options to:
87 *     - 7-bit slave addressing
88 *     - Send messages as a slave device
89 *     - Repeated start off
90 *     - General call recognition disabled
91 * - Clear messageing and error statistics
92 *
93 * The XIic_Start() function must be called after this function before the device
94 * is ready to send and receive data on the IIC bus.
95 *
96 * Before XIic_Start() is called, the interrupt control must connect the ISR
97 * routine to the interrupt handler. This is done by the user, and not
98 * XIic_Start() to allow the user to use an interrupt controller of their choice.
99 *
100 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
101 * @param    DeviceId is the unique id of the device controlled by this XIic
102 *           instance.  Passing in a device id associates the generic XIic
103 *           instance to a specific device, as chosen by the caller or
104 *           application developer.
105 *
106 * @return
107 *
108 * - XST_SUCCESS when successful
109 * - XST_DEVICE_IS_STARTED indicates the device is started (i.e. interrupts
110 *   enabled and messaging is possible). Must stop before re-initialization
111 *   is allowed.
112 *
113 * @note
114 *
115 * None.
116 *
117 ****************************************************************************/
118 XStatus
119 XIic_Initialize(XIic * InstancePtr, u16 DeviceId)
120 {
121         XIic_Config *IicConfigPtr;      /* Pointer to configuration data */
122
123         /*
124          * Asserts test the validity of selected input arguments.
125          */
126         XASSERT_NONVOID(InstancePtr != NULL);
127
128         InstancePtr->IsReady = 0;
129
130         /*
131          * If the device is started, disallow the initialize and return a Status
132          * indicating it is started.  This allows the user to stop the device
133          * and reinitialize, but prevents a user from inadvertently initializing
134          */
135         if (InstancePtr->IsStarted == XCOMPONENT_IS_STARTED) {
136                 return XST_DEVICE_IS_STARTED;
137         }
138
139         /*
140          * Lookup the device configuration in the temporary CROM table. Use this
141          * configuration info down below when initializing this component.
142          */
143         IicConfigPtr = XIic_LookupConfig(DeviceId);
144         if (IicConfigPtr == NULL) {
145                 return XST_DEVICE_NOT_FOUND;
146         }
147         /*
148          * Set default values, including setting the callback
149          * handlers to stubs so the system will not crash should the
150          * application not assign its own callbacks.
151          */
152         InstancePtr->IsStarted = 0;
153         InstancePtr->BaseAddress = IicConfigPtr->BaseAddress;
154         InstancePtr->RecvHandler = XIic_StubHandler;
155         InstancePtr->SendHandler = XIic_StubHandler;
156         InstancePtr->StatusHandler = XIic_StubStatusHandler;
157         InstancePtr->Has10BitAddr = IicConfigPtr->Has10BitAddr;
158         InstancePtr->IsReady = XCOMPONENT_IS_READY;
159         InstancePtr->Options = 0;
160
161         /*
162          * Reset the device so it's in the reset state, this must be after the
163          * IPIF is initialized since it resets thru the IPIF and clear the stats
164          */
165         XIic_Reset(InstancePtr);
166
167         XIIC_CLEAR_STATS(InstancePtr);
168
169         return XST_SUCCESS;
170 }
171
172 /*****************************************************************************/
173 /**
174 *
175 * This function starts the IIC device and driver by enabling the proper
176 * interrupts such that data may be sent and received on the IIC bus.
177 * This function must be called before the functions to send and receive data.
178 *
179 * Before XIic_Start() is called, the interrupt control must connect the ISR
180 * routine to the interrupt handler. This is done by the user, and not
181 * XIic_Start() to allow the user to use an interrupt controller of their choice.
182 *
183 * Start enables:
184 *  - IIC device
185 *  - Interrupts:
186 *     - Addressed as slave to allow messages from another master
187 *     - Arbitration Lost to detect Tx arbitration errors
188 *     - Global IIC interrupt within the IPIF interface
189 *
190 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
191 *
192 * @return
193 *
194 * XST_SUCCESS always
195 *
196 * @note
197 *
198 * The device interrupt is connected to the interrupt controller, but no
199 * "messaging" interrupts are enabled. Addressed as Slave is enabled to
200 * reception of messages when this devices address is written to the bus.
201 * The correct messaging interrupts are enabled when sending or receiving
202 * via the IicSend() and IicRecv() functions. No action is required
203 * by the user to control any IIC interrupts as the driver completely
204 * manages all 8 interrupts. Start and Stop control the ability
205 * to use the device. Stopping the device completely stops all device
206 * interrupts from the processor.
207 *
208 ****************************************************************************/
209 XStatus
210 XIic_Start(XIic * InstancePtr)
211 {
212         XASSERT_NONVOID(InstancePtr != NULL);
213         XASSERT_NONVOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
214
215         /*
216          * Mask off all interrupts, each is enabled when needed.
217          */
218         XIIF_V123B_WRITE_IIER(InstancePtr->BaseAddress, 0);
219
220         /*
221          * Clear all interrupts by reading and rewriting exact value back.
222          * Only those bits set will get written as 1 (writing 1 clears intr)
223          */
224         XIic_mClearIntr(InstancePtr->BaseAddress, 0xFFFFFFFF);
225
226         /*
227          * Enable the device
228          */
229         XIo_Out8(InstancePtr->BaseAddress + XIIC_CR_REG_OFFSET,
230                  XIIC_CR_ENABLE_DEVICE_MASK);
231         /*
232          * Set Rx FIFO Occupancy depth to throttle at first byte(after reset = 0)
233          */
234         XIo_Out8(InstancePtr->BaseAddress + XIIC_RFD_REG_OFFSET, 0);
235
236         /*
237          * Clear and enable the interrupts needed
238          */
239         XIic_mClearEnableIntr(InstancePtr->BaseAddress,
240                               XIIC_INTR_AAS_MASK | XIIC_INTR_ARB_LOST_MASK);
241
242         InstancePtr->IsStarted = XCOMPONENT_IS_STARTED;
243
244         /* Enable all interrupts by the global enable in the IPIF */
245
246         XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);
247
248         return XST_SUCCESS;
249 }
250
251 /*****************************************************************************/
252 /**
253 *
254 * This function stops the IIC device and driver such that data is no longer
255 * sent or received on the IIC bus. This function stops the device by
256 * disabling interrupts. This function only disables interrupts within the
257 * device such that the caller is responsible for disconnecting the interrupt
258 * handler of the device from the interrupt source and disabling interrupts
259 * at other levels.
260 *
261 * Due to bus throttling that could hold the bus between messages when using
262 * repeated start option, stop will not occur when the device is actively
263 * sending or receiving data from the IIC bus or the bus is being throttled
264 * by this device, but instead return XST_IIC_BUS_BUSY.
265 *
266 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
267 *
268 * @return
269 *
270 * - XST_SUCCESS indicates all IIC interrupts are disabled. No messages can
271 *   be received or transmitted until XIic_Start() is called.
272 * - XST_IIC_BUS_BUSY indicates this device is currently engaged in message
273 *   traffic and cannot be stopped.
274 *
275 * @note
276 *
277 * None.
278 *
279 ****************************************************************************/
280 XStatus
281 XIic_Stop(XIic * InstancePtr)
282 {
283         u8 Status;
284         u8 CntlReg;
285
286         XASSERT_NONVOID(InstancePtr != NULL);
287
288         /*
289          * Disable all interrupts globally using the IPIF
290          */
291         XIIF_V123B_GINTR_DISABLE(InstancePtr->BaseAddress);
292
293         CntlReg = XIo_In8(InstancePtr->BaseAddress + XIIC_CR_REG_OFFSET);
294         Status = XIo_In8(InstancePtr->BaseAddress + XIIC_SR_REG_OFFSET);
295
296         if ((CntlReg & XIIC_CR_MSMS_MASK)
297             || (Status & XIIC_SR_ADDR_AS_SLAVE_MASK)) {
298                 /* when this device is using the bus
299                  * - re-enable interrupts to finish current messaging
300                  * - return bus busy
301                  */
302                 XIIF_V123B_GINTR_ENABLE(InstancePtr->BaseAddress);
303
304                 return XST_IIC_BUS_BUSY;
305         }
306
307         InstancePtr->IsStarted = 0;
308
309         return XST_SUCCESS;
310 }
311
312 /*****************************************************************************/
313 /**
314 *
315 * Resets the IIC device. Reset must only be called after the driver has been
316 * initialized. The configuration after this reset is as follows:
317 *   - Repeated start is disabled
318 *   - General call is disabled
319 *
320 * The upper layer software is responsible for initializing and re-configuring
321 * (if necessary) and restarting the IIC device after the reset.
322 *
323 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
324 *
325 * @return
326 *
327 * None.
328 *
329 * @note
330 *
331 * None.
332 *
333 * @internal
334 *
335 * The reset is accomplished by setting the IPIF reset register.  This takes
336 * care of resetting all IPIF hardware blocks, including the IIC device.
337 *
338 ****************************************************************************/
339 void
340 XIic_Reset(XIic * InstancePtr)
341 {
342         XASSERT_VOID(InstancePtr != NULL);
343         XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
344
345         XIIF_V123B_RESET(InstancePtr->BaseAddress);
346 }
347
348 /*****************************************************************************/
349 /**
350 *
351 * This function sets the bus addresses. The addresses include the device
352 * address that the device responds to as a slave, or the slave address
353 * to communicate with on the bus.  The IIC device hardware is built to
354 * allow either 7 or 10 bit slave addressing only at build time rather
355 * than at run time. When this device is a master, slave addressing can
356 * be selected at run time to match addressing modes for other bus devices.
357 *
358 * Addresses are represented as hex values with no adjustment for the data
359 * direction bit as the software manages address bit placement.
360 * Example: For a 7 address written to the device of 1010 011X where X is
361 * the transfer direction (send/recv), the address parameter for this function
362 * needs to be 01010011 or 0x53 where the correct bit alllignment will be
363 * handled for 7 as well as 10 bit devices. This is especially important as
364 * the bit placement is not handled the same depending on which options are
365 * used such as repeated start.
366 *
367 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
368 * @param    AddressType indicates which address is being modified; the address
369 *           which this device responds to on the IIC bus as a slave, or the
370 *           slave address to communicate with when this device is a master. One
371 *           of the following values must be contained in this argument.
372 * <pre>
373 *   XII_ADDRESS_TO_SEND         Slave being addressed by a this master
374 *   XII_ADDRESS_TO_RESPOND      Address to respond to as a slave device
375 * </pre>
376 * @param    Address contains the address to be set; 7 bit or 10 bit address.
377 *           A ten bit address must be within the range: 0 - 1023 and a 7 bit
378 *           address must be within the range 0 - 127.
379 *
380 * @return
381 *
382 * XST_SUCCESS is returned if the address was successfully set, otherwise one
383 * of the following errors is returned.
384 * - XST_IIC_NO_10_BIT_ADDRESSING indicates only 7 bit addressing supported.
385 * - XST_INVALID_PARAM indicates an invalid parameter was specified.
386 *
387 * @note
388 *
389 * Upper bits of 10-bit address is written only when current device is built
390 * as a ten bit device.
391 *
392 ****************************************************************************/
393 XStatus
394 XIic_SetAddress(XIic * InstancePtr, int AddressType, int Address)
395 {
396         u8 SendAddr;
397
398         XASSERT_NONVOID(InstancePtr != NULL);
399         XASSERT_NONVOID(Address < 1023);
400
401         /* Set address to respond to for this device into address registers */
402
403         if (AddressType == XII_ADDR_TO_RESPOND_TYPE) {
404                 SendAddr = (u8) ((Address & 0x007F) << 1);      /* Addr in upper 7 bits */
405                 XIo_Out8(InstancePtr->BaseAddress + XIIC_ADR_REG_OFFSET,
406                          SendAddr);
407
408                 if (InstancePtr->Has10BitAddr == TRUE) {
409                         /* Write upper 3 bits of addr to DTR only when 10 bit option
410                          * included in design i.e. register exists
411                          */
412                         SendAddr = (u8) ((Address & 0x0380) >> 7);
413                         XIo_Out8(InstancePtr->BaseAddress + XIIC_TBA_REG_OFFSET,
414                                  SendAddr);
415                 }
416
417                 return XST_SUCCESS;
418         }
419
420         /* Store address of slave device being read from */
421
422         if (AddressType == XII_ADDR_TO_SEND_TYPE) {
423                 InstancePtr->AddrOfSlave = Address;
424                 return XST_SUCCESS;
425         }
426
427         return XST_INVALID_PARAM;
428 }
429
430 /*****************************************************************************/
431 /**
432 *
433 * This function gets the addresses for the IIC device driver. The addresses
434 * include the device address that the device responds to as a slave, or the
435 * slave address to communicate with on the bus. The address returned has the
436 * same format whether 7 or 10 bits.
437 *
438 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
439 * @param    AddressType indicates which address, the address which this
440 *           responds to on the IIC bus as a slave, or the slave address to
441 *           communicate with when this device is a master. One of the following
442 *           values must be contained in this argument.
443 * <pre>
444 *   XII_ADDRESS_TO_SEND_TYPE         slave being addressed as a master
445 *   XII_ADDRESS_TO_RESPOND_TYPE      slave address to respond to as a slave
446 * </pre>
447 *  If neither of the two valid arguments are used, the function returns
448 *  the address of the slave device
449 *
450 * @return
451 *
452 * The address retrieved.
453 *
454 * @note
455 *
456 * None.
457 *
458 ****************************************************************************/
459 u16
460 XIic_GetAddress(XIic * InstancePtr, int AddressType)
461 {
462         u8 LowAddr;
463         u16 HighAddr = 0;
464
465         XASSERT_NONVOID(InstancePtr != NULL);
466
467         /* return this devices address */
468
469         if (AddressType == XII_ADDR_TO_RESPOND_TYPE) {
470
471                 LowAddr =
472                     XIo_In8(InstancePtr->BaseAddress + XIIC_ADR_REG_OFFSET);
473
474                 if (InstancePtr->Has10BitAddr == TRUE) {
475                         HighAddr = (u16) XIo_In8(InstancePtr->BaseAddress +
476                                                  XIIC_TBA_REG_OFFSET);
477                 }
478                 return ((HighAddr << 8) & (u16) LowAddr);
479         }
480
481         /* Otherwise return address of slave device on the IIC bus */
482
483         return InstancePtr->AddrOfSlave;
484 }
485
486 /*****************************************************************************/
487 /**
488 *
489 * A function to determine if the device is currently addressed as a slave
490 *
491 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
492 *
493 * @return
494 *
495 * TRUE if the device is addressed as slave, and FALSE otherwise.
496 *
497 * @note
498 *
499 * None.
500 *
501 ****************************************************************************/
502 u32
503 XIic_IsSlave(XIic * InstancePtr)
504 {
505         XASSERT_NONVOID(InstancePtr != NULL);
506
507         if ((XIo_In8(InstancePtr->BaseAddress + XIIC_SR_REG_OFFSET) &
508              XIIC_SR_ADDR_AS_SLAVE_MASK) == 0) {
509                 return FALSE;
510         }
511         return TRUE;
512 }
513
514 /*****************************************************************************/
515 /**
516 *
517 * Sets the receive callback function, the receive handler, which the driver
518 * calls when it finishes receiving data. The number of bytes used to signal
519 * when the receive is complete is the number of bytes set in the XIic_Recv
520 * function.
521 *
522 * The handler executes in an interrupt context such that it must minimize
523 * the amount of processing performed such as transferring data to a thread
524 * context.
525 *
526 * The number of bytes received is passed to the handler as an argument.
527 *
528 * @param    InstancePtr is a pointer to the XIic instance to be worked on.
529 * @param    CallBackRef is the upper layer callback reference passed back when
530 *           the callback function is invoked.
531 * @param    FuncPtr is the pointer to the callback function.
532 *
533 * @return
534 *
535 * None.
536 *
537 * @note
538 *
539 * The handler is called within interrupt context ...
540 *
541 ****************************************************************************/
542 void
543 XIic_SetRecvHandler(XIic * InstancePtr, void *CallBackRef, XIic_Handler FuncPtr)
544 {
545         XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
546         XASSERT_VOID(InstancePtr != NULL);
547         XASSERT_VOID(FuncPtr != NULL);
548
549         InstancePtr->RecvHandler = FuncPtr;
550         InstancePtr->RecvCallBackRef = CallBackRef;
551 }
552
553 /*****************************************************************************/
554 /**
555 *
556 * Sets the send callback function, the send handler, which the driver calls when
557 * it receives confirmation of sent data. The handler executes in an interrupt
558 * context such that it must minimize the amount of processing performed such
559 * as transferring data to a thread context.
560 *
561 * @param    InstancePtr the pointer to the XIic instance to be worked on.
562 * @param    CallBackRef the upper layer callback reference passed back when
563 *           the callback function is invoked.
564 * @param    FuncPtr the pointer to the callback function.
565 *
566 * @return
567 *
568 * None.
569 *
570 * @note
571 *
572 * The handler is called within interrupt context ...
573 *
574 ****************************************************************************/
575 void
576 XIic_SetSendHandler(XIic * InstancePtr, void *CallBackRef, XIic_Handler FuncPtr)
577 {
578         XASSERT_VOID(InstancePtr != NULL);
579         XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
580         XASSERT_VOID(FuncPtr != NULL);
581
582         InstancePtr->SendHandler = FuncPtr;
583         InstancePtr->SendCallBackRef = CallBackRef;
584 }
585
586 /*****************************************************************************/
587 /**
588 *
589 * Sets the status callback function, the status handler, which the driver calls
590 * when it encounters conditions which are not data related. The handler
591 * executes in an interrupt context such that it must minimize the amount of
592 * processing performed such as transferring data to a thread context. The
593 * status events that can be returned are described in xiic.h.
594 *
595 * @param    InstancePtr points to the XIic instance to be worked on.
596 * @param    CallBackRef is the upper layer callback reference passed back when
597 *           the callback function is invoked.
598 * @param    FuncPtr is the pointer to the callback function.
599 *
600 * @return
601 *
602 * None.
603 *
604 * @note
605 *
606 * The handler is called within interrupt context ...
607 *
608 ****************************************************************************/
609 void
610 XIic_SetStatusHandler(XIic * InstancePtr, void *CallBackRef,
611                       XIic_StatusHandler FuncPtr)
612 {
613         XASSERT_VOID(InstancePtr != NULL);
614         XASSERT_VOID(InstancePtr->IsReady == XCOMPONENT_IS_READY);
615         XASSERT_VOID(FuncPtr != NULL);
616
617         InstancePtr->StatusHandler = FuncPtr;
618         InstancePtr->StatusCallBackRef = CallBackRef;
619 }
620
621 /*****************************************************************************/
622 /**
623 *
624 * Looks up the device configuration based on the unique device ID. The table
625 * IicConfigTable contains the configuration info for each device in the system.
626 *
627 * @param DeviceId is the unique device ID to look for
628 *
629 * @return
630 *
631 * A pointer to the configuration data of the device, or NULL if no match is
632 * found.
633 *
634 * @note
635 *
636 * None.
637 *
638 ******************************************************************************/
639 XIic_Config *
640 XIic_LookupConfig(u16 DeviceId)
641 {
642         XIic_Config *CfgPtr = NULL;
643         int i;
644
645         for (i = 0; i < XPAR_XIIC_NUM_INSTANCES; i++) {
646                 if (XIic_ConfigTable[i].DeviceId == DeviceId) {
647                         CfgPtr = &XIic_ConfigTable[i];
648                         break;
649                 }
650         }
651
652         return CfgPtr;
653 }
654
655 /*****************************************************************************
656 *
657 * This is a stub for the send and recv callbacks. The stub is here in case the
658 * upper layers forget to set the handlers.
659 *
660 * @param    CallBackRef is a pointer to the upper layer callback reference
661 * @param    ByteCount is the number of bytes sent or received
662 *
663 * @return
664 *
665 * None.
666 *
667 * @note
668 *
669 * None.
670 *
671 ******************************************************************************/
672 static void
673 XIic_StubHandler(void *CallBackRef, int ByteCount)
674 {
675         XASSERT_VOID(FALSE);
676 }
677
678 /*****************************************************************************
679 *
680 * This is a stub for the asynchronous error callback. The stub is here in case
681 * the upper layers forget to set the handler.
682 *
683 * @param    CallBackRef is a pointer to the upper layer callback reference
684 * @param    ErrorCode is the Xilinx error code, indicating the cause of the error
685 *
686 * @return
687 *
688 * None.
689 *
690 * @note
691 *
692 * None.
693 *
694 ******************************************************************************/
695 static void
696 XIic_StubStatusHandler(void *CallBackRef, XStatus ErrorCode)
697 {
698         XASSERT_VOID(FALSE);
699 }