Greetings,
If someone has something which is not in the mainline, was not in the
12.01 kernel release, but worth including into the 12.02 kernel release,
please let me know by the end of Feb 14, PST (the git branch where I
could pull from). This release will be v3.3-rc3 based, so you patches
should be based on that (easiest for me), or on the tip of the linus tree.
My expectations are that the power management WG has some topics to add
to the 12.02.
I am aware of git://git.secretlab.ca/git/linux-2.6.git, irqdomain/next
The kernel working group has some blueprints for 12.02. Please let me
know, if there is something for me to do here.
The following commits from linux-linaro-3.2 branch will be carried over
to 12.02:
commit 2eb6f8b98d8471c83be7e3ab53fe4386884c96a9
Author: Vincent Guittot <vincent.guittot(a)linaro.org>
Date: Fri Oct 21 09:02:47 2011 +0200
sched: Ensure cpu_power periodic update
commit 2b21b980917662503a16e079b5d4a5a8a17886cd
Author: Arnd Bergmann <arnd(a)arndb.de>
Date: Sat Oct 8 17:07:50 2011 +0200
ARM: kprobes: work around build errors
commit 61d24dd4d0528d369ea81f6e5d5e1db9c62ad46a
Author: Ming Lei <ming.lei(a)canonical.com>
Date: Wed Aug 31 00:03:13 2011 +0800
usb: ehci: make HC see up-to-date qh/qtd descriptor ASAP
Amit (Amit Daniel Kachhap), please let me know if for 12.02 I should use
the commits below, or take an updated version from you:
ARM: exynos4: Add thermal sensor driver platform device support
thermal: exynos4: Register the tmu sensor with the thermal interface layer
thermal: exynos: Add thermal interface support for linux thermal layer
thermal: Add generic cpu cooling implementation
thermal: Add a new trip type to use cooling device instance number
EXYNOS: Make EXYNOS common cpufreq driver
ARM: exynos: Enable l2 configuration through device tree
ARM: exynos: remove useless code to save/restore L2
ARM: exynos: save L2 settings during bootup
ARM: s5p: add L2 early resume code
ARM: exynos: Add support AFTR mode on EXYNOS4210
Thanks,
Andrey Konovalov
From: "Ying-Chun Liu (PaulLiu)" <paul.liu(a)linaro.org>
Anatop is a mfd chip embedded in Freescale i.MX6Q SoC.
Anatop provides regulators and thermal.
This driver handles the address space and the operation of the mfd device.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>
Acked-by: Shawn Guo <shawn.guo(a)linaro.org>
Cc: Samuel Ortiz <sameo(a)linux.intel.com>
Cc: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
Cc: Venu Byravarasu <vbyravarasu(a)nvidia.com>
Cc: Peter Korsgaard <jacmet(a)sunsite.dk>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Rob Lee <rob.lee(a)linaro.org>
---
drivers/mfd/Kconfig | 8 +++
drivers/mfd/Makefile | 1 +
drivers/mfd/anatop-mfd.c | 137 ++++++++++++++++++++++++++++++++++++++++++++
include/linux/mfd/anatop.h | 40 +++++++++++++
4 files changed, 186 insertions(+), 0 deletions(-)
create mode 100644 drivers/mfd/anatop-mfd.c
create mode 100644 include/linux/mfd/anatop.h
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 82da448..c3a9f31 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -846,6 +846,14 @@ config MFD_INTEL_MSIC
Passage) chip. This chip embeds audio, battery, GPIO, etc.
devices used in Intel Medfield platforms.
+config MFD_ANATOP
+ bool "Support for Freescale i.MX on-chip ANATOP controller"
+ depends on SOC_IMX6Q
+ help
+ Select this option to enable Freescale i.MX on-chip ANATOP
+ MFD controller. This controller embeds regulator and
+ thermal devices for Freescale i.MX platforms.
+
endmenu
endif
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 27430d3..42c8bf6 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -113,3 +113,4 @@ obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o
obj-$(CONFIG_MFD_AAT2870_CORE) += aat2870-core.o
obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o
obj-$(CONFIG_MFD_S5M_CORE) += s5m-core.o s5m-irq.o
+obj-$(CONFIG_MFD_ANATOP) += anatop-mfd.o
diff --git a/drivers/mfd/anatop-mfd.c b/drivers/mfd/anatop-mfd.c
new file mode 100644
index 0000000..2af4248
--- /dev/null
+++ b/drivers/mfd/anatop-mfd.c
@@ -0,0 +1,137 @@
+/*
+ * Anatop MFD driver
+ *
+ * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>
+ * Copyright (C) 2012 Linaro
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/mfd/anatop.h>
+
+u32 anatop_get_bits(struct anatop *adata, u32 addr, int bit_shift,
+ int bit_width)
+{
+ u32 val, mask;
+
+ if (bit_width == 32)
+ mask = ~0;
+ else
+ mask = (1 << bit_width) - 1;
+
+ val = readl(adata->ioreg + addr);
+ val = (val >> bit_shift) & mask;
+
+ return val;
+}
+EXPORT_SYMBOL_GPL(anatop_get_bits);
+
+void anatop_set_bits(struct anatop *adata, u32 addr, int bit_shift,
+ int bit_width, u32 data)
+{
+ u32 val, mask;
+
+ if (bit_width == 32)
+ mask = ~0;
+ else
+ mask = (1 << bit_width) - 1;
+
+ spin_lock(&adata->reglock);
+ val = readl(adata->ioreg + addr) & ~(mask << bit_shift);
+ writel((data << bit_shift) | val, adata->ioreg + addr);
+ spin_unlock(&adata->reglock);
+}
+EXPORT_SYMBOL_GPL(anatop_set_bits);
+
+static const struct of_device_id of_anatop_match[] = {
+ { .compatible = "fsl,imx6q-anatop", },
+ { },
+};
+
+static int __devinit of_anatop_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct device_node *np = dev->of_node;
+ void *ioreg;
+ struct anatop *drvdata;
+
+ ioreg = of_iomap(np, 0);
+ if (!ioreg)
+ return -EADDRNOTAVAIL;
+ drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
+ drvdata->ioreg = ioreg;
+ spin_lock_init(&drvdata->reglock);
+ platform_set_drvdata(pdev, drvdata);
+ of_platform_populate(np, of_anatop_match, NULL, dev);
+
+ return 0;
+}
+
+static int __devexit of_anatop_remove(struct platform_device *pdev)
+{
+ struct anatop *drvdata;
+ drvdata = platform_get_drvdata(pdev);
+ iounmap(drvdata->ioreg);
+
+ return 0;
+}
+
+static struct platform_driver anatop_of_driver = {
+ .driver = {
+ .name = "anatop-mfd",
+ .owner = THIS_MODULE,
+ .of_match_table = of_anatop_match,
+ },
+ .probe = of_anatop_probe,
+ .remove = of_anatop_remove,
+};
+
+static int __init anatop_init(void)
+{
+ return platform_driver_register(&anatop_of_driver);
+}
+postcore_initcall(anatop_init);
+
+static void __exit anatop_exit(void)
+{
+ platform_driver_unregister(&anatop_of_driver);
+}
+module_exit(anatop_exit);
+
+MODULE_AUTHOR("Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>");
+MODULE_DESCRIPTION("ANATOP MFD driver");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mfd/anatop.h b/include/linux/mfd/anatop.h
new file mode 100644
index 0000000..22c1007
--- /dev/null
+++ b/include/linux/mfd/anatop.h
@@ -0,0 +1,40 @@
+/*
+ * anatop.h - Anatop MFD driver
+ *
+ * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>
+ * Copyright (C) 2012 Linaro
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __LINUX_MFD_ANATOP_H
+#define __LINUX_MFD_ANATOP_H
+
+#include <linux/spinlock.h>
+
+/**
+ * anatop - MFD data
+ * @ioreg: ioremap register
+ * @reglock: spinlock for register read/write
+ */
+struct anatop {
+ void *ioreg;
+ spinlock_t reglock;
+};
+
+extern u32 anatop_get_bits(struct anatop *, u32, int, int);
+extern void anatop_set_bits(struct anatop *, u32, int, int, u32);
+
+#endif /* __LINUX_MFD_ANATOP_H */
--
1.7.9.1
Hi.
I'm currently fumbling around in the dark, trying to find a kernel which
I can use to compile the powervr drivers, as well as with rpmsg support.
Ideally the rpmsg should already be in the kernel, but I can see that
this might be hard, and cherry picking is an ok solution. I'm wondering
if one of the ti landing team kernels might be suitable for this, and if
one of these is considered a stable kernel?
Last kernel I looked at was the LEB 3.1.5+ kernel,
release-linux-2011-12, which worked fine for compiling the pvr drivers
from rsalveti, but didn't contain rpmsg drivers. When I tried the
release-linux-2012-01 kernel, 3.2.0+, it could compile the powervr
driver, but didn't contain the rpmsg drivers and didn't actually run, as
I got the message 'coherent pool not initialized' from the kernel when
trying to allocate for the ehci-omap.
The kernel will be run on a device with an omap4460 if this is of interest.
I would really appreciate your help on this, as I feel quite lost in all
the different branches and tags which reside in the different linaro
kernels, so a repo with a stable commit would really help. As most rpmsg
implementations I have seen follows the 3.2 kernel, that would really be
preferable if I need to cherry pick, but if not I don't really care if
it's 3.1 or 3.2.
If you have any questions, please do not hesitate to ask them.
Best regard
Martin Ertsas
Hello,
Continuing on the ARM Porting effort to fix the remaining issues with
Precise, we'll be having the ARM Porting Jam this friday as well!
The main focus for this Friday, besides the usual FTBFS issues
described at http://people.linaro.org/~rsalveti/arm-porting-queue/arm-porting-queue-repo…,
is porting the most packages we can to be multi-arch compatible. This
will allow us to increase the list of packages we can easily
cross-compile using multi-arch.
Wookey got a quite long list of things to do at
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/MultiarchCrossBui…,
so please have a look and make sure to get in touch with him at
#linaro @ freenode if you need any extra help.
Happy porting!
--
Ricardo Salveti de Araujo
Hi there,
Launchpad now supports blueprint work items natively and we've already
migrated the work items from the whiteboards of most Linaro Blueprints.
Most of us wouldn't even notice those changes because we still have a
text field to enter work items and it uses the exact same format we used
before. In the future we might improve the user experience but for now
we decided to keep the same UI and format. There's a blog post with more
information, if you're curious:
http://blog.launchpad.net/
In practice this just means you'll enter the work items in the 'Work
items' field instead of the whiteboard (the meta info
[acceptance/headline] still go there, though), but the work items of
some of our Blueprints could not be migrated, so I've spammed^W sent an
email to the owner/assignee of each of them. It would be nice if those
of you who receive that email migrated your BPs manually but even if you
don't status.l.o is setup to pull work items from both the new field and
the whiteboard, so you'll still see your work items there.
And if you're curious why we're doing all this, it's so that we can
implement the monthly engineering views in Launchpad:
https://dev.launchpad.net/Projects/WorkItems
Cheers,
--
Guilherme Salgado <https://launchpad.net/~salgado>
The common clock framework defines a common struct clk as well as an
implementation of the clk api that unifies clock operations on various
platforms and devices.
The net result is consolidation of many different struct clk definitions
and platform-specific clock framework implementations.
Thanks to Sascha Hauer and Andrew Lunn for their great review and
feedback on the previous v5 series.
Major changes since v5:
* removed redundant HAVE_CLK_PREPARE in Kconfig
* new CONFIG_COMMON_CLK_DISABLE_UNUSED feature
* results in a new clk_op callback, .is_enabled
* standardized the hw-specific locking in the basic clock types
* export the individual ops for each basic clock type
* improve registration for single-parent basic clocks (thanks Sascha)
* fixed bugs in gate clock's static initializers (thanks Andrew)
* overall improvements to Documentation/clk.txt
* rebased onto Linus' v3.3-rc6 tag
Major changes since v4:
* rolled in TGLX's comments on overall design. We now have,
* proper handling of root clocks and orphan clocks
* multi-parent clocks are handled in the core
* struct clk is shielded from struct clk_foo and vice versa
* this is a return to the previous struct clk_hw design
* split basic clock types out into separate files
* split headers up by purpose
* clk.h remains the driver-level interface
* declarations for rate change notifiers are the only additions
* clk-provider.h is primary header for implementing clock operations
* clk-private.h allows for static initialization of clock data
* validation and bug fixes
* rebased onto Linus' v3.3-rc5 tag
Patches can be pulled from:
git://git.linaro.org/people/mturquette/linux.git v3.3-rc6-clkv6
v5 can be found at,
http://article.gmane.org/gmane.linux.kernel/1261472
v4 can be found at,
http://article.gmane.org/gmane.linux.linaro.devel/8896/
v3 can be found at,
http://article.gmane.org/gmane.linux.kernel/1218622
Mike Turquette (3):
Documentation: common clk API
clk: introduce the common clock framework
clk: basic clock hardware types
Documentation/clk.txt | 233 +++++++
drivers/clk/Kconfig | 39 ++
drivers/clk/Makefile | 2 +
drivers/clk/clk-divider.c | 204 ++++++
drivers/clk/clk-fixed-rate.c | 82 +++
drivers/clk/clk-gate.c | 157 +++++
drivers/clk/clk-mux.c | 123 ++++
drivers/clk/clk.c | 1424 ++++++++++++++++++++++++++++++++++++++++++
include/linux/clk-private.h | 192 ++++++
include/linux/clk-provider.h | 298 +++++++++
include/linux/clk.h | 68 ++-
11 files changed, 2817 insertions(+), 5 deletions(-)
create mode 100644 Documentation/clk.txt
create mode 100644 drivers/clk/clk-divider.c
create mode 100644 drivers/clk/clk-fixed-rate.c
create mode 100644 drivers/clk/clk-gate.c
create mode 100644 drivers/clk/clk-mux.c
create mode 100644 drivers/clk/clk.c
create mode 100644 include/linux/clk-private.h
create mode 100644 include/linux/clk-provider.h
--
1.7.5.4
For the 12.01 cycle the Linaro Platforms team is pleased to announce
the availability of the new linarotv-xbmc based image. This combines
the xbmc media server project with linaro's leb to result in a "works
out of the box" arm based media server image.
It can be found at http://snapshots.linaro.org/oneiric/linaro-o-linarotv-xbmc/
Currently the best experience can be found on Panda/Panda ES however
boards with hardware video acceleration enabled should work well. We
welcome feedback and suggestions on the image. Support is on a as
"best can" basis. Bugs if found should be written against
linaro-ubuntu in lauchpad.
Enjoy!
--
Regards,
Tom
"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Multimedia Tech Lead | Linaro.org │ Open source software for ARM SoCs
w) tom.gall att linaro.org
w) tom_gall att vnet.ibm.com
h) tom_gall att mac.com
Sorry disturbing you!
I have ask google for do ARM Cortex-A9 PMU supoort oprofile, but it do not have a answer definitely .
So i ask you do ARM Cortex-A9 PMU supoort oprofile.
Can u help me?
zachary6626
From: "Ying-Chun Liu (PaulLiu)" <paul.liu(a)linaro.org>
Anatop is a mfd chip embedded in Freescale i.MX6Q SoC.
Anatop provides regulators and thermal.
This driver handles the address space and the operation of the mfd device.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>
Acked-by: Shawn Guo <shawn.guo(a)linaro.org>
Cc: Samuel Ortiz <sameo(a)linux.intel.com>
Cc: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
Cc: Venu Byravarasu <vbyravarasu(a)nvidia.com>
Cc: Peter Korsgaard <jacmet(a)sunsite.dk>
---
drivers/mfd/Kconfig | 8 +++
drivers/mfd/Makefile | 1 +
drivers/mfd/anatop-mfd.c | 142 ++++++++++++++++++++++++++++++++++++++++++++
include/linux/mfd/anatop.h | 40 ++++++++++++
4 files changed, 191 insertions(+), 0 deletions(-)
create mode 100644 drivers/mfd/anatop-mfd.c
create mode 100644 include/linux/mfd/anatop.h
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 82da448..c3a9f31 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -846,6 +846,14 @@ config MFD_INTEL_MSIC
Passage) chip. This chip embeds audio, battery, GPIO, etc.
devices used in Intel Medfield platforms.
+config MFD_ANATOP
+ bool "Support for Freescale i.MX on-chip ANATOP controller"
+ depends on SOC_IMX6Q
+ help
+ Select this option to enable Freescale i.MX on-chip ANATOP
+ MFD controller. This controller embeds regulator and
+ thermal devices for Freescale i.MX platforms.
+
endmenu
endif
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 27430d3..42c8bf6 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -113,3 +113,4 @@ obj-$(CONFIG_TPS65911_COMPARATOR) += tps65911-comparator.o
obj-$(CONFIG_MFD_AAT2870_CORE) += aat2870-core.o
obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o
obj-$(CONFIG_MFD_S5M_CORE) += s5m-core.o s5m-irq.o
+obj-$(CONFIG_MFD_ANATOP) += anatop-mfd.o
diff --git a/drivers/mfd/anatop-mfd.c b/drivers/mfd/anatop-mfd.c
new file mode 100644
index 0000000..4272e60
--- /dev/null
+++ b/drivers/mfd/anatop-mfd.c
@@ -0,0 +1,142 @@
+/*
+ * Anatop MFD driver
+ *
+ * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>
+ * Copyright (C) 2012 Linaro
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/mfd/anatop.h>
+
+u32 anatop_get_bits(struct anatop *adata, u32 addr, int bit_shift,
+ int bit_width)
+{
+ u32 val, mask;
+
+ if (bit_width == 32)
+ mask = ~0;
+ else
+ mask = (1 << bit_width) - 1;
+
+ val = readl(adata->ioreg + addr);
+ val = (val >> bit_shift) & mask;
+
+ return val;
+}
+EXPORT_SYMBOL(anatop_get_bits);
+
+void anatop_set_bits(struct anatop *adata, u32 addr, int bit_shift,
+ int bit_width, u32 data)
+{
+ u32 val, mask;
+
+ if (bit_width == 32)
+ mask = ~0;
+ else
+ mask = (1 << bit_width) - 1;
+
+ spin_lock(&adata->reglock);
+ val = readl(adata->ioreg + addr) & ~(mask << bit_shift);
+ writel((data << bit_shift) | val, adata->ioreg + addr);
+ spin_unlock(&adata->reglock);
+}
+EXPORT_SYMBOL(anatop_set_bits);
+
+static const struct of_device_id of_anatop_subdevice_match[] = {
+ { .compatible = "fsl,anatop-regulator", },
+ { .compatible = "fsl,anatop-thermal", },
+ { },
+};
+
+static int __devinit of_anatop_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct device_node *np = dev->of_node;
+ void *ioreg;
+ struct anatop *drvdata;
+
+ ioreg = of_iomap(np, 0);
+ if (!ioreg)
+ return -EADDRNOTAVAIL;
+ drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
+ drvdata->ioreg = ioreg;
+ spin_lock_init(&drvdata->reglock);
+ platform_set_drvdata(pdev, drvdata);
+ of_platform_bus_probe(np, of_anatop_subdevice_match, dev);
+
+ return 0;
+}
+
+static int __devexit of_anatop_remove(struct platform_device *pdev)
+{
+ struct anatop *drvdata;
+ drvdata = platform_get_drvdata(pdev);
+ iounmap(drvdata->ioreg);
+ return 0;
+}
+
+static const struct of_device_id of_anatop_match[] = {
+ { .compatible = "fsl,imx6q-anatop", },
+ { },
+};
+
+static struct platform_driver anatop_of_driver = {
+ .driver = {
+ .name = "anatop-mfd",
+ .owner = THIS_MODULE,
+ .of_match_table = of_anatop_match,
+ },
+ .probe = of_anatop_probe,
+ .remove = of_anatop_remove,
+};
+
+static int __init anatop_init(void)
+{
+ return platform_driver_register(&anatop_of_driver);
+}
+postcore_initcall(anatop_init);
+
+static void __exit anatop_exit(void)
+{
+ platform_driver_unregister(&anatop_of_driver);
+}
+module_exit(anatop_exit);
+
+MODULE_AUTHOR("Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>");
+MODULE_DESCRIPTION("ANATOP MFD driver");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mfd/anatop.h b/include/linux/mfd/anatop.h
new file mode 100644
index 0000000..22c1007
--- /dev/null
+++ b/include/linux/mfd/anatop.h
@@ -0,0 +1,40 @@
+/*
+ * anatop.h - Anatop MFD driver
+ *
+ * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) <paul.liu(a)linaro.org>
+ * Copyright (C) 2012 Linaro
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __LINUX_MFD_ANATOP_H
+#define __LINUX_MFD_ANATOP_H
+
+#include <linux/spinlock.h>
+
+/**
+ * anatop - MFD data
+ * @ioreg: ioremap register
+ * @reglock: spinlock for register read/write
+ */
+struct anatop {
+ void *ioreg;
+ spinlock_t reglock;
+};
+
+extern u32 anatop_get_bits(struct anatop *, u32, int, int);
+extern void anatop_set_bits(struct anatop *, u32, int, int, u32);
+
+#endif /* __LINUX_MFD_ANATOP_H */
--
1.7.9.1