android_kernel_xiaomi_sm7250/drivers/of
Doug Anderson eb69992dd5 ANDROID: of: Support CONFIG_CMDLINE_EXTEND config option
The old logic assumes CMDLINE_FROM_BOOTLOADER vs. CMDLINE_FORCE and
ignores CMDLINE_EXTEND.  Here's the old logic:

- CONFIG_CMDLINE_FORCE=true
    CONFIG_CMDLINE
- dt bootargs=non-empty:
    dt bootargs
- dt bootargs=empty, @data is non-empty string
    @data is left unchanged
- dt bootargs=empty, @data is empty string
    CONFIG_CMDLINE (or "" if that's not defined)

The new logic is now documented in of_fdt.h and is copied here for
reference:

- CONFIG_CMDLINE_FORCE=true
    CONFIG_CMDLINE
- CONFIG_CMDLINE_EXTEND=true, @data is non-empty string
    @data + dt bootargs (even if dt bootargs are empty)
- CONFIG_CMDLINE_EXTEND=true, @data is empty string
    CONFIG_CMDLINE + dt bootargs (even if dt bootargs are empty)
- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=non-empty:
    dt bootargs
- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is non-empty string
    @data is left unchanged
- CMDLINE_FROM_BOOTLOADER=true, dt bootargs=empty, @data is empty string
    CONFIG_CMDLINE (or "" if that's not defined)

Signed-off-by: Doug Anderson <dianders@chromium.org>
CC: devicetree-discuss@lists.ozlabs.org
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Rob Herring <rob.herring@calxeda.com>
Change-Id: I40ace250847f813358125dfcaa8998fd32cf7ea3
Signed-off-by: Colin Cross <ccross@android.com>

[AmitP: Folded following android-4.9 commit changes into this patch
        e820270abb5d ("ANDROID: of: fix CONFIG_CMDLINE_EXTEND")
        9a4a74055444 ("ANDROID: of: Fix build warnings")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2018-08-28 17:10:42 +05:30
..
unittest-data
address.c drivers/of: Make of_io_request_and_map() "name" argument optional 2018-07-10 08:08:57 -06:00
base.c of: overlay: update phandle cache on overlay apply and remove 2018-07-16 08:41:32 -06:00
device.c OF: Don't set default coherent DMA mask 2018-07-27 19:01:07 +02:00
dynamic.c
fdt_address.c
fdt.c ANDROID: of: Support CONFIG_CMDLINE_EXTEND config option 2018-08-28 17:10:42 +05:30
irq.c
Kconfig
kobj.c
Makefile
of_mdio.c of: mdio: Support fixed links in of_phy_get_and_connect() 2018-07-13 18:25:14 -07:00
of_net.c
of_numa.c of/numa: drop export of of_node_to_nid 2018-04-18 08:55:41 -05:00
of_private.h of: overlay: update phandle cache on overlay apply and remove 2018-07-16 08:41:32 -06:00
of_reserved_mem.c drivers: remove force dma flag from buses 2018-05-03 16:25:08 +02:00
overlay.c of: overlay: update phandle cache on overlay apply and remove 2018-07-16 08:41:32 -06:00
pdt.c
platform.c of/platform: Initialise default DMA masks 2018-07-27 19:01:03 +02:00
property.c
resolver.c of: overlay: validate offset from property fixups 2018-05-23 15:07:43 -05:00
unittest.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00