DMA burst support is added to improve performance in EHCI data
transfer. The USB EHCI controller on Exynos SoCs can use INCR16,
INCR8, and INCR4 mode. These modes of INSNREG00 register should
be set in order to enable DMA burst transfer. This feature is
also related to AHB spec.
Signed-off-by: Jingoo Han <jg1.han(a)samsung.com>
Cc: Sangwook Lee <sangwook.lee(a)linaro.org>
---
v2: change the definition name from EHCI_ENA_xxx to EHCI_INSNREG00_ENA_xxx.
drivers/usb/host/ehci-s5p.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index 293f741..b337f72 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <plat/ehci.h>
#include <plat/usb-phy.h>
+#include <mach/regs-usb-host.h>
struct s5p_ehci_hcd {
struct device *dev;
@@ -128,6 +129,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
ehci->regs = hcd->regs +
HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase));
+ /* DMA burst Enable */
+ writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
+
dbg_hcs_params(ehci, "reset");
dbg_hcc_params(ehci, "reset");
@@ -234,6 +238,9 @@ static int s5p_ehci_resume(struct device *dev)
if (pdata && pdata->phy_init)
pdata->phy_init(pdev, S5P_USB_PHY_HOST);
+ /* DMA burst Enable */
+ writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
+
if (time_before(jiffies, ehci->next_statechange))
msleep(100);
--
1.7.1
This patch series moves various functionality duplicated in platform
cpuidle drivers to the core cpuidle driver. Also, the platform irq
disabling was removed as it appears that all calls into
cpuidle_call_idle will have already called local_irq_disable().
NOTE to Maintainers: Platform code changes are not required due to patch 1/9
but please review and push these platform changes as possible to allow
this consolidation to occur.
Based on 3.3-rc5 plus recent exynos cpuidle patch (affect exynos cpuidle only):
http://www.spinics.net/lists/linux-samsung-soc/msg09467.html
v5 submission can be found here:
http://www.spinics.net/lists/arm-kernel/msg161596.html
Changes since v5:
* Fixed mindless bug in CONFIG_ARCH_HAS_RELAX code in drivers/cpuidle/cpuidle.c
* Removed inline from wrapper function (thanks Mike Turquette and Rob Herring)
* Add zeroing out of last_residency if error value is returned (thanks Mike)
* Made drivers/cpuidle/cpuidle.c more intelligently handle en_core_tk_irqen
flag allowing removal of the if (en_core_tk_irqen) in cpuidle_idle_call (thanks
Daniel Lezcano)
* Moved CPUIDLE_ARM_WFI_STATE macro to arch/arm/include/asm/cpuidle.h (thanks
Jean Pihet)
* Cleaned up some comments and a stray change (thanks Jean)
v4 submission can be found here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/082742.h…
Changes since v4:
* Added common cpu_do_idle function to core cpuidle
* Added time keep irq en wrapper to core cpuidle
* Removed pre/post enter
* Re-added platforms that can use new common code.
v3 submission can be found here:
http://www.spinics.net/lists/arm-kernel/msg156751.html
Changes since v3:
* Removed drivers/cpuidle/common.c
** Removed the initialization helper functions
** Removed the wrapper used to consolidate time keeping and irq enable/disable
* Add time keeping and local_irq_disable handling in cpuidle_call_idle().
* Made necessary modifications to a few platforms that required the most changes
** Note on omap3: changed structure of omap3_idle_drvdata and added
per_next_state and per_saved_state vars to accomodate new framework.
v2 submission can be found here:
http://comments.gmane.org/gmane.linux.ports.arm.kernel/144199
Changes since v2:
* Made various code organization and style changes as suggested in v1 review.
* Removed at91 use of common code. A separate effort is underway to clean
at91 code and the author has offered to convert to common interface as part
of those changes (if this common interface is accepted in time).
* Made platform cpuidle_driver objects __initdata and dynamically added one
persistent instance of this object in common code.
* Removed imx5 pm usage of gpc_dvfs clock as it is no longer needed after
being enabled during clock initialization.
* Re-organized patches.
v1 submission can be found here:
http://comments.gmane.org/gmane.linux.ports.arm.kernel/142791
Changes since v1:
* Common interface moved to drivers/cpuidle and made non arch-specific.
* Made various fixes and suggested additions to the common cpuidle
code from v1 review.
* Added callback for filling in driver_data field as needed.
* Modified the various platforms with these changes.
Robert Lee (9):
cpuidle: Add common time keeping and irq enabling
ARM: at91: Consolidate time keeping and irq enable
ARM: exynos: Consolidate time keeping and irq enable
ARM: kirkwood: Consolidate time keeping and irq enable
ARM: davinci: Consolidate time keeping and irq enable
ARM: omap: Consolidate OMAP3 time keeping and irq enable
ARM: omap: Consolidate OMAP4 time keeping and irq enable
ARM: shmobile: Consolidate time keeping and irq enable
SH: shmobile: Consolidate time keeping and irq enable
arch/arm/include/asm/cpuidle.h | 14 +++++
arch/arm/mach-at91/cpuidle.c | 67 +++++++++----------------
arch/arm/mach-davinci/cpuidle.c | 78 +++++++++++-----------------
arch/arm/mach-exynos/cpuidle.c | 53 ++-----------------
arch/arm/mach-kirkwood/cpuidle.c | 72 ++++++++------------------
arch/arm/mach-omap2/cpuidle34xx.c | 42 ++++++---------
arch/arm/mach-omap2/cpuidle44xx.c | 21 +-------
arch/arm/mach-shmobile/cpuidle.c | 23 +-------
arch/sh/kernel/cpu/shmobile/cpuidle.c | 10 +---
drivers/cpuidle/cpuidle.c | 90 ++++++++++++++++++++++++++-------
include/linux/cpuidle.h | 13 +++++
11 files changed, 207 insertions(+), 276 deletions(-)
create mode 100644 arch/arm/include/asm/cpuidle.h
I'm not sure who needs to know about this - maybe you all do already,
but Xerces Ranby showed me (at FOSDEM) some cool stuff with jogl
giving java stuff access to OPenGL ES hardware acceleration.
His demo on an AC100 sped java games up by a factor of lots so instead
of visibly slow screen redraws you got a useful frame rate of 15fps or
so, turning them from useless to playable.
Blog post here with destructions and links: http://labb.zafena.se/?p=532
Compatibility matrix here shows that it works with Tegra2 in AC100,
and trimslice, SGX540 in panda and SGX530 in N9.
It seems to be a fairly trivial matter of telling openjdk to use jogl
and then 'stuff goes fast'. If we aren't doing this already in our
images we probably should be.
Just posting so that whoever worries about graphics and java and stuff
knows about this.
Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
Hi all,
I've added some detailed info on the wiki about how to go about
building bootable images for the big.LITTLE components, here:
https://wiki.linaro.org/Internal/Projects/Big.Little.Switcher/ARMFastModels…
For the benefit of anyone who can't see that page, I've also pasted it
here -- if anyone knows a better place to post this stuff, please let
me know!
Note that although the instructions give details of how to build a
filesystem image, there is essentially nothing b.L or model-specific
there -- it just serves as background for explaining how to work
around some issues which you may encounter.
These images are not supposed to present a fully working big.LITTLE
system -- they are there to help people understand how booting works,
where the sources are and how to work with the model.
Note also that the bootwrapper will change soon (when I get there) to
support loading of the kernel, initramfs from the host filesystem
using semihosting, just like the kvm bootwrapper, but this isn't
implemented for now.
Cheers
---Dave
== Filesystem ==
We need to create an SD card image with a filesystem on it, with the
rootfs partition matching the bootargs set previously. The following
example generates a suitable image using developer. The hardware pack
is largely irrelevant because we're not getting the kernel, modules,
bootloader or command-line from there -- but it keeps l-m-c happy.
{{{
$ wget http://releases.linaro.org/12.02/ubuntu/oneiric-images/developer/linaro-o-d…
$ wget http://releases.linaro.org/12.02/ubuntu/oneiric-images/developer/hwpack_lin…
}}}
Note that the ARM fast model's MMC interface emulation is currently
limited to 2G. Make the image a bit smaller than that to be on the
safe side:
{{{
$ sudo linaro-media-create --dev vexpress --image_file mmc.bin
--image_size 2000M --hwpack
hwpack_linaro-lt-vexpress-a9_20120221-1_armel_suupported.tar.gz
--binary linaro-o-developer-tar-20120221-0.tar.gz
}}}
After generating the filesystem, you probably want to customize it:
* Disable address layout randomization (mitigates a memory
consumption issue with the model, but not so important on host
machines with >4GB of RAM):
{{{
echo sys.kernel.randomize_va_space = 0 >>etc/sysctl.conf
}}}
* Disable DHCP for the network (otherwise boot will stall):
{{{
sed -i '/auto.*eth0/d; s/^\(iface.*eth0.*\)dhcp/\1manual/'
etc/network/interfaces
}}}
* Edit fstab to put the real device name into /etc/fstab in place of
UUID=<uuid>. This may not be necessary (mountall was getting
confused, but that may have been caused by not having an initramfs).
Finally, extract the initramfs image (whatever /initrd.img in the
filesystem image points to).
== Kernel, switcher and bootwrapper ==
Clone the big.LITTLE switcher:
{{{
$ git clone --branch gnu-build git://git.linaro.org/people/dmart/arm-virt-bl.git
}}}
Clone the kernel to run on the model. (Eventually we shouldn't need a
special tree for this. There are a few model-specific tweaks in this
tree, but nothing big.LITTLE-specific yet.)
{{{
$ git clone --branch arm/vexpressdt-rtsm
git://git.linaro.org/people/dmart/linux-2.6-arm.git
}}}
Now build the kernel:
{{{
$ cd linux-2.6-arm/
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- vexpress_rtsm_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage dtbs
}}}
The bootwrapper doesn't support device tree yet, so for now append a
suitable device tree blob to the zImage. This should match the model
you intend to run on:
{{{
$ cat arch/arm/boot/zImage arch/arm/boot/vexprress-v2p-ca15x4-rtsm.dtb >../zBlob
}}}
Now, build the bootwrapper using the kernel you just built:
{{{
$ cd ../arm-virt-bl/bootwrapper
}}}
Configure some things:
In Makefile, add the following argument to BOOTARGS:
{{{
root=/dev/mmcblk0p2
}}}
Due to current bugginess introduced by the ARM->GNU toolchain
migration, the switcher is not currently stable. For now, we turn off
autonomous asynchronous switching so that we can see the system
booting:
In big-little/Makefile, add change the line
{{{
ASYNC ?= TRUE
}}}
to
{{{
ASYNC ?= FALSE
}}}
Plug in the kernel and initramfs images from the previous steps:
{{{
$ : >payload/fsimg
$ cp ../../zBlob payload/kernel
$ cp initrd.img payload/fsimg
}}}
... and build:
{{{
$ make
[...]
LD img.axf
}}}
img.axf is the boot payload which is needed to start the model. It
contains the big.LITTLE switcher code and the kernel, along with a
minimal bootloader.
== Running ==
OK, so now we have:
* A boot image containing the switcher and kernel: img.axf
* A filesystem MMC card image: mmc.bin
* A model binary
Sample payload images can be found in
http://people.linaro.org/~dmart/bl-images/model-images-20120228.tar.bz2
Run like this:
{{{
$ ./RTSM_VE_Cortex-A15x4-A7x4 -C motherboard.mmc.p_mmc_file=mmc.bin -a
coretile.cluster0.*=img.axf
}}}
This should be enough to boot to a prompt on the simulated UART.
Beware though -- it can take up to 10 minutes or so to get there,
depending on your machine.