Re: [DO NOT MERGE v5 14/37] clk: Compatible with narrow registers

Uwe Kleine-König <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.ide,gmane.linux.drivers.devicetree,gmane.linux.kernel,gmane.linux.kernel.renesas-soc,gmane.linux.kernel.clk,gmane.comp.video.dri.devel,gmane.linux.kernel.pci,gmane.linux.serial
Message-ID <[email protected]>
Hello,

On Tue, Dec 05, 2023 at 06:45:33PM +0900, Yoshinori Sato wrote:
> @@ -675,13 +681,17 @@ struct clk_div_table {
>   * CLK_DIVIDER_BIG_ENDIAN - By default little endian register accesses are used
>   *	for the divider register.  Setting this flag makes the register accesses
>   *	big endian.
> + * CLK_DIVIDER_REG_8BIT - by default 32bit register accesses are used for
> + *	the gate register.  Setting this flag makes the register accesses 8bit.
> + * CLK_DIVIDER_REG_16BIT - by default 32bit register accesses are used for
> + *	the gate register.  Setting this flag makes the register accesses 16bit.
>   */
>  struct clk_divider {
>  	struct clk_hw	hw;
>  	void __iomem	*reg;
>  	u8		shift;
>  	u8		width;
> -	u8		flags;
> +	u32		flags;
>  	const struct clk_div_table	*table;
>  	spinlock_t	*lock;
>  };

I wonder why .flags was made bigger here. The two new flag values would
still fit into the u8, right?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmVu9yQACgkQj4D7WH0S
/k5q9gf/eD5pj/8ERjn9GwHl1uStF4vOGLa/uZ8iRNZpMi1Kvits+6Yri1aT0IG9
cVW6KuG3Gmw0GpkFkppfZNMPa9C1NzLJhD5aFtSoSfIkAVA8JNVweDRBV9xaiLxc
eI1t6ze8m74Pxtm/kTa3kPnm+x6Oe1SRZwF+0D5yEMKwGz4GEhFkGNHK3TI+nYm9
3gfZcJAeydHL0ORJU8XS4Plj7jQ3WE9a+zxy4Odn3V+KS/2Ck2Kqp6kzJSH5CAVn
YxeDRNGxrm3AY8y4d2jI/vBTB+4VwJofVczJ1y5ksyistGiyWT59kYjhDLxo87th
4lS0y2d0FfwkAxslCSxm22vlDDZ+Sw==
=TMZa
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.