Commit 7d1b7ade authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Federico Vaga

kernel: store base addresses in device structure

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 9805701f
......@@ -291,6 +291,14 @@ int fa_probe(struct fmc_device *fmc)
}
dev_info(fmc->hwdev, "Gateware successfully loaded\n");
/* Mark base addresses (will come from sdb, later) */
//fa->fa_irq_vic_base -- not existent yet in this gateware
//fa->fa_adc_csr_base = CHx_GAIN;
//fa->fa_irq_adc_base = ENABLE_MASK;
fa->fa_utc_base = FA_UTC_MEM_OFF;
fa->fa_spi_base = FA_SPI_MEM_OFF;
fa->fa_ow_base = FA_OWI_MEM_OFF;
/* init all subsystems */
for (i = 0, m = mods; i < ARRAY_SIZE(mods); i++, m++) {
dev_dbg(&fmc->dev, "Calling init for \"%s\"\n", m->name);
......
......@@ -93,10 +93,22 @@ struct fa_dma_item {
* @dma_list_item is a DMA address pointer to the fa_dma_item list
*/
struct fa_dev {
/* the pointer to the fmc_device generic structure */
struct fmc_device *fmc;
/* the pointer to the real zio_device in use */
struct zio_device *zdev;
/* the pointer to the fake zio_device, used for init/remove */
struct zio_device *hwzdev;
/* carrier common base offset addresses obtained from SDB */
unsigned int fa_adc_csr_base;
unsigned int fa_spi_base;
unsigned int fa_ow_base;
unsigned int fa_carrier_csr_base;
unsigned int fa_irq_vic_base;
unsigned int fa_irq_adc_base;
unsigned int fa_utc_base;
/* Acquisition */
unsigned int n_shots;
unsigned int n_fires;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment