<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/board/tqc, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>board: rename "tqc" vendor to "tq"</title>
<updated>2021-11-15T19:33:32+00:00</updated>
<author>
<name>Matthias Schiffer</name>
<email>matthias.schiffer@ew.tq-group.com</email>
</author>
<published>2021-11-02T10:36:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=679530c3c6ac99bc4da4dbf73a8e169bc9654e5b'/>
<id>679530c3c6ac99bc4da4dbf73a8e169bc9654e5b</id>
<content type='text'>
The subdivision name "TQ Components" hasn't been in use for a long time.
Rename the vendor directory to "tq", which also matches our Device Tree
vendor prefix.

Signed-off-by: Matthias Schiffer &lt;matthias.schiffer@ew.tq-group.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The subdivision name "TQ Components" hasn't been in use for a long time.
Rename the vendor directory to "tq", which also matches our Device Tree
vendor prefix.

Signed-off-by: Matthias Schiffer &lt;matthias.schiffer@ew.tq-group.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Convert CONFIG_POWER_I2C et al to Kconfig</title>
<updated>2021-09-04T16:26:02+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-08-08T18:20:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9d8665b7091d7d67df7dd31eafe1b54e25f6c3e4'/>
<id>9d8665b7091d7d67df7dd31eafe1b54e25f6c3e4</id>
<content type='text'>
This converts the following to Kconfig:
   CONFIG_POWER_I2C
   CONFIG_POWER_LEGACY

They are handled at the same time due to a dependency between them.
Update the Makefile rule to use legacy power only in U-Boot proper.
Unfortunately a separate rule is needed in SPL to be able to build
legacy power.  Add SPL related symbols for both, to allow for SPL-only
usage.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
[trini: More SPL related cleanups, reword commit message]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts the following to Kconfig:
   CONFIG_POWER_I2C
   CONFIG_POWER_LEGACY

They are handled at the same time due to a dependency between them.
Update the Makefile rule to use legacy power only in U-Boot proper.
Unfortunately a separate rule is needed in SPL to be able to build
legacy power.  Add SPL related symbols for both, to allow for SPL-only
usage.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
[trini: More SPL related cleanups, reword commit message]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: Rename CONFIG_POWER to CONFIG_POWER_LEGACY</title>
<updated>2021-09-04T16:26:02+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-08-08T18:20:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=29d7153ec384e072755e8951a8a33f29372f925c'/>
<id>29d7153ec384e072755e8951a8a33f29372f925c</id>
<content type='text'>
This option is used in pre-driver model code and much of it has never
been converted to driver model.

We want to add a new option to enable power support, so we can use a
simple rule in the Makefile. Rename this one, which is really about
a particular implementation of power.

Also update the pmic.h header file so it either includes the legacy
API or the driver model one.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This option is used in pre-driver model code and much of it has never
been converted to driver model.

We want to add a new option to enable power support, so we can use a
simple rule in the Makefile. Rename this one, which is really about
a particular implementation of power.

Also update the pmic.h header file so it either includes the legacy
API or the driver model one.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY</title>
<updated>2021-08-30T18:10:07+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-08-19T03:12:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=55dabcc8f24598e2777f663de09ab55fbe1269da'/>
<id>55dabcc8f24598e2777f663de09ab55fbe1269da</id>
<content type='text'>
First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig.  Next, as you cannot
have SYS_I2C_LEGACY and DM_I2C at the same time, introduce
CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only
in SPL.  Finally, for some PowerPC cases we also need
CONFIG_TPL_SYS_I2C_LEGACY support.  Convert all of the existing users to
one or more symbols.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig.  Next, as you cannot
have SYS_I2C_LEGACY and DM_I2C at the same time, introduce
CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only
in SPL.  Finally, for some PowerPC cases we also need
CONFIG_TPL_SYS_I2C_LEGACY support.  Convert all of the existing users to
one or more symbols.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Rename CONFIG_SYS_I2C to CONFIG_SYS_I2C_LEGACY</title>
<updated>2021-07-28T18:29:37+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-07-11T03:14:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=69d9eda4da13ecabb8002fce0dded4bba3bff9f9'/>
<id>69d9eda4da13ecabb8002fce0dded4bba3bff9f9</id>
<content type='text'>
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and
CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less
than a year away.

