* Bug in of_mpc8xxx_spi chipselect
@ 2009-09-09 13:42 Michael Barkowski
0 siblings, 0 replies; only message in thread
From: Michael Barkowski @ 2009-09-09 13:42 UTC (permalink / raw)
To: linuxppc-dev
Just want to document this bug, since I don't have time to make a patch:
In of_mpc8xxx_spi_get_chipselects():
pinfo->alow_flags[i] = flags & OF_GPIO_ACTIVE_LOW;
ret = gpio_direction_output(pinfo->gpios[i],
pinfo->alow_flags[i]);
The initial value of the chip should be disabled. If SPI_CS_HIGH, value of 0 means disabled - ok, but...
If not SPI_CS_HIGH for a given device (which is the case for most devices), that device will be enabled until it is disabled at the end of the first transaction to that device. If there are transactions to other devices on the same bus in the meantime, this device may be confused and fail the first transaction.
Maybe the chip select should be disabled until the device entry is initialized with full knowledge of its configuration. Not sure of the right solution.
--
Michael Barkowski
905-482-4577
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-09 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 13:42 Bug in of_mpc8xxx_spi chipselect Michael Barkowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.