Hi Patryk,
I added according to requests mentors in the form of a document google
Link is here:
https://docs.google.com/document/d/1Bp0QN7v_AXWWhBNbX2SzdPrpaVmat1RzTWUT2aVSltA/edit
Thanks for making a google doc!
I think it would be helpful to include in your project the creation of a
generic SPI slave framework within Linux and then to make the emulation
of a SPI flash as the first protocol driver consumer of that framework
and McSPI on AM335x the first hardware layer for that framework. In the
same way that SPI master operations happen in Linux, there is a top
protocol driver which userspace can interface to, the generic SPI master
APIs which are used by protocol drivers, and then the low level McSPI
interface to the actual hardware. I would expect that a generic SPI
slave framework should likely follow a similar architecture so as to be
reusable and have the best chance of being upstreamed into Linux.
Ideally, you could also outline how userspace Linux, within the BBB,
will interface to your slave flash protocol driver. Such as:
* How will userspace tell the driver the size of the flash?
* How will userspace load data into the driver?
* How will userspace know that it should not change the data in the
driver due to the emulator currently seeing the target is interacting
with the emulated flash?
There should be existing SPI slave code/patches which you can find via
searching the Internet. If you could find a few of these proposals for
SPI slave frameworks/drivers which have previously been attempted by
others and include an evaluation of why they were unsuccessful and how
your plan will address their shortcomings, that will be very helpful in
terms of having this project appear to have mainline Linux
applicability.
Also, I think you can focus less on the libusb parts and host PC
control. Maybe we can make the host PC app and libusb portions of the
project more like "reach goals." After looking over your proposed
schedule, simply being able to emulate a SPI flash and creating the
Linux SPI slave framework (mentioned above), I think also trying to make
a host PC interface using libusb may be a bit optimistic. If you feel
otherwise, let's talk about it more. I just don't want to have you take
on too much work for the short duration of GSoC as if you are unable to
complete a majority of the work you define, that often doesn't look very
good during reviews.
In your document, can you also explain that the SPI slave functionality
in AM335x will not be able to run at the same speed as a real flash
would? What other shortcomings do you expect the emulator to have?
(Shortcomings are expected, it's an emulator.)
Clearly explaining what the shortcomings of your proposal are will help
others to evaluate it better, I think.
Thanks!
-Andrew