Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThanks for the reply.
The wiki suggests "Generic platform device PATA support", however it appears you modified the pata_altera_cf.c file, so I unchecked Generic and checked the Altera CF driver in the config. It probes now, but I get error:
pata_altera_cf 1000000.ata: IDE region too small
Finding this in the pata_altera_cf.c file, I added some printk statements:
printk("resource_type(ide_mem_res) = 0x%X ?= 0x%X\n", resource_type(ide_mem_res), IORESOURCE_MEM);
printk("resource_size(ide_mem_res) = 0x%X ?= 0x%X\n", resource_size(ide_mem_res), ALTCF_IDE_LEN);
printk("resource_type(ide_irq_res) = 0x%X ?= 0x%X\n", resource_type(ide_irq_res), IORESOURCE_IRQ);
printk("resource_type(cfc_mem_res) = 0x%X ?= 0x%X\n", resource_type(cfc_mem_res), IORESOURCE_MEM);
printk("resource_size(cfc_mem_res) = 0x%X ?= 0x%X\n", resource_size(cfc_mem_res), ALTCF_CFC_LEN);
I got the following at boot:
resource_type(ide_mem_res) = 0x200 ?= 0x200
resource_size(ide_mem_res) = 0x10 ?= 0x40
resource_type(ide_irq_res) = 0x400 ?= 0x400
resource_type(cfc_mem_res) = 0x200 ?= 0x200
resource_size(cfc_mem_res) = 0x40 ?= 0x10
The second line is the problem, as code reads:
if (resource_size(ide_mem_res) < ALTCF_IDE_LEN) {
dev_err(dev, "IDE region too small\n");
return rc;
}
...which is all I had time for today. Is the .dts compiler correct? Recall my .dts file for the CF:
cf: ata@0x1000080 {
compatible = "ALTR,cf-10.1","ALTR,cf-1.0";
reg = < 0x1000000 0x10 0x1000080 0x40>;
interrupt-parent = < &cpu >;
interrupts = < 14 15 >;
}; //end ata (cf)
I am using pipeline bridges, so addressing is not absolute..? Thanks,