lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Apr 2015 15:30:23 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Bintian Wang <bintian.wang@...wei.com>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	catalin.marinas@....com, will.deacon@....com,
	devicetree@...r.kernel.org, robh+dt@...nel.org, pawel.moll@....com,
	mark.rutland@....com, ijc+devicetree@...lion.org.uk,
	galak@...eaurora.org, khilman@...aro.org, mturquette@...aro.org,
	rob.herring@...aro.org, zhangfei.gao@...aro.org,
	haojian.zhuang@...aro.org, xuwei5@...ilicon.com,
	jh80.chung@...sung.com, olof@...om.net, yanhaifeng@...il.com,
	sboyd@...eaurora.org, xuejiancheng@...wei.com,
	sledge.yanwei@...wei.com, tomeu.vizoso@...labora.com,
	linux@....linux.org.uk, guodong.xu@...aro.org,
	jorge.ramirez-ortiz@...aro.org, tyler.baker@...aro.org,
	xuyiping@...ilicon.com, wangbinghui@...ilicon.com,
	zhenwei.wang@...ilicon.com, victor.lixin@...ilicon.com,
	puck.chen@...ilicon.com, dan.zhao@...ilicon.com,
	huxinwei@...wei.com, z.liuxinliang@...wei.com, heyunlei@...wei.com,
	kong.kongxinwei@...ilicon.com, btw@...l.itp.ac.cn, w.f@...wei.com,
	liguozhu@...ilicon.com
Subject: Re: [PATCH v2 4/6] clk: hi6220: Clock driver support for Hisilicon hi6220 SoC

On Monday 13 April 2015 17:17:38 Bintian Wang wrote:
> +#define HI6220_CFG_CSI2PHY     8
> +#define HI6220_ISP_SCLK_GATE   9
> +#define HI6220_ISP_SCLK_GATE1  10
> +#define HI6220_ADE_CORE_GATE   11
> +#define HI6220_CODEC_VPU_GATE  12
> +#define HI6220_MED_SYSPLL      13
> +
> +/* mux clocks */
> +#define HI6220_1440_1200       20
> +#define HI6220_1000_1200       21
> +#define HI6220_1000_1440       22
> +
> +/* divider clocks */
> +#define HI6220_CODEC_JPEG      30
> +#define HI6220_ISP_SCLK_SRC    31
> +#define HI6220_ISP_SCLK1       32
> 

The numbers seem rather arbitrary, and you have both holes as well as duplicate
numbers here. I would suggest you do one of two things instead:

a) have a separate header file per clock driver and make all the
   numbers unique and consecutive within that header

b) use the same numbers as the hardware registers so you can put the
   numbers directly into the dts and don't need a header to create
   an artificial ABI between the clock driver and the boot loader.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