]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agomtd: nand: add fields for JEDEC in nand_chip
Huang Shijie [Fri, 21 Feb 2014 05:39:38 +0000 (13:39 +0800)]
mtd: nand: add fields for JEDEC in nand_chip

Add the jedec_version field, and add an anonymous union which
contains the nand_onfi_params and nand_jedec_params.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: nand: add the data structures for JEDEC parameter page
Huang Shijie [Fri, 21 Feb 2014 05:39:37 +0000 (13:39 +0800)]
mtd: nand: add the data structures for JEDEC parameter page

Create the nand_jedec_params{} and jedec_ecc_info{} according to
the JESD230A (Revision of JESD230, October 2012).

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: nand: remove the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE
Huang Shijie [Fri, 20 Dec 2013 16:02:30 +0000 (00:02 +0800)]
mtd: nand: remove the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE

There is no reference to these two macros now.
Just remove them.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: nand: fix erroneous read_buf call in nand_write_page_raw_syndrome
Boris BREZILLON [Sat, 1 Feb 2014 18:10:28 +0000 (19:10 +0100)]
mtd: nand: fix erroneous read_buf call in nand_write_page_raw_syndrome

read_buf is called in place of write_buf in the
nand_write_page_raw_syndrome function.

Signed-off-by: Boris BREZILLON <b.brezillon.dev@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: nand: don't use read_buf for 8-bit ONFI transfers
Brian Norris [Sat, 30 Nov 2013 06:04:28 +0000 (22:04 -0800)]
mtd: nand: don't use read_buf for 8-bit ONFI transfers

Use a repeated read_byte() instead of read_buf(), since for x16 buswidth
devices, we need to avoid the upper I/O[16:9] bits. See the following
commit for reference:

commit 05f7835975dad6b3b517f9e23415985e648fb875
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date:   Thu Dec 5 22:22:04 2013 +0100

    mtd: nand: don't use {read,write}_buf for 8-bit transfers

Now, I think that all barriers to probing ONFI on x16 devices are
removed, so remove the check from nand_flash_detect_onfi().

Tested on 8-bit ONFI NAND (Micron MT29F32G08CBADAWP).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-By: Pekon Gupta <pekon@ti.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: nand: force NAND_CMD_READID onto 8-bit bus
Brian Norris [Wed, 29 Jan 2014 22:08:12 +0000 (14:08 -0800)]
mtd: nand: force NAND_CMD_READID onto 8-bit bus

The NAND command helpers tend to automatically shift the column address
for x16 bus devices, since most commands expect a word address, not a
byte address. The Read ID command, however, expects an 8-bit address
(i.e., 0x00, 0x20, or 0x40 should not be translated to 0x00, 0x10, or
0x20).

This fixes the column address for a few drivers which imitate the
nand_base defaults. Note that I don't touch sh_flctl.c, since it already
handles this problem slightly differently (note its comment "READID is
always performed using an 8-bit bus").

I have not tested this patch, as I only have x8 parts up for testing at
this point. Hopefully that can change soon...

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-By: Pekon Gupta <pekon@ti.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: nand: kill the the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE for nand_buffers{}
Huang Shijie [Mon, 13 Jan 2014 06:27:12 +0000 (14:27 +0800)]
mtd: nand: kill the the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE for nand_buffers{}

The patch converts the arrays to buffer pointers for nand_buffers{}.

The cafe_nand.c is the only NAND_OWN_BUFFERS user which allocates
nand_buffers{} itself.

This patch disables the DMA for nand_scan_ident, and restores the DMA
status after we finish the nand_scan_ident. This way, we can get page
size and OOB size and use them to allocate cafe->dmabuf.

Since the cafe_nand.c uses the NAND_ECC_HW_SYNDROME ECC mode, we do not
allocate the buffers for @ecccalc and @ecccode.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agoENGR00317981: ARM: remove DEBUG_LL from imx_v7_defconfig
Shawn Guo [Tue, 17 Jun 2014 06:02:40 +0000 (14:02 +0800)]
ENGR00317981: ARM: remove DEBUG_LL from imx_v7_defconfig

The CONFIG_DEBUG_LL should only be enabled for debugging early boot
issue on particular board.  Let's drop it from defconfig.

Note, CONFIG_MTD_M25P80 is dropped by running savedefconfig.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: ARM: enable SOC_IMX6SX in imx_v7_defconfig
Shawn Guo [Tue, 17 Jun 2014 05:34:09 +0000 (13:34 +0800)]
ENGR00317981: ARM: enable SOC_IMX6SX in imx_v7_defconfig

Enable i.MX6 SoloX support in imx_v7_defconfig.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: ARM: dts: imx6sx: tempmon is not compatiable with imx6q
Shawn Guo [Tue, 17 Jun 2014 05:27:16 +0000 (13:27 +0800)]
ENGR00317981: ARM: dts: imx6sx: tempmon is not compatiable with imx6q

The TEMPMON on imx6q has only one alarm value to program, while the one
on imx6sx support 3, Panic, High and Low.  So let's drop
fsl,imx6q-tempmon from its compatible.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx: add initial imx6sx-sdb board support
Shawn Guo [Tue, 13 May 2014 13:43:36 +0000 (21:43 +0800)]
ARM: dts: imx: add initial imx6sx-sdb board support

Add initial imx6sx-sdb board support with limited devices enabled.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit eeaa11f9ee61 from community IMX tree]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/boot/dts/Makefile

9 years agoARM: dts: imx: add initial imx6sx device tree source
Shawn Guo [Tue, 13 May 2014 12:21:35 +0000 (20:21 +0800)]
ARM: dts: imx: add initial imx6sx device tree source

Add initial device tree source for i.MX6 SoloX SoC.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit ab6c4d16a3b9 from community IMX tree]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx: add pin function header for imx6sx
Shawn Guo [Sun, 11 May 2014 13:59:26 +0000 (21:59 +0800)]
ARM: dts: imx: add pin function header for imx6sx

Add pin function header for i.MX6 SoloX SoC.

[shawn.guo: cherry-pick commit 51518f11f174 from community IMX tree]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: add basic imx6sx SoC support
Shawn Guo [Tue, 13 May 2014 13:46:16 +0000 (21:46 +0800)]
ARM: imx: add basic imx6sx SoC support

Add basic suppport for i.MX6 SoloX SoC.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit d9654dceb315 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: add clock driver for imx6sx
Anson Huang [Sun, 11 May 2014 14:47:09 +0000 (22:47 +0800)]
ARM: imx: add clock driver for imx6sx

