STi defconfig updates for v3.17

Highlights:
 -----------
  - Enable ST's Thermal controller driver
  - Enable ST's Keyscan driver
  - Enable ST's MiPHY365 Phy driver for STiH416 SATA & PCIe
  - Enable ST's AHCI driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTzk/SAAoJEMo4jShGhw+J3DsP/Av4g9HXeFGtBaL0yX2Ao01H
 zXOV7K4t8/pwRxty/BT4XDRboMO6ZFKVl+5m+DQbddfi9sj+NiZqBv3P1SJwO0gt
 MYnntobWUXw7XzgYEoN9alt0KLHo6fQIRUuLF0H8WzzttuaUqN1ev/NujFR5BXOt
 MHM1PLxUKuLkloF1sh3YyN4+sxMOwILXNIRFs9uTK13eI596/QEjiBbqlOfR34OA
 jAI0aSWKdupNjv8eX3bkY2pYpKRg+fKBPfuwa2VKd+xW5d5zGGXGk5iRvPdmNue/
 pyy59wIjmncyIZr+PfJt6tXUSf8zrB17uUnezdbu7b647Des5b2O0sewWzSx+ajY
 ZdBh6tp2YzxVgyq1EG0cnUFsqXQLsHWuYdYBlg8PkDZyFLBNJA1o6Z/UNZclaE9Y
 /oqpkoSSDzgecVkROTIcHqp5fIgUNEUe085Fgs71jNGE7SxsLMvkIgTcir+7Ebad
 C0GmInnG/3EfU2VSQU/ZA1lvrOqsSNnsv0kXVRJLkacHDIuBd88ooVB3vsvq5AVc
 gWLs+fN4RQm/rFiLnIq39xOQwMrT8f4LnxoLb0obbAPA2oJl5cEBe92uuulAA2Qb
 7ZaR9SNdDL+SQSLIc91HKhMoZYeNqbRSdBRUF73jcRRR6iPGih6k0kMZ+/TngcZ1
 3qBF2J9/pIs/BsJV3cur
 =Q09M
 -----END PGP SIGNATURE-----

Merge tag 'sti-defconfig-for-v3.17-1' of git://git.stlinux.com/devel/kernel/linux-sti into next/defconfig

Merge "ARM: STi: defconfig changes for v3.17" from Maxime Coquelin:

STi defconfig updates for v3.17

 - Enable ST's Thermal controller driver
 - Enable ST's Keyscan driver
 - Enable ST's MiPHY365 Phy driver for STiH416 SATA & PCIe
 - Enable ST's AHCI driver.

* tag 'sti-defconfig-for-v3.17-1' of git://git.stlinux.com/devel/kernel/linux-sti:
  ARM: multi_v7_defconfig: Enable MiPHY365x - ST's Generic (SATA & PCIe) PHY
  ARM: multi_v7_defconfig: Enable ST's (S)ATA driver
  ARM: multi_v7_defconfig: add ST Keyscan driver
  ARM: update multi_v7_defconfig for STI
  ARM: multi_v7_defconfig: Configure in ST's Thermal Controller
  + Linux 3.16-rc6

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2014-07-22 09:17:18 -07:00
commit e9a86d96be
583 changed files with 5131 additions and 2704 deletions

View File

@ -280,12 +280,9 @@ that is possible.
mcelog mcelog
------ ------
In Linux 2.6.31+ the i386 kernel needs to run the mcelog utility On x86 kernels the mcelog utility is needed to process and log machine check
as a regular cronjob similar to the x86-64 kernel to process and log events when CONFIG_X86_MCE is enabled. Machine check events are errors reported
machine check events when CONFIG_X86_NEW_MCE is enabled. Machine check by the CPU. Processing them is strongly encouraged.
events are errors reported by the CPU. Processing them is strongly encouraged.
All x86-64 kernels since 2.6.4 require the mcelog utility to
process machine checks.
Getting updated software Getting updated software
======================== ========================

View File

@ -708,7 +708,7 @@ hardware level details could be very different.
<para>Systems need specialized hardware support to implement OTG, <para>Systems need specialized hardware support to implement OTG,
notably including a special <emphasis>Mini-AB</emphasis> jack notably including a special <emphasis>Mini-AB</emphasis> jack
and associated transciever to support <emphasis>Dual-Role</emphasis> and associated transceiver to support <emphasis>Dual-Role</emphasis>
operation: operation:
they can act either as a host, using the standard they can act either as a host, using the standard
Linux-USB host side driver stack, Linux-USB host side driver stack,

View File

@ -182,7 +182,7 @@
<para> <para>
Each interrupt is described by an interrupt descriptor structure Each interrupt is described by an interrupt descriptor structure
irq_desc. The interrupt is referenced by an 'unsigned int' numeric irq_desc. The interrupt is referenced by an 'unsigned int' numeric
value which selects the corresponding interrupt decription structure value which selects the corresponding interrupt description structure
in the descriptor structures array. in the descriptor structures array.
The descriptor structure contains status information and pointers The descriptor structure contains status information and pointers
to the interrupt flow method and the interrupt chip structure to the interrupt flow method and the interrupt chip structure
@ -470,7 +470,7 @@ if (desc->irq_data.chip->irq_eoi)
<para> <para>
To avoid copies of identical implementations of IRQ chips the To avoid copies of identical implementations of IRQ chips the
core provides a configurable generic interrupt chip core provides a configurable generic interrupt chip
implementation. Developers should check carefuly whether the implementation. Developers should check carefully whether the
generic chip fits their needs before implementing the same generic chip fits their needs before implementing the same
functionality slightly differently themselves. functionality slightly differently themselves.
</para> </para>

View File

@ -1760,7 +1760,7 @@ as it would be on UP.
</para> </para>
<para> <para>
There is a furthur optimization possible here: remember our original There is a further optimization possible here: remember our original
cache code, where there were no reference counts and the caller simply cache code, where there were no reference counts and the caller simply
held the lock whenever using the object? This is still possible: if held the lock whenever using the object? This is still possible: if
you hold the lock, no one can delete the object, so you don't need to you hold the lock, no one can delete the object, so you don't need to

View File

@ -677,7 +677,7 @@ and other resources, etc.
<listitem> <listitem>
<para> <para>
ATA_QCFLAG_ACTIVE is clared from qc->flags. ATA_QCFLAG_ACTIVE is cleared from qc->flags.
</para> </para>
</listitem> </listitem>
@ -708,7 +708,7 @@ and other resources, etc.
<listitem> <listitem>
<para> <para>
qc->waiting is claread &amp; completed (in that order). qc->waiting is cleared &amp; completed (in that order).
</para> </para>
</listitem> </listitem>
@ -1163,7 +1163,7 @@ and other resources, etc.
<para> <para>
Once sense data is acquired, this type of errors can be Once sense data is acquired, this type of errors can be
handled similary to other SCSI errors. Note that sense data handled similarly to other SCSI errors. Note that sense data
may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR
&amp;&amp; ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such &amp;&amp; ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such
cases, the error should be considered as an ATA bus error and cases, the error should be considered as an ATA bus error and

View File

@ -68,7 +68,7 @@
several digital tv standards. While it is called as DVB API, several digital tv standards. While it is called as DVB API,
in fact it covers several different video standards including in fact it covers several different video standards including
DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated
to documment support also for DVB-S2, ISDB-T and ISDB-S.</para> to document support also for DVB-S2, ISDB-T and ISDB-S.</para>
<para>The third part covers the Remote Controller API.</para> <para>The third part covers the Remote Controller API.</para>
<para>The fourth part covers the Media Controller API.</para> <para>The fourth part covers the Media Controller API.</para>
<para>For additional information and for the latest development code, <para>For additional information and for the latest development code,

View File

@ -91,7 +91,7 @@
<listitem><para> <listitem><para>
[MTD Interface]</para><para> [MTD Interface]</para><para>
These functions provide the interface to the MTD kernel API. These functions provide the interface to the MTD kernel API.
They are not replacable and provide functionality They are not replaceable and provide functionality
which is complete hardware independent. which is complete hardware independent.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
@ -100,14 +100,14 @@
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
[GENERIC]</para><para> [GENERIC]</para><para>
Generic functions are not replacable and provide functionality Generic functions are not replaceable and provide functionality
which is complete hardware independent. which is complete hardware independent.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
[DEFAULT]</para><para> [DEFAULT]</para><para>
Default functions provide hardware related functionality which is suitable Default functions provide hardware related functionality which is suitable
for most of the implementations. These functions can be replaced by the for most of the implementations. These functions can be replaced by the
board driver if neccecary. Those functions are called via pointers in the board driver if necessary. Those functions are called via pointers in the
NAND chip description structure. The board driver can set the functions which NAND chip description structure. The board driver can set the functions which
should be replaced by board dependent functions before calling nand_scan(). should be replaced by board dependent functions before calling nand_scan().
If the function pointer is NULL on entry to nand_scan() then the pointer If the function pointer is NULL on entry to nand_scan() then the pointer
@ -264,7 +264,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
is set up nand_scan() is called. This function tries to is set up nand_scan() is called. This function tries to
detect and identify then chip. If a chip is found all the detect and identify then chip. If a chip is found all the
internal data fields are initialized accordingly. internal data fields are initialized accordingly.
The structure(s) have to be zeroed out first and then filled with the neccecary The structure(s) have to be zeroed out first and then filled with the necessary
information about the device. information about the device.
</para> </para>
<programlisting> <programlisting>
@ -327,7 +327,7 @@ module_init(board_init);
<sect1 id="Exit_function"> <sect1 id="Exit_function">
<title>Exit function</title> <title>Exit function</title>
<para> <para>
The exit function is only neccecary if the driver is The exit function is only necessary if the driver is
compiled as a module. It releases all resources which compiled as a module. It releases all resources which
are held by the chip driver and unregisters the partitions are held by the chip driver and unregisters the partitions
in the MTD layer. in the MTD layer.
@ -494,7 +494,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
in this case. See rts_from4.c and diskonchip.c for in this case. See rts_from4.c and diskonchip.c for
implementation reference. In those cases we must also implementation reference. In those cases we must also
use bad block tables on FLASH, because the ECC layout is use bad block tables on FLASH, because the ECC layout is
interferring with the bad block marker positions. interfering with the bad block marker positions.
See bad block table support for details. See bad block table support for details.
</para> </para>
</sect2> </sect2>
@ -542,7 +542,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<para> <para>
nand_scan() calls the function nand_default_bbt(). nand_scan() calls the function nand_default_bbt().
nand_default_bbt() selects appropriate default nand_default_bbt() selects appropriate default
bad block table desriptors depending on the chip information bad block table descriptors depending on the chip information
which was retrieved by nand_scan(). which was retrieved by nand_scan().
</para> </para>
<para> <para>
@ -554,7 +554,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<sect2 id="Flash_based_tables"> <sect2 id="Flash_based_tables">
<title>Flash based tables</title> <title>Flash based tables</title>
<para> <para>
It may be desired or neccecary to keep a bad block table in FLASH. It may be desired or necessary to keep a bad block table in FLASH.
For AG-AND chips this is mandatory, as they have no factory marked For AG-AND chips this is mandatory, as they have no factory marked
bad blocks. They have factory marked good blocks. The marker pattern bad blocks. They have factory marked good blocks. The marker pattern
is erased when the block is erased to be reused. So in case of is erased when the block is erased to be reused. So in case of
@ -565,10 +565,10 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
of the blocks. of the blocks.
</para> </para>
<para> <para>
The blocks in which the tables are stored are procteted against The blocks in which the tables are stored are protected against
accidental access by marking them bad in the memory bad block accidental access by marking them bad in the memory bad block
table. The bad block table management functions are allowed table. The bad block table management functions are allowed
to circumvernt this protection. to circumvent this protection.
</para> </para>
<para> <para>
The simplest way to activate the FLASH based bad block table support The simplest way to activate the FLASH based bad block table support
@ -592,7 +592,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
User defined tables are created by filling out a User defined tables are created by filling out a
nand_bbt_descr structure and storing the pointer in the nand_bbt_descr structure and storing the pointer in the
nand_chip structure member bbt_td before calling nand_scan(). nand_chip structure member bbt_td before calling nand_scan().
If a mirror table is neccecary a second structure must be If a mirror table is necessary a second structure must be
created and a pointer to this structure must be stored created and a pointer to this structure must be stored
in bbt_md inside the nand_chip structure. If the bbt_md in bbt_md inside the nand_chip structure. If the bbt_md
member is set to NULL then only the main table is used member is set to NULL then only the main table is used
@ -666,7 +666,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
<para> <para>
For automatic placement some blocks must be reserved for For automatic placement some blocks must be reserved for
bad block table storage. The number of reserved blocks is defined bad block table storage. The number of reserved blocks is defined
in the maxblocks member of the babd block table description structure. in the maxblocks member of the bad block table description structure.
Reserving 4 blocks for mirrored tables should be a reasonable number. Reserving 4 blocks for mirrored tables should be a reasonable number.
This also limits the number of blocks which are scanned for the bad This also limits the number of blocks which are scanned for the bad
block table ident pattern. block table ident pattern.
@ -1068,11 +1068,11 @@ in this page</entry>
<chapter id="filesystems"> <chapter id="filesystems">
<title>Filesystem support</title> <title>Filesystem support</title>
<para> <para>
The NAND driver provides all neccecary functions for a The NAND driver provides all necessary functions for a
filesystem via the MTD interface. filesystem via the MTD interface.
</para> </para>
<para> <para>
Filesystems must be aware of the NAND pecularities and Filesystems must be aware of the NAND peculiarities and
restrictions. One major restrictions of NAND Flash is, that you cannot restrictions. One major restrictions of NAND Flash is, that you cannot
write as often as you want to a page. The consecutive writes to a page, write as often as you want to a page. The consecutive writes to a page,
before erasing it again, are restricted to 1-3 writes, depending on the before erasing it again, are restricted to 1-3 writes, depending on the
@ -1222,7 +1222,7 @@ in this page</entry>
#define NAND_BBT_VERSION 0x00000100 #define NAND_BBT_VERSION 0x00000100
/* Create a bbt if none axists */ /* Create a bbt if none axists */
#define NAND_BBT_CREATE 0x00000200 #define NAND_BBT_CREATE 0x00000200
/* Write bbt if neccecary */ /* Write bbt if necessary */
#define NAND_BBT_WRITE 0x00001000 #define NAND_BBT_WRITE 0x00001000
/* Read and write back block contents when writing bbt */ /* Read and write back block contents when writing bbt */
#define NAND_BBT_SAVECONTENT 0x00002000 #define NAND_BBT_SAVECONTENT 0x00002000

View File

@ -155,7 +155,7 @@
release regulators. Functions are release regulators. Functions are
provided to <link linkend='API-regulator-enable'>enable</link> provided to <link linkend='API-regulator-enable'>enable</link>
and <link linkend='API-regulator-disable'>disable</link> the and <link linkend='API-regulator-disable'>disable</link> the
reguator and to get and set the runtime parameters of the regulator and to get and set the runtime parameters of the
regulator. regulator.
</para> </para>
<para> <para>

View File

