dt/flattree: Add stub defintions for flat device tree function

Several flattened device tree functions are currently accessed in a
file that is compiled regardless of whether device tree is enabled
or not. Add stubs for these functions if device tree is not selected.

Change-Id: I0bea3325692fac46d3e5ef457aa30e083f71cd6d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	include/linux/of_fdt.h
msm: 8974: Add function to reserve memory from device tree

Memory reservations for memory pools or using memblock remove
must happen early at bootup. Add a function at early boot to
walk the flattened device tree and extract memory reservation
information from appropriate bindings in device tree. To ensure
that the memory is only reserved when a driver is enabled,
drivers must put EXPORT_COMPAT(<compat string>) in the driver
as well as adding the binding to the device tree. More
documentation is available in
Documentation/devicetree/bindings/arm/msm/memory-reserve.txt

Change-Id: I28fa71d7a30cea9af5447acb5d2dde562fa0f6de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8974.c
gpu: ion: Add support for device tree.

Add device tree parsing to common msm ion code
to allow new targets to specify ION heap configuration
in device tree.

Document the device tree bindings for ION.

Change-Id: I40b7f4b1fbb3ca4ad1d6dc06a33b647f6af1d669
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>

Conflicts:
	drivers/gpu/ion/msm/msm_ion.c
msm: memory: Calculate DDR size early at boot time

Calculate the DDR size available to APPS which can be
used during early boot up time such as reservation
size based on the available RAM.

Change-Id: Ib765913ed95f8c23e4db3c044e5a43bcc10b7c1c
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
msm: memory: remove obsolete stable_size function

The notion of `stable' memory is going away (i.e. all memory is now
treated as `stable'). Remove the stable_size function. Remove the
notion of stability from the total_stable_size function and rename it
to total_size.

Change-Id: I8fd08a36b4948d57f430aea9113a0c704b8a00d0
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: memory: use memblock instead of meminfo

msm currently uses meminfo (not memblock) in memory.c for several
purposes (mainly the placement of the memory pool(s)).  When the code
was written originally, memblock didn't exist yet.

Now that memblock exists, this is not strictly correct, but works as
long as nobody calls memblock_remove() besides this code (if that
occurs then the meminfo data no longer reflect reality and will likely
cause overlap problems).

To avoid problems meminfo usage should be replaced with memblock.

Also, since memblock regions of the same type can't be contiguous, the
total_size function, which calculated the aggregate size of contiguous
meminfo banks, can be removed.

Change-Id: I34054c4fe367986f472bdaae65be67cd8fbf273a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: memory: Use already defined MT_MEMORY_SO type

MT_MEMORY_SO is now defined in the kernel so replace the old
usage of the MT_DEVICE_STRONGLY_ORDERED type which is no
longer defined in the latest kernel revisions.

Change-Id: Ie942520b78b682f8006510f08892f161e6bc7812
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
msm: memory: Enable map_page_strongly_ordered API for 7627a

Enable map_page_strongly_ordered() API for 7627a, since it
is required for the memory barrier implementation, like 7627.
Use iotable_init API to initialize the strongly ordered page
mapping since create_mapping() used in the older implementation
is no longer available outside mm/mmu.c implementation.

Change-Id: Ib1a9a261186921a25be7ff8900109b3b1718dfba
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
arm/dt: mpq8092: Add device tree support for ION

Add ION support for mpq8092 by adding ION heaps sizes to
the device tree and include memory reservation using device
tree features in board files.

Change-Id: I0f2bd3f5cb87b67ad1c779ce20d411b7d0127b2b
Signed-off-by: Utsab Bose <ubose@codeaurora.org>
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/mpq8092.dtsi
	arch/arm/mach-msm/board-8092.c
msm: move memory reservation for 8974 into the device tree

Reserving memory through the memory-reserve mechanism provided by the
device tree is preferable to hard-coding the reservations into the
board files.

Change-Id: I7dd354a811836e7bbf9c646655a8ebc7e218b20e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>

Conflicts:
	Documentation/devicetree/bindings/arm/msm/memory-reserve.txt
	arch/arm/boot/dts/msm8974.dtsi
	arch/arm/mach-msm/board-8974.c