summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-17 00:53:12 +0000
committerian <ian@FreeBSD.org>2014-05-17 00:53:12 +0000
commita8f1dca86b2bf3b15991d0ef01e402a7208db326 (patch)
treea678b33cef5a4d49b1c5fdb050ea93cf7bea3287 /sys/arm/mv
parent690d060e370721ffe7479c7ed9ba5469f9453d33 (diff)
downloadFreeBSD-src-a8f1dca86b2bf3b15991d0ef01e402a7208db326.zip
FreeBSD-src-a8f1dca86b2bf3b15991d0ef01e402a7208db326.tar.gz
MFC 257774, 256760, 262916, 262905, 262918, 262919, 262920, 262921, 262924,
262925, 262929, 262932, 262935, 262940, 262941, 262942, 262948, 262949, 262950 Strip arm/conf/DEFAULTS down to just items that are mandatory for running the architecture. Move all the files named foo/common.c to foo/foo_common.c Initial cut for DTS on the hl201 board. Add commented out dts for sam9260ek as well as early printf support. Make clock optional on uart nodes, then back it out ("I don't know what I was thinking, but it is lame.") Set the baud rate if it isn't 0 Make at91_soc_id() public. Properly round at91 resource on unmapping. Move AT91 AIC related stuff to own file. Fix another bug in multicast filtering. i.MX uses 6 bits from MSB in LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32. Follow r262916 with one more config file that references a renamed common.c Remove bogus AT91 define that causes compile errors. Most of the defines for SAM9X are going away soonish anyway (once FDT works), but until then... Remove all dregs of a per-thread undefined-exception-mode stack. Rework the VFP code that handles demand-based save and restore of state. Always call vfp_discard() on thread death. When a thread begins life it doesn't own the VFP hardware state on any cpu. Make undefined exception entry MP-safe.
Diffstat (limited to 'sys/arm/mv')
-rw-r--r--sys/arm/mv/files.mv2
-rw-r--r--sys/arm/mv/mv_common.c (renamed from sys/arm/mv/common.c)17
-rw-r--r--sys/arm/mv/mvreg.h4
3 files changed, 20 insertions, 3 deletions
diff --git a/sys/arm/mv/files.mv b/sys/arm/mv/files.mv
index 116356d..4fbdc6d 100644
--- a/sys/arm/mv/files.mv
+++ b/sys/arm/mv/files.mv
@@ -23,8 +23,8 @@ arm/arm/cpufunc_asm_pj4b.S standard
arm/arm/irq_dispatch.S standard
arm/mv/bus_space.c standard
-arm/mv/common.c standard
arm/mv/gpio.c standard
+arm/mv/mv_common.c standard
arm/mv/mv_localbus.c standard
arm/mv/mv_machdep.c standard
arm/mv/mv_pci.c optional pci
diff --git a/sys/arm/mv/common.c b/sys/arm/mv/mv_common.c
index 366fcf1..44c22cb 100644
--- a/sys/arm/mv/common.c
+++ b/sys/arm/mv/mv_common.c
@@ -153,8 +153,11 @@ struct fdt_pm_mask_entry fdt_pm_mask_table[] = {
static __inline int
pm_is_disabled(uint32_t mask)
{
-
+#if defined(SOC_MV_KIRKWOOD)
+ return (soc_power_ctrl_get(mask) == mask);
+#else
return (soc_power_ctrl_get(mask) == mask ? 0 : 1);
+#endif
}
/*
@@ -221,7 +224,16 @@ fdt_pm(phandle_t node)
continue;
compat = fdt_is_compatible(node, fdt_pm_mask_table[i].compat);
-
+#if defined(SOC_MV_KIRKWOOD)
+ if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) {
+ dev_mask |= (1 << i);
+ ena = 0;
+ break;
+ } else if (compat) {
+ dev_mask |= (1 << i);
+ break;
+ }
+#else
if (compat && (~cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) {
dev_mask |= (1 << i);
ena = 0;
@@ -230,6 +242,7 @@ fdt_pm(phandle_t node)
dev_mask |= (1 << i);
break;
}
+#endif
}
return (ena);
diff --git a/sys/arm/mv/mvreg.h b/sys/arm/mv/mvreg.h
index 79398d9..1d6efed 100644
--- a/sys/arm/mv/mvreg.h
+++ b/sys/arm/mv/mvreg.h
@@ -142,7 +142,11 @@
/*
* Power Control
*/
+#if defined(SOC_MV_KIRKWOOD)
+#define CPU_PM_CTRL 0x18
+#else
#define CPU_PM_CTRL 0x1C
+#endif
#define CPU_PM_CTRL_NONE 0
#define CPU_PM_CTRL_ALL ~0x0
OpenPOWER on IntegriCloud