Re: [PATCH v2 8/8] OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 03, 2009 at 04:24:35AM -0700, Paul Walmsley wrote:
> @@ -42,134 +47,19 @@ static void clk_omap1_dummy_disable(struct clk *clk)
>  {
>  }
>  
> -static const struct clkops clkops_dummy = {
> -	.enable = clk_omap1_dummy_enable,
> -	.disable = clk_omap1_dummy_disable,
> -};
...
> +/*
> + * clkops
> + */
>  
> -	/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
> -	/* (on 730, bit 13 must not be cleared) */
> -	if (cpu_is_omap7xx())
> -		omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
> -	else
> -		omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
> +const struct clkops clkops_dspck = {
> +	.enable		= omap1_clk_enable_dsp_domain,
> +	.disable	= omap1_clk_disable_dsp_domain,
> +};
>  
> -	/* Put DSP/MPUI into reset until needed */
> -	omap_writew(0, ARM_RSTCT1);
> -	omap_writew(1, ARM_RSTCT2);
> -	omap_writew(0x400, ARM_IDLECT1);
> +const struct clkops clkops_dummy = {
> +	.enable		= clk_omap1_dummy_enable,
> +	.disable	= clk_omap1_dummy_disable,
> +};
>  
> -	/*
> -	 * According to OMAP5910 Erratum SYS_DMA_1, bit DMACK_REQ (bit 8)
> -	 * of the ARM_IDLECT2 register must be set to zero. The power-on
> -	 * default value of this bit is one.
> -	 */
> -	omap_writew(0x0000, ARM_IDLECT2);	/* Turn LCD clock off also */
> +const struct clkops clkops_uart = {
> +	.enable		= omap1_clk_enable_uart_functional,
> +	.disable	= omap1_clk_disable_uart_functional,
> +};

What is the reasoning for moving all clkops away from their associated
enable/disable functions right to the end of the file?

Isn't it better to have like stuff together, in much the same way that
it's preferred to have EXPORT_SYMBOL next to their function/data that
it's exporting?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux