From: Mark Brown <broonie(a)linaro.org>
The core implementation of cs_change didn't follow the documentation
which says that cs_change in the middle of the transfer means to briefly
deassert chip select, instead it followed buggy drivers which change the
polarity of chip select. Use a delay of 10us between deassert and
reassert simply from pulling numbers out of a hat.
Reported-by: Gerhard Sittig <gsi(a)denx.de>
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
Compile tested only.
drivers/spi/spi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 121c43b..4eb9bf0 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -754,7 +754,6 @@ static int spi_transfer_one_message(struct spi_master *master,
struct spi_message *msg)
{
struct spi_transfer *xfer;
- bool cur_cs = true;
bool keep_cs = false;
int ret = 0;
int ms = 1;
@@ -800,8 +799,9 @@ static int spi_transfer_one_message(struct spi_master *master,
&msg->transfers)) {
keep_cs = true;
} else {
- cur_cs = !cur_cs;
- spi_set_cs(msg->spi, cur_cs);
+ spi_set_cs(msg->spi, false);
+ udelay(10);
+ spi_set_cs(msg->spi, true);
}
}
--
1.9.1
Hi Alex/Mark
Here's a pull request for the latest changes to big.LITTLE MP. This is
Chris' v5 patchset with a white-space fix and based on the main
MP-patchset only topic branch I'm looking after...
The following changes since commit b30814c74c184bbb231e24d6c857699af338468b:
HMP: Fix rt task allowed cpu mask restriction code on 1x1 system (2014-01-22 09:50:46 +0000)
are available in the git repository at:
git://git.linaro.org/arm/big.LITTLE/mp.git for-lsk
for you to fetch changes up to 5a570cfc01b06906faa8ac67ad7c0c6f278761c4:
hmp: dont attempt to pull tasks if affinity doesn't allow it (2014-03-24 15:14:35 +0000)
----------------------------------------------------------------
Chris Redpath (4):
hmp: sched: Clean up hmp_up_threshold checks into a utility fn
sched: hmp: unify active migration code
hmp: Use idle pull to perform forced up-migrations
hmp: dont attempt to pull tasks if affinity doesn't allow it
kernel/sched/core.c | 11 +-
kernel/sched/fair.c | 386 +++++++++++++++++++++++++++-----------------------
kernel/sched/sched.h | 1 +
3 files changed, 221 insertions(+), 177 deletions(-)
Hi Thomas,
I couldn't understand one part of hrtimer (obviously there are
others as well, but here I am sure I couldn't understood it :)).
In switch_hrtimer_base() we are calling hrtimer_check_target()
which guarantees this:
/*
* With HIGHRES=y we do not migrate the timer when it is expiring
* before the next event on the target cpu because we cannot reprogram
* the target cpu hardware and we would cause it to fire late.
*
* Called with cpu_base->lock of target cpu held.
*/
But switch_hrtimer_base() is only called from one place, i.e.
__hrtimer_start_range_ns() and at the point (where we call
switch_hrtimer_base()) expiration time is not yet known as
we call this routine later:
hrtimer_set_expires_range_ns()
So, do we really need to call hrtimer_check_target() at all
in switch_hrtimer_base()? Or do we need to move
hrtimer_set_expires_range_ns() before calling
switch_hrtimer_base() ??
--
viresh