lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Mar 2009 11:49:16 +0100
From:	Oskar Schirmer <os@...ix.com>
To:	Chris Zankel <chris@...kel.net>
Cc:	linux-kernel@...r.kernel.org, linux-xtensa@...ux-xtensa.org,
	Oskar Schirmer <os@...ix.com>
Subject: [patch 2/4] xtensa: platform declarations for s6000 isef driver

Add platform specific irq and dma declarations for use of ISEF on s6000.

Signed-off-by: Oskar Schirmer <os@...ix.com>
---
 arch/xtensa/platforms/s6105/device.c               |   41 ++++++++++++++++++++
 .../platforms/s6105/include/platform/ioctl.h       |   17 ++++++++
 2 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 arch/xtensa/platforms/s6105/include/platform/ioctl.h

diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c
index bc254ac..a55d054 100644
--- a/arch/xtensa/platforms/s6105/device.c
+++ b/arch/xtensa/platforms/s6105/device.c
@@ -31,6 +31,7 @@
 #define UART_INTNUM		4
 #define GMAC_INTNUM		5
 #define I2C_INTNUM		6
+#define ISEF_INTNUM		8
 #define SPI_INTNUM		11
 
 static const signed char gpio3_irq_mappings[] = {
@@ -57,6 +58,11 @@ static const signed char i2c_irq_mappings[] = {
 	-1
 };
 
+static const signed char isef_irq_mappings[] = {
+	S6_INTC_DMA_LMSPENDCNT(11),
+	-1
+};
+
 static const signed char spi_irq_mappings[] = {
 	S6_INTC_SPI,
 	-1
@@ -67,6 +73,7 @@ const signed char *platform_irq_mappings[NR_IRQS] = {
 	[UART_INTNUM] = uart_irq_mappings,
 	[GMAC_INTNUM] = gmac_irq_mappings,
 	[I2C_INTNUM] = i2c_irq_mappings,
+	[ISEF_INTNUM] = isef_irq_mappings,
 	[SPI_INTNUM] = spi_irq_mappings,
 };
 
@@ -187,6 +194,34 @@ static struct i2c_board_info __initdata s6_i2c_devices[] = {
 	},
 };
 
+static struct resource s6_isef_resource[] = {
+	{
+		.name   = "mem",
+		.start  = (resource_size_t)S6_MEM_EFI,
+		.end    = (resource_size_t)S6_MEM_EFI + 0x100000 - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	{
+		.name   = "mem",
+		.start  = (resource_size_t)S6_REG_XAD,
+		.end    = (resource_size_t)S6_REG_XAD + 0x40000 - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	{
+		.name   = "dma",
+		.start  = (resource_size_t)
+			DMA_CHNL(S6_REG_LMSDMA, 11),
+		.end    = (resource_size_t)
+			DMA_CHNL(S6_REG_LMSDMA, 11) + 0x100 - 1,
+		.flags  = IORESOURCE_DMA,
+	},
+	{
+		.name   = "irq",
+		.start  = (resource_size_t)ISEF_INTNUM,
+		.flags  = IORESOURCE_IRQ,
+	},
+};
+
 static struct resource s6_spi_resource[] = {
 	{
 		.name   = "mem",
@@ -337,6 +372,12 @@ static struct platform_device platform_devices[] = {
 		},
 	},
 	{
+		.name = "s6isef",
+		.id = 0,
+		.resource = s6_isef_resource,
+		.num_resources = ARRAY_SIZE(s6_isef_resource),
+	},
+	{
 		.name = "spi_s6000",
 		.resource = s6_spi_resource,
 		.num_resources = ARRAY_SIZE(s6_spi_resource),
diff --git a/arch/xtensa/platforms/s6105/include/platform/ioctl.h b/arch/xtensa/platforms/s6105/include/platform/ioctl.h
new file mode 100644
index 0000000..0fc6e2c
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/ioctl.h
@@ -0,0 +1,17 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2008 Emlix GmbH http://www.emlix.com
+ */
+
+#ifndef __XTENSA_S6105_IOCTL_H
+#define __XTENSA_S6105_IOCTL_H
+
+#include <linux/ioctl.h>
+
+#define S6IOCTL_ISEF_PRELOAD		_IO(56, 1)
+#define S6IOCTL_ISEF_INVALIDATE		_IO(56, 2)
+
+#endif /* __XTENSA_S6105_IOCTL_H */
-- 
1.6.2.107.ge47ee

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