- 30 Dec, 2015 2 commits
-
-
Viresh Kumar authored
The version of the currently running firmware on the module is useful for userspace as it can be used to find if an update is available or not. This patch fetches interface's version with a new control operation and exposes the same in userspace. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
Two exactly same modules can be uniquely identified using module's serial-number. This patch updates the interface hotplug event to also receive the serial-number of the module. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 23 Dec, 2015 7 commits
-
-
Viresh Kumar authored
gb_svc_read_and_clear_module_boot_status() relies on the values of ddbl1_manufacturer_id and ddbl1_product_id to distinguish between ES2 and ES3 chips, but those values are set for the interface structure only after gb_svc_read_and_clear_module_boot_status() is called. This makes ES2 module to fail with following errors: greybus 1-2: Module not ready yet greybus 1-svc: failed to clear boot status of interface 2: -19 Fix this by setting these values before calling gb_svc_read_and_clear_module_boot_status(). Fixes: 51f1dc421b1f ("firmware and svc: detect the difference between ES2 and ES3 chips") Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Bryan O'Donoghue authored
The greybus specification reserves SVC type 0x0d-0x0f for timesync. 53124d73 ('svc: Add support for the link config operation') allocated the next available type 0x0d which conflicts with the specification. Change the type to 0x10 to ensure kernel and specification agree. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
We already have macro's defined for this, use them. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Vaibhav Hiremath authored
Until we have proper handshake mechanism implemented with SVC assert reset to APB at the end of probe. We are safe here to do that, as SVC always enables clock to APB's currently. And also from EVT1 perspective, we should be good, as clock control signals are now moved to AP. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Vaibhav Hiremath authored
It was messy to integrate both SVC, APB (and any other arche platform specific control) into one single driver. Especially due to cross-dependency. AP first needs to bringup SVC, as SVC should enable clock to APB. APB should come up before HUB, as due to some reason HUB wouldn't enumerate APB's is APB comes up later. And on top of that we should have clean picture of hardware description in DT file. So this patch introduces APB control driver. Mostly copied from original arche-platform driver + fixed boot sequence. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Vaibhav Hiremath authored
With multiple platforms getting rolled into ara, db3 name is confusing. And this driver is applicable to all arche platforms, so make sense to rename it to arche-platform.c. Also rename all internal functions accordingly. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Vaibhav Hiremath authored
Current db3(arche)-platform driver was only handling APB control signals, which is where it all started. But now with completion of DB3/EVT1 bringup we know that platform driver is more than APB control. We have to bring SVC up before APB, as SVC supposed to enable clock to APB's. Note that, in EVT1, AP will have direct control over APB's clock. Then we have dependency between APB and USB HUB, where, APB should be brought up before USB HUB (note that this needs to rootcaused). This patch cleanup the db3(arche)-platform driver to remove all APB control code. The idea here is create another driver for APB control (arche-apb-ctrl.c), which will deal with APB. And this driver will have generic/common platform specific support, currently manages SVC resources. This patch also takes in all the changes from factory branch, discovered during bringup. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 22 Dec, 2015 15 commits
-
-
Eli Sennesh authored
The Greybus SVC code needs to read and clear the module boot status upon hotplug; this requires reading two different attributes depending on whether we're running on ES2 or ES3. On Marti Bolivar's (mbolivar@leaflabs.com) advice, we detect ES2 using the unique ES2_DDBL1_MFR_ID and ES2_DDBL1_PROD_ID for ES2 hardware, and treat all other chips as ES3 appropriately. This patch detects the difference and adds the appropriate definitions for ES3 hardware. Signed-off-by: Eli Sennesh <esennesh@leaflabs.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
These ids are already fetched from the SVC, but were never exposed to sysfs. Userspace may be interested in using these values and hence these must be exposed to it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
The Device descriptor block Level 1 (DDBL1) attributes are specified by the MIPI standard and prefixing them with 'unipro_' isn't the best thing to do. They should be prefixed with DDBL1 instead. To make it more readable/clear: - rename macros and variable by prefixing them with ddbl1_. - write full names for mfg and prod ids as manufacturer and product ids. - replace mfg (manufacturing) with mfr (manufacturer) Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Use __packed and __u8 for csi-config request that is going out on the wire. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Drop function header that was copied but never updated or removed when adding gb_svc_link_config. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Viresh Kumar authored
In order to clearly specify the base of values printed using sysfs files, prefix hexadecimal values with '0x'. Also force the minimum width (to be printed) for hexadecimal values to their sizes. To make it more readable make the second argument to gb_interface_attr() a proper string. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
USB request data must be DMAble memory, allocate it with kzalloc() instead of declaring it as a local variable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Convert all USB request fields between CPU and protocol endianness. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Convert all Greybus operation fields between CPU and protocol endianness. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
HS-G1 isn't enough for all camera modules. The gear will need to be computed dynamically, but for now hardcode it to 2 with 2 lanes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Start or stop the CSI transmitter when configuring and unconfiguring the streams respectively. The CSI configuration parameters are currently hardcoded. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Export a function from the es2 driver to configure the CSI transmitter through the corresponding USB vendor control request. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Hardcode the speed to HS-G1 for now. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Convert all Greybus operation fields between CPU and protocol endianness. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Rui Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 18 Dec, 2015 5 commits
-
-
Greg Kroah-Hartman authored
This breaks the kernel-only build as it can't find any userspace headers with the cross-compiler, so don't build the tools by "default" unless you ask for them. Reported-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
This lets us test for any number of entries, no need to do an ARRAY_SIZE-type comparison. This fixes a build warning of comparing signed/unsigned values.) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
We read an int, don't treat it as a unsigned value, especially when comparing it to a signed value. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
Move the loopback test to the greybus main repo, as we will be adding more tests over time and it doesn't need to be burried in the gbsim repo. This moves the latest version from gbsim to this repo and fixes up the Makefile to be a bit more "smart" when building the code. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
In some operations definitions it was introduce some new fields with the wrong data types, u8, instead of __u8. And because of this gbsim build was broken. Fixes: 3a1d7aa15bf6 ("greybus: Add camera protocol definition") Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 15 Dec, 2015 10 commits
-
-
Rui Miguel Silva authored
Cleanup and remove the spi_devices from the greybus spi handling as they are not needed and they were completely misused. With this the gb_spi_init does not make sense to exist anymore, so just remove it and handle the master config directly from connection init. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reported-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
When registering devices if any of it fail, just cleanup and release spi master. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reported-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
Check for error in registering spi master, even though the current code will fail a little more ahead when trying to register devices in the master. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reported-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Rui Miguel Silva authored
Rename error path label to a more significant name related to the free operation done. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reported-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Set an interface disconnected flag when the interface has been hot-unplugged (e.g. forcibly removed or after a reboot), and use it to disable the control connection early when deregistering the interface and its bundles. This avoids a one-second (default) timeout for every enabled connection (e.g. one per bundle) at hot-unplug, something which for the default gpbridge manifest currently amounts to five seconds. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Clean up control-connection handling by managing it through the control structure and a higher-level control interface. Also make both the control structure and connection lifetimes coincide with that of the interface. The control connection is now only enabled and disabled when the interface is initialised and removed. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Johan Hovold authored
Demote error message when needing to dynamically allocate an URB to debug level. This isn't really an error as much as a reminder of how the current es2 implementation works: It uses a fixed number of pre-allocated URBs, but allocates URBs dynamically when enough messages are sent in rapid succession to exhaust the URB pool. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Greg Kroah-Hartman authored
On newer kernels f_dentry is gone, so use f_path.dentry instead. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Integration with the V4L2 camera drivers isn't available yet, a debugfs interface is exposed instead to call the camera Greybus operations. The debugfs interface will be kept for module testing purpose in order to exercise all the protocol operations with various valid and invalid parameters. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
Laurent Pinchart authored
Define the camera data protocol ID and all the protocol operations data structures. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-
- 12 Dec, 2015 1 commit
-
-
Bryan O'Donoghue authored
A specific request from the firmware people is the ability to back-off from sending more asynchronous operations once a specific number of operations are in-flight. This patch adds that ability - with a new sysfs parameter 'outstanding_operations_max' which controls the maximum number of operations that can be outstanding/in-flight at any time. When outstanding_operations_max contains a non-zero value and asynchronous operations are being used - we will back-off until the completion counter is < outstanding_operations_max. Tested in both synchronous and asynchronous mode and with gb_loopback_connection_exit() interrupting in-flight operations. Suggested-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-