diff options
author | Scott Jiang <scott.jiang.linux@gmail.com> | 2014-04-04 04:27:17 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-14 12:45:25 -0400 |
commit | 766e3721990d2c78e0d614b57753f105adbaa8c5 (patch) | |
tree | ad70e47a2d981a096ad604e30ecb3da9b07d2a13 /arch/blackfin/mach-bf609 | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
spi: convert spi-bfin-v3.c to a multiplatform driver
Spi v3 controller is not only used on Blackfin. So rename it
and use ioread/iowrite api to make it work on other platform.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'arch/blackfin/mach-bf609')
-rw-r--r-- | arch/blackfin/mach-bf609/boards/ezkit.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c index 943f7e95ec15..1ba4600de69f 100644 --- a/arch/blackfin/mach-bf609/boards/ezkit.c +++ b/arch/blackfin/mach-bf609/boards/ezkit.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/pinctrl/machine.h> | 20 | #include <linux/pinctrl/machine.h> |
21 | #include <linux/pinctrl/pinconf-generic.h> | 21 | #include <linux/pinctrl/pinconf-generic.h> |
22 | #include <linux/platform_data/pinctrl-adi2.h> | 22 | #include <linux/platform_data/pinctrl-adi2.h> |
23 | #include <asm/bfin_spi3.h> | 23 | #include <linux/spi/adi_spi3.h> |
24 | #include <asm/dma.h> | 24 | #include <asm/dma.h> |
25 | #include <asm/gpio.h> | 25 | #include <asm/gpio.h> |
26 | #include <asm/nand.h> | 26 | #include <asm/nand.h> |
@@ -767,13 +767,13 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
767 | .type = "w25q32", | 767 | .type = "w25q32", |
768 | }; | 768 | }; |
769 | 769 | ||
770 | static struct bfin_spi3_chip spi_flash_chip_info = { | 770 | static struct adi_spi3_chip spi_flash_chip_info = { |
771 | .enable_dma = true, /* use dma transfer with this chip*/ | 771 | .enable_dma = true, /* use dma transfer with this chip*/ |
772 | }; | 772 | }; |
773 | #endif | 773 | #endif |
774 | 774 | ||
775 | #if IS_ENABLED(CONFIG_SPI_SPIDEV) | 775 | #if IS_ENABLED(CONFIG_SPI_SPIDEV) |
776 | static struct bfin_spi3_chip spidev_chip_info = { | 776 | static struct adi_spi3_chip spidev_chip_info = { |
777 | .enable_dma = true, | 777 | .enable_dma = true, |
778 | }; | 778 | }; |
779 | #endif | 779 | #endif |
@@ -1736,7 +1736,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1736 | }, | 1736 | }, |
1737 | #endif | 1737 | #endif |
1738 | }; | 1738 | }; |
1739 | #if IS_ENABLED(CONFIG_SPI_BFIN_V3) | 1739 | #if IS_ENABLED(CONFIG_SPI_ADI_V3) |
1740 | /* SPI (0) */ | 1740 | /* SPI (0) */ |
1741 | static struct resource bfin_spi0_resource[] = { | 1741 | static struct resource bfin_spi0_resource[] = { |
1742 | { | 1742 | { |
@@ -1777,13 +1777,13 @@ static struct resource bfin_spi1_resource[] = { | |||
1777 | }; | 1777 | }; |
1778 | 1778 | ||
1779 | /* SPI controller data */ | 1779 | /* SPI controller data */ |
1780 | static struct bfin_spi3_master bf60x_spi_master_info0 = { | 1780 | static struct adi_spi3_master bf60x_spi_master_info0 = { |
1781 | .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, | 1781 | .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, |
1782 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | 1782 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, |
1783 | }; | 1783 | }; |
1784 | 1784 | ||
1785 | static struct platform_device bf60x_spi_master0 = { | 1785 | static struct platform_device bf60x_spi_master0 = { |
1786 | .name = "bfin-spi3", | 1786 | .name = "adi-spi3", |
1787 | .id = 0, /* Bus number */ | 1787 | .id = 0, /* Bus number */ |
1788 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), | 1788 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
1789 | .resource = bfin_spi0_resource, | 1789 | .resource = bfin_spi0_resource, |
@@ -1792,13 +1792,13 @@ static struct platform_device bf60x_spi_master0 = { | |||
1792 | }, | 1792 | }, |
1793 | }; | 1793 | }; |
1794 | 1794 | ||
1795 | static struct bfin_spi3_master bf60x_spi_master_info1 = { | 1795 | static struct adi_spi3_master bf60x_spi_master_info1 = { |
1796 | .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, | 1796 | .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, |
1797 | .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, | 1797 | .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, |
1798 | }; | 1798 | }; |
1799 | 1799 | ||
1800 | static struct platform_device bf60x_spi_master1 = { | 1800 | static struct platform_device bf60x_spi_master1 = { |
1801 | .name = "bfin-spi3", | 1801 | .name = "adi-spi3", |
1802 | .id = 1, /* Bus number */ | 1802 | .id = 1, /* Bus number */ |
1803 | .num_resources = ARRAY_SIZE(bfin_spi1_resource), | 1803 | .num_resources = ARRAY_SIZE(bfin_spi1_resource), |
1804 | .resource = bfin_spi1_resource, | 1804 | .resource = bfin_spi1_resource, |
@@ -1990,7 +1990,7 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
1990 | &bfin_sdh_device, | 1990 | &bfin_sdh_device, |
1991 | #endif | 1991 | #endif |
1992 | 1992 | ||
1993 | #if IS_ENABLED(CONFIG_SPI_BFIN_V3) | 1993 | #if IS_ENABLED(CONFIG_SPI_ADI_V3) |
1994 | &bf60x_spi_master0, | 1994 | &bf60x_spi_master0, |
1995 | &bf60x_spi_master1, | 1995 | &bf60x_spi_master1, |
1996 | #endif | 1996 | #endif |
@@ -2051,8 +2051,8 @@ static struct pinctrl_map __initdata bfin_pinmux_map[] = { | |||
2051 | PIN_MAP_MUX_GROUP_DEFAULT("bfin_sir.1", "pinctrl-adi2.0", NULL, "uart1"), | 2051 | PIN_MAP_MUX_GROUP_DEFAULT("bfin_sir.1", "pinctrl-adi2.0", NULL, "uart1"), |
2052 | PIN_MAP_MUX_GROUP_DEFAULT("bfin-sdh.0", "pinctrl-adi2.0", NULL, "rsi0"), | 2052 | PIN_MAP_MUX_GROUP_DEFAULT("bfin-sdh.0", "pinctrl-adi2.0", NULL, "rsi0"), |
2053 | PIN_MAP_MUX_GROUP_DEFAULT("stmmaceth.0", "pinctrl-adi2.0", NULL, "eth0"), | 2053 | PIN_MAP_MUX_GROUP_DEFAULT("stmmaceth.0", "pinctrl-adi2.0", NULL, "eth0"), |
2054 | PIN_MAP_MUX_GROUP_DEFAULT("bfin-spi3.0", "pinctrl-adi2.0", NULL, "spi0"), | 2054 | PIN_MAP_MUX_GROUP_DEFAULT("adi-spi3.0", "pinctrl-adi2.0", NULL, "spi0"), |
2055 | PIN_MAP_MUX_GROUP_DEFAULT("bfin-spi3.1", "pinctrl-adi2.0", NULL, "spi1"), | 2055 | PIN_MAP_MUX_GROUP_DEFAULT("adi-spi3.1", "pinctrl-adi2.0", NULL, "spi1"), |
2056 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-bfin-twi.0", "pinctrl-adi2.0", NULL, "twi0"), | 2056 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-bfin-twi.0", "pinctrl-adi2.0", NULL, "twi0"), |
2057 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-bfin-twi.1", "pinctrl-adi2.0", NULL, "twi1"), | 2057 | PIN_MAP_MUX_GROUP_DEFAULT("i2c-bfin-twi.1", "pinctrl-adi2.0", NULL, "twi1"), |
2058 | PIN_MAP_MUX_GROUP_DEFAULT("bfin-rotary", "pinctrl-adi2.0", NULL, "rotary"), | 2058 | PIN_MAP_MUX_GROUP_DEFAULT("bfin-rotary", "pinctrl-adi2.0", NULL, "rotary"), |