@ -766,10 +766,10 @@ framework to set up sysfs files for this region. Simply leave it alone.
<para> <para>
The dynamic memory regions will be allocated when the UIO device file, The dynamic memory regions will be allocated when the UIO device file,
<varname>/dev/uioX</varname> is opened. <varname>/dev/uioX</varname> is opened.
Simiar to static memory resources, the memory region information for Similar to static memory resources, the memory region information for
dynamic regions is then visible via sysfs at dynamic regions is then visible via sysfs at
<varname>/sys/class/uio/uioX/maps/mapY/*</varname>. <varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
The dynmaic memory regions will be freed when the UIO device file is The dynamic memory regions will be freed when the UIO device file is
closed. When no processes are holding the device file open, the address closed. When no processes are holding the device file open, the address
returned to userspace is ~0. returned to userspace is ~0.
</para> </para>

View File

@ -153,7 +153,7 @@
<listitem><para>The Linux USB API supports synchronous calls for <listitem><para>The Linux USB API supports synchronous calls for
control and bulk messages. control and bulk messages.
It also supports asynchnous calls for all kinds of data transfer, It also supports asynchronous calls for all kinds of data transfer,
using request structures called "URBs" (USB Request Blocks). using request structures called "URBs" (USB Request Blocks).
</para></listitem> </para></listitem>

View File

@ -5696,7 +5696,7 @@ struct _snd_pcm_runtime {
suspending the PCM operations via suspending the PCM operations via
<function>snd_pcm_suspend_all()</function> or <function>snd_pcm_suspend_all()</function> or
<function>snd_pcm_suspend()</function>. It means that the PCM <function>snd_pcm_suspend()</function>. It means that the PCM
streams are already stoppped when the register snapshot is streams are already stopped when the register snapshot is
taken. But, remember that you don't have to restart the PCM taken. But, remember that you don't have to restart the PCM
stream in the resume callback. It'll be restarted via stream in the resume callback. It'll be restarted via
trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant> trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant>

View File

@ -60,12 +60,6 @@ If the driver needs to perform more complex initialization like getting and
configuring GPIOs it can get its ACPI handle and extract this information configuring GPIOs it can get its ACPI handle and extract this information
from ACPI tables. from ACPI tables.
Currently the kernel is not able to automatically determine from which ACPI
device it should make the corresponding platform device so we need to add
the ACPI device explicitly to acpi_platform_device_ids list defined in
drivers/acpi/acpi_platform.c. This limitation is only for the platform
devices, SPI and I2C devices are created automatically as described below.
DMA support DMA support
~~~~~~~~~~~ ~~~~~~~~~~~
DMA controllers enumerated via ACPI should be registered in the system to DMA controllers enumerated via ACPI should be registered in the system to

View File

@ -15,10 +15,13 @@ New sysfs files for controlling P state selection have been added to
/sys/devices/system/cpu/intel_pstate/ /sys/devices/system/cpu/intel_pstate/
max_perf_pct: limits the maximum P state that will be requested by max_perf_pct: limits the maximum P state that will be requested by
the driver stated as a percentage of the available performance. the driver stated as a percentage of the available performance. The
available (P states) performance may be reduced by the no_turbo
setting described below.
min_perf_pct: limits the minimum P state that will be requested by min_perf_pct: limits the minimum P state that will be requested by
the driver stated as a percentage of the available performance. the driver stated as a percentage of the max (non-turbo)
performance level.
no_turbo: limits the driver to selecting P states below the turbo no_turbo: limits the driver to selecting P states below the turbo
frequency range. frequency range.

View File

@ -9,6 +9,18 @@ Required Properties:
- reg: physical base address of the controller and length of memory mapped - reg: physical base address of the controller and length of memory mapped
region. region.
Optional Properties:
- clocks: List of clock handles. The parent clocks of the input clocks to the
devices in this power domain are set to oscclk before power gating
and restored back after powering on a domain. This is required for
all domains which are powered on and off and not required for unused
domains.
- clock-names: The following clocks can be specified:
- oscclk: Oscillator clock.
- pclkN, clkN: Pairs of parent of input clock and input clock to the
devices in this power domain. Maximum of 4 pairs (N = 0 to 3)
are supported currently.
Node of a device using power domains must have a samsung,power-domain property Node of a device using power domains must have a samsung,power-domain property
defined with a phandle to respective power domain. defined with a phandle to respective power domain.
@ -19,6 +31,14 @@ Example:
reg = <0x10023C00 0x10>; reg = <0x10023C00 0x10>;
}; };
mfc_pd: power-domain@10044060 {
compatible = "samsung,exynos4210-pd";
reg = <0x10044060 0x20>;
clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>,
<&clock CLK_MOUT_USER_ACLK333>;
clock-names = "oscclk", "pclk0", "clk0";
};
Example of the node using power domain: Example of the node using power domain:
node { node {

View File

@ -8,10 +8,12 @@ Both required and optional properties listed below must be defined
under node /cpus/cpu@0. under node /cpus/cpu@0.
Required properties: Required properties:
- operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt - None
for details
Optional properties: Optional properties:
- operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt for
details. OPPs *must* be supplied either via DT, i.e. this property, or
populated at runtime.
- clock-latency: Specify the possible maximum transition latency for clock, - clock-latency: Specify the possible maximum transition latency for clock,
in unit of nanoseconds. in unit of nanoseconds.
- voltage-tolerance: Specify the CPU voltage tolerance in percentage. - voltage-tolerance: Specify the CPU voltage tolerance in percentage.

View File

@ -4,6 +4,13 @@ Required properties:
- compatible: Must contain one of the following: - compatible: Must contain one of the following:
- "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
- "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
- "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
- "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
- "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
- "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.
- "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
- "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
- "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART. - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
- "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART. - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.

View File

@ -2790,6 +2790,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
leaf rcu_node structure. Useful for very large leaf rcu_node structure. Useful for very large
systems. systems.
rcutree.jiffies_till_sched_qs= [KNL]
Set required age in jiffies for a
given grace period before RCU starts
soliciting quiescent-state help from
rcu_note_context_switch().
rcutree.jiffies_till_first_fqs= [KNL] rcutree.jiffies_till_first_fqs= [KNL]
Set delay from grace-period initialization to Set delay from grace-period initialization to
first attempt to force quiescent states. first attempt to force quiescent states.
@ -3526,7 +3532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
the allocated input device; If set to 0, video driver the allocated input device; If set to 0, video driver
will only send out the event without touching backlight will only send out the event without touching backlight
brightness level. brightness level.
default: 0 default: 1
virtio_mmio.device= virtio_mmio.device=
[VMMIO] Memory mapped virtio (platform) device. [VMMIO] Memory mapped virtio (platform) device.

View File

@ -8,8 +8,8 @@ disk-shock-protection.txt
- information on hard disk shock protection. - information on hard disk shock protection.
dslm.c dslm.c
- Simple Disk Sleep Monitor program - Simple Disk Sleep Monitor program
hpfall.c freefall.c
- (HP) laptop accelerometer program for disk protection. - (HP/DELL) laptop accelerometer program for disk protection.
laptop-mode.txt laptop-mode.txt
- how to conserve battery power using laptop-mode. - how to conserve battery power using laptop-mode.
sony-laptop.txt sony-laptop.txt

View File

@ -1,7 +1,9 @@
/* Disk protection for HP machines. /* Disk protection for HP/DELL machines.
* *
* Copyright 2008 Eric Piel * Copyright 2008 Eric Piel
* Copyright 2009 Pavel Machek <pavel@ucw.cz> * Copyright 2009 Pavel Machek <pavel@ucw.cz>
* Copyright 2012 Sonal Santan
* Copyright 2014 Pali Rohár <pali.rohar@gmail.com>
* *
* GPLv2. * GPLv2.
*/ */
@ -18,24 +20,31 @@
#include <signal.h> #include <signal.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sched.h> #include <sched.h>
#include <syslog.h>
char unload_heads_path[64]; static int noled;
static char unload_heads_path[64];
static char device_path[32];
static const char app_name[] = "FREE FALL";
int set_unload_heads_path(char *device) static int set_unload_heads_path(char *device)
{ {
char devname[64]; char devname[64];
if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
return -EINVAL; return -EINVAL;
strncpy(devname, device + 5, sizeof(devname)); strncpy(devname, device + 5, sizeof(devname) - 1);
strncpy(device_path, device, sizeof(device_path) - 1);
snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,
"/sys/block/%s/device/unload_heads", devname); "/sys/block/%s/device/unload_heads", devname);
return 0; return 0;
} }
int valid_disk(void)
static int valid_disk(void)
{ {
int fd = open(unload_heads_path, O_RDONLY); int fd = open(unload_heads_path, O_RDONLY);
if (fd < 0) { if (fd < 0) {
perror(unload_heads_path); perror(unload_heads_path);
return 0; return 0;
@ -45,43 +54,54 @@ int valid_disk(void)
return 1; return 1;
} }
void write_int(char *path, int i) static void write_int(char *path, int i)
{ {
char buf[1024]; char buf[1024];
int fd = open(path, O_RDWR); int fd = open(path, O_RDWR);
if (fd < 0) { if (fd < 0) {
perror("open"); perror("open");
exit(1); exit(1);
} }
sprintf(buf, "%d", i); sprintf(buf, "%d", i);
if (write(fd, buf, strlen(buf)) != strlen(buf)) { if (write(fd, buf, strlen(buf)) != strlen(buf)) {
perror("write"); perror("write");
exit(1); exit(1);
} }
close(fd); close(fd);
} }
void set_led(int on) static void set_led(int on)
{ {
if (noled)
return;
write_int("/sys/class/leds/hp::hddprotect/brightness", on); write_int("/sys/class/leds/hp::hddprotect/brightness", on);
} }
void protect(int seconds) static void protect(int seconds)
{ {
const char *str = (seconds == 0) ? "Unparked" : "Parked";
write_int(unload_heads_path, seconds*1000); write_int(unload_heads_path, seconds*1000);
syslog(LOG_INFO, "%s %s disk head\n", str, device_path);
} }
int on_ac(void) static int on_ac(void)
{ {
// /sys/class/power_supply/AC0/online /* /sys/class/power_supply/AC0/online */
return 1;
} }
int lid_open(void) static int lid_open(void)
{ {
// /proc/acpi/button/lid/LID/state /* /proc/acpi/button/lid/LID/state */
return 1;
} }
void ignore_me(void) static void ignore_me(int signum)
{ {
protect(0); protect(0);
set_led(0); set_led(0);
@ -90,6 +110,7 @@ void ignore_me(void)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int fd, ret; int fd, ret;
struct stat st;
struct sched_param param; struct sched_param param;
if (argc == 1) if (argc == 1)
@ -111,7 +132,16 @@ int main(int argc, char **argv)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
daemon(0, 0); if (stat("/sys/class/leds/hp::hddprotect/brightness", &st))
noled = 1;
if (daemon(0, 0) != 0) {
perror("daemon");
return EXIT_FAILURE;
}
openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
param.sched_priority = sched_get_priority_max(SCHED_FIFO); param.sched_priority = sched_get_priority_max(SCHED_FIFO);
sched_setscheduler(0, SCHED_FIFO, &param); sched_setscheduler(0, SCHED_FIFO, &param);
mlockall(MCL_CURRENT|MCL_FUTURE); mlockall(MCL_CURRENT|MCL_FUTURE);
@ -141,6 +171,7 @@ int main(int argc, char **argv)
alarm(20); alarm(20);
} }
closelog();
close(fd); close(fd);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

View File

@ -47,7 +47,6 @@ use constant HIGH_KSWAPD_REWAKEUP => 21;
use constant HIGH_NR_SCANNED => 22; use constant HIGH_NR_SCANNED => 22;
use constant HIGH_NR_TAKEN => 23; use constant HIGH_NR_TAKEN => 23;
use constant HIGH_NR_RECLAIMED => 24; use constant HIGH_NR_RECLAIMED => 24;
use constant HIGH_NR_CONTIG_DIRTY => 25;
my %perprocesspid; my %perprocesspid;
my %perprocess; my %perprocess;
@ -105,7 +104,7 @@ my $regex_direct_end_default = 'nr_reclaimed=([0-9]*)';
my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)';
my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; my $regex_kswapd_sleep_default = 'nid=([0-9]*)';
my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)'; my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)';
my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) contig_taken=([0-9]*) contig_dirty=([0-9]*) contig_failed=([0-9]*)'; my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) file=([0-9]*)';
my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) zid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)'; my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) zid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)';
my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)'; my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)';
my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)';
@ -200,7 +199,7 @@ $regex_lru_isolate = generate_traceevent_regex(
$regex_lru_isolate_default, $regex_lru_isolate_default,
"isolate_mode", "order", "isolate_mode", "order",
"nr_requested", "nr_scanned", "nr_taken", "nr_requested", "nr_scanned", "nr_taken",
"contig_taken", "contig_dirty", "contig_failed"); "file");
$regex_lru_shrink_inactive = generate_traceevent_regex( $regex_lru_shrink_inactive = generate_traceevent_regex(
"vmscan/mm_vmscan_lru_shrink_inactive", "vmscan/mm_vmscan_lru_shrink_inactive",
$regex_lru_shrink_inactive_default, $regex_lru_shrink_inactive_default,
@ -375,7 +374,6 @@ EVENT_PROCESS:
} }
my $isolate_mode = $1; my $isolate_mode = $1;
my $nr_scanned = $4; my $nr_scanned = $4;
my $nr_contig_dirty = $7;
# To closer match vmstat scanning statistics, only count isolate_both # To closer match vmstat scanning statistics, only count isolate_both
# and isolate_inactive as scanning. isolate_active is rotation # and isolate_inactive as scanning. isolate_active is rotation
@ -385,7 +383,6 @@ EVENT_PROCESS:
if ($isolate_mode != 2) { if ($isolate_mode != 2) {
$perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
} }
$perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
} elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
$details = $6; $details = $6;
if ($details !~ /$regex_lru_shrink_inactive/o) { if ($details !~ /$regex_lru_shrink_inactive/o) {
@ -539,13 +536,6 @@ sub dump_stats {
} }
} }
} }
if ($stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY}) {
print " ";
my $count = $stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY};
if ($count != 0) {
print "contig-dirty=$count ";
}
}
print "\n"; print "\n";
} }

View File

@ -156,7 +156,6 @@ F: drivers/net/hamradio/6pack.c
8169 10/100/1000 GIGABIT ETHERNET DRIVER 8169 10/100/1000 GIGABIT ETHERNET DRIVER
M: Realtek linux nic maintainers <nic_swsd@realtek.com> M: Realtek linux nic maintainers <nic_swsd@realtek.com>
M: Francois Romieu <romieu@fr.zoreil.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: drivers/net/ethernet/realtek/r8169.c F: drivers/net/ethernet/realtek/r8169.c
@ -943,16 +942,10 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
F: arch/arm/mach-imx/ F: arch/arm/mach-imx/
F: arch/arm/mach-mxs/
F: arch/arm/boot/dts/imx* F: arch/arm/boot/dts/imx*
F: arch/arm/configs/imx*_defconfig F: arch/arm/configs/imx*_defconfig
ARM/FREESCALE MXS ARM ARCHITECTURE
M: Shawn Guo <shawn.guo@linaro.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
T: git git://git.linaro.org/people/shawnguo/linux-2.6.git
F: arch/arm/mach-mxs/
ARM/GLOMATION GESBC9312SX MACHINE SUPPORT ARM/GLOMATION GESBC9312SX MACHINE SUPPORT
M: Lennert Buytenhek <kernel@wantstofly.org> M: Lennert Buytenhek <kernel@wantstofly.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@ -1052,9 +1045,33 @@ M: Santosh Shilimkar <santosh.shilimkar@ti.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
F: arch/arm/mach-keystone/ F: arch/arm/mach-keystone/
F: drivers/clk/keystone/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git
ARM/TEXAS INSTRUMENT KEYSTONE CLOCK FRAMEWORK
M: Santosh Shilimkar <santosh.shilimkar@ti.com>
L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/clk/keystone/
ARM/TEXAS INSTRUMENT KEYSTONE ClOCKSOURCE
M: Santosh Shilimkar <santosh.shilimkar@ti.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/clocksource/timer-keystone.c
ARM/TEXAS INSTRUMENT KEYSTONE RESET DRIVER
M: Santosh Shilimkar <santosh.shilimkar@ti.com>
L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/power/reset/keystone-reset.c
ARM/TEXAS INSTRUMENT AEMIF/EMIF DRIVERS
M: Santosh Shilimkar <santosh.shilimkar@ti.com>
L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/memory/*emif*
ARM/LOGICPD PXA270 MACHINE SUPPORT ARM/LOGICPD PXA270 MACHINE SUPPORT
M: Lennert Buytenhek <kernel@wantstofly.org> M: Lennert Buytenhek <kernel@wantstofly.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@ -1296,6 +1313,20 @@ W: http://oss.renesas.com
Q: http://patchwork.kernel.org/project/linux-sh/list/ Q: http://patchwork.kernel.org/project/linux-sh/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
S: Supported S: Supported
F: arch/arm/boot/dts/emev2*
F: arch/arm/boot/dts/r7s*
F: arch/arm/boot/dts/r8a*
F: arch/arm/boot/dts/sh*
F: arch/arm/configs/ape6evm_defconfig
F: arch/arm/configs/armadillo800eva_defconfig
F: arch/arm/configs/bockw_defconfig
F: arch/arm/configs/genmai_defconfig
F: arch/arm/configs/koelsch_defconfig
F: arch/arm/configs/kzm9g_defconfig
F: arch/arm/configs/lager_defconfig
F: arch/arm/configs/mackerel_defconfig
F: arch/arm/configs/marzen_defconfig
F: arch/arm/configs/shmobile_defconfig
F: arch/arm/mach-shmobile/ F: arch/arm/mach-shmobile/
F: drivers/sh/ F: drivers/sh/
@ -4479,8 +4510,7 @@ S: Supported
F: drivers/idle/i7300_idle.c F: drivers/idle/i7300_idle.c
IEEE 802.15.4 SUBSYSTEM IEEE 802.15.4 SUBSYSTEM
M: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> M: Alexander Aring <alex.aring@gmail.com>
M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
L: linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers) L: linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers)
W: http://apps.sourceforge.net/trac/linux-zigbee W: http://apps.sourceforge.net/trac/linux-zigbee
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git
@ -5512,10 +5542,11 @@ S: Maintained
F: arch/arm/mach-lpc32xx/ F: arch/arm/mach-lpc32xx/
LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
M: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com> M: Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
M: Sreekanth Reddy <Sreekanth.Reddy@lsi.com> M: Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
M: support@lsi.com M: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
L: DL-MPTFusionLinux@lsi.com M: Abhijit Mahajan <abhijit.mahajan@avagotech.com>
L: MPT-FusionLinux.pdl@avagotech.com
L: linux-scsi@vger.kernel.org L: linux-scsi@vger.kernel.org
W: http://www.lsilogic.com/support W: http://www.lsilogic.com/support
S: Supported S: Supported
@ -6768,7 +6799,7 @@ F: arch/x86/kernel/quirks.c
PCI DRIVER FOR IMX6 PCI DRIVER FOR IMX6
M: Richard Zhu <r65037@freescale.com> M: Richard Zhu <r65037@freescale.com>
M: Shawn Guo <shawn.guo@linaro.org> M: Shawn Guo <shawn.guo@freescale.com>
L: linux-pci@vger.kernel.org L: linux-pci@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
@ -8965,7 +8996,7 @@ F: drivers/media/radio/radio-raremono.c
THERMAL THERMAL
M: Zhang Rui <rui.zhang@intel.com> M: Zhang Rui <rui.zhang@intel.com>
M: Eduardo Valentin <eduardo.valentin@ti.com> M: Eduardo Valentin <edubezval@gmail.com>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
@ -8992,7 +9023,7 @@ S: Maintained
F: drivers/platform/x86/thinkpad_acpi.c F: drivers/platform/x86/thinkpad_acpi.c
TI BANDGAP AND THERMAL DRIVER TI BANDGAP AND THERMAL DRIVER
M: Eduardo Valentin <eduardo.valentin@ti.com> M: Eduardo Valentin <edubezval@gmail.com>
L: linux-pm@vger.kernel.org L: linux-pm@vger.kernel.org
S: Supported S: Supported
F: drivers/thermal/ti-soc-thermal/ F: drivers/thermal/ti-soc-thermal/
@ -9406,12 +9437,6 @@ S: Maintained
F: drivers/usb/host/isp116x* F: drivers/usb/host/isp116x*
F: include/linux/usb/isp116x.h F: include/linux/usb/isp116x.h
USB KAWASAKI LSI DRIVER
M: Oliver Neukum <oliver@neukum.org>
L: linux-usb@vger.kernel.org
S: Maintained
F: drivers/usb/serial/kl5kusb105.*
USB MASS STORAGE DRIVER USB MASS STORAGE DRIVER
M: Matthew Dharm <mdharm-usb@one-eyed-alien.net> M: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
@ -9439,12 +9464,6 @@ S: Maintained
F: Documentation/usb/ohci.txt F: Documentation/usb/ohci.txt
F: drivers/usb/host/ohci* F: drivers/usb/host/ohci*
USB OPTION-CARD DRIVER
M: Matthias Urlichs <smurf@smurf.noris.de>
L: linux-usb@vger.kernel.org
S: Maintained
F: drivers/usb/serial/option.c
USB PEGASUS DRIVER USB PEGASUS DRIVER
M: Petko Manolov <petkan@nucleusys.com> M: Petko Manolov <petkan@nucleusys.com>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
@ -9477,7 +9496,7 @@ S: Maintained
F: drivers/net/usb/rtl8150.c F: drivers/net/usb/rtl8150.c
USB SERIAL SUBSYSTEM USB SERIAL SUBSYSTEM
M: Johan Hovold <jhovold@gmail.com> M: Johan Hovold <johan@kernel.org>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org
S: Maintained S: Maintained
F: Documentation/usb/usb-serial.txt F: Documentation/usb/usb-serial.txt

102
Makefile
View File

@ -1,7 +1,7 @@
VERSION = 3 VERSION = 3
PATCHLEVEL = 16 PATCHLEVEL = 16
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc3 EXTRAVERSION = -rc6
NAME = Shuffling Zombie Juror NAME = Shuffling Zombie Juror
# *DOCUMENTATION* # *DOCUMENTATION*
@ -41,6 +41,29 @@ unexport GREP_OPTIONS
# descending is started. They are now explicitly listed as the # descending is started. They are now explicitly listed as the
# prepare rule. # prepare rule.
# Beautify output
# ---------------------------------------------------------------------------
#
# Normally, we echo the whole command before executing it. By making
# that echo $($(quiet)$(cmd)), we now have the possibility to set
# $(quiet) to choose other forms of output instead, e.g.
#
# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing will be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# A simple variant is to prefix commands with $(Q) - that's useful
# for commands that shall be hidden in non-verbose mode.
#
# $(Q)ln $@ :<
#
# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
# If KBUILD_VERBOSE equals 1 then the above command is displayed.
#
# To put more focus on warnings, be less verbose as default # To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands # Use 'make V=1' to see the full commands
@ -51,6 +74,29 @@ ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0 KBUILD_VERBOSE = 0
endif endif
ifeq ($(KBUILD_VERBOSE),1)
quiet =
Q =
else
quiet=quiet_
Q = @
endif
# If the user is running make -s (silent mode), suppress echoing of
# commands
ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
quiet=silent_
endif
else # make-3.8x
ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
quiet=silent_
endif
endif
export quiet Q KBUILD_VERBOSE
# Call a source code checker (by default, "sparse") as part of the # Call a source code checker (by default, "sparse") as part of the
# C compilation. # C compilation.
# #
@ -126,7 +172,13 @@ PHONY += $(MAKECMDGOALS) sub-make
$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
@: @:
# Fake the "Entering directory" message once, so that IDEs/editors are
# able to understand relative filenames.
echodir := @echo
quiet_echodir := @echo
silent_echodir := @:
sub-make: FORCE sub-make: FORCE
$($(quiet)echodir) "make[1]: Entering directory \`$(KBUILD_OUTPUT)'"
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \ KBUILD_SRC=$(CURDIR) \
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \ KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \
@ -289,52 +341,6 @@ endif
export KBUILD_MODULES KBUILD_BUILTIN export KBUILD_MODULES KBUILD_BUILTIN
export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
# Beautify output
# ---------------------------------------------------------------------------
#
# Normally, we echo the whole command before executing it. By making
# that echo $($(quiet)$(cmd)), we now have the possibility to set
# $(quiet) to choose other forms of output instead, e.g.
#
# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing will be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# A simple variant is to prefix commands with $(Q) - that's useful
# for commands that shall be hidden in non-verbose mode.
#
# $(Q)ln $@ :<
#
# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
# If KBUILD_VERBOSE equals 1 then the above command is displayed.
ifeq ($(KBUILD_VERBOSE),1)
quiet =
Q =
else
quiet=quiet_
Q = @
endif
# If the user is running make -s (silent mode), suppress echoing of
# commands
ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
quiet=silent_
endif
else # make-3.8x
ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
quiet=silent_
endif
endif
export quiet Q KBUILD_VERBOSE
ifneq ($(CC),) ifneq ($(CC),)
ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
COMPILER := clang COMPILER := clang
@ -1170,7 +1176,7 @@ distclean: mrproper
# Packaging of the kernel to various formats # Packaging of the kernel to various formats
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# rpm target kept for backward compatibility # rpm target kept for backward compatibility
package-dir := $(srctree)/scripts/package package-dir := scripts/package
%src-pkg: FORCE %src-pkg: FORCE
$(Q)$(MAKE) $(build)=$(package-dir) $@ $(Q)$(MAKE) $(build)=$(package-dir) $@

View File

@ -6,6 +6,7 @@ config ARM
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_HAVE_CUSTOM_GPIO_H
select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION

View File

@ -529,8 +529,8 @@
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 2 0 0 1 2
>; >;
tx-num-evt = <1>; tx-num-evt = <32>;
rx-num-evt = <1>; rx-num-evt = <32>;
}; };
&tps { &tps {

View File

@ -560,8 +560,8 @@
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 2 0 0 1 2
>; >;
tx-num-evt = <1>; tx-num-evt = <32>;
rx-num-evt = <1>; rx-num-evt = <32>;
}; };
&tscadc { &tscadc {

View File

@ -105,10 +105,16 @@
&cpsw_emac0 { &cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>; phy_id = <&davinci_mdio>, <0>;
phy-mode = "rmii";
}; };
&cpsw_emac1 { &cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>; phy_id = <&davinci_mdio>, <1>;
phy-mode = "rmii";
};
&phy_sel {
rmii-clock-ext;
}; };
&elm { &elm {

View File

@ -319,6 +319,10 @@
phy-mode = "rmii"; phy-mode = "rmii";
}; };
&phy_sel {
rmii-clock-ext;
};
&i2c0 { &i2c0 {
status = "okay"; status = "okay";
pinctrl-names = "default"; pinctrl-names = "default";

View File

@ -925,7 +925,7 @@
compatible = "atmel,at91rm9200-ohci", "usb-ohci"; compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00500000 0x00100000>; reg = <0x00500000 0x00100000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>,
<&uhpck>; <&uhpck>;
clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
status = "disabled"; status = "disabled";

View File

@ -1045,6 +1045,8 @@
reg = <0x00500000 0x80000 reg = <0x00500000 0x80000
0xf803c000 0x400>; 0xf803c000 0x400>;
interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>; interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&usb>, <&udphs_clk>;
clock-names = "hclk", "pclk";
status = "disabled"; status = "disabled";
ep0 { ep0 {
@ -1122,6 +1124,7 @@
compatible = "atmel,at91sam9rl-pwm"; compatible = "atmel,at91sam9rl-pwm";
reg = <0xf8034000 0x300>; reg = <0xf8034000 0x300>;
interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>; interrupts = <18 IRQ_TYPE_LEVEL_HIGH 4>;
clocks = <&pwm_clk>;
#pwm-cells = <3>; #pwm-cells = <3>;
status = "disabled"; status = "disabled";
}; };
@ -1153,8 +1156,7 @@
compatible = "atmel,at91rm9200-ohci", "usb-ohci"; compatible = "atmel,at91rm9200-ohci", "usb-ohci";
reg = <0x00600000 0x100000>; reg = <0x00600000 0x100000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
<&uhpck>;
clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
status = "disabled"; status = "disabled";
}; };

View File

@ -240,6 +240,7 @@
regulator-name = "ldo3"; regulator-name = "ldo3";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
}; };

View File

@ -773,7 +773,6 @@
clocks = <&qspi_gfclk_div>; clocks = <&qspi_gfclk_div>;
clock-names = "fck"; clock-names = "fck";
num-cs = <4>; num-cs = <4>;
interrupts = <0 343 0x4>;
status = "disabled"; status = "disabled";
}; };
@ -984,6 +983,17 @@
#size-cells = <1>; #size-cells = <1>;
status = "disabled"; status = "disabled";
}; };
atl: atl@4843c000 {
compatible = "ti,dra7-atl";
reg = <0x4843c000 0x3ff>;
ti,hwmods = "atl";
ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>,
<&atl_clkin2_ck>, <&atl_clkin3_ck>;
clocks = <&atl_gfclk_mux>;
clock-names = "fck";
status = "disabled";
};
}; };
}; };

View File

@ -10,26 +10,26 @@
&cm_core_aon_clocks { &cm_core_aon_clocks {
atl_clkin0_ck: atl_clkin0_ck { atl_clkin0_ck: atl_clkin0_ck {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fixed-clock"; compatible = "ti,dra7-atl-clock";
clock-frequency = <0>; clocks = <&atl_gfclk_mux>;
}; };
atl_clkin1_ck: atl_clkin1_ck { atl_clkin1_ck: atl_clkin1_ck {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fixed-clock"; compatible = "ti,dra7-atl-clock";
clock-frequency = <0>; clocks = <&atl_gfclk_mux>;
}; };
atl_clkin2_ck: atl_clkin2_ck { atl_clkin2_ck: atl_clkin2_ck {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fixed-clock"; compatible = "ti,dra7-atl-clock";
clock-frequency = <0>; clocks = <&atl_gfclk_mux>;
}; };
atl_clkin3_ck: atl_clkin3_ck { atl_clkin3_ck: atl_clkin3_ck {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fixed-clock"; compatible = "ti,dra7-atl-clock";
clock-frequency = <0>; clocks = <&atl_gfclk_mux>;
}; };
hdmi_clkin_ck: hdmi_clkin_ck { hdmi_clkin_ck: hdmi_clkin_ck {
@ -673,10 +673,12 @@
l3_iclk_div: l3_iclk_div { l3_iclk_div: l3_iclk_div {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fixed-factor-clock"; compatible = "ti,divider-clock";
ti,max-div = <2>;
ti,bit-shift = <4>;
reg = <0x0100>;
clocks = <&dpll_core_h12x2_ck>; clocks = <&dpll_core_h12x2_ck>;
clock-mult = <1>; ti,index-power-of-two;
clock-div = <1>;
}; };
l4_root_clk_div: l4_root_clk_div { l4_root_clk_div: l4_root_clk_div {
@ -684,7 +686,7 @@
compatible = "fixed-factor-clock"; compatible = "fixed-factor-clock";
clocks = <&l3_iclk_div>; clocks = <&l3_iclk_div>;
clock-mult = <1>; clock-mult = <1>;
clock-div = <1>; clock-div = <2>;
}; };
video1_clk2_div: video1_clk2_div { video1_clk2_div: video1_clk2_div {

View File

@ -554,7 +554,7 @@
interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>; interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>;
clocks = <&clock CLK_PWM>; clocks = <&clock CLK_PWM>;
clock-names = "timers"; clock-names = "timers";
#pwm-cells = <2>; #pwm-cells = <3>;
status = "disabled"; status = "disabled";
}; };

View File

@ -167,7 +167,7 @@
compatible = "samsung,exynos5420-audss-clock"; compatible = "samsung,exynos5420-audss-clock";
reg = <0x03810000 0x0C>; reg = <0x03810000 0x0C>;
#clock-cells = <1>; #clock-cells = <1>;
clocks = <&clock CLK_FIN_PLL>, <&clock CLK_FOUT_EPLL>, clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MAU_EPLL>,
<&clock CLK_SCLK_MAUDIO0>, <&clock CLK_SCLK_MAUPCM0>; <&clock CLK_SCLK_MAUDIO0>, <&clock CLK_SCLK_MAUPCM0>;
clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in"; clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in";
}; };
@ -260,6 +260,9 @@
mfc_pd: power-domain@10044060 { mfc_pd: power-domain@10044060 {
compatible = "samsung,exynos4210-pd"; compatible = "samsung,exynos4210-pd";
reg = <0x10044060 0x20>; reg = <0x10044060 0x20>;
clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>,
<&clock CLK_MOUT_USER_ACLK333>;
clock-names = "oscclk", "pclk0", "clk0";
}; };
disp_pd: power-domain@100440C0 { disp_pd: power-domain@100440C0 {

View File

@ -251,6 +251,11 @@
codec { codec {
}; };
}; };
twl_power: power {
compatible = "ti,twl4030-power-beagleboard-xm", "ti,twl4030-power-idle-osc-off";
ti,use_poweroff;
};
}; };
}; };
@ -301,6 +306,7 @@
}; };
&uart3 { &uart3 {
interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>; pinctrl-0 = <&uart3_pins>;
}; };

View File

@ -50,6 +50,13 @@
gpios = <&twl_gpio 18 GPIO_ACTIVE_LOW>; gpios = <&twl_gpio 18 GPIO_ACTIVE_LOW>;
}; };
&twl {
twl_power: power {
compatible = "ti,twl4030-power-omap3-evm", "ti,twl4030-power-idle";
ti,use_poweroff;
};
};
&i2c2 { &i2c2 {
clock-frequency = <400000>; clock-frequency = <400000>;
}; };

View File

@ -351,6 +351,11 @@
compatible = "ti,twl4030-audio"; compatible = "ti,twl4030-audio";
ti,enable-vibra = <1>; ti,enable-vibra = <1>;
}; };
twl_power: power {
compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off";
ti,use_poweroff;
};
}; };
&twl_keypad { &twl_keypad {

View File

@ -45,7 +45,6 @@
operating-points = < operating-points = <
/* kHz uV */ /* kHz uV */
500000 880000
1000000 1060000 1000000 1060000
1500000 1250000 1500000 1250000
>; >;

