Re: [PATCH v2 1/2] ahci: imx: add namespace for register enums

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

 



On Fri, Apr 18, 2014 at 02:44:25PM +0800, Shawn Guo wrote:
> Update register enums a little bit to add proper namespace prefix, and
> have the names match i.MX reference manual.
> 
> Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxxxxx>
> ---
>  drivers/ata/ahci_imx.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
> index 497c7ab..009a074 100644
> --- a/drivers/ata/ahci_imx.c
> +++ b/drivers/ata/ahci_imx.c
> @@ -29,9 +29,9 @@
>  #include "ahci.h"
>  
>  enum {
> -	PORT_PHY_CTL = 0x178,			/* Port0 PHY Control */
> -	PORT_PHY_CTL_PDDQ_LOC = 0x100000,	/* PORT_PHY_CTL bits */
> -	HOST_TIMER1MS = 0xe0,			/* Timer 1-ms */
> +	IMX_SATA_TIMER1MS			= 0x00e0,
> +	IMX_SATA_P0PHYCR			= 0x0178,

P0PHYCR isn't really readily dechipherable to "Port0 PHY Control".
Probably keeping the comment is better?  Also, constant names don't
necessarily have to be exactly the same as hardware manuals.  If
easier to understand and map back (via comment or whatever), using
more humanly-readable names is completely fine.  Also, maybe IMX_SATA_
is a bit too long for prefix?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux