aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/arche_platform.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-11-09staging: greybus: correct SPDX License IdentifierIoannis Valasakis1-1/+1
Replace SPDX License Identifier comments with C comments. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11staging: greybus: Remove redundant license textGreg Kroah-Hartman1-2/+0
Now that the SPDX tag is in all greybus files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org> Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Acked-by: David Lin <dtwlin@gmail.com> Acked-by: Johan Hovold <johan@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Mark Greer <mgreer@animalcreek.com> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com> Acked-by: "Bryan O'Donoghue" <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-11staging: greybus: add SPDX identifiers to all greybus driver filesGreg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/greybus files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com> Cc: "Bryan O'Donoghue" <pure.logic@nexus-software.ie> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Acked-by: David Lin <dtwlin@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org> Acked-by: Johan Hovold <johan@kernel.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Mark Greer <mgreer@animalcreek.com> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16staging: greybus: arche: remove timesync remainsJohan Hovold1-8/+0
Remove the remaining timesync bits that were left in the arche platform driver and which prevented the driver from being compiled. Fixes: bdfb95c4baab ("staging: greybus: remove timesync protocol support") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-07staging: greybus: remove timesync protocol supportGreg Kroah-Hartman1-2/+0
While the timesync protocol was a great idea, it never ended up getting implemented by any known hardware devices. It's also a bit "interesting" in how it ties into the platform controller. So, just remove it for now. It's not needed, no one uses it, and it's a stumbling block in getting the greybus core code merged out of the staging tree. If anyone wants it in the future, reverting this patch is a great place to start from. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Johan Hovold <johan@kernel.org> Reviewed-by: Alex Elder <elder@kernel.org> Acked-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-06greybus: timesync: Add timesync core driverBryan O'Donoghue1-1/+8
This patch adds the core timesync functionality. 0. arche-platform.c/arche-apb-ctrl.c Modifies the platform layer to hook the incoming TIME_SYNC signal up to the timesync strobe IRQ handler. If the arche-platform driver can't satisfy the request for the wake-detect line, it will return -EAGAIN and the calling work-queue must reschedule the attempt to get exclusive access to the wake-detect pin logic. A private data field is added to the arche-platform driver to enable passing of a timesync pointer to the ISR responsible for synchronizing time. 1. timesync.c A new file added which contains all of the logic associated with sending greybus commands to SVC, APBx or Interfaces to enable, disable and disseminate timing information. 2. timesync_platform.c Any platform/arch specific code goes into timesync_platform.c. Originally the idea was to keep the x86 and ARM arch dependencies in a timesync_platform_arch.c file - however with further refinement that's currently not necessary however just-in-case it becomes necessary to resuscitate arch or platform specific methods for accessing timer resources that access shouldn't be part of the core timesync.c logic and so for the moment we access these timer resources through a thin access layer in timesync_platform.c. Expect this to go away long term ideally. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-05-05greybus: arche-platform: Export fn to allow timesync driver to change the stateVaibhav Hiremath1-0/+2
With the addition of the timesync driver and looking at the hardware interfaces we have, its clear we need to add a new arche-platform state. This patch adds ARCHE_PLATFORM_STATE_TIME_SYNC to the arche-platform driver to facilitate transition to the TIME_SYNC state if-and-only-if the arche-platform driver is in the ACTIVE state. This is mainly needed as wake/detect lines are shared between TIMESYNC operation and basic control functionality of APBs. So during TIMESYNC we want to make sure that the events on wake/detect lines are ignored by the arche-platform APB reset logic. This patch adds one exported function, which can be invoked from timesync driver code, allowing, switching between ARCHE_PLATFORM_STATE_TIME_SYNC <=> ARCHE_PLATFORM_STATE_ACTIVE states. [ bryan.odonoghue@linaro.org: Added mutex, massaged commit text ] Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Suggested-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-04-23greybus: arche-ctrl: Don't expose driver internals to arche-platform driverViresh Kumar1-5/+2
We have chosen the *ugly* way of registering two platform drivers from the module_init() of only one of them, so that we can avoid having two separate modules for them. But we should still be doing this in a sane way. There is no need to expose internals of arche-ctrl to arche-platform, like PM-ops, probe, resume, id-table, etc. Just expose an init and a exit callback. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-02-15greybus: arche-apb-ctrl: Export operational fns from driverVaibhav Hiremath1-0/+9
In order to use single wake/detect line for both APB's we need to have access to APB operational functions to parent/SVC driver. So export coldboot, standby_boot, fw_flashing and poweroff operation functions from the driver. Testing Done: Tested on EVT1.2 and DB3.5 platform Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-02-15greybus: arche-platform: Introduce FW_FLASHING stateVaibhav Hiremath1-0/+1
Introduce FW_FLASHING state to arche-platform driver, to enable user space to flash/upgrade SVC firmware. Command to enter into flashing state: # echo fw_flashing > /sys/devices/arche_platform.*/state Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-02-12greybus: arche-platform: make apb_state common to both platform driversVaibhav Hiremath1-0/+6
Make 'enum apb_state' common to both platform drivers, so that both drivers can make use of same state and user will have unified control configuration across devices (SVC, APB1 and APB2) Testing Done: Tested on EVT1.2 and DB3.5 platform. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-04greybus: arche-platform: merge arche-apb-ctrl and arche-platformGreg Kroah-Hartman1-0/+17
No need to have two separate arche platform drivers, that's just crazy, so merge them both together to be only one kernel module. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Tested-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>