Stefan Kristiansson
2013-09-01 07:12:35 UTC
This set of patches brings the OpenCores simple SPI driver up to date
with the current practices used in the SPI subsystem.
A special note is required for the last two patches ("use clock framework to
obtain spi clock" and "remove dependency on OPENRISC for spi-oc-simple").
When used together with OpenRISC, there are two prerequisite patches.
1) openrisc: select COMMON_CLK
https://patchwork.kernel.org/patch/2852461/
2) clk: add generic driver for fixed rate clock
https://patchwork.kernel.org/patch/2852460/
The first goes without comment, the second is needed since we
don't have any board specific init code, but only rely on the device
tree description to setup our boards.
With those two applied, the clock for the spi driver can be described as
below in the dts file.
...
wb_clk: wb_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <50000000>;
clock-output-names = "wb_clk";
};
...
spi0: spi0 at b0000000 {
compatible = "opencores,spi-simple";
reg = <0xb0000000 0x5>;
clocks = <&wb_clk>;
...
};
The rest of the patches can be applied without concerns.
Stefan Kristiansson (12):
spi/spi_opencores: rename to spi-oc-simple
spi/spi-oc-simple: update driver names in file header
spi/spi-oc-simple: remove __devinit, __devexit, __init and __exit
spi/spi-oc-simple: include module.h
spi/spi-oc-simple: whitespace and format cleanup
spi/spi-oc-simple: remove dead and commented out code
spi/spi-oc-simple: remove unused variables
spi/spi-oc-simple: use the SPI framework queue
spi/spi-oc-simple: use platform_{get,set}_drvdata()
spi/spi-oc-simple: use module_platform_driver to register driver
spi/spi-oc-simple: use clock framework to obtain spi clock
spi: remove dependency on OPENRISC for spi-oc-simple
drivers/spi/Kconfig | 1 -
drivers/spi/Makefile | 2 +-
drivers/spi/spi-oc-simple.c | 490 ++++++++++++++++++++++++++++++
drivers/spi/spi_opencores.c | 707 --------------------------------------------
4 files changed, 491 insertions(+), 709 deletions(-)
create mode 100644 drivers/spi/spi-oc-simple.c
delete mode 100644 drivers/spi/spi_opencores.c
with the current practices used in the SPI subsystem.
A special note is required for the last two patches ("use clock framework to
obtain spi clock" and "remove dependency on OPENRISC for spi-oc-simple").
When used together with OpenRISC, there are two prerequisite patches.
1) openrisc: select COMMON_CLK
https://patchwork.kernel.org/patch/2852461/
2) clk: add generic driver for fixed rate clock
https://patchwork.kernel.org/patch/2852460/
The first goes without comment, the second is needed since we
don't have any board specific init code, but only rely on the device
tree description to setup our boards.
With those two applied, the clock for the spi driver can be described as
below in the dts file.
...
wb_clk: wb_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <50000000>;
clock-output-names = "wb_clk";
};
...
spi0: spi0 at b0000000 {
compatible = "opencores,spi-simple";
reg = <0xb0000000 0x5>;
clocks = <&wb_clk>;
...
};
The rest of the patches can be applied without concerns.
Stefan Kristiansson (12):
spi/spi_opencores: rename to spi-oc-simple
spi/spi-oc-simple: update driver names in file header
spi/spi-oc-simple: remove __devinit, __devexit, __init and __exit
spi/spi-oc-simple: include module.h
spi/spi-oc-simple: whitespace and format cleanup
spi/spi-oc-simple: remove dead and commented out code
spi/spi-oc-simple: remove unused variables
spi/spi-oc-simple: use the SPI framework queue
spi/spi-oc-simple: use platform_{get,set}_drvdata()
spi/spi-oc-simple: use module_platform_driver to register driver
spi/spi-oc-simple: use clock framework to obtain spi clock
spi: remove dependency on OPENRISC for spi-oc-simple
drivers/spi/Kconfig | 1 -
drivers/spi/Makefile | 2 +-
drivers/spi/spi-oc-simple.c | 490 ++++++++++++++++++++++++++++++
drivers/spi/spi_opencores.c | 707 --------------------------------------------
4 files changed, 491 insertions(+), 709 deletions(-)
create mode 100644 drivers/spi/spi-oc-simple.c
delete mode 100644 drivers/spi/spi_opencores.c
--
1.8.1.2
1.8.1.2