Commit Graph

608245 Commits

Author SHA1 Message Date
Zhou weixin
c5c8a9392d arm: dts: rockchip: rk3126-bnd-m88-emmc: add new board for android go test
Change-Id: I70a421782cc641c876dc436f732af2a52b230ae8
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2018-04-04 15:44:08 +08:00
Tony Xie
ed38d26a33 pinctrl: support pinctrl driver for the RK817&RK809 PMIC
Change-Id: I9a24ee0d9266a000d582f8ffff8b0c872e3a0769
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-04-03 20:09:59 +08:00
Tony Xie
1a69527184 arm64: dts: rockchip: add pinctrl info for RK817&RK809
Change-Id: I23dc0c8271ba8cb566fa16bbd179fe6e8aa3b591
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-04-03 19:55:46 +08:00
David Wu
927ae0676c arm64: dts: rockchip: Fix the mac compatible for rk3308
Change-Id: I4a58d831fea81bf5874603159a13e286baae3cda
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-04-03 19:28:11 +08:00
Tony Xie
ff5c625f04 arm64: dts: rockchip: adjust dmc opp-table for px30
Change-Id: I3c51f94fbb5bac52553e38c699b4355d5f8f7518
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-04-03 19:25:11 +08:00
Wyon Bi
868a2dedf0 clk: rockchip: px30: Fix i2s out mclk
Fixes: f6128506aa ("clk: rockchip: px30: Fix i2s out mclk")
Change-Id: I90dd4d1cdb1f3a2e9009dcb574115a5e7504fc32
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-04-03 12:33:46 +08:00
Feng Mingli
158d412110 usb: dwc_otg_310: pcd: in ep do memory copy after alloc aligned buffer
If more than two consecutive requests queue into in ep, maybe some
requests need alloc temporary aligned buffer, only the first request
will do memory copy to the aligned buffer, but start_next_request()
function missing memory copy, then the transmission of data will be
wrong, so do memory copy after alloc aligned buffer right away.

TEST=rk3288 use rndis gadget function, Linux PC use this command
can't ping: ping IP -s 1473

Change-Id: I1c5339dbb089d8a94d8093baa2a801f54e450267
Signed-off-by: Feng Mingli <fml@rock-chips.com>
2018-04-03 11:41:40 +08:00
Tao Huang
0616f26326 rk: arm64: support build boot.img
Change-Id: Iaf50be16e321b13bbe45b9beb335d542e00507cf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-02 21:36:20 +08:00
Finley Xiao
44822b1031 clk: rockchip: rk3399: Fix clk_cifout and clk_cifout_src
Change-Id: I1480615b8f8cfaab2b318e6b8438ead2232a238d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:46:27 +08:00
Meng Dongyang
855763aa3c arm64: dts: rockchip: enable u2phy low power mode for rk3326-863
Add rockchip,low-power-suspend property to DT of u2phy to make
the port enter lower power state when suspend.

Change-Id: I88eef53b24c8859ebe2c2b3cb5ecbdc42b406d04
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-02 17:43:50 +08:00
Meng Dongyang
5e72cfa2a5 phy: rockchip-inno-usb2: make u2phy enter low power mode
Make u2phy enter low power mode when suspend. If config the DT of
u2phy port with "rockchip,low-power-mode" property, the port will
be config to lower power state when suspend.

Bvalid irq and linestate irq will be disabled in this mode.

Change-Id: Ie7d40a9a181b0622b1f8d062a741661548cabd59
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-02 17:43:50 +08:00
Meng Dongyang
a3b1bb7a7a Documentation: bindings: add rockchip,low-power-mode property for u2phy
Change-Id: Id99aeb68aa5b6174a3a97f413f09270d893cef4e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-02 17:43:50 +08:00
Finley Xiao
cd5289db24 clk: rockchip: rk3308: Set max parent rate for vop fractional divider
Change-Id: I79b5b412e2952d48e83546dce69c6ce2fbe75e5b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:01:54 +08:00
Finley Xiao
0689ad72e4 clk: rockchip: px30: Set max parent rate for i2s fractional divider
Change-Id: Ic3f3cc4fcc90821ec9ecf0d24e9e9fa877f7001f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:01:54 +08:00
Finley Xiao
4186a0e423 clk: rockchip: Add supprot to limit input rate for fractional divider
From Rockchips fractional divider usage, some clocks can be generated
by fractional divider, but the input clock frequency of fractional
divider should be less than a specified value.

Change-Id: Ifd6c5f6a24a64021f990506e8657cd925f9b96f9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:01:54 +08:00
Shunqing Chen
ec9e751d33 power: rk817-battery: add power_supply property for CTS.
Change-Id: I31bca691bc404d95b448bfbf1d92897fed2a5767
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-04-02 16:50:51 +08:00
Shunqing Chen
bb651e58d8 power: rk817-battery: get charging state from charger driver
Change-Id: I1cbf9befcb902a46c2e7a42664e4417ce1b441ea
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-04-02 16:50:51 +08:00
Tao Huang
642d98704a mmc: ratelimit error messages
Change-Id: Ida380e193ea4c1ad2c1347997a24b67ed05f7975
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-02 16:42:38 +08:00
Finley Xiao
37c869d6fc arm64: dts: rockchip: px30: Add SYS_STATUS_BOOST status for dmc
Change-Id: Id7096f0b558697101fd1ed6bcf72fec92c9ce7f2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 14:58:40 +08:00
Finley Xiao
aec15a24a8 PM / devfreq: rockchip_dmc: Add touch boost support
Change-Id: I873891c79a75271ddb57cf8dcc25cf882d7c1126
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 14:58:40 +08:00
JinSen Chen
0b55661d58 ARM: dts: rk3288-evb-android-rk808-edp: update regulators node
set the regulator named "vcc_wl" stay on in suspend.

Change-Id: I6d21b8904a6367938a386df8e905ede62f4069a8
Signed-off-by: JinSen Chen <kevin.chen@rock-chips.com>
2018-04-02 11:25:01 +08:00
William Wu
f5c3dd417f usb: dwc_otg_310: hcd: avoid to free dma mem if irqs disabled
This patch fix the following warning when plug out
a dm9601 usb ethernet:

WARNING: at include/asm-generic/dma-mapping-common.h:274
Modules linked in: drmboot(P)
CPU: 5 PID: 1501 Comm: kworker/5:2 Tainted: P                4.4.103 #5
Hardware name: Rockchip rk3368 xkp board (DT)
Workqueue: usb_hub_wq hub_event
task: ffffffc0326d4100 task.stack: ffffffc0389fc000
PC is at __DWC_DMA_FREE+0x38/0xa0
LR is at dwc_otg_hcd_qh_free+0xe0/0x120
pc : [<ffffff8008678d60>] lr : [<ffffff8008675b48>] pstate: 204001c5
sp : ffffffc0389ffab0
...
Call trace:
[<ffffff8008678d60>] __DWC_DMA_FREE+0x38/0xa0
[<ffffff8008675b48>] dwc_otg_hcd_qh_free+0xe0/0x120
[<ffffff8008670768>] dwc_otg_hcd_endpoint_disable+0xa4/0xd
[<ffffff8008672538>] endpoint_disable+0x20/0x30
[<ffffff80085ef278>] usb_hcd_disable_endpoint+0x1c/0x24
[<ffffff80085f173c>] usb_disable_endpoint+0x80/0x8c
[<ffffff80085f19a8>] usb_disable_device+0x1f4/0x210
[<ffffff80085e9b08>] usb_disconnect+0x9c/0x1cc
[<ffffff80085eb434>] hub_event+0x740/0xe50
[<ffffff80080b723c>] process_one_work+0x254/0x3f0
[<ffffff80080b7c24>] worker_thread+0x304/0x418
[<ffffff80080bc578>] kthread+0xe8/0xf0
[<ffffff80080828d0>] ret_from_fork+0x10/0x40

Change-Id: I8958bb2a43307d214f7aaaecd337da30b645d8e1
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-02 11:16:27 +08:00
William Wu
55aaa15dde usb: dwc_otg_310: hcd: limit max size of aligned buffer
Limit the max size of aligned buffer to 64K. Because
64K buffer is enough for most of usb transfers, and
the aligned buffer is a coherent DMA buffer allocated
by dma_alloc_coherent, too large buffer may cause
coherent DMA memory allocation failure on some platforms.

Change-Id: Ib4895349be93d7a298f5cd08c609f1a8a81d2610
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-02 11:16:27 +08:00
Putin Lee
bbc53fb321 video/rockchip: rga2: Fix up dst vir address not 4k align will cause crash
If dst buf not 4k align vir address, mmu page may calculate error.
This situation will cause rga hardware not respond, cannot return irq_handle.

Change-Id: I29a104984415b6736713073684c2551252c975b9
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2018-03-30 19:29:54 +08:00
Sugar Zhang
b38255c756 arm64: dts: rockchip: rk3308-evb: add spdif_tx sound
Change-Id: I01aac5a063a93db302d00f48fd21bd24a6f7d3c3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-03-30 19:09:38 +08:00
Sugar Zhang
be9fe4845f arm64: dts: rockchip: rk3308: add spdif_tx node
Change-Id: I1dbca8538362665bca0d56e7142b743a8b44a956
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-03-30 19:09:38 +08:00
Sandy Huang
77dbbdc036 drm/rockchp: rk3328 vop: fix post empty when plug out hdmi
case 1:
plug in hdmi and power on, after kernel complete and before android
start(maybe can update simplification boot.img) we plug out hdmi will
appear error log.

case 2:
plug in hdmi and power on, at the beginning of drm driver bind, plug out
hdmi, the hdmi irq maybe at disable state, so the vop is in running
state which is set at uboot. in this case vop will not to enable clk
refrerence, after driver probe complete, the unused clk maybe close by
clk driver framework. this will lead to vop appear error log:

[    4.898107] rockchip-vop ff370000.vop: [drm:vop_crtc_enable] Update mode to 720*288
[    4.900174] rockchip-vop ff370000.vop: [drm:vop_isr] *ERROR*BUS_ERROR irq err

solution:
1. disable vop all planes before disable crtc and enable crtc;
2. disable vop all planes when can't detect connect at power on.
3. enable dma stop before detach iommu and disable dma stop after attach
iommu.

Change-Id: Ia981d52c96a274fa177493d10362fd4e395a6707
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-30 19:08:36 +08:00
zain wang
e2d158cc8e mfd/fusb302: some changes make code easier read
Using more meaningful MARCOs instead of number.

Change-Id: Ib643fffaacc9bfcb535284fe5b1d03ef819a62ae
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
194fcb2e2f mfd/fusb302: delay EVENT_CC when swap operations
Detached may occurred at swap operations. Don't ignore
the EVENT_CC during swapping at all, check the connection
after it.

Change-Id: I2c69c8e2a026e3524ee390e25db3bdf84dad7bdb
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
07de3dde4f Documentation: dt-bindings: fusb302: add power role compatible
Power role compatible can configure the typec power role,
and we can enable try.role function as well, that can
change the power role to our wanted if possible.

Change-Id: I85a3c4d0c5a54b37573f5fb24fe107d88f385021
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
b20bf318f2 mfd/fusb302: add drp.try_snk and drp.try_src functions
Sometimes we may prefer our port would be specified power
role when the both attaching port are DRP port. We can
enable this function in dts file, such as:
	fusb302,role = "ROLE_MODE_DRP";
	fusb302,try_role = "ROLE_MODE_DFP";
It would change the port power role to your wanted
if possible.

Change-Id: Id71595fa10c5c55755ac6b2965c3f14f593c2493
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
c427a55bee mfd/fusb302: support data role swap (UFP -> DFP)
This patch set a frame for DR_SWAP, and it only support UFP to DFP,
because there are many works to coordinate USB part and PD part when
change DFP to UFP.

Change-Id: Iebcccdcd9115c5be4704e6e8e0dc0b568a4ac48d
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
a6e6110873 mfd/fusb302: support vconn swap
Change-Id: I86490b4028b0a157128c8406163918806cf1ed5c
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
fdcef14e49 mfd/fusb302: support power role swap in DRP port
Change-Id: I233023de022eea2ff003f1af2b1763b056af25d7
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
2a3bd5ca5b mfd/fusb302: support DFP and UFP mode
If you set your port to DFP(UFP), the port would only detect
UFP(DFP) device. If you want your port to detect both UFP and DFP,
set it to DRP in dts.

Change-Id: I1b8dc46bd3538094a01ee3376bf019113622fcca
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
zain wang
eae30da164 mfd/fusb302: add marco for msg distinguish
Change-Id: Ia838905a72a3e4d3b3a1167fcb5ba6a3cbc6b53c
Signed-off-by: zain wang <wzz@rock-chips.com>
2018-03-30 14:16:37 +08:00
Xuhanrui
fbd1465b56 ARM64: dts: rockchip: add secure drm buffer for rk3328
default disable

Change-Id: Ic24b6e10f5ab34c755458df8b30f179c8a9277fd
Signed-off-by: Xuhanrui <xhr@rock-chips.com>
2018-03-29 16:46:23 +08:00
Huibin Hong
ea426efeac arm64: dts: rockchip: enable uart dma of rk3308
Change-Id: Icdaf0adda5a01f5c48ffeb93e0f4908bbccd9cdc
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-29 16:27:05 +08:00
Huibin Hong
5c158748ad soc: rockchip: grf: unmask uart dma request for RK3308 Soc
Change-Id: I06d955d92d04785bea3248b82fe99c515d471467
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-29 16:25:15 +08:00
Huibin Hong
9a3a19f563 arm64: dts: rockchip: add ramoops node of rk3308
Change-Id: I0b2e4ab39670b20532100a932bf75cd422fc9628
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-29 16:20:49 +08:00
Huibin Hong
49f0d85158 arm64: rk3308_linux_defconfig: enable pstore
Change-Id: I3cdd1df111ffd049becb6aeb3347b8fe09fa67a6
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-29 16:20:49 +08:00
Ziyuan Xu
487ade98b7 arm64: dts: rockchip: exclude rk3308-evb-ext-v10 from rk3308 evb boards
Exclude rk3308-evb-ext-v10.dtsi from rk3308 evb boards, that it's only
used for IP functional verification.

Change-Id: Ic679da54e16134e6326b50fd7de4fbafab57ac8f
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-03-29 14:22:04 +08:00
William Wu
199fae2be8 usb: dwc3: rockchip: support type-c data role swap
This patch supports fusb302 to do data role swap for
Type-C Dongle with PD adapter.

The test case is:

- Use a Type-C Dongle (PD adapter & USB & HDMI)
- Plug a PD adapter into Type-C Dongle first, then
  connect the Dongle with RK3399 Type-C0 port.
- Check if Type-C Dongle can fetch 5V with the following log:
  "fusb302 4-0022: PD connected as UFP, fetching 5V"
- Wait for the data role swap completion (hundreds of
  milliseconds), then check if the Type-C USB can work
  in DFP mode.

Without this patch, the DWC3 can't switch to DFP mode
after the data role swap completion. It's because that
when the fusb302 do data role swap, it only sends extcon
notifier with EXTCON_USB true or EXTCON_USB_HOST true.
Generally, the sequence of the extcon notifier sent from
fusb302 is:

- send "EXTCON_USB = true" and "EXTCON_USB_HOST=false"
  to DWC3 driver, then DWC3 switch to UFP, and set the
  connected flag to true.

- After swap completion, send "EXTCON_USB = false" and
  "EXTCON_USB_HOST = true" to DWC3 driver. Because the
  connected flag is true, the DWC3 is unable to switch
  to DFP mode.

This patch forces DWC3 to do disconnection if it detects
the connected flag is true and the DWC3 mode is UFP.

Change-Id: I470187823708e6fb8bb8869bca3b475850a8c2e7
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-03-29 11:14:05 +08:00
Tao Huang
cde0be2ecb ARM: dts: rockchip: fix dtc warnings of rk3288-firefly
Change-Id: If2f4b029bd964be7d2983d1eec78be9e032555d6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-28 20:12:03 +08:00
Tao Huang
1079fa97eb scripts/gcc-wrapper.py: ignore some warnings when W=1
Change-Id: I9d9651c077ee025d2f4fbe8faf22f8bed19b0cdd
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-28 19:51:34 +08:00
Rob Herring
2783b7940e UPSTREAM: scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9
Pickup the fix for handling unresolved phandles in overlays.

This adds the following commits from upstream:

c1e55a5513e9 checks: fix handling of unresolved phandles for dts plugins
f8872e29ce06 tests: Avoid 64-bit arithmetic in assembler
48c91c08bcfa libfdt: add stringlist functions to linker script

Change-Id: I81a0cc9a936f8d1da810460ea5df4472fa27dd5c
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e45fe7f788)
2018-03-28 19:51:34 +08:00
Rob Herring
057c7706cb UPSTREAM: scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110
This adds the following commits from upstream:

