From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hayes Wang Date: Fri, 12 Jun 2020 03:50:22 +0000 Subject: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B In-Reply-To: <1fed268b-b6b4-e435-7ce9-728376a6c381@denx.de> References: <1394712342-15778-377-Taiwan-albertk@realtek.com> <1394712342-15778-381-Taiwan-albertk@realtek.com> <78409d87-514d-1321-76de-a3b5161086a7@denx.de> <581ab1fe517047fb8624bf22ac46151c@realtek.com> <6a79f2a4d85c42138fb93ffef5222a6e@realtek.com> <6c791826-d28b-cc89-b230-6b5d1a252399@denx.de> <43e79ab399134d4392770f0f28a29372@realtek.com> <1fed268b-b6b4-e435-7ce9-728376a6c381@denx.de> Message-ID: <8175c1928607441d85c2884c4ec71cb1@realtek.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Marek Vasut [mailto:marex at denx.de] > Sent: Friday, June 12, 2020 8:05 AM [...] > > The real data (16-bit) would be inserted a dummy bit, > > and store the 17-bit to efuse offset 0x7d. Therefore, when > > reading the 17-bit data from efuse, we have to remove the > > dummy to get the real data. > > Ah, hmm, then let's use u32 type and be done with it. That solves the > typecasts and is safe. Would that work ? The unit of PHY data is 2-byte, so I think I have to convert it. void ocp_reg_write(struct r8152 *tp, u16 addr, u16 data); Best Regards, Hayes