2007-03-26 03:43:48 -06:00
|
|
|
#include "drmP.h"
|
|
|
|
#include "drm.h"
|
|
|
|
#include "nouveau_drv.h"
|
|
|
|
#include "nouveau_drm.h"
|
|
|
|
|
|
|
|
int
|
2007-07-12 23:09:31 -06:00
|
|
|
nv04_mc_init(struct drm_device *dev)
|
2007-03-26 03:43:48 -06:00
|
|
|
{
|
2007-07-12 23:09:31 -06:00
|
|
|
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
2008-01-03 09:57:55 -07:00
|
|
|
uint32_t saved_pci_nv_1, saved_pci_nv_19;
|
|
|
|
|
|
|
|
saved_pci_nv_1 = NV_READ(NV04_PBUS_PCI_NV_1);
|
|
|
|
saved_pci_nv_19 = NV_READ(NV04_PBUS_PCI_NV_19);
|
|
|
|
|
|
|
|
/* clear busmaster bit */
|
|
|
|
NV_WRITE(NV04_PBUS_PCI_NV_1, saved_pci_nv_1 & ~(0x00000001 << 2));
|
|
|
|
/* clear SBA, AGP and FW bits */
|
|
|
|
NV_WRITE(NV04_PBUS_PCI_NV_19, saved_pci_nv_19 & 0xfffff00f);
|
2007-03-26 03:43:48 -06:00
|
|
|
|
2007-04-05 11:03:59 -06:00
|
|
|
/* Power up everything, resetting each individual unit will
|
|
|
|
* be done later if needed.
|
|
|
|
*/
|
|
|
|
NV_WRITE(NV03_PMC_ENABLE, 0xFFFFFFFF);
|
|
|
|
|
2008-01-03 09:57:55 -07:00
|
|
|
/* and restore (gives effect of resetting AGP) */
|
|
|
|
NV_WRITE(NV04_PBUS_PCI_NV_19, saved_pci_nv_19);
|
|
|
|
NV_WRITE(NV04_PBUS_PCI_NV_1, saved_pci_nv_1);
|
|
|
|
|
2007-03-26 03:43:48 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2007-07-12 23:09:31 -06:00
|
|
|
nv04_mc_takedown(struct drm_device *dev)
|
2007-03-26 03:43:48 -06:00
|
|
|
{
|
|
|
|
}
|