From: Marek Vasut Date: Sat, 21 Mar 2020 16:08:59 +0100 Subject: [PATCH 5/8] xhci: mediatek: Add support for MTK xHCI host controller In-Reply-To: References: <1583909445-27444-1-git-send-email-chunfeng.yun@mediatek.com> <1583909445-27444-6-git-send-email-chunfeng.yun@mediatek.com> <2a096d71-d4a3-a693-8822-791448f64f99@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 3/21/20 3:12 PM, Simon Glass wrote: > Hi Marek, > > On Wed, 11 Mar 2020 at 01:11, Marek Vasut wrote: >> >> On 3/11/20 7:50 AM, Chunfeng Yun wrote: >> [...] >>> + * @u3_ctrl_p[x]: ip usb3 port x control register, only low 4bytes are used >>> + * @u2_ctrl_p[x]: ip usb2 port x control register, only low 4bytes are used >>> + * @u2_phy_pll: usb2 phy pll control register >>> + */ >>> +struct mtk_ippc_regs { >>> + __le32 ip_pw_ctr0; >>> + __le32 ip_pw_ctr1; >>> + __le32 ip_pw_ctr2; >> >> Please define the registers with #define macros , this struct-based >> approach doesn't scale. >> > > What does this mean? I much prefer the struct approach, unless the > registers move around in future generations. This means I want to see #define MTK_XHCI_ 0xf00 The struct based approach doesn't scale and on e.g. altera is causing us a massive amount of problems now. It looked like a good idea back then, but now it's a massive burden, so I don't want that to proliferate. And here I would expect the registers to move around, just like everywhere else.