Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

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

 



Hi,

Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx> writes:
>> +/* XUSB_DEV registers */
>> +#define SPARAM 0x000
>> +#define  SPARAM_ERSTMAX_SHIFT 16
>> +#define  SPARAM_ERSTMAX_MASK GENMASK(4, 0)
>> +#define DB 0x004
>> +#define  DB_TARGET_SHIFT 8
>> +#define  DB_TARGET_MASK GENMASK(7, 0)
>> +#define  DB_STREAMID_SHIFT 16
>> +#define  DB_STREAMID_MASK GENMASK(15, 0)
> To me, define it as :
> #define  DB_STREAMID_MASK GENMASK(31, 16),
> it's more clearer.
> and define another macro
> #define  DB_STREAMID(x) (((x) & 0xffff) << 16)

perhaps?

#define DB_STREAMID(x)	(((x) << 16) & DB_STREAMID_MASK)

Otherwise you end up defining the mask twice.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux