Hi. I'm Jaein.
I'm working with Pandaboard ES.
Actually, I downloaded Android ICS Source code for that board.
But, I can't find x-loader source code that is first bootloader for
Pandaboard.
I want to modify x-loader, but I couldn't, because there is no code.
How can I get the x-loader source?
Before, I downloaded x-loader also at "omappedia.org" for
Pandaboard(Omap4430).
Please, give me an information.
Thanks.
Hi there,
As of last night TILT fails to build for omap4_defconfig.
> panto@sles11esa:~/ti/kernels/kernel-tilt$ git checkout -b tilt-tracking-work origin/tilt-tracking
> Branch tilt-tracking-work set up to track remote branch tilt-tracking from origin.
> Switched to a new branch 'tilt-tracking-work'
>
>
...
> panto@sles11esa:~/ti/kernels/kernel-tilt$ make omap4_defconfig
> warning: (ARCH_OMAP4 && ARCH_OMAP5) selects LOCAL_TIMERS which has unmet direct dependencies (SMP && !ARM_SMP_TWD)
> warning: (ARCH_OMAP4 && ARCH_OMAP5) selects LOCAL_TIMERS which has unmet direct dependencies (SMP && !ARM_SMP_TWD)
>
^ This is dubious
> panto@sles11esa:~/ti/kernels/kernel-tilt$ make -j 2
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> make[1]: `include/generated/mach-types.h' is up to date.
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> CC arch/arm/kernel/smp_twd.o
> arch/arm/kernel/smp_twd.c: In function 'twd_timer_setup':
> arch/arm/kernel/smp_twd.c:226:7: error: 'twd_evt' undeclared (first use in this function)
> arch/arm/kernel/smp_twd.c:226:7: note: each undeclared identifier is reported only once for each function it appears in
> arch/arm/kernel/smp_twd.c:251:2: warning: ISO C90 forbids mixed declarations and code
> arch/arm/kernel/smp_twd.c:267:2: warning: type defaults to 'int' in type name
> arch/arm/kernel/smp_twd.c:267:17: warning: initialization makes pointer from integer without a cast
> arch/arm/kernel/smp_twd.c:267:2: warning: type defaults to 'int' in type name
> arch/arm/kernel/smp_twd.c:267:2: warning: type defaults to 'int' in type name
> arch/arm/kernel/smp_twd.c:267:2: warning: type defaults to 'int' in type name
> arch/arm/kernel/smp_twd.c:267:15: warning: assignment makes pointer from integer without a cast
^ twd_evt is nowhere to be found;
> make[1]: *** [arch/arm/kernel/smp_twd.o] Error 1
> make: *** [arch/arm/kernel] Error 2
> make: *** Waiting for unfinished jobs....
> CC arch/arm/mach-omap2/omap_tps6236x.o
> AS arch/arm/mach-omap2/omap-headsmp.o
> CC arch/arm/mach-omap2/omap-hotplug.o
> arch/arm/mach-omap2/omap_tps6236x.c:267:3: error: unknown field 'omap_chip' specified in initializer
> arch/arm/mach-omap2/omap_tps6236x.c:267:3: error: implicit declaration of function 'OMAP_CHIP_INIT'
> arch/arm/mach-omap2/omap_tps6236x.c:267:31: error: 'CHIP_IS_OMAP4460ES1_0' undeclared here (not in a function)
> make[1]: *** [arch/arm/mach-omap2/omap_tps6236x.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [arch/arm/mach-omap2] Error 2
>
>
^ That's a different build error.
Regards
-- Pantelis
I'd like to have one KVM kernel image which is suitable for the real
hardware host and the virtio based guest. The single zImage plus
Device Tree work seem like a great way to do this.
We're currently using the vexpress-a15 on a Fast Model as the host and
a vexpress-a15 as the guest. Device Tree support is required to
describe the virtio-mmio devices. As a bonus, the vexpress-a9 and
vexpress-a15 are the same hardware with a different memory map and can
help demonstrate the Device Tree support.
What are the plans for single zImage? Where does the vexpress-a15 fit
in with that? Could I bump it to the front of the list?
-- Michael
There a few cases when a platform's cpuidle_device will only have one
cpuidle state. e.g., when a single idle state system uses cpuidle
to provide sysfs staticstics for profiling (powertop, etc). This can
also be the case for coupled smp system implementations that keep
all but one cpuidle_device at a state_count of 1, but they still want
to export idle statistics for these states using cpuidle.
Signed-off-by: Robert Lee <rob.lee(a)linaro.org>
---
drivers/cpuidle/governors/ladder.c | 7 +++++--
drivers/cpuidle/governors/menu.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c
index b6a09ea..13abdba 100644
--- a/drivers/cpuidle/governors/ladder.c
+++ b/drivers/cpuidle/governors/ladder.c
@@ -71,8 +71,11 @@ static int ladder_select_state(struct cpuidle_driver *drv,
int last_residency, last_idx = ldev->last_state_idx;
int latency_req = pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
- /* Special case when user has set very strict latency requirement */
- if (unlikely(latency_req == 0)) {
+ /*
+ * Special case when user has set very strict latency requirement or
+ * there is currently only one state for this device.
+ */
+ if ((latency_req == 0) || (dev->state_count == 1)) {
ladder_do_selection(ldev, last_idx, 0);
return 0;
}
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index ad09526..80eb606 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -249,8 +249,11 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
data->last_state_idx = 0;
data->exit_us = 0;
- /* Special case when user has set very strict latency requirement */
- if (unlikely(latency_req == 0))
+ /*
+ * Special case when user has set very strict latency requirement or
+ * there is currently only one state for this device.
+ */
+ if ((latency_req == 0) || (dev->state_count == 1))
return 0;
/* determine the expected residency time, round up */
--
1.7.1
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 f147395..f7e2f61 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -830,6 +830,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 b953bab..8e11060 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -112,3 +112,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..d9bc63c
--- /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);
+ 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