mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <dg@emlix.com>
To: Chris Zankel <chris@zankel.net>
Cc: linux-kernel@vger.kernel.org, "Daniel Glöckner" <dg@emlix.com>
Subject: [patch 1/5] xtensa: add s6000 data port to s6105 platform
Date: Thu, 26 Mar 2009 15:49:30 +0100	[thread overview]
Message-ID: <1238078974-26040-1-git-send-email-dg@emlix.com> (raw)

Signed-off-by: Daniel Glöckner <dg@emlix.com>
---
 arch/xtensa/platforms/s6105/device.c               |   40 ++++++++++++++++++++
 arch/xtensa/platforms/s6105/include/platform/irq.h |    1 +
 arch/xtensa/platforms/s6105/setup.c                |    2 +
 3 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c
index f7af6d2..9238d24 100644
--- a/arch/xtensa/platforms/s6105/device.c
+++ b/arch/xtensa/platforms/s6105/device.c
@@ -22,6 +22,7 @@
 #include <linux/spi/mmc_spi.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_s6000.h>
+#include <media/s6dp-link.h>
 
 #include <variant/hardware.h>
 #include <variant/dmac.h>
@@ -53,6 +54,14 @@ static const signed char i2c_irq_mappings[] = {
 	-1
 };
 
+static const signed char dp_irq_mappings[] = {
+	S6_INTC_DMA_DPTERMCNT(0),
+	S6_INTC_DMA_DPTERMCNT(1),
+	S6_INTC_DMA_DPTERMCNT(2),
+	S6_INTC_DMA_DPTERMCNT(3),
+	-1
+};
+
 static const signed char isef_irq_mappings[] = {
 	S6_INTC_DMA_LMSPENDCNT(11),
 	-1
@@ -75,6 +84,7 @@ const signed char *platform_irq_mappings[NR_IRQS] = {
 	[UART_INTNUM] = uart_irq_mappings,
 	[GMAC_INTNUM] = gmac_irq_mappings,
 	[I2C_INTNUM] = i2c_irq_mappings,
+	[DP_INTNUM] = dp_irq_mappings,
 	[ISEF_INTNUM] = isef_irq_mappings,
 	[I2S_INTNUM] = i2s_irq_mappings,
 	[SPI_INTNUM] = spi_irq_mappings,
@@ -191,6 +201,10 @@ static struct resource s6_i2c_resource[] = {
 #define S6I2C_ADDR_CDCE906	0x69
 #define S6I2C_ADDR_PCA9543	0x73
 
+static struct s6dp_link s6dp_links[] = {
+	{ }
+};
+
 static struct i2c_board_info __initdata s6_i2c_devices[] = {
 	{
 		I2C_BOARD_INFO("24c02", S6I2C_ADDR_AT24HC02B),
@@ -355,6 +369,23 @@ static struct spi_board_info __initdata s6_spi_devices[] = {
 	},
 };
 
+static struct resource s6_dp_resource[] = {
+	{
+		.start	= (resource_size_t)S6_REG_DP,
+		.end	= (resource_size_t)S6_REG_DP + 0x10000 - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= (resource_size_t)S6_REG_DPDMA,
+		.end	= (resource_size_t)S6_REG_DPDMA + 0x10000 - 1,
+		.flags	= IORESOURCE_DMA,
+	},
+	{
+		.start	= (resource_size_t)DP_INTNUM,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
 static struct platform_device platform_devices[] = {
 	{
 		.name = "serial8250",
@@ -391,6 +422,15 @@ static struct platform_device platform_devices[] = {
 			.platform_data = &s6_spi_pdata,
 		},
 	},
+	{
+		.name = "s6dp",
+		.id = -1,
+		.resource = s6_dp_resource,
+		.num_resources = ARRAY_SIZE(s6_dp_resource),
+		.dev = {
+			.platform_data = &s6dp_links,
+		},
+	},
 };
 
 static int __init device_init(void)
diff --git a/arch/xtensa/platforms/s6105/include/platform/irq.h b/arch/xtensa/platforms/s6105/include/platform/irq.h
index 84c972f..65f6d92 100644
--- a/arch/xtensa/platforms/s6105/include/platform/irq.h
+++ b/arch/xtensa/platforms/s6105/include/platform/irq.h
@@ -5,6 +5,7 @@
 #define UART_INTNUM	4
 #define GMAC_INTNUM	5
 #define I2C_INTNUM	6
+#define DP_INTNUM	7
 #define ISEF_INTNUM	8
 #define I2S_INTNUM	10
 #define SPI_INTNUM	11
diff --git a/arch/xtensa/platforms/s6105/setup.c b/arch/xtensa/platforms/s6105/setup.c
index bbd1730..87ae88c 100644
--- a/arch/xtensa/platforms/s6105/setup.c
+++ b/arch/xtensa/platforms/s6105/setup.c
@@ -46,12 +46,14 @@ void __init platform_setup(char **cmdline)
 	reg &= ~(1 << S6_GREG1_BLOCK_SB);
 	reg &= ~(1 << S6_GREG1_BLOCK_GMAC);
 	reg &= ~(1 << S6_GREG1_BLOCK_I2S);
+	reg &= ~(1 << S6_GREG1_BLOCK_DP);
 	writel(reg, S6_REG_GREG1 + S6_GREG1_CLKGATE);
 
 	reg = readl(S6_REG_GREG1 + S6_GREG1_BLOCKENA);
 	reg |= 1 << S6_GREG1_BLOCK_SB;
 	reg |= 1 << S6_GREG1_BLOCK_GMAC;
 	reg |= 1 << S6_GREG1_BLOCK_I2S;
+	reg |= 1 << S6_GREG1_BLOCK_DP;
 	writel(reg, S6_REG_GREG1 + S6_GREG1_BLOCKENA);
 
 	printk(KERN_NOTICE "S6105 on Stretch S6000 - "
-- 
1.6.2.107.ge47ee


             reply	other threads:[~2009-03-26 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 14:49 Daniel Glöckner [this message]
2009-03-26 14:49 ` [patch 2/5] xtensa: add saa7121 " Daniel Glöckner
2009-03-26 14:49 ` [patch 3/5] xtensa: add mt9d131l demo head " Daniel Glöckner
2009-03-26 14:49 ` [patch 4/5] xtensa: add resources for canonical data port modes " Daniel Glöckner
2009-03-26 14:49 ` [patch 5/5] xtensa: s6000 video updates for s6105_defconfig Daniel Glöckner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238078974-26040-1-git-send-email-dg@emlix.com \
    --to=dg@emlix.com \
    --cc=chris@zankel.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®