Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Trying to change DFS on netbsd-5



Hi,

I'd like to change the clock frequency of my 1.5 GHz Powerbook G4 running netbsd-5 but I can't figure out why any attempt to clear the DFS2 bit in the HID1 register simply causes the machine to lock. I tried making the code as simple as possible by adding this to obio.c:

static u_int hid1;
#define HID1_DFS2       0x00400000
#define SPR_HID1        0x3f1

...

bus_space_write_1(sc->sc_tag, sc->sc_bh, sc->sc_voltage, 5);
DELAY(1000);
printf("OBIO Voltage changed successfully.\n");
hid1 = mfspr(SPR_HID1);
printf("OBIO hid1 read is %x\n", hid1);
hid1 &= ~HID1_DFS2;
printf("OBIO hid1 changed is %x\n", hid1);
__asm volatile("sync");
mtspr(SPR_HID1, hid1);
__asm volatile("sync;isync");
DELAY(1000);


HID1 is 0x8040ec80, but when 0x8000ec80 is written to HID1, the machine completely locks. Am I forgetting or missing something? The MPC7450UM.pdf document only mentions the sync and isync which is already in there.

Thanks,
John


Home | Main Index | Thread Index | Old Index