[U-Boot] [PATCH v2 06/10] powerpc/ppc4xx: Use generic FPGA accessors on all gdsys 405ep/ex boards
Wolfgang Denk
wd at denx.de
Mon May 6 17:22:59 CEST 2013
Dear Dirk Eibach,
In message <e8fccb4d422d619744521268691e5a9b at gdsys.cc> you wrote:
>
> > You had the this, and now attempt to throw it away. This makes no
> > sense.
>
> In fact it does.
> We have FPGAs that are memory mapped and others that are not. They must
> be accessed by the same drivers. So the alternative would be to create
> FPGA instances at address NULL and getting the register offesets by
> casting pointers to u16. Not very nice either.
Your new code still boils down to using the same standard I/O
accessors.
So your FPGA registers must be mapped somehow to I/O memory.
When you can do something like
+u16 fpga_get_reg(unsigned int fpga, u16 reg)
+{
+ return in_le16((u16 *)CONFIG_SYS_FPGA_BASE(fpga) + reg / sizeof(u16));
+}
why would you not be able to continue using in_le16() directly?
Sorry, I don't get it.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ernest asks Frank how long he has been working for the company.
"Ever since they threatened to fire me."
More information about the U-Boot
mailing list