Hello, Pardon my C, can you tell me if this function is setup correctly and going to return the correct value to the register??
/* This function sets the DRAM Controller Mode Register to NOP. */ static long set_drc_mode_nop(const struct mem_controller *ctrl) { pci_write_config32(ctrl->f0, DRC, (1<<4)); return 0; }
Thanks - Joe
Quoting joe@smittys.pointclark.net:
Hello, Pardon my C, can you tell me if this function is setup correctly and going to return the correct value to the register??
/* This function sets the DRAM Controller Mode Register to NOP. */ static long set_drc_mode_nop(const struct mem_controller *ctrl) { pci_write_config32(ctrl->f0, DRC, (1<<4)); return 0; }
Thanks - Joe
Let me elaborate on this. I am wondering if I can use a Bitwise Shift Operator in this function or does it need to be a 32 bit hex variable.
pci_write_config32(ctrl->f0, DRC, (1<<4));
Thanks - Joe
joe@smittys.pointclark.net wrote:
Quoting joe@smittys.pointclark.net:
Hello, Pardon my C, can you tell me if this function is setup correctly and going to return the correct value to the register??
/* This function sets the DRAM Controller Mode Register to NOP. */ static long set_drc_mode_nop(const struct mem_controller *ctrl) { pci_write_config32(ctrl->f0, DRC, (1<<4)); return 0; }
Thanks - Joe
Let me elaborate on this. I am wondering if I can use a Bitwise Shift Operator in this function or does it need to be a 32 bit hex variable.
pci_write_config32(ctrl->f0, DRC, (1<<4));
Thanks - Joe
Whoops, sorry, meant to respond. Yes, you can use bitwise shift, it just gets converted to a hex value. Is 0x10 the correct value though? You'd also run into complexities with CBR, which would be something like (1 << 4)|(1 << 5). I'd much rather see NOP defined like it is in the 440bx's raminit.c, it makes things much more readable.
-Corey