]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
greybus: timesync: Add timesync core driver
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Sun, 5 Jun 2016 13:03:26 +0000 (14:03 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 7 Jun 2016 03:37:47 +0000 (20:37 -0700)
commit970dc85bd95d931def5926ae81b5aa84ef14fb7c
tree8e95aa6ef752c8b2bd6afd39aaad1b54e0c16123
parent698282f659d7c657aad4e0a72ed33190f2332e04
greybus: timesync: Add timesync core driver

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>
drivers/staging/greybus/Makefile
drivers/staging/greybus/arche-apb-ctrl.c
drivers/staging/greybus/arche-platform.c
drivers/staging/greybus/arche_platform.h
drivers/staging/greybus/greybus.h
drivers/staging/greybus/interface.c
drivers/staging/greybus/interface.h
drivers/staging/greybus/timesync.c [new file with mode: 0644]
drivers/staging/greybus/timesync.h [new file with mode: 0644]
drivers/staging/greybus/timesync_platform.c [new file with mode: 0644]