]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/npe/IxEthDBEvents.c
imx6 SION bit has to be on for the pins that are used as ENET_REF_CLK
[karo-tx-uboot.git] / drivers / net / npe / IxEthDBEvents.c
index 4d44e0333757458ee3fa15a2ce0c04160acfd3dd..5b3be0b6c1dc21f982ca93cd58019f7d8ef68b4f 100644 (file)
  * All rights reserved.
  * 
  * @par
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Intel Corporation nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * @par
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * 
+ * SPDX-License-Identifier:    BSD-3-Clause
  * @par
  * -- End of Copyright Notice --
  */
@@ -61,8 +37,8 @@ IX_ETH_DB_PRIVATE PortEventQueue eventQueue;
 IX_ETH_DB_PRIVATE IxOsalMutex eventQueueLock;
 IX_ETH_DB_PRIVATE IxOsalMutex portUpdateLock;
 
-IX_ETH_DB_PRIVATE BOOL ixEthDBLearningShutdown      = FALSE;
-IX_ETH_DB_PRIVATE BOOL ixEthDBEventProcessorRunning = FALSE;
+IX_ETH_DB_PRIVATE BOOL ixEthDBLearningShutdown      = false;
+IX_ETH_DB_PRIVATE BOOL ixEthDBEventProcessorRunning = false;
 
 /* imported data */
 extern HashTable dbHashtable;
@@ -143,7 +119,7 @@ IxEthDBStatus ixEthDBStartLearningFunction(void)
         return IX_ETH_DB_FAIL;
     }
 
-    ixEthDBLearningShutdown = FALSE;
+    ixEthDBLearningShutdown = false;
 
     /* create processor loop thread */
     if (ixOsalThreadCreate(&eventProcessorThread, &threadAttr, ixEthDBEventProcessorLoop, NULL) != IX_SUCCESS)
@@ -173,7 +149,7 @@ IxEthDBStatus ixEthDBStartLearningFunction(void)
 IX_ETH_DB_PUBLIC
 IxEthDBStatus ixEthDBStopLearningFunction(void)
 {
-    ixEthDBLearningShutdown = TRUE;
+    ixEthDBLearningShutdown = true;
 
     /* wake up event processing loop to actually process the shutdown event */
     ixOsalSemaphorePost(&eventQueueSemaphore);
@@ -253,13 +229,13 @@ void ixEthDBEventProcessorLoop(void *unused1)
     IxEthDBPortMap triggerPorts;
     IxEthDBPortId portIndex;
 
-    ixEthDBEventProcessorRunning = TRUE;
+    ixEthDBEventProcessorRunning = true;
 
     IX_ETH_DB_EVENTS_TRACE("DB: (Events) Event processor loop was started\n");
 
     while (!ixEthDBLearningShutdown)
     {
-        BOOL keepProcessing    = TRUE;
+        BOOL keepProcessing    = true;
         UINT32 processedEvents = 0;
 
         IX_ETH_DB_EVENTS_VERBOSE_TRACE("DB: (Events) Waiting for new learning event...\n");
@@ -302,7 +278,7 @@ void ixEthDBEventProcessorLoop(void *unused1)
                 if (processedEvents > EVENT_PROCESSING_LIMIT /* maximum burst reached? */
                     || ixOsalSemaphoreTryWait(&eventQueueSemaphore) != IX_SUCCESS) /* or empty queue? */
                 {
-                    keepProcessing = FALSE;
+                    keepProcessing = false;
                 }
             }
 
@@ -313,10 +289,10 @@ void ixEthDBEventProcessorLoop(void *unused1)
     /* turn off automatic updates */
     for (portIndex = 0 ; portIndex < IX_ETH_DB_NUMBER_OF_PORTS ; portIndex++)
     {
-        ixEthDBPortInfo[portIndex].updateMethod.updateEnabled = FALSE;
+        ixEthDBPortInfo[portIndex].updateMethod.updateEnabled = false;
     }
 
-    ixEthDBEventProcessorRunning = FALSE;
+    ixEthDBEventProcessorRunning = false;
 }
 
 /**
@@ -381,7 +357,7 @@ void ixEthDBProcessEvent(PortEvent *local_event, IxEthDBPortMap triggerPorts)
  *
  * @param macAddr MAC address of the new record
  * @param portID port ID of the new record
- * @param staticEntry TRUE if record is static, FALSE if dynamic
+ * @param staticEntry true if record is static, false if dynamic
  *
  * @return IX_ETH_DB_SUCCESS if the event creation was
  * successfull or IX_ETH_DB_BUSY if the event queue is full
@@ -430,7 +406,7 @@ IxEthDBStatus ixEthDBTriggerRemovePortUpdate(IxEthDBMacAddr *macAddr, IxEthDBPor
 {
     if (ixEthDBPeek(macAddr, IX_ETH_DB_ALL_FILTERING_RECORDS) != IX_ETH_DB_NO_SUCH_ADDR)
     {
-        return ixEthDBTriggerPortUpdate(IX_ETH_DB_REMOVE_FILTERING_RECORD, macAddr, portID, FALSE);
+        return ixEthDBTriggerPortUpdate(IX_ETH_DB_REMOVE_FILTERING_RECORD, macAddr, portID, false);
     }
     else
     {