Jacek Pielaszkiewicz [Fri, 3 Jan 2014 06:22:38 +0000 (22:22 -0800)]
Revert "linux-kernel and linux kernel modules ABI - next changes"
This reverts commit
45fe7044915b03bc6444102e55e45cccf4a4455d.
Change-Id: Ie479df1039134b1fcd89bc942c61d6669c51faf0
Jacek Pielaszkiewicz [Fri, 3 Jan 2014 06:21:59 +0000 (22:21 -0800)]
Revert "abi-checker - tool directory location update."
This reverts commit
952c6d9596e18f9df43174f513ce84ebe7cd6ca2.
Change-Id: Id6f4bd3d4e76c3a07fb8cdf121745c17e59b7a2a
Casey Schaufler [Thu, 19 Dec 2013 21:23:26 +0000 (13:23 -0800)]
Smack: change rule cap check
smk_write_change_rule() is calling capable rather than
the more correct smack_privileged(). This allows for setting
rules in violation of the onlycap facility. This is the
simple repair.
Change-Id: Icb5321b5b5355d64b0b029d9131cf60b5e97d356
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Mon, 23 Dec 2013 19:07:10 +0000 (11:07 -0800)]
Smack: Make the syslog control configurable
The syslog control requires that the calling proccess
have the floor ("_") Smack label. Tizen does not run any
processes except for kernel helpers with the floor label.
This changes allows the admin to configure a specific
label for syslog. The default value is the star ("*")
label, effectively removing the restriction. The value
can be set using smackfs/syslog for anyone who wants
a more restrictive behavior.
Change-Id: Ia4270bf8864bd8342e585bbdd4791fb8359e8916
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Jacek Pielaszkiewicz [Tue, 17 Dec 2013 13:27:39 +0000 (14:27 +0100)]
abi-checker - tool directory location update.
- abi-checker tool has been moved into tools/directory
- abi-checker short documentation has been added.
Change-Id: I88d4c6081b1df276243c9edfb44d1de2e009cc10
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Jacek Pielaszkiewicz [Thu, 12 Dec 2013 14:06:24 +0000 (15:06 +0100)]
linux-kernel and linux kernel modules ABI - next changes
The following changes have implemented:
1. New API/ABI check tools were added:
- "abi-module-checker" - single module ABI/API checker. The tool
compare module fingerprint with kernel fingerprint.
- "abi-module-dumper" - create for current kernel version
ABI/API fingerprint file.
- "abi-module-kernels-list" - list compatible kernel versions with given kernel module
2. sample kernel module was added to show how to use ABI/API tools
3. a new rpm package "linux-kernel-abi-devel" is build. The package
deliver kernel fingerprints repository for development .
4. New links "linux-kernel-build-current" and "linux-kernel-sources-current"
are make easer access to sources and build kernel
directories.
Change-Id: I06f7dc1b8cc118f48e64595d257dbd29fd53e11e
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Jacek Pielaszkiewicz [Mon, 9 Dec 2013 12:37:39 +0000 (13:37 +0100)]
linux-kernel and linux kernel modules ABI tools.
The following changes have been implemented:
1. A new tool "abi-checker" has been created. The tool allows:
- compare two Module.symvers files.
- reports which symbols are new, changed or have been removed.
- create dump all kernel symbols that are present in external kernel
module.
2. linux-3.10.spec has been updated to check changes in kernel ABI/API.
In case if any change kernel installation process aborts. In such case
user is requested to update kernel version and update ABI dump file.
ABI dump file should be located in "abi-checker/data" directory.
3. Output rpm with uImage has been extended by ABI dump. Default location for
the file is /boot/abi/_kernel_version_.
4. New output rpm package is build - "abi-tools". The package delivers ABI-checker.
By default the rpm install ABI-checker tool into /usr/local/bin directory.
Change-Id: I37a2a52f64fde915cff24aa85349aa1dbee3a5b8
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Casey Schaufler [Thu, 21 Nov 2013 08:55:10 +0000 (10:55 +0200)]
Smack: Cgroup filesystem access
The cgroup filesystems are not mounted using conventional
mechanisms. This prevents the use of mount options to
set Smack attributes. This patch makes the behavior
of cgroup filesystems compatable with the way systemd
uses them.
Change-Id: I1e0429f133db9e14117dc754d682dec08221354c
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Tue, 22 Oct 2013 18:47:45 +0000 (11:47 -0700)]
Smack: Ptrace access check mode
When the ptrace security hooks were split the addition of
a mode parameter was not taken advantage of in the Smack
ptrace access check. This changes the access check from
always looking for read and write access to using the
passed mode. This will make use of /proc much happier.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I979f36da1b26d0fba5d73744f340422aaae5cc74
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Sat, 12 Oct 2013 01:06:39 +0000 (18:06 -0700)]
Smack: Implement lock security mode
Linux file locking does not follow the same rules
as other mechanisms. Even though it is a write operation
a process can set a read lock on files which it has open
only for read access. Two programs with read access to
a file can use read locks to communicate.
This is not acceptable in a Mandatory Access Control
environment. Smack treats setting a read lock as the
write operation that it is. Unfortunately, many programs
assume that setting a read lock is a read operation.
These programs are unhappy in the Smack environment.
This patch introduces a new access mode (lock) to address
this problem. A process with lock access to a file can
set a read lock. A process with write access to a file can
set a read lock or a write lock. This prevents a situation
where processes are granted write access just so they can
set read locks.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I9bf4df25088d2dd49aadfa0ced844b147ad1c81d
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Rafal Krypa [Fri, 9 Aug 2013 09:47:07 +0000 (11:47 +0200)]
Smack: parse multiple rules per write to load2, up to PAGE_SIZE-1 bytes
Smack interface for loading rules has always parsed only single rule from
data written to it. This requires user program to call one write() per
each rule it wants to load.
This change makes it possible to write multiple rules, separated by new
line character. Smack will load at most PAGE_SIZE-1 characters and properly
return number of processed bytes. In case when user buffer is larger, it
will be additionally truncated. All characters after last \n will not get
parsed to avoid partial rule near input buffer boundary.
Change-Id: I81766925a9522fcb811fe3046850cdc45067838a
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Mon, 5 Aug 2013 20:21:22 +0000 (13:21 -0700)]
Smack: IPv6 casting error fix for 3.11
The original implementation of the Smack IPv6 port based
local controls works most of the time using a sockaddr as
a temporary variable, but not always as it overflows in
some circumstances. The correct data is a sockaddr_in6.
A struct sockaddr isn't as large as a struct sockaddr_in6.
There would need to be casting one way or the other. This
patch gets it the right way.
Change-Id: Iac627fa0ddb77e3ff4b8c9c81bd838141a5638e9
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Fri, 28 Jun 2013 20:47:07 +0000 (13:47 -0700)]
Smack: network label match fix
The Smack code that matches incoming CIPSO tags with Smack labels
reaches through the NetLabel interfaces and compares the network
data with the CIPSO header associated with a Smack label. This was
done in a ill advised attempt to optimize performance. It works
so long as the categories fit in a single capset, but this isn't
always the case.
This patch changes the Smack code to use the appropriate NetLabel
interfaces to compare the incoming CIPSO header with the CIPSO
header associated with a label. It will always match the CIPSO
headers correctly.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I22a2fd758b5a7764cbeb3ebf9f4dadd12d5b170b
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Tomasz Stanislawski [Tue, 11 Jun 2013 12:55:13 +0000 (14:55 +0200)]
security: smack: add a hash table to quicken smk_find_entry()
Accepted for the smack-next tree after changing the number of
slots from 128 to 16.
This patch adds a hash table to quicken searching of a smack label by its name.
Basically, the patch improves performance of SMACK initialization. Parsing of
rules involves translation from a string to a smack_known (aka label) entity
which is done in smk_find_entry().
The current implementation of the function iterates over a global list of
smack_known resulting in O(N) complexity for smk_find_entry(). The total
complexity of SMACK initialization becomes O(rules * labels). Therefore it
scales quadratically with a complexity of a system.
Applying the patch reduced the complexity of smk_find_entry() to O(1) as long
as number of label is in hundreds. If the number of labels is increased please
update SMACK_HASH_SLOTS constant defined in security/smack/smack.h. Introducing
the configuration of this constant with Kconfig or cmdline might be a good
idea.
The size of the hash table was adjusted experimentally. The rule set used by
TIZEN contains circa 17K rules for 500 labels. The table above contains
results of SMACK initialization using 'time smackctl apply' bash command.
The 'Ref' is a kernel without this patch applied. The consecutive values
refers to value of SMACK_HASH_SLOTS. Every measurement was repeated three
times to reduce noise.
| Ref | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512
--------------------------------------------------------------------------------------------
Run1 | 1.156 | 1.096 | 0.883 | 0.764 | 0.692 | 0.667 | 0.649 | 0.633 | 0.634 | 0.629 | 0.620
Run2 | 1.156 | 1.111 | 0.885 | 0.764 | 0.694 | 0.661 | 0.649 | 0.651 | 0.634 | 0.638 | 0.623
Run3 | 1.160 | 1.107 | 0.886 | 0.764 | 0.694 | 0.671 | 0.661 | 0.638 | 0.631 | 0.624 | 0.638
AVG | 1.157 | 1.105 | 0.885 | 0.764 | 0.693 | 0.666 | 0.653 | 0.641 | 0.633 | 0.630 | 0.627
Surprisingly, a single hlist is slightly faster than a double-linked list.
The speed-up saturates near 64 slots. Therefore I chose value 128 to provide
some margin if more labels were used.
It looks that IO becomes a new bottleneck.
Change-Id: Ib1f7bf9f52337b07ccfab10e8fdf52014bd3b466
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Tomasz Stanislawski [Thu, 6 Jun 2013 07:30:50 +0000 (09:30 +0200)]
security: smack: fix memleak in smk_write_rules_list()
The smack_parsed_rule structure is allocated. If a rule is successfully
installed then the last reference to the object is lost. This patch fixes this
leak. Moreover smack_parsed_rule is allocated on stack because it no longer
needed ofter smk_write_rules_list() is finished.
Change-Id: I5b4dcadc6a9d675ab630b23c00edeaf595b5b857
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Tetsuo Handa [Wed, 24 Jul 2013 20:44:02 +0000 (05:44 +0900)]
xattr: Constify ->name member of "struct xattr".
Since everybody sets kstrdup()ed constant string to "struct xattr"->name but
nobody modifies "struct xattr"->name , we can omit kstrdup() and its failure
checking by constifying ->name member of "struct xattr".
Change-Id: I6cb5cd7f29c01956dd0d1579af81a518a5936071
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Joel Becker <jlbec@evilplan.org> [ocfs2]
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Reviewed-by: Paul Moore <paul@paul-moore.com>
Tested-by: Paul Moore <paul@paul-moore.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
David Quigley [Wed, 22 May 2013 16:50:35 +0000 (12:50 -0400)]
Security: Add Hook to test if the particular xattr is part of a MAC model.
The interface to request security labels from user space is the xattr
interface. When requesting the security label from an NFS server it is
important to make sure the requested xattr actually is a MAC label. This allows
us to make sure that we get the desired semantics from the attribute instead of
something else such as capabilities or a time based LSM.
Change-Id: I283f116953f958877826ba772661b5755986ac99
Acked-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Matthew N. Dodd <Matthew.Dodd@sparta.com>
Signed-off-by: Miguel Rodel Felipe <Rodel_FM@dsi.a-star.edu.sg>
Signed-off-by: Phua Eu Gene <PHUA_Eu_Gene@dsi.a-star.edu.sg>
Signed-off-by: Khin Mi Mi Aung <Mi_Mi_AUNG@dsi.a-star.edu.sg>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Passion,Zhao [Mon, 3 Jun 2013 03:42:24 +0000 (11:42 +0800)]
Smack: Fix the bug smackcipso can't set CIPSO correctly
Bug report: https://tizendev.org/bugs/browse/TDIS-3891
The reason is userspace libsmack only use "smackfs/cipso2" long-label interface,
but the code's logical is still for orginal fixed length label. Now update
smack_cipso_apply() to support flexible label (<=256 including tailing '\0')
There is also a bug in kernel/security/smack/smackfs.c:
When smk_set_cipso() parsing the CIPSO setting from userspace, the offset of
CIPSO level should be "strlen(label)+1" instead of "strlen(label)"
Change-Id: I7be85b4ade557e25569970e61c9e09ca01b5f2d9
Signed-off-by: Passion,Zhao <passion.zhao@intel.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Tetsuo Handa [Mon, 27 May 2013 11:11:27 +0000 (20:11 +0900)]
Smack: Fix possible NULL pointer dereference at smk_netlbl_mls()
netlbl_secattr_catmap_alloc(GFP_ATOMIC) can return NULL.
Change-Id: Id67f7f66a61a05e7e45b66a50b5d0869ef7e5117
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Thu, 23 May 2013 01:43:07 +0000 (18:43 -0700)]
Smack: Add smkfstransmute mount option
Suppliment the smkfsroot mount option with another, smkfstransmute,
that does the same thing but also marks the root inode as
transmutting. This allows a freshly created filesystem to
be mounted with a transmutting heirarchy.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I3d7238ca1c5251fcfc96a6a61bec47bdf9466152
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Thu, 23 May 2013 01:43:03 +0000 (18:43 -0700)]
Smack: Improve access check performance
Each Smack label that the kernel has seen is added to a
list of labels. The list of access rules for a given subject
label hangs off of the label list entry for the label.
This patch changes the structures that contain subject
labels to point at the label list entry rather that the
label itself. Doing so removes a label list lookup in
smk_access() that was accounting for the largest single
chunk of Smack overhead.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I15f3cde6f0c3db9af056d35fc224d6295dff130c
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Casey Schaufler [Thu, 23 May 2013 01:42:56 +0000 (18:42 -0700)]
Smack: Local IPv6 port based controls
Smack does not provide access controls on IPv6 communications.
This patch introduces a mechanism for maintaining Smack lables
for local IPv6 communications. It is based on labeling local ports.
The behavior should be compatible with any future "real" IPv6
support as it provides no interfaces for users to manipulate
the labeling. Remote IPv6 connections use the ambient label
the same way that unlabeled IPv4 packets are treated.
Targeted for git://git.gitorious.org/smack-next/kernel.git
Change-Id: I6c00966cc88b36611214cc438c47ecdab63077c7
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Tomasz Figa [Wed, 4 Dec 2013 13:09:46 +0000 (14:09 +0100)]
clk: samsung: exynos4: Propagate rate change of SPI dividers
This patch adds missing CLK_SET_RATE_PARENT flag to div_spi{0,1,2} clocks
to allow rate change propagation to div_spi{0,1,2}_pre. This fixes the
problem with SPI bus clock rate setting.
Change-Id: I26ef7028297914d5c99e55f0e9fa6dc6a9292e94
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Doug Anderson [Mon, 17 Jun 2013 16:50:43 +0000 (09:50 -0700)]
pinctrl: exynos: ack level-triggered interrupts before unmasking
A level-triggered interrupt should be acked after the interrupt line
becomes inactive and before it is unmasked, or else another interrupt
will be immediately triggered. Acking before or after calling the
handler is not enough.
Change-Id: I553444ce552df5722e606d71bea8bf7b862cce25
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Doug Anderson [Wed, 12 Jun 2013 17:33:18 +0000 (10:33 -0700)]
pinctrl: exynos: reorder xyz_irq_unmask() so future patch can ack
This patch does nothing but reorder the functions to improve the
readability of a future patch.
Change-Id: Ia70d2969d88f6b4579617209be1cedbbf6bbc26c
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Doug Anderson [Wed, 12 Jun 2013 17:33:17 +0000 (10:33 -0700)]
pinctrl: exynos: Add spinlocks to irq_mask and irq_unmask
The patch:
1984695 pinctrl: samsung: Protect bank registers with a spinlock
...added spinlocks to protect many accesses. However, the irq_mask
and irq_unmask functions still do an unprotected read/modify/write.
Add the spinlock there.
Change-Id: I892cfcd82368466184b99eab75d2bc7882674211
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Beomho Seo [Mon, 9 Dec 2013 10:43:06 +0000 (19:43 +0900)]
dts: exynos4x12: fix clock properties.
This patch fix incorrect clock properties.
And then, move fixed clock properties to
exynos4x12.dtsi to avoid further duplication of broken properties.
Change-Id: Ib980422ad67af8dc2493f1886f6e26f23b451d12
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Beomho Seo [Wed, 4 Dec 2013 10:46:44 +0000 (19:46 +0900)]
mmc: sdhci-s3c: sdhci-s3c driver use sdhci-pltfm
This patch revised to use sdhci-pltfm.
Change-Id: Ib11e5a4005aa7c78261c12e7c8df027acd71575e
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Krzysztof Kozlowski [Tue, 3 Dec 2013 14:49:13 +0000 (15:49 +0100)]
mfd: max77693: Fix mapping IRQ during mask/unmask
Use hwirq in max77693_irq_mask() and max77693_irq_unmask() for accessing
irq array. Previously the virtual irq was used which resulted in
out-of-bounds access.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Change-Id: I6e2e6751d07427072e90d9f4dfef921108485f29
Beomho Seo [Tue, 3 Dec 2013 08:25:13 +0000 (17:25 +0900)]
mmc: sdhci-pltfm: Use devm_ioremap_resource()
This patch devm_ioremap_resource for replace request region and ioremap.
Change-Id: I6b63e1db0d0c9d6d8cf89a93d57db0b253418e3a
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Tomasz Figa [Mon, 4 Nov 2013 15:38:47 +0000 (16:38 +0100)]
video: display: panel-s6e8aa0: Use devm_kzalloc to allocate driver data
This fixes memory leak on probe error path.
Change-Id: Ibea51282dee8139a85764f39e7c894a94036f0cf
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Tomasz Figa [Mon, 4 Nov 2013 15:38:47 +0000 (16:38 +0100)]
video: display: panel-s6d6aa1: Use devm_kzalloc to allocate driver data
This fixes memory leak on probe error path.
Change-Id: Iafc7a9920869e59d792c480770dcb07507a998da
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Łukasz Stelmach [Wed, 27 Nov 2013 15:25:27 +0000 (16:25 +0100)]
Enable RTC chips on M0 devices
Change-Id: Ide6d17af6d026230c48bededf32e8f15ca41b8e4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 27 Nov 2013 14:59:56 +0000 (15:59 +0100)]
Include kernel configuration in kernel image
Enable IKCONFIG and IKCONFIG_PROC to include the configuration of the
kernel in the image and export it via /proc/config.gz.
Change-Id: I868ba4cabd4a1517b625e81037d7758651dfa4b4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Robert Baldyga [Thu, 14 Nov 2013 11:10:20 +0000 (12:10 +0100)]
USB: gadget: s3c-hsotg: fix disconnect handling
This patch moves s3c_hsotg_disconnect function call from USBSusp interrupt
handler to SET_ADDRESS request handler.
It's because disconnected state can't be detected directly, because this
hardware doesn't support Disconnected interrupt for device mode. For both
Suspend and Disconnect events there is one interrupt USBSusp, but calling
s3c_hsotg_disconnect from this interrupt handler causes config reset in
composite layer, which is not undesirable for Suspended state.
For this reason s3c_hsotg_disconnect is called from SET_ADDRESS request
handler, which occurs always after disconnection, so we do disconnect
immediately before we are connected again. It's probably only way we
can do handle disconnection correctly.
Change-Id: I8e69b532077c6ad76489e70fcc3f8d525fe75cf3
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Robert Baldyga [Thu, 14 Nov 2013 11:07:29 +0000 (12:07 +0100)]
USB: gadget: s3c-hsotg: fix spinlock locking
This patch adds missing spinlock locking in s3c_hsotg_complete_setup function,
and unlocking for gadget setup call.
Change-Id: I73dc683a9df16872d9d6ba2b6b7c98a48418c500
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Andrzej Hajda [Tue, 15 Oct 2013 08:45:34 +0000 (10:45 +0200)]
arch: ARM: dts: add support for exynos4210-usbphy driver to trats
Change-Id: I9758e15225e86050b62068b1156709a71799e4f1
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Chanho Park [Mon, 25 Nov 2013 02:52:04 +0000 (11:52 +0900)]
gpu: arm: mali400: support gpu frequency profiling
This patch supports gpu frequency profiling by using ARM streamline.
You must turn on below configuration if you want to get a profiling data.
CONFIG_MALI400_PROFILING
CONFIG_MALI400_INTERNAL_PROFILING
Change-Id: Id8cc59b80dcf4483cc5944283fc95daaca6f0839
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 22 Nov 2013 10:11:44 +0000 (19:11 +0900)]
tizen: update default config to use slp gadget
The Tizen uses slp composite gadget which is based on android gadget.
Until we migrate to configfs based gadget configuration, we should use the slp
gadget. It only support sdb and rndis gadget.
Change-Id: I9e7afd3ef9865d43d43d2221b30b7b10ef039399
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Karol Lewandowski [Tue, 29 Oct 2013 13:00:53 +0000 (14:00 +0100)]
update linux-kernel.spec file to fix build problems.
The following changes have been implemented:
1. kernel-source package
2. kernel-build package
3. linux-kernel package
4. add kernel configuration name and abi version to output names.
Change-Id: I95479b660dda8a18f3e8f32c20fcbfbab8ab6000
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Karol Lewandowski [Thu, 31 Oct 2013 18:56:58 +0000 (19:56 +0100)]
mali: Support build to different objdir (O=...).
Change-Id: I3b76381af1ec083c41e321e55c10eb1e75e42155
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Karol Lewandowski [Tue, 29 Oct 2013 13:00:53 +0000 (14:00 +0100)]
packaging: Bump version
Modified version number, again.
Change-Id: Idf67ccbf9c36030644be6c6f76f5fe0e2b857246
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Nikita Kalyazin [Thu, 14 Nov 2013 05:05:32 +0000 (09:05 +0400)]
gpu: arm: mali400: ump: Fix svn revision check
Change-Id: Ic5a3d69518be56a800d4233a48ba8bb719e67c52
Signed-off-by: Nikita Kalyazin <n.kalyazin@samsung.com>
Beomho Seo [Tue, 12 Nov 2013 07:36:22 +0000 (16:36 +0900)]
mmc: sdhci-s3c: Add irq_set_wake function
- Add irq_set_irq_wake function for control irq
- Remove unused variables
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Jonghwa Lee [Mon, 11 Nov 2013 08:29:24 +0000 (17:29 +0900)]
cpufreq: lab: Fix codes for correct working of lab governor.
- Modify typo in lab govnernor.
- Remove deadlock in lab governor which is occured when it enables
overclocking
- Add initialization of LAB's data to cpufreq_governor driver
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Conflicts:
drivers/cpufreq/cpufreq_governor.c
Resolved-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jonghwa Lee [Fri, 8 Nov 2013 08:53:46 +0000 (17:53 +0900)]
cpufreq: exysnos: Fix the way of enabling boost in exynos cpufreq driver.
Follow the codes from ML.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Fri, 8 Nov 2013 08:40:25 +0000 (17:40 +0900)]
cpufreq: lab: Enable overclocking in LAB
Overclocking is always on for LAB governor's working.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Fri, 8 Nov 2013 07:20:45 +0000 (16:20 +0900)]
cpufreq:LAB: Introduce new cpufreq LAB(Legaccy Application Boost) governor
This patch introduces new cpufreq governor named 'LAB'.
LAB governor will use scheduler, per-CPU information to determine how many
CPUs are in busy now. As a result the number of idle CPUs is calculated
for current load (digital low pass filtering is used to provide more stable
results). It will determine next frequency.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Conflicts:
drivers/cpufreq/cpufreq_governor.c
Resolved-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jonghwa Lee [Fri, 8 Nov 2013 01:51:00 +0000 (10:51 +0900)]
cpufreq : M0: Allow sailable frequency up to 1.4Ghz @ M0
Signed-off-by : Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Thu, 7 Nov 2013 07:51:07 +0000 (16:51 +0900)]
config: tizen: Enable CONFIG_BRCMFMAC for supporting WIFI on M0
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Beomho Seo [Tue, 5 Nov 2013 11:51:00 +0000 (20:51 +0900)]
mmc: sdhci-s3c: Revised sdhci_s3c_remove function.
Remove "return ret;" from "err_req_cd:".
Revised sdhci_s3c_remove function.
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
T.J. Purtell [Tue, 5 Nov 2013 07:52:10 +0000 (16:52 +0900)]
arm: Thumb=>ARM signal handling setup skips the a few instructions on Snapdragon S4/Krait
The Thumb instruction set include an If-Then instruction. If an ARM
function is registered as a signal handler, and that signal is
delivered inside the block of instructions follow the IT instruction,
some of the instructions at the beginning of the signal handler are
skipped. This occurs because the IT state bits of the Program Status
Register are not cleared by the kernel.
The ARM architecture reference specifies that the IT state bits in the
PSR must be all zeros in ARM mode or behavior is unspecified. On the
Qualcomm Snapdragon S4/Krait architecture CPUs the processor continues
to consider the IT state bits while in ARM mode. This makes it so
that some instructions are skipped by the CPU.
The relevant clipping of the ARM architecture document is available
here: https://www.dropbox.com/s/6hpwey3kklw20c1/ITState-ARM-Architecture.pdf
This manifests itself in code that uses a lot of signal handling
concurrently with complicated logic code compiled for thumb when the
signal handler compiled as ARM code. One example is the mono runtime.
It uses a signal based mechanism to perform stop the world operation
needed by its garbage collector. It is compiled for ARM and generates
ARM code, however, bionic (libc for android) is compiled for thumb.
During a test case involving native allocation in parallel with
garbage collection (signal handling), we found that the test case
would crash only when running on a Krait architecture CPU. We found
the preceding instructions before the signal to always point to
something inside an IT sequence, in this case the logic in the dlfree
merging of free heap blocks. After adding a sequence of NOPs to the
beginning of the signal handlers, the problem disappeared. We applied
the attached patch to the kernel on one of the Krait devices and found
that it also alleviated the crashes.
The patch simply clears the IT State bits regardless of if the signal
handler is an ARM/Thumb function. It also includes the same fix
applied to the arm64 compat handler.
Signed-off-by: T.J. Purtell <tj@mobisocial.us>
Sangjung Woo [Tue, 5 Nov 2013 02:08:34 +0000 (11:08 +0900)]
pwm: samsung: memory leak bugfix in pwm_samsung_free
There is certainly a kind of memory leak since allocated data (i.e.
chip_data) is set NULL before freeing it by calling devm_kfree().This
patch fixes the memory leak bug by modifying its call order.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Reviewed-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Sangjung Woo [Tue, 5 Nov 2013 01:48:07 +0000 (10:48 +0900)]
ARM: dts: add clocks and enable pwm for exynos4
This patch adds clocks for PWM(Pulse width modulation) timer and enable
it.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Laurent Pinchart [Wed, 17 Jul 2013 22:54:21 +0000 (00:54 +0200)]
pwm: Add PWM polarity flag macro for DT
Define a PWM_POLARITY_INVERTED macro in include/dt-bindings/pwm/pwm.h to
be used by device tree sources.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Tomasz Figa [Sat, 6 Apr 2013 00:54:30 +0000 (02:54 +0200)]
pwm: Remove superseded pwm-samsung-legacy driver
This patch removes the now unused pwm-samsung-legacy driver, which was
replaced by new pwm-samsung driver.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Tomasz Figa [Sat, 6 Apr 2013 00:40:36 +0000 (02:40 +0200)]
pwm: Add new pwm-samsung driver
This patch introduces new Samsung PWM driver, which is completely
rewritten to be multiplatform- and DeviceTree-aware.
In addition, remaining problems of old driver are fixed, such as:
- proper handling of hardware variants,
- synchronization on SMP systems,
- handling of boundary parameter values,
- hardware sharing with PWM clocksource driver,
- undefined state of PWM output after stopping PWM channel.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Tomasz Figa [Fri, 5 Apr 2013 23:08:03 +0000 (01:08 +0200)]
pwm: samsung: Rename to pwm-samsung-legacy
This patch renames the old pwm-samsung driver to pwm-samsung-legacy to
create place for the new, rewritten, DT-aware pwm-samsung driver.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Mark Brown <broonie@linaro.org>
Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Laurent Pinchart [Wed, 17 Jul 2013 22:54:22 +0000 (00:54 +0200)]
pwm: Use the DT macro directly when parsing PWM DT flags
Don't redefine a PWM_SPEC_POLARITY macro with a value identical to
PWM_POLARITY_INVERTED, use the PWM DT macro directly.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
H Hartley Sweeten [Tue, 11 Jun 2013 17:38:59 +0000 (10:38 -0700)]
pwm: Add sysfs interface
Add a simple sysfs interface to the generic PWM framework.
/sys/class/pwm/
`-- pwmchipN/ for each PWM chip
|-- export (w/o) ask the kernel to export a PWM channel
|-- npwm (r/o) number of PWM channels in this PWM chip
|-- pwmX/ for each exported PWM channel
| |-- duty_cycle (r/w) duty cycle (in nanoseconds)
| |-- enable (r/w) enable/disable PWM
| |-- period (r/w) period (in nanoseconds)
| `-- polarity (r/w) polarity of PWM (normal/inversed)
`-- unexport (w/o) return a PWM channel to the kernel
Based on work by Lars Poeschel.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Lars Poeschel <poeschel@lemonage.de>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Wolfram Sang [Mon, 3 Jun 2013 20:27:17 +0000 (22:27 +0200)]
pwm: devm: alloc correct pointer size
The allocated object should be the size of what the pointer is pointing
to and not the size of the pointer itself.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Lukasz Majewski [Wed, 9 Oct 2013 06:29:52 +0000 (08:29 +0200)]
thermal: exynos: Provide initial setting for TMU's test MUX address at Exynos4412
The commit
d0a0ce3e77c795258d47f9163e92d5031d0c5221 ("thermal: exynos: Add
missing definations and code cleanup") has removed setting of test MUX address
value at TMU configuration setting.
This field is not present on Exynos4210 and Exynos5 SoCs. However on Exynos4412
SoC it is required to set this field after reset because without it TMU shows
maximal available temperature, which causes immediate platform shutdown.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Lukasz Majewski [Wed, 9 Oct 2013 06:29:51 +0000 (08:29 +0200)]
thermal: exynos: Provide separate TMU data for Exynos4412
Up till now Exynos5250 and Exynos4412 had the same definitions for TMU
data. Following commit changes that, by introducing separate
exynos4412_default_tmu_data structure.
Since Exynos4412 was chronologically first, the corresponding name for
TMU registers and default data was renamed.
Additionally, new SOC_ARCH_EXYNOS4412 type has been defined.
Moreover, the SOC_ARCH_EXYNOS name has been changed to SOC_ARCH_EXYNOS5250.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Lukasz Majewski [Wed, 9 Oct 2013 06:29:50 +0000 (08:29 +0200)]
thermal: exynos: Remove check for thermal device pointer at exynos_report_trigger()
The commit
4de0bdaa9677d11406c9becb70c60887c957e1f0
("thermal: exynos: Add support for instance based register/unregister")
broke check for presence of therm_dev at global thermal zone in
exynos_report_trigger().
The resulting wrong test prevents thermal_zone_device_update() call, which
calls handlers for situation when trip points are passed.
Such behavior prevents thermal driver from proper reaction (when TMU interrupt
is raised) in a situation when overheating is detected at TMU hardware.
It turns out, that after exynos thermal subsystem redesign (at v3.12) this
check is not needed, since it is not possible to register thermal zone
without valid thermal device.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Jonghwa Lee [Mon, 4 Nov 2013 07:12:26 +0000 (16:12 +0900)]
Revert "thermal: exynos: Set MUX bits in tmu's control register to work correctly."
This reverts commit
e612d47f36eb9eb90ee88fd11addfe5aac8cdae4.
This will be suppported later with Lukasz's pathches.
Signed-off-by : Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Mon, 4 Nov 2013 05:23:22 +0000 (14:23 +0900)]
thermal: exynos: Set MUX bits in tmu's control register to work correctly.
Exynos 4x12 and 5250 need that MUX bits in control register is set to be
certain value at reset. Otherwise it'll reflect improper data when we
read current sensor's value. For other Exynos series, it doesn't need.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Bartlomiej Zolnierkiewicz [Mon, 4 Nov 2013 06:48:45 +0000 (15:48 +0900)]
thermal: EXYNOS: always register TMU driver with core thermal framework
There is little sense in having separate config option for
registering EXYNOS TMU driver with the core thermal framework.
Fix it by integrating EXYNOS_THERMAL_CORE config option with
EXYNOS_THERMAL one.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Fri, 1 Nov 2013 09:53:09 +0000 (18:53 +0900)]
Introduce CONFIG_ARCH_HAS_BANDGAP and ARCH_EXYNOS4/5 selects it.
CONFIG_ARCH_HAS_BANDGAP is used for tmu driver in thermal fw.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Fri, 1 Nov 2013 09:44:14 +0000 (18:44 +0900)]
thermal: Add ommitted codes from merging.
Add omitted codes from commits,
<commit-id
d9e6913d1> "drivers: thermal: add check when ~ ", and
<commit-id
efbf8d7a3> "thermal: thermal_core: allow binding with ~"
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:49 +0000 (16:20 +0530)]
Documentation: thermal: Explain the exynos thermal driver model
This patch updates the documentation to explain the driver model
and file layout.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Jonghwa Lee [Fri, 1 Nov 2013 08:32:40 +0000 (17:32 +0900)]
dts: Fix exynos4x12 dts file to get thermal sensor regualtor properly.
Fixes regulator consumer name from DT from 'vdd_ts' to 'vtmu' which
is used in Exynos tmu driver. And also enable tmu in all exynos4412 boards.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Eduardo Valentin [Thu, 15 Aug 2013 14:54:46 +0000 (10:54 -0400)]
drivers: thermal: add check when unregistering cpu cooling
This patch avoids NULL pointer accesses while unregistering
cpu cooling devices, in case a NULL pointer is received.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin [Tue, 16 Jul 2013 19:26:28 +0000 (15:26 -0400)]
thermal: thermal_core: allow binding with limits on bind_params
When registering a thermal zone device using platform information
via bind_params, the thermal framework will always perform the
cdev binding using the lowest and highest limits (THERMAL_NO_LIMIT).
This patch changes the data structures so that it is possible
to inform what are the desired limits for each trip point
inside a bind_param. The way the binding is performed is also
changed so that it uses the new data structure.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin [Thu, 15 Aug 2013 15:34:17 +0000 (11:34 -0400)]
drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional
When registering a new thermal_device, the thermal framework
will always add a hwmon sysfs interface.
This patch adds a flag to make this behavior optional. Now
when registering a new thermal device, the caller can
optionally inform if hwmon interface is desirable. This can
be done by means of passing a thermal_zone_params.no_hwmon == true.
In order to keep same behavior as of today, all current
calls will by default create the hwmon interface.
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-acpi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: Zhang Rui <rui.zhang@intel.com>
Suggested-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin [Fri, 23 Aug 2013 21:07:58 +0000 (17:07 -0400)]
drivers: thermal: parent virtual hwmon with thermal zone
When creating virtual hwmon devices based out of thermal
zone devices, the virtual devices won't have parents.
This patch changes the code so that the parent of virtual
hwmon devices is the thermal zone device that they are
based of.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin [Wed, 3 Jul 2013 19:14:28 +0000 (15:14 -0400)]
thermal: hwmon: move hwmon support to single file
In order to improve code organization, this patch
moves the hwmon sysfs support to a file named
thermal_hwmon. This helps to add extra support
for hwmon without scrambling the code.
In order to do this move, the hwmon list head is now
using its own locking. Before, the list used
the global thermal locking. Also, some minor changes
in the code were required, as recommended by checkpatch.pl.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Sachin Kamat [Mon, 19 Aug 2013 06:28:43 +0000 (11:58 +0530)]
thermal: exynos: Clean up non-DT remnants
Commit
1cd1ecb6 ("thermal: exynos: Remove non DT based support")
cleaned up some non-DT code. However, there were few more things
needed for complete cleanup to make this driver DT only.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Sachin Kamat [Mon, 19 Aug 2013 06:28:42 +0000 (11:58 +0530)]
thermal: exynos: Fix potential NULL pointer dereference
NULL pointer was being dereferenced in its own error message.
Changed it to the correct device pointer.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Sachin Kamat [Mon, 19 Aug 2013 06:28:41 +0000 (11:58 +0530)]
thermal: exynos: Fix typos in Kconfig
Fixes some trivial typos.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Ranganath Krishnan [Fri, 23 Aug 2013 16:08:23 +0000 (11:08 -0500)]
thermal: ti-soc-thermal: Ensure to compute thermal trend
Workaround to compute thermal trend even when update interval
is not set. This patch will ensure to compute the thermal trend
when bandgap counter delay is not set.
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Ranganath Krishnan [Fri, 23 Aug 2013 16:08:22 +0000 (11:08 -0500)]
thermal: ti-soc-thermal: Set the bandgap mask counter delay value
Set the bandgap mask counter_delay with the polling_delay value on
registering the thermal zone. This patch will ensure to get the
correct update interval for computing the thermal trend.
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Ranganath Krishnan [Fri, 23 Aug 2013 16:08:21 +0000 (11:08 -0500)]
thermal: ti-soc-thermal: Initialize counter_delay field for TI DRA752 sensors
Initialize MPU, GPU, CORE, DSPEVE and IVA thermal sensors of DRA752 bandgap
with the counter delay mask.
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Eduardo Valentin [Mon, 17 Jun 2013 13:24:24 +0000 (21:24 +0800)]
thermal: step_wise: return instance->target by default
In case the trend is not changing or when there is no
request for throttling, it is expected that the instance
would not change its requested target. This patch improves
the code implementation to cover for this expected behavior.
With current implementation, the instance will always
reset to cdev.cur_state, even in not expected cases,
like those mentioned above.
This patch changes the step_wise governor implementation
of get_target so that we accomplish:
(a) - default value will be current instance->target, so
we do not change the thermal instance target unnecessarily.
(b) - the code now it is clear about what is the intention.
There is a clear statement of what are the expected outcomes
(c) - removal of hardcoded constants, now it is put in use
the THERMAL_NO_TARGET macro.
(d) - variable names are also improved so that reader can
clearly understand the difference between instance cur target,
next target and cdev cur_state.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reported-by: Ruslan Ruslichenko <ruslan.ruslichenko@ti.com>
Signed-of-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Shawn Guo [Mon, 17 Jun 2013 13:24:23 +0000 (21:24 +0800)]
thermal: step_wise: cdev only needs update on a new target state
The cooling device only needs update on a new target state. Since we
already check old target in thermal_zone_trip_update(), we can do one
more check to see if it's a new target state. If not, we can reasonably
save some uncecesary code execution.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Lan Tianyu [Tue, 13 Aug 2013 02:07:28 +0000 (10:07 +0800)]
Thermal/cpu_cooling: Return directly for the cpu out of allowed_cpus in the cpufreq_thermal_notifier()
cpufreq_thermal_notifier() is to change the cpu's cpufreq in the allowed_cpus mask
when associated thermal-cpufreq cdev's cooling state is changed. It's a cpufreq policy
notifier handler and it will be triggered even if those cpus out of allowed_cpus has
changed freq policy.
cpufreq_thermal_notifier() checks the policy->cpu. If it belongs to allowed_cpus,
change max_freq(default to 0) to the desire cpufreq value and pass 0 and max_freq
to cpufreq_verify_within_limits() as cpufreq scope. But if not, do nothing and
max_freq will remain 0. This will cause the cpufreq scope to become 0~0. This
is not right. This patch is to return directly after finding cpu not belonging
to allowed_cpus.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Naveen Krishna Chatradhi [Wed, 7 Aug 2013 08:31:09 +0000 (14:01 +0530)]
thermal: exynos_tmu: fix wrong error check for mapped memory
The error check is checking for a "base" mapped memory base
instead of "base_common". Fixing the same.
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Philipp Zabel [Thu, 1 Aug 2013 16:33:12 +0000 (18:33 +0200)]
thermal: imx: implement thermal alarm interrupt handling
Enable automatic measurements at 10 Hz and use the alarm interrupt to react
more quickly to sudden temperature changes above the passive or critical
temperature trip points.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Philipp Zabel [Thu, 1 Aug 2013 16:33:11 +0000 (18:33 +0200)]
thermal: imx: dynamic passive and SoC specific critical trip points
Set passive and critical trip point values depending on the maximum die
temperature stored in the OCOTP fuses. This allows higher trip points
for industrial and automotive rated i.MX6 SoCs.
Also allow to configure the passive trip point from userspace.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:47 +0000 (16:20 +0530)]
thermal: exynos: Support for TMU regulator defined at device tree
TMU probe function now checks for a device tree defined regulator.
For compatibility reasons it is allowed to probe driver even without
this regulator defined.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:46 +0000 (16:20 +0530)]
thermal: exynos: Add hardware mode thermal calibration support
This patch adds support for h/w mode calibration in the TMU controller.
Soc's like 5440 support this features. The h/w bits needed for calibration
setting are same as that of enum calibration_type.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:45 +0000 (16:20 +0530)]
thermal: exynos: Fix to set the second point correction value
This patch sets the second point trimming value according to the platform
data if the register value is 0.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:44 +0000 (16:20 +0530)]
thermal: exynos: Add thermal configuration data for exynos5440 TMU sensor
This patch adds configuration data for exynos5440 soc. Also register
definations for the controller are added.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:43 +0000 (16:20 +0530)]
thermal: exynos: Add driver support for exynos5440 TMU sensor
This patch modifies TMU controller to add changes needed to work with
exynos5440 platform. This sensor registers 3 instance of the tmu controller
with the thermal zone and hence reports 3 temperature output. This controller
supports upto five trip points. For critical threshold the driver uses the
core driver thermal framework for shutdown.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jungseok Lee <jays.lee@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:42 +0000 (16:20 +0530)]
thermal: exynos: Add support to access common register for multistance
This patch adds support to parse one more common set of TMU register. First
set of register belongs to each instance of TMU and second set belongs to
common TMU registers.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Tue, 25 Jun 2013 11:41:42 +0000 (17:11 +0530)]
thermal: exynos: use device resource management infrastructure
This patch uses the device pointer stored in the configuration structure
and converts to dev_* prints and devm API's.
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:40 +0000 (16:20 +0530)]
thermal: exynos: Add TMU features to check instead of using SOC type
This patch adds several features supported by TMU as bitfields.
This features varies across different SOC type and comparing
the features present in the TMU is more logical than comparing
the soc itself.
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:39 +0000 (16:20 +0530)]
thermal: exynos: Add support to handle many instances of TMU
This patch adds support to handle multiple instances of the TMU controllers.
This is done by removing the static structure to register with the core thermal
and creating it dynamically for each instance of the TMU controller. The
interrupt is made shared type to handle shared interrupts. Now since the ISR needs
the core thermal framework to be registered so request_irq is moved after the core
registration is done.
Also the identifier of the TMU controller is extracted from device tree alias. This
will be used for TMU specific initialisation.
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:38 +0000 (16:20 +0530)]
thermal: exynos: Remove non DT based support
Recently non DT support from Exynos platform is removed and hence
removing non DT support from the driver also. This will help in easy
maintainence.
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:37 +0000 (16:20 +0530)]
thermal: exynos: Make the zone handling use trip information
This code simplifies the zone handling to use the trip information passed
by the TMU driver and not the hardcoded macros. This also helps in adding
more zone support.
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Amit Daniel Kachhap [Mon, 24 Jun 2013 10:50:36 +0000 (16:20 +0530)]
thermal: exynos: Return success even if no cooling data supplied
This patch removes the error return in the bind/unbind routine
as the platform may not register any cpufreq cooling data.
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>