Revert "Merge commit '5fe5c51' into sunxi-3.4-mod"

This reverts commit 726b800a1b5c2c7fcf4d09ed4b86139c9e964d0c, reversing
changes made to a4fad23465fb76f293913a4201e316e132840107.
Revert "Merge commit 'a5d5c16' into sunxi-3.4-mod"

This reverts commit a4fad23465fb76f293913a4201e316e132840107, reversing
changes made to 4b0e7f68c7219ab711bf0b68a73d61084b6eee4f.
Revert "Merge commit 'f12ecc7' into sunxi-3.4-mod"

This reverts commit 4b0e7f68c7219ab711bf0b68a73d61084b6eee4f, reversing
changes made to 0d8261576038cb3b0ccb9342eefcbfb6fd028edf.
ext4: Add support for FIDTRIM, a best-effort ioctl for deep discard trim

* What
This provides an interface for issuing an FITRIM which uses the
secure discard instead of just a discard.
Only the eMMC command is "secure", and not how the FS uses it:
due to the fact that the FS might reassign a region somewhere else,
the original deleted data will not be affected by the "trim" which only
handles un-used regions.
So we'll just call it "deep discard", and note that this is a
"best effort" cleanup.

* Why
Once in a while, We want to be able to cleanup most of the unused blocks
after erasing a bunch of files.
We don't want to constantly secure-discard via a mount option.

From an eMMC spec perspective, it tells the device to really get rid of
all the data for the specified blocks and not just put them back into the
pool of free ones (unlike the normal TRIM). The eMMC spec says the
secure trim handling must make sure the data (and metadata) is not available
anymore. A simple TRIM doesn't clear the data, it just puts blocks in the
free pool.
JEDEC Standard No. 84-A441
  7.6.9 Secure Erase
  7.6.10 Secure Trim

From an FS perspective, it is acceptable to leave some data behind.
 - directory entries related to deleted files
 - databases entries related to deleted files
 - small-file data stored in inode extents
 - blocks held by the FS waiting to be re-used (mitigated by sync).
 - blocks reassigned by the FS prior to FIDTRIM.

Change-Id: I676a1404a80130d93930c84898360f2e6fb2f81e
Signed-off-by: Geremy Condra <gcondra@google.com>
Signed-off-by: JP Abgrall <jpa@google.com>
sun7i: Fixed symlink to sys_config.h
sunxi: Possible G2D kernel bug

G2D seems to break if a zero value of src_rect.w or src_rect.h is
provided to g2d_blit, g2d_fill or g2d_stretchblit.
para.src_rect.w == 0 or para.src_rect.h == 0 results in trying to write
-1 toG2D_DMA0_SIZE_REG register within the mixer_* functions, e.g. here
https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.4/drivers/char/sunxi_g2d/g2d_bsp.c#L682

The following patch catches these zero value cases.

Signed-off-by: Andreas Baierl <list@imkreisrum.de>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
driver-core: cpu: export total_cpus to fix CPU_FREQ_STAT=m build

Commit a2425ffd ("cpufreq: Persist cpufreq time in state data across
hotplug") from android-3.4 used total_cpus on the cpufreq stats module.
Unfortunately, this symbol is not exported, so build fails when
CPU_FREQ_STAT=m. This patch exports it for the time being to get the
tree building again.

Signed-off-by: Emilio López <turl@linux-sunxi.org>
sunxi: g2d: don't skip mutex_unlock on invalid ioctl

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
sunxi: disp: Allow negative hardware cursor position

The hardware cursor coordinates seem to be signed 14 bit values.
This has been tested on sun4i and sun7i.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
rename to sunxi_nand to avoid naming conflict

rename to sunxi_nand to avoid conflict with drivers/mtd/nand/nand.ko