Add clock driver for i.MX6 SoloX SoC.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit d55135689019 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: add low-level debug support for imx6sx
Shawn Guo [Sun, 11 May 2014 13:53:48 +0000 (21:53 +0800)]
ARM: imx: add low-level debug support for imx6sx

Enable low-level debug support for i.MX6 SoloX by adding the debug
port definitions for the SoC.

[shawn.guo: cherry-pick commit 74368e81b119 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agopinctrl: add pinctrl driver for imx6sx
Anson Huang [Mon, 12 May 2014 15:10:35 +0000 (23:10 +0800)]
pinctrl: add pinctrl driver for imx6sx

Add a pinctrl driver for i.MX6 SoloX based on pinctrl-imx core
driver.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[shawn.guo: cherry-pick commit 2cc140fe3607 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: factor device tree timer initialization
Gilles Chanteperdrix [Sat, 5 Apr 2014 15:57:45 +0000 (17:57 +0200)]
ARM: imx: factor device tree timer initialization

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
[shawn.guo: cherry-pick commit 876292d66791 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/mach-imx/clk-imx6sl.c

9 years agoENGR00300890-1 mtd: fix the build error
Huang Shijie [Wed, 26 Feb 2014 04:05:56 +0000 (12:05 +0800)]
ENGR00300890-1 mtd: fix the build error

We may meet the built error:
------------------------------------------------------
drivers/built-in.o: In function `m25p_probe:
clk-composite.c:(.text+0xed7b4): undefined reference to `spi_nor_scan
drivers/built-in.o: In function `.LANCHOR1:
clk-composite.c:(.data+0xe4a0): undefined reference to `spi_nor_ids
make: *** [vmlinux] Error 1
------------------------------------------------------
This error is caused by the missing dependency of SPI NOR framework.

Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoserial: imx: disable the receiver ready interrupt for imx_stop_rx
Huang Shijie [Fri, 23 May 2014 04:32:54 +0000 (12:32 +0800)]
serial: imx: disable the receiver ready interrupt for imx_stop_rx

This patch disables the receiver ready interrupt for imx_stop_rx.
It reduces the interrupt numbers when the uart is going to close
or suspend.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoserial: imx: remove the redundant code
Huang Shijie [Wed, 21 May 2014 01:09:47 +0000 (09:09 +0800)]
serial: imx: remove the redundant code

In the imx_startup(), we will reset the uart port which will reset all
the FIFOs, including the URXD.

So the code to clear the RX FIFO is redundant. Just remove it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoserial: imx: reset the uart port all the time
Huang Shijie [Wed, 21 May 2014 00:56:28 +0000 (08:56 +0800)]
serial: imx: reset the uart port all the time

Current code resets the uart port only when it supports the irda mode.
In actually, we also need to reset the uart port in the non-irda mode.
A hang was caught in the following case:

    UART A transmits data to the other end. But the transmission maybe
    terminated. In some corner case, the TX FIFO maybe not empty.

The kernel will hang at the imx_set_termios():
............................................................
while (!(readl(sport->port.membase + USR2) & USR2_TXDC))
barrier();
............................................................

This patch resets the uart port all the time in the imx_startup().
And fix the hang.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoserial: imx: Disable new features of autobaud detection
Fabio Estevam [Wed, 14 May 2014 18:55:03 +0000 (15:55 -0300)]
serial: imx: Disable new features of autobaud detection

Bit 7 of UCR3 is described in the i.MX reference manuals (with the exception
of i.MX1) as follows:

ADNIMP: Autobaud Detection Not Improved-. Disables new features of
autobaud detection (See Baud Rate Automatic Detection
Protocol, for more details).

0 Autobaud detection new features selected
1 Keep old autobaud detection mechanism

The "new features" mechanism occasionally cause the receiver to get out of sync
and continuously produce received characters of '\xff'.

In order to reproduce the problem:

$ stty -F /dev/ttymxc0 19200

- Change the terminal baudrate to 19200

- Type in the console and it should look good

- Change the terminal baudrate back to 115200

- Type 'b' in the console, then a stream of garbage characters is seen.

Also rename the bit definition as per the reference manual.

Tested on mx6q, mx6dl, mx6solo and mx53.

Based on a patch from Eric Nelson for U-boot.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoserial: imx: Remove init() and exit() platform callbacks
Alexander Shiyan [Sat, 22 Feb 2014 12:01:35 +0000 (16:01 +0400)]
serial: imx: Remove init() and exit() platform callbacks

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoserial: imx: Use dev_name() for request_irq() to distinguish UARTs
Alexander Shiyan [Sat, 22 Feb 2014 12:01:34 +0000 (16:01 +0400)]
serial: imx: Use dev_name() for request_irq() to distinguish UARTs

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoserial: imx: Use devm_ioremap_resource()
Alexander Shiyan [Sat, 22 Feb 2014 12:01:33 +0000 (16:01 +0400)]
serial: imx: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler and
it gives proper codes on errors.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoserial: imx: always wake up the processes in the TX callback
Huang Shijie [Wed, 22 Jan 2014 08:23:37 +0000 (16:23 +0800)]
serial: imx: always wake up the processes in the TX callback

The current code only wakes up the processes when the circle
buffer has less data then the WAKEUP_CHARS.

But sometimes, the circle buffer may has data more then the WAKEUP_CHARS,
in such case, the processes will hang.

This patch makes it always wakes up the processes in the TX callback.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoARM: clk: imx: remove the CLK_SET_RATE_NO_REPARENT for imx_clk_mux_flags
Huang Shijie [Mon, 26 May 2014 07:31:14 +0000 (15:31 +0800)]
ARM: clk: imx: remove the CLK_SET_RATE_NO_REPARENT for imx_clk_mux_flags

The clocks for Quadspi controller may be different when different
NOR flashes are connected to the board.

But the CLK_SET_RATE_NO_REPARENT flag in the current imx_clk_mux_flags
makes the clock do not have the re-parent capability.

This patch removes the CLK_SET_RATE_NO_REPARENT for imx_clk_mux_flags.
It makes the Quadspi happy.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agomtd: nand: add "page" argument for read_subpage hook
Huang Shijie [Fri, 3 Jan 2014 03:01:40 +0000 (11:01 +0800)]
mtd: nand: add "page" argument for read_subpage hook

Add the "page" argument for the read_subpage hook. With this argument,
the implementation of this hook could prints out more accurate information
for debugging.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: gpmi: add gpmi support for imx6sx
Huang Shijie [Thu, 27 Mar 2014 02:43:22 +0000 (10:43 +0800)]
mtd: gpmi: add gpmi support for imx6sx

The gpmi's IP for imx6sx is nearly the same as the gpmi's IP for imx6q,
except the following two new features:

     (1) the new BCH contoller has 62-BIT correcting ECC strength
            (The BCH for imx6q only has 40-BIT ECC strength).

     (2) add the hardware Randomizer support.

This patch does the follow changes:

     (1) add a new macro GPMI_IS_MX6SX to represent the imx6sx's gpmi.

     (2) add a new macro GPMI_IS_MX6.
           We use this macro to initialize the same registers for both
         imx6sx and imx6q, and so on.

     (3) add a new gpmi_devdata instance, the gpmi_devdata_imx6sx, for
         imx6sx.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: gpmi: add gpmi_devdata{} to simplify the code
Huang Shijie [Fri, 21 Mar 2014 10:19:39 +0000 (18:19 +0800)]
mtd: gpmi: add gpmi_devdata{} to simplify the code

More and more chips use the GPMI controller, but these chips may use different
version of the IPs for GPMI and BCH. Different IPs have
 different features, such as the BCH's maximum ECC strength:

     imx23/imx28 -- the BCH's maximum ECC strength is 20
     imx6q       -- the BCH's maximum ECC strength is 40
     imx6sx      -- the BCH's maximum ECC strength is 62

This patch does the following things:

  [1] add a new data structure, gpmi_devdata{}, to store the information for
      each IP. Besides the IP version, we store the following information:
         <1> BCH's maximum ECC strength.
         <2> the maximum chain delay in ns used by the EDO mode.

      but we may add more information in future.

  [2] add the gpmi_devdata_imx{23|28|6q} to replace the gpmi_ids.

  [3] simplify the code by using the ECC strength from gpmi_devdata, such as
      gpmi_check_ecc() and legacy_set_geometry();

  [4] use the maximum chain delay to initialize the EDO mode,
      see gpmi_compute_edo_timing().

  [5] rewrite the macros, such GPMI_IS_MX{23|28|6Q}.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: gpmi: add subpage read support
Huang Shijie [Fri, 3 Jan 2014 03:01:42 +0000 (11:01 +0800)]
mtd: gpmi: add subpage read support

1) Why add the subpage read support?
  The page size of the nand chip becomes larger and larger, the imx6 has to
  supports the 16K page or even bigger page. But sometimes, the upper layer only
  needs a small part of the page, such as 512 bytes or less.

  For example, ubiattach may only read 64 bytes per page.

2) We only enable the subpage read support when it meets the conditions:
   <1> the chip is imx6 (or later chips) which can supports large nand page.
   <2> the size of ECC parity is byte aligned.
       If the size of ECC parity is not byte aligned, the calling of NAND_CMD_RNDOUT
       will fail.

3) What does this patch do?
   This patch will fake a virtual small page for the subpage read, and call the
   gpmi_ecc_read_page() to do the real work.

   In order to fake a virtual small page, the patch changes the BCH registers and
   the bch_geometry{}. After the subpage read finished, we will restore them back.

4) Performace:
    4.1) Tested with Toshiba TC58NVG2S0F(4096 + 224) with the following command:
         #ubiattach /dev/ubi_ctrl -m 4

       The detail information of /dev/mtd4 shows below:
       --------------------------------------------------------------
       #mtdinfo /dev/mtd4
        mtd4
        Name:                           test
        Type:                           nand
        Eraseblock size:                262144 bytes, 256.0 KiB
        Amount of eraseblocks:          1856 (486539264 bytes, 464.0 MiB)
        Minimum input/output unit size: 4096 bytes
        Sub-page size:                  4096 bytes
        OOB size:                       224 bytes
        Character device major/minor:   90:8
        Bad blocks are allowed:         true
        Device is writable:             true
       --------------------------------------------------------------

    4.2) Before this patch:
       --------------------------------------------------------------
       [   94.530495] UBI: attaching mtd4 to ubi0
       [   98.928850] UBI: scanning is finished
       [   98.953594] UBI: attached mtd4 (name "test", size 464 MiB) to ubi0
       [   98.958562] UBI: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
       [   98.964076] UBI: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
       [   98.969518] UBI: VID header offset: 4096 (aligned 4096), data offset: 8192
       [   98.975128] UBI: good PEBs: 1856, bad PEBs: 0, corrupted PEBs: 0
       [   98.979843] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
       [   98.985878] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 2024916145
       [   98.993635] UBI: available PEBs: 0, total reserved PEBs: 1856, PEBs reserved for bad PEB handling: 40
       [   99.001807] UBI: background thread "ubi_bgt0d" started, PID 831
       --------------------------------------------------------------
       The attach time is about 98.9 - 94.5 = 4.4s

    4.3) After this patch:
       --------------------------------------------------------------
       [  286.464906] UBI: attaching mtd4 to ubi0
       [  289.186129] UBI: scanning is finished
       [  289.211416] UBI: attached mtd4 (name "test", size 464 MiB) to ubi0
       [  289.216360] UBI: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
       [  289.221858] UBI: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
       [  289.227293] UBI: VID header offset: 4096 (aligned 4096), data offset: 8192
       [  289.232878] UBI: good PEBs: 1856, bad PEBs: 0, corrupted PEBs: 0
       [  289.237628] UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
       [  289.243553] UBI: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 2024916145
       [  289.251348] UBI: available PEBs: 1812, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40
       [  289.259417] UBI: background thread "ubi_bgt0d" started, PID 847
       --------------------------------------------------------------
       The attach time is about 289.18 - 286.46 = 2.7s

     4.4) The conclusion:
       We achieve (4.4 - 2.7) / 4.4 = 38.6% faster in the ubiattach.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: gpmi: do not use the mtd->writesize
Huang Shijie [Fri, 3 Jan 2014 03:01:41 +0000 (11:01 +0800)]
mtd: gpmi: do not use the mtd->writesize

The nfc_geo->payload_size is equal to the mtd->writesize now,
use the nfc_geo->payload_size to replace the mtd->writesize.

This patch makes preparation for the gpmi's subpage read support.
In the subpage support, the nfc_geo->payload_size maybe smaller then
the mtd->writesize.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agoARM: imx/mxs defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
Brian Norris [Thu, 1 May 2014 06:26:36 +0000 (23:26 -0700)]
ARM: imx/mxs defconfigs: add MTD_SPI_NOR (new dependency for M25P80)

These defconfigs contain the CONFIG_M25P80 symbol, which is now
dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to satisfy
the new dependency.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoDocumentation: spi-nor: rewrite some portions
Brian Norris [Wed, 9 Apr 2014 03:17:04 +0000 (20:17 -0700)]
Documentation: spi-nor: rewrite some portions

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: Enable Dual and Quad SPI read transfers for s25sl032p
Geert Uytterhoeven [Tue, 22 Apr 2014 12:45:32 +0000 (14:45 +0200)]
mtd: spi-nor: Enable Dual and Quad SPI read transfers for s25sl032p

