Loading Documentation/powerpc/booting-without-of.txt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1917,6 +1917,8 @@ platforms are moved over to use the flattened-device-tree model. inverse clock polarity (CPOL) mode inverse clock polarity (CPOL) mode - spi-cpha - (optional) Empty property indicating device requires - spi-cpha - (optional) Empty property indicating device requires shifted clock phase (CPHA) mode shifted clock phase (CPHA) mode - spi-cs-high - (optional) Empty property indicating device requires chip select active high SPI example for an MPC5200 SPI bus: SPI example for an MPC5200 SPI bus: spi@f00 { spi@f00 { Loading drivers/of/of_spi.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -61,6 +61,8 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np) spi->mode |= SPI_CPHA; spi->mode |= SPI_CPHA; if (of_find_property(nc, "spi-cpol", NULL)) if (of_find_property(nc, "spi-cpol", NULL)) spi->mode |= SPI_CPOL; spi->mode |= SPI_CPOL; if (of_find_property(nc, "spi-cs-high", NULL)) spi->mode |= SPI_CS_HIGH; /* Device speed */ /* Device speed */ prop = of_get_property(nc, "spi-max-frequency", &len); prop = of_get_property(nc, "spi-max-frequency", &len); Loading Loading
Documentation/powerpc/booting-without-of.txt +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1917,6 +1917,8 @@ platforms are moved over to use the flattened-device-tree model. inverse clock polarity (CPOL) mode inverse clock polarity (CPOL) mode - spi-cpha - (optional) Empty property indicating device requires - spi-cpha - (optional) Empty property indicating device requires shifted clock phase (CPHA) mode shifted clock phase (CPHA) mode - spi-cs-high - (optional) Empty property indicating device requires chip select active high SPI example for an MPC5200 SPI bus: SPI example for an MPC5200 SPI bus: spi@f00 { spi@f00 { Loading
drivers/of/of_spi.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -61,6 +61,8 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np) spi->mode |= SPI_CPHA; spi->mode |= SPI_CPHA; if (of_find_property(nc, "spi-cpol", NULL)) if (of_find_property(nc, "spi-cpol", NULL)) spi->mode |= SPI_CPOL; spi->mode |= SPI_CPOL; if (of_find_property(nc, "spi-cs-high", NULL)) spi->mode |= SPI_CS_HIGH; /* Device speed */ /* Device speed */ prop = of_get_property(nc, "spi-max-frequency", &len); prop = of_get_property(nc, "spi-max-frequency", &len); Loading