Skip to content

Commit c31d1cd

Browse files
LorenzoBianconibebarino
authored andcommitted
clk: en7523: remove REG_PCIE*_{MEM,MEM_MASK} configuration
REG_PCIE*_MEM and REG_PCIE*_MEM_MASK regs (PBUS_CSR memory region) are not part of the scu block on the EN7581 SoC and they are used to select the PCIE ports on the PBUS, so remove this configuration from the clock driver and set these registers in the PCIE host driver instead. This patch does not introduce any backward incompatibility since the dts for EN7581 SoC is not upstream yet. Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 0f7c637 commit c31d1cd

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

drivers/clk/clk-en7523.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
#define REG_RESET_CONTROL_PCIE1 BIT(27)
3232
#define REG_RESET_CONTROL_PCIE2 BIT(26)
3333
/* EN7581 */
34-
#define REG_PCIE0_MEM 0x00
35-
#define REG_PCIE0_MEM_MASK 0x04
36-
#define REG_PCIE1_MEM 0x08
37-
#define REG_PCIE1_MEM_MASK 0x0c
38-
#define REG_PCIE2_MEM 0x10
39-
#define REG_PCIE2_MEM_MASK 0x14
4034
#define REG_NP_SCU_PCIC 0x88
4135
#define REG_NP_SCU_SSTR 0x9c
4236
#define REG_PCIE_XSI0_SEL_MASK GENMASK(14, 13)
@@ -415,26 +409,14 @@ static void en7581_pci_disable(struct clk_hw *hw)
415409
static int en7581_clk_hw_init(struct platform_device *pdev,
416410
void __iomem *np_base)
417411
{
418-
void __iomem *pb_base;
419412
u32 val;
420413

421-
pb_base = devm_platform_ioremap_resource(pdev, 3);
422-
if (IS_ERR(pb_base))
423-
return PTR_ERR(pb_base);
424-
425414
val = readl(np_base + REG_NP_SCU_SSTR);
426415
val &= ~(REG_PCIE_XSI0_SEL_MASK | REG_PCIE_XSI1_SEL_MASK);
427416
writel(val, np_base + REG_NP_SCU_SSTR);
428417
val = readl(np_base + REG_NP_SCU_PCIC);
429418
writel(val | 3, np_base + REG_NP_SCU_PCIC);
430419

431-
writel(0x20000000, pb_base + REG_PCIE0_MEM);
432-
writel(0xfc000000, pb_base + REG_PCIE0_MEM_MASK);
433-
writel(0x24000000, pb_base + REG_PCIE1_MEM);
434-
writel(0xfc000000, pb_base + REG_PCIE1_MEM_MASK);
435-
writel(0x28000000, pb_base + REG_PCIE2_MEM);
436-
writel(0xfc000000, pb_base + REG_PCIE2_MEM_MASK);
437-
438420
return 0;
439421
}
440422

0 commit comments

Comments
 (0)