Re: [linux-sunxi] [PATCH u-boot-sunxi 02/11] ARM: sunxi: Add GMAC base address and clocks
Hi, On Thu, Dec 19, 2013 at 6:38 PM, Olliver Schinagl wrote: > On 19-12-13 10:58, Chen-Yu Tsai wrote: >> >> From: Jens Kuske >> >> Signed-off-by: Jens Kuske >> --- >> arch/arm/include/asm/arch-sunxi/clock.h | 3 +++ >> arch/arm/include/asm/arch-sunxi/cpu.h | 1 + >> 2 files changed, 4 insertions(+) >> >> diff --git a/arch/arm/include/asm/arch-sunxi/clock.h >> b/arch/arm/include/asm/arch-sunxi/clock.h >> index 2e65a9d..b4e540e 100644 >> --- a/arch/arm/include/asm/arch-sunxi/clock.h >> +++ b/arch/arm/include/asm/arch-sunxi/clock.h >> @@ -104,6 +104,8 @@ struct sunxi_ccm_reg { >> u32 mali_clk_cfg; /* 0x154 */ >> u8 res7[0x4]; >> u32 mbus_clk_cfg; /* 0x15c */ >> + u8 res8[0x4]; >> + u32 gmac_clk_cfg; /* 0x164 */ >> }; >> >> /* apb1 bit field */ >> @@ -170,6 +172,7 @@ struct sunxi_ccm_reg { >> #define AHB_GATE_OFFSET_USB_OHCI0 2 >> #define AHB_GATE_OFFSET_USB_EHCI0 1 >> #define AHB_GATE_OFFSET_USB 0 >> +#define AHB_GATE_OFFSET_GMAC 17 > > Looks like GMAC and EMAC use the same AHB Gate offset? Can't we use > AHB_GATE_OFFSET_EMAC? or atleast put both defines on the same (ordered) > spot? They have the same offset, but are in separate registers. EMAC uses ccm->ahb_gate0; GMAC uses ccm->ahb_gate1. ChenYu > > Oliver > >> >> #define CCM_AHB_GATE_GPS (0x1 << 26) >> #define CCM_AHB_GATE_SDRAM (0x1 << 14) >> diff --git a/arch/arm/include/asm/arch-sunxi/cpu.h >> b/arch/arm/include/asm/arch-sunxi/cpu.h >> index 378989c..17facc3 100644 >> --- a/arch/arm/include/asm/arch-sunxi/cpu.h >> +++ b/arch/arm/include/asm/arch-sunxi/cpu.h >> @@ -109,6 +109,7 @@ >> >> #define SUNXI_GPS_BASE0x01c3 >> #define SUNXI_MALI400_BASE0x01c4 >> +#define SUNXI_GMAC_BASE0x01c5 >> >> /* module sram */ >> #define SUNXI_SRAM_C_BASE 0x01d0 >> > > -- > You received this message because you are subscribed to the Google Groups > "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to linux-sunxi+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [linux-sunxi] [PATCH u-boot-sunxi 02/11] ARM: sunxi: Add GMAC base address and clocks
On 19-12-13 10:58, Chen-Yu Tsai wrote: From: Jens Kuske Signed-off-by: Jens Kuske --- arch/arm/include/asm/arch-sunxi/clock.h | 3 +++ arch/arm/include/asm/arch-sunxi/cpu.h | 1 + 2 files changed, 4 insertions(+) diff --git a/arch/arm/include/asm/arch-sunxi/clock.h b/arch/arm/include/asm/arch-sunxi/clock.h index 2e65a9d..b4e540e 100644 --- a/arch/arm/include/asm/arch-sunxi/clock.h +++ b/arch/arm/include/asm/arch-sunxi/clock.h @@ -104,6 +104,8 @@ struct sunxi_ccm_reg { u32 mali_clk_cfg; /* 0x154 */ u8 res7[0x4]; u32 mbus_clk_cfg; /* 0x15c */ + u8 res8[0x4]; + u32 gmac_clk_cfg; /* 0x164 */ }; /* apb1 bit field */ @@ -170,6 +172,7 @@ struct sunxi_ccm_reg { #define AHB_GATE_OFFSET_USB_OHCI0 2 #define AHB_GATE_OFFSET_USB_EHCI0 1 #define AHB_GATE_OFFSET_USB 0 +#define AHB_GATE_OFFSET_GMAC 17 Looks like GMAC and EMAC use the same AHB Gate offset? Can't we use AHB_GATE_OFFSET_EMAC? or atleast put both defines on the same (ordered) spot? Oliver #define CCM_AHB_GATE_GPS (0x1 << 26) #define CCM_AHB_GATE_SDRAM (0x1 << 14) diff --git a/arch/arm/include/asm/arch-sunxi/cpu.h b/arch/arm/include/asm/arch-sunxi/cpu.h index 378989c..17facc3 100644 --- a/arch/arm/include/asm/arch-sunxi/cpu.h +++ b/arch/arm/include/asm/arch-sunxi/cpu.h @@ -109,6 +109,7 @@ #define SUNXI_GPS_BASE0x01c3 #define SUNXI_MALI400_BASE0x01c4 +#define SUNXI_GMAC_BASE0x01c5 /* module sram */ #define SUNXI_SRAM_C_BASE 0x01d0 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[linux-sunxi] [PATCH u-boot-sunxi 02/11] ARM: sunxi: Add GMAC base address and clocks
From: Jens Kuske Signed-off-by: Jens Kuske --- arch/arm/include/asm/arch-sunxi/clock.h | 3 +++ arch/arm/include/asm/arch-sunxi/cpu.h | 1 + 2 files changed, 4 insertions(+) diff --git a/arch/arm/include/asm/arch-sunxi/clock.h b/arch/arm/include/asm/arch-sunxi/clock.h index 2e65a9d..b4e540e 100644 --- a/arch/arm/include/asm/arch-sunxi/clock.h +++ b/arch/arm/include/asm/arch-sunxi/clock.h @@ -104,6 +104,8 @@ struct sunxi_ccm_reg { u32 mali_clk_cfg; /* 0x154 */ u8 res7[0x4]; u32 mbus_clk_cfg; /* 0x15c */ + u8 res8[0x4]; + u32 gmac_clk_cfg; /* 0x164 */ }; /* apb1 bit field */ @@ -170,6 +172,7 @@ struct sunxi_ccm_reg { #define AHB_GATE_OFFSET_USB_OHCI0 2 #define AHB_GATE_OFFSET_USB_EHCI0 1 #define AHB_GATE_OFFSET_USB0 +#define AHB_GATE_OFFSET_GMAC 17 #define CCM_AHB_GATE_GPS (0x1 << 26) #define CCM_AHB_GATE_SDRAM (0x1 << 14) diff --git a/arch/arm/include/asm/arch-sunxi/cpu.h b/arch/arm/include/asm/arch-sunxi/cpu.h index 378989c..17facc3 100644 --- a/arch/arm/include/asm/arch-sunxi/cpu.h +++ b/arch/arm/include/asm/arch-sunxi/cpu.h @@ -109,6 +109,7 @@ #define SUNXI_GPS_BASE 0x01c3 #define SUNXI_MALI400_BASE 0x01c4 +#define SUNXI_GMAC_BASE0x01c5 /* module sram */ #define SUNXI_SRAM_C_BASE 0x01d0 -- 1.8.5.1 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.