AnsweredAssumed Answered

why mcc_get_bookeeping_data() fail!

Question asked by Renfei Che on Jul 1, 2016
Latest reply on Feb 27, 2017 by niranjanbc

Hello Everyone!

I am writting mcc driver, when the mcc_initialize() is called, the following code always return NULL.

bookeeping_data = (MCC_BOOKEEPING_STRUCT *)mcc_get_bookeeping_data();

I checked the mcc_get_bookeeping_data() function, the following is source code:

MCC_BOOKEEPING_STRUCT *mcc_get_bookeeping_data(void)

{

  bookeeping_data = (MCC_BOOKEEPING_STRUCT *)ioremap_nocache

  (MCC_BASE_ADDRESS, sizeof(struct mcc_bookeeping_struct));

  mcc_shm_offset = (unsigned long)bookeeping_data

  - (unsigned long)MCC_BASE_ADDRESS;

  return bookeeping_data;

}

I found the ioremap_nocache() always fail and return NULL. The MCC_BASE_ADDRESS is defined in mcc_config_linux.h as follows:

/* base address of shared memory */

#define MCC_BASE_ADDRESS               (0xBFF00000)

I don't know the MCC_BASE_ADDRESS is correct or not, who can give me any idea?

 

Best regrads!

Outcomes