Spansion s25sl032p supports Dual and Quad SPI transfers, hence set the
SPI_NOR_DUAL_READ and SPI_NOR_QUAD_READ flags.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: unify read opcode variants with ST SPI FSM
Brian Norris [Wed, 9 Apr 2014 02:16:49 +0000 (19:16 -0700)]
mtd: spi-nor: unify read opcode variants with ST SPI FSM

serial_flash_cmds.h defines our opcodes a little differently. Let's
borrow its naming, since it's borrowed from the SFDP standard, and it's
more extensible.

This prepares us for merging serial_flash_cmds.h and spi-nor.h opcode
listing.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*
Brian Norris [Wed, 9 Apr 2014 01:15:31 +0000 (18:15 -0700)]
mtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*

Qualify these with a better namespace, and prepare them for use in more
drivers.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: add the copyright information
Huang Shijie [Thu, 10 Apr 2014 08:27:28 +0000 (16:27 +0800)]
mtd: spi-nor: add the copyright information

Add the copyright information for spi-nor.c and spi-nor.h.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: spi-nor: EXPORT symbols which could be used by module drivers
Brian Norris [Wed, 9 Apr 2014 01:22:57 +0000 (18:22 -0700)]
mtd: spi-nor: EXPORT symbols which could be used by module drivers

Fix errors like this:

    ERROR: "spi_nor_ids" [drivers/mtd/devices/m25p80.ko] undefined!
    ERROR: "spi_nor_scan" [drivers/mtd/devices/m25p80.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: fsl-quadspi: fix __iomem annotations
Brian Norris [Thu, 10 Apr 2014 22:49:38 +0000 (15:49 -0700)]
mtd: fsl-quadspi: fix __iomem annotations

This corrects some sparse warnings:

   drivers/mtd/spi-nor/fsl-quadspi.c:281:31: warning: incorrect type in initializer (different address spaces) [sparse]
   drivers/mtd/spi-nor/fsl-quadspi.c:281:31:    expected void *[noderef] <asn:2>base [sparse]
   drivers/mtd/spi-nor/fsl-quadspi.c:281:31:    got void [noderef] <asn:2>*iobase [sparse]
   (etc.)

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: unify read opcode variants with ST SPI FSM
Brian Norris [Wed, 9 Apr 2014 02:16:49 +0000 (19:16 -0700)]
mtd: spi-nor: unify read opcode variants with ST SPI FSM

serial_flash_cmds.h defines our opcodes a little differently. Let's
borrow its naming, since it's borrowed from the SFDP standard, and it's
more extensible.

This prepares us for merging serial_flash_cmds.h and spi-nor.h opcode
listing.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*
Brian Norris [Wed, 9 Apr 2014 01:15:31 +0000 (18:15 -0700)]
mtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*

Qualify these with a better namespace, and prepare them for use in more
drivers.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: unify read opcode variants with ST SPI FSM
Brian Norris [Wed, 9 Apr 2014 02:16:49 +0000 (19:16 -0700)]
mtd: spi-nor: unify read opcode variants with ST SPI FSM

serial_flash_cmds.h defines our opcodes a little differently. Let's
borrow its naming, since it's borrowed from the SFDP standard, and it's
more extensible.

This prepares us for merging serial_flash_cmds.h and spi-nor.h opcode
listing.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*
Brian Norris [Wed, 9 Apr 2014 01:15:31 +0000 (18:15 -0700)]
mtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*

Qualify these with a better namespace, and prepare them for use in more
drivers.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: drop \t after #define
Brian Norris [Wed, 9 Apr 2014 01:10:23 +0000 (18:10 -0700)]
mtd: spi-nor: drop \t after #define

Spacing is a little non-standard here. Fix up tabs vs. spaces.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: Add Freescale QuadSPI driver
Huang Shijie [Mon, 24 Feb 2014 10:37:42 +0000 (18:37 +0800)]
mtd: spi-nor: Add Freescale QuadSPI driver

(0) What is the QuadSPI controller?

    The QuadSPI(Quad Serial Peripheral Interface) acts as an interface to
    one single or two external serial flash devices, each with up to 4
    bidirectional data lines.

(1) The QuadSPI controller is driven by the LUT(Look-up Table) registers.
    The LUT registers are a look-up-table for sequences of instructions.
    A valid sequence consists of four LUT registers.

(2) The definition of the LUT register shows below:

    ---------------------------------------------------
    | INSTR1 | PAD1 | OPRND1 | INSTR0 | PAD0 | OPRND0 |
    ---------------------------------------------------

    There are several types of INSTRx, such as:
CMD : the SPI NOR command.
ADDR : the address for the SPI NOR command.
DUMMY : the dummy cycles needed by the SPI NOR command.
....

    There are several types of PADx, such as:
PAD1 : use a singe I/O line.
PAD2 : use two I/O lines.
PAD4 : use quad I/O lines.
....

(3) Test this driver with the JFFS2 and UBIFS:

    For jffs2:
    -------------
#flash_eraseall /dev/mtd0
#mount -t jffs2 /dev/mtdblock0 tmp
#bonnie++ -d tmp -u 0 -s 10 -r 5

    For ubifs:
    -------------
#flash_eraseall /dev/mtd0
#ubiattach /dev/ubi_ctrl -m 0
#ubimkvol /dev/ubi0 -N test -m
#mount -t ubifs ubi0:test tmp
#bonnie++ -d tmp -u 0 -s 10 -r 5

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agoDocumentation: add the binding file for Freescale QuadSPI driver
Huang Shijie [Mon, 24 Feb 2014 10:37:41 +0000 (18:37 +0800)]
Documentation: add the binding file for Freescale QuadSPI driver

This patch adds the binding file for Freescale QuadSPI driver.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: spi-nor: add a helper to find the spi_device_id
Huang Shijie [Mon, 24 Feb 2014 10:37:40 +0000 (18:37 +0800)]
mtd: spi-nor: add a helper to find the spi_device_id

Add the spi_nor_match_id() to find the proper spi_device_id with the
NOR flash's name in the spi_nor_ids table.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agoDocumentation: add the document for the SPI NOR framework
Huang Shijie [Fri, 28 Feb 2014 07:58:00 +0000 (15:58 +0800)]
Documentation: add the document for the SPI NOR framework

This patch adds the document for the SPI NOR framework.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: spi-nor: add the framework for SPI NOR
Huang Shijie [Mon, 24 Feb 2014 10:37:37 +0000 (18:37 +0800)]
mtd: spi-nor: add the framework for SPI NOR

This patch cloned most of the m25p80.c. In theory, it adds a new spi-nor layer.

Before this patch, the layer is like:

                   MTD
         ------------------------
                  m25p80
         ------------------------
       spi bus driver
         ------------------------
        SPI NOR chip

After this patch, the layer is like:
                   MTD
         ------------------------
                  spi-nor
         ------------------------
                  m25p80
         ------------------------
       spi bus driver
         ------------------------
       SPI NOR chip

With the spi-nor controller driver(Freescale Quadspi), it looks like:
                   MTD
         ------------------------
                  spi-nor
         ------------------------
                fsl-quadspi
         ------------------------
       SPI NOR chip

New APIs:
   spi_nor_scan: used to scan a spi-nor flash.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
[Brian: rebased to include additional m25p_ids[] entry]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: add the basic data structures
Huang Shijie [Mon, 24 Feb 2014 10:37:36 +0000 (18:37 +0800)]
mtd: spi-nor: add the basic data structures

The spi_nor{} is cloned from the m25p{}.
The spi_nor{} can be used by both the m25p80 and spi-nor controller.

We also add the spi_nor_xfer_cfg{} which can be used by the two
fundamental primitives: read_xfer/write_xfer.

 1) the hooks for spi_nor{}:
    @prepare/unpreare: used to do some work before or after the
             read/write/erase/lock/unlock.
    @read_xfer/write_xfer: We can use these two hooks to code all
             the following hooks if the driver tries to implement them
             by itself.
    @read_reg: used to read the registers, such as read status register,
             read configure register.
    @write_reg: used to write the registers, such as write enable,
             erase sector.
    @read_id: read out the ID info.
    @wait_till_ready: wait till the NOR becomes ready.
    @read: read out the data from the NOR.
    @write: write data to the NOR.
    @erase: erase a sector of the NOR.

 2) Add a new field sst_write_second for the SST NOR write.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: spi-nor: copy the SPI NOR commands to a new header file
Huang Shijie [Mon, 24 Feb 2014 10:37:35 +0000 (18:37 +0800)]
mtd: spi-nor: copy the SPI NOR commands to a new header file

This patch adds a new header :spi-nor.h,
and copies all the SPI NOR commands and relative macros into this new header.

This hearder can be used by the m25p80.c and other spi-nor controller,
such as Freescale's Quadspi.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
9 years agomtd: m25p80: Revive dual read support
Geert Uytterhoeven [Tue, 22 Apr 2014 12:45:31 +0000 (14:45 +0200)]
mtd: m25p80: Revive dual read support

Commit 03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
nor framework") accidentally removed support for Dual SPI read transfers.
Add it back.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*
Brian Norris [Wed, 9 Apr 2014 01:15:31 +0000 (18:15 -0700)]
mtd: spi-nor: re-name OPCODE_* to SPINOR_OP_*

Qualify these with a better namespace, and prepare them for use in more
drivers.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: m25p80: use the SPI nor framework
Brian Norris [Thu, 20 Mar 2014 12:00:12 +0000 (05:00 -0700)]
mtd: m25p80: use the SPI nor framework

Use the new SPI nor framework, and rewrite the m25p80:
 (0) remove all the NOR comands.
 (1) change the m25p->command to an array.
 (2) implement the necessary hooks, such as m25p80_read/m25p80_write.

Tested with the m25p32.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
[Brian: rebased]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: m25p80: add Macronix mx66l1g55g 1Gbit SPI flash
Brian Norris [Wed, 29 Jan 2014 21:39:43 +0000 (13:39 -0800)]
mtd: m25p80: add Macronix mx66l1g55g 1Gbit SPI flash

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: m25p80: add support for the Spansion s25fl008k chip
Kuninori Morimoto [Tue, 11 Feb 2014 08:51:18 +0000 (09:51 +0100)]
mtd: m25p80: add support for the Spansion s25fl008k chip

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: m25p80: Use positive logic to check JEDEC ID
Axel Lin [Tue, 21 Jan 2014 07:56:34 +0000 (15:56 +0800)]
mtd: m25p80: Use positive logic to check JEDEC ID

For slightly better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: delete non-required instances of include <linux/init.h>
Paul Gortmaker [Tue, 21 Jan 2014 21:22:52 +0000 (16:22 -0500)]
mtd: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[Brian: dropped one incorrect hunk]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s
Geert Uytterhoeven [Tue, 21 Jan 2014 12:59:19 +0000 (13:59 +0100)]
mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and s25fl512s

Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set the
M25P80_DUAL_READ flag.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agomtd: m25p80: Add dual read support
Geert Uytterhoeven [Tue, 21 Jan 2014 12:59:18 +0000 (13:59 +0100)]
mtd: m25p80: Add dual read support

Add support for Dual SPI read transfers, which is supported by some
Spansion SPI FLASHes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
9 years agoENGR00269945: ARM: dts: add max7310 support for imx6qdl-sabreauto
Shawn Guo [Sun, 14 Jul 2013 14:17:16 +0000 (22:17 +0800)]
ENGR00269945: ARM: dts: add max7310 support for imx6qdl-sabreauto

On imx6qdl-sabreauto board, there are three IO expanders implemented by
max7310, which are all controlled by I2C3.  And GPIO5_4 is steering the
I2C3_SDA availability, while GPIO1_15 is used to reset max7310.

