aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-04-17amba-clcd: set video mode via module parameter on kernel commandlineRyan Harkin
Specifying the module parameter "amba-clcd.mode=<mode>" will over-ride the default mode used when the driver is initialised. Where <mode> can either be VGA or XVGA (the default). Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-26cpufreq_stats: improve config option isolationMark Hambleton
Add missing pre-processor protection around calls to IKS APIs Signed-off-by: Mark Hambleton <mahamble@broadcom.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-08cpufreq: arm-big-little: don't use cpu_last_req_freq for MPViresh Kumar
While getting support for In-Kernel-Switcher in big LITTLE cpufreq driver we introduced cpu_last_req_freq per-cpu variable that stores the last frequency requested for a cpu. It was important for IKS as CPUs in the same cluster can have separate struct cpufreq_policy associated with them and so cpufreq core may try to set different frequencies on both CPUs of same cluster. But for non-IKS solution or MP we don't need to cache last requested frequency. Currently there is a bug in code where if cpufreq_driver->get() is called for any cpu other than policy->cpu, we are returning 0, because we set cpu_last_req_freq only for policy->cpu and not for others. This problem could have been fixed by setting cpu_last_req_freq for all CPUs in policy->cpus, but that wouldn't be the best solution. Purpose of cpufreq_driver->get() is to get exact frequency from the hardware instead of returning cached frequency that was last requested as that is already present with the core. Hence, this patch forces only IKS to use cpu_last_req_freq and not MP. We will get the frequency from hardware when ->get() is called for MP. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06drivers/bus: arm-cci:nobody uses cci_pmu_destroyAndy Green
Nobody uses static function, get rid of the function and warning Signed-off-by: Andy Green <andy.green@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19cpufreq/arm_big_little.c: Fixing non-terminated stringMathieu J. Poirier
When declaring char name[9] = "cluster"; name[7] is equal to the string termination character '\0'. But later on doing: name[7] = cluster_id + '0'; clobbers the termination character, leaving non terminated strings in the system and potentially causing undertermined behavior. By initialising name[9] to "clusterX" the 8th character is set to '\0' and affecting the 7th character with the cluster number doesn't overwite anything. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> [ np: The C standard says that the reminder of an initialized array of a known size should be initialized to zero and therefore this patch is unneeded, however this patch makes the intent more explicit to others reading the code. ] Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19cpufreq: arm_big_little: Don't destroy/create freq table/clk for every cpu ↵Viresh Kumar
on/off When a cpu goes down, exit would be called for it. Similarly for every cpu up init would be called. This would result in same freq table and clk structure to get freed/allocated again. There is no way for freq table/clk structures to change between these calls. Also, when we disable switcher, firstly cpufreq unregister would be called and hence exit for all cpus and then register would be called, i.e. init would be called. For saving time/energy for both cases, lets not free table/clk until module exit is not done. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19cpufreq: arm_big_little: Unregister/register cpufreq driver with switcher ↵Nicolas Pitre
notifiers Cpufreq driver must be unregistered/registered on switcher on/off to get correct freq tables for all cpus. This patch does it. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-19cpufreq: arm_big_little: add in-kernel switching(IKS) supportViresh Kumar
This patch adds IKS (In Kernel Switcher) support to cpufreq driver. This creates separate freq table for A7-A15 cpu pair. A7 frequency is virtualized and is halved, so that it touches boundaries with A7 frequencies. Based on Earlier Work from Sudeep. Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19cpufreq: cpufreq_stats: Register for bL_switcher notifiersViresh Kumar
cpufreq_stat has registered notifiers with both cpufreq and cpu core. It adds cpu/cpu0/cpufreq/stats/ directory with a notifier of cpufreq CPUFREQ_NOTIFY and removes this directory with a notifier to cpu core. On bL_switcher enable/disable, cpufreq drivers notifiers gets called and they call cpufreq_unregister(), followed by cpufreq_register(). For unregister stats directories per cpu aren't removed, because cpu never went to dead state and cpu notifier isn't called. When cpufreq_register() is called, we try to add these directories again and that simply fails, as directories were already present. Fix these issues by registering cpufreq_stats too with bL_switcher notifiers, so that they get unregistered and registered on switcher enable/disable. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-17Merge branch 'tracking-armlt-tc2-cpufreq' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-tc2-pm' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/mach-vexpress/Makefile
2013-07-17Merge branch 'tracking-armlt-dcscb' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-spc' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-cci' into lsk-3.10-vexpressJon Medhurst
Conflicts: arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
2013-07-17Merge branch 'tracking-armlt-misc-fixes' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-clcd' into lsk-3.10-vexpressJon Medhurst
2013-07-17Merge branch 'tracking-armlt-hdlcd' into lsk-3.10-vexpressJon Medhurst
2013-07-01cpufreq: ARM big LITTLE: Fixup for new SPC driverJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01cpufreq: ARM big LITTLE: Add Vexpress glue driverViresh Kumar
Vexpress depends on motherboard firmware + spc for getting opp table. This patch adds Vexpress glue driver for ARM big LITTLE parent driver. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01clk: Vexpress-spc: Fixup for new SPC driverJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01clk: Vexpress-spc: Add clock driverViresh Kumar
This patch adds spc clock controller. In Vexpress cpu cluster clock is controlled via spc controller and so it must be present in clk framework. vexpress_clk_[of_]register_spc() registers cluster clocks with and without DT. These are added as root clocks without any parents and their names are "cluster[0|1|..]". Now, platform must add clocks of all the cpus below these clusters. cpufreq driver would get cpu clock and will do clk_get[set]_rate() on cpu clock, which will then pass it to cluster clocks. And finally spc will get programmed. This patch doesn't add non-DT clocks for clusters and cpus as i don't see a user of that for now. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01cpufreq: ARM big LITTLE: Add depends on BIG_LITTLEViresh Kumar
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-01cpuidle: arm_big_little: Initialise earlier by using device_initcallJon Medhurst
Using late_initcall is too late for IKS. Requested-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01cpuidle: arm_big_little: fixup for MCPMNicolas Pitre
The low-level layer is now called "mcpm".
2013-07-01Use dts compatible node to init cpuidle-tc2mark hambleton
Change the init code for cpuidle-tc2 to check for a compatible node in the devicetree of "arm,generic" in preparation for moving it to driver/cpuidle. Rename functions / variable from tc2_ to bl_. Signed-off-by: mark hambleton <mahamble@broadcom.com>
2013-07-01gic: introduce gic_cpu_if_down()Nicolas Pitre
This should be queued right before 'Revert "ARM: common: add GIC bybass disable on GIC CPU IF save function"'. Signed-off-by: Nicolas Pitre <nico@linaro.org>
2013-07-01ARM: introduce common set_auxcr/get_auxcr functionsRob Herring
Move the private set_auxcr/get_auxcr functions from drivers/cpuidle/cpuidle-calxeda.c so they can be used across platforms. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Nicolas Pitre <nico@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
2013-07-01drivers: mfd: vexpress: add Serial Power Controller (SPC) supportLorenzo Pieralisi
The TC2 versatile express core tile integrates a logic block that provides the interface between the dual cluster test-chip and the M3 microcontroller that carries out power management. The logic block, called Serial Power Controller (SPC), contains several memory mapped registers to control among other things low-power states, operating points and reset control. This patch provides a driver that enables run-time control of features implemented by the SPC control logic. The driver also provides a bridge interface through the vexpress config infrastructure. Operations allowing to read/write operating points are made to go via the same interface as configuration transactions so that all requests to M3 are serialized. Device tree bindings documentation for the SPC component is provided with the patchset. Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Nicolas Pitre <nicolas.pitre@linaro.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: Jon Medhurst <tixy@linaro.org> Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com> Reviewed-by: Nicolas Pitre <nico@linaro.org>
2013-07-01drivers: mfd: refactor the vexpress config bridge APIPawel Moll
The introduction of Serial Power Controller (SPC) requires the vexpress config interface to change slightly since the SPC memory mapped interface can be used as configuration bus but also for operating points programming and retrieval. The helper that allocates the bridge functions requires an additional parameter allowing to request component specific functions that need not be initialized through device tree bindings but just using simple look-up and statically defined constants. This patch introduces the necessary changes to the vexpress config layer to cater for the new vexpress bridge interface requirements. Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Achin Gupta <achin.gupta@arm.com> Cc: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Nicolas Pitre <nicolas.pitre@linaro.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: Jon Medhurst <tixy@linaro.org> Signed-off-by: Pawel Moll <pawel.moll@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org>
2013-07-01Support CCI PMU in perfPunit Agrawal
CCI400 has a set of counters that can be used to profile different transations at CCI master and slave interfaces. These counters can observe different kinds of transations passing through the CCI and provide a system-level view of activity. This patch adds support for CCI PMU by extending the existing CCI driver. Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01drivers: ARM CCI: Add a platform driver stub for the PMUJon Medhurst
This is a hack to enable the old CCI PMU patches to be used with the new CCI driver. The CCI PMU is (mis)represented by a separate node in TC2 device-tree. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01drivers/bus: arm-cci: function to enable CCI ports from early boot codeNicolas Pitre
This provides cci_enable_port_for_self(). This is the counterpart to cci_disable_port_by_cpu(self). This is meant to be called from the MCPM machine specific power_up_setup callback code when the appropriate affinity level needs to be initialized. The code therefore has to be position independent as the MMU is still off and it cannot rely on any stack space. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Dave Martin <dave.martin@linaro.org>
2013-07-01drivers: bus: add ARM CCI supportLorenzo Pieralisi
On ARM multi-cluster systems coherency between cores running on different clusters is managed by the cache-coherent interconnect (CCI). It allows broadcasting of TLB invalidates and memory barriers and it guarantees cache coherency at system level through snooping of slave interfaces connected to it. This patch enables the basic infrastructure required in Linux to handle and programme the CCI component. Non-local variables used by the CCI management functions called by power down function calls after disabling the cache must be flushed out to main memory in advance, otherwise incoherency of those values may occur if they are sitting in the cache of some other CPU when power down functions execute. Driver code ensures that relevant data structures are flushed from inner and outer caches after the driver probe is completed. CCI slave port resources are linked to set of CPUs through bus masters phandle properties that link the interface resources to masters node in the device tree. Documentation describing the CCI DT bindings is provided with the patch. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-07-01net: smc91x: Do not cast pointer to intCatalin Marinas
The patch removes a compiler warning when casting the ioaddr pointer to (unsigned int) in the smc_probe() function of the smc91x.c driver. The casting is now done to (unsigned long). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-07-01amba-clcd: separate ioremap framebuffer from DMA implementationWill Deacon
The amba-clcd device can be configured to use either DMA or, when this feature is not available, an ioremapped frambuffer in static ram. In the case of the latter, we must take care not to pass ioremapped addresses to dma_common_mmap, since this expects only addresses from dma_mmap_coherent, which reside in the kernel linear mapping. This patch reworks the fb initialisation code so that either DMA or IO implementations of the mmap/remove functions are chosen as appropriate. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-07-01amba-clcd: Only use dma_alloc_writecombine() if the arch supports itCatalin Marinas
This patch hides the dma_(alloc|free)_writecombine() calls behind macros to allow the amba-clcd.c to be used on architectures that do not provide this DMA API. With this patch, the *_writecombine() API is only used on ARM (AArch32). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-07-01amba-clcd: Remove check for 'reg' value in clcdfb_probeJon Medhurst
This check was attempting to ensure only one clcd device in the device-tree was probed, however the check fails in the valid case where the device is a child of another device and the 'reg' value is a offset from the start of that other device, not an absolute address. This occurs on vexpress with the motherboard clcd being a child of iofga. For now, we will just have to rely on there only being one display device specified in device-tree. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01amba-clcd: Add Device Tree support to amba-clcd driverJon Medhurst
Add support to parse the display configuration from device tree. If the board does not provide platform specific functions in the struct clcd_board contained with the amba device info, then defaults are provided by the driver. The device tree configuration can either ask for a DMA setup or provide a framebuffer address to be remapped into the driver. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2013-07-01ARM HDLCD: Fix clock initialisation sequenceJon Medhurst
This reworks HDLCD initialisation to mirror how CLCD does this, in particular to prepare the clock immediately after it has been got which ensures that we don't try and enable clocks before they were prepared, e.g. in the former clk_enable after register_framebuffer(). The reason this issue wasn't noticed before is that we have been setting CONFIG_FRAMEBUFFER_CONSOLE and this caused register_framebuffer() to trigger the creation of a console which calls hdlcd_set_par(), which in turn was preparing and enabling the clock. Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM HDLCD: Fix compilation on Linux 3.9Jon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM HDLCD: Changes to get HDLCD working with 've-updates'Jon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM HDLCD: Add developer option to remove double-height framebuffersChris Redpath
This option can be used with Android to push the graphics subsystem into a different composition strategy which is more effective when used on hardware where the framebuffer memory is not cacheable. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-01ARM HDLCD: Review comments from Liviu - extraneous memcpyChris Redpath
Signed-off-by: Chris Redpath <chris.redpath@arm.com> Reviewed-By: Liviu Dudau <liviu.dudau@arm.com>
2013-07-01ARM HDLCD: Add useful functions to HDLCD driver for system integrationChris Redpath
During TC2 integration a bad config option resulted in HDLCD memory reads not being serviced often enough. This lead to unsightly screen blanking. These options allow the developer to count the number of underruns and to control the color used by HDLCD when an underrun prevents accessing pixel data. The combination of these two options allow easy diagnosis of HDLCD underrun conditions. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-01ARM HDLCD: Change default byte ordering to match Android assumptionChris Redpath
Change color byte location in 32-bit word from argb to abgr to match the assumption made in Android when 32-bit color displays are used. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-01ARM HDLCD: Get it working under Android.Dietmar Eggemann
Add a shortcut when set_par is called to only change the yoffset. Android is doing that instead of calling pan_display to flip the framebuffer. Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2013-07-01ARM HDLCD: Fixup driver to resemble ARM's latest codebase.Jon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM HDLCD: Add missing clk_{un}prepare callsJon Medhurst
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2013-07-01ARM HDLCD: Add support for ARM High Definition LCD.Liviu Dudau
The ARM HDLCD device is now found in various new Versatile Express coretiles. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
2013-07-01mfd: vexpress: Make the driver optional for arm and arm64Pawel Moll
The driver can be used on either arm or arm64 platforms, but the latter doesn't have any platform-specific configuration options, so it must be possible to manually enable the driver. As the gpiolib is optional for arm64 arch, the gpio/led code must be compiled conditionally. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com>