Add macros and chipset support for accessing device i/o memory on the alpha.
This commit is contained in:
parent
515cfabc48
commit
bb4752537d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37831
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: chipset.h,v 1.1 1998/06/10 10:54:32 dfr Exp $
|
||||
* $Id: chipset.h,v 1.2 1998/07/12 16:16:22 dfr Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_CHIPSET_H_
|
||||
@ -36,6 +36,13 @@ typedef void alpha_chipset_outb_t(u_int32_t port, u_int8_t data);
|
||||
typedef void alpha_chipset_outw_t(u_int32_t port, u_int16_t data);
|
||||
typedef void alpha_chipset_outl_t(u_int32_t port, u_int32_t data);
|
||||
|
||||
typedef u_int8_t alpha_chipset_readb_t(u_int32_t pa);
|
||||
typedef u_int16_t alpha_chipset_readw_t(u_int32_t pa);
|
||||
typedef u_int32_t alpha_chipset_readl_t(u_int32_t pa);
|
||||
typedef void alpha_chipset_writeb_t(u_int32_t pa, u_int8_t data);
|
||||
typedef void alpha_chipset_writew_t(u_int32_t pa, u_int16_t data);
|
||||
typedef void alpha_chipset_writel_t(u_int32_t pa, u_int32_t data);
|
||||
|
||||
typedef int alpha_chipset_maxdevs_t(u_int bus);
|
||||
typedef u_int8_t alpha_chipset_cfgreadb_t(u_int, u_int, u_int, u_int);
|
||||
typedef u_int16_t alpha_chipset_cfgreadw_t(u_int, u_int, u_int, u_int);
|
||||
@ -59,6 +66,16 @@ typedef struct alpha_chipset {
|
||||
alpha_chipset_outw_t* outw;
|
||||
alpha_chipset_outl_t* outl;
|
||||
|
||||
/*
|
||||
* Memory access
|
||||
*/
|
||||
alpha_chipset_readb_t* readb;
|
||||
alpha_chipset_readw_t* readw;
|
||||
alpha_chipset_readl_t* readl;
|
||||
alpha_chipset_writeb_t* writeb;
|
||||
alpha_chipset_writew_t* writew;
|
||||
alpha_chipset_writel_t* writel;
|
||||
|
||||
/*
|
||||
* PCI configuration access
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: cpufunc.h,v 1.1 1998/06/10 10:54:51 dfr Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_CPUFUNC_H_
|
||||
@ -41,6 +41,21 @@
|
||||
#define outw(port, data) chipset.outw(port, data)
|
||||
#define outl(port, data) chipset.outl(port, data)
|
||||
|
||||
#define readb(pa) chipset.readb(pa)
|
||||
#define readw(pa) chipset.readw(pa)
|
||||
#define readl(pa) chipset.readl(pa)
|
||||
#define writeb(pa,v) chipset.writeb(pa,v)
|
||||
#define writew(pa,v) chipset.writew(pa,v)
|
||||
#define writel(pa,v) chipset.writel(pa,v)
|
||||
|
||||
/*
|
||||
* String version of IO memory access ops:
|
||||
*/
|
||||
extern void memcpy_fromio(void *, u_int32_t, size_t);
|
||||
extern void memcpy_toio(u_int32_t, void *, size_t);
|
||||
extern void memset_io(u_int32_t, int, size_t);
|
||||
|
||||
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* !_MACHINE_CPUFUNC_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user