source: rtems/c/src/libchip/ide/ide_ctrl_cfg.h @ ee4f57d

4.104.114.84.9
Last change on this file since ee4f57d was ee4f57d, checked in by Ralf Corsepius <ralf.corsepius@…>, on Mar 23, 2004 at 9:59:52 AM

2004-03-23 Ralf Corsepius <ralf_corsepius@…>

  • libchip/ide/ata.c, libchip/ide/ata_internal.h, libchip/ide/ide_controller.c, libchip/ide/ide_ctrl_cfg.h, libchip/ide/ide_ctrl_io.h, libchip/network/cs8900.c, libchip/network/dec21140.c, libchip/network/elnk.c, libchip/network/if_fxp.c, libchip/network/open_eth.c, libchip/network/open_eth.h, libchip/network/sonic.c, libchip/network/sonic.h, libchip/rtc/icm7170.c, libchip/rtc/icm7170.h, libchip/rtc/icm7170_reg.c, libchip/rtc/icm7170_reg2.c, libchip/rtc/icm7170_reg4.c, libchip/rtc/icm7170_reg8.c, libchip/rtc/m48t08.c, libchip/rtc/m48t08.h, libchip/rtc/m48t08_reg.c, libchip/rtc/m48t08_reg2.c, libchip/rtc/m48t08_reg4.c, libchip/rtc/m48t08_reg8.c, libchip/rtc/rtc.h, libchip/serial/mc68681.c, libchip/serial/mc68681.h, libchip/serial/mc68681_reg.c, libchip/serial/mc68681_reg2.c, libchip/serial/mc68681_reg4.c, libchip/serial/mc68681_reg8.c, libchip/serial/ns16550.c, libchip/serial/ns16550_p.h, libchip/serial/serial.h, libchip/serial/z85c30.c, libchip/serial/z85c30.h, libchip/serial/z85c30_p.h, libchip/serial/z85c30_reg.c, libchip/shmdr/addlq.c, libchip/shmdr/cnvpkt.c, libchip/shmdr/dump.c, libchip/shmdr/fatal.c, libchip/shmdr/getlq.c, libchip/shmdr/init.c, libchip/shmdr/initlq.c, libchip/shmdr/intr.c, libchip/shmdr/poll.c, libchip/shmdr/send.c, libchip/shmdr/shm_driver.h: Convert to using c99 fixed-size types.
  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*
2 * ide_ctrl_cfg.h
3 *
4 * LibChip library IDE controller header file - structuers used for
5 * configuration and plugin interface definition.
6 *
7 * Copyright (C) 2002 OKTET Ltd., St.-Petersburg, Russia
8 * Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.com/license/LICENSE.
13 *
14 * $Id$
15 */
16#ifndef __IDE_CTRL_CFG_H__
17#define __IDE_CTRL_CFG_H__
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/blkdev.h>
24
25/*
26 * Avaible drivers for IDE controllers
27 */
28typedef enum {
29    IDE_STD,
30    IDE_CUSTOM                /* BSP specific driver */
31} ide_ctrl_devs_t;
32
33/*
34 * Each driver for a particular controller have to provide following
35 * functions in such a structure. The only field which should not be NULL
36 * is contInit.
37 */
38typedef struct ide_ctrl_fns_s {
39    boolean           (*ctrl_probe)(int minor); /* probe routine */
40    void              (*ctrl_initialize)(int minor);
41    int               (*ctrl_control)(int minor, uint32_t   command, 
42                                      void *arg);
43    /*
44     * Functions which allow read/write registers of a particular controller.
45     * (these functions may be used from ide_controller_read_register,
46     * ide_controller_write_register)
47     */
48    void    (*ctrl_reg_read)(int minor, int regist, uint16_t   *value);
49    void    (*ctrl_reg_write)(int minor, int regist, uint16_t   value);
50   
51    /*
52     * The function allows to escape overhead for read/write register
53     * functions calls
54     */
55    void  (*ctrl_read_block)(int minor, uint16_t   block_size, 
56                             blkdev_sg_buffer *bufs, uint32_t   *cbuf,
57                             uint32_t   *pos);
58    void  (*ctrl_write_block)(int minor, uint16_t   block_size,
59                              blkdev_sg_buffer *bufs, uint32_t   *cbuf,
60                              uint32_t   *pos);
61   
62    rtems_status_code (*ctrl_config_io_speed)(int minor, 
63                                              uint8_t   modes_available);
64} ide_ctrl_fns_t;
65
66/*
67 * IDE Controller configuration. Table of such configurations is provided
68 * by BSP
69 */
70typedef struct ide_controller_bsp_table_s {
71    char                *name;  /* device name */
72    ide_ctrl_devs_t      type;  /* chip type */
73    ide_ctrl_fns_t      *fns;   /* pointer to the set of driver routines */
74    boolean              (*probe)(int minor); /* general probe routine */
75    uint8_t              status; /* initialized/non initialized. Should be set
76                                  * to zero by static initialization 
77                                  */
78    uint32_t             port1; /* port number for the port of the device */
79    rtems_boolean        int_driven; /* interrupt/poll driven */
80    rtems_vector_number  int_vec; /* the interrupt vector of the device */
81    void                *params;  /* contains either device specific data or a
82                                   * pointer to s device specific information
83                                   * table
84                                   */
85} ide_controller_bsp_table_t;
86
87/* IDE controllers Table */
88extern ide_controller_bsp_table_t    IDE_Controller_Table[];
89
90/* Number of rows in IDE_Controller_Table */
91extern unsigned long                 IDE_Controller_Count;
92
93
94#define IDE_CTRL_MAX_MINOR_NUMBER   4
95
96#define IDE_CTRL_NON_INITIALIZED    0
97#define IDE_CTRL_INITIALIZED        1
98
99#ifdef __cplusplus
100}
101#endif
102
103
104#endif /* __IDE_CTRL_CFG_H__ */
105
106
107
Note: See TracBrowser for help on using the repository browser.