⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serial_ini.h

📁 MIPS下的boottloader yamon 的源代码
💻 H
字号:

/************************************************************************
 *
 *      SERIAL_INI.h
 *
 *      The 'SERIAL_INI' module asserts the required install function
 *      of the serial device drivers.
 *
 *
 * ######################################################################
 *
 * Copyright (c) 1999-2000 MIPS Technologies, Inc. All rights reserved. 
 * 
 * Unpublished rights reserved under the Copyright Laws of the United States of 
 * America. 
 * 
 * This document contains information that is proprietary to MIPS Technologies, 
 * Inc. ("MIPS Technologies"). Any copying, modifying or use of this information 
 * (in whole or in part) which is not expressly permitted in writing by MIPS 
 * Technologies or a contractually-authorized third party is strictly 
 * prohibited. At a minimum, this information is protected under unfair 
 * competition laws and the expression of the information contained herein is 
 * protected under federal copyright laws. Violations thereof may result in 
 * criminal penalties and fines. 
 * MIPS Technologies or any contractually-authorized third party reserves the 
 * right to change the information contained in this document to improve 
 * function, design or otherwise. MIPS Technologies does not assume any 
 * liability arising out of the application or use of this information. Any 
 * license under patent rights or any other intellectual property rights owned 
 * by MIPS Technologies or third parties shall be conveyed by MIPS Technologies 
 * or any contractually-authorized third party in a separate license agreement 
 * between the parties. 
 * The information contained in this document constitutes one or more of the 
 * following: commercial computer software, commercial computer software 
 * documentation or other commercial items. If the user of this information, or 
 * any related documentation of any kind, including related technical data or 
 * manuals, is an agency, department, or other entity of the United States 
 * government ("Government"), the use, duplication, reproduction, release, 
 * modification, disclosure, or transfer of this information, or any related 
 * documentation of any kind, is restricted in accordance with Federal 
 * Acquisition Regulation 12.212 for civilian agencies and Defense Federal 
 * Acquisition Regulation Supplement 227.7202 for military agencies. The use of 
 * this information by the Government is further restricted in accordance with 
 * the terms of the license agreement(s) and/or applicable contract terms and 
 * conditions covering this information from MIPS Technologies or any 
 * contractually-authorized third party. 
 *
 ************************************************************************/



/* START OF INI section: INIT_DECLARATIONS */
#ifdef INIT_DECLARATIONS

#include <sysdefs.h>
#include <syscon_api.h>
#include <io_api.h>
#include <product.h>
#include <serial_au1000_api.h>
#include <serial_ti16550_api.h>
#include <serial_saa9730_api.h>


#endif
/* END   OF INI section: INIT_DECLARATIONS */



/* START OF INI section: INIT_INSTALL */
#ifdef INIT_INSTALL
{
    UINT32  product;
    UINT32  tty;
    UINT32  major, minor;

#if 0
    /* get product ID */
    SYSCON_read( SYSCON_BOARD_PRODUCTID_ID, &product, sizeof(product) );

    if( product == PRODUCT_ATLASA_ID )
    {
        /* Install the serial SAA9730 device driver */	 
        SERIAL_SAA9730_install();
    }

    if( (product == PRODUCT_ATLASA_ID)  ||
        (product == PRODUCT_SEAD_ID)    ||
        (product == PRODUCT_SEAD2_ID)   ||
        (product == PRODUCT_MALTA_ID) )
    {
        /* Install the serial TI16550 device driver */	 
        SERIAL_TI16550_install();
    }

	if(product == PRODUCT_PB1000_ID)
	{
		SERIAL_AU1000_install();
	}

    /* TTY0 */
    tty = PORT_TTY0;

    SYSCON_read( SYSCON_COM_TTY0_MAJOR, (void *)(&major), sizeof(UINT32) );
    SYSCON_read( SYSCON_COM_TTY0_MINOR, (void *)(&minor), sizeof(UINT32) );
    
    IO_init( major, minor, &tty );


    /* TTY1 */
    tty = PORT_TTY1;

    SYSCON_read( SYSCON_COM_TTY1_MAJOR, (void *)(&major), sizeof(UINT32) );
    SYSCON_read( SYSCON_COM_TTY1_MINOR, (void *)(&minor), sizeof(UINT32) );
    
    IO_init( major, minor, &tty );


#else
    /* AMD Au1x00 UART0 and UART3 */

    SERIAL_AU1000_install();   /* install the Au1x00 uart dev drivers */

    /* TTY0 (UART0) */
    tty = PORT_TTY0;
    SYSCON_read( SYSCON_COM_TTY0_MAJOR, (void *)(&major), sizeof(UINT32) );
    SYSCON_read( SYSCON_COM_TTY0_MINOR, (void *)(&minor), sizeof(UINT32) );
    IO_init( major, minor, &tty );

    /* TTY1 (UART3) */
    tty = PORT_TTY1;
    SYSCON_read( SYSCON_COM_TTY1_MAJOR, (void *)(&major), sizeof(UINT32) );
    SYSCON_read( SYSCON_COM_TTY1_MINOR, (void *)(&minor), sizeof(UINT32) );
    IO_init( major, minor, &tty );
#endif

}
#endif 
/* END   OF INI section: INIT_INSTALL */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -