Do the additional PCI memory initialization after configuring DMA.

This commit is contained in:
thorpej 2000-11-29 06:29:10 +00:00
parent 8f20972db2
commit 96294f7b26
3 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: irongate.c,v 1.2 2000/06/26 18:19:26 thorpej Exp $ */
/* $NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.2 2000/06/26 18:19:26 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -157,6 +157,12 @@ irongate_attach(struct device *parent, struct device *self, void *aux)
irongate_dma_init(icp);
/*
* Do PCI memory initialization that needs to be deferred until
* malloc is safe.
*/
irongate_bus_mem_init2(&icp->ic_memt, icp);
switch (cputype) {
#ifdef API_UP1000
case ST_API_NAUTILUS:

View File

@ -1,4 +1,4 @@
/* $NetBSD: irongate_bus_mem.c,v 1.5 2000/11/29 05:56:49 thorpej Exp $ */
/* $NetBSD: irongate_bus_mem.c,v 1.6 2000/11/29 06:29:10 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(1, "$NetBSD: irongate_bus_mem.c,v 1.5 2000/11/29 05:56:49 thorpej Exp $");
__KERNEL_RCSID(1, "$NetBSD: irongate_bus_mem.c,v 1.6 2000/11/29 06:29:10 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -53,8 +53,6 @@ __KERNEL_RCSID(1, "$NetBSD: irongate_bus_mem.c,v 1.5 2000/11/29 05:56:49 thorpej
#include <alpha/pci/irongatereg.h>
#include <alpha/pci/irongatevar.h>
void irongate_bus_mem_init_hook(bus_space_tag_t, void *);
#define CHIP irongate
#define CHIP_EX_MALLOC_SAFE(v) (((struct irongate_config *)(v))->ic_mallocsafe)
@ -62,8 +60,6 @@ void irongate_bus_mem_init_hook(bus_space_tag_t, void *);
#define CHIP_MEM_SYS_START(v) IRONGATE_MEM_BASE
#define CHIP_MEM_INIT_HOOK(t, v) irongate_bus_mem_init_hook((t), (v))
/*
* AMD 751 core logic appears on EV6. We require at least EV56
* support for the assembler to emit BWX opcodes.
@ -78,7 +74,7 @@ extern phys_ram_seg_t mem_clusters[];
extern int mem_cluster_cnt;
void
irongate_bus_mem_init_hook(bus_space_tag_t t, void *v)
irongate_bus_mem_init2(bus_space_tag_t t, void *v)
{
int i, error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: irongatevar.h,v 1.2 2000/11/18 05:56:20 thorpej Exp $ */
/* $NetBSD: irongatevar.h,v 1.3 2000/11/29 06:29:10 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -73,4 +73,6 @@ void irongate_dma_init(struct irongate_config *);
void irongate_bus_io_init(bus_space_tag_t, void *);
void irongate_bus_mem_init(bus_space_tag_t, void *);
void irongate_bus_mem_init2(bus_space_tag_t, void *);
pcireg_t irongate_conf_read0(void *, pcitag_t, int);