/* This function will return a 32-bit address in the desired channel and rank.  */
uint32_t get_addr(uint8_t channel, uint8_t rank)
/* This function will return a 32-bit address in the desired channel and rank.  */
uint32_t get_addr(uint8_t channel, uint8_t rank)
{
	uint32_t offset = 32 * 1024 * 1024;
	if (channel > 0) {
		DPF(D_ERROR, "ILLEGAL CHANNEL\n");
		DEAD_LOOP();
	}
	if (rank > 1) {
		DPF(D_ERROR, "ILLEGAL RANK\n");
		DEAD_LOOP();
	}
	offset += rank * (256 * 1024 * 1024);
	return offset;
}