View File

@ -94,10 +94,10 @@ CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_PWM=y CONFIG_BACKLIGHT_PWM=y
# CONFIG_USB_SUPPORT is not set # CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y CONFIG_MMC=y
CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_TEST=y CONFIG_MMC_TEST=y
CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_BCM_KONA=y CONFIG_MMC_SDHCI_BCM_KONA=y
CONFIG_NEW_LEDS=y CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS=y

View File

@ -127,6 +127,7 @@ CONFIG_BLK_DEV_SR=y
CONFIG_SCSI_MULTI_LUN=y CONFIG_SCSI_MULTI_LUN=y
CONFIG_ATA=y CONFIG_ATA=y
CONFIG_SATA_AHCI_PLATFORM=y CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_AHCI_ST=y
CONFIG_AHCI_SUNXI=y CONFIG_AHCI_SUNXI=y
CONFIG_SATA_HIGHBANK=y CONFIG_SATA_HIGHBANK=y
CONFIG_SATA_MV=y CONFIG_SATA_MV=y
@ -156,6 +157,7 @@ CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_TEGRA=y CONFIG_KEYBOARD_TEGRA=y
CONFIG_KEYBOARD_SPEAR=y CONFIG_KEYBOARD_SPEAR=y
CONFIG_KEYBOARD_ST_KEYSCAN=y
CONFIG_KEYBOARD_CROS_EC=y CONFIG_KEYBOARD_CROS_EC=y
CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_INPUT_TOUCHSCREEN=y CONFIG_INPUT_TOUCHSCREEN=y
@ -228,12 +230,14 @@ CONFIG_POWER_RESET_SUN6I=y
CONFIG_SENSORS_LM90=y CONFIG_SENSORS_LM90=y
CONFIG_SENSORS_LM95245=y CONFIG_SENSORS_LM95245=y
CONFIG_THERMAL=y CONFIG_THERMAL=y
CONFIG_DOVE_THERMAL=y
CONFIG_ARMADA_THERMAL=y CONFIG_ARMADA_THERMAL=y
CONFIG_ST_THERMAL_SYSCFG=y
CONFIG_ST_THERMAL_MEMMAP=y
CONFIG_WATCHDOG=y CONFIG_WATCHDOG=y
CONFIG_ORION_WATCHDOG=y CONFIG_ORION_WATCHDOG=y
CONFIG_SUNXI_WATCHDOG=y CONFIG_SUNXI_WATCHDOG=y
CONFIG_MFD_AS3722=y CONFIG_MFD_AS3722=y
CONFIG_MFD_BCM590XX=y
CONFIG_MFD_CROS_EC=y CONFIG_MFD_CROS_EC=y
CONFIG_MFD_CROS_EC_SPI=y CONFIG_MFD_CROS_EC_SPI=y
CONFIG_MFD_MAX8907=y CONFIG_MFD_MAX8907=y
@ -246,6 +250,7 @@ CONFIG_MFD_TPS65910=y
CONFIG_REGULATOR_VIRTUAL_CONSUMER=y CONFIG_REGULATOR_VIRTUAL_CONSUMER=y
CONFIG_REGULATOR_AB8500=y CONFIG_REGULATOR_AB8500=y
CONFIG_REGULATOR_AS3722=y CONFIG_REGULATOR_AS3722=y
CONFIG_REGULATOR_BCM590XX=y
CONFIG_REGULATOR_GPIO=y CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_MAX8907=y CONFIG_REGULATOR_MAX8907=y
CONFIG_REGULATOR_PALMAS=y CONFIG_REGULATOR_PALMAS=y
@ -316,6 +321,7 @@ CONFIG_MMC_SDHCI_SPEAR=y
CONFIG_MMC_SDHCI_S3C=y CONFIG_MMC_SDHCI_S3C=y
CONFIG_MMC_SDHCI_S3C_DMA=y CONFIG_MMC_SDHCI_S3C_DMA=y
CONFIG_MMC_SDHCI_BCM_KONA=y CONFIG_MMC_SDHCI_BCM_KONA=y
CONFIG_MMC_SDHCI_ST=y
CONFIG_MMC_OMAP=y CONFIG_MMC_OMAP=y
CONFIG_MMC_OMAP_HS=y CONFIG_MMC_OMAP_HS=y
CONFIG_MMC_MVSDIO=y CONFIG_MMC_MVSDIO=y
@ -376,6 +382,7 @@ CONFIG_PWM=y
CONFIG_PWM_TEGRA=y CONFIG_PWM_TEGRA=y
CONFIG_PWM_VT8500=y CONFIG_PWM_VT8500=y
CONFIG_OMAP_USB2=y CONFIG_OMAP_USB2=y
CONFIG_PHY_MIPHY365X=y
CONFIG_PHY_SUN4I_USB=y CONFIG_PHY_SUN4I_USB=y
CONFIG_EXT4_FS=y CONFIG_EXT4_FS=y
CONFIG_VFAT_FS=y CONFIG_VFAT_FS=y

View File

@ -74,8 +74,6 @@ void kprobe_arm_test_cases(void)
TEST_RRR( op "lt" s " r11, r",11,VAL1,", r",14,N(val),", asr r",7, 6,"")\ TEST_RRR( op "lt" s " r11, r",11,VAL1,", r",14,N(val),", asr r",7, 6,"")\
TEST_RR( op "gt" s " r12, r13" ", r",14,val, ", ror r",14,7,"")\ TEST_RR( op "gt" s " r12, r13" ", r",14,val, ", ror r",14,7,"")\
TEST_RR( op "le" s " r14, r",0, val, ", r13" ", lsl r",14,8,"")\ TEST_RR( op "le" s " r14, r",0, val, ", r13" ", lsl r",14,8,"")\
TEST_RR( op s " r12, pc" ", r",14,val, ", ror r",14,7,"")\
TEST_RR( op s " r14, r",0, val, ", pc" ", lsl r",14,8,"")\
TEST_R( op "eq" s " r0, r",11,VAL1,", #0xf5") \ TEST_R( op "eq" s " r0, r",11,VAL1,", #0xf5") \
TEST_R( op "ne" s " r11, r",0, VAL1,", #0xf5000000") \ TEST_R( op "ne" s " r11, r",0, VAL1,", #0xf5000000") \
TEST_R( op s " r7, r",8, VAL2,", #0x000af000") \ TEST_R( op s " r7, r",8, VAL2,", #0x000af000") \
@ -103,8 +101,6 @@ void kprobe_arm_test_cases(void)
TEST_RRR( op "ge r",11,VAL1,", r",14,N(val),", asr r",7, 6,"") \ TEST_RRR( op "ge r",11,VAL1,", r",14,N(val),", asr r",7, 6,"") \
TEST_RR( op "le r13" ", r",14,val, ", ror r",14,7,"") \ TEST_RR( op "le r13" ", r",14,val, ", ror r",14,7,"") \
TEST_RR( op "gt r",0, val, ", r13" ", lsl r",14,8,"") \ TEST_RR( op "gt r",0, val, ", r13" ", lsl r",14,8,"") \
TEST_RR( op " pc" ", r",14,val, ", ror r",14,7,"") \
TEST_RR( op " r",0, val, ", pc" ", lsl r",14,8,"") \
TEST_R( op "eq r",11,VAL1,", #0xf5") \ TEST_R( op "eq r",11,VAL1,", #0xf5") \
TEST_R( op "ne r",0, VAL1,", #0xf5000000") \ TEST_R( op "ne r",0, VAL1,", #0xf5000000") \
TEST_R( op " r",8, VAL2,", #0x000af000") TEST_R( op " r",8, VAL2,", #0x000af000")
@ -125,7 +121,6 @@ void kprobe_arm_test_cases(void)
TEST_RR( op "ge" s " r11, r",11,N(val),", asr r",7, 6,"") \ TEST_RR( op "ge" s " r11, r",11,N(val),", asr r",7, 6,"") \
TEST_RR( op "lt" s " r12, r",11,val, ", ror r",14,7,"") \ TEST_RR( op "lt" s " r12, r",11,val, ", ror r",14,7,"") \
TEST_R( op "gt" s " r14, r13" ", lsl r",14,8,"") \ TEST_R( op "gt" s " r14, r13" ", lsl r",14,8,"") \
TEST_R( op "le" s " r14, pc" ", lsl r",14,8,"") \
TEST( op "eq" s " r0, #0xf5") \ TEST( op "eq" s " r0, #0xf5") \
TEST( op "ne" s " r11, #0xf5000000") \ TEST( op "ne" s " r11, #0xf5000000") \
TEST( op s " r7, #0x000af000") \ TEST( op s " r7, #0x000af000") \
@ -159,12 +154,19 @@ void kprobe_arm_test_cases(void)
TEST_SUPPORTED("cmp pc, #0x1000"); TEST_SUPPORTED("cmp pc, #0x1000");
TEST_SUPPORTED("cmp sp, #0x1000"); TEST_SUPPORTED("cmp sp, #0x1000");
/* Data-processing with PC as shift*/ /* Data-processing with PC and a shift count in a register */
TEST_UNSUPPORTED(__inst_arm(0xe15c0f1e) " @ cmp r12, r14, asl pc") TEST_UNSUPPORTED(__inst_arm(0xe15c0f1e) " @ cmp r12, r14, asl pc")
TEST_UNSUPPORTED(__inst_arm(0xe1a0cf1e) " @ mov r12, r14, asl pc") TEST_UNSUPPORTED(__inst_arm(0xe1a0cf1e) " @ mov r12, r14, asl pc")
TEST_UNSUPPORTED(__inst_arm(0xe08caf1e) " @ add r10, r12, r14, asl pc") TEST_UNSUPPORTED(__inst_arm(0xe08caf1e) " @ add r10, r12, r14, asl pc")
TEST_UNSUPPORTED(__inst_arm(0xe151021f) " @ cmp r1, pc, lsl r2")
TEST_UNSUPPORTED(__inst_arm(0xe17f0211) " @ cmn pc, r1, lsl r2")
TEST_UNSUPPORTED(__inst_arm(0xe1a0121f) " @ mov r1, pc, lsl r2")
TEST_UNSUPPORTED(__inst_arm(0xe1a0f211) " @ mov pc, r1, lsl r2")
TEST_UNSUPPORTED(__inst_arm(0xe042131f) " @ sub r1, r2, pc, lsl r3")
TEST_UNSUPPORTED(__inst_arm(0xe1cf1312) " @ bic r1, pc, r2, lsl r3")
TEST_UNSUPPORTED(__inst_arm(0xe081f312) " @ add pc, r1, r2, lsl r3")
/* Data-processing with PC as shift*/ /* Data-processing with PC as a target and status registers updated */
TEST_UNSUPPORTED("movs pc, r1") TEST_UNSUPPORTED("movs pc, r1")
TEST_UNSUPPORTED("movs pc, r1, lsl r2") TEST_UNSUPPORTED("movs pc, r1, lsl r2")
TEST_UNSUPPORTED("movs pc, #0x10000") TEST_UNSUPPORTED("movs pc, #0x10000")
@ -187,14 +189,14 @@ void kprobe_arm_test_cases(void)
TEST_BF_R ("add pc, pc, r",14,2f-1f-8,"") TEST_BF_R ("add pc, pc, r",14,2f-1f-8,"")
TEST_BF_R ("add pc, r",14,2f-1f-8,", pc") TEST_BF_R ("add pc, r",14,2f-1f-8,", pc")
TEST_BF_R ("mov pc, r",0,2f,"") TEST_BF_R ("mov pc, r",0,2f,"")
TEST_BF_RR("mov pc, r",0,2f,", asl r",1,0,"") TEST_BF_R ("add pc, pc, r",14,(2f-1f-8)*2,", asr #1")
TEST_BB( "sub pc, pc, #1b-2b+8") TEST_BB( "sub pc, pc, #1b-2b+8")
#if __LINUX_ARM_ARCH__ == 6 && !defined(CONFIG_CPU_V7) #if __LINUX_ARM_ARCH__ == 6 && !defined(CONFIG_CPU_V7)
TEST_BB( "sub pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before and after ARMv6 */ TEST_BB( "sub pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before and after ARMv6 */
#endif #endif
TEST_BB_R( "sub pc, pc, r",14, 1f-2f+8,"") TEST_BB_R( "sub pc, pc, r",14, 1f-2f+8,"")
TEST_BB_R( "rsb pc, r",14,1f-2f+8,", pc") TEST_BB_R( "rsb pc, r",14,1f-2f+8,", pc")
TEST_RR( "add pc, pc, r",10,-2,", asl r",11,1,"") TEST_R( "add pc, pc, r",10,-2,", asl #1")
#ifdef CONFIG_THUMB2_KERNEL #ifdef CONFIG_THUMB2_KERNEL
TEST_ARM_TO_THUMB_INTERWORK_R("add pc, pc, r",0,3f-1f-8+1,"") TEST_ARM_TO_THUMB_INTERWORK_R("add pc, pc, r",0,3f-1f-8+1,"")
TEST_ARM_TO_THUMB_INTERWORK_R("sub pc, r",0,3f+8+1,", #8") TEST_ARM_TO_THUMB_INTERWORK_R("sub pc, r",0,3f+8+1,", #8")
@ -216,6 +218,7 @@ void kprobe_arm_test_cases(void)
TEST_BB_R("bx r",7,2f,"") TEST_BB_R("bx r",7,2f,"")
TEST_BF_R("bxeq r",14,2f,"") TEST_BF_R("bxeq r",14,2f,"")
#if __LINUX_ARM_ARCH__ >= 5
TEST_R("clz r0, r",0, 0x0,"") TEST_R("clz r0, r",0, 0x0,"")
TEST_R("clzeq r7, r",14,0x1,"") TEST_R("clzeq r7, r",14,0x1,"")
TEST_R("clz lr, r",7, 0xffffffff,"") TEST_R("clz lr, r",7, 0xffffffff,"")
@ -337,6 +340,7 @@ void kprobe_arm_test_cases(void)
TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2") TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2")
TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2") TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2")
TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc") TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc")
#endif
TEST_GROUP("Multiply and multiply-accumulate") TEST_GROUP("Multiply and multiply-accumulate")
@ -559,6 +563,7 @@ void kprobe_arm_test_cases(void)
TEST_UNSUPPORTED("ldrsht r1, [r2], #48") TEST_UNSUPPORTED("ldrsht r1, [r2], #48")
#endif #endif
#if __LINUX_ARM_ARCH__ >= 5
TEST_RPR( "strd r",0, VAL1,", [r",1, 48,", -r",2,24,"]") TEST_RPR( "strd r",0, VAL1,", [r",1, 48,", -r",2,24,"]")
TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]")
TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!") TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!")
@ -595,6 +600,7 @@ void kprobe_arm_test_cases(void)
TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!") TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!")
TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48") TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48")
TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48") TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48")
#endif
TEST_GROUP("Miscellaneous") TEST_GROUP("Miscellaneous")
@ -1227,7 +1233,9 @@ void kprobe_arm_test_cases(void)
TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0") TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0")
COPROCESSOR_INSTRUCTIONS_ST_LD("",e) COPROCESSOR_INSTRUCTIONS_ST_LD("",e)
#if __LINUX_ARM_ARCH__ >= 5
COPROCESSOR_INSTRUCTIONS_MC_MR("",e) COPROCESSOR_INSTRUCTIONS_MC_MR("",e)
#endif
TEST_UNSUPPORTED("svc 0") TEST_UNSUPPORTED("svc 0")
TEST_UNSUPPORTED("svc 0xffffff") TEST_UNSUPPORTED("svc 0xffffff")
@ -1287,7 +1295,9 @@ void kprobe_arm_test_cases(void)
TEST( "blx __dummy_thumb_subroutine_odd") TEST( "blx __dummy_thumb_subroutine_odd")
#endif /* __LINUX_ARM_ARCH__ >= 6 */ #endif /* __LINUX_ARM_ARCH__ >= 6 */
#if __LINUX_ARM_ARCH__ >= 5
COPROCESSOR_INSTRUCTIONS_ST_LD("2",f) COPROCESSOR_INSTRUCTIONS_ST_LD("2",f)
#endif
#if __LINUX_ARM_ARCH__ >= 6 #if __LINUX_ARM_ARCH__ >= 6
COPROCESSOR_INSTRUCTIONS_MC_MR("2",f) COPROCESSOR_INSTRUCTIONS_MC_MR("2",f)
#endif #endif

