These patches are for separating the SOC On-Chip ohci host controller
from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM;
it would be nice to have in 3.12.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient,
for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this
scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
V4:
In patch 1/6 and 4/6:
No change.
In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
In patch 3/6 :
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until
usb_add_hcd.
In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
V5:
In patch 1/6 to 5/6
- No change.
In patch 6/6:
- String "s3cxxxx" is replaced by "s3c2410".
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++-
drivers/usb/host/Makefile | 6 ++
drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++-------------------
drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++-----------------------
drivers/usb/host/ohci-hcd.c | 108 -------------------------
drivers/usb/host/ohci-omap.c | 156 +++++++++++++-----------------------
drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------
drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++-----------------
drivers/usb/host/ohci-spear.c | 140 +++++++++++++-------------------
9 files changed, 374 insertions(+), 632 deletions(-)
--
1.7.9.5
Currently prototype of cpufreq_drivers target routines is:
int target(struct cpufreq_policy *policy, unsigned int target_freq,
unsigned int relation);
And most of the drivers call cpufreq_frequency_table_target() to get a valid
index of their frequency table which is closest to the target_freq. And they
don't use target_freq and relation after it.
So, it makes sense to just do this work in cpufreq core before calling
cpufreq_frequency_table_target() and simply pass index instead. But this can be
done only with drivers which expose their frequency table with cpufreq core. For
others we need to stick with the old prototype of target() until those drivers
are converted to expose frequency tables.
So, in order not to break those special drivers first patch renames ->target() to
->target_old() and the following patches will define the new prototype and
convert existing drivers one by one.
There are 12 drivers after this patchset which still use the heavy weight
version, i.e. target_old() and 39 drivers have adopted this new approach.
Once those 12 drivers are also moved to use .target(), .target_old() will be
removed completely.
This is part 3 of my generic cpufreq cleanup stuff.. First two are posted here
and this one is rebased of them:
1: cpufreq: Introduce cpufreq_table_validate_and_show()
https://lkml.org/lkml/2013/8/8/263
2: cpufreq: define generic routines for cpufreq drivers
https://lkml.org/lkml/2013/8/10/48
After this patchset this is the diffstat for 107 patches:
54 files changed, 357 insertions(+), 1411 deletions(-)
All these are pushed here:
https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/…
--
viresh
Cc: Andrew Lunn <andrew(a)lunn.ch>
Cc: David S. Miller <davem(a)davemloft.net>
Cc: Dmitry Eremin-Solenikov <dbaryshkov(a)gmail.com>
Cc: Eric Miao <eric.y.miao(a)gmail.com>
Cc: Jesper Nilsson <jesper.nilsson(a)axis.com>
Cc: John Crispin <blogic(a)openwrt.org>
Cc: Kukjin Kim <kgene.kim(a)samsung.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: linux-cris-kernel(a)axis.com
Cc: Mikael Starvik <starvik(a)axis.com>
Cc: Santosh Shilimkar <santosh.shilimkar(a)ti.com>
Cc: Sekhar Nori <nsekhar(a)ti.com>
Cc: Shawn Guo <shawn.guo(a)linaro.org>
Cc: sparclinux(a)vger.kernel.org
Cc: Stephen Warren <swarren(a)nvidia.com>
Cc: Steven Miao <realmz6(a)gmail.com>
Cc: Tony Luck <tony.luck(a)intel.com>
Viresh Kumar (31):
cpufreq: rename ->target() as ->target_old()
cpufreq: Implement light weight ->target() routine
cpufreq: acpi: Covert to light weight ->target() routine
cpufreq: arm_big_little: Covert to light weight ->target() routine
cpufreq: blackfin: Covert to light weight ->target() routine
cpufreq: cpu0: Covert to light weight ->target() routine
cpufreq: cris: Covert to light weight ->target() routine
cpufreq: davinci: Covert to light weight ->target() routine
cpufreq: dbx500: Covert to light weight ->target() routine
cpufreq: e_powersaver: Covert to light weight ->target() routine
cpufreq: elanfreq: Covert to light weight ->target() routine
cpufreq: exynos: Covert to light weight ->target() routine
cpufreq: ia64: Covert to light weight ->target() routine
cpufreq: imx6q: Covert to light weight ->target() routine
cpufreq: kirkwood: Covert to light weight ->target() routine
cpufreq: longhaul: Covert to light weight ->target() routine
cpufreq: loongson2: Covert to light weight ->target() routine
cpufreq: maple: Covert to light weight ->target() routine
cpufreq: omap: Covert to light weight ->target() routine
cpufreq: p4: Covert to light weight ->target() routine
cpufreq: pasemi: Covert to light weight ->target() routine
cpufreq: pmac32: Covert to light weight ->target() routine
cpufreq: powernow: Covert to light weight ->target() routine
cpufreq: ppc: Covert to light weight ->target() routine
cpufreq: pxa: Covert to light weight ->target() routine
cpufreq: s3c64xx: Covert to light weight ->target() routine
cpufreq: sc520: Covert to light weight ->target() routine
cpufreq: sparc: Covert to light weight ->target() routine
cpufreq: SPEAr: Covert to light weight ->target() routine
cpufreq: speedstep: Covert to light weight ->target() routine
cpufreq: tegra: Covert to light weight ->target() routine
drivers/cpufreq/acpi-cpufreq.c | 19 +++--------
drivers/cpufreq/arm_big_little.c | 15 +++------
drivers/cpufreq/at32ap-cpufreq.c | 2 +-
drivers/cpufreq/blackfin-cpufreq.c | 15 ++-------
drivers/cpufreq/cpufreq-cpu0.c | 15 +--------
drivers/cpufreq/cpufreq-nforce2.c | 2 +-
drivers/cpufreq/cpufreq.c | 59 ++++++++++++++++++++++++++--------
drivers/cpufreq/cris-artpec3-cpufreq.c | 16 +--------
drivers/cpufreq/cris-etraxfs-cpufreq.c | 15 +--------
drivers/cpufreq/davinci-cpufreq.c | 14 ++------
drivers/cpufreq/dbx500-cpufreq.c | 14 ++------
drivers/cpufreq/e_powersaver.c | 15 ++-------
drivers/cpufreq/elanfreq.c | 32 ++----------------
drivers/cpufreq/exynos-cpufreq.c | 19 ++---------
drivers/cpufreq/exynos5440-cpufreq.c | 11 ++-----
drivers/cpufreq/gx-suspmod.c | 2 +-
drivers/cpufreq/ia64-acpi-cpufreq.c | 19 ++---------
drivers/cpufreq/imx6q-cpufreq.c | 15 +--------
drivers/cpufreq/integrator-cpufreq.c | 2 +-
drivers/cpufreq/kirkwood-cpufreq.c | 17 ++--------
drivers/cpufreq/longhaul.c | 11 +------
drivers/cpufreq/loongson2_cpufreq.c | 19 +++--------
drivers/cpufreq/maple-cpufreq.c | 14 ++------
drivers/cpufreq/omap-cpufreq.c | 29 ++---------------
drivers/cpufreq/p4-clockmod.c | 16 ++-------
drivers/cpufreq/pasemi-cpufreq.c | 10 +-----
drivers/cpufreq/pcc-cpufreq.c | 2 +-
drivers/cpufreq/pmac32-cpufreq.c | 10 ++----
drivers/cpufreq/pmac64-cpufreq.c | 15 ++-------
drivers/cpufreq/powernow-k6.c | 33 +++----------------
drivers/cpufreq/powernow-k7.c | 20 ++----------
drivers/cpufreq/powernow-k8.c | 22 ++++---------
drivers/cpufreq/ppc-corenet-cpufreq.c | 13 ++------
drivers/cpufreq/ppc_cbe_cpufreq.c | 10 +-----
drivers/cpufreq/pxa2xx-cpufreq.c | 11 +------
drivers/cpufreq/pxa3xx-cpufreq.c | 15 ++-------
drivers/cpufreq/s3c2416-cpufreq.c | 2 +-
drivers/cpufreq/s3c24xx-cpufreq.c | 2 +-
drivers/cpufreq/s3c64xx-cpufreq.c | 16 ++-------
drivers/cpufreq/s5pv210-cpufreq.c | 2 +-
drivers/cpufreq/sa1100-cpufreq.c | 2 +-
drivers/cpufreq/sa1110-cpufreq.c | 2 +-
drivers/cpufreq/sc520_freq.c | 17 +---------
drivers/cpufreq/sh-cpufreq.c | 2 +-
drivers/cpufreq/sparc-us2e-cpufreq.c | 19 ++---------
drivers/cpufreq/sparc-us3-cpufreq.c | 21 ++----------
drivers/cpufreq/spear-cpufreq.c | 10 ++----
drivers/cpufreq/speedstep-centrino.c | 24 ++++----------
drivers/cpufreq/speedstep-ich.c | 22 +++----------
drivers/cpufreq/speedstep-smi.c | 18 +++--------
drivers/cpufreq/tegra-cpufreq.c | 10 ++----
drivers/cpufreq/unicore2-cpufreq.c | 2 +-
include/linux/cpufreq.h | 4 ++-
53 files changed, 161 insertions(+), 582 deletions(-)
--
1.7.12.rc2.18.g61b472e
CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).
This is done to make sure module doesn't get unloaded if it is currently in use.
This will work only if the .owner field of cpufreq driver is initialized with a
valid pointer.
This field wasn't initialized for many cpufreq driver, lets initialize it with
THIS_MODULE.
Rebased over: v3.11-rc3 and pushed here:
https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/…
Viresh Kumar (15):
cpufreq: arm_big_little: initialize .owner field with THIS_MODULE
cpufreq: cpufreq-cpu0: initialize .owner field with THIS_MODULE
cpufreq: davinci: initialize .owner field with THIS_MODULE
cpufreq: dbx500: initialize .owner field with THIS_MODULE
cpufreq: exynos: initialize .owner field with THIS_MODULE
cpufreq: imx6q: initialize .owner field with THIS_MODULE
cpufreq: integrator: initialize .owner field with THIS_MODULE
cpufreq: omap: initialize .owner field with THIS_MODULE
cpufreq: pxa: initialize .owner field with THIS_MODULE
cpufreq: s3c24xx: initialize .owner field with THIS_MODULE
cpufreq: s5pv210: initialize .owner field with THIS_MODULE
cpufreq: sa11**: initialize .owner field with THIS_MODULE
cpufreq: SPEAr: initialize .owner field with THIS_MODULE
cpufreq: Tegra: initialize .owner field with THIS_MODULE
cpufreq: Unicore: initialize .owner field with THIS_MODULE
drivers/cpufreq/arm_big_little.c | 1 +
drivers/cpufreq/cpufreq-cpu0.c | 1 +
drivers/cpufreq/davinci-cpufreq.c | 1 +
drivers/cpufreq/dbx500-cpufreq.c | 1 +
drivers/cpufreq/exynos-cpufreq.c | 1 +
drivers/cpufreq/exynos5440-cpufreq.c | 1 +
drivers/cpufreq/imx6q-cpufreq.c | 1 +
drivers/cpufreq/integrator-cpufreq.c | 1 +
drivers/cpufreq/omap-cpufreq.c | 1 +
drivers/cpufreq/pxa2xx-cpufreq.c | 1 +
drivers/cpufreq/pxa3xx-cpufreq.c | 1 +
drivers/cpufreq/s3c24xx-cpufreq.c | 1 +
drivers/cpufreq/s5pv210-cpufreq.c | 1 +
drivers/cpufreq/sa1100-cpufreq.c | 1 +
drivers/cpufreq/sa1110-cpufreq.c | 1 +
drivers/cpufreq/spear-cpufreq.c | 1 +
drivers/cpufreq/tegra-cpufreq.c | 1 +
drivers/cpufreq/unicore2-cpufreq.c | 1 +
18 files changed, 18 insertions(+)
--
1.7.12.rc2.18.g61b472e
Hi Rafael/Russell,
These patches would be part of this patchset finally, sending it separately as I
didn't wanted to send other patches in that series..
https://lkml.org/lkml/2013/8/10/48
(Above series was rebased over https://lkml.org/lkml/2013/8/8/263 and hence this
patchset too)..
These first exposes frequency table and then uses cpufreq generic routines
(which uses exposed table) instead of its own .verify() routine.
Later I will send another patch that would be part of this series:
http://lkml.org/lkml/2013/8/12/406
(I need to send that series again today and so not sending that patch twice,
once here and then in that series)..
All these patches are pushed here with all dependencies:
https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/…
Viresh Kumar (3):
cpufreq: sa11x0: Expose frequency table
cpufreq: sa11x0: let cpufreq core initialize struct policy fields
cpufreq: sa11x0: Use generic cpufreq routines
arch/arm/mach-sa1100/generic.c | 65 +++++++++++++---------------------------
arch/arm/mach-sa1100/generic.h | 2 +-
drivers/cpufreq/sa1100-cpufreq.c | 9 +++---
drivers/cpufreq/sa1110-cpufreq.c | 9 +++---
4 files changed, 30 insertions(+), 55 deletions(-)
--
1.7.12.rc2.18.g61b472e
changes since v2:
- split the 5250 related modifications into a separate patch.
- placed the RTC node as per the alphabetical order in the DTS file as
suggested by Kukjin Kim <kgene(a)kernel.org>.
changes since v1:
- made DT node status as "okay" in the dtsi file itself.
-
Vikas Sajjan (2):
ARM: dts: Add RTC DT node to Exynos5420 SoC
ARM: dts: Fix the RTC DT node name for Exynos5250 SoC
arch/arm/boot/dts/exynos5.dtsi | 2 +-
arch/arm/boot/dts/exynos5250.dtsi | 3 ++-
arch/arm/boot/dts/exynos5420.dtsi | 6 ++++++
3 files changed, 9 insertions(+), 2 deletions(-)
--
1.7.9.5
Systems with large external L3-cache (few MBs), might have dirty
content belonging to the guest page in L3-cache. To tackle this,
we need to flush such dirty content from d-cache so that guest
will see correct contents of guest page when guest MMU is disabled.
The patch fixes coherent_icache_guest_page() for external L3-cache.
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar(a)linaro.org>
Signed-off-by: Anup Patel <anup.patel(a)linaro.org>
---
arch/arm64/include/asm/kvm_mmu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
index efe609c..5129038 100644
--- a/arch/arm64/include/asm/kvm_mmu.h
+++ b/arch/arm64/include/asm/kvm_mmu.h
@@ -123,6 +123,8 @@ static inline void coherent_icache_guest_page(struct kvm *kvm, gfn_t gfn)
if (!icache_is_aliasing()) { /* PIPT */
unsigned long hva = gfn_to_hva(kvm, gfn);
flush_icache_range(hva, hva + PAGE_SIZE);
+ /* Flush d-cache for systems with external caches. */
+ __flush_dcache_area((void *) hva, PAGE_SIZE);
} else if (!icache_is_aivivt()) { /* non ASID-tagged VIVT */
/* any kind of VIPT cache */
__flush_icache_all();
--
1.7.9.5
From: Mark Brown <broonie(a)linaro.org>
The Arndale has a SMSC USB3503 connected in hardware only mode like a PHY,
support it using the usb-nop-xceiv binding.
Note that due to a regrettable decision to use a regulator to represent
the reset signal this uses a fixed voltage regulator to do that, there
is a plan to use the reset controller binding once that is merged so it
does not seem worthwhile to fix the usb-nop-xceiv driver at this point.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
This doesn't 100% work right now since we don't yet have a solution to
ensure that this gets started after the USB controller but those
modifications are small (or can be done at runtime with module loading).
arch/arm/boot/dts/exynos5250-arndale.dts | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index 96d528d..e477e23 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -539,4 +539,22 @@
rtc {
status = "okay";
};
+
+ usb_hub_bus {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ // SMSC USB3503 connected in hardware only mode as a PHY
+ usb_hub: usb_hub {
+ compatible = "smsc,usb3503a";
+
+ reset-gpios = <&gpx3 5 1>;
+ connect-gpios = <&gpd1 7 1>;
+ };
+ };
+
+ usb@12110000 {
+ usb-phy = <&usb2_phy>;
+ };
};
--
1.8.4.rc2
E.g. in a Makefile to have
obj-$(CONFIG_FOO) += common-thing.o foo.o
obj-$(CONFIG_BAR) += common-thing.o bar.o
where both FOO and BAR can be enabled at the same time?
Looks a bit suspect to me. My instinct would be to invent CONFIG_BAZ to
compile common-thing.o and make FOO and BAR select it. Or possibly some
makefile conditional OR expression I can't think of off the top of my
head.
--
Tixy
In case of BE8 kernel data is in BE order whereas code stays in LE
order. sigreturn_codes array initializer need to use macros from
<asm/opcodes.h> to setup instructions code in endian neutral way.
Problem was discovered during ltp testing of BE system: all rt_sig*
tests failed. Tested against the same tests in both BE and LE modes.
Signed-off-by: Victor Kamensky <victor.kamensky(a)linaro.org>
---
arch/arm/kernel/signal.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index ab33042..333a67f 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -20,25 +20,26 @@
#include <asm/ucontext.h>
#include <asm/unistd.h>
#include <asm/vfp.h>
+#include <asm/opcodes.h>
/*
* For ARM syscalls, we encode the syscall number into the instruction.
*/
-#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE))
-#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE))
+#define SWI_SYS_SIGRETURN (__opcode_to_mem_arm(0xef000000|(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE)))
+#define SWI_SYS_RT_SIGRETURN (__opcode_to_mem_arm(0xef000000|(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE)))
/*
* With EABI, the syscall number has to be loaded into r7.
*/
-#define MOV_R7_NR_SIGRETURN (0xe3a07000 | (__NR_sigreturn - __NR_SYSCALL_BASE))
-#define MOV_R7_NR_RT_SIGRETURN (0xe3a07000 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
+#define MOV_R7_NR_SIGRETURN (__opcode_to_mem_arm(0xe3a07000 | (__NR_sigreturn - __NR_SYSCALL_BASE)))
+#define MOV_R7_NR_RT_SIGRETURN (__opcode_to_mem_arm(0xe3a07000 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)))
/*
* For Thumb syscalls, we pass the syscall number via r7. We therefore
* need two 16-bit instructions.
*/
-#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE))
-#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
+#define SWI_THUMB_SIGRETURN (__opcode_to_mem_arm(0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE)))
+#define SWI_THUMB_RT_SIGRETURN (__opcode_to_mem_arm(0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)))
static const unsigned long sigreturn_codes[7] = {
MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN,
--
1.8.1.4
Hi Rafael,
The following changes since commit d4e4ab86bcba5a72779c43dc1459f71fea3d89c8:
Linux 3.11-rc5 (2013-08-11 18:04:20 -0700)
are available in the git repository at:
git://git.linaro.org/people/vireshk/linux.git cpufreq-fixes
for you to fetch changes up to 45e12086263a53f16b489fc7f4f8f6348a688661:
cpufreq: fix EXYNOS drivers selection (2013-08-12 12:00:21 +0530)
----------------------------------------------------------------
Amit Daniel Kachhap (1):
cpufreq: exynos5440: Fix to skip when new frequency same as current
Bartlomiej Zolnierkiewicz (1):
cpufreq: fix EXYNOS drivers selection
drivers/cpufreq/Kconfig.arm | 36 ++++++++++++++++++++++++------------
drivers/cpufreq/exynos-cpufreq.c | 1 -
drivers/cpufreq/exynos-cpufreq.h | 21 +++++++++++++++++++++
drivers/cpufreq/exynos5440-cpufreq.c | 3 +++
4 files changed, 48 insertions(+), 13 deletions(-)
--
viresh
From: Mark Brown <broonie(a)linaro.org>
Since NULL could in theory be a valid regulator we ought to check for
IS_ERR() rather than for NULL. In practice this is unlikely to be an
issue but it's better for neatness.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/cpufreq/cpufreq-cpu0.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index ad1fde2..09cd3a7 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -69,7 +69,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
- if (cpu_reg) {
+ if (!IS_ERR(cpu_reg)) {
rcu_read_lock();
opp = opp_find_freq_ceil(cpu_dev, &freq_Hz);
if (IS_ERR(opp)) {
@@ -90,7 +90,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
freqs.new / 1000, volt ? volt / 1000 : -1);
/* scaling up? scale voltage before frequency */
- if (cpu_reg && freqs.new > freqs.old) {
+ if (!IS_ERR(cpu_reg) && freqs.new > freqs.old) {
ret = regulator_set_voltage_tol(cpu_reg, volt, tol);
if (ret) {
pr_err("failed to scale voltage up: %d\n", ret);
@@ -102,14 +102,14 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
ret = clk_set_rate(cpu_clk, freq_exact);
if (ret) {
pr_err("failed to set clock rate: %d\n", ret);
- if (cpu_reg)
+ if (!IS_ERR(cpu_reg))
regulator_set_voltage_tol(cpu_reg, volt_old, tol);
freqs.new = freqs.old;
goto post_notify;
}
/* scaling down? scale voltage after frequency */
- if (cpu_reg && freqs.new < freqs.old) {
+ if (!IS_ERR(cpu_reg) && freqs.new < freqs.old) {
ret = regulator_set_voltage_tol(cpu_reg, volt, tol);
if (ret) {
pr_err("failed to scale voltage down: %d\n", ret);
@@ -210,7 +210,6 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
}
pr_warn("failed to get cpu0 regulator: %ld\n",
PTR_ERR(cpu_reg));
- cpu_reg = NULL;
}
cpu_clk = devm_clk_get(cpu_dev, NULL);
--
1.8.4.rc1
From: Mark Brown <broonie(a)linaro.org>
Since the cpufreq-cpu0 driver is capable of coping without a software
controllable regulator and would be confused by a dummy one it should
use devm_regulator_get_optional() to ensure no dummy is provided.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
devm_regulator_get_optional() is a new API in my tree for -next, is it
OK to merge this patch via that branch?
drivers/cpufreq/cpufreq-cpu0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 09cd3a7..b946ac7 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -197,7 +197,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
cpu_dev = &pdev->dev;
cpu_dev->of_node = np;
- cpu_reg = devm_regulator_get(cpu_dev, "cpu0");
+ cpu_reg = devm_regulator_get_optional(cpu_dev, "cpu0");
if (IS_ERR(cpu_reg)) {
/*
* If cpu0 regulator supply node is present, but regulator is
--
1.8.4.rc1
__init belongs after the return type on functions, not before it.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/dock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 8265607..c90112c 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -1055,7 +1055,7 @@ err_unregister:
*
* This is called by acpi_walk_namespace to look for dock stations and bays.
*/
-static __init acpi_status
+static acpi_status __init
find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
{
if (is_dock(handle) || is_ejectable_bay(handle))
--
1.7.9.5
From: Mark Brown <broonie(a)linaro.org>
Ensure that the recently added path kcontrol list is initialised otherwise
we may crash trying to delete routes that don't have kcontrols.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/soc-dapm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b78eaa1..1e0e4ce 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2357,6 +2357,7 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
path->sink = wsink;
path->connected = connected;
INIT_LIST_HEAD(&path->list);
+ INIT_LIST_HEAD(&path->list_kcontrol);
INIT_LIST_HEAD(&path->list_source);
INIT_LIST_HEAD(&path->list_sink);
--
1.8.4.rc1
From: Mark Brown <broonie(a)linaro.org>
Attempting to create the route as part of adding a mux control causes us
to attempt to add the same route twice since we loop over all sources
for the mux after creating the control. Instead do the addition in the
callers.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/soc-dapm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 662a904..b78eaa1 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -665,7 +665,7 @@ static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm,
* create it. Either way, add the widget into the control's widget list
*/
static int dapm_create_or_share_mixmux_kcontrol(struct snd_soc_dapm_widget *w,
- int kci, struct snd_soc_dapm_path *path)
+ int kci)
{
struct snd_soc_dapm_context *dapm = w->dapm;
struct snd_card *card = dapm->card->snd_card;
@@ -766,7 +766,6 @@ static int dapm_create_or_share_mixmux_kcontrol(struct snd_soc_dapm_widget *w,
return ret;
w->kcontrols[kci] = kcontrol;
- dapm_kcontrol_add_path(kcontrol, path);
return 0;
}
@@ -790,9 +789,11 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w)
continue;
}
- ret = dapm_create_or_share_mixmux_kcontrol(w, i, path);
+ ret = dapm_create_or_share_mixmux_kcontrol(w, i);
if (ret < 0)
return ret;
+
+ dapm_kcontrol_add_path(w->kcontrols[i], path);
}
}
@@ -821,7 +822,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
path = list_first_entry(&w->sources, struct snd_soc_dapm_path,
list_sink);
- ret = dapm_create_or_share_mixmux_kcontrol(w, 0, path);
+ ret = dapm_create_or_share_mixmux_kcontrol(w, 0);
if (ret < 0)
return ret;
--
1.8.4.rc1
These patches are for separating the SOC On-Chip ohci host controller
from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM.
Manjunath Goudar (2):
USB: OHCI: make ohci-ep93xx a separate driver
USB: OHCI: make ohci-pxa27x a separate driver
drivers/usb/host/Kconfig | 16 +++++
drivers/usb/host/Makefile | 2 +
drivers/usb/host/ohci-ep93xx.c | 84 ++++++++++------------
drivers/usb/host/ohci-hcd.c | 24 -------
drivers/usb/host/ohci-pxa27x.c | 154 ++++++++++++++++------------------------
5 files changed, 120 insertions(+), 160 deletions(-)
--
1.7.9.5
From: Mark Brown <broonie(a)linaro.org>
The intn and connect GPIO properties are swapped in the code which will
cause failures at runtime if these are connected, fix the code.
There are currently no in-tree users of this device to check or update.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/usb/misc/usb3503.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index cbb6b78..4e3a2d2 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -215,10 +215,10 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
}
}
- hub->gpio_intn = of_get_named_gpio(np, "connect-gpios", 0);
+ hub->gpio_intn = of_get_named_gpio(np, "intn-gpios", 0);
if (hub->gpio_intn == -EPROBE_DEFER)
return -EPROBE_DEFER;
- hub->gpio_connect = of_get_named_gpio(np, "intn-gpios", 0);
+ hub->gpio_connect = of_get_named_gpio(np, "connect-gpios", 0);
if (hub->gpio_connect == -EPROBE_DEFER)
return -EPROBE_DEFER;
hub->gpio_reset = of_get_named_gpio(np, "reset-gpios", 0);
--
1.8.4.rc1
Hello all,
The purpose of this email is to get other opinions and advices to buffer synchronization mechanism, and coupling cache operation feature with the buffer synchronization mechanism. First of all, I am not a native English speaker so I'm not sure that I can convey my intention to you. And I'm not a specialist in Linux than other people so also there might be my missing points.
I had posted the buffer synchronization mechanism called dmabuf sync framework like below,
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/177045.html
And I'm sending this email before posting next version with more stable patch set and features. The purpose of this framework is to provide not only buffer access control to CPU and DMA but also easy-to-use interfaces for device drivers and user application. This framework can be used for all DMA devices using system memory as DMA buffer, especially for most ARM based SoCs.
There are two cases we are using this buffer synchronization framework. One is to primarily enhance GPU rendering performance on Tizen platform in case of 3d app with compositing mode that the 3d app draws something in off-screen buffer.
And other is to couple buffer access control and cache operation between CPU and DMA; the cache operation is done by the dmabuf sync framework in kernel side.
Why do we need buffer access control between CPU and DMA?
---------------------------------------------------------
The below shows simple 3D software layers,
3D Application
-----------------------------------------
Standard OpenGL ES and EGL Interfaces ------- [A]
-----------------------------------------
MALI OpenGL ES and EGL Native modules --------- [B]
-----------------------------------------
Exynos DRM Driver | GPU Driver ---------- [C]
3d application requests 3d rendering through A. And then B fills a 3d command buffer with the requests from A. And then 3D application calls glFlush so that the 3d command buffer can be submitted to C, and rendered by GPU hardware. Internally, glFlush(also glFinish) will call a function of native module[B] glFinish blocks caller's task until all GL execution is complete. On the other hand, glFlush forces execution of GL commands but doesn't block the caller's task until the completion.
In composting mode, in case of using glFinish, the 3d rendering performance is quite lower than using glFlush because glFinish makes CPU blocked until the execution of the 3d commands is completed. However, the use of glFlush has one issue that the shared buffer with GPU could be broken when CPU accesses the shared buffer at once after glFlush because CPU cannot be aware of the completion of GPU access to the shared buffer: actually, Tizen platform internally calls only eglSwapBuffer instead of glFlush and glFinish, and whether flushing or finishing is decided according to compositing mode or not. So in such case, we would need buffer access control between CPU and DMA for more performance.
About cache operation
---------------------
The dmabuf sync framework can include cache operation feature, and the below shows how the cache operation based on dmabuf sync framework is performed,
device driver in kernel or fctrl in user land
dmabuf_sync_lock or dmabuf_sync_single_lock
check before and after buffer access
dma_buf_begin_cpu_access or dma_buf_end_cpu_access
begin_cpu_access or end_cpu_access of exporter
dma_sync_sg_for_device or dma_sync_sg_for_cpu
In case that using dmabuf sync framework, kernel can be aware of when CPU and DMA access to a shared buffer is completed so we can do cache operation in kernel so that way, we can couple buffer access control and cache operation. So with this, we can avoid that user land overuses cache operation.
I guess most Linux based platforms are using cachable mapped buffer for more performance: in case that CPU frequently accesses the shared buffer which is shared with DMA, the use of cachable mapped buffer is more fast than the use of non-cachable. However, this way could make cache operation overused by user land because only user land can be aware of the completion of CPU or DMA access to the shared buffer so user land could request cache operations every time it wants even the cache operation is unnecessary. That is how user land could overuse cache operations.
To Android, Chrome OS, and other forks,
Are there other cases that buffer access control between CPU and DMA is needed? I know Android sync driver and KDS are already being used for Android, Chrome OS, and so on.
How does your platform do cache operation? And How do you think about coupling buffer access control and cache operation between CPU and DMA?.
Lastly, I think we may need Linux generic buffer synchronization mechanism that uses only Linux standard interfaces (dmabuf) including user land interfaces (fcntl and select system calls), and the dmabuf sync framework could meet it.
Thanks,
Inki Dae
From: Mark Brown <broonie(a)linaro.org>
The GPIO manipulation done by this driver is never in atomic context so
we can use gpio_set_value_cansleep() and support GPIOs that can't be set
from atomic context.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/codecs/adau1701.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 2c10252..ebff112 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -247,21 +247,21 @@ static int adau1701_reset(struct snd_soc_codec *codec, unsigned int clkdiv)
gpio_is_valid(adau1701->gpio_pll_mode[1])) {
switch (clkdiv) {
case 64:
- gpio_set_value(adau1701->gpio_pll_mode[0], 0);
- gpio_set_value(adau1701->gpio_pll_mode[1], 0);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 0);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 0);
break;
case 256:
- gpio_set_value(adau1701->gpio_pll_mode[0], 0);
- gpio_set_value(adau1701->gpio_pll_mode[1], 1);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 0);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 1);
break;
case 384:
- gpio_set_value(adau1701->gpio_pll_mode[0], 1);
- gpio_set_value(adau1701->gpio_pll_mode[1], 0);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 1);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 0);
break;
case 0: /* fallback */
case 512:
- gpio_set_value(adau1701->gpio_pll_mode[0], 1);
- gpio_set_value(adau1701->gpio_pll_mode[1], 1);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 1);
+ gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 1);
break;
}
}
@@ -269,10 +269,10 @@ static int adau1701_reset(struct snd_soc_codec *codec, unsigned int clkdiv)
adau1701->pll_clkdiv = clkdiv;
if (gpio_is_valid(adau1701->gpio_nreset)) {
- gpio_set_value(adau1701->gpio_nreset, 0);
+ gpio_set_value_cansleep(adau1701->gpio_nreset, 0);
/* minimum reset time is 20ns */
udelay(1);
- gpio_set_value(adau1701->gpio_nreset, 1);
+ gpio_set_value_cansleep(adau1701->gpio_nreset, 1);
/* power-up time may be as long as 85ms */
mdelay(85);
}
--
1.8.4.rc1
From: Mark Brown <broonie(a)linaro.org>
There is no need for the power down work to be done on a per CPU workqueue
especially considering the fairly long delay before powerdown.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/soc-compress.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index d220150..53c9ecd 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -149,8 +149,9 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
SND_SOC_DAPM_STREAM_STOP);
} else {
rtd->pop_wait = 1;
- schedule_delayed_work(&rtd->delayed_work,
- msecs_to_jiffies(rtd->pmdown_time));
+ queue_delayed_work(system_power_efficient_wq,
+ &rtd->delayed_work,
+ msecs_to_jiffies(rtd->pmdown_time));
}
} else {
/* capture streams can be powered down now */
--
1.8.4.rc1
From: Mark Brown <broonie(a)linaro.org>
The intn and connect GPIO properties are swapped in the code which will
cause failures at runtime if these are connected, fix the code.
There are currently no in-tree users of this device to check or update.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/usb/misc/usb3503.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index cbb6b78..4e3a2d2 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -215,10 +215,10 @@ static int usb3503_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
}
}
- hub->gpio_intn = of_get_named_gpio(np, "connect-gpios", 0);
+ hub->gpio_intn = of_get_named_gpio(np, "intn-gpios", 0);
if (hub->gpio_intn == -EPROBE_DEFER)
return -EPROBE_DEFER;
- hub->gpio_connect = of_get_named_gpio(np, "intn-gpios", 0);
+ hub->gpio_connect = of_get_named_gpio(np, "connect-gpios", 0);
if (hub->gpio_connect == -EPROBE_DEFER)
return -EPROBE_DEFER;
hub->gpio_reset = of_get_named_gpio(np, "reset-gpios", 0);
--
1.8.4.rc1
These patches are for separating the SOC On-Chip ohci host controller
from ohci-hcd host code into its own driver module.
This work is part of enabling multi-platform kernels on ARM;
it would be nice to have in 3.12.
V2:
In patch 5/6 and 6/6:
-Set non-standard fields in hc_driver manually, rather than
relying on an expanded struct ohci_driver_overrides.
-Save orig_ohci_hub_control and orig_ohci_hub_status_data rather than
relying on ohci_hub_control and hub_status_data being exported.
In patch 1/6 to 4/6
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
V3:
In patch 5/6 and 6/6:
-ohci_setup() has been removed because it is called in .reset member
of the ohci_hc_driver structure.
In patch 5/6:
-The ohci_restart() function is not required in current scenario,
only discarding connection state of integrated transceivers is sufficient,
for this directly handling ohci->hc_control.
In patch 2/6 :
-rewritten if (config->otg || config->rwc) block statements into
two separate 'if blocks' to handle below scenarios
1. config->otg set scenario.
2. if any of these (config->otg, config->rwc) are set, this
scenario should be handled only after ohci_setup()
In patch 1/6 and 4/6:
No change.
V4:
In patch 1/6 and 4/6:
No change.
In patch 2/6 :
-usb_remove_hcd() function is required a valid clock that is what
omap_ohci_clock_power(0) is called after hcd shutdown.
In patch 3/6 :
-V3 modification revert back, only ohci->regs setting write()
function has been removed because ohci->regs doesn't get set until
usb_add_hcd.
In patch 5/6 :
- Removed extra space after "tristate".
- Removed extra space between function name and '(' characters.
- MODULE_ALIAS line moved to last statement of ohci-at91 file.
In patch 6/6 :
- Removed extra space before the '='.
- Moved /* forward definitions */ line before the declarations of functions.
Manjunath Goudar (6):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
drivers/usb/host/Kconfig | 30 ++++++-
drivers/usb/host/Makefile | 6 ++
drivers/usb/host/ohci-at91.c | 153 ++++++++++++++++-------------------
drivers/usb/host/ohci-exynos.c | 167 ++++++++++++++++-----------------------
drivers/usb/host/ohci-hcd.c | 108 -------------------------
drivers/usb/host/ohci-omap.c | 156 +++++++++++++-----------------------
drivers/usb/host/ohci-omap3.c | 118 +++++++++------------------
drivers/usb/host/ohci-s3c2410.c | 128 +++++++++++++-----------------
drivers/usb/host/ohci-spear.c | 140 +++++++++++++-------------------
9 files changed, 374 insertions(+), 632 deletions(-)
--
1.7.9.5
From: Andy Green <andy.green(a)linaro.org>
You might have CONFIG_PM, but you might not have CONFIG_SUSPEND, in which
case these are unused.
Signed-off-by: Andy Green <andy.green(a)linaro.org>
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/usb/dwc3/dwc3-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 5d746e5..4902021 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -191,7 +191,7 @@ static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = {
};
MODULE_DEVICE_TABLE(pci, dwc3_pci_id_table);
-#ifdef CONFIG_PM
+#ifdef CONFIG_SUSPEND
static int dwc3_pci_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
--
1.8.4.rc1