AnsweredAssumed Answered

MCF52259 QSPI 5 Chip select

Question asked by Corradi Fulvio on Sep 20, 2010
Latest reply on Sep 24, 2010 by Petr MacHala



i'm working on a custom board with 3 internal (cs0,cs2,cs3 ) + 2 external (gpio) chip select for spi device.


I got a look at the driver code and found that the ioctl  install the callback function



 callbacks = (SPI_CS_CALLBACK_STRUCT_PTR)(param_ptr);
                for (num = 0; num < MCF5XXX_QSPI_CS_COUNT; num++)
                    if (0 != (callbacks->MASK & (1 << num)))
                        io_info_ptr->CS_CALLBACK[num] = callbacks->CALLBACK;
                        io_info_ptr->CS_USERDATA[num] = callbacks->USERDATA;


The internal structure has a callback function and userdata for each CS but install the same values on each CS.


the MCF5XXX_QSPI_CS_COUNT is defined as 4, this is the total CS count (included CS0,CS2,CS3 ) or just the callback managed CS?


if it is the total CS count how can i manage 5 CS? Do i need to modify the driver code?