The following issue can occur when programming a pair of QSPI Flash ROMs connected in parallel mode.
When switching between linear mode and I/O mode using the function XQspiPs_SetOptions() (in file xqspips_options.c), XQSPIPS_LQSPI_MODE_OPTION overwrites the mode setting ('stacked' or 'parallel') previously chosen by XQspiPs_LinearInit().
The register XQSPIPS_LQSPI_CR is simply initialized with XQSPIPS_CR_RST_STATE.
When switching to linear mode using SetOptions, the reset value is written to have a valid linear mode setting.
Once I/O to linear switching happens, you are expected to select the bus configuration, type of read etc.
The set_lqspiconfig API can also be used after switching to linear mode to choose these settings.
LinearInit is a more recently added low level API (It does not use the instance pointer and instead uses the base address directly)
This API makes the stacked/parallel selection based on CONNECTION_MODE i.e. the hardware connection.
This was implemented to make things easier.
Ideally, you should provide information about the flash configuration to be used and the driver should set it.
SetOptions and SetLqspiConfig were targeted to be generic that way.
Note: there are other ways to retain the existing LQSPI setting if required (for example by ORing the reset value).