After commit 23287661af ("ipv6: Inhibit IPv4-mapped src address on the wire.")
Android failed to pass DatagramSocketTest#test_getRemoteSocketAddress:
fail: java.net.ConnectException: Address family not supported by protocol
Android side has patch "Fix DatagramSocketTest#test_getRemoteSocketAddress".
Unfortunately, which may not merge to Android 7.1 branch, so we have to fixes
it on kernel side.
Change-Id: I7444c7636f02485abf6ddd4d7b9cad1f4e6d06e1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
LSK 17.08 v4.4-android
* tag 'lsk-v4.4-17.08-android': (451 commits)
Linux 4.4.83
pinctrl: samsung: Remove bogus irq_[un]mask from resource management
pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver
pnfs/blocklayout: require 64-bit sector_t
iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
usb: core: unlink urbs from the tail of the endpoint's urb_list
USB: Check for dropped connection before switching to full speed
uag: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
iio: light: tsl2563: use correct event code
iio: accel: bmc150: Always restore device to normal mode after suspend-resume
staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
USB: hcd: Mark secondary HCD as dead if the primary one died
usb: musb: fix tx fifo flush handling again
USB: serial: pl2303: add new ATEN device id
USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
USB: serial: option: add D-Link DWM-222 device ID
nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
fuse: initialize the flock flag in fuse_file on allocation
...
If two vops are working, one of screens will flicker when change ddr
frequency.
Change-Id: I6e31ac1b7a2bfb0d57ec4507c2da1ee714e59c35
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Auto_min_rate is used to instead of normal_rate, if other sys_status is
exist, use status_rate as min_freq, otherwise use auto_min_rate.
Change-Id: If2df35396ec9e6038f18b173a78ff1a248ab87eb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This patch enables the integrated phy for rk3228 evb board
by default.
To use the external 1000M phy on evb board, need to make
some switch of evb board to be on.
Change-Id: I5cff5445f6aa7a6245cb607a3565edc55e1ad0dd
Signed-off-by: David Wu <david.wu@rock-chips.com>
This patch adds integrated phy clock and integrated phy reset
for rk gmac using.
Change-Id: I6eb8cfa244a169915615b7689f3068bbdb15be49
Signed-off-by: David Wu <david.wu@rock-chips.com>
There are two mac controllers in the rk3328, the one connects
to external PHY, and the other one connects to integrated PHY.
Like the mac of external PHY, the integrated PHY's mac also
needs to configure the related mac registers at GRF.
Change-Id: I4e08264f67c0ea7850b44e2d62591617e299c65b
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
There is only one mac controller in rk3228, which could connect to
external PHY or integrated PHY, use the grf_com_mux bit15 to route
external/integrated PHY.
Change-Id: I7f7661c1d489d7d88475da72a89642b7fd944cf8
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Enable the gmac2phy, make the gmac2phy work on
the rk3328-evb board.
Change-Id: I69ffed728c73c1cbab914582965cafdfefe05807
Signed-off-by: David Wu <david.wu@rock-chips.com>
The gmac2phy controller of rk3328 is connected to integrated phy
directly inside, add the node for the integrated phy support.
Change-Id: Id96d65d838d17ae4912cf8fd80d0a1f2a2aa3bf7
Signed-off-by: David Wu <david.wu@rock-chips.com>
To make integrated PHY work, need to configure the PHY clock,
PHY cru reset and related registers.
Change-Id: I08484c5402a5300f581e968828940383c09faedd
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This is wrong setting for rk3328_set_to_rmii(), so remove it.
Change-Id: Ie5c6e33f51c9e54eeaafcd9dd6a2c8e4ded4a3a8
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Support integrated ethernet PHY currently.
Change-Id: Ie8a21b9abb6064f9d42848734fccc68f22930129
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
In preparation for moving some of the phy_device structure members,
add macros for printing errors and debug information.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 72ba48be3e)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I75021fb43a0317cab4dba81fe737a23dd3f8431c
Right now the dwmac-rk tries to set up the GRF-specific speed and link
options before enabling clocks, phys etc and on previous socs this works
because the GRF is supplied on the whole by one clock.
On the rk3399 however the GRF (General Register Files) clock-supply
has been split into multiple clocks and while there is no specific
grf-gmac clock like for other sub-blocks, it seems the mac-specific
portions are actually supplied by the general mac clock.
This results in hangs on rk3399 boards if the driver is build as module.
When built in te problem of course doesn't surface, as the clocks
are of course still on at the stage before clock_disable_unused.
To solve this, simply move the clock enablement to the first position
in the powerup callback. This is also a good idea in general to
enable clocks before everything else.
Tested on rk3288, rk3368 and rk3399 the dwmac still works on all of them.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f217bfde24)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I0461d76f48cc9279e31136ce9a448f05cc16a761
Make sure to disable runtime PM, power down the PHY, and disable clocks
before returning on late probe errors.
Fixes: 27ffefd2d1 ("stmmac: dwmac-rk: create a new probe function")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2d222656db)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Id44143a0a92fc4d6ccb61293f44cf8dd1a3cd7a4
Instead of adding hooks inside stmmac_platform it is better to just use
the standard PM callbacks within the specific dwmac-driver. This only
used by the dwmac-rk driver.
This reverts commit cecbc5563a ("stmmac: allow to split suspend/resume
from init/exit callbacks").
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5a3c7805c4)
Conflicts:
include/linux/stmmac.h
Change-Id: I3864f8bfe4ee201b449ee766aba6810b498d8a74
Signed-off-by: David Wu <david.wu@rock-chips.com>
Since the rk_gmac_init() only calls another function move this
function call into probe so rk_gmac_init() can be removed.
Since commit cecbc5563a ("stmmac: allow to split suspend/resume
from init/exit callbacks") the init hook is no longer used in
dwmac-rk so this can be removed.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 07a5e76924)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I5c591b38e53d5196e4da5fe144f35bbe675f07ba
Convert the exit hook into a standard driver remove function as
the hook doesn't really buy us anything extra.
Eventually the exit hook will be deprecated in favor of the driver
remove function.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0de8c4c9a9)
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I1f8cf997b136b17be9c7e227f57008ffaab6bf1f
Use standard PM resume/suspend callbacks instead of the hooks in
stmmac_platform. This gives the driver more control and flexibility
when implementing PM functionality. The hooks in stmmac_platform
also doesn't buy us anything extra.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5619468a41)
Conflicts:
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
Change-Id: I940e17fc5ef0032f91800646d39cc1a50b439df3
Signed-off-by: David Wu <david.wu@rock-chips.com>
When suspending the machine, do not shutdown the external PHY by cutting
its regulator in the mac platform driver suspend code if Wake-on-Lan is enabled,
else it cannot wake us up.
In order to do this, split the suspend/resume callbacks from the
init/exit callbacks, so we can condition the power-down on the lack of
need to wake-up from the LAN but do it unconditionally when unloading the
module.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 229666c14c)
Conflicts:
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
Change-Id: Icad5f718400e49ff7b27064108a813fa5a8c5639
Signed-off-by: David Wu <david.wu@rock-chips.com>
Let the stmmac platform drivers provide dedicated suspend and resume
callbacks rather than always re-using the init and exits callbacks.
If the driver does not provide the suspend or resume callback, we fall
back to the old behavior trying to use exit or init.
This allows a specific platform to perform only a partial power-down on
suspend if Wake-on-Lan is enabled but always perform the full shutdown
sequence if the module is unloaded.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cecbc5563a)
Conflicts:
include/linux/stmmac.h
Change-Id: I06799616dd75175e186bfdde85814ecbda48a654
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change stmmac_remove/resume/suspend to take a device pointer so
they can be used directly by drivers that doesn't need to perform
anything device specific.
This lets us remove the PCI pm functions and later simplifiy the
platform drivers.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f4e7bd81b1)
Change-Id: I84147f3f02dae7a97664083b47a6e1272c7ca3ea
Signed-off-by: David Wu <david.wu@rock-chips.com>
The running of isp0 or isp1 is ok,
but running of isp0 and isp1 at the same time has not been tested.
Change-Id: I430aafb6060eb5aea464ddce05614604ee015e78
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
The rk3328 SoC supports atomic update, we could lock the configuration
of period and duty at first, after unlock is configured, the period and
duty are effective at the same time.
If the polarity, period and duty need to be configured together,
the way for atomic update is "configure lock and old polarity" ->
"configure period and duty" -> "configure unlock and new polarity".
Change-Id: I93d47566673ab6338d1f7e18212318b8f5277383
Signed-off-by: David Wu <david.wu@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Just use the same PWM ops for each IP, and get rid of the ops in struct
rockchip_pwm_data, but still define the three different instances of the
struct to use common interface for each IP.
Change-Id: I8a449b9b5d26be2d0ad85ed0013bf5b764f41a83
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
It is usually possible to configure the polarity, cycle and duty all at
once, so that the polarity and cycle and duty are applied atomically.
Move it from rockchip_pwm_set_enable() into rockchip_pwm_config(), as
well as prepare for the next atomic update commit.
Change-Id: I051ce87facc892353ee2f061fcc9148085f0f21b
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Drop the custom hook of pwm_enable() and implement pwm_apply_v1() and
pwm_apply_v2() instead.
Change-Id: I34c6a1206f4ae53ca48756981a2c07b4ec0e7be4
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
New PWM module provides two individual clocks for APB clock and function
clock.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I9f32de5734f9e66472ae5350023ffce9548d717d