Skip to contentSkip to conversation

arm: socfpga: Fix SYSMGR_FPGAINTF_EMACx bit mask

PATCH New Ley Foon Tan 3 participants 4 messages Aug 15, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: Fix SYSMGR_FPGAINTF_EMACx bit mask

Bitmask for EMAC should be bit-0, EMAC1 bit-8 and EMAC2 bit-16.

---
 arch/arm/mach-socfpga/include/mach/system_manager_s10.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +3 -3
index 813dff2..297f9e1 100644
@@ -146,9 +146,9 @@ struct socfpga_system_manager {
 #define SYSMGR_FPGAINTF_SDMMC	BIT(8)
 #define SYSMGR_FPGAINTF_SPIM0	BIT(16)
 #define SYSMGR_FPGAINTF_SPIM1	BIT(24)
-#define SYSMGR_FPGAINTF_EMAC0	(0x11 << 0)
-#define SYSMGR_FPGAINTF_EMAC1	(0x11 << 8)
-#define SYSMGR_FPGAINTF_EMAC2	(0x11 << 16)
+#define SYSMGR_FPGAINTF_EMAC0	BIT(0)
+#define SYSMGR_FPGAINTF_EMAC1	BIT(8)
+#define SYSMGR_FPGAINTF_EMAC2	BIT(16)
 
 #define SYSMGR_SDMMC_SMPLSEL_SHIFT	4
 #define SYSMGR_SDMMC_DRVSEL_SHIFT	0
Signature · 1 line
2.2.2
#1 lore raw

PATCH 1/1 arm: socfpga: Fix SYSMGR_FPGAINTF_EMACx bit mask

Quoted 12 lines · Ley Foon Tan

Bitmask for EMAC should be bit-0, EMAC1 bit-8 and EMAC2 bit-16.

---
 arch/arm/mach-socfpga/include/mach/system_manager_s10.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +0 -0
index 813dff2..297f9e1 100644

arch/arm/mach-socfpga/include/mach/system_manager_s10.h struct socfpga_system_manager { · line 151

Quoted 6 lines
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +0 -3
@@ -146,9 +146,9 @@ struct socfpga_system_manager {
 #define SYSMGR_FPGAINTF_SDMMC	BIT(8)
 #define SYSMGR_FPGAINTF_SPIM0	BIT(16)
 #define SYSMGR_FPGAINTF_SPIM1	BIT(24)
-#define SYSMGR_FPGAINTF_EMAC0	(0x11 << 0)
-#define SYSMGR_FPGAINTF_EMAC1	(0x11 << 8)
-#define SYSMGR_FPGAINTF_EMAC2	(0x11 << 16)

Wasn't the point here to unreset the OCP bits alongside the standard EMAC resets too ?

Quoted 7 lines
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +3 -0
+#define SYSMGR_FPGAINTF_EMAC0	BIT(0)
+#define SYSMGR_FPGAINTF_EMAC1	BIT(8)
+#define SYSMGR_FPGAINTF_EMAC2	BIT(16)
 
 #define SYSMGR_SDMMC_SMPLSEL_SHIFT	4
 #define SYSMGR_SDMMC_DRVSEL_SHIFT	0
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 arm: socfpga: Fix SYSMGR_FPGAINTF_EMACx bit mask

Quoted 8 lines · Marek Vasut
Quoted 7 lines · Ley Foon Tan

Bitmask for EMAC should be bit-0, EMAC1 bit-8 and EMAC2 bit-16.

---
 arch/arm/mach-socfpga/include/mach/system_manager_s10.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 14 lines

arch/arm/mach-socfpga/include/mach/system_manager_s10.h struct socfpga_system_manager { · line 151

Quoted 11 lines
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +0 -3
index 813dff2..297f9e1 100644
@@ -146,9 +146,9 @@ struct socfpga_system_manager {
 #define SYSMGR_FPGAINTF_SDMMC        BIT(8)
 #define SYSMGR_FPGAINTF_SPIM0        BIT(16)
 #define SYSMGR_FPGAINTF_SPIM1        BIT(24)
-#define SYSMGR_FPGAINTF_EMAC0        (0x11 << 0)
-#define SYSMGR_FPGAINTF_EMAC1        (0x11 << 8)
-#define SYSMGR_FPGAINTF_EMAC2        (0x11 << 16)

Wasn't the point here to unreset the OCP bits alongside the standard EMAC resets too ?

No, these registers are nothing related to reset. These for FPGA interface registers if we route the peripheral pins to use FPGA IO.

Quoted 11 lines

arch/arm/mach-socfpga/include/mach/system_manager_s10.h struct socfpga_system_manager { · line 154

Quoted 8 lines
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +3 -0
+#define SYSMGR_FPGAINTF_EMAC0        BIT(0)
+#define SYSMGR_FPGAINTF_EMAC1        BIT(8)
+#define SYSMGR_FPGAINTF_EMAC2        BIT(16)
 
 #define SYSMGR_SDMMC_SMPLSEL_SHIFT   4
 #define SYSMGR_SDMMC_DRVSEL_SHIFT    0

--

Regards
Ley Foon

#3 lore raw

PATCH 1/1 arm: socfpga: Fix SYSMGR_FPGAINTF_EMACx bit mask

Quoted 23 lines · Ley Foon Tan
Quoted 8 lines · Marek Vasut
Quoted 7 lines · Ley Foon Tan

Bitmask for EMAC should be bit-0, EMAC1 bit-8 and EMAC2 bit-16.

---
 arch/arm/mach-socfpga/include/mach/system_manager_s10.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 14 lines

arch/arm/mach-socfpga/include/mach/system_manager_s10.h struct socfpga_system_manager { · line 151

Quoted 11 lines
arch/arm/mach-socfpga/include/mach/system_manager_s10.h +0 -3
index 813dff2..297f9e1 100644
@@ -146,9 +146,9 @@ struct socfpga_system_manager {
 #define SYSMGR_FPGAINTF_SDMMC        BIT(8)
 #define SYSMGR_FPGAINTF_SPIM0        BIT(16)
 #define SYSMGR_FPGAINTF_SPIM1        BIT(24)
-#define SYSMGR_FPGAINTF_EMAC0        (0x11 << 0)
-#define SYSMGR_FPGAINTF_EMAC1        (0x11 << 8)
-#define SYSMGR_FPGAINTF_EMAC2        (0x11 << 16)

Wasn't the point here to unreset the OCP bits alongside the standard EMAC resets too ?

Quoted 2 lines

No, these registers are nothing related to reset. These for FPGA interface registers if we route the peripheral pins to use FPGA IO.

OK, applied.

Signature · 2 lines
Best regards,
Marek Vasut