View File

@ -225,6 +225,7 @@ static int pre_handler_called;
static int post_handler_called; static int post_handler_called;
static int jprobe_func_called; static int jprobe_func_called;
static int kretprobe_handler_called; static int kretprobe_handler_called;
static int tests_failed;
#define FUNC_ARG1 0x12345678 #define FUNC_ARG1 0x12345678
#define FUNC_ARG2 0xabcdef #define FUNC_ARG2 0xabcdef
@ -461,6 +462,13 @@ static int run_api_tests(long (*func)(long, long))
pr_info(" jprobe\n"); pr_info(" jprobe\n");
ret = test_jprobe(func); ret = test_jprobe(func);
#if defined(CONFIG_THUMB2_KERNEL) && !defined(MODULE)
if (ret == -EINVAL) {
pr_err("FAIL: Known longtime bug with jprobe on Thumb kernels\n");
tests_failed = ret;
ret = 0;
}
#endif
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -1671,6 +1679,8 @@ static int __init run_all_tests(void)
#endif #endif
out: out:
if (ret == 0)
ret = tests_failed;
if (ret == 0) if (ret == 0)
pr_info("Finished kprobe tests OK\n"); pr_info("Finished kprobe tests OK\n");
else else

View File

@ -341,12 +341,12 @@ static const union decode_item arm_cccc_000x_table[] = {
/* CMP (reg-shift reg) cccc 0001 0101 xxxx xxxx xxxx 0xx1 xxxx */ /* CMP (reg-shift reg) cccc 0001 0101 xxxx xxxx xxxx 0xx1 xxxx */
/* CMN (reg-shift reg) cccc 0001 0111 xxxx xxxx xxxx 0xx1 xxxx */ /* CMN (reg-shift reg) cccc 0001 0111 xxxx xxxx xxxx 0xx1 xxxx */
DECODE_EMULATEX (0x0f900090, 0x01100010, PROBES_DATA_PROCESSING_REG, DECODE_EMULATEX (0x0f900090, 0x01100010, PROBES_DATA_PROCESSING_REG,
REGS(ANY, 0, NOPC, 0, ANY)), REGS(NOPC, 0, NOPC, 0, NOPC)),
/* MOV (reg-shift reg) cccc 0001 101x xxxx xxxx xxxx 0xx1 xxxx */ /* MOV (reg-shift reg) cccc 0001 101x xxxx xxxx xxxx 0xx1 xxxx */
/* MVN (reg-shift reg) cccc 0001 111x xxxx xxxx xxxx 0xx1 xxxx */ /* MVN (reg-shift reg) cccc 0001 111x xxxx xxxx xxxx 0xx1 xxxx */
DECODE_EMULATEX (0x0fa00090, 0x01a00010, PROBES_DATA_PROCESSING_REG, DECODE_EMULATEX (0x0fa00090, 0x01a00010, PROBES_DATA_PROCESSING_REG,
REGS(0, ANY, NOPC, 0, ANY)), REGS(0, NOPC, NOPC, 0, NOPC)),
/* AND (reg-shift reg) cccc 0000 000x xxxx xxxx xxxx 0xx1 xxxx */ /* AND (reg-shift reg) cccc 0000 000x xxxx xxxx xxxx 0xx1 xxxx */
/* EOR (reg-shift reg) cccc 0000 001x xxxx xxxx xxxx 0xx1 xxxx */ /* EOR (reg-shift reg) cccc 0000 001x xxxx xxxx xxxx 0xx1 xxxx */
@ -359,7 +359,7 @@ static const union decode_item arm_cccc_000x_table[] = {
/* ORR (reg-shift reg) cccc 0001 100x xxxx xxxx xxxx 0xx1 xxxx */ /* ORR (reg-shift reg) cccc 0001 100x xxxx xxxx xxxx 0xx1 xxxx */
/* BIC (reg-shift reg) cccc 0001 110x xxxx xxxx xxxx 0xx1 xxxx */ /* BIC (reg-shift reg) cccc 0001 110x xxxx xxxx xxxx 0xx1 xxxx */
DECODE_EMULATEX (0x0e000090, 0x00000010, PROBES_DATA_PROCESSING_REG, DECODE_EMULATEX (0x0e000090, 0x00000010, PROBES_DATA_PROCESSING_REG,
REGS(ANY, ANY, NOPC, 0, ANY)), REGS(NOPC, NOPC, NOPC, 0, NOPC)),
DECODE_END DECODE_END
}; };

View File

@ -275,7 +275,7 @@ void store_cpu_topology(unsigned int cpuid)
cpu_topology[cpuid].socket_id, mpidr); cpu_topology[cpuid].socket_id, mpidr);
} }
static inline const int cpu_corepower_flags(void) static inline int cpu_corepower_flags(void)
{ {
return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN;
} }

View File

@ -173,9 +173,7 @@ static struct platform_device exynos_cpuidle = {
void __init exynos_cpuidle_init(void) void __init exynos_cpuidle_init(void)
{ {
if (soc_is_exynos5440()) if (soc_is_exynos4210() || soc_is_exynos5250())
return;
platform_device_register(&exynos_cpuidle); platform_device_register(&exynos_cpuidle);
} }
@ -297,7 +295,7 @@ static void __init exynos_dt_machine_init(void)
* This is called from smp_prepare_cpus if we've built for SMP, but * This is called from smp_prepare_cpus if we've built for SMP, but
* we still need to set it up for PM and firmware ops if not. * we still need to set it up for PM and firmware ops if not.
*/ */
if (!IS_ENABLED(SMP)) if (!IS_ENABLED(CONFIG_SMP))
exynos_sysram_init(); exynos_sysram_init();
exynos_cpuidle_init(); exynos_cpuidle_init();

View File

@ -57,7 +57,12 @@ static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
boot_reg = sysram_ns_base_addr + 0x1c; boot_reg = sysram_ns_base_addr + 0x1c;
if (!soc_is_exynos4212() && !soc_is_exynos3250()) /*
* Almost all Exynos-series of SoCs that run in secure mode don't need
* additional offset for every CPU, with Exynos4412 being the only
* exception.
*/
if (soc_is_exynos4412())
boot_reg += 4 * cpu; boot_reg += 4 * cpu;
__raw_writel(boot_addr, boot_reg); __raw_writel(boot_addr, boot_reg);

View File

@ -40,15 +40,17 @@ static inline void cpu_leave_lowpower(void)
static inline void platform_do_lowpower(unsigned int cpu, int *spurious) static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
{ {
u32 mpidr = cpu_logical_map(cpu);
u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
for (;;) { for (;;) {
/* make cpu1 to be turned off at next WFI command */ /* Turn the CPU off on next WFI instruction. */
if (cpu == 1) exynos_cpu_power_down(core_id);
exynos_cpu_power_down(cpu);
wfi(); wfi();
if (pen_release == cpu_logical_map(cpu)) { if (pen_release == core_id) {
/* /*
* OK, proper wakeup, we're done * OK, proper wakeup, we're done
*/ */

View File

@ -90,7 +90,8 @@ static void exynos_secondary_init(unsigned int cpu)
static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
unsigned long timeout; unsigned long timeout;
unsigned long phys_cpu = cpu_logical_map(cpu); u32 mpidr = cpu_logical_map(cpu);
u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
int ret = -ENOSYS; int ret = -ENOSYS;
/* /*
@ -104,17 +105,18 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
* the holding pen - release it, then wait for it to flag * the holding pen - release it, then wait for it to flag
* that it has been released by resetting pen_release. * that it has been released by resetting pen_release.
* *
* Note that "pen_release" is the hardware CPU ID, whereas * Note that "pen_release" is the hardware CPU core ID, whereas
* "cpu" is Linux's internal ID. * "cpu" is Linux's internal ID.
*/ */
write_pen_release(phys_cpu); write_pen_release(core_id);
if (!exynos_cpu_power_state(cpu)) { if (!exynos_cpu_power_state(core_id)) {
exynos_cpu_power_up(cpu); exynos_cpu_power_up(core_id);
timeout = 10; timeout = 10;
/* wait max 10 ms until cpu1 is on */ /* wait max 10 ms until cpu1 is on */
while (exynos_cpu_power_state(cpu) != S5P_CORE_LOCAL_PWR_EN) { while (exynos_cpu_power_state(core_id)
!= S5P_CORE_LOCAL_PWR_EN) {
if (timeout-- == 0) if (timeout-- == 0)
break; break;
@ -145,20 +147,20 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
* Try to set boot address using firmware first * Try to set boot address using firmware first
* and fall back to boot register if it fails. * and fall back to boot register if it fails.
*/ */
ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr); ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr);
if (ret && ret != -ENOSYS) if (ret && ret != -ENOSYS)
goto fail; goto fail;
if (ret == -ENOSYS) { if (ret == -ENOSYS) {
void __iomem *boot_reg = cpu_boot_reg(phys_cpu); void __iomem *boot_reg = cpu_boot_reg(core_id);
if (IS_ERR(boot_reg)) { if (IS_ERR(boot_reg)) {
ret = PTR_ERR(boot_reg); ret = PTR_ERR(boot_reg);
goto fail; goto fail;
} }
__raw_writel(boot_addr, cpu_boot_reg(phys_cpu)); __raw_writel(boot_addr, cpu_boot_reg(core_id));
} }
call_firmware_op(cpu_boot, phys_cpu); call_firmware_op(cpu_boot, core_id);
arch_send_wakeup_ipi_mask(cpumask_of(cpu)); arch_send_wakeup_ipi_mask(cpumask_of(cpu));
@ -227,22 +229,24 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
* boot register if it fails. * boot register if it fails.
*/ */
for (i = 1; i < max_cpus; ++i) { for (i = 1; i < max_cpus; ++i) {
unsigned long phys_cpu;
unsigned long boot_addr; unsigned long boot_addr;
u32 mpidr;
u32 core_id;
int ret; int ret;
phys_cpu = cpu_logical_map(i); mpidr = cpu_logical_map(i);
core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
boot_addr = virt_to_phys(exynos4_secondary_startup); boot_addr = virt_to_phys(exynos4_secondary_startup);
ret = call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr); ret = call_firmware_op(set_cpu_boot_addr, core_id, boot_addr);
if (ret && ret != -ENOSYS) if (ret && ret != -ENOSYS)
break; break;
if (ret == -ENOSYS) { if (ret == -ENOSYS) {
void __iomem *boot_reg = cpu_boot_reg(phys_cpu); void __iomem *boot_reg = cpu_boot_reg(core_id);
if (IS_ERR(boot_reg)) if (IS_ERR(boot_reg))
break; break;
__raw_writel(boot_addr, cpu_boot_reg(phys_cpu)); __raw_writel(boot_addr, cpu_boot_reg(core_id));
} }
} }
} }

View File

@ -17,6 +17,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pm_domain.h> #include <linux/pm_domain.h>
#include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
@ -24,6 +25,8 @@
#include "regs-pmu.h" #include "regs-pmu.h"
#define MAX_CLK_PER_DOMAIN 4
/* /*
* Exynos specific wrapper around the generic power domain * Exynos specific wrapper around the generic power domain
*/ */
@ -32,6 +35,9 @@ struct exynos_pm_domain {
char const *name; char const *name;
bool is_off; bool is_off;
struct generic_pm_domain pd; struct generic_pm_domain pd;
struct clk *oscclk;
struct clk *clk[MAX_CLK_PER_DOMAIN];
struct clk *pclk[MAX_CLK_PER_DOMAIN];
}; };
static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on) static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
@ -44,6 +50,19 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
pd = container_of(domain, struct exynos_pm_domain, pd); pd = container_of(domain, struct exynos_pm_domain, pd);
base = pd->base; base = pd->base;
/* Set oscclk before powering off a domain*/
if (!power_on) {
int i;
for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
if (IS_ERR(pd->clk[i]))
break;
if (clk_set_parent(pd->clk[i], pd->oscclk))
pr_err("%s: error setting oscclk as parent to clock %d\n",
pd->name, i);
}
}
pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0; pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0;
__raw_writel(pwr, base); __raw_writel(pwr, base);
@ -60,6 +79,20 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
cpu_relax(); cpu_relax();
usleep_range(80, 100); usleep_range(80, 100);
} }
/* Restore clocks after powering on a domain*/
if (power_on) {
int i;
for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
if (IS_ERR(pd->clk[i]))
break;
if (clk_set_parent(pd->clk[i], pd->pclk[i]))
pr_err("%s: error setting parent to clock%d\n",
pd->name, i);
}
}
return 0; return 0;
} }
@ -152,9 +185,11 @@ static __init int exynos4_pm_init_power_domain(void)
for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
struct exynos_pm_domain *pd; struct exynos_pm_domain *pd;
int on; int on, i;
struct device *dev;
pdev = of_find_device_by_node(np); pdev = of_find_device_by_node(np);
dev = &pdev->dev;
pd = kzalloc(sizeof(*pd), GFP_KERNEL); pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd) { if (!pd) {
@ -170,6 +205,30 @@ static __init int exynos4_pm_init_power_domain(void)
pd->pd.power_on = exynos_pd_power_on; pd->pd.power_on = exynos_pd_power_on;
pd->pd.of_node = np; pd->pd.of_node = np;
pd->oscclk = clk_get(dev, "oscclk");
if (IS_ERR(pd->oscclk))
goto no_clk;
for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
char clk_name[8];
snprintf(clk_name, sizeof(clk_name), "clk%d", i);
pd->clk[i] = clk_get(dev, clk_name);
if (IS_ERR(pd->clk[i]))
break;
snprintf(clk_name, sizeof(clk_name), "pclk%d", i);
pd->pclk[i] = clk_get(dev, clk_name);
if (IS_ERR(pd->pclk[i])) {
clk_put(pd->clk[i]);
pd->clk[i] = ERR_PTR(-EINVAL);
break;
}
}
if (IS_ERR(pd->clk[0]))
clk_put(pd->oscclk);
no_clk:
platform_set_drvdata(pdev, pd); platform_set_drvdata(pdev, pd);
on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN; on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;

View File

@ -67,8 +67,12 @@ static void clk_gate2_disable(struct clk_hw *hw)
spin_lock_irqsave(gate->lock, flags); spin_lock_irqsave(gate->lock, flags);
if (gate->share_count && --(*gate->share_count) > 0) if (gate->share_count) {
if (WARN_ON(*gate->share_count == 0))
goto out; goto out;
else if (--(*gate->share_count) > 0)
goto out;
}
reg = readl(gate->reg); reg = readl(gate->reg);
reg &= ~(3 << gate->bit_idx); reg &= ~(3 << gate->bit_idx);
@ -78,19 +82,26 @@ out:
spin_unlock_irqrestore(gate->lock, flags); spin_unlock_irqrestore(gate->lock, flags);
} }
static int clk_gate2_is_enabled(struct clk_hw *hw) static int clk_gate2_reg_is_enabled(void __iomem *reg, u8 bit_idx)
{ {
u32 reg; u32 val = readl(reg);
struct clk_gate2 *gate = to_clk_gate2(hw);
reg = readl(gate->reg); if (((val >> bit_idx) & 1) == 1)
if (((reg >> gate->bit_idx) & 1) == 1)
return 1; return 1;
return 0; return 0;
} }
static int clk_gate2_is_enabled(struct clk_hw *hw)
{
struct clk_gate2 *gate = to_clk_gate2(hw);
if (gate->share_count)
return !!(*gate->share_count);
else
return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx);
}
static struct clk_ops clk_gate2_ops = { static struct clk_ops clk_gate2_ops = {
.enable = clk_gate2_enable, .enable = clk_gate2_enable,
.disable = clk_gate2_disable, .disable = clk_gate2_disable,
@ -116,6 +127,10 @@ struct clk *clk_register_gate2(struct device *dev, const char *name,
gate->bit_idx = bit_idx; gate->bit_idx = bit_idx;
gate->flags = clk_gate2_flags; gate->flags = clk_gate2_flags;
gate->lock = lock; gate->lock = lock;
/* Initialize share_count per hardware state */
if (share_count)
*share_count = clk_gate2_reg_is_enabled(reg, bit_idx) ? 1 : 0;
gate->share_count = share_count; gate->share_count = share_count;
init.name = name; init.name = name;

View File

@ -70,7 +70,7 @@ static const char *cko_sels[] = { "cko1", "cko2", };
static const char *lvds_sels[] = { static const char *lvds_sels[] = {
"dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
"pll4_audio", "pll5_video", "pll8_mlb", "enet_ref", "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
"pcie_ref", "sata_ref", "pcie_ref_125m", "sata_ref_100m",
}; };
enum mx6q_clks { enum mx6q_clks {
@ -491,7 +491,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
/* All existing boards with PCIe use LVDS1 */ /* All existing boards with PCIe use LVDS1 */
if (IS_ENABLED(CONFIG_PCI_IMX6)) if (IS_ENABLED(CONFIG_PCI_IMX6))
clk_set_parent(clk[lvds1_sel], clk[sata_ref]); clk_set_parent(clk[lvds1_sel], clk[sata_ref_100m]);
/* Set initial power mode */ /* Set initial power mode */
imx6q_set_lpm(WAIT_CLOCKED); imx6q_set_lpm(WAIT_CLOCKED);

View File

@ -7,7 +7,7 @@ CFLAGS_pmsu.o := -march=armv7-a
obj-y += system-controller.o mvebu-soc-id.o obj-y += system-controller.o mvebu-soc-id.o
ifeq ($(CONFIG_MACH_MVEBU_V7),y) ifeq ($(CONFIG_MACH_MVEBU_V7),y)
obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o
obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
endif endif

View File

@ -23,6 +23,7 @@
#include <linux/mbus.h> #include <linux/mbus.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/irqchip.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
@ -71,15 +72,21 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr,
return 1; return 1;
} }
static void __init mvebu_timer_and_clk_init(void) static void __init mvebu_init_irq(void)
{ {
of_clk_init(NULL); irqchip_init();
clocksource_of_init();
mvebu_scu_enable(); mvebu_scu_enable();
coherency_init(); coherency_init();
BUG_ON(mvebu_mbus_dt_init(coherency_available())); BUG_ON(mvebu_mbus_dt_init(coherency_available()));
}
static void __init external_abort_quirk(void)
{
u32 dev, rev;
if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV)
return;
if (of_machine_is_compatible("marvell,armada375"))
hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0, hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
"imprecise external abort"); "imprecise external abort");
} }
@ -169,8 +176,10 @@ static void __init mvebu_dt_init(void)
{ {
if (of_machine_is_compatible("plathome,openblocks-ax3-4")) if (of_machine_is_compatible("plathome,openblocks-ax3-4"))
i2c_quirk(); i2c_quirk();
if (of_machine_is_compatible("marvell,a375-db")) if (of_machine_is_compatible("marvell,a375-db")) {
external_abort_quirk();
thermal_quirk(); thermal_quirk();
}
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
@ -185,7 +194,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
.l2c_aux_mask = ~0, .l2c_aux_mask = ~0,
.smp = smp_ops(armada_xp_smp_ops), .smp = smp_ops(armada_xp_smp_ops),
.init_machine = mvebu_dt_init, .init_machine = mvebu_dt_init,
.init_time = mvebu_timer_and_clk_init, .init_irq = mvebu_init_irq,
.restart = mvebu_restart, .restart = mvebu_restart,
.dt_compat = armada_370_xp_dt_compat, .dt_compat = armada_370_xp_dt_compat,
MACHINE_END MACHINE_END
@ -198,7 +207,7 @@ static const char * const armada_375_dt_compat[] = {
DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
.l2c_aux_val = 0, .l2c_aux_val = 0,
.l2c_aux_mask = ~0, .l2c_aux_mask = ~0,
.init_time = mvebu_timer_and_clk_init, .init_irq = mvebu_init_irq,
.init_machine = mvebu_dt_init, .init_machine = mvebu_dt_init,
.restart = mvebu_restart, .restart = mvebu_restart,
.dt_compat = armada_375_dt_compat, .dt_compat = armada_375_dt_compat,
@ -213,7 +222,7 @@ static const char * const armada_38x_dt_compat[] = {
DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
.l2c_aux_val = 0, .l2c_aux_val = 0,
.l2c_aux_mask = ~0, .l2c_aux_mask = ~0,
.init_time = mvebu_timer_and_clk_init, .init_irq = mvebu_init_irq,
.restart = mvebu_restart, .restart = mvebu_restart,
.dt_compat = armada_38x_dt_compat, .dt_compat = armada_38x_dt_compat,
MACHINE_END MACHINE_END

View File

@ -292,6 +292,10 @@ static struct notifier_block mvebu_hwcc_nb = {
.notifier_call = mvebu_hwcc_notifier, .notifier_call = mvebu_hwcc_notifier,
}; };
static struct notifier_block mvebu_hwcc_pci_nb = {
.notifier_call = mvebu_hwcc_notifier,
};
static void __init armada_370_coherency_init(struct device_node *np) static void __init armada_370_coherency_init(struct device_node *np)
{ {
struct resource res; struct resource res;
@ -427,7 +431,7 @@ static int __init coherency_pci_init(void)
{ {
if (coherency_available()) if (coherency_available())
bus_register_notifier(&pci_bus_type, bus_register_notifier(&pci_bus_type,
&mvebu_hwcc_nb); &mvebu_hwcc_pci_nb);
return 0; return 0;
} }

View File

@ -15,6 +15,8 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/assembler.h>
__CPUINIT __CPUINIT
#define CPU_RESUME_ADDR_REG 0xf10182d4 #define CPU_RESUME_ADDR_REG 0xf10182d4
@ -22,13 +24,18 @@
.global armada_375_smp_cpu1_enable_code_end .global armada_375_smp_cpu1_enable_code_end
armada_375_smp_cpu1_enable_code_start: armada_375_smp_cpu1_enable_code_start:
ldr r0, [pc, #4] ARM_BE8(setend be)
adr r0, 1f
ldr r0, [r0]
ldr r1, [r0] ldr r1, [r0]
ARM_BE8(rev r1, r1)
mov pc, r1 mov pc, r1
1:
.word CPU_RESUME_ADDR_REG .word CPU_RESUME_ADDR_REG
armada_375_smp_cpu1_enable_code_end: armada_375_smp_cpu1_enable_code_end:
ENTRY(mvebu_cortex_a9_secondary_startup) ENTRY(mvebu_cortex_a9_secondary_startup)
ARM_BE8(setend be)
bl v7_invalidate_l1 bl v7_invalidate_l1
b secondary_startup b secondary_startup
ENDPROC(mvebu_cortex_a9_secondary_startup) ENDPROC(mvebu_cortex_a9_secondary_startup)

View File

@ -66,6 +66,8 @@ static void __iomem *pmsu_mp_base;
extern void ll_disable_coherency(void); extern void ll_disable_coherency(void);
extern void ll_enable_coherency(void); extern void ll_enable_coherency(void);
extern void armada_370_xp_cpu_resume(void);
static struct platform_device armada_xp_cpuidle_device = { static struct platform_device armada_xp_cpuidle_device = {
.name = "cpuidle-armada-370-xp", .name = "cpuidle-armada-370-xp",
}; };
@ -140,13 +142,6 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void)
writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL); writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL);
} }
static void armada_370_xp_cpu_resume(void)
{
asm volatile("bl ll_add_cpu_to_smp_group\n\t"
"bl ll_enable_coherency\n\t"
"b cpu_resume\n\t");
}
/* No locking is needed because we only access per-CPU registers */ /* No locking is needed because we only access per-CPU registers */
void armada_370_xp_pmsu_idle_prepare(bool deepidle) void armada_370_xp_pmsu_idle_prepare(bool deepidle)
{ {
@ -206,12 +201,12 @@ static noinline int do_armada_370_xp_cpu_suspend(unsigned long deepidle)
/* Test the CR_C bit and set it if it was cleared */ /* Test the CR_C bit and set it if it was cleared */
asm volatile( asm volatile(
"mrc p15, 0, %0, c1, c0, 0 \n\t" "mrc p15, 0, r0, c1, c0, 0 \n\t"
"tst %0, #(1 << 2) \n\t" "tst r0, #(1 << 2) \n\t"
"orreq %0, %0, #(1 << 2) \n\t" "orreq r0, r0, #(1 << 2) \n\t"
"mcreq p15, 0, %0, c1, c0, 0 \n\t" "mcreq p15, 0, r0, c1, c0, 0 \n\t"
"isb " "isb "
: : "r" (0)); : : : "r0");
pr_warn("Failed to suspend the system\n"); pr_warn("Failed to suspend the system\n");

View File

@ -0,0 +1,25 @@
/*
* Copyright (C) 2014 Marvell
*
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Gregory Clement <gregory.clement@free-electrons.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
/*
* This is the entry point through which CPUs exiting cpuidle deep
* idle state are going.
*/
ENTRY(armada_370_xp_cpu_resume)
ARM_BE8(setend be ) @ go BE8 if entered LE
bl ll_add_cpu_to_smp_group
bl ll_enable_coherency
b cpu_resume
ENDPROC(armada_370_xp_cpu_resume)

View File

@ -110,14 +110,16 @@ obj-y += prm_common.o cm_common.o
obj-$(CONFIG_ARCH_OMAP2) += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o obj-$(CONFIG_ARCH_OMAP2) += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o
omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \ omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \
prcm_mpu44xx.o prminst44xx.o \ prcm_mpu44xx.o prminst44xx.o \
vc44xx_data.o vp44xx_data.o vc44xx_data.o vp44xx_data.o
obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common) obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common)
obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common) obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common)
obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common) obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common)
obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common) am33xx-43xx-prcm-common += prm33xx.o cm33xx.o
obj-$(CONFIG_SOC_AM33XX) += $(am33xx-43xx-prcm-common)
obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common) \
$(am33xx-43xx-prcm-common)
# OMAP voltage domains # OMAP voltage domains
voltagedomain-common := voltage.o vc.o vp.o voltagedomain-common := voltage.o vc.o vp.o

View File

@ -76,7 +76,7 @@
* (assuming that it is counting N upwards), or -2 if the enclosing loop * (assuming that it is counting N upwards), or -2 if the enclosing loop
* should skip to the next iteration (again assuming N is increasing). * should skip to the next iteration (again assuming N is increasing).
*/ */
static int _dpll_test_fint(struct clk_hw_omap *clk, u8 n) static int _dpll_test_fint(struct clk_hw_omap *clk, unsigned int n)
{ {
struct dpll_data *dd; struct dpll_data *dd;
long fint, fint_min, fint_max; long fint, fint_min, fint_max;

View File

@ -26,11 +26,14 @@
#define OMAP3430_EN_WDT3_SHIFT 12 #define OMAP3430_EN_WDT3_SHIFT 12
#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK (1 << 0) #define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK (1 << 0)
#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT 0 #define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT 0
#define OMAP3430_IVA2_DPLL_FREQSEL_SHIFT 4
#define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4) #define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4)
#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3 #define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3
#define OMAP3430_EN_IVA2_DPLL_SHIFT 0
#define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0) #define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0)
#define OMAP3430_ST_IVA2_SHIFT 0 #define OMAP3430_ST_IVA2_SHIFT 0
#define OMAP3430_ST_IVA2_CLK_MASK (1 << 0) #define OMAP3430_ST_IVA2_CLK_MASK (1 << 0)
#define OMAP3430_AUTO_IVA2_DPLL_SHIFT 0
#define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0) #define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0)
#define OMAP3430_IVA2_CLK_SRC_SHIFT 19 #define OMAP3430_IVA2_CLK_SRC_SHIFT 19
#define OMAP3430_IVA2_CLK_SRC_WIDTH 3 #define OMAP3430_IVA2_CLK_SRC_WIDTH 3

View File

@ -380,7 +380,7 @@ void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs);
void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs); void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs);
void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs); void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs);
#ifdef CONFIG_SOC_AM33XX #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs, extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs,
u16 clkctrl_offs); u16 clkctrl_offs);
extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs, extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs,

View File

@ -162,7 +162,8 @@ static inline void omap3xxx_restart(enum reboot_mode mode, const char *cmd)
} }
#endif #endif
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX)
void omap44xx_restart(enum reboot_mode mode, const char *cmd); void omap44xx_restart(enum reboot_mode mode, const char *cmd);
#else #else
static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd) static inline void omap44xx_restart(enum reboot_mode mode, const char *cmd)
@ -248,7 +249,6 @@ static inline void __iomem *omap4_get_scu_base(void)
} }
#endif #endif
extern void __init gic_init_irq(void);
extern void gic_dist_disable(void); extern void gic_dist_disable(void);
extern void gic_dist_enable(void); extern void gic_dist_enable(void);
extern bool gic_dist_disabled(void); extern bool gic_dist_disabled(void);

View File