Also we want to have a CONFIG_I2C for U-Boot proper just like we have
CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules.

Rename this symbol so it is clear it is going away.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and
CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less
than a year away.

Also we want to have a CONFIG_I2C for U-Boot proper just like we have
CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules.

Rename this symbol so it is clear it is going away.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: Enforce DM_USB migration for USB_HOST devices.</title>
<updated>2021-07-19T01:05:31+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-07-09T14:11:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=be5c0608b86852891fd61ec358b0238499bb86ca'/>
<id>be5c0608b86852891fd61ec358b0238499bb86ca</id>
<content type='text'>
As the deadline for migration to DM_USB, when using a USB host
controller has now gone two years past the deadline, enforce migration.
This is done by:

- Ensuring that all host controller options (other than the very legacy
  old MUSB ones) now select USB_HOST.  USB_HOST now enforces DM_USB and
  OF_CONTROL.
  - Remove other parts of Kconfig logic that had platforms pick DM_USB.
  - To keep Kconfig happy, have some select statements test for USB_HOST
    as well.
- Re-order some Kconfig entries and menus so that we can cleanly pick
  host or gadget roles.  For the various HCD options that have platform
  glue options, group them together and update dependencies in some
  cases.
- As SPL_DM_USB is not required, on platforms that had not yet enabled
  it, disable it.

Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Cc: FUKAUMI Naoki &lt;naobsd@gmail.com&gt;
Cc: Andre Przywara &lt;andre.przywara@arm.com&gt;
Cc: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As the deadline for migration to DM_USB, when using a USB host
controller has now gone two years past the deadline, enforce migration.
This is done by:

- Ensuring that all host controller options (other than the very legacy
  old MUSB ones) now select USB_HOST.  USB_HOST now enforces DM_USB and
  OF_CONTROL.
  - Remove other parts of Kconfig logic that had platforms pick DM_USB.
  - To keep Kconfig happy, have some select statements test for USB_HOST
    as well.
- Re-order some Kconfig entries and menus so that we can cleanly pick
  host or gadget roles.  For the various HCD options that have platform
  glue options, group them together and update dependencies in some
  cases.
- As SPL_DM_USB is not required, on platforms that had not yet enabled
  it, disable it.

Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Icenowy Zheng &lt;icenowy@aosc.io&gt;
Cc: Samuel Holland &lt;samuel@sholland.org&gt;
Cc: FUKAUMI Naoki &lt;naobsd@gmail.com&gt;
Cc: Andre Przywara &lt;andre.przywara@arm.com&gt;
Cc: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ppc: Remove TQM834x board</title>
<updated>2021-07-07T23:52:23+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-05-15T01:34:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5fe4c0cc6e80cffb6fb91a3c35a8adb6ce4e0e2b'/>
<id>5fe4c0cc6e80cffb6fb91a3c35a8adb6ce4e0e2b</id>
<content type='text'>
This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This board has not been converted to CONFIG_DM_PCI by the deadline and is
also missing conversion to CONFIG_DM.  Remove it.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop asm/global_data.h from common header</title>
<updated>2021-02-02T20:33:42+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-10-31T03:38:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=401d1c4f5d2d29c4bc4beaec95402ca23eb63295'/>
<id>401d1c4f5d2d29c4bc4beaec95402ca23eb63295</id>
<content type='text'>
Move this out of the common header and include it only where needed.  In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly.   Finally, we have a few
cases where we did not need to include &lt;asm/global_data.h&gt; at all, so
remove that include.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this out of the common header and include it only where needed.  In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly.   Finally, we have a few
cases where we did not need to include &lt;asm/global_data.h&gt; at all, so
remove that include.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>arm: mx6: Make all i.MX6 SoCs user-selectable</title>
<updated>2020-08-25T08:26:14+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2020-08-18T11:43:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f27ffe4177a7cc09614e2f87012234c1e260c8f2'/>
<id>f27ffe4177a7cc09614e2f87012234c1e260c8f2</id>
<content type='text'>
We have a number of platforms that are a combination of a carrier board
and System-on-Module (SoM) that in turn allows for the board to have
different SoCs on it.  In some cases, this is handled via board-specific
Kconfig options.  In other cases we make use of
CONFIG_SYS_EXTRA_OPTIONS.  This latter case however can lead to invalid
configurations as we will not in turn get options that in Kconfig are
selected by or depend on that setting.

To resolve this, make the SoC option a choice in Kconfig and make boards
depend on what they can support.  This change opens us up for further
clean-ups in the cases where a single CONFIG_TARGET_xxx can support
different SoCs and today they do not, or do not cleanly do so.

Reported-by: Matt Porter &lt;mporter@konsulko.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: "NXP i.MX U-Boot Team" &lt;uboot-imx@nxp.com&gt;
Cc: Soeren Moch &lt;smoch@web.de&gt;
Cc: Markus Niebel &lt;Markus.Niebel@tq-group.com&gt;
Cc: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Hannes Schmelzer &lt;hannes.schmelzer@br-automation.com&gt;
Cc: Otavio Salvador &lt;otavio@ossystems.com.br&gt;
Cc: Nikita Kiryanov &lt;nikita@compulab.co.il&gt;
Cc: Andreas Geisreiter &lt;ageisreiter@dh-electronics.de&gt;
Cc: Ludwig Zenz &lt;lzenz@dh-electronics.de&gt;
Cc: Lukasz Majewski &lt;lukma@denx.de&gt;
Cc: Akshay Bhat &lt;akshaybhat@timesys.com&gt;
Cc: Ken Lin &lt;Ken.Lin@advantech.com.tw&gt;
Cc: Ian Ray &lt;ian.ray@ge.com&gt;
Cc: Tim Harvey &lt;tharvey@gateworks.com&gt;
Cc: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Cc: Raffaele RECALCATI &lt;raffaele.recalcati@bticino.it&gt;
Cc: Simone CIANNI &lt;simone.cianni@bticino.it&gt;
Cc: Adam Ford &lt;aford173@gmail.com&gt;
Cc: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
Cc: "Eric Bénard" &lt;eric@eukrea.com&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Cc: Jason Liu &lt;jason.hui.liu@nxp.com&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: Eric Nelson &lt;eric@nelint.com&gt;
Cc: Troy Kisky &lt;troy.kisky@boundarydevices.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Parthiban Nallathambi &lt;parthiban@linumiz.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: "Sébastien Szymanski" &lt;sebastien.szymanski@armadeus.com&gt;
Cc: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Cc: Niel Fourie &lt;lusus@denx.de&gt;
Cc: Martyn Welch &lt;martyn.welch@collabora.com&gt;
Cc: Richard Hu &lt;richard.hu@technexion.com&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Cc: Arkadiusz Karas &lt;arkadiusz.karas@somlabs.com&gt;
Cc: Breno Lima &lt;breno.lima@nxp.com&gt;
Cc: Francesco Montefoschi &lt;francesco.montefoschi@udoo.org&gt;
Cc: Silvio Fricke &lt;open-source@softing.de&gt;
Tested-by: Matt Porter &lt;mporter@konsulko.com&gt; [colibri_imx6]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have a number of platforms that are a combination of a carrier board
and System-on-Module (SoM) that in turn allows for the board to have
different SoCs on it.  In some cases, this is handled via board-specific
Kconfig options.  In other cases we make use of
CONFIG_SYS_EXTRA_OPTIONS.  This latter case however can lead to invalid
configurations as we will not in turn get options that in Kconfig are
selected by or depend on that setting.

To resolve this, make the SoC option a choice in Kconfig and make boards
depend on what they can support.  This change opens us up for further
clean-ups in the cases where a single CONFIG_TARGET_xxx can support
different SoCs and today they do not, or do not cleanly do so.

Reported-by: Matt Porter &lt;mporter@konsulko.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: "NXP i.MX U-Boot Team" &lt;uboot-imx@nxp.com&gt;
Cc: Soeren Moch &lt;smoch@web.de&gt;
Cc: Markus Niebel &lt;Markus.Niebel@tq-group.com&gt;
Cc: Igor Opaniuk &lt;igor.opaniuk@toradex.com&gt;
Cc: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Hannes Schmelzer &lt;hannes.schmelzer@br-automation.com&gt;
Cc: Otavio Salvador &lt;otavio@ossystems.com.br&gt;
Cc: Nikita Kiryanov &lt;nikita@compulab.co.il&gt;
Cc: Andreas Geisreiter &lt;ageisreiter@dh-electronics.de&gt;
Cc: Ludwig Zenz &lt;lzenz@dh-electronics.de&gt;
Cc: Lukasz Majewski &lt;lukma@denx.de&gt;
Cc: Akshay Bhat &lt;akshaybhat@timesys.com&gt;
Cc: Ken Lin &lt;Ken.Lin@advantech.com.tw&gt;
Cc: Ian Ray &lt;ian.ray@ge.com&gt;
Cc: Tim Harvey &lt;tharvey@gateworks.com&gt;
Cc: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Cc: Raffaele RECALCATI &lt;raffaele.recalcati@bticino.it&gt;
Cc: Simone CIANNI &lt;simone.cianni@bticino.it&gt;
Cc: Adam Ford &lt;aford173@gmail.com&gt;
Cc: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
Cc: "Eric Bénard" &lt;eric@eukrea.com&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Cc: Jason Liu &lt;jason.hui.liu@nxp.com&gt;
Cc: Ye Li &lt;ye.li@nxp.com&gt;
Cc: Eric Nelson &lt;eric@nelint.com&gt;
Cc: Troy Kisky &lt;troy.kisky@boundarydevices.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Parthiban Nallathambi &lt;parthiban@linumiz.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: "Sébastien Szymanski" &lt;sebastien.szymanski@armadeus.com&gt;
Cc: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Cc: Niel Fourie &lt;lusus@denx.de&gt;
Cc: Martyn Welch &lt;martyn.welch@collabora.com&gt;
Cc: Richard Hu &lt;richard.hu@technexion.com&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Cc: Arkadiusz Karas &lt;arkadiusz.karas@somlabs.com&gt;
Cc: Breno Lima &lt;breno.lima@nxp.com&gt;
Cc: Francesco Montefoschi &lt;francesco.montefoschi@udoo.org&gt;
Cc: Silvio Fricke &lt;open-source@softing.de&gt;
Tested-by: Matt Porter &lt;mporter@konsulko.com&gt; [colibri_imx6]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert bd_t to struct bd_info by coccinelle</title>
<updated>2020-07-17T13:30:13+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-06-26T06:13:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b75d8dc5642b71eb029e7cd38031a32029e736cc'/>
<id>b75d8dc5642b71eb029e7cd38031a32029e736cc</id>
<content type='text'>
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include &lt;asm/u-boot.h&gt;

  #include &lt;asm/u-boot.h&gt;
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  &lt;smpl&gt;
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  &lt;/smpl&gt;

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include &lt;asm/u-boot.h&gt;

  #include &lt;asm/u-boot.h&gt;
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  &lt;smpl&gt;
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  &lt;/smpl&gt;

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
