Changeset 245 for trunk/hal


Ignore:
Timestamp:
Jul 20, 2017, 12:46:10 PM (7 years ago)
Author:
max@…
Message:

Hide soclib_tty.

Location:
trunk/hal
Files:
3 edited

Legend:

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

    r216 r245  
    2525#include <chdev.h>
    2626
    27 void hal_drivers_txt_init(chdev_t *dev);
    28 void hal_drivers_xcu_init(chdev_t *dev, lid_t lid);
    29 void hal_drivers_xcu_disable_irq(chdev_t *icu, uint32_t irq_index,
    30     uint32_t irq_type, lid_t lid);
    31 void hal_drivers_xcu_enable_irq(chdev_t *icu, uint32_t irq_index,
    32     uint32_t irq_type, lid_t lid);
     27void hal_drivers_txt_init(chdev_t *txt, uint32_t impl);
    3328
    34 void hal_drivers_pic_init(chdev_t *dev);
     29void hal_drivers_pic_init(chdev_t *pic);
    3530
    36 void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl);
     31void hal_drivers_ioc_init(chdev_t *ioc, uint32_t impl);
    3732
    3833#endif  /* HAL_DRIVERS_H_ */
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r238 r245  
    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 */
     
    3535
    3636//////////////////////////////////////////
    37 void hal_drivers_txt_init( chdev_t * txt )
     37void hal_drivers_txt_init( chdev_t  * txt,
     38                           uint32_t   impl )
    3839{
    39         soclib_tty_init( txt );
     40        if( impl == IMPL_TXT_TTY )
     41        {
     42                soclib_tty_init( txt );
     43        }
     44        else
     45        {
     46                assert( false , __FUNCTION__ , "undefined TXT device implementation" );
     47        }
    4048}
    4149
  • trunk/hal/x86_64/core/hal_drivers.c

    r234 r245  
    3030#include <pic_apic.h>
    3131
    32 void hal_drivers_txt_init(chdev_t *dev)
     32void hal_drivers_txt_init(chdev_t *txt, uint32_t impl)
    3333{
    34         soclib_tty_init(dev);
     34        soclib_tty_init(txt);
    3535}
    3636
    3737/* -------------------------------------------------------------------------- */
    3838
    39 void hal_drivers_xcu_init(chdev_t *dev, lid_t lid)
     39void hal_drivers_pic_init(chdev_t *pic)
    4040{
    41         soclib_xcu_init(dev, lid);
    42 }
     41        pic_apic_init(pic);
    4342
    44 void hal_drivers_xcu_disable_irq(chdev_t *icu, uint32_t irq_index,
    45     uint32_t irq_type, lid_t lid)
    46 {
    47         soclib_xcu_disable_irq(icu, irq_index, irq_type, lid);
    48 }
    49 
    50 void hal_drivers_xcu_enable_irq(chdev_t *icu, uint32_t irq_index,
    51     uint32_t irq_type, lid_t lid)
    52 {
    53         soclib_xcu_enable_irq(icu, irq_index, irq_type, lid);
     43        /* update the PIC chdev extension */
     44        pic->ext.pic.enable_timer = &pic_apic_enable_timer;
     45        pic->ext.pic.enable_irq   = &pic_apic_enable_irq;
     46        pic->ext.pic.disable_irq  = &pic_apic_disable_irq;
     47        pic->ext.pic.bind_irq     = &pic_apic_bind_irq;
     48        pic->ext.pic.send_ipi     = &pic_apic_send_ipi;
     49        pic->ext.pic.extend_init  = &pic_apic_extend_init;
    5450}
    5551
    5652/* -------------------------------------------------------------------------- */
    5753
    58 void hal_drivers_pic_init(chdev_t *dev)
     54void hal_drivers_ioc_init(chdev_t *ioc, uint32_t impl)
    5955{
    60         pic_apic_init(dev);
    61 
    62         /* update the PIC chdev extension */
    63         dev->ext.pic.enable_timer = &pic_apic_enable_timer;
    64         dev->ext.pic.enable_irq   = &pic_apic_enable_irq;
    65         dev->ext.pic.disable_irq  = &pic_apic_disable_irq;
    66         dev->ext.pic.bind_irq     = &pic_apic_bind_irq;
    67         dev->ext.pic.send_ipi     = &pic_apic_send_ipi;
    68         dev->ext.pic.extend_init  = &pic_apic_extend_init;
     56        ioc_ata_init(ioc);
    6957}
    7058
    71 /* -------------------------------------------------------------------------- */
    72 
    73 void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl)
    74 {
    75         ioc_ata_init(dev);
    76 }
    77 
Note: See TracChangeset for help on using the changeset viewer.