On 23/07/13 04:15, Sebastian Macke wrote:
Hi guys,
so far the ata-device emulation is rather complete but does not work
under Linux. The host-controller driver is missing.
But the generic-ata driver of Linux should work enabling PIO access. So
I have rewritten the code in order to allow Linux direct access to the
device.
The ata section in sim.cfg needs one additional parameter for this case
"init = 1". This tells the host controller to do some basic init
procedure normally done in software in order to allow to direct access
the ata device. So, the ATA host controller should still work without
problems if used.
I have also repaired the ata section as mentioned here
bugzilla.opencores.org/show_bug.cgi?id=23
All patches are in the attachment including one for the .dts file of the
Linux kernel. Additionally the Linux .config needs to be changed. I am
not sure if you want to enable this as standard in or1ksim-defconfig.
Basically you have to enable the block device, SCSI device, ATA device,
ATA for platform devices and some sort of filesystem.
CONFIG_BLOCK=y
CONFIG_SCSI=y
CONFIG_ATA=y
CONFIG_ATA_SFF=y
CONFIG_BLK_DEV_SD=y
CONFIG_PATA_PLATFORM=y
CONFIG_PATA_OF_PLATFORM=y
I have tested it with ext2 and also reduced the device waiting time a
bit that it behaves more like an SSD than a harddisk.
Sebastian Macke
Hi Sebastian,
Thanks for this - ATA support has been broken for a long time, and it's
great to have it fixed.
If you can make two additions, I am very happy for this to be added to
Or1ksim.
1. Please add some tests to the testsuite. This will stop ATA breaking
in the future.
2. Please update the user manual.
With these two additions, I'm happy for the changes to be committed.
We currently have two branches of Or1ksim, one for the or1k version
(used with the new development tool chain) and the legacy or32 version
(used with the old stable tool chain). They are (or should be)
functionally identical - it is just a name change. When you commit,
please commit to both - you'll probably need to merge or cherry-pick
from which ever you do first.
Thanks for your hard work.
Best wishes,
Jeremy
Or1ksim maintainer
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: [email protected]
Web: www.embecosm.com
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc