summaryrefslogtreecommitdiff
path: root/recipes/kexecboot/linux-kexecboot-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch
blob: 2f5f11400c96f4983db02a3cb7b3d8f712519408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
From d6e8b347dbcce9e0e8d2204b774c1c33cfcb483e Mon Sep 17 00:00:00 2001
From: Ian Molton <spyro@f2s.com>
Date: Sat, 29 Dec 2007 15:27:43 +0000
Subject: [PATCH 07/64] Common headers for TMIO MFD subdevices

---
 include/linux/mfd/tmio.h |   62 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/mfd/tmio.h

diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
new file mode 100644
index 0000000..b42a4c3
--- /dev/null
+++ b/include/linux/mfd/tmio.h
@@ -0,0 +1,62 @@
+#ifndef MFD_TMIO_H
+#define MFD_TMIO_H
+
+#include <linux/io.h>
+#include <linux/platform_device.h>
+
+struct fb_videomode;
+
+/*
+ * data for the NAND controller
+ */
+struct tmio_nand_data {
+	struct nand_bbt_descr	*badblock_pattern;
+	struct mtd_partition	*partition;
+	unsigned int		num_partitions;
+};
+
+struct tmio_fb_data {
+	int			(*lcd_set_power)(struct platform_device *fb_dev,
+								bool on);
+	int			(*lcd_mode)(struct platform_device *fb_dev,
+						struct fb_videomode *mode);
+	int			num_modes;
+	struct fb_videomode	*modes;
+};
+
+static u32 __maybe_unused tmio_ioread32(const void __iomem *addr)
+{
+	return ((u32) ioread16(addr)) | (((u32) ioread16(addr + 2)) << 16);
+}
+
+static u32 __maybe_unused tmio_iowrite32(u32 val, const void __iomem *addr)
+{
+	iowrite16(val,		addr);
+	iowrite16(val >> 16,	addr + 2);
+	return val;
+}
+
+#define FBIO_TMIO_ACC_WRITE	0x7C639300
+#define FBIO_TMIO_ACC_SYNC	0x7C639301
+
+#define TMIO_MMC_CONFIG         "tmio-mmc-config"
+#define TMIO_MMC_CONTROL        "tmio-mmc-control"
+#define TMIO_MMC_IRQ            "tmio-mmc"
+
+#define TMIO_NAND_CONFIG	"tmio-nand-config"
+#define TMIO_NAND_CONTROL	"tmio-nand-control"
+#define TMIO_NAND_IRQ		"tmio-nand"
+
+#define TMIO_FB_CONFIG		"tmio-fb-config"
+#define TMIO_FB_CONTROL		"tmio-fb-control"
+#define TMIO_FB_VRAM		"tmio-fb-vram"
+#define TMIO_FB_IRQ		"tmio-fb"
+
+#define TMIO_OHCI_CONFIG	"tmio-ohci-config"
+#define TMIO_OHCI_CONTROL	"tmio-ohci-control"
+#define TMIO_OHCI_SRAM		"tmio-ohci-sram"
+#define TMIO_OHCI_SRAM_ALIAS	"tmio-ohci-sram-alias"
+#define TMIO_OHCI_IRQ		"tmio-ohci"
+
+#endif
+
-- 
1.5.3.8