How can I use a DCR start address in the PPC440 that is something other than 0x00?
The DCR block start address can be any of 0x000, 0x100, 0x200, 0x300, etc., and any DCR device, like the PPC440, hard DMA and DCR interrupt controller, has to use the chosen DCR start address to calculate its own DCR address.
All DCR device drivers access the hardware through a pair of functions, XIo_DcrOut() and XIo_DcrIn(), which are in the PPC440 driver xio_dcr.c. These two functions assume that the DCR block start address is always 0x00, which matches what BSB uses as the default address.
If you need to use a non-default DCR block address, you must make one of the following software changes:
- In xio_dcr.c of PPC440 driver, change XDCR_0_BASEADDR to match the real DCR start address.
- Pass the sum of the real DCR block start address and the offset address of the register, instead of the offset, to every XIo_DcrOut() / XIo_DcrIn() call.
- Replace all XIo_DcrOut() / XIo_DcrIn() calls in the software, including the provided drivers, with XIo_DcrIndirectAddrReadReg() / XIo_DcrIndirectAddrWriteReg(), which the DCR base address is passed to as an argument.
NOTE: If libgen re-runs, you will have to redo any changes that you made to the drivers.