Message ID | 1377866264-21110-7-git-send-email-ulrich.hecht@gmail.com (mailing list archive) |
---|---|
State | RFC |
Headers | show |
Hello. On 08/30/2013 04:37 PM, Ulrich Hecht wrote: > From: Nguyen Viet Dung <nv-dung@jinso.co.jp> > This patch add clock for I2C bus. > Signed-off-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> > --- > arch/arm/mach-shmobile/clock-r8a7790.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c > index d99b87b..05cd34b 100644 > --- a/arch/arm/mach-shmobile/clock-r8a7790.c > +++ b/arch/arm/mach-shmobile/clock-r8a7790.c [...] > @@ -181,6 +182,7 @@ static struct clk div6_clks[DIV6_NR] = { > > /* MSTP */ > enum { > + MSTP931, MSTP930, MSTP929, MSTP928, Please break the line after "MSTP930,". [...] > @@ -286,6 +293,10 @@ static struct clk_lookup lookups[] = { > CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), > CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), > CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), > + CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP931]), > + CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP930]), > + CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP929]), > + CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP928]), These should be sorted downwards by MSTPxxx index, no? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks for the review. On Fri, Aug 30, 2013 at 7:31 PM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > On 08/30/2013 04:37 PM, Ulrich Hecht wrote: >> --- a/arch/arm/mach-shmobile/clock-r8a7790.c >> +++ b/arch/arm/mach-shmobile/clock-r8a7790.c >> @@ -181,6 +182,7 @@ static struct clk div6_clks[DIV6_NR] = { >> >> /* MSTP */ >> enum { >> + MSTP931, MSTP930, MSTP929, MSTP928, > > Please break the line after "MSTP930,". Could you explain what the system behind this is? >> @@ -286,6 +293,10 @@ static struct clk_lookup lookups[] = { >> CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), >> CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), >> CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), >> + CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP931]), >> + CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP930]), >> + CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP929]), >> + CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP928]), > > These should be sorted downwards by MSTPxxx index, no? OK. CU Uli -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 03-09-2013 11:21, Ulrich Hecht wrote: > <sergei.shtylyov@cogentembedded.com> wrote: >> On 08/30/2013 04:37 PM, Ulrich Hecht wrote: >>> --- a/arch/arm/mach-shmobile/clock-r8a7790.c >>> +++ b/arch/arm/mach-shmobile/clock-r8a7790.c >>> @@ -181,6 +182,7 @@ static struct clk div6_clks[DIV6_NR] = { >>> >>> /* MSTP */ >>> enum { >>> + MSTP931, MSTP930, MSTP929, MSTP928, >> Please break the line after "MSTP930,". > Could you explain what the system behind this is? Every line should start with MSTPxx0 and end with MSTPxx9, ideally. Although, I see this file doesn't always follow this rule, so you can ignore me. :-) > CU > Uli WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index d99b87b..05cd34b 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c @@ -52,6 +52,7 @@ #define SMSTPCR5 0xe6150144 #define SMSTPCR7 0xe615014c #define SMSTPCR8 0xe6150990 +#define SMSTPCR9 0xe6150994 #define SDCKCR 0xE6150074 #define SD2CKCR 0xE6150078 @@ -181,6 +182,7 @@ static struct clk div6_clks[DIV6_NR] = { /* MSTP */ enum { + MSTP931, MSTP930, MSTP929, MSTP928, MSTP813, MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, MSTP717, MSTP716, @@ -192,6 +194,10 @@ enum { }; static struct clk mstp_clks[MSTP_NR] = { + [MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */ + [MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */ + [MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */ + [MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */ [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ @@ -247,6 +253,7 @@ static struct clk_lookup lookups[] = { CLKDEV_CON_ID("mp", &mp_clk), CLKDEV_CON_ID("qspi", &qspi_clk), CLKDEV_CON_ID("cp", &cp_clk), + CLKDEV_CON_ID("peripheral_clk", &hp_clk), /* DIV4 */ CLKDEV_CON_ID("sdh", &div4_clks[DIV4_SDH]), @@ -286,6 +293,10 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), + CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP931]), + CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP930]), + CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP929]), + CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP928]), }; #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \