Changeset 259 for trunk


Ignore:
Timestamp:
Jul 20, 2017, 3:06:35 PM (7 years ago)
Author:
max@…
Message:

Hide soclib_nic.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_drivers.h

    r257 r259  
    1616 *
    1717 * You should have received a copy of the GNU General Public License
    18  * along with ALMOS-MKH.; if not, write to the Free Software Foundation,
     18 * along with ALMOS-MKH; if not, write to the Free Software Foundation,
    1919 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    2020 */
     
    3333void hal_drivers_mmc_init(chdev_t *mmc, uint32_t impl);
    3434
     35void hal_drivers_nic_init(chdev_t *nic, uint32_t impl);
     36
    3537#endif  /* HAL_DRIVERS_H_ */
    3638
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r257 r259  
    112112}
    113113
     114///////////////////////////////////////////////////////////////////////////////
     115//    NIC
     116///////////////////////////////////////////////////////////////////////////////
     117
     118//////////////////////////////////////////
     119void hal_drivers_nic_init( chdev_t  * nic,
     120                           uint32_t   impl )
     121{
     122    if( impl == IMPL_NIC_SOC )
     123    {
     124        soclib_nic_init( nic );
     125    }
     126    else
     127    {
     128        assert( false , __FUNCTION__ , "undefined NIC device implementation" );
     129    }
     130}
     131
  • trunk/hal/tsar_mips32/drivers/soclib_nic.c

    r75 r259  
    3939    uint32_t    i;
    4040    kmem_req_t  req;
     41
     42    // set driver specific fields in chdev descriptor
     43    chdev->cmd = &soclib_nic_cmd;
     44    chdev->isr = &soclib_nic_isr;
    4145   
    4246    // get hardware device cluster and local pointer
  • trunk/hal/x86_64/core/hal_drivers.c

    r257 r259  
    7171}
    7272
     73/* -------------------------------------------------------------------------- */
     74
     75void hal_drivers_nic_init(chdev_t *nic, uint32_t impl)
     76{
     77        x86_panic("NIC driver not implemented");
     78}
  • trunk/kernel/devices/dev_nic.c

    r238 r259  
    2727#include <chdev.h>
    2828#include <thread.h>
    29 #include <soclib_nic.h>
     29#include <hal_drivers.h>
    3030#include <dev_nic.h>
    3131
     
    5454    else        snprintf( nic->name , 16 , "nic_tx_%d" , channel );
    5555
    56     // set driver specific fields in chdev descriptor and call driver init function
    57     if( impl == IMPL_NIC_SOC )
    58     {
    59         nic->cmd = &soclib_nic_cmd;
    60         nic->isr = &soclib_nic_isr;
    61         soclib_nic_init( nic );
    62     }
    63     else
    64     {
    65         assert( false , __FUNCTION__ , "undefined NIC device implementation" );
    66     }
     56    // call driver init function
     57    hal_drivers_nic_init( nic , impl );
    6758
    6859    // select a core to execute the NIC server thread
Note: See TracChangeset for help on using the changeset viewer.