b1a60033c110 tests: Add a test for overlays syntactic sugar
737b2df39cc8 overlay: Add syntactic sugar version of overlays
497432fd2131 checks: Use proper format modifier for size_t
22a65c5331c2 dtc: Bump version to v1.4.5
c575d8059fff Add fdtoverlay to .gitignore
b6a6f9490d19 fdtoverlay: Sanity check blob size
8c1eb1526d2d pylibfdt: Use Python2 explicitly
ee3d26f6960b checks: add interrupts property check
c1e7738988f5 checks: add gpio binding properties check
b3bbac02d5e3 checks: add phandle with arg property checks
fe50bd1ecc1d fdtget: Split out cell list display into a new function
62d812308d11 README: Add a note about test_tree1.dts
5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset()
46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle()
a3ae43723687 pylibfdt: Add support for fdt_parent_offset()
a198af80344c pylibfdt: Add support for fdt_get_phandle()
b9eba92ea50f tests: Return a failure code when any tests fail
155faf6cc209 pylibfdt: Use local pylibfdt module
50e5cd07f325 pylibfdt: Add a test for use of uint32_t
ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t
36f511fb1113 tests: Add stacked overlay tests on fdtoverlay
1bb00655d3e5 fdt: Allow stacked overlays phandle references
a33c2247ac8d Introduce fdt_setprop_placeholder() method
0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both
e3b9a9588a35 tests: fdtoverlay unit test
42409146f2db fdtoverlay: A tool that applies overlays
aae22722fc8d manual: Document missing options
13ce6e1c2fc4 dtc: fix sprintf() format string error, again
d990b8013889 Makefile: Fix build on MSYS2 and Cygwin
51f56dedf8ea Clean up shared library compile/link options
21a2bc896e3d Suppress expected error message in fdtdump test
2a42b14d0d03 dtc: check.c fix compile error
a10cb3c818d3 Fix get_node_by_path string equality check
548aea2c436a fdtdump: Discourage use of fdtdump
c2258841a785 fdtdump: Fix over-zealous version check
9067ee4be0e6 Fix a few whitespace and style nits
e56f2b07be38 pylibfdt: Use setup.py to build the swig file
896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON
90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone
e20d9658cd8f Add Coverity Scan support
b04a2cf08862 pylibfdt: Fix code style in setup.py
1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i
580a9f6c2880 Add a libfdt function to write a property placeholder
ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile
9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module
e91c652af215 pylibfdt: Enable installation of Python module
8a892fd85d94 pylibfdt: Allow building to be disabled
741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites
14c4171f4f9a pylibfdt: Use package_dir to set the package directory
89a5062ab231 pylibfdt: Use environment to pass C flags and files
4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment
6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/

Change-Id: I0591bb1fe4e76051deae3318011927b350271f6c
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 4201d057ea)
2018-03-28 19:51:34 +08:00
Russell King
2c342a2ca4 UPSTREAM: scripts/dtc: fix '%zx' warning
dtc uses an incorrect format specifier for printing a uint64_t value.
uint64_t may be either 'unsigned long' or 'unsigned long long' depending
on the host architecture.

Fix this by using %llx and casting to unsigned long long, which ensures
that we always have a wide enough variable to print 64 bits of hex.

    HOSTCC  scripts/dtc/checks.o
  scripts/dtc/checks.c: In function 'check_simple_bus_reg':
  scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]
    snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
    ^
  scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]

Link: http://lkml.kernel.org/r/20170829222034.GJ20805@n2100.armlinux.org.uk
Change-Id: Ic485917e85d7ddab7e7711e5f4e7038ceb6675c0
Fixes: 828d4cdd01 ("dtc: check.c fix compile error")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e66186920b)
2018-03-28 19:51:34 +08:00
Geert Uytterhoeven
15b8da6906 UPSTREAM: scripts/dtc: dtx_diff - Show real file names in diff header
As the comparison uses process substitution to pass files after
conversion to DTS format, the diff header doesn't show the real
filenames, but the names of the file descriptors used:

    --- /dev/fd/63  2017-06-22 11:21:47.531637188 +0200
    +++ /dev/fd/62  2017-06-22 11:21:47.531637188 +0200

This is especially annoying when comparing a bunch of DT files in a
loop, as the output doesn't show a clue about which files it refers to.

Fix this by explicitly passing the original file names to the diff
command using the --label option, giving e.g.:

    --- arch/arm/boot/dts/r8a7791-koelsch.dtb
    +++ arch/arm/boot/dts/r8a7791-porter.dtb

Change-Id: Ic07c743027d42c04f865e1a79f61cd44103a2d80
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 7782b14446)
2018-03-28 19:51:34 +08:00
Shuah Khan
29b79c4588 UPSTREAM: dtc: check.c fix compile error
Fix the following compile error found on odroid-xu4:

checks.c: In function ‘check_simple_bus_reg’:
checks.c:876:41: error: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 4 has type
‘uint64_t{aka long long unsigned int}’ [-Werror=format=]
  snprintf(unit_addr, sizeof(unit_addr), "%lx", reg);
                                         ^
checks.c:876:41: error: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 4 has type
‘uint64_t {aka long long unsigned int}’ [-Werror=format=]
cc1: all warnings being treated as errors
Makefile:304: recipe for target 'checks.o' failed
make: *** [checks.o] Error 1

Change-Id: I08896cc9ecd828822ba9bd8e1b6d382faf7cd95d
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
[dwg: Correct new format to be correct in general]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-picked from upstream dtc commit 2a42b14d0d03]
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 828d4cdd01)
2018-03-28 19:51:34 +08:00