@ -297,33 +297,6 @@ static void omap_init_audio(void)
static inline void omap_init_audio(void) {} static inline void omap_init_audio(void) {}
#endif #endif
#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
static struct platform_device omap_hdmi_audio = {
.name = "omap-hdmi-audio",
.id = -1,
};
static void __init omap_init_hdmi_audio(void)
{
struct omap_hwmod *oh;
struct platform_device *pdev;
oh = omap_hwmod_lookup("dss_hdmi");
if (!oh)
return;
pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
WARN(IS_ERR(pdev),
"Can't build omap_device for omap-hdmi-audio-dai.\n");
platform_device_register(&omap_hdmi_audio);
}
#else
static inline void omap_init_hdmi_audio(void) {}
#endif
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
#include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/platform_data/spi-omap2-mcspi.h>
@ -459,7 +432,6 @@ static int __init omap2_init_devices(void)
*/ */
omap_init_audio(); omap_init_audio();
omap_init_camera(); omap_init_camera();
omap_init_hdmi_audio();
omap_init_mbox(); omap_init_mbox();
/* If dtb is there, the devices will be created dynamically */ /* If dtb is there, the devices will be created dynamically */
if (!of_have_populated_dt()) { if (!of_have_populated_dt()) {

View File

@ -29,6 +29,7 @@
#ifdef CONFIG_TIDSPBRIDGE_DVFS #ifdef CONFIG_TIDSPBRIDGE_DVFS
#include "omap-pm.h" #include "omap-pm.h"
#endif #endif
#include "soc.h"
#include <linux/platform_data/dsp-omap.h> #include <linux/platform_data/dsp-omap.h>
@ -59,6 +60,9 @@ void __init omap_dsp_reserve_sdram_memblock(void)
phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE;
phys_addr_t paddr; phys_addr_t paddr;
if (!cpu_is_omap34xx())
return;
if (!size) if (!size)
return; return;
@ -83,6 +87,9 @@ static int __init omap_dsp_init(void)
int err = -ENOMEM; int err = -ENOMEM;
struct omap_dsp_platform_data *pdata = &omap_dsp_pdata; struct omap_dsp_platform_data *pdata = &omap_dsp_pdata;
if (!cpu_is_omap34xx())
return 0;
pdata->phys_mempool_base = omap_dsp_get_mempool_base(); pdata->phys_mempool_base = omap_dsp_get_mempool_base();
if (pdata->phys_mempool_base) { if (pdata->phys_mempool_base) {
@ -115,6 +122,9 @@ module_init(omap_dsp_init);
static void __exit omap_dsp_exit(void) static void __exit omap_dsp_exit(void)
{ {
if (!cpu_is_omap34xx())
return;
platform_device_unregister(omap_dsp_pdev); platform_device_unregister(omap_dsp_pdev);
} }
module_exit(omap_dsp_exit); module_exit(omap_dsp_exit);

View File

@ -1615,7 +1615,7 @@ static int gpmc_probe_dt(struct platform_device *pdev)
return ret; return ret;
} }
for_each_child_of_node(pdev->dev.of_node, child) { for_each_available_child_of_node(pdev->dev.of_node, child) {
if (!child->name) if (!child->name)
continue; continue;

View File

@ -649,6 +649,18 @@ void __init dra7xxx_check_revision(void)
} }
break; break;
case 0xb9bc:
switch (rev) {
case 0:
omap_revision = DRA722_REV_ES1_0;
break;
default:
/* If we have no new revisions */
omap_revision = DRA722_REV_ES1_0;
break;
}
break;
default: default:
/* Unknown default to latest silicon rev as default*/ /* Unknown default to latest silicon rev as default*/
pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n", pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",

View File

@ -183,7 +183,9 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition,
m0_entry = mux->muxnames[0]; m0_entry = mux->muxnames[0];
/* First check for full name in mode0.muxmode format */ /* First check for full name in mode0.muxmode format */
if (mode0_len && strncmp(muxname, m0_entry, mode0_len)) if (mode0_len)
if (strncmp(muxname, m0_entry, mode0_len) ||
(strlen(m0_entry) != mode0_len))
continue; continue;
/* Then check for muxmode only */ /* Then check for muxmode only */

View File

@ -102,26 +102,6 @@ void __init omap_barriers_init(void)
{} {}
#endif #endif
void __init gic_init_irq(void)
{
void __iomem *omap_irq_base;
/* Static mapping, never released */
gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
BUG_ON(!gic_dist_base_addr);
twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_4K);
BUG_ON(!twd_base);
/* Static mapping, never released */
omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
BUG_ON(!omap_irq_base);
omap_wakeupgen_init();
gic_init(0, 29, gic_dist_base_addr, omap_irq_base);
}
void gic_dist_disable(void) void gic_dist_disable(void)
{ {
if (gic_dist_base_addr) if (gic_dist_base_addr)

View File

@ -4251,9 +4251,9 @@ void __init omap_hwmod_init(void)
soc_ops.enable_module = _omap4_enable_module; soc_ops.enable_module = _omap4_enable_module;
soc_ops.disable_module = _omap4_disable_module; soc_ops.disable_module = _omap4_disable_module;
soc_ops.wait_target_ready = _omap4_wait_target_ready; soc_ops.wait_target_ready = _omap4_wait_target_ready;
soc_ops.assert_hardreset = _omap4_assert_hardreset; soc_ops.assert_hardreset = _am33xx_assert_hardreset;
soc_ops.deassert_hardreset = _omap4_deassert_hardreset; soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted; soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;
soc_ops.init_clkdm = _init_clkdm; soc_ops.init_clkdm = _init_clkdm;
} else if (soc_is_am33xx()) { } else if (soc_is_am33xx()) {
soc_ops.enable_module = _am33xx_enable_module; soc_ops.enable_module = _am33xx_enable_module;

View File

@ -2020,6 +2020,77 @@ static struct omap_hwmod omap54xx_wd_timer2_hwmod = {
}, },
}; };
/*
* 'ocp2scp' class
* bridge to transform ocp interface protocol to scp (serial control port)
* protocol
*/
/* ocp2scp3 */
static struct omap_hwmod omap54xx_ocp2scp3_hwmod;
/* l4_cfg -> ocp2scp3 */
static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp3 = {
.master = &omap54xx_l4_cfg_hwmod,
.slave = &omap54xx_ocp2scp3_hwmod,
.clk = "l4_root_clk_div",
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
static struct omap_hwmod omap54xx_ocp2scp3_hwmod = {
.name = "ocp2scp3",
.class = &omap54xx_ocp2scp_hwmod_class,
.clkdm_name = "l3init_clkdm",
.prcm = {
.omap4 = {
.clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
.context_offs = OMAP54XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
.modulemode = MODULEMODE_HWCTRL,
},
},
};
/*
* 'sata' class
* sata: serial ata interface gen2 compliant ( 1 rx/ 1 tx)
*/
static struct omap_hwmod_class_sysconfig omap54xx_sata_sysc = {
.sysc_offs = 0x0000,
.sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
.sysc_fields = &omap_hwmod_sysc_type2,
};
static struct omap_hwmod_class omap54xx_sata_hwmod_class = {
.name = "sata",
.sysc = &omap54xx_sata_sysc,
};
/* sata */
static struct omap_hwmod omap54xx_sata_hwmod = {
.name = "sata",
.class = &omap54xx_sata_hwmod_class,
.clkdm_name = "l3init_clkdm",
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
.main_clk = "func_48m_fclk",
.mpu_rt_idx = 1,
.prcm = {
.omap4 = {
.clkctrl_offs = OMAP54XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
.context_offs = OMAP54XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
.modulemode = MODULEMODE_SWCTRL,
},
},
};
/* l4_cfg -> sata */
static struct omap_hwmod_ocp_if omap54xx_l4_cfg__sata = {
.master = &omap54xx_l4_cfg_hwmod,
.slave = &omap54xx_sata_hwmod,
.clk = "l3_iclk_div",
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
/* /*
* Interfaces * Interfaces
@ -2765,6 +2836,8 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
&omap54xx_l4_cfg__usb_tll_hs, &omap54xx_l4_cfg__usb_tll_hs,
&omap54xx_l4_cfg__usb_otg_ss, &omap54xx_l4_cfg__usb_otg_ss,
&omap54xx_l4_wkup__wd_timer2, &omap54xx_l4_wkup__wd_timer2,
&omap54xx_l4_cfg__ocp2scp3,
&omap54xx_l4_cfg__sata,
NULL, NULL,
}; };

View File

@ -1268,9 +1268,6 @@ static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
}; };
/* sata */ /* sata */
static struct omap_hwmod_opt_clk sata_opt_clks[] = {
{ .role = "ref_clk", .clk = "sata_ref_clk" },
};
static struct omap_hwmod dra7xx_sata_hwmod = { static struct omap_hwmod dra7xx_sata_hwmod = {
.name = "sata", .name = "sata",
@ -1278,6 +1275,7 @@ static struct omap_hwmod dra7xx_sata_hwmod = {
.clkdm_name = "l3init_clkdm", .clkdm_name = "l3init_clkdm",
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
.main_clk = "func_48m_fclk", .main_clk = "func_48m_fclk",
.mpu_rt_idx = 1,
.prcm = { .prcm = {
.omap4 = { .omap4 = {
.clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET, .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
@ -1285,8 +1283,6 @@ static struct omap_hwmod dra7xx_sata_hwmod = {
.modulemode = MODULEMODE_SWCTRL, .modulemode = MODULEMODE_SWCTRL,
}, },
}, },
.opt_clks = sata_opt_clks,
.opt_clks_cnt = ARRAY_SIZE(sata_opt_clks),
}; };
/* /*
@ -1731,8 +1727,20 @@ static struct omap_hwmod dra7xx_uart6_hwmod = {
* *
*/ */
static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
.rev_offs = 0x0000,
.sysc_offs = 0x0010,
.sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
SYSC_HAS_SIDLEMODE),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
.sysc_fields = &omap_hwmod_sysc_type2,
};
static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = { static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
.name = "usb_otg_ss", .name = "usb_otg_ss",
.sysc = &dra7xx_usb_otg_ss_sysc,
}; };
/* usb_otg_ss1 */ /* usb_otg_ss1 */

View File

@ -35,6 +35,8 @@
#define OMAP3430_LOGICSTATEST_MASK (1 << 2) #define OMAP3430_LOGICSTATEST_MASK (1 << 2)
#define OMAP3430_LASTLOGICSTATEENTERED_MASK (1 << 2) #define OMAP3430_LASTLOGICSTATEENTERED_MASK (1 << 2)
#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0) #define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0)
#define OMAP3430_GRPSEL_MCBSP5_MASK (1 << 10)
#define OMAP3430_GRPSEL_MCBSP1_MASK (1 << 9)
#define OMAP3630_GRPSEL_UART4_MASK (1 << 18) #define OMAP3630_GRPSEL_UART4_MASK (1 << 18)
#define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17) #define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17)
#define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16) #define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16)
@ -42,6 +44,10 @@
#define OMAP3430_GRPSEL_GPIO3_MASK (1 << 14) #define OMAP3430_GRPSEL_GPIO3_MASK (1 << 14)
#define OMAP3430_GRPSEL_GPIO2_MASK (1 << 13) #define OMAP3430_GRPSEL_GPIO2_MASK (1 << 13)
#define OMAP3430_GRPSEL_UART3_MASK (1 << 11) #define OMAP3430_GRPSEL_UART3_MASK (1 << 11)
#define OMAP3430_GRPSEL_GPT8_MASK (1 << 9)
#define OMAP3430_GRPSEL_GPT7_MASK (1 << 8)
#define OMAP3430_GRPSEL_GPT6_MASK (1 << 7)
#define OMAP3430_GRPSEL_GPT5_MASK (1 << 6)
#define OMAP3430_GRPSEL_MCBSP4_MASK (1 << 2) #define OMAP3430_GRPSEL_MCBSP4_MASK (1 << 2)
#define OMAP3430_GRPSEL_MCBSP3_MASK (1 << 1) #define OMAP3430_GRPSEL_MCBSP3_MASK (1 << 1)
#define OMAP3430_GRPSEL_MCBSP2_MASK (1 << 0) #define OMAP3430_GRPSEL_MCBSP2_MASK (1 << 0)

View File

@ -462,6 +462,7 @@ IS_OMAP_TYPE(3430, 0x3430)
#define DRA7XX_CLASS 0x07000000 #define DRA7XX_CLASS 0x07000000
#define DRA752_REV_ES1_0 (DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8)) #define DRA752_REV_ES1_0 (DRA7XX_CLASS | (0x52 << 16) | (0x10 << 8))
#define DRA752_REV_ES1_1 (DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8)) #define DRA752_REV_ES1_1 (DRA7XX_CLASS | (0x52 << 16) | (0x11 << 8))
#define DRA722_REV_ES1_0 (DRA7XX_CLASS | (0x22 << 16) | (0x10 << 8))
void omap2xxx_check_revision(void); void omap2xxx_check_revision(void);
void omap3xxx_check_revision(void); void omap3xxx_check_revision(void);

View File

@ -12,8 +12,81 @@
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/io.h>
#include <linux/reboot.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/system_misc.h>
#define SUN4I_WATCHDOG_CTRL_REG 0x00
#define SUN4I_WATCHDOG_CTRL_RESTART BIT(0)
#define SUN4I_WATCHDOG_MODE_REG 0x04
#define SUN4I_WATCHDOG_MODE_ENABLE BIT(0)
#define SUN4I_WATCHDOG_MODE_RESET_ENABLE BIT(1)
#define SUN6I_WATCHDOG1_IRQ_REG 0x00
#define SUN6I_WATCHDOG1_CTRL_REG 0x10
#define SUN6I_WATCHDOG1_CTRL_RESTART BIT(0)
#define SUN6I_WATCHDOG1_CONFIG_REG 0x14
#define SUN6I_WATCHDOG1_CONFIG_RESTART BIT(0)
#define SUN6I_WATCHDOG1_CONFIG_IRQ BIT(1)
#define SUN6I_WATCHDOG1_MODE_REG 0x18
#define SUN6I_WATCHDOG1_MODE_ENABLE BIT(0)
static void __iomem *wdt_base;
static void sun4i_restart(enum reboot_mode mode, const char *cmd)
{
if (!wdt_base)
return;
/* Enable timer and set reset bit in the watchdog */
writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
wdt_base + SUN4I_WATCHDOG_MODE_REG);
/*
* Restart the watchdog. The default (and lowest) interval
* value for the watchdog is 0.5s.
*/
writel(SUN4I_WATCHDOG_CTRL_RESTART, wdt_base + SUN4I_WATCHDOG_CTRL_REG);
while (1) {
mdelay(5);
writel(SUN4I_WATCHDOG_MODE_ENABLE | SUN4I_WATCHDOG_MODE_RESET_ENABLE,
wdt_base + SUN4I_WATCHDOG_MODE_REG);
}
}
static struct of_device_id sunxi_restart_ids[] = {
{ .compatible = "allwinner,sun4i-a10-wdt" },
{ /*sentinel*/ }
};
static void sunxi_setup_restart(void)
{
struct device_node *np;
np = of_find_matching_node(NULL, sunxi_restart_ids);
if (WARN(!np, "unable to setup watchdog restart"))
return;
wdt_base = of_iomap(np, 0);
WARN(!wdt_base, "failed to map watchdog base address");
}
static void __init sunxi_dt_init(void)
{
sunxi_setup_restart();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char * const sunxi_board_dt_compat[] = { static const char * const sunxi_board_dt_compat[] = {
"allwinner,sun4i-a10", "allwinner,sun4i-a10",
@ -23,7 +96,9 @@ static const char * const sunxi_board_dt_compat[] = {
}; };
DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
.init_machine = sunxi_dt_init,
.dt_compat = sunxi_board_dt_compat, .dt_compat = sunxi_board_dt_compat,
.restart = sun4i_restart,
MACHINE_END MACHINE_END
static const char * const sun6i_board_dt_compat[] = { static const char * const sun6i_board_dt_compat[] = {
@ -51,5 +126,7 @@ static const char * const sun7i_board_dt_compat[] = {
}; };
DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family") DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
.init_machine = sunxi_dt_init,
.dt_compat = sun7i_board_dt_compat, .dt_compat = sun7i_board_dt_compat,
.restart = sun4i_restart,
MACHINE_END MACHINE_END

View File

@ -664,7 +664,7 @@ static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, v
static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock) static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
{ {
unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_PART_MASK; unsigned rev = readl_relaxed(base + L2X0_CACHE_ID) & L2X0_CACHE_ID_RTL_MASK;
bool cortex_a9 = read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9; bool cortex_a9 = read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9;
if (rev >= L310_CACHE_ID_RTL_R2P0) { if (rev >= L310_CACHE_ID_RTL_R2P0) {

View File

@ -4,6 +4,7 @@ config ARM64
select ARCH_HAS_OPP select ARCH_HAS_OPP
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_FRAME_POINTERS

View File

@ -56,6 +56,8 @@
#define TASK_SIZE_32 UL(0x100000000) #define TASK_SIZE_32 UL(0x100000000)
#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \
TASK_SIZE_32 : TASK_SIZE_64) TASK_SIZE_32 : TASK_SIZE_64)
#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \
TASK_SIZE_32 : TASK_SIZE_64)
#else #else
#define TASK_SIZE TASK_SIZE_64 #define TASK_SIZE TASK_SIZE_64
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */

View File

@ -292,7 +292,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
#define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \ #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
PMD_TYPE_SECT) PMD_TYPE_SECT)
#ifdef ARM64_64K_PAGES #ifdef CONFIG_ARM64_64K_PAGES
#define pud_sect(pud) (0) #define pud_sect(pud) (0)
#else #else
#define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \ #define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \

View File

@ -21,6 +21,10 @@
#include <uapi/asm/ptrace.h> #include <uapi/asm/ptrace.h>
/* Current Exception Level values, as contained in CurrentEL */
#define CurrentEL_EL1 (1 << 2)
#define CurrentEL_EL2 (2 << 2)
/* AArch32-specific ptrace requests */ /* AArch32-specific ptrace requests */
#define COMPAT_PTRACE_GETREGS 12 #define COMPAT_PTRACE_GETREGS 12
#define COMPAT_PTRACE_SETREGS 13 #define COMPAT_PTRACE_SETREGS 13

View File

@ -78,8 +78,7 @@ ENTRY(efi_stub_entry)
/* Turn off Dcache and MMU */ /* Turn off Dcache and MMU */
mrs x0, CurrentEL mrs x0, CurrentEL
cmp x0, #PSR_MODE_EL2t cmp x0, #CurrentEL_EL2
ccmp x0, #PSR_MODE_EL2h, #0x4, ne
b.ne 1f b.ne 1f
mrs x0, sctlr_el2 mrs x0, sctlr_el2
bic x0, x0, #1 << 0 // clear SCTLR.M bic x0, x0, #1 << 0 // clear SCTLR.M

View File

@ -12,8 +12,6 @@
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/libfdt.h> #include <linux/libfdt.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <generated/compile.h>
#include <generated/utsrelease.h>
/* /*
* AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from

View File

@ -270,8 +270,7 @@ ENDPROC(stext)
*/ */
ENTRY(el2_setup) ENTRY(el2_setup)
mrs x0, CurrentEL mrs x0, CurrentEL
cmp x0, #PSR_MODE_EL2t cmp x0, #CurrentEL_EL2
ccmp x0, #PSR_MODE_EL2h, #0x4, ne
b.ne 1f b.ne 1f
mrs x0, sctlr_el2 mrs x0, sctlr_el2
CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2 CPU_BE( orr x0, x0, #(1 << 25) ) // Set the EE bit for EL2

View File

@ -27,8 +27,10 @@ void __cpu_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
copy_page(kto, kfrom); copy_page(kto, kfrom);
__flush_dcache_area(kto, PAGE_SIZE); __flush_dcache_area(kto, PAGE_SIZE);
} }
EXPORT_SYMBOL_GPL(__cpu_copy_user_page);
void __cpu_clear_user_page(void *kaddr, unsigned long vaddr) void __cpu_clear_user_page(void *kaddr, unsigned long vaddr)
{ {
clear_page(kaddr); clear_page(kaddr);
} }
EXPORT_SYMBOL_GPL(__cpu_clear_user_page);

