phy/mfd/soc: exynos: Header cleanup
Krzysztof Kozlowski
maintainerv4 cover phy/mfd/soc: exynos: Header cleanup
Suggested by Marek, continuation of cleanup of PMU register defines in headers.
Let's keep all of them in include/linux/soc/samsung/exynos-regs-pmu.h.
Everything is bisectable but should go in through one tree. It can go through phy tree - in that case 4/5 (added in v3) needs Lee's ack. For the rest - samsung-soc ack is given by me.
I can also take it through samsung-soc - please let me know.
Changes since v3:
=================
1. Minor adjust of commit msg in patch 2/5 (suggested by Bartlomiej).
2. Add Bartlomiej's reviews.
Changes since v2:
=================
1. Rebase wasn't done properly (and MFD Exynos LPASS is not build by exynos defconfig) so Kbuild test robot reported issue. New patch 4/5.
Changes since v1:
=================
1. Rebase - dependencies should be already in.
2. Add Lee's acks.
Best regards,
Krzysztof
Krzysztof Kozlowski (5):
phy: exynos4: Remove duplicated defines of PHY register defines
phy: exynos5: Remove duplicated defines of PHY register defines
phy: exynos-mipi-video: Use consistent method to address phy registers
mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
phy: exynos: Use one define for enable bit
drivers/mfd/exynos-lpass.c | 4 +- drivers/phy/phy-exynos-dp-video.c | 6 +-- drivers/phy/phy-exynos-mipi-video.c | 71 ++++++++++++++--------------- drivers/phy/phy-exynos5-usbdrd.c | 6 +-- include/linux/mfd/syscon/exynos4-pmu.h | 21 --------- include/linux/mfd/syscon/exynos5-pmu.h | 52 --------------------- include/linux/soc/samsung/exynos-regs-pmu.h | 16 ++++++- 7 files changed, 58 insertions(+), 118 deletions(-) delete mode 100644 include/linux/mfd/syscon/exynos4-pmu.h delete mode 100644 include/linux/mfd/syscon/exynos5-pmu.h
Signature · 1 line
2.9.3
Krzysztof Kozlowski
maintainerPATCH v4 1/5 phy: exynos4: Remove duplicated defines of PHY register defines
Phy drivers access PMU region through regmap provided by exynos-pmu
driver. However there is no need to duplicate defines for PMU
registers. Instead just use whatever is defined in exynos-regs-pmu.h.
Additionally MIPI PHY registers for Exynos5433 start from the same address as Exynos4 and Exynos5250 so re-use existing defines.
This reduces number of defines and allows removal of one header file.
--- drivers/phy/phy-exynos-mipi-video.c | 12 ++++++------ include/linux/mfd/syscon/exynos4-pmu.h | 21 --------------------- include/linux/mfd/syscon/exynos5-pmu.h | 3 --- include/linux/soc/samsung/exynos-regs-pmu.h | 9 ++++++++- 4 files changed, 14 insertions(+), 31 deletions(-) delete mode 100644 include/linux/mfd/syscon/exynos4-pmu.h
drivers/phy/phy-exynos-mipi-video.c +6 -6
@@ -12,7 +12,6 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> -#include <linux/mfd/syscon/exynos4-pmu.h> #include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/module.h> #include <linux/of.h>
@@ -21,6 +20,7 @@#include <linux/phy/phy.h> #include <linux/regmap.h> #include <linux/spinlock.h> +#include <linux/soc/samsung/exynos-regs-pmu.h> #include <linux/mfd/syscon.h> enum exynos_mipi_phy_id {
@@ -173,7 +173,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = {/* EXYNOS_MIPI_PHY_ID_CSIS0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM0, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5433_MIPI_PHY0_CONTROL, + .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(0), .resetn_reg = EXYNOS5433_SYSREG_CAM0_MIPI_DPHY_CON,
@@ -182,7 +182,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = {/* EXYNOS_MIPI_PHY_ID_DSIM0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS0, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5433_MIPI_PHY0_CONTROL, + .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(0), .resetn_reg = EXYNOS5433_SYSREG_DISP_MIPI_PHY,
@@ -191,7 +191,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = {/* EXYNOS_MIPI_PHY_ID_CSIS1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5433_MIPI_PHY1_CONTROL, + .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(1), .resetn_reg = EXYNOS5433_SYSREG_CAM0_MIPI_DPHY_CON,
@@ -200,7 +200,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = {/* EXYNOS_MIPI_PHY_ID_DSIM1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5433_MIPI_PHY1_CONTROL, + .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(1), .resetn_reg = EXYNOS5433_SYSREG_DISP_MIPI_PHY,
@@ -209,7 +209,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = {/* EXYNOS_MIPI_PHY_ID_CSIS2 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5433_MIPI_PHY2_CONTROL, + .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(2), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(0), .resetn_reg = EXYNOS5433_SYSREG_CAM1_MIPI_DPHY_CON,
include/linux/mfd/syscon/exynos4-pmu.h deleted +0 -21
@@ -1,21 +0,0 @@ -/* -* Copyright (C) 2015 Samsung Electronics Co., Ltd. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef _LINUX_MFD_SYSCON_PMU_EXYNOS4_H_ -#define _LINUX_MFD_SYSCON_PMU_EXYNOS4_H_ - -/* Exynos4 PMU register definitions */ - -/* MIPI_PHYn_CONTROL register offset: n = 0..1 */ -#define EXYNOS4_MIPI_PHY_CONTROL (n) (0x710 + (n) * 4) -#define EXYNOS4_MIPI_PHY_ENABLE (1 << 0) -#define EXYNOS4_MIPI_PHY_SRESETN (1 << 1) -#define EXYNOS4_MIPI_PHY_MRESETN (1 << 2) -#define EXYNOS4_MIPI_PHY_RESET_MASK (3 << 1) - -#endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS4_H_ */
include/linux/mfd/syscon/exynos5-pmu.h +0 -3
@@ -38,9 +38,6 @@/* Exynos5433 specific register definitions */ #define EXYNOS5433_USBHOST30_PHY_CONTROL (0x728) -#define EXYNOS5433_MIPI_PHY0_CONTROL (0x710) -#define EXYNOS5433_MIPI_PHY1_CONTROL (0x714) -#define EXYNOS5433_MIPI_PHY2_CONTROL (0x718)#define EXYNOS5_PHY_ENABLE BIT(0)#define EXYNOS5_MIPI_PHY_S_RESETN BIT(1)
include/linux/soc/samsung/exynos-regs-pmu.h +8 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2015 Samsung Electronics Co., Ltd. * http://www.samsung.com * * EXYNOS - Power management unit definition
@@ -50,6 +50,13 @@#define S5P_WAKEUP_MASK 0x0608#define S5P_WAKEUP_MASK2 0x0614 +/* MIPI_PHYn_CONTROL, valid for Exynos3250, Exynos4, Exynos5250 and Exynos5433 */ +#define EXYNOS4_MIPI_PHY_CONTROL (n) (0x0710 + (n) * 4) +#define EXYNOS4_MIPI_PHY_ENABLE (1 << 0) +#define EXYNOS4_MIPI_PHY_SRESETN (1 << 1) +#define EXYNOS4_MIPI_PHY_MRESETN (1 << 2) +#define EXYNOS4_MIPI_PHY_RESET_MASK (3 << 1) +#define S5P_INFORM0 0x0800#define S5P_INFORM1 0x0804#define S5P_INFORM5 0x0814
Signature · 1 line
2.9.3
Krzysztof Kozlowski
maintainerPATCH v4 2/5 phy: exynos5: Remove duplicated defines of PHY register defines
In reply to Krzysztof KozlowskiPhy drivers access PMU region through regmap provided by exynos-pmu
driver. However there is no need to duplicate defines for PMU
registers. Instead just use whatever is defined in exynos-regs-pmu.h.
This reduces number of defines.
--- drivers/phy/phy-exynos-dp-video.c | 1 + drivers/phy/phy-exynos5-usbdrd.c | 1 + include/linux/mfd/syscon/exynos5-pmu.h | 27 --------------------------- include/linux/soc/samsung/exynos-regs-pmu.h | 8 ++++++++ 4 files changed, 10 insertions(+), 27 deletions(-)
drivers/phy/phy-exynos-dp-video.c +1 -0
@@ -20,6 +20,7 @@#include <linux/phy/phy.h> #include <linux/platform_device.h> #include <linux/regmap.h> +#include <linux/soc/samsung/exynos-regs-pmu.h> struct exynos_dp_video_phy_drvdata {u32 phy_ctrl_offset;
drivers/phy/phy-exynos5-usbdrd.c +1 -0
@@ -25,6 +25,7 @@#include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> +#include <linux/soc/samsung/exynos-regs-pmu.h> /* Exynos USB PHY registers */ #define EXYNOS5_FSEL_9MHZ6 0x0
include/linux/mfd/syscon/exynos5-pmu.h +0 -27
@@ -12,33 +12,6 @@#ifndef _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_#define _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ -/* Exynos5 PMU register definitions */ -#define EXYNOS5_HDMI_PHY_CONTROL (0x700) -#define EXYNOS5_USBDRD_PHY_CONTROL (0x704) - -/* Exynos5250 specific register definitions */ -#define EXYNOS5_USBHOST_PHY_CONTROL (0x708) -#define EXYNOS5_EFNAND_PHY_CONTROL (0x70c) -#define EXYNOS5_MIPI_PHY0_CONTROL (0x710) -#define EXYNOS5_MIPI_PHY1_CONTROL (0x714) -#define EXYNOS5_ADC_PHY_CONTROL (0x718) -#define EXYNOS5_MTCADC_PHY_CONTROL (0x71c) -#define EXYNOS5_DPTX_PHY_CONTROL (0x720) -#define EXYNOS5_SATA_PHY_CONTROL (0x724) - -/* Exynos5420 specific register definitions */ -#define EXYNOS5420_USBDRD1_PHY_CONTROL (0x708) -#define EXYNOS5420_USBHOST_PHY_CONTROL (0x70c) -#define EXYNOS5420_MIPI_PHY0_CONTROL (0x714) -#define EXYNOS5420_MIPI_PHY1_CONTROL (0x718) -#define EXYNOS5420_MIPI_PHY2_CONTROL (0x71c) -#define EXYNOS5420_ADC_PHY_CONTROL (0x720) -#define EXYNOS5420_MTCADC_PHY_CONTROL (0x724) -#define EXYNOS5420_DPTX_PHY_CONTROL (0x728) - -/* Exynos5433 specific register definitions */ -#define EXYNOS5433_USBHOST30_PHY_CONTROL (0x728) -#define EXYNOS5_PHY_ENABLE BIT(0)#define EXYNOS5_MIPI_PHY_S_RESETN BIT(1)#define EXYNOS5_MIPI_PHY_M_RESETN BIT(2)
include/linux/soc/samsung/exynos-regs-pmu.h +8 -0
@@ -349,6 +349,8 @@#define EXYNOS5_AUTO_WDTRESET_DISABLE 0x0408#define EXYNOS5_MASK_WDTRESET_REQUEST 0x040C +#define EXYNOS5_USBDRD_PHY_CONTROL 0x0704 +#define EXYNOS5_DPTX_PHY_CONTROL 0x0720#define EXYNOS5_USE_RETENTION BIT(4)#define EXYNOS5_SYS_WDTRESET (1 << 20)
@@ -502,6 +504,11 @@#define EXYNOS5420_KFC_CORE_RESET (_nr) \ ((EXYNOS5420_KFC_CORE_RESET0 | EXYNOS5420_KFC_ETM_RESET0) << (_nr)) +#define EXYNOS5420_USBDRD1_PHY_CONTROL 0x0708 +#define EXYNOS5420_MIPI_PHY0_CONTROL 0x0714 +#define EXYNOS5420_MIPI_PHY1_CONTROL 0x0718 +#define EXYNOS5420_MIPI_PHY2_CONTROL 0x071C +#define EXYNOS5420_DPTX_PHY_CONTROL 0x0728#define EXYNOS5420_ARM_CORE2_SYS_PWR_REG 0x1020#define EXYNOS5420_DIS_IRQ_ARM_CORE2_LOCAL_SYS_PWR_REG 0x1024#define EXYNOS5420_DIS_IRQ_ARM_CORE2_CENTRAL_SYS_PWR_REG 0x1028
@@ -639,6 +646,7 @@ | EXYNOS5420_KFC_USE_STANDBY_WFI3)/* For EXYNOS5433 */ +#define EXYNOS5433_USBHOST30_PHY_CONTROL (0x0728)#define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028)#define EXYNOS5433_PAD_RETENTION_MMC2_OPTION (0x30C8)#define EXYNOS5433_PAD_RETENTION_TOP_OPTION (0x3108)
Signature · 1 line
2.9.3
Krzysztof Kozlowski
maintainerPATCH v4 3/5 phy: exynos-mipi-video: Use consistent method to address phy registers
In reply to Krzysztof KozlowskiExynos4 MIPI phy registers are defined with macro calculating the offset for given phyN. Use the same method for Exynos5420 to be consistent.
--- drivers/phy/phy-exynos-mipi-video.c | 20 ++++++++++---------- include/linux/soc/samsung/exynos-regs-pmu.h | 4 +--- 2 files changed, 11 insertions(+), 13 deletions(-)
drivers/phy/phy-exynos-mipi-video.c +10 -10
@@ -110,46 +110,46 @@ static const struct mipi_phy_device_desc exynos5420_mipi_phy = {/* EXYNOS_MIPI_PHY_ID_CSIS0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM0, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5420_MIPI_PHY0_CONTROL, + .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS5_MIPI_PHY_S_RESETN, - .resetn_reg = EXYNOS5420_MIPI_PHY0_CONTROL, + .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_DSIM0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS0, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5420_MIPI_PHY0_CONTROL, + .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS5_MIPI_PHY_M_RESETN, - .resetn_reg = EXYNOS5420_MIPI_PHY0_CONTROL, + .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_CSIS1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM1, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5420_MIPI_PHY1_CONTROL, + .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS5_MIPI_PHY_S_RESETN, - .resetn_reg = EXYNOS5420_MIPI_PHY1_CONTROL, + .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_DSIM1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS1, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5420_MIPI_PHY1_CONTROL, + .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS5_MIPI_PHY_M_RESETN, - .resetn_reg = EXYNOS5420_MIPI_PHY1_CONTROL, + .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_CSIS2 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, .enable_val = EXYNOS5_PHY_ENABLE, - .enable_reg = EXYNOS5420_MIPI_PHY2_CONTROL, + .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(2), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS5_MIPI_PHY_S_RESETN, - .resetn_reg = EXYNOS5420_MIPI_PHY2_CONTROL, + .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(2), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, },
include/linux/soc/samsung/exynos-regs-pmu.h +1 -3
@@ -505,9 +505,7 @@ ((EXYNOS5420_KFC_CORE_RESET0 | EXYNOS5420_KFC_ETM_RESET0) << (_nr))#define EXYNOS5420_USBDRD1_PHY_CONTROL 0x0708 -#define EXYNOS5420_MIPI_PHY0_CONTROL 0x0714 -#define EXYNOS5420_MIPI_PHY1_CONTROL 0x0718 -#define EXYNOS5420_MIPI_PHY2_CONTROL 0x071C +#define EXYNOS5420_MIPI_PHY_CONTROL (n) (0x0714 + (n) * 4)#define EXYNOS5420_DPTX_PHY_CONTROL 0x0728#define EXYNOS5420_ARM_CORE2_SYS_PWR_REG 0x1020#define EXYNOS5420_DIS_IRQ_ARM_CORE2_LOCAL_SYS_PWR_REG 0x1024
Signature · 1 line
2.9.3
Krzysztof Kozlowski
maintainerPATCH v4 4/5 mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
In reply to Krzysztof KozlowskiThe MFD-specific header will go away because it duplicates defines from exynos-regs-pmu.h.
--- drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/exynos-lpass.c +2 -2
@@ -18,11 +18,11 @@#include <linux/io.h> #include <linux/module.h> #include <linux/mfd/syscon.h> -#include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/of.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/regmap.h> +#include <linux/soc/samsung/exynos-regs-pmu.h> #include <linux/types.h> /* LPASS Top register definitions */
@@ -83,7 +83,7 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)/* Activate related PADs from retention state */ regmap_write (lpass->pmu,EXYNOS5433_PAD_RETENTION_AUD_OPTION , -EXYNOS5433_PAD_INITIATE_WAKEUP_FROM_LOWPWR ); +EXYNOS_WAKEUP_FROM_LOWPWR );exynos_lpass_core_sw_reset (lpass,LPASS_I2S_SW_RESET );exynos_lpass_core_sw_reset (lpass,LPASS_DMA_SW_RESET );
Signature · 1 line
2.9.3
Lee Jones
AppliedRe: [PATCH v4 4/5] mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
Quoted 9 lines · Krzysztof Kozlowski
The MFD-specific header will go away because it duplicates defines from
exynos-regs-pmu.h.Reported-by kbuild test robot <[email protected]>Signed-off-by Krzysztof Kozlowski <[email protected]>Reviewed-by Bartlomiej Zolnierkiewicz <[email protected]>--- drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Quoted 26 lines
drivers/mfd/exynos-lpass.c +2
-2@@ -18,11 +18,11 @@#include <linux/io.h> #include <linux/module.h> #include <linux/mfd/syscon.h> -#include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/of.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/regmap.h> +#include <linux/soc/samsung/exynos-regs-pmu.h> #include <linux/types.h> /* LPASS Top register definitions */ @@ -83,7 +83,7 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass)/* Activate related PADs from retention state */ regmap_write (lpass->pmu,EXYNOS5433_PAD_RETENTION_AUD_OPTION , -EXYNOS5433_PAD_INITIATE_WAKEUP_FROM_LOWPWR ); +EXYNOS_WAKEUP_FROM_LOWPWR );exynos_lpass_core_sw_reset (lpass,LPASS_I2S_SW_RESET );exynos_lpass_core_sw_reset (lpass,LPASS_DMA_SW_RESET );
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Krzysztof Kozlowski
maintainerRe: [PATCH v4 4/5] mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
Quoted 5 lines · Lee Jones
Quoted 3 lines · Krzysztof Kozlowski
The MFD-specific header will go away because it duplicates defines from
exynos-regs-pmu.h.
Quoted 8 lines
Quoted 6 lines
Reported-by kbuild test robot <[email protected]>Signed-off-by Krzysztof Kozlowski <[email protected]>Reviewed-by Bartlomiej Zolnierkiewicz <[email protected]>--- drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Applied, thanks.
Hi,
This is also needed for patch 5/5 in the set so I was wondering if this can be put on separate branch and then shared if phy maintainers would need it?
Best regards,
Krzysztof
Re: [PATCH v4 4/5] mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
Quoted 13 lines · Krzysztof Kozlowski
Quoted 12 lines · Lee Jones
Quoted 9 lines · Krzysztof Kozlowski
The MFD-specific header will go away because it duplicates defines from
exynos-regs-pmu.h.Reported-by kbuild test robot <[email protected]>Signed-off-by Krzysztof Kozlowski <[email protected]>Reviewed-by Bartlomiej Zolnierkiewicz <[email protected]>--- drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 7 lines
Quoted 1 line
Applied, thanks.
Hi,
This is also needed for patch 5/5 in the set so I was wondering if this can be put on separate branch and then shared if phy maintainers would need it?
What is the dependency?
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Krzysztof Kozlowski
maintainerRe: [PATCH v4 4/5] mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
Quoted 17 lines · Lee Jones
Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Lee Jones
Quoted 9 lines · Krzysztof Kozlowski
The MFD-specific header will go away because it duplicates defines from
exynos-regs-pmu.h.Reported-by kbuild test robot <[email protected]>Signed-off-by Krzysztof Kozlowski <[email protected]>Reviewed-by Bartlomiej Zolnierkiewicz <[email protected]>--- drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Applied, thanks.
Quoted 7 lines
Quoted 5 lines
Hi,
This is also needed for patch 5/5 in the set so I was wondering if this can be put on separate branch and then shared if phy maintainers would need it?
What is the dependency?
This patch removes the last usage of define from header we want to remove (linux/mfd/syscon/exynos5-pmu.h). The next patch (5/5) removes the header as there are no more users.
BTW, I hope you got all the mails from this patchset including cover letter.
Best regards,
Krzysztof
[GIT PULL] Immutable branch between MFD and PHY due for the v4.12 merge window
In reply to Krzysztof KozlowskiEnjoy!
The following changes since commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:
Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-phy-v4.12
for you to fetch changes up to f7f6c060547c51691f9b943e6c33f63675c1a0a9:
mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header (2017-03-23 10:47:27 +0000)
----------------------------------------------------------------
Immutable branch between MFD and PHY due for the v4.12 merge window
----------------------------------------------------------------
Krzysztof Kozlowski (1):
mfd: exynos-lpass: Use common soc/exynos-regs-pmu.h header
drivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Krzysztof Kozlowski
maintainerRe: [GIT PULL] Immutable branch between MFD and PHY due for the v4.12 merge window
Quoted 17 lines · Lee Jones
Enjoy!
The following changes since commit
c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-phy-v4.12for you to fetch changes up to
f7f6c060547c51691f9b943e6c33f63675c1a0a9:mfd: exynos-lpass: Use common
soc/exynos-regs-pmu.hheader (2017-03-23 10:47:27 +0000)----------------------------------------------------------------
Immutable branch between MFD and PHY due for the v4.12 merge window
Quoted 6 lines
----------------------------------------------------------------
Krzysztof Kozlowski (1):
mfd: exynos-lpass: Use commonsoc/exynos-regs-pmu.hheaderdrivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks.
Kishon,
This is the dependency for last patch in v4 of:
https://www.spinics.net/lists/arm-kernel/msg568609.html
Everything else is acked and ready for you to apply.
Any comments?
Best regards,
Krzysztof
Re: [GIT PULL] Immutable branch between MFD and PHY due for the v4.12 merge window
In reply to Lee JonesQuoted 9 lines · Lee Jones
Enjoy!
The following changes since commit
c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-phy-v4.12
merged this to linux-phy.
Thanks
Kishon
Quoted 15 lines
for you to fetch changes up to
f7f6c060547c51691f9b943e6c33f63675c1a0a9:mfd: exynos-lpass: Use common
soc/exynos-regs-pmu.hheader (2017-03-23 10:47:27 +0000)----------------------------------------------------------------
Immutable branch between MFD and PHY due for the v4.12 merge window----------------------------------------------------------------
Krzysztof Kozlowski (1):
mfd: exynos-lpass: Use commonsoc/exynos-regs-pmu.hheaderdrivers/mfd/exynos-lpass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Krzysztof Kozlowski
maintainerPATCH v4 5/5 phy: exynos: Use one define for enable bit
In reply to Krzysztof KozlowskiThere is no need for separate defines for Exynos4 and Exynos5 phy enable bit and MIPI phy reset bits. In both cases there are the same so simplify it.
This reduces number of defines and allows removal of one header file.
--- drivers/phy/phy-exynos-dp-video.c | 5 ++-- drivers/phy/phy-exynos-mipi-video.c | 39 ++++++++++++++--------------- drivers/phy/phy-exynos5-usbdrd.c | 5 ++-- include/linux/mfd/syscon/exynos5-pmu.h | 22 ---------------- include/linux/soc/samsung/exynos-regs-pmu.h | 3 ++- 5 files changed, 25 insertions(+), 49 deletions(-) delete mode 100644 include/linux/mfd/syscon/exynos5-pmu.h
drivers/phy/phy-exynos-dp-video.c +2 -3
@@ -14,7 +14,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/mfd/syscon.h> -#include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/phy/phy.h>
@@ -37,7 +36,7 @@ static int exynos_dp_video_phy_power_on(struct phy *phy)/* Disable power isolation on DP-PHY */ return regmap_update_bits (state->regs, state->drvdata->phy_ctrl_offset, -EXYNOS5_PHY_ENABLE ,EXYNOS5_PHY_ENABLE ); +EXYNOS4_PHY_ENABLE ,EXYNOS4_PHY_ENABLE ); }static int exynos_dp_video_phy_power_off (struct phy *phy)
@@ -46,7 +45,7 @@ static int exynos_dp_video_phy_power_off(struct phy *phy)/* Enable power isolation on DP-PHY */ return regmap_update_bits (state->regs, state->drvdata->phy_ctrl_offset, -EXYNOS5_PHY_ENABLE ,0 ); +EXYNOS4_PHY_ENABLE ,0 ); }static const struct phy_ops exynos_dp_video_phy_ops = {
drivers/phy/phy-exynos-mipi-video.c +19 -20
@@ -12,7 +12,6 @@#include <linux/err.h> #include <linux/io.h> #include <linux/kernel.h> -#include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h>
@@ -64,7 +63,7 @@ static const struct mipi_phy_device_desc s5pv210_mipi_phy = { {/* EXYNOS_MIPI_PHY_ID_CSIS0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM0, - .enable_val = EXYNOS4_MIPI_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS4_MIPI_PHY_SRESETN,
@@ -73,7 +72,7 @@ static const struct mipi_phy_device_desc s5pv210_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_DSIM0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS0, - .enable_val = EXYNOS4_MIPI_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS4_MIPI_PHY_MRESETN,
@@ -82,7 +81,7 @@ static const struct mipi_phy_device_desc s5pv210_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_CSIS1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM1, - .enable_val = EXYNOS4_MIPI_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS4_MIPI_PHY_SRESETN,
@@ -91,7 +90,7 @@ static const struct mipi_phy_device_desc s5pv210_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_DSIM1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS1, - .enable_val = EXYNOS4_MIPI_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = EXYNOS4_MIPI_PHY_MRESETN,
@@ -109,46 +108,46 @@ static const struct mipi_phy_device_desc exynos5420_mipi_phy = { {/* EXYNOS_MIPI_PHY_ID_CSIS0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM0, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, - .resetn_val = EXYNOS5_MIPI_PHY_S_RESETN, + .resetn_val = EXYNOS4_MIPI_PHY_SRESETN, .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_DSIM0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS0, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, - .resetn_val = EXYNOS5_MIPI_PHY_M_RESETN, + .resetn_val = EXYNOS4_MIPI_PHY_MRESETN, .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(0), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_CSIS1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM1, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, - .resetn_val = EXYNOS5_MIPI_PHY_S_RESETN, + .resetn_val = EXYNOS4_MIPI_PHY_SRESETN, .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_DSIM1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS1, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, - .resetn_val = EXYNOS5_MIPI_PHY_M_RESETN, + .resetn_val = EXYNOS4_MIPI_PHY_MRESETN, .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(1), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, }, {/* EXYNOS_MIPI_PHY_ID_CSIS2 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS5420_MIPI_PHY_CONTROL(2), .enable_map = EXYNOS_MIPI_REGMAP_PMU, - .resetn_val = EXYNOS5_MIPI_PHY_S_RESETN, + .resetn_val = EXYNOS4_MIPI_PHY_SRESETN, .resetn_reg = EXYNOS5420_MIPI_PHY_CONTROL(2), .resetn_map = EXYNOS_MIPI_REGMAP_PMU, },
@@ -172,7 +171,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = { {/* EXYNOS_MIPI_PHY_ID_CSIS0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_DSIM0, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(0),
@@ -181,7 +180,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_DSIM0 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_CSIS0, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(0), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(0),
@@ -190,7 +189,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_CSIS1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(1),
@@ -199,7 +198,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_DSIM1 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(1), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(1),
@@ -208,7 +207,7 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = { }, {/* EXYNOS_MIPI_PHY_ID_CSIS2 */ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, - .enable_val = EXYNOS5_PHY_ENABLE, + .enable_val = EXYNOS4_PHY_ENABLE, .enable_reg = EXYNOS4_MIPI_PHY_CONTROL(2), .enable_map = EXYNOS_MIPI_REGMAP_PMU, .resetn_val = BIT(0),
drivers/phy/phy-exynos5-usbdrd.c +2 -3
@@ -22,7 +22,6 @@#include <linux/platform_device.h> #include <linux/mutex.h> #include <linux/mfd/syscon.h> -#include <linux/mfd/syscon/exynos5-pmu.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <linux/soc/samsung/exynos-regs-pmu.h>
@@ -236,10 +235,10 @@ static void exynos5_usbdrd_phy_isol(struct phy_usb_instance *inst,if (!inst->reg_pmu)return ; - val = on ?0 :EXYNOS5_PHY_ENABLE ; + val = on ?0 :EXYNOS4_PHY_ENABLE ;regmap_update_bits (inst->reg_pmu, inst->pmu_offset, -EXYNOS5_PHY_ENABLE , val); +EXYNOS4_PHY_ENABLE , val); }/*
include/linux/mfd/syscon/exynos5-pmu.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* -* Exynos5 SoC series Power Management Unit (PMU) register offsets -* and bit definitions. -* -* Copyright (C) 2014 Samsung Electronics Co., Ltd. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ -#define _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ - -#define EXYNOS5_PHY_ENABLE BIT(0) -#define EXYNOS5_MIPI_PHY_S_RESETN BIT(1) -#define EXYNOS5_MIPI_PHY_M_RESETN BIT(2) - -#define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028) -#define EXYNOS5433_PAD_INITIATE_WAKEUP_FROM_LOWPWR BIT(28) - -#endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ */
include/linux/soc/samsung/exynos-regs-pmu.h +2 -1
@@ -52,7 +52,8 @@/* MIPI_PHYn_CONTROL, valid for Exynos3250, Exynos4, Exynos5250 and Exynos5433 */ #define EXYNOS4_MIPI_PHY_CONTROL (n) (0x0710 + (n) * 4) -#define EXYNOS4_MIPI_PHY_ENABLE (1 << 0) +/* Phy enable bit, common for all phy registers, not only MIPI */ +#define EXYNOS4_PHY_ENABLE (1 << 0)#define EXYNOS4_MIPI_PHY_SRESETN (1 << 1)#define EXYNOS4_MIPI_PHY_MRESETN (1 << 2)#define EXYNOS4_MIPI_PHY_RESET_MASK (3 << 1)
Signature · 1 line
2.9.3
Kishon Vijay Abraham I
AppliedQuoted 19 lines · Krzysztof Kozlowski
Suggested by Marek, continuation of cleanup of PMU register defines in headers.
Let's keep all of them ininclude/linux/soc/samsung/exynos-regs-pmu.h.Everything is bisectable but should go in through one tree. It can go through phy tree - in that case 4/5 (added in v3) needs Lee's ack. For the rest - samsung-soc ack is given by me.
I can also take it through samsung-soc - please let me know.Changes since v3:
=================
1. Minor adjust of commit msg in patch 2/5 (suggested by Bartlomiej).
2. Add Bartlomiej's reviews.Changes since v2:
=================
1. Rebase wasn't done properly (and MFD Exynos LPASS is not build by exynos defconfig) soKbuildtest robot reported issue. New patch 4/5.
Quoted 4 lines
Changes since v1:
=================
1. Rebase - dependencies should be already in.
2. Add Lee's acks.
merged, thanks!
-Kishon
Quoted 24 lines
Best regards,
KrzysztofKrzysztof Kozlowski (5):
phy: exynos4: Remove duplicated defines of PHY register defines
phy: exynos5: Remove duplicated defines of PHY register defines
phy: exynos-mipi-video: Use consistent method to address phy registers
mfd: exynos-lpass: Use commonsoc/exynos-regs-pmu.hheader
phy: exynos: Use one define for enable bitdrivers/mfd/exynos-lpass.c | 4 +- drivers/phy/phy-exynos-dp-video.c | 6 +-- drivers/phy/phy-exynos-mipi-video.c | 71 ++++++++++++++--------------- drivers/phy/phy-exynos5-usbdrd.c | 6 +-- include/linux/mfd/syscon/exynos4-pmu.h | 21 --------- include/linux/mfd/syscon/exynos5-pmu.h | 52 --------------------- include/linux/soc/samsung/exynos-regs-pmu.h | 16 ++++++- 7 files changed, 58 insertions(+), 118 deletions(-) delete mode 100644 include/linux/mfd/syscon/exynos4-pmu.h delete mode 100644 include/linux/mfd/syscon/exynos5-pmu.h