From 63162724e25778962672d5c0a85ed5af0aa1c78e Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Thu, 6 Dec 2018 01:26:39 +0100 Subject: usb: dwc2-otg: make regs_phy (in platdata) a uintptr_t The regs_phy field of the platform data structure for dwc2-otg is today declared an unsigned int, but will eventually be cast into a void* for a writel operation. This triggers errors on modern GCC versions. E.g. we get the following error with GCC 6.3: drivers/usb/phy/rockchip_usb2_phy.c: In function 'property_enable': arch/arm/include/asm/io.h:49:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) ^ arch/arm/include/asm/io.h:117:48: note: in expansion of macro '__arch_putl' #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; }) ^~~~~~~~~~~ drivers/usb/phy/rockchip_usb2_phy.c:61:2: note: in expansion of macro 'writel' writel(val, pdata->regs_phy + reg->offset); ^~~~~~ This commit changes regs_phy to be a uintptr_t to ensure that it is large enough to hold any valid pointer (and fix the associated warning). Signed-off-by: Philipp Tomsich --- include/usb/dwc2_udc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/usb/dwc2_udc.h b/include/usb/dwc2_udc.h index 62e32365e21..4068de045dc 100644 --- a/include/usb/dwc2_udc.h +++ b/include/usb/dwc2_udc.h @@ -14,7 +14,7 @@ struct dwc2_plat_otg_data { void *priv; int phy_of_node; int (*phy_control)(int on); - unsigned int regs_phy; + uintptr_t regs_phy; uintptr_t regs_otg; unsigned int usb_phy_ctrl; unsigned int usb_flags; -- cgit v1.2.3 From 1bad5e14922c63abb3808c6b09af40b30a4171d2 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 28 Sep 2018 00:32:59 +0530 Subject: rockchip: rk3399: Add common Rock960 family from Vamrs Rock960 is a family of boards based on Rockchip RK3399 SoC from Vamrs. It consists of Rock960 (Consumer Edition) and Ficus (Enterprise Edition) 96Boards. Below are some of the key differences between both Rock960 and Ficus boards: 1. Different host enable GPIO for USB 2. Different power and reset GPIO for PCI-E 3. No Ethernet port on Rock960 The common board support will be utilized by both boards. The device tree has been organized in such a way that only the properties which differ between both boards are placed in the board specific dts and the reset of the nodes are placed in common dtsi file. Signed-off-by: Manivannan Sadhasivam [Added instructions for SD card boot] Signed-off-by: Ezequiel Garcia Reviewed-by: Simon Glass Tested-by: Peter Robinson --- include/configs/rock960_rk3399.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/configs/rock960_rk3399.h (limited to 'include') diff --git a/include/configs/rock960_rk3399.h b/include/configs/rock960_rk3399.h new file mode 100644 index 00000000000..746d24cbff5 --- /dev/null +++ b/include/configs/rock960_rk3399.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018 Manivannan Sadhasivam + */ + +#ifndef __ROCK960_RK3399_H +#define __ROCK960_RK3399_H + +#include + +#define CONFIG_SYS_MMC_ENV_DEV 1 + +#define SDRAM_BANK_SIZE (2UL << 30) + +#endif -- cgit v1.2.3