All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: ep93xx: vision_ep9307: minor updates
@ 2015-06-16 16:52 H Hartley Sweeten
  2015-06-16 16:52 ` [PATCH 1/2] ARM: ep93xx: vision_ep9307: enable DMA for SPI H Hartley Sweeten
  2015-06-16 16:52 ` [PATCH 2/2] ARM: ep93xx: vision_ep9307: add audio support H Hartley Sweeten
  0 siblings, 2 replies; 5+ messages in thread
From: H Hartley Sweeten @ 2015-06-16 16:52 UTC (permalink / raw)
  To: linux-arm-kernel

Enable DMA for the SPI driver and add audio support.

H Hartley Sweeten (2):
  ARM: ep93xx: vision_ep9307: enable DMA for SPI
  ARM: ep93xx: vision_ep9307: add audio support

 arch/arm/mach-ep93xx/vision_ep9307.c | 61 ++++++++++++++++++++++++++++++++++--
 1 file changed, 58 insertions(+), 3 deletions(-)

-- 
2.3.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] ARM: ep93xx: vision_ep9307: enable DMA for SPI
  2015-06-16 16:52 [PATCH 0/2] ARM: ep93xx: vision_ep9307: minor updates H Hartley Sweeten
@ 2015-06-16 16:52 ` H Hartley Sweeten
  2015-07-09 14:58   ` Linus Walleij
  2015-06-16 16:52 ` [PATCH 2/2] ARM: ep93xx: vision_ep9307: add audio support H Hartley Sweeten
  1 sibling, 1 reply; 5+ messages in thread
From: H Hartley Sweeten @ 2015-06-16 16:52 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the 'use_dma' flag in the SPI platform data to improve the speed
of the mmc_spi driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
 arch/arm/mach-ep93xx/vision_ep9307.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index 6bc1c18..aa87dfa 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -281,7 +281,8 @@ static struct spi_board_info vision_spi_board_info[] __initdata = {
 };
 
 static struct ep93xx_spi_info vision_spi_master __initdata = {
-	.num_chipselect		= ARRAY_SIZE(vision_spi_board_info),
+	.num_chipselect	= ARRAY_SIZE(vision_spi_board_info),
+	.use_dma	= 1,
 };
 
 /*************************************************************************
-- 
2.3.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: ep93xx: vision_ep9307: add audio support
  2015-06-16 16:52 [PATCH 0/2] ARM: ep93xx: vision_ep9307: minor updates H Hartley Sweeten
  2015-06-16 16:52 ` [PATCH 1/2] ARM: ep93xx: vision_ep9307: enable DMA for SPI H Hartley Sweeten
@ 2015-06-16 16:52 ` H Hartley Sweeten
  2015-07-09 15:00   ` Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: H Hartley Sweeten @ 2015-06-16 16:52 UTC (permalink / raw)
  To: linux-arm-kernel

Add I2S audio support to the vision_ep9307 system.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
 arch/arm/mach-ep93xx/vision_ep9307.c | 58 ++++++++++++++++++++++++++++++++++--
 1 file changed, 56 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index aa87dfa..ff22a6a 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -29,6 +29,8 @@
 #include <linux/spi/mmc_spi.h>
 #include <linux/mmc/host.h>
 
+#include <sound/cs4271.h>
+
 #include <mach/hardware.h>
 #include <linux/platform_data/video-ep93xx.h>
 #include <linux/platform_data/spi-ep93xx.h>
@@ -169,6 +171,35 @@ static struct i2c_board_info vision_i2c_info[] __initdata = {
 };
 
 /*************************************************************************
+ * SPI CS4271 Audio Codec
+ *************************************************************************/
+static struct cs4271_platform_data vision_cs4271_data = {
+	.gpio_nreset	= EP93XX_GPIO_LINE_H(2),
+};
+
+static int vision_cs4271_hw_setup(struct spi_device *spi)
+{
+	return gpio_request_one(EP93XX_GPIO_LINE_EGPIO6,
+				GPIOF_OUT_INIT_HIGH, spi->modalias);
+}
+
+static void vision_cs4271_hw_cleanup(struct spi_device *spi)
+{
+	gpio_free(EP93XX_GPIO_LINE_EGPIO6);
+}
+
+static void vision_cs4271_hw_cs_control(struct spi_device *spi, int value)
+{
+	gpio_set_value(EP93XX_GPIO_LINE_EGPIO6, value);
+}
+
+static struct ep93xx_spi_chip_ops vision_cs4271_hw = {
+	.setup		= vision_cs4271_hw_setup,
+	.cleanup	= vision_cs4271_hw_cleanup,
+	.cs_control	= vision_cs4271_hw_cs_control,
+};
+
+/*************************************************************************
  * SPI Flash
  *************************************************************************/
 #define VISION_SPI_FLASH_CS	EP93XX_GPIO_LINE_EGPIO7