[shawn.guo: cherry-pick commit b938a6cb0d4c from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi

9 years agoENGR00269945: pinctrl: support pinctrl setting assertion via gpios
Shawn Guo [Mon, 15 Jul 2013 08:31:53 +0000 (16:31 +0800)]
ENGR00269945: pinctrl: support pinctrl setting assertion via gpios

It's pretty common that on some reference design or validation boards,
one pin could be used by two devices on board, and the pin route is
controlled by a GPIO.  So to assert the pin for given device, not only
the pinmux controller in SoC needs to be set up properly but also the
GPIO needs to be pulled up/down.

The patch adds support of a device tree property "pinctrl-assert-gpios"
under client device node.  It plays pretty much like a board level pin
multiplexer, and steers the pin route by controlling the GPIOs.  When
client device has the property represent in its node, pinctrl device
tree mapping function will firstly pull up/down the GPIOs to assert the
pins for the device at board level.

[shawn.guo: cherry-pick commit e5a718edab82 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00269945: gpio: pca953x: add device_reset() call
Shawn Guo [Sun, 14 Jul 2013 13:52:38 +0000 (21:52 +0800)]
ENGR00269945: gpio: pca953x: add device_reset() call

The pca953x type of devices, e.g. max7310, may have a reset which needs
to be handled to get the device start working.  Add a device_reset()
call for that, and defer the probe if the reset controller for that is
not ready yet.

[shawn.guo: cherry-pick commit e95dae89011e from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
drivers/gpio/gpio-pca953x.c

9 years agoENGR00269945: select ARCH_HAS_RESET_CONTROLLER for IMX
Shawn Guo [Sun, 14 Jul 2013 13:39:35 +0000 (21:39 +0800)]
ENGR00269945: select ARCH_HAS_RESET_CONTROLLER for IMX

Move ARCH_HAS_RESET_CONTROLLER from HAVE_IMX_SRC to ARCH_MXC to have it
selected for the whole IMX family instead of SRC (System Reset
Controller), since GPIO could be another reset controller in many cases.

[shawn.guo: cherry-pick commit 6d43306b9c80 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/mach-imx/Kconfig

9 years agoENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build
Shawn Guo [Sun, 14 Jul 2013 13:35:49 +0000 (21:35 +0800)]
ENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build

Add dummy device_reset() function for !CONFIG_RESET_CONTROLLER build,
so that we do not have to add #ifdef CONFIG_RESET_CONTROLLER in every
single client device drivers that call the function.

[shawn.guo: cherry-pick commit a9c086f35277 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00269945: reset: build in CONFIG_RESET_GPIO by default
Shawn Guo [Sun, 14 Jul 2013 13:10:37 +0000 (21:10 +0800)]
ENGR00269945: reset: build in CONFIG_RESET_GPIO by default

GPIO is widely used as the reset control for various devices.  Let's
build the support in by default.

[shawn.guo: cherry-pick commit 795fcb3bc5bb from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00269945: reset: register gpio-reset driver in arch_initcall
Shawn Guo [Sun, 14 Jul 2013 12:41:00 +0000 (20:41 +0800)]
ENGR00269945: reset: register gpio-reset driver in arch_initcall

It's a little bit late to register gpio-reset driver at module_init
time, because gpio-reset provides reset control via gpio for other
devices which are mostly probed at module_init time too.  And it
becomes even worse, when the gpio comes from IO expander on I2C bus,
e.g. pca953x.  In that case, gpio-reset needs to be ready before I2C
bus driver which is generally ready at subsys_initcall time.  Let's
register gpio-reset driver in arch_initcall() to have it ready early
enough.

The defer probe mechanism is not used here, because a reset controller
driver should be reasonably registered early than other devices.  More
importantly, defer probe doe not help in some nasty cases, e.g. the
gpio-pca953x device itself needs a reset from gpio-reset driver start
working.

[shawn.guo: cherry-pick commit 7153f05108ef from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoreset: Add driver for gpio-controlled reset pins
Philipp Zabel [Thu, 30 May 2013 09:09:00 +0000 (11:09 +0200)]
reset: Add driver for gpio-controlled reset pins

This driver implements a reset controller device that toggle a gpio
connected to a reset pin of a peripheral IC. The delay between assertion
and de-assertion of the reset signal can be configured via device tree.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
[shawn.guo: cherry-pick commit 27e3604c82cb from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
drivers/reset/Makefile

9 years agoENGR00317981: ARM: add imx_v7_defconfig
Shawn Guo [Mon, 16 Jun 2014 07:19:36 +0000 (15:19 +0800)]
ENGR00317981: ARM: add imx_v7_defconfig

Add a imx defconfig for ARMv7 only build.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00240988: ARM: dts: add gpu nodes for imx6q and imx6dl
Shawn Guo [Fri, 26 Jul 2013 08:50:49 +0000 (16:50 +0800)]
ENGR00240988: ARM: dts: add gpu nodes for imx6q and imx6dl

It adds gpu nodes for imx6q and imx6dl.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit dfbafe2b0b33 from imx_3.10.y, use macro
 for clock IDs and IRQ trigger type, and add power-domains]

9 years agoENGR00240988: ARM: imx6q: add dma_zone_size for GPU limit
Shawn Guo [Wed, 31 Jul 2013 02:24:07 +0000 (10:24 +0800)]
ENGR00240988: ARM: imx6q: add dma_zone_size for GPU limit

GPU has a limit on physical address that it accesses, which must be
below 2GiB.  Since i.MX6Q/DL maps system memory at 0x10000000 (offset
256MiB), we set dma_zone_size as (SZ_2G - SZ_256M) to ensure that.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit f12c42130ab4 from imx_3.10.y]

Conflicts:
arch/arm/mach-imx/Kconfig

9 years agoENGR00240988: ARM: imx6q: add gpu clock initialzatin code
Loren HUANG [Fri, 9 Nov 2012 04:47:10 +0000 (12:47 +0800)]
ENGR00240988: ARM: imx6q: add gpu clock initialzatin code

This is a cherry-pick of commit 80f38bb (ENGR00240988-3 Add gpu clock
initialzatin code) from 3.5.7 kernel.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit c905623ba3f9 from imx_3.10.y, and use
 macro for clock IDs]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: gpu-viv: use runtime pm for VDDPU management
Shawn Guo [Mon, 16 Jun 2014 06:48:01 +0000 (14:48 +0800)]
ENGR00317981: gpu-viv: use runtime pm for VDDPU management

On kernel 3.14, we use generic power domain for VDDPU management.  In
that case, GPU driver does not need to call regulator API to manage
VDDPU anymore.  Instead, it only needs to call runtime pm, which is
already being used by the driver.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: Allow disabling the PU regulator, add a enable ramp delay
Philipp Zabel [Thu, 6 Mar 2014 09:58:48 +0000 (10:58 +0100)]
ARM: dts: imx6qdl: Allow disabling the PU regulator, add a enable ramp delay

The PU regulator is enabled during boot, but not necessarily always-on.
It can be disabled by the generic pm domain framework when the PU power
domain is shut down. The ramp delay of 150 us might be a bit conservative,
the value is taken from the Freescale kernel.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6sl: Add power-domain information to gpc node
Philipp Zabel [Thu, 6 Mar 2014 09:58:47 +0000 (10:58 +0100)]
ARM: dts: imx6sl: Add power-domain information to gpc node

The PGC that is part of GPC controls isolation and power sequencing of the
power domains. The PU power domain will be handled by the generic pm domain
framework. It needs a phandle to the PU regulator to turn off power when
the domain is disabled and a list of clocks to be enabled during powerup
for reset propagation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: Add power-domain information to gpc node
Philipp Zabel [Thu, 6 Mar 2014 09:58:46 +0000 (10:58 +0100)]
ARM: dts: imx6qdl: Add power-domain information to gpc node

The PGC that is part of GPC controls isolation and power sequencing of the
power domains. The PU power domain will be handled by the generic pm domain
framework. It needs a phandle to the PU regulator to turn off power when
the domain is disabled, and a list of phandles to all clocks that must be
enabled during powerup for reset propagation.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
[shawn.guo: use macro for clock IDs]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx6: gpc: Add PU power domain for GPU/VPU
Philipp Zabel [Thu, 6 Mar 2014 09:58:45 +0000 (10:58 +0100)]
ARM: imx6: gpc: Add PU power domain for GPU/VPU

When generic pm domain support is enabled, the PGC can be used
to completely gate power to the PU power domain containing GPU3D,
GPU2D, and VPU cores.
This code triggers the PGC powerdown sequence to disable the GPU/VPU
isolation cells and gate power and then disables the PU regulator.
To reenable, the reverse powerup sequence is triggered after the PU
regulator is enabled again.
The GPU and VPU devices in the PU power domain temporarily need
to be clocked during powerup, so that the reset machinery can work.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoDocumentation: Add device tree bindings for Freescale i.MX GPC
Philipp Zabel [Thu, 6 Mar 2014 09:58:44 +0000 (10:58 +0100)]
Documentation: Add device tree bindings for Freescale i.MX GPC

The i.MX6 contains a power controller that controls power gating and
sequencing for the SoC's power domains.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[shawn.guo: http://thread.gmane.org/gmane.linux.drivers.devicetree/64973]
[shawn.guo: update property name to be 'power-domains']
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agodrivercore: Bind/unbind power domain on probe/remove
Tomasz Figa [Thu, 8 May 2014 12:49:14 +0000 (14:49 +0200)]
drivercore: Bind/unbind power domain on probe/remove

On a number of platforms, devices are part of controllable power
domains, which need to be enabled before such devices can be accessed
and may be powered down when the device is idle to save some power.
This means that on systems that support power domain control using
generic power domains subsystem, it is necessary to add device to its
power domain before binding a driver to it and remove it from its power
domain after its driver is unbound to make sure that an unused device
does not affect power domain state.

Since this is not limited to particular busses and specific
archs/platforms, it is more convenient to do the above directly in
driver core, just as done with pinctrl default configuration. This patch
adds necessary code to really_probe() and __device_release_driver() to
achieve this and maintain consistent stack-like ordering of operations
happening when binding and unbinding a driver.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
[on i.MX6 GK802]
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
[shawn.guo: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/31029]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agobase: power: Add generic OF-based power domain look-up
Tomasz Figa [Thu, 8 May 2014 12:49:13 +0000 (14:49 +0200)]
base: power: Add generic OF-based power domain look-up

This patch introduces generic code to perform power domain look-up using
device tree and automatically bind devices to their power domains.
Generic device tree binding is introduced to specify power domains of
devices in their device tree nodes.

Backwards compatibility with legacy Samsung-specific power domain
bindings is provided, but for now the new code is not compiled when
CONFIG_ARCH_EXYNOS is selected to avoid collision with legacy code. This
will change as soon as Exynos power domain code gets converted to use
the generic framework in further patch.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
[on i.MX6 GK802]
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
[shawn.guo: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/31029]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: regulator: anatop: force vddpu to use same voltage level as vddsoc
Shawn Guo [Mon, 16 Jun 2014 06:11:51 +0000 (14:11 +0800)]
ENGR00317981: regulator: anatop: force vddpu to use same voltage level as vddsoc

The anatop on i.MX6 requires that vddpu use the same voltage level as
vddsoc.  It's a quick hacking to force the check whenever vddpu is
about to be enabled.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoregulator: anatop: Remove checking control_reg in [set|get]_voltage_sel
Axel Lin [Sat, 22 Feb 2014 04:53:18 +0000 (12:53 +0800)]
regulator: anatop: Remove checking control_reg in [set|get]_voltage_sel

Remove checking control_reg in [set|get]_voltage_sel and then convert to use
regulator_[set|get]_voltage_sel_regmap for [set|get]_voltage_sel callbacks.

The anatop-reg-offset property is a required property rather than optional
property. So the question is what is the meaning of setting anatop-reg-offset
to 0? If 0 is a valid setting for anatop-reg-offset and it has special meaning,
we had better document it in the binding document. Otherwise, remove the testing
for control_reg in the driver.

No anatop voltage regulator node in the dts files set anatop-reg-offset to 0.
So I think it's safe to remove testing if control_reg is 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
[shawn.guo: cherry-pick commit 114c5748d540 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoregulator: anatop: Add bypass support to digital LDOs
Philipp Zabel [Tue, 11 Feb 2014 13:43:45 +0000 (14:43 +0100)]
regulator: anatop: Add bypass support to digital LDOs

The ARM, PU, and SOC LDOs in the i.MX6 PMU can operate
in bypass mode. This allows to use external switching
regulators for cpu voltage scaling.

Since bypass and power gating modes are not configured
with their own bits, but via the voltage target bitfield,
store bypass state to be restored when reenabling the
regulator.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
[shawn.guo: cherry-pick commit d38018f2019c from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoregulator: anatop: Add power gating support to digital LDOs
Philipp Zabel [Tue, 11 Feb 2014 13:43:44 +0000 (14:43 +0100)]
regulator: anatop: Add power gating support to digital LDOs

The ARM, PU, and SOC LDOs in the i.MX6 PMU can completely gate
their power output. Since power gating is configured by writing
zero to the voltage target bitfield,, store a copy of the
voltage selector to be restored when reenabling the regulator.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
[shawn.guo: cherry-pick commit 605ebd35f059 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: ARM: dts: imx6qdl: add LDB and LCD for imx6qdl-sabresd
Shawn Guo [Sun, 15 Jun 2014 03:55:24 +0000 (11:55 +0800)]
ENGR00317981: ARM: dts: imx6qdl: add LDB and LCD for imx6qdl-sabresd

It's a device tree source porting from imx_3.10.y regarding to LDB and
LCD support on imx6qdl-sabresd board.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00274172-1 ARM: imx6q: refactor some ldb related clocks
Liu Ying [Tue, 20 Aug 2013 06:37:47 +0000 (14:37 +0800)]
ENGR00274172-1 ARM: imx6q: refactor some ldb related clocks

The ldb_di[0|1]_ipu_div dividers may divide their parent clock
frequencies by either 3.5 or 7. The non-integral dividers cannot
be dealt with the common clock framework, so they cannot be
registered as common clock dividers. So this patch adds a fixed
factor clock of 1/7 and introduces ldb_di[0|1]_div_sel multiplexers
so that the fixed factor clocks of 1/3.5 and 1/7 can be set to be
the parents of ldb_di[0|1]_div_sel multiplexers. The ldb_di[0|1]_podf
dividers are no longer used then.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
[shawn.guo: cherry-pick commit aae58d71b525 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
Documentation/devicetree/bindings/clock/imx6q-clock.txt
arch/arm/mach-imx/clk-imx6q.c

9 years agoENGR00317981: ARM: imx6qdl: initialize IPU clocks
Shawn Guo [Sun, 15 Jun 2014 14:20:36 +0000 (22:20 +0800)]
ENGR00317981: ARM: imx6qdl: initialize IPU clocks

Initialize IPU related clock in the same way as imx_v3.10.y

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: dts: imx6qdl: use DT macro for clock ID
Shawn Guo [Sun, 15 Jun 2014 12:36:50 +0000 (20:36 +0800)]
ARM: dts: imx6qdl: use DT macro for clock ID

Switch to use DT macro for clock ID, so that device tree source is more
readable.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick from community IMX tree]

Conflicts:
arch/arm/boot/dts/imx6dl.dtsi
arch/arm/boot/dts/imx6qdl.dtsi

9 years agoARM: imx6qdl: switch to use macro for clock ID
Shawn Guo [Sun, 15 Jun 2014 11:35:10 +0000 (19:35 +0800)]
ARM: imx6qdl: switch to use macro for clock ID

Instead of using enum for clock ID, let's switch imx6qdl clock driver to
use macro.  In this case, device tree can reuse these macros to improve
readability.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick from community IMX tree]

Conflicts:
arch/arm/mach-imx/clk-imx6q.c

9 years agoARM: dts: imx6: i2c4 cleanup
Iain Paton [Fri, 9 May 2014 15:01:56 +0000 (16:01 +0100)]
ARM: dts: imx6: i2c4 cleanup

add missing i2c4 clock and correct the compatible string to match other
imx6 i2c blocks

Signed-off-by: Iain Paton<ipaton0@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick from community IMX tree]

9 years agoARM: imx6: clk: i.MX6 DualLite/Solo i2c4 clock
Iain Paton [Wed, 16 Apr 2014 18:33:24 +0000 (19:33 +0100)]
ARM: imx6: clk: i.MX6 DualLite/Solo i2c4 clock

Compared to i.MX6 Quad/Dual the CCM_CCGR1 register in the i.MX6 Solo/DualLite
replaces the ecspi5 clock with the i2c4 clock.

Handle this difference using cpu_is_imx6dl().

Signed-off-by: Iain Paton <ipaton0@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit ee3387f97bea from upstream]

9 years agoARM: imx6q: clk: Parent DI clocks to video PLL via di_pre_sel
Sascha Hauer [Mon, 14 Apr 2014 14:20:39 +0000 (16:20 +0200)]
ARM: imx6q: clk: Parent DI clocks to video PLL via di_pre_sel

Route the video PLL to the display interface clocks via the di_pre_sel
and di_sel muxes by default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit 17b9b3b9e88a from upstream]

9 years agoARM: imx6q: add the missing esai_ahb clock
Shawn Guo [Sat, 19 Apr 2014 03:15:06 +0000 (11:15 +0800)]
ARM: imx6q: add the missing esai_ahb clock

The esai_ahb clock is derived from ahb and used to provide ESAI the
capability of register accessing and FSYS clock source for I2S clocks
dividing.  The gate bits of this esai_ahb clock are shared with the
esai clock -- the baud clock, so we need to call imx_clk_gate2_shared()
for these two clocks.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
[shawn.guo: cherry-pick commit 886cda418b28 from upstream]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: media: mxc_pxp_v4l2: change __s32 to __u32
Shawn Guo [Fri, 13 Jun 2014 09:19:47 +0000 (17:19 +0800)]
ENGR00317981: media: mxc_pxp_v4l2: change __s32 to __u32

Commit f90580ca0133 ([media] videodev2: Set vb2_rect's width and height
as unsigned) changes v4l2_rect's width and height from __s32 to __u32,
and thus we see the build error below.

  CC      drivers/media/platform/mxc/output/mxc_pxp_v4l2.o
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c: In function ‘pxp_try_fmt_output_overlay’:
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c:605:16: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c:607:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Fix the error by changing __s32 to __u32.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: media: forward mxc video output drivers to 3.14 kernel
Shawn Guo [Fri, 13 Jun 2014 09:16:59 +0000 (17:16 +0800)]
ENGR00317981: media: forward mxc video output drivers to 3.14 kernel

Forward imx_3.10.y mxc video output drivers to 3.14 kernel.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00268508 backlight:Correct the setting for bd props.fb_blank
Liu Ying [Tue, 25 Jun 2013 09:13:33 +0000 (17:13 +0800)]
ENGR00268508 backlight:Correct the setting for bd props.fb_blank

The patch of "ENGR00264855 backlight: Support backlight shared by
multiple fbs" doesn't consider that bd->props.fb_blank could be
shared by several framebuffers which use the same backlight device.
This causes the pwm backlight wrongly check the fb blank status.
This patch corrects the setting for the fb blank status by
considering all the framebuffers in question to fix the issue.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 68b97d114629f22f64b3d8c14d0a0b7d07d6ebb2)
[shawn.guo: cherry-pick commit 8a03a96fba08 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00264855 backlight: Support backlight shared by multiple fbs
Liu Ying [Thu, 30 May 2013 05:56:17 +0000 (13:56 +0800)]
ENGR00264855 backlight: Support backlight shared by multiple fbs

One backlight device may shared by multiple framebuffers.
We don't hope blanking one of the framebuffers may turn the
backlight off for all the other framebuffers, since they are
likely active to show display content. This patch adds logic
to record each framebuffer's backlight usage to determine the
backlight device use count and whether the backlight should be
turned on or off.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 37cbf741e4dff1f757f3ade6bb861d9a2af70693)
[shawn.guo: cherry-pick commit d62e7e8a788b from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoENGR00317981: iomuxc-gpr: forward imx6q-iomuxc-gpr.h to 3.14 kernel
Shawn Guo [Thu, 12 Jun 2014 06:52:33 +0000 (14:52 +0800)]
ENGR00317981: iomuxc-gpr: forward imx6q-iomuxc-gpr.h to 3.14 kernel

Forward imx_3.10.y imx6q-iomuxc-gpr.h to 3.14 kernel.

Keep IMX6Q_GPR1_GINT for need from arch/arm/mach-imx/pm-imx6.c

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>