View File

@ -79,7 +79,8 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr)
return; return;
if (!test_and_set_bit(PG_dcache_clean, &page->flags)) { if (!test_and_set_bit(PG_dcache_clean, &page->flags)) {
__flush_dcache_area(page_address(page), PAGE_SIZE); __flush_dcache_area(page_address(page),
PAGE_SIZE << compound_order(page));
__flush_icache_all(); __flush_icache_all();
} else if (icache_is_aivivt()) { } else if (icache_is_aivivt()) {
__flush_icache_all(); __flush_icache_all();

View File

@ -921,7 +921,8 @@ L(nocon):
jls 1f jls 1f
lsrl #1,%d1 lsrl #1,%d1
1: 1:
movel %d1,m68k_init_mapped_size lea %pc@(m68k_init_mapped_size),%a0
movel %d1,%a0@
mmu_map #PAGE_OFFSET,%pc@(L(phys_kernel_start)),%d1,\ mmu_map #PAGE_OFFSET,%pc@(L(phys_kernel_start)),%d1,\
%pc@(m68k_supervisor_cachemode) %pc@(m68k_supervisor_cachemode)

View File

@ -11,6 +11,7 @@
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/export.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel.h> #include <linux/kernel.h>
@ -30,6 +31,7 @@
unsigned long (*mach_random_get_entropy)(void); unsigned long (*mach_random_get_entropy)(void);
EXPORT_SYMBOL_GPL(mach_random_get_entropy);
/* /*

View File

@ -384,6 +384,7 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
kfree(vcpu->arch.guest_ebase); kfree(vcpu->arch.guest_ebase);
kfree(vcpu->arch.kseg0_commpage); kfree(vcpu->arch.kseg0_commpage);
kfree(vcpu);
} }
void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)

View File

@ -1210,7 +1210,8 @@ static struct hp_hardware hp_hardware_list[] = {
{HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"}, {HPHW_FIO, 0x004, 0x00320, 0x0, "Metheus Frame Buffer"},
{HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"}, {HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"},
{HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"}, {HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"},
{HPHW_FIO, 0x076, 0x000AD, 0x00, "Crestone Peak RS-232"}, {HPHW_FIO, 0x076, 0x000AD, 0x0, "Crestone Peak Core RS-232"},
{HPHW_FIO, 0x077, 0x000AD, 0x0, "Crestone Peak Fast? Core RS-232"},
{HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"}, {HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"},
{HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"}, {HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"},
{HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"}, {HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"},

View File

@ -4,6 +4,7 @@
* Copyright (C) 2000-2001 Hewlett Packard Company * Copyright (C) 2000-2001 Hewlett Packard Company
* Copyright (C) 2000 John Marvin * Copyright (C) 2000 John Marvin
* Copyright (C) 2001 Matthew Wilcox * Copyright (C) 2001 Matthew Wilcox
* Copyright (C) 2014 Helge Deller <deller@gmx.de>
* *
* These routines maintain argument size conversion between 32bit and 64bit * These routines maintain argument size conversion between 32bit and 64bit
* environment. Based heavily on sys_ia32.c and sys_sparc32.c. * environment. Based heavily on sys_ia32.c and sys_sparc32.c.
@ -11,44 +12,8 @@
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/file.h>
#include <linux/signal.h>
#include <linux/resource.h>
#include <linux/times.h>
#include <linux/time.h>
#include <linux/smp.h>
#include <linux/sem.h>
#include <linux/shm.h>
#include <linux/slab.h>
#include <linux/uio.h>
#include <linux/ncp_fs.h>
#include <linux/poll.h>
#include <linux/personality.h>
#include <linux/stat.h>
#include <linux/highmem.h>
#include <linux/highuid.h>
#include <linux/mman.h>
#include <linux/binfmts.h>
#include <linux/namei.h>
#include <linux/vfs.h>
#include <linux/ptrace.h>
#include <linux/swap.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <asm/types.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#undef DEBUG
#ifdef DEBUG
#define DBG(x) printk x
#else
#define DBG(x)
#endif
asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23, asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
int r22, int r21, int r20) int r22, int r21, int r20)
@ -57,3 +22,12 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
current->comm, current->pid, r20); current->comm, current->pid, r20);
return -ENOSYS; return -ENOSYS;
} }
asmlinkage long sys32_fanotify_mark(compat_int_t fanotify_fd, compat_uint_t flags,
compat_uint_t mask0, compat_uint_t mask1, compat_int_t dfd,
const char __user * pathname)
{
return sys_fanotify_mark(fanotify_fd, flags,
((__u64)mask1 << 32) | mask0,
dfd, pathname);
}

View File

@ -418,7 +418,7 @@
ENTRY_SAME(accept4) /* 320 */ ENTRY_SAME(accept4) /* 320 */
ENTRY_SAME(prlimit64) ENTRY_SAME(prlimit64)
ENTRY_SAME(fanotify_init) ENTRY_SAME(fanotify_init)
ENTRY_COMP(fanotify_mark) ENTRY_DIFF(fanotify_mark)
ENTRY_COMP(clock_adjtime) ENTRY_COMP(clock_adjtime)
ENTRY_SAME(name_to_handle_at) /* 325 */ ENTRY_SAME(name_to_handle_at) /* 325 */
ENTRY_COMP(open_by_handle_at) ENTRY_COMP(open_by_handle_at)

View File

@ -145,6 +145,7 @@ config PPC
select HAVE_IRQ_EXIT_ON_IRQ_STACK select HAVE_IRQ_EXIT_ON_IRQ_STACK
select ARCH_USE_CMPXCHG_LOCKREF if PPC64 select ARCH_USE_CMPXCHG_LOCKREF if PPC64
select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_AUDITSYSCALL
select ARCH_SUPPORTS_ATOMIC_RMW
config GENERIC_CSUM config GENERIC_CSUM
def_bool CPU_LITTLE_ENDIAN def_bool CPU_LITTLE_ENDIAN
@ -414,7 +415,7 @@ config KEXEC
config CRASH_DUMP config CRASH_DUMP
bool "Build a kdump crash kernel" bool "Build a kdump crash kernel"
depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP) depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
help help
Build a kernel suitable for use as a kdump capture kernel. Build a kernel suitable for use as a kdump capture kernel.
The same kernel binary can be used as production kernel and dump The same kernel binary can be used as production kernel and dump
@ -1017,6 +1018,7 @@ endmenu
if PPC64 if PPC64
config RELOCATABLE config RELOCATABLE
bool "Build a relocatable kernel" bool "Build a relocatable kernel"
depends on !COMPILE_TEST
select NONSTATIC_KERNEL select NONSTATIC_KERNEL
help help
This builds a kernel image that is capable of running anywhere This builds a kernel image that is capable of running anywhere

View File

@ -19,8 +19,7 @@
#define MMU_FTR_TYPE_40x ASM_CONST(0x00000004) #define MMU_FTR_TYPE_40x ASM_CONST(0x00000004)
#define MMU_FTR_TYPE_44x ASM_CONST(0x00000008) #define MMU_FTR_TYPE_44x ASM_CONST(0x00000008)
#define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010) #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010)
#define MMU_FTR_TYPE_3E ASM_CONST(0x00000020) #define MMU_FTR_TYPE_47x ASM_CONST(0x00000020)
#define MMU_FTR_TYPE_47x ASM_CONST(0x00000040)
/* /*
* This is individual features * This is individual features
@ -106,13 +105,6 @@
MMU_FTR_CI_LARGE_PAGE MMU_FTR_CI_LARGE_PAGE
#define MMU_FTRS_PA6T MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \ #define MMU_FTRS_PA6T MMU_FTRS_DEFAULT_HPTE_ARCH_V2 | \
MMU_FTR_CI_LARGE_PAGE | MMU_FTR_NO_SLBIE_B MMU_FTR_CI_LARGE_PAGE | MMU_FTR_NO_SLBIE_B
#define MMU_FTRS_A2 MMU_FTR_TYPE_3E | MMU_FTR_USE_TLBILX | \
MMU_FTR_USE_TLBIVAX_BCAST | \
MMU_FTR_LOCK_BCAST_INVAL | \
MMU_FTR_USE_TLBRSRV | \
MMU_FTR_USE_PAIRED_MAS | \
MMU_FTR_TLBIEL | \
MMU_FTR_16M_PAGE
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <asm/cputable.h> #include <asm/cputable.h>

View File

@ -61,8 +61,7 @@ struct power_pmu {
#define PPMU_SIAR_VALID 0x00000010 /* Processor has SIAR Valid bit */ #define PPMU_SIAR_VALID 0x00000010 /* Processor has SIAR Valid bit */
#define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */ #define PPMU_HAS_SSLOT 0x00000020 /* Has sampled slot in MMCRA */
#define PPMU_HAS_SIER 0x00000040 /* Has SIER */ #define PPMU_HAS_SIER 0x00000040 /* Has SIER */
#define PPMU_BHRB 0x00000080 /* has BHRB feature enabled */ #define PPMU_ARCH_207S 0x00000080 /* PMC is architecture v2.07S */
#define PPMU_EBB 0x00000100 /* supports event based branch */
/* /*
* Values for flags to get_alternatives() * Values for flags to get_alternatives()

View File

@ -131,7 +131,7 @@ _GLOBAL(power7_nap)
_GLOBAL(power7_sleep) _GLOBAL(power7_sleep)
li r3,1 li r3,1
li r4,0 li r4,1
b power7_powersave_common b power7_powersave_common
/* No return */ /* No return */

View File

@ -747,7 +747,7 @@ int setup_profiling_timer(unsigned int multiplier)
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
/* cpumask of CPUs with asymetric SMT dependancy */ /* cpumask of CPUs with asymetric SMT dependancy */
static const int powerpc_smt_flags(void) static int powerpc_smt_flags(void)
{ {
int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES; int flags = SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES;

View File

@ -127,11 +127,6 @@ BEGIN_FTR_SECTION
stw r10, HSTATE_PMC + 24(r13) stw r10, HSTATE_PMC + 24(r13)
stw r11, HSTATE_PMC + 28(r13) stw r11, HSTATE_PMC + 28(r13)
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_201) END_FTR_SECTION_IFSET(CPU_FTR_ARCH_201)
BEGIN_FTR_SECTION
mfspr r9, SPRN_SIER
std r8, HSTATE_MMCR + 40(r13)
std r9, HSTATE_MMCR + 48(r13)
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
31: 31:
/* /*

View File

@ -410,17 +410,7 @@ void __init mmu_context_init(void)
} else if (mmu_has_feature(MMU_FTR_TYPE_47x)) { } else if (mmu_has_feature(MMU_FTR_TYPE_47x)) {
first_context = 1; first_context = 1;
last_context = 65535; last_context = 65535;
} else } else {
#ifdef CONFIG_PPC_BOOK3E_MMU
if (mmu_has_feature(MMU_FTR_TYPE_3E)) {
u32 mmucfg = mfspr(SPRN_MMUCFG);
u32 pid_bits = (mmucfg & MMUCFG_PIDSIZE_MASK)
>> MMUCFG_PIDSIZE_SHIFT;
first_context = 1;
last_context = (1UL << (pid_bits + 1)) - 1;
} else
#endif
{
first_context = 1; first_context = 1;
last_context = 255; last_context = 255;
} }

View File

@ -390,12 +390,16 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
case BPF_ANC | SKF_AD_VLAN_TAG: case BPF_ANC | SKF_AD_VLAN_TAG:
case BPF_ANC | SKF_AD_VLAN_TAG_PRESENT: case BPF_ANC | SKF_AD_VLAN_TAG_PRESENT:
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2); BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2);
BUILD_BUG_ON(VLAN_TAG_PRESENT != 0x1000);
PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, PPC_LHZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
vlan_tci)); vlan_tci));
if (code == (BPF_ANC | SKF_AD_VLAN_TAG)) if (code == (BPF_ANC | SKF_AD_VLAN_TAG)) {
PPC_ANDI(r_A, r_A, VLAN_VID_MASK); PPC_ANDI(r_A, r_A, ~VLAN_TAG_PRESENT);
else } else {
PPC_ANDI(r_A, r_A, VLAN_TAG_PRESENT); PPC_ANDI(r_A, r_A, VLAN_TAG_PRESENT);
PPC_SRWI(r_A, r_A, 12);
}
break; break;
case BPF_ANC | SKF_AD_QUEUE: case BPF_ANC | SKF_AD_QUEUE:
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff,

View File

@ -485,7 +485,7 @@ static bool is_ebb_event(struct perf_event *event)
* check that the PMU supports EBB, meaning those that don't can still * check that the PMU supports EBB, meaning those that don't can still
* use bit 63 of the event code for something else if they wish. * use bit 63 of the event code for something else if they wish.
*/ */
return (ppmu->flags & PPMU_EBB) && return (ppmu->flags & PPMU_ARCH_207S) &&
((event->attr.config >> PERF_EVENT_CONFIG_EBB_SHIFT) & 1); ((event->attr.config >> PERF_EVENT_CONFIG_EBB_SHIFT) & 1);
} }
@ -777,7 +777,7 @@ void perf_event_print_debug(void)
if (ppmu->flags & PPMU_HAS_SIER) if (ppmu->flags & PPMU_HAS_SIER)
sier = mfspr(SPRN_SIER); sier = mfspr(SPRN_SIER);
if (ppmu->flags & PPMU_EBB) { if (ppmu->flags & PPMU_ARCH_207S) {
pr_info("MMCR2: %016lx EBBHR: %016lx\n", pr_info("MMCR2: %016lx EBBHR: %016lx\n",
mfspr(SPRN_MMCR2), mfspr(SPRN_EBBHR)); mfspr(SPRN_MMCR2), mfspr(SPRN_EBBHR));
pr_info("EBBRR: %016lx BESCR: %016lx\n", pr_info("EBBRR: %016lx BESCR: %016lx\n",
@ -996,7 +996,22 @@ static void power_pmu_read(struct perf_event *event)
} while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev); } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev);
local64_add(delta, &event->count); local64_add(delta, &event->count);
local64_sub(delta, &event->hw.period_left);
/*
* A number of places program the PMC with (0x80000000 - period_left).
* We never want period_left to be less than 1 because we will program
* the PMC with a value >= 0x800000000 and an edge detected PMC will
* roll around to 0 before taking an exception. We have seen this
* on POWER8.
*
* To fix this, clamp the minimum value of period_left to 1.
*/
do {
prev = local64_read(&event->hw.period_left);
val = prev - delta;
if (val < 1)
val = 1;
} while (local64_cmpxchg(&event->hw.period_left, prev, val) != prev);
} }
/* /*
@ -1300,6 +1315,9 @@ static void power_pmu_enable(struct pmu *pmu)
write_mmcr0(cpuhw, mmcr0); write_mmcr0(cpuhw, mmcr0);
if (ppmu->flags & PPMU_ARCH_207S)
mtspr(SPRN_MMCR2, 0);
/* /*
* Enable instruction sampling if necessary * Enable instruction sampling if necessary
*/ */
@ -1696,7 +1714,7 @@ static int power_pmu_event_init(struct perf_event *event)
if (has_branch_stack(event)) { if (has_branch_stack(event)) {
/* PMU has BHRB enabled */ /* PMU has BHRB enabled */
if (!(ppmu->flags & PPMU_BHRB)) if (!(ppmu->flags & PPMU_ARCH_207S))
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }

View File

@ -792,7 +792,7 @@ static struct power_pmu power8_pmu = {
.get_constraint = power8_get_constraint, .get_constraint = power8_get_constraint,
.get_alternatives = power8_get_alternatives, .get_alternatives = power8_get_alternatives,
.disable_pmc = power8_disable_pmc, .disable_pmc = power8_disable_pmc,
.flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_BHRB | PPMU_EBB, .flags = PPMU_HAS_SSLOT | PPMU_HAS_SIER | PPMU_ARCH_207S,
.n_generic = ARRAY_SIZE(power8_generic_events), .n_generic = ARRAY_SIZE(power8_generic_events),
.generic_events = power8_generic_events, .generic_events = power8_generic_events,
.cache_events = &power8_cache_events, .cache_events = &power8_cache_events,

Some files were not shown because too many files have changed in this diff Show More