@@ -262,12 +293,20 @@ static struct ep93xx_spi_chip_ops vision_spi_mmc_hw = {
  *************************************************************************/
 static struct spi_board_info vision_spi_board_info[] __initdata = {
 	{
+		.modalias		= "cs4271",
+		.platform_data		= &vision_cs4271_data,
+		.controller_data	= &vision_cs4271_hw,
+		.max_speed_hz		= 6000000,
+		.bus_num		= 0,
+		.chip_select		= 0,
+		.mode			= SPI_MODE_3,
+	}, {
 		.modalias		= "sst25l",
 		.platform_data		= &vision_spi_flash_data,
 		.controller_data	= &vision_spi_flash_hw,
 		.max_speed_hz		= 20000000,
 		.bus_num		= 0,
-		.chip_select		= 0,
+		.chip_select		= 1,
 		.mode			= SPI_MODE_3,
 	}, {
 		.modalias		= "mmc_spi",
@@ -275,7 +314,7 @@ static struct spi_board_info vision_spi_board_info[] __initdata = {
 		.controller_data	= &vision_spi_mmc_hw,
 		.max_speed_hz		= 20000000,
 		.bus_num		= 0,
-		.chip_select		= 1,
+		.chip_select		= 2,
 		.mode			= SPI_MODE_3,
 	},
 };
@@ -286,6 +325,20 @@ static struct ep93xx_spi_info vision_spi_master __initdata = {
 };
 
 /*************************************************************************
+ * I2S Audio
+ *************************************************************************/
+static struct platform_device vision_audio_device = {
+	.name		= "edb93xx-audio",
+	.id		= -1,
+};
+
+static void __init vision_register_i2s(void)
+{
+	ep93xx_register_i2s();
+	platform_device_register(&vision_audio_device);
+}
+
+/*************************************************************************
  * Machine Initialization
  *************************************************************************/
 static void __init vision_init_machine(void)
@@ -310,6 +363,7 @@ static void __init vision_init_machine(void)
 				ARRAY_SIZE(vision_i2c_info));
 	ep93xx_register_spi(&vision_spi_master, vision_spi_board_info,
 				ARRAY_SIZE(vision_spi_board_info));
+	vision_register_i2s();
 }
 
 MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
-- 
2.3.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 1/2] ARM: ep93xx: vision_ep9307: enable DMA for SPI
  2015-06-16 16:52 ` [PATCH 1/2] ARM: ep93xx: vision_ep9307: enable DMA for SPI H Hartley Sweeten
@ 2015-07-09 14:58   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2015-07-09 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 16, 2015 at 6:52 PM, H Hartley Sweeten
<hsweeten@visionengravers.com> wrote:

> Enable the 'use_dma' flag in the SPI platform data to improve the speed
> of the mmc_spi driver.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

I've signed this off and queued for my pull request to ARM SoC.
Also cooking a similar patch for my simone card.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ARM: ep93xx: vision_ep9307: add audio support
  2015-06-16 16:52 ` [PATCH 2/2] ARM: ep93xx: vision_ep9307: add audio support H Hartley Sweeten
@ 2015-07-09 15:00   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2015-07-09 15:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 16, 2015 at 6:52 PM, H Hartley Sweeten
<hsweeten@visionengravers.com> wrote:

> Add I2S audio support to the vision_ep9307 system.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Applied and queued this patch too.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-09 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 16:52 [PATCH 0/2] ARM: ep93xx: vision_ep9307: minor updates H Hartley Sweeten
2015-06-16 16:52 ` [PATCH 1/2] ARM: ep93xx: vision_ep9307: enable DMA for SPI H Hartley Sweeten
2015-07-09 14:58   ` Linus Walleij
2015-06-16 16:52 ` [PATCH 2/2] ARM: ep93xx: vision_ep9307: add audio support H Hartley Sweeten
2015-07-09 15:00   ` Linus Walleij

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.